shalu-dashboard-ui.js 3.5 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721
  1. import { defineComponent as te, computed as L, openBlock as pe, createElementBlock as Qe, normalizeStyle as Sr, toDisplayString as Bi, Fragment as wt, isVNode as nu, Comment as QG, Text as TS, reactive as tn, getCurrentInstance as vn, onMounted as it, onUpdated as ep, onUnmounted as nl, watch as se, inject as Ge, provide as pt, ref as U, unref as B, shallowRef as ae, watchEffect as ht, onBeforeUnmount as yt, triggerRef as zle, createVNode as M, h as jg, Transition as co, withDirectives as bi, resolveDirective as Vle, cloneVNode as Ns, render as sf, nextTick as Tt, toRef as Nn, withModifiers as lf, vShow as Bs, onBeforeMount as HG, Teleport as PS, createTextVNode as Kt, isRef as tp, toRefs as $S, toRaw as qo, onBeforeUpdate as GG, TransitionGroup as JM, onActivated as Fle, getCurrentScope as jG, onScopeDispose as f0, createElementVNode as He, warn as Wle, mergeProps as _n, renderSlot as zn, useAttrs as Qle, useSlots as ZG, createCommentVNode as _t, normalizeClass as Ye, createBlock as je, withCtx as we, resolveDynamicComponent as Ec, readonly as Hle, onDeactivated as Gle, vModelRadio as UG, renderList as ag, withKeys as Y4, pushScopeId as AS, popScopeId as ES, resolveComponent as cl } from "vue";
  2. var Ri = /* @__PURE__ */ ((t) => (t[t.STATIC = 0] = "STATIC", t[t.API = 1] = "API", t))(Ri || {});
  3. const eI = {
  4. text: {
  5. type: String,
  6. required: !0
  7. },
  8. width: {
  9. type: Number
  10. },
  11. height: {
  12. type: Number
  13. },
  14. fontSize: {
  15. type: Number
  16. },
  17. fontWeight: {
  18. type: [Number, String]
  19. },
  20. color: {
  21. type: String
  22. },
  23. backgroundColor: {
  24. type: String
  25. },
  26. textAlign: {
  27. type: String
  28. },
  29. direction: {
  30. type: String
  31. }
  32. }, jle = {
  33. container: {
  34. style: {
  35. background: {
  36. type: "none"
  37. }
  38. },
  39. props: {
  40. width: 300,
  41. height: 80
  42. }
  43. },
  44. props: {
  45. text: "标题内容",
  46. fontSize: 24,
  47. color: "#fff",
  48. fontWeight: "bold",
  49. textAlign: "left",
  50. direction: "horizontal"
  51. }
  52. };
  53. function Zle(t) {
  54. const e = {};
  55. for (const n in t)
  56. if (typeof t[n] == "object")
  57. switch (n) {
  58. case "background":
  59. t[n].type === "none" && (e[n] = "none"), t[n].type === "color" && (e[n] = t[n].color), t[n].type === "image" && (e[n + "-image"] = `url(${t[n].image}) no-repeat center center`, e[n + "-size"] = t[n].fillType);
  60. break;
  61. case "border":
  62. t[n].type === "none" ? e[n] = "none" : e[n] = `${t[n].width}px ${t[n].type} ${t[n].color}`;
  63. break;
  64. case "borderRadius":
  65. t[n].type === "all" ? e[n] = `${t[n].value}${t[n].unit}` : e[n] = `${t[n].topLeft}${t[n].unit} ${t[n].topRight}${t[n].unit} ${t[n].bottomLeft}${t[n].unit} ${t[n].bottomRight}${t[n].unit}`;
  66. break;
  67. case "boxShadow":
  68. t[n].enabled && (e[n] = `${t[n].offsetX}px ${t[n].offsetY}px ${t[n].blurRadius}px ${t[n].spreadRadius}px ${t[n].color} ${t[n].inset ? "inset" : ""}`);
  69. break;
  70. case "backdropFilter":
  71. t[n].enabled && (e[n] = `blur(${t[n].blur}px)`);
  72. break;
  73. }
  74. else typeof t[n] == "number" ? e[n] = t[n] + "px" : typeof t[n] == "string" && (e[n] = t[n]);
  75. return e;
  76. }
  77. const Zg = /* @__PURE__ */ te({
  78. __name: "index",
  79. props: eI,
  80. setup(t) {
  81. const e = t, n = L(() => {
  82. const r = Zle(e), i = {};
  83. return r.color.length > 9 && (i.backgroundImage = r.color, i.webkitBackgroundClip = "text", i.webkitTextFillColor = "transparent"), {
  84. ...i,
  85. ...r,
  86. width: "100%",
  87. height: "100%",
  88. lineHeight: e.height + "px"
  89. };
  90. });
  91. return (r, i) => (pe(), Qe("div", {
  92. class: "cus-title",
  93. style: Sr(n.value)
  94. }, Bi(r.text), 5));
  95. }
  96. });
  97. function Ug(t) {
  98. "@babel/helpers - typeof";
  99. return Ug = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
  100. return typeof e;
  101. } : function(e) {
  102. return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  103. }, Ug(t);
  104. }
  105. function Ule(t, e) {
  106. if (Ug(t) != "object" || !t) return t;
  107. var n = t[Symbol.toPrimitive];
  108. if (n !== void 0) {
  109. var r = n.call(t, e || "default");
  110. if (Ug(r) != "object") return r;
  111. throw new TypeError("@@toPrimitive must return a primitive value.");
  112. }
  113. return (e === "string" ? String : Number)(t);
  114. }
  115. function Xle(t) {
  116. var e = Ule(t, "string");
  117. return Ug(e) == "symbol" ? e : e + "";
  118. }
  119. function Yle(t, e, n) {
  120. return (e = Xle(e)) in t ? Object.defineProperty(t, e, {
  121. value: n,
  122. enumerable: !0,
  123. configurable: !0,
  124. writable: !0
  125. }) : t[e] = n, t;
  126. }
  127. function q4(t, e) {
  128. var n = Object.keys(t);
  129. if (Object.getOwnPropertySymbols) {
  130. var r = Object.getOwnPropertySymbols(t);
  131. e && (r = r.filter(function(i) {
  132. return Object.getOwnPropertyDescriptor(t, i).enumerable;
  133. })), n.push.apply(n, r);
  134. }
  135. return n;
  136. }
  137. function j(t) {
  138. for (var e = 1; e < arguments.length; e++) {
  139. var n = arguments[e] != null ? arguments[e] : {};
  140. e % 2 ? q4(Object(n), !0).forEach(function(r) {
  141. Yle(t, r, n[r]);
  142. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : q4(Object(n)).forEach(function(r) {
  143. Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
  144. });
  145. }
  146. return t;
  147. }
  148. function I() {
  149. return I = Object.assign ? Object.assign.bind() : function(t) {
  150. for (var e = 1; e < arguments.length; e++) {
  151. var n = arguments[e];
  152. for (var r in n) ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
  153. }
  154. return t;
  155. }, I.apply(null, arguments);
  156. }
  157. const qle = (t) => typeof t == "function", Kle = Array.isArray, Jle = (t) => typeof t == "string", eue = (t) => t !== null && typeof t == "object", tue = /^on[^a-z]/, nue = (t) => tue.test(t), XG = (t) => {
  158. const e = /* @__PURE__ */ Object.create(null);
  159. return (n) => e[n] || (e[n] = t(n));
  160. }, rue = /-(\w)/g, tI = XG((t) => t.replace(rue, (e, n) => n ? n.toUpperCase() : "")), iue = /\B([A-Z])/g, aue = XG((t) => t.replace(iue, "-$1").toLowerCase()), oue = Object.prototype.hasOwnProperty, K4 = (t, e) => oue.call(t, e);
  161. function sue(t, e, n, r) {
  162. const i = t[n];
  163. if (i != null) {
  164. const a = K4(i, "default");
  165. if (a && r === void 0) {
  166. const o = i.default;
  167. r = i.type !== Function && qle(o) ? o() : o;
  168. }
  169. i.type === Boolean && (!K4(e, n) && !a ? r = !1 : r === "" && (r = !0));
  170. }
  171. return r;
  172. }
  173. function lue(t) {
  174. return Object.keys(t).reduce((e, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (e[n] = t[n]), e), {});
  175. }
  176. function Wp(t) {
  177. return typeof t == "number" ? `${t}px` : t;
  178. }
  179. function Ld(t) {
  180. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  181. return typeof t == "function" ? t(e) : t ?? n;
  182. }
  183. function uue(t) {
  184. let e;
  185. const n = new Promise((i) => {
  186. e = t(() => {
  187. i(!0);
  188. });
  189. }), r = () => {
  190. e == null || e();
  191. };
  192. return r.then = (i, a) => n.then(i, a), r.promise = n, r;
  193. }
  194. function ye() {
  195. const t = [];
  196. for (let e = 0; e < arguments.length; e++) {
  197. const n = e < 0 || arguments.length <= e ? void 0 : arguments[e];
  198. if (n) {
  199. if (Jle(n))
  200. t.push(n);
  201. else if (Kle(n))
  202. for (let r = 0; r < n.length; r++) {
  203. const i = ye(n[r]);
  204. i && t.push(i);
  205. }
  206. else if (eue(n))
  207. for (const r in n)
  208. n[r] && t.push(r);
  209. }
  210. }
  211. return t.join(" ");
  212. }
  213. var YG = function() {
  214. if (typeof Map < "u")
  215. return Map;
  216. function t(e, n) {
  217. var r = -1;
  218. return e.some(function(i, a) {
  219. return i[0] === n ? (r = a, !0) : !1;
  220. }), r;
  221. }
  222. return (
  223. /** @class */
  224. function() {
  225. function e() {
  226. this.__entries__ = [];
  227. }
  228. return Object.defineProperty(e.prototype, "size", {
  229. /**
  230. * @returns {boolean}
  231. */
  232. get: function() {
  233. return this.__entries__.length;
  234. },
  235. enumerable: !0,
  236. configurable: !0
  237. }), e.prototype.get = function(n) {
  238. var r = t(this.__entries__, n), i = this.__entries__[r];
  239. return i && i[1];
  240. }, e.prototype.set = function(n, r) {
  241. var i = t(this.__entries__, n);
  242. ~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
  243. }, e.prototype.delete = function(n) {
  244. var r = this.__entries__, i = t(r, n);
  245. ~i && r.splice(i, 1);
  246. }, e.prototype.has = function(n) {
  247. return !!~t(this.__entries__, n);
  248. }, e.prototype.clear = function() {
  249. this.__entries__.splice(0);
  250. }, e.prototype.forEach = function(n, r) {
  251. r === void 0 && (r = null);
  252. for (var i = 0, a = this.__entries__; i < a.length; i++) {
  253. var o = a[i];
  254. n.call(r, o[1], o[0]);
  255. }
  256. }, e;
  257. }()
  258. );
  259. }(), n2 = typeof window < "u" && typeof document < "u" && window.document === document, h1 = function() {
  260. 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")();
  261. }(), cue = function() {
  262. return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(h1) : function(t) {
  263. return setTimeout(function() {
  264. return t(Date.now());
  265. }, 1e3 / 60);
  266. };
  267. }(), fue = 2;
  268. function due(t, e) {
  269. var n = !1, r = !1, i = 0;
  270. function a() {
  271. n && (n = !1, t()), r && s();
  272. }
  273. function o() {
  274. cue(a);
  275. }
  276. function s() {
  277. var l = Date.now();
  278. if (n) {
  279. if (l - i < fue)
  280. return;
  281. r = !0;
  282. } else
  283. n = !0, r = !1, setTimeout(o, e);
  284. i = l;
  285. }
  286. return s;
  287. }
  288. var hue = 20, pue = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], vue = typeof MutationObserver < "u", gue = (
  289. /** @class */
  290. function() {
  291. function t() {
  292. this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = due(this.refresh.bind(this), hue);
  293. }
  294. return t.prototype.addObserver = function(e) {
  295. ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
  296. }, t.prototype.removeObserver = function(e) {
  297. var n = this.observers_, r = n.indexOf(e);
  298. ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
  299. }, t.prototype.refresh = function() {
  300. var e = this.updateObservers_();
  301. e && this.refresh();
  302. }, t.prototype.updateObservers_ = function() {
  303. var e = this.observers_.filter(function(n) {
  304. return n.gatherActive(), n.hasActive();
  305. });
  306. return e.forEach(function(n) {
  307. return n.broadcastActive();
  308. }), e.length > 0;
  309. }, t.prototype.connect_ = function() {
  310. !n2 || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), vue ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
  311. attributes: !0,
  312. childList: !0,
  313. characterData: !0,
  314. subtree: !0
  315. })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
  316. }, t.prototype.disconnect_ = function() {
  317. !n2 || !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);
  318. }, t.prototype.onTransitionEnd_ = function(e) {
  319. var n = e.propertyName, r = n === void 0 ? "" : n, i = pue.some(function(a) {
  320. return !!~r.indexOf(a);
  321. });
  322. i && this.refresh();
  323. }, t.getInstance = function() {
  324. return this.instance_ || (this.instance_ = new t()), this.instance_;
  325. }, t.instance_ = null, t;
  326. }()
  327. ), qG = function(t, e) {
  328. for (var n = 0, r = Object.keys(e); n < r.length; n++) {
  329. var i = r[n];
  330. Object.defineProperty(t, i, {
  331. value: e[i],
  332. enumerable: !1,
  333. writable: !1,
  334. configurable: !0
  335. });
  336. }
  337. return t;
  338. }, hh = function(t) {
  339. var e = t && t.ownerDocument && t.ownerDocument.defaultView;
  340. return e || h1;
  341. }, KG = MS(0, 0, 0, 0);
  342. function p1(t) {
  343. return parseFloat(t) || 0;
  344. }
  345. function J4(t) {
  346. for (var e = [], n = 1; n < arguments.length; n++)
  347. e[n - 1] = arguments[n];
  348. return e.reduce(function(r, i) {
  349. var a = t["border-" + i + "-width"];
  350. return r + p1(a);
  351. }, 0);
  352. }
  353. function mue(t) {
  354. for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
  355. var a = i[r], o = t["padding-" + a];
  356. n[a] = p1(o);
  357. }
  358. return n;
  359. }
  360. function yue(t) {
  361. var e = t.getBBox();
  362. return MS(0, 0, e.width, e.height);
  363. }
  364. function bue(t) {
  365. var e = t.clientWidth, n = t.clientHeight;
  366. if (!e && !n)
  367. return KG;
  368. var r = hh(t).getComputedStyle(t), i = mue(r), a = i.left + i.right, o = i.top + i.bottom, s = p1(r.width), l = p1(r.height);
  369. if (r.boxSizing === "border-box" && (Math.round(s + a) !== e && (s -= J4(r, "left", "right") + a), Math.round(l + o) !== n && (l -= J4(r, "top", "bottom") + o)), !Oue(t)) {
  370. var u = Math.round(s + a) - e, c = Math.round(l + o) - n;
  371. Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
  372. }
  373. return MS(i.left, i.top, s, l);
  374. }
  375. var _ue = /* @__PURE__ */ function() {
  376. return typeof SVGGraphicsElement < "u" ? function(t) {
  377. return t instanceof hh(t).SVGGraphicsElement;
  378. } : function(t) {
  379. return t instanceof hh(t).SVGElement && typeof t.getBBox == "function";
  380. };
  381. }();
  382. function Oue(t) {
  383. return t === hh(t).document.documentElement;
  384. }
  385. function Sue(t) {
  386. return n2 ? _ue(t) ? yue(t) : bue(t) : KG;
  387. }
  388. function xue(t) {
  389. var e = t.x, n = t.y, r = t.width, i = t.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, o = Object.create(a.prototype);
  390. return qG(o, {
  391. x: e,
  392. y: n,
  393. width: r,
  394. height: i,
  395. top: n,
  396. right: e + r,
  397. bottom: i + n,
  398. left: e
  399. }), o;
  400. }
  401. function MS(t, e, n, r) {
  402. return { x: t, y: e, width: n, height: r };
  403. }
  404. var wue = (
  405. /** @class */
  406. function() {
  407. function t(e) {
  408. this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = MS(0, 0, 0, 0), this.target = e;
  409. }
  410. return t.prototype.isActive = function() {
  411. var e = Sue(this.target);
  412. return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
  413. }, t.prototype.broadcastRect = function() {
  414. var e = this.contentRect_;
  415. return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
  416. }, t;
  417. }()
  418. ), Cue = (
  419. /** @class */
  420. /* @__PURE__ */ function() {
  421. function t(e, n) {
  422. var r = xue(n);
  423. qG(this, { target: e, contentRect: r });
  424. }
  425. return t;
  426. }()
  427. ), Tue = (
  428. /** @class */
  429. function() {
  430. function t(e, n, r) {
  431. if (this.activeObservations_ = [], this.observations_ = new YG(), typeof e != "function")
  432. throw new TypeError("The callback provided as parameter 1 is not a function.");
  433. this.callback_ = e, this.controller_ = n, this.callbackCtx_ = r;
  434. }
  435. return t.prototype.observe = function(e) {
  436. if (!arguments.length)
  437. throw new TypeError("1 argument required, but only 0 present.");
  438. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  439. if (!(e instanceof hh(e).Element))
  440. throw new TypeError('parameter 1 is not of type "Element".');
  441. var n = this.observations_;
  442. n.has(e) || (n.set(e, new wue(e)), this.controller_.addObserver(this), this.controller_.refresh());
  443. }
  444. }, t.prototype.unobserve = function(e) {
  445. if (!arguments.length)
  446. throw new TypeError("1 argument required, but only 0 present.");
  447. if (!(typeof Element > "u" || !(Element instanceof Object))) {
  448. if (!(e instanceof hh(e).Element))
  449. throw new TypeError('parameter 1 is not of type "Element".');
  450. var n = this.observations_;
  451. n.has(e) && (n.delete(e), n.size || this.controller_.removeObserver(this));
  452. }
  453. }, t.prototype.disconnect = function() {
  454. this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
  455. }, t.prototype.gatherActive = function() {
  456. var e = this;
  457. this.clearActive(), this.observations_.forEach(function(n) {
  458. n.isActive() && e.activeObservations_.push(n);
  459. });
  460. }, t.prototype.broadcastActive = function() {
  461. if (this.hasActive()) {
  462. var e = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
  463. return new Cue(r.target, r.broadcastRect());
  464. });
  465. this.callback_.call(e, n, e), this.clearActive();
  466. }
  467. }, t.prototype.clearActive = function() {
  468. this.activeObservations_.splice(0);
  469. }, t.prototype.hasActive = function() {
  470. return this.activeObservations_.length > 0;
  471. }, t;
  472. }()
  473. ), JG = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new YG(), ej = (
  474. /** @class */
  475. /* @__PURE__ */ function() {
  476. function t(e) {
  477. if (!(this instanceof t))
  478. throw new TypeError("Cannot call a class as a function.");
  479. if (!arguments.length)
  480. throw new TypeError("1 argument required, but only 0 present.");
  481. var n = gue.getInstance(), r = new Tue(e, n, this);
  482. JG.set(this, r);
  483. }
  484. return t;
  485. }()
  486. );
  487. [
  488. "observe",
  489. "unobserve",
  490. "disconnect"
  491. ].forEach(function(t) {
  492. ej.prototype[t] = function() {
  493. var e;
  494. return (e = JG.get(this))[t].apply(e, arguments);
  495. };
  496. });
  497. var tj = function() {
  498. return typeof h1.ResizeObserver < "u" ? h1.ResizeObserver : ej;
  499. }();
  500. const r2 = (t) => t != null && t !== "", sr = (t, e) => {
  501. const n = I({}, t);
  502. return Object.keys(e).forEach((r) => {
  503. const i = n[r];
  504. if (i)
  505. i.type || i.default ? i.default = e[r] : i.def ? i.def(e[r]) : n[r] = {
  506. type: i,
  507. default: e[r]
  508. };
  509. else
  510. throw new Error(`not have ${r} prop`);
  511. }), n;
  512. }, Pue = (t) => {
  513. const e = Object.keys(t), n = {}, r = {}, i = {};
  514. for (let a = 0, o = e.length; a < o; a++) {
  515. const s = e[a];
  516. nue(s) ? (n[s[2].toLowerCase() + s.slice(3)] = t[s], r[s] = t[s]) : i[s] = t[s];
  517. }
  518. return {
  519. onEvents: r,
  520. events: n,
  521. extraAttrs: i
  522. };
  523. }, $ue = function() {
  524. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  525. const n = {}, r = /;(?![^(]*\))/g, i = /:(.+)/;
  526. return typeof t == "object" ? t : (t.split(r).forEach(function(a) {
  527. if (a) {
  528. const o = a.split(i);
  529. if (o.length > 1) {
  530. const s = e ? tI(o[0].trim()) : o[0].trim();
  531. n[s] = o[1].trim();
  532. }
  533. }
  534. }), n);
  535. }, v1 = (t, e) => t[e] !== void 0, nj = Symbol("skipFlatten"), Yn = function() {
  536. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  537. const n = Array.isArray(t) ? t : [t], r = [];
  538. return n.forEach((i) => {
  539. Array.isArray(i) ? r.push(...Yn(i, e)) : i && i.type === wt ? i.key === nj ? r.push(i) : r.push(...Yn(i.children, e)) : i && nu(i) ? e && !nI(i) ? r.push(i) : e || r.push(i) : r2(i) && r.push(i);
  540. }), r;
  541. }, rj = function(t) {
  542. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  543. if (nu(t))
  544. return t.type === wt ? e === "default" ? Yn(t.children) : [] : t.children && t.children[e] ? Yn(t.children[e](n)) : [];
  545. {
  546. const r = t.$slots[e] && t.$slots[e](n);
  547. return Yn(r);
  548. }
  549. }, Cs = (t) => {
  550. var e;
  551. let n = ((e = t == null ? void 0 : t.vnode) === null || e === void 0 ? void 0 : e.el) || t && (t.$el || t);
  552. for (; n && !n.tagName; )
  553. n = n.nextSibling;
  554. return n;
  555. }, Aue = (t) => {
  556. const e = {};
  557. if (t.$ && t.$.vnode) {
  558. const n = t.$.vnode.props || {};
  559. Object.keys(t.$props).forEach((r) => {
  560. const i = t.$props[r], a = aue(r);
  561. (i !== void 0 || a in n) && (e[r] = i);
  562. });
  563. } else if (nu(t) && typeof t.type == "object") {
  564. const n = t.props || {}, r = {};
  565. Object.keys(n).forEach((a) => {
  566. r[tI(a)] = n[a];
  567. });
  568. const i = t.type.props || {};
  569. Object.keys(i).forEach((a) => {
  570. const o = sue(i, r, a, r[a]);
  571. (o !== void 0 || a in r) && (e[a] = o);
  572. });
  573. }
  574. return e;
  575. }, Eue = function(t) {
  576. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i;
  577. if (t.$) {
  578. const a = t[e];
  579. if (a !== void 0)
  580. return typeof a == "function" && r ? a(n) : a;
  581. i = t.$slots[e], i = r && i ? i(n) : i;
  582. } else if (nu(t)) {
  583. const a = t.props && t.props[e];
  584. if (a !== void 0 && t.props !== null)
  585. return typeof a == "function" && r ? a(n) : a;
  586. t.type === wt ? i = t.children : t.children && t.children[e] && (i = t.children[e], i = r && i ? i(n) : i);
  587. }
  588. return Array.isArray(i) && (i = Yn(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
  589. };
  590. function e8() {
  591. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  592. return t.$ ? n = I(I({}, n), t.$attrs) : n = I(I({}, n), t.props), Pue(n)[e ? "onEvents" : "events"];
  593. }
  594. function Mue(t, e) {
  595. let r = ((nu(t) ? t.props : t.$attrs) || {}).style || {};
  596. return typeof r == "string" && (r = $ue(r, e)), r;
  597. }
  598. function Iue(t) {
  599. return t.length === 1 && t[0].type === wt;
  600. }
  601. function nI(t) {
  602. return t && (t.type === QG || t.type === wt && t.children.length === 0 || t.type === TS && t.children.trim() === "");
  603. }
  604. function os() {
  605. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  606. const e = [];
  607. return t.forEach((n) => {
  608. Array.isArray(n) ? e.push(...n) : (n == null ? void 0 : n.type) === wt ? e.push(...os(n.children)) : e.push(n);
  609. }), e.filter((n) => !nI(n));
  610. }
  611. function Ui(t) {
  612. return Array.isArray(t) && t.length === 1 && (t = t[0]), t && t.__v_isVNode && typeof t.type != "symbol";
  613. }
  614. function IS(t, e) {
  615. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  616. var r, i;
  617. return (r = e[n]) !== null && r !== void 0 ? r : (i = t[n]) === null || i === void 0 ? void 0 : i.call(t);
  618. }
  619. const ph = te({
  620. compatConfig: {
  621. MODE: 3
  622. },
  623. name: "ResizeObserver",
  624. props: {
  625. disabled: Boolean,
  626. onResize: Function
  627. },
  628. emits: ["resize"],
  629. setup(t, e) {
  630. let {
  631. slots: n
  632. } = e;
  633. const r = tn({
  634. width: 0,
  635. height: 0,
  636. offsetHeight: 0,
  637. offsetWidth: 0
  638. });
  639. let i = null, a = null;
  640. const o = () => {
  641. a && (a.disconnect(), a = null);
  642. }, s = (c) => {
  643. const {
  644. onResize: f
  645. } = t, d = c[0].target, {
  646. width: h,
  647. height: p
  648. } = d.getBoundingClientRect(), {
  649. offsetWidth: v,
  650. offsetHeight: g
  651. } = d, m = Math.floor(h), y = Math.floor(p);
  652. if (r.width !== m || r.height !== y || r.offsetWidth !== v || r.offsetHeight !== g) {
  653. const b = {
  654. width: m,
  655. height: y,
  656. offsetWidth: v,
  657. offsetHeight: g
  658. };
  659. I(r, b), f && Promise.resolve().then(() => {
  660. f(I(I({}, b), {
  661. offsetWidth: v,
  662. offsetHeight: g
  663. }), d);
  664. });
  665. }
  666. }, l = vn(), u = () => {
  667. const {
  668. disabled: c
  669. } = t;
  670. if (c) {
  671. o();
  672. return;
  673. }
  674. const f = Cs(l);
  675. f !== i && (o(), i = f), !a && f && (a = new tj(s), a.observe(f));
  676. };
  677. return it(() => {
  678. u();
  679. }), ep(() => {
  680. u();
  681. }), nl(() => {
  682. o();
  683. }), se(() => t.disabled, () => {
  684. u();
  685. }, {
  686. flush: "post"
  687. }), () => {
  688. var c;
  689. return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
  690. };
  691. }
  692. });
  693. let ij = (t) => setTimeout(t, 16), aj = (t) => clearTimeout(t);
  694. typeof window < "u" && "requestAnimationFrame" in window && (ij = (t) => window.requestAnimationFrame(t), aj = (t) => window.cancelAnimationFrame(t));
  695. let t8 = 0;
  696. const rI = /* @__PURE__ */ new Map();
  697. function oj(t) {
  698. rI.delete(t);
  699. }
  700. function xt(t) {
  701. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  702. t8 += 1;
  703. const n = t8;
  704. function r(i) {
  705. if (i === 0)
  706. oj(n), t();
  707. else {
  708. const a = ij(() => {
  709. r(i - 1);
  710. });
  711. rI.set(n, a);
  712. }
  713. }
  714. return r(e), n;
  715. }
  716. xt.cancel = (t) => {
  717. const e = rI.get(t);
  718. return oj(e), aj(e);
  719. };
  720. const ru = function() {
  721. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  722. e[n] = arguments[n];
  723. return e;
  724. }, np = (t) => {
  725. const e = t;
  726. return e.install = function(n) {
  727. n.component(e.displayName || e.name, t);
  728. }, t;
  729. };
  730. function g1() {
  731. return {
  732. type: [Function, Array]
  733. };
  734. }
  735. function $t(t) {
  736. return {
  737. type: Object,
  738. default: t
  739. };
  740. }
  741. function nt(t) {
  742. return {
  743. type: Boolean,
  744. default: t
  745. };
  746. }
  747. function tt(t) {
  748. return {
  749. type: Function,
  750. default: t
  751. };
  752. }
  753. function fa(t, e) {
  754. return {
  755. validator: () => !0,
  756. default: t
  757. };
  758. }
  759. function uf(t) {
  760. return {
  761. type: Array,
  762. default: t
  763. };
  764. }
  765. function hn(t) {
  766. return {
  767. type: String,
  768. default: t
  769. };
  770. }
  771. function gn(t, e) {
  772. return t ? {
  773. type: t,
  774. default: e
  775. } : fa(e);
  776. }
  777. let pr = !1;
  778. try {
  779. const t = Object.defineProperty({}, "passive", {
  780. get() {
  781. pr = !0;
  782. }
  783. });
  784. window.addEventListener("testPassive", null, t), window.removeEventListener("testPassive", null, t);
  785. } catch {
  786. }
  787. function vr(t, e, n, r) {
  788. if (t && t.addEventListener) {
  789. let i = r;
  790. i === void 0 && pr && (e === "touchstart" || e === "touchmove" || e === "wheel") && (i = {
  791. passive: !1
  792. }), t.addEventListener(e, n, i);
  793. }
  794. return {
  795. remove: () => {
  796. t && t.removeEventListener && t.removeEventListener(e, n);
  797. }
  798. };
  799. }
  800. const iI = "anticon", sj = Symbol("GlobalFormContextKey"), Due = (t) => {
  801. pt(sj, t);
  802. }, Rue = () => Ge(sj, {
  803. validateMessages: L(() => {
  804. })
  805. }), kue = () => ({
  806. iconPrefixCls: String,
  807. getTargetContainer: {
  808. type: Function
  809. },
  810. getPopupContainer: {
  811. type: Function
  812. },
  813. prefixCls: String,
  814. getPrefixCls: {
  815. type: Function
  816. },
  817. renderEmpty: {
  818. type: Function
  819. },
  820. transformCellText: {
  821. type: Function
  822. },
  823. csp: $t(),
  824. input: $t(),
  825. autoInsertSpaceInButton: {
  826. type: Boolean,
  827. default: void 0
  828. },
  829. locale: $t(),
  830. pageHeader: $t(),
  831. componentSize: {
  832. type: String
  833. },
  834. componentDisabled: {
  835. type: Boolean,
  836. default: void 0
  837. },
  838. direction: {
  839. type: String,
  840. default: "ltr"
  841. },
  842. space: $t(),
  843. virtual: {
  844. type: Boolean,
  845. default: void 0
  846. },
  847. dropdownMatchSelectWidth: {
  848. type: [Number, Boolean],
  849. default: !0
  850. },
  851. form: $t(),
  852. pagination: $t(),
  853. theme: $t(),
  854. select: $t(),
  855. wave: $t()
  856. }), aI = Symbol("configProvider"), lj = {
  857. getPrefixCls: (t, e) => e || (t ? `ant-${t}` : "ant"),
  858. iconPrefixCls: L(() => iI),
  859. getPopupContainer: L(() => () => document.body),
  860. direction: L(() => "ltr")
  861. }, DS = () => Ge(aI, lj), Lue = (t) => pt(aI, t), uj = Symbol("DisabledContextKey"), Ko = () => Ge(uj, U(void 0)), cj = (t) => {
  862. const e = Ko();
  863. return pt(uj, L(() => {
  864. var n;
  865. return (n = t.value) !== null && n !== void 0 ? n : e.value;
  866. })), t;
  867. }, Nue = {
  868. // Options.jsx
  869. items_per_page: "/ page",
  870. jump_to: "Go to",
  871. jump_to_confirm: "confirm",
  872. page: "",
  873. // Pagination.jsx
  874. prev_page: "Previous Page",
  875. next_page: "Next Page",
  876. prev_5: "Previous 5 Pages",
  877. next_5: "Next 5 Pages",
  878. prev_3: "Previous 3 Pages",
  879. next_3: "Next 3 Pages"
  880. }, Bue = {
  881. locale: "en_US",
  882. today: "Today",
  883. now: "Now",
  884. backToToday: "Back to today",
  885. ok: "Ok",
  886. clear: "Clear",
  887. month: "Month",
  888. year: "Year",
  889. timeSelect: "select time",
  890. dateSelect: "select date",
  891. weekSelect: "Choose a week",
  892. monthSelect: "Choose a month",
  893. yearSelect: "Choose a year",
  894. decadeSelect: "Choose a decade",
  895. yearFormat: "YYYY",
  896. dateFormat: "M/D/YYYY",
  897. dayFormat: "D",
  898. dateTimeFormat: "M/D/YYYY HH:mm:ss",
  899. monthBeforeYear: !0,
  900. previousMonth: "Previous month (PageUp)",
  901. nextMonth: "Next month (PageDown)",
  902. previousYear: "Last year (Control + left)",
  903. nextYear: "Next year (Control + right)",
  904. previousDecade: "Last decade",
  905. nextDecade: "Next decade",
  906. previousCentury: "Last century",
  907. nextCentury: "Next century"
  908. }, fj = {
  909. placeholder: "Select time",
  910. rangePlaceholder: ["Start time", "End time"]
  911. }, n8 = {
  912. lang: I({
  913. placeholder: "Select date",
  914. yearPlaceholder: "Select year",
  915. quarterPlaceholder: "Select quarter",
  916. monthPlaceholder: "Select month",
  917. weekPlaceholder: "Select week",
  918. rangePlaceholder: ["Start date", "End date"],
  919. rangeYearPlaceholder: ["Start year", "End year"],
  920. rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
  921. rangeMonthPlaceholder: ["Start month", "End month"],
  922. rangeWeekPlaceholder: ["Start week", "End week"]
  923. }, Bue),
  924. timePickerLocale: I({}, fj)
  925. }, Ti = "${label} is not a valid ${type}", zs = {
  926. locale: "en",
  927. Pagination: Nue,
  928. DatePicker: n8,
  929. TimePicker: fj,
  930. Calendar: n8,
  931. global: {
  932. placeholder: "Please select"
  933. },
  934. Table: {
  935. filterTitle: "Filter menu",
  936. filterConfirm: "OK",
  937. filterReset: "Reset",
  938. filterEmptyText: "No filters",
  939. filterCheckall: "Select all items",
  940. filterSearchPlaceholder: "Search in filters",
  941. emptyText: "No data",
  942. selectAll: "Select current page",
  943. selectInvert: "Invert current page",
  944. selectNone: "Clear all data",
  945. selectionAll: "Select all data",
  946. sortTitle: "Sort",
  947. expand: "Expand row",
  948. collapse: "Collapse row",
  949. triggerDesc: "Click to sort descending",
  950. triggerAsc: "Click to sort ascending",
  951. cancelSort: "Click to cancel sorting"
  952. },
  953. Tour: {
  954. Next: "Next",
  955. Previous: "Previous",
  956. Finish: "Finish"
  957. },
  958. Modal: {
  959. okText: "OK",
  960. cancelText: "Cancel",
  961. justOkText: "OK"
  962. },
  963. Popconfirm: {
  964. okText: "OK",
  965. cancelText: "Cancel"
  966. },
  967. Transfer: {
  968. titles: ["", ""],
  969. searchPlaceholder: "Search here",
  970. itemUnit: "item",
  971. itemsUnit: "items",
  972. remove: "Remove",
  973. selectCurrent: "Select current page",
  974. removeCurrent: "Remove current page",
  975. selectAll: "Select all data",
  976. removeAll: "Remove all data",
  977. selectInvert: "Invert current page"
  978. },
  979. Upload: {
  980. uploading: "Uploading...",
  981. removeFile: "Remove file",
  982. uploadError: "Upload error",
  983. previewFile: "Preview file",
  984. downloadFile: "Download file"
  985. },
  986. Empty: {
  987. description: "No data"
  988. },
  989. Icon: {
  990. icon: "icon"
  991. },
  992. Text: {
  993. edit: "Edit",
  994. copy: "Copy",
  995. copied: "Copied",
  996. expand: "Expand"
  997. },
  998. PageHeader: {
  999. back: "Back"
  1000. },
  1001. Form: {
  1002. optional: "(optional)",
  1003. defaultValidateMessages: {
  1004. default: "Field validation error for ${label}",
  1005. required: "Please enter ${label}",
  1006. enum: "${label} must be one of [${enum}]",
  1007. whitespace: "${label} cannot be a blank character",
  1008. date: {
  1009. format: "${label} date format is invalid",
  1010. parse: "${label} cannot be converted to a date",
  1011. invalid: "${label} is an invalid date"
  1012. },
  1013. types: {
  1014. string: Ti,
  1015. method: Ti,
  1016. array: Ti,
  1017. object: Ti,
  1018. number: Ti,
  1019. date: Ti,
  1020. boolean: Ti,
  1021. integer: Ti,
  1022. float: Ti,
  1023. regexp: Ti,
  1024. email: Ti,
  1025. url: Ti,
  1026. hex: Ti
  1027. },
  1028. string: {
  1029. len: "${label} must be ${len} characters",
  1030. min: "${label} must be at least ${min} characters",
  1031. max: "${label} must be up to ${max} characters",
  1032. range: "${label} must be between ${min}-${max} characters"
  1033. },
  1034. number: {
  1035. len: "${label} must be equal to ${len}",
  1036. min: "${label} must be minimum ${min}",
  1037. max: "${label} must be maximum ${max}",
  1038. range: "${label} must be between ${min}-${max}"
  1039. },
  1040. array: {
  1041. len: "Must be ${len} ${label}",
  1042. min: "At least ${min} ${label}",
  1043. max: "At most ${max} ${label}",
  1044. range: "The amount of ${label} must be between ${min}-${max}"
  1045. },
  1046. pattern: {
  1047. mismatch: "${label} does not match the pattern ${pattern}"
  1048. }
  1049. }
  1050. },
  1051. Image: {
  1052. preview: "Preview"
  1053. },
  1054. QRCode: {
  1055. expired: "QR code expired",
  1056. refresh: "Refresh",
  1057. scanned: "Scanned"
  1058. }
  1059. }, dj = te({
  1060. compatConfig: {
  1061. MODE: 3
  1062. },
  1063. name: "LocaleReceiver",
  1064. props: {
  1065. componentName: String,
  1066. defaultLocale: {
  1067. type: [Object, Function]
  1068. },
  1069. children: {
  1070. type: Function
  1071. }
  1072. },
  1073. setup(t, e) {
  1074. let {
  1075. slots: n
  1076. } = e;
  1077. const r = Ge("localeData", {}), i = L(() => {
  1078. const {
  1079. componentName: o = "global",
  1080. defaultLocale: s
  1081. } = t, l = s || zs[o || "global"], {
  1082. antLocale: u
  1083. } = r, c = o && u ? u[o] : {};
  1084. return I(I({}, typeof l == "function" ? l() : l), c || {});
  1085. }), a = L(() => {
  1086. const {
  1087. antLocale: o
  1088. } = r, s = o && o.locale;
  1089. return o && o.exist && !s ? zs.locale : s;
  1090. });
  1091. return () => {
  1092. const o = t.children || n.default, {
  1093. antLocale: s
  1094. } = r;
  1095. return o == null ? void 0 : o(i.value, a.value, s);
  1096. };
  1097. }
  1098. });
  1099. function RS(t, e, n) {
  1100. const r = Ge("localeData", {});
  1101. return [L(() => {
  1102. const {
  1103. antLocale: a
  1104. } = r, o = B(e) || zs[t || "global"], s = t && a ? a[t] : {};
  1105. return I(I(I({}, typeof o == "function" ? o() : o), s || {}), B(n) || {});
  1106. })];
  1107. }
  1108. function oI(t) {
  1109. for (var e = 0, n, r = 0, i = t.length; i >= 4; ++r, i -= 4)
  1110. n = t.charCodeAt(r) & 255 | (t.charCodeAt(++r) & 255) << 8 | (t.charCodeAt(++r) & 255) << 16 | (t.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
  1111. (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
  1112. n >>> 24, e = /* Math.imul(k, m): */
  1113. (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
  1114. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  1115. switch (i) {
  1116. case 3:
  1117. e ^= (t.charCodeAt(r + 2) & 255) << 16;
  1118. case 2:
  1119. e ^= (t.charCodeAt(r + 1) & 255) << 8;
  1120. case 1:
  1121. e ^= t.charCodeAt(r) & 255, e = /* Math.imul(h, m): */
  1122. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  1123. }
  1124. return e ^= e >>> 13, e = /* Math.imul(h, m): */
  1125. (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
  1126. }
  1127. const r8 = "%";
  1128. class zue {
  1129. constructor(e) {
  1130. this.cache = /* @__PURE__ */ new Map(), this.instanceId = e;
  1131. }
  1132. get(e) {
  1133. return this.cache.get(Array.isArray(e) ? e.join(r8) : e) || null;
  1134. }
  1135. update(e, n) {
  1136. const r = Array.isArray(e) ? e.join(r8) : e, i = this.cache.get(r), a = n(i);
  1137. a === null ? this.cache.delete(r) : this.cache.set(r, a);
  1138. }
  1139. }
  1140. const hj = "data-token-hash", Hc = "data-css-hash", Vue = "data-cache-path", Nd = "__cssinjs_instance__";
  1141. function Xg() {
  1142. const t = Math.random().toString(12).slice(2);
  1143. if (typeof document < "u" && document.head && document.body) {
  1144. const e = document.body.querySelectorAll(`style[${Hc}]`) || [], {
  1145. firstChild: n
  1146. } = document.head;
  1147. Array.from(e).forEach((i) => {
  1148. i[Nd] = i[Nd] || t, i[Nd] === t && document.head.insertBefore(i, n);
  1149. });
  1150. const r = {};
  1151. Array.from(document.querySelectorAll(`style[${Hc}]`)).forEach((i) => {
  1152. var a;
  1153. const o = i.getAttribute(Hc);
  1154. r[o] ? i[Nd] === t && ((a = i.parentNode) === null || a === void 0 || a.removeChild(i)) : r[o] = !0;
  1155. });
  1156. }
  1157. return new zue(t);
  1158. }
  1159. const pj = Symbol("StyleContextKey"), Fue = () => {
  1160. var t, e, n;
  1161. const r = vn();
  1162. let i;
  1163. if (r && r.appContext) {
  1164. const a = (n = (e = (t = r.appContext) === null || t === void 0 ? void 0 : t.config) === null || e === void 0 ? void 0 : e.globalProperties) === null || n === void 0 ? void 0 : n.__ANTDV_CSSINJS_CACHE__;
  1165. a ? i = a : (i = Xg(), r.appContext.config.globalProperties && (r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  1166. } else
  1167. i = Xg();
  1168. return i;
  1169. }, vj = {
  1170. cache: Xg(),
  1171. defaultCache: !0,
  1172. hashPriority: "low"
  1173. }, kS = () => {
  1174. const t = Fue();
  1175. return Ge(pj, ae(I(I({}, vj), {
  1176. cache: t
  1177. })));
  1178. }, Wue = (t) => {
  1179. const e = kS(), n = ae(I(I({}, vj), {
  1180. cache: Xg()
  1181. }));
  1182. return se([() => B(t), e], () => {
  1183. const r = I({}, e.value), i = B(t);
  1184. Object.keys(i).forEach((o) => {
  1185. const s = i[o];
  1186. i[o] !== void 0 && (r[o] = s);
  1187. });
  1188. const {
  1189. cache: a
  1190. } = i;
  1191. r.cache = r.cache || Xg(), r.defaultCache = !a && e.value.defaultCache, n.value = r;
  1192. }, {
  1193. immediate: !0
  1194. }), pt(pj, n), n;
  1195. }, Que = () => ({
  1196. autoClear: nt(),
  1197. /** @private Test only. Not work in production. */
  1198. mock: hn(),
  1199. /**
  1200. * Only set when you need ssr to extract style on you own.
  1201. * If not provided, it will auto create <style /> on the end of Provider in server side.
  1202. */
  1203. cache: $t(),
  1204. /** Tell children that this context is default generated context */
  1205. defaultCache: nt(),
  1206. /** Use `:where` selector to reduce hashId css selector priority */
  1207. hashPriority: hn(),
  1208. /** Tell cssinjs where to inject style in */
  1209. container: gn(),
  1210. /** Component wil render inline `<style />` for fallback in SSR. Not recommend. */
  1211. ssrInline: nt(),
  1212. /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  1213. transformers: uf(),
  1214. /**
  1215. * Linters to lint css before inject in document.
  1216. * Styles will be linted after transforming.
  1217. * Please note that `linters` do not support dynamic update.
  1218. */
  1219. linters: uf()
  1220. });
  1221. np(te({
  1222. name: "AStyleProvider",
  1223. inheritAttrs: !1,
  1224. props: Que(),
  1225. setup(t, e) {
  1226. let {
  1227. slots: n
  1228. } = e;
  1229. return Wue(t), () => {
  1230. var r;
  1231. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  1232. };
  1233. }
  1234. }));
  1235. function Hue() {
  1236. return !1;
  1237. }
  1238. let i2 = !1;
  1239. function Gue() {
  1240. return i2;
  1241. }
  1242. const jue = process.env.NODE_ENV === "production" ? Hue : Gue;
  1243. if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  1244. const t = window;
  1245. if (typeof t.webpackHotUpdate == "function") {
  1246. const e = t.webpackHotUpdate;
  1247. t.webpackHotUpdate = function() {
  1248. return i2 = !0, setTimeout(() => {
  1249. i2 = !1;
  1250. }, 0), e(...arguments);
  1251. };
  1252. }
  1253. }
  1254. function gj(t, e, n, r) {
  1255. const i = kS(), a = ae(""), o = ae();
  1256. ht(() => {
  1257. a.value = [t, ...e.value].join("%");
  1258. });
  1259. const s = jue(), l = (u) => {
  1260. i.value.cache.update(u, (c) => {
  1261. const [f = 0, d] = c || [];
  1262. return f - 1 === 0 ? (r == null || r(d, !1), null) : [f - 1, d];
  1263. });
  1264. };
  1265. return se(a, (u, c) => {
  1266. c && l(c), i.value.cache.update(u, (f) => {
  1267. const [d = 0, h] = f || [];
  1268. let p = h;
  1269. process.env.NODE_ENV !== "production" && h && s && (r == null || r(p, s), p = null);
  1270. const v = p || n();
  1271. return [d + 1, v];
  1272. }), o.value = i.value.cache.get(a.value)[1];
  1273. }, {
  1274. immediate: !0
  1275. }), yt(() => {
  1276. l(a.value);
  1277. }), o;
  1278. }
  1279. function wa() {
  1280. return !!(typeof window < "u" && window.document && window.document.createElement);
  1281. }
  1282. function $l(t, e) {
  1283. return t && t.contains ? t.contains(e) : !1;
  1284. }
  1285. const i8 = "data-vc-order", Zue = "vc-util-key", a2 = /* @__PURE__ */ new Map();
  1286. function mj() {
  1287. let {
  1288. mark: t
  1289. } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  1290. return t ? t.startsWith("data-") ? t : `data-${t}` : Zue;
  1291. }
  1292. function LS(t) {
  1293. return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
  1294. }
  1295. function Uue(t) {
  1296. return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
  1297. }
  1298. function yj(t) {
  1299. return Array.from((a2.get(t) || t).children).filter((e) => e.tagName === "STYLE");
  1300. }
  1301. function bj(t) {
  1302. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1303. if (!wa())
  1304. return null;
  1305. const {
  1306. csp: n,
  1307. prepend: r
  1308. } = e, i = document.createElement("style");
  1309. i.setAttribute(i8, Uue(r)), n != null && n.nonce && (i.nonce = n == null ? void 0 : n.nonce), i.innerHTML = t;
  1310. const a = LS(e), {
  1311. firstChild: o
  1312. } = a;
  1313. if (r) {
  1314. if (r === "queue") {
  1315. const s = yj(a).filter((l) => ["prepend", "prependQueue"].includes(l.getAttribute(i8)));
  1316. if (s.length)
  1317. return a.insertBefore(i, s[s.length - 1].nextSibling), i;
  1318. }
  1319. a.insertBefore(i, o);
  1320. } else
  1321. a.appendChild(i);
  1322. return i;
  1323. }
  1324. function _j(t) {
  1325. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1326. const n = LS(e);
  1327. return yj(n).find((r) => r.getAttribute(mj(e)) === t);
  1328. }
  1329. function m1(t) {
  1330. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  1331. const n = _j(t, e);
  1332. n && LS(e).removeChild(n);
  1333. }
  1334. function Xue(t, e) {
  1335. const n = a2.get(t);
  1336. if (!n || !$l(document, n)) {
  1337. const r = bj("", e), {
  1338. parentNode: i
  1339. } = r;
  1340. a2.set(t, i), t.removeChild(r);
  1341. }
  1342. }
  1343. function Yg(t, e) {
  1344. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  1345. var r, i, a;
  1346. const o = LS(n);
  1347. Xue(o, n);
  1348. const s = _j(e, n);
  1349. if (s)
  1350. return !((r = n.csp) === null || r === void 0) && r.nonce && s.nonce !== ((i = n.csp) === null || i === void 0 ? void 0 : i.nonce) && (s.nonce = (a = n.csp) === null || a === void 0 ? void 0 : a.nonce), s.innerHTML !== t && (s.innerHTML = t), s;
  1351. const l = bj(t, n);
  1352. return l.setAttribute(mj(n), e), l;
  1353. }
  1354. function Yue(t, e) {
  1355. if (t.length !== e.length)
  1356. return !1;
  1357. for (let n = 0; n < t.length; n++)
  1358. if (t[n] !== e[n])
  1359. return !1;
  1360. return !0;
  1361. }
  1362. class vh {
  1363. constructor() {
  1364. this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  1365. }
  1366. size() {
  1367. return this.keys.length;
  1368. }
  1369. internalGet(e) {
  1370. let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = {
  1371. map: this.cache
  1372. };
  1373. return e.forEach((i) => {
  1374. var a;
  1375. r ? r = (a = r == null ? void 0 : r.map) === null || a === void 0 ? void 0 : a.get(i) : r = void 0;
  1376. }), r != null && r.value && n && (r.value[1] = this.cacheCallTimes++), r == null ? void 0 : r.value;
  1377. }
  1378. get(e) {
  1379. var n;
  1380. return (n = this.internalGet(e, !0)) === null || n === void 0 ? void 0 : n[0];
  1381. }
  1382. has(e) {
  1383. return !!this.internalGet(e);
  1384. }
  1385. set(e, n) {
  1386. if (!this.has(e)) {
  1387. if (this.size() + 1 > vh.MAX_CACHE_SIZE + vh.MAX_CACHE_OFFSET) {
  1388. const [i] = this.keys.reduce((a, o) => {
  1389. const [, s] = a;
  1390. return this.internalGet(o)[1] < s ? [o, this.internalGet(o)[1]] : a;
  1391. }, [this.keys[0], this.cacheCallTimes]);
  1392. this.delete(i);
  1393. }
  1394. this.keys.push(e);
  1395. }
  1396. let r = this.cache;
  1397. e.forEach((i, a) => {
  1398. if (a === e.length - 1)
  1399. r.set(i, {
  1400. value: [n, this.cacheCallTimes++]
  1401. });
  1402. else {
  1403. const o = r.get(i);
  1404. o ? o.map || (o.map = /* @__PURE__ */ new Map()) : r.set(i, {
  1405. map: /* @__PURE__ */ new Map()
  1406. }), r = r.get(i).map;
  1407. }
  1408. });
  1409. }
  1410. deleteByPath(e, n) {
  1411. var r;
  1412. const i = e.get(n[0]);
  1413. if (n.length === 1)
  1414. return i.map ? e.set(n[0], {
  1415. map: i.map
  1416. }) : e.delete(n[0]), (r = i.value) === null || r === void 0 ? void 0 : r[0];
  1417. const a = this.deleteByPath(i.map, n.slice(1));
  1418. return (!i.map || i.map.size === 0) && !i.value && e.delete(n[0]), a;
  1419. }
  1420. delete(e) {
  1421. if (this.has(e))
  1422. return this.keys = this.keys.filter((n) => !Yue(n, e)), this.deleteByPath(this.cache, e);
  1423. }
  1424. }
  1425. vh.MAX_CACHE_SIZE = 20;
  1426. vh.MAX_CACHE_OFFSET = 5;
  1427. let o2 = {};
  1428. function cf(t, e) {
  1429. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error(`Warning: ${e}`);
  1430. }
  1431. function que(t, e) {
  1432. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.warn(`Note: ${e}`);
  1433. }
  1434. function Kue() {
  1435. o2 = {};
  1436. }
  1437. function Oj(t, e, n) {
  1438. !e && !o2[n] && (t(!1, n), o2[n] = !0);
  1439. }
  1440. function oa(t, e) {
  1441. Oj(cf, t, e);
  1442. }
  1443. function a8(t, e) {
  1444. Oj(que, t, e);
  1445. }
  1446. function Jue() {
  1447. }
  1448. let Xr = Jue;
  1449. process.env.NODE_ENV !== "production" && (Xr = (t, e, n) => {
  1450. oa(t, `[ant-design-vue: ${e}] ${n}`), process.env.NODE_ENV === "test" && Kue();
  1451. });
  1452. let o8 = 0;
  1453. class Sj {
  1454. constructor(e) {
  1455. this.derivatives = Array.isArray(e) ? e : [e], this.id = o8, e.length === 0 && Xr(e.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), o8 += 1;
  1456. }
  1457. getDerivativeToken(e) {
  1458. return this.derivatives.reduce((n, r) => r(e, n), void 0);
  1459. }
  1460. }
  1461. const qw = new vh();
  1462. function xj(t) {
  1463. const e = Array.isArray(t) ? t : [t];
  1464. return qw.has(e) || qw.set(e, new Sj(e)), qw.get(e);
  1465. }
  1466. const s8 = /* @__PURE__ */ new WeakMap();
  1467. function y1(t) {
  1468. let e = s8.get(t) || "";
  1469. return e || (Object.keys(t).forEach((n) => {
  1470. const r = t[n];
  1471. e += n, r instanceof Sj ? e += r.id : r && typeof r == "object" ? e += y1(r) : e += r;
  1472. }), s8.set(t, e)), e;
  1473. }
  1474. function ece(t, e) {
  1475. return oI(`${e}_${y1(t)}`);
  1476. }
  1477. const og = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), wj = "_bAmBoO_";
  1478. function tce(t, e, n) {
  1479. var r, i;
  1480. if (wa()) {
  1481. Yg(t, og);
  1482. const a = document.createElement("div");
  1483. a.style.position = "fixed", a.style.left = "0", a.style.top = "0", e == null || e(a), document.body.appendChild(a), process.env.NODE_ENV !== "production" && (a.innerHTML = "Test", a.style.zIndex = "9999999");
  1484. const o = n ? n(a) : (r = getComputedStyle(a).content) === null || r === void 0 ? void 0 : r.includes(wj);
  1485. return (i = a.parentNode) === null || i === void 0 || i.removeChild(a), m1(og), o;
  1486. }
  1487. return !1;
  1488. }
  1489. let Kw;
  1490. function nce() {
  1491. return Kw === void 0 && (Kw = tce(`@layer ${og} { .${og} { content: "${wj}"!important; } }`, (t) => {
  1492. t.className = og;
  1493. })), Kw;
  1494. }
  1495. const l8 = {}, rce = process.env.NODE_ENV === "production", ice = process.env.NODE_ENV === "prerender", ace = !rce && !ice ? "css-dev-only-do-not-override" : "css", bc = /* @__PURE__ */ new Map();
  1496. function oce(t) {
  1497. bc.set(t, (bc.get(t) || 0) + 1);
  1498. }
  1499. function sce(t, e) {
  1500. typeof document < "u" && document.querySelectorAll(`style[${hj}="${t}"]`).forEach((r) => {
  1501. var i;
  1502. r[Nd] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r));
  1503. });
  1504. }
  1505. const lce = 0;
  1506. function uce(t, e) {
  1507. bc.set(t, (bc.get(t) || 0) - 1);
  1508. const n = Array.from(bc.keys()), r = n.filter((i) => (bc.get(i) || 0) <= 0);
  1509. n.length - r.length > lce && r.forEach((i) => {
  1510. sce(i, e), bc.delete(i);
  1511. });
  1512. }
  1513. const cce = (t, e, n, r) => {
  1514. const i = n.getDerivativeToken(t);
  1515. let a = I(I({}, i), e);
  1516. return r && (a = r(a)), a;
  1517. };
  1518. function fce(t, e) {
  1519. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : U({});
  1520. const r = kS(), i = L(() => I({}, ...e.value)), a = L(() => y1(i.value)), o = L(() => y1(n.value.override || l8));
  1521. return gj("token", L(() => [n.value.salt || "", t.value.id, a.value, o.value]), () => {
  1522. const {
  1523. salt: l = "",
  1524. override: u = l8,
  1525. formatToken: c,
  1526. getComputedToken: f
  1527. } = n.value, d = f ? f(i.value, u, t.value) : cce(i.value, u, t.value, c), h = ece(d, l);
  1528. d._tokenKey = h, oce(h);
  1529. const p = `${ace}-${oI(h)}`;
  1530. return d._hashId = p, [d, p];
  1531. }, (l) => {
  1532. var u;
  1533. uce(l[0]._tokenKey, (u = r.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  1534. });
  1535. }
  1536. var dce = {
  1537. animationIterationCount: 1,
  1538. aspectRatio: 1,
  1539. borderImageOutset: 1,
  1540. borderImageSlice: 1,
  1541. borderImageWidth: 1,
  1542. boxFlex: 1,
  1543. boxFlexGroup: 1,
  1544. boxOrdinalGroup: 1,
  1545. columnCount: 1,
  1546. columns: 1,
  1547. flex: 1,
  1548. flexGrow: 1,
  1549. flexPositive: 1,
  1550. flexShrink: 1,
  1551. flexNegative: 1,
  1552. flexOrder: 1,
  1553. gridRow: 1,
  1554. gridRowEnd: 1,
  1555. gridRowSpan: 1,
  1556. gridRowStart: 1,
  1557. gridColumn: 1,
  1558. gridColumnEnd: 1,
  1559. gridColumnSpan: 1,
  1560. gridColumnStart: 1,
  1561. msGridRow: 1,
  1562. msGridRowSpan: 1,
  1563. msGridColumn: 1,
  1564. msGridColumnSpan: 1,
  1565. fontWeight: 1,
  1566. lineHeight: 1,
  1567. opacity: 1,
  1568. order: 1,
  1569. orphans: 1,
  1570. tabSize: 1,
  1571. widows: 1,
  1572. zIndex: 1,
  1573. zoom: 1,
  1574. WebkitLineClamp: 1,
  1575. // SVG-related properties
  1576. fillOpacity: 1,
  1577. floodOpacity: 1,
  1578. stopOpacity: 1,
  1579. strokeDasharray: 1,
  1580. strokeDashoffset: 1,
  1581. strokeMiterlimit: 1,
  1582. strokeOpacity: 1,
  1583. strokeWidth: 1
  1584. }, Cj = "comm", Tj = "rule", Pj = "decl", hce = "@import", pce = "@keyframes", vce = "@layer", $j = Math.abs, sI = String.fromCharCode;
  1585. function Aj(t) {
  1586. return t.trim();
  1587. }
  1588. function y_(t, e, n) {
  1589. return t.replace(e, n);
  1590. }
  1591. function gce(t, e, n) {
  1592. return t.indexOf(e, n);
  1593. }
  1594. function qg(t, e) {
  1595. return t.charCodeAt(e) | 0;
  1596. }
  1597. function Kg(t, e, n) {
  1598. return t.slice(e, n);
  1599. }
  1600. function Ss(t) {
  1601. return t.length;
  1602. }
  1603. function mce(t) {
  1604. return t.length;
  1605. }
  1606. function gy(t, e) {
  1607. return e.push(t), t;
  1608. }
  1609. var NS = 1, gh = 1, Ej = 0, Ca = 0, Bn = 0, rp = "";
  1610. function lI(t, e, n, r, i, a, o, s) {
  1611. return { value: t, root: e, parent: n, type: r, props: i, children: a, line: NS, column: gh, length: o, return: "", siblings: s };
  1612. }
  1613. function yce() {
  1614. return Bn;
  1615. }
  1616. function bce() {
  1617. return Bn = Ca > 0 ? qg(rp, --Ca) : 0, gh--, Bn === 10 && (gh = 1, NS--), Bn;
  1618. }
  1619. function qa() {
  1620. return Bn = Ca < Ej ? qg(rp, Ca++) : 0, gh++, Bn === 10 && (gh = 1, NS++), Bn;
  1621. }
  1622. function Gc() {
  1623. return qg(rp, Ca);
  1624. }
  1625. function b_() {
  1626. return Ca;
  1627. }
  1628. function BS(t, e) {
  1629. return Kg(rp, t, e);
  1630. }
  1631. function s2(t) {
  1632. switch (t) {
  1633. case 0:
  1634. case 9:
  1635. case 10:
  1636. case 13:
  1637. case 32:
  1638. return 5;
  1639. case 33:
  1640. case 43:
  1641. case 44:
  1642. case 47:
  1643. case 62:
  1644. case 64:
  1645. case 126:
  1646. case 59:
  1647. case 123:
  1648. case 125:
  1649. return 4;
  1650. case 58:
  1651. return 3;
  1652. case 34:
  1653. case 39:
  1654. case 40:
  1655. case 91:
  1656. return 2;
  1657. case 41:
  1658. case 93:
  1659. return 1;
  1660. }
  1661. return 0;
  1662. }
  1663. function _ce(t) {
  1664. return NS = gh = 1, Ej = Ss(rp = t), Ca = 0, [];
  1665. }
  1666. function Oce(t) {
  1667. return rp = "", t;
  1668. }
  1669. function Jw(t) {
  1670. return Aj(BS(Ca - 1, l2(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
  1671. }
  1672. function Sce(t) {
  1673. for (; (Bn = Gc()) && Bn < 33; )
  1674. qa();
  1675. return s2(t) > 2 || s2(Bn) > 3 ? "" : " ";
  1676. }
  1677. function xce(t, e) {
  1678. for (; --e && qa() && !(Bn < 48 || Bn > 102 || Bn > 57 && Bn < 65 || Bn > 70 && Bn < 97); )
  1679. ;
  1680. return BS(t, b_() + (e < 6 && Gc() == 32 && qa() == 32));
  1681. }
  1682. function l2(t) {
  1683. for (; qa(); )
  1684. switch (Bn) {
  1685. case t:
  1686. return Ca;
  1687. case 34:
  1688. case 39:
  1689. t !== 34 && t !== 39 && l2(Bn);
  1690. break;
  1691. case 40:
  1692. t === 41 && l2(t);
  1693. break;
  1694. case 92:
  1695. qa();
  1696. break;
  1697. }
  1698. return Ca;
  1699. }
  1700. function wce(t, e) {
  1701. for (; qa() && t + Bn !== 57; )
  1702. if (t + Bn === 84 && Gc() === 47)
  1703. break;
  1704. return "/*" + BS(e, Ca - 1) + "*" + sI(t === 47 ? t : qa());
  1705. }
  1706. function Cce(t) {
  1707. for (; !s2(Gc()); )
  1708. qa();
  1709. return BS(t, Ca);
  1710. }
  1711. function Tce(t) {
  1712. return Oce(__("", null, null, null, [""], t = _ce(t), 0, [0], t));
  1713. }
  1714. function __(t, e, n, r, i, a, o, s, l) {
  1715. for (var u = 0, c = 0, f = o, d = 0, h = 0, p = 0, v = 1, g = 1, m = 1, y = 0, b = "", _ = i, O = a, S = r, x = b; g; )
  1716. switch (p = y, y = qa()) {
  1717. case 40:
  1718. if (p != 108 && qg(x, f - 1) == 58) {
  1719. gce(x += y_(Jw(y), "&", "&\f"), "&\f", $j(u ? s[u - 1] : 0)) != -1 && (m = -1);
  1720. break;
  1721. }
  1722. case 34:
  1723. case 39:
  1724. case 91:
  1725. x += Jw(y);
  1726. break;
  1727. case 9:
  1728. case 10:
  1729. case 13:
  1730. case 32:
  1731. x += Sce(p);
  1732. break;
  1733. case 92:
  1734. x += xce(b_() - 1, 7);
  1735. continue;
  1736. case 47:
  1737. switch (Gc()) {
  1738. case 42:
  1739. case 47:
  1740. gy(Pce(wce(qa(), b_()), e, n, l), l);
  1741. break;
  1742. default:
  1743. x += "/";
  1744. }
  1745. break;
  1746. case 123 * v:
  1747. s[u++] = Ss(x) * m;
  1748. case 125 * v:
  1749. case 59:
  1750. case 0:
  1751. switch (y) {
  1752. case 0:
  1753. case 125:
  1754. g = 0;
  1755. case 59 + c:
  1756. m == -1 && (x = y_(x, /\f/g, "")), h > 0 && Ss(x) - f && gy(h > 32 ? c8(x + ";", r, n, f - 1, l) : c8(y_(x, " ", "") + ";", r, n, f - 2, l), l);
  1757. break;
  1758. case 59:
  1759. x += ";";
  1760. default:
  1761. if (gy(S = u8(x, e, n, u, c, i, s, b, _ = [], O = [], f, a), a), y === 123)
  1762. if (c === 0)
  1763. __(x, e, S, S, _, a, f, s, O);
  1764. else
  1765. switch (d === 99 && qg(x, 3) === 110 ? 100 : d) {
  1766. case 100:
  1767. case 108:
  1768. case 109:
  1769. case 115:
  1770. __(t, S, S, r && gy(u8(t, S, S, 0, 0, i, s, b, i, _ = [], f, O), O), i, O, f, s, r ? _ : O);
  1771. break;
  1772. default:
  1773. __(x, S, S, S, [""], O, 0, s, O);
  1774. }
  1775. }
  1776. u = c = h = 0, v = m = 1, b = x = "", f = o;
  1777. break;
  1778. case 58:
  1779. f = 1 + Ss(x), h = p;
  1780. default:
  1781. if (v < 1) {
  1782. if (y == 123)
  1783. --v;
  1784. else if (y == 125 && v++ == 0 && bce() == 125)
  1785. continue;
  1786. }
  1787. switch (x += sI(y), y * v) {
  1788. case 38:
  1789. m = c > 0 ? 1 : (x += "\f", -1);
  1790. break;
  1791. case 44:
  1792. s[u++] = (Ss(x) - 1) * m, m = 1;
  1793. break;
  1794. case 64:
  1795. Gc() === 45 && (x += Jw(qa())), d = Gc(), c = f = Ss(b = x += Cce(b_())), y++;
  1796. break;
  1797. case 45:
  1798. p === 45 && Ss(x) == 2 && (v = 0);
  1799. }
  1800. }
  1801. return a;
  1802. }
  1803. function u8(t, e, n, r, i, a, o, s, l, u, c, f) {
  1804. for (var d = i - 1, h = i === 0 ? a : [""], p = mce(h), v = 0, g = 0, m = 0; v < r; ++v)
  1805. for (var y = 0, b = Kg(t, d + 1, d = $j(g = o[v])), _ = t; y < p; ++y)
  1806. (_ = Aj(g > 0 ? h[y] + " " + b : y_(b, /&\f/g, h[y]))) && (l[m++] = _);
  1807. return lI(t, e, n, i === 0 ? Tj : s, l, u, c, f);
  1808. }
  1809. function Pce(t, e, n, r) {
  1810. return lI(t, e, n, Cj, sI(yce()), Kg(t, 2, -2), 0, r);
  1811. }
  1812. function c8(t, e, n, r, i) {
  1813. return lI(t, e, n, Pj, Kg(t, 0, r), Kg(t, r + 1, -1), r, i);
  1814. }
  1815. function u2(t, e) {
  1816. for (var n = "", r = 0; r < t.length; r++)
  1817. n += e(t[r], r, t, e) || "";
  1818. return n;
  1819. }
  1820. function $ce(t, e, n, r) {
  1821. switch (t.type) {
  1822. case vce:
  1823. if (t.children.length) break;
  1824. case hce:
  1825. case Pj:
  1826. return t.return = t.return || t.value;
  1827. case Cj:
  1828. return "";
  1829. case pce:
  1830. return t.return = t.value + "{" + u2(t.children, r) + "}";
  1831. case Tj:
  1832. if (!Ss(t.value = t.props.join(","))) return "";
  1833. }
  1834. return Ss(n = u2(t.children, r)) ? t.return = t.value + "{" + n + "}" : "";
  1835. }
  1836. function Mj(t, e) {
  1837. const {
  1838. path: n,
  1839. parentSelectors: r
  1840. } = e;
  1841. oa(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${t}${r.length ? ` Selector info: ${r.join(" -> ")}` : ""}`);
  1842. }
  1843. const Ace = (t, e, n) => {
  1844. if (t === "content") {
  1845. const r = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
  1846. (typeof e != "string" || ["normal", "none", "initial", "inherit", "unset"].indexOf(e) === -1 && !r.test(e) && (e.charAt(0) !== e.charAt(e.length - 1) || e.charAt(0) !== '"' && e.charAt(0) !== "'")) && Mj(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`, n);
  1847. }
  1848. }, Ece = (t, e, n) => {
  1849. t === "animation" && n.hashId && e !== "none" && Mj(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`, n);
  1850. }, f8 = "data-ant-cssinjs-cache-path", Mce = "_FILE_STYLE__";
  1851. let jc, Ij = !0;
  1852. function Ice() {
  1853. var t;
  1854. if (!jc && (jc = {}, wa())) {
  1855. const e = document.createElement("div");
  1856. e.className = f8, e.style.position = "fixed", e.style.visibility = "hidden", e.style.top = "-9999px", document.body.appendChild(e);
  1857. let n = getComputedStyle(e).content || "";
  1858. n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
  1859. const [a, o] = i.split(":");
  1860. jc[a] = o;
  1861. });
  1862. const r = document.querySelector(`style[${f8}]`);
  1863. r && (Ij = !1, (t = r.parentNode) === null || t === void 0 || t.removeChild(r)), document.body.removeChild(e);
  1864. }
  1865. }
  1866. function Dce(t) {
  1867. return Ice(), !!jc[t];
  1868. }
  1869. function Rce(t) {
  1870. const e = jc[t];
  1871. let n = null;
  1872. if (e && wa())
  1873. if (Ij)
  1874. n = Mce;
  1875. else {
  1876. const r = document.querySelector(`style[${Hc}="${jc[t]}"]`);
  1877. r ? n = r.innerHTML : delete jc[t];
  1878. }
  1879. return [n, e];
  1880. }
  1881. const d8 = wa(), Dj = "_skip_check_", Rj = "_multi_value_";
  1882. function h8(t) {
  1883. return u2(Tce(t), $ce).replace(/\{%%%\:[^;];}/g, ";");
  1884. }
  1885. function kce(t) {
  1886. return typeof t == "object" && t && (Dj in t || Rj in t);
  1887. }
  1888. function Lce(t, e, n) {
  1889. if (!e)
  1890. return t;
  1891. const r = `.${e}`, i = n === "low" ? `:where(${r})` : r;
  1892. return t.split(",").map((o) => {
  1893. var s;
  1894. const l = o.trim().split(/\s+/);
  1895. let u = l[0] || "";
  1896. const c = ((s = u.match(/^\w+/)) === null || s === void 0 ? void 0 : s[0]) || "";
  1897. return u = `${c}${i}${u.slice(c.length)}`, [u, ...l.slice(1)].join(" ");
  1898. }).join(",");
  1899. }
  1900. const c2 = /* @__PURE__ */ new Set();
  1901. process.env.NODE_ENV;
  1902. const f2 = function(t) {
  1903. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
  1904. root: n,
  1905. injectHash: r,
  1906. parentSelectors: i
  1907. } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
  1908. root: !0,
  1909. parentSelectors: []
  1910. };
  1911. const {
  1912. hashId: a,
  1913. layer: o,
  1914. path: s,
  1915. hashPriority: l,
  1916. transformers: u = [],
  1917. linters: c = []
  1918. } = e;
  1919. let f = "", d = {};
  1920. function h(g) {
  1921. const m = g.getName(a);
  1922. if (!d[m]) {
  1923. const [y] = f2(g.style, e, {
  1924. root: !1,
  1925. parentSelectors: i
  1926. });
  1927. d[m] = `@keyframes ${g.getName(a)}${y}`;
  1928. }
  1929. }
  1930. function p(g) {
  1931. let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  1932. return g.forEach((y) => {
  1933. Array.isArray(y) ? p(y, m) : y && m.push(y);
  1934. }), m;
  1935. }
  1936. if (p(Array.isArray(t) ? t : [t]).forEach((g) => {
  1937. const m = typeof g == "string" && !n ? {} : g;
  1938. if (typeof m == "string")
  1939. f += `${m}
  1940. `;
  1941. else if (m._keyframe)
  1942. h(m);
  1943. else {
  1944. const y = u.reduce((b, _) => {
  1945. var O;
  1946. return ((O = _ == null ? void 0 : _.visit) === null || O === void 0 ? void 0 : O.call(_, b)) || b;
  1947. }, m);
  1948. Object.keys(y).forEach((b) => {
  1949. var _;
  1950. const O = y[b];
  1951. if (typeof O == "object" && O && (b !== "animationName" || !O._keyframe) && !kce(O)) {
  1952. let S = !1, x = b.trim(), C = !1;
  1953. (n || r) && a ? x.startsWith("@") ? S = !0 : x = Lce(b, a, l) : n && !a && (x === "&" || x === "") && (x = "", C = !0);
  1954. const [T, w] = f2(O, e, {
  1955. root: C,
  1956. injectHash: S,
  1957. parentSelectors: [...i, x]
  1958. });
  1959. d = I(I({}, d), w), f += `${x}${T}`;
  1960. } else {
  1961. let S = function(C, T) {
  1962. process.env.NODE_ENV !== "production" && (typeof O != "object" || !(O != null && O[Dj])) && [Ace, Ece, ...c].forEach(($) => $(C, T, {
  1963. path: s,
  1964. hashId: a,
  1965. parentSelectors: i
  1966. }));
  1967. const w = C.replace(/[A-Z]/g, ($) => `-${$.toLowerCase()}`);
  1968. let P = T;
  1969. !dce[C] && typeof P == "number" && P !== 0 && (P = `${P}px`), C === "animationName" && (T != null && T._keyframe) && (h(T), P = T.getName(a)), f += `${w}:${P};`;
  1970. };
  1971. const x = (_ = O == null ? void 0 : O.value) !== null && _ !== void 0 ? _ : O;
  1972. typeof O == "object" && (O != null && O[Rj]) && Array.isArray(x) ? x.forEach((C) => {
  1973. S(b, C);
  1974. }) : S(b, x);
  1975. }
  1976. });
  1977. }
  1978. }), !n)
  1979. f = `{${f}}`;
  1980. else if (o && nce()) {
  1981. const g = o.split(",");
  1982. f = `@layer ${g[g.length - 1].trim()} {${f}}`, g.length > 1 && (f = `@layer ${o}{%%%:%}${f}`);
  1983. }
  1984. return [f, d];
  1985. };
  1986. function Nce(t, e) {
  1987. return oI(`${t.join("%")}${e}`);
  1988. }
  1989. function d2(t, e) {
  1990. const n = kS(), r = L(() => t.value.token._tokenKey), i = L(() => [r.value, ...t.value.path]);
  1991. let a = d8;
  1992. return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (a = n.value.mock === "client"), gj(
  1993. "style",
  1994. i,
  1995. // Create cache if needed
  1996. () => {
  1997. const {
  1998. path: o,
  1999. hashId: s,
  2000. layer: l,
  2001. nonce: u,
  2002. clientOnly: c,
  2003. order: f = 0
  2004. } = t.value, d = i.value.join("|");
  2005. if (Dce(d)) {
  2006. const [x, C] = Rce(d);
  2007. if (x)
  2008. return [x, r.value, C, {}, c, f];
  2009. }
  2010. const h = e(), {
  2011. hashPriority: p,
  2012. container: v,
  2013. transformers: g,
  2014. linters: m,
  2015. cache: y
  2016. } = n.value, [b, _] = f2(h, {
  2017. hashId: s,
  2018. hashPriority: p,
  2019. layer: l,
  2020. path: o.join("-"),
  2021. transformers: g,
  2022. linters: m
  2023. }), O = h8(b), S = Nce(i.value, O);
  2024. if (a) {
  2025. const x = {
  2026. mark: Hc,
  2027. prepend: "queue",
  2028. attachTo: v,
  2029. priority: f
  2030. }, C = typeof u == "function" ? u() : u;
  2031. C && (x.csp = {
  2032. nonce: C
  2033. });
  2034. const T = Yg(O, S, x);
  2035. T[Nd] = y.instanceId, T.setAttribute(hj, r.value), process.env.NODE_ENV !== "production" && T.setAttribute(Vue, i.value.join("|")), Object.keys(_).forEach((w) => {
  2036. c2.has(w) || (c2.add(w), Yg(h8(_[w]), `_effect-${w}`, {
  2037. mark: Hc,
  2038. prepend: "queue",
  2039. attachTo: v
  2040. }));
  2041. });
  2042. }
  2043. return [O, r.value, S, _, c, f];
  2044. },
  2045. // Remove cache if no need
  2046. (o, s) => {
  2047. let [, , l] = o;
  2048. (s || n.value.autoClear) && d8 && m1(l, {
  2049. mark: Hc
  2050. });
  2051. }
  2052. ), (o) => o;
  2053. }
  2054. class Ot {
  2055. constructor(e, n) {
  2056. this._keyframe = !0, this.name = e, this.style = n;
  2057. }
  2058. getName() {
  2059. let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
  2060. return e ? `${e}-${this.name}` : this.name;
  2061. }
  2062. }
  2063. const Bce = "4.2.3", b1 = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
  2064. function Or(t, e) {
  2065. zce(t) && (t = "100%");
  2066. var n = Vce(t);
  2067. return t = e === 360 ? t : Math.min(e, Math.max(0, parseFloat(t))), n && (t = parseInt(String(t * e), 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : (e === 360 ? t = (t < 0 ? t % e + e : t % e) / parseFloat(String(e)) : t = t % e / parseFloat(String(e)), t);
  2068. }
  2069. function my(t) {
  2070. return Math.min(1, Math.max(0, t));
  2071. }
  2072. function zce(t) {
  2073. return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
  2074. }
  2075. function Vce(t) {
  2076. return typeof t == "string" && t.indexOf("%") !== -1;
  2077. }
  2078. function kj(t) {
  2079. return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
  2080. }
  2081. function yy(t) {
  2082. return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
  2083. }
  2084. function Mc(t) {
  2085. return t.length === 1 ? "0" + t : String(t);
  2086. }
  2087. function Fce(t, e, n) {
  2088. return {
  2089. r: Or(t, 255) * 255,
  2090. g: Or(e, 255) * 255,
  2091. b: Or(n, 255) * 255
  2092. };
  2093. }
  2094. function p8(t, e, n) {
  2095. t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  2096. var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = 0, s = (r + i) / 2;
  2097. if (r === i)
  2098. o = 0, a = 0;
  2099. else {
  2100. var l = r - i;
  2101. switch (o = s > 0.5 ? l / (2 - r - i) : l / (r + i), r) {
  2102. case t:
  2103. a = (e - n) / l + (e < n ? 6 : 0);
  2104. break;
  2105. case e:
  2106. a = (n - t) / l + 2;
  2107. break;
  2108. case n:
  2109. a = (t - e) / l + 4;
  2110. break;
  2111. }
  2112. a /= 6;
  2113. }
  2114. return { h: a, s: o, l: s };
  2115. }
  2116. function eC(t, e, n) {
  2117. return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * (6 * n) : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
  2118. }
  2119. function Wce(t, e, n) {
  2120. var r, i, a;
  2121. if (t = Or(t, 360), e = Or(e, 100), n = Or(n, 100), e === 0)
  2122. i = n, a = n, r = n;
  2123. else {
  2124. var o = n < 0.5 ? n * (1 + e) : n + e - n * e, s = 2 * n - o;
  2125. r = eC(s, o, t + 1 / 3), i = eC(s, o, t), a = eC(s, o, t - 1 / 3);
  2126. }
  2127. return { r: r * 255, g: i * 255, b: a * 255 };
  2128. }
  2129. function h2(t, e, n) {
  2130. t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  2131. var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = r, s = r - i, l = r === 0 ? 0 : s / r;
  2132. if (r === i)
  2133. a = 0;
  2134. else {
  2135. switch (r) {
  2136. case t:
  2137. a = (e - n) / s + (e < n ? 6 : 0);
  2138. break;
  2139. case e:
  2140. a = (n - t) / s + 2;
  2141. break;
  2142. case n:
  2143. a = (t - e) / s + 4;
  2144. break;
  2145. }
  2146. a /= 6;
  2147. }
  2148. return { h: a, s: l, v: o };
  2149. }
  2150. function Qce(t, e, n) {
  2151. t = Or(t, 360) * 6, e = Or(e, 100), n = Or(n, 100);
  2152. var r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
  2153. return { r: u * 255, g: c * 255, b: f * 255 };
  2154. }
  2155. function p2(t, e, n, r) {
  2156. var i = [
  2157. Mc(Math.round(t).toString(16)),
  2158. Mc(Math.round(e).toString(16)),
  2159. Mc(Math.round(n).toString(16))
  2160. ];
  2161. return r && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
  2162. }
  2163. function Hce(t, e, n, r, i) {
  2164. var a = [
  2165. Mc(Math.round(t).toString(16)),
  2166. Mc(Math.round(e).toString(16)),
  2167. Mc(Math.round(n).toString(16)),
  2168. Mc(Gce(r))
  2169. ];
  2170. return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
  2171. }
  2172. function Gce(t) {
  2173. return Math.round(parseFloat(t) * 255).toString(16);
  2174. }
  2175. function v8(t) {
  2176. return Mi(t) / 255;
  2177. }
  2178. function Mi(t) {
  2179. return parseInt(t, 16);
  2180. }
  2181. function jce(t) {
  2182. return {
  2183. r: t >> 16,
  2184. g: (t & 65280) >> 8,
  2185. b: t & 255
  2186. };
  2187. }
  2188. var v2 = {
  2189. aliceblue: "#f0f8ff",
  2190. antiquewhite: "#faebd7",
  2191. aqua: "#00ffff",
  2192. aquamarine: "#7fffd4",
  2193. azure: "#f0ffff",
  2194. beige: "#f5f5dc",
  2195. bisque: "#ffe4c4",
  2196. black: "#000000",
  2197. blanchedalmond: "#ffebcd",
  2198. blue: "#0000ff",
  2199. blueviolet: "#8a2be2",
  2200. brown: "#a52a2a",
  2201. burlywood: "#deb887",
  2202. cadetblue: "#5f9ea0",
  2203. chartreuse: "#7fff00",
  2204. chocolate: "#d2691e",
  2205. coral: "#ff7f50",
  2206. cornflowerblue: "#6495ed",
  2207. cornsilk: "#fff8dc",
  2208. crimson: "#dc143c",
  2209. cyan: "#00ffff",
  2210. darkblue: "#00008b",
  2211. darkcyan: "#008b8b",
  2212. darkgoldenrod: "#b8860b",
  2213. darkgray: "#a9a9a9",
  2214. darkgreen: "#006400",
  2215. darkgrey: "#a9a9a9",
  2216. darkkhaki: "#bdb76b",
  2217. darkmagenta: "#8b008b",
  2218. darkolivegreen: "#556b2f",
  2219. darkorange: "#ff8c00",
  2220. darkorchid: "#9932cc",
  2221. darkred: "#8b0000",
  2222. darksalmon: "#e9967a",
  2223. darkseagreen: "#8fbc8f",
  2224. darkslateblue: "#483d8b",
  2225. darkslategray: "#2f4f4f",
  2226. darkslategrey: "#2f4f4f",
  2227. darkturquoise: "#00ced1",
  2228. darkviolet: "#9400d3",
  2229. deeppink: "#ff1493",
  2230. deepskyblue: "#00bfff",
  2231. dimgray: "#696969",
  2232. dimgrey: "#696969",
  2233. dodgerblue: "#1e90ff",
  2234. firebrick: "#b22222",
  2235. floralwhite: "#fffaf0",
  2236. forestgreen: "#228b22",
  2237. fuchsia: "#ff00ff",
  2238. gainsboro: "#dcdcdc",
  2239. ghostwhite: "#f8f8ff",
  2240. goldenrod: "#daa520",
  2241. gold: "#ffd700",
  2242. gray: "#808080",
  2243. green: "#008000",
  2244. greenyellow: "#adff2f",
  2245. grey: "#808080",
  2246. honeydew: "#f0fff0",
  2247. hotpink: "#ff69b4",
  2248. indianred: "#cd5c5c",
  2249. indigo: "#4b0082",
  2250. ivory: "#fffff0",
  2251. khaki: "#f0e68c",
  2252. lavenderblush: "#fff0f5",
  2253. lavender: "#e6e6fa",
  2254. lawngreen: "#7cfc00",
  2255. lemonchiffon: "#fffacd",
  2256. lightblue: "#add8e6",
  2257. lightcoral: "#f08080",
  2258. lightcyan: "#e0ffff",
  2259. lightgoldenrodyellow: "#fafad2",
  2260. lightgray: "#d3d3d3",
  2261. lightgreen: "#90ee90",
  2262. lightgrey: "#d3d3d3",
  2263. lightpink: "#ffb6c1",
  2264. lightsalmon: "#ffa07a",
  2265. lightseagreen: "#20b2aa",
  2266. lightskyblue: "#87cefa",
  2267. lightslategray: "#778899",
  2268. lightslategrey: "#778899",
  2269. lightsteelblue: "#b0c4de",
  2270. lightyellow: "#ffffe0",
  2271. lime: "#00ff00",
  2272. limegreen: "#32cd32",
  2273. linen: "#faf0e6",
  2274. magenta: "#ff00ff",
  2275. maroon: "#800000",
  2276. mediumaquamarine: "#66cdaa",
  2277. mediumblue: "#0000cd",
  2278. mediumorchid: "#ba55d3",
  2279. mediumpurple: "#9370db",
  2280. mediumseagreen: "#3cb371",
  2281. mediumslateblue: "#7b68ee",
  2282. mediumspringgreen: "#00fa9a",
  2283. mediumturquoise: "#48d1cc",
  2284. mediumvioletred: "#c71585",
  2285. midnightblue: "#191970",
  2286. mintcream: "#f5fffa",
  2287. mistyrose: "#ffe4e1",
  2288. moccasin: "#ffe4b5",
  2289. navajowhite: "#ffdead",
  2290. navy: "#000080",
  2291. oldlace: "#fdf5e6",
  2292. olive: "#808000",
  2293. olivedrab: "#6b8e23",
  2294. orange: "#ffa500",
  2295. orangered: "#ff4500",
  2296. orchid: "#da70d6",
  2297. palegoldenrod: "#eee8aa",
  2298. palegreen: "#98fb98",
  2299. paleturquoise: "#afeeee",
  2300. palevioletred: "#db7093",
  2301. papayawhip: "#ffefd5",
  2302. peachpuff: "#ffdab9",
  2303. peru: "#cd853f",
  2304. pink: "#ffc0cb",
  2305. plum: "#dda0dd",
  2306. powderblue: "#b0e0e6",
  2307. purple: "#800080",
  2308. rebeccapurple: "#663399",
  2309. red: "#ff0000",
  2310. rosybrown: "#bc8f8f",
  2311. royalblue: "#4169e1",
  2312. saddlebrown: "#8b4513",
  2313. salmon: "#fa8072",
  2314. sandybrown: "#f4a460",
  2315. seagreen: "#2e8b57",
  2316. seashell: "#fff5ee",
  2317. sienna: "#a0522d",
  2318. silver: "#c0c0c0",
  2319. skyblue: "#87ceeb",
  2320. slateblue: "#6a5acd",
  2321. slategray: "#708090",
  2322. slategrey: "#708090",
  2323. snow: "#fffafa",
  2324. springgreen: "#00ff7f",
  2325. steelblue: "#4682b4",
  2326. tan: "#d2b48c",
  2327. teal: "#008080",
  2328. thistle: "#d8bfd8",
  2329. tomato: "#ff6347",
  2330. turquoise: "#40e0d0",
  2331. violet: "#ee82ee",
  2332. wheat: "#f5deb3",
  2333. white: "#ffffff",
  2334. whitesmoke: "#f5f5f5",
  2335. yellow: "#ffff00",
  2336. yellowgreen: "#9acd32"
  2337. };
  2338. function Cd(t) {
  2339. var e = { r: 0, g: 0, b: 0 }, n = 1, r = null, i = null, a = null, o = !1, s = !1;
  2340. return typeof t == "string" && (t = Xce(t)), typeof t == "object" && (ps(t.r) && ps(t.g) && ps(t.b) ? (e = Fce(t.r, t.g, t.b), o = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : ps(t.h) && ps(t.s) && ps(t.v) ? (r = yy(t.s), i = yy(t.v), e = Qce(t.h, r, i), o = !0, s = "hsv") : ps(t.h) && ps(t.s) && ps(t.l) && (r = yy(t.s), a = yy(t.l), e = Wce(t.h, r, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (n = t.a)), n = kj(n), {
  2341. ok: o,
  2342. format: t.format || s,
  2343. r: Math.min(255, Math.max(e.r, 0)),
  2344. g: Math.min(255, Math.max(e.g, 0)),
  2345. b: Math.min(255, Math.max(e.b, 0)),
  2346. a: n
  2347. };
  2348. }
  2349. var Zce = "[-\\+]?\\d+%?", Uce = "[-\\+]?\\d*\\.\\d+%?", Il = "(?:".concat(Uce, ")|(?:").concat(Zce, ")"), tC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), nC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), Qa = {
  2350. CSS_UNIT: new RegExp(Il),
  2351. rgb: new RegExp("rgb" + tC),
  2352. rgba: new RegExp("rgba" + nC),
  2353. hsl: new RegExp("hsl" + tC),
  2354. hsla: new RegExp("hsla" + nC),
  2355. hsv: new RegExp("hsv" + tC),
  2356. hsva: new RegExp("hsva" + nC),
  2357. hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2358. hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  2359. hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2360. hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  2361. };
  2362. function Xce(t) {
  2363. if (t = t.trim().toLowerCase(), t.length === 0)
  2364. return !1;
  2365. var e = !1;
  2366. if (v2[t])
  2367. t = v2[t], e = !0;
  2368. else if (t === "transparent")
  2369. return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  2370. var n = Qa.rgb.exec(t);
  2371. return n ? { r: n[1], g: n[2], b: n[3] } : (n = Qa.rgba.exec(t), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Qa.hsl.exec(t), n ? { h: n[1], s: n[2], l: n[3] } : (n = Qa.hsla.exec(t), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Qa.hsv.exec(t), n ? { h: n[1], s: n[2], v: n[3] } : (n = Qa.hsva.exec(t), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Qa.hex8.exec(t), n ? {
  2372. r: Mi(n[1]),
  2373. g: Mi(n[2]),
  2374. b: Mi(n[3]),
  2375. a: v8(n[4]),
  2376. format: e ? "name" : "hex8"
  2377. } : (n = Qa.hex6.exec(t), n ? {
  2378. r: Mi(n[1]),
  2379. g: Mi(n[2]),
  2380. b: Mi(n[3]),
  2381. format: e ? "name" : "hex"
  2382. } : (n = Qa.hex4.exec(t), n ? {
  2383. r: Mi(n[1] + n[1]),
  2384. g: Mi(n[2] + n[2]),
  2385. b: Mi(n[3] + n[3]),
  2386. a: v8(n[4] + n[4]),
  2387. format: e ? "name" : "hex8"
  2388. } : (n = Qa.hex3.exec(t), n ? {
  2389. r: Mi(n[1] + n[1]),
  2390. g: Mi(n[2] + n[2]),
  2391. b: Mi(n[3] + n[3]),
  2392. format: e ? "name" : "hex"
  2393. } : !1)))))))));
  2394. }
  2395. function ps(t) {
  2396. return !!Qa.CSS_UNIT.exec(String(t));
  2397. }
  2398. var en = (
  2399. /** @class */
  2400. function() {
  2401. function t(e, n) {
  2402. e === void 0 && (e = ""), n === void 0 && (n = {});
  2403. var r;
  2404. if (e instanceof t)
  2405. return e;
  2406. typeof e == "number" && (e = jce(e)), this.originalInput = e;
  2407. var i = Cd(e);
  2408. this.originalInput = e, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
  2409. }
  2410. return t.prototype.isDark = function() {
  2411. return this.getBrightness() < 128;
  2412. }, t.prototype.isLight = function() {
  2413. return !this.isDark();
  2414. }, t.prototype.getBrightness = function() {
  2415. var e = this.toRgb();
  2416. return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
  2417. }, t.prototype.getLuminance = function() {
  2418. var e = this.toRgb(), n, r, i, a = e.r / 255, o = e.g / 255, s = e.b / 255;
  2419. return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), o <= 0.03928 ? r = o / 12.92 : r = Math.pow((o + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * i;
  2420. }, t.prototype.getAlpha = function() {
  2421. return this.a;
  2422. }, t.prototype.setAlpha = function(e) {
  2423. return this.a = kj(e), this.roundA = Math.round(100 * this.a) / 100, this;
  2424. }, t.prototype.isMonochrome = function() {
  2425. var e = this.toHsl().s;
  2426. return e === 0;
  2427. }, t.prototype.toHsv = function() {
  2428. var e = h2(this.r, this.g, this.b);
  2429. return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
  2430. }, t.prototype.toHsvString = function() {
  2431. var e = h2(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.v * 100);
  2432. return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
  2433. }, t.prototype.toHsl = function() {
  2434. var e = p8(this.r, this.g, this.b);
  2435. return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
  2436. }, t.prototype.toHslString = function() {
  2437. var e = p8(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.l * 100);
  2438. return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
  2439. }, t.prototype.toHex = function(e) {
  2440. return e === void 0 && (e = !1), p2(this.r, this.g, this.b, e);
  2441. }, t.prototype.toHexString = function(e) {
  2442. return e === void 0 && (e = !1), "#" + this.toHex(e);
  2443. }, t.prototype.toHex8 = function(e) {
  2444. return e === void 0 && (e = !1), Hce(this.r, this.g, this.b, this.a, e);
  2445. }, t.prototype.toHex8String = function(e) {
  2446. return e === void 0 && (e = !1), "#" + this.toHex8(e);
  2447. }, t.prototype.toHexShortString = function(e) {
  2448. return e === void 0 && (e = !1), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
  2449. }, t.prototype.toRgb = function() {
  2450. return {
  2451. r: Math.round(this.r),
  2452. g: Math.round(this.g),
  2453. b: Math.round(this.b),
  2454. a: this.a
  2455. };
  2456. }, t.prototype.toRgbString = function() {
  2457. var e = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b);
  2458. return this.a === 1 ? "rgb(".concat(e, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(e, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
  2459. }, t.prototype.toPercentageRgb = function() {
  2460. var e = function(n) {
  2461. return "".concat(Math.round(Or(n, 255) * 100), "%");
  2462. };
  2463. return {
  2464. r: e(this.r),
  2465. g: e(this.g),
  2466. b: e(this.b),
  2467. a: this.a
  2468. };
  2469. }, t.prototype.toPercentageRgbString = function() {
  2470. var e = function(n) {
  2471. return Math.round(Or(n, 255) * 100);
  2472. };
  2473. return this.a === 1 ? "rgb(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%)") : "rgba(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%, ").concat(this.roundA, ")");
  2474. }, t.prototype.toName = function() {
  2475. if (this.a === 0)
  2476. return "transparent";
  2477. if (this.a < 1)
  2478. return !1;
  2479. for (var e = "#" + p2(this.r, this.g, this.b, !1), n = 0, r = Object.entries(v2); n < r.length; n++) {
  2480. var i = r[n], a = i[0], o = i[1];
  2481. if (e === o)
  2482. return a;
  2483. }
  2484. return !1;
  2485. }, t.prototype.toString = function(e) {
  2486. var n = !!e;
  2487. e = e ?? this.format;
  2488. var r = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (e.startsWith("hex") || e === "name");
  2489. return a ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (r = this.toRgbString()), e === "prgb" && (r = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (r = this.toHexString()), e === "hex3" && (r = this.toHexString(!0)), e === "hex4" && (r = this.toHex8String(!0)), e === "hex8" && (r = this.toHex8String()), e === "name" && (r = this.toName()), e === "hsl" && (r = this.toHslString()), e === "hsv" && (r = this.toHsvString()), r || this.toHexString());
  2490. }, t.prototype.toNumber = function() {
  2491. return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
  2492. }, t.prototype.clone = function() {
  2493. return new t(this.toString());
  2494. }, t.prototype.lighten = function(e) {
  2495. e === void 0 && (e = 10);
  2496. var n = this.toHsl();
  2497. return n.l += e / 100, n.l = my(n.l), new t(n);
  2498. }, t.prototype.brighten = function(e) {
  2499. e === void 0 && (e = 10);
  2500. var n = this.toRgb();
  2501. return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(e / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(e / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(e / 100)))), new t(n);
  2502. }, t.prototype.darken = function(e) {
  2503. e === void 0 && (e = 10);
  2504. var n = this.toHsl();
  2505. return n.l -= e / 100, n.l = my(n.l), new t(n);
  2506. }, t.prototype.tint = function(e) {
  2507. return e === void 0 && (e = 10), this.mix("white", e);
  2508. }, t.prototype.shade = function(e) {
  2509. return e === void 0 && (e = 10), this.mix("black", e);
  2510. }, t.prototype.desaturate = function(e) {
  2511. e === void 0 && (e = 10);
  2512. var n = this.toHsl();
  2513. return n.s -= e / 100, n.s = my(n.s), new t(n);
  2514. }, t.prototype.saturate = function(e) {
  2515. e === void 0 && (e = 10);
  2516. var n = this.toHsl();
  2517. return n.s += e / 100, n.s = my(n.s), new t(n);
  2518. }, t.prototype.greyscale = function() {
  2519. return this.desaturate(100);
  2520. }, t.prototype.spin = function(e) {
  2521. var n = this.toHsl(), r = (n.h + e) % 360;
  2522. return n.h = r < 0 ? 360 + r : r, new t(n);
  2523. }, t.prototype.mix = function(e, n) {
  2524. n === void 0 && (n = 50);
  2525. var r = this.toRgb(), i = new t(e).toRgb(), a = n / 100, o = {
  2526. r: (i.r - r.r) * a + r.r,
  2527. g: (i.g - r.g) * a + r.g,
  2528. b: (i.b - r.b) * a + r.b,
  2529. a: (i.a - r.a) * a + r.a
  2530. };
  2531. return new t(o);
  2532. }, t.prototype.analogous = function(e, n) {
  2533. e === void 0 && (e = 6), n === void 0 && (n = 30);
  2534. var r = this.toHsl(), i = 360 / n, a = [this];
  2535. for (r.h = (r.h - (i * e >> 1) + 720) % 360; --e; )
  2536. r.h = (r.h + i) % 360, a.push(new t(r));
  2537. return a;
  2538. }, t.prototype.complement = function() {
  2539. var e = this.toHsl();
  2540. return e.h = (e.h + 180) % 360, new t(e);
  2541. }, t.prototype.monochromatic = function(e) {
  2542. e === void 0 && (e = 6);
  2543. for (var n = this.toHsv(), r = n.h, i = n.s, a = n.v, o = [], s = 1 / e; e--; )
  2544. o.push(new t({ h: r, s: i, v: a })), a = (a + s) % 1;
  2545. return o;
  2546. }, t.prototype.splitcomplement = function() {
  2547. var e = this.toHsl(), n = e.h;
  2548. return [
  2549. this,
  2550. new t({ h: (n + 72) % 360, s: e.s, l: e.l }),
  2551. new t({ h: (n + 216) % 360, s: e.s, l: e.l })
  2552. ];
  2553. }, t.prototype.onBackground = function(e) {
  2554. var n = this.toRgb(), r = new t(e).toRgb(), i = n.a + r.a * (1 - n.a);
  2555. return new t({
  2556. r: (n.r * n.a + r.r * r.a * (1 - n.a)) / i,
  2557. g: (n.g * n.a + r.g * r.a * (1 - n.a)) / i,
  2558. b: (n.b * n.a + r.b * r.a * (1 - n.a)) / i,
  2559. a: i
  2560. });
  2561. }, t.prototype.triad = function() {
  2562. return this.polyad(3);
  2563. }, t.prototype.tetrad = function() {
  2564. return this.polyad(4);
  2565. }, t.prototype.polyad = function(e) {
  2566. for (var n = this.toHsl(), r = n.h, i = [this], a = 360 / e, o = 1; o < e; o++)
  2567. i.push(new t({ h: (r + o * a) % 360, s: n.s, l: n.l }));
  2568. return i;
  2569. }, t.prototype.equals = function(e) {
  2570. return this.toRgbString() === new t(e).toRgbString();
  2571. }, t;
  2572. }()
  2573. ), by = 2, g8 = 0.16, Yce = 0.05, qce = 0.05, Kce = 0.15, Lj = 5, Nj = 4, Jce = [{
  2574. index: 7,
  2575. opacity: 0.15
  2576. }, {
  2577. index: 6,
  2578. opacity: 0.25
  2579. }, {
  2580. index: 5,
  2581. opacity: 0.3
  2582. }, {
  2583. index: 5,
  2584. opacity: 0.45
  2585. }, {
  2586. index: 5,
  2587. opacity: 0.65
  2588. }, {
  2589. index: 5,
  2590. opacity: 0.85
  2591. }, {
  2592. index: 4,
  2593. opacity: 0.9
  2594. }, {
  2595. index: 3,
  2596. opacity: 0.95
  2597. }, {
  2598. index: 2,
  2599. opacity: 0.97
  2600. }, {
  2601. index: 1,
  2602. opacity: 0.98
  2603. }];
  2604. function m8(t) {
  2605. var e = t.r, n = t.g, r = t.b, i = h2(e, n, r);
  2606. return {
  2607. h: i.h * 360,
  2608. s: i.s,
  2609. v: i.v
  2610. };
  2611. }
  2612. function _y(t) {
  2613. var e = t.r, n = t.g, r = t.b;
  2614. return "#".concat(p2(e, n, r, !1));
  2615. }
  2616. function efe(t, e, n) {
  2617. var r = n / 100, i = {
  2618. r: (e.r - t.r) * r + t.r,
  2619. g: (e.g - t.g) * r + t.g,
  2620. b: (e.b - t.b) * r + t.b
  2621. };
  2622. return i;
  2623. }
  2624. function y8(t, e, n) {
  2625. var r;
  2626. return Math.round(t.h) >= 60 && Math.round(t.h) <= 240 ? r = n ? Math.round(t.h) - by * e : Math.round(t.h) + by * e : r = n ? Math.round(t.h) + by * e : Math.round(t.h) - by * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
  2627. }
  2628. function b8(t, e, n) {
  2629. if (t.h === 0 && t.s === 0)
  2630. return t.s;
  2631. var r;
  2632. return n ? r = t.s - g8 * e : e === Nj ? r = t.s + g8 : r = t.s + Yce * e, r > 1 && (r = 1), n && e === Lj && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Number(r.toFixed(2));
  2633. }
  2634. function _8(t, e, n) {
  2635. var r;
  2636. return n ? r = t.v + qce * e : r = t.v - Kce * e, r > 1 && (r = 1), Number(r.toFixed(2));
  2637. }
  2638. function ff(t) {
  2639. for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], r = Cd(t), i = Lj; i > 0; i -= 1) {
  2640. var a = m8(r), o = _y(Cd({
  2641. h: y8(a, i, !0),
  2642. s: b8(a, i, !0),
  2643. v: _8(a, i, !0)
  2644. }));
  2645. n.push(o);
  2646. }
  2647. n.push(_y(r));
  2648. for (var s = 1; s <= Nj; s += 1) {
  2649. var l = m8(r), u = _y(Cd({
  2650. h: y8(l, s),
  2651. s: b8(l, s),
  2652. v: _8(l, s)
  2653. }));
  2654. n.push(u);
  2655. }
  2656. return e.theme === "dark" ? Jce.map(function(c) {
  2657. var f = c.index, d = c.opacity, h = _y(efe(Cd(e.backgroundColor || "#141414"), Cd(n[f]), d * 100));
  2658. return h;
  2659. }) : n;
  2660. }
  2661. var rC = {
  2662. red: "#F5222D",
  2663. volcano: "#FA541C",
  2664. orange: "#FA8C16",
  2665. gold: "#FAAD14",
  2666. yellow: "#FADB14",
  2667. lime: "#A0D911",
  2668. green: "#52C41A",
  2669. cyan: "#13C2C2",
  2670. blue: "#1890FF",
  2671. geekblue: "#2F54EB",
  2672. purple: "#722ED1",
  2673. magenta: "#EB2F96",
  2674. grey: "#666666"
  2675. }, O_ = {}, iC = {};
  2676. Object.keys(rC).forEach(function(t) {
  2677. O_[t] = ff(rC[t]), O_[t].primary = O_[t][5], iC[t] = ff(rC[t], {
  2678. theme: "dark",
  2679. backgroundColor: "#141414"
  2680. }), iC[t].primary = iC[t][5];
  2681. });
  2682. var tfe = O_.blue;
  2683. const nfe = (t) => {
  2684. const {
  2685. controlHeight: e
  2686. } = t;
  2687. return {
  2688. controlHeightSM: e * 0.75,
  2689. controlHeightXS: e * 0.5,
  2690. controlHeightLG: e * 1.25
  2691. };
  2692. };
  2693. function rfe(t) {
  2694. const {
  2695. sizeUnit: e,
  2696. sizeStep: n
  2697. } = t;
  2698. return {
  2699. sizeXXL: e * (n + 8),
  2700. sizeXL: e * (n + 4),
  2701. sizeLG: e * (n + 2),
  2702. sizeMD: e * (n + 1),
  2703. sizeMS: e * n,
  2704. size: e * n,
  2705. sizeSM: e * (n - 1),
  2706. sizeXS: e * (n - 2),
  2707. sizeXXS: e * (n - 3)
  2708. // 4
  2709. };
  2710. }
  2711. const Bj = {
  2712. blue: "#1677ff",
  2713. purple: "#722ED1",
  2714. cyan: "#13C2C2",
  2715. green: "#52C41A",
  2716. magenta: "#EB2F96",
  2717. pink: "#eb2f96",
  2718. red: "#F5222D",
  2719. orange: "#FA8C16",
  2720. yellow: "#FADB14",
  2721. volcano: "#FA541C",
  2722. geekblue: "#2F54EB",
  2723. gold: "#FAAD14",
  2724. lime: "#A0D911"
  2725. }, zS = I(I({}, Bj), {
  2726. // Color
  2727. colorPrimary: "#1677ff",
  2728. colorSuccess: "#52c41a",
  2729. colorWarning: "#faad14",
  2730. colorError: "#ff4d4f",
  2731. colorInfo: "#1677ff",
  2732. colorTextBase: "",
  2733. colorBgBase: "",
  2734. // Font
  2735. fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
  2736. 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
  2737. 'Noto Color Emoji'`,
  2738. fontSize: 14,
  2739. // Line
  2740. lineWidth: 1,
  2741. lineType: "solid",
  2742. // Motion
  2743. motionUnit: 0.1,
  2744. motionBase: 0,
  2745. motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  2746. motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  2747. motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  2748. motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  2749. motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  2750. motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  2751. motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  2752. motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  2753. // Radius
  2754. borderRadius: 6,
  2755. // Size
  2756. sizeUnit: 4,
  2757. sizeStep: 4,
  2758. sizePopupArrow: 16,
  2759. // Control Base
  2760. controlHeight: 32,
  2761. // zIndex
  2762. zIndexBase: 0,
  2763. zIndexPopupBase: 1e3,
  2764. // Image
  2765. opacityImage: 1,
  2766. // Wireframe
  2767. wireframe: !1
  2768. });
  2769. function ife(t, e) {
  2770. let {
  2771. generateColorPalettes: n,
  2772. generateNeutralColorPalettes: r
  2773. } = e;
  2774. const {
  2775. colorSuccess: i,
  2776. colorWarning: a,
  2777. colorError: o,
  2778. colorInfo: s,
  2779. colorPrimary: l,
  2780. colorBgBase: u,
  2781. colorTextBase: c
  2782. } = t, f = n(l), d = n(i), h = n(a), p = n(o), v = n(s), g = r(u, c);
  2783. return I(I({}, g), {
  2784. colorPrimaryBg: f[1],
  2785. colorPrimaryBgHover: f[2],
  2786. colorPrimaryBorder: f[3],
  2787. colorPrimaryBorderHover: f[4],
  2788. colorPrimaryHover: f[5],
  2789. colorPrimary: f[6],
  2790. colorPrimaryActive: f[7],
  2791. colorPrimaryTextHover: f[8],
  2792. colorPrimaryText: f[9],
  2793. colorPrimaryTextActive: f[10],
  2794. colorSuccessBg: d[1],
  2795. colorSuccessBgHover: d[2],
  2796. colorSuccessBorder: d[3],
  2797. colorSuccessBorderHover: d[4],
  2798. colorSuccessHover: d[4],
  2799. colorSuccess: d[6],
  2800. colorSuccessActive: d[7],
  2801. colorSuccessTextHover: d[8],
  2802. colorSuccessText: d[9],
  2803. colorSuccessTextActive: d[10],
  2804. colorErrorBg: p[1],
  2805. colorErrorBgHover: p[2],
  2806. colorErrorBorder: p[3],
  2807. colorErrorBorderHover: p[4],
  2808. colorErrorHover: p[5],
  2809. colorError: p[6],
  2810. colorErrorActive: p[7],
  2811. colorErrorTextHover: p[8],
  2812. colorErrorText: p[9],
  2813. colorErrorTextActive: p[10],
  2814. colorWarningBg: h[1],
  2815. colorWarningBgHover: h[2],
  2816. colorWarningBorder: h[3],
  2817. colorWarningBorderHover: h[4],
  2818. colorWarningHover: h[4],
  2819. colorWarning: h[6],
  2820. colorWarningActive: h[7],
  2821. colorWarningTextHover: h[8],
  2822. colorWarningText: h[9],
  2823. colorWarningTextActive: h[10],
  2824. colorInfoBg: v[1],
  2825. colorInfoBgHover: v[2],
  2826. colorInfoBorder: v[3],
  2827. colorInfoBorderHover: v[4],
  2828. colorInfoHover: v[4],
  2829. colorInfo: v[6],
  2830. colorInfoActive: v[7],
  2831. colorInfoTextHover: v[8],
  2832. colorInfoText: v[9],
  2833. colorInfoTextActive: v[10],
  2834. colorBgMask: new en("#000").setAlpha(0.45).toRgbString(),
  2835. colorWhite: "#fff"
  2836. });
  2837. }
  2838. const afe = (t) => {
  2839. let e = t, n = t, r = t, i = t;
  2840. return t < 6 && t >= 5 ? e = t + 1 : t < 16 && t >= 6 ? e = t + 2 : t >= 16 && (e = 16), t < 7 && t >= 5 ? n = 4 : t < 8 && t >= 7 ? n = 5 : t < 14 && t >= 8 ? n = 6 : t < 16 && t >= 14 ? n = 7 : t >= 16 && (n = 8), t < 6 && t >= 2 ? r = 1 : t >= 6 && (r = 2), t > 4 && t < 8 ? i = 4 : t >= 8 && (i = 6), {
  2841. borderRadius: t > 16 ? 16 : t,
  2842. borderRadiusXS: r,
  2843. borderRadiusSM: n,
  2844. borderRadiusLG: e,
  2845. borderRadiusOuter: i
  2846. };
  2847. };
  2848. function ofe(t) {
  2849. const {
  2850. motionUnit: e,
  2851. motionBase: n,
  2852. borderRadius: r,
  2853. lineWidth: i
  2854. } = t;
  2855. return I({
  2856. // motion
  2857. motionDurationFast: `${(n + e).toFixed(1)}s`,
  2858. motionDurationMid: `${(n + e * 2).toFixed(1)}s`,
  2859. motionDurationSlow: `${(n + e * 3).toFixed(1)}s`,
  2860. // line
  2861. lineWidthBold: i + 1
  2862. }, afe(r));
  2863. }
  2864. const vs = (t, e) => new en(t).setAlpha(e).toRgbString(), Qp = (t, e) => new en(t).darken(e).toHexString(), sfe = (t) => {
  2865. const e = ff(t);
  2866. return {
  2867. 1: e[0],
  2868. 2: e[1],
  2869. 3: e[2],
  2870. 4: e[3],
  2871. 5: e[4],
  2872. 6: e[5],
  2873. 7: e[6],
  2874. 8: e[4],
  2875. 9: e[5],
  2876. 10: e[6]
  2877. // 8: colors[7],
  2878. // 9: colors[8],
  2879. // 10: colors[9],
  2880. };
  2881. }, lfe = (t, e) => {
  2882. const n = t || "#fff", r = e || "#000";
  2883. return {
  2884. colorBgBase: n,
  2885. colorTextBase: r,
  2886. colorText: vs(r, 0.88),
  2887. colorTextSecondary: vs(r, 0.65),
  2888. colorTextTertiary: vs(r, 0.45),
  2889. colorTextQuaternary: vs(r, 0.25),
  2890. colorFill: vs(r, 0.15),
  2891. colorFillSecondary: vs(r, 0.06),
  2892. colorFillTertiary: vs(r, 0.04),
  2893. colorFillQuaternary: vs(r, 0.02),
  2894. colorBgLayout: Qp(n, 4),
  2895. colorBgContainer: Qp(n, 0),
  2896. colorBgElevated: Qp(n, 0),
  2897. colorBgSpotlight: vs(r, 0.85),
  2898. colorBorder: Qp(n, 15),
  2899. colorBorderSecondary: Qp(n, 6)
  2900. };
  2901. };
  2902. function ufe(t) {
  2903. const e = new Array(10).fill(null).map((n, r) => {
  2904. const i = r - 1, a = t * Math.pow(2.71828, i / 5), o = r > 1 ? Math.floor(a) : Math.ceil(a);
  2905. return Math.floor(o / 2) * 2;
  2906. });
  2907. return e[1] = t, e.map((n) => {
  2908. const r = n + 8;
  2909. return {
  2910. size: n,
  2911. lineHeight: r / n
  2912. };
  2913. });
  2914. }
  2915. const cfe = (t) => {
  2916. const e = ufe(t), n = e.map((i) => i.size), r = e.map((i) => i.lineHeight);
  2917. return {
  2918. fontSizeSM: n[0],
  2919. fontSize: n[1],
  2920. fontSizeLG: n[2],
  2921. fontSizeXL: n[3],
  2922. fontSizeHeading1: n[6],
  2923. fontSizeHeading2: n[5],
  2924. fontSizeHeading3: n[4],
  2925. fontSizeHeading4: n[3],
  2926. fontSizeHeading5: n[2],
  2927. lineHeight: r[1],
  2928. lineHeightLG: r[2],
  2929. lineHeightSM: r[0],
  2930. lineHeightHeading1: r[6],
  2931. lineHeightHeading2: r[5],
  2932. lineHeightHeading3: r[4],
  2933. lineHeightHeading4: r[3],
  2934. lineHeightHeading5: r[2]
  2935. };
  2936. };
  2937. function ffe(t) {
  2938. const e = Object.keys(Bj).map((n) => {
  2939. const r = ff(t[n]);
  2940. return new Array(10).fill(1).reduce((i, a, o) => (i[`${n}-${o + 1}`] = r[o], i), {});
  2941. }).reduce((n, r) => (n = I(I({}, n), r), n), {});
  2942. return I(I(I(I(I(I(I({}, t), e), ife(t, {
  2943. generateColorPalettes: sfe,
  2944. generateNeutralColorPalettes: lfe
  2945. })), cfe(t.fontSize)), rfe(t)), nfe(t)), ofe(t));
  2946. }
  2947. function aC(t) {
  2948. return t >= 0 && t <= 255;
  2949. }
  2950. function Oy(t, e) {
  2951. const {
  2952. r: n,
  2953. g: r,
  2954. b: i,
  2955. a
  2956. } = new en(t).toRgb();
  2957. if (a < 1)
  2958. return t;
  2959. const {
  2960. r: o,
  2961. g: s,
  2962. b: l
  2963. } = new en(e).toRgb();
  2964. for (let u = 0.01; u <= 1; u += 0.01) {
  2965. const c = Math.round((n - o * (1 - u)) / u), f = Math.round((r - s * (1 - u)) / u), d = Math.round((i - l * (1 - u)) / u);
  2966. if (aC(c) && aC(f) && aC(d))
  2967. return new en({
  2968. r: c,
  2969. g: f,
  2970. b: d,
  2971. a: Math.round(u * 100) / 100
  2972. }).toRgbString();
  2973. }
  2974. return new en({
  2975. r: n,
  2976. g: r,
  2977. b: i,
  2978. a: 1
  2979. }).toRgbString();
  2980. }
  2981. var dfe = function(t, e) {
  2982. var n = {};
  2983. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  2984. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  2985. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  2986. return n;
  2987. };
  2988. function hfe(t) {
  2989. const {
  2990. override: e
  2991. } = t, n = dfe(t, ["override"]), r = I({}, e);
  2992. Object.keys(zS).forEach((h) => {
  2993. delete r[h];
  2994. });
  2995. const i = I(I({}, n), r), a = 480, o = 576, s = 768, l = 992, u = 1200, c = 1600, f = 2e3;
  2996. return I(I(I({}, i), {
  2997. colorLink: i.colorInfoText,
  2998. colorLinkHover: i.colorInfoHover,
  2999. colorLinkActive: i.colorInfoActive,
  3000. // ============== Background ============== //
  3001. colorFillContent: i.colorFillSecondary,
  3002. colorFillContentHover: i.colorFill,
  3003. colorFillAlter: i.colorFillQuaternary,
  3004. colorBgContainerDisabled: i.colorFillTertiary,
  3005. // ============== Split ============== //
  3006. colorBorderBg: i.colorBgContainer,
  3007. colorSplit: Oy(i.colorBorderSecondary, i.colorBgContainer),
  3008. // ============== Text ============== //
  3009. colorTextPlaceholder: i.colorTextQuaternary,
  3010. colorTextDisabled: i.colorTextQuaternary,
  3011. colorTextHeading: i.colorText,
  3012. colorTextLabel: i.colorTextSecondary,
  3013. colorTextDescription: i.colorTextTertiary,
  3014. colorTextLightSolid: i.colorWhite,
  3015. colorHighlight: i.colorError,
  3016. colorBgTextHover: i.colorFillSecondary,
  3017. colorBgTextActive: i.colorFill,
  3018. colorIcon: i.colorTextTertiary,
  3019. colorIconHover: i.colorText,
  3020. colorErrorOutline: Oy(i.colorErrorBg, i.colorBgContainer),
  3021. colorWarningOutline: Oy(i.colorWarningBg, i.colorBgContainer),
  3022. // Font
  3023. fontSizeIcon: i.fontSizeSM,
  3024. // Control
  3025. lineWidth: i.lineWidth,
  3026. controlOutlineWidth: i.lineWidth * 2,
  3027. // Checkbox size and expand icon size
  3028. controlInteractiveSize: i.controlHeight / 2,
  3029. controlItemBgHover: i.colorFillTertiary,
  3030. controlItemBgActive: i.colorPrimaryBg,
  3031. controlItemBgActiveHover: i.colorPrimaryBgHover,
  3032. controlItemBgActiveDisabled: i.colorFill,
  3033. controlTmpOutline: i.colorFillQuaternary,
  3034. controlOutline: Oy(i.colorPrimaryBg, i.colorBgContainer),
  3035. lineType: i.lineType,
  3036. borderRadius: i.borderRadius,
  3037. borderRadiusXS: i.borderRadiusXS,
  3038. borderRadiusSM: i.borderRadiusSM,
  3039. borderRadiusLG: i.borderRadiusLG,
  3040. fontWeightStrong: 600,
  3041. opacityLoading: 0.65,
  3042. linkDecoration: "none",
  3043. linkHoverDecoration: "none",
  3044. linkFocusDecoration: "none",
  3045. controlPaddingHorizontal: 12,
  3046. controlPaddingHorizontalSM: 8,
  3047. paddingXXS: i.sizeXXS,
  3048. paddingXS: i.sizeXS,
  3049. paddingSM: i.sizeSM,
  3050. padding: i.size,
  3051. paddingMD: i.sizeMD,
  3052. paddingLG: i.sizeLG,
  3053. paddingXL: i.sizeXL,
  3054. paddingContentHorizontalLG: i.sizeLG,
  3055. paddingContentVerticalLG: i.sizeMS,
  3056. paddingContentHorizontal: i.sizeMS,
  3057. paddingContentVertical: i.sizeSM,
  3058. paddingContentHorizontalSM: i.size,
  3059. paddingContentVerticalSM: i.sizeXS,
  3060. marginXXS: i.sizeXXS,
  3061. marginXS: i.sizeXS,
  3062. marginSM: i.sizeSM,
  3063. margin: i.size,
  3064. marginMD: i.sizeMD,
  3065. marginLG: i.sizeLG,
  3066. marginXL: i.sizeXL,
  3067. marginXXL: i.sizeXXL,
  3068. boxShadow: `
  3069. 0 1px 2px 0 rgba(0, 0, 0, 0.03),
  3070. 0 1px 6px -1px rgba(0, 0, 0, 0.02),
  3071. 0 2px 4px 0 rgba(0, 0, 0, 0.02)
  3072. `,
  3073. boxShadowSecondary: `
  3074. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  3075. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  3076. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  3077. `,
  3078. boxShadowTertiary: `
  3079. 0 1px 2px 0 rgba(0, 0, 0, 0.03),
  3080. 0 1px 6px -1px rgba(0, 0, 0, 0.02),
  3081. 0 2px 4px 0 rgba(0, 0, 0, 0.02)
  3082. `,
  3083. screenXS: a,
  3084. screenXSMin: a,
  3085. screenXSMax: o - 1,
  3086. screenSM: o,
  3087. screenSMMin: o,
  3088. screenSMMax: s - 1,
  3089. screenMD: s,
  3090. screenMDMin: s,
  3091. screenMDMax: l - 1,
  3092. screenLG: l,
  3093. screenLGMin: l,
  3094. screenLGMax: u - 1,
  3095. screenXL: u,
  3096. screenXLMin: u,
  3097. screenXLMax: c - 1,
  3098. screenXXL: c,
  3099. screenXXLMin: c,
  3100. screenXXLMax: f - 1,
  3101. screenXXXL: f,
  3102. screenXXXLMin: f,
  3103. // FIXME: component box-shadow, should be removed
  3104. boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
  3105. boxShadowCard: `
  3106. 0 1px 2px -2px ${new en("rgba(0, 0, 0, 0.16)").toRgbString()},
  3107. 0 3px 6px 0 ${new en("rgba(0, 0, 0, 0.12)").toRgbString()},
  3108. 0 5px 12px 4px ${new en("rgba(0, 0, 0, 0.09)").toRgbString()}
  3109. `,
  3110. boxShadowDrawerRight: `
  3111. -6px 0 16px 0 rgba(0, 0, 0, 0.08),
  3112. -3px 0 6px -4px rgba(0, 0, 0, 0.12),
  3113. -9px 0 28px 8px rgba(0, 0, 0, 0.05)
  3114. `,
  3115. boxShadowDrawerLeft: `
  3116. 6px 0 16px 0 rgba(0, 0, 0, 0.08),
  3117. 3px 0 6px -4px rgba(0, 0, 0, 0.12),
  3118. 9px 0 28px 8px rgba(0, 0, 0, 0.05)
  3119. `,
  3120. boxShadowDrawerUp: `
  3121. 0 6px 16px 0 rgba(0, 0, 0, 0.08),
  3122. 0 3px 6px -4px rgba(0, 0, 0, 0.12),
  3123. 0 9px 28px 8px rgba(0, 0, 0, 0.05)
  3124. `,
  3125. boxShadowDrawerDown: `
  3126. 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
  3127. 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
  3128. 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
  3129. `,
  3130. boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
  3131. boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
  3132. boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
  3133. boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  3134. }), r);
  3135. }
  3136. const pfe = (t, e, n, r, i) => {
  3137. const a = t / 2, o = 0, s = a, l = n * 1 / Math.sqrt(2), u = a - n * (1 - 1 / Math.sqrt(2)), c = a - e * (1 / Math.sqrt(2)), f = n * (Math.sqrt(2) - 1) + e * (1 / Math.sqrt(2)), d = 2 * a - c, h = f, p = 2 * a - l, v = u, g = 2 * a - o, m = s, y = a * Math.sqrt(2) + n * (Math.sqrt(2) - 2), b = n * (Math.sqrt(2) - 1);
  3138. return {
  3139. pointerEvents: "none",
  3140. width: t,
  3141. height: t,
  3142. overflow: "hidden",
  3143. "&::after": {
  3144. content: '""',
  3145. position: "absolute",
  3146. width: y,
  3147. height: y,
  3148. bottom: 0,
  3149. insetInline: 0,
  3150. margin: "auto",
  3151. borderRadius: {
  3152. _skip_check_: !0,
  3153. value: `0 0 ${e}px 0`
  3154. },
  3155. transform: "translateY(50%) rotate(-135deg)",
  3156. boxShadow: i,
  3157. zIndex: 0,
  3158. background: "transparent"
  3159. },
  3160. "&::before": {
  3161. position: "absolute",
  3162. bottom: 0,
  3163. insetInlineStart: 0,
  3164. width: t,
  3165. height: t / 2,
  3166. background: r,
  3167. clipPath: {
  3168. _multi_value_: !0,
  3169. value: [`polygon(${b}px 100%, 50% ${b}px, ${2 * a - b}px 100%, ${b}px 100%)`, `path('M ${o} ${s} A ${n} ${n} 0 0 0 ${l} ${u} L ${c} ${f} A ${e} ${e} 0 0 1 ${d} ${h} L ${p} ${v} A ${n} ${n} 0 0 0 ${g} ${m} Z')`]
  3170. },
  3171. content: '""'
  3172. }
  3173. };
  3174. };
  3175. function vfe(t, e) {
  3176. return b1.reduce((n, r) => {
  3177. const i = t[`${r}-1`], a = t[`${r}-3`], o = t[`${r}-6`], s = t[`${r}-7`];
  3178. return I(I({}, n), e(r, {
  3179. lightColor: i,
  3180. lightBorderColor: a,
  3181. darkColor: o,
  3182. textColor: s
  3183. }));
  3184. }, {});
  3185. }
  3186. const mh = {
  3187. overflow: "hidden",
  3188. whiteSpace: "nowrap",
  3189. textOverflow: "ellipsis"
  3190. }, nn = (t) => ({
  3191. boxSizing: "border-box",
  3192. margin: 0,
  3193. padding: 0,
  3194. color: t.colorText,
  3195. fontSize: t.fontSize,
  3196. // font-variant: @font-variant-base;
  3197. lineHeight: t.lineHeight,
  3198. listStyle: "none",
  3199. // font-feature-settings: @font-feature-settings-base;
  3200. fontFamily: t.fontFamily
  3201. }), ip = () => ({
  3202. display: "inline-flex",
  3203. alignItems: "center",
  3204. color: "inherit",
  3205. fontStyle: "normal",
  3206. lineHeight: 0,
  3207. textAlign: "center",
  3208. textTransform: "none",
  3209. // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  3210. verticalAlign: "-0.125em",
  3211. textRendering: "optimizeLegibility",
  3212. "-webkit-font-smoothing": "antialiased",
  3213. "-moz-osx-font-smoothing": "grayscale",
  3214. "> *": {
  3215. lineHeight: 1
  3216. },
  3217. svg: {
  3218. display: "inline-block"
  3219. }
  3220. }), _1 = () => ({
  3221. // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  3222. "&::before": {
  3223. display: "table",
  3224. content: '""'
  3225. },
  3226. "&::after": {
  3227. // https://github.com/ant-design/ant-design/issues/21864
  3228. display: "table",
  3229. clear: "both",
  3230. content: '""'
  3231. }
  3232. }), gfe = (t) => ({
  3233. a: {
  3234. color: t.colorLink,
  3235. textDecoration: t.linkDecoration,
  3236. backgroundColor: "transparent",
  3237. outline: "none",
  3238. cursor: "pointer",
  3239. transition: `color ${t.motionDurationSlow}`,
  3240. "-webkit-text-decoration-skip": "objects",
  3241. "&:hover": {
  3242. color: t.colorLinkHover
  3243. },
  3244. "&:active": {
  3245. color: t.colorLinkActive
  3246. },
  3247. "&:active,\n &:hover": {
  3248. textDecoration: t.linkHoverDecoration,
  3249. outline: 0
  3250. },
  3251. // https://github.com/ant-design/ant-design/issues/22503
  3252. "&:focus": {
  3253. textDecoration: t.linkFocusDecoration,
  3254. outline: 0
  3255. },
  3256. "&[disabled]": {
  3257. color: t.colorTextDisabled,
  3258. cursor: "not-allowed"
  3259. }
  3260. }
  3261. }), mfe = (t, e) => {
  3262. const {
  3263. fontFamily: n,
  3264. fontSize: r
  3265. } = t, i = `[class^="${e}"], [class*=" ${e}"]`;
  3266. return {
  3267. [i]: {
  3268. fontFamily: n,
  3269. fontSize: r,
  3270. boxSizing: "border-box",
  3271. "&::before, &::after": {
  3272. boxSizing: "border-box"
  3273. },
  3274. [i]: {
  3275. boxSizing: "border-box",
  3276. "&::before, &::after": {
  3277. boxSizing: "border-box"
  3278. }
  3279. }
  3280. }
  3281. };
  3282. }, d0 = (t) => ({
  3283. outline: `${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,
  3284. outlineOffset: 1,
  3285. transition: "outline-offset 0s, outline 0s"
  3286. }), VS = (t) => ({
  3287. "&:focus-visible": I({}, d0(t))
  3288. });
  3289. function Sn(t, e, n) {
  3290. return (r) => {
  3291. const i = L(() => r == null ? void 0 : r.value), [a, o, s] = ap(), {
  3292. getPrefixCls: l,
  3293. iconPrefixCls: u
  3294. } = DS(), c = L(() => l()), f = L(() => ({
  3295. theme: a.value,
  3296. token: o.value,
  3297. hashId: s.value,
  3298. path: ["Shared", c.value]
  3299. }));
  3300. d2(f, () => [{
  3301. // Link
  3302. "&": gfe(o.value)
  3303. }]);
  3304. const d = L(() => ({
  3305. theme: a.value,
  3306. token: o.value,
  3307. hashId: s.value,
  3308. path: [t, i.value, u.value]
  3309. }));
  3310. return [d2(d, () => {
  3311. const {
  3312. token: h,
  3313. flush: p
  3314. } = bfe(o.value), v = typeof n == "function" ? n(h) : n, g = I(I({}, v), o.value[t]), m = `.${i.value}`, y = Bt(h, {
  3315. componentCls: m,
  3316. prefixCls: i.value,
  3317. iconCls: `.${u.value}`,
  3318. antCls: `.${c.value}`
  3319. }, g), b = e(y, {
  3320. hashId: s.value,
  3321. prefixCls: i.value,
  3322. rootPrefixCls: c.value,
  3323. iconPrefixCls: u.value,
  3324. overrideComponentToken: o.value[t]
  3325. });
  3326. return p(t, g), [mfe(o.value, i.value), b];
  3327. }), s];
  3328. };
  3329. }
  3330. const zj = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
  3331. let g2 = !0;
  3332. function Bt() {
  3333. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  3334. e[n] = arguments[n];
  3335. if (!zj)
  3336. return I({}, ...e);
  3337. g2 = !1;
  3338. const r = {};
  3339. return e.forEach((i) => {
  3340. Object.keys(i).forEach((o) => {
  3341. Object.defineProperty(r, o, {
  3342. configurable: !0,
  3343. enumerable: !0,
  3344. get: () => i[o]
  3345. });
  3346. });
  3347. }), g2 = !0, r;
  3348. }
  3349. function yfe() {
  3350. }
  3351. function bfe(t) {
  3352. let e, n = t, r = yfe;
  3353. return zj && (e = /* @__PURE__ */ new Set(), n = new Proxy(t, {
  3354. get(i, a) {
  3355. return g2 && e.add(a), i[a];
  3356. }
  3357. }), r = (i, a) => {
  3358. Array.from(e);
  3359. }), {
  3360. token: n,
  3361. keys: e,
  3362. flush: r
  3363. };
  3364. }
  3365. const _fe = xj(ffe), Vj = {
  3366. token: zS,
  3367. hashed: !0
  3368. }, Fj = Symbol("DesignTokenContext"), m2 = ae(), Ofe = (t) => {
  3369. pt(Fj, t), se(t, () => {
  3370. m2.value = B(t), zle(m2);
  3371. }, {
  3372. immediate: !0,
  3373. deep: !0
  3374. });
  3375. }, Sfe = te({
  3376. props: {
  3377. value: $t()
  3378. },
  3379. setup(t, e) {
  3380. let {
  3381. slots: n
  3382. } = e;
  3383. return Ofe(L(() => t.value)), () => {
  3384. var r;
  3385. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  3386. };
  3387. }
  3388. });
  3389. function ap() {
  3390. const t = Ge(Fj, L(() => m2.value || Vj)), e = L(() => `${Bce}-${t.value.hashed || ""}`), n = L(() => t.value.theme || _fe), r = fce(n, L(() => [zS, t.value.token]), L(() => ({
  3391. salt: e.value,
  3392. override: I({
  3393. override: t.value.token
  3394. }, t.value.components),
  3395. formatToken: hfe
  3396. })));
  3397. return [n, L(() => r.value[0]), L(() => t.value.hashed ? r.value[1] : "")];
  3398. }
  3399. const Wj = te({
  3400. compatConfig: {
  3401. MODE: 3
  3402. },
  3403. setup() {
  3404. const [, t] = ap(), e = L(() => new en(t.value.colorBgBase).toHsl().l < 0.5 ? {
  3405. opacity: 0.65
  3406. } : {});
  3407. return () => M("svg", {
  3408. style: e.value,
  3409. width: "184",
  3410. height: "152",
  3411. viewBox: "0 0 184 152",
  3412. xmlns: "http://www.w3.org/2000/svg"
  3413. }, [M("g", {
  3414. fill: "none",
  3415. "fill-rule": "evenodd"
  3416. }, [M("g", {
  3417. transform: "translate(24 31.67)"
  3418. }, [M("ellipse", {
  3419. "fill-opacity": ".8",
  3420. fill: "#F5F5F7",
  3421. cx: "67.797",
  3422. cy: "106.89",
  3423. rx: "67.797",
  3424. ry: "12.668"
  3425. }, null), M("path", {
  3426. d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
  3427. fill: "#AEB8C2"
  3428. }, null), M("path", {
  3429. d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
  3430. fill: "url(#linearGradient-1)",
  3431. transform: "translate(13.56)"
  3432. }, null), M("path", {
  3433. d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
  3434. fill: "#F5F5F7"
  3435. }, null), M("path", {
  3436. d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
  3437. fill: "#DCE0E6"
  3438. }, null)]), M("path", {
  3439. d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
  3440. fill: "#DCE0E6"
  3441. }, null), M("g", {
  3442. transform: "translate(149.65 15.383)",
  3443. fill: "#FFF"
  3444. }, [M("ellipse", {
  3445. cx: "20.654",
  3446. cy: "3.167",
  3447. rx: "2.849",
  3448. ry: "2.815"
  3449. }, null), M("path", {
  3450. d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
  3451. }, null)])])]);
  3452. }
  3453. });
  3454. Wj.PRESENTED_IMAGE_DEFAULT = !0;
  3455. const Qj = te({
  3456. compatConfig: {
  3457. MODE: 3
  3458. },
  3459. setup() {
  3460. const [, t] = ap(), e = L(() => {
  3461. const {
  3462. colorFill: n,
  3463. colorFillTertiary: r,
  3464. colorFillQuaternary: i,
  3465. colorBgContainer: a
  3466. } = t.value;
  3467. return {
  3468. borderColor: new en(n).onBackground(a).toHexString(),
  3469. shadowColor: new en(r).onBackground(a).toHexString(),
  3470. contentColor: new en(i).onBackground(a).toHexString()
  3471. };
  3472. });
  3473. return () => M("svg", {
  3474. width: "64",
  3475. height: "41",
  3476. viewBox: "0 0 64 41",
  3477. xmlns: "http://www.w3.org/2000/svg"
  3478. }, [M("g", {
  3479. transform: "translate(0 1)",
  3480. fill: "none",
  3481. "fill-rule": "evenodd"
  3482. }, [M("ellipse", {
  3483. fill: e.value.shadowColor,
  3484. cx: "32",
  3485. cy: "33",
  3486. rx: "32",
  3487. ry: "7"
  3488. }, null), M("g", {
  3489. "fill-rule": "nonzero",
  3490. stroke: e.value.borderColor
  3491. }, [M("path", {
  3492. d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
  3493. }, null), M("path", {
  3494. d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
  3495. fill: e.value.contentColor
  3496. }, null)])])]);
  3497. }
  3498. });
  3499. Qj.PRESENTED_IMAGE_SIMPLE = !0;
  3500. const xfe = (t) => {
  3501. const {
  3502. componentCls: e,
  3503. margin: n,
  3504. marginXS: r,
  3505. marginXL: i,
  3506. fontSize: a,
  3507. lineHeight: o
  3508. } = t;
  3509. return {
  3510. [e]: {
  3511. marginInline: r,
  3512. fontSize: a,
  3513. lineHeight: o,
  3514. textAlign: "center",
  3515. // 原来 &-image 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
  3516. [`${e}-image`]: {
  3517. height: t.emptyImgHeight,
  3518. marginBottom: r,
  3519. opacity: t.opacityImage,
  3520. img: {
  3521. height: "100%"
  3522. },
  3523. svg: {
  3524. height: "100%",
  3525. margin: "auto"
  3526. }
  3527. },
  3528. // 原来 &-footer 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
  3529. [`${e}-footer`]: {
  3530. marginTop: n
  3531. },
  3532. "&-normal": {
  3533. marginBlock: i,
  3534. color: t.colorTextDisabled,
  3535. [`${e}-image`]: {
  3536. height: t.emptyImgHeightMD
  3537. }
  3538. },
  3539. "&-small": {
  3540. marginBlock: r,
  3541. color: t.colorTextDisabled,
  3542. [`${e}-image`]: {
  3543. height: t.emptyImgHeightSM
  3544. }
  3545. }
  3546. }
  3547. };
  3548. }, wfe = Sn("Empty", (t) => {
  3549. const {
  3550. componentCls: e,
  3551. controlHeightLG: n
  3552. } = t, r = Bt(t, {
  3553. emptyImgCls: `${e}-img`,
  3554. emptyImgHeight: n * 2.5,
  3555. emptyImgHeightMD: n,
  3556. emptyImgHeightSM: n * 0.875
  3557. });
  3558. return [xfe(r)];
  3559. });
  3560. var Cfe = function(t, e) {
  3561. var n = {};
  3562. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  3563. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  3564. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  3565. return n;
  3566. };
  3567. const Hj = M(Wj, null, null), Gj = M(Qj, null, null), Tfe = () => ({
  3568. prefixCls: String,
  3569. imageStyle: $t(),
  3570. image: fa(),
  3571. description: fa()
  3572. }), uI = te({
  3573. name: "AEmpty",
  3574. compatConfig: {
  3575. MODE: 3
  3576. },
  3577. inheritAttrs: !1,
  3578. props: Tfe(),
  3579. setup(t, e) {
  3580. let {
  3581. slots: n = {},
  3582. attrs: r
  3583. } = e;
  3584. const {
  3585. direction: i,
  3586. prefixCls: a
  3587. } = It("empty", t), [o, s] = wfe(a);
  3588. return () => {
  3589. var l, u;
  3590. const c = a.value, f = I(I({}, t), r), {
  3591. image: d = ((l = n.image) === null || l === void 0 ? void 0 : l.call(n)) || Hj,
  3592. description: h = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
  3593. imageStyle: p,
  3594. class: v = ""
  3595. } = f, g = Cfe(f, ["image", "description", "imageStyle", "class"]);
  3596. return o(M(dj, {
  3597. componentName: "Empty",
  3598. children: (m) => {
  3599. const y = typeof h < "u" ? h : m.description, b = typeof y == "string" ? y : "empty";
  3600. let _ = null;
  3601. return typeof d == "string" ? _ = M("img", {
  3602. alt: b,
  3603. src: d
  3604. }, null) : _ = d, M("div", j({
  3605. class: ye(c, v, s.value, {
  3606. [`${c}-normal`]: d === Gj,
  3607. [`${c}-rtl`]: i.value === "rtl"
  3608. })
  3609. }, g), [M("div", {
  3610. class: `${c}-image`,
  3611. style: p
  3612. }, [_]), y && M("p", {
  3613. class: `${c}-description`
  3614. }, [y]), n.default && M("div", {
  3615. class: `${c}-footer`
  3616. }, [os(n.default())])]);
  3617. }
  3618. }, null));
  3619. };
  3620. }
  3621. });
  3622. uI.PRESENTED_IMAGE_DEFAULT = Hj;
  3623. uI.PRESENTED_IMAGE_SIMPLE = Gj;
  3624. const Hp = np(uI), cI = (t) => {
  3625. const {
  3626. prefixCls: e
  3627. } = It("empty", t);
  3628. return ((r) => {
  3629. switch (r) {
  3630. case "Table":
  3631. case "List":
  3632. return M(Hp, {
  3633. image: Hp.PRESENTED_IMAGE_SIMPLE
  3634. }, null);
  3635. case "Select":
  3636. case "TreeSelect":
  3637. case "Cascader":
  3638. case "Transfer":
  3639. case "Mentions":
  3640. return M(Hp, {
  3641. image: Hp.PRESENTED_IMAGE_SIMPLE,
  3642. class: `${e.value}-small`
  3643. }, null);
  3644. default:
  3645. return M(Hp, null, null);
  3646. }
  3647. })(t.componentName);
  3648. };
  3649. function Pfe(t) {
  3650. return M(cI, {
  3651. componentName: t
  3652. }, null);
  3653. }
  3654. const jj = Symbol("SizeContextKey"), Zj = () => Ge(jj, U(void 0)), Uj = (t) => {
  3655. const e = Zj();
  3656. return pt(jj, L(() => t.value || e.value)), t;
  3657. }, It = (t, e) => {
  3658. const n = Zj(), r = Ko(), i = Ge(aI, I(I({}, lj), {
  3659. renderEmpty: (x) => jg(cI, {
  3660. componentName: x
  3661. })
  3662. })), a = L(() => i.getPrefixCls(t, e.prefixCls)), o = L(() => {
  3663. var x, C;
  3664. return (x = e.direction) !== null && x !== void 0 ? x : (C = i.direction) === null || C === void 0 ? void 0 : C.value;
  3665. }), s = L(() => {
  3666. var x;
  3667. return (x = e.iconPrefixCls) !== null && x !== void 0 ? x : i.iconPrefixCls.value;
  3668. }), l = L(() => i.getPrefixCls()), u = L(() => {
  3669. var x;
  3670. return (x = i.autoInsertSpaceInButton) === null || x === void 0 ? void 0 : x.value;
  3671. }), c = i.renderEmpty, f = i.space, d = i.pageHeader, h = i.form, p = L(() => {
  3672. var x, C;
  3673. return (x = e.getTargetContainer) !== null && x !== void 0 ? x : (C = i.getTargetContainer) === null || C === void 0 ? void 0 : C.value;
  3674. }), v = L(() => {
  3675. var x, C, T;
  3676. return (C = (x = e.getContainer) !== null && x !== void 0 ? x : e.getPopupContainer) !== null && C !== void 0 ? C : (T = i.getPopupContainer) === null || T === void 0 ? void 0 : T.value;
  3677. }), g = L(() => {
  3678. var x, C;
  3679. return (x = e.dropdownMatchSelectWidth) !== null && x !== void 0 ? x : (C = i.dropdownMatchSelectWidth) === null || C === void 0 ? void 0 : C.value;
  3680. }), m = L(() => {
  3681. var x;
  3682. return (e.virtual === void 0 ? ((x = i.virtual) === null || x === void 0 ? void 0 : x.value) !== !1 : e.virtual !== !1) && g.value !== !1;
  3683. }), y = L(() => e.size || n.value), b = L(() => {
  3684. var x, C, T;
  3685. return (x = e.autocomplete) !== null && x !== void 0 ? x : (T = (C = i.input) === null || C === void 0 ? void 0 : C.value) === null || T === void 0 ? void 0 : T.autocomplete;
  3686. }), _ = L(() => {
  3687. var x;
  3688. return (x = e.disabled) !== null && x !== void 0 ? x : r.value;
  3689. }), O = L(() => {
  3690. var x;
  3691. return (x = e.csp) !== null && x !== void 0 ? x : i.csp;
  3692. }), S = L(() => {
  3693. var x, C;
  3694. return (x = e.wave) !== null && x !== void 0 ? x : (C = i.wave) === null || C === void 0 ? void 0 : C.value;
  3695. });
  3696. return {
  3697. configProvider: i,
  3698. prefixCls: a,
  3699. direction: o,
  3700. size: y,
  3701. getTargetContainer: p,
  3702. getPopupContainer: v,
  3703. space: f,
  3704. pageHeader: d,
  3705. form: h,
  3706. autoInsertSpaceInButton: u,
  3707. renderEmpty: c,
  3708. virtual: m,
  3709. dropdownMatchSelectWidth: g,
  3710. rootPrefixCls: l,
  3711. getPrefixCls: i.getPrefixCls,
  3712. autocomplete: b,
  3713. csp: O,
  3714. iconPrefixCls: s,
  3715. disabled: _,
  3716. select: i.select,
  3717. wave: S
  3718. };
  3719. };
  3720. function or(t, e) {
  3721. const n = I({}, t);
  3722. for (let r = 0; r < e.length; r += 1) {
  3723. const i = e[r];
  3724. delete n[i];
  3725. }
  3726. return n;
  3727. }
  3728. function O8(t) {
  3729. return typeof t == "object" && t != null && t.nodeType === 1;
  3730. }
  3731. function S8(t, e) {
  3732. return (!e || t !== "hidden") && t !== "visible" && t !== "clip";
  3733. }
  3734. function oC(t, e) {
  3735. if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
  3736. var n = getComputedStyle(t, null);
  3737. return S8(n.overflowY, e) || S8(n.overflowX, e) || function(r) {
  3738. var i = function(a) {
  3739. if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
  3740. try {
  3741. return a.ownerDocument.defaultView.frameElement;
  3742. } catch {
  3743. return null;
  3744. }
  3745. }(r);
  3746. return !!i && (i.clientHeight < r.scrollHeight || i.clientWidth < r.scrollWidth);
  3747. }(t);
  3748. }
  3749. return !1;
  3750. }
  3751. function Sy(t, e, n, r, i, a, o, s) {
  3752. return a < t && o > e || a > t && o < e ? 0 : a <= t && s <= n || o >= e && s >= n ? a - t - r : o > e && s < n || a < t && s > n ? o - e + i : 0;
  3753. }
  3754. var x8 = function(t, e) {
  3755. var n = window, r = e.scrollMode, i = e.block, a = e.inline, o = e.boundary, s = e.skipOverflowHiddenElements, l = typeof o == "function" ? o : function(de) {
  3756. return de !== o;
  3757. };
  3758. if (!O8(t)) throw new TypeError("Invalid target");
  3759. for (var u, c, f = document.scrollingElement || document.documentElement, d = [], h = t; O8(h) && l(h); ) {
  3760. if ((h = (c = (u = h).parentElement) == null ? u.getRootNode().host || null : c) === f) {
  3761. d.push(h);
  3762. break;
  3763. }
  3764. h != null && h === document.body && oC(h) && !oC(document.documentElement) || h != null && oC(h, s) && d.push(h);
  3765. }
  3766. for (var p = n.visualViewport ? n.visualViewport.width : innerWidth, v = n.visualViewport ? n.visualViewport.height : innerHeight, g = window.scrollX || pageXOffset, m = window.scrollY || pageYOffset, y = t.getBoundingClientRect(), b = y.height, _ = y.width, O = y.top, S = y.right, x = y.bottom, C = y.left, T = i === "start" || i === "nearest" ? O : i === "end" ? x : O + b / 2, w = a === "center" ? C + _ / 2 : a === "end" ? S : C, P = [], $ = 0; $ < d.length; $++) {
  3767. var A = d[$], D = A.getBoundingClientRect(), E = D.height, R = D.width, N = D.top, V = D.right, z = D.bottom, W = D.left;
  3768. if (r === "if-needed" && O >= 0 && C >= 0 && x <= v && S <= p && O >= N && x <= z && C >= W && S <= V) return P;
  3769. var F = getComputedStyle(A), Q = parseInt(F.borderLeftWidth, 10), Z = parseInt(F.borderTopWidth, 10), ne = parseInt(F.borderRightWidth, 10), ee = parseInt(F.borderBottomWidth, 10), oe = 0, K = 0, ie = "offsetWidth" in A ? A.offsetWidth - A.clientWidth - Q - ne : 0, X = "offsetHeight" in A ? A.offsetHeight - A.clientHeight - Z - ee : 0, H = "offsetWidth" in A ? A.offsetWidth === 0 ? 0 : R / A.offsetWidth : 0, G = "offsetHeight" in A ? A.offsetHeight === 0 ? 0 : E / A.offsetHeight : 0;
  3770. if (f === A) oe = i === "start" ? T : i === "end" ? T - v : i === "nearest" ? Sy(m, m + v, v, Z, ee, m + T, m + T + b, b) : T - v / 2, K = a === "start" ? w : a === "center" ? w - p / 2 : a === "end" ? w - p : Sy(g, g + p, p, Q, ne, g + w, g + w + _, _), oe = Math.max(0, oe + m), K = Math.max(0, K + g);
  3771. else {
  3772. oe = i === "start" ? T - N - Z : i === "end" ? T - z + ee + X : i === "nearest" ? Sy(N, z, E, Z, ee + X, T, T + b, b) : T - (N + E / 2) + X / 2, K = a === "start" ? w - W - Q : a === "center" ? w - (W + R / 2) + ie / 2 : a === "end" ? w - V + ne + ie : Sy(W, V, R, Q, ne + ie, w, w + _, _);
  3773. var re = A.scrollLeft, fe = A.scrollTop;
  3774. T += fe - (oe = Math.max(0, Math.min(fe + oe / G, A.scrollHeight - E / G + X))), w += re - (K = Math.max(0, Math.min(re + K / H, A.scrollWidth - R / H + ie)));
  3775. }
  3776. P.push({ el: A, top: oe, left: K });
  3777. }
  3778. return P;
  3779. };
  3780. function Xj(t) {
  3781. return t === Object(t) && Object.keys(t).length !== 0;
  3782. }
  3783. function $fe(t, e) {
  3784. e === void 0 && (e = "auto");
  3785. var n = "scrollBehavior" in document.body.style;
  3786. t.forEach(function(r) {
  3787. var i = r.el, a = r.top, o = r.left;
  3788. i.scroll && n ? i.scroll({
  3789. top: a,
  3790. left: o,
  3791. behavior: e
  3792. }) : (i.scrollTop = a, i.scrollLeft = o);
  3793. });
  3794. }
  3795. function Afe(t) {
  3796. return t === !1 ? {
  3797. block: "end",
  3798. inline: "nearest"
  3799. } : Xj(t) ? t : {
  3800. block: "start",
  3801. inline: "nearest"
  3802. };
  3803. }
  3804. function Efe(t, e) {
  3805. var n = t.isConnected || t.ownerDocument.documentElement.contains(t);
  3806. if (Xj(e) && typeof e.behavior == "function")
  3807. return e.behavior(n ? x8(t, e) : []);
  3808. if (n) {
  3809. var r = Afe(e);
  3810. return $fe(x8(t, r), r.behavior);
  3811. }
  3812. }
  3813. function Mfe(t, e) {
  3814. for (var n = 0; n < e.length; n++) {
  3815. var r = e[n];
  3816. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
  3817. }
  3818. }
  3819. function Yj(t, e, n) {
  3820. return n && Mfe(t, n), t;
  3821. }
  3822. function S_() {
  3823. return (S_ = Object.assign || function(t) {
  3824. for (var e = 1; e < arguments.length; e++) {
  3825. var n = arguments[e];
  3826. for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
  3827. }
  3828. return t;
  3829. }).apply(this, arguments);
  3830. }
  3831. function qj(t, e) {
  3832. t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
  3833. }
  3834. function Kj(t, e) {
  3835. if (t == null) return {};
  3836. var n, r, i = {}, a = Object.keys(t);
  3837. for (r = 0; r < a.length; r++) e.indexOf(n = a[r]) >= 0 || (i[n] = t[n]);
  3838. return i;
  3839. }
  3840. function w8(t) {
  3841. return ((e = t) != null && typeof e == "object" && Array.isArray(e) === !1) == 1 && Object.prototype.toString.call(t) === "[object Object]";
  3842. var e;
  3843. }
  3844. var Jj = Object.prototype, eZ = Jj.toString, Ife = Jj.hasOwnProperty, tZ = /^\s*function (\w+)/;
  3845. function C8(t) {
  3846. var e, n = (e = t == null ? void 0 : t.type) !== null && e !== void 0 ? e : t;
  3847. if (n) {
  3848. var r = n.toString().match(tZ);
  3849. return r ? r[1] : "";
  3850. }
  3851. return "";
  3852. }
  3853. var df = function(t) {
  3854. var e, n;
  3855. return w8(t) !== !1 && typeof (e = t.constructor) == "function" && w8(n = e.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
  3856. }, nZ = function(t) {
  3857. return t;
  3858. }, Rr = nZ;
  3859. if (process.env.NODE_ENV !== "production") {
  3860. var Dfe = typeof console < "u";
  3861. Rr = Dfe ? function(t) {
  3862. console.warn("[VueTypes warn]: " + t);
  3863. } : nZ;
  3864. }
  3865. var Jg = function(t, e) {
  3866. return Ife.call(t, e);
  3867. }, Rfe = Number.isInteger || function(t) {
  3868. return typeof t == "number" && isFinite(t) && Math.floor(t) === t;
  3869. }, yh = Array.isArray || function(t) {
  3870. return eZ.call(t) === "[object Array]";
  3871. }, bh = function(t) {
  3872. return eZ.call(t) === "[object Function]";
  3873. }, O1 = function(t) {
  3874. return df(t) && Jg(t, "_vueTypes_name");
  3875. }, rZ = function(t) {
  3876. return df(t) && (Jg(t, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(e) {
  3877. return Jg(t, e);
  3878. }));
  3879. };
  3880. function fI(t, e) {
  3881. return Object.defineProperty(t.bind(e), "__original", { value: t });
  3882. }
  3883. function Af(t, e, n) {
  3884. var r;
  3885. n === void 0 && (n = !1);
  3886. var i = !0, a = "";
  3887. r = df(t) ? t : { type: t };
  3888. var o = O1(r) ? r._vueTypes_name + " - " : "";
  3889. if (rZ(r) && r.type !== null) {
  3890. if (r.type === void 0 || r.type === !0 || !r.required && e === void 0) return i;
  3891. yh(r.type) ? (i = r.type.some(function(f) {
  3892. return Af(f, e, !0) === !0;
  3893. }), a = r.type.map(function(f) {
  3894. return C8(f);
  3895. }).join(" or ")) : i = (a = C8(r)) === "Array" ? yh(e) : a === "Object" ? df(e) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(f) {
  3896. if (f == null) return "";
  3897. var d = f.constructor.toString().match(tZ);
  3898. return d ? d[1] : "";
  3899. }(e) === a : e instanceof r.type;
  3900. }
  3901. if (!i) {
  3902. var s = o + 'value "' + e + '" should be of type "' + a + '"';
  3903. return n === !1 ? (Rr(s), !1) : s;
  3904. }
  3905. if (Jg(r, "validator") && bh(r.validator)) {
  3906. var l = Rr, u = [];
  3907. if (Rr = function(f) {
  3908. u.push(f);
  3909. }, i = r.validator(e), Rr = l, !i) {
  3910. var c = (u.length > 1 ? "* " : "") + u.join(`
  3911. * `);
  3912. return u.length = 0, n === !1 ? (Rr(c), i) : c;
  3913. }
  3914. }
  3915. return i;
  3916. }
  3917. function Xi(t, e) {
  3918. var n = Object.defineProperties(e, { _vueTypes_name: { value: t, writable: !0 }, isRequired: { get: function() {
  3919. return this.required = !0, this;
  3920. } }, def: { value: function(i) {
  3921. return i !== void 0 || this.default ? bh(i) || Af(this, i, !0) === !0 ? (this.default = yh(i) ? function() {
  3922. return [].concat(i);
  3923. } : df(i) ? function() {
  3924. return Object.assign({}, i);
  3925. } : i, this) : (Rr(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  3926. } } }), r = n.validator;
  3927. return bh(r) && (n.validator = fI(r, n)), n;
  3928. }
  3929. function Jo(t, e) {
  3930. var n = Xi(t, e);
  3931. return Object.defineProperty(n, "validate", { value: function(r) {
  3932. return bh(this.validator) && Rr(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
  3933. ` + JSON.stringify(this)), this.validator = fI(r, this), this;
  3934. } });
  3935. }
  3936. function T8(t, e, n) {
  3937. var r, i, a = (r = e, i = {}, Object.getOwnPropertyNames(r).forEach(function(f) {
  3938. i[f] = Object.getOwnPropertyDescriptor(r, f);
  3939. }), Object.defineProperties({}, i));
  3940. if (a._vueTypes_name = t, !df(n)) return a;
  3941. var o, s, l = n.validator, u = Kj(n, ["validator"]);
  3942. if (bh(l)) {
  3943. var c = a.validator;
  3944. c && (c = (s = (o = c).__original) !== null && s !== void 0 ? s : o), a.validator = fI(c ? function(f) {
  3945. return c.call(this, f) && l.call(this, f);
  3946. } : l, a);
  3947. }
  3948. return Object.assign(a, u);
  3949. }
  3950. function FS(t) {
  3951. return t.replace(/^(?!\s*$)/gm, " ");
  3952. }
  3953. var kfe = function() {
  3954. return Jo("any", {});
  3955. }, Lfe = function() {
  3956. return Jo("function", { type: Function });
  3957. }, Nfe = function() {
  3958. return Jo("boolean", { type: Boolean });
  3959. }, Bfe = function() {
  3960. return Jo("string", { type: String });
  3961. }, zfe = function() {
  3962. return Jo("number", { type: Number });
  3963. }, Vfe = function() {
  3964. return Jo("array", { type: Array });
  3965. }, Ffe = function() {
  3966. return Jo("object", { type: Object });
  3967. }, Wfe = function() {
  3968. return Xi("integer", { type: Number, validator: function(t) {
  3969. return Rfe(t);
  3970. } });
  3971. }, Qfe = function() {
  3972. return Xi("symbol", { validator: function(t) {
  3973. return typeof t == "symbol";
  3974. } });
  3975. };
  3976. function Hfe(t, e) {
  3977. if (e === void 0 && (e = "custom validation failed"), typeof t != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  3978. return Xi(t.name || "<<anonymous function>>", { validator: function(n) {
  3979. var r = t(n);
  3980. return r || Rr(this._vueTypes_name + " - " + e), r;
  3981. } });
  3982. }
  3983. function Gfe(t) {
  3984. if (!yh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  3985. var e = 'oneOf - value should be one of "' + t.join('", "') + '".', n = t.reduce(function(r, i) {
  3986. if (i != null) {
  3987. var a = i.constructor;
  3988. r.indexOf(a) === -1 && r.push(a);
  3989. }
  3990. return r;
  3991. }, []);
  3992. return Xi("oneOf", { type: n.length > 0 ? n : void 0, validator: function(r) {
  3993. var i = t.indexOf(r) !== -1;
  3994. return i || Rr(e), i;
  3995. } });
  3996. }
  3997. function jfe(t) {
  3998. if (!yh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  3999. for (var e = !1, n = [], r = 0; r < t.length; r += 1) {
  4000. var i = t[r];
  4001. if (rZ(i)) {
  4002. if (O1(i) && i._vueTypes_name === "oneOf") {
  4003. n = n.concat(i.type);
  4004. continue;
  4005. }
  4006. if (bh(i.validator) && (e = !0), i.type !== !0 && i.type) {
  4007. n = n.concat(i.type);
  4008. continue;
  4009. }
  4010. }
  4011. n.push(i);
  4012. }
  4013. return n = n.filter(function(a, o) {
  4014. return n.indexOf(a) === o;
  4015. }), Xi("oneOfType", e ? { type: n, validator: function(a) {
  4016. var o = [], s = t.some(function(l) {
  4017. var u = Af(O1(l) && l._vueTypes_name === "oneOf" ? l.type || null : l, a, !0);
  4018. return typeof u == "string" && o.push(u), u === !0;
  4019. });
  4020. return s || Rr("oneOfType - provided value does not match any of the " + o.length + ` passed-in validators:
  4021. ` + FS(o.join(`
  4022. `))), s;
  4023. } } : { type: n });
  4024. }
  4025. function Zfe(t) {
  4026. return Xi("arrayOf", { type: Array, validator: function(e) {
  4027. var n, r = e.every(function(i) {
  4028. return (n = Af(t, i, !0)) === !0;
  4029. });
  4030. return r || Rr(`arrayOf - value validation error:
  4031. ` + FS(n)), r;
  4032. } });
  4033. }
  4034. function Ufe(t) {
  4035. return Xi("instanceOf", { type: t });
  4036. }
  4037. function Xfe(t) {
  4038. return Xi("objectOf", { type: Object, validator: function(e) {
  4039. var n, r = Object.keys(e).every(function(i) {
  4040. return (n = Af(t, e[i], !0)) === !0;
  4041. });
  4042. return r || Rr(`objectOf - value validation error:
  4043. ` + FS(n)), r;
  4044. } });
  4045. }
  4046. function Yfe(t) {
  4047. var e = Object.keys(t), n = e.filter(function(i) {
  4048. var a;
  4049. return !!(!((a = t[i]) === null || a === void 0) && a.required);
  4050. }), r = Xi("shape", { type: Object, validator: function(i) {
  4051. var a = this;
  4052. if (!df(i)) return !1;
  4053. var o = Object.keys(i);
  4054. if (n.length > 0 && n.some(function(l) {
  4055. return o.indexOf(l) === -1;
  4056. })) {
  4057. var s = n.filter(function(l) {
  4058. return o.indexOf(l) === -1;
  4059. });
  4060. return Rr(s.length === 1 ? 'shape - required property "' + s[0] + '" is not defined.' : 'shape - required properties "' + s.join('", "') + '" are not defined.'), !1;
  4061. }
  4062. return o.every(function(l) {
  4063. if (e.indexOf(l) === -1) return a._vueTypes_isLoose === !0 || (Rr('shape - shape definition does not include a "' + l + '" property. Allowed keys: "' + e.join('", "') + '".'), !1);
  4064. var u = Af(t[l], i[l], !0);
  4065. return typeof u == "string" && Rr('shape - "' + l + `" property validation error:
  4066. ` + FS(u)), u === !0;
  4067. });
  4068. } });
  4069. return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get: function() {
  4070. return this._vueTypes_isLoose = !0, this;
  4071. } }), r;
  4072. }
  4073. var Po = function() {
  4074. function t() {
  4075. }
  4076. return t.extend = function(e) {
  4077. var n = this;
  4078. if (yh(e)) return e.forEach(function(f) {
  4079. return n.extend(f);
  4080. }), this;
  4081. var r = e.name, i = e.validate, a = i !== void 0 && i, o = e.getter, s = o !== void 0 && o, l = Kj(e, ["name", "validate", "getter"]);
  4082. if (Jg(this, r)) throw new TypeError('[VueTypes error]: Type "' + r + '" already defined');
  4083. var u, c = l.type;
  4084. return O1(c) ? (delete l.type, Object.defineProperty(this, r, s ? { get: function() {
  4085. return T8(r, c, l);
  4086. } } : { value: function() {
  4087. var f, d = T8(r, c, l);
  4088. return d.validator && (d.validator = (f = d.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
  4089. } })) : (u = s ? { get: function() {
  4090. var f = Object.assign({}, l);
  4091. return a ? Jo(r, f) : Xi(r, f);
  4092. }, enumerable: !0 } : { value: function() {
  4093. var f, d, h = Object.assign({}, l);
  4094. return f = a ? Jo(r, h) : Xi(r, h), h.validator && (f.validator = (d = h.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
  4095. }, enumerable: !0 }, Object.defineProperty(this, r, u));
  4096. }, Yj(t, null, [{ key: "any", get: function() {
  4097. return kfe();
  4098. } }, { key: "func", get: function() {
  4099. return Lfe().def(this.defaults.func);
  4100. } }, { key: "bool", get: function() {
  4101. return Nfe().def(this.defaults.bool);
  4102. } }, { key: "string", get: function() {
  4103. return Bfe().def(this.defaults.string);
  4104. } }, { key: "number", get: function() {
  4105. return zfe().def(this.defaults.number);
  4106. } }, { key: "array", get: function() {
  4107. return Vfe().def(this.defaults.array);
  4108. } }, { key: "object", get: function() {
  4109. return Ffe().def(this.defaults.object);
  4110. } }, { key: "integer", get: function() {
  4111. return Wfe().def(this.defaults.integer);
  4112. } }, { key: "symbol", get: function() {
  4113. return Qfe();
  4114. } }]), t;
  4115. }();
  4116. function iZ(t) {
  4117. var e;
  4118. return t === void 0 && (t = { func: function() {
  4119. }, bool: !0, string: "", number: 0, array: function() {
  4120. return [];
  4121. }, object: function() {
  4122. return {};
  4123. }, integer: 0 }), (e = function(n) {
  4124. function r() {
  4125. return n.apply(this, arguments) || this;
  4126. }
  4127. return qj(r, n), Yj(r, null, [{ key: "sensibleDefaults", get: function() {
  4128. return S_({}, this.defaults);
  4129. }, set: function(i) {
  4130. this.defaults = i !== !1 ? S_({}, i !== !0 ? i : t) : {};
  4131. } }]), r;
  4132. }(Po)).defaults = S_({}, t), e;
  4133. }
  4134. Po.defaults = {}, Po.custom = Hfe, Po.oneOf = Gfe, Po.instanceOf = Ufe, Po.oneOfType = jfe, Po.arrayOf = Zfe, Po.objectOf = Xfe, Po.shape = Yfe, Po.utils = { validate: function(t, e) {
  4135. return Af(e, t, !0) === !0;
  4136. }, toType: function(t, e, n) {
  4137. return n === void 0 && (n = !1), n ? Jo(t, e) : Xi(t, e);
  4138. } };
  4139. (function(t) {
  4140. function e() {
  4141. return t.apply(this, arguments) || this;
  4142. }
  4143. return qj(e, t), e;
  4144. })(iZ());
  4145. const Y = iZ({
  4146. func: void 0,
  4147. bool: void 0,
  4148. string: void 0,
  4149. number: void 0,
  4150. array: void 0,
  4151. object: void 0,
  4152. integer: void 0
  4153. });
  4154. Y.extend([{
  4155. name: "looseBool",
  4156. getter: !0,
  4157. type: Boolean,
  4158. default: void 0
  4159. }, {
  4160. name: "style",
  4161. getter: !0,
  4162. type: [String, Object],
  4163. default: void 0
  4164. }, {
  4165. name: "VueNode",
  4166. getter: !0,
  4167. type: null
  4168. }]);
  4169. function qfe(t) {
  4170. return t.default = void 0, t;
  4171. }
  4172. const Qi = (t, e, n) => {
  4173. oa(t, `[ant-design-vue: ${e}] ${n}`);
  4174. };
  4175. function P8(t, e) {
  4176. const {
  4177. key: n
  4178. } = t;
  4179. let r;
  4180. return "value" in t && ({
  4181. value: r
  4182. } = t), n ?? (r !== void 0 ? r : `rc-index-key-${e}`);
  4183. }
  4184. function aZ(t, e) {
  4185. const {
  4186. label: n,
  4187. value: r,
  4188. options: i
  4189. } = t || {};
  4190. return {
  4191. label: n || (e ? "children" : "label"),
  4192. value: r || "value",
  4193. options: i || "options"
  4194. };
  4195. }
  4196. function Kfe(t) {
  4197. let {
  4198. fieldNames: e,
  4199. childrenAsData: n
  4200. } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  4201. const r = [], {
  4202. label: i,
  4203. value: a,
  4204. options: o
  4205. } = aZ(e, !1);
  4206. function s(l, u) {
  4207. l.forEach((c) => {
  4208. const f = c[i];
  4209. if (u || !(o in c)) {
  4210. const d = c[a];
  4211. r.push({
  4212. key: P8(c, r.length),
  4213. groupOption: u,
  4214. data: c,
  4215. label: f,
  4216. value: d
  4217. });
  4218. } else {
  4219. let d = f;
  4220. d === void 0 && n && (d = c.label), r.push({
  4221. key: P8(c, r.length),
  4222. group: !0,
  4223. data: c,
  4224. label: d
  4225. }), s(c[o], !0);
  4226. }
  4227. });
  4228. }
  4229. return s(t, !1), r;
  4230. }
  4231. function y2(t) {
  4232. const e = I({}, t);
  4233. return "props" in e || Object.defineProperty(e, "props", {
  4234. get() {
  4235. return cf(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), e;
  4236. }
  4237. }), e;
  4238. }
  4239. function Jfe(t, e) {
  4240. if (!e || !e.length)
  4241. return null;
  4242. let n = !1;
  4243. function r(a, o) {
  4244. let [s, ...l] = o;
  4245. if (!s)
  4246. return [a];
  4247. const u = a.split(s);
  4248. return n = n || u.length > 1, u.reduce((c, f) => [...c, ...r(f, l)], []).filter((c) => c);
  4249. }
  4250. const i = r(t, e);
  4251. return n ? i : null;
  4252. }
  4253. function ede() {
  4254. return "";
  4255. }
  4256. function tde(t) {
  4257. return t ? t.ownerDocument : window.document;
  4258. }
  4259. function oZ() {
  4260. }
  4261. const nde = () => ({
  4262. action: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def([]),
  4263. showAction: Y.any.def([]),
  4264. hideAction: Y.any.def([]),
  4265. getPopupClassNameFromAlign: Y.any.def(ede),
  4266. onPopupVisibleChange: Function,
  4267. afterPopupVisibleChange: Y.func.def(oZ),
  4268. popup: Y.any,
  4269. arrow: Y.bool.def(!0),
  4270. popupStyle: {
  4271. type: Object,
  4272. default: void 0
  4273. },
  4274. prefixCls: Y.string.def("rc-trigger-popup"),
  4275. popupClassName: Y.string.def(""),
  4276. popupPlacement: String,
  4277. builtinPlacements: Y.object,
  4278. popupTransitionName: String,
  4279. popupAnimation: Y.any,
  4280. mouseEnterDelay: Y.number.def(0),
  4281. mouseLeaveDelay: Y.number.def(0.1),
  4282. zIndex: Number,
  4283. focusDelay: Y.number.def(0),
  4284. blurDelay: Y.number.def(0.15),
  4285. getPopupContainer: Function,
  4286. getDocument: Y.func.def(tde),
  4287. forceRender: {
  4288. type: Boolean,
  4289. default: void 0
  4290. },
  4291. destroyPopupOnHide: {
  4292. type: Boolean,
  4293. default: !1
  4294. },
  4295. mask: {
  4296. type: Boolean,
  4297. default: !1
  4298. },
  4299. maskClosable: {
  4300. type: Boolean,
  4301. default: !0
  4302. },
  4303. // onPopupAlign: PropTypes.func.def(noop),
  4304. popupAlign: Y.object.def(() => ({})),
  4305. popupVisible: {
  4306. type: Boolean,
  4307. default: void 0
  4308. },
  4309. defaultPopupVisible: {
  4310. type: Boolean,
  4311. default: !1
  4312. },
  4313. maskTransitionName: String,
  4314. maskAnimation: String,
  4315. stretch: String,
  4316. alignPoint: {
  4317. type: Boolean,
  4318. default: void 0
  4319. },
  4320. autoDestroy: {
  4321. type: Boolean,
  4322. default: !1
  4323. },
  4324. mobile: Object,
  4325. getTriggerDOMNode: Function
  4326. }), dI = {
  4327. visible: Boolean,
  4328. prefixCls: String,
  4329. zIndex: Number,
  4330. destroyPopupOnHide: Boolean,
  4331. forceRender: Boolean,
  4332. arrow: {
  4333. type: Boolean,
  4334. default: !0
  4335. },
  4336. // Legacy Motion
  4337. animation: [String, Object],
  4338. transitionName: String,
  4339. // Measure
  4340. stretch: {
  4341. type: String
  4342. },
  4343. // Align
  4344. align: {
  4345. type: Object
  4346. },
  4347. point: {
  4348. type: Object
  4349. },
  4350. getRootDomNode: {
  4351. type: Function
  4352. },
  4353. getClassNameFromAlign: {
  4354. type: Function
  4355. },
  4356. onAlign: {
  4357. type: Function
  4358. },
  4359. onMouseenter: {
  4360. type: Function
  4361. },
  4362. onMouseleave: {
  4363. type: Function
  4364. },
  4365. onMousedown: {
  4366. type: Function
  4367. },
  4368. onTouchstart: {
  4369. type: Function
  4370. }
  4371. }, rde = I(I({}, dI), {
  4372. mobile: {
  4373. type: Object
  4374. }
  4375. }), ide = I(I({}, dI), {
  4376. mask: Boolean,
  4377. mobile: {
  4378. type: Object
  4379. },
  4380. maskAnimation: String,
  4381. maskTransitionName: String
  4382. });
  4383. function hI(t) {
  4384. let {
  4385. prefixCls: e,
  4386. animation: n,
  4387. transitionName: r
  4388. } = t;
  4389. return n ? {
  4390. name: `${e}-${n}`
  4391. } : r ? {
  4392. name: r
  4393. } : {};
  4394. }
  4395. function sZ(t) {
  4396. const {
  4397. prefixCls: e,
  4398. visible: n,
  4399. zIndex: r,
  4400. mask: i,
  4401. maskAnimation: a,
  4402. maskTransitionName: o
  4403. } = t;
  4404. if (!i)
  4405. return null;
  4406. let s = {};
  4407. return (o || a) && (s = hI({
  4408. prefixCls: e,
  4409. transitionName: o,
  4410. animation: a
  4411. })), M(co, j({
  4412. appear: !0
  4413. }, s), {
  4414. default: () => [bi(M("div", {
  4415. style: {
  4416. zIndex: r
  4417. },
  4418. class: `${e}-mask`
  4419. }, null), [[Vle("if"), n]])]
  4420. });
  4421. }
  4422. sZ.displayName = "Mask";
  4423. const ade = te({
  4424. compatConfig: {
  4425. MODE: 3
  4426. },
  4427. name: "MobilePopupInner",
  4428. inheritAttrs: !1,
  4429. props: rde,
  4430. emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  4431. setup(t, e) {
  4432. let {
  4433. expose: n,
  4434. slots: r
  4435. } = e;
  4436. const i = U();
  4437. return n({
  4438. forceAlign: () => {
  4439. },
  4440. getElement: () => i.value
  4441. }), () => {
  4442. var a;
  4443. const {
  4444. zIndex: o,
  4445. visible: s,
  4446. prefixCls: l,
  4447. mobile: {
  4448. popupClassName: u,
  4449. popupStyle: c,
  4450. popupMotion: f = {},
  4451. popupRender: d
  4452. } = {}
  4453. } = t, h = I({
  4454. zIndex: o
  4455. }, c);
  4456. let p = Yn((a = r.default) === null || a === void 0 ? void 0 : a.call(r));
  4457. p.length > 1 && (p = M("div", {
  4458. class: `${l}-content`
  4459. }, [p])), d && (p = d(p));
  4460. const v = ye(l, u);
  4461. return M(co, j({
  4462. ref: i
  4463. }, f), {
  4464. default: () => [s ? M("div", {
  4465. class: v,
  4466. style: h
  4467. }, [p]) : null]
  4468. });
  4469. };
  4470. }
  4471. });
  4472. var ode = function(t, e, n, r) {
  4473. function i(a) {
  4474. return a instanceof n ? a : new n(function(o) {
  4475. o(a);
  4476. });
  4477. }
  4478. return new (n || (n = Promise))(function(a, o) {
  4479. function s(c) {
  4480. try {
  4481. u(r.next(c));
  4482. } catch (f) {
  4483. o(f);
  4484. }
  4485. }
  4486. function l(c) {
  4487. try {
  4488. u(r.throw(c));
  4489. } catch (f) {
  4490. o(f);
  4491. }
  4492. }
  4493. function u(c) {
  4494. c.done ? a(c.value) : i(c.value).then(s, l);
  4495. }
  4496. u((r = r.apply(t, e || [])).next());
  4497. });
  4498. };
  4499. const $8 = ["measure", "align", null, "motion"], sde = (t, e) => {
  4500. const n = ae(null), r = ae(), i = ae(!1);
  4501. function a(l) {
  4502. i.value || (n.value = l);
  4503. }
  4504. function o() {
  4505. xt.cancel(r.value);
  4506. }
  4507. function s(l) {
  4508. o(), r.value = xt(() => {
  4509. let u = n.value;
  4510. switch (n.value) {
  4511. case "align":
  4512. u = "motion";
  4513. break;
  4514. case "motion":
  4515. u = "stable";
  4516. break;
  4517. }
  4518. a(u), l == null || l();
  4519. });
  4520. }
  4521. return se(t, () => {
  4522. a("measure");
  4523. }, {
  4524. immediate: !0,
  4525. flush: "post"
  4526. }), it(() => {
  4527. se(n, () => {
  4528. switch (n.value) {
  4529. case "measure":
  4530. e();
  4531. break;
  4532. }
  4533. n.value && (r.value = xt(() => ode(void 0, void 0, void 0, function* () {
  4534. const l = $8.indexOf(n.value), u = $8[l + 1];
  4535. u && l !== -1 && a(u);
  4536. })));
  4537. }, {
  4538. immediate: !0,
  4539. flush: "post"
  4540. });
  4541. }), yt(() => {
  4542. i.value = !0, o();
  4543. }), [n, s];
  4544. }, lde = (t) => {
  4545. const e = ae({
  4546. width: 0,
  4547. height: 0
  4548. });
  4549. function n(i) {
  4550. e.value = {
  4551. width: i.offsetWidth,
  4552. height: i.offsetHeight
  4553. };
  4554. }
  4555. return [L(() => {
  4556. const i = {};
  4557. if (t.value) {
  4558. const {
  4559. width: a,
  4560. height: o
  4561. } = e.value;
  4562. t.value.indexOf("height") !== -1 && o ? i.height = `${o}px` : t.value.indexOf("minHeight") !== -1 && o && (i.minHeight = `${o}px`), t.value.indexOf("width") !== -1 && a ? i.width = `${a}px` : t.value.indexOf("minWidth") !== -1 && a && (i.minWidth = `${a}px`);
  4563. }
  4564. return i;
  4565. }), n];
  4566. };
  4567. function A8(t, e) {
  4568. var n = Object.keys(t);
  4569. if (Object.getOwnPropertySymbols) {
  4570. var r = Object.getOwnPropertySymbols(t);
  4571. e && (r = r.filter(function(i) {
  4572. return Object.getOwnPropertyDescriptor(t, i).enumerable;
  4573. })), n.push.apply(n, r);
  4574. }
  4575. return n;
  4576. }
  4577. function E8(t) {
  4578. for (var e = 1; e < arguments.length; e++) {
  4579. var n = arguments[e] != null ? arguments[e] : {};
  4580. e % 2 ? A8(Object(n), !0).forEach(function(r) {
  4581. ude(t, r, n[r]);
  4582. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : A8(Object(n)).forEach(function(r) {
  4583. Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
  4584. });
  4585. }
  4586. return t;
  4587. }
  4588. function b2(t) {
  4589. "@babel/helpers - typeof";
  4590. return b2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
  4591. return typeof e;
  4592. } : function(e) {
  4593. return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  4594. }, b2(t);
  4595. }
  4596. function ude(t, e, n) {
  4597. return e in t ? Object.defineProperty(t, e, {
  4598. value: n,
  4599. enumerable: !0,
  4600. configurable: !0,
  4601. writable: !0
  4602. }) : t[e] = n, t;
  4603. }
  4604. var Gp, cde = {
  4605. Webkit: "-webkit-",
  4606. Moz: "-moz-",
  4607. // IE did it wrong again ...
  4608. ms: "-ms-",
  4609. O: "-o-"
  4610. };
  4611. function S1() {
  4612. if (Gp !== void 0)
  4613. return Gp;
  4614. Gp = "";
  4615. var t = document.createElement("p").style, e = "Transform";
  4616. for (var n in cde)
  4617. n + e in t && (Gp = n);
  4618. return Gp;
  4619. }
  4620. function lZ() {
  4621. return S1() ? "".concat(S1(), "TransitionProperty") : "transitionProperty";
  4622. }
  4623. function WS() {
  4624. return S1() ? "".concat(S1(), "Transform") : "transform";
  4625. }
  4626. function M8(t, e) {
  4627. var n = lZ();
  4628. n && (t.style[n] = e, n !== "transitionProperty" && (t.style.transitionProperty = e));
  4629. }
  4630. function sC(t, e) {
  4631. var n = WS();
  4632. n && (t.style[n] = e, n !== "transform" && (t.style.transform = e));
  4633. }
  4634. function fde(t) {
  4635. return t.style.transitionProperty || t.style[lZ()];
  4636. }
  4637. function dde(t) {
  4638. var e = window.getComputedStyle(t, null), n = e.getPropertyValue("transform") || e.getPropertyValue(WS());
  4639. if (n && n !== "none") {
  4640. var r = n.replace(/[^0-9\-.,]/g, "").split(",");
  4641. return {
  4642. x: parseFloat(r[12] || r[4], 0),
  4643. y: parseFloat(r[13] || r[5], 0)
  4644. };
  4645. }
  4646. return {
  4647. x: 0,
  4648. y: 0
  4649. };
  4650. }
  4651. var hde = /matrix\((.*)\)/, pde = /matrix3d\((.*)\)/;
  4652. function vde(t, e) {
  4653. var n = window.getComputedStyle(t, null), r = n.getPropertyValue("transform") || n.getPropertyValue(WS());
  4654. if (r && r !== "none") {
  4655. var i, a = r.match(hde);
  4656. if (a)
  4657. a = a[1], i = a.split(",").map(function(s) {
  4658. return parseFloat(s, 10);
  4659. }), i[4] = e.x, i[5] = e.y, sC(t, "matrix(".concat(i.join(","), ")"));
  4660. else {
  4661. var o = r.match(pde)[1];
  4662. i = o.split(",").map(function(s) {
  4663. return parseFloat(s, 10);
  4664. }), i[12] = e.x, i[13] = e.y, sC(t, "matrix3d(".concat(i.join(","), ")"));
  4665. }
  4666. } else
  4667. sC(t, "translateX(".concat(e.x, "px) translateY(").concat(e.y, "px) translateZ(0)"));
  4668. }
  4669. var gde = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, h0;
  4670. function I8(t) {
  4671. var e = t.style.display;
  4672. t.style.display = "none", t.offsetHeight, t.style.display = e;
  4673. }
  4674. function jd(t, e, n) {
  4675. var r = n;
  4676. if (b2(e) === "object") {
  4677. for (var i in e)
  4678. e.hasOwnProperty(i) && jd(t, i, e[i]);
  4679. return;
  4680. }
  4681. if (typeof r < "u") {
  4682. typeof r == "number" && (r = "".concat(r, "px")), t.style[e] = r;
  4683. return;
  4684. }
  4685. return h0(t, e);
  4686. }
  4687. function mde(t) {
  4688. var e, n, r, i = t.ownerDocument, a = i.body, o = i && i.documentElement;
  4689. return e = t.getBoundingClientRect(), n = Math.floor(e.left), r = Math.floor(e.top), n -= o.clientLeft || a.clientLeft || 0, r -= o.clientTop || a.clientTop || 0, {
  4690. left: n,
  4691. top: r
  4692. };
  4693. }
  4694. function uZ(t, e) {
  4695. var n = t["page".concat(e ? "Y" : "X", "Offset")], r = "scroll".concat(e ? "Top" : "Left");
  4696. if (typeof n != "number") {
  4697. var i = t.document;
  4698. n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  4699. }
  4700. return n;
  4701. }
  4702. function cZ(t) {
  4703. return uZ(t);
  4704. }
  4705. function fZ(t) {
  4706. return uZ(t, !0);
  4707. }
  4708. function em(t) {
  4709. var e = mde(t), n = t.ownerDocument, r = n.defaultView || n.parentWindow;
  4710. return e.left += cZ(r), e.top += fZ(r), e;
  4711. }
  4712. function pI(t) {
  4713. return t != null && t == t.window;
  4714. }
  4715. function dZ(t) {
  4716. return pI(t) ? t.document : t.nodeType === 9 ? t : t.ownerDocument;
  4717. }
  4718. function yde(t, e, n) {
  4719. var r = n, i = "", a = dZ(t);
  4720. return r = r || a.defaultView.getComputedStyle(t, null), r && (i = r.getPropertyValue(e) || r[e]), i;
  4721. }
  4722. var bde = new RegExp("^(".concat(gde, ")(?!px)[a-z%]+$"), "i"), _de = /^(top|right|bottom|left)$/, lC = "currentStyle", uC = "runtimeStyle", Du = "left", Ode = "px";
  4723. function Sde(t, e) {
  4724. var n = t[lC] && t[lC][e];
  4725. if (bde.test(n) && !_de.test(e)) {
  4726. var r = t.style, i = r[Du], a = t[uC][Du];
  4727. t[uC][Du] = t[lC][Du], r[Du] = e === "fontSize" ? "1em" : n || 0, n = r.pixelLeft + Ode, r[Du] = i, t[uC][Du] = a;
  4728. }
  4729. return n === "" ? "auto" : n;
  4730. }
  4731. typeof window < "u" && (h0 = window.getComputedStyle ? yde : Sde);
  4732. function xy(t, e) {
  4733. return t === "left" ? e.useCssRight ? "right" : t : e.useCssBottom ? "bottom" : t;
  4734. }
  4735. function D8(t) {
  4736. if (t === "left")
  4737. return "right";
  4738. if (t === "right")
  4739. return "left";
  4740. if (t === "top")
  4741. return "bottom";
  4742. if (t === "bottom")
  4743. return "top";
  4744. }
  4745. function R8(t, e, n) {
  4746. jd(t, "position") === "static" && (t.style.position = "relative");
  4747. var r = -999, i = -999, a = xy("left", n), o = xy("top", n), s = D8(a), l = D8(o);
  4748. a !== "left" && (r = 999), o !== "top" && (i = 999);
  4749. var u = "", c = em(t);
  4750. ("left" in e || "top" in e) && (u = fde(t) || "", M8(t, "none")), "left" in e && (t.style[s] = "", t.style[a] = "".concat(r, "px")), "top" in e && (t.style[l] = "", t.style[o] = "".concat(i, "px")), I8(t);
  4751. var f = em(t), d = {};
  4752. for (var h in e)
  4753. if (e.hasOwnProperty(h)) {
  4754. var p = xy(h, n), v = h === "left" ? r : i, g = c[h] - f[h];
  4755. p === h ? d[p] = v + g : d[p] = v - g;
  4756. }
  4757. jd(t, d), I8(t), ("left" in e || "top" in e) && M8(t, u);
  4758. var m = {};
  4759. for (var y in e)
  4760. if (e.hasOwnProperty(y)) {
  4761. var b = xy(y, n), _ = e[y] - c[y];
  4762. y === b ? m[b] = d[b] + _ : m[b] = d[b] - _;
  4763. }
  4764. jd(t, m);
  4765. }
  4766. function xde(t, e) {
  4767. var n = em(t), r = dde(t), i = {
  4768. x: r.x,
  4769. y: r.y
  4770. };
  4771. "left" in e && (i.x = r.x + e.left - n.left), "top" in e && (i.y = r.y + e.top - n.top), vde(t, i);
  4772. }
  4773. function wde(t, e, n) {
  4774. if (n.ignoreShake) {
  4775. var r = em(t), i = r.left.toFixed(0), a = r.top.toFixed(0), o = e.left.toFixed(0), s = e.top.toFixed(0);
  4776. if (i === o && a === s)
  4777. return;
  4778. }
  4779. n.useCssRight || n.useCssBottom ? R8(t, e, n) : n.useCssTransform && WS() in document.body.style ? xde(t, e) : R8(t, e, n);
  4780. }
  4781. function vI(t, e) {
  4782. for (var n = 0; n < t.length; n++)
  4783. e(t[n]);
  4784. }
  4785. function hZ(t) {
  4786. return h0(t, "boxSizing") === "border-box";
  4787. }
  4788. var Cde = ["margin", "border", "padding"], _2 = -1, Tde = 2, O2 = 1, Pde = 0;
  4789. function $de(t, e, n) {
  4790. var r = {}, i = t.style, a;
  4791. for (a in e)
  4792. e.hasOwnProperty(a) && (r[a] = i[a], i[a] = e[a]);
  4793. n.call(t);
  4794. for (a in e)
  4795. e.hasOwnProperty(a) && (i[a] = r[a]);
  4796. }
  4797. function Lv(t, e, n) {
  4798. var r = 0, i, a, o;
  4799. for (a = 0; a < e.length; a++)
  4800. if (i = e[a], i)
  4801. for (o = 0; o < n.length; o++) {
  4802. var s = void 0;
  4803. i === "border" ? s = "".concat(i).concat(n[o], "Width") : s = i + n[o], r += parseFloat(h0(t, s)) || 0;
  4804. }
  4805. return r;
  4806. }
  4807. var zo = {
  4808. getParent: function(e) {
  4809. var n = e;
  4810. do
  4811. n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
  4812. while (n && n.nodeType !== 1 && n.nodeType !== 9);
  4813. return n;
  4814. }
  4815. };
  4816. vI(["Width", "Height"], function(t) {
  4817. zo["doc".concat(t)] = function(e) {
  4818. var n = e.document;
  4819. return Math.max(
  4820. // firefox chrome documentElement.scrollHeight< body.scrollHeight
  4821. // ie standard mode : documentElement.scrollHeight> body.scrollHeight
  4822. n.documentElement["scroll".concat(t)],
  4823. // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
  4824. n.body["scroll".concat(t)],
  4825. zo["viewport".concat(t)](n)
  4826. );
  4827. }, zo["viewport".concat(t)] = function(e) {
  4828. var n = "client".concat(t), r = e.document, i = r.body, a = r.documentElement, o = a[n];
  4829. return r.compatMode === "CSS1Compat" && o || i && i[n] || o;
  4830. };
  4831. });
  4832. function k8(t, e, n) {
  4833. var r = n;
  4834. if (pI(t))
  4835. return e === "width" ? zo.viewportWidth(t) : zo.viewportHeight(t);
  4836. if (t.nodeType === 9)
  4837. return e === "width" ? zo.docWidth(t) : zo.docHeight(t);
  4838. var i = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"], a = Math.floor(e === "width" ? t.getBoundingClientRect().width : t.getBoundingClientRect().height), o = hZ(t), s = 0;
  4839. (a == null || a <= 0) && (a = void 0, s = h0(t, e), (s == null || Number(s) < 0) && (s = t.style[e] || 0), s = Math.floor(parseFloat(s)) || 0), r === void 0 && (r = o ? O2 : _2);
  4840. var l = a !== void 0 || o, u = a || s;
  4841. return r === _2 ? l ? u - Lv(t, ["border", "padding"], i) : s : l ? r === O2 ? u : u + (r === Tde ? -Lv(t, ["border"], i) : Lv(t, ["margin"], i)) : s + Lv(t, Cde.slice(r), i);
  4842. }
  4843. var Ade = {
  4844. position: "absolute",
  4845. visibility: "hidden",
  4846. display: "block"
  4847. };
  4848. function L8() {
  4849. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
  4850. e[n] = arguments[n];
  4851. var r, i = e[0];
  4852. return i.offsetWidth !== 0 ? r = k8.apply(void 0, e) : $de(i, Ade, function() {
  4853. r = k8.apply(void 0, e);
  4854. }), r;
  4855. }
  4856. vI(["width", "height"], function(t) {
  4857. var e = t.charAt(0).toUpperCase() + t.slice(1);
  4858. zo["outer".concat(e)] = function(r, i) {
  4859. return r && L8(r, t, i ? Pde : O2);
  4860. };
  4861. var n = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  4862. zo[t] = function(r, i) {
  4863. var a = i;
  4864. if (a !== void 0) {
  4865. if (r) {
  4866. var o = hZ(r);
  4867. return o && (a += Lv(r, ["padding", "border"], n)), jd(r, t, a);
  4868. }
  4869. return;
  4870. }
  4871. return r && L8(r, t, _2);
  4872. };
  4873. });
  4874. function pZ(t, e) {
  4875. for (var n in e)
  4876. e.hasOwnProperty(n) && (t[n] = e[n]);
  4877. return t;
  4878. }
  4879. var ft = {
  4880. getWindow: function(e) {
  4881. if (e && e.document && e.setTimeout)
  4882. return e;
  4883. var n = e.ownerDocument || e;
  4884. return n.defaultView || n.parentWindow;
  4885. },
  4886. getDocument: dZ,
  4887. offset: function(e, n, r) {
  4888. if (typeof n < "u")
  4889. wde(e, n, r || {});
  4890. else
  4891. return em(e);
  4892. },
  4893. isWindow: pI,
  4894. each: vI,
  4895. css: jd,
  4896. clone: function(e) {
  4897. var n, r = {};
  4898. for (n in e)
  4899. e.hasOwnProperty(n) && (r[n] = e[n]);
  4900. var i = e.overflow;
  4901. if (i)
  4902. for (n in e)
  4903. e.hasOwnProperty(n) && (r.overflow[n] = e.overflow[n]);
  4904. return r;
  4905. },
  4906. mix: pZ,
  4907. getWindowScrollLeft: function(e) {
  4908. return cZ(e);
  4909. },
  4910. getWindowScrollTop: function(e) {
  4911. return fZ(e);
  4912. },
  4913. merge: function() {
  4914. for (var e = {}, n = 0; n < arguments.length; n++)
  4915. ft.mix(e, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
  4916. return e;
  4917. },
  4918. viewportWidth: 0,
  4919. viewportHeight: 0
  4920. };
  4921. pZ(ft, zo);
  4922. var cC = ft.getParent;
  4923. function S2(t) {
  4924. if (ft.isWindow(t) || t.nodeType === 9)
  4925. return null;
  4926. var e = ft.getDocument(t), n = e.body, r, i = ft.css(t, "position"), a = i === "fixed" || i === "absolute";
  4927. if (!a)
  4928. return t.nodeName.toLowerCase() === "html" ? null : cC(t);
  4929. for (r = cC(t); r && r !== n && r.nodeType !== 9; r = cC(r))
  4930. if (i = ft.css(r, "position"), i !== "static")
  4931. return r;
  4932. return null;
  4933. }
  4934. var N8 = ft.getParent;
  4935. function Ede(t) {
  4936. if (ft.isWindow(t) || t.nodeType === 9)
  4937. return !1;
  4938. var e = ft.getDocument(t), n = e.body, r = null;
  4939. for (
  4940. r = N8(t);
  4941. // 修复元素位于 document.documentElement 下导致崩溃问题
  4942. r && r !== n && r !== e;
  4943. r = N8(r)
  4944. ) {
  4945. var i = ft.css(r, "position");
  4946. if (i === "fixed")
  4947. return !0;
  4948. }
  4949. return !1;
  4950. }
  4951. function gI(t, e) {
  4952. for (var n = {
  4953. left: 0,
  4954. right: 1 / 0,
  4955. top: 0,
  4956. bottom: 1 / 0
  4957. }, r = S2(t), i = ft.getDocument(t), a = i.defaultView || i.parentWindow, o = i.body, s = i.documentElement; r; ) {
  4958. if ((navigator.userAgent.indexOf("MSIE") === -1 || r.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
  4959. // viewport. In some browsers, el.offsetParent may be
  4960. // document.documentElement, so check for that too.
  4961. r !== o && r !== s && ft.css(r, "overflow") !== "visible") {
  4962. var l = ft.offset(r);
  4963. l.left += r.clientLeft, l.top += r.clientTop, n.top = Math.max(n.top, l.top), n.right = Math.min(
  4964. n.right,
  4965. // consider area without scrollBar
  4966. l.left + r.clientWidth
  4967. ), n.bottom = Math.min(n.bottom, l.top + r.clientHeight), n.left = Math.max(n.left, l.left);
  4968. } else if (r === o || r === s)
  4969. break;
  4970. r = S2(r);
  4971. }
  4972. var u = null;
  4973. if (!ft.isWindow(t) && t.nodeType !== 9) {
  4974. u = t.style.position;
  4975. var c = ft.css(t, "position");
  4976. c === "absolute" && (t.style.position = "fixed");
  4977. }
  4978. var f = ft.getWindowScrollLeft(a), d = ft.getWindowScrollTop(a), h = ft.viewportWidth(a), p = ft.viewportHeight(a), v = s.scrollWidth, g = s.scrollHeight, m = window.getComputedStyle(o);
  4979. if (m.overflowX === "hidden" && (v = a.innerWidth), m.overflowY === "hidden" && (g = a.innerHeight), t.style && (t.style.position = u), e || Ede(t))
  4980. n.left = Math.max(n.left, f), n.top = Math.max(n.top, d), n.right = Math.min(n.right, f + h), n.bottom = Math.min(n.bottom, d + p);
  4981. else {
  4982. var y = Math.max(v, f + h);
  4983. n.right = Math.min(n.right, y);
  4984. var b = Math.max(g, d + p);
  4985. n.bottom = Math.min(n.bottom, b);
  4986. }
  4987. return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
  4988. }
  4989. function Mde(t, e, n, r) {
  4990. var i = ft.clone(t), a = {
  4991. width: e.width,
  4992. height: e.height
  4993. };
  4994. return r.adjustX && i.left < n.left && (i.left = n.left), r.resizeWidth && i.left >= n.left && i.left + a.width > n.right && (a.width -= i.left + a.width - n.right), r.adjustX && i.left + a.width > n.right && (i.left = Math.max(n.right - a.width, n.left)), r.adjustY && i.top < n.top && (i.top = n.top), r.resizeHeight && i.top >= n.top && i.top + a.height > n.bottom && (a.height -= i.top + a.height - n.bottom), r.adjustY && i.top + a.height > n.bottom && (i.top = Math.max(n.bottom - a.height, n.top)), ft.mix(i, a);
  4995. }
  4996. function mI(t) {
  4997. var e, n, r;
  4998. if (!ft.isWindow(t) && t.nodeType !== 9)
  4999. e = ft.offset(t), n = ft.outerWidth(t), r = ft.outerHeight(t);
  5000. else {
  5001. var i = ft.getWindow(t);
  5002. e = {
  5003. left: ft.getWindowScrollLeft(i),
  5004. top: ft.getWindowScrollTop(i)
  5005. }, n = ft.viewportWidth(i), r = ft.viewportHeight(i);
  5006. }
  5007. return e.width = n, e.height = r, e;
  5008. }
  5009. function B8(t, e) {
  5010. var n = e.charAt(0), r = e.charAt(1), i = t.width, a = t.height, o = t.left, s = t.top;
  5011. return n === "c" ? s += a / 2 : n === "b" && (s += a), r === "c" ? o += i / 2 : r === "r" && (o += i), {
  5012. left: o,
  5013. top: s
  5014. };
  5015. }
  5016. function wy(t, e, n, r, i) {
  5017. var a = B8(e, n[1]), o = B8(t, n[0]), s = [o.left - a.left, o.top - a.top];
  5018. return {
  5019. left: Math.round(t.left - s[0] + r[0] - i[0]),
  5020. top: Math.round(t.top - s[1] + r[1] - i[1])
  5021. };
  5022. }
  5023. function z8(t, e, n) {
  5024. return t.left < n.left || t.left + e.width > n.right;
  5025. }
  5026. function V8(t, e, n) {
  5027. return t.top < n.top || t.top + e.height > n.bottom;
  5028. }
  5029. function Ide(t, e, n) {
  5030. return t.left > n.right || t.left + e.width < n.left;
  5031. }
  5032. function Dde(t, e, n) {
  5033. return t.top > n.bottom || t.top + e.height < n.top;
  5034. }
  5035. function Cy(t, e, n) {
  5036. var r = [];
  5037. return ft.each(t, function(i) {
  5038. r.push(i.replace(e, function(a) {
  5039. return n[a];
  5040. }));
  5041. }), r;
  5042. }
  5043. function Ty(t, e) {
  5044. return t[e] = -t[e], t;
  5045. }
  5046. function F8(t, e) {
  5047. var n;
  5048. return /%$/.test(t) ? n = parseInt(t.substring(0, t.length - 1), 10) / 100 * e : n = parseInt(t, 10), n || 0;
  5049. }
  5050. function W8(t, e) {
  5051. t[0] = F8(t[0], e.width), t[1] = F8(t[1], e.height);
  5052. }
  5053. function vZ(t, e, n, r) {
  5054. var i = n.points, a = n.offset || [0, 0], o = n.targetOffset || [0, 0], s = n.overflow, l = n.source || t;
  5055. a = [].concat(a), o = [].concat(o), s = s || {};
  5056. var u = {}, c = 0, f = !!(s && s.alwaysByViewport), d = gI(l, f), h = mI(l);
  5057. W8(a, h), W8(o, e);
  5058. var p = wy(h, e, i, a, o), v = ft.merge(h, p);
  5059. if (d && (s.adjustX || s.adjustY) && r) {
  5060. if (s.adjustX && z8(p, h, d)) {
  5061. var g = Cy(i, /[lr]/gi, {
  5062. l: "r",
  5063. r: "l"
  5064. }), m = Ty(a, 0), y = Ty(o, 0), b = wy(h, e, g, m, y);
  5065. Ide(b, h, d) || (c = 1, i = g, a = m, o = y);
  5066. }
  5067. if (s.adjustY && V8(p, h, d)) {
  5068. var _ = Cy(i, /[tb]/gi, {
  5069. t: "b",
  5070. b: "t"
  5071. }), O = Ty(a, 1), S = Ty(o, 1), x = wy(h, e, _, O, S);
  5072. Dde(x, h, d) || (c = 1, i = _, a = O, o = S);
  5073. }
  5074. c && (p = wy(h, e, i, a, o), ft.mix(v, p));
  5075. var C = z8(p, h, d), T = V8(p, h, d);
  5076. if (C || T) {
  5077. var w = i;
  5078. C && (w = Cy(i, /[lr]/gi, {
  5079. l: "r",
  5080. r: "l"
  5081. })), T && (w = Cy(i, /[tb]/gi, {
  5082. t: "b",
  5083. b: "t"
  5084. })), i = w, a = n.offset || [0, 0], o = n.targetOffset || [0, 0];
  5085. }
  5086. u.adjustX = s.adjustX && C, u.adjustY = s.adjustY && T, (u.adjustX || u.adjustY) && (v = Mde(p, h, d, u));
  5087. }
  5088. return v.width !== h.width && ft.css(l, "width", ft.width(l) + v.width - h.width), v.height !== h.height && ft.css(l, "height", ft.height(l) + v.height - h.height), ft.offset(l, {
  5089. left: v.left,
  5090. top: v.top
  5091. }, {
  5092. useCssRight: n.useCssRight,
  5093. useCssBottom: n.useCssBottom,
  5094. useCssTransform: n.useCssTransform,
  5095. ignoreShake: n.ignoreShake
  5096. }), {
  5097. points: i,
  5098. offset: a,
  5099. targetOffset: o,
  5100. overflow: u
  5101. };
  5102. }
  5103. function Rde(t, e) {
  5104. var n = gI(t, e), r = mI(t);
  5105. return !n || r.left + r.width <= n.left || r.top + r.height <= n.top || r.left >= n.right || r.top >= n.bottom;
  5106. }
  5107. function yI(t, e, n) {
  5108. var r = n.target || e, i = mI(r), a = !Rde(r, n.overflow && n.overflow.alwaysByViewport);
  5109. return vZ(t, i, n, a);
  5110. }
  5111. yI.__getOffsetParent = S2;
  5112. yI.__getVisibleRectForElement = gI;
  5113. function kde(t, e, n) {
  5114. var r, i, a = ft.getDocument(t), o = a.defaultView || a.parentWindow, s = ft.getWindowScrollLeft(o), l = ft.getWindowScrollTop(o), u = ft.viewportWidth(o), c = ft.viewportHeight(o);
  5115. "pageX" in e ? r = e.pageX : r = s + e.clientX, "pageY" in e ? i = e.pageY : i = l + e.clientY;
  5116. var f = {
  5117. left: r,
  5118. top: i,
  5119. width: 0,
  5120. height: 0
  5121. }, d = r >= 0 && r <= s + u && i >= 0 && i <= l + c, h = [n.points[0], "cc"];
  5122. return vZ(t, f, E8(E8({}, n), {}, {
  5123. points: h
  5124. }), d);
  5125. }
  5126. function Pn(t) {
  5127. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, i = t;
  5128. if (Array.isArray(t) && (i = os(t)[0]), !i)
  5129. return null;
  5130. const a = Ns(i, e, r);
  5131. return a.props = n ? I(I({}, a.props), e) : a.props, Xr(typeof a.props.class != "object", "class must be string"), a;
  5132. }
  5133. function Lde(t, e, n) {
  5134. sf(Ns(t, I({}, e)), n);
  5135. }
  5136. const gZ = (t) => {
  5137. if (!t)
  5138. return !1;
  5139. if (t.offsetParent)
  5140. return !0;
  5141. if (t.getBBox) {
  5142. const e = t.getBBox();
  5143. if (e.width || e.height)
  5144. return !0;
  5145. }
  5146. if (t.getBoundingClientRect) {
  5147. const e = t.getBoundingClientRect();
  5148. if (e.width || e.height)
  5149. return !0;
  5150. }
  5151. return !1;
  5152. };
  5153. function Nde(t, e) {
  5154. return t === e ? !0 : !t || !e ? !1 : "pageX" in e && "pageY" in e ? t.pageX === e.pageX && t.pageY === e.pageY : "clientX" in e && "clientY" in e ? t.clientX === e.clientX && t.clientY === e.clientY : !1;
  5155. }
  5156. function Bde(t, e) {
  5157. t !== document.activeElement && $l(e, t) && typeof t.focus == "function" && t.focus();
  5158. }
  5159. function Q8(t, e) {
  5160. let n = null, r = null;
  5161. function i(o) {
  5162. let [{
  5163. target: s
  5164. }] = o;
  5165. if (!document.documentElement.contains(s)) return;
  5166. const {
  5167. width: l,
  5168. height: u
  5169. } = s.getBoundingClientRect(), c = Math.floor(l), f = Math.floor(u);
  5170. (n !== c || r !== f) && Promise.resolve().then(() => {
  5171. e({
  5172. width: c,
  5173. height: f
  5174. });
  5175. }), n = c, r = f;
  5176. }
  5177. const a = new tj(i);
  5178. return t && a.observe(t), () => {
  5179. a.disconnect();
  5180. };
  5181. }
  5182. const zde = (t, e) => {
  5183. let n = !1, r = null;
  5184. function i() {
  5185. clearTimeout(r);
  5186. }
  5187. function a(o) {
  5188. if (!n || o === !0) {
  5189. if (t() === !1)
  5190. return;
  5191. n = !0, i(), r = setTimeout(() => {
  5192. n = !1;
  5193. }, e.value);
  5194. } else
  5195. i(), r = setTimeout(() => {
  5196. n = !1, a();
  5197. }, e.value);
  5198. }
  5199. return [a, () => {
  5200. n = !1, i();
  5201. }];
  5202. };
  5203. function Vde() {
  5204. this.__data__ = [], this.size = 0;
  5205. }
  5206. function p0(t, e) {
  5207. return t === e || t !== t && e !== e;
  5208. }
  5209. function QS(t, e) {
  5210. for (var n = t.length; n--; )
  5211. if (p0(t[n][0], e))
  5212. return n;
  5213. return -1;
  5214. }
  5215. var Fde = Array.prototype, Wde = Fde.splice;
  5216. function Qde(t) {
  5217. var e = this.__data__, n = QS(e, t);
  5218. if (n < 0)
  5219. return !1;
  5220. var r = e.length - 1;
  5221. return n == r ? e.pop() : Wde.call(e, n, 1), --this.size, !0;
  5222. }
  5223. function Hde(t) {
  5224. var e = this.__data__, n = QS(e, t);
  5225. return n < 0 ? void 0 : e[n][1];
  5226. }
  5227. function Gde(t) {
  5228. return QS(this.__data__, t) > -1;
  5229. }
  5230. function jde(t, e) {
  5231. var n = this.__data__, r = QS(n, t);
  5232. return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
  5233. }
  5234. function rl(t) {
  5235. var e = -1, n = t == null ? 0 : t.length;
  5236. for (this.clear(); ++e < n; ) {
  5237. var r = t[e];
  5238. this.set(r[0], r[1]);
  5239. }
  5240. }
  5241. rl.prototype.clear = Vde;
  5242. rl.prototype.delete = Qde;
  5243. rl.prototype.get = Hde;
  5244. rl.prototype.has = Gde;
  5245. rl.prototype.set = jde;
  5246. function Zde() {
  5247. this.__data__ = new rl(), this.size = 0;
  5248. }
  5249. function Ude(t) {
  5250. var e = this.__data__, n = e.delete(t);
  5251. return this.size = e.size, n;
  5252. }
  5253. function Xde(t) {
  5254. return this.__data__.get(t);
  5255. }
  5256. function Yde(t) {
  5257. return this.__data__.has(t);
  5258. }
  5259. var mZ = typeof global == "object" && global && global.Object === Object && global, qde = typeof self == "object" && self && self.Object === Object && self, fo = mZ || qde || Function("return this")(), Ta = fo.Symbol, yZ = Object.prototype, Kde = yZ.hasOwnProperty, Jde = yZ.toString, jp = Ta ? Ta.toStringTag : void 0;
  5260. function ehe(t) {
  5261. var e = Kde.call(t, jp), n = t[jp];
  5262. try {
  5263. t[jp] = void 0;
  5264. var r = !0;
  5265. } catch {
  5266. }
  5267. var i = Jde.call(t);
  5268. return r && (e ? t[jp] = n : delete t[jp]), i;
  5269. }
  5270. var the = Object.prototype, nhe = the.toString;
  5271. function rhe(t) {
  5272. return nhe.call(t);
  5273. }
  5274. var ihe = "[object Null]", ahe = "[object Undefined]", H8 = Ta ? Ta.toStringTag : void 0;
  5275. function bu(t) {
  5276. return t == null ? t === void 0 ? ahe : ihe : H8 && H8 in Object(t) ? ehe(t) : rhe(t);
  5277. }
  5278. function xr(t) {
  5279. var e = typeof t;
  5280. return t != null && (e == "object" || e == "function");
  5281. }
  5282. var ohe = "[object AsyncFunction]", she = "[object Function]", lhe = "[object GeneratorFunction]", uhe = "[object Proxy]";
  5283. function bI(t) {
  5284. if (!xr(t))
  5285. return !1;
  5286. var e = bu(t);
  5287. return e == she || e == lhe || e == ohe || e == uhe;
  5288. }
  5289. var fC = fo["__core-js_shared__"], G8 = function() {
  5290. var t = /[^.]+$/.exec(fC && fC.keys && fC.keys.IE_PROTO || "");
  5291. return t ? "Symbol(src)_1." + t : "";
  5292. }();
  5293. function che(t) {
  5294. return !!G8 && G8 in t;
  5295. }
  5296. var fhe = Function.prototype, dhe = fhe.toString;
  5297. function Ef(t) {
  5298. if (t != null) {
  5299. try {
  5300. return dhe.call(t);
  5301. } catch {
  5302. }
  5303. try {
  5304. return t + "";
  5305. } catch {
  5306. }
  5307. }
  5308. return "";
  5309. }
  5310. var hhe = /[\\^$.*+?()[\]{}|]/g, phe = /^\[object .+?Constructor\]$/, vhe = Function.prototype, ghe = Object.prototype, mhe = vhe.toString, yhe = ghe.hasOwnProperty, bhe = RegExp(
  5311. "^" + mhe.call(yhe).replace(hhe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  5312. );
  5313. function _he(t) {
  5314. if (!xr(t) || che(t))
  5315. return !1;
  5316. var e = bI(t) ? bhe : phe;
  5317. return e.test(Ef(t));
  5318. }
  5319. function Ohe(t, e) {
  5320. return t == null ? void 0 : t[e];
  5321. }
  5322. function Mf(t, e) {
  5323. var n = Ohe(t, e);
  5324. return _he(n) ? n : void 0;
  5325. }
  5326. var tm = Mf(fo, "Map"), nm = Mf(Object, "create");
  5327. function She() {
  5328. this.__data__ = nm ? nm(null) : {}, this.size = 0;
  5329. }
  5330. function xhe(t) {
  5331. var e = this.has(t) && delete this.__data__[t];
  5332. return this.size -= e ? 1 : 0, e;
  5333. }
  5334. var whe = "__lodash_hash_undefined__", Che = Object.prototype, The = Che.hasOwnProperty;
  5335. function Phe(t) {
  5336. var e = this.__data__;
  5337. if (nm) {
  5338. var n = e[t];
  5339. return n === whe ? void 0 : n;
  5340. }
  5341. return The.call(e, t) ? e[t] : void 0;
  5342. }
  5343. var $he = Object.prototype, Ahe = $he.hasOwnProperty;
  5344. function Ehe(t) {
  5345. var e = this.__data__;
  5346. return nm ? e[t] !== void 0 : Ahe.call(e, t);
  5347. }
  5348. var Mhe = "__lodash_hash_undefined__";
  5349. function Ihe(t, e) {
  5350. var n = this.__data__;
  5351. return this.size += this.has(t) ? 0 : 1, n[t] = nm && e === void 0 ? Mhe : e, this;
  5352. }
  5353. function hf(t) {
  5354. var e = -1, n = t == null ? 0 : t.length;
  5355. for (this.clear(); ++e < n; ) {
  5356. var r = t[e];
  5357. this.set(r[0], r[1]);
  5358. }
  5359. }
  5360. hf.prototype.clear = She;
  5361. hf.prototype.delete = xhe;
  5362. hf.prototype.get = Phe;
  5363. hf.prototype.has = Ehe;
  5364. hf.prototype.set = Ihe;
  5365. function Dhe() {
  5366. this.size = 0, this.__data__ = {
  5367. hash: new hf(),
  5368. map: new (tm || rl)(),
  5369. string: new hf()
  5370. };
  5371. }
  5372. function Rhe(t) {
  5373. var e = typeof t;
  5374. return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
  5375. }
  5376. function HS(t, e) {
  5377. var n = t.__data__;
  5378. return Rhe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
  5379. }
  5380. function khe(t) {
  5381. var e = HS(this, t).delete(t);
  5382. return this.size -= e ? 1 : 0, e;
  5383. }
  5384. function Lhe(t) {
  5385. return HS(this, t).get(t);
  5386. }
  5387. function Nhe(t) {
  5388. return HS(this, t).has(t);
  5389. }
  5390. function Bhe(t, e) {
  5391. var n = HS(this, t), r = n.size;
  5392. return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
  5393. }
  5394. function il(t) {
  5395. var e = -1, n = t == null ? 0 : t.length;
  5396. for (this.clear(); ++e < n; ) {
  5397. var r = t[e];
  5398. this.set(r[0], r[1]);
  5399. }
  5400. }
  5401. il.prototype.clear = Dhe;
  5402. il.prototype.delete = khe;
  5403. il.prototype.get = Lhe;
  5404. il.prototype.has = Nhe;
  5405. il.prototype.set = Bhe;
  5406. var zhe = 200;
  5407. function Vhe(t, e) {
  5408. var n = this.__data__;
  5409. if (n instanceof rl) {
  5410. var r = n.__data__;
  5411. if (!tm || r.length < zhe - 1)
  5412. return r.push([t, e]), this.size = ++n.size, this;
  5413. n = this.__data__ = new il(r);
  5414. }
  5415. return n.set(t, e), this.size = n.size, this;
  5416. }
  5417. function Ka(t) {
  5418. var e = this.__data__ = new rl(t);
  5419. this.size = e.size;
  5420. }
  5421. Ka.prototype.clear = Zde;
  5422. Ka.prototype.delete = Ude;
  5423. Ka.prototype.get = Xde;
  5424. Ka.prototype.has = Yde;
  5425. Ka.prototype.set = Vhe;
  5426. var Fhe = "__lodash_hash_undefined__";
  5427. function Whe(t) {
  5428. return this.__data__.set(t, Fhe), this;
  5429. }
  5430. function Qhe(t) {
  5431. return this.__data__.has(t);
  5432. }
  5433. function _h(t) {
  5434. var e = -1, n = t == null ? 0 : t.length;
  5435. for (this.__data__ = new il(); ++e < n; )
  5436. this.add(t[e]);
  5437. }
  5438. _h.prototype.add = _h.prototype.push = Whe;
  5439. _h.prototype.has = Qhe;
  5440. function Hhe(t, e) {
  5441. for (var n = -1, r = t == null ? 0 : t.length; ++n < r; )
  5442. if (e(t[n], n, t))
  5443. return !0;
  5444. return !1;
  5445. }
  5446. function x1(t, e) {
  5447. return t.has(e);
  5448. }
  5449. var Ghe = 1, jhe = 2;
  5450. function bZ(t, e, n, r, i, a) {
  5451. var o = n & Ghe, s = t.length, l = e.length;
  5452. if (s != l && !(o && l > s))
  5453. return !1;
  5454. var u = a.get(t), c = a.get(e);
  5455. if (u && c)
  5456. return u == e && c == t;
  5457. var f = -1, d = !0, h = n & jhe ? new _h() : void 0;
  5458. for (a.set(t, e), a.set(e, t); ++f < s; ) {
  5459. var p = t[f], v = e[f];
  5460. if (r)
  5461. var g = o ? r(v, p, f, e, t, a) : r(p, v, f, t, e, a);
  5462. if (g !== void 0) {
  5463. if (g)
  5464. continue;
  5465. d = !1;
  5466. break;
  5467. }
  5468. if (h) {
  5469. if (!Hhe(e, function(m, y) {
  5470. if (!x1(h, y) && (p === m || i(p, m, n, r, a)))
  5471. return h.push(y);
  5472. })) {
  5473. d = !1;
  5474. break;
  5475. }
  5476. } else if (!(p === v || i(p, v, n, r, a))) {
  5477. d = !1;
  5478. break;
  5479. }
  5480. }
  5481. return a.delete(t), a.delete(e), d;
  5482. }
  5483. var w1 = fo.Uint8Array;
  5484. function Zhe(t) {
  5485. var e = -1, n = Array(t.size);
  5486. return t.forEach(function(r, i) {
  5487. n[++e] = [i, r];
  5488. }), n;
  5489. }
  5490. function _I(t) {
  5491. var e = -1, n = Array(t.size);
  5492. return t.forEach(function(r) {
  5493. n[++e] = r;
  5494. }), n;
  5495. }
  5496. var Uhe = 1, Xhe = 2, Yhe = "[object Boolean]", qhe = "[object Date]", Khe = "[object Error]", Jhe = "[object Map]", epe = "[object Number]", tpe = "[object RegExp]", npe = "[object Set]", rpe = "[object String]", ipe = "[object Symbol]", ape = "[object ArrayBuffer]", ope = "[object DataView]", j8 = Ta ? Ta.prototype : void 0, dC = j8 ? j8.valueOf : void 0;
  5497. function spe(t, e, n, r, i, a, o) {
  5498. switch (n) {
  5499. case ope:
  5500. if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
  5501. return !1;
  5502. t = t.buffer, e = e.buffer;
  5503. case ape:
  5504. return !(t.byteLength != e.byteLength || !a(new w1(t), new w1(e)));
  5505. case Yhe:
  5506. case qhe:
  5507. case epe:
  5508. return p0(+t, +e);
  5509. case Khe:
  5510. return t.name == e.name && t.message == e.message;
  5511. case tpe:
  5512. case rpe:
  5513. return t == e + "";
  5514. case Jhe:
  5515. var s = Zhe;
  5516. case npe:
  5517. var l = r & Uhe;
  5518. if (s || (s = _I), t.size != e.size && !l)
  5519. return !1;
  5520. var u = o.get(t);
  5521. if (u)
  5522. return u == e;
  5523. r |= Xhe, o.set(t, e);
  5524. var c = bZ(s(t), s(e), r, i, a, o);
  5525. return o.delete(t), c;
  5526. case ipe:
  5527. if (dC)
  5528. return dC.call(t) == dC.call(e);
  5529. }
  5530. return !1;
  5531. }
  5532. function OI(t, e) {
  5533. for (var n = -1, r = e.length, i = t.length; ++n < r; )
  5534. t[i + n] = e[n];
  5535. return t;
  5536. }
  5537. var wi = Array.isArray;
  5538. function _Z(t, e, n) {
  5539. var r = e(t);
  5540. return wi(t) ? r : OI(r, n(t));
  5541. }
  5542. function lpe(t, e) {
  5543. for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
  5544. var o = t[n];
  5545. e(o, n, t) && (a[i++] = o);
  5546. }
  5547. return a;
  5548. }
  5549. function OZ() {
  5550. return [];
  5551. }
  5552. var upe = Object.prototype, cpe = upe.propertyIsEnumerable, Z8 = Object.getOwnPropertySymbols, SI = Z8 ? function(t) {
  5553. return t == null ? [] : (t = Object(t), lpe(Z8(t), function(e) {
  5554. return cpe.call(t, e);
  5555. }));
  5556. } : OZ;
  5557. function fpe(t, e) {
  5558. for (var n = -1, r = Array(t); ++n < t; )
  5559. r[n] = e(n);
  5560. return r;
  5561. }
  5562. function no(t) {
  5563. return t != null && typeof t == "object";
  5564. }
  5565. var dpe = "[object Arguments]";
  5566. function U8(t) {
  5567. return no(t) && bu(t) == dpe;
  5568. }
  5569. var SZ = Object.prototype, hpe = SZ.hasOwnProperty, ppe = SZ.propertyIsEnumerable, Oh = U8(/* @__PURE__ */ function() {
  5570. return arguments;
  5571. }()) ? U8 : function(t) {
  5572. return no(t) && hpe.call(t, "callee") && !ppe.call(t, "callee");
  5573. };
  5574. function vpe() {
  5575. return !1;
  5576. }
  5577. var xZ = typeof exports == "object" && exports && !exports.nodeType && exports, X8 = xZ && typeof module == "object" && module && !module.nodeType && module, gpe = X8 && X8.exports === xZ, Y8 = gpe ? fo.Buffer : void 0, mpe = Y8 ? Y8.isBuffer : void 0, Sh = mpe || vpe, ype = 9007199254740991, bpe = /^(?:0|[1-9]\d*)$/;
  5578. function GS(t, e) {
  5579. var n = typeof t;
  5580. return e = e ?? ype, !!e && (n == "number" || n != "symbol" && bpe.test(t)) && t > -1 && t % 1 == 0 && t < e;
  5581. }
  5582. var _pe = 9007199254740991;
  5583. function xI(t) {
  5584. return typeof t == "number" && t > -1 && t % 1 == 0 && t <= _pe;
  5585. }
  5586. var Ope = "[object Arguments]", Spe = "[object Array]", xpe = "[object Boolean]", wpe = "[object Date]", Cpe = "[object Error]", Tpe = "[object Function]", Ppe = "[object Map]", $pe = "[object Number]", Ape = "[object Object]", Epe = "[object RegExp]", Mpe = "[object Set]", Ipe = "[object String]", Dpe = "[object WeakMap]", Rpe = "[object ArrayBuffer]", kpe = "[object DataView]", Lpe = "[object Float32Array]", Npe = "[object Float64Array]", Bpe = "[object Int8Array]", zpe = "[object Int16Array]", Vpe = "[object Int32Array]", Fpe = "[object Uint8Array]", Wpe = "[object Uint8ClampedArray]", Qpe = "[object Uint16Array]", Hpe = "[object Uint32Array]", ln = {};
  5587. ln[Lpe] = ln[Npe] = ln[Bpe] = ln[zpe] = ln[Vpe] = ln[Fpe] = ln[Wpe] = ln[Qpe] = ln[Hpe] = !0;
  5588. ln[Ope] = ln[Spe] = ln[Rpe] = ln[xpe] = ln[kpe] = ln[wpe] = ln[Cpe] = ln[Tpe] = ln[Ppe] = ln[$pe] = ln[Ape] = ln[Epe] = ln[Mpe] = ln[Ipe] = ln[Dpe] = !1;
  5589. function Gpe(t) {
  5590. return no(t) && xI(t.length) && !!ln[bu(t)];
  5591. }
  5592. function jS(t) {
  5593. return function(e) {
  5594. return t(e);
  5595. };
  5596. }
  5597. var wZ = typeof exports == "object" && exports && !exports.nodeType && exports, sg = wZ && typeof module == "object" && module && !module.nodeType && module, jpe = sg && sg.exports === wZ, hC = jpe && mZ.process, xh = function() {
  5598. try {
  5599. var t = sg && sg.require && sg.require("util").types;
  5600. return t || hC && hC.binding && hC.binding("util");
  5601. } catch {
  5602. }
  5603. }(), q8 = xh && xh.isTypedArray, ZS = q8 ? jS(q8) : Gpe, Zpe = Object.prototype, Upe = Zpe.hasOwnProperty;
  5604. function CZ(t, e) {
  5605. var n = wi(t), r = !n && Oh(t), i = !n && !r && Sh(t), a = !n && !r && !i && ZS(t), o = n || r || i || a, s = o ? fpe(t.length, String) : [], l = s.length;
  5606. for (var u in t)
  5607. (e || Upe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
  5608. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  5609. i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  5610. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
  5611. GS(u, l))) && s.push(u);
  5612. return s;
  5613. }
  5614. var Xpe = Object.prototype;
  5615. function US(t) {
  5616. var e = t && t.constructor, n = typeof e == "function" && e.prototype || Xpe;
  5617. return t === n;
  5618. }
  5619. function TZ(t, e) {
  5620. return function(n) {
  5621. return t(e(n));
  5622. };
  5623. }
  5624. var Ype = TZ(Object.keys, Object), qpe = Object.prototype, Kpe = qpe.hasOwnProperty;
  5625. function PZ(t) {
  5626. if (!US(t))
  5627. return Ype(t);
  5628. var e = [];
  5629. for (var n in Object(t))
  5630. Kpe.call(t, n) && n != "constructor" && e.push(n);
  5631. return e;
  5632. }
  5633. function op(t) {
  5634. return t != null && xI(t.length) && !bI(t);
  5635. }
  5636. function v0(t) {
  5637. return op(t) ? CZ(t) : PZ(t);
  5638. }
  5639. function x2(t) {
  5640. return _Z(t, v0, SI);
  5641. }
  5642. var Jpe = 1, eve = Object.prototype, tve = eve.hasOwnProperty;
  5643. function nve(t, e, n, r, i, a) {
  5644. var o = n & Jpe, s = x2(t), l = s.length, u = x2(e), c = u.length;
  5645. if (l != c && !o)
  5646. return !1;
  5647. for (var f = l; f--; ) {
  5648. var d = s[f];
  5649. if (!(o ? d in e : tve.call(e, d)))
  5650. return !1;
  5651. }
  5652. var h = a.get(t), p = a.get(e);
  5653. if (h && p)
  5654. return h == e && p == t;
  5655. var v = !0;
  5656. a.set(t, e), a.set(e, t);
  5657. for (var g = o; ++f < l; ) {
  5658. d = s[f];
  5659. var m = t[d], y = e[d];
  5660. if (r)
  5661. var b = o ? r(y, m, d, e, t, a) : r(m, y, d, t, e, a);
  5662. if (!(b === void 0 ? m === y || i(m, y, n, r, a) : b)) {
  5663. v = !1;
  5664. break;
  5665. }
  5666. g || (g = d == "constructor");
  5667. }
  5668. if (v && !g) {
  5669. var _ = t.constructor, O = e.constructor;
  5670. _ != O && "constructor" in t && "constructor" in e && !(typeof _ == "function" && _ instanceof _ && typeof O == "function" && O instanceof O) && (v = !1);
  5671. }
  5672. return a.delete(t), a.delete(e), v;
  5673. }
  5674. var w2 = Mf(fo, "DataView"), C2 = Mf(fo, "Promise"), Zd = Mf(fo, "Set"), T2 = Mf(fo, "WeakMap"), K8 = "[object Map]", rve = "[object Object]", J8 = "[object Promise]", eN = "[object Set]", tN = "[object WeakMap]", nN = "[object DataView]", ive = Ef(w2), ave = Ef(tm), ove = Ef(C2), sve = Ef(Zd), lve = Ef(T2), da = bu;
  5675. (w2 && da(new w2(new ArrayBuffer(1))) != nN || tm && da(new tm()) != K8 || C2 && da(C2.resolve()) != J8 || Zd && da(new Zd()) != eN || T2 && da(new T2()) != tN) && (da = function(t) {
  5676. var e = bu(t), n = e == rve ? t.constructor : void 0, r = n ? Ef(n) : "";
  5677. if (r)
  5678. switch (r) {
  5679. case ive:
  5680. return nN;
  5681. case ave:
  5682. return K8;
  5683. case ove:
  5684. return J8;
  5685. case sve:
  5686. return eN;
  5687. case lve:
  5688. return tN;
  5689. }
  5690. return e;
  5691. });
  5692. var uve = 1, rN = "[object Arguments]", iN = "[object Array]", Py = "[object Object]", cve = Object.prototype, aN = cve.hasOwnProperty;
  5693. function fve(t, e, n, r, i, a) {
  5694. var o = wi(t), s = wi(e), l = o ? iN : da(t), u = s ? iN : da(e);
  5695. l = l == rN ? Py : l, u = u == rN ? Py : u;
  5696. var c = l == Py, f = u == Py, d = l == u;
  5697. if (d && Sh(t)) {
  5698. if (!Sh(e))
  5699. return !1;
  5700. o = !0, c = !1;
  5701. }
  5702. if (d && !c)
  5703. return a || (a = new Ka()), o || ZS(t) ? bZ(t, e, n, r, i, a) : spe(t, e, l, n, r, i, a);
  5704. if (!(n & uve)) {
  5705. var h = c && aN.call(t, "__wrapped__"), p = f && aN.call(e, "__wrapped__");
  5706. if (h || p) {
  5707. var v = h ? t.value() : t, g = p ? e.value() : e;
  5708. return a || (a = new Ka()), i(v, g, n, r, a);
  5709. }
  5710. }
  5711. return d ? (a || (a = new Ka()), nve(t, e, n, r, i, a)) : !1;
  5712. }
  5713. function XS(t, e, n, r, i) {
  5714. return t === e ? !0 : t == null || e == null || !no(t) && !no(e) ? t !== t && e !== e : fve(t, e, n, r, XS, i);
  5715. }
  5716. function YS(t, e) {
  5717. return XS(t, e);
  5718. }
  5719. const dve = {
  5720. align: Object,
  5721. target: [Object, Function],
  5722. onAlign: Function,
  5723. monitorBufferTime: Number,
  5724. monitorWindowResize: Boolean,
  5725. disabled: Boolean
  5726. };
  5727. function oN(t) {
  5728. return typeof t != "function" ? null : t();
  5729. }
  5730. function sN(t) {
  5731. return typeof t != "object" || !t ? null : t;
  5732. }
  5733. const hve = te({
  5734. compatConfig: {
  5735. MODE: 3
  5736. },
  5737. name: "Align",
  5738. props: dve,
  5739. emits: ["align"],
  5740. setup(t, e) {
  5741. let {
  5742. expose: n,
  5743. slots: r
  5744. } = e;
  5745. const i = U({}), a = U(), [o, s] = zde(() => {
  5746. const {
  5747. disabled: d,
  5748. target: h,
  5749. align: p,
  5750. onAlign: v
  5751. } = t;
  5752. if (!d && h && a.value) {
  5753. const g = a.value;
  5754. let m;
  5755. const y = oN(h), b = sN(h);
  5756. i.value.element = y, i.value.point = b, i.value.align = p;
  5757. const {
  5758. activeElement: _
  5759. } = document;
  5760. return y && gZ(y) ? m = yI(g, y, p) : b && (m = kde(g, b, p)), Bde(_, g), v && m && v(g, m), !0;
  5761. }
  5762. return !1;
  5763. }, L(() => t.monitorBufferTime)), l = U({
  5764. cancel: () => {
  5765. }
  5766. }), u = U({
  5767. cancel: () => {
  5768. }
  5769. }), c = () => {
  5770. const d = t.target, h = oN(d), p = sN(d);
  5771. a.value !== u.value.element && (u.value.cancel(), u.value.element = a.value, u.value.cancel = Q8(a.value, o)), (i.value.element !== h || !Nde(i.value.point, p) || !YS(i.value.align, t.align)) && (o(), l.value.element !== h && (l.value.cancel(), l.value.element = h, l.value.cancel = Q8(h, o)));
  5772. };
  5773. it(() => {
  5774. Tt(() => {
  5775. c();
  5776. });
  5777. }), ep(() => {
  5778. Tt(() => {
  5779. c();
  5780. });
  5781. }), se(() => t.disabled, (d) => {
  5782. d ? s() : o();
  5783. }, {
  5784. immediate: !0,
  5785. flush: "post"
  5786. });
  5787. const f = U(null);
  5788. return se(() => t.monitorWindowResize, (d) => {
  5789. d ? f.value || (f.value = vr(window, "resize", o)) : f.value && (f.value.remove(), f.value = null);
  5790. }, {
  5791. flush: "post"
  5792. }), nl(() => {
  5793. l.value.cancel(), u.value.cancel(), f.value && f.value.remove(), s();
  5794. }), n({
  5795. forceAlign: () => o(!0)
  5796. }), () => {
  5797. const d = r == null ? void 0 : r.default();
  5798. return d ? Pn(d[0], {
  5799. ref: a
  5800. }, !0, !0) : null;
  5801. };
  5802. }
  5803. });
  5804. ru("bottomLeft", "bottomRight", "topLeft", "topRight");
  5805. const pve = (t) => t !== void 0 && (t === "topLeft" || t === "topRight") ? "slide-down" : "slide-up", g0 = function(t) {
  5806. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  5807. return I(t ? {
  5808. name: t,
  5809. appear: !0,
  5810. // type: 'animation',
  5811. // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
  5812. // appearActiveClass: `antdv-base-transtion`,
  5813. // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
  5814. enterFromClass: `${t}-enter ${t}-enter-prepare ${t}-enter-start`,
  5815. enterActiveClass: `${t}-enter ${t}-enter-prepare`,
  5816. enterToClass: `${t}-enter ${t}-enter-active`,
  5817. leaveFromClass: ` ${t}-leave`,
  5818. leaveActiveClass: `${t}-leave ${t}-leave-active`,
  5819. leaveToClass: `${t}-leave ${t}-leave-active`
  5820. } : {
  5821. css: !1
  5822. }, e);
  5823. }, wI = function(t) {
  5824. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  5825. return I(t ? {
  5826. name: t,
  5827. appear: !0,
  5828. // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
  5829. appearActiveClass: `${t}`,
  5830. appearToClass: `${t}-appear ${t}-appear-active`,
  5831. enterFromClass: `${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,
  5832. enterActiveClass: `${t}`,
  5833. enterToClass: `${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,
  5834. leaveActiveClass: `${t} ${t}-leave`,
  5835. leaveToClass: `${t}-leave-active`
  5836. } : {
  5837. css: !1
  5838. }, e);
  5839. }, es = (t, e, n) => n !== void 0 ? n : `${t}-${e}`, vve = te({
  5840. compatConfig: {
  5841. MODE: 3
  5842. },
  5843. name: "PopupInner",
  5844. inheritAttrs: !1,
  5845. props: dI,
  5846. emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  5847. setup(t, e) {
  5848. let {
  5849. expose: n,
  5850. attrs: r,
  5851. slots: i
  5852. } = e;
  5853. const a = ae(), o = ae(), s = ae(), [l, u] = lde(Nn(t, "stretch")), c = () => {
  5854. t.stretch && u(t.getRootDomNode());
  5855. }, f = ae(!1);
  5856. let d;
  5857. se(() => t.visible, (S) => {
  5858. clearTimeout(d), S ? d = setTimeout(() => {
  5859. f.value = t.visible;
  5860. }) : f.value = !1;
  5861. }, {
  5862. immediate: !0
  5863. });
  5864. const [h, p] = sde(f, c), v = ae(), g = () => t.point ? t.point : t.getRootDomNode, m = () => {
  5865. var S;
  5866. (S = a.value) === null || S === void 0 || S.forceAlign();
  5867. }, y = (S, x) => {
  5868. var C;
  5869. const T = t.getClassNameFromAlign(x), w = s.value;
  5870. s.value !== T && (s.value = T), h.value === "align" && (w !== T ? Promise.resolve().then(() => {
  5871. m();
  5872. }) : p(() => {
  5873. var P;
  5874. (P = v.value) === null || P === void 0 || P.call(v);
  5875. }), (C = t.onAlign) === null || C === void 0 || C.call(t, S, x));
  5876. }, b = L(() => {
  5877. const S = typeof t.animation == "object" ? t.animation : hI(t);
  5878. return ["onAfterEnter", "onAfterLeave"].forEach((x) => {
  5879. const C = S[x];
  5880. S[x] = (T) => {
  5881. p(), h.value = "stable", C == null || C(T);
  5882. };
  5883. }), S;
  5884. }), _ = () => new Promise((S) => {
  5885. v.value = S;
  5886. });
  5887. se([b, h], () => {
  5888. !b.value && h.value === "motion" && p();
  5889. }, {
  5890. immediate: !0
  5891. }), n({
  5892. forceAlign: m,
  5893. getElement: () => o.value.$el || o.value
  5894. });
  5895. const O = L(() => {
  5896. var S;
  5897. return !(!((S = t.align) === null || S === void 0) && S.points && (h.value === "align" || h.value === "stable"));
  5898. });
  5899. return () => {
  5900. var S;
  5901. const {
  5902. zIndex: x,
  5903. align: C,
  5904. prefixCls: T,
  5905. destroyPopupOnHide: w,
  5906. onMouseenter: P,
  5907. onMouseleave: $,
  5908. onTouchstart: A = () => {
  5909. },
  5910. onMousedown: D
  5911. } = t, E = h.value, R = [I(I({}, l.value), {
  5912. zIndex: x,
  5913. opacity: E === "motion" || E === "stable" || !f.value ? null : 0,
  5914. // pointerEvents: statusValue === 'stable' ? null : 'none',
  5915. pointerEvents: !f.value && E !== "stable" ? "none" : null
  5916. }), r.style];
  5917. let N = Yn((S = i.default) === null || S === void 0 ? void 0 : S.call(i, {
  5918. visible: t.visible
  5919. }));
  5920. N.length > 1 && (N = M("div", {
  5921. class: `${T}-content`
  5922. }, [N]));
  5923. const V = ye(T, r.class, s.value, !t.arrow && `${T}-arrow-hidden`), W = f.value || !t.visible ? g0(b.value.name, b.value) : {};
  5924. return M(co, j(j({
  5925. ref: o
  5926. }, W), {}, {
  5927. onBeforeEnter: _
  5928. }), {
  5929. default: () => !w || t.visible ? bi(M(hve, {
  5930. target: g(),
  5931. key: "popup",
  5932. ref: a,
  5933. monitorWindowResize: !0,
  5934. disabled: O.value,
  5935. align: C,
  5936. onAlign: y
  5937. }, {
  5938. default: () => M("div", {
  5939. class: V,
  5940. onMouseenter: P,
  5941. onMouseleave: $,
  5942. onMousedown: lf(D, ["capture"]),
  5943. [pr ? "onTouchstartPassive" : "onTouchstart"]: lf(A, ["capture"]),
  5944. style: R
  5945. }, [N])
  5946. }), [[Bs, f.value]]) : null
  5947. });
  5948. };
  5949. }
  5950. }), gve = te({
  5951. compatConfig: {
  5952. MODE: 3
  5953. },
  5954. name: "Popup",
  5955. inheritAttrs: !1,
  5956. props: ide,
  5957. setup(t, e) {
  5958. let {
  5959. attrs: n,
  5960. slots: r,
  5961. expose: i
  5962. } = e;
  5963. const a = ae(!1), o = ae(!1), s = ae(), l = ae();
  5964. return se([() => t.visible, () => t.mobile], () => {
  5965. a.value = t.visible, t.visible && t.mobile && (o.value = !0);
  5966. }, {
  5967. immediate: !0,
  5968. flush: "post"
  5969. }), i({
  5970. forceAlign: () => {
  5971. var u;
  5972. (u = s.value) === null || u === void 0 || u.forceAlign();
  5973. },
  5974. getElement: () => {
  5975. var u;
  5976. return (u = s.value) === null || u === void 0 ? void 0 : u.getElement();
  5977. }
  5978. }), () => {
  5979. const u = I(I(I({}, t), n), {
  5980. visible: a.value
  5981. }), c = o.value ? M(ade, j(j({}, u), {}, {
  5982. mobile: t.mobile,
  5983. ref: s
  5984. }), {
  5985. default: r.default
  5986. }) : M(vve, j(j({}, u), {}, {
  5987. ref: s
  5988. }), {
  5989. default: r.default
  5990. });
  5991. return M("div", {
  5992. ref: l
  5993. }, [M(sZ, u, null), c]);
  5994. };
  5995. }
  5996. });
  5997. function mve(t, e, n) {
  5998. return n ? t[0] === e[0] : t[0] === e[0] && t[1] === e[1];
  5999. }
  6000. function lN(t, e, n) {
  6001. const r = t[e] || {};
  6002. return I(I({}, r), n);
  6003. }
  6004. function yve(t, e, n, r) {
  6005. const {
  6006. points: i
  6007. } = n, a = Object.keys(t);
  6008. for (let o = 0; o < a.length; o += 1) {
  6009. const s = a[o];
  6010. if (mve(t[s].points, i, r))
  6011. return `${e}-placement-${s}`;
  6012. }
  6013. return "";
  6014. }
  6015. const qS = {
  6016. methods: {
  6017. setState() {
  6018. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 ? arguments[1] : void 0, n = typeof t == "function" ? t(this.$data, this.$props) : t;
  6019. if (this.getDerivedStateFromProps) {
  6020. const r = this.getDerivedStateFromProps(Aue(this), I(I({}, this.$data), n));
  6021. if (r === null)
  6022. return;
  6023. n = I(I({}, n), r || {});
  6024. }
  6025. I(this.$data, n), this._.isMounted && this.$forceUpdate(), Tt(() => {
  6026. e && e();
  6027. });
  6028. },
  6029. __emit() {
  6030. const t = [].slice.call(arguments, 0);
  6031. let e = t[0];
  6032. e = `on${e[0].toUpperCase()}${e.substring(1)}`;
  6033. const n = this.$props[e] || this.$attrs[e];
  6034. if (t.length && n)
  6035. if (Array.isArray(n))
  6036. for (let r = 0, i = n.length; r < i; r++)
  6037. n[r](...t.slice(1));
  6038. else
  6039. n(...t.slice(1));
  6040. }
  6041. }
  6042. }, $Z = Symbol("PortalContextKey"), CI = function(t) {
  6043. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
  6044. inTriggerContext: !0
  6045. };
  6046. pt($Z, {
  6047. inTriggerContext: e.inTriggerContext,
  6048. shouldRender: L(() => {
  6049. const {
  6050. sPopupVisible: n,
  6051. popupRef: r,
  6052. forceRender: i,
  6053. autoDestroy: a
  6054. } = t || {};
  6055. let o = !1;
  6056. return (n || r || i) && (o = !0), !n && a && (o = !1), o;
  6057. })
  6058. });
  6059. }, bve = () => {
  6060. CI({}, {
  6061. inTriggerContext: !1
  6062. });
  6063. const t = Ge($Z, {
  6064. shouldRender: L(() => !1),
  6065. inTriggerContext: !1
  6066. });
  6067. return {
  6068. shouldRender: L(() => t.shouldRender.value || t.inTriggerContext === !1)
  6069. };
  6070. }, AZ = te({
  6071. compatConfig: {
  6072. MODE: 3
  6073. },
  6074. name: "Portal",
  6075. inheritAttrs: !1,
  6076. props: {
  6077. getContainer: Y.func.isRequired,
  6078. didUpdate: Function
  6079. },
  6080. setup(t, e) {
  6081. let {
  6082. slots: n
  6083. } = e, r = !0, i;
  6084. const {
  6085. shouldRender: a
  6086. } = bve();
  6087. function o() {
  6088. a.value && (i = t.getContainer());
  6089. }
  6090. HG(() => {
  6091. r = !1, o();
  6092. }), it(() => {
  6093. i || o();
  6094. });
  6095. const s = se(a, () => {
  6096. a.value && !i && (i = t.getContainer()), i && s();
  6097. });
  6098. return ep(() => {
  6099. Tt(() => {
  6100. var l;
  6101. a.value && ((l = t.didUpdate) === null || l === void 0 || l.call(t, t));
  6102. });
  6103. }), () => {
  6104. var l;
  6105. return a.value ? r ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : i ? M(PS, {
  6106. to: i
  6107. }, n) : null : null;
  6108. };
  6109. }
  6110. });
  6111. let pC;
  6112. function _ve(t) {
  6113. if (typeof document > "u")
  6114. return 0;
  6115. if (pC === void 0) {
  6116. const e = document.createElement("div");
  6117. e.style.width = "100%", e.style.height = "200px";
  6118. const n = document.createElement("div"), r = n.style;
  6119. r.position = "absolute", r.top = "0", r.left = "0", r.pointerEvents = "none", r.visibility = "hidden", r.width = "200px", r.height = "150px", r.overflow = "hidden", n.appendChild(e), document.body.appendChild(n);
  6120. const i = e.offsetWidth;
  6121. n.style.overflow = "scroll";
  6122. let a = e.offsetWidth;
  6123. i === a && (a = n.clientWidth), document.body.removeChild(n), pC = i - a;
  6124. }
  6125. return pC;
  6126. }
  6127. const Ove = `vc-util-locker-${Date.now()}`;
  6128. let uN = 0;
  6129. function Sve() {
  6130. return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
  6131. }
  6132. function xve(t) {
  6133. const e = L(() => !!t && !!t.value);
  6134. uN += 1;
  6135. const n = `${Ove}_${uN}`;
  6136. ht((r) => {
  6137. if (wa()) {
  6138. if (e.value) {
  6139. const i = _ve(), a = Sve();
  6140. Yg(`
  6141. html body {
  6142. overflow-y: hidden;
  6143. ${a ? `width: calc(100% - ${i}px);` : ""}
  6144. }`, n);
  6145. } else
  6146. m1(n);
  6147. r(() => {
  6148. m1(n);
  6149. });
  6150. }
  6151. }, {
  6152. flush: "post"
  6153. });
  6154. }
  6155. let Ru = 0;
  6156. const x_ = wa(), cN = (t) => {
  6157. if (!x_)
  6158. return null;
  6159. if (t) {
  6160. if (typeof t == "string")
  6161. return document.querySelectorAll(t)[0];
  6162. if (typeof t == "function")
  6163. return t();
  6164. if (typeof t == "object" && t instanceof window.HTMLElement)
  6165. return t;
  6166. }
  6167. return document.body;
  6168. }, EZ = te({
  6169. compatConfig: {
  6170. MODE: 3
  6171. },
  6172. name: "PortalWrapper",
  6173. inheritAttrs: !1,
  6174. props: {
  6175. wrapperClassName: String,
  6176. forceRender: {
  6177. type: Boolean,
  6178. default: void 0
  6179. },
  6180. getContainer: Y.any,
  6181. visible: {
  6182. type: Boolean,
  6183. default: void 0
  6184. },
  6185. autoLock: nt(),
  6186. didUpdate: Function
  6187. },
  6188. setup(t, e) {
  6189. let {
  6190. slots: n
  6191. } = e;
  6192. const r = ae(), i = ae(), a = ae(), o = ae(1), s = wa() && document.createElement("div"), l = () => {
  6193. var h, p;
  6194. r.value === s && ((p = (h = r.value) === null || h === void 0 ? void 0 : h.parentNode) === null || p === void 0 || p.removeChild(r.value)), r.value = null;
  6195. };
  6196. let u = null;
  6197. const c = function() {
  6198. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || r.value && !r.value.parentNode ? (u = cN(t.getContainer), u ? (u.appendChild(r.value), !0) : !1) : !0;
  6199. }, f = () => x_ ? (r.value || (r.value = s, c(!0)), d(), r.value) : null, d = () => {
  6200. const {
  6201. wrapperClassName: h
  6202. } = t;
  6203. r.value && h && h !== r.value.className && (r.value.className = h);
  6204. };
  6205. return ep(() => {
  6206. d(), c();
  6207. }), xve(L(() => t.autoLock && t.visible && wa() && (r.value === document.body || r.value === s))), it(() => {
  6208. let h = !1;
  6209. se([() => t.visible, () => t.getContainer], (p, v) => {
  6210. let [g, m] = p, [y, b] = v;
  6211. x_ && (u = cN(t.getContainer), u === document.body && (g && !y ? Ru += 1 : h && (Ru -= 1))), h && (typeof m == "function" && typeof b == "function" ? m.toString() !== b.toString() : m !== b) && l(), h = !0;
  6212. }, {
  6213. immediate: !0,
  6214. flush: "post"
  6215. }), Tt(() => {
  6216. c() || (a.value = xt(() => {
  6217. o.value += 1;
  6218. }));
  6219. });
  6220. }), yt(() => {
  6221. const {
  6222. visible: h
  6223. } = t;
  6224. x_ && u === document.body && (Ru = h && Ru ? Ru - 1 : Ru), l(), xt.cancel(a.value);
  6225. }), () => {
  6226. const {
  6227. forceRender: h,
  6228. visible: p
  6229. } = t;
  6230. let v = null;
  6231. const g = {
  6232. getOpenCount: () => Ru,
  6233. getContainer: f
  6234. };
  6235. return o.value && (h || p || i.value) && (v = M(AZ, {
  6236. getContainer: f,
  6237. ref: i,
  6238. didUpdate: t.didUpdate
  6239. }, {
  6240. default: () => {
  6241. var m;
  6242. return (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g);
  6243. }
  6244. })), v;
  6245. };
  6246. }
  6247. }), wve = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], KS = te({
  6248. compatConfig: {
  6249. MODE: 3
  6250. },
  6251. name: "Trigger",
  6252. mixins: [qS],
  6253. inheritAttrs: !1,
  6254. props: nde(),
  6255. setup(t) {
  6256. const e = L(() => {
  6257. const {
  6258. popupPlacement: i,
  6259. popupAlign: a,
  6260. builtinPlacements: o
  6261. } = t;
  6262. return i && o ? lN(o, i, a) : a;
  6263. }), n = ae(null), r = (i) => {
  6264. n.value = i;
  6265. };
  6266. return {
  6267. vcTriggerContext: Ge("vcTriggerContext", {}),
  6268. popupRef: n,
  6269. setPopupRef: r,
  6270. triggerRef: ae(null),
  6271. align: e,
  6272. focusTime: null,
  6273. clickOutsideHandler: null,
  6274. contextmenuOutsideHandler1: null,
  6275. contextmenuOutsideHandler2: null,
  6276. touchOutsideHandler: null,
  6277. attachId: null,
  6278. delayTimer: null,
  6279. hasPopupMouseDown: !1,
  6280. preClickTime: null,
  6281. preTouchTime: null,
  6282. mouseDownTimeout: null,
  6283. childOriginEvents: {}
  6284. };
  6285. },
  6286. data() {
  6287. const t = this.$props;
  6288. let e;
  6289. return this.popupVisible !== void 0 ? e = !!t.popupVisible : e = !!t.defaultPopupVisible, wve.forEach((n) => {
  6290. this[`fire${n}`] = (r) => {
  6291. this.fireEvents(n, r);
  6292. };
  6293. }), {
  6294. prevPopupVisible: e,
  6295. sPopupVisible: e,
  6296. point: null
  6297. };
  6298. },
  6299. watch: {
  6300. popupVisible(t) {
  6301. t !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = t);
  6302. }
  6303. },
  6304. created() {
  6305. pt("vcTriggerContext", {
  6306. onPopupMouseDown: this.onPopupMouseDown,
  6307. onPopupMouseenter: this.onPopupMouseenter,
  6308. onPopupMouseleave: this.onPopupMouseleave
  6309. }), CI(this);
  6310. },
  6311. deactivated() {
  6312. this.setPopupVisible(!1);
  6313. },
  6314. mounted() {
  6315. this.$nextTick(() => {
  6316. this.updatedCal();
  6317. });
  6318. },
  6319. updated() {
  6320. this.$nextTick(() => {
  6321. this.updatedCal();
  6322. });
  6323. },
  6324. beforeUnmount() {
  6325. this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), xt.cancel(this.attachId);
  6326. },
  6327. methods: {
  6328. updatedCal() {
  6329. const t = this.$props;
  6330. if (this.$data.sPopupVisible) {
  6331. let n;
  6332. !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = t.getDocument(this.getRootDomNode()), this.clickOutsideHandler = vr(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || t.getDocument(this.getRootDomNode()), this.touchOutsideHandler = vr(n, "touchstart", this.onDocumentClick, pr ? {
  6333. passive: !1
  6334. } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || t.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = vr(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = vr(window, "blur", this.onContextmenuClose));
  6335. } else
  6336. this.clearOutsideHandler();
  6337. },
  6338. onMouseenter(t) {
  6339. const {
  6340. mouseEnterDelay: e
  6341. } = this.$props;
  6342. this.fireEvents("onMouseenter", t), this.delaySetPopupVisible(!0, e, e ? null : t);
  6343. },
  6344. onMouseMove(t) {
  6345. this.fireEvents("onMousemove", t), this.setPoint(t);
  6346. },
  6347. onMouseleave(t) {
  6348. this.fireEvents("onMouseleave", t), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
  6349. },
  6350. onPopupMouseenter() {
  6351. const {
  6352. vcTriggerContext: t = {}
  6353. } = this;
  6354. t.onPopupMouseenter && t.onPopupMouseenter(), this.clearDelayTimer();
  6355. },
  6356. onPopupMouseleave(t) {
  6357. var e;
  6358. if (t && t.relatedTarget && !t.relatedTarget.setTimeout && $l((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement(), t.relatedTarget))
  6359. return;
  6360. this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
  6361. const {
  6362. vcTriggerContext: n = {}
  6363. } = this;
  6364. n.onPopupMouseleave && n.onPopupMouseleave(t);
  6365. },
  6366. onFocus(t) {
  6367. this.fireEvents("onFocus", t), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
  6368. },
  6369. onMousedown(t) {
  6370. this.fireEvents("onMousedown", t), this.preClickTime = Date.now();
  6371. },
  6372. onTouchstart(t) {
  6373. this.fireEvents("onTouchstart", t), this.preTouchTime = Date.now();
  6374. },
  6375. onBlur(t) {
  6376. $l(t.target, t.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", t), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
  6377. },
  6378. onContextmenu(t) {
  6379. t.preventDefault(), this.fireEvents("onContextmenu", t), this.setPopupVisible(!0, t);
  6380. },
  6381. onContextmenuClose() {
  6382. this.isContextmenuToShow() && this.close();
  6383. },
  6384. onClick(t) {
  6385. if (this.fireEvents("onClick", t), this.focusTime) {
  6386. let n;
  6387. if (this.preClickTime && this.preTouchTime ? n = Math.min(this.preClickTime, this.preTouchTime) : this.preClickTime ? n = this.preClickTime : this.preTouchTime && (n = this.preTouchTime), Math.abs(n - this.focusTime) < 20)
  6388. return;
  6389. this.focusTime = 0;
  6390. }
  6391. this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && t && t.preventDefault && t.preventDefault(), t && t.domEvent && t.domEvent.preventDefault();
  6392. const e = !this.$data.sPopupVisible;
  6393. (this.isClickToHide() && !e || e && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, t);
  6394. },
  6395. onPopupMouseDown() {
  6396. const {
  6397. vcTriggerContext: t = {}
  6398. } = this;
  6399. this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
  6400. this.hasPopupMouseDown = !1;
  6401. }, 0), t.onPopupMouseDown && t.onPopupMouseDown(...arguments);
  6402. },
  6403. onDocumentClick(t) {
  6404. if (this.$props.mask && !this.$props.maskClosable)
  6405. return;
  6406. const e = t.target, n = this.getRootDomNode(), r = this.getPopupDomNode();
  6407. // mousedown on the target should also close popup when action is contextMenu.
  6408. // https://github.com/ant-design/ant-design/issues/29853
  6409. (!$l(n, e) || this.isContextMenuOnly()) && !$l(r, e) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
  6410. },
  6411. getPopupDomNode() {
  6412. var t;
  6413. return ((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement()) || null;
  6414. },
  6415. getRootDomNode() {
  6416. var t, e, n, r;
  6417. const {
  6418. getTriggerDOMNode: i
  6419. } = this.$props;
  6420. if (i) {
  6421. const a = ((e = (t = this.triggerRef) === null || t === void 0 ? void 0 : t.$el) === null || e === void 0 ? void 0 : e.nodeName) === "#comment" ? null : Cs(this.triggerRef);
  6422. return Cs(i(a));
  6423. }
  6424. try {
  6425. const a = ((r = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || r === void 0 ? void 0 : r.nodeName) === "#comment" ? null : Cs(this.triggerRef);
  6426. if (a)
  6427. return a;
  6428. } catch {
  6429. }
  6430. return Cs(this);
  6431. },
  6432. handleGetPopupClassFromAlign(t) {
  6433. const e = [], n = this.$props, {
  6434. popupPlacement: r,
  6435. builtinPlacements: i,
  6436. prefixCls: a,
  6437. alignPoint: o,
  6438. getPopupClassNameFromAlign: s
  6439. } = n;
  6440. return r && i && e.push(yve(i, a, t, o)), s && e.push(s(t)), e.join(" ");
  6441. },
  6442. getPopupAlign() {
  6443. const t = this.$props, {
  6444. popupPlacement: e,
  6445. popupAlign: n,
  6446. builtinPlacements: r
  6447. } = t;
  6448. return e && r ? lN(r, e, n) : n;
  6449. },
  6450. getComponent() {
  6451. const t = {};
  6452. this.isMouseEnterToShow() && (t.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (t.onMouseleave = this.onPopupMouseleave), t.onMousedown = this.onPopupMouseDown, t[pr ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
  6453. const {
  6454. handleGetPopupClassFromAlign: e,
  6455. getRootDomNode: n,
  6456. $attrs: r
  6457. } = this, {
  6458. prefixCls: i,
  6459. destroyPopupOnHide: a,
  6460. popupClassName: o,
  6461. popupAnimation: s,
  6462. popupTransitionName: l,
  6463. popupStyle: u,
  6464. mask: c,
  6465. maskAnimation: f,
  6466. maskTransitionName: d,
  6467. zIndex: h,
  6468. stretch: p,
  6469. alignPoint: v,
  6470. mobile: g,
  6471. arrow: m,
  6472. forceRender: y
  6473. } = this.$props, {
  6474. sPopupVisible: b,
  6475. point: _
  6476. } = this.$data, O = I(I({
  6477. prefixCls: i,
  6478. arrow: m,
  6479. destroyPopupOnHide: a,
  6480. visible: b,
  6481. point: v ? _ : null,
  6482. align: this.align,
  6483. animation: s,
  6484. getClassNameFromAlign: e,
  6485. stretch: p,
  6486. getRootDomNode: n,
  6487. mask: c,
  6488. zIndex: h,
  6489. transitionName: l,
  6490. maskAnimation: f,
  6491. maskTransitionName: d,
  6492. class: o,
  6493. style: u,
  6494. onAlign: r.onPopupAlign || oZ
  6495. }, t), {
  6496. ref: this.setPopupRef,
  6497. mobile: g,
  6498. forceRender: y
  6499. });
  6500. return M(gve, O, {
  6501. default: this.$slots.popup || (() => Eue(this, "popup"))
  6502. });
  6503. },
  6504. attachParent(t) {
  6505. xt.cancel(this.attachId);
  6506. const {
  6507. getPopupContainer: e,
  6508. getDocument: n
  6509. } = this.$props, r = this.getRootDomNode();
  6510. let i;
  6511. e ? (r || e.length === 0) && (i = e(r)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(t) : this.attachId = xt(() => {
  6512. this.attachParent(t);
  6513. });
  6514. },
  6515. getContainer() {
  6516. const {
  6517. $props: t
  6518. } = this, {
  6519. getDocument: e
  6520. } = t, n = e(this.getRootDomNode()).createElement("div");
  6521. return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
  6522. },
  6523. setPopupVisible(t, e) {
  6524. const {
  6525. alignPoint: n,
  6526. sPopupVisible: r,
  6527. onPopupVisibleChange: i
  6528. } = this;
  6529. this.clearDelayTimer(), r !== t && (v1(this, "popupVisible") || this.setState({
  6530. sPopupVisible: t,
  6531. prevPopupVisible: r
  6532. }), i && i(t)), n && e && t && this.setPoint(e);
  6533. },
  6534. setPoint(t) {
  6535. const {
  6536. alignPoint: e
  6537. } = this.$props;
  6538. !e || !t || this.setState({
  6539. point: {
  6540. pageX: t.pageX,
  6541. pageY: t.pageY
  6542. }
  6543. });
  6544. },
  6545. handlePortalUpdate() {
  6546. this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
  6547. },
  6548. delaySetPopupVisible(t, e, n) {
  6549. const r = e * 1e3;
  6550. if (this.clearDelayTimer(), r) {
  6551. const i = n ? {
  6552. pageX: n.pageX,
  6553. pageY: n.pageY
  6554. } : null;
  6555. this.delayTimer = setTimeout(() => {
  6556. this.setPopupVisible(t, i), this.clearDelayTimer();
  6557. }, r);
  6558. } else
  6559. this.setPopupVisible(t, n);
  6560. },
  6561. clearDelayTimer() {
  6562. this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
  6563. },
  6564. clearOutsideHandler() {
  6565. this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextmenuOutsideHandler1 && (this.contextmenuOutsideHandler1.remove(), this.contextmenuOutsideHandler1 = null), this.contextmenuOutsideHandler2 && (this.contextmenuOutsideHandler2.remove(), this.contextmenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
  6566. },
  6567. createTwoChains(t) {
  6568. let e = () => {
  6569. };
  6570. const n = e8(this);
  6571. return this.childOriginEvents[t] && n[t] ? this[`fire${t}`] : (e = this.childOriginEvents[t] || n[t] || e, e);
  6572. },
  6573. isClickToShow() {
  6574. const {
  6575. action: t,
  6576. showAction: e
  6577. } = this.$props;
  6578. return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
  6579. },
  6580. isContextMenuOnly() {
  6581. const {
  6582. action: t
  6583. } = this.$props;
  6584. return t === "contextmenu" || t.length === 1 && t[0] === "contextmenu";
  6585. },
  6586. isContextmenuToShow() {
  6587. const {
  6588. action: t,
  6589. showAction: e
  6590. } = this.$props;
  6591. return t.indexOf("contextmenu") !== -1 || e.indexOf("contextmenu") !== -1;
  6592. },
  6593. isClickToHide() {
  6594. const {
  6595. action: t,
  6596. hideAction: e
  6597. } = this.$props;
  6598. return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
  6599. },
  6600. isMouseEnterToShow() {
  6601. const {
  6602. action: t,
  6603. showAction: e
  6604. } = this.$props;
  6605. return t.indexOf("hover") !== -1 || e.indexOf("mouseenter") !== -1;
  6606. },
  6607. isMouseLeaveToHide() {
  6608. const {
  6609. action: t,
  6610. hideAction: e
  6611. } = this.$props;
  6612. return t.indexOf("hover") !== -1 || e.indexOf("mouseleave") !== -1;
  6613. },
  6614. isFocusToShow() {
  6615. const {
  6616. action: t,
  6617. showAction: e
  6618. } = this.$props;
  6619. return t.indexOf("focus") !== -1 || e.indexOf("focus") !== -1;
  6620. },
  6621. isBlurToHide() {
  6622. const {
  6623. action: t,
  6624. hideAction: e
  6625. } = this.$props;
  6626. return t.indexOf("focus") !== -1 || e.indexOf("blur") !== -1;
  6627. },
  6628. forcePopupAlign() {
  6629. var t;
  6630. this.$data.sPopupVisible && ((t = this.popupRef) === null || t === void 0 || t.forceAlign());
  6631. },
  6632. fireEvents(t, e) {
  6633. this.childOriginEvents[t] && this.childOriginEvents[t](e);
  6634. const n = this.$props[t] || this.$attrs[t];
  6635. n && n(e);
  6636. },
  6637. close() {
  6638. this.setPopupVisible(!1);
  6639. }
  6640. },
  6641. render() {
  6642. const {
  6643. $attrs: t
  6644. } = this, e = os(rj(this)), {
  6645. alignPoint: n,
  6646. getPopupContainer: r
  6647. } = this.$props, i = e[0];
  6648. this.childOriginEvents = e8(i);
  6649. const a = {
  6650. key: "trigger"
  6651. };
  6652. this.isContextmenuToShow() ? a.onContextmenu = this.onContextmenu : a.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (a.onClick = this.onClick, a.onMousedown = this.onMousedown, a[pr ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (a.onClick = this.createTwoChains("onClick"), a.onMousedown = this.createTwoChains("onMousedown"), a[pr ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (a.onMouseenter = this.onMouseenter, n && (a.onMousemove = this.onMouseMove)) : a.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? a.onMouseleave = this.onMouseleave : a.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (a.onFocus = this.onFocus, a.onBlur = this.onBlur) : (a.onFocus = this.createTwoChains("onFocus"), a.onBlur = (u) => {
  6653. u && (!u.relatedTarget || !$l(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
  6654. });
  6655. const o = ye(i && i.props && i.props.class, t.class);
  6656. o && (a.class = o);
  6657. const s = Pn(i, I(I({}, a), {
  6658. ref: "triggerRef"
  6659. }), !0, !0), l = M(EZ, {
  6660. key: "portal",
  6661. getContainer: r && (() => r(this.getRootDomNode())),
  6662. didUpdate: this.handlePortalUpdate,
  6663. visible: this.$data.sPopupVisible
  6664. }, {
  6665. default: this.getComponent
  6666. });
  6667. return M(wt, null, [s, l]);
  6668. }
  6669. });
  6670. var Cve = function(t, e) {
  6671. var n = {};
  6672. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  6673. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  6674. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  6675. return n;
  6676. };
  6677. const Tve = (t) => {
  6678. const e = t === !0 ? 0 : 1;
  6679. return {
  6680. bottomLeft: {
  6681. points: ["tl", "bl"],
  6682. offset: [0, 4],
  6683. overflow: {
  6684. adjustX: e,
  6685. adjustY: 1
  6686. }
  6687. },
  6688. bottomRight: {
  6689. points: ["tr", "br"],
  6690. offset: [0, 4],
  6691. overflow: {
  6692. adjustX: e,
  6693. adjustY: 1
  6694. }
  6695. },
  6696. topLeft: {
  6697. points: ["bl", "tl"],
  6698. offset: [0, -4],
  6699. overflow: {
  6700. adjustX: e,
  6701. adjustY: 1
  6702. }
  6703. },
  6704. topRight: {
  6705. points: ["br", "tr"],
  6706. offset: [0, -4],
  6707. overflow: {
  6708. adjustX: e,
  6709. adjustY: 1
  6710. }
  6711. }
  6712. };
  6713. }, Pve = te({
  6714. name: "SelectTrigger",
  6715. inheritAttrs: !1,
  6716. props: {
  6717. dropdownAlign: Object,
  6718. visible: {
  6719. type: Boolean,
  6720. default: void 0
  6721. },
  6722. disabled: {
  6723. type: Boolean,
  6724. default: void 0
  6725. },
  6726. dropdownClassName: String,
  6727. dropdownStyle: Y.object,
  6728. placement: String,
  6729. empty: {
  6730. type: Boolean,
  6731. default: void 0
  6732. },
  6733. prefixCls: String,
  6734. popupClassName: String,
  6735. animation: String,
  6736. transitionName: String,
  6737. getPopupContainer: Function,
  6738. dropdownRender: Function,
  6739. containerWidth: Number,
  6740. dropdownMatchSelectWidth: Y.oneOfType([Number, Boolean]).def(!0),
  6741. popupElement: Y.any,
  6742. direction: String,
  6743. getTriggerDOMNode: Function,
  6744. onPopupVisibleChange: Function,
  6745. onPopupMouseEnter: Function,
  6746. onPopupFocusin: Function,
  6747. onPopupFocusout: Function
  6748. },
  6749. setup(t, e) {
  6750. let {
  6751. slots: n,
  6752. attrs: r,
  6753. expose: i
  6754. } = e;
  6755. const a = L(() => {
  6756. const {
  6757. dropdownMatchSelectWidth: s
  6758. } = t;
  6759. return Tve(s);
  6760. }), o = U();
  6761. return i({
  6762. getPopupElement: () => o.value
  6763. }), () => {
  6764. const s = I(I({}, t), r), {
  6765. empty: l = !1
  6766. } = s, u = Cve(s, ["empty"]), {
  6767. visible: c,
  6768. dropdownAlign: f,
  6769. prefixCls: d,
  6770. popupElement: h,
  6771. dropdownClassName: p,
  6772. dropdownStyle: v,
  6773. direction: g = "ltr",
  6774. placement: m,
  6775. dropdownMatchSelectWidth: y,
  6776. containerWidth: b,
  6777. dropdownRender: _,
  6778. animation: O,
  6779. transitionName: S,
  6780. getPopupContainer: x,
  6781. getTriggerDOMNode: C,
  6782. onPopupVisibleChange: T,
  6783. onPopupMouseEnter: w,
  6784. onPopupFocusin: P,
  6785. onPopupFocusout: $
  6786. } = u, A = `${d}-dropdown`;
  6787. let D = h;
  6788. _ && (D = _({
  6789. menuNode: h,
  6790. props: t
  6791. }));
  6792. const E = O ? `${A}-${O}` : S, R = I({
  6793. minWidth: `${b}px`
  6794. }, v);
  6795. return typeof y == "number" ? R.width = `${y}px` : y && (R.width = `${b}px`), M(KS, j(j({}, t), {}, {
  6796. showAction: T ? ["click"] : [],
  6797. hideAction: T ? ["click"] : [],
  6798. popupPlacement: m || (g === "rtl" ? "bottomRight" : "bottomLeft"),
  6799. builtinPlacements: a.value,
  6800. prefixCls: A,
  6801. popupTransitionName: E,
  6802. popupAlign: f,
  6803. popupVisible: c,
  6804. getPopupContainer: x,
  6805. popupClassName: ye(p, {
  6806. [`${A}-empty`]: l
  6807. }),
  6808. popupStyle: R,
  6809. getTriggerDOMNode: C,
  6810. onPopupVisibleChange: T
  6811. }), {
  6812. default: n.default,
  6813. popup: () => M("div", {
  6814. ref: o,
  6815. onMouseenter: w,
  6816. onFocusin: P,
  6817. onFocusout: $
  6818. }, [D])
  6819. });
  6820. };
  6821. }
  6822. }), ge = {
  6823. /**
  6824. * MAC_ENTER
  6825. */
  6826. MAC_ENTER: 3,
  6827. /**
  6828. * BACKSPACE
  6829. */
  6830. BACKSPACE: 8,
  6831. /**
  6832. * TAB
  6833. */
  6834. TAB: 9,
  6835. /**
  6836. * NUMLOCK on FF/Safari Mac
  6837. */
  6838. NUM_CENTER: 12,
  6839. /**
  6840. * ENTER
  6841. */
  6842. ENTER: 13,
  6843. /**
  6844. * SHIFT
  6845. */
  6846. SHIFT: 16,
  6847. /**
  6848. * CTRL
  6849. */
  6850. CTRL: 17,
  6851. /**
  6852. * ALT
  6853. */
  6854. ALT: 18,
  6855. /**
  6856. * PAUSE
  6857. */
  6858. PAUSE: 19,
  6859. /**
  6860. * CAPS_LOCK
  6861. */
  6862. CAPS_LOCK: 20,
  6863. /**
  6864. * ESC
  6865. */
  6866. ESC: 27,
  6867. /**
  6868. * SPACE
  6869. */
  6870. SPACE: 32,
  6871. /**
  6872. * PAGE_UP
  6873. */
  6874. PAGE_UP: 33,
  6875. /**
  6876. * PAGE_DOWN
  6877. */
  6878. PAGE_DOWN: 34,
  6879. /**
  6880. * END
  6881. */
  6882. END: 35,
  6883. /**
  6884. * HOME
  6885. */
  6886. HOME: 36,
  6887. /**
  6888. * LEFT
  6889. */
  6890. LEFT: 37,
  6891. /**
  6892. * UP
  6893. */
  6894. UP: 38,
  6895. /**
  6896. * RIGHT
  6897. */
  6898. RIGHT: 39,
  6899. /**
  6900. * DOWN
  6901. */
  6902. DOWN: 40,
  6903. /**
  6904. * PRINT_SCREEN
  6905. */
  6906. PRINT_SCREEN: 44,
  6907. /**
  6908. * INSERT
  6909. */
  6910. INSERT: 45,
  6911. /**
  6912. * DELETE
  6913. */
  6914. DELETE: 46,
  6915. /**
  6916. * ZERO
  6917. */
  6918. ZERO: 48,
  6919. /**
  6920. * ONE
  6921. */
  6922. ONE: 49,
  6923. /**
  6924. * TWO
  6925. */
  6926. TWO: 50,
  6927. /**
  6928. * THREE
  6929. */
  6930. THREE: 51,
  6931. /**
  6932. * FOUR
  6933. */
  6934. FOUR: 52,
  6935. /**
  6936. * FIVE
  6937. */
  6938. FIVE: 53,
  6939. /**
  6940. * SIX
  6941. */
  6942. SIX: 54,
  6943. /**
  6944. * SEVEN
  6945. */
  6946. SEVEN: 55,
  6947. /**
  6948. * EIGHT
  6949. */
  6950. EIGHT: 56,
  6951. /**
  6952. * NINE
  6953. */
  6954. NINE: 57,
  6955. /**
  6956. * QUESTION_MARK
  6957. */
  6958. QUESTION_MARK: 63,
  6959. /**
  6960. * A
  6961. */
  6962. A: 65,
  6963. /**
  6964. * B
  6965. */
  6966. B: 66,
  6967. /**
  6968. * C
  6969. */
  6970. C: 67,
  6971. /**
  6972. * D
  6973. */
  6974. D: 68,
  6975. /**
  6976. * E
  6977. */
  6978. E: 69,
  6979. /**
  6980. * F
  6981. */
  6982. F: 70,
  6983. /**
  6984. * G
  6985. */
  6986. G: 71,
  6987. /**
  6988. * H
  6989. */
  6990. H: 72,
  6991. /**
  6992. * I
  6993. */
  6994. I: 73,
  6995. /**
  6996. * J
  6997. */
  6998. J: 74,
  6999. /**
  7000. * K
  7001. */
  7002. K: 75,
  7003. /**
  7004. * L
  7005. */
  7006. L: 76,
  7007. /**
  7008. * M
  7009. */
  7010. M: 77,
  7011. /**
  7012. * N
  7013. */
  7014. N: 78,
  7015. /**
  7016. * O
  7017. */
  7018. O: 79,
  7019. /**
  7020. * P
  7021. */
  7022. P: 80,
  7023. /**
  7024. * Q
  7025. */
  7026. Q: 81,
  7027. /**
  7028. * R
  7029. */
  7030. R: 82,
  7031. /**
  7032. * S
  7033. */
  7034. S: 83,
  7035. /**
  7036. * T
  7037. */
  7038. T: 84,
  7039. /**
  7040. * U
  7041. */
  7042. U: 85,
  7043. /**
  7044. * V
  7045. */
  7046. V: 86,
  7047. /**
  7048. * W
  7049. */
  7050. W: 87,
  7051. /**
  7052. * X
  7053. */
  7054. X: 88,
  7055. /**
  7056. * Y
  7057. */
  7058. Y: 89,
  7059. /**
  7060. * Z
  7061. */
  7062. Z: 90,
  7063. /**
  7064. * META
  7065. */
  7066. META: 91,
  7067. /**
  7068. * WIN_KEY_RIGHT
  7069. */
  7070. WIN_KEY_RIGHT: 92,
  7071. /**
  7072. * CONTEXT_MENU
  7073. */
  7074. CONTEXT_MENU: 93,
  7075. /**
  7076. * NUM_ZERO
  7077. */
  7078. NUM_ZERO: 96,
  7079. /**
  7080. * NUM_ONE
  7081. */
  7082. NUM_ONE: 97,
  7083. /**
  7084. * NUM_TWO
  7085. */
  7086. NUM_TWO: 98,
  7087. /**
  7088. * NUM_THREE
  7089. */
  7090. NUM_THREE: 99,
  7091. /**
  7092. * NUM_FOUR
  7093. */
  7094. NUM_FOUR: 100,
  7095. /**
  7096. * NUM_FIVE
  7097. */
  7098. NUM_FIVE: 101,
  7099. /**
  7100. * NUM_SIX
  7101. */
  7102. NUM_SIX: 102,
  7103. /**
  7104. * NUM_SEVEN
  7105. */
  7106. NUM_SEVEN: 103,
  7107. /**
  7108. * NUM_EIGHT
  7109. */
  7110. NUM_EIGHT: 104,
  7111. /**
  7112. * NUM_NINE
  7113. */
  7114. NUM_NINE: 105,
  7115. /**
  7116. * NUM_MULTIPLY
  7117. */
  7118. NUM_MULTIPLY: 106,
  7119. /**
  7120. * NUM_PLUS
  7121. */
  7122. NUM_PLUS: 107,
  7123. /**
  7124. * NUM_MINUS
  7125. */
  7126. NUM_MINUS: 109,
  7127. /**
  7128. * NUM_PERIOD
  7129. */
  7130. NUM_PERIOD: 110,
  7131. /**
  7132. * NUM_DIVISION
  7133. */
  7134. NUM_DIVISION: 111,
  7135. /**
  7136. * F1
  7137. */
  7138. F1: 112,
  7139. /**
  7140. * F2
  7141. */
  7142. F2: 113,
  7143. /**
  7144. * F3
  7145. */
  7146. F3: 114,
  7147. /**
  7148. * F4
  7149. */
  7150. F4: 115,
  7151. /**
  7152. * F5
  7153. */
  7154. F5: 116,
  7155. /**
  7156. * F6
  7157. */
  7158. F6: 117,
  7159. /**
  7160. * F7
  7161. */
  7162. F7: 118,
  7163. /**
  7164. * F8
  7165. */
  7166. F8: 119,
  7167. /**
  7168. * F9
  7169. */
  7170. F9: 120,
  7171. /**
  7172. * F10
  7173. */
  7174. F10: 121,
  7175. /**
  7176. * F11
  7177. */
  7178. F11: 122,
  7179. /**
  7180. * F12
  7181. */
  7182. F12: 123,
  7183. /**
  7184. * NUMLOCK
  7185. */
  7186. NUMLOCK: 144,
  7187. /**
  7188. * SEMICOLON
  7189. */
  7190. SEMICOLON: 186,
  7191. /**
  7192. * DASH
  7193. */
  7194. DASH: 189,
  7195. /**
  7196. * EQUALS
  7197. */
  7198. EQUALS: 187,
  7199. /**
  7200. * COMMA
  7201. */
  7202. COMMA: 188,
  7203. /**
  7204. * PERIOD
  7205. */
  7206. PERIOD: 190,
  7207. /**
  7208. * SLASH
  7209. */
  7210. SLASH: 191,
  7211. /**
  7212. * APOSTROPHE
  7213. */
  7214. APOSTROPHE: 192,
  7215. /**
  7216. * SINGLE_QUOTE
  7217. */
  7218. SINGLE_QUOTE: 222,
  7219. /**
  7220. * OPEN_SQUARE_BRACKET
  7221. */
  7222. OPEN_SQUARE_BRACKET: 219,
  7223. /**
  7224. * BACKSLASH
  7225. */
  7226. BACKSLASH: 220,
  7227. /**
  7228. * CLOSE_SQUARE_BRACKET
  7229. */
  7230. CLOSE_SQUARE_BRACKET: 221,
  7231. /**
  7232. * WIN_KEY
  7233. */
  7234. WIN_KEY: 224,
  7235. /**
  7236. * MAC_FF_META
  7237. */
  7238. MAC_FF_META: 224,
  7239. /**
  7240. * WIN_IME
  7241. */
  7242. WIN_IME: 229,
  7243. // ======================== Function ========================
  7244. /**
  7245. * whether text and modified key is entered at the same time.
  7246. */
  7247. isTextModifyingKeyEvent: function(e) {
  7248. const {
  7249. keyCode: n
  7250. } = e;
  7251. if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text
  7252. n >= ge.F1 && n <= ge.F12)
  7253. return !1;
  7254. switch (n) {
  7255. case ge.ALT:
  7256. case ge.CAPS_LOCK:
  7257. case ge.CONTEXT_MENU:
  7258. case ge.CTRL:
  7259. case ge.DOWN:
  7260. case ge.END:
  7261. case ge.ESC:
  7262. case ge.HOME:
  7263. case ge.INSERT:
  7264. case ge.LEFT:
  7265. case ge.MAC_FF_META:
  7266. case ge.META:
  7267. case ge.NUMLOCK:
  7268. case ge.NUM_CENTER:
  7269. case ge.PAGE_DOWN:
  7270. case ge.PAGE_UP:
  7271. case ge.PAUSE:
  7272. case ge.PRINT_SCREEN:
  7273. case ge.RIGHT:
  7274. case ge.SHIFT:
  7275. case ge.UP:
  7276. case ge.WIN_KEY:
  7277. case ge.WIN_KEY_RIGHT:
  7278. return !1;
  7279. default:
  7280. return !0;
  7281. }
  7282. },
  7283. /**
  7284. * whether character is entered.
  7285. */
  7286. isCharacterKey: function(e) {
  7287. if (e >= ge.ZERO && e <= ge.NINE || e >= ge.NUM_ZERO && e <= ge.NUM_MULTIPLY || e >= ge.A && e <= ge.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && e === 0)
  7288. return !0;
  7289. switch (e) {
  7290. case ge.SPACE:
  7291. case ge.QUESTION_MARK:
  7292. case ge.NUM_PLUS:
  7293. case ge.NUM_MINUS:
  7294. case ge.NUM_PERIOD:
  7295. case ge.NUM_DIVISION:
  7296. case ge.SEMICOLON:
  7297. case ge.DASH:
  7298. case ge.EQUALS:
  7299. case ge.COMMA:
  7300. case ge.PERIOD:
  7301. case ge.SLASH:
  7302. case ge.APOSTROPHE:
  7303. case ge.SINGLE_QUOTE:
  7304. case ge.OPEN_SQUARE_BRACKET:
  7305. case ge.BACKSLASH:
  7306. case ge.CLOSE_SQUARE_BRACKET:
  7307. return !0;
  7308. default:
  7309. return !1;
  7310. }
  7311. }
  7312. }, pf = (t, e) => {
  7313. let {
  7314. slots: n
  7315. } = e;
  7316. var r;
  7317. const {
  7318. class: i,
  7319. customizeIcon: a,
  7320. customizeIconProps: o,
  7321. onMousedown: s,
  7322. onClick: l
  7323. } = t;
  7324. let u;
  7325. return typeof a == "function" ? u = a(o) : u = nu(a) ? Ns(a) : a, M("span", {
  7326. class: i,
  7327. onMousedown: (c) => {
  7328. c.preventDefault(), s && s(c);
  7329. },
  7330. style: {
  7331. userSelect: "none",
  7332. WebkitUserSelect: "none"
  7333. },
  7334. unselectable: "on",
  7335. onClick: l,
  7336. "aria-hidden": !0
  7337. }, [u !== void 0 ? u : M("span", {
  7338. class: i.split(/\s+/).map((c) => `${c}-icon`)
  7339. }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
  7340. };
  7341. pf.inheritAttrs = !1;
  7342. pf.displayName = "TransBtn";
  7343. pf.props = {
  7344. class: String,
  7345. customizeIcon: Y.any,
  7346. customizeIconProps: Y.any,
  7347. onMousedown: Function,
  7348. onClick: Function
  7349. };
  7350. var $ve = function(t, e) {
  7351. var n = {};
  7352. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7353. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7354. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7355. return n;
  7356. };
  7357. const Ave = te({
  7358. compatConfig: {
  7359. MODE: 3
  7360. },
  7361. // inheritAttrs: false,
  7362. props: {
  7363. disabled: Y.looseBool,
  7364. type: Y.string,
  7365. value: Y.any,
  7366. tag: {
  7367. type: String,
  7368. default: "input"
  7369. },
  7370. size: Y.string,
  7371. onChange: Function,
  7372. onInput: Function,
  7373. onBlur: Function,
  7374. onFocus: Function,
  7375. onKeydown: Function,
  7376. onCompositionstart: Function,
  7377. onCompositionend: Function,
  7378. onKeyup: Function,
  7379. onPaste: Function,
  7380. onMousedown: Function
  7381. },
  7382. emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  7383. setup(t, e) {
  7384. let {
  7385. expose: n
  7386. } = e;
  7387. const r = ae(null);
  7388. return n({
  7389. focus: () => {
  7390. r.value && r.value.focus();
  7391. },
  7392. blur: () => {
  7393. r.value && r.value.blur();
  7394. },
  7395. input: r,
  7396. setSelectionRange: (l, u, c) => {
  7397. var f;
  7398. (f = r.value) === null || f === void 0 || f.setSelectionRange(l, u, c);
  7399. },
  7400. select: () => {
  7401. var l;
  7402. (l = r.value) === null || l === void 0 || l.select();
  7403. },
  7404. getSelectionStart: () => {
  7405. var l;
  7406. return (l = r.value) === null || l === void 0 ? void 0 : l.selectionStart;
  7407. },
  7408. getSelectionEnd: () => {
  7409. var l;
  7410. return (l = r.value) === null || l === void 0 ? void 0 : l.selectionEnd;
  7411. },
  7412. getScrollTop: () => {
  7413. var l;
  7414. return (l = r.value) === null || l === void 0 ? void 0 : l.scrollTop;
  7415. }
  7416. }), () => {
  7417. const {
  7418. tag: l,
  7419. value: u
  7420. } = t, c = $ve(t, ["tag", "value"]);
  7421. return M(l, j(j({}, c), {}, {
  7422. ref: r,
  7423. value: u
  7424. }), null);
  7425. };
  7426. }
  7427. });
  7428. function Eve() {
  7429. const t = document.documentElement.clientWidth, e = window.innerHeight || document.documentElement.clientHeight;
  7430. return {
  7431. width: t,
  7432. height: e
  7433. };
  7434. }
  7435. function MZ(t) {
  7436. const e = t.getBoundingClientRect(), n = document.documentElement;
  7437. return {
  7438. left: e.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
  7439. top: e.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  7440. };
  7441. }
  7442. function Mve(t) {
  7443. return Object.keys(t).reduce((e, n) => {
  7444. const r = t[n];
  7445. return typeof r > "u" || r === null || (e += `${n}: ${t[n]};`), e;
  7446. }, "");
  7447. }
  7448. var Ive = function(t, e) {
  7449. var n = {};
  7450. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7451. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7452. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7453. return n;
  7454. };
  7455. const TI = te({
  7456. compatConfig: {
  7457. MODE: 3
  7458. },
  7459. inheritAttrs: !1,
  7460. props: {
  7461. disabled: Y.looseBool,
  7462. type: Y.string,
  7463. value: Y.any,
  7464. lazy: Y.bool.def(!0),
  7465. tag: {
  7466. type: String,
  7467. default: "input"
  7468. },
  7469. size: Y.string,
  7470. style: Y.oneOfType([String, Object]),
  7471. class: Y.string
  7472. },
  7473. emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  7474. setup(t, e) {
  7475. let {
  7476. emit: n,
  7477. attrs: r,
  7478. expose: i
  7479. } = e;
  7480. const a = ae(null), o = U(), s = U(!1);
  7481. se([() => t.value, s], () => {
  7482. s.value || (o.value = t.value);
  7483. }, {
  7484. immediate: !0
  7485. });
  7486. const l = (x) => {
  7487. n("change", x);
  7488. }, u = (x) => {
  7489. s.value = !0, x.target.composing = !0, n("compositionstart", x);
  7490. }, c = (x) => {
  7491. s.value = !1, x.target.composing = !1, n("compositionend", x);
  7492. const C = document.createEvent("HTMLEvents");
  7493. C.initEvent("input", !0, !0), x.target.dispatchEvent(C), l(x);
  7494. }, f = (x) => {
  7495. if (s.value && t.lazy) {
  7496. o.value = x.target.value;
  7497. return;
  7498. }
  7499. n("input", x);
  7500. }, d = (x) => {
  7501. n("blur", x);
  7502. }, h = (x) => {
  7503. n("focus", x);
  7504. }, p = () => {
  7505. a.value && a.value.focus();
  7506. }, v = () => {
  7507. a.value && a.value.blur();
  7508. }, g = (x) => {
  7509. n("keydown", x);
  7510. }, m = (x) => {
  7511. n("keyup", x);
  7512. }, y = (x, C, T) => {
  7513. var w;
  7514. (w = a.value) === null || w === void 0 || w.setSelectionRange(x, C, T);
  7515. }, b = () => {
  7516. var x;
  7517. (x = a.value) === null || x === void 0 || x.select();
  7518. };
  7519. i({
  7520. focus: p,
  7521. blur: v,
  7522. input: L(() => {
  7523. var x;
  7524. return (x = a.value) === null || x === void 0 ? void 0 : x.input;
  7525. }),
  7526. setSelectionRange: y,
  7527. select: b,
  7528. getSelectionStart: () => {
  7529. var x;
  7530. return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionStart();
  7531. },
  7532. getSelectionEnd: () => {
  7533. var x;
  7534. return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionEnd();
  7535. },
  7536. getScrollTop: () => {
  7537. var x;
  7538. return (x = a.value) === null || x === void 0 ? void 0 : x.getScrollTop();
  7539. }
  7540. });
  7541. const _ = (x) => {
  7542. n("mousedown", x);
  7543. }, O = (x) => {
  7544. n("paste", x);
  7545. }, S = L(() => t.style && typeof t.style != "string" ? Mve(t.style) : t.style);
  7546. return () => {
  7547. const x = Ive(t, ["style", "lazy"]);
  7548. return M(Ave, j(j(j({}, x), r), {}, {
  7549. style: S.value,
  7550. onInput: f,
  7551. onChange: l,
  7552. onBlur: d,
  7553. onFocus: h,
  7554. ref: a,
  7555. value: o.value,
  7556. onCompositionstart: u,
  7557. onCompositionend: c,
  7558. onKeyup: m,
  7559. onKeydown: g,
  7560. onPaste: O,
  7561. onMousedown: _
  7562. }), null);
  7563. };
  7564. }
  7565. }), Dve = {
  7566. inputRef: Y.any,
  7567. prefixCls: String,
  7568. id: String,
  7569. inputElement: Y.VueNode,
  7570. disabled: {
  7571. type: Boolean,
  7572. default: void 0
  7573. },
  7574. autofocus: {
  7575. type: Boolean,
  7576. default: void 0
  7577. },
  7578. autocomplete: String,
  7579. editable: {
  7580. type: Boolean,
  7581. default: void 0
  7582. },
  7583. activeDescendantId: String,
  7584. value: String,
  7585. open: {
  7586. type: Boolean,
  7587. default: void 0
  7588. },
  7589. tabindex: Y.oneOfType([Y.number, Y.string]),
  7590. /** Pass accessibility props to input */
  7591. attrs: Y.object,
  7592. onKeydown: {
  7593. type: Function
  7594. },
  7595. onMousedown: {
  7596. type: Function
  7597. },
  7598. onChange: {
  7599. type: Function
  7600. },
  7601. onPaste: {
  7602. type: Function
  7603. },
  7604. onCompositionstart: {
  7605. type: Function
  7606. },
  7607. onCompositionend: {
  7608. type: Function
  7609. },
  7610. onFocus: {
  7611. type: Function
  7612. },
  7613. onBlur: {
  7614. type: Function
  7615. }
  7616. }, IZ = te({
  7617. compatConfig: {
  7618. MODE: 3
  7619. },
  7620. name: "SelectInput",
  7621. inheritAttrs: !1,
  7622. props: Dve,
  7623. setup(t) {
  7624. let e = null;
  7625. const n = Ge("VCSelectContainerEvent");
  7626. return () => {
  7627. var r;
  7628. const {
  7629. prefixCls: i,
  7630. id: a,
  7631. inputElement: o,
  7632. disabled: s,
  7633. tabindex: l,
  7634. autofocus: u,
  7635. autocomplete: c,
  7636. editable: f,
  7637. activeDescendantId: d,
  7638. value: h,
  7639. onKeydown: p,
  7640. onMousedown: v,
  7641. onChange: g,
  7642. onPaste: m,
  7643. onCompositionstart: y,
  7644. onCompositionend: b,
  7645. onFocus: _,
  7646. onBlur: O,
  7647. open: S,
  7648. inputRef: x,
  7649. attrs: C
  7650. } = t;
  7651. let T = o || M(TI, null, null);
  7652. const w = T.props || {}, {
  7653. onKeydown: P,
  7654. onInput: $,
  7655. onFocus: A,
  7656. onBlur: D,
  7657. onMousedown: E,
  7658. onCompositionstart: R,
  7659. onCompositionend: N,
  7660. style: V
  7661. } = w;
  7662. return T = Pn(T, I(I(I(I(I({
  7663. type: "search"
  7664. }, w), {
  7665. id: a,
  7666. ref: x,
  7667. disabled: s,
  7668. tabindex: l,
  7669. lazy: !1,
  7670. autocomplete: c || "off",
  7671. autofocus: u,
  7672. class: ye(`${i}-selection-search-input`, (r = T == null ? void 0 : T.props) === null || r === void 0 ? void 0 : r.class),
  7673. role: "combobox",
  7674. "aria-expanded": S,
  7675. "aria-haspopup": "listbox",
  7676. "aria-owns": `${a}_list`,
  7677. "aria-autocomplete": "list",
  7678. "aria-controls": `${a}_list`,
  7679. "aria-activedescendant": d
  7680. }), C), {
  7681. value: f ? h : "",
  7682. readonly: !f,
  7683. unselectable: f ? null : "on",
  7684. style: I(I({}, V), {
  7685. opacity: f ? null : 0
  7686. }),
  7687. onKeydown: (z) => {
  7688. p(z), P && P(z);
  7689. },
  7690. onMousedown: (z) => {
  7691. v(z), E && E(z);
  7692. },
  7693. onInput: (z) => {
  7694. g(z), $ && $(z);
  7695. },
  7696. onCompositionstart(z) {
  7697. y(z), R && R(z);
  7698. },
  7699. onCompositionend(z) {
  7700. b(z), N && N(z);
  7701. },
  7702. onPaste: m,
  7703. onFocus: function() {
  7704. clearTimeout(e), A && A(arguments.length <= 0 ? void 0 : arguments[0]), _ && _(arguments.length <= 0 ? void 0 : arguments[0]), n == null || n.focus(arguments.length <= 0 ? void 0 : arguments[0]);
  7705. },
  7706. onBlur: function() {
  7707. for (var z = arguments.length, W = new Array(z), F = 0; F < z; F++)
  7708. W[F] = arguments[F];
  7709. e = setTimeout(() => {
  7710. D && D(W[0]), O && O(W[0]), n == null || n.blur(W[0]);
  7711. }, 100);
  7712. }
  7713. }), T.type === "textarea" ? {} : {
  7714. type: "search"
  7715. }), !0, !0), T;
  7716. };
  7717. }
  7718. }), Rve = `accept acceptcharset accesskey action allowfullscreen allowtransparency
  7719. alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
  7720. charset checked classid classname colspan cols content contenteditable contextmenu
  7721. controls coords crossorigin data datetime default defer dir disabled download draggable
  7722. enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
  7723. headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
  7724. is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
  7725. mediagroup method min minlength multiple muted name novalidate nonce open
  7726. optimum pattern placeholder poster preload radiogroup readonly rel required
  7727. reversed role rowspan rows sandbox scope scoped scrolling seamless selected
  7728. shape size sizes span spellcheck src srcdoc srclang srcset start step style
  7729. summary tabindex target title type usemap value width wmode wrap`, kve = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
  7730. onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
  7731. onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
  7732. onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
  7733. onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
  7734. onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
  7735. onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, fN = `${Rve} ${kve}`.split(/[\s\n]+/), Lve = "aria-", Nve = "data-";
  7736. function dN(t, e) {
  7737. return t.indexOf(e) === 0;
  7738. }
  7739. function JS(t) {
  7740. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  7741. e === !1 ? n = {
  7742. aria: !0,
  7743. data: !0,
  7744. attr: !0
  7745. } : e === !0 ? n = {
  7746. aria: !0
  7747. } : n = I({}, e);
  7748. const r = {};
  7749. return Object.keys(t).forEach((i) => {
  7750. // Aria
  7751. (n.aria && (i === "role" || dN(i, Lve)) || // Data
  7752. n.data && dN(i, Nve) || // Attr
  7753. n.attr && (fN.includes(i) || fN.includes(i.toLowerCase()))) && (r[i] = t[i]);
  7754. }), r;
  7755. }
  7756. const DZ = Symbol("OverflowContextProviderKey"), P2 = te({
  7757. compatConfig: {
  7758. MODE: 3
  7759. },
  7760. name: "OverflowContextProvider",
  7761. inheritAttrs: !1,
  7762. props: {
  7763. value: {
  7764. type: Object
  7765. }
  7766. },
  7767. setup(t, e) {
  7768. let {
  7769. slots: n
  7770. } = e;
  7771. return pt(DZ, L(() => t.value)), () => {
  7772. var r;
  7773. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  7774. };
  7775. }
  7776. }), Bve = () => Ge(DZ, L(() => null));
  7777. var zve = function(t, e) {
  7778. var n = {};
  7779. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7780. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7781. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7782. return n;
  7783. };
  7784. const Zf = void 0, w_ = te({
  7785. compatConfig: {
  7786. MODE: 3
  7787. },
  7788. name: "Item",
  7789. props: {
  7790. prefixCls: String,
  7791. item: Y.any,
  7792. renderItem: Function,
  7793. responsive: Boolean,
  7794. itemKey: {
  7795. type: [String, Number]
  7796. },
  7797. registerSize: Function,
  7798. display: Boolean,
  7799. order: Number,
  7800. component: Y.any,
  7801. invalidate: Boolean
  7802. },
  7803. setup(t, e) {
  7804. let {
  7805. slots: n,
  7806. expose: r
  7807. } = e;
  7808. const i = L(() => t.responsive && !t.display), a = U();
  7809. r({
  7810. itemNodeRef: a
  7811. });
  7812. function o(s) {
  7813. t.registerSize(t.itemKey, s);
  7814. }
  7815. return nl(() => {
  7816. o(null);
  7817. }), () => {
  7818. var s;
  7819. const {
  7820. prefixCls: l,
  7821. invalidate: u,
  7822. item: c,
  7823. renderItem: f,
  7824. responsive: d,
  7825. registerSize: h,
  7826. itemKey: p,
  7827. display: v,
  7828. order: g,
  7829. component: m = "div"
  7830. } = t, y = zve(t, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), b = (s = n.default) === null || s === void 0 ? void 0 : s.call(n), _ = f && c !== Zf ? f(c) : b;
  7831. let O;
  7832. u || (O = {
  7833. opacity: i.value ? 0 : 1,
  7834. height: i.value ? 0 : Zf,
  7835. overflowY: i.value ? "hidden" : Zf,
  7836. order: d ? g : Zf,
  7837. pointerEvents: i.value ? "none" : Zf,
  7838. position: i.value ? "absolute" : Zf
  7839. });
  7840. const S = {};
  7841. return i.value && (S["aria-hidden"] = !0), M(ph, {
  7842. disabled: !d,
  7843. onResize: (x) => {
  7844. let {
  7845. offsetWidth: C
  7846. } = x;
  7847. o(C);
  7848. }
  7849. }, {
  7850. default: () => M(m, j(j(j({
  7851. class: ye(!u && l),
  7852. style: O
  7853. }, S), y), {}, {
  7854. ref: a
  7855. }), {
  7856. default: () => [_]
  7857. })
  7858. });
  7859. };
  7860. }
  7861. });
  7862. var vC = function(t, e) {
  7863. var n = {};
  7864. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7865. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7866. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7867. return n;
  7868. };
  7869. const Vve = te({
  7870. compatConfig: {
  7871. MODE: 3
  7872. },
  7873. name: "RawItem",
  7874. inheritAttrs: !1,
  7875. props: {
  7876. component: Y.any,
  7877. title: Y.any,
  7878. id: String,
  7879. onMouseenter: {
  7880. type: Function
  7881. },
  7882. onMouseleave: {
  7883. type: Function
  7884. },
  7885. onClick: {
  7886. type: Function
  7887. },
  7888. onKeydown: {
  7889. type: Function
  7890. },
  7891. onFocus: {
  7892. type: Function
  7893. },
  7894. role: String,
  7895. tabindex: Number
  7896. },
  7897. setup(t, e) {
  7898. let {
  7899. slots: n,
  7900. attrs: r
  7901. } = e;
  7902. const i = Bve();
  7903. return () => {
  7904. var a;
  7905. if (!i.value) {
  7906. const {
  7907. component: f = "div"
  7908. } = t, d = vC(t, ["component"]);
  7909. return M(f, j(j({}, d), r), {
  7910. default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
  7911. });
  7912. }
  7913. const o = i.value, {
  7914. className: s
  7915. } = o, l = vC(o, ["className"]), {
  7916. class: u
  7917. } = r, c = vC(r, ["class"]);
  7918. return M(P2, {
  7919. value: null
  7920. }, {
  7921. default: () => [M(w_, j(j(j({
  7922. class: ye(s, u)
  7923. }, l), c), t), n)]
  7924. });
  7925. };
  7926. }
  7927. });
  7928. var Fve = function(t, e) {
  7929. var n = {};
  7930. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  7931. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  7932. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  7933. return n;
  7934. };
  7935. const RZ = "responsive", kZ = "invalidate";
  7936. function Wve(t) {
  7937. return `+ ${t.length} ...`;
  7938. }
  7939. const Qve = () => ({
  7940. id: String,
  7941. prefixCls: String,
  7942. data: Array,
  7943. itemKey: [String, Number, Function],
  7944. /** Used for `responsive`. It will limit render node to avoid perf issue */
  7945. itemWidth: {
  7946. type: Number,
  7947. default: 10
  7948. },
  7949. renderItem: Function,
  7950. /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  7951. renderRawItem: Function,
  7952. maxCount: [Number, String],
  7953. renderRest: Function,
  7954. /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  7955. renderRawRest: Function,
  7956. suffix: Y.any,
  7957. component: String,
  7958. itemComponent: Y.any,
  7959. /** @private This API may be refactor since not well design */
  7960. onVisibleChange: Function,
  7961. /** When set to `full`, ssr will render full items by default and remove at client side */
  7962. ssr: String,
  7963. onMousedown: Function
  7964. }), Ms = te({
  7965. name: "Overflow",
  7966. inheritAttrs: !1,
  7967. props: Qve(),
  7968. emits: ["visibleChange"],
  7969. setup(t, e) {
  7970. let {
  7971. attrs: n,
  7972. emit: r,
  7973. slots: i
  7974. } = e;
  7975. const a = L(() => t.ssr === "full"), o = ae(null), s = L(() => o.value || 0), l = ae(/* @__PURE__ */ new Map()), u = ae(0), c = ae(0), f = ae(0), d = ae(null), h = ae(null), p = L(() => h.value === null && a.value ? Number.MAX_SAFE_INTEGER : h.value || 0), v = ae(!1), g = L(() => `${t.prefixCls}-item`), m = L(() => Math.max(u.value, c.value)), y = L(() => !!(t.data.length && t.maxCount === RZ)), b = L(() => t.maxCount === kZ), _ = L(() => y.value || typeof t.maxCount == "number" && t.data.length > t.maxCount), O = L(() => {
  7976. let E = t.data;
  7977. return y.value ? o.value === null && a.value ? E = t.data : E = t.data.slice(0, Math.min(t.data.length, s.value / t.itemWidth)) : typeof t.maxCount == "number" && (E = t.data.slice(0, t.maxCount)), E;
  7978. }), S = L(() => y.value ? t.data.slice(p.value + 1) : t.data.slice(O.value.length)), x = (E, R) => {
  7979. var N;
  7980. return typeof t.itemKey == "function" ? t.itemKey(E) : (N = t.itemKey && (E == null ? void 0 : E[t.itemKey])) !== null && N !== void 0 ? N : R;
  7981. }, C = L(() => t.renderItem || ((E) => E)), T = (E, R) => {
  7982. h.value = E, R || (v.value = E < t.data.length - 1, r("visibleChange", E));
  7983. }, w = (E, R) => {
  7984. o.value = R.clientWidth;
  7985. }, P = (E, R) => {
  7986. const N = new Map(l.value);
  7987. R === null ? N.delete(E) : N.set(E, R), l.value = N;
  7988. }, $ = (E, R) => {
  7989. u.value = c.value, c.value = R;
  7990. }, A = (E, R) => {
  7991. f.value = R;
  7992. }, D = (E) => l.value.get(x(O.value[E], E));
  7993. return se([s, l, c, f, () => t.itemKey, O], () => {
  7994. if (s.value && m.value && O.value) {
  7995. let E = f.value;
  7996. const R = O.value.length, N = R - 1;
  7997. if (!R) {
  7998. T(0), d.value = null;
  7999. return;
  8000. }
  8001. for (let V = 0; V < R; V += 1) {
  8002. const z = D(V);
  8003. if (z === void 0) {
  8004. T(V - 1, !0);
  8005. break;
  8006. }
  8007. if (E += z, // Only one means `totalWidth` is the final width
  8008. N === 0 && E <= s.value || // Last two width will be the final width
  8009. V === N - 1 && E + D(N) <= s.value) {
  8010. T(N), d.value = null;
  8011. break;
  8012. } else if (E + m.value > s.value) {
  8013. T(V - 1), d.value = E - z - f.value + c.value;
  8014. break;
  8015. }
  8016. }
  8017. t.suffix && D(0) + f.value > s.value && (d.value = null);
  8018. }
  8019. }), () => {
  8020. const E = v.value && !!S.value.length, {
  8021. itemComponent: R,
  8022. renderRawItem: N,
  8023. renderRawRest: V,
  8024. renderRest: z,
  8025. prefixCls: W = "rc-overflow",
  8026. suffix: F,
  8027. component: Q = "div",
  8028. id: Z,
  8029. onMousedown: ne
  8030. } = t, {
  8031. class: ee,
  8032. style: oe
  8033. } = n, K = Fve(n, ["class", "style"]);
  8034. let ie = {};
  8035. d.value !== null && y.value && (ie = {
  8036. position: "absolute",
  8037. left: `${d.value}px`,
  8038. top: 0
  8039. });
  8040. const X = {
  8041. prefixCls: g.value,
  8042. responsive: y.value,
  8043. component: R,
  8044. invalidate: b.value
  8045. }, H = N ? (de, Ee) => {
  8046. const $e = x(de, Ee);
  8047. return M(P2, {
  8048. key: $e,
  8049. value: I(I({}, X), {
  8050. order: Ee,
  8051. item: de,
  8052. itemKey: $e,
  8053. registerSize: P,
  8054. display: Ee <= p.value
  8055. })
  8056. }, {
  8057. default: () => [N(de, Ee)]
  8058. });
  8059. } : (de, Ee) => {
  8060. const $e = x(de, Ee);
  8061. return M(w_, j(j({}, X), {}, {
  8062. order: Ee,
  8063. key: $e,
  8064. item: de,
  8065. renderItem: C.value,
  8066. itemKey: $e,
  8067. registerSize: P,
  8068. display: Ee <= p.value
  8069. }), null);
  8070. };
  8071. let G = () => null;
  8072. const re = {
  8073. order: E ? p.value : Number.MAX_SAFE_INTEGER,
  8074. className: `${g.value} ${g.value}-rest`,
  8075. registerSize: $,
  8076. display: E
  8077. };
  8078. if (V)
  8079. V && (G = () => M(P2, {
  8080. value: I(I({}, X), re)
  8081. }, {
  8082. default: () => [V(S.value)]
  8083. }));
  8084. else {
  8085. const de = z || Wve;
  8086. G = () => M(w_, j(j({}, X), re), {
  8087. default: () => typeof de == "function" ? de(S.value) : de
  8088. });
  8089. }
  8090. const fe = () => {
  8091. var de;
  8092. return M(Q, j({
  8093. id: Z,
  8094. class: ye(!b.value && W, ee),
  8095. style: oe,
  8096. onMousedown: ne
  8097. }, K), {
  8098. default: () => [O.value.map(H), _.value ? G() : null, F && M(w_, j(j({}, X), {}, {
  8099. order: p.value,
  8100. class: `${g.value}-suffix`,
  8101. registerSize: A,
  8102. display: !0,
  8103. style: ie
  8104. }), {
  8105. default: () => F
  8106. }), (de = i.default) === null || de === void 0 ? void 0 : de.call(i)]
  8107. });
  8108. };
  8109. return M(ph, {
  8110. disabled: !y.value,
  8111. onResize: w
  8112. }, {
  8113. default: fe
  8114. });
  8115. };
  8116. }
  8117. });
  8118. Ms.Item = Vve;
  8119. Ms.RESPONSIVE = RZ;
  8120. Ms.INVALIDATE = kZ;
  8121. const Hve = Symbol("TreeSelectLegacyContextPropsKey");
  8122. function PI() {
  8123. return Ge(Hve, {});
  8124. }
  8125. const Gve = {
  8126. id: String,
  8127. prefixCls: String,
  8128. values: Y.array,
  8129. open: {
  8130. type: Boolean,
  8131. default: void 0
  8132. },
  8133. searchValue: String,
  8134. inputRef: Y.any,
  8135. placeholder: Y.any,
  8136. disabled: {
  8137. type: Boolean,
  8138. default: void 0
  8139. },
  8140. mode: String,
  8141. showSearch: {
  8142. type: Boolean,
  8143. default: void 0
  8144. },
  8145. autofocus: {
  8146. type: Boolean,
  8147. default: void 0
  8148. },
  8149. autocomplete: String,
  8150. activeDescendantId: String,
  8151. tabindex: Y.oneOfType([Y.number, Y.string]),
  8152. compositionStatus: Boolean,
  8153. removeIcon: Y.any,
  8154. choiceTransitionName: String,
  8155. maxTagCount: Y.oneOfType([Y.number, Y.string]),
  8156. maxTagTextLength: Number,
  8157. maxTagPlaceholder: Y.any.def(() => (t) => `+ ${t.length} ...`),
  8158. tagRender: Function,
  8159. onToggleOpen: {
  8160. type: Function
  8161. },
  8162. onRemove: Function,
  8163. onInputChange: Function,
  8164. onInputPaste: Function,
  8165. onInputKeyDown: Function,
  8166. onInputMouseDown: Function,
  8167. onInputCompositionStart: Function,
  8168. onInputCompositionEnd: Function
  8169. }, hN = (t) => {
  8170. t.preventDefault(), t.stopPropagation();
  8171. }, jve = te({
  8172. name: "MultipleSelectSelector",
  8173. inheritAttrs: !1,
  8174. props: Gve,
  8175. setup(t) {
  8176. const e = ae(), n = ae(0), r = ae(!1), i = PI(), a = L(() => `${t.prefixCls}-selection`), o = L(() => t.open || t.mode === "tags" ? t.searchValue : ""), s = L(() => t.mode === "tags" || t.showSearch && (t.open || r.value)), l = U("");
  8177. ht(() => {
  8178. l.value = o.value;
  8179. }), it(() => {
  8180. se(l, () => {
  8181. n.value = e.value.scrollWidth;
  8182. }, {
  8183. flush: "post",
  8184. immediate: !0
  8185. });
  8186. });
  8187. function u(p, v, g, m, y) {
  8188. return M("span", {
  8189. class: ye(`${a.value}-item`, {
  8190. [`${a.value}-item-disabled`]: g
  8191. }),
  8192. title: typeof p == "string" || typeof p == "number" ? p.toString() : void 0
  8193. }, [M("span", {
  8194. class: `${a.value}-item-content`
  8195. }, [v]), m && M(pf, {
  8196. class: `${a.value}-item-remove`,
  8197. onMousedown: hN,
  8198. onClick: y,
  8199. customizeIcon: t.removeIcon
  8200. }, {
  8201. default: () => [Kt("×")]
  8202. })]);
  8203. }
  8204. function c(p, v, g, m, y, b) {
  8205. var _;
  8206. const O = (x) => {
  8207. hN(x), t.onToggleOpen(!open);
  8208. };
  8209. let S = b;
  8210. return i.keyEntities && (S = ((_ = i.keyEntities[p]) === null || _ === void 0 ? void 0 : _.node) || {}), M("span", {
  8211. key: p,
  8212. onMousedown: O
  8213. }, [t.tagRender({
  8214. label: v,
  8215. value: p,
  8216. disabled: g,
  8217. closable: m,
  8218. onClose: y,
  8219. option: S
  8220. })]);
  8221. }
  8222. function f(p) {
  8223. const {
  8224. disabled: v,
  8225. label: g,
  8226. value: m,
  8227. option: y
  8228. } = p, b = !t.disabled && !v;
  8229. let _ = g;
  8230. if (typeof t.maxTagTextLength == "number" && (typeof g == "string" || typeof g == "number")) {
  8231. const S = String(_);
  8232. S.length > t.maxTagTextLength && (_ = `${S.slice(0, t.maxTagTextLength)}...`);
  8233. }
  8234. const O = (S) => {
  8235. var x;
  8236. S && S.stopPropagation(), (x = t.onRemove) === null || x === void 0 || x.call(t, p);
  8237. };
  8238. return typeof t.tagRender == "function" ? c(m, _, v, b, O, y) : u(g, _, v, b, O);
  8239. }
  8240. function d(p) {
  8241. const {
  8242. maxTagPlaceholder: v = (m) => `+ ${m.length} ...`
  8243. } = t, g = typeof v == "function" ? v(p) : v;
  8244. return u(g, g, !1);
  8245. }
  8246. const h = (p) => {
  8247. const v = p.target.composing;
  8248. l.value = p.target.value, v || t.onInputChange(p);
  8249. };
  8250. return () => {
  8251. const {
  8252. id: p,
  8253. prefixCls: v,
  8254. values: g,
  8255. open: m,
  8256. inputRef: y,
  8257. placeholder: b,
  8258. disabled: _,
  8259. autofocus: O,
  8260. autocomplete: S,
  8261. activeDescendantId: x,
  8262. tabindex: C,
  8263. compositionStatus: T,
  8264. onInputPaste: w,
  8265. onInputKeyDown: P,
  8266. onInputMouseDown: $,
  8267. onInputCompositionStart: A,
  8268. onInputCompositionEnd: D
  8269. } = t, E = M("div", {
  8270. class: `${a.value}-search`,
  8271. style: {
  8272. width: n.value + "px"
  8273. },
  8274. key: "input"
  8275. }, [M(IZ, {
  8276. inputRef: y,
  8277. open: m,
  8278. prefixCls: v,
  8279. id: p,
  8280. inputElement: null,
  8281. disabled: _,
  8282. autofocus: O,
  8283. autocomplete: S,
  8284. editable: s.value,
  8285. activeDescendantId: x,
  8286. value: l.value,
  8287. onKeydown: P,
  8288. onMousedown: $,
  8289. onChange: h,
  8290. onPaste: w,
  8291. onCompositionstart: A,
  8292. onCompositionend: D,
  8293. tabindex: C,
  8294. attrs: JS(t, !0),
  8295. onFocus: () => r.value = !0,
  8296. onBlur: () => r.value = !1
  8297. }, null), M("span", {
  8298. ref: e,
  8299. class: `${a.value}-search-mirror`,
  8300. "aria-hidden": !0
  8301. }, [l.value, Kt(" ")])]), R = M(Ms, {
  8302. prefixCls: `${a.value}-overflow`,
  8303. data: g,
  8304. renderItem: f,
  8305. renderRest: d,
  8306. suffix: E,
  8307. itemKey: "key",
  8308. maxCount: t.maxTagCount,
  8309. key: "overflow"
  8310. }, null);
  8311. return M(wt, null, [R, !g.length && !o.value && !T && M("span", {
  8312. class: `${a.value}-placeholder`
  8313. }, [b])]);
  8314. };
  8315. }
  8316. }), Zve = {
  8317. inputElement: Y.any,
  8318. id: String,
  8319. prefixCls: String,
  8320. values: Y.array,
  8321. open: {
  8322. type: Boolean,
  8323. default: void 0
  8324. },
  8325. searchValue: String,
  8326. inputRef: Y.any,
  8327. placeholder: Y.any,
  8328. compositionStatus: {
  8329. type: Boolean,
  8330. default: void 0
  8331. },
  8332. disabled: {
  8333. type: Boolean,
  8334. default: void 0
  8335. },
  8336. mode: String,
  8337. showSearch: {
  8338. type: Boolean,
  8339. default: void 0
  8340. },
  8341. autofocus: {
  8342. type: Boolean,
  8343. default: void 0
  8344. },
  8345. autocomplete: String,
  8346. activeDescendantId: String,
  8347. tabindex: Y.oneOfType([Y.number, Y.string]),
  8348. activeValue: String,
  8349. backfill: {
  8350. type: Boolean,
  8351. default: void 0
  8352. },
  8353. optionLabelRender: Function,
  8354. onInputChange: Function,
  8355. onInputPaste: Function,
  8356. onInputKeyDown: Function,
  8357. onInputMouseDown: Function,
  8358. onInputCompositionStart: Function,
  8359. onInputCompositionEnd: Function
  8360. }, $I = te({
  8361. name: "SingleSelector",
  8362. setup(t) {
  8363. const e = ae(!1), n = L(() => t.mode === "combobox"), r = L(() => n.value || t.showSearch), i = L(() => {
  8364. let c = t.searchValue || "";
  8365. return n.value && t.activeValue && !e.value && (c = t.activeValue), c;
  8366. }), a = PI();
  8367. se([n, () => t.activeValue], () => {
  8368. n.value && (e.value = !1);
  8369. }, {
  8370. immediate: !0
  8371. });
  8372. const o = L(() => t.mode !== "combobox" && !t.open && !t.showSearch ? !1 : !!i.value || t.compositionStatus), s = L(() => {
  8373. const c = t.values[0];
  8374. return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
  8375. }), l = () => {
  8376. if (t.values[0])
  8377. return null;
  8378. const c = o.value ? {
  8379. visibility: "hidden"
  8380. } : void 0;
  8381. return M("span", {
  8382. class: `${t.prefixCls}-selection-placeholder`,
  8383. style: c
  8384. }, [t.placeholder]);
  8385. }, u = (c) => {
  8386. c.target.composing || (e.value = !0, t.onInputChange(c));
  8387. };
  8388. return () => {
  8389. var c, f, d, h;
  8390. const {
  8391. inputElement: p,
  8392. prefixCls: v,
  8393. id: g,
  8394. values: m,
  8395. inputRef: y,
  8396. disabled: b,
  8397. autofocus: _,
  8398. autocomplete: O,
  8399. activeDescendantId: S,
  8400. open: x,
  8401. tabindex: C,
  8402. optionLabelRender: T,
  8403. onInputKeyDown: w,
  8404. onInputMouseDown: P,
  8405. onInputPaste: $,
  8406. onInputCompositionStart: A,
  8407. onInputCompositionEnd: D
  8408. } = t, E = m[0];
  8409. let R = null;
  8410. if (E && a.customSlots) {
  8411. const N = (c = E.key) !== null && c !== void 0 ? c : E.value, V = ((f = a.keyEntities[N]) === null || f === void 0 ? void 0 : f.node) || {};
  8412. R = a.customSlots[(d = V.slots) === null || d === void 0 ? void 0 : d.title] || a.customSlots.title || E.label, typeof R == "function" && (R = R(V));
  8413. } else
  8414. R = T && E ? T(E.option) : E == null ? void 0 : E.label;
  8415. return M(wt, null, [M("span", {
  8416. class: `${v}-selection-search`
  8417. }, [M(IZ, {
  8418. inputRef: y,
  8419. prefixCls: v,
  8420. id: g,
  8421. open: x,
  8422. inputElement: p,
  8423. disabled: b,
  8424. autofocus: _,
  8425. autocomplete: O,
  8426. editable: r.value,
  8427. activeDescendantId: S,
  8428. value: i.value,
  8429. onKeydown: w,
  8430. onMousedown: P,
  8431. onChange: u,
  8432. onPaste: $,
  8433. onCompositionstart: A,
  8434. onCompositionend: D,
  8435. tabindex: C,
  8436. attrs: JS(t, !0)
  8437. }, null)]), !n.value && E && !o.value && M("span", {
  8438. class: `${v}-selection-item`,
  8439. title: s.value
  8440. }, [M(wt, {
  8441. key: (h = E.key) !== null && h !== void 0 ? h : E.value
  8442. }, [R])]), l()]);
  8443. };
  8444. }
  8445. });
  8446. $I.props = Zve;
  8447. $I.inheritAttrs = !1;
  8448. function Uve(t) {
  8449. return ![
  8450. // System function button
  8451. ge.ESC,
  8452. ge.SHIFT,
  8453. ge.BACKSPACE,
  8454. ge.TAB,
  8455. ge.WIN_KEY,
  8456. ge.ALT,
  8457. ge.META,
  8458. ge.WIN_KEY_RIGHT,
  8459. ge.CTRL,
  8460. ge.SEMICOLON,
  8461. ge.EQUALS,
  8462. ge.CAPS_LOCK,
  8463. ge.CONTEXT_MENU,
  8464. // F1-F12
  8465. ge.F1,
  8466. ge.F2,
  8467. ge.F3,
  8468. ge.F4,
  8469. ge.F5,
  8470. ge.F6,
  8471. ge.F7,
  8472. ge.F8,
  8473. ge.F9,
  8474. ge.F10,
  8475. ge.F11,
  8476. ge.F12
  8477. ].includes(t);
  8478. }
  8479. function LZ() {
  8480. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, e = null, n;
  8481. yt(() => {
  8482. clearTimeout(n);
  8483. });
  8484. function r(i) {
  8485. (i || e === null) && (e = i), clearTimeout(n), n = setTimeout(() => {
  8486. e = null;
  8487. }, t);
  8488. }
  8489. return [() => e, r];
  8490. }
  8491. function rm() {
  8492. const t = (e) => {
  8493. t.current = e;
  8494. };
  8495. return t;
  8496. }
  8497. const Xve = te({
  8498. name: "Selector",
  8499. inheritAttrs: !1,
  8500. props: {
  8501. id: String,
  8502. prefixCls: String,
  8503. showSearch: {
  8504. type: Boolean,
  8505. default: void 0
  8506. },
  8507. open: {
  8508. type: Boolean,
  8509. default: void 0
  8510. },
  8511. /** Display in the Selector value, it's not same as `value` prop */
  8512. values: Y.array,
  8513. multiple: {
  8514. type: Boolean,
  8515. default: void 0
  8516. },
  8517. mode: String,
  8518. searchValue: String,
  8519. activeValue: String,
  8520. inputElement: Y.any,
  8521. autofocus: {
  8522. type: Boolean,
  8523. default: void 0
  8524. },
  8525. activeDescendantId: String,
  8526. tabindex: Y.oneOfType([Y.number, Y.string]),
  8527. disabled: {
  8528. type: Boolean,
  8529. default: void 0
  8530. },
  8531. placeholder: Y.any,
  8532. removeIcon: Y.any,
  8533. // Tags
  8534. maxTagCount: Y.oneOfType([Y.number, Y.string]),
  8535. maxTagTextLength: Number,
  8536. maxTagPlaceholder: Y.any,
  8537. tagRender: Function,
  8538. optionLabelRender: Function,
  8539. /** Check if `tokenSeparators` contains `\n` or `\r\n` */
  8540. tokenWithEnter: {
  8541. type: Boolean,
  8542. default: void 0
  8543. },
  8544. // Motion
  8545. choiceTransitionName: String,
  8546. onToggleOpen: {
  8547. type: Function
  8548. },
  8549. /** `onSearch` returns go next step boolean to check if need do toggle open */
  8550. onSearch: Function,
  8551. onSearchSubmit: Function,
  8552. onRemove: Function,
  8553. onInputKeyDown: {
  8554. type: Function
  8555. },
  8556. /**
  8557. * @private get real dom for trigger align.
  8558. * This may be removed after React provides replacement of `findDOMNode`
  8559. */
  8560. domRef: Function
  8561. },
  8562. setup(t, e) {
  8563. let {
  8564. expose: n
  8565. } = e;
  8566. const r = rm(), i = U(!1), [a, o] = LZ(0), s = (m) => {
  8567. const {
  8568. which: y
  8569. } = m;
  8570. (y === ge.UP || y === ge.DOWN) && m.preventDefault(), t.onInputKeyDown && t.onInputKeyDown(m), y === ge.ENTER && t.mode === "tags" && !i.value && !t.open && t.onSearchSubmit(m.target.value), Uve(y) && t.onToggleOpen(!0);
  8571. }, l = () => {
  8572. o(!0);
  8573. };
  8574. let u = null;
  8575. const c = (m) => {
  8576. t.onSearch(m, !0, i.value) !== !1 && t.onToggleOpen(!0);
  8577. }, f = () => {
  8578. i.value = !0;
  8579. }, d = (m) => {
  8580. i.value = !1, t.mode !== "combobox" && c(m.target.value);
  8581. }, h = (m) => {
  8582. let {
  8583. target: {
  8584. value: y
  8585. }
  8586. } = m;
  8587. if (t.tokenWithEnter && u && /[\r\n]/.test(u)) {
  8588. const b = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
  8589. y = y.replace(b, u);
  8590. }
  8591. u = null, c(y);
  8592. }, p = (m) => {
  8593. const {
  8594. clipboardData: y
  8595. } = m;
  8596. u = y.getData("text");
  8597. }, v = (m) => {
  8598. let {
  8599. target: y
  8600. } = m;
  8601. y !== r.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
  8602. r.current.focus();
  8603. }) : r.current.focus());
  8604. }, g = (m) => {
  8605. const y = a();
  8606. m.target !== r.current && !y && m.preventDefault(), (t.mode !== "combobox" && (!t.showSearch || !y) || !t.open) && (t.open && t.onSearch("", !0, !1), t.onToggleOpen());
  8607. };
  8608. return n({
  8609. focus: () => {
  8610. r.current.focus();
  8611. },
  8612. blur: () => {
  8613. r.current.blur();
  8614. }
  8615. }), () => {
  8616. const {
  8617. prefixCls: m,
  8618. domRef: y,
  8619. mode: b
  8620. } = t, _ = {
  8621. inputRef: r,
  8622. onInputKeyDown: s,
  8623. onInputMouseDown: l,
  8624. onInputChange: h,
  8625. onInputPaste: p,
  8626. compositionStatus: i.value,
  8627. onInputCompositionStart: f,
  8628. onInputCompositionEnd: d
  8629. }, O = b === "multiple" || b === "tags" ? M(jve, j(j({}, t), _), null) : M($I, j(j({}, t), _), null);
  8630. return M("div", {
  8631. ref: y,
  8632. class: `${m}-selector`,
  8633. onClick: v,
  8634. onMousedown: g
  8635. }, [O]);
  8636. };
  8637. }
  8638. });
  8639. function Yve(t, e, n) {
  8640. function r(i) {
  8641. var a, o, s;
  8642. let l = i.target;
  8643. l.shadowRoot && i.composed && (l = i.composedPath()[0] || l);
  8644. const u = [(a = t[0]) === null || a === void 0 ? void 0 : a.value, (s = (o = t[1]) === null || o === void 0 ? void 0 : o.value) === null || s === void 0 ? void 0 : s.getPopupElement()];
  8645. e.value && u.every((c) => c && !c.contains(l) && c !== l) && n(!1);
  8646. }
  8647. it(() => {
  8648. window.addEventListener("mousedown", r);
  8649. }), yt(() => {
  8650. window.removeEventListener("mousedown", r);
  8651. });
  8652. }
  8653. function qve() {
  8654. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  8655. const e = ae(!1);
  8656. let n;
  8657. const r = () => {
  8658. clearTimeout(n);
  8659. };
  8660. return it(() => {
  8661. r();
  8662. }), [e, (a, o) => {
  8663. r(), n = setTimeout(() => {
  8664. e.value = a, o && o();
  8665. }, t);
  8666. }, r];
  8667. }
  8668. const NZ = Symbol("BaseSelectContextKey");
  8669. function Kve(t) {
  8670. return pt(NZ, t);
  8671. }
  8672. function Jve() {
  8673. return Ge(NZ, {});
  8674. }
  8675. const AI = () => {
  8676. if (typeof navigator > "u" || typeof window > "u")
  8677. return !1;
  8678. const t = navigator.userAgent || navigator.vendor || window.opera;
  8679. 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(t) || /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(t == null ? void 0 : t.substring(0, 4));
  8680. };
  8681. function BZ(t) {
  8682. if (!tp(t)) return tn(t);
  8683. const e = new Proxy({}, {
  8684. get(n, r, i) {
  8685. return Reflect.get(t.value, r, i);
  8686. },
  8687. set(n, r, i) {
  8688. return t.value[r] = i, !0;
  8689. },
  8690. deleteProperty(n, r) {
  8691. return Reflect.deleteProperty(t.value, r);
  8692. },
  8693. has(n, r) {
  8694. return Reflect.has(t.value, r);
  8695. },
  8696. ownKeys() {
  8697. return Object.keys(t.value);
  8698. },
  8699. getOwnPropertyDescriptor() {
  8700. return {
  8701. enumerable: !0,
  8702. configurable: !0
  8703. };
  8704. }
  8705. });
  8706. return tn(e);
  8707. }
  8708. var ege = function(t, e) {
  8709. var n = {};
  8710. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  8711. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  8712. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  8713. return n;
  8714. };
  8715. const tge = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], nge = () => ({
  8716. prefixCls: String,
  8717. id: String,
  8718. omitDomProps: Array,
  8719. // >>> Value
  8720. displayValues: Array,
  8721. onDisplayValuesChange: Function,
  8722. // >>> Active
  8723. /** Current dropdown list active item string value */
  8724. activeValue: String,
  8725. /** Link search input with target element */
  8726. activeDescendantId: String,
  8727. onActiveValueChange: Function,
  8728. // >>> Search
  8729. searchValue: String,
  8730. /** Trigger onSearch, return false to prevent trigger open event */
  8731. onSearch: Function,
  8732. /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  8733. onSearchSplit: Function,
  8734. maxLength: Number,
  8735. OptionList: Y.any,
  8736. /** Tell if provided `options` is empty */
  8737. emptyOptions: Boolean
  8738. }), zZ = () => ({
  8739. showSearch: {
  8740. type: Boolean,
  8741. default: void 0
  8742. },
  8743. tagRender: {
  8744. type: Function
  8745. },
  8746. optionLabelRender: {
  8747. type: Function
  8748. },
  8749. direction: {
  8750. type: String
  8751. },
  8752. // MISC
  8753. tabindex: Number,
  8754. autofocus: Boolean,
  8755. notFoundContent: Y.any,
  8756. placeholder: Y.any,
  8757. onClear: Function,
  8758. choiceTransitionName: String,
  8759. // >>> Mode
  8760. mode: String,
  8761. // >>> Status
  8762. disabled: {
  8763. type: Boolean,
  8764. default: void 0
  8765. },
  8766. loading: {
  8767. type: Boolean,
  8768. default: void 0
  8769. },
  8770. // >>> Open
  8771. open: {
  8772. type: Boolean,
  8773. default: void 0
  8774. },
  8775. defaultOpen: {
  8776. type: Boolean,
  8777. default: void 0
  8778. },
  8779. onDropdownVisibleChange: {
  8780. type: Function
  8781. },
  8782. // >>> Customize Input
  8783. /** @private Internal usage. Do not use in your production. */
  8784. getInputElement: {
  8785. type: Function
  8786. },
  8787. /** @private Internal usage. Do not use in your production. */
  8788. getRawInputElement: {
  8789. type: Function
  8790. },
  8791. // >>> Selector
  8792. maxTagTextLength: Number,
  8793. maxTagCount: {
  8794. type: [String, Number]
  8795. },
  8796. maxTagPlaceholder: Y.any,
  8797. // >>> Search
  8798. tokenSeparators: {
  8799. type: Array
  8800. },
  8801. // >>> Icons
  8802. allowClear: {
  8803. type: Boolean,
  8804. default: void 0
  8805. },
  8806. showArrow: {
  8807. type: Boolean,
  8808. default: void 0
  8809. },
  8810. inputIcon: Y.any,
  8811. /** Clear all icon */
  8812. clearIcon: Y.any,
  8813. /** Selector remove icon */
  8814. removeIcon: Y.any,
  8815. // >>> Dropdown
  8816. animation: String,
  8817. transitionName: String,
  8818. dropdownStyle: {
  8819. type: Object
  8820. },
  8821. dropdownClassName: String,
  8822. dropdownMatchSelectWidth: {
  8823. type: [Boolean, Number],
  8824. default: void 0
  8825. },
  8826. dropdownRender: {
  8827. type: Function
  8828. },
  8829. dropdownAlign: Object,
  8830. placement: {
  8831. type: String
  8832. },
  8833. getPopupContainer: {
  8834. type: Function
  8835. },
  8836. // >>> Focus
  8837. showAction: {
  8838. type: Array
  8839. },
  8840. onBlur: {
  8841. type: Function
  8842. },
  8843. onFocus: {
  8844. type: Function
  8845. },
  8846. // >>> Rest Events
  8847. onKeyup: Function,
  8848. onKeydown: Function,
  8849. onMousedown: Function,
  8850. onPopupScroll: Function,
  8851. onInputKeyDown: Function,
  8852. onMouseenter: Function,
  8853. onMouseleave: Function,
  8854. onClick: Function
  8855. }), rge = () => I(I({}, nge()), zZ());
  8856. function EI(t) {
  8857. return t === "tags" || t === "multiple";
  8858. }
  8859. const ige = te({
  8860. compatConfig: {
  8861. MODE: 3
  8862. },
  8863. name: "BaseSelect",
  8864. inheritAttrs: !1,
  8865. props: sr(rge(), {
  8866. showAction: [],
  8867. notFoundContent: "Not Found"
  8868. }),
  8869. setup(t, e) {
  8870. let {
  8871. attrs: n,
  8872. expose: r,
  8873. slots: i
  8874. } = e;
  8875. const a = L(() => EI(t.mode)), o = L(() => t.showSearch !== void 0 ? t.showSearch : a.value || t.mode === "combobox"), s = ae(!1);
  8876. it(() => {
  8877. s.value = AI();
  8878. });
  8879. const l = PI(), u = ae(null), c = rm(), f = ae(null), d = ae(null), h = ae(null), p = U(!1), [v, g, m] = qve();
  8880. r({
  8881. focus: () => {
  8882. var H;
  8883. (H = d.value) === null || H === void 0 || H.focus();
  8884. },
  8885. blur: () => {
  8886. var H;
  8887. (H = d.value) === null || H === void 0 || H.blur();
  8888. },
  8889. scrollTo: (H) => {
  8890. var G;
  8891. return (G = h.value) === null || G === void 0 ? void 0 : G.scrollTo(H);
  8892. }
  8893. });
  8894. const _ = L(() => {
  8895. var H;
  8896. if (t.mode !== "combobox")
  8897. return t.searchValue;
  8898. const G = (H = t.displayValues[0]) === null || H === void 0 ? void 0 : H.value;
  8899. return typeof G == "string" || typeof G == "number" ? String(G) : "";
  8900. }), O = t.open !== void 0 ? t.open : t.defaultOpen, S = ae(O), x = ae(O), C = (H) => {
  8901. S.value = t.open !== void 0 ? t.open : H, x.value = S.value;
  8902. };
  8903. se(() => t.open, () => {
  8904. C(t.open);
  8905. });
  8906. const T = L(() => !t.notFoundContent && t.emptyOptions);
  8907. ht(() => {
  8908. x.value = S.value, (t.disabled || T.value && x.value && t.mode === "combobox") && (x.value = !1);
  8909. });
  8910. const w = L(() => T.value ? !1 : x.value), P = (H) => {
  8911. const G = H !== void 0 ? H : !x.value;
  8912. x.value !== G && !t.disabled && (C(G), t.onDropdownVisibleChange && t.onDropdownVisibleChange(G));
  8913. }, $ = L(() => (t.tokenSeparators || []).some((H) => [`
  8914. `, `\r
  8915. `].includes(H))), A = (H, G, re) => {
  8916. var fe, de;
  8917. let Ee = !0, $e = H;
  8918. (fe = t.onActiveValueChange) === null || fe === void 0 || fe.call(t, null);
  8919. const Se = re ? null : Jfe(H, t.tokenSeparators);
  8920. return t.mode !== "combobox" && Se && ($e = "", (de = t.onSearchSplit) === null || de === void 0 || de.call(t, Se), P(!1), Ee = !1), t.onSearch && _.value !== $e && t.onSearch($e, {
  8921. source: G ? "typing" : "effect"
  8922. }), Ee;
  8923. }, D = (H) => {
  8924. var G;
  8925. !H || !H.trim() || (G = t.onSearch) === null || G === void 0 || G.call(t, H, {
  8926. source: "submit"
  8927. });
  8928. };
  8929. se(x, () => {
  8930. !x.value && !a.value && t.mode !== "combobox" && A("", !1, !1);
  8931. }, {
  8932. immediate: !0,
  8933. flush: "post"
  8934. }), se(() => t.disabled, () => {
  8935. S.value && t.disabled && C(!1), t.disabled && !p.value && g(!1);
  8936. }, {
  8937. immediate: !0
  8938. });
  8939. const [E, R] = LZ(), N = function(H) {
  8940. var G;
  8941. const re = E(), {
  8942. which: fe
  8943. } = H;
  8944. if (fe === ge.ENTER && (t.mode !== "combobox" && H.preventDefault(), x.value || P(!0)), R(!!_.value), fe === ge.BACKSPACE && !re && a.value && !_.value && t.displayValues.length) {
  8945. const Se = [...t.displayValues];
  8946. let be = null;
  8947. for (let he = Se.length - 1; he >= 0; he -= 1) {
  8948. const Te = Se[he];
  8949. if (!Te.disabled) {
  8950. Se.splice(he, 1), be = Te;
  8951. break;
  8952. }
  8953. }
  8954. be && t.onDisplayValuesChange(Se, {
  8955. type: "remove",
  8956. values: [be]
  8957. });
  8958. }
  8959. for (var de = arguments.length, Ee = new Array(de > 1 ? de - 1 : 0), $e = 1; $e < de; $e++)
  8960. Ee[$e - 1] = arguments[$e];
  8961. x.value && h.value && h.value.onKeydown(H, ...Ee), (G = t.onKeydown) === null || G === void 0 || G.call(t, H, ...Ee);
  8962. }, V = function(H) {
  8963. for (var G = arguments.length, re = new Array(G > 1 ? G - 1 : 0), fe = 1; fe < G; fe++)
  8964. re[fe - 1] = arguments[fe];
  8965. x.value && h.value && h.value.onKeyup(H, ...re), t.onKeyup && t.onKeyup(H, ...re);
  8966. }, z = (H) => {
  8967. const G = t.displayValues.filter((re) => re !== H);
  8968. t.onDisplayValuesChange(G, {
  8969. type: "remove",
  8970. values: [H]
  8971. });
  8972. }, W = ae(!1), F = function() {
  8973. g(!0), t.disabled || (t.onFocus && !W.value && t.onFocus(...arguments), t.showAction && t.showAction.includes("focus") && P(!0)), W.value = !0;
  8974. }, Q = U(!1), Z = function() {
  8975. if (Q.value || (p.value = !0, g(!1, () => {
  8976. W.value = !1, p.value = !1, P(!1);
  8977. }), t.disabled))
  8978. return;
  8979. const H = _.value;
  8980. H && (t.mode === "tags" ? t.onSearch(H, {
  8981. source: "submit"
  8982. }) : t.mode === "multiple" && t.onSearch("", {
  8983. source: "blur"
  8984. })), t.onBlur && t.onBlur(...arguments);
  8985. }, ne = () => {
  8986. Q.value = !0;
  8987. }, ee = () => {
  8988. Q.value = !1;
  8989. };
  8990. pt("VCSelectContainerEvent", {
  8991. focus: F,
  8992. blur: Z
  8993. });
  8994. const oe = [];
  8995. it(() => {
  8996. oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
  8997. }), yt(() => {
  8998. oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
  8999. });
  9000. const K = function(H) {
  9001. var G, re;
  9002. const {
  9003. target: fe
  9004. } = H, de = (G = f.value) === null || G === void 0 ? void 0 : G.getPopupElement();
  9005. if (de && de.contains(fe)) {
  9006. const be = setTimeout(() => {
  9007. var he;
  9008. const Te = oe.indexOf(be);
  9009. Te !== -1 && oe.splice(Te, 1), m(), !s.value && !de.contains(document.activeElement) && ((he = d.value) === null || he === void 0 || he.focus());
  9010. });
  9011. oe.push(be);
  9012. }
  9013. for (var Ee = arguments.length, $e = new Array(Ee > 1 ? Ee - 1 : 0), Se = 1; Se < Ee; Se++)
  9014. $e[Se - 1] = arguments[Se];
  9015. (re = t.onMousedown) === null || re === void 0 || re.call(t, H, ...$e);
  9016. }, ie = ae(null), X = () => {
  9017. };
  9018. return it(() => {
  9019. se(w, () => {
  9020. var H;
  9021. if (w.value) {
  9022. const G = Math.ceil((H = u.value) === null || H === void 0 ? void 0 : H.offsetWidth);
  9023. ie.value !== G && !Number.isNaN(G) && (ie.value = G);
  9024. }
  9025. }, {
  9026. immediate: !0,
  9027. flush: "post"
  9028. });
  9029. }), Yve([u, f], w, P), Kve(BZ(I(I({}, $S(t)), {
  9030. open: x,
  9031. triggerOpen: w,
  9032. showSearch: o,
  9033. multiple: a,
  9034. toggleOpen: P
  9035. }))), () => {
  9036. const H = I(I({}, t), n), {
  9037. prefixCls: G,
  9038. id: re,
  9039. open: fe,
  9040. defaultOpen: de,
  9041. mode: Ee,
  9042. // Search related
  9043. showSearch: $e,
  9044. searchValue: Se,
  9045. onSearch: be,
  9046. // Icons
  9047. allowClear: he,
  9048. clearIcon: Te,
  9049. showArrow: ze,
  9050. inputIcon: ut,
  9051. // Others
  9052. disabled: ct,
  9053. loading: Dt,
  9054. getInputElement: ve,
  9055. getPopupContainer: Xe,
  9056. placement: Rt,
  9057. // Dropdown
  9058. animation: An,
  9059. transitionName: sn,
  9060. dropdownStyle: $r,
  9061. dropdownClassName: Va,
  9062. dropdownMatchSelectWidth: Bp,
  9063. dropdownRender: zp,
  9064. dropdownAlign: py,
  9065. showAction: Hw,
  9066. direction: Gf,
  9067. // Tags
  9068. tokenSeparators: Gw,
  9069. tagRender: Vp,
  9070. optionLabelRender: jw,
  9071. // Events
  9072. onPopupScroll: jf,
  9073. onDropdownVisibleChange: F4,
  9074. onFocus: upt,
  9075. onBlur: cpt,
  9076. onKeyup: fpt,
  9077. onKeydown: dpt,
  9078. onMousedown: hpt,
  9079. onClear: Zw,
  9080. omitDomProps: Uw,
  9081. getRawInputElement: W4,
  9082. displayValues: vy,
  9083. onDisplayValuesChange: Ale,
  9084. emptyOptions: Ele,
  9085. activeDescendantId: Mle,
  9086. activeValue: Ile,
  9087. OptionList: Dle
  9088. } = H, Rle = ege(H, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), Q4 = Ee === "combobox" && ve && ve() || null, Fp = typeof W4 == "function" && W4(), Xw = I({}, Rle);
  9089. let H4;
  9090. Fp && (H4 = (Iu) => {
  9091. P(Iu);
  9092. }), tge.forEach((Iu) => {
  9093. delete Xw[Iu];
  9094. }), Uw == null || Uw.forEach((Iu) => {
  9095. delete Xw[Iu];
  9096. });
  9097. const G4 = ze !== void 0 ? ze : Dt || !a.value && Ee !== "combobox";
  9098. let j4;
  9099. G4 && (j4 = M(pf, {
  9100. class: ye(`${G}-arrow`, {
  9101. [`${G}-arrow-loading`]: Dt
  9102. }),
  9103. customizeIcon: ut,
  9104. customizeIconProps: {
  9105. loading: Dt,
  9106. searchValue: _.value,
  9107. open: x.value,
  9108. focused: v.value,
  9109. showSearch: o.value
  9110. }
  9111. }, null));
  9112. let Z4;
  9113. const kle = () => {
  9114. Zw == null || Zw(), Ale([], {
  9115. type: "clear",
  9116. values: vy
  9117. }), A("", !1, !1);
  9118. };
  9119. !ct && he && (vy.length || _.value) && (Z4 = M(pf, {
  9120. class: `${G}-clear`,
  9121. onMousedown: kle,
  9122. customizeIcon: Te
  9123. }, {
  9124. default: () => [Kt("×")]
  9125. }));
  9126. const Lle = M(Dle, {
  9127. ref: h
  9128. }, I(I({}, l.customSlots), {
  9129. option: i.option
  9130. })), Nle = ye(G, n.class, {
  9131. [`${G}-focused`]: v.value,
  9132. [`${G}-multiple`]: a.value,
  9133. [`${G}-single`]: !a.value,
  9134. [`${G}-allow-clear`]: he,
  9135. [`${G}-show-arrow`]: G4,
  9136. [`${G}-disabled`]: ct,
  9137. [`${G}-loading`]: Dt,
  9138. [`${G}-open`]: x.value,
  9139. [`${G}-customize-input`]: Q4,
  9140. [`${G}-show-search`]: o.value
  9141. }), U4 = M(Pve, {
  9142. ref: f,
  9143. disabled: ct,
  9144. prefixCls: G,
  9145. visible: w.value,
  9146. popupElement: Lle,
  9147. containerWidth: ie.value,
  9148. animation: An,
  9149. transitionName: sn,
  9150. dropdownStyle: $r,
  9151. dropdownClassName: Va,
  9152. direction: Gf,
  9153. dropdownMatchSelectWidth: Bp,
  9154. dropdownRender: zp,
  9155. dropdownAlign: py,
  9156. placement: Rt,
  9157. getPopupContainer: Xe,
  9158. empty: Ele,
  9159. getTriggerDOMNode: () => c.current,
  9160. onPopupVisibleChange: H4,
  9161. onPopupMouseEnter: X,
  9162. onPopupFocusin: ne,
  9163. onPopupFocusout: ee
  9164. }, {
  9165. default: () => Fp ? Ui(Fp) && Pn(Fp, {
  9166. ref: c
  9167. }, !1, !0) : M(Xve, j(j({}, t), {}, {
  9168. domRef: c,
  9169. prefixCls: G,
  9170. inputElement: Q4,
  9171. ref: d,
  9172. id: re,
  9173. showSearch: o.value,
  9174. mode: Ee,
  9175. activeDescendantId: Mle,
  9176. tagRender: Vp,
  9177. optionLabelRender: jw,
  9178. values: vy,
  9179. open: x.value,
  9180. onToggleOpen: P,
  9181. activeValue: Ile,
  9182. searchValue: _.value,
  9183. onSearch: A,
  9184. onSearchSubmit: D,
  9185. onRemove: z,
  9186. tokenWithEnter: $.value
  9187. }), null)
  9188. });
  9189. let Yw;
  9190. return Fp ? Yw = U4 : Yw = M("div", j(j({}, Xw), {}, {
  9191. class: Nle,
  9192. ref: u,
  9193. onMousedown: K,
  9194. onKeydown: N,
  9195. onKeyup: V
  9196. }), [v.value && !x.value && M("span", {
  9197. style: {
  9198. width: 0,
  9199. height: 0,
  9200. position: "absolute",
  9201. overflow: "hidden",
  9202. opacity: 0
  9203. },
  9204. "aria-live": "polite"
  9205. }, [`${vy.map((Iu) => {
  9206. let {
  9207. label: X4,
  9208. value: Ble
  9209. } = Iu;
  9210. return ["number", "string"].includes(typeof X4) ? X4 : Ble;
  9211. }).join(", ")}`]), U4, j4, Z4]), Yw;
  9212. };
  9213. }
  9214. }), ex = (t, e) => {
  9215. let {
  9216. height: n,
  9217. offset: r,
  9218. prefixCls: i,
  9219. onInnerResize: a
  9220. } = t, {
  9221. slots: o
  9222. } = e;
  9223. var s;
  9224. let l = {}, u = {
  9225. display: "flex",
  9226. flexDirection: "column"
  9227. };
  9228. return r !== void 0 && (l = {
  9229. height: `${n}px`,
  9230. position: "relative",
  9231. overflow: "hidden"
  9232. }, u = I(I({}, u), {
  9233. transform: `translateY(${r}px)`,
  9234. position: "absolute",
  9235. left: 0,
  9236. right: 0,
  9237. top: 0
  9238. })), M("div", {
  9239. style: l
  9240. }, [M(ph, {
  9241. onResize: (c) => {
  9242. let {
  9243. offsetHeight: f
  9244. } = c;
  9245. f && a && a();
  9246. }
  9247. }, {
  9248. default: () => [M("div", {
  9249. style: u,
  9250. class: ye({
  9251. [`${i}-holder-inner`]: i
  9252. })
  9253. }, [(s = o.default) === null || s === void 0 ? void 0 : s.call(o)])]
  9254. })]);
  9255. };
  9256. ex.displayName = "Filter";
  9257. ex.inheritAttrs = !1;
  9258. ex.props = {
  9259. prefixCls: String,
  9260. /** Virtual filler height. Should be `count * itemMinHeight` */
  9261. height: Number,
  9262. /** Set offset of visible items. Should be the top of start item position */
  9263. offset: Number,
  9264. onInnerResize: Function
  9265. };
  9266. const VZ = (t, e) => {
  9267. let {
  9268. setRef: n
  9269. } = t, {
  9270. slots: r
  9271. } = e;
  9272. var i;
  9273. const a = Yn((i = r.default) === null || i === void 0 ? void 0 : i.call(r));
  9274. return a && a.length ? Ns(a[0], {
  9275. ref: n
  9276. }) : a;
  9277. };
  9278. VZ.props = {
  9279. setRef: {
  9280. type: Function,
  9281. default: () => {
  9282. }
  9283. }
  9284. };
  9285. const age = 20;
  9286. function pN(t) {
  9287. return "touches" in t ? t.touches[0].pageY : t.pageY;
  9288. }
  9289. const oge = te({
  9290. compatConfig: {
  9291. MODE: 3
  9292. },
  9293. name: "ScrollBar",
  9294. inheritAttrs: !1,
  9295. props: {
  9296. prefixCls: String,
  9297. scrollTop: Number,
  9298. scrollHeight: Number,
  9299. height: Number,
  9300. count: Number,
  9301. onScroll: {
  9302. type: Function
  9303. },
  9304. onStartMove: {
  9305. type: Function
  9306. },
  9307. onStopMove: {
  9308. type: Function
  9309. }
  9310. },
  9311. setup() {
  9312. return {
  9313. moveRaf: null,
  9314. scrollbarRef: rm(),
  9315. thumbRef: rm(),
  9316. visibleTimeout: null,
  9317. state: tn({
  9318. dragging: !1,
  9319. pageY: null,
  9320. startTop: null,
  9321. visible: !1
  9322. })
  9323. };
  9324. },
  9325. watch: {
  9326. scrollTop: {
  9327. handler() {
  9328. this.delayHidden();
  9329. },
  9330. flush: "post"
  9331. }
  9332. },
  9333. mounted() {
  9334. var t, e;
  9335. (t = this.scrollbarRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
  9336. passive: !1
  9337. } : !1), (e = this.thumbRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onMouseDown, pr ? {
  9338. passive: !1
  9339. } : !1);
  9340. },
  9341. beforeUnmount() {
  9342. this.removeEvents(), clearTimeout(this.visibleTimeout);
  9343. },
  9344. methods: {
  9345. delayHidden() {
  9346. clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
  9347. this.state.visible = !1;
  9348. }, 2e3);
  9349. },
  9350. onScrollbarTouchStart(t) {
  9351. t.preventDefault();
  9352. },
  9353. onContainerMouseDown(t) {
  9354. t.stopPropagation(), t.preventDefault();
  9355. },
  9356. // ======================= Clean =======================
  9357. patchEvents() {
  9358. window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, pr ? {
  9359. passive: !1
  9360. } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
  9361. },
  9362. removeEvents() {
  9363. window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
  9364. passive: !1
  9365. } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, pr ? {
  9366. passive: !1
  9367. } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, pr ? {
  9368. passive: !1
  9369. } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), xt.cancel(this.moveRaf);
  9370. },
  9371. // ======================= Thumb =======================
  9372. onMouseDown(t) {
  9373. const {
  9374. onStartMove: e
  9375. } = this.$props;
  9376. I(this.state, {
  9377. dragging: !0,
  9378. pageY: pN(t),
  9379. startTop: this.getTop()
  9380. }), e(), this.patchEvents(), t.stopPropagation(), t.preventDefault();
  9381. },
  9382. onMouseMove(t) {
  9383. const {
  9384. dragging: e,
  9385. pageY: n,
  9386. startTop: r
  9387. } = this.state, {
  9388. onScroll: i
  9389. } = this.$props;
  9390. if (xt.cancel(this.moveRaf), e) {
  9391. const a = pN(t) - n, o = r + a, s = this.getEnableScrollRange(), l = this.getEnableHeightRange(), u = l ? o / l : 0, c = Math.ceil(u * s);
  9392. this.moveRaf = xt(() => {
  9393. i(c);
  9394. });
  9395. }
  9396. },
  9397. onMouseUp() {
  9398. const {
  9399. onStopMove: t
  9400. } = this.$props;
  9401. this.state.dragging = !1, t(), this.removeEvents();
  9402. },
  9403. // ===================== Calculate =====================
  9404. getSpinHeight() {
  9405. const {
  9406. height: t,
  9407. scrollHeight: e
  9408. } = this.$props;
  9409. let n = t / e * 100;
  9410. return n = Math.max(n, age), n = Math.min(n, t / 2), Math.floor(n);
  9411. },
  9412. getEnableScrollRange() {
  9413. const {
  9414. scrollHeight: t,
  9415. height: e
  9416. } = this.$props;
  9417. return t - e || 0;
  9418. },
  9419. getEnableHeightRange() {
  9420. const {
  9421. height: t
  9422. } = this.$props, e = this.getSpinHeight();
  9423. return t - e || 0;
  9424. },
  9425. getTop() {
  9426. const {
  9427. scrollTop: t
  9428. } = this.$props, e = this.getEnableScrollRange(), n = this.getEnableHeightRange();
  9429. return t === 0 || e === 0 ? 0 : t / e * n;
  9430. },
  9431. // Not show scrollbar when height is large than scrollHeight
  9432. showScroll() {
  9433. const {
  9434. height: t,
  9435. scrollHeight: e
  9436. } = this.$props;
  9437. return e > t;
  9438. }
  9439. },
  9440. render() {
  9441. const {
  9442. dragging: t,
  9443. visible: e
  9444. } = this.state, {
  9445. prefixCls: n
  9446. } = this.$props, r = this.getSpinHeight() + "px", i = this.getTop() + "px", a = this.showScroll(), o = a && e;
  9447. return M("div", {
  9448. ref: this.scrollbarRef,
  9449. class: ye(`${n}-scrollbar`, {
  9450. [`${n}-scrollbar-show`]: a
  9451. }),
  9452. style: {
  9453. width: "8px",
  9454. top: 0,
  9455. bottom: 0,
  9456. right: 0,
  9457. position: "absolute",
  9458. display: o ? void 0 : "none"
  9459. },
  9460. onMousedown: this.onContainerMouseDown,
  9461. onMousemove: this.delayHidden
  9462. }, [M("div", {
  9463. ref: this.thumbRef,
  9464. class: ye(`${n}-scrollbar-thumb`, {
  9465. [`${n}-scrollbar-thumb-moving`]: t
  9466. }),
  9467. style: {
  9468. width: "100%",
  9469. height: r,
  9470. top: i,
  9471. left: 0,
  9472. position: "absolute",
  9473. background: "rgba(0, 0, 0, 0.5)",
  9474. borderRadius: "99px",
  9475. cursor: "pointer",
  9476. userSelect: "none"
  9477. },
  9478. onMousedown: this.onMouseDown
  9479. }, null)]);
  9480. }
  9481. });
  9482. function sge(t, e, n, r) {
  9483. const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = U(Symbol("update"));
  9484. se(t, () => {
  9485. o.value = Symbol("update");
  9486. });
  9487. let s;
  9488. function l() {
  9489. xt.cancel(s);
  9490. }
  9491. function u() {
  9492. l(), s = xt(() => {
  9493. i.forEach((f, d) => {
  9494. if (f && f.offsetParent) {
  9495. const {
  9496. offsetHeight: h
  9497. } = f;
  9498. a.get(d) !== h && (o.value = Symbol("update"), a.set(d, f.offsetHeight));
  9499. }
  9500. });
  9501. });
  9502. }
  9503. function c(f, d) {
  9504. const h = e(f);
  9505. i.get(h), d ? (i.set(h, d.$el || d), u()) : i.delete(h);
  9506. }
  9507. return nl(() => {
  9508. l();
  9509. }), [c, u, a, o];
  9510. }
  9511. function lge(t, e, n, r, i, a, o, s) {
  9512. let l;
  9513. return (u) => {
  9514. if (u == null) {
  9515. s();
  9516. return;
  9517. }
  9518. xt.cancel(l);
  9519. const c = e.value, f = r.itemHeight;
  9520. if (typeof u == "number")
  9521. o(u);
  9522. else if (u && typeof u == "object") {
  9523. let d;
  9524. const {
  9525. align: h
  9526. } = u;
  9527. "index" in u ? {
  9528. index: d
  9529. } = u : d = c.findIndex((g) => i(g) === u.key);
  9530. const {
  9531. offset: p = 0
  9532. } = u, v = (g, m) => {
  9533. if (g < 0 || !t.value) return;
  9534. const y = t.value.clientHeight;
  9535. let b = !1, _ = m;
  9536. if (y) {
  9537. const O = m || h;
  9538. let S = 0, x = 0, C = 0;
  9539. const T = Math.min(c.length, d);
  9540. for (let $ = 0; $ <= T; $ += 1) {
  9541. const A = i(c[$]);
  9542. x = S;
  9543. const D = n.get(A);
  9544. C = x + (D === void 0 ? f : D), S = C, $ === d && D === void 0 && (b = !0);
  9545. }
  9546. const w = t.value.scrollTop;
  9547. let P = null;
  9548. switch (O) {
  9549. case "top":
  9550. P = x - p;
  9551. break;
  9552. case "bottom":
  9553. P = C - y + p;
  9554. break;
  9555. default: {
  9556. const $ = w + y;
  9557. x < w ? _ = "top" : C > $ && (_ = "bottom");
  9558. }
  9559. }
  9560. P !== null && P !== w && o(P);
  9561. }
  9562. l = xt(() => {
  9563. b && a(), v(g - 1, _);
  9564. }, 2);
  9565. };
  9566. v(5);
  9567. }
  9568. };
  9569. }
  9570. const uge = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), FZ = (t, e) => {
  9571. let n = !1, r = null;
  9572. function i() {
  9573. clearTimeout(r), n = !0, r = setTimeout(() => {
  9574. n = !1;
  9575. }, 50);
  9576. }
  9577. return function(a) {
  9578. let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  9579. const s = (
  9580. // Pass origin wheel when on the top
  9581. a < 0 && t.value || // Pass origin wheel when on the bottom
  9582. a > 0 && e.value
  9583. );
  9584. return o && s ? (clearTimeout(r), n = !1) : (!s || n) && i(), !n && s;
  9585. };
  9586. };
  9587. function cge(t, e, n, r) {
  9588. let i = 0, a = null, o = null, s = !1;
  9589. const l = FZ(e, n);
  9590. function u(f) {
  9591. if (!t.value) return;
  9592. xt.cancel(a);
  9593. const {
  9594. deltaY: d
  9595. } = f;
  9596. i += d, o = d, !l(d) && (uge || f.preventDefault(), a = xt(() => {
  9597. r(i * (s ? 10 : 1)), i = 0;
  9598. }));
  9599. }
  9600. function c(f) {
  9601. t.value && (s = f.detail === o);
  9602. }
  9603. return [u, c];
  9604. }
  9605. const fge = 14 / 15;
  9606. function dge(t, e, n) {
  9607. let r = !1, i = 0, a = null, o = null;
  9608. const s = () => {
  9609. a && (a.removeEventListener("touchmove", l), a.removeEventListener("touchend", u));
  9610. }, l = (d) => {
  9611. if (r) {
  9612. const h = Math.ceil(d.touches[0].pageY);
  9613. let p = i - h;
  9614. i = h, n(p) && d.preventDefault(), clearInterval(o), o = setInterval(() => {
  9615. p *= fge, (!n(p, !0) || Math.abs(p) <= 0.1) && clearInterval(o);
  9616. }, 16);
  9617. }
  9618. }, u = () => {
  9619. r = !1, s();
  9620. }, c = (d) => {
  9621. s(), d.touches.length === 1 && !r && (r = !0, i = Math.ceil(d.touches[0].pageY), a = d.target, a.addEventListener("touchmove", l, {
  9622. passive: !1
  9623. }), a.addEventListener("touchend", u));
  9624. }, f = () => {
  9625. };
  9626. it(() => {
  9627. document.addEventListener("touchmove", f, {
  9628. passive: !1
  9629. }), se(t, (d) => {
  9630. e.value.removeEventListener("touchstart", c), s(), clearInterval(o), d && e.value.addEventListener("touchstart", c, {
  9631. passive: !1
  9632. });
  9633. }, {
  9634. immediate: !0
  9635. });
  9636. }), yt(() => {
  9637. document.removeEventListener("touchmove", f);
  9638. });
  9639. }
  9640. var hge = function(t, e) {
  9641. var n = {};
  9642. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  9643. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  9644. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  9645. return n;
  9646. };
  9647. const pge = [], vge = {
  9648. overflowY: "auto",
  9649. overflowAnchor: "none"
  9650. };
  9651. function gge(t, e, n, r, i, a) {
  9652. let {
  9653. getKey: o
  9654. } = a;
  9655. return t.slice(e, n + 1).map((s, l) => {
  9656. const u = e + l, c = i(s, u, {
  9657. // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
  9658. }), f = o(s);
  9659. return M(VZ, {
  9660. key: f,
  9661. setRef: (d) => r(s, d)
  9662. }, {
  9663. default: () => [c]
  9664. });
  9665. });
  9666. }
  9667. const mge = te({
  9668. compatConfig: {
  9669. MODE: 3
  9670. },
  9671. name: "List",
  9672. inheritAttrs: !1,
  9673. props: {
  9674. prefixCls: String,
  9675. data: Y.array,
  9676. height: Number,
  9677. itemHeight: Number,
  9678. /** If not match virtual scroll condition, Set List still use height of container. */
  9679. fullHeight: {
  9680. type: Boolean,
  9681. default: void 0
  9682. },
  9683. itemKey: {
  9684. type: [String, Number, Function],
  9685. required: !0
  9686. },
  9687. component: {
  9688. type: [String, Object]
  9689. },
  9690. /** Set `false` will always use real scroll instead of virtual one */
  9691. virtual: {
  9692. type: Boolean,
  9693. default: void 0
  9694. },
  9695. children: Function,
  9696. onScroll: Function,
  9697. onMousedown: Function,
  9698. onMouseenter: Function,
  9699. onVisibleChange: Function
  9700. },
  9701. setup(t, e) {
  9702. let {
  9703. expose: n
  9704. } = e;
  9705. const r = L(() => {
  9706. const {
  9707. height: z,
  9708. itemHeight: W,
  9709. virtual: F
  9710. } = t;
  9711. return !!(F !== !1 && z && W);
  9712. }), i = L(() => {
  9713. const {
  9714. height: z,
  9715. itemHeight: W,
  9716. data: F
  9717. } = t;
  9718. return r.value && F && W * F.length > z;
  9719. }), a = tn({
  9720. scrollTop: 0,
  9721. scrollMoving: !1
  9722. }), o = L(() => t.data || pge), s = ae([]);
  9723. se(o, () => {
  9724. s.value = qo(o.value).slice();
  9725. }, {
  9726. immediate: !0
  9727. });
  9728. const l = ae((z) => {
  9729. });
  9730. se(() => t.itemKey, (z) => {
  9731. typeof z == "function" ? l.value = z : l.value = (W) => W == null ? void 0 : W[z];
  9732. }, {
  9733. immediate: !0
  9734. });
  9735. const u = ae(), c = ae(), f = ae(), d = (z) => l.value(z), h = {
  9736. getKey: d
  9737. };
  9738. function p(z) {
  9739. let W;
  9740. typeof z == "function" ? W = z(a.scrollTop) : W = z;
  9741. const F = S(W);
  9742. u.value && (u.value.scrollTop = F), a.scrollTop = F;
  9743. }
  9744. const [v, g, m, y] = sge(s, d), b = tn({
  9745. scrollHeight: void 0,
  9746. start: 0,
  9747. end: 0,
  9748. offset: void 0
  9749. }), _ = ae(0);
  9750. it(() => {
  9751. Tt(() => {
  9752. var z;
  9753. _.value = ((z = c.value) === null || z === void 0 ? void 0 : z.offsetHeight) || 0;
  9754. });
  9755. }), ep(() => {
  9756. Tt(() => {
  9757. var z;
  9758. _.value = ((z = c.value) === null || z === void 0 ? void 0 : z.offsetHeight) || 0;
  9759. });
  9760. }), se([r, s], () => {
  9761. r.value || I(b, {
  9762. scrollHeight: void 0,
  9763. start: 0,
  9764. end: s.value.length - 1,
  9765. offset: void 0
  9766. });
  9767. }, {
  9768. immediate: !0
  9769. }), se([r, s, _, i], () => {
  9770. r.value && !i.value && I(b, {
  9771. scrollHeight: _.value,
  9772. start: 0,
  9773. end: s.value.length - 1,
  9774. offset: void 0
  9775. }), u.value && (a.scrollTop = u.value.scrollTop);
  9776. }, {
  9777. immediate: !0
  9778. }), se([i, r, () => a.scrollTop, s, y, () => t.height, _], () => {
  9779. if (!r.value || !i.value)
  9780. return;
  9781. let z = 0, W, F, Q;
  9782. const Z = s.value.length, ne = s.value, ee = a.scrollTop, {
  9783. itemHeight: oe,
  9784. height: K
  9785. } = t, ie = ee + K;
  9786. for (let X = 0; X < Z; X += 1) {
  9787. const H = ne[X], G = d(H);
  9788. let re = m.get(G);
  9789. re === void 0 && (re = oe);
  9790. const fe = z + re;
  9791. W === void 0 && fe >= ee && (W = X, F = z), Q === void 0 && fe > ie && (Q = X), z = fe;
  9792. }
  9793. W === void 0 && (W = 0, F = 0, Q = Math.ceil(K / oe)), Q === void 0 && (Q = Z - 1), Q = Math.min(Q + 1, Z), I(b, {
  9794. scrollHeight: z,
  9795. start: W,
  9796. end: Q,
  9797. offset: F
  9798. });
  9799. }, {
  9800. immediate: !0
  9801. });
  9802. const O = L(() => b.scrollHeight - t.height);
  9803. function S(z) {
  9804. let W = z;
  9805. return Number.isNaN(O.value) || (W = Math.min(W, O.value)), W = Math.max(W, 0), W;
  9806. }
  9807. const x = L(() => a.scrollTop <= 0), C = L(() => a.scrollTop >= O.value), T = FZ(x, C);
  9808. function w(z) {
  9809. p(z);
  9810. }
  9811. function P(z) {
  9812. var W;
  9813. const {
  9814. scrollTop: F
  9815. } = z.currentTarget;
  9816. F !== a.scrollTop && p(F), (W = t.onScroll) === null || W === void 0 || W.call(t, z);
  9817. }
  9818. const [$, A] = cge(r, x, C, (z) => {
  9819. p((W) => W + z);
  9820. });
  9821. dge(r, u, (z, W) => T(z, W) ? !1 : ($({
  9822. preventDefault() {
  9823. },
  9824. deltaY: z
  9825. }), !0));
  9826. function D(z) {
  9827. r.value && z.preventDefault();
  9828. }
  9829. const E = () => {
  9830. u.value && (u.value.removeEventListener("wheel", $, pr ? {
  9831. passive: !1
  9832. } : !1), u.value.removeEventListener("DOMMouseScroll", A), u.value.removeEventListener("MozMousePixelScroll", D));
  9833. };
  9834. ht(() => {
  9835. Tt(() => {
  9836. u.value && (E(), u.value.addEventListener("wheel", $, pr ? {
  9837. passive: !1
  9838. } : !1), u.value.addEventListener("DOMMouseScroll", A), u.value.addEventListener("MozMousePixelScroll", D));
  9839. });
  9840. }), yt(() => {
  9841. E();
  9842. });
  9843. const R = lge(u, s, m, t, d, g, p, () => {
  9844. var z;
  9845. (z = f.value) === null || z === void 0 || z.delayHidden();
  9846. });
  9847. n({
  9848. scrollTo: R
  9849. });
  9850. const N = L(() => {
  9851. let z = null;
  9852. return t.height && (z = I({
  9853. [t.fullHeight ? "height" : "maxHeight"]: t.height + "px"
  9854. }, vge), r.value && (z.overflowY = "hidden", a.scrollMoving && (z.pointerEvents = "none"))), z;
  9855. });
  9856. return se([() => b.start, () => b.end, s], () => {
  9857. if (t.onVisibleChange) {
  9858. const z = s.value.slice(b.start, b.end + 1);
  9859. t.onVisibleChange(z, s.value);
  9860. }
  9861. }, {
  9862. flush: "post"
  9863. }), {
  9864. state: a,
  9865. mergedData: s,
  9866. componentStyle: N,
  9867. onFallbackScroll: P,
  9868. onScrollBar: w,
  9869. componentRef: u,
  9870. useVirtual: r,
  9871. calRes: b,
  9872. collectHeight: g,
  9873. setInstance: v,
  9874. sharedConfig: h,
  9875. scrollBarRef: f,
  9876. fillerInnerRef: c,
  9877. delayHideScrollBar: () => {
  9878. var z;
  9879. (z = f.value) === null || z === void 0 || z.delayHidden();
  9880. }
  9881. };
  9882. },
  9883. render() {
  9884. const t = I(I({}, this.$props), this.$attrs), {
  9885. prefixCls: e = "rc-virtual-list",
  9886. height: n,
  9887. itemHeight: r,
  9888. // eslint-disable-next-line no-unused-vars
  9889. fullHeight: i,
  9890. data: a,
  9891. itemKey: o,
  9892. virtual: s,
  9893. component: l = "div",
  9894. onScroll: u,
  9895. children: c = this.$slots.default,
  9896. style: f,
  9897. class: d
  9898. } = t, h = hge(t, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), p = ye(e, d), {
  9899. scrollTop: v
  9900. } = this.state, {
  9901. scrollHeight: g,
  9902. offset: m,
  9903. start: y,
  9904. end: b
  9905. } = this.calRes, {
  9906. componentStyle: _,
  9907. onFallbackScroll: O,
  9908. onScrollBar: S,
  9909. useVirtual: x,
  9910. collectHeight: C,
  9911. sharedConfig: T,
  9912. setInstance: w,
  9913. mergedData: P,
  9914. delayHideScrollBar: $
  9915. } = this;
  9916. return M("div", j({
  9917. style: I(I({}, f), {
  9918. position: "relative"
  9919. }),
  9920. class: p
  9921. }, h), [M(l, {
  9922. class: `${e}-holder`,
  9923. style: _,
  9924. ref: "componentRef",
  9925. onScroll: O,
  9926. onMouseenter: $
  9927. }, {
  9928. default: () => [M(ex, {
  9929. prefixCls: e,
  9930. height: g,
  9931. offset: m,
  9932. onInnerResize: C,
  9933. ref: "fillerInnerRef"
  9934. }, {
  9935. default: () => gge(P, y, b, w, c, T)
  9936. })]
  9937. }), x && M(oge, {
  9938. ref: "scrollBarRef",
  9939. prefixCls: e,
  9940. scrollTop: v,
  9941. height: n,
  9942. scrollHeight: g,
  9943. count: P.length,
  9944. onScroll: S,
  9945. onStartMove: () => {
  9946. this.state.scrollMoving = !0;
  9947. },
  9948. onStopMove: () => {
  9949. this.state.scrollMoving = !1;
  9950. }
  9951. }, null)]);
  9952. }
  9953. });
  9954. function yge(t, e, n) {
  9955. const r = U(t());
  9956. return se(e, (i, a) => {
  9957. n ? n(i, a) && (r.value = t()) : r.value = t();
  9958. }), r;
  9959. }
  9960. function bge() {
  9961. return /(mac\sos|macintosh)/i.test(navigator.appVersion);
  9962. }
  9963. const WZ = Symbol("SelectContextKey");
  9964. function _ge(t) {
  9965. return pt(WZ, t);
  9966. }
  9967. function Oge() {
  9968. return Ge(WZ, {});
  9969. }
  9970. var Sge = function(t, e) {
  9971. var n = {};
  9972. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  9973. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  9974. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  9975. return n;
  9976. };
  9977. function vN(t) {
  9978. return typeof t == "string" || typeof t == "number";
  9979. }
  9980. const xge = te({
  9981. compatConfig: {
  9982. MODE: 3
  9983. },
  9984. name: "OptionList",
  9985. inheritAttrs: !1,
  9986. setup(t, e) {
  9987. let {
  9988. expose: n,
  9989. slots: r
  9990. } = e;
  9991. const i = Jve(), a = Oge(), o = L(() => `${i.prefixCls}-item`), s = yge(() => a.flattenOptions, [() => i.open, () => a.flattenOptions], (O) => O[0]), l = rm(), u = (O) => {
  9992. O.preventDefault();
  9993. }, c = (O) => {
  9994. l.current && l.current.scrollTo(typeof O == "number" ? {
  9995. index: O
  9996. } : O);
  9997. }, f = function(O) {
  9998. let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  9999. const x = s.value.length;
  10000. for (let C = 0; C < x; C += 1) {
  10001. const T = (O + C * S + x) % x, {
  10002. group: w,
  10003. data: P
  10004. } = s.value[T];
  10005. if (!w && !P.disabled)
  10006. return T;
  10007. }
  10008. return -1;
  10009. }, d = tn({
  10010. activeIndex: f(0)
  10011. }), h = function(O) {
  10012. let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10013. d.activeIndex = O;
  10014. const x = {
  10015. source: S ? "keyboard" : "mouse"
  10016. }, C = s.value[O];
  10017. if (!C) {
  10018. a.onActiveValue(null, -1, x);
  10019. return;
  10020. }
  10021. a.onActiveValue(C.value, O, x);
  10022. };
  10023. se([() => s.value.length, () => i.searchValue], () => {
  10024. h(a.defaultActiveFirstOption !== !1 ? f(0) : -1);
  10025. }, {
  10026. immediate: !0
  10027. });
  10028. const p = (O) => a.rawValues.has(O) && i.mode !== "combobox";
  10029. se([() => i.open, () => i.searchValue], () => {
  10030. if (!i.multiple && i.open && a.rawValues.size === 1) {
  10031. const O = Array.from(a.rawValues)[0], S = qo(s.value).findIndex((x) => {
  10032. let {
  10033. data: C
  10034. } = x;
  10035. return C[a.fieldNames.value] === O;
  10036. });
  10037. S !== -1 && (h(S), Tt(() => {
  10038. c(S);
  10039. }));
  10040. }
  10041. i.open && Tt(() => {
  10042. var O;
  10043. (O = l.current) === null || O === void 0 || O.scrollTo(void 0);
  10044. });
  10045. }, {
  10046. immediate: !0,
  10047. flush: "post"
  10048. });
  10049. const v = (O) => {
  10050. O !== void 0 && a.onSelect(O, {
  10051. selected: !a.rawValues.has(O)
  10052. }), i.multiple || i.toggleOpen(!1);
  10053. }, g = (O) => typeof O.label == "function" ? O.label() : O.label;
  10054. function m(O) {
  10055. const S = s.value[O];
  10056. if (!S) return null;
  10057. const x = S.data || {}, {
  10058. value: C
  10059. } = x, {
  10060. group: T
  10061. } = S, w = JS(x, !0), P = g(S);
  10062. return S ? M("div", j(j({
  10063. "aria-label": typeof P == "string" && !T ? P : null
  10064. }, w), {}, {
  10065. key: O,
  10066. role: T ? "presentation" : "option",
  10067. id: `${i.id}_list_${O}`,
  10068. "aria-selected": p(C)
  10069. }), [C]) : null;
  10070. }
  10071. return n({
  10072. onKeydown: (O) => {
  10073. const {
  10074. which: S,
  10075. ctrlKey: x
  10076. } = O;
  10077. switch (S) {
  10078. case ge.N:
  10079. case ge.P:
  10080. case ge.UP:
  10081. case ge.DOWN: {
  10082. let C = 0;
  10083. if (S === ge.UP ? C = -1 : S === ge.DOWN ? C = 1 : bge() && x && (S === ge.N ? C = 1 : S === ge.P && (C = -1)), C !== 0) {
  10084. const T = f(d.activeIndex + C, C);
  10085. c(T), h(T, !0);
  10086. }
  10087. break;
  10088. }
  10089. case ge.ENTER: {
  10090. const C = s.value[d.activeIndex];
  10091. C && !C.data.disabled ? v(C.value) : v(void 0), i.open && O.preventDefault();
  10092. break;
  10093. }
  10094. case ge.ESC:
  10095. i.toggleOpen(!1), i.open && O.stopPropagation();
  10096. }
  10097. },
  10098. onKeyup: () => {
  10099. },
  10100. scrollTo: (O) => {
  10101. c(O);
  10102. }
  10103. }), () => {
  10104. const {
  10105. id: O,
  10106. notFoundContent: S,
  10107. onPopupScroll: x
  10108. } = i, {
  10109. menuItemSelectedIcon: C,
  10110. fieldNames: T,
  10111. virtual: w,
  10112. listHeight: P,
  10113. listItemHeight: $
  10114. } = a, A = r.option, {
  10115. activeIndex: D
  10116. } = d, E = Object.keys(T).map((R) => T[R]);
  10117. return s.value.length === 0 ? M("div", {
  10118. role: "listbox",
  10119. id: `${O}_list`,
  10120. class: `${o.value}-empty`,
  10121. onMousedown: u
  10122. }, [S]) : M(wt, null, [M("div", {
  10123. role: "listbox",
  10124. id: `${O}_list`,
  10125. style: {
  10126. height: 0,
  10127. width: 0,
  10128. overflow: "hidden"
  10129. }
  10130. }, [m(D - 1), m(D), m(D + 1)]), M(mge, {
  10131. itemKey: "key",
  10132. ref: l,
  10133. data: s.value,
  10134. height: P,
  10135. itemHeight: $,
  10136. fullHeight: !1,
  10137. onMousedown: u,
  10138. onScroll: x,
  10139. virtual: w
  10140. }, {
  10141. default: (R, N) => {
  10142. var V;
  10143. const {
  10144. group: z,
  10145. groupOption: W,
  10146. data: F,
  10147. value: Q
  10148. } = R, {
  10149. key: Z
  10150. } = F, ne = typeof R.label == "function" ? R.label() : R.label;
  10151. if (z) {
  10152. const Te = (V = F.title) !== null && V !== void 0 ? V : vN(ne) && ne;
  10153. return M("div", {
  10154. class: ye(o.value, `${o.value}-group`),
  10155. title: Te
  10156. }, [A ? A(F) : ne !== void 0 ? ne : Z]);
  10157. }
  10158. const {
  10159. disabled: ee,
  10160. title: oe,
  10161. children: K,
  10162. style: ie,
  10163. class: X,
  10164. className: H
  10165. } = F, G = Sge(F, ["disabled", "title", "children", "style", "class", "className"]), re = or(G, E), fe = p(Q), de = `${o.value}-option`, Ee = ye(o.value, de, X, H, {
  10166. [`${de}-grouped`]: W,
  10167. [`${de}-active`]: D === N && !ee,
  10168. [`${de}-disabled`]: ee,
  10169. [`${de}-selected`]: fe
  10170. }), $e = g(R), Se = !C || typeof C == "function" || fe, be = typeof $e == "number" ? $e : $e || Q;
  10171. let he = vN(be) ? be.toString() : void 0;
  10172. return oe !== void 0 && (he = oe), M("div", j(j({}, re), {}, {
  10173. "aria-selected": fe,
  10174. class: Ee,
  10175. title: he,
  10176. onMousemove: (Te) => {
  10177. G.onMousemove && G.onMousemove(Te), !(D === N || ee) && h(N);
  10178. },
  10179. onClick: (Te) => {
  10180. ee || v(Q), G.onClick && G.onClick(Te);
  10181. },
  10182. style: ie
  10183. }), [M("div", {
  10184. class: `${de}-content`
  10185. }, [A ? A(F) : be]), Ui(C) || fe, Se && M(pf, {
  10186. class: `${o.value}-option-state`,
  10187. customizeIcon: C,
  10188. customizeIconProps: {
  10189. isSelected: fe
  10190. }
  10191. }, {
  10192. default: () => [fe ? "✓" : null]
  10193. })]);
  10194. }
  10195. })]);
  10196. };
  10197. }
  10198. });
  10199. var wge = function(t, e) {
  10200. var n = {};
  10201. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  10202. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  10203. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  10204. return n;
  10205. };
  10206. function Cge(t) {
  10207. const e = t, {
  10208. key: n,
  10209. children: r
  10210. } = e, i = e.props, {
  10211. value: a,
  10212. disabled: o
  10213. } = i, s = wge(i, ["value", "disabled"]), l = r == null ? void 0 : r.default;
  10214. return I({
  10215. key: n,
  10216. value: a !== void 0 ? a : n,
  10217. children: l,
  10218. disabled: o || o === ""
  10219. }, s);
  10220. }
  10221. function MI(t) {
  10222. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10223. return Yn(t).map((r, i) => {
  10224. var a;
  10225. if (!Ui(r) || !r.type)
  10226. return null;
  10227. const {
  10228. type: {
  10229. isSelectOptGroup: o
  10230. },
  10231. key: s,
  10232. children: l,
  10233. props: u
  10234. } = r;
  10235. if (e || !o)
  10236. return Cge(r);
  10237. const c = l && l.default ? l.default() : void 0, f = (u == null ? void 0 : u.label) || ((a = l.label) === null || a === void 0 ? void 0 : a.call(l)) || s;
  10238. return I(I({
  10239. key: `__RC_SELECT_GRP__${s === null ? i : String(s)}__`
  10240. }, u), {
  10241. label: f,
  10242. options: MI(c || [])
  10243. });
  10244. }).filter((r) => r);
  10245. }
  10246. function Tge(t, e, n) {
  10247. const r = ae(), i = ae(), a = ae(), o = ae([]);
  10248. return se([t, e], () => {
  10249. t.value ? o.value = qo(t.value).slice() : o.value = MI(e.value);
  10250. }, {
  10251. immediate: !0,
  10252. deep: !0
  10253. }), ht(() => {
  10254. const s = o.value, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
  10255. function f(d) {
  10256. let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  10257. for (let p = 0; p < d.length; p += 1) {
  10258. const v = d[p];
  10259. !v[c.options] || h ? (l.set(v[c.value], v), u.set(v[c.label], v)) : f(v[c.options], !0);
  10260. }
  10261. }
  10262. f(s), r.value = s, i.value = l, a.value = u;
  10263. }), {
  10264. options: r,
  10265. valueOptions: i,
  10266. labelOptions: a
  10267. };
  10268. }
  10269. let gN = 0;
  10270. const Pge = process.env.NODE_ENV !== "test" && wa();
  10271. function $ge() {
  10272. let t;
  10273. return Pge ? (t = gN, gN += 1) : t = "TEST_OR_SSR", t;
  10274. }
  10275. function Age() {
  10276. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : U("");
  10277. const e = `rc_select_${$ge()}`;
  10278. return t.value || e;
  10279. }
  10280. function II(t) {
  10281. return Array.isArray(t) ? t : t !== void 0 ? [t] : [];
  10282. }
  10283. const Ege = typeof window < "u" && window.document && window.document.documentElement;
  10284. process.env.NODE_ENV;
  10285. function Mge(t) {
  10286. const {
  10287. mode: e,
  10288. options: n,
  10289. children: r,
  10290. backfill: i,
  10291. allowClear: a,
  10292. placeholder: o,
  10293. getInputElement: s,
  10294. showSearch: l,
  10295. onSearch: u,
  10296. defaultOpen: c,
  10297. autofocus: f,
  10298. labelInValue: d,
  10299. value: h,
  10300. inputValue: p,
  10301. optionLabelProp: v
  10302. } = t, g = EI(e), m = l !== void 0 ? l : g || e === "combobox", y = n || MI(r);
  10303. if (oa(e !== "tags" || y.every((b) => !b.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), oa(e !== "combobox" || !v, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), oa(e === "combobox" || !i, "`backfill` only works with `combobox` mode."), oa(e === "combobox" || !s, "`getInputElement` only work with `combobox` mode."), a8(e !== "combobox" || !s || !a || !o, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !m && e !== "combobox" && e !== "tags" && oa(!1, "`onSearch` should work with `showSearch` instead of use alone."), a8(!c || f, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), h != null) {
  10304. const b = II(h);
  10305. oa(!d || b.every((_) => typeof _ == "object" && ("key" in _ || "value" in _)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), oa(!g || Array.isArray(h), "`value` should be array when `mode` is `multiple` or `tags`");
  10306. }
  10307. if (r) {
  10308. let b = null;
  10309. r.some((_) => {
  10310. var O;
  10311. if (!Ui(_) || !_.type)
  10312. return !1;
  10313. const {
  10314. type: S
  10315. } = _;
  10316. return S.isSelectOption ? !1 : S.isSelectOptGroup ? !(((O = _.children) === null || O === void 0 ? void 0 : O.default()) || []).every((T) => !Ui(T) || !_.type || T.type.isSelectOption ? !0 : (b = T.type, !1)) : (b = S, !0);
  10317. }), b && oa(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${b.displayName || b.name || b}\`.`), oa(p === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  10318. }
  10319. }
  10320. function gC(t, e) {
  10321. return II(t).join("").toUpperCase().includes(e);
  10322. }
  10323. const Ige = (t, e, n, r, i) => L(() => {
  10324. const a = n.value, o = i == null ? void 0 : i.value, s = r == null ? void 0 : r.value;
  10325. if (!a || s === !1)
  10326. return t.value;
  10327. const {
  10328. options: l,
  10329. label: u,
  10330. value: c
  10331. } = e.value, f = [], d = typeof s == "function", h = a.toUpperCase(), p = d ? s : (g, m) => o ? gC(m[o], h) : m[l] ? gC(m[u !== "children" ? u : "label"], h) : gC(m[c], h), v = d ? (g) => y2(g) : (g) => g;
  10332. return t.value.forEach((g) => {
  10333. if (g[l]) {
  10334. if (p(a, v(g)))
  10335. f.push(g);
  10336. else {
  10337. const y = g[l].filter((b) => p(a, v(b)));
  10338. y.length && f.push(I(I({}, g), {
  10339. [l]: y
  10340. }));
  10341. }
  10342. return;
  10343. }
  10344. p(a, v(g)) && f.push(g);
  10345. }), f;
  10346. }), Dge = (t, e) => {
  10347. const n = ae({
  10348. values: /* @__PURE__ */ new Map(),
  10349. options: /* @__PURE__ */ new Map()
  10350. });
  10351. return [L(() => {
  10352. const {
  10353. values: a,
  10354. options: o
  10355. } = n.value, s = t.value.map((c) => {
  10356. var f;
  10357. return c.label === void 0 ? I(I({}, c), {
  10358. label: (f = a.get(c.value)) === null || f === void 0 ? void 0 : f.label
  10359. }) : c;
  10360. }), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
  10361. return s.forEach((c) => {
  10362. l.set(c.value, c), u.set(c.value, e.value.get(c.value) || o.get(c.value));
  10363. }), n.value.values = l, n.value.options = u, s;
  10364. }), (a) => e.value.get(a) || n.value.options.get(a)];
  10365. };
  10366. function wh(t, e) {
  10367. const {
  10368. defaultValue: n,
  10369. value: r = U()
  10370. } = e || {};
  10371. let i = typeof t == "function" ? t() : t;
  10372. r.value !== void 0 && (i = B(r)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  10373. const a = U(i), o = U(i);
  10374. ht(() => {
  10375. let l = r.value !== void 0 ? r.value : a.value;
  10376. e.postState && (l = e.postState(l)), o.value = l;
  10377. });
  10378. function s(l) {
  10379. const u = o.value;
  10380. a.value = l, qo(o.value) !== l && e.onChange && e.onChange(l, u);
  10381. }
  10382. return se(r, () => {
  10383. a.value = r.value;
  10384. }), [o, s];
  10385. }
  10386. function fn(t) {
  10387. const e = typeof t == "function" ? t() : t, n = U(e);
  10388. function r(i) {
  10389. n.value = i;
  10390. }
  10391. return [n, r];
  10392. }
  10393. const Rge = ["inputValue"];
  10394. function QZ() {
  10395. return I(I({}, zZ()), {
  10396. prefixCls: String,
  10397. id: String,
  10398. backfill: {
  10399. type: Boolean,
  10400. default: void 0
  10401. },
  10402. // >>> Field Names
  10403. fieldNames: Object,
  10404. // >>> Search
  10405. /** @deprecated Use `searchValue` instead */
  10406. inputValue: String,
  10407. searchValue: String,
  10408. onSearch: Function,
  10409. autoClearSearchValue: {
  10410. type: Boolean,
  10411. default: void 0
  10412. },
  10413. // >>> Select
  10414. onSelect: Function,
  10415. onDeselect: Function,
  10416. // >>> Options
  10417. /**
  10418. * In Select, `false` means do nothing.
  10419. * In TreeSelect, `false` will highlight match item.
  10420. * It's by design.
  10421. */
  10422. filterOption: {
  10423. type: [Boolean, Function],
  10424. default: void 0
  10425. },
  10426. filterSort: Function,
  10427. optionFilterProp: String,
  10428. optionLabelProp: String,
  10429. options: Array,
  10430. defaultActiveFirstOption: {
  10431. type: Boolean,
  10432. default: void 0
  10433. },
  10434. virtual: {
  10435. type: Boolean,
  10436. default: void 0
  10437. },
  10438. listHeight: Number,
  10439. listItemHeight: Number,
  10440. // >>> Icon
  10441. menuItemSelectedIcon: Y.any,
  10442. mode: String,
  10443. labelInValue: {
  10444. type: Boolean,
  10445. default: void 0
  10446. },
  10447. value: Y.any,
  10448. defaultValue: Y.any,
  10449. onChange: Function,
  10450. children: Array
  10451. });
  10452. }
  10453. function kge(t) {
  10454. return !t || typeof t != "object";
  10455. }
  10456. const Lge = te({
  10457. compatConfig: {
  10458. MODE: 3
  10459. },
  10460. name: "VcSelect",
  10461. inheritAttrs: !1,
  10462. props: sr(QZ(), {
  10463. prefixCls: "vc-select",
  10464. autoClearSearchValue: !0,
  10465. listHeight: 200,
  10466. listItemHeight: 20,
  10467. dropdownMatchSelectWidth: !0
  10468. }),
  10469. setup(t, e) {
  10470. let {
  10471. expose: n,
  10472. attrs: r,
  10473. slots: i
  10474. } = e;
  10475. const a = Age(Nn(t, "id")), o = L(() => EI(t.mode)), s = L(() => !!(!t.options && t.children)), l = L(() => t.filterOption === void 0 && t.mode === "combobox" ? !1 : t.filterOption), u = L(() => aZ(t.fieldNames, s.value)), [c, f] = wh("", {
  10476. value: L(() => t.searchValue !== void 0 ? t.searchValue : t.inputValue),
  10477. postState: (X) => X || ""
  10478. }), d = Tge(Nn(t, "options"), Nn(t, "children"), u), {
  10479. valueOptions: h,
  10480. labelOptions: p,
  10481. options: v
  10482. } = d, g = (X) => II(X).map((G) => {
  10483. var re, fe;
  10484. let de, Ee, $e, Se;
  10485. kge(G) ? de = G : ($e = G.key, Ee = G.label, de = (re = G.value) !== null && re !== void 0 ? re : $e);
  10486. const be = h.value.get(de);
  10487. return be && (Ee === void 0 && (Ee = be == null ? void 0 : be[t.optionLabelProp || u.value.label]), $e === void 0 && ($e = (fe = be == null ? void 0 : be.key) !== null && fe !== void 0 ? fe : de), Se = be == null ? void 0 : be.disabled), {
  10488. label: Ee,
  10489. value: de,
  10490. key: $e,
  10491. disabled: Se,
  10492. option: be
  10493. };
  10494. }), [m, y] = wh(t.defaultValue, {
  10495. value: Nn(t, "value")
  10496. }), b = L(() => {
  10497. var X;
  10498. const H = g(m.value);
  10499. return t.mode === "combobox" && !(!((X = H[0]) === null || X === void 0) && X.value) ? [] : H;
  10500. }), [_, O] = Dge(b, h), S = L(() => {
  10501. if (!t.mode && _.value.length === 1) {
  10502. const X = _.value[0];
  10503. if (X.value === null && (X.label === null || X.label === void 0))
  10504. return [];
  10505. }
  10506. return _.value.map((X) => {
  10507. var H;
  10508. return I(I({}, X), {
  10509. label: (H = typeof X.label == "function" ? X.label() : X.label) !== null && H !== void 0 ? H : X.value
  10510. });
  10511. });
  10512. }), x = L(() => new Set(_.value.map((X) => X.value)));
  10513. ht(() => {
  10514. var X;
  10515. if (t.mode === "combobox") {
  10516. const H = (X = _.value[0]) === null || X === void 0 ? void 0 : X.value;
  10517. H != null && f(String(H));
  10518. }
  10519. }, {
  10520. flush: "post"
  10521. });
  10522. const C = (X, H) => {
  10523. const G = H ?? X;
  10524. return {
  10525. [u.value.value]: X,
  10526. [u.value.label]: G
  10527. };
  10528. }, T = ae();
  10529. ht(() => {
  10530. if (t.mode !== "tags") {
  10531. T.value = v.value;
  10532. return;
  10533. }
  10534. const X = v.value.slice(), H = (G) => h.value.has(G);
  10535. [..._.value].sort((G, re) => G.value < re.value ? -1 : 1).forEach((G) => {
  10536. const re = G.value;
  10537. H(re) || X.push(C(re, G.label));
  10538. }), T.value = X;
  10539. });
  10540. const w = Ige(T, u, c, l, Nn(t, "optionFilterProp")), P = L(() => t.mode !== "tags" || !c.value || w.value.some((X) => X[t.optionFilterProp || "value"] === c.value) ? w.value : [C(c.value), ...w.value]), $ = L(() => t.filterSort ? [...P.value].sort((X, H) => t.filterSort(X, H)) : P.value), A = L(() => Kfe($.value, {
  10541. fieldNames: u.value,
  10542. childrenAsData: s.value
  10543. })), D = (X) => {
  10544. const H = g(X);
  10545. if (y(H), t.onChange && // Trigger event only when value changed
  10546. (H.length !== _.value.length || H.some((G, re) => {
  10547. var fe;
  10548. return ((fe = _.value[re]) === null || fe === void 0 ? void 0 : fe.value) !== (G == null ? void 0 : G.value);
  10549. }))) {
  10550. const G = t.labelInValue ? H.map((fe) => I(I({}, fe), {
  10551. originLabel: fe.label,
  10552. label: typeof fe.label == "function" ? fe.label() : fe.label
  10553. })) : H.map((fe) => fe.value), re = H.map((fe) => y2(O(fe.value)));
  10554. t.onChange(
  10555. // Value
  10556. o.value ? G : G[0],
  10557. // Option
  10558. o.value ? re : re[0]
  10559. );
  10560. }
  10561. }, [E, R] = fn(null), [N, V] = fn(0), z = L(() => t.defaultActiveFirstOption !== void 0 ? t.defaultActiveFirstOption : t.mode !== "combobox"), W = function(X, H) {
  10562. let {
  10563. source: G = "keyboard"
  10564. } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  10565. V(H), t.backfill && t.mode === "combobox" && X !== null && G === "keyboard" && R(String(X));
  10566. }, F = (X, H) => {
  10567. const G = () => {
  10568. var re;
  10569. const fe = O(X), de = fe == null ? void 0 : fe[u.value.label];
  10570. return [t.labelInValue ? {
  10571. label: typeof de == "function" ? de() : de,
  10572. originLabel: de,
  10573. value: X,
  10574. key: (re = fe == null ? void 0 : fe.key) !== null && re !== void 0 ? re : X
  10575. } : X, y2(fe)];
  10576. };
  10577. if (H && t.onSelect) {
  10578. const [re, fe] = G();
  10579. t.onSelect(re, fe);
  10580. } else if (!H && t.onDeselect) {
  10581. const [re, fe] = G();
  10582. t.onDeselect(re, fe);
  10583. }
  10584. }, Q = (X, H) => {
  10585. let G;
  10586. const re = o.value ? H.selected : !0;
  10587. re ? G = o.value ? [..._.value, X] : [X] : G = _.value.filter((fe) => fe.value !== X), D(G), F(X, re), t.mode === "combobox" ? R("") : (!o.value || t.autoClearSearchValue) && (f(""), R(""));
  10588. }, Z = (X, H) => {
  10589. D(X), (H.type === "remove" || H.type === "clear") && H.values.forEach((G) => {
  10590. F(G.value, !1);
  10591. });
  10592. }, ne = (X, H) => {
  10593. var G;
  10594. if (f(X), R(null), H.source === "submit") {
  10595. const re = (X || "").trim();
  10596. if (re) {
  10597. const fe = Array.from(/* @__PURE__ */ new Set([...x.value, re]));
  10598. D(fe), F(re, !0), f("");
  10599. }
  10600. return;
  10601. }
  10602. H.source !== "blur" && (t.mode === "combobox" && D(X), (G = t.onSearch) === null || G === void 0 || G.call(t, X));
  10603. }, ee = (X) => {
  10604. let H = X;
  10605. t.mode !== "tags" && (H = X.map((re) => {
  10606. const fe = p.value.get(re);
  10607. return fe == null ? void 0 : fe.value;
  10608. }).filter((re) => re !== void 0));
  10609. const G = Array.from(/* @__PURE__ */ new Set([...x.value, ...H]));
  10610. D(G), G.forEach((re) => {
  10611. F(re, !0);
  10612. });
  10613. }, oe = L(() => t.virtual !== !1 && t.dropdownMatchSelectWidth !== !1);
  10614. _ge(BZ(I(I({}, d), {
  10615. flattenOptions: A,
  10616. onActiveValue: W,
  10617. defaultActiveFirstOption: z,
  10618. onSelect: Q,
  10619. menuItemSelectedIcon: Nn(t, "menuItemSelectedIcon"),
  10620. rawValues: x,
  10621. fieldNames: u,
  10622. virtual: oe,
  10623. listHeight: Nn(t, "listHeight"),
  10624. listItemHeight: Nn(t, "listItemHeight"),
  10625. childrenAsData: s
  10626. }))), process.env.NODE_ENV !== "production" && ht(() => {
  10627. Mge(t);
  10628. }, {
  10629. flush: "post"
  10630. });
  10631. const K = U();
  10632. n({
  10633. focus() {
  10634. var X;
  10635. (X = K.value) === null || X === void 0 || X.focus();
  10636. },
  10637. blur() {
  10638. var X;
  10639. (X = K.value) === null || X === void 0 || X.blur();
  10640. },
  10641. scrollTo(X) {
  10642. var H;
  10643. (H = K.value) === null || H === void 0 || H.scrollTo(X);
  10644. }
  10645. });
  10646. const ie = L(() => or(t, [
  10647. "id",
  10648. "mode",
  10649. "prefixCls",
  10650. "backfill",
  10651. "fieldNames",
  10652. // Search
  10653. "inputValue",
  10654. "searchValue",
  10655. "onSearch",
  10656. "autoClearSearchValue",
  10657. // Select
  10658. "onSelect",
  10659. "onDeselect",
  10660. "dropdownMatchSelectWidth",
  10661. // Options
  10662. "filterOption",
  10663. "filterSort",
  10664. "optionFilterProp",
  10665. "optionLabelProp",
  10666. "options",
  10667. "children",
  10668. "defaultActiveFirstOption",
  10669. "menuItemSelectedIcon",
  10670. "virtual",
  10671. "listHeight",
  10672. "listItemHeight",
  10673. // Value
  10674. "value",
  10675. "defaultValue",
  10676. "labelInValue",
  10677. "onChange"
  10678. ]));
  10679. return () => M(ige, j(j(j({}, ie.value), r), {}, {
  10680. id: a,
  10681. prefixCls: t.prefixCls,
  10682. ref: K,
  10683. omitDomProps: Rge,
  10684. mode: t.mode,
  10685. displayValues: S.value,
  10686. onDisplayValuesChange: Z,
  10687. searchValue: c.value,
  10688. onSearch: ne,
  10689. onSearchSplit: ee,
  10690. dropdownMatchSelectWidth: t.dropdownMatchSelectWidth,
  10691. OptionList: xge,
  10692. emptyOptions: !A.value.length,
  10693. activeValue: E.value,
  10694. activeDescendantId: `${a}_list_${N.value}`
  10695. }), i);
  10696. }
  10697. }), DI = () => null;
  10698. DI.isSelectOption = !0;
  10699. DI.displayName = "ASelectOption";
  10700. const RI = () => null;
  10701. RI.isSelectOptGroup = !0;
  10702. RI.displayName = "ASelectOptGroup";
  10703. var Nge = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, Bge = Symbol("iconContext"), HZ = function() {
  10704. return Ge(Bge, {
  10705. prefixCls: U("anticon"),
  10706. rootClassName: U(""),
  10707. csp: U()
  10708. });
  10709. };
  10710. function kI() {
  10711. return !!(typeof window < "u" && window.document && window.document.createElement);
  10712. }
  10713. function zge(t, e) {
  10714. return t && t.contains ? t.contains(e) : !1;
  10715. }
  10716. var mN = "data-vc-order", Vge = "vc-icon-key", $2 = /* @__PURE__ */ new Map();
  10717. function GZ() {
  10718. var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.mark;
  10719. return e ? e.startsWith("data-") ? e : "data-".concat(e) : Vge;
  10720. }
  10721. function LI(t) {
  10722. if (t.attachTo)
  10723. return t.attachTo;
  10724. var e = document.querySelector("head");
  10725. return e || document.body;
  10726. }
  10727. function Fge(t) {
  10728. return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
  10729. }
  10730. function jZ(t) {
  10731. return Array.from(($2.get(t) || t).children).filter(function(e) {
  10732. return e.tagName === "STYLE";
  10733. });
  10734. }
  10735. function ZZ(t) {
  10736. var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  10737. if (!kI())
  10738. return null;
  10739. var n = e.csp, r = e.prepend, i = document.createElement("style");
  10740. i.setAttribute(mN, Fge(r)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = t;
  10741. var a = LI(e), o = a.firstChild;
  10742. if (r) {
  10743. if (r === "queue") {
  10744. var s = jZ(a).filter(function(l) {
  10745. return ["prepend", "prependQueue"].includes(l.getAttribute(mN));
  10746. });
  10747. if (s.length)
  10748. return a.insertBefore(i, s[s.length - 1].nextSibling), i;
  10749. }
  10750. a.insertBefore(i, o);
  10751. } else
  10752. a.appendChild(i);
  10753. return i;
  10754. }
  10755. function Wge(t) {
  10756. var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = LI(e);
  10757. return jZ(n).find(function(r) {
  10758. return r.getAttribute(GZ(e)) === t;
  10759. });
  10760. }
  10761. function Qge(t, e) {
  10762. var n = $2.get(t);
  10763. if (!n || !zge(document, n)) {
  10764. var r = ZZ("", e), i = r.parentNode;
  10765. $2.set(t, i), t.removeChild(r);
  10766. }
  10767. }
  10768. function Hge(t, e) {
  10769. var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = LI(n);
  10770. Qge(r, n);
  10771. var i = Wge(e, n);
  10772. if (i)
  10773. return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== t && (i.innerHTML = t), i;
  10774. var a = ZZ(t, n);
  10775. return a.setAttribute(GZ(n), e), a;
  10776. }
  10777. function yN(t) {
  10778. for (var e = 1; e < arguments.length; e++) {
  10779. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  10780. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  10781. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  10782. }))), r.forEach(function(i) {
  10783. Gge(t, i, n[i]);
  10784. });
  10785. }
  10786. return t;
  10787. }
  10788. function Gge(t, e, n) {
  10789. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  10790. }
  10791. function jge(t, e) {
  10792. process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error("Warning: ".concat(e));
  10793. }
  10794. function Zge(t, e) {
  10795. jge(t, "[@ant-design/icons-vue] ".concat(e));
  10796. }
  10797. function bN(t) {
  10798. return typeof t == "object" && typeof t.name == "string" && typeof t.theme == "string" && (typeof t.icon == "object" || typeof t.icon == "function");
  10799. }
  10800. function A2(t, e, n) {
  10801. return n ? jg(t.tag, yN({
  10802. key: e
  10803. }, n, t.attrs), (t.children || []).map(function(r, i) {
  10804. return A2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  10805. })) : jg(t.tag, yN({
  10806. key: e
  10807. }, t.attrs), (t.children || []).map(function(r, i) {
  10808. return A2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  10809. }));
  10810. }
  10811. function UZ(t) {
  10812. return ff(t)[0];
  10813. }
  10814. function XZ(t) {
  10815. return t ? Array.isArray(t) ? t : [t] : [];
  10816. }
  10817. var Uge = `
  10818. .anticon {
  10819. display: inline-block;
  10820. color: inherit;
  10821. font-style: normal;
  10822. line-height: 0;
  10823. text-align: center;
  10824. text-transform: none;
  10825. vertical-align: -0.125em;
  10826. text-rendering: optimizeLegibility;
  10827. -webkit-font-smoothing: antialiased;
  10828. -moz-osx-font-smoothing: grayscale;
  10829. }
  10830. .anticon > * {
  10831. line-height: 1;
  10832. }
  10833. .anticon svg {
  10834. display: inline-block;
  10835. }
  10836. .anticon::before {
  10837. display: none;
  10838. }
  10839. .anticon .anticon-icon {
  10840. display: block;
  10841. }
  10842. .anticon[tabindex] {
  10843. cursor: pointer;
  10844. }
  10845. .anticon-spin::before,
  10846. .anticon-spin {
  10847. display: inline-block;
  10848. -webkit-animation: loadingCircle 1s infinite linear;
  10849. animation: loadingCircle 1s infinite linear;
  10850. }
  10851. @-webkit-keyframes loadingCircle {
  10852. 100% {
  10853. -webkit-transform: rotate(360deg);
  10854. transform: rotate(360deg);
  10855. }
  10856. }
  10857. @keyframes loadingCircle {
  10858. 100% {
  10859. -webkit-transform: rotate(360deg);
  10860. transform: rotate(360deg);
  10861. }
  10862. }
  10863. `;
  10864. function YZ(t) {
  10865. return t && t.getRootNode && t.getRootNode();
  10866. }
  10867. function Xge(t) {
  10868. return kI() ? YZ(t) instanceof ShadowRoot : !1;
  10869. }
  10870. function Yge(t) {
  10871. return Xge(t) ? YZ(t) : null;
  10872. }
  10873. var qge = function() {
  10874. var e = HZ(), n = e.prefixCls, r = e.csp, i = vn(), a = Uge;
  10875. n && (a = a.replace(/anticon/g, n.value)), Tt(function() {
  10876. if (kI()) {
  10877. var o = i.vnode.el, s = Yge(o);
  10878. Hge(a, "@ant-design-vue-icons", {
  10879. prepend: !0,
  10880. csp: r.value,
  10881. attachTo: s
  10882. });
  10883. }
  10884. });
  10885. }, Kge = ["icon", "primaryColor", "secondaryColor"];
  10886. function Jge(t, e) {
  10887. if (t == null) return {};
  10888. var n = eme(t, e), r, i;
  10889. if (Object.getOwnPropertySymbols) {
  10890. var a = Object.getOwnPropertySymbols(t);
  10891. for (i = 0; i < a.length; i++)
  10892. r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  10893. }
  10894. return n;
  10895. }
  10896. function eme(t, e) {
  10897. if (t == null) return {};
  10898. var n = {}, r = Object.keys(t), i, a;
  10899. for (a = 0; a < r.length; a++)
  10900. i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  10901. return n;
  10902. }
  10903. function C_(t) {
  10904. for (var e = 1; e < arguments.length; e++) {
  10905. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  10906. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  10907. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  10908. }))), r.forEach(function(i) {
  10909. tme(t, i, n[i]);
  10910. });
  10911. }
  10912. return t;
  10913. }
  10914. function tme(t, e, n) {
  10915. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  10916. }
  10917. var lg = tn({
  10918. primaryColor: "#333",
  10919. secondaryColor: "#E6E6E6",
  10920. calculated: !1
  10921. });
  10922. function nme(t) {
  10923. var e = t.primaryColor, n = t.secondaryColor;
  10924. lg.primaryColor = e, lg.secondaryColor = n || UZ(e), lg.calculated = !!n;
  10925. }
  10926. function rme() {
  10927. return C_({}, lg);
  10928. }
  10929. var _u = function(e, n) {
  10930. var r = C_({}, e, n.attrs), i = r.icon, a = r.primaryColor, o = r.secondaryColor, s = Jge(r, Kge), l = lg;
  10931. if (a && (l = {
  10932. primaryColor: a,
  10933. secondaryColor: o || UZ(a)
  10934. }), Zge(bN(i), "icon should be icon definiton, but got ".concat(i)), !bN(i))
  10935. return null;
  10936. var u = i;
  10937. return u && typeof u.icon == "function" && (u = C_({}, u, {
  10938. icon: u.icon(l.primaryColor, l.secondaryColor)
  10939. })), A2(u.icon, "svg-".concat(u.name), C_({}, s, {
  10940. "data-icon": u.name,
  10941. width: "1em",
  10942. height: "1em",
  10943. fill: "currentColor",
  10944. "aria-hidden": "true"
  10945. }));
  10946. };
  10947. _u.props = {
  10948. icon: Object,
  10949. primaryColor: String,
  10950. secondaryColor: String,
  10951. focusable: String
  10952. };
  10953. _u.inheritAttrs = !1;
  10954. _u.displayName = "IconBase";
  10955. _u.getTwoToneColors = rme;
  10956. _u.setTwoToneColors = nme;
  10957. function ime(t, e) {
  10958. return lme(t) || sme(t, e) || ome(t, e) || ame();
  10959. }
  10960. function ame() {
  10961. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  10962. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  10963. }
  10964. function ome(t, e) {
  10965. if (t) {
  10966. if (typeof t == "string") return _N(t, e);
  10967. var n = Object.prototype.toString.call(t).slice(8, -1);
  10968. if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
  10969. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _N(t, e);
  10970. }
  10971. }
  10972. function _N(t, e) {
  10973. (e == null || e > t.length) && (e = t.length);
  10974. for (var n = 0, r = new Array(e); n < e; n++)
  10975. r[n] = t[n];
  10976. return r;
  10977. }
  10978. function sme(t, e) {
  10979. var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  10980. if (n != null) {
  10981. var r = [], i = !0, a = !1, o, s;
  10982. try {
  10983. for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
  10984. ;
  10985. } catch (l) {
  10986. a = !0, s = l;
  10987. } finally {
  10988. try {
  10989. !i && n.return != null && n.return();
  10990. } finally {
  10991. if (a) throw s;
  10992. }
  10993. }
  10994. return r;
  10995. }
  10996. }
  10997. function lme(t) {
  10998. if (Array.isArray(t)) return t;
  10999. }
  11000. function qZ(t) {
  11001. var e = XZ(t), n = ime(e, 2), r = n[0], i = n[1];
  11002. return _u.setTwoToneColors({
  11003. primaryColor: r,
  11004. secondaryColor: i
  11005. });
  11006. }
  11007. function ume() {
  11008. var t = _u.getTwoToneColors();
  11009. return t.calculated ? [t.primaryColor, t.secondaryColor] : t.primaryColor;
  11010. }
  11011. var cme = te({
  11012. name: "InsertStyles",
  11013. setup: function() {
  11014. return qge(), function() {
  11015. return null;
  11016. };
  11017. }
  11018. }), fme = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
  11019. function dme(t, e) {
  11020. return gme(t) || vme(t, e) || pme(t, e) || hme();
  11021. }
  11022. function hme() {
  11023. throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  11024. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  11025. }
  11026. function pme(t, e) {
  11027. if (t) {
  11028. if (typeof t == "string") return ON(t, e);
  11029. var n = Object.prototype.toString.call(t).slice(8, -1);
  11030. if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
  11031. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ON(t, e);
  11032. }
  11033. }
  11034. function ON(t, e) {
  11035. (e == null || e > t.length) && (e = t.length);
  11036. for (var n = 0, r = new Array(e); n < e; n++)
  11037. r[n] = t[n];
  11038. return r;
  11039. }
  11040. function vme(t, e) {
  11041. var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  11042. if (n != null) {
  11043. var r = [], i = !0, a = !1, o, s;
  11044. try {
  11045. for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
  11046. ;
  11047. } catch (l) {
  11048. a = !0, s = l;
  11049. } finally {
  11050. try {
  11051. !i && n.return != null && n.return();
  11052. } finally {
  11053. if (a) throw s;
  11054. }
  11055. }
  11056. return r;
  11057. }
  11058. }
  11059. function gme(t) {
  11060. if (Array.isArray(t)) return t;
  11061. }
  11062. function SN(t) {
  11063. for (var e = 1; e < arguments.length; e++) {
  11064. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11065. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11066. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11067. }))), r.forEach(function(i) {
  11068. Nv(t, i, n[i]);
  11069. });
  11070. }
  11071. return t;
  11072. }
  11073. function Nv(t, e, n) {
  11074. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11075. }
  11076. function mme(t, e) {
  11077. if (t == null) return {};
  11078. var n = yme(t, e), r, i;
  11079. if (Object.getOwnPropertySymbols) {
  11080. var a = Object.getOwnPropertySymbols(t);
  11081. for (i = 0; i < a.length; i++)
  11082. r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  11083. }
  11084. return n;
  11085. }
  11086. function yme(t, e) {
  11087. if (t == null) return {};
  11088. var n = {}, r = Object.keys(t), i, a;
  11089. for (a = 0; a < r.length; a++)
  11090. i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  11091. return n;
  11092. }
  11093. qZ(tfe.primary);
  11094. var lt = function(e, n) {
  11095. var r, i = SN({}, e, n.attrs), a = i.class, o = i.icon, s = i.spin, l = i.rotate, u = i.tabindex, c = i.twoToneColor, f = i.onClick, d = mme(i, fme), h = HZ(), p = h.prefixCls, v = h.rootClassName, g = (r = {}, Nv(r, v.value, !!v.value), Nv(r, p.value, !0), Nv(r, "".concat(p.value, "-").concat(o.name), !!o.name), Nv(r, "".concat(p.value, "-spin"), !!s || o.name === "loading"), r), m = u;
  11096. m === void 0 && f && (m = -1);
  11097. var y = l ? {
  11098. msTransform: "rotate(".concat(l, "deg)"),
  11099. transform: "rotate(".concat(l, "deg)")
  11100. } : void 0, b = XZ(c), _ = dme(b, 2), O = _[0], S = _[1];
  11101. return M("span", SN({
  11102. role: "img",
  11103. "aria-label": o.name
  11104. }, d, {
  11105. onClick: f,
  11106. class: [g, a],
  11107. tabindex: m
  11108. }), [M(_u, {
  11109. icon: o,
  11110. primaryColor: O,
  11111. secondaryColor: S,
  11112. style: y
  11113. }, null), M(cme, null, null)]);
  11114. };
  11115. lt.props = {
  11116. spin: Boolean,
  11117. rotate: Number,
  11118. icon: Object,
  11119. twoToneColor: [String, Array]
  11120. };
  11121. lt.displayName = "AntdIcon";
  11122. lt.inheritAttrs = !1;
  11123. lt.getTwoToneColor = ume;
  11124. lt.setTwoToneColor = qZ;
  11125. function xN(t) {
  11126. for (var e = 1; e < arguments.length; e++) {
  11127. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11128. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11129. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11130. }))), r.forEach(function(i) {
  11131. bme(t, i, n[i]);
  11132. });
  11133. }
  11134. return t;
  11135. }
  11136. function bme(t, e, n) {
  11137. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11138. }
  11139. var tx = function(e, n) {
  11140. var r = xN({}, e, n.attrs);
  11141. return M(lt, xN({}, r, {
  11142. icon: Nge
  11143. }), null);
  11144. };
  11145. tx.displayName = "DownOutlined";
  11146. tx.inheritAttrs = !1;
  11147. var _me = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, name: "loading", theme: "outlined" };
  11148. function wN(t) {
  11149. for (var e = 1; e < arguments.length; e++) {
  11150. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11151. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11152. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11153. }))), r.forEach(function(i) {
  11154. Ome(t, i, n[i]);
  11155. });
  11156. }
  11157. return t;
  11158. }
  11159. function Ome(t, e, n) {
  11160. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11161. }
  11162. var ts = function(e, n) {
  11163. var r = wN({}, e, n.attrs);
  11164. return M(lt, wN({}, r, {
  11165. icon: _me
  11166. }), null);
  11167. };
  11168. ts.displayName = "LoadingOutlined";
  11169. ts.inheritAttrs = !1;
  11170. var Sme = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
  11171. function CN(t) {
  11172. for (var e = 1; e < arguments.length; e++) {
  11173. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11174. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11175. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11176. }))), r.forEach(function(i) {
  11177. xme(t, i, n[i]);
  11178. });
  11179. }
  11180. return t;
  11181. }
  11182. function xme(t, e, n) {
  11183. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11184. }
  11185. var NI = function(e, n) {
  11186. var r = CN({}, e, n.attrs);
  11187. return M(lt, CN({}, r, {
  11188. icon: Sme
  11189. }), null);
  11190. };
  11191. NI.displayName = "CheckOutlined";
  11192. NI.inheritAttrs = !1;
  11193. var wme = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" };
  11194. function TN(t) {
  11195. for (var e = 1; e < arguments.length; e++) {
  11196. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11197. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11198. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11199. }))), r.forEach(function(i) {
  11200. Cme(t, i, n[i]);
  11201. });
  11202. }
  11203. return t;
  11204. }
  11205. function Cme(t, e, n) {
  11206. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11207. }
  11208. var al = function(e, n) {
  11209. var r = TN({}, e, n.attrs);
  11210. return M(lt, TN({}, r, {
  11211. icon: wme
  11212. }), null);
  11213. };
  11214. al.displayName = "CloseOutlined";
  11215. al.inheritAttrs = !1;
  11216. var Tme = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
  11217. function PN(t) {
  11218. for (var e = 1; e < arguments.length; e++) {
  11219. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11220. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11221. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11222. }))), r.forEach(function(i) {
  11223. Pme(t, i, n[i]);
  11224. });
  11225. }
  11226. return t;
  11227. }
  11228. function Pme(t, e, n) {
  11229. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11230. }
  11231. var Da = function(e, n) {
  11232. var r = PN({}, e, n.attrs);
  11233. return M(lt, PN({}, r, {
  11234. icon: Tme
  11235. }), null);
  11236. };
  11237. Da.displayName = "CloseCircleFilled";
  11238. Da.inheritAttrs = !1;
  11239. var $me = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, name: "search", theme: "outlined" };
  11240. function $N(t) {
  11241. for (var e = 1; e < arguments.length; e++) {
  11242. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  11243. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  11244. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  11245. }))), r.forEach(function(i) {
  11246. Ame(t, i, n[i]);
  11247. });
  11248. }
  11249. return t;
  11250. }
  11251. function Ame(t, e, n) {
  11252. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  11253. }
  11254. var nx = function(e, n) {
  11255. var r = $N({}, e, n.attrs);
  11256. return M(lt, $N({}, r, {
  11257. icon: $me
  11258. }), null);
  11259. };
  11260. nx.displayName = "SearchOutlined";
  11261. nx.inheritAttrs = !1;
  11262. function Eme(t) {
  11263. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  11264. const {
  11265. loading: n,
  11266. multiple: r,
  11267. prefixCls: i,
  11268. hasFeedback: a,
  11269. feedbackIcon: o,
  11270. showArrow: s
  11271. } = t, l = t.suffixIcon || e.suffixIcon && e.suffixIcon(), u = t.clearIcon || e.clearIcon && e.clearIcon(), c = t.menuItemSelectedIcon || e.menuItemSelectedIcon && e.menuItemSelectedIcon(), f = t.removeIcon || e.removeIcon && e.removeIcon(), d = u ?? M(Da, null, null), h = (m) => M(wt, null, [s !== !1 && m, a && o]);
  11272. let p = null;
  11273. if (l !== void 0)
  11274. p = h(l);
  11275. else if (n)
  11276. p = h(M(ts, {
  11277. spin: !0
  11278. }, null));
  11279. else {
  11280. const m = `${i}-suffix`;
  11281. p = (y) => {
  11282. let {
  11283. open: b,
  11284. showSearch: _
  11285. } = y;
  11286. return h(b && _ ? M(nx, {
  11287. class: m
  11288. }, null) : M(tx, {
  11289. class: m
  11290. }, null));
  11291. };
  11292. }
  11293. let v = null;
  11294. c !== void 0 ? v = c : r ? v = M(NI, null, null) : v = null;
  11295. let g = null;
  11296. return f !== void 0 ? g = f : g = M(al, null, null), {
  11297. clearIcon: d,
  11298. suffixIcon: p,
  11299. itemIcon: v,
  11300. removeIcon: g
  11301. };
  11302. }
  11303. function BI(t) {
  11304. const e = Symbol("contextKey");
  11305. return {
  11306. useProvide: (i, a) => {
  11307. const o = tn({});
  11308. return pt(e, o), ht(() => {
  11309. I(o, i, a || {});
  11310. }), o;
  11311. },
  11312. useInject: () => Ge(e, t) || {}
  11313. };
  11314. }
  11315. const C1 = Symbol("ContextProps"), T1 = Symbol("InternalContextProps"), Mme = function(t) {
  11316. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : L(() => !0);
  11317. const n = U(/* @__PURE__ */ new Map()), r = (o, s) => {
  11318. n.value.set(o, s), n.value = new Map(n.value);
  11319. }, i = (o) => {
  11320. n.value.delete(o), n.value = new Map(n.value);
  11321. }, a = vn();
  11322. se([e, n], () => {
  11323. if (process.env.NODE_ENV !== "production" && e.value && n.value.size > 1) {
  11324. Qi(!1, "Form.Item", `FormItem can only collect one field item, you haved set ${[...n.value.values()].map((s) => `\`${s.name}\``).join(", ")} ${n.value.size} field items.
  11325. You can set not need to be collected fields into \`a-form-item-rest\``);
  11326. let o = a;
  11327. for (; o.parent; )
  11328. console.warn("at", o.type), o = o.parent;
  11329. }
  11330. }), pt(C1, t), pt(T1, {
  11331. addFormItemField: r,
  11332. removeFormItemField: i
  11333. });
  11334. }, E2 = {
  11335. id: L(() => {
  11336. }),
  11337. onFieldBlur: () => {
  11338. },
  11339. onFieldChange: () => {
  11340. },
  11341. clearValidate: () => {
  11342. }
  11343. }, M2 = {
  11344. addFormItemField: () => {
  11345. },
  11346. removeFormItemField: () => {
  11347. }
  11348. }, ss = () => {
  11349. const t = Ge(T1, M2), e = Symbol("FormItemFieldKey"), n = vn();
  11350. return t.addFormItemField(e, n.type), yt(() => {
  11351. t.removeFormItemField(e);
  11352. }), pt(T1, M2), pt(C1, E2), Ge(C1, E2);
  11353. }, im = te({
  11354. compatConfig: {
  11355. MODE: 3
  11356. },
  11357. name: "AFormItemRest",
  11358. setup(t, e) {
  11359. let {
  11360. slots: n
  11361. } = e;
  11362. return pt(T1, M2), pt(C1, E2), () => {
  11363. var r;
  11364. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  11365. };
  11366. }
  11367. }), ro = BI({}), P1 = te({
  11368. name: "NoFormStatus",
  11369. setup(t, e) {
  11370. let {
  11371. slots: n
  11372. } = e;
  11373. return ro.useProvide({}), () => {
  11374. var r;
  11375. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  11376. };
  11377. }
  11378. });
  11379. function Is(t, e, n) {
  11380. return ye({
  11381. [`${t}-status-success`]: e === "success",
  11382. [`${t}-status-warning`]: e === "warning",
  11383. [`${t}-status-error`]: e === "error",
  11384. [`${t}-status-validating`]: e === "validating",
  11385. [`${t}-has-feedback`]: n
  11386. });
  11387. }
  11388. const m0 = (t, e) => e || t, Ime = (t) => {
  11389. const {
  11390. componentCls: e
  11391. } = t;
  11392. return {
  11393. [e]: {
  11394. display: "inline-flex",
  11395. "&-block": {
  11396. display: "flex",
  11397. width: "100%"
  11398. },
  11399. "&-vertical": {
  11400. flexDirection: "column"
  11401. }
  11402. }
  11403. };
  11404. }, Dme = (t) => {
  11405. const {
  11406. componentCls: e
  11407. } = t;
  11408. return {
  11409. [e]: {
  11410. display: "inline-flex",
  11411. "&-rtl": {
  11412. direction: "rtl"
  11413. },
  11414. "&-vertical": {
  11415. flexDirection: "column"
  11416. },
  11417. "&-align": {
  11418. flexDirection: "column",
  11419. "&-center": {
  11420. alignItems: "center"
  11421. },
  11422. "&-start": {
  11423. alignItems: "flex-start"
  11424. },
  11425. "&-end": {
  11426. alignItems: "flex-end"
  11427. },
  11428. "&-baseline": {
  11429. alignItems: "baseline"
  11430. }
  11431. },
  11432. [`${e}-item`]: {
  11433. "&:empty": {
  11434. display: "none"
  11435. }
  11436. }
  11437. }
  11438. };
  11439. }, Rme = Sn("Space", (t) => [Dme(t), Ime(t)]);
  11440. var kme = "[object Symbol]";
  11441. function rx(t) {
  11442. return typeof t == "symbol" || no(t) && bu(t) == kme;
  11443. }
  11444. function ix(t, e) {
  11445. for (var n = -1, r = t == null ? 0 : t.length, i = Array(r); ++n < r; )
  11446. i[n] = e(t[n], n, t);
  11447. return i;
  11448. }
  11449. var Lme = 1 / 0, AN = Ta ? Ta.prototype : void 0, EN = AN ? AN.toString : void 0;
  11450. function KZ(t) {
  11451. if (typeof t == "string")
  11452. return t;
  11453. if (wi(t))
  11454. return ix(t, KZ) + "";
  11455. if (rx(t))
  11456. return EN ? EN.call(t) : "";
  11457. var e = t + "";
  11458. return e == "0" && 1 / t == -Lme ? "-0" : e;
  11459. }
  11460. var Nme = /\s/;
  11461. function Bme(t) {
  11462. for (var e = t.length; e-- && Nme.test(t.charAt(e)); )
  11463. ;
  11464. return e;
  11465. }
  11466. var zme = /^\s+/;
  11467. function Vme(t) {
  11468. return t && t.slice(0, Bme(t) + 1).replace(zme, "");
  11469. }
  11470. var MN = NaN, Fme = /^[-+]0x[0-9a-f]+$/i, Wme = /^0b[01]+$/i, Qme = /^0o[0-7]+$/i, Hme = parseInt;
  11471. function I2(t) {
  11472. if (typeof t == "number")
  11473. return t;
  11474. if (rx(t))
  11475. return MN;
  11476. if (xr(t)) {
  11477. var e = typeof t.valueOf == "function" ? t.valueOf() : t;
  11478. t = xr(e) ? e + "" : e;
  11479. }
  11480. if (typeof t != "string")
  11481. return t === 0 ? t : +t;
  11482. t = Vme(t);
  11483. var n = Wme.test(t);
  11484. return n || Qme.test(t) ? Hme(t.slice(2), n ? 2 : 8) : Fme.test(t) ? MN : +t;
  11485. }
  11486. var IN = 1 / 0, Gme = 17976931348623157e292;
  11487. function jme(t) {
  11488. if (!t)
  11489. return t === 0 ? t : 0;
  11490. if (t = I2(t), t === IN || t === -IN) {
  11491. var e = t < 0 ? -1 : 1;
  11492. return e * Gme;
  11493. }
  11494. return t === t ? t : 0;
  11495. }
  11496. function Zme(t) {
  11497. var e = jme(t), n = e % 1;
  11498. return e === e ? n ? e - n : e : 0;
  11499. }
  11500. function zI(t) {
  11501. return t;
  11502. }
  11503. var DN = Object.create, Ume = /* @__PURE__ */ function() {
  11504. function t() {
  11505. }
  11506. return function(e) {
  11507. if (!xr(e))
  11508. return {};
  11509. if (DN)
  11510. return DN(e);
  11511. t.prototype = e;
  11512. var n = new t();
  11513. return t.prototype = void 0, n;
  11514. };
  11515. }();
  11516. function JZ(t, e, n) {
  11517. switch (n.length) {
  11518. case 0:
  11519. return t.call(e);
  11520. case 1:
  11521. return t.call(e, n[0]);
  11522. case 2:
  11523. return t.call(e, n[0], n[1]);
  11524. case 3:
  11525. return t.call(e, n[0], n[1], n[2]);
  11526. }
  11527. return t.apply(e, n);
  11528. }
  11529. function Xme() {
  11530. }
  11531. function eU(t, e) {
  11532. var n = -1, r = t.length;
  11533. for (e || (e = Array(r)); ++n < r; )
  11534. e[n] = t[n];
  11535. return e;
  11536. }
  11537. var Yme = 800, qme = 16, Kme = Date.now;
  11538. function Jme(t) {
  11539. var e = 0, n = 0;
  11540. return function() {
  11541. var r = Kme(), i = qme - (r - n);
  11542. if (n = r, i > 0) {
  11543. if (++e >= Yme)
  11544. return arguments[0];
  11545. } else
  11546. e = 0;
  11547. return t.apply(void 0, arguments);
  11548. };
  11549. }
  11550. function e0e(t) {
  11551. return function() {
  11552. return t;
  11553. };
  11554. }
  11555. var $1 = function() {
  11556. try {
  11557. var t = Mf(Object, "defineProperty");
  11558. return t({}, "", {}), t;
  11559. } catch {
  11560. }
  11561. }(), t0e = $1 ? function(t, e) {
  11562. return $1(t, "toString", {
  11563. configurable: !0,
  11564. enumerable: !1,
  11565. value: e0e(e),
  11566. writable: !0
  11567. });
  11568. } : zI, tU = Jme(t0e);
  11569. function n0e(t, e) {
  11570. for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
  11571. ;
  11572. return t;
  11573. }
  11574. function nU(t, e, n, r) {
  11575. for (var i = t.length, a = n + -1; ++a < i; )
  11576. if (e(t[a], a, t))
  11577. return a;
  11578. return -1;
  11579. }
  11580. function r0e(t) {
  11581. return t !== t;
  11582. }
  11583. function i0e(t, e, n) {
  11584. for (var r = n - 1, i = t.length; ++r < i; )
  11585. if (t[r] === e)
  11586. return r;
  11587. return -1;
  11588. }
  11589. function a0e(t, e, n) {
  11590. return e === e ? i0e(t, e, n) : nU(t, r0e, n);
  11591. }
  11592. function rU(t, e) {
  11593. var n = t == null ? 0 : t.length;
  11594. return !!n && a0e(t, e, 0) > -1;
  11595. }
  11596. function VI(t, e, n) {
  11597. e == "__proto__" && $1 ? $1(t, e, {
  11598. configurable: !0,
  11599. enumerable: !0,
  11600. value: n,
  11601. writable: !0
  11602. }) : t[e] = n;
  11603. }
  11604. var o0e = Object.prototype, s0e = o0e.hasOwnProperty;
  11605. function FI(t, e, n) {
  11606. var r = t[e];
  11607. (!(s0e.call(t, e) && p0(r, n)) || n === void 0 && !(e in t)) && VI(t, e, n);
  11608. }
  11609. function sp(t, e, n, r) {
  11610. var i = !n;
  11611. n || (n = {});
  11612. for (var a = -1, o = e.length; ++a < o; ) {
  11613. var s = e[a], l = void 0;
  11614. l === void 0 && (l = t[s]), i ? VI(n, s, l) : FI(n, s, l);
  11615. }
  11616. return n;
  11617. }
  11618. var RN = Math.max;
  11619. function iU(t, e, n) {
  11620. return e = RN(e === void 0 ? t.length - 1 : e, 0), function() {
  11621. for (var r = arguments, i = -1, a = RN(r.length - e, 0), o = Array(a); ++i < a; )
  11622. o[i] = r[e + i];
  11623. i = -1;
  11624. for (var s = Array(e + 1); ++i < e; )
  11625. s[i] = r[i];
  11626. return s[e] = n(o), JZ(t, this, s);
  11627. };
  11628. }
  11629. function WI(t, e) {
  11630. return tU(iU(t, e, zI), t + "");
  11631. }
  11632. function l0e(t, e, n) {
  11633. if (!xr(n))
  11634. return !1;
  11635. var r = typeof e;
  11636. return (r == "number" ? op(n) && GS(e, n.length) : r == "string" && e in n) ? p0(n[e], t) : !1;
  11637. }
  11638. function u0e(t) {
  11639. return WI(function(e, n) {
  11640. var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
  11641. for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && l0e(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
  11642. var s = n[r];
  11643. s && t(e, s, r, a);
  11644. }
  11645. return e;
  11646. });
  11647. }
  11648. function c0e(t) {
  11649. var e = [];
  11650. if (t != null)
  11651. for (var n in Object(t))
  11652. e.push(n);
  11653. return e;
  11654. }
  11655. var f0e = Object.prototype, d0e = f0e.hasOwnProperty;
  11656. function h0e(t) {
  11657. if (!xr(t))
  11658. return c0e(t);
  11659. var e = US(t), n = [];
  11660. for (var r in t)
  11661. r == "constructor" && (e || !d0e.call(t, r)) || n.push(r);
  11662. return n;
  11663. }
  11664. function y0(t) {
  11665. return op(t) ? CZ(t, !0) : h0e(t);
  11666. }
  11667. var p0e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, v0e = /^\w*$/;
  11668. function QI(t, e) {
  11669. if (wi(t))
  11670. return !1;
  11671. var n = typeof t;
  11672. return n == "number" || n == "symbol" || n == "boolean" || t == null || rx(t) ? !0 : v0e.test(t) || !p0e.test(t) || e != null && t in Object(e);
  11673. }
  11674. var g0e = "Expected a function";
  11675. function HI(t, e) {
  11676. if (typeof t != "function" || e != null && typeof e != "function")
  11677. throw new TypeError(g0e);
  11678. var n = function() {
  11679. var r = arguments, i = e ? e.apply(this, r) : r[0], a = n.cache;
  11680. if (a.has(i))
  11681. return a.get(i);
  11682. var o = t.apply(this, r);
  11683. return n.cache = a.set(i, o) || a, o;
  11684. };
  11685. return n.cache = new (HI.Cache || il)(), n;
  11686. }
  11687. HI.Cache = il;
  11688. var m0e = 500;
  11689. function y0e(t) {
  11690. var e = HI(t, function(r) {
  11691. return n.size === m0e && n.clear(), r;
  11692. }), n = e.cache;
  11693. return e;
  11694. }
  11695. var b0e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _0e = /\\(\\)?/g, O0e = y0e(function(t) {
  11696. var e = [];
  11697. return t.charCodeAt(0) === 46 && e.push(""), t.replace(b0e, function(n, r, i, a) {
  11698. e.push(i ? a.replace(_0e, "$1") : r || n);
  11699. }), e;
  11700. });
  11701. function S0e(t) {
  11702. return t == null ? "" : KZ(t);
  11703. }
  11704. function lp(t, e) {
  11705. return wi(t) ? t : QI(t, e) ? [t] : O0e(S0e(t));
  11706. }
  11707. var x0e = 1 / 0;
  11708. function up(t) {
  11709. if (typeof t == "string" || rx(t))
  11710. return t;
  11711. var e = t + "";
  11712. return e == "0" && 1 / t == -x0e ? "-0" : e;
  11713. }
  11714. function ax(t, e) {
  11715. e = lp(e, t);
  11716. for (var n = 0, r = e.length; t != null && n < r; )
  11717. t = t[up(e[n++])];
  11718. return n && n == r ? t : void 0;
  11719. }
  11720. function kt(t, e, n) {
  11721. var r = t == null ? void 0 : ax(t, e);
  11722. return r === void 0 ? n : r;
  11723. }
  11724. var kN = Ta ? Ta.isConcatSpreadable : void 0;
  11725. function w0e(t) {
  11726. return wi(t) || Oh(t) || !!(kN && t && t[kN]);
  11727. }
  11728. function C0e(t, e, n, r, i) {
  11729. var a = -1, o = t.length;
  11730. for (n || (n = w0e), i || (i = []); ++a < o; ) {
  11731. var s = t[a];
  11732. n(s) ? OI(i, s) : i[i.length] = s;
  11733. }
  11734. return i;
  11735. }
  11736. function T0e(t) {
  11737. var e = t == null ? 0 : t.length;
  11738. return e ? C0e(t) : [];
  11739. }
  11740. function aU(t) {
  11741. return tU(iU(t, void 0, T0e), t + "");
  11742. }
  11743. var GI = TZ(Object.getPrototypeOf, Object), P0e = "[object Object]", $0e = Function.prototype, A0e = Object.prototype, oU = $0e.toString, E0e = A0e.hasOwnProperty, M0e = oU.call(Object);
  11744. function jI(t) {
  11745. if (!no(t) || bu(t) != P0e)
  11746. return !1;
  11747. var e = GI(t);
  11748. if (e === null)
  11749. return !0;
  11750. var n = E0e.call(e, "constructor") && e.constructor;
  11751. return typeof n == "function" && n instanceof n && oU.call(n) == M0e;
  11752. }
  11753. function I0e(t, e, n) {
  11754. var r = -1, i = t.length;
  11755. e < 0 && (e = -e > i ? 0 : i + e), n = n > i ? i : n, n < 0 && (n += i), i = e > n ? 0 : n - e >>> 0, e >>>= 0;
  11756. for (var a = Array(i); ++r < i; )
  11757. a[r] = t[r + e];
  11758. return a;
  11759. }
  11760. function D0e(t, e) {
  11761. return t && sp(e, v0(e), t);
  11762. }
  11763. function R0e(t, e) {
  11764. return t && sp(e, y0(e), t);
  11765. }
  11766. var sU = typeof exports == "object" && exports && !exports.nodeType && exports, LN = sU && typeof module == "object" && module && !module.nodeType && module, k0e = LN && LN.exports === sU, NN = k0e ? fo.Buffer : void 0, BN = NN ? NN.allocUnsafe : void 0;
  11767. function lU(t, e) {
  11768. if (e)
  11769. return t.slice();
  11770. var n = t.length, r = BN ? BN(n) : new t.constructor(n);
  11771. return t.copy(r), r;
  11772. }
  11773. function L0e(t, e) {
  11774. return sp(t, SI(t), e);
  11775. }
  11776. var N0e = Object.getOwnPropertySymbols, uU = N0e ? function(t) {
  11777. for (var e = []; t; )
  11778. OI(e, SI(t)), t = GI(t);
  11779. return e;
  11780. } : OZ;
  11781. function B0e(t, e) {
  11782. return sp(t, uU(t), e);
  11783. }
  11784. function cU(t) {
  11785. return _Z(t, y0, uU);
  11786. }
  11787. var z0e = Object.prototype, V0e = z0e.hasOwnProperty;
  11788. function F0e(t) {
  11789. var e = t.length, n = new t.constructor(e);
  11790. return e && typeof t[0] == "string" && V0e.call(t, "index") && (n.index = t.index, n.input = t.input), n;
  11791. }
  11792. function ZI(t) {
  11793. var e = new t.constructor(t.byteLength);
  11794. return new w1(e).set(new w1(t)), e;
  11795. }
  11796. function W0e(t, e) {
  11797. var n = e ? ZI(t.buffer) : t.buffer;
  11798. return new t.constructor(n, t.byteOffset, t.byteLength);
  11799. }
  11800. var Q0e = /\w*$/;
  11801. function H0e(t) {
  11802. var e = new t.constructor(t.source, Q0e.exec(t));
  11803. return e.lastIndex = t.lastIndex, e;
  11804. }
  11805. var zN = Ta ? Ta.prototype : void 0, VN = zN ? zN.valueOf : void 0;
  11806. function G0e(t) {
  11807. return VN ? Object(VN.call(t)) : {};
  11808. }
  11809. function fU(t, e) {
  11810. var n = e ? ZI(t.buffer) : t.buffer;
  11811. return new t.constructor(n, t.byteOffset, t.length);
  11812. }
  11813. var j0e = "[object Boolean]", Z0e = "[object Date]", U0e = "[object Map]", X0e = "[object Number]", Y0e = "[object RegExp]", q0e = "[object Set]", K0e = "[object String]", J0e = "[object Symbol]", eye = "[object ArrayBuffer]", tye = "[object DataView]", nye = "[object Float32Array]", rye = "[object Float64Array]", iye = "[object Int8Array]", aye = "[object Int16Array]", oye = "[object Int32Array]", sye = "[object Uint8Array]", lye = "[object Uint8ClampedArray]", uye = "[object Uint16Array]", cye = "[object Uint32Array]";
  11814. function fye(t, e, n) {
  11815. var r = t.constructor;
  11816. switch (e) {
  11817. case eye:
  11818. return ZI(t);
  11819. case j0e:
  11820. case Z0e:
  11821. return new r(+t);
  11822. case tye:
  11823. return W0e(t, n);
  11824. case nye:
  11825. case rye:
  11826. case iye:
  11827. case aye:
  11828. case oye:
  11829. case sye:
  11830. case lye:
  11831. case uye:
  11832. case cye:
  11833. return fU(t, n);
  11834. case U0e:
  11835. return new r();
  11836. case X0e:
  11837. case K0e:
  11838. return new r(t);
  11839. case Y0e:
  11840. return H0e(t);
  11841. case q0e:
  11842. return new r();
  11843. case J0e:
  11844. return G0e(t);
  11845. }
  11846. }
  11847. function dU(t) {
  11848. return typeof t.constructor == "function" && !US(t) ? Ume(GI(t)) : {};
  11849. }
  11850. var dye = "[object Map]";
  11851. function hye(t) {
  11852. return no(t) && da(t) == dye;
  11853. }
  11854. var FN = xh && xh.isMap, pye = FN ? jS(FN) : hye, vye = "[object Set]";
  11855. function gye(t) {
  11856. return no(t) && da(t) == vye;
  11857. }
  11858. var WN = xh && xh.isSet, mye = WN ? jS(WN) : gye, yye = 1, bye = 2, _ye = 4, hU = "[object Arguments]", Oye = "[object Array]", Sye = "[object Boolean]", xye = "[object Date]", wye = "[object Error]", pU = "[object Function]", Cye = "[object GeneratorFunction]", Tye = "[object Map]", Pye = "[object Number]", vU = "[object Object]", $ye = "[object RegExp]", Aye = "[object Set]", Eye = "[object String]", Mye = "[object Symbol]", Iye = "[object WeakMap]", Dye = "[object ArrayBuffer]", Rye = "[object DataView]", kye = "[object Float32Array]", Lye = "[object Float64Array]", Nye = "[object Int8Array]", Bye = "[object Int16Array]", zye = "[object Int32Array]", Vye = "[object Uint8Array]", Fye = "[object Uint8ClampedArray]", Wye = "[object Uint16Array]", Qye = "[object Uint32Array]", rn = {};
  11859. rn[hU] = rn[Oye] = rn[Dye] = rn[Rye] = rn[Sye] = rn[xye] = rn[kye] = rn[Lye] = rn[Nye] = rn[Bye] = rn[zye] = rn[Tye] = rn[Pye] = rn[vU] = rn[$ye] = rn[Aye] = rn[Eye] = rn[Mye] = rn[Vye] = rn[Fye] = rn[Wye] = rn[Qye] = !0;
  11860. rn[wye] = rn[pU] = rn[Iye] = !1;
  11861. function ug(t, e, n, r, i, a) {
  11862. var o, s = e & yye, l = e & bye, u = e & _ye;
  11863. if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
  11864. return o;
  11865. if (!xr(t))
  11866. return t;
  11867. var c = wi(t);
  11868. if (c) {
  11869. if (o = F0e(t), !s)
  11870. return eU(t, o);
  11871. } else {
  11872. var f = da(t), d = f == pU || f == Cye;
  11873. if (Sh(t))
  11874. return lU(t, s);
  11875. if (f == vU || f == hU || d && !i) {
  11876. if (o = l || d ? {} : dU(t), !s)
  11877. return l ? B0e(t, R0e(o, t)) : L0e(t, D0e(o, t));
  11878. } else {
  11879. if (!rn[f])
  11880. return i ? t : {};
  11881. o = fye(t, f, s);
  11882. }
  11883. }
  11884. a || (a = new Ka());
  11885. var h = a.get(t);
  11886. if (h)
  11887. return h;
  11888. a.set(t, o), mye(t) ? t.forEach(function(g) {
  11889. o.add(ug(g, e, n, g, t, a));
  11890. }) : pye(t) && t.forEach(function(g, m) {
  11891. o.set(m, ug(g, e, n, m, t, a));
  11892. });
  11893. var p = u ? l ? cU : x2 : l ? y0 : v0, v = c ? void 0 : p(t);
  11894. return n0e(v || t, function(g, m) {
  11895. v && (m = g, g = t[m]), FI(o, m, ug(g, e, n, m, t, a));
  11896. }), o;
  11897. }
  11898. var Hye = 1, Gye = 4;
  11899. function Zc(t) {
  11900. return ug(t, Hye | Gye);
  11901. }
  11902. var jye = 1, Zye = 2;
  11903. function Uye(t, e, n, r) {
  11904. var i = n.length, a = i;
  11905. if (t == null)
  11906. return !a;
  11907. for (t = Object(t); i--; ) {
  11908. var o = n[i];
  11909. if (o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
  11910. return !1;
  11911. }
  11912. for (; ++i < a; ) {
  11913. o = n[i];
  11914. var s = o[0], l = t[s], u = o[1];
  11915. if (o[2]) {
  11916. if (l === void 0 && !(s in t))
  11917. return !1;
  11918. } else {
  11919. var c = new Ka(), f;
  11920. if (!(f === void 0 ? XS(u, l, jye | Zye, r, c) : f))
  11921. return !1;
  11922. }
  11923. }
  11924. return !0;
  11925. }
  11926. function gU(t) {
  11927. return t === t && !xr(t);
  11928. }
  11929. function Xye(t) {
  11930. for (var e = v0(t), n = e.length; n--; ) {
  11931. var r = e[n], i = t[r];
  11932. e[n] = [r, i, gU(i)];
  11933. }
  11934. return e;
  11935. }
  11936. function mU(t, e) {
  11937. return function(n) {
  11938. return n == null ? !1 : n[t] === e && (e !== void 0 || t in Object(n));
  11939. };
  11940. }
  11941. function Yye(t) {
  11942. var e = Xye(t);
  11943. return e.length == 1 && e[0][2] ? mU(e[0][0], e[0][1]) : function(n) {
  11944. return n === t || Uye(n, t, e);
  11945. };
  11946. }
  11947. function qye(t, e) {
  11948. return t != null && e in Object(t);
  11949. }
  11950. function Kye(t, e, n) {
  11951. e = lp(e, t);
  11952. for (var r = -1, i = e.length, a = !1; ++r < i; ) {
  11953. var o = up(e[r]);
  11954. if (!(a = t != null && n(t, o)))
  11955. break;
  11956. t = t[o];
  11957. }
  11958. return a || ++r != i ? a : (i = t == null ? 0 : t.length, !!i && xI(i) && GS(o, i) && (wi(t) || Oh(t)));
  11959. }
  11960. function yU(t, e) {
  11961. return t != null && Kye(t, e, qye);
  11962. }
  11963. var Jye = 1, ebe = 2;
  11964. function tbe(t, e) {
  11965. return QI(t) && gU(e) ? mU(up(t), e) : function(n) {
  11966. var r = kt(n, t);
  11967. return r === void 0 && r === e ? yU(n, t) : XS(e, r, Jye | ebe);
  11968. };
  11969. }
  11970. function nbe(t) {
  11971. return function(e) {
  11972. return e == null ? void 0 : e[t];
  11973. };
  11974. }
  11975. function rbe(t) {
  11976. return function(e) {
  11977. return ax(e, t);
  11978. };
  11979. }
  11980. function ibe(t) {
  11981. return QI(t) ? nbe(up(t)) : rbe(t);
  11982. }
  11983. function bU(t) {
  11984. return typeof t == "function" ? t : t == null ? zI : typeof t == "object" ? wi(t) ? tbe(t[0], t[1]) : Yye(t) : ibe(t);
  11985. }
  11986. function abe(t) {
  11987. return function(e, n, r) {
  11988. for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
  11989. var l = o[++i];
  11990. if (n(a[l], l, a) === !1)
  11991. break;
  11992. }
  11993. return e;
  11994. };
  11995. }
  11996. var obe = abe(), mC = function() {
  11997. return fo.Date.now();
  11998. }, sbe = "Expected a function", lbe = Math.max, ube = Math.min;
  11999. function UI(t, e, n) {
  12000. var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  12001. if (typeof t != "function")
  12002. throw new TypeError(sbe);
  12003. e = I2(e) || 0, xr(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? lbe(I2(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  12004. function h(S) {
  12005. var x = r, C = i;
  12006. return r = i = void 0, u = S, o = t.apply(C, x), o;
  12007. }
  12008. function p(S) {
  12009. return u = S, s = setTimeout(m, e), c ? h(S) : o;
  12010. }
  12011. function v(S) {
  12012. var x = S - l, C = S - u, T = e - x;
  12013. return f ? ube(T, a - C) : T;
  12014. }
  12015. function g(S) {
  12016. var x = S - l, C = S - u;
  12017. return l === void 0 || x >= e || x < 0 || f && C >= a;
  12018. }
  12019. function m() {
  12020. var S = mC();
  12021. if (g(S))
  12022. return y(S);
  12023. s = setTimeout(m, v(S));
  12024. }
  12025. function y(S) {
  12026. return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  12027. }
  12028. function b() {
  12029. s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  12030. }
  12031. function _() {
  12032. return s === void 0 ? o : y(mC());
  12033. }
  12034. function O() {
  12035. var S = mC(), x = g(S);
  12036. if (r = arguments, i = this, l = S, x) {
  12037. if (s === void 0)
  12038. return p(l);
  12039. if (f)
  12040. return clearTimeout(s), s = setTimeout(m, e), h(l);
  12041. }
  12042. return s === void 0 && (s = setTimeout(m, e)), o;
  12043. }
  12044. return O.cancel = b, O.flush = _, O;
  12045. }
  12046. function D2(t, e, n) {
  12047. (n !== void 0 && !p0(t[e], n) || n === void 0 && !(e in t)) && VI(t, e, n);
  12048. }
  12049. function _U(t) {
  12050. return no(t) && op(t);
  12051. }
  12052. function R2(t, e) {
  12053. if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
  12054. return t[e];
  12055. }
  12056. function cbe(t) {
  12057. return sp(t, y0(t));
  12058. }
  12059. function fbe(t, e, n, r, i, a, o) {
  12060. var s = R2(t, n), l = R2(e, n), u = o.get(l);
  12061. if (u) {
  12062. D2(t, n, u);
  12063. return;
  12064. }
  12065. var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  12066. if (f) {
  12067. var d = wi(l), h = !d && Sh(l), p = !d && !h && ZS(l);
  12068. c = l, d || h || p ? wi(s) ? c = s : _U(s) ? c = eU(s) : h ? (f = !1, c = lU(l, !0)) : p ? (f = !1, c = fU(l, !0)) : c = [] : jI(l) || Oh(l) ? (c = s, Oh(s) ? c = cbe(s) : (!xr(s) || bI(s)) && (c = dU(l))) : f = !1;
  12069. }
  12070. f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), D2(t, n, c);
  12071. }
  12072. function XI(t, e, n, r, i) {
  12073. t !== e && obe(e, function(a, o) {
  12074. if (i || (i = new Ka()), xr(a))
  12075. fbe(t, e, o, n, XI, r, i);
  12076. else {
  12077. var s = r ? r(R2(t, o), a, o + "", t, e, i) : void 0;
  12078. s === void 0 && (s = a), D2(t, o, s);
  12079. }
  12080. }, y0);
  12081. }
  12082. function OU(t, e, n, r, i, a) {
  12083. return xr(t) && xr(e) && (a.set(e, t), XI(t, e, void 0, OU, a), a.delete(e)), t;
  12084. }
  12085. var dbe = u0e(function(t, e, n, r) {
  12086. XI(t, e, n, r);
  12087. }), SU = WI(function(t) {
  12088. return t.push(void 0, OU), JZ(dbe, void 0, t);
  12089. });
  12090. function hbe(t) {
  12091. var e = t == null ? 0 : t.length;
  12092. return e ? t[e - 1] : void 0;
  12093. }
  12094. function pbe(t) {
  12095. return function(e, n, r) {
  12096. var i = Object(e);
  12097. if (!op(e)) {
  12098. var a = bU(n);
  12099. e = v0(e), n = function(s) {
  12100. return a(i[s], s, i);
  12101. };
  12102. }
  12103. var o = t(e, n, r);
  12104. return o > -1 ? i[a ? e[o] : o] : void 0;
  12105. };
  12106. }
  12107. var vbe = Math.max;
  12108. function gbe(t, e, n) {
  12109. var r = t == null ? 0 : t.length;
  12110. if (!r)
  12111. return -1;
  12112. var i = n == null ? 0 : Zme(n);
  12113. return i < 0 && (i = vbe(r + i, 0)), nU(t, bU(e), i);
  12114. }
  12115. var mbe = pbe(gbe);
  12116. function A1(t) {
  12117. for (var e = -1, n = t == null ? 0 : t.length, r = {}; ++e < n; ) {
  12118. var i = t[e];
  12119. r[i[0]] = i[1];
  12120. }
  12121. return r;
  12122. }
  12123. var ybe = Math.min;
  12124. function bbe(t, e, n) {
  12125. for (var r = rU, i = t[0].length, a = t.length, o = a, s = Array(a), l = 1 / 0, u = []; o--; ) {
  12126. var c = t[o];
  12127. o && e && (c = ix(c, jS(e))), l = ybe(c.length, l), s[o] = i >= 120 && c.length >= 120 ? new _h(o && c) : void 0;
  12128. }
  12129. c = t[0];
  12130. var f = -1, d = s[0];
  12131. e:
  12132. for (; ++f < i && u.length < l; ) {
  12133. var h = c[f], p = h;
  12134. if (h = h !== 0 ? h : 0, !(d ? x1(d, p) : r(u, p))) {
  12135. for (o = a; --o; ) {
  12136. var v = s[o];
  12137. if (!(v ? x1(v, p) : r(t[o], p)))
  12138. continue e;
  12139. }
  12140. d && d.push(p), u.push(h);
  12141. }
  12142. }
  12143. return u;
  12144. }
  12145. function _be(t) {
  12146. return _U(t) ? t : [];
  12147. }
  12148. var Obe = WI(function(t) {
  12149. var e = ix(t, _be);
  12150. return e.length && e[0] === t[0] ? bbe(e) : [];
  12151. });
  12152. function Sbe(t, e) {
  12153. return e.length < 2 ? t : ax(t, I0e(e, 0, -1));
  12154. }
  12155. var xbe = "[object Map]", wbe = "[object Set]", Cbe = Object.prototype, Tbe = Cbe.hasOwnProperty;
  12156. function xU(t) {
  12157. if (t == null)
  12158. return !0;
  12159. if (op(t) && (wi(t) || typeof t == "string" || typeof t.splice == "function" || Sh(t) || ZS(t) || Oh(t)))
  12160. return !t.length;
  12161. var e = da(t);
  12162. if (e == xbe || e == wbe)
  12163. return !t.size;
  12164. if (US(t))
  12165. return !PZ(t).length;
  12166. for (var n in t)
  12167. if (Tbe.call(t, n))
  12168. return !1;
  12169. return !0;
  12170. }
  12171. var Pbe = "[object Number]";
  12172. function $be(t) {
  12173. return typeof t == "number" || no(t) && bu(t) == Pbe;
  12174. }
  12175. function Gl(t) {
  12176. return t == null;
  12177. }
  12178. function Abe(t) {
  12179. return t === void 0;
  12180. }
  12181. function Ebe(t, e) {
  12182. return e = lp(e, t), t = Sbe(t, e), t == null || delete t[up(hbe(e))];
  12183. }
  12184. function Mbe(t) {
  12185. return jI(t) ? void 0 : t;
  12186. }
  12187. var Ibe = 1, Dbe = 2, Rbe = 4, wU = aU(function(t, e) {
  12188. var n = {};
  12189. if (t == null)
  12190. return n;
  12191. var r = !1;
  12192. e = ix(e, function(a) {
  12193. return a = lp(a, t), r || (r = a.length > 1), a;
  12194. }), sp(t, cU(t), n), r && (n = ug(n, Ibe | Dbe | Rbe, Mbe));
  12195. for (var i = e.length; i--; )
  12196. Ebe(n, e[i]);
  12197. return n;
  12198. });
  12199. function CU(t, e, n, r) {
  12200. if (!xr(t))
  12201. return t;
  12202. e = lp(e, t);
  12203. for (var i = -1, a = e.length, o = a - 1, s = t; s != null && ++i < a; ) {
  12204. var l = up(e[i]), u = n;
  12205. if (l === "__proto__" || l === "constructor" || l === "prototype")
  12206. return t;
  12207. if (i != o) {
  12208. var c = s[l];
  12209. u = void 0, u === void 0 && (u = xr(c) ? c : GS(e[i + 1]) ? [] : {});
  12210. }
  12211. FI(s, l, u), s = s[l];
  12212. }
  12213. return t;
  12214. }
  12215. function kbe(t, e, n) {
  12216. for (var r = -1, i = e.length, a = {}; ++r < i; ) {
  12217. var o = e[r], s = ax(t, o);
  12218. n(s, o) && CU(a, lp(o, t), s);
  12219. }
  12220. return a;
  12221. }
  12222. function Lbe(t, e) {
  12223. return kbe(t, e, function(n, r) {
  12224. return yU(t, r);
  12225. });
  12226. }
  12227. var am = aU(function(t, e) {
  12228. return t == null ? {} : Lbe(t, e);
  12229. });
  12230. function YI(t, e, n) {
  12231. return t == null ? t : CU(t, e, n);
  12232. }
  12233. var Nbe = "Expected a function";
  12234. function Bbe(t, e, n) {
  12235. var r = !0, i = !0;
  12236. if (typeof t != "function")
  12237. throw new TypeError(Nbe);
  12238. return xr(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), UI(t, e, {
  12239. leading: r,
  12240. maxWait: e,
  12241. trailing: i
  12242. });
  12243. }
  12244. var zbe = 1 / 0, Vbe = Zd && 1 / _I(new Zd([, -0]))[1] == zbe ? function(t) {
  12245. return new Zd(t);
  12246. } : Xme, Fbe = 200;
  12247. function Wbe(t, e, n) {
  12248. var r = -1, i = rU, a = t.length, o = !0, s = [], l = s;
  12249. if (a >= Fbe) {
  12250. var u = Vbe(t);
  12251. if (u)
  12252. return _I(u);
  12253. o = !1, i = x1, l = new _h();
  12254. } else
  12255. l = s;
  12256. e:
  12257. for (; ++r < a; ) {
  12258. var c = t[r], f = c;
  12259. if (c = c !== 0 ? c : 0, o && f === f) {
  12260. for (var d = l.length; d--; )
  12261. if (l[d] === f)
  12262. continue e;
  12263. s.push(c);
  12264. } else i(l, f, n) || (l !== s && l.push(f), s.push(c));
  12265. }
  12266. return s;
  12267. }
  12268. function yC(t) {
  12269. return t && t.length ? Wbe(t) : [];
  12270. }
  12271. const Qbe = () => ({
  12272. compactSize: String,
  12273. compactDirection: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  12274. isFirstItem: nt(),
  12275. isLastItem: nt()
  12276. }), ox = BI(null), sx = (t, e) => {
  12277. const n = ox.useInject(), r = L(() => {
  12278. if (!n || xU(n)) return "";
  12279. const {
  12280. compactDirection: i,
  12281. isFirstItem: a,
  12282. isLastItem: o
  12283. } = n, s = i === "vertical" ? "-vertical-" : "-";
  12284. return ye({
  12285. [`${t.value}-compact${s}item`]: !0,
  12286. [`${t.value}-compact${s}first-item`]: a,
  12287. [`${t.value}-compact${s}last-item`]: o,
  12288. [`${t.value}-compact${s}item-rtl`]: e.value === "rtl"
  12289. });
  12290. });
  12291. return {
  12292. compactSize: L(() => n == null ? void 0 : n.compactSize),
  12293. compactDirection: L(() => n == null ? void 0 : n.compactDirection),
  12294. compactItemClassnames: r
  12295. };
  12296. }, E1 = te({
  12297. name: "NoCompactStyle",
  12298. setup(t, e) {
  12299. let {
  12300. slots: n
  12301. } = e;
  12302. return ox.useProvide(null), () => {
  12303. var r;
  12304. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  12305. };
  12306. }
  12307. }), Hbe = () => ({
  12308. prefixCls: String,
  12309. size: {
  12310. type: String
  12311. },
  12312. direction: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  12313. align: Y.oneOf(ru("start", "end", "center", "baseline")),
  12314. block: {
  12315. type: Boolean,
  12316. default: void 0
  12317. }
  12318. }), Gbe = te({
  12319. name: "CompactItem",
  12320. props: Qbe(),
  12321. setup(t, e) {
  12322. let {
  12323. slots: n
  12324. } = e;
  12325. return ox.useProvide(t), () => {
  12326. var r;
  12327. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  12328. };
  12329. }
  12330. });
  12331. te({
  12332. name: "ASpaceCompact",
  12333. inheritAttrs: !1,
  12334. props: Hbe(),
  12335. setup(t, e) {
  12336. let {
  12337. attrs: n,
  12338. slots: r
  12339. } = e;
  12340. const {
  12341. prefixCls: i,
  12342. direction: a
  12343. } = It("space-compact", t), o = ox.useInject(), [s, l] = Rme(i), u = L(() => ye(i.value, l.value, {
  12344. [`${i.value}-rtl`]: a.value === "rtl",
  12345. [`${i.value}-block`]: t.block,
  12346. [`${i.value}-vertical`]: t.direction === "vertical"
  12347. }));
  12348. return () => {
  12349. var c;
  12350. const f = Yn(((c = r.default) === null || c === void 0 ? void 0 : c.call(r)) || []);
  12351. return f.length === 0 ? null : s(M("div", j(j({}, n), {}, {
  12352. class: [u.value, n.class]
  12353. }), [f.map((d, h) => {
  12354. var p;
  12355. const v = d && d.key || `${i.value}-item-${h}`, g = !o || xU(o);
  12356. return M(Gbe, {
  12357. key: v,
  12358. compactSize: (p = t.size) !== null && p !== void 0 ? p : "middle",
  12359. compactDirection: t.direction,
  12360. isFirstItem: h === 0 && (g || (o == null ? void 0 : o.isFirstItem)),
  12361. isLastItem: h === f.length - 1 && (g || (o == null ? void 0 : o.isLastItem))
  12362. }, {
  12363. default: () => [d]
  12364. });
  12365. })]));
  12366. };
  12367. }
  12368. });
  12369. const jbe = (t) => ({
  12370. animationDuration: t,
  12371. animationFillMode: "both"
  12372. }), Zbe = (t) => ({
  12373. animationDuration: t,
  12374. animationFillMode: "both"
  12375. }), lx = function(t, e, n, r) {
  12376. const a = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  12377. return {
  12378. [`
  12379. ${a}${t}-enter,
  12380. ${a}${t}-appear
  12381. `]: I(I({}, jbe(r)), {
  12382. animationPlayState: "paused"
  12383. }),
  12384. [`${a}${t}-leave`]: I(I({}, Zbe(r)), {
  12385. animationPlayState: "paused"
  12386. }),
  12387. [`
  12388. ${a}${t}-enter${t}-enter-active,
  12389. ${a}${t}-appear${t}-appear-active
  12390. `]: {
  12391. animationName: e,
  12392. animationPlayState: "running"
  12393. },
  12394. [`${a}${t}-leave${t}-leave-active`]: {
  12395. animationName: n,
  12396. animationPlayState: "running",
  12397. pointerEvents: "none"
  12398. }
  12399. };
  12400. }, Ube = new Ot("antFadeIn", {
  12401. "0%": {
  12402. opacity: 0
  12403. },
  12404. "100%": {
  12405. opacity: 1
  12406. }
  12407. }), Xbe = new Ot("antFadeOut", {
  12408. "0%": {
  12409. opacity: 1
  12410. },
  12411. "100%": {
  12412. opacity: 0
  12413. }
  12414. }), TU = function(t) {
  12415. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  12416. const {
  12417. antCls: n
  12418. } = t, r = `${n}-fade`, i = e ? "&" : "";
  12419. return [lx(r, Ube, Xbe, t.motionDurationMid, e), {
  12420. [`
  12421. ${i}${r}-enter,
  12422. ${i}${r}-appear
  12423. `]: {
  12424. opacity: 0,
  12425. animationTimingFunction: "linear"
  12426. },
  12427. [`${i}${r}-leave`]: {
  12428. animationTimingFunction: "linear"
  12429. }
  12430. }];
  12431. }, Ybe = new Ot("antMoveDownIn", {
  12432. "0%": {
  12433. transform: "translate3d(0, 100%, 0)",
  12434. transformOrigin: "0 0",
  12435. opacity: 0
  12436. },
  12437. "100%": {
  12438. transform: "translate3d(0, 0, 0)",
  12439. transformOrigin: "0 0",
  12440. opacity: 1
  12441. }
  12442. }), qbe = new Ot("antMoveDownOut", {
  12443. "0%": {
  12444. transform: "translate3d(0, 0, 0)",
  12445. transformOrigin: "0 0",
  12446. opacity: 1
  12447. },
  12448. "100%": {
  12449. transform: "translate3d(0, 100%, 0)",
  12450. transformOrigin: "0 0",
  12451. opacity: 0
  12452. }
  12453. }), Kbe = new Ot("antMoveLeftIn", {
  12454. "0%": {
  12455. transform: "translate3d(-100%, 0, 0)",
  12456. transformOrigin: "0 0",
  12457. opacity: 0
  12458. },
  12459. "100%": {
  12460. transform: "translate3d(0, 0, 0)",
  12461. transformOrigin: "0 0",
  12462. opacity: 1
  12463. }
  12464. }), Jbe = new Ot("antMoveLeftOut", {
  12465. "0%": {
  12466. transform: "translate3d(0, 0, 0)",
  12467. transformOrigin: "0 0",
  12468. opacity: 1
  12469. },
  12470. "100%": {
  12471. transform: "translate3d(-100%, 0, 0)",
  12472. transformOrigin: "0 0",
  12473. opacity: 0
  12474. }
  12475. }), e_e = new Ot("antMoveRightIn", {
  12476. "0%": {
  12477. transform: "translate3d(100%, 0, 0)",
  12478. transformOrigin: "0 0",
  12479. opacity: 0
  12480. },
  12481. "100%": {
  12482. transform: "translate3d(0, 0, 0)",
  12483. transformOrigin: "0 0",
  12484. opacity: 1
  12485. }
  12486. }), t_e = new Ot("antMoveRightOut", {
  12487. "0%": {
  12488. transform: "translate3d(0, 0, 0)",
  12489. transformOrigin: "0 0",
  12490. opacity: 1
  12491. },
  12492. "100%": {
  12493. transform: "translate3d(100%, 0, 0)",
  12494. transformOrigin: "0 0",
  12495. opacity: 0
  12496. }
  12497. }), n_e = new Ot("antMoveUpIn", {
  12498. "0%": {
  12499. transform: "translate3d(0, -100%, 0)",
  12500. transformOrigin: "0 0",
  12501. opacity: 0
  12502. },
  12503. "100%": {
  12504. transform: "translate3d(0, 0, 0)",
  12505. transformOrigin: "0 0",
  12506. opacity: 1
  12507. }
  12508. }), r_e = new Ot("antMoveUpOut", {
  12509. "0%": {
  12510. transform: "translate3d(0, 0, 0)",
  12511. transformOrigin: "0 0",
  12512. opacity: 1
  12513. },
  12514. "100%": {
  12515. transform: "translate3d(0, -100%, 0)",
  12516. transformOrigin: "0 0",
  12517. opacity: 0
  12518. }
  12519. }), i_e = {
  12520. "move-up": {
  12521. inKeyframes: n_e,
  12522. outKeyframes: r_e
  12523. },
  12524. "move-down": {
  12525. inKeyframes: Ybe,
  12526. outKeyframes: qbe
  12527. },
  12528. "move-left": {
  12529. inKeyframes: Kbe,
  12530. outKeyframes: Jbe
  12531. },
  12532. "move-right": {
  12533. inKeyframes: e_e,
  12534. outKeyframes: t_e
  12535. }
  12536. }, QN = (t, e) => {
  12537. const {
  12538. antCls: n
  12539. } = t, r = `${n}-${e}`, {
  12540. inKeyframes: i,
  12541. outKeyframes: a
  12542. } = i_e[e];
  12543. return [lx(r, i, a, t.motionDurationMid), {
  12544. [`
  12545. ${r}-enter,
  12546. ${r}-appear
  12547. `]: {
  12548. opacity: 0,
  12549. animationTimingFunction: t.motionEaseOutCirc
  12550. },
  12551. [`${r}-leave`]: {
  12552. animationTimingFunction: t.motionEaseInOutCirc
  12553. }
  12554. }];
  12555. }, PU = new Ot("antSlideUpIn", {
  12556. "0%": {
  12557. transform: "scaleY(0.8)",
  12558. transformOrigin: "0% 0%",
  12559. opacity: 0
  12560. },
  12561. "100%": {
  12562. transform: "scaleY(1)",
  12563. transformOrigin: "0% 0%",
  12564. opacity: 1
  12565. }
  12566. }), $U = new Ot("antSlideUpOut", {
  12567. "0%": {
  12568. transform: "scaleY(1)",
  12569. transformOrigin: "0% 0%",
  12570. opacity: 1
  12571. },
  12572. "100%": {
  12573. transform: "scaleY(0.8)",
  12574. transformOrigin: "0% 0%",
  12575. opacity: 0
  12576. }
  12577. }), AU = new Ot("antSlideDownIn", {
  12578. "0%": {
  12579. transform: "scaleY(0.8)",
  12580. transformOrigin: "100% 100%",
  12581. opacity: 0
  12582. },
  12583. "100%": {
  12584. transform: "scaleY(1)",
  12585. transformOrigin: "100% 100%",
  12586. opacity: 1
  12587. }
  12588. }), EU = new Ot("antSlideDownOut", {
  12589. "0%": {
  12590. transform: "scaleY(1)",
  12591. transformOrigin: "100% 100%",
  12592. opacity: 1
  12593. },
  12594. "100%": {
  12595. transform: "scaleY(0.8)",
  12596. transformOrigin: "100% 100%",
  12597. opacity: 0
  12598. }
  12599. }), a_e = new Ot("antSlideLeftIn", {
  12600. "0%": {
  12601. transform: "scaleX(0.8)",
  12602. transformOrigin: "0% 0%",
  12603. opacity: 0
  12604. },
  12605. "100%": {
  12606. transform: "scaleX(1)",
  12607. transformOrigin: "0% 0%",
  12608. opacity: 1
  12609. }
  12610. }), o_e = new Ot("antSlideLeftOut", {
  12611. "0%": {
  12612. transform: "scaleX(1)",
  12613. transformOrigin: "0% 0%",
  12614. opacity: 1
  12615. },
  12616. "100%": {
  12617. transform: "scaleX(0.8)",
  12618. transformOrigin: "0% 0%",
  12619. opacity: 0
  12620. }
  12621. }), s_e = new Ot("antSlideRightIn", {
  12622. "0%": {
  12623. transform: "scaleX(0.8)",
  12624. transformOrigin: "100% 0%",
  12625. opacity: 0
  12626. },
  12627. "100%": {
  12628. transform: "scaleX(1)",
  12629. transformOrigin: "100% 0%",
  12630. opacity: 1
  12631. }
  12632. }), l_e = new Ot("antSlideRightOut", {
  12633. "0%": {
  12634. transform: "scaleX(1)",
  12635. transformOrigin: "100% 0%",
  12636. opacity: 1
  12637. },
  12638. "100%": {
  12639. transform: "scaleX(0.8)",
  12640. transformOrigin: "100% 0%",
  12641. opacity: 0
  12642. }
  12643. }), u_e = {
  12644. "slide-up": {
  12645. inKeyframes: PU,
  12646. outKeyframes: $U
  12647. },
  12648. "slide-down": {
  12649. inKeyframes: AU,
  12650. outKeyframes: EU
  12651. },
  12652. "slide-left": {
  12653. inKeyframes: a_e,
  12654. outKeyframes: o_e
  12655. },
  12656. "slide-right": {
  12657. inKeyframes: s_e,
  12658. outKeyframes: l_e
  12659. }
  12660. }, Ch = (t, e) => {
  12661. const {
  12662. antCls: n
  12663. } = t, r = `${n}-${e}`, {
  12664. inKeyframes: i,
  12665. outKeyframes: a
  12666. } = u_e[e];
  12667. return [lx(r, i, a, t.motionDurationMid), {
  12668. [`
  12669. ${r}-enter,
  12670. ${r}-appear
  12671. `]: {
  12672. transform: "scale(0)",
  12673. transformOrigin: "0% 0%",
  12674. opacity: 0,
  12675. animationTimingFunction: t.motionEaseOutQuint
  12676. },
  12677. [`${r}-leave`]: {
  12678. animationTimingFunction: t.motionEaseInQuint
  12679. }
  12680. }];
  12681. }, qI = new Ot("antZoomIn", {
  12682. "0%": {
  12683. transform: "scale(0.2)",
  12684. opacity: 0
  12685. },
  12686. "100%": {
  12687. transform: "scale(1)",
  12688. opacity: 1
  12689. }
  12690. }), c_e = new Ot("antZoomOut", {
  12691. "0%": {
  12692. transform: "scale(1)"
  12693. },
  12694. "100%": {
  12695. transform: "scale(0.2)",
  12696. opacity: 0
  12697. }
  12698. }), HN = new Ot("antZoomBigIn", {
  12699. "0%": {
  12700. transform: "scale(0.8)",
  12701. opacity: 0
  12702. },
  12703. "100%": {
  12704. transform: "scale(1)",
  12705. opacity: 1
  12706. }
  12707. }), GN = new Ot("antZoomBigOut", {
  12708. "0%": {
  12709. transform: "scale(1)"
  12710. },
  12711. "100%": {
  12712. transform: "scale(0.8)",
  12713. opacity: 0
  12714. }
  12715. }), f_e = new Ot("antZoomUpIn", {
  12716. "0%": {
  12717. transform: "scale(0.8)",
  12718. transformOrigin: "50% 0%",
  12719. opacity: 0
  12720. },
  12721. "100%": {
  12722. transform: "scale(1)",
  12723. transformOrigin: "50% 0%"
  12724. }
  12725. }), d_e = new Ot("antZoomUpOut", {
  12726. "0%": {
  12727. transform: "scale(1)",
  12728. transformOrigin: "50% 0%"
  12729. },
  12730. "100%": {
  12731. transform: "scale(0.8)",
  12732. transformOrigin: "50% 0%",
  12733. opacity: 0
  12734. }
  12735. }), h_e = new Ot("antZoomLeftIn", {
  12736. "0%": {
  12737. transform: "scale(0.8)",
  12738. transformOrigin: "0% 50%",
  12739. opacity: 0
  12740. },
  12741. "100%": {
  12742. transform: "scale(1)",
  12743. transformOrigin: "0% 50%"
  12744. }
  12745. }), p_e = new Ot("antZoomLeftOut", {
  12746. "0%": {
  12747. transform: "scale(1)",
  12748. transformOrigin: "0% 50%"
  12749. },
  12750. "100%": {
  12751. transform: "scale(0.8)",
  12752. transformOrigin: "0% 50%",
  12753. opacity: 0
  12754. }
  12755. }), v_e = new Ot("antZoomRightIn", {
  12756. "0%": {
  12757. transform: "scale(0.8)",
  12758. transformOrigin: "100% 50%",
  12759. opacity: 0
  12760. },
  12761. "100%": {
  12762. transform: "scale(1)",
  12763. transformOrigin: "100% 50%"
  12764. }
  12765. }), g_e = new Ot("antZoomRightOut", {
  12766. "0%": {
  12767. transform: "scale(1)",
  12768. transformOrigin: "100% 50%"
  12769. },
  12770. "100%": {
  12771. transform: "scale(0.8)",
  12772. transformOrigin: "100% 50%",
  12773. opacity: 0
  12774. }
  12775. }), m_e = new Ot("antZoomDownIn", {
  12776. "0%": {
  12777. transform: "scale(0.8)",
  12778. transformOrigin: "50% 100%",
  12779. opacity: 0
  12780. },
  12781. "100%": {
  12782. transform: "scale(1)",
  12783. transformOrigin: "50% 100%"
  12784. }
  12785. }), y_e = new Ot("antZoomDownOut", {
  12786. "0%": {
  12787. transform: "scale(1)",
  12788. transformOrigin: "50% 100%"
  12789. },
  12790. "100%": {
  12791. transform: "scale(0.8)",
  12792. transformOrigin: "50% 100%",
  12793. opacity: 0
  12794. }
  12795. }), b_e = {
  12796. zoom: {
  12797. inKeyframes: qI,
  12798. outKeyframes: c_e
  12799. },
  12800. "zoom-big": {
  12801. inKeyframes: HN,
  12802. outKeyframes: GN
  12803. },
  12804. "zoom-big-fast": {
  12805. inKeyframes: HN,
  12806. outKeyframes: GN
  12807. },
  12808. "zoom-left": {
  12809. inKeyframes: h_e,
  12810. outKeyframes: p_e
  12811. },
  12812. "zoom-right": {
  12813. inKeyframes: v_e,
  12814. outKeyframes: g_e
  12815. },
  12816. "zoom-up": {
  12817. inKeyframes: f_e,
  12818. outKeyframes: d_e
  12819. },
  12820. "zoom-down": {
  12821. inKeyframes: m_e,
  12822. outKeyframes: y_e
  12823. }
  12824. }, ux = (t, e) => {
  12825. const {
  12826. antCls: n
  12827. } = t, r = `${n}-${e}`, {
  12828. inKeyframes: i,
  12829. outKeyframes: a
  12830. } = b_e[e];
  12831. return [lx(r, i, a, e === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
  12832. [`
  12833. ${r}-enter,
  12834. ${r}-appear
  12835. `]: {
  12836. transform: "scale(0)",
  12837. opacity: 0,
  12838. animationTimingFunction: t.motionEaseOutCirc,
  12839. "&-prepare": {
  12840. transform: "none"
  12841. }
  12842. },
  12843. [`${r}-leave`]: {
  12844. animationTimingFunction: t.motionEaseInOutCirc
  12845. }
  12846. }];
  12847. }, KI = (t) => ({
  12848. [t.componentCls]: {
  12849. // For common/openAnimation
  12850. [`${t.antCls}-motion-collapse-legacy`]: {
  12851. overflow: "hidden",
  12852. "&-active": {
  12853. transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
  12854. opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
  12855. }
  12856. },
  12857. [`${t.antCls}-motion-collapse`]: {
  12858. overflow: "hidden",
  12859. transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
  12860. opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
  12861. }
  12862. }
  12863. }), jN = (t) => {
  12864. const {
  12865. controlPaddingHorizontal: e
  12866. } = t;
  12867. return {
  12868. position: "relative",
  12869. display: "block",
  12870. minHeight: t.controlHeight,
  12871. padding: `${(t.controlHeight - t.fontSize * t.lineHeight) / 2}px ${e}px`,
  12872. color: t.colorText,
  12873. fontWeight: "normal",
  12874. fontSize: t.fontSize,
  12875. lineHeight: t.lineHeight,
  12876. boxSizing: "border-box"
  12877. };
  12878. }, __e = (t) => {
  12879. const {
  12880. antCls: e,
  12881. componentCls: n
  12882. } = t, r = `${n}-item`;
  12883. return [
  12884. {
  12885. [`${n}-dropdown`]: I(I({}, nn(t)), {
  12886. position: "absolute",
  12887. top: -9999,
  12888. zIndex: t.zIndexPopup,
  12889. boxSizing: "border-box",
  12890. padding: t.paddingXXS,
  12891. overflow: "hidden",
  12892. fontSize: t.fontSize,
  12893. // Fix select render lag of long text in chrome
  12894. // https://github.com/ant-design/ant-design/issues/11456
  12895. // https://github.com/ant-design/ant-design/issues/11843
  12896. fontVariant: "initial",
  12897. backgroundColor: t.colorBgElevated,
  12898. borderRadius: t.borderRadiusLG,
  12899. outline: "none",
  12900. boxShadow: t.boxShadowSecondary,
  12901. [`
  12902. &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
  12903. &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
  12904. `]: {
  12905. animationName: PU
  12906. },
  12907. [`
  12908. &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft,
  12909. &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft
  12910. `]: {
  12911. animationName: AU
  12912. },
  12913. [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
  12914. animationName: $U
  12915. },
  12916. [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
  12917. animationName: EU
  12918. },
  12919. "&-hidden": {
  12920. display: "none"
  12921. },
  12922. "&-empty": {
  12923. color: t.colorTextDisabled
  12924. },
  12925. // ========================= Options =========================
  12926. [`${r}-empty`]: I(I({}, jN(t)), {
  12927. color: t.colorTextDisabled
  12928. }),
  12929. [`${r}`]: I(I({}, jN(t)), {
  12930. cursor: "pointer",
  12931. transition: `background ${t.motionDurationSlow} ease`,
  12932. borderRadius: t.borderRadiusSM,
  12933. // =========== Group ============
  12934. "&-group": {
  12935. color: t.colorTextDescription,
  12936. fontSize: t.fontSizeSM,
  12937. cursor: "default"
  12938. },
  12939. // =========== Option ===========
  12940. "&-option": {
  12941. display: "flex",
  12942. "&-content": I({
  12943. flex: "auto"
  12944. }, mh),
  12945. "&-state": {
  12946. flex: "none"
  12947. },
  12948. [`&-active:not(${r}-option-disabled)`]: {
  12949. backgroundColor: t.controlItemBgHover
  12950. },
  12951. [`&-selected:not(${r}-option-disabled)`]: {
  12952. color: t.colorText,
  12953. fontWeight: t.fontWeightStrong,
  12954. backgroundColor: t.controlItemBgActive,
  12955. [`${r}-option-state`]: {
  12956. color: t.colorPrimary
  12957. }
  12958. },
  12959. "&-disabled": {
  12960. [`&${r}-option-selected`]: {
  12961. backgroundColor: t.colorBgContainerDisabled
  12962. },
  12963. color: t.colorTextDisabled,
  12964. cursor: "not-allowed"
  12965. },
  12966. "&-grouped": {
  12967. paddingInlineStart: t.controlPaddingHorizontal * 2
  12968. }
  12969. }
  12970. }),
  12971. // =========================== RTL ===========================
  12972. "&-rtl": {
  12973. direction: "rtl"
  12974. }
  12975. })
  12976. },
  12977. // Follow code may reuse in other components
  12978. Ch(t, "slide-up"),
  12979. Ch(t, "slide-down"),
  12980. QN(t, "move-up"),
  12981. QN(t, "move-down")
  12982. ];
  12983. }, Uf = 2;
  12984. function MU(t) {
  12985. let {
  12986. controlHeightSM: e,
  12987. controlHeight: n,
  12988. lineWidth: r
  12989. } = t;
  12990. const i = (n - e) / 2 - r, a = Math.ceil(i / 2);
  12991. return [i, a];
  12992. }
  12993. function bC(t, e) {
  12994. const {
  12995. componentCls: n,
  12996. iconCls: r
  12997. } = t, i = `${n}-selection-overflow`, a = t.controlHeightSM, [o] = MU(t), s = e ? `${n}-${e}` : "";
  12998. return {
  12999. [`${n}-multiple${s}`]: {
  13000. fontSize: t.fontSize,
  13001. /**
  13002. * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
  13003. * may update to redesign with its align logic.
  13004. */
  13005. // =========================== Overflow ===========================
  13006. [i]: {
  13007. position: "relative",
  13008. display: "flex",
  13009. flex: "auto",
  13010. flexWrap: "wrap",
  13011. maxWidth: "100%",
  13012. "&-item": {
  13013. flex: "none",
  13014. alignSelf: "center",
  13015. maxWidth: "100%",
  13016. display: "inline-flex"
  13017. }
  13018. },
  13019. // ========================= Selector =========================
  13020. [`${n}-selector`]: {
  13021. display: "flex",
  13022. flexWrap: "wrap",
  13023. alignItems: "center",
  13024. // Multiple is little different that horizontal is follow the vertical
  13025. padding: `${o - Uf}px ${Uf * 2}px`,
  13026. borderRadius: t.borderRadius,
  13027. [`${n}-show-search&`]: {
  13028. cursor: "text"
  13029. },
  13030. [`${n}-disabled&`]: {
  13031. background: t.colorBgContainerDisabled,
  13032. cursor: "not-allowed"
  13033. },
  13034. "&:after": {
  13035. display: "inline-block",
  13036. width: 0,
  13037. margin: `${Uf}px 0`,
  13038. lineHeight: `${a}px`,
  13039. content: '"\\a0"'
  13040. }
  13041. },
  13042. [`
  13043. &${n}-show-arrow ${n}-selector,
  13044. &${n}-allow-clear ${n}-selector
  13045. `]: {
  13046. paddingInlineEnd: t.fontSizeIcon + t.controlPaddingHorizontal
  13047. },
  13048. // ======================== Selections ========================
  13049. [`${n}-selection-item`]: {
  13050. position: "relative",
  13051. display: "flex",
  13052. flex: "none",
  13053. boxSizing: "border-box",
  13054. maxWidth: "100%",
  13055. height: a,
  13056. marginTop: Uf,
  13057. marginBottom: Uf,
  13058. lineHeight: `${a - t.lineWidth * 2}px`,
  13059. background: t.colorFillSecondary,
  13060. border: `${t.lineWidth}px solid ${t.colorSplit}`,
  13061. borderRadius: t.borderRadiusSM,
  13062. cursor: "default",
  13063. transition: `font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,
  13064. userSelect: "none",
  13065. marginInlineEnd: Uf * 2,
  13066. paddingInlineStart: t.paddingXS,
  13067. paddingInlineEnd: t.paddingXS / 2,
  13068. [`${n}-disabled&`]: {
  13069. color: t.colorTextDisabled,
  13070. borderColor: t.colorBorder,
  13071. cursor: "not-allowed"
  13072. },
  13073. // It's ok not to do this, but 24px makes bottom narrow in view should adjust
  13074. "&-content": {
  13075. display: "inline-block",
  13076. marginInlineEnd: t.paddingXS / 2,
  13077. overflow: "hidden",
  13078. whiteSpace: "pre",
  13079. textOverflow: "ellipsis"
  13080. },
  13081. "&-remove": I(I({}, ip()), {
  13082. display: "inline-block",
  13083. color: t.colorIcon,
  13084. fontWeight: "bold",
  13085. fontSize: 10,
  13086. lineHeight: "inherit",
  13087. cursor: "pointer",
  13088. [`> ${r}`]: {
  13089. verticalAlign: "-0.2em"
  13090. },
  13091. "&:hover": {
  13092. color: t.colorIconHover
  13093. }
  13094. })
  13095. },
  13096. // ========================== Input ==========================
  13097. [`${i}-item + ${i}-item`]: {
  13098. [`${n}-selection-search`]: {
  13099. marginInlineStart: 0
  13100. }
  13101. },
  13102. [`${n}-selection-search`]: {
  13103. display: "inline-flex",
  13104. position: "relative",
  13105. maxWidth: "100%",
  13106. marginInlineStart: t.inputPaddingHorizontalBase - o,
  13107. "\n &-input,\n &-mirror\n ": {
  13108. height: a,
  13109. fontFamily: t.fontFamily,
  13110. lineHeight: `${a}px`,
  13111. transition: `all ${t.motionDurationSlow}`
  13112. },
  13113. "&-input": {
  13114. width: "100%",
  13115. minWidth: 4.1
  13116. // fix search cursor missing
  13117. },
  13118. "&-mirror": {
  13119. position: "absolute",
  13120. top: 0,
  13121. insetInlineStart: 0,
  13122. insetInlineEnd: "auto",
  13123. zIndex: 999,
  13124. whiteSpace: "pre",
  13125. visibility: "hidden"
  13126. }
  13127. },
  13128. // ======================= Placeholder =======================
  13129. [`${n}-selection-placeholder `]: {
  13130. position: "absolute",
  13131. top: "50%",
  13132. insetInlineStart: t.inputPaddingHorizontalBase,
  13133. insetInlineEnd: t.inputPaddingHorizontalBase,
  13134. transform: "translateY(-50%)",
  13135. transition: `all ${t.motionDurationSlow}`
  13136. }
  13137. }
  13138. };
  13139. }
  13140. function O_e(t) {
  13141. const {
  13142. componentCls: e
  13143. } = t, n = Bt(t, {
  13144. controlHeight: t.controlHeightSM,
  13145. controlHeightSM: t.controlHeightXS,
  13146. borderRadius: t.borderRadiusSM,
  13147. borderRadiusSM: t.borderRadiusXS
  13148. }), [, r] = MU(t);
  13149. return [
  13150. bC(t),
  13151. // ======================== Small ========================
  13152. // Shared
  13153. bC(n, "sm"),
  13154. // Padding
  13155. {
  13156. [`${e}-multiple${e}-sm`]: {
  13157. [`${e}-selection-placeholder`]: {
  13158. insetInlineStart: t.controlPaddingHorizontalSM - t.lineWidth,
  13159. insetInlineEnd: "auto"
  13160. },
  13161. // https://github.com/ant-design/ant-design/issues/29559
  13162. [`${e}-selection-search`]: {
  13163. marginInlineStart: r
  13164. }
  13165. }
  13166. },
  13167. // ======================== Large ========================
  13168. // Shared
  13169. bC(Bt(t, {
  13170. fontSize: t.fontSizeLG,
  13171. controlHeight: t.controlHeightLG,
  13172. controlHeightSM: t.controlHeight,
  13173. borderRadius: t.borderRadiusLG,
  13174. borderRadiusSM: t.borderRadius
  13175. }), "lg")
  13176. ];
  13177. }
  13178. function _C(t, e) {
  13179. const {
  13180. componentCls: n,
  13181. inputPaddingHorizontalBase: r,
  13182. borderRadius: i
  13183. } = t, a = t.controlHeight - t.lineWidth * 2, o = Math.ceil(t.fontSize * 1.25), s = e ? `${n}-${e}` : "";
  13184. return {
  13185. [`${n}-single${s}`]: {
  13186. fontSize: t.fontSize,
  13187. // ========================= Selector =========================
  13188. [`${n}-selector`]: I(I({}, nn(t)), {
  13189. display: "flex",
  13190. borderRadius: i,
  13191. [`${n}-selection-search`]: {
  13192. position: "absolute",
  13193. top: 0,
  13194. insetInlineStart: r,
  13195. insetInlineEnd: r,
  13196. bottom: 0,
  13197. "&-input": {
  13198. width: "100%"
  13199. }
  13200. },
  13201. [`
  13202. ${n}-selection-item,
  13203. ${n}-selection-placeholder
  13204. `]: {
  13205. padding: 0,
  13206. lineHeight: `${a}px`,
  13207. transition: `all ${t.motionDurationSlow}`,
  13208. // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
  13209. "@supports (-moz-appearance: meterbar)": {
  13210. lineHeight: `${a}px`
  13211. }
  13212. },
  13213. [`${n}-selection-item`]: {
  13214. position: "relative",
  13215. userSelect: "none"
  13216. },
  13217. [`${n}-selection-placeholder`]: {
  13218. transition: "none",
  13219. pointerEvents: "none"
  13220. },
  13221. // For common baseline align
  13222. [[
  13223. "&:after",
  13224. /* For '' value baseline align */
  13225. `${n}-selection-item:after`,
  13226. /* For undefined value baseline align */
  13227. `${n}-selection-placeholder:after`
  13228. ].join(",")]: {
  13229. display: "inline-block",
  13230. width: 0,
  13231. visibility: "hidden",
  13232. content: '"\\a0"'
  13233. }
  13234. }),
  13235. [`
  13236. &${n}-show-arrow ${n}-selection-item,
  13237. &${n}-show-arrow ${n}-selection-placeholder
  13238. `]: {
  13239. paddingInlineEnd: o
  13240. },
  13241. // Opacity selection if open
  13242. [`&${n}-open ${n}-selection-item`]: {
  13243. color: t.colorTextPlaceholder
  13244. },
  13245. // ========================== Input ==========================
  13246. // We only change the style of non-customize input which is only support by `combobox` mode.
  13247. // Not customize
  13248. [`&:not(${n}-customize-input)`]: {
  13249. [`${n}-selector`]: {
  13250. width: "100%",
  13251. height: t.controlHeight,
  13252. padding: `0 ${r}px`,
  13253. [`${n}-selection-search-input`]: {
  13254. height: a
  13255. },
  13256. "&:after": {
  13257. lineHeight: `${a}px`
  13258. }
  13259. }
  13260. },
  13261. [`&${n}-customize-input`]: {
  13262. [`${n}-selector`]: {
  13263. "&:after": {
  13264. display: "none"
  13265. },
  13266. [`${n}-selection-search`]: {
  13267. position: "static",
  13268. width: "100%"
  13269. },
  13270. [`${n}-selection-placeholder`]: {
  13271. position: "absolute",
  13272. insetInlineStart: 0,
  13273. insetInlineEnd: 0,
  13274. padding: `0 ${r}px`,
  13275. "&:after": {
  13276. display: "none"
  13277. }
  13278. }
  13279. }
  13280. }
  13281. }
  13282. };
  13283. }
  13284. function S_e(t) {
  13285. const {
  13286. componentCls: e
  13287. } = t, n = t.controlPaddingHorizontalSM - t.lineWidth;
  13288. return [
  13289. _C(t),
  13290. // ======================== Small ========================
  13291. // Shared
  13292. _C(Bt(t, {
  13293. controlHeight: t.controlHeightSM,
  13294. borderRadius: t.borderRadiusSM
  13295. }), "sm"),
  13296. // padding
  13297. {
  13298. [`${e}-single${e}-sm`]: {
  13299. [`&:not(${e}-customize-input)`]: {
  13300. [`${e}-selection-search`]: {
  13301. insetInlineStart: n,
  13302. insetInlineEnd: n
  13303. },
  13304. [`${e}-selector`]: {
  13305. padding: `0 ${n}px`
  13306. },
  13307. // With arrow should provides `padding-right` to show the arrow
  13308. [`&${e}-show-arrow ${e}-selection-search`]: {
  13309. insetInlineEnd: n + t.fontSize * 1.5
  13310. },
  13311. [`
  13312. &${e}-show-arrow ${e}-selection-item,
  13313. &${e}-show-arrow ${e}-selection-placeholder
  13314. `]: {
  13315. paddingInlineEnd: t.fontSize * 1.5
  13316. }
  13317. }
  13318. }
  13319. },
  13320. // ======================== Large ========================
  13321. // Shared
  13322. _C(Bt(t, {
  13323. controlHeight: t.controlHeightLG,
  13324. fontSize: t.fontSizeLG,
  13325. borderRadius: t.borderRadiusLG
  13326. }), "lg")
  13327. ];
  13328. }
  13329. function x_e(t, e, n) {
  13330. const {
  13331. focusElCls: r,
  13332. focus: i,
  13333. borderElCls: a
  13334. } = n, o = a ? "> *" : "", s = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((l) => `&:${l} ${o}`).join(",");
  13335. return {
  13336. [`&-item:not(${e}-last-item)`]: {
  13337. marginInlineEnd: -t.lineWidth
  13338. },
  13339. "&-item": I(I({
  13340. [s]: {
  13341. zIndex: 2
  13342. }
  13343. }, r ? {
  13344. [`&${r}`]: {
  13345. zIndex: 2
  13346. }
  13347. } : {}), {
  13348. [`&[disabled] ${o}`]: {
  13349. zIndex: 0
  13350. }
  13351. })
  13352. };
  13353. }
  13354. function w_e(t, e, n) {
  13355. const {
  13356. borderElCls: r
  13357. } = n, i = r ? `> ${r}` : "";
  13358. return {
  13359. [`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]: {
  13360. borderRadius: 0
  13361. },
  13362. [`&-item:not(${e}-last-item)${e}-first-item`]: {
  13363. [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
  13364. borderStartEndRadius: 0,
  13365. borderEndEndRadius: 0
  13366. }
  13367. },
  13368. [`&-item:not(${e}-first-item)${e}-last-item`]: {
  13369. [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
  13370. borderStartStartRadius: 0,
  13371. borderEndStartRadius: 0
  13372. }
  13373. }
  13374. };
  13375. }
  13376. function cx(t) {
  13377. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
  13378. focus: !0
  13379. };
  13380. const {
  13381. componentCls: n
  13382. } = t, r = `${n}-compact`;
  13383. return {
  13384. [r]: I(I({}, x_e(t, r, e)), w_e(n, r, e))
  13385. };
  13386. }
  13387. const C_e = (t) => {
  13388. const {
  13389. componentCls: e
  13390. } = t;
  13391. return {
  13392. position: "relative",
  13393. backgroundColor: t.colorBgContainer,
  13394. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  13395. transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
  13396. input: {
  13397. cursor: "pointer"
  13398. },
  13399. [`${e}-show-search&`]: {
  13400. cursor: "text",
  13401. input: {
  13402. cursor: "auto",
  13403. color: "inherit"
  13404. }
  13405. },
  13406. [`${e}-disabled&`]: {
  13407. color: t.colorTextDisabled,
  13408. background: t.colorBgContainerDisabled,
  13409. cursor: "not-allowed",
  13410. [`${e}-multiple&`]: {
  13411. background: t.colorBgContainerDisabled
  13412. },
  13413. input: {
  13414. cursor: "not-allowed"
  13415. }
  13416. }
  13417. };
  13418. }, OC = function(t, e) {
  13419. let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  13420. const {
  13421. componentCls: r,
  13422. borderHoverColor: i,
  13423. outlineColor: a,
  13424. antCls: o
  13425. } = e, s = n ? {
  13426. [`${r}-selector`]: {
  13427. borderColor: i
  13428. }
  13429. } : {};
  13430. return {
  13431. [t]: {
  13432. [`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]: I(I({}, s), {
  13433. [`${r}-focused& ${r}-selector`]: {
  13434. borderColor: i,
  13435. boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${a}`,
  13436. borderInlineEndWidth: `${e.controlLineWidth}px !important`,
  13437. outline: 0
  13438. },
  13439. [`&:hover ${r}-selector`]: {
  13440. borderColor: i,
  13441. borderInlineEndWidth: `${e.controlLineWidth}px !important`
  13442. }
  13443. })
  13444. }
  13445. };
  13446. }, T_e = (t) => {
  13447. const {
  13448. componentCls: e
  13449. } = t;
  13450. return {
  13451. [`${e}-selection-search-input`]: {
  13452. margin: 0,
  13453. padding: 0,
  13454. background: "transparent",
  13455. border: "none",
  13456. outline: "none",
  13457. appearance: "none",
  13458. "&::-webkit-search-cancel-button": {
  13459. display: "none",
  13460. "-webkit-appearance": "none"
  13461. }
  13462. }
  13463. };
  13464. }, P_e = (t) => {
  13465. const {
  13466. componentCls: e,
  13467. inputPaddingHorizontalBase: n,
  13468. iconCls: r
  13469. } = t;
  13470. return {
  13471. [e]: I(I({}, nn(t)), {
  13472. position: "relative",
  13473. display: "inline-block",
  13474. cursor: "pointer",
  13475. [`&:not(${e}-customize-input) ${e}-selector`]: I(I({}, C_e(t)), T_e(t)),
  13476. // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
  13477. // ...genHoverStyle(token),
  13478. // },
  13479. // ======================== Selection ========================
  13480. [`${e}-selection-item`]: I({
  13481. flex: 1,
  13482. fontWeight: "normal"
  13483. }, mh),
  13484. // ======================= Placeholder =======================
  13485. [`${e}-selection-placeholder`]: I(I({}, mh), {
  13486. flex: 1,
  13487. color: t.colorTextPlaceholder,
  13488. pointerEvents: "none"
  13489. }),
  13490. // ========================== Arrow ==========================
  13491. [`${e}-arrow`]: I(I({}, ip()), {
  13492. position: "absolute",
  13493. top: "50%",
  13494. insetInlineStart: "auto",
  13495. insetInlineEnd: n,
  13496. height: t.fontSizeIcon,
  13497. marginTop: -t.fontSizeIcon / 2,
  13498. color: t.colorTextQuaternary,
  13499. fontSize: t.fontSizeIcon,
  13500. lineHeight: 1,
  13501. textAlign: "center",
  13502. pointerEvents: "none",
  13503. display: "flex",
  13504. alignItems: "center",
  13505. [r]: {
  13506. verticalAlign: "top",
  13507. transition: `transform ${t.motionDurationSlow}`,
  13508. "> svg": {
  13509. verticalAlign: "top"
  13510. },
  13511. [`&:not(${e}-suffix)`]: {
  13512. pointerEvents: "auto"
  13513. }
  13514. },
  13515. [`${e}-disabled &`]: {
  13516. cursor: "not-allowed"
  13517. },
  13518. "> *:not(:last-child)": {
  13519. marginInlineEnd: 8
  13520. // FIXME: magic
  13521. }
  13522. }),
  13523. // ========================== Clear ==========================
  13524. [`${e}-clear`]: {
  13525. position: "absolute",
  13526. top: "50%",
  13527. insetInlineStart: "auto",
  13528. insetInlineEnd: n,
  13529. zIndex: 1,
  13530. display: "inline-block",
  13531. width: t.fontSizeIcon,
  13532. height: t.fontSizeIcon,
  13533. marginTop: -t.fontSizeIcon / 2,
  13534. color: t.colorTextQuaternary,
  13535. fontSize: t.fontSizeIcon,
  13536. fontStyle: "normal",
  13537. lineHeight: 1,
  13538. textAlign: "center",
  13539. textTransform: "none",
  13540. background: t.colorBgContainer,
  13541. cursor: "pointer",
  13542. opacity: 0,
  13543. transition: `color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,
  13544. textRendering: "auto",
  13545. "&:before": {
  13546. display: "block"
  13547. },
  13548. "&:hover": {
  13549. color: t.colorTextTertiary
  13550. }
  13551. },
  13552. "&:hover": {
  13553. [`${e}-clear`]: {
  13554. opacity: 1
  13555. }
  13556. }
  13557. }),
  13558. // ========================= Feedback ==========================
  13559. [`${e}-has-feedback`]: {
  13560. [`${e}-clear`]: {
  13561. insetInlineEnd: n + t.fontSize + t.paddingXXS
  13562. }
  13563. }
  13564. };
  13565. }, $_e = (t) => {
  13566. const {
  13567. componentCls: e
  13568. } = t;
  13569. return [
  13570. {
  13571. [e]: {
  13572. // ==================== BorderLess ====================
  13573. [`&-borderless ${e}-selector`]: {
  13574. backgroundColor: "transparent !important",
  13575. borderColor: "transparent !important",
  13576. boxShadow: "none !important"
  13577. },
  13578. // ==================== In Form ====================
  13579. [`&${e}-in-form-item`]: {
  13580. width: "100%"
  13581. }
  13582. }
  13583. },
  13584. // =====================================================
  13585. // == LTR ==
  13586. // =====================================================
  13587. // Base
  13588. P_e(t),
  13589. // Single
  13590. S_e(t),
  13591. // Multiple
  13592. O_e(t),
  13593. // Dropdown
  13594. __e(t),
  13595. // =====================================================
  13596. // == RTL ==
  13597. // =====================================================
  13598. {
  13599. [`${e}-rtl`]: {
  13600. direction: "rtl"
  13601. }
  13602. },
  13603. // =====================================================
  13604. // == Status ==
  13605. // =====================================================
  13606. OC(e, Bt(t, {
  13607. borderHoverColor: t.colorPrimaryHover,
  13608. outlineColor: t.controlOutline
  13609. })),
  13610. OC(`${e}-status-error`, Bt(t, {
  13611. borderHoverColor: t.colorErrorHover,
  13612. outlineColor: t.colorErrorOutline
  13613. }), !0),
  13614. OC(`${e}-status-warning`, Bt(t, {
  13615. borderHoverColor: t.colorWarningHover,
  13616. outlineColor: t.colorWarningOutline
  13617. }), !0),
  13618. // =====================================================
  13619. // == Space Compact ==
  13620. // =====================================================
  13621. cx(t, {
  13622. borderElCls: `${e}-selector`,
  13623. focusElCls: `${e}-focused`
  13624. })
  13625. ];
  13626. }, A_e = Sn("Select", (t, e) => {
  13627. let {
  13628. rootPrefixCls: n
  13629. } = e;
  13630. const r = Bt(t, {
  13631. rootPrefixCls: n,
  13632. inputPaddingHorizontalBase: t.paddingSM - 1
  13633. });
  13634. return [$_e(r)];
  13635. }, (t) => ({
  13636. zIndexPopup: t.zIndexPopupBase + 50
  13637. })), E_e = () => I(I({}, or(QZ(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  13638. value: gn([Array, Object, String, Number]),
  13639. defaultValue: gn([Array, Object, String, Number]),
  13640. notFoundContent: Y.any,
  13641. suffixIcon: Y.any,
  13642. itemIcon: Y.any,
  13643. size: hn(),
  13644. mode: hn(),
  13645. bordered: nt(!0),
  13646. transitionName: String,
  13647. choiceTransitionName: hn(""),
  13648. popupClassName: String,
  13649. /** @deprecated Please use `popupClassName` instead */
  13650. dropdownClassName: String,
  13651. placement: hn(),
  13652. status: hn(),
  13653. "onUpdate:value": tt()
  13654. }), ZN = "SECRET_COMBOBOX_MODE_DO_NOT_USE", ci = te({
  13655. compatConfig: {
  13656. MODE: 3
  13657. },
  13658. name: "ASelect",
  13659. Option: DI,
  13660. OptGroup: RI,
  13661. inheritAttrs: !1,
  13662. props: sr(E_e(), {
  13663. listHeight: 256,
  13664. listItemHeight: 24
  13665. }),
  13666. SECRET_COMBOBOX_MODE_DO_NOT_USE: ZN,
  13667. slots: Object,
  13668. setup(t, e) {
  13669. let {
  13670. attrs: n,
  13671. emit: r,
  13672. slots: i,
  13673. expose: a
  13674. } = e;
  13675. const o = U(), s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), c = () => {
  13676. var Q;
  13677. (Q = o.value) === null || Q === void 0 || Q.focus();
  13678. }, f = () => {
  13679. var Q;
  13680. (Q = o.value) === null || Q === void 0 || Q.blur();
  13681. }, d = (Q) => {
  13682. var Z;
  13683. (Z = o.value) === null || Z === void 0 || Z.scrollTo(Q);
  13684. }, h = L(() => {
  13685. const {
  13686. mode: Q
  13687. } = t;
  13688. if (Q !== "combobox")
  13689. return Q === ZN ? "combobox" : Q;
  13690. });
  13691. process.env.NODE_ENV !== "production" && Qi(!t.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
  13692. const {
  13693. prefixCls: p,
  13694. direction: v,
  13695. configProvider: g,
  13696. renderEmpty: m,
  13697. size: y,
  13698. getPrefixCls: b,
  13699. getPopupContainer: _,
  13700. disabled: O,
  13701. select: S
  13702. } = It("select", t), {
  13703. compactSize: x,
  13704. compactItemClassnames: C
  13705. } = sx(p, v), T = L(() => x.value || y.value), w = Ko(), P = L(() => {
  13706. var Q;
  13707. return (Q = O.value) !== null && Q !== void 0 ? Q : w.value;
  13708. }), [$, A] = A_e(p), D = L(() => b()), E = L(() => t.placement !== void 0 ? t.placement : v.value === "rtl" ? "bottomRight" : "bottomLeft"), R = L(() => es(D.value, pve(E.value), t.transitionName)), N = L(() => ye({
  13709. [`${p.value}-lg`]: T.value === "large",
  13710. [`${p.value}-sm`]: T.value === "small",
  13711. [`${p.value}-rtl`]: v.value === "rtl",
  13712. [`${p.value}-borderless`]: !t.bordered,
  13713. [`${p.value}-in-form-item`]: l.isFormItemInput
  13714. }, Is(p.value, u.value, l.hasFeedback), C.value, A.value)), V = function() {
  13715. for (var Q = arguments.length, Z = new Array(Q), ne = 0; ne < Q; ne++)
  13716. Z[ne] = arguments[ne];
  13717. r("update:value", Z[0]), r("change", ...Z), s.onFieldChange();
  13718. }, z = (Q) => {
  13719. r("blur", Q), s.onFieldBlur();
  13720. };
  13721. a({
  13722. blur: f,
  13723. focus: c,
  13724. scrollTo: d
  13725. });
  13726. const W = L(() => h.value === "multiple" || h.value === "tags"), F = L(() => t.showArrow !== void 0 ? t.showArrow : t.loading || !(W.value || h.value === "combobox"));
  13727. return () => {
  13728. var Q, Z, ne, ee;
  13729. const {
  13730. notFoundContent: oe,
  13731. listHeight: K = 256,
  13732. listItemHeight: ie = 24,
  13733. popupClassName: X,
  13734. dropdownClassName: H,
  13735. virtual: G,
  13736. dropdownMatchSelectWidth: re,
  13737. id: fe = s.id.value,
  13738. placeholder: de = (Q = i.placeholder) === null || Q === void 0 ? void 0 : Q.call(i),
  13739. showArrow: Ee
  13740. } = t, {
  13741. hasFeedback: $e,
  13742. feedbackIcon: Se
  13743. } = l;
  13744. let be;
  13745. oe !== void 0 ? be = oe : i.notFoundContent ? be = i.notFoundContent() : h.value === "combobox" ? be = null : be = (m == null ? void 0 : m("Select")) || M(cI, {
  13746. componentName: "Select"
  13747. }, null);
  13748. const {
  13749. suffixIcon: he,
  13750. itemIcon: Te,
  13751. removeIcon: ze,
  13752. clearIcon: ut
  13753. } = Eme(I(I({}, t), {
  13754. multiple: W.value,
  13755. prefixCls: p.value,
  13756. hasFeedback: $e,
  13757. feedbackIcon: Se,
  13758. showArrow: F.value
  13759. }), i), ct = or(t, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Dt = ye(X || H, {
  13760. [`${p.value}-dropdown-${v.value}`]: v.value === "rtl"
  13761. }, A.value);
  13762. return $(M(Lge, j(j(j({
  13763. ref: o,
  13764. virtual: G,
  13765. dropdownMatchSelectWidth: re
  13766. }, ct), n), {}, {
  13767. showSearch: (Z = t.showSearch) !== null && Z !== void 0 ? Z : (ne = S == null ? void 0 : S.value) === null || ne === void 0 ? void 0 : ne.showSearch,
  13768. placeholder: de,
  13769. listHeight: K,
  13770. listItemHeight: ie,
  13771. mode: h.value,
  13772. prefixCls: p.value,
  13773. direction: v.value,
  13774. inputIcon: he,
  13775. menuItemSelectedIcon: Te,
  13776. removeIcon: ze,
  13777. clearIcon: ut,
  13778. notFoundContent: be,
  13779. class: [N.value, n.class],
  13780. getPopupContainer: _ == null ? void 0 : _.value,
  13781. dropdownClassName: Dt,
  13782. onChange: V,
  13783. onBlur: z,
  13784. id: fe,
  13785. dropdownRender: ct.dropdownRender || i.dropdownRender,
  13786. transitionName: R.value,
  13787. children: (ee = i.default) === null || ee === void 0 ? void 0 : ee.call(i),
  13788. tagRender: t.tagRender || i.tagRender,
  13789. optionLabelRender: i.optionLabel,
  13790. maxTagPlaceholder: t.maxTagPlaceholder || i.maxTagPlaceholder,
  13791. showArrow: $e || Ee,
  13792. disabled: P.value
  13793. }), {
  13794. option: i.option
  13795. }));
  13796. };
  13797. }
  13798. });
  13799. ci.install = function(t) {
  13800. return t.component(ci.name, ci), t.component(ci.Option.displayName, ci.Option), t.component(ci.OptGroup.displayName, ci.OptGroup), t;
  13801. };
  13802. const M1 = ci.Option;
  13803. ci.OptGroup;
  13804. var M_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, name: "check-circle", theme: "outlined" };
  13805. function UN(t) {
  13806. for (var e = 1; e < arguments.length; e++) {
  13807. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13808. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13809. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13810. }))), r.forEach(function(i) {
  13811. I_e(t, i, n[i]);
  13812. });
  13813. }
  13814. return t;
  13815. }
  13816. function I_e(t, e, n) {
  13817. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13818. }
  13819. var JI = function(e, n) {
  13820. var r = UN({}, e, n.attrs);
  13821. return M(lt, UN({}, r, {
  13822. icon: M_e
  13823. }), null);
  13824. };
  13825. JI.displayName = "CheckCircleOutlined";
  13826. JI.inheritAttrs = !1;
  13827. var D_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, name: "exclamation-circle", theme: "outlined" };
  13828. function XN(t) {
  13829. for (var e = 1; e < arguments.length; e++) {
  13830. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13831. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13832. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13833. }))), r.forEach(function(i) {
  13834. R_e(t, i, n[i]);
  13835. });
  13836. }
  13837. return t;
  13838. }
  13839. function R_e(t, e, n) {
  13840. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13841. }
  13842. var eD = function(e, n) {
  13843. var r = XN({}, e, n.attrs);
  13844. return M(lt, XN({}, r, {
  13845. icon: D_e
  13846. }), null);
  13847. };
  13848. eD.displayName = "ExclamationCircleOutlined";
  13849. eD.inheritAttrs = !1;
  13850. var k_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, name: "info-circle", theme: "outlined" };
  13851. function YN(t) {
  13852. for (var e = 1; e < arguments.length; e++) {
  13853. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13854. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13855. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13856. }))), r.forEach(function(i) {
  13857. L_e(t, i, n[i]);
  13858. });
  13859. }
  13860. return t;
  13861. }
  13862. function L_e(t, e, n) {
  13863. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13864. }
  13865. var fx = function(e, n) {
  13866. var r = YN({}, e, n.attrs);
  13867. return M(lt, YN({}, r, {
  13868. icon: k_e
  13869. }), null);
  13870. };
  13871. fx.displayName = "InfoCircleOutlined";
  13872. fx.inheritAttrs = !1;
  13873. var N_e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, name: "close-circle", theme: "outlined" };
  13874. function qN(t) {
  13875. for (var e = 1; e < arguments.length; e++) {
  13876. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13877. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13878. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13879. }))), r.forEach(function(i) {
  13880. B_e(t, i, n[i]);
  13881. });
  13882. }
  13883. return t;
  13884. }
  13885. function B_e(t, e, n) {
  13886. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13887. }
  13888. var tD = function(e, n) {
  13889. var r = qN({}, e, n.attrs);
  13890. return M(lt, qN({}, r, {
  13891. icon: N_e
  13892. }), null);
  13893. };
  13894. tD.displayName = "CloseCircleOutlined";
  13895. tD.inheritAttrs = !1;
  13896. var z_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
  13897. function KN(t) {
  13898. for (var e = 1; e < arguments.length; e++) {
  13899. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13900. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13901. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13902. }))), r.forEach(function(i) {
  13903. V_e(t, i, n[i]);
  13904. });
  13905. }
  13906. return t;
  13907. }
  13908. function V_e(t, e, n) {
  13909. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13910. }
  13911. var Ou = function(e, n) {
  13912. var r = KN({}, e, n.attrs);
  13913. return M(lt, KN({}, r, {
  13914. icon: z_e
  13915. }), null);
  13916. };
  13917. Ou.displayName = "CheckCircleFilled";
  13918. Ou.inheritAttrs = !1;
  13919. var F_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" };
  13920. function JN(t) {
  13921. for (var e = 1; e < arguments.length; e++) {
  13922. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13923. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13924. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13925. }))), r.forEach(function(i) {
  13926. W_e(t, i, n[i]);
  13927. });
  13928. }
  13929. return t;
  13930. }
  13931. function W_e(t, e, n) {
  13932. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13933. }
  13934. var Su = function(e, n) {
  13935. var r = JN({}, e, n.attrs);
  13936. return M(lt, JN({}, r, {
  13937. icon: F_e
  13938. }), null);
  13939. };
  13940. Su.displayName = "ExclamationCircleFilled";
  13941. Su.inheritAttrs = !1;
  13942. var Q_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" };
  13943. function e5(t) {
  13944. for (var e = 1; e < arguments.length; e++) {
  13945. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  13946. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  13947. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  13948. }))), r.forEach(function(i) {
  13949. H_e(t, i, n[i]);
  13950. });
  13951. }
  13952. return t;
  13953. }
  13954. function H_e(t, e, n) {
  13955. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  13956. }
  13957. var If = function(e, n) {
  13958. var r = e5({}, e, n.attrs);
  13959. return M(lt, e5({}, r, {
  13960. icon: Q_e
  13961. }), null);
  13962. };
  13963. If.displayName = "InfoCircleFilled";
  13964. If.inheritAttrs = !1;
  13965. const $y = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], G_e = (t) => ({
  13966. xs: `(max-width: ${t.screenXSMax}px)`,
  13967. sm: `(min-width: ${t.screenSM}px)`,
  13968. md: `(min-width: ${t.screenMD}px)`,
  13969. lg: `(min-width: ${t.screenLG}px)`,
  13970. xl: `(min-width: ${t.screenXL}px)`,
  13971. xxl: `(min-width: ${t.screenXXL}px)`,
  13972. xxxl: `{min-width: ${t.screenXXXL}px}`
  13973. });
  13974. function j_e() {
  13975. const [, t] = ap();
  13976. return L(() => {
  13977. const e = G_e(t.value), n = /* @__PURE__ */ new Map();
  13978. let r = -1, i = {};
  13979. return {
  13980. matchHandlers: {},
  13981. dispatch(a) {
  13982. return i = a, n.forEach((o) => o(i)), n.size >= 1;
  13983. },
  13984. subscribe(a) {
  13985. return n.size || this.register(), r += 1, n.set(r, a), a(i), r;
  13986. },
  13987. unsubscribe(a) {
  13988. n.delete(a), n.size || this.unregister();
  13989. },
  13990. unregister() {
  13991. Object.keys(e).forEach((a) => {
  13992. const o = e[a], s = this.matchHandlers[o];
  13993. s == null || s.mql.removeListener(s == null ? void 0 : s.listener);
  13994. }), n.clear();
  13995. },
  13996. register() {
  13997. Object.keys(e).forEach((a) => {
  13998. const o = e[a], s = (u) => {
  13999. let {
  14000. matches: c
  14001. } = u;
  14002. this.dispatch(I(I({}, i), {
  14003. [a]: c
  14004. }));
  14005. }, l = window.matchMedia(o);
  14006. l.addListener(s), this.matchHandlers[o] = {
  14007. mql: l,
  14008. listener: s
  14009. }, s(l);
  14010. });
  14011. },
  14012. responsiveMap: e
  14013. };
  14014. });
  14015. }
  14016. const qi = {
  14017. adjustX: 1,
  14018. adjustY: 1
  14019. }, Ki = [0, 0], IU = {
  14020. left: {
  14021. points: ["cr", "cl"],
  14022. overflow: qi,
  14023. offset: [-4, 0],
  14024. targetOffset: Ki
  14025. },
  14026. right: {
  14027. points: ["cl", "cr"],
  14028. overflow: qi,
  14029. offset: [4, 0],
  14030. targetOffset: Ki
  14031. },
  14032. top: {
  14033. points: ["bc", "tc"],
  14034. overflow: qi,
  14035. offset: [0, -4],
  14036. targetOffset: Ki
  14037. },
  14038. bottom: {
  14039. points: ["tc", "bc"],
  14040. overflow: qi,
  14041. offset: [0, 4],
  14042. targetOffset: Ki
  14043. },
  14044. topLeft: {
  14045. points: ["bl", "tl"],
  14046. overflow: qi,
  14047. offset: [0, -4],
  14048. targetOffset: Ki
  14049. },
  14050. leftTop: {
  14051. points: ["tr", "tl"],
  14052. overflow: qi,
  14053. offset: [-4, 0],
  14054. targetOffset: Ki
  14055. },
  14056. topRight: {
  14057. points: ["br", "tr"],
  14058. overflow: qi,
  14059. offset: [0, -4],
  14060. targetOffset: Ki
  14061. },
  14062. rightTop: {
  14063. points: ["tl", "tr"],
  14064. overflow: qi,
  14065. offset: [4, 0],
  14066. targetOffset: Ki
  14067. },
  14068. bottomRight: {
  14069. points: ["tr", "br"],
  14070. overflow: qi,
  14071. offset: [0, 4],
  14072. targetOffset: Ki
  14073. },
  14074. rightBottom: {
  14075. points: ["bl", "br"],
  14076. overflow: qi,
  14077. offset: [4, 0],
  14078. targetOffset: Ki
  14079. },
  14080. bottomLeft: {
  14081. points: ["tl", "bl"],
  14082. overflow: qi,
  14083. offset: [0, 4],
  14084. targetOffset: Ki
  14085. },
  14086. leftBottom: {
  14087. points: ["br", "bl"],
  14088. overflow: qi,
  14089. offset: [-4, 0],
  14090. targetOffset: Ki
  14091. }
  14092. }, Z_e = {
  14093. prefixCls: String,
  14094. id: String,
  14095. overlayInnerStyle: Y.any
  14096. }, U_e = te({
  14097. compatConfig: {
  14098. MODE: 3
  14099. },
  14100. name: "TooltipContent",
  14101. props: Z_e,
  14102. setup(t, e) {
  14103. let {
  14104. slots: n
  14105. } = e;
  14106. return () => {
  14107. var r;
  14108. return M("div", {
  14109. class: `${t.prefixCls}-inner`,
  14110. id: t.id,
  14111. role: "tooltip",
  14112. style: t.overlayInnerStyle
  14113. }, [(r = n.overlay) === null || r === void 0 ? void 0 : r.call(n)]);
  14114. };
  14115. }
  14116. });
  14117. var X_e = function(t, e) {
  14118. var n = {};
  14119. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  14120. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  14121. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  14122. return n;
  14123. };
  14124. function t5() {
  14125. }
  14126. const Y_e = te({
  14127. compatConfig: {
  14128. MODE: 3
  14129. },
  14130. name: "Tooltip",
  14131. inheritAttrs: !1,
  14132. props: {
  14133. trigger: Y.any.def(["hover"]),
  14134. defaultVisible: {
  14135. type: Boolean,
  14136. default: void 0
  14137. },
  14138. visible: {
  14139. type: Boolean,
  14140. default: void 0
  14141. },
  14142. placement: Y.string.def("right"),
  14143. transitionName: String,
  14144. animation: Y.any,
  14145. afterVisibleChange: Y.func.def(() => {
  14146. }),
  14147. overlayStyle: {
  14148. type: Object,
  14149. default: void 0
  14150. },
  14151. overlayClassName: String,
  14152. prefixCls: Y.string.def("rc-tooltip"),
  14153. mouseEnterDelay: Y.number.def(0.1),
  14154. mouseLeaveDelay: Y.number.def(0.1),
  14155. getPopupContainer: Function,
  14156. destroyTooltipOnHide: {
  14157. type: Boolean,
  14158. default: !1
  14159. },
  14160. align: Y.object.def(() => ({})),
  14161. arrowContent: Y.any.def(null),
  14162. tipId: String,
  14163. builtinPlacements: Y.object,
  14164. overlayInnerStyle: {
  14165. type: Object,
  14166. default: void 0
  14167. },
  14168. popupVisible: {
  14169. type: Boolean,
  14170. default: void 0
  14171. },
  14172. onVisibleChange: Function,
  14173. onPopupAlign: Function,
  14174. arrow: {
  14175. type: Boolean,
  14176. default: !0
  14177. }
  14178. },
  14179. setup(t, e) {
  14180. let {
  14181. slots: n,
  14182. attrs: r,
  14183. expose: i
  14184. } = e;
  14185. const a = ae(), o = () => {
  14186. const {
  14187. prefixCls: c,
  14188. tipId: f,
  14189. overlayInnerStyle: d
  14190. } = t;
  14191. return [t.arrow ? M("div", {
  14192. class: `${c}-arrow`,
  14193. key: "arrow"
  14194. }, [IS(n, t, "arrowContent")]) : null, M(U_e, {
  14195. key: "content",
  14196. prefixCls: c,
  14197. id: f,
  14198. overlayInnerStyle: d
  14199. }, {
  14200. overlay: n.overlay
  14201. })];
  14202. };
  14203. i({
  14204. getPopupDomNode: () => a.value.getPopupDomNode(),
  14205. triggerDOM: a,
  14206. forcePopupAlign: () => {
  14207. var c;
  14208. return (c = a.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
  14209. }
  14210. });
  14211. const l = ae(!1), u = ae(!1);
  14212. return ht(() => {
  14213. const {
  14214. destroyTooltipOnHide: c
  14215. } = t;
  14216. if (typeof c == "boolean")
  14217. l.value = c;
  14218. else if (c && typeof c == "object") {
  14219. const {
  14220. keepParent: f
  14221. } = c;
  14222. l.value = f === !0, u.value = f === !1;
  14223. }
  14224. }), () => {
  14225. const {
  14226. overlayClassName: c,
  14227. trigger: f,
  14228. mouseEnterDelay: d,
  14229. mouseLeaveDelay: h,
  14230. overlayStyle: p,
  14231. prefixCls: v,
  14232. afterVisibleChange: g,
  14233. transitionName: m,
  14234. animation: y,
  14235. placement: b,
  14236. align: _,
  14237. destroyTooltipOnHide: O,
  14238. defaultVisible: S
  14239. } = t, x = X_e(t, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), C = I({}, x);
  14240. t.visible !== void 0 && (C.popupVisible = t.visible);
  14241. const T = I(I(I({
  14242. popupClassName: c,
  14243. prefixCls: v,
  14244. action: f,
  14245. builtinPlacements: IU,
  14246. popupPlacement: b,
  14247. popupAlign: _,
  14248. afterPopupVisibleChange: g,
  14249. popupTransitionName: m,
  14250. popupAnimation: y,
  14251. defaultPopupVisible: S,
  14252. destroyPopupOnHide: l.value,
  14253. autoDestroy: u.value,
  14254. mouseLeaveDelay: h,
  14255. popupStyle: p,
  14256. mouseEnterDelay: d
  14257. }, C), r), {
  14258. onPopupVisibleChange: t.onVisibleChange || t5,
  14259. onPopupAlign: t.onPopupAlign || t5,
  14260. ref: a,
  14261. arrow: !!t.arrow,
  14262. popup: o()
  14263. });
  14264. return M(KS, T, {
  14265. default: n.default
  14266. });
  14267. };
  14268. }
  14269. }), q_e = () => ({
  14270. trigger: [String, Array],
  14271. open: {
  14272. type: Boolean,
  14273. default: void 0
  14274. },
  14275. /** @deprecated Please use `open` instead. */
  14276. visible: {
  14277. type: Boolean,
  14278. default: void 0
  14279. },
  14280. placement: String,
  14281. color: String,
  14282. transitionName: String,
  14283. overlayStyle: $t(),
  14284. overlayInnerStyle: $t(),
  14285. overlayClassName: String,
  14286. openClassName: String,
  14287. prefixCls: String,
  14288. mouseEnterDelay: Number,
  14289. mouseLeaveDelay: Number,
  14290. getPopupContainer: Function,
  14291. /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  14292. arrowPointAtCenter: {
  14293. type: Boolean,
  14294. default: void 0
  14295. },
  14296. arrow: {
  14297. type: [Boolean, Object],
  14298. default: !0
  14299. },
  14300. autoAdjustOverflow: {
  14301. type: [Boolean, Object],
  14302. default: void 0
  14303. },
  14304. destroyTooltipOnHide: {
  14305. type: Boolean,
  14306. default: void 0
  14307. },
  14308. align: $t(),
  14309. builtinPlacements: $t(),
  14310. children: Array,
  14311. /** @deprecated Please use `onOpenChange` instead. */
  14312. onVisibleChange: Function,
  14313. /** @deprecated Please use `onUpdate:open` instead. */
  14314. "onUpdate:visible": Function,
  14315. onOpenChange: Function,
  14316. "onUpdate:open": Function
  14317. }), K_e = {
  14318. adjustX: 1,
  14319. adjustY: 1
  14320. }, n5 = {
  14321. adjustX: 0,
  14322. adjustY: 0
  14323. }, J_e = [0, 0];
  14324. function r5(t) {
  14325. return typeof t == "boolean" ? t ? K_e : n5 : I(I({}, n5), t);
  14326. }
  14327. function e1e(t) {
  14328. const {
  14329. arrowWidth: e = 4,
  14330. horizontalArrowShift: n = 16,
  14331. verticalArrowShift: r = 8,
  14332. autoAdjustOverflow: i,
  14333. arrowPointAtCenter: a
  14334. } = t, o = {
  14335. left: {
  14336. points: ["cr", "cl"],
  14337. offset: [-4, 0]
  14338. },
  14339. right: {
  14340. points: ["cl", "cr"],
  14341. offset: [4, 0]
  14342. },
  14343. top: {
  14344. points: ["bc", "tc"],
  14345. offset: [0, -4]
  14346. },
  14347. bottom: {
  14348. points: ["tc", "bc"],
  14349. offset: [0, 4]
  14350. },
  14351. topLeft: {
  14352. points: ["bl", "tc"],
  14353. offset: [-(n + e), -4]
  14354. },
  14355. leftTop: {
  14356. points: ["tr", "cl"],
  14357. offset: [-4, -(r + e)]
  14358. },
  14359. topRight: {
  14360. points: ["br", "tc"],
  14361. offset: [n + e, -4]
  14362. },
  14363. rightTop: {
  14364. points: ["tl", "cr"],
  14365. offset: [4, -(r + e)]
  14366. },
  14367. bottomRight: {
  14368. points: ["tr", "bc"],
  14369. offset: [n + e, 4]
  14370. },
  14371. rightBottom: {
  14372. points: ["bl", "cr"],
  14373. offset: [4, r + e]
  14374. },
  14375. bottomLeft: {
  14376. points: ["tl", "bc"],
  14377. offset: [-(n + e), 4]
  14378. },
  14379. leftBottom: {
  14380. points: ["br", "cl"],
  14381. offset: [-4, r + e]
  14382. }
  14383. };
  14384. return Object.keys(o).forEach((s) => {
  14385. o[s] = a ? I(I({}, o[s]), {
  14386. overflow: r5(i),
  14387. targetOffset: J_e
  14388. }) : I(I({}, IU[s]), {
  14389. overflow: r5(i)
  14390. }), o[s].ignoreShake = !0;
  14391. }), o;
  14392. }
  14393. function DU() {
  14394. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  14395. for (let e = 0, n = t.length; e < n; e++)
  14396. if (t[e] !== void 0)
  14397. return t[e];
  14398. }
  14399. const t1e = b1.map((t) => `${t}-inverse`);
  14400. function n1e(t) {
  14401. return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...t1e, ...b1].includes(t) : b1.includes(t);
  14402. }
  14403. function r1e(t, e) {
  14404. const n = n1e(e), r = ye({
  14405. [`${t}-${e}`]: e && n
  14406. }), i = {}, a = {};
  14407. return e && !n && (i.background = e, a["--antd-arrow-background-color"] = e), {
  14408. className: r,
  14409. overlayStyle: i,
  14410. arrowStyle: a
  14411. };
  14412. }
  14413. function Ay(t) {
  14414. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  14415. return t.map((n) => `${e}${n}`).join(",");
  14416. }
  14417. const RU = 8;
  14418. function i1e(t) {
  14419. const e = RU, {
  14420. sizePopupArrow: n,
  14421. contentRadius: r,
  14422. borderRadiusOuter: i,
  14423. limitVerticalRadius: a
  14424. } = t, o = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), s = (r > 12 ? r + 2 : 12) - o, l = a ? e - o : s;
  14425. return {
  14426. dropdownArrowOffset: s,
  14427. dropdownArrowOffsetVertical: l
  14428. };
  14429. }
  14430. function a1e(t, e) {
  14431. const {
  14432. componentCls: n,
  14433. sizePopupArrow: r,
  14434. marginXXS: i,
  14435. borderRadiusXS: a,
  14436. borderRadiusOuter: o,
  14437. boxShadowPopoverArrow: s
  14438. } = t, {
  14439. colorBg: l,
  14440. showArrowCls: u,
  14441. contentRadius: c = t.borderRadiusLG,
  14442. limitVerticalRadius: f
  14443. } = e, {
  14444. dropdownArrowOffsetVertical: d,
  14445. dropdownArrowOffset: h
  14446. } = i1e({
  14447. sizePopupArrow: r,
  14448. contentRadius: c,
  14449. borderRadiusOuter: o,
  14450. limitVerticalRadius: f
  14451. }), p = r / 2 + i;
  14452. return {
  14453. [n]: {
  14454. // ============================ Basic ============================
  14455. [`${n}-arrow`]: [I(I({
  14456. position: "absolute",
  14457. zIndex: 1,
  14458. display: "block"
  14459. }, pfe(r, a, o, l, s)), {
  14460. "&:before": {
  14461. background: l
  14462. }
  14463. })],
  14464. // ========================== Placement ==========================
  14465. // Here handle the arrow position and rotate stuff
  14466. // >>>>> Top
  14467. [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
  14468. bottom: 0,
  14469. transform: "translateY(100%) rotate(180deg)"
  14470. },
  14471. [`&-placement-top ${n}-arrow`]: {
  14472. left: {
  14473. _skip_check_: !0,
  14474. value: "50%"
  14475. },
  14476. transform: "translateX(-50%) translateY(100%) rotate(180deg)"
  14477. },
  14478. [`&-placement-topLeft ${n}-arrow`]: {
  14479. left: {
  14480. _skip_check_: !0,
  14481. value: h
  14482. }
  14483. },
  14484. [`&-placement-topRight ${n}-arrow`]: {
  14485. right: {
  14486. _skip_check_: !0,
  14487. value: h
  14488. }
  14489. },
  14490. // >>>>> Bottom
  14491. [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
  14492. top: 0,
  14493. transform: "translateY(-100%)"
  14494. },
  14495. [`&-placement-bottom ${n}-arrow`]: {
  14496. left: {
  14497. _skip_check_: !0,
  14498. value: "50%"
  14499. },
  14500. transform: "translateX(-50%) translateY(-100%)"
  14501. },
  14502. [`&-placement-bottomLeft ${n}-arrow`]: {
  14503. left: {
  14504. _skip_check_: !0,
  14505. value: h
  14506. }
  14507. },
  14508. [`&-placement-bottomRight ${n}-arrow`]: {
  14509. right: {
  14510. _skip_check_: !0,
  14511. value: h
  14512. }
  14513. },
  14514. // >>>>> Left
  14515. [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
  14516. right: {
  14517. _skip_check_: !0,
  14518. value: 0
  14519. },
  14520. transform: "translateX(100%) rotate(90deg)"
  14521. },
  14522. [`&-placement-left ${n}-arrow`]: {
  14523. top: {
  14524. _skip_check_: !0,
  14525. value: "50%"
  14526. },
  14527. transform: "translateY(-50%) translateX(100%) rotate(90deg)"
  14528. },
  14529. [`&-placement-leftTop ${n}-arrow`]: {
  14530. top: d
  14531. },
  14532. [`&-placement-leftBottom ${n}-arrow`]: {
  14533. bottom: d
  14534. },
  14535. // >>>>> Right
  14536. [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
  14537. left: {
  14538. _skip_check_: !0,
  14539. value: 0
  14540. },
  14541. transform: "translateX(-100%) rotate(-90deg)"
  14542. },
  14543. [`&-placement-right ${n}-arrow`]: {
  14544. top: {
  14545. _skip_check_: !0,
  14546. value: "50%"
  14547. },
  14548. transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
  14549. },
  14550. [`&-placement-rightTop ${n}-arrow`]: {
  14551. top: d
  14552. },
  14553. [`&-placement-rightBottom ${n}-arrow`]: {
  14554. bottom: d
  14555. },
  14556. // =========================== Offset ============================
  14557. // Offset the popover to account for the dropdown arrow
  14558. // >>>>> Top
  14559. [Ay(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14560. paddingBottom: p
  14561. },
  14562. // >>>>> Bottom
  14563. [Ay(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14564. paddingTop: p
  14565. },
  14566. // >>>>> Left
  14567. [Ay(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14568. paddingRight: {
  14569. _skip_check_: !0,
  14570. value: p
  14571. }
  14572. },
  14573. // >>>>> Right
  14574. [Ay(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
  14575. paddingLeft: {
  14576. _skip_check_: !0,
  14577. value: p
  14578. }
  14579. }
  14580. }
  14581. };
  14582. }
  14583. const o1e = (t) => {
  14584. const {
  14585. componentCls: e,
  14586. // ant-tooltip
  14587. tooltipMaxWidth: n,
  14588. tooltipColor: r,
  14589. tooltipBg: i,
  14590. tooltipBorderRadius: a,
  14591. zIndexPopup: o,
  14592. controlHeight: s,
  14593. boxShadowSecondary: l,
  14594. paddingSM: u,
  14595. paddingXS: c,
  14596. tooltipRadiusOuter: f
  14597. } = t;
  14598. return [
  14599. {
  14600. [e]: I(I(I(I({}, nn(t)), {
  14601. position: "absolute",
  14602. zIndex: o,
  14603. display: "block",
  14604. "&": [{
  14605. width: "max-content"
  14606. }, {
  14607. width: "intrinsic"
  14608. }],
  14609. maxWidth: n,
  14610. visibility: "visible",
  14611. "&-hidden": {
  14612. display: "none"
  14613. },
  14614. "--antd-arrow-background-color": i,
  14615. // Wrapper for the tooltip content
  14616. [`${e}-inner`]: {
  14617. minWidth: s,
  14618. minHeight: s,
  14619. padding: `${u / 2}px ${c}px`,
  14620. color: r,
  14621. textAlign: "start",
  14622. textDecoration: "none",
  14623. wordWrap: "break-word",
  14624. backgroundColor: i,
  14625. borderRadius: a,
  14626. boxShadow: l
  14627. },
  14628. // Limit left and right placement radius
  14629. [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
  14630. [`${e}-inner`]: {
  14631. borderRadius: Math.min(a, RU)
  14632. }
  14633. },
  14634. [`${e}-content`]: {
  14635. position: "relative"
  14636. }
  14637. }), vfe(t, (d, h) => {
  14638. let {
  14639. darkColor: p
  14640. } = h;
  14641. return {
  14642. [`&${e}-${d}`]: {
  14643. [`${e}-inner`]: {
  14644. backgroundColor: p
  14645. },
  14646. [`${e}-arrow`]: {
  14647. "--antd-arrow-background-color": p
  14648. }
  14649. }
  14650. };
  14651. })), {
  14652. // RTL
  14653. "&-rtl": {
  14654. direction: "rtl"
  14655. }
  14656. })
  14657. },
  14658. // Arrow Style
  14659. a1e(Bt(t, {
  14660. borderRadiusOuter: f
  14661. }), {
  14662. colorBg: "var(--antd-arrow-background-color)",
  14663. showArrowCls: "",
  14664. contentRadius: a,
  14665. limitVerticalRadius: !0
  14666. }),
  14667. // Pure Render
  14668. {
  14669. [`${e}-pure`]: {
  14670. position: "relative",
  14671. maxWidth: "none"
  14672. }
  14673. }
  14674. ];
  14675. }, s1e = (t, e) => Sn("Tooltip", (r) => {
  14676. if ((e == null ? void 0 : e.value) === !1)
  14677. return [];
  14678. const {
  14679. borderRadius: i,
  14680. colorTextLightSolid: a,
  14681. colorBgDefault: o,
  14682. borderRadiusOuter: s
  14683. } = r, l = Bt(r, {
  14684. // default variables
  14685. tooltipMaxWidth: 250,
  14686. tooltipColor: a,
  14687. tooltipBorderRadius: i,
  14688. tooltipBg: o,
  14689. tooltipRadiusOuter: s > 4 ? 4 : s
  14690. });
  14691. return [o1e(l), ux(r, "zoom-big-fast")];
  14692. }, (r) => {
  14693. let {
  14694. zIndexPopupBase: i,
  14695. colorBgSpotlight: a
  14696. } = r;
  14697. return {
  14698. zIndexPopup: i + 70,
  14699. colorBgDefault: a
  14700. };
  14701. })(t), l1e = (t, e) => {
  14702. const n = {}, r = I({}, t);
  14703. return e.forEach((i) => {
  14704. t && i in t && (n[i] = t[i], delete r[i]);
  14705. }), {
  14706. picked: n,
  14707. omitted: r
  14708. };
  14709. }, kU = () => I(I({}, q_e()), {
  14710. title: Y.any
  14711. }), u1e = te({
  14712. compatConfig: {
  14713. MODE: 3
  14714. },
  14715. name: "ATooltip",
  14716. inheritAttrs: !1,
  14717. props: sr(kU(), {
  14718. trigger: "hover",
  14719. align: {},
  14720. placement: "top",
  14721. mouseEnterDelay: 0.1,
  14722. mouseLeaveDelay: 0.1,
  14723. arrowPointAtCenter: !1,
  14724. autoAdjustOverflow: !0
  14725. }),
  14726. slots: Object,
  14727. // emits: ['update:visible', 'visibleChange'],
  14728. setup(t, e) {
  14729. let {
  14730. slots: n,
  14731. emit: r,
  14732. attrs: i,
  14733. expose: a
  14734. } = e;
  14735. process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((w) => {
  14736. let [P, $] = w;
  14737. Xr(t[P] === void 0, "Tooltip", `\`${P}\` is deprecated, please use \`${$}\` instead.`);
  14738. });
  14739. const {
  14740. prefixCls: o,
  14741. getPopupContainer: s,
  14742. direction: l,
  14743. rootPrefixCls: u
  14744. } = It("tooltip", t), c = L(() => {
  14745. var w;
  14746. return (w = t.open) !== null && w !== void 0 ? w : t.visible;
  14747. }), f = U(DU([t.open, t.visible])), d = U();
  14748. let h;
  14749. se(c, (w) => {
  14750. xt.cancel(h), h = xt(() => {
  14751. f.value = !!w;
  14752. });
  14753. });
  14754. const p = () => {
  14755. var w;
  14756. const P = (w = t.title) !== null && w !== void 0 ? w : n.title;
  14757. return !P && P !== 0;
  14758. }, v = (w) => {
  14759. const P = p();
  14760. c.value === void 0 && (f.value = P ? !1 : w), P || (r("update:visible", w), r("visibleChange", w), r("update:open", w), r("openChange", w));
  14761. };
  14762. a({
  14763. getPopupDomNode: () => d.value.getPopupDomNode(),
  14764. open: f,
  14765. forcePopupAlign: () => {
  14766. var w;
  14767. return (w = d.value) === null || w === void 0 ? void 0 : w.forcePopupAlign();
  14768. }
  14769. });
  14770. const m = L(() => {
  14771. var w;
  14772. const {
  14773. builtinPlacements: P,
  14774. autoAdjustOverflow: $,
  14775. arrow: A,
  14776. arrowPointAtCenter: D
  14777. } = t;
  14778. let E = D;
  14779. return typeof A == "object" && (E = (w = A.pointAtCenter) !== null && w !== void 0 ? w : D), P || e1e({
  14780. arrowPointAtCenter: E,
  14781. autoAdjustOverflow: $
  14782. });
  14783. }), y = (w) => w || w === "", b = (w) => {
  14784. const P = w.type;
  14785. if (typeof P == "object" && w.props && ((P.__ANT_BUTTON === !0 || P === "button") && y(w.props.disabled) || P.__ANT_SWITCH === !0 && (y(w.props.disabled) || y(w.props.loading)) || P.__ANT_RADIO === !0 && y(w.props.disabled))) {
  14786. const {
  14787. picked: $,
  14788. omitted: A
  14789. } = l1e(Mue(w), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), D = I(I({
  14790. display: "inline-block"
  14791. }, $), {
  14792. cursor: "not-allowed",
  14793. lineHeight: 1,
  14794. width: w.props && w.props.block ? "100%" : void 0
  14795. }), E = I(I({}, A), {
  14796. pointerEvents: "none"
  14797. }), R = Pn(w, {
  14798. style: E
  14799. }, !0);
  14800. return M("span", {
  14801. style: D,
  14802. class: `${o.value}-disabled-compatible-wrapper`
  14803. }, [R]);
  14804. }
  14805. return w;
  14806. }, _ = () => {
  14807. var w, P;
  14808. return (w = t.title) !== null && w !== void 0 ? w : (P = n.title) === null || P === void 0 ? void 0 : P.call(n);
  14809. }, O = (w, P) => {
  14810. const $ = m.value, A = Object.keys($).find((D) => {
  14811. var E, R;
  14812. return $[D].points[0] === ((E = P.points) === null || E === void 0 ? void 0 : E[0]) && $[D].points[1] === ((R = P.points) === null || R === void 0 ? void 0 : R[1]);
  14813. });
  14814. if (A) {
  14815. const D = w.getBoundingClientRect(), E = {
  14816. top: "50%",
  14817. left: "50%"
  14818. };
  14819. A.indexOf("top") >= 0 || A.indexOf("Bottom") >= 0 ? E.top = `${D.height - P.offset[1]}px` : (A.indexOf("Top") >= 0 || A.indexOf("bottom") >= 0) && (E.top = `${-P.offset[1]}px`), A.indexOf("left") >= 0 || A.indexOf("Right") >= 0 ? E.left = `${D.width - P.offset[0]}px` : (A.indexOf("right") >= 0 || A.indexOf("Left") >= 0) && (E.left = `${-P.offset[0]}px`), w.style.transformOrigin = `${E.left} ${E.top}`;
  14820. }
  14821. }, S = L(() => r1e(o.value, t.color)), x = L(() => i["data-popover-inject"]), [C, T] = s1e(o, L(() => !x.value));
  14822. return () => {
  14823. var w, P;
  14824. const {
  14825. openClassName: $,
  14826. overlayClassName: A,
  14827. overlayStyle: D,
  14828. overlayInnerStyle: E
  14829. } = t;
  14830. let R = (P = os((w = n.default) === null || w === void 0 ? void 0 : w.call(n))) !== null && P !== void 0 ? P : null;
  14831. R = R.length === 1 ? R[0] : R;
  14832. let N = f.value;
  14833. if (c.value === void 0 && p() && (N = !1), !R)
  14834. return null;
  14835. const V = b(Ui(R) && !Iue(R) ? R : M("span", null, [R])), z = ye({
  14836. [$ || `${o.value}-open`]: !0,
  14837. [V.props && V.props.class]: V.props && V.props.class
  14838. }), W = ye(A, {
  14839. [`${o.value}-rtl`]: l.value === "rtl"
  14840. }, S.value.className, T.value), F = I(I({}, S.value.overlayStyle), E), Q = S.value.arrowStyle, Z = I(I(I({}, i), t), {
  14841. prefixCls: o.value,
  14842. arrow: !!t.arrow,
  14843. getPopupContainer: s == null ? void 0 : s.value,
  14844. builtinPlacements: m.value,
  14845. visible: N,
  14846. ref: d,
  14847. overlayClassName: W,
  14848. overlayStyle: I(I({}, Q), D),
  14849. overlayInnerStyle: F,
  14850. onVisibleChange: v,
  14851. onPopupAlign: O,
  14852. transitionName: es(u.value, "zoom-big-fast", t.transitionName)
  14853. });
  14854. return C(M(Y_e, Z, {
  14855. default: () => [f.value ? Pn(V, {
  14856. class: z
  14857. }) : V],
  14858. arrowContent: () => M("span", {
  14859. class: `${o.value}-arrow-content`
  14860. }, null),
  14861. overlay: _
  14862. }));
  14863. };
  14864. }
  14865. }), dx = np(u1e), Xf = {
  14866. adjustX: 1,
  14867. adjustY: 1
  14868. }, Yf = [0, 0], c1e = {
  14869. topLeft: {
  14870. points: ["bl", "tl"],
  14871. overflow: Xf,
  14872. offset: [0, -4],
  14873. targetOffset: Yf
  14874. },
  14875. topCenter: {
  14876. points: ["bc", "tc"],
  14877. overflow: Xf,
  14878. offset: [0, -4],
  14879. targetOffset: Yf
  14880. },
  14881. topRight: {
  14882. points: ["br", "tr"],
  14883. overflow: Xf,
  14884. offset: [0, -4],
  14885. targetOffset: Yf
  14886. },
  14887. bottomLeft: {
  14888. points: ["tl", "bl"],
  14889. overflow: Xf,
  14890. offset: [0, 4],
  14891. targetOffset: Yf
  14892. },
  14893. bottomCenter: {
  14894. points: ["tc", "bc"],
  14895. overflow: Xf,
  14896. offset: [0, 4],
  14897. targetOffset: Yf
  14898. },
  14899. bottomRight: {
  14900. points: ["tr", "br"],
  14901. overflow: Xf,
  14902. offset: [0, 4],
  14903. targetOffset: Yf
  14904. }
  14905. };
  14906. var f1e = function(t, e) {
  14907. var n = {};
  14908. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  14909. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  14910. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  14911. return n;
  14912. };
  14913. const d1e = te({
  14914. compatConfig: {
  14915. MODE: 3
  14916. },
  14917. props: {
  14918. minOverlayWidthMatchTrigger: {
  14919. type: Boolean,
  14920. default: void 0
  14921. },
  14922. arrow: {
  14923. type: Boolean,
  14924. default: !1
  14925. },
  14926. prefixCls: Y.string.def("rc-dropdown"),
  14927. transitionName: String,
  14928. overlayClassName: Y.string.def(""),
  14929. openClassName: String,
  14930. animation: Y.any,
  14931. align: Y.object,
  14932. overlayStyle: {
  14933. type: Object,
  14934. default: void 0
  14935. },
  14936. placement: Y.string.def("bottomLeft"),
  14937. overlay: Y.any,
  14938. trigger: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def("hover"),
  14939. alignPoint: {
  14940. type: Boolean,
  14941. default: void 0
  14942. },
  14943. showAction: Y.array,
  14944. hideAction: Y.array,
  14945. getPopupContainer: Function,
  14946. visible: {
  14947. type: Boolean,
  14948. default: void 0
  14949. },
  14950. defaultVisible: {
  14951. type: Boolean,
  14952. default: !1
  14953. },
  14954. mouseEnterDelay: Y.number.def(0.15),
  14955. mouseLeaveDelay: Y.number.def(0.1)
  14956. },
  14957. emits: ["visibleChange", "overlayClick"],
  14958. setup(t, e) {
  14959. let {
  14960. slots: n,
  14961. emit: r,
  14962. expose: i
  14963. } = e;
  14964. const a = U(!!t.visible);
  14965. se(() => t.visible, (h) => {
  14966. h !== void 0 && (a.value = h);
  14967. });
  14968. const o = U();
  14969. i({
  14970. triggerRef: o
  14971. });
  14972. const s = (h) => {
  14973. t.visible === void 0 && (a.value = !1), r("overlayClick", h);
  14974. }, l = (h) => {
  14975. t.visible === void 0 && (a.value = h), r("visibleChange", h);
  14976. }, u = () => {
  14977. var h;
  14978. const p = (h = n.overlay) === null || h === void 0 ? void 0 : h.call(n), v = {
  14979. prefixCls: `${t.prefixCls}-menu`,
  14980. onClick: s
  14981. };
  14982. return M(wt, {
  14983. key: nj
  14984. }, [t.arrow && M("div", {
  14985. class: `${t.prefixCls}-arrow`
  14986. }, null), Pn(p, v, !1)]);
  14987. }, c = L(() => {
  14988. const {
  14989. minOverlayWidthMatchTrigger: h = !t.alignPoint
  14990. } = t;
  14991. return h;
  14992. }), f = () => {
  14993. var h;
  14994. const p = (h = n.default) === null || h === void 0 ? void 0 : h.call(n);
  14995. return a.value && p ? Pn(p[0], {
  14996. class: t.openClassName || `${t.prefixCls}-open`
  14997. }, !1) : p;
  14998. }, d = L(() => !t.hideAction && t.trigger.indexOf("contextmenu") !== -1 ? ["click"] : t.hideAction);
  14999. return () => {
  15000. const {
  15001. prefixCls: h,
  15002. arrow: p,
  15003. showAction: v,
  15004. overlayStyle: g,
  15005. trigger: m,
  15006. placement: y,
  15007. align: b,
  15008. getPopupContainer: _,
  15009. transitionName: O,
  15010. animation: S,
  15011. overlayClassName: x
  15012. } = t, C = f1e(t, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
  15013. return M(KS, j(j({}, C), {}, {
  15014. prefixCls: h,
  15015. ref: o,
  15016. popupClassName: ye(x, {
  15017. [`${h}-show-arrow`]: p
  15018. }),
  15019. popupStyle: g,
  15020. builtinPlacements: c1e,
  15021. action: m,
  15022. showAction: v,
  15023. hideAction: d.value || [],
  15024. popupPlacement: y,
  15025. popupAlign: b,
  15026. popupTransitionName: O,
  15027. popupAnimation: S,
  15028. popupVisible: a.value,
  15029. stretch: c.value ? "minWidth" : "",
  15030. onPopupVisibleChange: l,
  15031. getPopupContainer: _
  15032. }), {
  15033. popup: u,
  15034. default: f
  15035. });
  15036. };
  15037. }
  15038. }), h1e = (t) => {
  15039. const {
  15040. componentCls: e,
  15041. colorPrimary: n
  15042. } = t;
  15043. return {
  15044. [e]: {
  15045. position: "absolute",
  15046. background: "transparent",
  15047. pointerEvents: "none",
  15048. boxSizing: "border-box",
  15049. color: `var(--wave-color, ${n})`,
  15050. boxShadow: "0 0 0 0 currentcolor",
  15051. opacity: 0.2,
  15052. // =================== Motion ===================
  15053. "&.wave-motion-appear": {
  15054. transition: [`box-shadow 0.4s ${t.motionEaseOutCirc}`, `opacity 2s ${t.motionEaseOutCirc}`].join(","),
  15055. "&-active": {
  15056. boxShadow: "0 0 0 6px currentcolor",
  15057. opacity: 0
  15058. }
  15059. }
  15060. }
  15061. };
  15062. }, p1e = Sn("Wave", (t) => [h1e(t)]);
  15063. function v1e(t) {
  15064. const e = (t || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  15065. return e && e[1] && e[2] && e[3] ? !(e[1] === e[2] && e[2] === e[3]) : !0;
  15066. }
  15067. function SC(t) {
  15068. return t && t !== "#fff" && t !== "#ffffff" && t !== "rgb(255, 255, 255)" && t !== "rgba(255, 255, 255, 1)" && v1e(t) && !/rgba\((?:\d*, ){3}0\)/.test(t) && // any transparent rgba color
  15069. t !== "transparent";
  15070. }
  15071. function g1e(t) {
  15072. const {
  15073. borderTopColor: e,
  15074. borderColor: n,
  15075. backgroundColor: r
  15076. } = getComputedStyle(t);
  15077. return SC(e) ? e : SC(n) ? n : SC(r) ? r : null;
  15078. }
  15079. function xC(t) {
  15080. return Number.isNaN(t) ? 0 : t;
  15081. }
  15082. const m1e = te({
  15083. props: {
  15084. target: $t(),
  15085. className: String
  15086. },
  15087. setup(t) {
  15088. const e = ae(null), [n, r] = fn(null), [i, a] = fn([]), [o, s] = fn(0), [l, u] = fn(0), [c, f] = fn(0), [d, h] = fn(0), [p, v] = fn(!1);
  15089. function g() {
  15090. const {
  15091. target: x
  15092. } = t, C = getComputedStyle(x);
  15093. r(g1e(x));
  15094. const T = C.position === "static", {
  15095. borderLeftWidth: w,
  15096. borderTopWidth: P
  15097. } = C;
  15098. s(T ? x.offsetLeft : xC(-parseFloat(w))), u(T ? x.offsetTop : xC(-parseFloat(P))), f(x.offsetWidth), h(x.offsetHeight);
  15099. const {
  15100. borderTopLeftRadius: $,
  15101. borderTopRightRadius: A,
  15102. borderBottomLeftRadius: D,
  15103. borderBottomRightRadius: E
  15104. } = C;
  15105. a([$, A, E, D].map((R) => xC(parseFloat(R))));
  15106. }
  15107. let m, y, b;
  15108. const _ = () => {
  15109. clearTimeout(b), xt.cancel(y), m == null || m.disconnect();
  15110. }, O = () => {
  15111. var x;
  15112. const C = (x = e.value) === null || x === void 0 ? void 0 : x.parentElement;
  15113. C && (sf(null, C), C.parentElement && C.parentElement.removeChild(C));
  15114. };
  15115. it(() => {
  15116. _(), b = setTimeout(() => {
  15117. O();
  15118. }, 5e3);
  15119. const {
  15120. target: x
  15121. } = t;
  15122. x && (y = xt(() => {
  15123. g(), v(!0);
  15124. }), typeof ResizeObserver < "u" && (m = new ResizeObserver(g), m.observe(x)));
  15125. }), yt(() => {
  15126. _();
  15127. });
  15128. const S = (x) => {
  15129. x.propertyName === "opacity" && O();
  15130. };
  15131. return () => {
  15132. if (!p.value)
  15133. return null;
  15134. const x = {
  15135. left: `${o.value}px`,
  15136. top: `${l.value}px`,
  15137. width: `${c.value}px`,
  15138. height: `${d.value}px`,
  15139. borderRadius: i.value.map((C) => `${C}px`).join(" ")
  15140. };
  15141. return n && (x["--wave-color"] = n.value), M(co, {
  15142. appear: !0,
  15143. name: "wave-motion",
  15144. appearFromClass: "wave-motion-appear",
  15145. appearActiveClass: "wave-motion-appear",
  15146. appearToClass: "wave-motion-appear wave-motion-appear-active"
  15147. }, {
  15148. default: () => [M("div", {
  15149. ref: e,
  15150. class: t.className,
  15151. style: x,
  15152. onTransitionend: S
  15153. }, null)]
  15154. });
  15155. };
  15156. }
  15157. });
  15158. function y1e(t, e) {
  15159. const n = document.createElement("div");
  15160. n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", t == null || t.insertBefore(n, t == null ? void 0 : t.firstChild), sf(M(m1e, {
  15161. target: t,
  15162. className: e
  15163. }, null), n);
  15164. }
  15165. function b1e(t, e, n) {
  15166. function r() {
  15167. var i;
  15168. const a = Cs(t);
  15169. !((i = n == null ? void 0 : n.value) === null || i === void 0) && i.disabled || !a || y1e(a, e.value);
  15170. }
  15171. return r;
  15172. }
  15173. const _1e = te({
  15174. compatConfig: {
  15175. MODE: 3
  15176. },
  15177. name: "Wave",
  15178. props: {
  15179. disabled: Boolean
  15180. },
  15181. setup(t, e) {
  15182. let {
  15183. slots: n
  15184. } = e;
  15185. const r = vn(), {
  15186. prefixCls: i,
  15187. wave: a
  15188. } = It("wave", t), [, o] = p1e(i), s = b1e(r, L(() => ye(i.value, o.value)), a);
  15189. let l;
  15190. const u = () => {
  15191. Cs(r).removeEventListener("click", l, !0);
  15192. };
  15193. return it(() => {
  15194. se(() => t.disabled, () => {
  15195. u(), Tt(() => {
  15196. const c = Cs(r);
  15197. c == null || c.removeEventListener("click", l, !0), !(!c || c.nodeType !== 1 || t.disabled) && (l = (f) => {
  15198. f.target.tagName === "INPUT" || !gZ(f.target) || // No need wave
  15199. !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || s();
  15200. }, c.addEventListener("click", l, !0));
  15201. });
  15202. }, {
  15203. immediate: !0,
  15204. flush: "post"
  15205. });
  15206. }), yt(() => {
  15207. u();
  15208. }), () => {
  15209. var c;
  15210. return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
  15211. };
  15212. }
  15213. });
  15214. function LU(t) {
  15215. return t === "danger" ? {
  15216. danger: !0
  15217. } : {
  15218. type: t
  15219. };
  15220. }
  15221. const O1e = () => ({
  15222. prefixCls: String,
  15223. type: String,
  15224. htmlType: {
  15225. type: String,
  15226. default: "button"
  15227. },
  15228. shape: {
  15229. type: String
  15230. },
  15231. size: {
  15232. type: String
  15233. },
  15234. loading: {
  15235. type: [Boolean, Object],
  15236. default: () => !1
  15237. },
  15238. disabled: {
  15239. type: Boolean,
  15240. default: void 0
  15241. },
  15242. ghost: {
  15243. type: Boolean,
  15244. default: void 0
  15245. },
  15246. block: {
  15247. type: Boolean,
  15248. default: void 0
  15249. },
  15250. danger: {
  15251. type: Boolean,
  15252. default: void 0
  15253. },
  15254. icon: Y.any,
  15255. href: String,
  15256. target: String,
  15257. title: String,
  15258. onClick: g1(),
  15259. onMousedown: g1()
  15260. }), i5 = (t) => {
  15261. t && (t.style.width = "0px", t.style.opacity = "0", t.style.transform = "scale(0)");
  15262. }, a5 = (t) => {
  15263. Tt(() => {
  15264. t && (t.style.width = `${t.scrollWidth}px`, t.style.opacity = "1", t.style.transform = "scale(1)");
  15265. });
  15266. }, o5 = (t) => {
  15267. t && t.style && (t.style.width = null, t.style.opacity = null, t.style.transform = null);
  15268. }, S1e = te({
  15269. compatConfig: {
  15270. MODE: 3
  15271. },
  15272. name: "LoadingIcon",
  15273. props: {
  15274. prefixCls: String,
  15275. loading: [Boolean, Object],
  15276. existIcon: Boolean
  15277. },
  15278. setup(t) {
  15279. return () => {
  15280. const {
  15281. existIcon: e,
  15282. prefixCls: n,
  15283. loading: r
  15284. } = t;
  15285. if (e)
  15286. return M("span", {
  15287. class: `${n}-loading-icon`
  15288. }, [M(ts, null, null)]);
  15289. const i = !!r;
  15290. return M(co, {
  15291. name: `${n}-loading-icon-motion`,
  15292. onBeforeEnter: i5,
  15293. onEnter: a5,
  15294. onAfterEnter: o5,
  15295. onBeforeLeave: a5,
  15296. onLeave: (a) => {
  15297. setTimeout(() => {
  15298. i5(a);
  15299. });
  15300. },
  15301. onAfterLeave: o5
  15302. }, {
  15303. default: () => [i ? M("span", {
  15304. class: `${n}-loading-icon`
  15305. }, [M(ts, null, null)]) : null]
  15306. });
  15307. };
  15308. }
  15309. }), s5 = (t, e) => ({
  15310. // Border
  15311. [`> span, > ${t}`]: {
  15312. "&:not(:last-child)": {
  15313. [`&, & > ${t}`]: {
  15314. "&:not(:disabled)": {
  15315. borderInlineEndColor: e
  15316. }
  15317. }
  15318. },
  15319. "&:not(:first-child)": {
  15320. [`&, & > ${t}`]: {
  15321. "&:not(:disabled)": {
  15322. borderInlineStartColor: e
  15323. }
  15324. }
  15325. }
  15326. }
  15327. }), x1e = (t) => {
  15328. const {
  15329. componentCls: e,
  15330. fontSize: n,
  15331. lineWidth: r,
  15332. colorPrimaryHover: i,
  15333. colorErrorHover: a
  15334. } = t;
  15335. return {
  15336. [`${e}-group`]: [
  15337. {
  15338. position: "relative",
  15339. display: "inline-flex",
  15340. // Border
  15341. [`> span, > ${e}`]: {
  15342. "&:not(:last-child)": {
  15343. [`&, & > ${e}`]: {
  15344. borderStartEndRadius: 0,
  15345. borderEndEndRadius: 0
  15346. }
  15347. },
  15348. "&:not(:first-child)": {
  15349. marginInlineStart: -r,
  15350. [`&, & > ${e}`]: {
  15351. borderStartStartRadius: 0,
  15352. borderEndStartRadius: 0
  15353. }
  15354. }
  15355. },
  15356. [e]: {
  15357. position: "relative",
  15358. zIndex: 1,
  15359. "&:hover,\n &:focus,\n &:active": {
  15360. zIndex: 2
  15361. },
  15362. "&[disabled]": {
  15363. zIndex: 0
  15364. }
  15365. },
  15366. [`${e}-icon-only`]: {
  15367. fontSize: n
  15368. }
  15369. },
  15370. // Border Color
  15371. s5(`${e}-primary`, i),
  15372. s5(`${e}-danger`, a)
  15373. ]
  15374. };
  15375. };
  15376. function w1e(t, e) {
  15377. return {
  15378. // border collapse
  15379. [`&-item:not(${e}-last-item)`]: {
  15380. marginBottom: -t.lineWidth
  15381. },
  15382. "&-item": {
  15383. "&:hover,&:focus,&:active": {
  15384. zIndex: 2
  15385. },
  15386. "&[disabled]": {
  15387. zIndex: 0
  15388. }
  15389. }
  15390. };
  15391. }
  15392. function C1e(t, e) {
  15393. return {
  15394. [`&-item:not(${e}-first-item):not(${e}-last-item)`]: {
  15395. borderRadius: 0
  15396. },
  15397. [`&-item${e}-first-item:not(${e}-last-item)`]: {
  15398. [`&, &${t}-sm, &${t}-lg`]: {
  15399. borderEndEndRadius: 0,
  15400. borderEndStartRadius: 0
  15401. }
  15402. },
  15403. [`&-item${e}-last-item:not(${e}-first-item)`]: {
  15404. [`&, &${t}-sm, &${t}-lg`]: {
  15405. borderStartStartRadius: 0,
  15406. borderStartEndRadius: 0
  15407. }
  15408. }
  15409. };
  15410. }
  15411. function T1e(t) {
  15412. const e = `${t.componentCls}-compact-vertical`;
  15413. return {
  15414. [e]: I(I({}, w1e(t, e)), C1e(t.componentCls, e))
  15415. };
  15416. }
  15417. const P1e = (t) => {
  15418. const {
  15419. componentCls: e,
  15420. iconCls: n
  15421. } = t;
  15422. return {
  15423. [e]: {
  15424. outline: "none",
  15425. position: "relative",
  15426. display: "inline-block",
  15427. fontWeight: 400,
  15428. whiteSpace: "nowrap",
  15429. textAlign: "center",
  15430. backgroundImage: "none",
  15431. backgroundColor: "transparent",
  15432. border: `${t.lineWidth}px ${t.lineType} transparent`,
  15433. cursor: "pointer",
  15434. transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
  15435. userSelect: "none",
  15436. touchAction: "manipulation",
  15437. lineHeight: t.lineHeight,
  15438. color: t.colorText,
  15439. "> span": {
  15440. display: "inline-block"
  15441. },
  15442. // Leave a space between icon and text.
  15443. [`> ${n} + span, > span + ${n}`]: {
  15444. marginInlineStart: t.marginXS
  15445. },
  15446. "> a": {
  15447. color: "currentColor"
  15448. },
  15449. "&:not(:disabled)": I({}, VS(t)),
  15450. // make `btn-icon-only` not too narrow
  15451. [`&-icon-only${e}-compact-item`]: {
  15452. flex: "none"
  15453. },
  15454. // Special styles for Primary Button
  15455. [`&-compact-item${e}-primary`]: {
  15456. [`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]: {
  15457. position: "relative",
  15458. "&:before": {
  15459. position: "absolute",
  15460. top: -t.lineWidth,
  15461. insetInlineStart: -t.lineWidth,
  15462. display: "inline-block",
  15463. width: t.lineWidth,
  15464. height: `calc(100% + ${t.lineWidth * 2}px)`,
  15465. backgroundColor: t.colorPrimaryHover,
  15466. content: '""'
  15467. }
  15468. }
  15469. },
  15470. // Special styles for Primary Button
  15471. "&-compact-vertical-item": {
  15472. [`&${e}-primary`]: {
  15473. [`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]: {
  15474. position: "relative",
  15475. "&:before": {
  15476. position: "absolute",
  15477. top: -t.lineWidth,
  15478. insetInlineStart: -t.lineWidth,
  15479. display: "inline-block",
  15480. width: `calc(100% + ${t.lineWidth * 2}px)`,
  15481. height: t.lineWidth,
  15482. backgroundColor: t.colorPrimaryHover,
  15483. content: '""'
  15484. }
  15485. }
  15486. }
  15487. }
  15488. }
  15489. };
  15490. }, Vs = (t, e) => ({
  15491. "&:not(:disabled)": {
  15492. "&:hover": t,
  15493. "&:active": e
  15494. }
  15495. }), $1e = (t) => ({
  15496. minWidth: t.controlHeight,
  15497. paddingInlineStart: 0,
  15498. paddingInlineEnd: 0,
  15499. borderRadius: "50%"
  15500. }), A1e = (t) => ({
  15501. borderRadius: t.controlHeight,
  15502. paddingInlineStart: t.controlHeight / 2,
  15503. paddingInlineEnd: t.controlHeight / 2
  15504. }), k2 = (t) => ({
  15505. cursor: "not-allowed",
  15506. borderColor: t.colorBorder,
  15507. color: t.colorTextDisabled,
  15508. backgroundColor: t.colorBgContainerDisabled,
  15509. boxShadow: "none"
  15510. }), I1 = (t, e, n, r, i, a, o) => ({
  15511. [`&${t}-background-ghost`]: I(I({
  15512. color: e || void 0,
  15513. backgroundColor: "transparent",
  15514. borderColor: n || void 0,
  15515. boxShadow: "none"
  15516. }, Vs(I({
  15517. backgroundColor: "transparent"
  15518. }, a), I({
  15519. backgroundColor: "transparent"
  15520. }, o))), {
  15521. "&:disabled": {
  15522. cursor: "not-allowed",
  15523. color: r || void 0,
  15524. borderColor: i || void 0
  15525. }
  15526. })
  15527. }), nD = (t) => ({
  15528. "&:disabled": I({}, k2(t))
  15529. }), NU = (t) => I({}, nD(t)), D1 = (t) => ({
  15530. "&:disabled": {
  15531. cursor: "not-allowed",
  15532. color: t.colorTextDisabled
  15533. }
  15534. }), BU = (t) => I(I(I(I(I({}, NU(t)), {
  15535. backgroundColor: t.colorBgContainer,
  15536. borderColor: t.colorBorder,
  15537. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`
  15538. }), Vs({
  15539. color: t.colorPrimaryHover,
  15540. borderColor: t.colorPrimaryHover
  15541. }, {
  15542. color: t.colorPrimaryActive,
  15543. borderColor: t.colorPrimaryActive
  15544. })), I1(t.componentCls, t.colorBgContainer, t.colorBgContainer, t.colorTextDisabled, t.colorBorder)), {
  15545. [`&${t.componentCls}-dangerous`]: I(I(I({
  15546. color: t.colorError,
  15547. borderColor: t.colorError
  15548. }, Vs({
  15549. color: t.colorErrorHover,
  15550. borderColor: t.colorErrorBorderHover
  15551. }, {
  15552. color: t.colorErrorActive,
  15553. borderColor: t.colorErrorActive
  15554. })), I1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder)), nD(t))
  15555. }), E1e = (t) => I(I(I(I(I({}, NU(t)), {
  15556. color: t.colorTextLightSolid,
  15557. backgroundColor: t.colorPrimary,
  15558. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`
  15559. }), Vs({
  15560. color: t.colorTextLightSolid,
  15561. backgroundColor: t.colorPrimaryHover
  15562. }, {
  15563. color: t.colorTextLightSolid,
  15564. backgroundColor: t.colorPrimaryActive
  15565. })), I1(t.componentCls, t.colorPrimary, t.colorPrimary, t.colorTextDisabled, t.colorBorder, {
  15566. color: t.colorPrimaryHover,
  15567. borderColor: t.colorPrimaryHover
  15568. }, {
  15569. color: t.colorPrimaryActive,
  15570. borderColor: t.colorPrimaryActive
  15571. })), {
  15572. [`&${t.componentCls}-dangerous`]: I(I(I({
  15573. backgroundColor: t.colorError,
  15574. boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`
  15575. }, Vs({
  15576. backgroundColor: t.colorErrorHover
  15577. }, {
  15578. backgroundColor: t.colorErrorActive
  15579. })), I1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder, {
  15580. color: t.colorErrorHover,
  15581. borderColor: t.colorErrorHover
  15582. }, {
  15583. color: t.colorErrorActive,
  15584. borderColor: t.colorErrorActive
  15585. })), nD(t))
  15586. }), M1e = (t) => I(I({}, BU(t)), {
  15587. borderStyle: "dashed"
  15588. }), I1e = (t) => I(I(I({
  15589. color: t.colorLink
  15590. }, Vs({
  15591. color: t.colorLinkHover
  15592. }, {
  15593. color: t.colorLinkActive
  15594. })), D1(t)), {
  15595. [`&${t.componentCls}-dangerous`]: I(I({
  15596. color: t.colorError
  15597. }, Vs({
  15598. color: t.colorErrorHover
  15599. }, {
  15600. color: t.colorErrorActive
  15601. })), D1(t))
  15602. }), D1e = (t) => I(I(I({}, Vs({
  15603. color: t.colorText,
  15604. backgroundColor: t.colorBgTextHover
  15605. }, {
  15606. color: t.colorText,
  15607. backgroundColor: t.colorBgTextActive
  15608. })), D1(t)), {
  15609. [`&${t.componentCls}-dangerous`]: I(I({
  15610. color: t.colorError
  15611. }, D1(t)), Vs({
  15612. color: t.colorErrorHover,
  15613. backgroundColor: t.colorErrorBg
  15614. }, {
  15615. color: t.colorErrorHover,
  15616. backgroundColor: t.colorErrorBg
  15617. }))
  15618. }), R1e = (t) => I(I({}, k2(t)), {
  15619. [`&${t.componentCls}:hover`]: I({}, k2(t))
  15620. }), k1e = (t) => {
  15621. const {
  15622. componentCls: e
  15623. } = t;
  15624. return {
  15625. [`${e}-default`]: BU(t),
  15626. [`${e}-primary`]: E1e(t),
  15627. [`${e}-dashed`]: M1e(t),
  15628. [`${e}-link`]: I1e(t),
  15629. [`${e}-text`]: D1e(t),
  15630. [`${e}-disabled`]: R1e(t)
  15631. };
  15632. }, rD = function(t) {
  15633. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  15634. const {
  15635. componentCls: n,
  15636. iconCls: r,
  15637. controlHeight: i,
  15638. fontSize: a,
  15639. lineHeight: o,
  15640. lineWidth: s,
  15641. borderRadius: l,
  15642. buttonPaddingHorizontal: u
  15643. } = t, c = Math.max(0, (i - a * o) / 2 - s), f = u - s, d = `${n}-icon-only`;
  15644. return [
  15645. // Size
  15646. {
  15647. [`${n}${e}`]: {
  15648. fontSize: a,
  15649. height: i,
  15650. padding: `${c}px ${f}px`,
  15651. borderRadius: l,
  15652. [`&${d}`]: {
  15653. width: i,
  15654. paddingInlineStart: 0,
  15655. paddingInlineEnd: 0,
  15656. [`&${n}-round`]: {
  15657. width: "auto"
  15658. },
  15659. "> span": {
  15660. transform: "scale(1.143)"
  15661. // 14px -> 16px
  15662. }
  15663. },
  15664. // Loading
  15665. [`&${n}-loading`]: {
  15666. opacity: t.opacityLoading,
  15667. cursor: "default"
  15668. },
  15669. [`${n}-loading-icon`]: {
  15670. transition: `width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`
  15671. },
  15672. [`&:not(${d}) ${n}-loading-icon > ${r}`]: {
  15673. marginInlineEnd: t.marginXS
  15674. }
  15675. }
  15676. },
  15677. // Shape - patch prefixCls again to override solid border radius style
  15678. {
  15679. [`${n}${n}-circle${e}`]: $1e(t)
  15680. },
  15681. {
  15682. [`${n}${n}-round${e}`]: A1e(t)
  15683. }
  15684. ];
  15685. }, L1e = (t) => rD(t), N1e = (t) => {
  15686. const e = Bt(t, {
  15687. controlHeight: t.controlHeightSM,
  15688. padding: t.paddingXS,
  15689. buttonPaddingHorizontal: 8,
  15690. borderRadius: t.borderRadiusSM
  15691. });
  15692. return rD(e, `${t.componentCls}-sm`);
  15693. }, B1e = (t) => {
  15694. const e = Bt(t, {
  15695. controlHeight: t.controlHeightLG,
  15696. fontSize: t.fontSizeLG,
  15697. borderRadius: t.borderRadiusLG
  15698. });
  15699. return rD(e, `${t.componentCls}-lg`);
  15700. }, z1e = (t) => {
  15701. const {
  15702. componentCls: e
  15703. } = t;
  15704. return {
  15705. [e]: {
  15706. [`&${e}-block`]: {
  15707. width: "100%"
  15708. }
  15709. }
  15710. };
  15711. }, V1e = Sn("Button", (t) => {
  15712. const {
  15713. controlTmpOutline: e,
  15714. paddingContentHorizontal: n
  15715. } = t, r = Bt(t, {
  15716. colorOutlineDefault: e,
  15717. buttonPaddingHorizontal: n
  15718. });
  15719. return [
  15720. // Shared
  15721. P1e(r),
  15722. // Size
  15723. N1e(r),
  15724. L1e(r),
  15725. B1e(r),
  15726. // Block
  15727. z1e(r),
  15728. // Group (type, ghost, danger, disabled, loading)
  15729. k1e(r),
  15730. // Button Group
  15731. x1e(r),
  15732. // Space Compact
  15733. cx(t, {
  15734. focus: !1
  15735. }),
  15736. T1e(t)
  15737. ];
  15738. }), F1e = () => ({
  15739. prefixCls: String,
  15740. size: {
  15741. type: String
  15742. }
  15743. }), zU = BI(), L2 = te({
  15744. compatConfig: {
  15745. MODE: 3
  15746. },
  15747. name: "AButtonGroup",
  15748. props: F1e(),
  15749. setup(t, e) {
  15750. let {
  15751. slots: n
  15752. } = e;
  15753. const {
  15754. prefixCls: r,
  15755. direction: i
  15756. } = It("btn-group", t), [, , a] = ap();
  15757. zU.useProvide(tn({
  15758. size: L(() => t.size)
  15759. }));
  15760. const o = L(() => {
  15761. const {
  15762. size: s
  15763. } = t;
  15764. let l = "";
  15765. switch (s) {
  15766. case "large":
  15767. l = "lg";
  15768. break;
  15769. case "small":
  15770. l = "sm";
  15771. break;
  15772. case "middle":
  15773. case void 0:
  15774. break;
  15775. default:
  15776. Qi(!s, "Button.Group", "Invalid prop `size`.");
  15777. }
  15778. return {
  15779. [`${r.value}`]: !0,
  15780. [`${r.value}-${l}`]: l,
  15781. [`${r.value}-rtl`]: i.value === "rtl",
  15782. [a.value]: !0
  15783. };
  15784. });
  15785. return () => {
  15786. var s;
  15787. return M("div", {
  15788. class: o.value
  15789. }, [Yn((s = n.default) === null || s === void 0 ? void 0 : s.call(n))]);
  15790. };
  15791. }
  15792. }), l5 = /^[\u4e00-\u9fa5]{2}$/, u5 = l5.test.bind(l5);
  15793. function Ey(t) {
  15794. return t === "text" || t === "link";
  15795. }
  15796. const Ur = te({
  15797. compatConfig: {
  15798. MODE: 3
  15799. },
  15800. name: "AButton",
  15801. inheritAttrs: !1,
  15802. __ANT_BUTTON: !0,
  15803. props: sr(O1e(), {
  15804. type: "default"
  15805. }),
  15806. slots: Object,
  15807. // emits: ['click', 'mousedown'],
  15808. setup(t, e) {
  15809. let {
  15810. slots: n,
  15811. attrs: r,
  15812. emit: i,
  15813. expose: a
  15814. } = e;
  15815. const {
  15816. prefixCls: o,
  15817. autoInsertSpaceInButton: s,
  15818. direction: l,
  15819. size: u
  15820. } = It("btn", t), [c, f] = V1e(o), d = zU.useInject(), h = Ko(), p = L(() => {
  15821. var E;
  15822. return (E = t.disabled) !== null && E !== void 0 ? E : h.value;
  15823. }), v = ae(null), g = ae(void 0);
  15824. let m = !1;
  15825. const y = ae(!1), b = ae(!1), _ = L(() => s.value !== !1), {
  15826. compactSize: O,
  15827. compactItemClassnames: S
  15828. } = sx(o, l), x = L(() => typeof t.loading == "object" && t.loading.delay ? t.loading.delay || !0 : !!t.loading);
  15829. se(x, (E) => {
  15830. clearTimeout(g.value), typeof x.value == "number" ? g.value = setTimeout(() => {
  15831. y.value = E;
  15832. }, x.value) : y.value = E;
  15833. }, {
  15834. immediate: !0
  15835. });
  15836. const C = L(() => {
  15837. const {
  15838. type: E,
  15839. shape: R = "default",
  15840. ghost: N,
  15841. block: V,
  15842. danger: z
  15843. } = t, W = o.value, F = {
  15844. large: "lg",
  15845. small: "sm",
  15846. middle: void 0
  15847. }, Q = O.value || (d == null ? void 0 : d.size) || u.value, Z = Q && F[Q] || "";
  15848. return [S.value, {
  15849. [f.value]: !0,
  15850. [`${W}`]: !0,
  15851. [`${W}-${R}`]: R !== "default" && R,
  15852. [`${W}-${E}`]: E,
  15853. [`${W}-${Z}`]: Z,
  15854. [`${W}-loading`]: y.value,
  15855. [`${W}-background-ghost`]: N && !Ey(E),
  15856. [`${W}-two-chinese-chars`]: b.value && _.value,
  15857. [`${W}-block`]: V,
  15858. [`${W}-dangerous`]: !!z,
  15859. [`${W}-rtl`]: l.value === "rtl"
  15860. }];
  15861. }), T = () => {
  15862. const E = v.value;
  15863. if (!E || s.value === !1)
  15864. return;
  15865. const R = E.textContent;
  15866. m && u5(R) ? b.value || (b.value = !0) : b.value && (b.value = !1);
  15867. }, w = (E) => {
  15868. if (y.value || p.value) {
  15869. E.preventDefault();
  15870. return;
  15871. }
  15872. i("click", E);
  15873. }, P = (E) => {
  15874. i("mousedown", E);
  15875. }, $ = (E, R) => {
  15876. const N = R ? " " : "";
  15877. if (E.type === TS) {
  15878. let V = E.children.trim();
  15879. return u5(V) && (V = V.split("").join(N)), M("span", null, [V]);
  15880. }
  15881. return E;
  15882. };
  15883. return ht(() => {
  15884. Qi(!(t.ghost && Ey(t.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
  15885. }), it(T), ep(T), yt(() => {
  15886. g.value && clearTimeout(g.value);
  15887. }), a({
  15888. focus: () => {
  15889. var E;
  15890. (E = v.value) === null || E === void 0 || E.focus();
  15891. },
  15892. blur: () => {
  15893. var E;
  15894. (E = v.value) === null || E === void 0 || E.blur();
  15895. }
  15896. }), () => {
  15897. var E, R;
  15898. const {
  15899. icon: N = (E = n.icon) === null || E === void 0 ? void 0 : E.call(n)
  15900. } = t, V = Yn((R = n.default) === null || R === void 0 ? void 0 : R.call(n));
  15901. m = V.length === 1 && !N && !Ey(t.type);
  15902. const {
  15903. type: z,
  15904. htmlType: W,
  15905. href: F,
  15906. title: Q,
  15907. target: Z
  15908. } = t, ne = y.value ? "loading" : N, ee = I(I({}, r), {
  15909. title: Q,
  15910. disabled: p.value,
  15911. class: [C.value, r.class, {
  15912. [`${o.value}-icon-only`]: V.length === 0 && !!ne
  15913. }],
  15914. onClick: w,
  15915. onMousedown: P
  15916. });
  15917. p.value || delete ee.disabled;
  15918. const oe = N && !y.value ? N : M(S1e, {
  15919. existIcon: !!N,
  15920. prefixCls: o.value,
  15921. loading: !!y.value
  15922. }, null), K = V.map((X) => $(X, m && _.value));
  15923. if (F !== void 0)
  15924. return c(M("a", j(j({}, ee), {}, {
  15925. href: F,
  15926. target: Z,
  15927. ref: v
  15928. }), [oe, K]));
  15929. let ie = M("button", j(j({}, ee), {}, {
  15930. ref: v,
  15931. type: W
  15932. }), [oe, K]);
  15933. if (!Ey(z)) {
  15934. const X = /* @__PURE__ */ function() {
  15935. return ie;
  15936. }();
  15937. ie = M(_1e, {
  15938. ref: "wave",
  15939. disabled: !!y.value
  15940. }, {
  15941. default: () => [X]
  15942. });
  15943. }
  15944. return c(ie);
  15945. };
  15946. }
  15947. });
  15948. Ur.Group = L2;
  15949. Ur.install = function(t) {
  15950. return t.component(Ur.name, Ur), t.component(L2.name, L2), t;
  15951. };
  15952. var W1e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
  15953. function c5(t) {
  15954. for (var e = 1; e < arguments.length; e++) {
  15955. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  15956. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  15957. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  15958. }))), r.forEach(function(i) {
  15959. Q1e(t, i, n[i]);
  15960. });
  15961. }
  15962. return t;
  15963. }
  15964. function Q1e(t, e, n) {
  15965. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  15966. }
  15967. var hx = function(e, n) {
  15968. var r = c5({}, e, n.attrs);
  15969. return M(lt, c5({}, r, {
  15970. icon: W1e
  15971. }), null);
  15972. };
  15973. hx.displayName = "EllipsisOutlined";
  15974. hx.inheritAttrs = !1;
  15975. var H1e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
  15976. function f5(t) {
  15977. for (var e = 1; e < arguments.length; e++) {
  15978. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  15979. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  15980. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  15981. }))), r.forEach(function(i) {
  15982. G1e(t, i, n[i]);
  15983. });
  15984. }
  15985. return t;
  15986. }
  15987. function G1e(t, e, n) {
  15988. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  15989. }
  15990. var px = function(e, n) {
  15991. var r = f5({}, e, n.attrs);
  15992. return M(lt, f5({}, r, {
  15993. icon: H1e
  15994. }), null);
  15995. };
  15996. px.displayName = "RightOutlined";
  15997. px.inheritAttrs = !1;
  15998. const VU = Symbol("OverrideContextKey"), FU = () => Ge(VU, void 0), j1e = (t) => {
  15999. var e, n, r;
  16000. const {
  16001. prefixCls: i,
  16002. mode: a,
  16003. selectable: o,
  16004. validator: s,
  16005. onClick: l,
  16006. expandIcon: u
  16007. } = FU() || {};
  16008. pt(VU, {
  16009. prefixCls: L(() => {
  16010. var c, f;
  16011. return (f = (c = t.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : i == null ? void 0 : i.value;
  16012. }),
  16013. mode: L(() => {
  16014. var c, f;
  16015. return (f = (c = t.mode) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : a == null ? void 0 : a.value;
  16016. }),
  16017. selectable: L(() => {
  16018. var c, f;
  16019. return (f = (c = t.selectable) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : o == null ? void 0 : o.value;
  16020. }),
  16021. validator: (e = t.validator) !== null && e !== void 0 ? e : s,
  16022. onClick: (n = t.onClick) !== null && n !== void 0 ? n : l,
  16023. expandIcon: (r = t.expandIcon) !== null && r !== void 0 ? r : u == null ? void 0 : u.value
  16024. });
  16025. };
  16026. function Z1e(t, e, n, r) {
  16027. let i;
  16028. if (i !== void 0)
  16029. return !!i;
  16030. if (t === e)
  16031. return !0;
  16032. if (typeof t != "object" || !t || typeof e != "object" || !e)
  16033. return !1;
  16034. const a = Object.keys(t), o = Object.keys(e);
  16035. if (a.length !== o.length)
  16036. return !1;
  16037. const s = Object.prototype.hasOwnProperty.bind(e);
  16038. for (let l = 0; l < a.length; l++) {
  16039. const u = a[l];
  16040. if (!s(u))
  16041. return !1;
  16042. const c = t[u], f = e[u];
  16043. if (i = void 0, i === !1 || i === void 0 && c !== f)
  16044. return !1;
  16045. }
  16046. return !0;
  16047. }
  16048. function Zp(t, e) {
  16049. return Z1e(qo(t), qo(e));
  16050. }
  16051. const WU = Symbol("menuContextKey"), QU = (t) => {
  16052. pt(WU, t);
  16053. }, ol = () => Ge(WU), HU = Symbol("ForceRenderKey"), U1e = (t) => {
  16054. pt(HU, t);
  16055. }, GU = () => Ge(HU, !1), jU = Symbol("menuFirstLevelContextKey"), ZU = (t) => {
  16056. pt(jU, t);
  16057. }, X1e = () => Ge(jU, !0), R1 = te({
  16058. compatConfig: {
  16059. MODE: 3
  16060. },
  16061. name: "MenuContextProvider",
  16062. inheritAttrs: !1,
  16063. props: {
  16064. mode: {
  16065. type: String,
  16066. default: void 0
  16067. },
  16068. overflowDisabled: {
  16069. type: Boolean,
  16070. default: void 0
  16071. }
  16072. },
  16073. setup(t, e) {
  16074. let {
  16075. slots: n
  16076. } = e;
  16077. const r = ol(), i = I({}, r);
  16078. return t.mode !== void 0 && (i.mode = Nn(t, "mode")), t.overflowDisabled !== void 0 && (i.overflowDisabled = Nn(t, "overflowDisabled")), QU(i), () => {
  16079. var a;
  16080. return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
  16081. };
  16082. }
  16083. }), Y1e = QU, q1e = Symbol("siderCollapsed"), My = "$$__vc-menu-more__key", UU = Symbol("KeyPathContext"), iD = () => Ge(UU, {
  16084. parentEventKeys: L(() => []),
  16085. parentKeys: L(() => []),
  16086. parentInfo: {}
  16087. }), K1e = (t, e, n) => {
  16088. const {
  16089. parentEventKeys: r,
  16090. parentKeys: i
  16091. } = iD(), a = L(() => [...r.value, t]), o = L(() => [...i.value, e]);
  16092. return pt(UU, {
  16093. parentEventKeys: a,
  16094. parentKeys: o,
  16095. parentInfo: n
  16096. }), o;
  16097. }, XU = Symbol("measure"), d5 = te({
  16098. compatConfig: {
  16099. MODE: 3
  16100. },
  16101. setup(t, e) {
  16102. let {
  16103. slots: n
  16104. } = e;
  16105. return pt(XU, !0), () => {
  16106. var r;
  16107. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  16108. };
  16109. }
  16110. }), aD = () => Ge(XU, !1), J1e = K1e;
  16111. function YU(t) {
  16112. const {
  16113. mode: e,
  16114. rtl: n,
  16115. inlineIndent: r
  16116. } = ol();
  16117. return L(() => e.value !== "inline" ? null : n.value ? {
  16118. paddingRight: `${t.value * r.value}px`
  16119. } : {
  16120. paddingLeft: `${t.value * r.value}px`
  16121. });
  16122. }
  16123. let eOe = 0;
  16124. const tOe = () => ({
  16125. id: String,
  16126. role: String,
  16127. disabled: Boolean,
  16128. danger: Boolean,
  16129. title: {
  16130. type: [String, Boolean],
  16131. default: void 0
  16132. },
  16133. icon: Y.any,
  16134. onMouseenter: Function,
  16135. onMouseleave: Function,
  16136. onClick: Function,
  16137. onKeydown: Function,
  16138. onFocus: Function,
  16139. // Internal user prop
  16140. originItemValue: $t()
  16141. }), Th = te({
  16142. compatConfig: {
  16143. MODE: 3
  16144. },
  16145. name: "AMenuItem",
  16146. inheritAttrs: !1,
  16147. props: tOe(),
  16148. slots: Object,
  16149. setup(t, e) {
  16150. let {
  16151. slots: n,
  16152. emit: r,
  16153. attrs: i
  16154. } = e;
  16155. const a = vn(), o = aD(), s = typeof a.vnode.key == "symbol" ? String(a.vnode.key) : a.vnode.key;
  16156. Qi(typeof a.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(s)}"\` not support Symbol type`);
  16157. const l = `menu_item_${++eOe}_$$_${s}`, {
  16158. parentEventKeys: u,
  16159. parentKeys: c
  16160. } = iD(), {
  16161. prefixCls: f,
  16162. activeKeys: d,
  16163. disabled: h,
  16164. changeActiveKeys: p,
  16165. rtl: v,
  16166. inlineCollapsed: g,
  16167. siderCollapsed: m,
  16168. onItemClick: y,
  16169. selectedKeys: b,
  16170. registerMenuInfo: _,
  16171. unRegisterMenuInfo: O
  16172. } = ol(), S = X1e(), x = ae(!1), C = L(() => [...c.value, s]);
  16173. _(l, {
  16174. eventKey: l,
  16175. key: s,
  16176. parentEventKeys: u,
  16177. parentKeys: c,
  16178. isLeaf: !0
  16179. }), yt(() => {
  16180. O(l);
  16181. }), se(d, () => {
  16182. x.value = !!d.value.find((F) => F === s);
  16183. }, {
  16184. immediate: !0
  16185. });
  16186. const w = L(() => h.value || t.disabled), P = L(() => b.value.includes(s)), $ = L(() => {
  16187. const F = `${f.value}-item`;
  16188. return {
  16189. [`${F}`]: !0,
  16190. [`${F}-danger`]: t.danger,
  16191. [`${F}-active`]: x.value,
  16192. [`${F}-selected`]: P.value,
  16193. [`${F}-disabled`]: w.value
  16194. };
  16195. }), A = (F) => ({
  16196. key: s,
  16197. eventKey: l,
  16198. keyPath: C.value,
  16199. eventKeyPath: [...u.value, l],
  16200. domEvent: F,
  16201. item: I(I({}, t), i)
  16202. }), D = (F) => {
  16203. if (w.value)
  16204. return;
  16205. const Q = A(F);
  16206. r("click", F), y(Q);
  16207. }, E = (F) => {
  16208. w.value || (p(C.value), r("mouseenter", F));
  16209. }, R = (F) => {
  16210. w.value || (p([]), r("mouseleave", F));
  16211. }, N = (F) => {
  16212. if (r("keydown", F), F.which === ge.ENTER) {
  16213. const Q = A(F);
  16214. r("click", F), y(Q);
  16215. }
  16216. }, V = (F) => {
  16217. p(C.value), r("focus", F);
  16218. }, z = (F, Q) => {
  16219. const Z = M("span", {
  16220. class: `${f.value}-title-content`
  16221. }, [Q]);
  16222. return (!F || Ui(Q) && Q.type === "span") && Q && g.value && S && typeof Q == "string" ? M("div", {
  16223. class: `${f.value}-inline-collapsed-noicon`
  16224. }, [Q.charAt(0)]) : Z;
  16225. }, W = YU(L(() => C.value.length));
  16226. return () => {
  16227. var F, Q, Z, ne, ee;
  16228. if (o) return null;
  16229. const oe = (F = t.title) !== null && F !== void 0 ? F : (Q = n.title) === null || Q === void 0 ? void 0 : Q.call(n), K = Yn((Z = n.default) === null || Z === void 0 ? void 0 : Z.call(n)), ie = K.length;
  16230. let X = oe;
  16231. typeof oe > "u" ? X = S && ie ? K : "" : oe === !1 && (X = "");
  16232. const H = {
  16233. title: X
  16234. };
  16235. !m.value && !g.value && (H.title = null, H.open = !1);
  16236. const G = {};
  16237. t.role === "option" && (G["aria-selected"] = P.value);
  16238. const re = (ne = t.icon) !== null && ne !== void 0 ? ne : (ee = n.icon) === null || ee === void 0 ? void 0 : ee.call(n, t);
  16239. return M(dx, j(j({}, H), {}, {
  16240. placement: v.value ? "left" : "right",
  16241. overlayClassName: `${f.value}-inline-collapsed-tooltip`
  16242. }), {
  16243. default: () => [M(Ms.Item, j(j(j({
  16244. component: "li"
  16245. }, i), {}, {
  16246. id: t.id,
  16247. style: I(I({}, i.style || {}), W.value),
  16248. class: [$.value, {
  16249. [`${i.class}`]: !!i.class,
  16250. [`${f.value}-item-only-child`]: (re ? ie + 1 : ie) === 1
  16251. }],
  16252. role: t.role || "menuitem",
  16253. tabindex: t.disabled ? null : -1,
  16254. "data-menu-id": s,
  16255. "aria-disabled": t.disabled
  16256. }, G), {}, {
  16257. onMouseenter: E,
  16258. onMouseleave: R,
  16259. onClick: D,
  16260. onKeydown: N,
  16261. onFocus: V,
  16262. title: typeof oe == "string" ? oe : void 0
  16263. }), {
  16264. default: () => [Pn(typeof re == "function" ? re(t.originItemValue) : re, {
  16265. class: `${f.value}-item-icon`
  16266. }, !1), z(re, K)]
  16267. })]
  16268. });
  16269. };
  16270. }
  16271. }), Dl = {
  16272. adjustX: 1,
  16273. adjustY: 1
  16274. }, nOe = {
  16275. topLeft: {
  16276. points: ["bl", "tl"],
  16277. overflow: Dl,
  16278. offset: [0, -7]
  16279. },
  16280. bottomLeft: {
  16281. points: ["tl", "bl"],
  16282. overflow: Dl,
  16283. offset: [0, 7]
  16284. },
  16285. leftTop: {
  16286. points: ["tr", "tl"],
  16287. overflow: Dl,
  16288. offset: [-4, 0]
  16289. },
  16290. rightTop: {
  16291. points: ["tl", "tr"],
  16292. overflow: Dl,
  16293. offset: [4, 0]
  16294. }
  16295. }, rOe = {
  16296. topLeft: {
  16297. points: ["bl", "tl"],
  16298. overflow: Dl,
  16299. offset: [0, -7]
  16300. },
  16301. bottomLeft: {
  16302. points: ["tl", "bl"],
  16303. overflow: Dl,
  16304. offset: [0, 7]
  16305. },
  16306. rightTop: {
  16307. points: ["tr", "tl"],
  16308. overflow: Dl,
  16309. offset: [-4, 0]
  16310. },
  16311. leftTop: {
  16312. points: ["tl", "tr"],
  16313. overflow: Dl,
  16314. offset: [4, 0]
  16315. }
  16316. }, iOe = {
  16317. horizontal: "bottomLeft",
  16318. vertical: "rightTop",
  16319. "vertical-left": "rightTop",
  16320. "vertical-right": "leftTop"
  16321. }, h5 = te({
  16322. compatConfig: {
  16323. MODE: 3
  16324. },
  16325. name: "PopupTrigger",
  16326. inheritAttrs: !1,
  16327. props: {
  16328. prefixCls: String,
  16329. mode: String,
  16330. visible: Boolean,
  16331. // popup: React.ReactNode;
  16332. popupClassName: String,
  16333. popupOffset: Array,
  16334. disabled: Boolean,
  16335. onVisibleChange: Function
  16336. },
  16337. slots: Object,
  16338. emits: ["visibleChange"],
  16339. setup(t, e) {
  16340. let {
  16341. slots: n,
  16342. emit: r
  16343. } = e;
  16344. const i = ae(!1), {
  16345. getPopupContainer: a,
  16346. rtl: o,
  16347. subMenuOpenDelay: s,
  16348. subMenuCloseDelay: l,
  16349. builtinPlacements: u,
  16350. triggerSubMenuAction: c,
  16351. forceSubMenuRender: f,
  16352. motion: d,
  16353. defaultMotions: h,
  16354. rootClassName: p
  16355. } = ol(), v = GU(), g = L(() => o.value ? I(I({}, rOe), u.value) : I(I({}, nOe), u.value)), m = L(() => iOe[t.mode]), y = ae();
  16356. se(() => t.visible, (O) => {
  16357. xt.cancel(y.value), y.value = xt(() => {
  16358. i.value = O;
  16359. });
  16360. }, {
  16361. immediate: !0
  16362. }), yt(() => {
  16363. xt.cancel(y.value);
  16364. });
  16365. const b = (O) => {
  16366. r("visibleChange", O);
  16367. }, _ = L(() => {
  16368. var O, S;
  16369. const x = d.value || ((O = h.value) === null || O === void 0 ? void 0 : O[t.mode]) || ((S = h.value) === null || S === void 0 ? void 0 : S.other), C = typeof x == "function" ? x() : x;
  16370. return C ? g0(C.name, {
  16371. css: !0
  16372. }) : void 0;
  16373. });
  16374. return () => {
  16375. const {
  16376. prefixCls: O,
  16377. popupClassName: S,
  16378. mode: x,
  16379. popupOffset: C,
  16380. disabled: T
  16381. } = t;
  16382. return M(KS, {
  16383. prefixCls: O,
  16384. popupClassName: ye(`${O}-popup`, {
  16385. [`${O}-rtl`]: o.value
  16386. }, S, p.value),
  16387. stretch: x === "horizontal" ? "minWidth" : null,
  16388. getPopupContainer: a.value,
  16389. builtinPlacements: g.value,
  16390. popupPlacement: m.value,
  16391. popupVisible: i.value,
  16392. popupAlign: C && {
  16393. offset: C
  16394. },
  16395. action: T ? [] : [c.value],
  16396. mouseEnterDelay: s.value,
  16397. mouseLeaveDelay: l.value,
  16398. onPopupVisibleChange: b,
  16399. forceRender: v || f.value,
  16400. popupAnimation: _.value
  16401. }, {
  16402. popup: n.popup,
  16403. default: n.default
  16404. });
  16405. };
  16406. }
  16407. }), oD = (t, e) => {
  16408. let {
  16409. slots: n,
  16410. attrs: r
  16411. } = e;
  16412. var i;
  16413. const {
  16414. prefixCls: a,
  16415. mode: o
  16416. } = ol();
  16417. return M("ul", j(j({}, r), {}, {
  16418. class: ye(a.value, `${a.value}-sub`, `${a.value}-${o.value === "inline" ? "inline" : "vertical"}`),
  16419. "data-menu-list": !0
  16420. }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
  16421. };
  16422. oD.displayName = "SubMenuList";
  16423. const aOe = te({
  16424. compatConfig: {
  16425. MODE: 3
  16426. },
  16427. name: "InlineSubMenuList",
  16428. inheritAttrs: !1,
  16429. props: {
  16430. id: String,
  16431. open: Boolean,
  16432. keyPath: Array
  16433. },
  16434. setup(t, e) {
  16435. let {
  16436. slots: n
  16437. } = e;
  16438. const r = L(() => "inline"), {
  16439. motion: i,
  16440. mode: a,
  16441. defaultMotions: o
  16442. } = ol(), s = L(() => a.value === r.value), l = U(!s.value), u = L(() => s.value ? t.open : !1);
  16443. se(a, () => {
  16444. s.value && (l.value = !1);
  16445. }, {
  16446. flush: "post"
  16447. });
  16448. const c = L(() => {
  16449. var f, d;
  16450. const h = i.value || ((f = o.value) === null || f === void 0 ? void 0 : f[r.value]) || ((d = o.value) === null || d === void 0 ? void 0 : d.other), p = typeof h == "function" ? h() : h;
  16451. return I(I({}, p), {
  16452. appear: t.keyPath.length <= 1
  16453. });
  16454. });
  16455. return () => {
  16456. var f;
  16457. return l.value ? null : M(R1, {
  16458. mode: r.value
  16459. }, {
  16460. default: () => [M(co, c.value, {
  16461. default: () => [bi(M(oD, {
  16462. id: t.id
  16463. }, {
  16464. default: () => [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]
  16465. }), [[Bs, u.value]])]
  16466. })]
  16467. });
  16468. };
  16469. }
  16470. });
  16471. let p5 = 0;
  16472. const oOe = () => ({
  16473. icon: Y.any,
  16474. title: Y.any,
  16475. disabled: Boolean,
  16476. level: Number,
  16477. popupClassName: String,
  16478. popupOffset: Array,
  16479. internalPopupClose: Boolean,
  16480. eventKey: String,
  16481. expandIcon: Function,
  16482. theme: String,
  16483. onMouseenter: Function,
  16484. onMouseleave: Function,
  16485. onTitleClick: Function,
  16486. // Internal user prop
  16487. originItemValue: $t()
  16488. }), Ph = te({
  16489. compatConfig: {
  16490. MODE: 3
  16491. },
  16492. name: "ASubMenu",
  16493. inheritAttrs: !1,
  16494. props: oOe(),
  16495. slots: Object,
  16496. setup(t, e) {
  16497. let {
  16498. slots: n,
  16499. attrs: r,
  16500. emit: i
  16501. } = e;
  16502. var a, o;
  16503. ZU(!1);
  16504. const s = aD(), l = vn(), u = typeof l.vnode.key == "symbol" ? String(l.vnode.key) : l.vnode.key;
  16505. Qi(typeof l.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
  16506. const c = r2(u) ? u : `sub_menu_${++p5}_$$_not_set_key`, f = (a = t.eventKey) !== null && a !== void 0 ? a : r2(u) ? `sub_menu_${++p5}_$$_${u}` : c, {
  16507. parentEventKeys: d,
  16508. parentInfo: h,
  16509. parentKeys: p
  16510. } = iD(), v = L(() => [...p.value, c]), g = ae([]), m = {
  16511. eventKey: f,
  16512. key: c,
  16513. parentEventKeys: d,
  16514. childrenEventKeys: g,
  16515. parentKeys: p
  16516. };
  16517. (o = h.childrenEventKeys) === null || o === void 0 || o.value.push(f), yt(() => {
  16518. var he;
  16519. h.childrenEventKeys && (h.childrenEventKeys.value = (he = h.childrenEventKeys) === null || he === void 0 ? void 0 : he.value.filter((Te) => Te != f));
  16520. }), J1e(f, c, m);
  16521. const {
  16522. prefixCls: y,
  16523. activeKeys: b,
  16524. disabled: _,
  16525. changeActiveKeys: O,
  16526. mode: S,
  16527. inlineCollapsed: x,
  16528. openKeys: C,
  16529. overflowDisabled: T,
  16530. onOpenChange: w,
  16531. registerMenuInfo: P,
  16532. unRegisterMenuInfo: $,
  16533. selectedSubMenuKeys: A,
  16534. expandIcon: D,
  16535. theme: E
  16536. } = ol(), R = u != null, N = !s && (GU() || !R);
  16537. U1e(N), (s && R || !s && !R || N) && (P(f, m), yt(() => {
  16538. $(f);
  16539. }));
  16540. const V = L(() => `${y.value}-submenu`), z = L(() => _.value || t.disabled), W = ae(), F = ae(), Q = L(() => C.value.includes(c)), Z = L(() => !T.value && Q.value), ne = L(() => A.value.includes(c)), ee = ae(!1);
  16541. se(b, () => {
  16542. ee.value = !!b.value.find((he) => he === c);
  16543. }, {
  16544. immediate: !0
  16545. });
  16546. const oe = (he) => {
  16547. z.value || (i("titleClick", he, c), S.value === "inline" && w(c, !Q.value));
  16548. }, K = (he) => {
  16549. z.value || (O(v.value), i("mouseenter", he));
  16550. }, ie = (he) => {
  16551. z.value || (O([]), i("mouseleave", he));
  16552. }, X = YU(L(() => v.value.length)), H = (he) => {
  16553. S.value !== "inline" && w(c, he);
  16554. }, G = () => {
  16555. O(v.value);
  16556. }, re = f && `${f}-popup`, fe = L(() => ye(y.value, `${y.value}-${t.theme || E.value}`, t.popupClassName)), de = (he, Te) => {
  16557. if (!Te)
  16558. return x.value && !p.value.length && he && typeof he == "string" ? M("div", {
  16559. class: `${y.value}-inline-collapsed-noicon`
  16560. }, [he.charAt(0)]) : M("span", {
  16561. class: `${y.value}-title-content`
  16562. }, [he]);
  16563. const ze = Ui(he) && he.type === "span";
  16564. return M(wt, null, [Pn(typeof Te == "function" ? Te(t.originItemValue) : Te, {
  16565. class: `${y.value}-item-icon`
  16566. }, !1), ze ? he : M("span", {
  16567. class: `${y.value}-title-content`
  16568. }, [he])]);
  16569. }, Ee = L(() => S.value !== "inline" && v.value.length > 1 ? "vertical" : S.value), $e = L(() => S.value === "horizontal" ? "vertical" : S.value), Se = L(() => Ee.value === "horizontal" ? "vertical" : Ee.value), be = () => {
  16570. var he, Te;
  16571. const ze = V.value, ut = (he = t.icon) !== null && he !== void 0 ? he : (Te = n.icon) === null || Te === void 0 ? void 0 : Te.call(n, t), ct = t.expandIcon || n.expandIcon || D.value, Dt = de(IS(n, t, "title"), ut);
  16572. return M("div", {
  16573. style: X.value,
  16574. class: `${ze}-title`,
  16575. tabindex: z.value ? null : -1,
  16576. ref: W,
  16577. title: typeof Dt == "string" ? Dt : null,
  16578. "data-menu-id": c,
  16579. "aria-expanded": Z.value,
  16580. "aria-haspopup": !0,
  16581. "aria-controls": re,
  16582. "aria-disabled": z.value,
  16583. onClick: oe,
  16584. onFocus: G
  16585. }, [Dt, S.value !== "horizontal" && ct ? ct(I(I({}, t), {
  16586. isOpen: Z.value
  16587. })) : M("i", {
  16588. class: `${ze}-arrow`
  16589. }, null)]);
  16590. };
  16591. return () => {
  16592. var he;
  16593. if (s)
  16594. return R ? (he = n.default) === null || he === void 0 ? void 0 : he.call(n) : null;
  16595. const Te = V.value;
  16596. let ze = () => null;
  16597. if (!T.value && S.value !== "inline") {
  16598. const ut = S.value === "horizontal" ? [0, 8] : [10, 0];
  16599. ze = () => M(h5, {
  16600. mode: Ee.value,
  16601. prefixCls: Te,
  16602. visible: !t.internalPopupClose && Z.value,
  16603. popupClassName: fe.value,
  16604. popupOffset: t.popupOffset || ut,
  16605. disabled: z.value,
  16606. onVisibleChange: H
  16607. }, {
  16608. default: () => [be()],
  16609. popup: () => M(R1, {
  16610. mode: Se.value
  16611. }, {
  16612. default: () => [M(oD, {
  16613. id: re,
  16614. ref: F
  16615. }, {
  16616. default: n.default
  16617. })]
  16618. })
  16619. });
  16620. } else
  16621. ze = () => M(h5, null, {
  16622. default: be
  16623. });
  16624. return M(R1, {
  16625. mode: $e.value
  16626. }, {
  16627. default: () => [M(Ms.Item, j(j({
  16628. component: "li"
  16629. }, r), {}, {
  16630. role: "none",
  16631. class: ye(Te, `${Te}-${S.value}`, r.class, {
  16632. [`${Te}-open`]: Z.value,
  16633. [`${Te}-active`]: ee.value,
  16634. [`${Te}-selected`]: ne.value,
  16635. [`${Te}-disabled`]: z.value
  16636. }),
  16637. onMouseenter: K,
  16638. onMouseleave: ie,
  16639. "data-submenu-id": c
  16640. }), {
  16641. default: () => M(wt, null, [ze(), !T.value && M(aOe, {
  16642. id: re,
  16643. open: Z.value,
  16644. keyPath: v.value
  16645. }, {
  16646. default: n.default
  16647. })])
  16648. })]
  16649. });
  16650. };
  16651. }
  16652. });
  16653. function qU(t, e) {
  16654. return t.classList ? t.classList.contains(e) : ` ${t.className} `.indexOf(` ${e} `) > -1;
  16655. }
  16656. function v5(t, e) {
  16657. t.classList ? t.classList.add(e) : qU(t, e) || (t.className = `${t.className} ${e}`);
  16658. }
  16659. function g5(t, e) {
  16660. if (t.classList)
  16661. t.classList.remove(e);
  16662. else if (qU(t, e)) {
  16663. const n = t.className;
  16664. t.className = ` ${n} `.replace(` ${e} `, " ");
  16665. }
  16666. }
  16667. const sD = function() {
  16668. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  16669. return {
  16670. name: t,
  16671. appear: e,
  16672. css: !0,
  16673. onBeforeEnter: (n) => {
  16674. n.style.height = "0px", n.style.opacity = "0", v5(n, t);
  16675. },
  16676. onEnter: (n) => {
  16677. Tt(() => {
  16678. n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
  16679. });
  16680. },
  16681. onAfterEnter: (n) => {
  16682. n && (g5(n, t), n.style.height = null, n.style.opacity = null);
  16683. },
  16684. onBeforeLeave: (n) => {
  16685. v5(n, t), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
  16686. },
  16687. onLeave: (n) => {
  16688. setTimeout(() => {
  16689. n.style.height = "0px", n.style.opacity = "0";
  16690. });
  16691. },
  16692. onAfterLeave: (n) => {
  16693. n && (g5(n, t), n.style && (n.style.height = null, n.style.opacity = null));
  16694. }
  16695. };
  16696. }, sOe = () => ({
  16697. title: Y.any,
  16698. // Internal user prop
  16699. originItemValue: $t()
  16700. }), k1 = te({
  16701. compatConfig: {
  16702. MODE: 3
  16703. },
  16704. name: "AMenuItemGroup",
  16705. inheritAttrs: !1,
  16706. props: sOe(),
  16707. slots: Object,
  16708. setup(t, e) {
  16709. let {
  16710. slots: n,
  16711. attrs: r
  16712. } = e;
  16713. const {
  16714. prefixCls: i
  16715. } = ol(), a = L(() => `${i.value}-item-group`), o = aD();
  16716. return () => {
  16717. var s, l;
  16718. return o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : M("li", j(j({}, r), {}, {
  16719. onClick: (u) => u.stopPropagation(),
  16720. class: a.value
  16721. }), [M("div", {
  16722. title: typeof t.title == "string" ? t.title : void 0,
  16723. class: `${a.value}-title`
  16724. }, [IS(n, t, "title")]), M("ul", {
  16725. class: `${a.value}-list`
  16726. }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)])]);
  16727. };
  16728. }
  16729. }), lOe = () => ({
  16730. prefixCls: String,
  16731. dashed: Boolean
  16732. }), L1 = te({
  16733. compatConfig: {
  16734. MODE: 3
  16735. },
  16736. name: "AMenuDivider",
  16737. props: lOe(),
  16738. setup(t) {
  16739. const {
  16740. prefixCls: e
  16741. } = ol(), n = L(() => ({
  16742. [`${e.value}-item-divider`]: !0,
  16743. [`${e.value}-item-divider-dashed`]: !!t.dashed
  16744. }));
  16745. return () => M("li", {
  16746. class: n.value
  16747. }, null);
  16748. }
  16749. });
  16750. var uOe = function(t, e) {
  16751. var n = {};
  16752. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  16753. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  16754. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  16755. return n;
  16756. };
  16757. function N2(t, e, n) {
  16758. return (t || []).map((r, i) => {
  16759. if (r && typeof r == "object") {
  16760. const a = r, {
  16761. label: o,
  16762. children: s,
  16763. key: l,
  16764. type: u
  16765. } = a, c = uOe(a, ["label", "children", "key", "type"]), f = l ?? `tmp-${i}`, d = n ? n.parentKeys.slice() : [], h = [], p = {
  16766. eventKey: f,
  16767. key: f,
  16768. parentEventKeys: U(d),
  16769. parentKeys: U(d),
  16770. childrenEventKeys: U(h),
  16771. isLeaf: !1
  16772. };
  16773. if (s || u === "group") {
  16774. if (u === "group") {
  16775. const g = N2(s, e, n);
  16776. return M(k1, j(j({
  16777. key: f
  16778. }, c), {}, {
  16779. title: o,
  16780. originItemValue: r
  16781. }), {
  16782. default: () => [g]
  16783. });
  16784. }
  16785. e.set(f, p), n && n.childrenEventKeys.push(f);
  16786. const v = N2(s, e, {
  16787. childrenEventKeys: h,
  16788. parentKeys: [].concat(d, f)
  16789. });
  16790. return M(Ph, j(j({
  16791. key: f
  16792. }, c), {}, {
  16793. title: o,
  16794. originItemValue: r
  16795. }), {
  16796. default: () => [v]
  16797. });
  16798. }
  16799. return u === "divider" ? M(L1, j({
  16800. key: f
  16801. }, c), null) : (p.isLeaf = !0, e.set(f, p), M(Th, j(j({
  16802. key: f
  16803. }, c), {}, {
  16804. originItemValue: r
  16805. }), {
  16806. default: () => [o]
  16807. }));
  16808. }
  16809. return null;
  16810. }).filter((r) => r);
  16811. }
  16812. function cOe(t) {
  16813. const e = ae([]), n = ae(!1), r = ae(/* @__PURE__ */ new Map());
  16814. return se(() => t.items, () => {
  16815. const i = /* @__PURE__ */ new Map();
  16816. n.value = !1, t.items ? (n.value = !0, e.value = N2(t.items, i)) : e.value = void 0, r.value = i;
  16817. }, {
  16818. immediate: !0,
  16819. deep: !0
  16820. }), {
  16821. itemsNodes: e,
  16822. store: r,
  16823. hasItmes: n
  16824. };
  16825. }
  16826. const fOe = (t) => {
  16827. const {
  16828. componentCls: e,
  16829. motionDurationSlow: n,
  16830. menuHorizontalHeight: r,
  16831. colorSplit: i,
  16832. lineWidth: a,
  16833. lineType: o,
  16834. menuItemPaddingInline: s
  16835. } = t;
  16836. return {
  16837. [`${e}-horizontal`]: {
  16838. lineHeight: `${r}px`,
  16839. border: 0,
  16840. borderBottom: `${a}px ${o} ${i}`,
  16841. boxShadow: "none",
  16842. "&::after": {
  16843. display: "block",
  16844. clear: "both",
  16845. height: 0,
  16846. content: '"\\20"'
  16847. },
  16848. // ======================= Item =======================
  16849. [`${e}-item, ${e}-submenu`]: {
  16850. position: "relative",
  16851. display: "inline-block",
  16852. verticalAlign: "bottom",
  16853. paddingInline: s
  16854. },
  16855. [`> ${e}-item:hover,
  16856. > ${e}-item-active,
  16857. > ${e}-submenu ${e}-submenu-title:hover`]: {
  16858. backgroundColor: "transparent"
  16859. },
  16860. [`${e}-item, ${e}-submenu-title`]: {
  16861. transition: [`border-color ${n}`, `background ${n}`].join(",")
  16862. },
  16863. // ===================== Sub Menu =====================
  16864. [`${e}-submenu-arrow`]: {
  16865. display: "none"
  16866. }
  16867. }
  16868. };
  16869. }, dOe = (t) => {
  16870. let {
  16871. componentCls: e,
  16872. menuArrowOffset: n
  16873. } = t;
  16874. return {
  16875. [`${e}-rtl`]: {
  16876. direction: "rtl"
  16877. },
  16878. [`${e}-submenu-rtl`]: {
  16879. transformOrigin: "100% 0"
  16880. },
  16881. // Vertical Arrow
  16882. [`${e}-rtl${e}-vertical,
  16883. ${e}-submenu-rtl ${e}-vertical`]: {
  16884. [`${e}-submenu-arrow`]: {
  16885. "&::before": {
  16886. transform: `rotate(-45deg) translateY(-${n})`
  16887. },
  16888. "&::after": {
  16889. transform: `rotate(45deg) translateY(${n})`
  16890. }
  16891. }
  16892. }
  16893. };
  16894. }, m5 = (t) => I({}, d0(t)), y5 = (t, e) => {
  16895. const {
  16896. componentCls: n,
  16897. colorItemText: r,
  16898. colorItemTextSelected: i,
  16899. colorGroupTitle: a,
  16900. colorItemBg: o,
  16901. colorSubItemBg: s,
  16902. colorItemBgSelected: l,
  16903. colorActiveBarHeight: u,
  16904. colorActiveBarWidth: c,
  16905. colorActiveBarBorderSize: f,
  16906. motionDurationSlow: d,
  16907. motionEaseInOut: h,
  16908. motionEaseOut: p,
  16909. menuItemPaddingInline: v,
  16910. motionDurationMid: g,
  16911. colorItemTextHover: m,
  16912. lineType: y,
  16913. colorSplit: b,
  16914. // Disabled
  16915. colorItemTextDisabled: _,
  16916. // Danger
  16917. colorDangerItemText: O,
  16918. colorDangerItemTextHover: S,
  16919. colorDangerItemTextSelected: x,
  16920. colorDangerItemBgActive: C,
  16921. colorDangerItemBgSelected: T,
  16922. colorItemBgHover: w,
  16923. menuSubMenuBg: P,
  16924. // Horizontal
  16925. colorItemTextSelectedHorizontal: $,
  16926. colorItemBgSelectedHorizontal: A
  16927. } = t;
  16928. return {
  16929. [`${n}-${e}`]: {
  16930. color: r,
  16931. background: o,
  16932. [`&${n}-root:focus-visible`]: I({}, m5(t)),
  16933. // ======================== Item ========================
  16934. [`${n}-item-group-title`]: {
  16935. color: a
  16936. },
  16937. [`${n}-submenu-selected`]: {
  16938. [`> ${n}-submenu-title`]: {
  16939. color: i
  16940. }
  16941. },
  16942. // Disabled
  16943. [`${n}-item-disabled, ${n}-submenu-disabled`]: {
  16944. color: `${_} !important`
  16945. },
  16946. // Hover
  16947. [`${n}-item:hover, ${n}-submenu-title:hover`]: {
  16948. [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
  16949. color: m
  16950. }
  16951. },
  16952. [`&:not(${n}-horizontal)`]: {
  16953. [`${n}-item:not(${n}-item-selected)`]: {
  16954. "&:hover": {
  16955. backgroundColor: w
  16956. },
  16957. "&:active": {
  16958. backgroundColor: l
  16959. }
  16960. },
  16961. [`${n}-submenu-title`]: {
  16962. "&:hover": {
  16963. backgroundColor: w
  16964. },
  16965. "&:active": {
  16966. backgroundColor: l
  16967. }
  16968. }
  16969. },
  16970. // Danger - only Item has
  16971. [`${n}-item-danger`]: {
  16972. color: O,
  16973. [`&${n}-item:hover`]: {
  16974. [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
  16975. color: S
  16976. }
  16977. },
  16978. [`&${n}-item:active`]: {
  16979. background: C
  16980. }
  16981. },
  16982. [`${n}-item a`]: {
  16983. "&, &:hover": {
  16984. color: "inherit"
  16985. }
  16986. },
  16987. [`${n}-item-selected`]: {
  16988. color: i,
  16989. // Danger
  16990. [`&${n}-item-danger`]: {
  16991. color: x
  16992. },
  16993. "a, a:hover": {
  16994. color: "inherit"
  16995. }
  16996. },
  16997. [`& ${n}-item-selected`]: {
  16998. backgroundColor: l,
  16999. // Danger
  17000. [`&${n}-item-danger`]: {
  17001. backgroundColor: T
  17002. }
  17003. },
  17004. [`${n}-item, ${n}-submenu-title`]: {
  17005. [`&:not(${n}-item-disabled):focus-visible`]: I({}, m5(t))
  17006. },
  17007. [`&${n}-submenu > ${n}`]: {
  17008. backgroundColor: P
  17009. },
  17010. [`&${n}-popup > ${n}`]: {
  17011. backgroundColor: o
  17012. },
  17013. // ====================== Horizontal ======================
  17014. [`&${n}-horizontal`]: I(I({}, e === "dark" ? {
  17015. borderBottom: 0
  17016. } : {}), {
  17017. [`> ${n}-item, > ${n}-submenu`]: {
  17018. top: f,
  17019. marginTop: -f,
  17020. marginBottom: 0,
  17021. borderRadius: 0,
  17022. "&::after": {
  17023. position: "absolute",
  17024. insetInline: v,
  17025. bottom: 0,
  17026. borderBottom: `${u}px solid transparent`,
  17027. transition: `border-color ${d} ${h}`,
  17028. content: '""'
  17029. },
  17030. "&:hover, &-active, &-open": {
  17031. "&::after": {
  17032. borderBottomWidth: u,
  17033. borderBottomColor: $
  17034. }
  17035. },
  17036. "&-selected": {
  17037. color: $,
  17038. backgroundColor: A,
  17039. "&::after": {
  17040. borderBottomWidth: u,
  17041. borderBottomColor: $
  17042. }
  17043. }
  17044. }
  17045. }),
  17046. // ================== Inline & Vertical ===================
  17047. //
  17048. [`&${n}-root`]: {
  17049. [`&${n}-inline, &${n}-vertical`]: {
  17050. borderInlineEnd: `${f}px ${y} ${b}`
  17051. }
  17052. },
  17053. // ======================== Inline ========================
  17054. [`&${n}-inline`]: {
  17055. // Sub
  17056. [`${n}-sub${n}-inline`]: {
  17057. background: s
  17058. },
  17059. // Item
  17060. [`${n}-item, ${n}-submenu-title`]: f && c ? {
  17061. width: `calc(100% + ${f}px)`
  17062. } : {},
  17063. [`${n}-item`]: {
  17064. position: "relative",
  17065. "&::after": {
  17066. position: "absolute",
  17067. insetBlock: 0,
  17068. insetInlineEnd: 0,
  17069. borderInlineEnd: `${c}px solid ${i}`,
  17070. transform: "scaleY(0.0001)",
  17071. opacity: 0,
  17072. transition: [`transform ${g} ${p}`, `opacity ${g} ${p}`].join(","),
  17073. content: '""'
  17074. },
  17075. // Danger
  17076. [`&${n}-item-danger`]: {
  17077. "&::after": {
  17078. borderInlineEndColor: x
  17079. }
  17080. }
  17081. },
  17082. [`${n}-selected, ${n}-item-selected`]: {
  17083. "&::after": {
  17084. transform: "scaleY(1)",
  17085. opacity: 1,
  17086. transition: [`transform ${g} ${h}`, `opacity ${g} ${h}`].join(",")
  17087. }
  17088. }
  17089. }
  17090. }
  17091. };
  17092. }, b5 = (t) => {
  17093. const {
  17094. componentCls: e,
  17095. menuItemHeight: n,
  17096. itemMarginInline: r,
  17097. padding: i,
  17098. menuArrowSize: a,
  17099. marginXS: o,
  17100. marginXXS: s
  17101. } = t, l = i + a + o;
  17102. return {
  17103. [`${e}-item`]: {
  17104. position: "relative"
  17105. },
  17106. [`${e}-item, ${e}-submenu-title`]: {
  17107. height: n,
  17108. lineHeight: `${n}px`,
  17109. paddingInline: i,
  17110. overflow: "hidden",
  17111. textOverflow: "ellipsis",
  17112. marginInline: r,
  17113. marginBlock: s,
  17114. width: `calc(100% - ${r * 2}px)`
  17115. },
  17116. // disable margin collapsed
  17117. [`${e}-submenu`]: {
  17118. paddingBottom: 0.02
  17119. },
  17120. [`> ${e}-item,
  17121. > ${e}-submenu > ${e}-submenu-title`]: {
  17122. height: n,
  17123. lineHeight: `${n}px`
  17124. },
  17125. [`${e}-item-group-list ${e}-submenu-title,
  17126. ${e}-submenu-title`]: {
  17127. paddingInlineEnd: l
  17128. }
  17129. };
  17130. }, hOe = (t) => {
  17131. const {
  17132. componentCls: e,
  17133. iconCls: n,
  17134. menuItemHeight: r,
  17135. colorTextLightSolid: i,
  17136. dropdownWidth: a,
  17137. controlHeightLG: o,
  17138. motionDurationMid: s,
  17139. motionEaseOut: l,
  17140. paddingXL: u,
  17141. fontSizeSM: c,
  17142. fontSizeLG: f,
  17143. motionDurationSlow: d,
  17144. paddingXS: h,
  17145. boxShadowSecondary: p
  17146. } = t, v = {
  17147. height: r,
  17148. lineHeight: `${r}px`,
  17149. listStylePosition: "inside",
  17150. listStyleType: "disc"
  17151. };
  17152. return [
  17153. {
  17154. [e]: {
  17155. "&-inline, &-vertical": I({
  17156. [`&${e}-root`]: {
  17157. boxShadow: "none"
  17158. }
  17159. }, b5(t))
  17160. },
  17161. [`${e}-submenu-popup`]: {
  17162. [`${e}-vertical`]: I(I({}, b5(t)), {
  17163. boxShadow: p
  17164. })
  17165. }
  17166. },
  17167. // Vertical only
  17168. {
  17169. [`${e}-submenu-popup ${e}-vertical${e}-sub`]: {
  17170. minWidth: a,
  17171. maxHeight: `calc(100vh - ${o * 2.5}px)`,
  17172. padding: "0",
  17173. overflow: "hidden",
  17174. borderInlineEnd: 0,
  17175. // https://github.com/ant-design/ant-design/issues/22244
  17176. // https://github.com/ant-design/ant-design/issues/26812
  17177. "&:not([class*='-active'])": {
  17178. overflowX: "hidden",
  17179. overflowY: "auto"
  17180. }
  17181. }
  17182. },
  17183. // Inline Only
  17184. {
  17185. [`${e}-inline`]: {
  17186. width: "100%",
  17187. // Motion enhance for first level
  17188. [`&${e}-root`]: {
  17189. [`${e}-item, ${e}-submenu-title`]: {
  17190. display: "flex",
  17191. alignItems: "center",
  17192. transition: [`border-color ${d}`, `background ${d}`, `padding ${s} ${l}`].join(","),
  17193. [`> ${e}-title-content`]: {
  17194. flex: "auto",
  17195. minWidth: 0,
  17196. overflow: "hidden",
  17197. textOverflow: "ellipsis"
  17198. },
  17199. "> *": {
  17200. flex: "none"
  17201. }
  17202. }
  17203. },
  17204. // >>>>> Sub
  17205. [`${e}-sub${e}-inline`]: {
  17206. padding: 0,
  17207. border: 0,
  17208. borderRadius: 0,
  17209. boxShadow: "none",
  17210. [`& > ${e}-submenu > ${e}-submenu-title`]: v,
  17211. [`& ${e}-item-group-title`]: {
  17212. paddingInlineStart: u
  17213. }
  17214. },
  17215. // >>>>> Item
  17216. [`${e}-item`]: v
  17217. }
  17218. },
  17219. // Inline Collapse Only
  17220. {
  17221. [`${e}-inline-collapsed`]: {
  17222. width: r * 2,
  17223. [`&${e}-root`]: {
  17224. [`${e}-item, ${e}-submenu ${e}-submenu-title`]: {
  17225. [`> ${e}-inline-collapsed-noicon`]: {
  17226. fontSize: f,
  17227. textAlign: "center"
  17228. }
  17229. }
  17230. },
  17231. [`> ${e}-item,
  17232. > ${e}-item-group > ${e}-item-group-list > ${e}-item,
  17233. > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
  17234. > ${e}-submenu > ${e}-submenu-title`]: {
  17235. insetInlineStart: 0,
  17236. paddingInline: `calc(50% - ${c}px)`,
  17237. textOverflow: "clip",
  17238. [`
  17239. ${e}-submenu-arrow,
  17240. ${e}-submenu-expand-icon
  17241. `]: {
  17242. opacity: 0
  17243. },
  17244. [`${e}-item-icon, ${n}`]: {
  17245. margin: 0,
  17246. fontSize: f,
  17247. lineHeight: `${r}px`,
  17248. "+ span": {
  17249. display: "inline-block",
  17250. opacity: 0
  17251. }
  17252. }
  17253. },
  17254. [`${e}-item-icon, ${n}`]: {
  17255. display: "inline-block"
  17256. },
  17257. "&-tooltip": {
  17258. pointerEvents: "none",
  17259. [`${e}-item-icon, ${n}`]: {
  17260. display: "none"
  17261. },
  17262. "a, a:hover": {
  17263. color: i
  17264. }
  17265. },
  17266. [`${e}-item-group-title`]: I(I({}, mh), {
  17267. paddingInline: h
  17268. })
  17269. }
  17270. }
  17271. ];
  17272. }, _5 = (t) => {
  17273. const {
  17274. componentCls: e,
  17275. fontSize: n,
  17276. motionDurationSlow: r,
  17277. motionDurationMid: i,
  17278. motionEaseInOut: a,
  17279. motionEaseOut: o,
  17280. iconCls: s,
  17281. controlHeightSM: l
  17282. } = t;
  17283. return {
  17284. // >>>>> Item
  17285. [`${e}-item, ${e}-submenu-title`]: {
  17286. position: "relative",
  17287. display: "block",
  17288. margin: 0,
  17289. whiteSpace: "nowrap",
  17290. cursor: "pointer",
  17291. transition: [`border-color ${r}`, `background ${r}`, `padding ${r} ${a}`].join(","),
  17292. [`${e}-item-icon, ${s}`]: {
  17293. minWidth: n,
  17294. fontSize: n,
  17295. transition: [`font-size ${i} ${o}`, `margin ${r} ${a}`, `color ${r}`].join(","),
  17296. "+ span": {
  17297. marginInlineStart: l - n,
  17298. opacity: 1,
  17299. transition: [`opacity ${r} ${a}`, `margin ${r}`, `color ${r}`].join(",")
  17300. }
  17301. },
  17302. [`${e}-item-icon`]: I({}, ip()),
  17303. [`&${e}-item-only-child`]: {
  17304. [`> ${s}, > ${e}-item-icon`]: {
  17305. marginInlineEnd: 0
  17306. }
  17307. }
  17308. },
  17309. // Disabled state sets text to gray and nukes hover/tab effects
  17310. [`${e}-item-disabled, ${e}-submenu-disabled`]: {
  17311. background: "none !important",
  17312. cursor: "not-allowed",
  17313. "&::after": {
  17314. borderColor: "transparent !important"
  17315. },
  17316. a: {
  17317. color: "inherit !important"
  17318. },
  17319. [`> ${e}-submenu-title`]: {
  17320. color: "inherit !important",
  17321. cursor: "not-allowed"
  17322. }
  17323. }
  17324. };
  17325. }, O5 = (t) => {
  17326. const {
  17327. componentCls: e,
  17328. motionDurationSlow: n,
  17329. motionEaseInOut: r,
  17330. borderRadius: i,
  17331. menuArrowSize: a,
  17332. menuArrowOffset: o
  17333. } = t;
  17334. return {
  17335. [`${e}-submenu`]: {
  17336. "&-expand-icon, &-arrow": {
  17337. position: "absolute",
  17338. top: "50%",
  17339. insetInlineEnd: t.margin,
  17340. width: a,
  17341. color: "currentcolor",
  17342. transform: "translateY(-50%)",
  17343. transition: `transform ${n} ${r}, opacity ${n}`
  17344. },
  17345. "&-arrow": {
  17346. // →
  17347. "&::before, &::after": {
  17348. position: "absolute",
  17349. width: a * 0.6,
  17350. height: a * 0.15,
  17351. backgroundColor: "currentcolor",
  17352. borderRadius: i,
  17353. transition: [`background ${n} ${r}`, `transform ${n} ${r}`, `top ${n} ${r}`, `color ${n} ${r}`].join(","),
  17354. content: '""'
  17355. },
  17356. "&::before": {
  17357. transform: `rotate(45deg) translateY(-${o})`
  17358. },
  17359. "&::after": {
  17360. transform: `rotate(-45deg) translateY(${o})`
  17361. }
  17362. }
  17363. }
  17364. };
  17365. }, pOe = (t) => {
  17366. const {
  17367. antCls: e,
  17368. componentCls: n,
  17369. fontSize: r,
  17370. motionDurationSlow: i,
  17371. motionDurationMid: a,
  17372. motionEaseInOut: o,
  17373. lineHeight: s,
  17374. paddingXS: l,
  17375. padding: u,
  17376. colorSplit: c,
  17377. lineWidth: f,
  17378. zIndexPopup: d,
  17379. borderRadiusLG: h,
  17380. radiusSubMenuItem: p,
  17381. menuArrowSize: v,
  17382. menuArrowOffset: g,
  17383. lineType: m,
  17384. menuPanelMaskInset: y
  17385. } = t;
  17386. return [
  17387. // Misc
  17388. {
  17389. "": {
  17390. [`${n}`]: I(I({}, _1()), {
  17391. // Hidden
  17392. "&-hidden": {
  17393. display: "none"
  17394. }
  17395. })
  17396. },
  17397. [`${n}-submenu-hidden`]: {
  17398. display: "none"
  17399. }
  17400. },
  17401. {
  17402. [n]: I(I(I(I(I(I(I({}, nn(t)), _1()), {
  17403. marginBottom: 0,
  17404. paddingInlineStart: 0,
  17405. // Override default ul/ol
  17406. fontSize: r,
  17407. lineHeight: 0,
  17408. listStyle: "none",
  17409. outline: "none",
  17410. transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
  17411. "ul, ol": {
  17412. margin: 0,
  17413. padding: 0,
  17414. listStyle: "none"
  17415. },
  17416. // Overflow ellipsis
  17417. "&-overflow": {
  17418. display: "flex",
  17419. [`${n}-item`]: {
  17420. flex: "none"
  17421. }
  17422. },
  17423. [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
  17424. borderRadius: t.radiusItem
  17425. },
  17426. [`${n}-item-group-title`]: {
  17427. padding: `${l}px ${u}px`,
  17428. fontSize: r,
  17429. lineHeight: s,
  17430. transition: `all ${i}`
  17431. },
  17432. [`&-horizontal ${n}-submenu`]: {
  17433. transition: [`border-color ${i} ${o}`, `background ${i} ${o}`].join(",")
  17434. },
  17435. [`${n}-submenu, ${n}-submenu-inline`]: {
  17436. transition: [`border-color ${i} ${o}`, `background ${i} ${o}`, `padding ${a} ${o}`].join(",")
  17437. },
  17438. [`${n}-submenu ${n}-sub`]: {
  17439. cursor: "initial",
  17440. transition: [`background ${i} ${o}`, `padding ${i} ${o}`].join(",")
  17441. },
  17442. [`${n}-title-content`]: {
  17443. transition: `color ${i}`
  17444. },
  17445. [`${n}-item a`]: {
  17446. "&::before": {
  17447. position: "absolute",
  17448. inset: 0,
  17449. backgroundColor: "transparent",
  17450. content: '""'
  17451. }
  17452. },
  17453. // Removed a Badge related style seems it's safe
  17454. // https://github.com/ant-design/ant-design/issues/19809
  17455. // >>>>> Divider
  17456. [`${n}-item-divider`]: {
  17457. overflow: "hidden",
  17458. lineHeight: 0,
  17459. borderColor: c,
  17460. borderStyle: m,
  17461. borderWidth: 0,
  17462. borderTopWidth: f,
  17463. marginBlock: f,
  17464. padding: 0,
  17465. "&-dashed": {
  17466. borderStyle: "dashed"
  17467. }
  17468. }
  17469. }), _5(t)), {
  17470. [`${n}-item-group`]: {
  17471. [`${n}-item-group-list`]: {
  17472. margin: 0,
  17473. padding: 0,
  17474. [`${n}-item, ${n}-submenu-title`]: {
  17475. paddingInline: `${r * 2}px ${u}px`
  17476. }
  17477. }
  17478. },
  17479. // ======================= Sub Menu =======================
  17480. "&-submenu": {
  17481. "&-popup": {
  17482. position: "absolute",
  17483. zIndex: d,
  17484. background: "transparent",
  17485. borderRadius: h,
  17486. boxShadow: "none",
  17487. transformOrigin: "0 0",
  17488. // https://github.com/ant-design/ant-design/issues/13955
  17489. "&::before": {
  17490. position: "absolute",
  17491. inset: `${y}px 0 0`,
  17492. zIndex: -1,
  17493. width: "100%",
  17494. height: "100%",
  17495. opacity: 0,
  17496. content: '""'
  17497. }
  17498. },
  17499. // https://github.com/ant-design/ant-design/issues/13955
  17500. "&-placement-rightTop::before": {
  17501. top: 0,
  17502. insetInlineStart: y
  17503. },
  17504. [`> ${n}`]: I(I(I({
  17505. borderRadius: h
  17506. }, _5(t)), O5(t)), {
  17507. [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
  17508. borderRadius: p
  17509. },
  17510. [`${n}-submenu-title::after`]: {
  17511. transition: `transform ${i} ${o}`
  17512. }
  17513. })
  17514. }
  17515. }), O5(t)), {
  17516. [`&-inline-collapsed ${n}-submenu-arrow,
  17517. &-inline ${n}-submenu-arrow`]: {
  17518. // ↓
  17519. "&::before": {
  17520. transform: `rotate(-45deg) translateX(${g})`
  17521. },
  17522. "&::after": {
  17523. transform: `rotate(45deg) translateX(-${g})`
  17524. }
  17525. },
  17526. [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
  17527. // ↑
  17528. transform: `translateY(-${v * 0.2}px)`,
  17529. "&::after": {
  17530. transform: `rotate(-45deg) translateX(-${g})`
  17531. },
  17532. "&::before": {
  17533. transform: `rotate(45deg) translateX(${g})`
  17534. }
  17535. }
  17536. })
  17537. },
  17538. // Integration with header element so menu items have the same height
  17539. {
  17540. [`${e}-layout-header`]: {
  17541. [n]: {
  17542. lineHeight: "inherit"
  17543. }
  17544. }
  17545. }
  17546. ];
  17547. }, vOe = (t, e) => Sn("Menu", (r, i) => {
  17548. let {
  17549. overrideComponentToken: a
  17550. } = i;
  17551. if ((e == null ? void 0 : e.value) === !1)
  17552. return [];
  17553. const {
  17554. colorBgElevated: o,
  17555. colorPrimary: s,
  17556. colorError: l,
  17557. colorErrorHover: u,
  17558. colorTextLightSolid: c
  17559. } = r, {
  17560. controlHeightLG: f,
  17561. fontSize: d
  17562. } = r, h = d / 7 * 5, p = Bt(r, {
  17563. menuItemHeight: f,
  17564. menuItemPaddingInline: r.margin,
  17565. menuArrowSize: h,
  17566. menuHorizontalHeight: f * 1.15,
  17567. menuArrowOffset: `${h * 0.25}px`,
  17568. menuPanelMaskInset: -7,
  17569. menuSubMenuBg: o
  17570. }), v = new en(c).setAlpha(0.65).toRgbString(), g = Bt(p, {
  17571. colorItemText: v,
  17572. colorItemTextHover: c,
  17573. colorGroupTitle: v,
  17574. colorItemTextSelected: c,
  17575. colorItemBg: "#001529",
  17576. colorSubItemBg: "#000c17",
  17577. colorItemBgActive: "transparent",
  17578. colorItemBgSelected: s,
  17579. colorActiveBarWidth: 0,
  17580. colorActiveBarHeight: 0,
  17581. colorActiveBarBorderSize: 0,
  17582. // Disabled
  17583. colorItemTextDisabled: new en(c).setAlpha(0.25).toRgbString(),
  17584. // Danger
  17585. colorDangerItemText: l,
  17586. colorDangerItemTextHover: u,
  17587. colorDangerItemTextSelected: c,
  17588. colorDangerItemBgActive: l,
  17589. colorDangerItemBgSelected: l,
  17590. menuSubMenuBg: "#001529",
  17591. // Horizontal
  17592. colorItemTextSelectedHorizontal: c,
  17593. colorItemBgSelectedHorizontal: s
  17594. }, I({}, a));
  17595. return [
  17596. // Basic
  17597. pOe(p),
  17598. // Horizontal
  17599. fOe(p),
  17600. // Vertical
  17601. hOe(p),
  17602. // Theme
  17603. y5(p, "light"),
  17604. y5(g, "dark"),
  17605. // RTL
  17606. dOe(p),
  17607. // Motion
  17608. KI(p),
  17609. Ch(p, "slide-up"),
  17610. Ch(p, "slide-down"),
  17611. ux(p, "zoom-big")
  17612. ];
  17613. }, (r) => {
  17614. const {
  17615. colorPrimary: i,
  17616. colorError: a,
  17617. colorTextDisabled: o,
  17618. colorErrorBg: s,
  17619. colorText: l,
  17620. colorTextDescription: u,
  17621. colorBgContainer: c,
  17622. colorFillAlter: f,
  17623. colorFillContent: d,
  17624. lineWidth: h,
  17625. lineWidthBold: p,
  17626. controlItemBgActive: v,
  17627. colorBgTextHover: g
  17628. } = r;
  17629. return {
  17630. dropdownWidth: 160,
  17631. zIndexPopup: r.zIndexPopupBase + 50,
  17632. radiusItem: r.borderRadiusLG,
  17633. radiusSubMenuItem: r.borderRadiusSM,
  17634. colorItemText: l,
  17635. colorItemTextHover: l,
  17636. colorItemTextHoverHorizontal: i,
  17637. colorGroupTitle: u,
  17638. colorItemTextSelected: i,
  17639. colorItemTextSelectedHorizontal: i,
  17640. colorItemBg: c,
  17641. colorItemBgHover: g,
  17642. colorItemBgActive: d,
  17643. colorSubItemBg: f,
  17644. colorItemBgSelected: v,
  17645. colorItemBgSelectedHorizontal: "transparent",
  17646. colorActiveBarWidth: 0,
  17647. colorActiveBarHeight: p,
  17648. colorActiveBarBorderSize: h,
  17649. // Disabled
  17650. colorItemTextDisabled: o,
  17651. // Danger
  17652. colorDangerItemText: a,
  17653. colorDangerItemTextHover: a,
  17654. colorDangerItemTextSelected: a,
  17655. colorDangerItemBgActive: s,
  17656. colorDangerItemBgSelected: s,
  17657. itemMarginInline: r.marginXXS
  17658. };
  17659. })(t), gOe = () => ({
  17660. id: String,
  17661. prefixCls: String,
  17662. // donot use items, now only support inner use
  17663. items: Array,
  17664. disabled: Boolean,
  17665. inlineCollapsed: Boolean,
  17666. disabledOverflow: Boolean,
  17667. forceSubMenuRender: Boolean,
  17668. openKeys: Array,
  17669. selectedKeys: Array,
  17670. activeKey: String,
  17671. selectable: {
  17672. type: Boolean,
  17673. default: !0
  17674. },
  17675. multiple: {
  17676. type: Boolean,
  17677. default: !1
  17678. },
  17679. tabindex: {
  17680. type: [Number, String]
  17681. },
  17682. motion: Object,
  17683. role: String,
  17684. theme: {
  17685. type: String,
  17686. default: "light"
  17687. },
  17688. mode: {
  17689. type: String,
  17690. default: "vertical"
  17691. },
  17692. inlineIndent: {
  17693. type: Number,
  17694. default: 24
  17695. },
  17696. subMenuOpenDelay: {
  17697. type: Number,
  17698. default: 0
  17699. },
  17700. subMenuCloseDelay: {
  17701. type: Number,
  17702. default: 0.1
  17703. },
  17704. builtinPlacements: {
  17705. type: Object
  17706. },
  17707. triggerSubMenuAction: {
  17708. type: String,
  17709. default: "hover"
  17710. },
  17711. getPopupContainer: Function,
  17712. expandIcon: Function,
  17713. onOpenChange: Function,
  17714. onSelect: Function,
  17715. onDeselect: Function,
  17716. onClick: [Function, Array],
  17717. onFocus: Function,
  17718. onBlur: Function,
  17719. onMousedown: Function,
  17720. "onUpdate:openKeys": Function,
  17721. "onUpdate:selectedKeys": Function,
  17722. "onUpdate:activeKey": Function
  17723. }), S5 = [], jl = te({
  17724. compatConfig: {
  17725. MODE: 3
  17726. },
  17727. name: "AMenu",
  17728. inheritAttrs: !1,
  17729. props: gOe(),
  17730. slots: Object,
  17731. setup(t, e) {
  17732. let {
  17733. slots: n,
  17734. emit: r,
  17735. attrs: i
  17736. } = e;
  17737. const {
  17738. direction: a,
  17739. getPrefixCls: o
  17740. } = It("menu", t), s = FU(), l = L(() => {
  17741. var K;
  17742. return o("menu", t.prefixCls || ((K = s == null ? void 0 : s.prefixCls) === null || K === void 0 ? void 0 : K.value));
  17743. }), [u, c] = vOe(l, L(() => !s)), f = ae(/* @__PURE__ */ new Map()), d = Ge(q1e, U(void 0)), h = L(() => d.value !== void 0 ? d.value : t.inlineCollapsed), {
  17744. itemsNodes: p
  17745. } = cOe(t), v = ae(!1);
  17746. it(() => {
  17747. v.value = !0;
  17748. }), ht(() => {
  17749. Qi(!(t.inlineCollapsed === !0 && t.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), Qi(!(d.value !== void 0 && t.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
  17750. });
  17751. const g = U([]), m = U([]), y = U({});
  17752. se(f, () => {
  17753. const K = {};
  17754. for (const ie of f.value.values())
  17755. K[ie.key] = ie;
  17756. y.value = K;
  17757. }, {
  17758. flush: "post"
  17759. }), ht(() => {
  17760. if (t.activeKey !== void 0) {
  17761. let K = [];
  17762. const ie = t.activeKey ? y.value[t.activeKey] : void 0;
  17763. ie && t.activeKey !== void 0 ? K = yC([].concat(B(ie.parentKeys), t.activeKey)) : K = [], Zp(g.value, K) || (g.value = K);
  17764. }
  17765. }), se(() => t.selectedKeys, (K) => {
  17766. K && (m.value = K.slice());
  17767. }, {
  17768. immediate: !0,
  17769. deep: !0
  17770. });
  17771. const b = U([]);
  17772. se([y, m], () => {
  17773. let K = [];
  17774. m.value.forEach((ie) => {
  17775. const X = y.value[ie];
  17776. X && (K = K.concat(B(X.parentKeys)));
  17777. }), K = yC(K), Zp(b.value, K) || (b.value = K);
  17778. }, {
  17779. immediate: !0
  17780. });
  17781. const _ = (K) => {
  17782. if (t.selectable) {
  17783. const {
  17784. key: ie
  17785. } = K, X = m.value.includes(ie);
  17786. let H;
  17787. t.multiple ? X ? H = m.value.filter((re) => re !== ie) : H = [...m.value, ie] : H = [ie];
  17788. const G = I(I({}, K), {
  17789. selectedKeys: H
  17790. });
  17791. Zp(H, m.value) || (t.selectedKeys === void 0 && (m.value = H), r("update:selectedKeys", H), X && t.multiple ? r("deselect", G) : r("select", G));
  17792. }
  17793. w.value !== "inline" && !t.multiple && O.value.length && A(S5);
  17794. }, O = U([]);
  17795. se(() => t.openKeys, function() {
  17796. let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : O.value;
  17797. Zp(O.value, K) || (O.value = K.slice());
  17798. }, {
  17799. immediate: !0,
  17800. deep: !0
  17801. });
  17802. let S;
  17803. const x = (K) => {
  17804. clearTimeout(S), S = setTimeout(() => {
  17805. t.activeKey === void 0 && (g.value = K), r("update:activeKey", K[K.length - 1]);
  17806. });
  17807. }, C = L(() => !!t.disabled), T = L(() => a.value === "rtl"), w = U("vertical"), P = ae(!1);
  17808. ht(() => {
  17809. var K;
  17810. (t.mode === "inline" || t.mode === "vertical") && h.value ? (w.value = "vertical", P.value = h.value) : (w.value = t.mode, P.value = !1), !((K = s == null ? void 0 : s.mode) === null || K === void 0) && K.value && (w.value = s.mode.value);
  17811. });
  17812. const $ = L(() => w.value === "inline"), A = (K) => {
  17813. O.value = K, r("update:openKeys", K), r("openChange", K);
  17814. }, D = U(O.value), E = ae(!1);
  17815. se(O, () => {
  17816. $.value && (D.value = O.value);
  17817. }, {
  17818. immediate: !0
  17819. }), se($, () => {
  17820. if (!E.value) {
  17821. E.value = !0;
  17822. return;
  17823. }
  17824. $.value ? O.value = D.value : A(S5);
  17825. }, {
  17826. immediate: !0
  17827. });
  17828. const R = L(() => ({
  17829. [`${l.value}`]: !0,
  17830. [`${l.value}-root`]: !0,
  17831. [`${l.value}-${w.value}`]: !0,
  17832. [`${l.value}-inline-collapsed`]: P.value,
  17833. [`${l.value}-rtl`]: T.value,
  17834. [`${l.value}-${t.theme}`]: !0
  17835. })), N = L(() => o()), V = L(() => ({
  17836. horizontal: {
  17837. name: `${N.value}-slide-up`
  17838. },
  17839. inline: sD(`${N.value}-motion-collapse`),
  17840. other: {
  17841. name: `${N.value}-zoom-big`
  17842. }
  17843. }));
  17844. ZU(!0);
  17845. const z = function() {
  17846. let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  17847. const ie = [], X = f.value;
  17848. return K.forEach((H) => {
  17849. const {
  17850. key: G,
  17851. childrenEventKeys: re
  17852. } = X.get(H);
  17853. ie.push(G, ...z(B(re)));
  17854. }), ie;
  17855. }, W = (K) => {
  17856. var ie;
  17857. r("click", K), _(K), (ie = s == null ? void 0 : s.onClick) === null || ie === void 0 || ie.call(s);
  17858. }, F = (K, ie) => {
  17859. var X;
  17860. const H = ((X = y.value[K]) === null || X === void 0 ? void 0 : X.childrenEventKeys) || [];
  17861. let G = O.value.filter((re) => re !== K);
  17862. if (ie)
  17863. G.push(K);
  17864. else if (w.value !== "inline") {
  17865. const re = z(B(H));
  17866. G = yC(G.filter((fe) => !re.includes(fe)));
  17867. }
  17868. Zp(O, G) || A(G);
  17869. }, Q = (K, ie) => {
  17870. f.value.set(K, ie), f.value = new Map(f.value);
  17871. }, Z = (K) => {
  17872. f.value.delete(K), f.value = new Map(f.value);
  17873. }, ne = U(0), ee = L(() => {
  17874. var K;
  17875. return t.expandIcon || n.expandIcon || !((K = s == null ? void 0 : s.expandIcon) === null || K === void 0) && K.value ? (ie) => {
  17876. let X = t.expandIcon || n.expandIcon;
  17877. return X = typeof X == "function" ? X(ie) : X, Pn(X, {
  17878. class: `${l.value}-submenu-expand-icon`
  17879. }, !1);
  17880. } : null;
  17881. });
  17882. Y1e({
  17883. prefixCls: l,
  17884. activeKeys: g,
  17885. openKeys: O,
  17886. selectedKeys: m,
  17887. changeActiveKeys: x,
  17888. disabled: C,
  17889. rtl: T,
  17890. mode: w,
  17891. inlineIndent: L(() => t.inlineIndent),
  17892. subMenuCloseDelay: L(() => t.subMenuCloseDelay),
  17893. subMenuOpenDelay: L(() => t.subMenuOpenDelay),
  17894. builtinPlacements: L(() => t.builtinPlacements),
  17895. triggerSubMenuAction: L(() => t.triggerSubMenuAction),
  17896. getPopupContainer: L(() => t.getPopupContainer),
  17897. inlineCollapsed: P,
  17898. theme: L(() => t.theme),
  17899. siderCollapsed: d,
  17900. defaultMotions: L(() => v.value ? V.value : null),
  17901. motion: L(() => v.value ? t.motion : null),
  17902. overflowDisabled: ae(void 0),
  17903. onOpenChange: F,
  17904. onItemClick: W,
  17905. registerMenuInfo: Q,
  17906. unRegisterMenuInfo: Z,
  17907. selectedSubMenuKeys: b,
  17908. expandIcon: ee,
  17909. forceSubMenuRender: L(() => t.forceSubMenuRender),
  17910. rootClassName: c
  17911. });
  17912. const oe = () => {
  17913. var K;
  17914. return p.value || Yn((K = n.default) === null || K === void 0 ? void 0 : K.call(n));
  17915. };
  17916. return () => {
  17917. var K;
  17918. const ie = oe(), X = ne.value >= ie.length - 1 || w.value !== "horizontal" || t.disabledOverflow, H = (re) => w.value !== "horizontal" || t.disabledOverflow ? re : (
  17919. // Need wrap for overflow dropdown that do not response for open
  17920. re.map((fe, de) => (
  17921. // Always wrap provider to avoid sub node re-mount
  17922. M(R1, {
  17923. key: fe.key,
  17924. overflowDisabled: de > ne.value
  17925. }, {
  17926. default: () => fe
  17927. })
  17928. ))
  17929. ), G = ((K = n.overflowedIndicator) === null || K === void 0 ? void 0 : K.call(n)) || M(hx, null, null);
  17930. return u(M(Ms, j(j({}, i), {}, {
  17931. onMousedown: t.onMousedown,
  17932. prefixCls: `${l.value}-overflow`,
  17933. component: "ul",
  17934. itemComponent: Th,
  17935. class: [R.value, i.class, c.value],
  17936. role: "menu",
  17937. id: t.id,
  17938. data: H(ie),
  17939. renderRawItem: (re) => re,
  17940. renderRawRest: (re) => {
  17941. const fe = re.length, de = fe ? ie.slice(-fe) : null;
  17942. return M(wt, null, [M(Ph, {
  17943. eventKey: My,
  17944. key: My,
  17945. title: G,
  17946. disabled: X,
  17947. internalPopupClose: fe === 0
  17948. }, {
  17949. default: () => de
  17950. }), M(d5, null, {
  17951. default: () => [M(Ph, {
  17952. eventKey: My,
  17953. key: My,
  17954. title: G,
  17955. disabled: X,
  17956. internalPopupClose: fe === 0
  17957. }, {
  17958. default: () => de
  17959. })]
  17960. })]);
  17961. },
  17962. maxCount: w.value !== "horizontal" || t.disabledOverflow ? Ms.INVALIDATE : Ms.RESPONSIVE,
  17963. ssr: "full",
  17964. "data-menu-list": !0,
  17965. onVisibleChange: (re) => {
  17966. ne.value = re;
  17967. }
  17968. }), {
  17969. default: () => [M(PS, {
  17970. to: "body"
  17971. }, {
  17972. default: () => [M("div", {
  17973. style: {
  17974. display: "none"
  17975. },
  17976. "aria-hidden": !0
  17977. }, [M(d5, null, {
  17978. default: () => [H(oe())]
  17979. })])]
  17980. })]
  17981. }));
  17982. };
  17983. }
  17984. });
  17985. jl.install = function(t) {
  17986. return t.component(jl.name, jl), t.component(Th.name, Th), t.component(Ph.name, Ph), t.component(L1.name, L1), t.component(k1.name, k1), t;
  17987. };
  17988. jl.Item = Th;
  17989. jl.Divider = L1;
  17990. jl.SubMenu = Ph;
  17991. jl.ItemGroup = k1;
  17992. var Iy = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
  17993. function vx(t) {
  17994. return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
  17995. }
  17996. var mOe = function(t, e) {
  17997. var n = {};
  17998. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  17999. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  18000. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  18001. return n;
  18002. };
  18003. const yOe = {
  18004. prefixCls: String,
  18005. name: String,
  18006. id: String,
  18007. type: String,
  18008. defaultChecked: {
  18009. type: [Boolean, Number],
  18010. default: void 0
  18011. },
  18012. checked: {
  18013. type: [Boolean, Number],
  18014. default: void 0
  18015. },
  18016. disabled: Boolean,
  18017. tabindex: {
  18018. type: [Number, String]
  18019. },
  18020. readonly: Boolean,
  18021. autofocus: Boolean,
  18022. value: Y.any,
  18023. required: Boolean
  18024. }, KU = te({
  18025. compatConfig: {
  18026. MODE: 3
  18027. },
  18028. name: "Checkbox",
  18029. inheritAttrs: !1,
  18030. props: sr(yOe, {
  18031. prefixCls: "rc-checkbox",
  18032. type: "checkbox",
  18033. defaultChecked: !1
  18034. }),
  18035. emits: ["click", "change"],
  18036. setup(t, e) {
  18037. let {
  18038. attrs: n,
  18039. emit: r,
  18040. expose: i
  18041. } = e;
  18042. const a = U(t.checked === void 0 ? t.defaultChecked : t.checked), o = U();
  18043. se(() => t.checked, () => {
  18044. a.value = t.checked;
  18045. }), i({
  18046. focus() {
  18047. var c;
  18048. (c = o.value) === null || c === void 0 || c.focus();
  18049. },
  18050. blur() {
  18051. var c;
  18052. (c = o.value) === null || c === void 0 || c.blur();
  18053. }
  18054. });
  18055. const s = U(), l = (c) => {
  18056. if (t.disabled)
  18057. return;
  18058. t.checked === void 0 && (a.value = c.target.checked), c.shiftKey = s.value;
  18059. const f = {
  18060. target: I(I({}, t), {
  18061. checked: c.target.checked
  18062. }),
  18063. stopPropagation() {
  18064. c.stopPropagation();
  18065. },
  18066. preventDefault() {
  18067. c.preventDefault();
  18068. },
  18069. nativeEvent: c
  18070. };
  18071. t.checked !== void 0 && (o.value.checked = !!t.checked), r("change", f), s.value = !1;
  18072. }, u = (c) => {
  18073. r("click", c), s.value = c.shiftKey;
  18074. };
  18075. return () => {
  18076. const {
  18077. prefixCls: c,
  18078. name: f,
  18079. id: d,
  18080. type: h,
  18081. disabled: p,
  18082. readonly: v,
  18083. tabindex: g,
  18084. autofocus: m,
  18085. value: y,
  18086. required: b
  18087. } = t, _ = mOe(t, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
  18088. class: O,
  18089. onFocus: S,
  18090. onBlur: x,
  18091. onKeydown: C,
  18092. onKeypress: T,
  18093. onKeyup: w
  18094. } = n, P = I(I({}, _), n), $ = Object.keys(P).reduce((E, R) => ((R.startsWith("data-") || R.startsWith("aria-") || R === "role") && (E[R] = P[R]), E), {}), A = ye(c, O, {
  18095. [`${c}-checked`]: a.value,
  18096. [`${c}-disabled`]: p
  18097. }), D = I(I({
  18098. name: f,
  18099. id: d,
  18100. type: h,
  18101. readonly: v,
  18102. disabled: p,
  18103. tabindex: g,
  18104. class: `${c}-input`,
  18105. checked: !!a.value,
  18106. autofocus: m,
  18107. value: y
  18108. }, $), {
  18109. onChange: l,
  18110. onClick: u,
  18111. onFocus: S,
  18112. onBlur: x,
  18113. onKeydown: C,
  18114. onKeypress: T,
  18115. onKeyup: w,
  18116. required: b
  18117. });
  18118. return M("span", {
  18119. class: A
  18120. }, [M("input", j({
  18121. ref: o
  18122. }, D), null), M("span", {
  18123. class: `${c}-inner`
  18124. }, null)]);
  18125. };
  18126. }
  18127. }), JU = Symbol("radioGroupContextKey"), bOe = (t) => {
  18128. pt(JU, t);
  18129. }, _Oe = () => Ge(JU, void 0), eX = Symbol("radioOptionTypeContextKey"), OOe = (t) => {
  18130. pt(eX, t);
  18131. }, SOe = () => Ge(eX, void 0), xOe = new Ot("antRadioEffect", {
  18132. "0%": {
  18133. transform: "scale(1)",
  18134. opacity: 0.5
  18135. },
  18136. "100%": {
  18137. transform: "scale(1.6)",
  18138. opacity: 0
  18139. }
  18140. }), wOe = (t) => {
  18141. const {
  18142. componentCls: e,
  18143. antCls: n
  18144. } = t, r = `${e}-group`;
  18145. return {
  18146. [r]: I(I({}, nn(t)), {
  18147. display: "inline-block",
  18148. fontSize: 0,
  18149. // RTL
  18150. [`&${r}-rtl`]: {
  18151. direction: "rtl"
  18152. },
  18153. [`${n}-badge ${n}-badge-count`]: {
  18154. zIndex: 1
  18155. },
  18156. [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
  18157. borderInlineStart: "none"
  18158. }
  18159. })
  18160. };
  18161. }, COe = (t) => {
  18162. const {
  18163. componentCls: e,
  18164. radioWrapperMarginRight: n,
  18165. radioCheckedColor: r,
  18166. radioSize: i,
  18167. motionDurationSlow: a,
  18168. motionDurationMid: o,
  18169. motionEaseInOut: s,
  18170. motionEaseInOutCirc: l,
  18171. radioButtonBg: u,
  18172. colorBorder: c,
  18173. lineWidth: f,
  18174. radioDotSize: d,
  18175. colorBgContainerDisabled: h,
  18176. colorTextDisabled: p,
  18177. paddingXS: v,
  18178. radioDotDisabledColor: g,
  18179. lineType: m,
  18180. radioDotDisabledSize: y,
  18181. wireframe: b,
  18182. colorWhite: _
  18183. } = t, O = `${e}-inner`;
  18184. return {
  18185. [`${e}-wrapper`]: I(I({}, nn(t)), {
  18186. position: "relative",
  18187. display: "inline-flex",
  18188. alignItems: "baseline",
  18189. marginInlineStart: 0,
  18190. marginInlineEnd: n,
  18191. cursor: "pointer",
  18192. // RTL
  18193. [`&${e}-wrapper-rtl`]: {
  18194. direction: "rtl"
  18195. },
  18196. "&-disabled": {
  18197. cursor: "not-allowed",
  18198. color: t.colorTextDisabled
  18199. },
  18200. "&::after": {
  18201. display: "inline-block",
  18202. width: 0,
  18203. overflow: "hidden",
  18204. content: '"\\a0"'
  18205. },
  18206. // hashId 在 wrapper 上,只能铺平
  18207. [`${e}-checked::after`]: {
  18208. position: "absolute",
  18209. insetBlockStart: 0,
  18210. insetInlineStart: 0,
  18211. width: "100%",
  18212. height: "100%",
  18213. border: `${f}px ${m} ${r}`,
  18214. borderRadius: "50%",
  18215. visibility: "hidden",
  18216. animationName: xOe,
  18217. animationDuration: a,
  18218. animationTimingFunction: s,
  18219. animationFillMode: "both",
  18220. content: '""'
  18221. },
  18222. [e]: I(I({}, nn(t)), {
  18223. position: "relative",
  18224. display: "inline-block",
  18225. outline: "none",
  18226. cursor: "pointer",
  18227. alignSelf: "center"
  18228. }),
  18229. [`${e}-wrapper:hover &,
  18230. &:hover ${O}`]: {
  18231. borderColor: r
  18232. },
  18233. [`${e}-input:focus-visible + ${O}`]: I({}, d0(t)),
  18234. [`${e}:hover::after, ${e}-wrapper:hover &::after`]: {
  18235. visibility: "visible"
  18236. },
  18237. [`${e}-inner`]: {
  18238. "&::after": {
  18239. boxSizing: "border-box",
  18240. position: "absolute",
  18241. insetBlockStart: "50%",
  18242. insetInlineStart: "50%",
  18243. display: "block",
  18244. width: i,
  18245. height: i,
  18246. marginBlockStart: i / -2,
  18247. marginInlineStart: i / -2,
  18248. backgroundColor: b ? r : _,
  18249. borderBlockStart: 0,
  18250. borderInlineStart: 0,
  18251. borderRadius: i,
  18252. transform: "scale(0)",
  18253. opacity: 0,
  18254. transition: `all ${a} ${l}`,
  18255. content: '""'
  18256. },
  18257. boxSizing: "border-box",
  18258. position: "relative",
  18259. insetBlockStart: 0,
  18260. insetInlineStart: 0,
  18261. display: "block",
  18262. width: i,
  18263. height: i,
  18264. backgroundColor: u,
  18265. borderColor: c,
  18266. borderStyle: "solid",
  18267. borderWidth: f,
  18268. borderRadius: "50%",
  18269. transition: `all ${o}`
  18270. },
  18271. [`${e}-input`]: {
  18272. position: "absolute",
  18273. insetBlockStart: 0,
  18274. insetInlineEnd: 0,
  18275. insetBlockEnd: 0,
  18276. insetInlineStart: 0,
  18277. zIndex: 1,
  18278. cursor: "pointer",
  18279. opacity: 0
  18280. },
  18281. // 选中状态
  18282. [`${e}-checked`]: {
  18283. [O]: {
  18284. borderColor: r,
  18285. backgroundColor: b ? u : r,
  18286. "&::after": {
  18287. transform: `scale(${d / i})`,
  18288. opacity: 1,
  18289. transition: `all ${a} ${l}`
  18290. }
  18291. }
  18292. },
  18293. [`${e}-disabled`]: {
  18294. cursor: "not-allowed",
  18295. [O]: {
  18296. backgroundColor: h,
  18297. borderColor: c,
  18298. cursor: "not-allowed",
  18299. "&::after": {
  18300. backgroundColor: g
  18301. }
  18302. },
  18303. [`${e}-input`]: {
  18304. cursor: "not-allowed"
  18305. },
  18306. [`${e}-disabled + span`]: {
  18307. color: p,
  18308. cursor: "not-allowed"
  18309. },
  18310. [`&${e}-checked`]: {
  18311. [O]: {
  18312. "&::after": {
  18313. transform: `scale(${y / i})`
  18314. }
  18315. }
  18316. }
  18317. },
  18318. [`span${e} + *`]: {
  18319. paddingInlineStart: v,
  18320. paddingInlineEnd: v
  18321. }
  18322. })
  18323. };
  18324. }, TOe = (t) => {
  18325. const {
  18326. radioButtonColor: e,
  18327. controlHeight: n,
  18328. componentCls: r,
  18329. lineWidth: i,
  18330. lineType: a,
  18331. colorBorder: o,
  18332. motionDurationSlow: s,
  18333. motionDurationMid: l,
  18334. radioButtonPaddingHorizontal: u,
  18335. fontSize: c,
  18336. radioButtonBg: f,
  18337. fontSizeLG: d,
  18338. controlHeightLG: h,
  18339. controlHeightSM: p,
  18340. paddingXS: v,
  18341. borderRadius: g,
  18342. borderRadiusSM: m,
  18343. borderRadiusLG: y,
  18344. radioCheckedColor: b,
  18345. radioButtonCheckedBg: _,
  18346. radioButtonHoverColor: O,
  18347. radioButtonActiveColor: S,
  18348. radioSolidCheckedColor: x,
  18349. colorTextDisabled: C,
  18350. colorBgContainerDisabled: T,
  18351. radioDisabledButtonCheckedColor: w,
  18352. radioDisabledButtonCheckedBg: P
  18353. } = t;
  18354. return {
  18355. [`${r}-button-wrapper`]: {
  18356. position: "relative",
  18357. display: "inline-block",
  18358. height: n,
  18359. margin: 0,
  18360. paddingInline: u,
  18361. paddingBlock: 0,
  18362. color: e,
  18363. fontSize: c,
  18364. lineHeight: `${n - i * 2}px`,
  18365. background: f,
  18366. border: `${i}px ${a} ${o}`,
  18367. // strange align fix for chrome but works
  18368. // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
  18369. borderBlockStartWidth: i + 0.02,
  18370. borderInlineStartWidth: 0,
  18371. borderInlineEndWidth: i,
  18372. cursor: "pointer",
  18373. transition: [`color ${l}`, `background ${l}`, `border-color ${l}`, `box-shadow ${l}`].join(","),
  18374. a: {
  18375. color: e
  18376. },
  18377. [`> ${r}-button`]: {
  18378. position: "absolute",
  18379. insetBlockStart: 0,
  18380. insetInlineStart: 0,
  18381. zIndex: -1,
  18382. width: "100%",
  18383. height: "100%"
  18384. },
  18385. "&:not(:first-child)": {
  18386. "&::before": {
  18387. position: "absolute",
  18388. insetBlockStart: -i,
  18389. insetInlineStart: -i,
  18390. display: "block",
  18391. boxSizing: "content-box",
  18392. width: 1,
  18393. height: "100%",
  18394. paddingBlock: i,
  18395. paddingInline: 0,
  18396. backgroundColor: o,
  18397. transition: `background-color ${s}`,
  18398. content: '""'
  18399. }
  18400. },
  18401. "&:first-child": {
  18402. borderInlineStart: `${i}px ${a} ${o}`,
  18403. borderStartStartRadius: g,
  18404. borderEndStartRadius: g
  18405. },
  18406. "&:last-child": {
  18407. borderStartEndRadius: g,
  18408. borderEndEndRadius: g
  18409. },
  18410. "&:first-child:last-child": {
  18411. borderRadius: g
  18412. },
  18413. [`${r}-group-large &`]: {
  18414. height: h,
  18415. fontSize: d,
  18416. lineHeight: `${h - i * 2}px`,
  18417. "&:first-child": {
  18418. borderStartStartRadius: y,
  18419. borderEndStartRadius: y
  18420. },
  18421. "&:last-child": {
  18422. borderStartEndRadius: y,
  18423. borderEndEndRadius: y
  18424. }
  18425. },
  18426. [`${r}-group-small &`]: {
  18427. height: p,
  18428. paddingInline: v - i,
  18429. paddingBlock: 0,
  18430. lineHeight: `${p - i * 2}px`,
  18431. "&:first-child": {
  18432. borderStartStartRadius: m,
  18433. borderEndStartRadius: m
  18434. },
  18435. "&:last-child": {
  18436. borderStartEndRadius: m,
  18437. borderEndEndRadius: m
  18438. }
  18439. },
  18440. "&:hover": {
  18441. position: "relative",
  18442. color: b
  18443. },
  18444. "&:has(:focus-visible)": I({}, d0(t)),
  18445. [`${r}-inner, input[type='checkbox'], input[type='radio']`]: {
  18446. width: 0,
  18447. height: 0,
  18448. opacity: 0,
  18449. pointerEvents: "none"
  18450. },
  18451. [`&-checked:not(${r}-button-wrapper-disabled)`]: {
  18452. zIndex: 1,
  18453. color: b,
  18454. background: _,
  18455. borderColor: b,
  18456. "&::before": {
  18457. backgroundColor: b
  18458. },
  18459. "&:first-child": {
  18460. borderColor: b
  18461. },
  18462. "&:hover": {
  18463. color: O,
  18464. borderColor: O,
  18465. "&::before": {
  18466. backgroundColor: O
  18467. }
  18468. },
  18469. "&:active": {
  18470. color: S,
  18471. borderColor: S,
  18472. "&::before": {
  18473. backgroundColor: S
  18474. }
  18475. }
  18476. },
  18477. [`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]: {
  18478. color: x,
  18479. background: b,
  18480. borderColor: b,
  18481. "&:hover": {
  18482. color: x,
  18483. background: O,
  18484. borderColor: O
  18485. },
  18486. "&:active": {
  18487. color: x,
  18488. background: S,
  18489. borderColor: S
  18490. }
  18491. },
  18492. "&-disabled": {
  18493. color: C,
  18494. backgroundColor: T,
  18495. borderColor: o,
  18496. cursor: "not-allowed",
  18497. "&:first-child, &:hover": {
  18498. color: C,
  18499. backgroundColor: T,
  18500. borderColor: o
  18501. }
  18502. },
  18503. [`&-disabled${r}-button-wrapper-checked`]: {
  18504. color: w,
  18505. backgroundColor: P,
  18506. borderColor: o,
  18507. boxShadow: "none"
  18508. }
  18509. }
  18510. };
  18511. }, tX = Sn("Radio", (t) => {
  18512. const {
  18513. padding: e,
  18514. lineWidth: n,
  18515. controlItemBgActiveDisabled: r,
  18516. colorTextDisabled: i,
  18517. colorBgContainer: a,
  18518. fontSizeLG: o,
  18519. controlOutline: s,
  18520. colorPrimaryHover: l,
  18521. colorPrimaryActive: u,
  18522. colorText: c,
  18523. colorPrimary: f,
  18524. marginXS: d,
  18525. controlOutlineWidth: h,
  18526. colorTextLightSolid: p,
  18527. wireframe: v
  18528. } = t, g = `0 0 0 ${h}px ${s}`, m = g, y = o, b = 4, _ = y - b * 2, O = v ? _ : y - (b + n) * 2, S = f, x = c, C = l, T = u, w = e - n, A = Bt(t, {
  18529. radioFocusShadow: g,
  18530. radioButtonFocusShadow: m,
  18531. radioSize: y,
  18532. radioDotSize: O,
  18533. radioDotDisabledSize: _,
  18534. radioCheckedColor: S,
  18535. radioDotDisabledColor: i,
  18536. radioSolidCheckedColor: p,
  18537. radioButtonBg: a,
  18538. radioButtonCheckedBg: a,
  18539. radioButtonColor: x,
  18540. radioButtonHoverColor: C,
  18541. radioButtonActiveColor: T,
  18542. radioButtonPaddingHorizontal: w,
  18543. radioDisabledButtonCheckedBg: r,
  18544. radioDisabledButtonCheckedColor: i,
  18545. radioWrapperMarginRight: d
  18546. });
  18547. return [wOe(A), COe(A), TOe(A)];
  18548. });
  18549. var POe = function(t, e) {
  18550. var n = {};
  18551. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  18552. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  18553. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  18554. return n;
  18555. };
  18556. const nX = () => ({
  18557. prefixCls: String,
  18558. checked: nt(),
  18559. disabled: nt(),
  18560. isGroup: nt(),
  18561. value: Y.any,
  18562. name: String,
  18563. id: String,
  18564. autofocus: nt(),
  18565. onChange: tt(),
  18566. onFocus: tt(),
  18567. onBlur: tt(),
  18568. onClick: tt(),
  18569. "onUpdate:checked": tt(),
  18570. "onUpdate:value": tt()
  18571. }), fi = te({
  18572. compatConfig: {
  18573. MODE: 3
  18574. },
  18575. name: "ARadio",
  18576. inheritAttrs: !1,
  18577. props: nX(),
  18578. setup(t, e) {
  18579. let {
  18580. emit: n,
  18581. expose: r,
  18582. slots: i,
  18583. attrs: a
  18584. } = e;
  18585. const o = ss(), s = ro.useInject(), l = SOe(), u = _Oe(), c = Ko(), f = L(() => {
  18586. var C;
  18587. return (C = v.value) !== null && C !== void 0 ? C : c.value;
  18588. }), d = U(), {
  18589. prefixCls: h,
  18590. direction: p,
  18591. disabled: v
  18592. } = It("radio", t), g = L(() => (u == null ? void 0 : u.optionType.value) === "button" || l === "button" ? `${h.value}-button` : h.value), m = Ko(), [y, b] = tX(h);
  18593. r({
  18594. focus: () => {
  18595. d.value.focus();
  18596. },
  18597. blur: () => {
  18598. d.value.blur();
  18599. }
  18600. });
  18601. const S = (C) => {
  18602. const T = C.target.checked;
  18603. n("update:checked", T), n("update:value", T), n("change", C), o.onFieldChange();
  18604. }, x = (C) => {
  18605. n("change", C), u && u.onChange && u.onChange(C);
  18606. };
  18607. return () => {
  18608. var C;
  18609. const T = u, {
  18610. prefixCls: w,
  18611. id: P = o.id.value
  18612. } = t, $ = POe(t, ["prefixCls", "id"]), A = I(I({
  18613. prefixCls: g.value,
  18614. id: P
  18615. }, or($, ["onUpdate:checked", "onUpdate:value"])), {
  18616. disabled: (C = v.value) !== null && C !== void 0 ? C : m.value
  18617. });
  18618. T ? (A.name = T.name.value, A.onChange = x, A.checked = t.value === T.value.value, A.disabled = f.value || T.disabled.value) : A.onChange = S;
  18619. const D = ye({
  18620. [`${g.value}-wrapper`]: !0,
  18621. [`${g.value}-wrapper-checked`]: A.checked,
  18622. [`${g.value}-wrapper-disabled`]: A.disabled,
  18623. [`${g.value}-wrapper-rtl`]: p.value === "rtl",
  18624. [`${g.value}-wrapper-in-form-item`]: s.isFormItemInput
  18625. }, a.class, b.value);
  18626. return y(M("label", j(j({}, a), {}, {
  18627. class: D
  18628. }), [M(KU, j(j({}, A), {}, {
  18629. type: "radio",
  18630. ref: d
  18631. }), null), i.default && M("span", null, [i.default()])]));
  18632. };
  18633. }
  18634. }), $Oe = () => ({
  18635. prefixCls: String,
  18636. value: Y.any,
  18637. size: hn(),
  18638. options: uf(),
  18639. disabled: nt(),
  18640. name: String,
  18641. buttonStyle: hn("outline"),
  18642. id: String,
  18643. optionType: hn("default"),
  18644. onChange: tt(),
  18645. "onUpdate:value": tt()
  18646. }), vf = te({
  18647. compatConfig: {
  18648. MODE: 3
  18649. },
  18650. name: "ARadioGroup",
  18651. inheritAttrs: !1,
  18652. props: $Oe(),
  18653. // emits: ['update:value', 'change'],
  18654. setup(t, e) {
  18655. let {
  18656. slots: n,
  18657. emit: r,
  18658. attrs: i
  18659. } = e;
  18660. const a = ss(), {
  18661. prefixCls: o,
  18662. direction: s,
  18663. size: l
  18664. } = It("radio", t), [u, c] = tX(o), f = U(t.value), d = U(!1);
  18665. return se(() => t.value, (p) => {
  18666. f.value = p, d.value = !1;
  18667. }), bOe({
  18668. onChange: (p) => {
  18669. const v = f.value, {
  18670. value: g
  18671. } = p.target;
  18672. "value" in t || (f.value = g), !d.value && g !== v && (d.value = !0, r("update:value", g), r("change", p), a.onFieldChange()), Tt(() => {
  18673. d.value = !1;
  18674. });
  18675. },
  18676. value: f,
  18677. disabled: L(() => t.disabled),
  18678. name: L(() => t.name),
  18679. optionType: L(() => t.optionType)
  18680. }), () => {
  18681. var p;
  18682. const {
  18683. options: v,
  18684. buttonStyle: g,
  18685. id: m = a.id.value
  18686. } = t, y = `${o.value}-group`, b = ye(y, `${y}-${g}`, {
  18687. [`${y}-${l.value}`]: l.value,
  18688. [`${y}-rtl`]: s.value === "rtl"
  18689. }, i.class, c.value);
  18690. let _ = null;
  18691. return v && v.length > 0 ? _ = v.map((O) => {
  18692. if (typeof O == "string" || typeof O == "number")
  18693. return M(fi, {
  18694. key: O,
  18695. prefixCls: o.value,
  18696. disabled: t.disabled,
  18697. value: O,
  18698. checked: f.value === O
  18699. }, {
  18700. default: () => [O]
  18701. });
  18702. const {
  18703. value: S,
  18704. disabled: x,
  18705. label: C
  18706. } = O;
  18707. return M(fi, {
  18708. key: `radio-group-value-options-${S}`,
  18709. prefixCls: o.value,
  18710. disabled: x || t.disabled,
  18711. value: S,
  18712. checked: f.value === S
  18713. }, {
  18714. default: () => [C]
  18715. });
  18716. }) : _ = (p = n.default) === null || p === void 0 ? void 0 : p.call(n), u(M("div", j(j({}, i), {}, {
  18717. class: b,
  18718. id: m
  18719. }), [_]));
  18720. };
  18721. }
  18722. }), Io = te({
  18723. compatConfig: {
  18724. MODE: 3
  18725. },
  18726. name: "ARadioButton",
  18727. inheritAttrs: !1,
  18728. props: nX(),
  18729. setup(t, e) {
  18730. let {
  18731. slots: n,
  18732. attrs: r
  18733. } = e;
  18734. const {
  18735. prefixCls: i
  18736. } = It("radio", t);
  18737. return OOe("button"), () => {
  18738. var a;
  18739. return M(fi, j(j(j({}, r), t), {}, {
  18740. prefixCls: i.value
  18741. }), {
  18742. default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
  18743. });
  18744. };
  18745. }
  18746. });
  18747. fi.Group = vf;
  18748. fi.Button = Io;
  18749. fi.install = function(t) {
  18750. return t.component(fi.name, fi), t.component(fi.Group.name, fi.Group), t.component(fi.Button.name, fi.Button), t;
  18751. };
  18752. const rX = (t) => ({
  18753. // Firefox
  18754. "&::-moz-placeholder": {
  18755. opacity: 1
  18756. },
  18757. "&::placeholder": {
  18758. color: t,
  18759. userSelect: "none"
  18760. // https://github.com/ant-design/ant-design/pull/32639
  18761. },
  18762. "&:placeholder-shown": {
  18763. textOverflow: "ellipsis"
  18764. }
  18765. }), b0 = (t) => ({
  18766. borderColor: t.inputBorderHoverColor,
  18767. borderInlineEndWidth: t.lineWidth
  18768. }), N1 = (t) => ({
  18769. borderColor: t.inputBorderHoverColor,
  18770. boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,
  18771. borderInlineEndWidth: t.lineWidth,
  18772. outline: 0
  18773. }), iX = (t) => ({
  18774. color: t.colorTextDisabled,
  18775. backgroundColor: t.colorBgContainerDisabled,
  18776. borderColor: t.colorBorder,
  18777. boxShadow: "none",
  18778. cursor: "not-allowed",
  18779. opacity: 1,
  18780. "&:hover": I({}, b0(Bt(t, {
  18781. inputBorderHoverColor: t.colorBorder
  18782. })))
  18783. }), aX = (t) => {
  18784. const {
  18785. inputPaddingVerticalLG: e,
  18786. fontSizeLG: n,
  18787. lineHeightLG: r,
  18788. borderRadiusLG: i,
  18789. inputPaddingHorizontalLG: a
  18790. } = t;
  18791. return {
  18792. padding: `${e}px ${a}px`,
  18793. fontSize: n,
  18794. lineHeight: r,
  18795. borderRadius: i
  18796. };
  18797. }, oX = (t) => ({
  18798. padding: `${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM - 1}px`,
  18799. borderRadius: t.borderRadiusSM
  18800. }), gx = (t, e) => {
  18801. const {
  18802. componentCls: n,
  18803. colorError: r,
  18804. colorWarning: i,
  18805. colorErrorOutline: a,
  18806. colorWarningOutline: o,
  18807. colorErrorBorderHover: s,
  18808. colorWarningBorderHover: l
  18809. } = t;
  18810. return {
  18811. [`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]: {
  18812. borderColor: r,
  18813. "&:hover": {
  18814. borderColor: s
  18815. },
  18816. "&:focus, &-focused": I({}, N1(Bt(t, {
  18817. inputBorderActiveColor: r,
  18818. inputBorderHoverColor: r,
  18819. controlOutline: a
  18820. }))),
  18821. [`${n}-prefix`]: {
  18822. color: r
  18823. }
  18824. },
  18825. [`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]: {
  18826. borderColor: i,
  18827. "&:hover": {
  18828. borderColor: l
  18829. },
  18830. "&:focus, &-focused": I({}, N1(Bt(t, {
  18831. inputBorderActiveColor: i,
  18832. inputBorderHoverColor: i,
  18833. controlOutline: o
  18834. }))),
  18835. [`${n}-prefix`]: {
  18836. color: i
  18837. }
  18838. }
  18839. };
  18840. }, mx = (t) => I(I({
  18841. position: "relative",
  18842. display: "inline-block",
  18843. width: "100%",
  18844. minWidth: 0,
  18845. padding: `${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,
  18846. color: t.colorText,
  18847. fontSize: t.fontSize,
  18848. lineHeight: t.lineHeight,
  18849. backgroundColor: t.colorBgContainer,
  18850. backgroundImage: "none",
  18851. borderWidth: t.lineWidth,
  18852. borderStyle: t.lineType,
  18853. borderColor: t.colorBorder,
  18854. borderRadius: t.borderRadius,
  18855. transition: `all ${t.motionDurationMid}`
  18856. }, rX(t.colorTextPlaceholder)), {
  18857. "&:hover": I({}, b0(t)),
  18858. "&:focus, &-focused": I({}, N1(t)),
  18859. "&-disabled, &[disabled]": I({}, iX(t)),
  18860. "&-borderless": {
  18861. "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
  18862. backgroundColor: "transparent",
  18863. border: "none",
  18864. boxShadow: "none"
  18865. }
  18866. },
  18867. // Reset height for `textarea`s
  18868. "textarea&": {
  18869. maxWidth: "100%",
  18870. height: "auto",
  18871. minHeight: t.controlHeight,
  18872. lineHeight: t.lineHeight,
  18873. verticalAlign: "bottom",
  18874. transition: `all ${t.motionDurationSlow}, height 0s`,
  18875. resize: "vertical"
  18876. },
  18877. // Size
  18878. "&-lg": I({}, aX(t)),
  18879. "&-sm": I({}, oX(t)),
  18880. // RTL
  18881. "&-rtl": {
  18882. direction: "rtl"
  18883. },
  18884. "&-textarea-rtl": {
  18885. direction: "rtl"
  18886. }
  18887. }), sX = (t) => {
  18888. const {
  18889. componentCls: e,
  18890. antCls: n
  18891. } = t;
  18892. return {
  18893. position: "relative",
  18894. display: "table",
  18895. width: "100%",
  18896. borderCollapse: "separate",
  18897. borderSpacing: 0,
  18898. // Undo padding and float of grid classes
  18899. "&[class*='col-']": {
  18900. paddingInlineEnd: t.paddingXS,
  18901. "&:last-child": {
  18902. paddingInlineEnd: 0
  18903. }
  18904. },
  18905. // Sizing options
  18906. [`&-lg ${e}, &-lg > ${e}-group-addon`]: I({}, aX(t)),
  18907. [`&-sm ${e}, &-sm > ${e}-group-addon`]: I({}, oX(t)),
  18908. [`> ${e}`]: {
  18909. display: "table-cell",
  18910. "&:not(:first-child):not(:last-child)": {
  18911. borderRadius: 0
  18912. }
  18913. },
  18914. [`${e}-group`]: {
  18915. "&-addon, &-wrap": {
  18916. display: "table-cell",
  18917. width: 1,
  18918. whiteSpace: "nowrap",
  18919. verticalAlign: "middle",
  18920. "&:not(:first-child):not(:last-child)": {
  18921. borderRadius: 0
  18922. }
  18923. },
  18924. "&-wrap > *": {
  18925. display: "block !important"
  18926. },
  18927. "&-addon": {
  18928. position: "relative",
  18929. padding: `0 ${t.inputPaddingHorizontal}px`,
  18930. color: t.colorText,
  18931. fontWeight: "normal",
  18932. fontSize: t.fontSize,
  18933. textAlign: "center",
  18934. backgroundColor: t.colorFillAlter,
  18935. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  18936. borderRadius: t.borderRadius,
  18937. transition: `all ${t.motionDurationSlow}`,
  18938. lineHeight: 1,
  18939. // Reset Select's style in addon
  18940. [`${n}-select`]: {
  18941. margin: `-${t.inputPaddingVertical + 1}px -${t.inputPaddingHorizontal}px`,
  18942. [`&${n}-select-single:not(${n}-select-customize-input)`]: {
  18943. [`${n}-select-selector`]: {
  18944. backgroundColor: "inherit",
  18945. border: `${t.lineWidth}px ${t.lineType} transparent`,
  18946. boxShadow: "none"
  18947. }
  18948. },
  18949. "&-open, &-focused": {
  18950. [`${n}-select-selector`]: {
  18951. color: t.colorPrimary
  18952. }
  18953. }
  18954. },
  18955. // https://github.com/ant-design/ant-design/issues/31333
  18956. [`${n}-cascader-picker`]: {
  18957. margin: `-9px -${t.inputPaddingHorizontal}px`,
  18958. backgroundColor: "transparent",
  18959. [`${n}-cascader-input`]: {
  18960. textAlign: "start",
  18961. border: 0,
  18962. boxShadow: "none"
  18963. }
  18964. }
  18965. },
  18966. "&-addon:first-child": {
  18967. borderInlineEnd: 0
  18968. },
  18969. "&-addon:last-child": {
  18970. borderInlineStart: 0
  18971. }
  18972. },
  18973. [`${e}`]: {
  18974. float: "inline-start",
  18975. width: "100%",
  18976. marginBottom: 0,
  18977. textAlign: "inherit",
  18978. "&:focus": {
  18979. zIndex: 1,
  18980. borderInlineEndWidth: 1
  18981. },
  18982. "&:hover": {
  18983. zIndex: 1,
  18984. borderInlineEndWidth: 1,
  18985. [`${e}-search-with-button &`]: {
  18986. zIndex: 0
  18987. }
  18988. }
  18989. },
  18990. // Reset rounded corners
  18991. [`> ${e}:first-child, ${e}-group-addon:first-child`]: {
  18992. borderStartEndRadius: 0,
  18993. borderEndEndRadius: 0,
  18994. // Reset Select's style in addon
  18995. [`${n}-select ${n}-select-selector`]: {
  18996. borderStartEndRadius: 0,
  18997. borderEndEndRadius: 0
  18998. }
  18999. },
  19000. [`> ${e}-affix-wrapper`]: {
  19001. [`&:not(:first-child) ${e}`]: {
  19002. borderStartStartRadius: 0,
  19003. borderEndStartRadius: 0
  19004. },
  19005. [`&:not(:last-child) ${e}`]: {
  19006. borderStartEndRadius: 0,
  19007. borderEndEndRadius: 0
  19008. }
  19009. },
  19010. [`> ${e}:last-child, ${e}-group-addon:last-child`]: {
  19011. borderStartStartRadius: 0,
  19012. borderEndStartRadius: 0,
  19013. // Reset Select's style in addon
  19014. [`${n}-select ${n}-select-selector`]: {
  19015. borderStartStartRadius: 0,
  19016. borderEndStartRadius: 0
  19017. }
  19018. },
  19019. [`${e}-affix-wrapper`]: {
  19020. "&:not(:last-child)": {
  19021. borderStartEndRadius: 0,
  19022. borderEndEndRadius: 0,
  19023. [`${e}-search &`]: {
  19024. borderStartStartRadius: t.borderRadius,
  19025. borderEndStartRadius: t.borderRadius
  19026. }
  19027. },
  19028. [`&:not(:first-child), ${e}-search &:not(:first-child)`]: {
  19029. borderStartStartRadius: 0,
  19030. borderEndStartRadius: 0
  19031. }
  19032. },
  19033. [`&${e}-group-compact`]: I(I({
  19034. display: "block"
  19035. }, _1()), {
  19036. [`${e}-group-addon, ${e}-group-wrap, > ${e}`]: {
  19037. "&:not(:first-child):not(:last-child)": {
  19038. borderInlineEndWidth: t.lineWidth,
  19039. "&:hover": {
  19040. zIndex: 1
  19041. },
  19042. "&:focus": {
  19043. zIndex: 1
  19044. }
  19045. }
  19046. },
  19047. "& > *": {
  19048. display: "inline-block",
  19049. float: "none",
  19050. verticalAlign: "top",
  19051. borderRadius: 0
  19052. },
  19053. [`& > ${e}-affix-wrapper`]: {
  19054. display: "inline-flex"
  19055. },
  19056. [`& > ${n}-picker-range`]: {
  19057. display: "inline-flex"
  19058. },
  19059. "& > *:not(:last-child)": {
  19060. marginInlineEnd: -t.lineWidth,
  19061. borderInlineEndWidth: t.lineWidth
  19062. },
  19063. // Undo float for .ant-input-group .ant-input
  19064. [`${e}`]: {
  19065. float: "none"
  19066. },
  19067. // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
  19068. [`& > ${n}-select > ${n}-select-selector,
  19069. & > ${n}-select-auto-complete ${e},
  19070. & > ${n}-cascader-picker ${e},
  19071. & > ${e}-group-wrapper ${e}`]: {
  19072. borderInlineEndWidth: t.lineWidth,
  19073. borderRadius: 0,
  19074. "&:hover": {
  19075. zIndex: 1
  19076. },
  19077. "&:focus": {
  19078. zIndex: 1
  19079. }
  19080. },
  19081. [`& > ${n}-select-focused`]: {
  19082. zIndex: 1
  19083. },
  19084. // update z-index for arrow icon
  19085. [`& > ${n}-select > ${n}-select-arrow`]: {
  19086. zIndex: 1
  19087. // https://github.com/ant-design/ant-design/issues/20371
  19088. },
  19089. [`& > *:first-child,
  19090. & > ${n}-select:first-child > ${n}-select-selector,
  19091. & > ${n}-select-auto-complete:first-child ${e},
  19092. & > ${n}-cascader-picker:first-child ${e}`]: {
  19093. borderStartStartRadius: t.borderRadius,
  19094. borderEndStartRadius: t.borderRadius
  19095. },
  19096. [`& > *:last-child,
  19097. & > ${n}-select:last-child > ${n}-select-selector,
  19098. & > ${n}-cascader-picker:last-child ${e},
  19099. & > ${n}-cascader-picker-focused:last-child ${e}`]: {
  19100. borderInlineEndWidth: t.lineWidth,
  19101. borderStartEndRadius: t.borderRadius,
  19102. borderEndEndRadius: t.borderRadius
  19103. },
  19104. // https://github.com/ant-design/ant-design/issues/12493
  19105. [`& > ${n}-select-auto-complete ${e}`]: {
  19106. verticalAlign: "top"
  19107. },
  19108. [`${e}-group-wrapper + ${e}-group-wrapper`]: {
  19109. marginInlineStart: -t.lineWidth,
  19110. [`${e}-affix-wrapper`]: {
  19111. borderRadius: 0
  19112. }
  19113. },
  19114. [`${e}-group-wrapper:not(:last-child)`]: {
  19115. [`&${e}-search > ${e}-group`]: {
  19116. [`& > ${e}-group-addon > ${e}-search-button`]: {
  19117. borderRadius: 0
  19118. },
  19119. [`& > ${e}`]: {
  19120. borderStartStartRadius: t.borderRadius,
  19121. borderStartEndRadius: 0,
  19122. borderEndEndRadius: 0,
  19123. borderEndStartRadius: t.borderRadius
  19124. }
  19125. }
  19126. }
  19127. }),
  19128. [`&&-sm ${n}-btn`]: {
  19129. fontSize: t.fontSizeSM,
  19130. height: t.controlHeightSM,
  19131. lineHeight: "normal"
  19132. },
  19133. [`&&-lg ${n}-btn`]: {
  19134. fontSize: t.fontSizeLG,
  19135. height: t.controlHeightLG,
  19136. lineHeight: "normal"
  19137. },
  19138. // Fix https://github.com/ant-design/ant-design/issues/5754
  19139. [`&&-lg ${n}-select-single ${n}-select-selector`]: {
  19140. height: `${t.controlHeightLG}px`,
  19141. [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
  19142. // -2 is for the border size & override default
  19143. lineHeight: `${t.controlHeightLG - 2}px`
  19144. },
  19145. [`${n}-select-selection-search-input`]: {
  19146. height: `${t.controlHeightLG}px`
  19147. }
  19148. },
  19149. [`&&-sm ${n}-select-single ${n}-select-selector`]: {
  19150. height: `${t.controlHeightSM}px`,
  19151. [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
  19152. // -2 is for the border size & override default
  19153. lineHeight: `${t.controlHeightSM - 2}px`
  19154. },
  19155. [`${n}-select-selection-search-input`]: {
  19156. height: `${t.controlHeightSM}px`
  19157. }
  19158. }
  19159. };
  19160. }, AOe = (t) => {
  19161. const {
  19162. componentCls: e,
  19163. controlHeightSM: n,
  19164. lineWidth: r
  19165. } = t, a = (n - r * 2 - 16) / 2;
  19166. return {
  19167. [e]: I(I(I(I({}, nn(t)), mx(t)), gx(t, e)), {
  19168. '&[type="color"]': {
  19169. height: t.controlHeight,
  19170. [`&${e}-lg`]: {
  19171. height: t.controlHeightLG
  19172. },
  19173. [`&${e}-sm`]: {
  19174. height: n,
  19175. paddingTop: a,
  19176. paddingBottom: a
  19177. }
  19178. }
  19179. })
  19180. };
  19181. }, EOe = (t) => {
  19182. const {
  19183. componentCls: e
  19184. } = t;
  19185. return {
  19186. // ========================= Input =========================
  19187. [`${e}-clear-icon`]: {
  19188. margin: 0,
  19189. color: t.colorTextQuaternary,
  19190. fontSize: t.fontSizeIcon,
  19191. verticalAlign: -1,
  19192. // https://github.com/ant-design/ant-design/pull/18151
  19193. // https://codesandbox.io/s/wizardly-sun-u10br
  19194. cursor: "pointer",
  19195. transition: `color ${t.motionDurationSlow}`,
  19196. "&:hover": {
  19197. color: t.colorTextTertiary
  19198. },
  19199. "&:active": {
  19200. color: t.colorText
  19201. },
  19202. "&-hidden": {
  19203. visibility: "hidden"
  19204. },
  19205. "&-has-suffix": {
  19206. margin: `0 ${t.inputAffixPadding}px`
  19207. }
  19208. },
  19209. // ======================= TextArea ========================
  19210. "&-textarea-with-clear-btn": {
  19211. padding: "0 !important",
  19212. border: "0 !important",
  19213. [`${e}-clear-icon`]: {
  19214. position: "absolute",
  19215. insetBlockStart: t.paddingXS,
  19216. insetInlineEnd: t.paddingXS,
  19217. zIndex: 1
  19218. }
  19219. }
  19220. };
  19221. }, MOe = (t) => {
  19222. const {
  19223. componentCls: e,
  19224. inputAffixPadding: n,
  19225. colorTextDescription: r,
  19226. motionDurationSlow: i,
  19227. colorIcon: a,
  19228. colorIconHover: o,
  19229. iconCls: s
  19230. } = t;
  19231. return {
  19232. [`${e}-affix-wrapper`]: I(I(I(I(I({}, mx(t)), {
  19233. display: "inline-flex",
  19234. [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, b0(t)), {
  19235. zIndex: 1,
  19236. [`${e}-search-with-button &`]: {
  19237. zIndex: 0
  19238. }
  19239. }),
  19240. "&-focused, &:focus": {
  19241. zIndex: 1
  19242. },
  19243. "&-disabled": {
  19244. [`${e}[disabled]`]: {
  19245. background: "transparent"
  19246. }
  19247. },
  19248. [`> input${e}`]: {
  19249. padding: 0,
  19250. fontSize: "inherit",
  19251. border: "none",
  19252. borderRadius: 0,
  19253. outline: "none",
  19254. "&:focus": {
  19255. boxShadow: "none !important"
  19256. }
  19257. },
  19258. "&::before": {
  19259. width: 0,
  19260. visibility: "hidden",
  19261. content: '"\\a0"'
  19262. },
  19263. [`${e}`]: {
  19264. "&-prefix, &-suffix": {
  19265. display: "flex",
  19266. flex: "none",
  19267. alignItems: "center",
  19268. "> *:not(:last-child)": {
  19269. marginInlineEnd: t.paddingXS
  19270. }
  19271. },
  19272. "&-show-count-suffix": {
  19273. color: r
  19274. },
  19275. "&-show-count-has-suffix": {
  19276. marginInlineEnd: t.paddingXXS
  19277. },
  19278. "&-prefix": {
  19279. marginInlineEnd: n
  19280. },
  19281. "&-suffix": {
  19282. marginInlineStart: n
  19283. }
  19284. }
  19285. }), EOe(t)), {
  19286. // password
  19287. [`${s}${e}-password-icon`]: {
  19288. color: a,
  19289. cursor: "pointer",
  19290. transition: `all ${i}`,
  19291. "&:hover": {
  19292. color: o
  19293. }
  19294. }
  19295. }), gx(t, `${e}-affix-wrapper`))
  19296. };
  19297. }, IOe = (t) => {
  19298. const {
  19299. componentCls: e,
  19300. colorError: n,
  19301. colorSuccess: r,
  19302. borderRadiusLG: i,
  19303. borderRadiusSM: a
  19304. } = t;
  19305. return {
  19306. [`${e}-group`]: I(I(I({}, nn(t)), sX(t)), {
  19307. "&-rtl": {
  19308. direction: "rtl"
  19309. },
  19310. "&-wrapper": {
  19311. display: "inline-block",
  19312. width: "100%",
  19313. textAlign: "start",
  19314. verticalAlign: "top",
  19315. "&-rtl": {
  19316. direction: "rtl"
  19317. },
  19318. // Size
  19319. "&-lg": {
  19320. [`${e}-group-addon`]: {
  19321. borderRadius: i
  19322. }
  19323. },
  19324. "&-sm": {
  19325. [`${e}-group-addon`]: {
  19326. borderRadius: a
  19327. }
  19328. },
  19329. // Status
  19330. "&-status-error": {
  19331. [`${e}-group-addon`]: {
  19332. color: n,
  19333. borderColor: n
  19334. }
  19335. },
  19336. "&-status-warning": {
  19337. [`${e}-group-addon:last-child`]: {
  19338. color: r,
  19339. borderColor: r
  19340. }
  19341. }
  19342. }
  19343. })
  19344. };
  19345. }, DOe = (t) => {
  19346. const {
  19347. componentCls: e,
  19348. antCls: n
  19349. } = t, r = `${e}-search`;
  19350. return {
  19351. [r]: {
  19352. [`${e}`]: {
  19353. "&:hover, &:focus": {
  19354. borderColor: t.colorPrimaryHover,
  19355. [`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]: {
  19356. borderInlineStartColor: t.colorPrimaryHover
  19357. }
  19358. }
  19359. },
  19360. [`${e}-affix-wrapper`]: {
  19361. borderRadius: 0
  19362. },
  19363. // fix slight height diff in Firefox:
  19364. // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
  19365. [`${e}-lg`]: {
  19366. lineHeight: t.lineHeightLG - 2e-4
  19367. },
  19368. [`> ${e}-group`]: {
  19369. [`> ${e}-group-addon:last-child`]: {
  19370. insetInlineStart: -1,
  19371. padding: 0,
  19372. border: 0,
  19373. [`${r}-button`]: {
  19374. paddingTop: 0,
  19375. paddingBottom: 0,
  19376. borderStartStartRadius: 0,
  19377. borderStartEndRadius: t.borderRadius,
  19378. borderEndEndRadius: t.borderRadius,
  19379. borderEndStartRadius: 0
  19380. },
  19381. [`${r}-button:not(${n}-btn-primary)`]: {
  19382. color: t.colorTextDescription,
  19383. "&:hover": {
  19384. color: t.colorPrimaryHover
  19385. },
  19386. "&:active": {
  19387. color: t.colorPrimaryActive
  19388. },
  19389. [`&${n}-btn-loading::before`]: {
  19390. insetInlineStart: 0,
  19391. insetInlineEnd: 0,
  19392. insetBlockStart: 0,
  19393. insetBlockEnd: 0
  19394. }
  19395. }
  19396. }
  19397. },
  19398. [`${r}-button`]: {
  19399. height: t.controlHeight,
  19400. "&:hover, &:focus": {
  19401. zIndex: 1
  19402. }
  19403. },
  19404. [`&-large ${r}-button`]: {
  19405. height: t.controlHeightLG
  19406. },
  19407. [`&-small ${r}-button`]: {
  19408. height: t.controlHeightSM
  19409. },
  19410. "&-rtl": {
  19411. direction: "rtl"
  19412. },
  19413. // ===================== Compact Item Customized Styles =====================
  19414. [`&${e}-compact-item`]: {
  19415. [`&:not(${e}-compact-last-item)`]: {
  19416. [`${e}-group-addon`]: {
  19417. [`${e}-search-button`]: {
  19418. marginInlineEnd: -t.lineWidth,
  19419. borderRadius: 0
  19420. }
  19421. }
  19422. },
  19423. [`&:not(${e}-compact-first-item)`]: {
  19424. [`${e},${e}-affix-wrapper`]: {
  19425. borderRadius: 0
  19426. }
  19427. },
  19428. [`> ${e}-group-addon ${e}-search-button,
  19429. > ${e},
  19430. ${e}-affix-wrapper`]: {
  19431. "&:hover,&:focus,&:active": {
  19432. zIndex: 2
  19433. }
  19434. },
  19435. [`> ${e}-affix-wrapper-focused`]: {
  19436. zIndex: 2
  19437. }
  19438. }
  19439. }
  19440. };
  19441. };
  19442. function lX(t) {
  19443. return Bt(t, {
  19444. inputAffixPadding: t.paddingXXS,
  19445. inputPaddingVertical: Math.max(Math.round((t.controlHeight - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 3),
  19446. inputPaddingVerticalLG: Math.ceil((t.controlHeightLG - t.fontSizeLG * t.lineHeightLG) / 2 * 10) / 10 - t.lineWidth,
  19447. inputPaddingVerticalSM: Math.max(Math.round((t.controlHeightSM - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 0),
  19448. inputPaddingHorizontal: t.paddingSM - t.lineWidth,
  19449. inputPaddingHorizontalSM: t.paddingXS - t.lineWidth,
  19450. inputPaddingHorizontalLG: t.controlPaddingHorizontal - t.lineWidth,
  19451. inputBorderHoverColor: t.colorPrimaryHover,
  19452. inputBorderActiveColor: t.colorPrimaryHover
  19453. });
  19454. }
  19455. const ROe = (t) => {
  19456. const {
  19457. componentCls: e,
  19458. inputPaddingHorizontal: n,
  19459. paddingLG: r
  19460. } = t, i = `${e}-textarea`;
  19461. return {
  19462. [i]: {
  19463. position: "relative",
  19464. [`${i}-suffix`]: {
  19465. position: "absolute",
  19466. top: 0,
  19467. insetInlineEnd: n,
  19468. bottom: 0,
  19469. zIndex: 1,
  19470. display: "inline-flex",
  19471. alignItems: "center",
  19472. margin: "auto"
  19473. },
  19474. "&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating": {
  19475. [`&${i}-has-feedback`]: {
  19476. [`${e}`]: {
  19477. paddingInlineEnd: r
  19478. }
  19479. }
  19480. },
  19481. "&-show-count": {
  19482. // https://github.com/ant-design/ant-design/issues/33049
  19483. [`> ${e}`]: {
  19484. height: "100%"
  19485. },
  19486. "&::after": {
  19487. color: t.colorTextDescription,
  19488. whiteSpace: "nowrap",
  19489. content: "attr(data-count)",
  19490. pointerEvents: "none",
  19491. float: "right"
  19492. }
  19493. },
  19494. "&-rtl": {
  19495. "&::after": {
  19496. float: "left"
  19497. }
  19498. }
  19499. }
  19500. };
  19501. }, lD = Sn("Input", (t) => {
  19502. const e = lX(t);
  19503. return [
  19504. AOe(e),
  19505. ROe(e),
  19506. MOe(e),
  19507. IOe(e),
  19508. DOe(e),
  19509. // =====================================================
  19510. // == Space Compact ==
  19511. // =====================================================
  19512. cx(e)
  19513. ];
  19514. });
  19515. function kOe(t) {
  19516. const e = ae(), n = ae(!1);
  19517. function r() {
  19518. for (var i = arguments.length, a = new Array(i), o = 0; o < i; o++)
  19519. a[o] = arguments[o];
  19520. n.value || (xt.cancel(e.value), e.value = xt(() => {
  19521. t(...a);
  19522. }));
  19523. }
  19524. return yt(() => {
  19525. n.value = !0, xt.cancel(e.value);
  19526. }), r;
  19527. }
  19528. function LOe(t) {
  19529. const e = ae([]), n = ae(typeof t == "function" ? t() : t), r = kOe(() => {
  19530. let a = n.value;
  19531. e.value.forEach((o) => {
  19532. a = o(a);
  19533. }), e.value = [], n.value = a;
  19534. });
  19535. function i(a) {
  19536. e.value.push(a), r();
  19537. }
  19538. return [n, i];
  19539. }
  19540. const NOe = te({
  19541. compatConfig: {
  19542. MODE: 3
  19543. },
  19544. name: "TabNode",
  19545. props: {
  19546. id: {
  19547. type: String
  19548. },
  19549. prefixCls: {
  19550. type: String
  19551. },
  19552. tab: {
  19553. type: Object
  19554. },
  19555. active: {
  19556. type: Boolean
  19557. },
  19558. closable: {
  19559. type: Boolean
  19560. },
  19561. editable: {
  19562. type: Object
  19563. },
  19564. onClick: {
  19565. type: Function
  19566. },
  19567. onResize: {
  19568. type: Function
  19569. },
  19570. renderWrapper: {
  19571. type: Function
  19572. },
  19573. removeAriaLabel: {
  19574. type: String
  19575. },
  19576. // onRemove: { type: Function as PropType<() => void> },
  19577. onFocus: {
  19578. type: Function
  19579. }
  19580. },
  19581. emits: ["click", "resize", "remove", "focus"],
  19582. setup(t, e) {
  19583. let {
  19584. expose: n,
  19585. attrs: r
  19586. } = e;
  19587. const i = U();
  19588. function a(l) {
  19589. var u;
  19590. !((u = t.tab) === null || u === void 0) && u.disabled || t.onClick(l);
  19591. }
  19592. n({
  19593. domRef: i
  19594. });
  19595. function o(l) {
  19596. var u;
  19597. l.preventDefault(), l.stopPropagation(), t.editable.onEdit("remove", {
  19598. key: (u = t.tab) === null || u === void 0 ? void 0 : u.key,
  19599. event: l
  19600. });
  19601. }
  19602. const s = L(() => {
  19603. var l;
  19604. return t.editable && t.closable !== !1 && !(!((l = t.tab) === null || l === void 0) && l.disabled);
  19605. });
  19606. return () => {
  19607. var l;
  19608. const {
  19609. prefixCls: u,
  19610. id: c,
  19611. active: f,
  19612. tab: {
  19613. key: d,
  19614. tab: h,
  19615. disabled: p,
  19616. closeIcon: v
  19617. },
  19618. renderWrapper: g,
  19619. removeAriaLabel: m,
  19620. editable: y,
  19621. onFocus: b
  19622. } = t, _ = `${u}-tab`, O = M("div", {
  19623. key: d,
  19624. ref: i,
  19625. class: ye(_, {
  19626. [`${_}-with-remove`]: s.value,
  19627. [`${_}-active`]: f,
  19628. [`${_}-disabled`]: p
  19629. }),
  19630. style: r.style,
  19631. onClick: a
  19632. }, [M("div", {
  19633. role: "tab",
  19634. "aria-selected": f,
  19635. id: c && `${c}-tab-${d}`,
  19636. class: `${_}-btn`,
  19637. "aria-controls": c && `${c}-panel-${d}`,
  19638. "aria-disabled": p,
  19639. tabindex: p ? null : 0,
  19640. onClick: (S) => {
  19641. S.stopPropagation(), a(S);
  19642. },
  19643. onKeydown: (S) => {
  19644. [ge.SPACE, ge.ENTER].includes(S.which) && (S.preventDefault(), a(S));
  19645. },
  19646. onFocus: b
  19647. }, [typeof h == "function" ? h() : h]), s.value && M("button", {
  19648. type: "button",
  19649. "aria-label": m || "remove",
  19650. tabindex: 0,
  19651. class: `${_}-remove`,
  19652. onClick: (S) => {
  19653. S.stopPropagation(), o(S);
  19654. }
  19655. }, [(v == null ? void 0 : v()) || ((l = y.removeIcon) === null || l === void 0 ? void 0 : l.call(y)) || "×"])]);
  19656. return g ? g(O) : O;
  19657. };
  19658. }
  19659. }), x5 = {
  19660. width: 0,
  19661. height: 0,
  19662. left: 0,
  19663. top: 0
  19664. };
  19665. function BOe(t, e) {
  19666. const n = U(/* @__PURE__ */ new Map());
  19667. return ht(() => {
  19668. var r, i;
  19669. const a = /* @__PURE__ */ new Map(), o = t.value, s = e.value.get((r = o[0]) === null || r === void 0 ? void 0 : r.key) || x5, l = s.left + s.width;
  19670. for (let u = 0; u < o.length; u += 1) {
  19671. const {
  19672. key: c
  19673. } = o[u];
  19674. let f = e.value.get(c);
  19675. f || (f = e.value.get((i = o[u - 1]) === null || i === void 0 ? void 0 : i.key) || x5);
  19676. const d = a.get(c) || I({}, f);
  19677. d.right = l - d.left - d.width, a.set(c, d);
  19678. }
  19679. n.value = new Map(a);
  19680. }), n;
  19681. }
  19682. const uX = te({
  19683. compatConfig: {
  19684. MODE: 3
  19685. },
  19686. name: "AddButton",
  19687. inheritAttrs: !1,
  19688. props: {
  19689. prefixCls: String,
  19690. editable: {
  19691. type: Object
  19692. },
  19693. locale: {
  19694. type: Object,
  19695. default: void 0
  19696. }
  19697. },
  19698. setup(t, e) {
  19699. let {
  19700. expose: n,
  19701. attrs: r
  19702. } = e;
  19703. const i = U();
  19704. return n({
  19705. domRef: i
  19706. }), () => {
  19707. const {
  19708. prefixCls: a,
  19709. editable: o,
  19710. locale: s
  19711. } = t;
  19712. return !o || o.showAdd === !1 ? null : M("button", {
  19713. ref: i,
  19714. type: "button",
  19715. class: `${a}-nav-add`,
  19716. style: r.style,
  19717. "aria-label": (s == null ? void 0 : s.addAriaLabel) || "Add tab",
  19718. onClick: (l) => {
  19719. o.onEdit("add", {
  19720. event: l
  19721. });
  19722. }
  19723. }, [o.addIcon ? o.addIcon() : "+"]);
  19724. };
  19725. }
  19726. }), zOe = {
  19727. prefixCls: {
  19728. type: String
  19729. },
  19730. id: {
  19731. type: String
  19732. },
  19733. tabs: {
  19734. type: Object
  19735. },
  19736. rtl: {
  19737. type: Boolean
  19738. },
  19739. tabBarGutter: {
  19740. type: Number
  19741. },
  19742. activeKey: {
  19743. type: [String, Number]
  19744. },
  19745. mobile: {
  19746. type: Boolean
  19747. },
  19748. moreIcon: Y.any,
  19749. moreTransitionName: {
  19750. type: String
  19751. },
  19752. editable: {
  19753. type: Object
  19754. },
  19755. locale: {
  19756. type: Object,
  19757. default: void 0
  19758. },
  19759. removeAriaLabel: String,
  19760. onTabClick: {
  19761. type: Function
  19762. },
  19763. popupClassName: String,
  19764. getPopupContainer: tt()
  19765. }, VOe = te({
  19766. compatConfig: {
  19767. MODE: 3
  19768. },
  19769. name: "OperationNode",
  19770. inheritAttrs: !1,
  19771. props: zOe,
  19772. emits: ["tabClick"],
  19773. slots: Object,
  19774. setup(t, e) {
  19775. let {
  19776. attrs: n,
  19777. slots: r
  19778. } = e;
  19779. const [i, a] = fn(!1), [o, s] = fn(null), l = (h) => {
  19780. const p = t.tabs.filter((m) => !m.disabled);
  19781. let v = p.findIndex((m) => m.key === o.value) || 0;
  19782. const g = p.length;
  19783. for (let m = 0; m < g; m += 1) {
  19784. v = (v + h + g) % g;
  19785. const y = p[v];
  19786. if (!y.disabled) {
  19787. s(y.key);
  19788. return;
  19789. }
  19790. }
  19791. }, u = (h) => {
  19792. const {
  19793. which: p
  19794. } = h;
  19795. if (!i.value) {
  19796. [ge.DOWN, ge.SPACE, ge.ENTER].includes(p) && (a(!0), h.preventDefault());
  19797. return;
  19798. }
  19799. switch (p) {
  19800. case ge.UP:
  19801. l(-1), h.preventDefault();
  19802. break;
  19803. case ge.DOWN:
  19804. l(1), h.preventDefault();
  19805. break;
  19806. case ge.ESC:
  19807. a(!1);
  19808. break;
  19809. case ge.SPACE:
  19810. case ge.ENTER:
  19811. o.value !== null && t.onTabClick(o.value, h);
  19812. break;
  19813. }
  19814. }, c = L(() => `${t.id}-more-popup`), f = L(() => o.value !== null ? `${c.value}-${o.value}` : null), d = (h, p) => {
  19815. h.preventDefault(), h.stopPropagation(), t.editable.onEdit("remove", {
  19816. key: p,
  19817. event: h
  19818. });
  19819. };
  19820. return it(() => {
  19821. se(o, () => {
  19822. const h = document.getElementById(f.value);
  19823. h && h.scrollIntoView && h.scrollIntoView(!1);
  19824. }, {
  19825. flush: "post",
  19826. immediate: !0
  19827. });
  19828. }), se(i, () => {
  19829. i.value || s(null);
  19830. }), j1e({}), () => {
  19831. var h;
  19832. const {
  19833. prefixCls: p,
  19834. id: v,
  19835. tabs: g,
  19836. locale: m,
  19837. mobile: y,
  19838. moreIcon: b = ((h = r.moreIcon) === null || h === void 0 ? void 0 : h.call(r)) || M(hx, null, null),
  19839. moreTransitionName: _,
  19840. editable: O,
  19841. tabBarGutter: S,
  19842. rtl: x,
  19843. onTabClick: C,
  19844. popupClassName: T
  19845. } = t;
  19846. if (!g.length) return null;
  19847. const w = `${p}-dropdown`, P = m == null ? void 0 : m.dropdownAriaLabel, $ = {
  19848. [x ? "marginRight" : "marginLeft"]: S
  19849. };
  19850. g.length || ($.visibility = "hidden", $.order = 1);
  19851. const A = ye({
  19852. [`${w}-rtl`]: x,
  19853. [`${T}`]: !0
  19854. }), D = y ? null : M(d1e, {
  19855. prefixCls: w,
  19856. trigger: ["hover"],
  19857. visible: i.value,
  19858. transitionName: _,
  19859. onVisibleChange: a,
  19860. overlayClassName: A,
  19861. mouseEnterDelay: 0.1,
  19862. mouseLeaveDelay: 0.1,
  19863. getPopupContainer: t.getPopupContainer
  19864. }, {
  19865. overlay: () => M(jl, {
  19866. onClick: (E) => {
  19867. let {
  19868. key: R,
  19869. domEvent: N
  19870. } = E;
  19871. C(R, N), a(!1);
  19872. },
  19873. id: c.value,
  19874. tabindex: -1,
  19875. role: "listbox",
  19876. "aria-activedescendant": f.value,
  19877. selectedKeys: [o.value],
  19878. "aria-label": P !== void 0 ? P : "expanded dropdown"
  19879. }, {
  19880. default: () => [g.map((E) => {
  19881. var R, N;
  19882. const V = O && E.closable !== !1 && !E.disabled;
  19883. return M(Th, {
  19884. key: E.key,
  19885. id: `${c.value}-${E.key}`,
  19886. role: "option",
  19887. "aria-controls": v && `${v}-panel-${E.key}`,
  19888. disabled: E.disabled
  19889. }, {
  19890. default: () => [M("span", null, [typeof E.tab == "function" ? E.tab() : E.tab]), V && M("button", {
  19891. type: "button",
  19892. "aria-label": t.removeAriaLabel || "remove",
  19893. tabindex: 0,
  19894. class: `${w}-menu-item-remove`,
  19895. onClick: (z) => {
  19896. z.stopPropagation(), d(z, E.key);
  19897. }
  19898. }, [((R = E.closeIcon) === null || R === void 0 ? void 0 : R.call(E)) || ((N = O.removeIcon) === null || N === void 0 ? void 0 : N.call(O)) || "×"])]
  19899. });
  19900. })]
  19901. }),
  19902. default: () => M("button", {
  19903. type: "button",
  19904. class: `${p}-nav-more`,
  19905. style: $,
  19906. tabindex: -1,
  19907. "aria-hidden": "true",
  19908. "aria-haspopup": "listbox",
  19909. "aria-controls": c.value,
  19910. id: `${v}-more`,
  19911. "aria-expanded": i.value,
  19912. onKeydown: u
  19913. }, [b])
  19914. });
  19915. return M("div", {
  19916. class: ye(`${p}-nav-operations`, n.class),
  19917. style: n.style
  19918. }, [D, M(uX, {
  19919. prefixCls: p,
  19920. locale: m,
  19921. editable: O
  19922. }, null)]);
  19923. };
  19924. }
  19925. }), cX = Symbol("tabsContextKey"), fX = (t) => {
  19926. pt(cX, t);
  19927. }, dX = () => Ge(cX, {
  19928. tabs: U([]),
  19929. prefixCls: U()
  19930. });
  19931. te({
  19932. compatConfig: {
  19933. MODE: 3
  19934. },
  19935. name: "TabsContextProvider",
  19936. inheritAttrs: !1,
  19937. props: {
  19938. tabs: {
  19939. type: Object,
  19940. default: void 0
  19941. },
  19942. prefixCls: {
  19943. type: String,
  19944. default: void 0
  19945. }
  19946. },
  19947. setup(t, e) {
  19948. let {
  19949. slots: n
  19950. } = e;
  19951. return fX($S(t)), () => {
  19952. var r;
  19953. return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
  19954. };
  19955. }
  19956. });
  19957. const FOe = 0.1, w5 = 0.01, T_ = 20, C5 = Math.pow(0.995, T_);
  19958. function WOe(t, e) {
  19959. const [n, r] = fn(), [i, a] = fn(0), [o, s] = fn(0), [l, u] = fn(), c = U();
  19960. function f(O) {
  19961. const {
  19962. screenX: S,
  19963. screenY: x
  19964. } = O.touches[0];
  19965. r({
  19966. x: S,
  19967. y: x
  19968. }), clearInterval(c.value);
  19969. }
  19970. function d(O) {
  19971. if (!n.value) return;
  19972. O.preventDefault();
  19973. const {
  19974. screenX: S,
  19975. screenY: x
  19976. } = O.touches[0], C = S - n.value.x, T = x - n.value.y;
  19977. e(C, T), r({
  19978. x: S,
  19979. y: x
  19980. });
  19981. const w = Date.now();
  19982. s(w - i.value), a(w), u({
  19983. x: C,
  19984. y: T
  19985. });
  19986. }
  19987. function h() {
  19988. if (!n.value) return;
  19989. const O = l.value;
  19990. if (r(null), u(null), O) {
  19991. const S = O.x / o.value, x = O.y / o.value, C = Math.abs(S), T = Math.abs(x);
  19992. if (Math.max(C, T) < FOe) return;
  19993. let w = S, P = x;
  19994. c.value = setInterval(() => {
  19995. if (Math.abs(w) < w5 && Math.abs(P) < w5) {
  19996. clearInterval(c.value);
  19997. return;
  19998. }
  19999. w *= C5, P *= C5, e(w * T_, P * T_);
  20000. }, T_);
  20001. }
  20002. }
  20003. const p = U();
  20004. function v(O) {
  20005. const {
  20006. deltaX: S,
  20007. deltaY: x
  20008. } = O;
  20009. let C = 0;
  20010. const T = Math.abs(S), w = Math.abs(x);
  20011. T === w ? C = p.value === "x" ? S : x : T > w ? (C = S, p.value = "x") : (C = x, p.value = "y"), e(-C, -C) && O.preventDefault();
  20012. }
  20013. const g = U({
  20014. onTouchStart: f,
  20015. onTouchMove: d,
  20016. onTouchEnd: h,
  20017. onWheel: v
  20018. });
  20019. function m(O) {
  20020. g.value.onTouchStart(O);
  20021. }
  20022. function y(O) {
  20023. g.value.onTouchMove(O);
  20024. }
  20025. function b(O) {
  20026. g.value.onTouchEnd(O);
  20027. }
  20028. function _(O) {
  20029. g.value.onWheel(O);
  20030. }
  20031. it(() => {
  20032. var O, S;
  20033. document.addEventListener("touchmove", y, {
  20034. passive: !1
  20035. }), document.addEventListener("touchend", b, {
  20036. passive: !1
  20037. }), (O = t.value) === null || O === void 0 || O.addEventListener("touchstart", m, {
  20038. passive: !1
  20039. }), (S = t.value) === null || S === void 0 || S.addEventListener("wheel", _, {
  20040. passive: !1
  20041. });
  20042. }), yt(() => {
  20043. document.removeEventListener("touchmove", y), document.removeEventListener("touchend", b);
  20044. });
  20045. }
  20046. function T5(t, e) {
  20047. const n = U(t);
  20048. function r(i) {
  20049. const a = typeof i == "function" ? i(n.value) : i;
  20050. a !== n.value && e(a, n.value), n.value = a;
  20051. }
  20052. return [n, r];
  20053. }
  20054. const QOe = () => {
  20055. const t = U(/* @__PURE__ */ new Map()), e = (n) => (r) => {
  20056. t.value.set(n, r);
  20057. };
  20058. return GG(() => {
  20059. t.value = /* @__PURE__ */ new Map();
  20060. }), [e, t];
  20061. }, P5 = {
  20062. width: 0,
  20063. height: 0,
  20064. left: 0,
  20065. top: 0,
  20066. right: 0
  20067. }, HOe = () => ({
  20068. id: {
  20069. type: String
  20070. },
  20071. tabPosition: {
  20072. type: String
  20073. },
  20074. activeKey: {
  20075. type: [String, Number]
  20076. },
  20077. rtl: {
  20078. type: Boolean
  20079. },
  20080. animated: $t(),
  20081. editable: $t(),
  20082. moreIcon: Y.any,
  20083. moreTransitionName: {
  20084. type: String
  20085. },
  20086. mobile: {
  20087. type: Boolean
  20088. },
  20089. tabBarGutter: {
  20090. type: Number
  20091. },
  20092. renderTabBar: {
  20093. type: Function
  20094. },
  20095. locale: $t(),
  20096. popupClassName: String,
  20097. getPopupContainer: tt(),
  20098. onTabClick: {
  20099. type: Function
  20100. },
  20101. onTabScroll: {
  20102. type: Function
  20103. }
  20104. }), GOe = (t, e) => {
  20105. const {
  20106. offsetWidth: n,
  20107. offsetHeight: r,
  20108. offsetTop: i,
  20109. offsetLeft: a
  20110. } = t, {
  20111. width: o,
  20112. height: s,
  20113. x: l,
  20114. y: u
  20115. } = t.getBoundingClientRect();
  20116. return Math.abs(o - n) < 1 ? [o, s, l - e.x, u - e.y] : [n, r, a, i];
  20117. }, $5 = te({
  20118. compatConfig: {
  20119. MODE: 3
  20120. },
  20121. name: "TabNavList",
  20122. inheritAttrs: !1,
  20123. props: HOe(),
  20124. slots: Object,
  20125. emits: ["tabClick", "tabScroll"],
  20126. setup(t, e) {
  20127. let {
  20128. attrs: n,
  20129. slots: r
  20130. } = e;
  20131. const {
  20132. tabs: i,
  20133. prefixCls: a
  20134. } = dX(), o = ae(), s = ae(), l = ae(), u = ae(), [c, f] = QOe(), d = L(() => t.tabPosition === "top" || t.tabPosition === "bottom"), [h, p] = T5(0, (be, he) => {
  20135. d.value && t.onTabScroll && t.onTabScroll({
  20136. direction: be > he ? "left" : "right"
  20137. });
  20138. }), [v, g] = T5(0, (be, he) => {
  20139. !d.value && t.onTabScroll && t.onTabScroll({
  20140. direction: be > he ? "top" : "bottom"
  20141. });
  20142. }), [m, y] = fn(0), [b, _] = fn(0), [O, S] = fn(null), [x, C] = fn(null), [T, w] = fn(0), [P, $] = fn(0), [A, D] = LOe(/* @__PURE__ */ new Map()), E = BOe(i, A), R = L(() => `${a.value}-nav-operations-hidden`), N = ae(0), V = ae(0);
  20143. ht(() => {
  20144. d.value ? t.rtl ? (N.value = 0, V.value = Math.max(0, m.value - O.value)) : (N.value = Math.min(0, O.value - m.value), V.value = 0) : (N.value = Math.min(0, x.value - b.value), V.value = 0);
  20145. });
  20146. const z = (be) => be < N.value ? N.value : be > V.value ? V.value : be, W = ae(), [F, Q] = fn(), Z = () => {
  20147. Q(Date.now());
  20148. }, ne = () => {
  20149. clearTimeout(W.value);
  20150. }, ee = (be, he) => {
  20151. be((Te) => z(Te + he));
  20152. };
  20153. WOe(o, (be, he) => {
  20154. if (d.value) {
  20155. if (O.value >= m.value)
  20156. return !1;
  20157. ee(p, be);
  20158. } else {
  20159. if (x.value >= b.value)
  20160. return !1;
  20161. ee(g, he);
  20162. }
  20163. return ne(), Z(), !0;
  20164. }), se(F, () => {
  20165. ne(), F.value && (W.value = setTimeout(() => {
  20166. Q(0);
  20167. }, 100));
  20168. });
  20169. const oe = function() {
  20170. let be = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : t.activeKey;
  20171. const he = E.value.get(be) || {
  20172. width: 0,
  20173. height: 0,
  20174. left: 0,
  20175. right: 0,
  20176. top: 0
  20177. };
  20178. if (d.value) {
  20179. let Te = h.value;
  20180. t.rtl ? he.right < h.value ? Te = he.right : he.right + he.width > h.value + O.value && (Te = he.right + he.width - O.value) : he.left < -h.value ? Te = -he.left : he.left + he.width > -h.value + O.value && (Te = -(he.left + he.width - O.value)), g(0), p(z(Te));
  20181. } else {
  20182. let Te = v.value;
  20183. he.top < -v.value ? Te = -he.top : he.top + he.height > -v.value + x.value && (Te = -(he.top + he.height - x.value)), p(0), g(z(Te));
  20184. }
  20185. }, K = ae(0), ie = ae(0);
  20186. ht(() => {
  20187. let be, he, Te, ze, ut, ct;
  20188. const Dt = E.value;
  20189. ["top", "bottom"].includes(t.tabPosition) ? (be = "width", ze = O.value, ut = m.value, ct = T.value, he = t.rtl ? "right" : "left", Te = Math.abs(h.value)) : (be = "height", ze = x.value, ut = m.value, ct = P.value, he = "top", Te = -v.value);
  20190. let ve = ze;
  20191. ut + ct > ze && ut < ze && (ve = ze - ct);
  20192. const Xe = i.value;
  20193. if (!Xe.length)
  20194. return [K.value, ie.value] = [0, 0];
  20195. const Rt = Xe.length;
  20196. let An = Rt;
  20197. for (let $r = 0; $r < Rt; $r += 1) {
  20198. const Va = Dt.get(Xe[$r].key) || P5;
  20199. if (Va[he] + Va[be] > Te + ve) {
  20200. An = $r - 1;
  20201. break;
  20202. }
  20203. }
  20204. let sn = 0;
  20205. for (let $r = Rt - 1; $r >= 0; $r -= 1)
  20206. if ((Dt.get(Xe[$r].key) || P5)[he] < Te) {
  20207. sn = $r + 1;
  20208. break;
  20209. }
  20210. return [K.value, ie.value] = [sn, An];
  20211. });
  20212. const X = () => {
  20213. D(() => {
  20214. var be;
  20215. const he = /* @__PURE__ */ new Map(), Te = (be = s.value) === null || be === void 0 ? void 0 : be.getBoundingClientRect();
  20216. return i.value.forEach((ze) => {
  20217. let {
  20218. key: ut
  20219. } = ze;
  20220. const ct = f.value.get(ut), Dt = (ct == null ? void 0 : ct.$el) || ct;
  20221. if (Dt) {
  20222. const [ve, Xe, Rt, An] = GOe(Dt, Te);
  20223. he.set(ut, {
  20224. width: ve,
  20225. height: Xe,
  20226. left: Rt,
  20227. top: An
  20228. });
  20229. }
  20230. }), he;
  20231. });
  20232. };
  20233. se(() => i.value.map((be) => be.key).join("%%"), () => {
  20234. X();
  20235. }, {
  20236. flush: "post"
  20237. });
  20238. const H = () => {
  20239. var be, he, Te, ze, ut;
  20240. const ct = ((be = o.value) === null || be === void 0 ? void 0 : be.offsetWidth) || 0, Dt = ((he = o.value) === null || he === void 0 ? void 0 : he.offsetHeight) || 0, ve = ((Te = u.value) === null || Te === void 0 ? void 0 : Te.$el) || {}, Xe = ve.offsetWidth || 0, Rt = ve.offsetHeight || 0;
  20241. S(ct), C(Dt), w(Xe), $(Rt);
  20242. const An = (((ze = s.value) === null || ze === void 0 ? void 0 : ze.offsetWidth) || 0) - Xe, sn = (((ut = s.value) === null || ut === void 0 ? void 0 : ut.offsetHeight) || 0) - Rt;
  20243. y(An), _(sn), X();
  20244. }, G = L(() => [...i.value.slice(0, K.value), ...i.value.slice(ie.value + 1)]), [re, fe] = fn(), de = L(() => E.value.get(t.activeKey)), Ee = ae(), $e = () => {
  20245. xt.cancel(Ee.value);
  20246. };
  20247. se([de, d, () => t.rtl], () => {
  20248. const be = {};
  20249. de.value && (d.value ? (t.rtl ? be.right = Wp(de.value.right) : be.left = Wp(de.value.left), be.width = Wp(de.value.width)) : (be.top = Wp(de.value.top), be.height = Wp(de.value.height))), $e(), Ee.value = xt(() => {
  20250. fe(be);
  20251. });
  20252. }), se([() => t.activeKey, de, E, d], () => {
  20253. oe();
  20254. }, {
  20255. flush: "post"
  20256. }), se([() => t.rtl, () => t.tabBarGutter, () => t.activeKey, () => i.value], () => {
  20257. H();
  20258. }, {
  20259. flush: "post"
  20260. });
  20261. const Se = (be) => {
  20262. let {
  20263. position: he,
  20264. prefixCls: Te,
  20265. extra: ze
  20266. } = be;
  20267. if (!ze) return null;
  20268. const ut = ze == null ? void 0 : ze({
  20269. position: he
  20270. });
  20271. return ut ? M("div", {
  20272. class: `${Te}-extra-content`
  20273. }, [ut]) : null;
  20274. };
  20275. return yt(() => {
  20276. ne(), $e();
  20277. }), () => {
  20278. const {
  20279. id: be,
  20280. animated: he,
  20281. activeKey: Te,
  20282. rtl: ze,
  20283. editable: ut,
  20284. locale: ct,
  20285. tabPosition: Dt,
  20286. tabBarGutter: ve,
  20287. onTabClick: Xe
  20288. } = t, {
  20289. class: Rt,
  20290. style: An
  20291. } = n, sn = a.value, $r = !!G.value.length, Va = `${sn}-nav-wrap`;
  20292. let Bp, zp, py, Hw;
  20293. d.value ? ze ? (zp = h.value > 0, Bp = h.value + O.value < m.value) : (Bp = h.value < 0, zp = -h.value + O.value < m.value) : (py = v.value < 0, Hw = -v.value + x.value < b.value);
  20294. const Gf = {};
  20295. Dt === "top" || Dt === "bottom" ? Gf[ze ? "marginRight" : "marginLeft"] = typeof ve == "number" ? `${ve}px` : ve : Gf.marginTop = typeof ve == "number" ? `${ve}px` : ve;
  20296. const Gw = i.value.map((Vp, jw) => {
  20297. const {
  20298. key: jf
  20299. } = Vp;
  20300. return M(NOe, {
  20301. id: be,
  20302. prefixCls: sn,
  20303. key: jf,
  20304. tab: Vp,
  20305. style: jw === 0 ? void 0 : Gf,
  20306. closable: Vp.closable,
  20307. editable: ut,
  20308. active: jf === Te,
  20309. removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
  20310. ref: c(jf),
  20311. onClick: (F4) => {
  20312. Xe(jf, F4);
  20313. },
  20314. onFocus: () => {
  20315. oe(jf), Z(), o.value && (ze || (o.value.scrollLeft = 0), o.value.scrollTop = 0);
  20316. }
  20317. }, r);
  20318. });
  20319. return M("div", {
  20320. role: "tablist",
  20321. class: ye(`${sn}-nav`, Rt),
  20322. style: An,
  20323. onKeydown: () => {
  20324. Z();
  20325. }
  20326. }, [M(Se, {
  20327. position: "left",
  20328. prefixCls: sn,
  20329. extra: r.leftExtra
  20330. }, null), M(ph, {
  20331. onResize: H
  20332. }, {
  20333. default: () => [M("div", {
  20334. class: ye(Va, {
  20335. [`${Va}-ping-left`]: Bp,
  20336. [`${Va}-ping-right`]: zp,
  20337. [`${Va}-ping-top`]: py,
  20338. [`${Va}-ping-bottom`]: Hw
  20339. }),
  20340. ref: o
  20341. }, [M(ph, {
  20342. onResize: H
  20343. }, {
  20344. default: () => [M("div", {
  20345. ref: s,
  20346. class: `${sn}-nav-list`,
  20347. style: {
  20348. transform: `translate(${h.value}px, ${v.value}px)`,
  20349. transition: F.value ? "none" : void 0
  20350. }
  20351. }, [Gw, M(uX, {
  20352. ref: u,
  20353. prefixCls: sn,
  20354. locale: ct,
  20355. editable: ut,
  20356. style: I(I({}, Gw.length === 0 ? void 0 : Gf), {
  20357. visibility: $r ? "hidden" : null
  20358. })
  20359. }, null), M("div", {
  20360. class: ye(`${sn}-ink-bar`, {
  20361. [`${sn}-ink-bar-animated`]: he.inkBar
  20362. }),
  20363. style: re.value
  20364. }, null)])]
  20365. })])]
  20366. }), M(VOe, j(j({}, t), {}, {
  20367. removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
  20368. ref: l,
  20369. prefixCls: sn,
  20370. tabs: G.value,
  20371. class: !$r && R.value
  20372. }), am(r, ["moreIcon"])), M(Se, {
  20373. position: "right",
  20374. prefixCls: sn,
  20375. extra: r.rightExtra
  20376. }, null), M(Se, {
  20377. position: "right",
  20378. prefixCls: sn,
  20379. extra: r.tabBarExtraContent
  20380. }, null)]);
  20381. };
  20382. }
  20383. }), jOe = te({
  20384. compatConfig: {
  20385. MODE: 3
  20386. },
  20387. name: "TabPanelList",
  20388. inheritAttrs: !1,
  20389. props: {
  20390. activeKey: {
  20391. type: [String, Number]
  20392. },
  20393. id: {
  20394. type: String
  20395. },
  20396. rtl: {
  20397. type: Boolean
  20398. },
  20399. animated: {
  20400. type: Object,
  20401. default: void 0
  20402. },
  20403. tabPosition: {
  20404. type: String
  20405. },
  20406. destroyInactiveTabPane: {
  20407. type: Boolean
  20408. }
  20409. },
  20410. setup(t) {
  20411. const {
  20412. tabs: e,
  20413. prefixCls: n
  20414. } = dX();
  20415. return () => {
  20416. const {
  20417. id: r,
  20418. activeKey: i,
  20419. animated: a,
  20420. tabPosition: o,
  20421. rtl: s,
  20422. destroyInactiveTabPane: l
  20423. } = t, u = a.tabPane, c = n.value, f = e.value.findIndex((d) => d.key === i);
  20424. return M("div", {
  20425. class: `${c}-content-holder`
  20426. }, [M("div", {
  20427. class: [`${c}-content`, `${c}-content-${o}`, {
  20428. [`${c}-content-animated`]: u
  20429. }],
  20430. style: f && u ? {
  20431. [s ? "marginRight" : "marginLeft"]: `-${f}00%`
  20432. } : null
  20433. }, [e.value.map((d) => Pn(d.node, {
  20434. key: d.key,
  20435. prefixCls: c,
  20436. tabKey: d.key,
  20437. id: r,
  20438. animated: u,
  20439. active: d.key === i,
  20440. destroyInactiveTabPane: l
  20441. }))])]);
  20442. };
  20443. }
  20444. });
  20445. var ZOe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" };
  20446. function A5(t) {
  20447. for (var e = 1; e < arguments.length; e++) {
  20448. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  20449. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  20450. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  20451. }))), r.forEach(function(i) {
  20452. UOe(t, i, n[i]);
  20453. });
  20454. }
  20455. return t;
  20456. }
  20457. function UOe(t, e, n) {
  20458. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  20459. }
  20460. var yx = function(e, n) {
  20461. var r = A5({}, e, n.attrs);
  20462. return M(lt, A5({}, r, {
  20463. icon: ZOe
  20464. }), null);
  20465. };
  20466. yx.displayName = "PlusOutlined";
  20467. yx.inheritAttrs = !1;
  20468. const XOe = (t) => {
  20469. const {
  20470. componentCls: e,
  20471. motionDurationSlow: n
  20472. } = t;
  20473. return [
  20474. {
  20475. [e]: {
  20476. [`${e}-switch`]: {
  20477. "&-appear, &-enter": {
  20478. transition: "none",
  20479. "&-start": {
  20480. opacity: 0
  20481. },
  20482. "&-active": {
  20483. opacity: 1,
  20484. transition: `opacity ${n}`
  20485. }
  20486. },
  20487. "&-leave": {
  20488. position: "absolute",
  20489. transition: "none",
  20490. inset: 0,
  20491. "&-start": {
  20492. opacity: 1
  20493. },
  20494. "&-active": {
  20495. opacity: 0,
  20496. transition: `opacity ${n}`
  20497. }
  20498. }
  20499. }
  20500. }
  20501. },
  20502. // Follow code may reuse in other components
  20503. [Ch(t, "slide-up"), Ch(t, "slide-down")]
  20504. ];
  20505. }, YOe = (t) => {
  20506. const {
  20507. componentCls: e,
  20508. tabsCardHorizontalPadding: n,
  20509. tabsCardHeadBackground: r,
  20510. tabsCardGutter: i,
  20511. colorSplit: a
  20512. } = t;
  20513. return {
  20514. [`${e}-card`]: {
  20515. [`> ${e}-nav, > div > ${e}-nav`]: {
  20516. [`${e}-tab`]: {
  20517. margin: 0,
  20518. padding: n,
  20519. background: r,
  20520. border: `${t.lineWidth}px ${t.lineType} ${a}`,
  20521. transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`
  20522. },
  20523. [`${e}-tab-active`]: {
  20524. color: t.colorPrimary,
  20525. background: t.colorBgContainer
  20526. },
  20527. [`${e}-ink-bar`]: {
  20528. visibility: "hidden"
  20529. }
  20530. },
  20531. // ========================== Top & Bottom ==========================
  20532. [`&${e}-top, &${e}-bottom`]: {
  20533. [`> ${e}-nav, > div > ${e}-nav`]: {
  20534. [`${e}-tab + ${e}-tab`]: {
  20535. marginLeft: {
  20536. _skip_check_: !0,
  20537. value: `${i}px`
  20538. }
  20539. }
  20540. }
  20541. },
  20542. [`&${e}-top`]: {
  20543. [`> ${e}-nav, > div > ${e}-nav`]: {
  20544. [`${e}-tab`]: {
  20545. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`
  20546. },
  20547. [`${e}-tab-active`]: {
  20548. borderBottomColor: t.colorBgContainer
  20549. }
  20550. }
  20551. },
  20552. [`&${e}-bottom`]: {
  20553. [`> ${e}-nav, > div > ${e}-nav`]: {
  20554. [`${e}-tab`]: {
  20555. borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`
  20556. },
  20557. [`${e}-tab-active`]: {
  20558. borderTopColor: t.colorBgContainer
  20559. }
  20560. }
  20561. },
  20562. // ========================== Left & Right ==========================
  20563. [`&${e}-left, &${e}-right`]: {
  20564. [`> ${e}-nav, > div > ${e}-nav`]: {
  20565. [`${e}-tab + ${e}-tab`]: {
  20566. marginTop: `${i}px`
  20567. }
  20568. }
  20569. },
  20570. [`&${e}-left`]: {
  20571. [`> ${e}-nav, > div > ${e}-nav`]: {
  20572. [`${e}-tab`]: {
  20573. borderRadius: {
  20574. _skip_check_: !0,
  20575. value: `${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`
  20576. }
  20577. },
  20578. [`${e}-tab-active`]: {
  20579. borderRightColor: {
  20580. _skip_check_: !0,
  20581. value: t.colorBgContainer
  20582. }
  20583. }
  20584. }
  20585. },
  20586. [`&${e}-right`]: {
  20587. [`> ${e}-nav, > div > ${e}-nav`]: {
  20588. [`${e}-tab`]: {
  20589. borderRadius: {
  20590. _skip_check_: !0,
  20591. value: `0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`
  20592. }
  20593. },
  20594. [`${e}-tab-active`]: {
  20595. borderLeftColor: {
  20596. _skip_check_: !0,
  20597. value: t.colorBgContainer
  20598. }
  20599. }
  20600. }
  20601. }
  20602. }
  20603. };
  20604. }, qOe = (t) => {
  20605. const {
  20606. componentCls: e,
  20607. tabsHoverColor: n,
  20608. dropdownEdgeChildVerticalPadding: r
  20609. } = t;
  20610. return {
  20611. [`${e}-dropdown`]: I(I({}, nn(t)), {
  20612. position: "absolute",
  20613. top: -9999,
  20614. left: {
  20615. _skip_check_: !0,
  20616. value: -9999
  20617. },
  20618. zIndex: t.zIndexPopup,
  20619. display: "block",
  20620. "&-hidden": {
  20621. display: "none"
  20622. },
  20623. [`${e}-dropdown-menu`]: {
  20624. maxHeight: t.tabsDropdownHeight,
  20625. margin: 0,
  20626. padding: `${r}px 0`,
  20627. overflowX: "hidden",
  20628. overflowY: "auto",
  20629. textAlign: {
  20630. _skip_check_: !0,
  20631. value: "left"
  20632. },
  20633. listStyleType: "none",
  20634. backgroundColor: t.colorBgContainer,
  20635. backgroundClip: "padding-box",
  20636. borderRadius: t.borderRadiusLG,
  20637. outline: "none",
  20638. boxShadow: t.boxShadowSecondary,
  20639. "&-item": I(I({}, mh), {
  20640. display: "flex",
  20641. alignItems: "center",
  20642. minWidth: t.tabsDropdownWidth,
  20643. margin: 0,
  20644. padding: `${t.paddingXXS}px ${t.paddingSM}px`,
  20645. color: t.colorText,
  20646. fontWeight: "normal",
  20647. fontSize: t.fontSize,
  20648. lineHeight: t.lineHeight,
  20649. cursor: "pointer",
  20650. transition: `all ${t.motionDurationSlow}`,
  20651. "> span": {
  20652. flex: 1,
  20653. whiteSpace: "nowrap"
  20654. },
  20655. "&-remove": {
  20656. flex: "none",
  20657. marginLeft: {
  20658. _skip_check_: !0,
  20659. value: t.marginSM
  20660. },
  20661. color: t.colorTextDescription,
  20662. fontSize: t.fontSizeSM,
  20663. background: "transparent",
  20664. border: 0,
  20665. cursor: "pointer",
  20666. "&:hover": {
  20667. color: n
  20668. }
  20669. },
  20670. "&:hover": {
  20671. background: t.controlItemBgHover
  20672. },
  20673. "&-disabled": {
  20674. "&, &:hover": {
  20675. color: t.colorTextDisabled,
  20676. background: "transparent",
  20677. cursor: "not-allowed"
  20678. }
  20679. }
  20680. })
  20681. }
  20682. })
  20683. };
  20684. }, KOe = (t) => {
  20685. const {
  20686. componentCls: e,
  20687. margin: n,
  20688. colorSplit: r
  20689. } = t;
  20690. return {
  20691. // ========================== Top & Bottom ==========================
  20692. [`${e}-top, ${e}-bottom`]: {
  20693. flexDirection: "column",
  20694. [`> ${e}-nav, > div > ${e}-nav`]: {
  20695. margin: `0 0 ${n}px 0`,
  20696. "&::before": {
  20697. position: "absolute",
  20698. right: {
  20699. _skip_check_: !0,
  20700. value: 0
  20701. },
  20702. left: {
  20703. _skip_check_: !0,
  20704. value: 0
  20705. },
  20706. borderBottom: `${t.lineWidth}px ${t.lineType} ${r}`,
  20707. content: "''"
  20708. },
  20709. [`${e}-ink-bar`]: {
  20710. height: t.lineWidthBold,
  20711. "&-animated": {
  20712. transition: `width ${t.motionDurationSlow}, left ${t.motionDurationSlow},
  20713. right ${t.motionDurationSlow}`
  20714. }
  20715. },
  20716. [`${e}-nav-wrap`]: {
  20717. "&::before, &::after": {
  20718. top: 0,
  20719. bottom: 0,
  20720. width: t.controlHeight
  20721. },
  20722. "&::before": {
  20723. left: {
  20724. _skip_check_: !0,
  20725. value: 0
  20726. },
  20727. boxShadow: t.boxShadowTabsOverflowLeft
  20728. },
  20729. "&::after": {
  20730. right: {
  20731. _skip_check_: !0,
  20732. value: 0
  20733. },
  20734. boxShadow: t.boxShadowTabsOverflowRight
  20735. },
  20736. [`&${e}-nav-wrap-ping-left::before`]: {
  20737. opacity: 1
  20738. },
  20739. [`&${e}-nav-wrap-ping-right::after`]: {
  20740. opacity: 1
  20741. }
  20742. }
  20743. }
  20744. },
  20745. [`${e}-top`]: {
  20746. [`> ${e}-nav,
  20747. > div > ${e}-nav`]: {
  20748. "&::before": {
  20749. bottom: 0
  20750. },
  20751. [`${e}-ink-bar`]: {
  20752. bottom: 0
  20753. }
  20754. }
  20755. },
  20756. [`${e}-bottom`]: {
  20757. [`> ${e}-nav, > div > ${e}-nav`]: {
  20758. order: 1,
  20759. marginTop: `${n}px`,
  20760. marginBottom: 0,
  20761. "&::before": {
  20762. top: 0
  20763. },
  20764. [`${e}-ink-bar`]: {
  20765. top: 0
  20766. }
  20767. },
  20768. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20769. order: 0
  20770. }
  20771. },
  20772. // ========================== Left & Right ==========================
  20773. [`${e}-left, ${e}-right`]: {
  20774. [`> ${e}-nav, > div > ${e}-nav`]: {
  20775. flexDirection: "column",
  20776. minWidth: t.controlHeight * 1.25,
  20777. // >>>>>>>>>>> Tab
  20778. [`${e}-tab`]: {
  20779. padding: `${t.paddingXS}px ${t.paddingLG}px`,
  20780. textAlign: "center"
  20781. },
  20782. [`${e}-tab + ${e}-tab`]: {
  20783. margin: `${t.margin}px 0 0 0`
  20784. },
  20785. // >>>>>>>>>>> Nav
  20786. [`${e}-nav-wrap`]: {
  20787. flexDirection: "column",
  20788. "&::before, &::after": {
  20789. right: {
  20790. _skip_check_: !0,
  20791. value: 0
  20792. },
  20793. left: {
  20794. _skip_check_: !0,
  20795. value: 0
  20796. },
  20797. height: t.controlHeight
  20798. },
  20799. "&::before": {
  20800. top: 0,
  20801. boxShadow: t.boxShadowTabsOverflowTop
  20802. },
  20803. "&::after": {
  20804. bottom: 0,
  20805. boxShadow: t.boxShadowTabsOverflowBottom
  20806. },
  20807. [`&${e}-nav-wrap-ping-top::before`]: {
  20808. opacity: 1
  20809. },
  20810. [`&${e}-nav-wrap-ping-bottom::after`]: {
  20811. opacity: 1
  20812. }
  20813. },
  20814. // >>>>>>>>>>> Ink Bar
  20815. [`${e}-ink-bar`]: {
  20816. width: t.lineWidthBold,
  20817. "&-animated": {
  20818. transition: `height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`
  20819. }
  20820. },
  20821. [`${e}-nav-list, ${e}-nav-operations`]: {
  20822. flex: "1 0 auto",
  20823. flexDirection: "column"
  20824. }
  20825. }
  20826. },
  20827. [`${e}-left`]: {
  20828. [`> ${e}-nav, > div > ${e}-nav`]: {
  20829. [`${e}-ink-bar`]: {
  20830. right: {
  20831. _skip_check_: !0,
  20832. value: 0
  20833. }
  20834. }
  20835. },
  20836. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20837. marginLeft: {
  20838. _skip_check_: !0,
  20839. value: `-${t.lineWidth}px`
  20840. },
  20841. borderLeft: {
  20842. _skip_check_: !0,
  20843. value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  20844. },
  20845. [`> ${e}-content > ${e}-tabpane`]: {
  20846. paddingLeft: {
  20847. _skip_check_: !0,
  20848. value: t.paddingLG
  20849. }
  20850. }
  20851. }
  20852. },
  20853. [`${e}-right`]: {
  20854. [`> ${e}-nav, > div > ${e}-nav`]: {
  20855. order: 1,
  20856. [`${e}-ink-bar`]: {
  20857. left: {
  20858. _skip_check_: !0,
  20859. value: 0
  20860. }
  20861. }
  20862. },
  20863. [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
  20864. order: 0,
  20865. marginRight: {
  20866. _skip_check_: !0,
  20867. value: -t.lineWidth
  20868. },
  20869. borderRight: {
  20870. _skip_check_: !0,
  20871. value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  20872. },
  20873. [`> ${e}-content > ${e}-tabpane`]: {
  20874. paddingRight: {
  20875. _skip_check_: !0,
  20876. value: t.paddingLG
  20877. }
  20878. }
  20879. }
  20880. }
  20881. };
  20882. }, JOe = (t) => {
  20883. const {
  20884. componentCls: e,
  20885. padding: n
  20886. } = t;
  20887. return {
  20888. [e]: {
  20889. "&-small": {
  20890. [`> ${e}-nav`]: {
  20891. [`${e}-tab`]: {
  20892. padding: `${t.paddingXS}px 0`,
  20893. fontSize: t.fontSize
  20894. }
  20895. }
  20896. },
  20897. "&-large": {
  20898. [`> ${e}-nav`]: {
  20899. [`${e}-tab`]: {
  20900. padding: `${n}px 0`,
  20901. fontSize: t.fontSizeLG
  20902. }
  20903. }
  20904. }
  20905. },
  20906. [`${e}-card`]: {
  20907. [`&${e}-small`]: {
  20908. [`> ${e}-nav`]: {
  20909. [`${e}-tab`]: {
  20910. padding: `${t.paddingXXS * 1.5}px ${n}px`
  20911. }
  20912. },
  20913. [`&${e}-bottom`]: {
  20914. [`> ${e}-nav ${e}-tab`]: {
  20915. borderRadius: `0 0 ${t.borderRadius}px ${t.borderRadius}px`
  20916. }
  20917. },
  20918. [`&${e}-top`]: {
  20919. [`> ${e}-nav ${e}-tab`]: {
  20920. borderRadius: `${t.borderRadius}px ${t.borderRadius}px 0 0`
  20921. }
  20922. },
  20923. [`&${e}-right`]: {
  20924. [`> ${e}-nav ${e}-tab`]: {
  20925. borderRadius: {
  20926. _skip_check_: !0,
  20927. value: `0 ${t.borderRadius}px ${t.borderRadius}px 0`
  20928. }
  20929. }
  20930. },
  20931. [`&${e}-left`]: {
  20932. [`> ${e}-nav ${e}-tab`]: {
  20933. borderRadius: {
  20934. _skip_check_: !0,
  20935. value: `${t.borderRadius}px 0 0 ${t.borderRadius}px`
  20936. }
  20937. }
  20938. }
  20939. },
  20940. [`&${e}-large`]: {
  20941. [`> ${e}-nav`]: {
  20942. [`${e}-tab`]: {
  20943. padding: `${t.paddingXS}px ${n}px ${t.paddingXXS * 1.5}px`
  20944. }
  20945. }
  20946. }
  20947. }
  20948. };
  20949. }, eSe = (t) => {
  20950. const {
  20951. componentCls: e,
  20952. tabsActiveColor: n,
  20953. tabsHoverColor: r,
  20954. iconCls: i,
  20955. tabsHorizontalGutter: a
  20956. } = t, o = `${e}-tab`;
  20957. return {
  20958. [o]: {
  20959. position: "relative",
  20960. display: "inline-flex",
  20961. alignItems: "center",
  20962. padding: `${t.paddingSM}px 0`,
  20963. fontSize: `${t.fontSize}px`,
  20964. background: "transparent",
  20965. border: 0,
  20966. outline: "none",
  20967. cursor: "pointer",
  20968. "&-btn, &-remove": I({
  20969. "&:focus:not(:focus-visible), &:active": {
  20970. color: n
  20971. }
  20972. }, VS(t)),
  20973. "&-btn": {
  20974. outline: "none",
  20975. transition: "all 0.3s"
  20976. },
  20977. "&-remove": {
  20978. flex: "none",
  20979. marginRight: {
  20980. _skip_check_: !0,
  20981. value: -t.marginXXS
  20982. },
  20983. marginLeft: {
  20984. _skip_check_: !0,
  20985. value: t.marginXS
  20986. },
  20987. color: t.colorTextDescription,
  20988. fontSize: t.fontSizeSM,
  20989. background: "transparent",
  20990. border: "none",
  20991. outline: "none",
  20992. cursor: "pointer",
  20993. transition: `all ${t.motionDurationSlow}`,
  20994. "&:hover": {
  20995. color: t.colorTextHeading
  20996. }
  20997. },
  20998. "&:hover": {
  20999. color: r
  21000. },
  21001. [`&${o}-active ${o}-btn`]: {
  21002. color: t.colorPrimary,
  21003. textShadow: t.tabsActiveTextShadow
  21004. },
  21005. [`&${o}-disabled`]: {
  21006. color: t.colorTextDisabled,
  21007. cursor: "not-allowed"
  21008. },
  21009. [`&${o}-disabled ${o}-btn, &${o}-disabled ${e}-remove`]: {
  21010. "&:focus, &:active": {
  21011. color: t.colorTextDisabled
  21012. }
  21013. },
  21014. [`& ${o}-remove ${i}`]: {
  21015. margin: 0
  21016. },
  21017. [i]: {
  21018. marginRight: {
  21019. _skip_check_: !0,
  21020. value: t.marginSM
  21021. }
  21022. }
  21023. },
  21024. [`${o} + ${o}`]: {
  21025. margin: {
  21026. _skip_check_: !0,
  21027. value: `0 0 0 ${a}px`
  21028. }
  21029. }
  21030. };
  21031. }, tSe = (t) => {
  21032. const {
  21033. componentCls: e,
  21034. tabsHorizontalGutter: n,
  21035. iconCls: r,
  21036. tabsCardGutter: i
  21037. } = t;
  21038. return {
  21039. [`${e}-rtl`]: {
  21040. direction: "rtl",
  21041. [`${e}-nav`]: {
  21042. [`${e}-tab`]: {
  21043. margin: {
  21044. _skip_check_: !0,
  21045. value: `0 0 0 ${n}px`
  21046. },
  21047. [`${e}-tab:last-of-type`]: {
  21048. marginLeft: {
  21049. _skip_check_: !0,
  21050. value: 0
  21051. }
  21052. },
  21053. [r]: {
  21054. marginRight: {
  21055. _skip_check_: !0,
  21056. value: 0
  21057. },
  21058. marginLeft: {
  21059. _skip_check_: !0,
  21060. value: `${t.marginSM}px`
  21061. }
  21062. },
  21063. [`${e}-tab-remove`]: {
  21064. marginRight: {
  21065. _skip_check_: !0,
  21066. value: `${t.marginXS}px`
  21067. },
  21068. marginLeft: {
  21069. _skip_check_: !0,
  21070. value: `-${t.marginXXS}px`
  21071. },
  21072. [r]: {
  21073. margin: 0
  21074. }
  21075. }
  21076. }
  21077. },
  21078. [`&${e}-left`]: {
  21079. [`> ${e}-nav`]: {
  21080. order: 1
  21081. },
  21082. [`> ${e}-content-holder`]: {
  21083. order: 0
  21084. }
  21085. },
  21086. [`&${e}-right`]: {
  21087. [`> ${e}-nav`]: {
  21088. order: 0
  21089. },
  21090. [`> ${e}-content-holder`]: {
  21091. order: 1
  21092. }
  21093. },
  21094. // ====================== Card ======================
  21095. [`&${e}-card${e}-top, &${e}-card${e}-bottom`]: {
  21096. [`> ${e}-nav, > div > ${e}-nav`]: {
  21097. [`${e}-tab + ${e}-tab`]: {
  21098. marginRight: {
  21099. _skip_check_: !0,
  21100. value: `${i}px`
  21101. },
  21102. marginLeft: {
  21103. _skip_check_: !0,
  21104. value: 0
  21105. }
  21106. }
  21107. }
  21108. }
  21109. },
  21110. [`${e}-dropdown-rtl`]: {
  21111. direction: "rtl"
  21112. },
  21113. [`${e}-menu-item`]: {
  21114. [`${e}-dropdown-rtl`]: {
  21115. textAlign: {
  21116. _skip_check_: !0,
  21117. value: "right"
  21118. }
  21119. }
  21120. }
  21121. };
  21122. }, nSe = (t) => {
  21123. const {
  21124. componentCls: e,
  21125. tabsCardHorizontalPadding: n,
  21126. tabsCardHeight: r,
  21127. tabsCardGutter: i,
  21128. tabsHoverColor: a,
  21129. tabsActiveColor: o,
  21130. colorSplit: s
  21131. } = t;
  21132. return {
  21133. [e]: I(I(I(I({}, nn(t)), {
  21134. display: "flex",
  21135. // ========================== Navigation ==========================
  21136. [`> ${e}-nav, > div > ${e}-nav`]: {
  21137. position: "relative",
  21138. display: "flex",
  21139. flex: "none",
  21140. alignItems: "center",
  21141. [`${e}-nav-wrap`]: {
  21142. position: "relative",
  21143. display: "flex",
  21144. flex: "auto",
  21145. alignSelf: "stretch",
  21146. overflow: "hidden",
  21147. whiteSpace: "nowrap",
  21148. transform: "translate(0)",
  21149. // >>>>> Ping shadow
  21150. "&::before, &::after": {
  21151. position: "absolute",
  21152. zIndex: 1,
  21153. opacity: 0,
  21154. transition: `opacity ${t.motionDurationSlow}`,
  21155. content: "''",
  21156. pointerEvents: "none"
  21157. }
  21158. },
  21159. [`${e}-nav-list`]: {
  21160. position: "relative",
  21161. display: "flex",
  21162. transition: `opacity ${t.motionDurationSlow}`
  21163. },
  21164. // >>>>>>>> Operations
  21165. [`${e}-nav-operations`]: {
  21166. display: "flex",
  21167. alignSelf: "stretch"
  21168. },
  21169. [`${e}-nav-operations-hidden`]: {
  21170. position: "absolute",
  21171. visibility: "hidden",
  21172. pointerEvents: "none"
  21173. },
  21174. [`${e}-nav-more`]: {
  21175. position: "relative",
  21176. padding: n,
  21177. background: "transparent",
  21178. border: 0,
  21179. "&::after": {
  21180. position: "absolute",
  21181. right: {
  21182. _skip_check_: !0,
  21183. value: 0
  21184. },
  21185. bottom: 0,
  21186. left: {
  21187. _skip_check_: !0,
  21188. value: 0
  21189. },
  21190. height: t.controlHeightLG / 8,
  21191. transform: "translateY(100%)",
  21192. content: "''"
  21193. }
  21194. },
  21195. [`${e}-nav-add`]: I({
  21196. minWidth: `${r}px`,
  21197. marginLeft: {
  21198. _skip_check_: !0,
  21199. value: `${i}px`
  21200. },
  21201. padding: `0 ${t.paddingXS}px`,
  21202. background: "transparent",
  21203. border: `${t.lineWidth}px ${t.lineType} ${s}`,
  21204. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
  21205. outline: "none",
  21206. cursor: "pointer",
  21207. color: t.colorText,
  21208. transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`,
  21209. "&:hover": {
  21210. color: a
  21211. },
  21212. "&:active, &:focus:not(:focus-visible)": {
  21213. color: o
  21214. }
  21215. }, VS(t))
  21216. },
  21217. [`${e}-extra-content`]: {
  21218. flex: "none"
  21219. },
  21220. // ============================ InkBar ============================
  21221. [`${e}-ink-bar`]: {
  21222. position: "absolute",
  21223. background: t.colorPrimary,
  21224. pointerEvents: "none"
  21225. }
  21226. }), eSe(t)), {
  21227. // =========================== TabPanes ===========================
  21228. [`${e}-content`]: {
  21229. position: "relative",
  21230. display: "flex",
  21231. width: "100%",
  21232. "&-animated": {
  21233. transition: "margin 0.3s"
  21234. }
  21235. },
  21236. [`${e}-content-holder`]: {
  21237. flex: "auto",
  21238. minWidth: 0,
  21239. minHeight: 0
  21240. },
  21241. [`${e}-tabpane`]: {
  21242. outline: "none",
  21243. flex: "none",
  21244. width: "100%"
  21245. }
  21246. }),
  21247. [`${e}-centered`]: {
  21248. [`> ${e}-nav, > div > ${e}-nav`]: {
  21249. [`${e}-nav-wrap`]: {
  21250. [`&:not([class*='${e}-nav-wrap-ping'])`]: {
  21251. justifyContent: "center"
  21252. }
  21253. }
  21254. }
  21255. }
  21256. };
  21257. }, rSe = Sn("Tabs", (t) => {
  21258. const e = t.controlHeightLG, n = Bt(t, {
  21259. tabsHoverColor: t.colorPrimaryHover,
  21260. tabsActiveColor: t.colorPrimaryActive,
  21261. tabsCardHorizontalPadding: `${(e - Math.round(t.fontSize * t.lineHeight)) / 2 - t.lineWidth}px ${t.padding}px`,
  21262. tabsCardHeight: e,
  21263. tabsCardGutter: t.marginXXS / 2,
  21264. tabsHorizontalGutter: 32,
  21265. tabsCardHeadBackground: t.colorFillAlter,
  21266. dropdownEdgeChildVerticalPadding: t.paddingXXS,
  21267. tabsActiveTextShadow: "0 0 0.25px currentcolor",
  21268. tabsDropdownHeight: 200,
  21269. tabsDropdownWidth: 120
  21270. });
  21271. return [JOe(n), tSe(n), KOe(n), qOe(n), YOe(n), nSe(n), XOe(n)];
  21272. }, (t) => ({
  21273. zIndexPopup: t.zIndexPopupBase + 50
  21274. }));
  21275. let E5 = 0;
  21276. const hX = () => ({
  21277. prefixCls: {
  21278. type: String
  21279. },
  21280. id: {
  21281. type: String
  21282. },
  21283. popupClassName: String,
  21284. getPopupContainer: tt(),
  21285. activeKey: {
  21286. type: [String, Number]
  21287. },
  21288. defaultActiveKey: {
  21289. type: [String, Number]
  21290. },
  21291. direction: hn(),
  21292. animated: gn([Boolean, Object]),
  21293. renderTabBar: tt(),
  21294. tabBarGutter: {
  21295. type: Number
  21296. },
  21297. tabBarStyle: $t(),
  21298. tabPosition: hn(),
  21299. destroyInactiveTabPane: nt(),
  21300. hideAdd: Boolean,
  21301. type: hn(),
  21302. size: hn(),
  21303. centered: Boolean,
  21304. onEdit: tt(),
  21305. onChange: tt(),
  21306. onTabClick: tt(),
  21307. onTabScroll: tt(),
  21308. "onUpdate:activeKey": tt(),
  21309. // Accessibility
  21310. locale: $t(),
  21311. onPrevClick: tt(),
  21312. onNextClick: tt(),
  21313. tabBarExtraContent: Y.any
  21314. });
  21315. function iSe(t) {
  21316. return t.map((e) => {
  21317. if (Ui(e)) {
  21318. const n = I({}, e.props || {});
  21319. for (const [d, h] of Object.entries(n))
  21320. delete n[d], n[tI(d)] = h;
  21321. const r = e.children || {}, i = e.key !== void 0 ? e.key : void 0, {
  21322. tab: a = r.tab,
  21323. disabled: o,
  21324. forceRender: s,
  21325. closable: l,
  21326. animated: u,
  21327. active: c,
  21328. destroyInactiveTabPane: f
  21329. } = n;
  21330. return I(I({
  21331. key: i
  21332. }, n), {
  21333. node: e,
  21334. closeIcon: r.closeIcon,
  21335. tab: a,
  21336. disabled: o === "" || o,
  21337. forceRender: s === "" || s,
  21338. closable: l === "" || l,
  21339. animated: u === "" || u,
  21340. active: c === "" || c,
  21341. destroyInactiveTabPane: f === "" || f
  21342. });
  21343. }
  21344. return null;
  21345. }).filter((e) => e);
  21346. }
  21347. const aSe = te({
  21348. compatConfig: {
  21349. MODE: 3
  21350. },
  21351. name: "InternalTabs",
  21352. inheritAttrs: !1,
  21353. props: I(I({}, sr(hX(), {
  21354. tabPosition: "top",
  21355. animated: {
  21356. inkBar: !0,
  21357. tabPane: !1
  21358. }
  21359. })), {
  21360. tabs: uf()
  21361. }),
  21362. slots: Object,
  21363. // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  21364. setup(t, e) {
  21365. let {
  21366. attrs: n,
  21367. slots: r
  21368. } = e;
  21369. Qi(t.onPrevClick === void 0 && t.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), Qi(t.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), Qi(r.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
  21370. const {
  21371. prefixCls: i,
  21372. direction: a,
  21373. size: o,
  21374. rootPrefixCls: s,
  21375. getPopupContainer: l
  21376. } = It("tabs", t), [u, c] = rSe(i), f = L(() => a.value === "rtl"), d = L(() => {
  21377. const {
  21378. animated: x,
  21379. tabPosition: C
  21380. } = t;
  21381. return x === !1 || ["left", "right"].includes(C) ? {
  21382. inkBar: !1,
  21383. tabPane: !1
  21384. } : x === !0 ? {
  21385. inkBar: !0,
  21386. tabPane: !0
  21387. } : I({
  21388. inkBar: !0,
  21389. tabPane: !1
  21390. }, typeof x == "object" ? x : {});
  21391. }), [h, p] = fn(!1);
  21392. it(() => {
  21393. p(AI());
  21394. });
  21395. const [v, g] = wh(() => {
  21396. var x;
  21397. return (x = t.tabs[0]) === null || x === void 0 ? void 0 : x.key;
  21398. }, {
  21399. value: L(() => t.activeKey),
  21400. defaultValue: t.defaultActiveKey
  21401. }), [m, y] = fn(() => t.tabs.findIndex((x) => x.key === v.value));
  21402. ht(() => {
  21403. var x;
  21404. let C = t.tabs.findIndex((T) => T.key === v.value);
  21405. C === -1 && (C = Math.max(0, Math.min(m.value, t.tabs.length - 1)), g((x = t.tabs[C]) === null || x === void 0 ? void 0 : x.key)), y(C);
  21406. });
  21407. const [b, _] = wh(null, {
  21408. value: L(() => t.id)
  21409. }), O = L(() => h.value && !["left", "right"].includes(t.tabPosition) ? "top" : t.tabPosition);
  21410. it(() => {
  21411. t.id || (_(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : E5}`), E5 += 1);
  21412. });
  21413. const S = (x, C) => {
  21414. var T, w;
  21415. (T = t.onTabClick) === null || T === void 0 || T.call(t, x, C);
  21416. const P = x !== v.value;
  21417. g(x), P && ((w = t.onChange) === null || w === void 0 || w.call(t, x));
  21418. };
  21419. return fX({
  21420. tabs: L(() => t.tabs),
  21421. prefixCls: i
  21422. }), () => {
  21423. const {
  21424. id: x,
  21425. type: C,
  21426. tabBarGutter: T,
  21427. tabBarStyle: w,
  21428. locale: P,
  21429. destroyInactiveTabPane: $,
  21430. renderTabBar: A = r.renderTabBar,
  21431. onTabScroll: D,
  21432. hideAdd: E,
  21433. centered: R
  21434. } = t, N = {
  21435. id: b.value,
  21436. activeKey: v.value,
  21437. animated: d.value,
  21438. tabPosition: O.value,
  21439. rtl: f.value,
  21440. mobile: h.value
  21441. };
  21442. let V;
  21443. C === "editable-card" && (V = {
  21444. onEdit: (Q, Z) => {
  21445. let {
  21446. key: ne,
  21447. event: ee
  21448. } = Z;
  21449. var oe;
  21450. (oe = t.onEdit) === null || oe === void 0 || oe.call(t, Q === "add" ? ee : ne, Q);
  21451. },
  21452. removeIcon: () => M(al, null, null),
  21453. addIcon: r.addIcon ? r.addIcon : () => M(yx, null, null),
  21454. showAdd: E !== !0
  21455. });
  21456. let z;
  21457. const W = I(I({}, N), {
  21458. moreTransitionName: `${s.value}-slide-up`,
  21459. editable: V,
  21460. locale: P,
  21461. tabBarGutter: T,
  21462. onTabClick: S,
  21463. onTabScroll: D,
  21464. style: w,
  21465. getPopupContainer: l.value,
  21466. popupClassName: ye(t.popupClassName, c.value)
  21467. });
  21468. A ? z = A(I(I({}, W), {
  21469. DefaultTabBar: $5
  21470. })) : z = M($5, W, am(r, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
  21471. const F = i.value;
  21472. return u(M("div", j(j({}, n), {}, {
  21473. id: x,
  21474. class: ye(F, `${F}-${O.value}`, {
  21475. [c.value]: !0,
  21476. [`${F}-${o.value}`]: o.value,
  21477. [`${F}-card`]: ["card", "editable-card"].includes(C),
  21478. [`${F}-editable-card`]: C === "editable-card",
  21479. [`${F}-centered`]: R,
  21480. [`${F}-mobile`]: h.value,
  21481. [`${F}-editable`]: C === "editable-card",
  21482. [`${F}-rtl`]: f.value
  21483. }, n.class)
  21484. }), [z, M(jOe, j(j({
  21485. destroyInactiveTabPane: $
  21486. }, N), {}, {
  21487. animated: d.value
  21488. }), null)]));
  21489. };
  21490. }
  21491. }), Uc = te({
  21492. compatConfig: {
  21493. MODE: 3
  21494. },
  21495. name: "ATabs",
  21496. inheritAttrs: !1,
  21497. props: sr(hX(), {
  21498. tabPosition: "top",
  21499. animated: {
  21500. inkBar: !0,
  21501. tabPane: !1
  21502. }
  21503. }),
  21504. slots: Object,
  21505. // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  21506. setup(t, e) {
  21507. let {
  21508. attrs: n,
  21509. slots: r,
  21510. emit: i
  21511. } = e;
  21512. const a = (o) => {
  21513. i("update:activeKey", o), i("change", o);
  21514. };
  21515. return () => {
  21516. var o;
  21517. const s = iSe(Yn((o = r.default) === null || o === void 0 ? void 0 : o.call(r)));
  21518. return M(aSe, j(j(j({}, or(t, ["onUpdate:activeKey"])), n), {}, {
  21519. onChange: a,
  21520. tabs: s
  21521. }), r);
  21522. };
  21523. }
  21524. }), oSe = () => ({
  21525. tab: Y.any,
  21526. disabled: {
  21527. type: Boolean
  21528. },
  21529. forceRender: {
  21530. type: Boolean
  21531. },
  21532. closable: {
  21533. type: Boolean
  21534. },
  21535. animated: {
  21536. type: Boolean
  21537. },
  21538. active: {
  21539. type: Boolean
  21540. },
  21541. destroyInactiveTabPane: {
  21542. type: Boolean
  21543. },
  21544. // Pass by TabPaneList
  21545. prefixCls: {
  21546. type: String
  21547. },
  21548. tabKey: {
  21549. type: [String, Number]
  21550. },
  21551. id: {
  21552. type: String
  21553. }
  21554. // closeIcon: PropTypes.any,
  21555. }), Fs = te({
  21556. compatConfig: {
  21557. MODE: 3
  21558. },
  21559. name: "ATabPane",
  21560. inheritAttrs: !1,
  21561. __ANT_TAB_PANE: !0,
  21562. props: oSe(),
  21563. slots: Object,
  21564. setup(t, e) {
  21565. let {
  21566. attrs: n,
  21567. slots: r
  21568. } = e;
  21569. const i = U(t.forceRender);
  21570. se([() => t.active, () => t.destroyInactiveTabPane], () => {
  21571. t.active ? i.value = !0 : t.destroyInactiveTabPane && (i.value = !1);
  21572. }, {
  21573. immediate: !0
  21574. });
  21575. const a = L(() => t.active ? {} : t.animated ? {
  21576. visibility: "hidden",
  21577. height: 0,
  21578. overflowY: "hidden"
  21579. } : {
  21580. display: "none"
  21581. });
  21582. return () => {
  21583. var o;
  21584. const {
  21585. prefixCls: s,
  21586. forceRender: l,
  21587. id: u,
  21588. active: c,
  21589. tabKey: f
  21590. } = t;
  21591. return M("div", {
  21592. id: u && `${u}-panel-${f}`,
  21593. role: "tabpanel",
  21594. tabindex: c ? 0 : -1,
  21595. "aria-labelledby": u && `${u}-tab-${f}`,
  21596. "aria-hidden": !c,
  21597. style: [a.value, n.style],
  21598. class: [`${s}-tabpane`, c && `${s}-tabpane-active`, n.class]
  21599. }, [(c || i.value || l) && ((o = r.default) === null || o === void 0 ? void 0 : o.call(r))]);
  21600. };
  21601. }
  21602. });
  21603. Uc.TabPane = Fs;
  21604. Uc.install = function(t) {
  21605. return t.component(Uc.name, Uc), t.component(Fs.name, Fs), t;
  21606. };
  21607. const sSe = () => ({
  21608. prefixCls: String,
  21609. activeKey: gn([Array, Number, String]),
  21610. defaultActiveKey: gn([Array, Number, String]),
  21611. accordion: nt(),
  21612. destroyInactivePanel: nt(),
  21613. bordered: nt(),
  21614. expandIcon: tt(),
  21615. openAnimation: Y.object,
  21616. expandIconPosition: hn(),
  21617. collapsible: hn(),
  21618. ghost: nt(),
  21619. onChange: tt(),
  21620. "onUpdate:activeKey": tt()
  21621. }), pX = () => ({
  21622. openAnimation: Y.object,
  21623. prefixCls: String,
  21624. header: Y.any,
  21625. headerClass: String,
  21626. showArrow: nt(),
  21627. isActive: nt(),
  21628. destroyInactivePanel: nt(),
  21629. /** @deprecated Use `collapsible="disabled"` instead */
  21630. disabled: nt(),
  21631. accordion: nt(),
  21632. forceRender: nt(),
  21633. expandIcon: tt(),
  21634. extra: Y.any,
  21635. panelKey: gn(),
  21636. collapsible: hn(),
  21637. role: String,
  21638. onItemClick: tt()
  21639. }), lSe = (t) => {
  21640. const {
  21641. componentCls: e,
  21642. collapseContentBg: n,
  21643. padding: r,
  21644. collapseContentPaddingHorizontal: i,
  21645. collapseHeaderBg: a,
  21646. collapseHeaderPadding: o,
  21647. collapsePanelBorderRadius: s,
  21648. lineWidth: l,
  21649. lineType: u,
  21650. colorBorder: c,
  21651. colorText: f,
  21652. colorTextHeading: d,
  21653. colorTextDisabled: h,
  21654. fontSize: p,
  21655. lineHeight: v,
  21656. marginSM: g,
  21657. paddingSM: m,
  21658. motionDurationSlow: y,
  21659. fontSizeIcon: b
  21660. } = t, _ = `${l}px ${u} ${c}`;
  21661. return {
  21662. [e]: I(I({}, nn(t)), {
  21663. backgroundColor: a,
  21664. border: _,
  21665. borderBottom: 0,
  21666. borderRadius: `${s}px`,
  21667. "&-rtl": {
  21668. direction: "rtl"
  21669. },
  21670. [`& > ${e}-item`]: {
  21671. borderBottom: _,
  21672. "&:last-child": {
  21673. [`
  21674. &,
  21675. & > ${e}-header`]: {
  21676. borderRadius: `0 0 ${s}px ${s}px`
  21677. }
  21678. },
  21679. [`> ${e}-header`]: {
  21680. position: "relative",
  21681. display: "flex",
  21682. flexWrap: "nowrap",
  21683. alignItems: "flex-start",
  21684. padding: o,
  21685. color: d,
  21686. lineHeight: v,
  21687. cursor: "pointer",
  21688. transition: `all ${y}, visibility 0s`,
  21689. [`> ${e}-header-text`]: {
  21690. flex: "auto"
  21691. },
  21692. "&:focus": {
  21693. outline: "none"
  21694. },
  21695. // >>>>> Arrow
  21696. [`${e}-expand-icon`]: {
  21697. height: p * v,
  21698. display: "flex",
  21699. alignItems: "center",
  21700. paddingInlineEnd: g
  21701. },
  21702. [`${e}-arrow`]: I(I({}, ip()), {
  21703. fontSize: b,
  21704. svg: {
  21705. transition: `transform ${y}`
  21706. }
  21707. }),
  21708. // >>>>> Text
  21709. [`${e}-header-text`]: {
  21710. marginInlineEnd: "auto"
  21711. }
  21712. },
  21713. [`${e}-header-collapsible-only`]: {
  21714. cursor: "default",
  21715. [`${e}-header-text`]: {
  21716. flex: "none",
  21717. cursor: "pointer"
  21718. },
  21719. [`${e}-expand-icon`]: {
  21720. cursor: "pointer"
  21721. }
  21722. },
  21723. [`${e}-icon-collapsible-only`]: {
  21724. cursor: "default",
  21725. [`${e}-expand-icon`]: {
  21726. cursor: "pointer"
  21727. }
  21728. },
  21729. [`&${e}-no-arrow`]: {
  21730. [`> ${e}-header`]: {
  21731. paddingInlineStart: m
  21732. }
  21733. }
  21734. },
  21735. [`${e}-content`]: {
  21736. color: f,
  21737. backgroundColor: n,
  21738. borderTop: _,
  21739. [`& > ${e}-content-box`]: {
  21740. padding: `${r}px ${i}px`
  21741. },
  21742. "&-hidden": {
  21743. display: "none"
  21744. }
  21745. },
  21746. [`${e}-item:last-child`]: {
  21747. [`> ${e}-content`]: {
  21748. borderRadius: `0 0 ${s}px ${s}px`
  21749. }
  21750. },
  21751. [`& ${e}-item-disabled > ${e}-header`]: {
  21752. "\n &,\n & > .arrow\n ": {
  21753. color: h,
  21754. cursor: "not-allowed"
  21755. }
  21756. },
  21757. // ========================== Icon Position ==========================
  21758. [`&${e}-icon-position-end`]: {
  21759. [`& > ${e}-item`]: {
  21760. [`> ${e}-header`]: {
  21761. [`${e}-expand-icon`]: {
  21762. order: 1,
  21763. paddingInlineEnd: 0,
  21764. paddingInlineStart: g
  21765. }
  21766. }
  21767. }
  21768. }
  21769. })
  21770. };
  21771. }, uSe = (t) => {
  21772. const {
  21773. componentCls: e
  21774. } = t, n = `> ${e}-item > ${e}-header ${e}-arrow svg`;
  21775. return {
  21776. [`${e}-rtl`]: {
  21777. [n]: {
  21778. transform: "rotate(180deg)"
  21779. }
  21780. }
  21781. };
  21782. }, cSe = (t) => {
  21783. const {
  21784. componentCls: e,
  21785. collapseHeaderBg: n,
  21786. paddingXXS: r,
  21787. colorBorder: i
  21788. } = t;
  21789. return {
  21790. [`${e}-borderless`]: {
  21791. backgroundColor: n,
  21792. border: 0,
  21793. [`> ${e}-item`]: {
  21794. borderBottom: `1px solid ${i}`
  21795. },
  21796. [`
  21797. > ${e}-item:last-child,
  21798. > ${e}-item:last-child ${e}-header
  21799. `]: {
  21800. borderRadius: 0
  21801. },
  21802. [`> ${e}-item:last-child`]: {
  21803. borderBottom: 0
  21804. },
  21805. [`> ${e}-item > ${e}-content`]: {
  21806. backgroundColor: "transparent",
  21807. borderTop: 0
  21808. },
  21809. [`> ${e}-item > ${e}-content > ${e}-content-box`]: {
  21810. paddingTop: r
  21811. }
  21812. }
  21813. };
  21814. }, fSe = (t) => {
  21815. const {
  21816. componentCls: e,
  21817. paddingSM: n
  21818. } = t;
  21819. return {
  21820. [`${e}-ghost`]: {
  21821. backgroundColor: "transparent",
  21822. border: 0,
  21823. [`> ${e}-item`]: {
  21824. borderBottom: 0,
  21825. [`> ${e}-content`]: {
  21826. backgroundColor: "transparent",
  21827. border: 0,
  21828. [`> ${e}-content-box`]: {
  21829. paddingBlock: n
  21830. }
  21831. }
  21832. }
  21833. }
  21834. };
  21835. }, dSe = Sn("Collapse", (t) => {
  21836. const e = Bt(t, {
  21837. collapseContentBg: t.colorBgContainer,
  21838. collapseHeaderBg: t.colorFillAlter,
  21839. collapseHeaderPadding: `${t.paddingSM}px ${t.padding}px`,
  21840. collapsePanelBorderRadius: t.borderRadiusLG,
  21841. collapseContentPaddingHorizontal: 16
  21842. // Fixed value
  21843. });
  21844. return [lSe(e), cSe(e), fSe(e), uSe(e), KI(e)];
  21845. });
  21846. function M5(t) {
  21847. let e = t;
  21848. if (!Array.isArray(e)) {
  21849. const n = typeof e;
  21850. e = n === "number" || n === "string" ? [e] : [];
  21851. }
  21852. return e.map((n) => String(n));
  21853. }
  21854. const cg = te({
  21855. compatConfig: {
  21856. MODE: 3
  21857. },
  21858. name: "ACollapse",
  21859. inheritAttrs: !1,
  21860. props: sr(sSe(), {
  21861. accordion: !1,
  21862. destroyInactivePanel: !1,
  21863. bordered: !0,
  21864. expandIconPosition: "start"
  21865. }),
  21866. slots: Object,
  21867. setup(t, e) {
  21868. let {
  21869. attrs: n,
  21870. slots: r,
  21871. emit: i
  21872. } = e;
  21873. const a = U(M5(DU([t.activeKey, t.defaultActiveKey])));
  21874. se(() => t.activeKey, () => {
  21875. a.value = M5(t.activeKey);
  21876. }, {
  21877. deep: !0
  21878. });
  21879. const {
  21880. prefixCls: o,
  21881. direction: s,
  21882. rootPrefixCls: l
  21883. } = It("collapse", t), [u, c] = dSe(o), f = L(() => {
  21884. const {
  21885. expandIconPosition: m
  21886. } = t;
  21887. return m !== void 0 ? m : s.value === "rtl" ? "end" : "start";
  21888. }), d = (m) => {
  21889. const {
  21890. expandIcon: y = r.expandIcon
  21891. } = t, b = y ? y(m) : M(px, {
  21892. rotate: m.isActive ? 90 : void 0
  21893. }, null);
  21894. return M("div", {
  21895. class: [`${o.value}-expand-icon`, c.value],
  21896. onClick: () => ["header", "icon"].includes(t.collapsible) && p(m.panelKey)
  21897. }, [Ui(Array.isArray(y) ? b[0] : b) ? Pn(b, {
  21898. class: `${o.value}-arrow`
  21899. }, !1) : b]);
  21900. }, h = (m) => {
  21901. t.activeKey === void 0 && (a.value = m);
  21902. const y = t.accordion ? m[0] : m;
  21903. i("update:activeKey", y), i("change", y);
  21904. }, p = (m) => {
  21905. let y = a.value;
  21906. if (t.accordion)
  21907. y = y[0] === m ? [] : [m];
  21908. else {
  21909. y = [...y];
  21910. const b = y.indexOf(m);
  21911. b > -1 ? y.splice(b, 1) : y.push(m);
  21912. }
  21913. h(y);
  21914. }, v = (m, y) => {
  21915. var b, _, O;
  21916. if (nI(m)) return;
  21917. const S = a.value, {
  21918. accordion: x,
  21919. destroyInactivePanel: C,
  21920. collapsible: T,
  21921. openAnimation: w
  21922. } = t, P = w || sD(`${l.value}-motion-collapse`), $ = String((b = m.key) !== null && b !== void 0 ? b : y), {
  21923. header: A = (O = (_ = m.children) === null || _ === void 0 ? void 0 : _.header) === null || O === void 0 ? void 0 : O.call(_),
  21924. headerClass: D,
  21925. collapsible: E,
  21926. disabled: R
  21927. } = m.props || {};
  21928. let N = !1;
  21929. x ? N = S[0] === $ : N = S.indexOf($) > -1;
  21930. let V = E ?? T;
  21931. (R || R === "") && (V = "disabled");
  21932. const z = {
  21933. key: $,
  21934. panelKey: $,
  21935. header: A,
  21936. headerClass: D,
  21937. isActive: N,
  21938. prefixCls: o.value,
  21939. destroyInactivePanel: C,
  21940. openAnimation: P,
  21941. accordion: x,
  21942. onItemClick: V === "disabled" ? null : p,
  21943. expandIcon: d,
  21944. collapsible: V
  21945. };
  21946. return Pn(m, z);
  21947. }, g = () => {
  21948. var m;
  21949. return Yn((m = r.default) === null || m === void 0 ? void 0 : m.call(r)).map(v);
  21950. };
  21951. return () => {
  21952. const {
  21953. accordion: m,
  21954. bordered: y,
  21955. ghost: b
  21956. } = t, _ = ye(o.value, {
  21957. [`${o.value}-borderless`]: !y,
  21958. [`${o.value}-icon-position-${f.value}`]: !0,
  21959. [`${o.value}-rtl`]: s.value === "rtl",
  21960. [`${o.value}-ghost`]: !!b,
  21961. [n.class]: !!n.class
  21962. }, c.value);
  21963. return u(M("div", j(j({
  21964. class: _
  21965. }, lue(n)), {}, {
  21966. style: n.style,
  21967. role: m ? "tablist" : null
  21968. }), [g()]));
  21969. };
  21970. }
  21971. }), hSe = te({
  21972. compatConfig: {
  21973. MODE: 3
  21974. },
  21975. name: "PanelContent",
  21976. props: pX(),
  21977. setup(t, e) {
  21978. let {
  21979. slots: n
  21980. } = e;
  21981. const r = ae(!1);
  21982. return ht(() => {
  21983. (t.isActive || t.forceRender) && (r.value = !0);
  21984. }), () => {
  21985. var i;
  21986. if (!r.value) return null;
  21987. const {
  21988. prefixCls: a,
  21989. isActive: o,
  21990. role: s
  21991. } = t;
  21992. return M("div", {
  21993. class: ye(`${a}-content`, {
  21994. [`${a}-content-active`]: o,
  21995. [`${a}-content-inactive`]: !o
  21996. }),
  21997. role: s
  21998. }, [M("div", {
  21999. class: `${a}-content-box`
  22000. }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
  22001. };
  22002. }
  22003. }), B1 = te({
  22004. compatConfig: {
  22005. MODE: 3
  22006. },
  22007. name: "ACollapsePanel",
  22008. inheritAttrs: !1,
  22009. props: sr(pX(), {
  22010. showArrow: !0,
  22011. isActive: !1,
  22012. onItemClick() {
  22013. },
  22014. headerClass: "",
  22015. forceRender: !1
  22016. }),
  22017. slots: Object,
  22018. // emits: ['itemClick'],
  22019. setup(t, e) {
  22020. let {
  22021. slots: n,
  22022. emit: r,
  22023. attrs: i
  22024. } = e;
  22025. Qi(t.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
  22026. const {
  22027. prefixCls: a
  22028. } = It("collapse", t), o = () => {
  22029. r("itemClick", t.panelKey);
  22030. }, s = (l) => {
  22031. (l.key === "Enter" || l.keyCode === 13 || l.which === 13) && o();
  22032. };
  22033. return () => {
  22034. var l, u;
  22035. const {
  22036. header: c = (l = n.header) === null || l === void 0 ? void 0 : l.call(n),
  22037. headerClass: f,
  22038. isActive: d,
  22039. showArrow: h,
  22040. destroyInactivePanel: p,
  22041. accordion: v,
  22042. forceRender: g,
  22043. openAnimation: m,
  22044. expandIcon: y = n.expandIcon,
  22045. extra: b = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
  22046. collapsible: _
  22047. } = t, O = _ === "disabled", S = a.value, x = ye(`${S}-header`, {
  22048. [f]: f,
  22049. [`${S}-header-collapsible-only`]: _ === "header",
  22050. [`${S}-icon-collapsible-only`]: _ === "icon"
  22051. }), C = ye({
  22052. [`${S}-item`]: !0,
  22053. [`${S}-item-active`]: d,
  22054. [`${S}-item-disabled`]: O,
  22055. [`${S}-no-arrow`]: !h,
  22056. [`${i.class}`]: !!i.class
  22057. });
  22058. let T = M("i", {
  22059. class: "arrow"
  22060. }, null);
  22061. h && typeof y == "function" && (T = y(t));
  22062. const w = bi(M(hSe, {
  22063. prefixCls: S,
  22064. isActive: d,
  22065. forceRender: g,
  22066. role: v ? "tabpanel" : null
  22067. }, {
  22068. default: n.default
  22069. }), [[Bs, d]]), P = I({
  22070. appear: !1,
  22071. css: !1
  22072. }, m);
  22073. return M("div", j(j({}, i), {}, {
  22074. class: C
  22075. }), [M("div", {
  22076. class: x,
  22077. onClick: () => !["header", "icon"].includes(_) && o(),
  22078. role: v ? "tab" : "button",
  22079. tabindex: O ? -1 : 0,
  22080. "aria-expanded": d,
  22081. onKeypress: s
  22082. }, [h && T, M("span", {
  22083. onClick: () => _ === "header" && o(),
  22084. class: `${S}-header-text`
  22085. }, [c]), b && M("div", {
  22086. class: `${S}-extra`
  22087. }, [b])]), M(co, P, {
  22088. default: () => [!p || d ? w : null]
  22089. })]);
  22090. };
  22091. }
  22092. });
  22093. cg.Panel = B1;
  22094. cg.install = function(t) {
  22095. return t.component(cg.name, cg), t.component(B1.name, B1), t;
  22096. };
  22097. var pSe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
  22098. function I5(t) {
  22099. for (var e = 1; e < arguments.length; e++) {
  22100. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  22101. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  22102. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  22103. }))), r.forEach(function(i) {
  22104. vSe(t, i, n[i]);
  22105. });
  22106. }
  22107. return t;
  22108. }
  22109. function vSe(t, e, n) {
  22110. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  22111. }
  22112. var uD = function(e, n) {
  22113. var r = I5({}, e, n.attrs);
  22114. return M(lt, I5({}, r, {
  22115. icon: pSe
  22116. }), null);
  22117. };
  22118. uD.displayName = "LeftOutlined";
  22119. uD.inheritAttrs = !1;
  22120. const vX = () => wa() && window.document.documentElement;
  22121. let Dy;
  22122. const gSe = () => {
  22123. if (!vX())
  22124. return !1;
  22125. if (Dy !== void 0)
  22126. return Dy;
  22127. const t = document.createElement("div");
  22128. return t.style.display = "flex", t.style.flexDirection = "column", t.style.rowGap = "1px", t.appendChild(document.createElement("div")), t.appendChild(document.createElement("div")), document.body.appendChild(t), Dy = t.scrollHeight === 1, document.body.removeChild(t), Dy;
  22129. }, mSe = () => {
  22130. const t = ae(!1);
  22131. return it(() => {
  22132. t.value = gSe();
  22133. }), t;
  22134. }, gX = Symbol("rowContextKey"), ySe = (t) => {
  22135. pt(gX, t);
  22136. }, bSe = () => Ge(gX, {
  22137. gutter: L(() => {
  22138. }),
  22139. wrap: L(() => {
  22140. }),
  22141. supportFlexGap: L(() => {
  22142. })
  22143. }), _Se = (t) => {
  22144. const {
  22145. componentCls: e
  22146. } = t;
  22147. return {
  22148. // Grid system
  22149. [e]: {
  22150. display: "flex",
  22151. flexFlow: "row wrap",
  22152. minWidth: 0,
  22153. "&::before, &::after": {
  22154. display: "flex"
  22155. },
  22156. "&-no-wrap": {
  22157. flexWrap: "nowrap"
  22158. },
  22159. // The origin of the X-axis
  22160. "&-start": {
  22161. justifyContent: "flex-start"
  22162. },
  22163. // The center of the X-axis
  22164. "&-center": {
  22165. justifyContent: "center"
  22166. },
  22167. // The opposite of the X-axis
  22168. "&-end": {
  22169. justifyContent: "flex-end"
  22170. },
  22171. "&-space-between": {
  22172. justifyContent: "space-between"
  22173. },
  22174. "&-space-around ": {
  22175. justifyContent: "space-around"
  22176. },
  22177. "&-space-evenly ": {
  22178. justifyContent: "space-evenly"
  22179. },
  22180. // Align at the top
  22181. "&-top": {
  22182. alignItems: "flex-start"
  22183. },
  22184. // Align at the center
  22185. "&-middle": {
  22186. alignItems: "center"
  22187. },
  22188. "&-bottom": {
  22189. alignItems: "flex-end"
  22190. }
  22191. }
  22192. };
  22193. }, OSe = (t) => {
  22194. const {
  22195. componentCls: e
  22196. } = t;
  22197. return {
  22198. // Grid system
  22199. [e]: {
  22200. position: "relative",
  22201. maxWidth: "100%",
  22202. // Prevent columns from collapsing when empty
  22203. minHeight: 1
  22204. }
  22205. };
  22206. }, SSe = (t, e) => {
  22207. const {
  22208. componentCls: n,
  22209. gridColumns: r
  22210. } = t, i = {};
  22211. for (let a = r; a >= 0; a--)
  22212. a === 0 ? (i[`${n}${e}-${a}`] = {
  22213. display: "none"
  22214. }, i[`${n}-push-${a}`] = {
  22215. insetInlineStart: "auto"
  22216. }, i[`${n}-pull-${a}`] = {
  22217. insetInlineEnd: "auto"
  22218. }, i[`${n}${e}-push-${a}`] = {
  22219. insetInlineStart: "auto"
  22220. }, i[`${n}${e}-pull-${a}`] = {
  22221. insetInlineEnd: "auto"
  22222. }, i[`${n}${e}-offset-${a}`] = {
  22223. marginInlineEnd: 0
  22224. }, i[`${n}${e}-order-${a}`] = {
  22225. order: 0
  22226. }) : (i[`${n}${e}-${a}`] = {
  22227. display: "block",
  22228. flex: `0 0 ${a / r * 100}%`,
  22229. maxWidth: `${a / r * 100}%`
  22230. }, i[`${n}${e}-push-${a}`] = {
  22231. insetInlineStart: `${a / r * 100}%`
  22232. }, i[`${n}${e}-pull-${a}`] = {
  22233. insetInlineEnd: `${a / r * 100}%`
  22234. }, i[`${n}${e}-offset-${a}`] = {
  22235. marginInlineStart: `${a / r * 100}%`
  22236. }, i[`${n}${e}-order-${a}`] = {
  22237. order: a
  22238. });
  22239. return i;
  22240. }, B2 = (t, e) => SSe(t, e), xSe = (t, e, n) => ({
  22241. [`@media (min-width: ${e}px)`]: I({}, B2(t, n))
  22242. }), wSe = Sn("Grid", (t) => [_Se(t)]), CSe = Sn("Grid", (t) => {
  22243. const e = Bt(t, {
  22244. gridColumns: 24
  22245. // Row is divided into 24 parts in Grid
  22246. }), n = {
  22247. "-sm": e.screenSMMin,
  22248. "-md": e.screenMDMin,
  22249. "-lg": e.screenLGMin,
  22250. "-xl": e.screenXLMin,
  22251. "-xxl": e.screenXXLMin
  22252. };
  22253. return [OSe(e), B2(e, ""), B2(e, "-xs"), Object.keys(n).map((r) => xSe(e, n[r], r)).reduce((r, i) => I(I({}, r), i), {})];
  22254. }), TSe = () => ({
  22255. align: gn([String, Object]),
  22256. justify: gn([String, Object]),
  22257. prefixCls: String,
  22258. gutter: gn([Number, Array, Object], 0),
  22259. wrap: {
  22260. type: Boolean,
  22261. default: void 0
  22262. }
  22263. }), PSe = te({
  22264. compatConfig: {
  22265. MODE: 3
  22266. },
  22267. name: "ARow",
  22268. inheritAttrs: !1,
  22269. props: TSe(),
  22270. setup(t, e) {
  22271. let {
  22272. slots: n,
  22273. attrs: r
  22274. } = e;
  22275. const {
  22276. prefixCls: i,
  22277. direction: a
  22278. } = It("row", t), [o, s] = wSe(i);
  22279. let l;
  22280. const u = j_e(), c = U({
  22281. xs: !0,
  22282. sm: !0,
  22283. md: !0,
  22284. lg: !0,
  22285. xl: !0,
  22286. xxl: !0
  22287. }), f = U({
  22288. xs: !1,
  22289. sm: !1,
  22290. md: !1,
  22291. lg: !1,
  22292. xl: !1,
  22293. xxl: !1
  22294. }), d = (b) => L(() => {
  22295. if (typeof t[b] == "string")
  22296. return t[b];
  22297. if (typeof t[b] != "object")
  22298. return "";
  22299. for (let _ = 0; _ < $y.length; _++) {
  22300. const O = $y[_];
  22301. if (!f.value[O]) continue;
  22302. const S = t[b][O];
  22303. if (S !== void 0)
  22304. return S;
  22305. }
  22306. return "";
  22307. }), h = d("align"), p = d("justify"), v = mSe();
  22308. it(() => {
  22309. l = u.value.subscribe((b) => {
  22310. f.value = b;
  22311. const _ = t.gutter || 0;
  22312. (!Array.isArray(_) && typeof _ == "object" || Array.isArray(_) && (typeof _[0] == "object" || typeof _[1] == "object")) && (c.value = b);
  22313. });
  22314. }), yt(() => {
  22315. u.value.unsubscribe(l);
  22316. });
  22317. const g = L(() => {
  22318. const b = [void 0, void 0], {
  22319. gutter: _ = 0
  22320. } = t;
  22321. return (Array.isArray(_) ? _ : [_, void 0]).forEach((S, x) => {
  22322. if (typeof S == "object")
  22323. for (let C = 0; C < $y.length; C++) {
  22324. const T = $y[C];
  22325. if (c.value[T] && S[T] !== void 0) {
  22326. b[x] = S[T];
  22327. break;
  22328. }
  22329. }
  22330. else
  22331. b[x] = S;
  22332. }), b;
  22333. });
  22334. ySe({
  22335. gutter: g,
  22336. supportFlexGap: v,
  22337. wrap: L(() => t.wrap)
  22338. });
  22339. const m = L(() => ye(i.value, {
  22340. [`${i.value}-no-wrap`]: t.wrap === !1,
  22341. [`${i.value}-${p.value}`]: p.value,
  22342. [`${i.value}-${h.value}`]: h.value,
  22343. [`${i.value}-rtl`]: a.value === "rtl"
  22344. }, r.class, s.value)), y = L(() => {
  22345. const b = g.value, _ = {}, O = b[0] != null && b[0] > 0 ? `${b[0] / -2}px` : void 0, S = b[1] != null && b[1] > 0 ? `${b[1] / -2}px` : void 0;
  22346. return O && (_.marginLeft = O, _.marginRight = O), v.value ? _.rowGap = `${b[1]}px` : S && (_.marginTop = S, _.marginBottom = S), _;
  22347. });
  22348. return () => {
  22349. var b;
  22350. return o(M("div", j(j({}, r), {}, {
  22351. class: m.value,
  22352. style: I(I({}, y.value), r.style)
  22353. }), [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)]));
  22354. };
  22355. }
  22356. });
  22357. function Ic() {
  22358. return Ic = Object.assign ? Object.assign.bind() : function(t) {
  22359. for (var e = 1; e < arguments.length; e++) {
  22360. var n = arguments[e];
  22361. for (var r in n)
  22362. Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
  22363. }
  22364. return t;
  22365. }, Ic.apply(this, arguments);
  22366. }
  22367. function $Se(t, e) {
  22368. t.prototype = Object.create(e.prototype), t.prototype.constructor = t, om(t, e);
  22369. }
  22370. function z2(t) {
  22371. return z2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
  22372. return n.__proto__ || Object.getPrototypeOf(n);
  22373. }, z2(t);
  22374. }
  22375. function om(t, e) {
  22376. return om = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
  22377. return r.__proto__ = i, r;
  22378. }, om(t, e);
  22379. }
  22380. function ASe() {
  22381. if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  22382. if (typeof Proxy == "function") return !0;
  22383. try {
  22384. return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
  22385. })), !0;
  22386. } catch {
  22387. return !1;
  22388. }
  22389. }
  22390. function P_(t, e, n) {
  22391. return ASe() ? P_ = Reflect.construct.bind() : P_ = function(i, a, o) {
  22392. var s = [null];
  22393. s.push.apply(s, a);
  22394. var l = Function.bind.apply(i, s), u = new l();
  22395. return o && om(u, o.prototype), u;
  22396. }, P_.apply(null, arguments);
  22397. }
  22398. function ESe(t) {
  22399. return Function.toString.call(t).indexOf("[native code]") !== -1;
  22400. }
  22401. function V2(t) {
  22402. var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  22403. return V2 = function(r) {
  22404. if (r === null || !ESe(r)) return r;
  22405. if (typeof r != "function")
  22406. throw new TypeError("Super expression must either be null or a function");
  22407. if (typeof e < "u") {
  22408. if (e.has(r)) return e.get(r);
  22409. e.set(r, i);
  22410. }
  22411. function i() {
  22412. return P_(r, arguments, z2(this).constructor);
  22413. }
  22414. return i.prototype = Object.create(r.prototype, {
  22415. constructor: {
  22416. value: i,
  22417. enumerable: !1,
  22418. writable: !0,
  22419. configurable: !0
  22420. }
  22421. }), om(i, r);
  22422. }, V2(t);
  22423. }
  22424. var MSe = /%[sdj%]/g, mX = function() {
  22425. };
  22426. typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (mX = function(e, n) {
  22427. typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
  22428. return typeof r == "string";
  22429. }) && console.warn(e, n);
  22430. });
  22431. function F2(t) {
  22432. if (!t || !t.length) return null;
  22433. var e = {};
  22434. return t.forEach(function(n) {
  22435. var r = n.field;
  22436. e[r] = e[r] || [], e[r].push(n);
  22437. }), e;
  22438. }
  22439. function zi(t) {
  22440. for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
  22441. n[r - 1] = arguments[r];
  22442. var i = 0, a = n.length;
  22443. if (typeof t == "function")
  22444. return t.apply(null, n);
  22445. if (typeof t == "string") {
  22446. var o = t.replace(MSe, function(s) {
  22447. if (s === "%%")
  22448. return "%";
  22449. if (i >= a)
  22450. return s;
  22451. switch (s) {
  22452. case "%s":
  22453. return String(n[i++]);
  22454. case "%d":
  22455. return Number(n[i++]);
  22456. case "%j":
  22457. try {
  22458. return JSON.stringify(n[i++]);
  22459. } catch {
  22460. return "[Circular]";
  22461. }
  22462. break;
  22463. default:
  22464. return s;
  22465. }
  22466. });
  22467. return o;
  22468. }
  22469. return t;
  22470. }
  22471. function ISe(t) {
  22472. return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
  22473. }
  22474. function Kn(t, e) {
  22475. return !!(t == null || e === "array" && Array.isArray(t) && !t.length || ISe(e) && typeof t == "string" && !t);
  22476. }
  22477. function DSe(t, e, n) {
  22478. var r = [], i = 0, a = t.length;
  22479. function o(s) {
  22480. r.push.apply(r, s || []), i++, i === a && n(r);
  22481. }
  22482. t.forEach(function(s) {
  22483. e(s, o);
  22484. });
  22485. }
  22486. function D5(t, e, n) {
  22487. var r = 0, i = t.length;
  22488. function a(o) {
  22489. if (o && o.length) {
  22490. n(o);
  22491. return;
  22492. }
  22493. var s = r;
  22494. r = r + 1, s < i ? e(t[s], a) : n([]);
  22495. }
  22496. a([]);
  22497. }
  22498. function RSe(t) {
  22499. var e = [];
  22500. return Object.keys(t).forEach(function(n) {
  22501. e.push.apply(e, t[n] || []);
  22502. }), e;
  22503. }
  22504. var R5 = /* @__PURE__ */ function(t) {
  22505. $Se(e, t);
  22506. function e(n, r) {
  22507. var i;
  22508. return i = t.call(this, "Async Validation Error") || this, i.errors = n, i.fields = r, i;
  22509. }
  22510. return e;
  22511. }(/* @__PURE__ */ V2(Error));
  22512. function kSe(t, e, n, r, i) {
  22513. if (e.first) {
  22514. var a = new Promise(function(d, h) {
  22515. var p = function(m) {
  22516. return r(m), m.length ? h(new R5(m, F2(m))) : d(i);
  22517. }, v = RSe(t);
  22518. D5(v, n, p);
  22519. });
  22520. return a.catch(function(d) {
  22521. return d;
  22522. }), a;
  22523. }
  22524. var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], s = Object.keys(t), l = s.length, u = 0, c = [], f = new Promise(function(d, h) {
  22525. var p = function(g) {
  22526. if (c.push.apply(c, g), u++, u === l)
  22527. return r(c), c.length ? h(new R5(c, F2(c))) : d(i);
  22528. };
  22529. s.length || (r(c), d(i)), s.forEach(function(v) {
  22530. var g = t[v];
  22531. o.indexOf(v) !== -1 ? D5(g, n, p) : DSe(g, n, p);
  22532. });
  22533. });
  22534. return f.catch(function(d) {
  22535. return d;
  22536. }), f;
  22537. }
  22538. function LSe(t) {
  22539. return !!(t && t.message !== void 0);
  22540. }
  22541. function NSe(t, e) {
  22542. for (var n = t, r = 0; r < e.length; r++) {
  22543. if (n == null)
  22544. return n;
  22545. n = n[e[r]];
  22546. }
  22547. return n;
  22548. }
  22549. function k5(t, e) {
  22550. return function(n) {
  22551. var r;
  22552. return t.fullFields ? r = NSe(e, t.fullFields) : r = e[n.field || t.fullField], LSe(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
  22553. message: typeof n == "function" ? n() : n,
  22554. fieldValue: r,
  22555. field: n.field || t.fullField
  22556. };
  22557. };
  22558. }
  22559. function L5(t, e) {
  22560. if (e) {
  22561. for (var n in e)
  22562. if (e.hasOwnProperty(n)) {
  22563. var r = e[n];
  22564. typeof r == "object" && typeof t[n] == "object" ? t[n] = Ic({}, t[n], r) : t[n] = r;
  22565. }
  22566. }
  22567. return t;
  22568. }
  22569. var yX = function(e, n, r, i, a, o) {
  22570. e.required && (!r.hasOwnProperty(e.field) || Kn(n, o || e.type)) && i.push(zi(a.messages.required, e.fullField));
  22571. }, BSe = function(e, n, r, i, a) {
  22572. (/^\s+$/.test(n) || n === "") && i.push(zi(a.messages.whitespace, e.fullField));
  22573. }, Ry, zSe = function() {
  22574. if (Ry)
  22575. return Ry;
  22576. var t = "[a-fA-F\\d:]", e = function(_) {
  22577. return _ && _.includeBoundaries ? "(?:(?<=\\s|^)(?=" + t + ")|(?<=" + t + ")(?=\\s|$))" : "";
  22578. }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", i = (`
  22579. (?:
  22580. (?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
  22581. (?:` + r + ":){6}(?:" + n + "|:" + r + `|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
  22582. (?:` + r + ":){5}(?::" + n + "|(?::" + r + `){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
  22583. (?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + n + "|(?::" + r + `){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
  22584. (?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + n + "|(?::" + r + `){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
  22585. (?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + n + "|(?::" + r + `){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
  22586. (?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + n + "|(?::" + r + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
  22587. (?::(?:(?::` + r + "){0,5}:" + n + "|(?::" + r + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
  22588. )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
  22589. `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), o = new RegExp("^" + n + "$"), s = new RegExp("^" + i + "$"), l = function(_) {
  22590. return _ && _.exact ? a : new RegExp("(?:" + e(_) + n + e(_) + ")|(?:" + e(_) + i + e(_) + ")", "g");
  22591. };
  22592. l.v4 = function(b) {
  22593. return b && b.exact ? o : new RegExp("" + e(b) + n + e(b), "g");
  22594. }, l.v6 = function(b) {
  22595. return b && b.exact ? s : new RegExp("" + e(b) + i + e(b), "g");
  22596. };
  22597. var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", f = l.v4().source, d = l.v6().source, h = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", v = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", g = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', y = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + f + "|" + d + "|" + h + p + v + ")" + g + m;
  22598. return Ry = new RegExp("(?:^" + y + "$)", "i"), Ry;
  22599. }, N5 = {
  22600. // http://emailregex.com/
  22601. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  22602. // url: new RegExp(
  22603. // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  22604. // 'i',
  22605. // ),
  22606. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  22607. }, Bv = {
  22608. integer: function(e) {
  22609. return Bv.number(e) && parseInt(e, 10) === e;
  22610. },
  22611. float: function(e) {
  22612. return Bv.number(e) && !Bv.integer(e);
  22613. },
  22614. array: function(e) {
  22615. return Array.isArray(e);
  22616. },
  22617. regexp: function(e) {
  22618. if (e instanceof RegExp)
  22619. return !0;
  22620. try {
  22621. return !!new RegExp(e);
  22622. } catch {
  22623. return !1;
  22624. }
  22625. },
  22626. date: function(e) {
  22627. return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
  22628. },
  22629. number: function(e) {
  22630. return isNaN(e) ? !1 : typeof e == "number";
  22631. },
  22632. object: function(e) {
  22633. return typeof e == "object" && !Bv.array(e);
  22634. },
  22635. method: function(e) {
  22636. return typeof e == "function";
  22637. },
  22638. email: function(e) {
  22639. return typeof e == "string" && e.length <= 320 && !!e.match(N5.email);
  22640. },
  22641. url: function(e) {
  22642. return typeof e == "string" && e.length <= 2048 && !!e.match(zSe());
  22643. },
  22644. hex: function(e) {
  22645. return typeof e == "string" && !!e.match(N5.hex);
  22646. }
  22647. }, VSe = function(e, n, r, i, a) {
  22648. if (e.required && n === void 0) {
  22649. yX(e, n, r, i, a);
  22650. return;
  22651. }
  22652. var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
  22653. o.indexOf(s) > -1 ? Bv[s](n) || i.push(zi(a.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && i.push(zi(a.messages.types[s], e.fullField, e.type));
  22654. }, FSe = function(e, n, r, i, a) {
  22655. var o = typeof e.len == "number", s = typeof e.min == "number", l = typeof e.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, f = null, d = typeof n == "number", h = typeof n == "string", p = Array.isArray(n);
  22656. if (d ? f = "number" : h ? f = "string" : p && (f = "array"), !f)
  22657. return !1;
  22658. p && (c = n.length), h && (c = n.replace(u, "_").length), o ? c !== e.len && i.push(zi(a.messages[f].len, e.fullField, e.len)) : s && !l && c < e.min ? i.push(zi(a.messages[f].min, e.fullField, e.min)) : l && !s && c > e.max ? i.push(zi(a.messages[f].max, e.fullField, e.max)) : s && l && (c < e.min || c > e.max) && i.push(zi(a.messages[f].range, e.fullField, e.min, e.max));
  22659. }, qf = "enum", WSe = function(e, n, r, i, a) {
  22660. e[qf] = Array.isArray(e[qf]) ? e[qf] : [], e[qf].indexOf(n) === -1 && i.push(zi(a.messages[qf], e.fullField, e[qf].join(", ")));
  22661. }, QSe = function(e, n, r, i, a) {
  22662. if (e.pattern) {
  22663. if (e.pattern instanceof RegExp)
  22664. e.pattern.lastIndex = 0, e.pattern.test(n) || i.push(zi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
  22665. else if (typeof e.pattern == "string") {
  22666. var o = new RegExp(e.pattern);
  22667. o.test(n) || i.push(zi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
  22668. }
  22669. }
  22670. }, Mt = {
  22671. required: yX,
  22672. whitespace: BSe,
  22673. type: VSe,
  22674. range: FSe,
  22675. enum: WSe,
  22676. pattern: QSe
  22677. }, HSe = function(e, n, r, i, a) {
  22678. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22679. if (s) {
  22680. if (Kn(n, "string") && !e.required)
  22681. return r();
  22682. Mt.required(e, n, i, o, a, "string"), Kn(n, "string") || (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a), Mt.pattern(e, n, i, o, a), e.whitespace === !0 && Mt.whitespace(e, n, i, o, a));
  22683. }
  22684. r(o);
  22685. }, GSe = function(e, n, r, i, a) {
  22686. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22687. if (s) {
  22688. if (Kn(n) && !e.required)
  22689. return r();
  22690. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22691. }
  22692. r(o);
  22693. }, jSe = function(e, n, r, i, a) {
  22694. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22695. if (s) {
  22696. if (n === "" && (n = void 0), Kn(n) && !e.required)
  22697. return r();
  22698. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22699. }
  22700. r(o);
  22701. }, ZSe = function(e, n, r, i, a) {
  22702. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22703. if (s) {
  22704. if (Kn(n) && !e.required)
  22705. return r();
  22706. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22707. }
  22708. r(o);
  22709. }, USe = function(e, n, r, i, a) {
  22710. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22711. if (s) {
  22712. if (Kn(n) && !e.required)
  22713. return r();
  22714. Mt.required(e, n, i, o, a), Kn(n) || Mt.type(e, n, i, o, a);
  22715. }
  22716. r(o);
  22717. }, XSe = function(e, n, r, i, a) {
  22718. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22719. if (s) {
  22720. if (Kn(n) && !e.required)
  22721. return r();
  22722. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22723. }
  22724. r(o);
  22725. }, YSe = function(e, n, r, i, a) {
  22726. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22727. if (s) {
  22728. if (Kn(n) && !e.required)
  22729. return r();
  22730. Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22731. }
  22732. r(o);
  22733. }, qSe = function(e, n, r, i, a) {
  22734. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22735. if (s) {
  22736. if (n == null && !e.required)
  22737. return r();
  22738. Mt.required(e, n, i, o, a, "array"), n != null && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  22739. }
  22740. r(o);
  22741. }, KSe = function(e, n, r, i, a) {
  22742. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22743. if (s) {
  22744. if (Kn(n) && !e.required)
  22745. return r();
  22746. Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  22747. }
  22748. r(o);
  22749. }, JSe = "enum", exe = function(e, n, r, i, a) {
  22750. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22751. if (s) {
  22752. if (Kn(n) && !e.required)
  22753. return r();
  22754. Mt.required(e, n, i, o, a), n !== void 0 && Mt[JSe](e, n, i, o, a);
  22755. }
  22756. r(o);
  22757. }, txe = function(e, n, r, i, a) {
  22758. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22759. if (s) {
  22760. if (Kn(n, "string") && !e.required)
  22761. return r();
  22762. Mt.required(e, n, i, o, a), Kn(n, "string") || Mt.pattern(e, n, i, o, a);
  22763. }
  22764. r(o);
  22765. }, nxe = function(e, n, r, i, a) {
  22766. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22767. if (s) {
  22768. if (Kn(n, "date") && !e.required)
  22769. return r();
  22770. if (Mt.required(e, n, i, o, a), !Kn(n, "date")) {
  22771. var l;
  22772. n instanceof Date ? l = n : l = new Date(n), Mt.type(e, l, i, o, a), l && Mt.range(e, l.getTime(), i, o, a);
  22773. }
  22774. }
  22775. r(o);
  22776. }, rxe = function(e, n, r, i, a) {
  22777. var o = [], s = Array.isArray(n) ? "array" : typeof n;
  22778. Mt.required(e, n, i, o, a, s), r(o);
  22779. }, wC = function(e, n, r, i, a) {
  22780. var o = e.type, s = [], l = e.required || !e.required && i.hasOwnProperty(e.field);
  22781. if (l) {
  22782. if (Kn(n, o) && !e.required)
  22783. return r();
  22784. Mt.required(e, n, i, s, a, o), Kn(n, o) || Mt.type(e, n, i, s, a);
  22785. }
  22786. r(s);
  22787. }, ixe = function(e, n, r, i, a) {
  22788. var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  22789. if (s) {
  22790. if (Kn(n) && !e.required)
  22791. return r();
  22792. Mt.required(e, n, i, o, a);
  22793. }
  22794. r(o);
  22795. }, fg = {
  22796. string: HSe,
  22797. method: GSe,
  22798. number: jSe,
  22799. boolean: ZSe,
  22800. regexp: USe,
  22801. integer: XSe,
  22802. float: YSe,
  22803. array: qSe,
  22804. object: KSe,
  22805. enum: exe,
  22806. pattern: txe,
  22807. date: nxe,
  22808. url: wC,
  22809. hex: wC,
  22810. email: wC,
  22811. required: rxe,
  22812. any: ixe
  22813. };
  22814. function W2() {
  22815. return {
  22816. default: "Validation error on field %s",
  22817. required: "%s is required",
  22818. enum: "%s must be one of %s",
  22819. whitespace: "%s cannot be empty",
  22820. date: {
  22821. format: "%s date %s is invalid for format %s",
  22822. parse: "%s date could not be parsed, %s is invalid ",
  22823. invalid: "%s date %s is invalid"
  22824. },
  22825. types: {
  22826. string: "%s is not a %s",
  22827. method: "%s is not a %s (function)",
  22828. array: "%s is not an %s",
  22829. object: "%s is not an %s",
  22830. number: "%s is not a %s",
  22831. date: "%s is not a %s",
  22832. boolean: "%s is not a %s",
  22833. integer: "%s is not an %s",
  22834. float: "%s is not a %s",
  22835. regexp: "%s is not a valid %s",
  22836. email: "%s is not a valid %s",
  22837. url: "%s is not a valid %s",
  22838. hex: "%s is not a valid %s"
  22839. },
  22840. string: {
  22841. len: "%s must be exactly %s characters",
  22842. min: "%s must be at least %s characters",
  22843. max: "%s cannot be longer than %s characters",
  22844. range: "%s must be between %s and %s characters"
  22845. },
  22846. number: {
  22847. len: "%s must equal %s",
  22848. min: "%s cannot be less than %s",
  22849. max: "%s cannot be greater than %s",
  22850. range: "%s must be between %s and %s"
  22851. },
  22852. array: {
  22853. len: "%s must be exactly %s in length",
  22854. min: "%s cannot be less than %s in length",
  22855. max: "%s cannot be greater than %s in length",
  22856. range: "%s must be between %s and %s in length"
  22857. },
  22858. pattern: {
  22859. mismatch: "%s value %s does not match pattern %s"
  22860. },
  22861. clone: function() {
  22862. var e = JSON.parse(JSON.stringify(this));
  22863. return e.clone = this.clone, e;
  22864. }
  22865. };
  22866. }
  22867. var Q2 = W2(), _0 = /* @__PURE__ */ function() {
  22868. function t(n) {
  22869. this.rules = null, this._messages = Q2, this.define(n);
  22870. }
  22871. var e = t.prototype;
  22872. return e.define = function(r) {
  22873. var i = this;
  22874. if (!r)
  22875. throw new Error("Cannot configure a schema with no rules");
  22876. if (typeof r != "object" || Array.isArray(r))
  22877. throw new Error("Rules must be an object");
  22878. this.rules = {}, Object.keys(r).forEach(function(a) {
  22879. var o = r[a];
  22880. i.rules[a] = Array.isArray(o) ? o : [o];
  22881. });
  22882. }, e.messages = function(r) {
  22883. return r && (this._messages = L5(W2(), r)), this._messages;
  22884. }, e.validate = function(r, i, a) {
  22885. var o = this;
  22886. i === void 0 && (i = {}), a === void 0 && (a = function() {
  22887. });
  22888. var s = r, l = i, u = a;
  22889. if (typeof l == "function" && (u = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
  22890. return u && u(null, s), Promise.resolve(s);
  22891. function c(v) {
  22892. var g = [], m = {};
  22893. function y(_) {
  22894. if (Array.isArray(_)) {
  22895. var O;
  22896. g = (O = g).concat.apply(O, _);
  22897. } else
  22898. g.push(_);
  22899. }
  22900. for (var b = 0; b < v.length; b++)
  22901. y(v[b]);
  22902. g.length ? (m = F2(g), u(g, m)) : u(null, s);
  22903. }
  22904. if (l.messages) {
  22905. var f = this.messages();
  22906. f === Q2 && (f = W2()), L5(f, l.messages), l.messages = f;
  22907. } else
  22908. l.messages = this.messages();
  22909. var d = {}, h = l.keys || Object.keys(this.rules);
  22910. h.forEach(function(v) {
  22911. var g = o.rules[v], m = s[v];
  22912. g.forEach(function(y) {
  22913. var b = y;
  22914. typeof b.transform == "function" && (s === r && (s = Ic({}, s)), m = s[v] = b.transform(m)), typeof b == "function" ? b = {
  22915. validator: b
  22916. } : b = Ic({}, b), b.validator = o.getValidationMethod(b), b.validator && (b.field = v, b.fullField = b.fullField || v, b.type = o.getType(b), d[v] = d[v] || [], d[v].push({
  22917. rule: b,
  22918. value: m,
  22919. source: s,
  22920. field: v
  22921. }));
  22922. });
  22923. });
  22924. var p = {};
  22925. return kSe(d, l, function(v, g) {
  22926. var m = v.rule, y = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
  22927. y = y && (m.required || !m.required && v.value), m.field = v.field;
  22928. function b(S, x) {
  22929. return Ic({}, x, {
  22930. fullField: m.fullField + "." + S,
  22931. fullFields: m.fullFields ? [].concat(m.fullFields, [S]) : [S]
  22932. });
  22933. }
  22934. function _(S) {
  22935. S === void 0 && (S = []);
  22936. var x = Array.isArray(S) ? S : [S];
  22937. !l.suppressWarning && x.length && t.warning("async-validator:", x), x.length && m.message !== void 0 && (x = [].concat(m.message));
  22938. var C = x.map(k5(m, s));
  22939. if (l.first && C.length)
  22940. return p[m.field] = 1, g(C);
  22941. if (!y)
  22942. g(C);
  22943. else {
  22944. if (m.required && !v.value)
  22945. return m.message !== void 0 ? C = [].concat(m.message).map(k5(m, s)) : l.error && (C = [l.error(m, zi(l.messages.required, m.field))]), g(C);
  22946. var T = {};
  22947. m.defaultField && Object.keys(v.value).map(function($) {
  22948. T[$] = m.defaultField;
  22949. }), T = Ic({}, T, v.rule.fields);
  22950. var w = {};
  22951. Object.keys(T).forEach(function($) {
  22952. var A = T[$], D = Array.isArray(A) ? A : [A];
  22953. w[$] = D.map(b.bind(null, $));
  22954. });
  22955. var P = new t(w);
  22956. P.messages(l.messages), v.rule.options && (v.rule.options.messages = l.messages, v.rule.options.error = l.error), P.validate(v.value, v.rule.options || l, function($) {
  22957. var A = [];
  22958. C && C.length && A.push.apply(A, C), $ && $.length && A.push.apply(A, $), g(A.length ? A : null);
  22959. });
  22960. }
  22961. }
  22962. var O;
  22963. if (m.asyncValidator)
  22964. O = m.asyncValidator(m, v.value, _, v.source, l);
  22965. else if (m.validator) {
  22966. try {
  22967. O = m.validator(m, v.value, _, v.source, l);
  22968. } catch (S) {
  22969. console.error == null || console.error(S), l.suppressValidatorError || setTimeout(function() {
  22970. throw S;
  22971. }, 0), _(S.message);
  22972. }
  22973. O === !0 ? _() : O === !1 ? _(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : O instanceof Array ? _(O) : O instanceof Error && _(O.message);
  22974. }
  22975. O && O.then && O.then(function() {
  22976. return _();
  22977. }, function(S) {
  22978. return _(S);
  22979. });
  22980. }, function(v) {
  22981. c(v);
  22982. }, s);
  22983. }, e.getType = function(r) {
  22984. if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !fg.hasOwnProperty(r.type))
  22985. throw new Error(zi("Unknown rule type %s", r.type));
  22986. return r.type || "string";
  22987. }, e.getValidationMethod = function(r) {
  22988. if (typeof r.validator == "function")
  22989. return r.validator;
  22990. var i = Object.keys(r), a = i.indexOf("message");
  22991. return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? fg.required : fg[this.getType(r)] || void 0;
  22992. }, t;
  22993. }();
  22994. _0.register = function(e, n) {
  22995. if (typeof n != "function")
  22996. throw new Error("Cannot register a validator by type, validator is not a function");
  22997. fg[e] = n;
  22998. };
  22999. _0.warning = mX;
  23000. _0.messages = Q2;
  23001. _0.validators = fg;
  23002. function Zl(t) {
  23003. return t == null ? [] : Array.isArray(t) ? t : [t];
  23004. }
  23005. function bX(t, e) {
  23006. let n = t;
  23007. for (let r = 0; r < e.length; r += 1) {
  23008. if (n == null)
  23009. return;
  23010. n = n[e[r]];
  23011. }
  23012. return n;
  23013. }
  23014. function _X(t, e, n, r) {
  23015. if (!e.length)
  23016. return n;
  23017. const [i, ...a] = e;
  23018. let o;
  23019. return !t && typeof i == "number" ? o = [] : Array.isArray(t) ? o = [...t] : o = I({}, t), r && n === void 0 && a.length === 1 ? delete o[i][a[0]] : o[i] = _X(o[i], a, n, r), o;
  23020. }
  23021. function axe(t, e, n) {
  23022. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  23023. return e.length && r && n === void 0 && !bX(t, e.slice(0, -1)) ? t : _X(t, e, n, r);
  23024. }
  23025. function H2(t) {
  23026. return Zl(t);
  23027. }
  23028. function oxe(t, e) {
  23029. return bX(t, e);
  23030. }
  23031. function sxe(t, e, n) {
  23032. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  23033. return axe(t, e, n, r);
  23034. }
  23035. function lxe(t, e) {
  23036. return t && t.some((n) => cxe(n, e));
  23037. }
  23038. function B5(t) {
  23039. return typeof t == "object" && t !== null && Object.getPrototypeOf(t) === Object.prototype;
  23040. }
  23041. function OX(t, e) {
  23042. const n = Array.isArray(t) ? [...t] : I({}, t);
  23043. return e && Object.keys(e).forEach((r) => {
  23044. const i = n[r], a = e[r], o = B5(i) && B5(a);
  23045. n[r] = o ? OX(i, a || {}) : a;
  23046. }), n;
  23047. }
  23048. function uxe(t) {
  23049. for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
  23050. n[r - 1] = arguments[r];
  23051. return n.reduce((i, a) => OX(i, a), t);
  23052. }
  23053. function z5(t, e) {
  23054. let n = {};
  23055. return e.forEach((r) => {
  23056. const i = oxe(t, r);
  23057. n = sxe(n, r, i);
  23058. }), n;
  23059. }
  23060. function cxe(t, e) {
  23061. return !t || !e || t.length !== e.length ? !1 : t.every((n, r) => e[r] === n);
  23062. }
  23063. const Pi = "'${name}' is not a valid ${type}", bx = {
  23064. default: "Validation error on field '${name}'",
  23065. required: "'${name}' is required",
  23066. enum: "'${name}' must be one of [${enum}]",
  23067. whitespace: "'${name}' cannot be empty",
  23068. date: {
  23069. format: "'${name}' is invalid for format date",
  23070. parse: "'${name}' could not be parsed as date",
  23071. invalid: "'${name}' is invalid date"
  23072. },
  23073. types: {
  23074. string: Pi,
  23075. method: Pi,
  23076. array: Pi,
  23077. object: Pi,
  23078. number: Pi,
  23079. date: Pi,
  23080. boolean: Pi,
  23081. integer: Pi,
  23082. float: Pi,
  23083. regexp: Pi,
  23084. email: Pi,
  23085. url: Pi,
  23086. hex: Pi
  23087. },
  23088. string: {
  23089. len: "'${name}' must be exactly ${len} characters",
  23090. min: "'${name}' must be at least ${min} characters",
  23091. max: "'${name}' cannot be longer than ${max} characters",
  23092. range: "'${name}' must be between ${min} and ${max} characters"
  23093. },
  23094. number: {
  23095. len: "'${name}' must equal ${len}",
  23096. min: "'${name}' cannot be less than ${min}",
  23097. max: "'${name}' cannot be greater than ${max}",
  23098. range: "'${name}' must be between ${min} and ${max}"
  23099. },
  23100. array: {
  23101. len: "'${name}' must be exactly ${len} in length",
  23102. min: "'${name}' cannot be less than ${min} in length",
  23103. max: "'${name}' cannot be greater than ${max} in length",
  23104. range: "'${name}' must be between ${min} and ${max} in length"
  23105. },
  23106. pattern: {
  23107. mismatch: "'${name}' does not match pattern ${pattern}"
  23108. }
  23109. };
  23110. var _x = function(t, e, n, r) {
  23111. function i(a) {
  23112. return a instanceof n ? a : new n(function(o) {
  23113. o(a);
  23114. });
  23115. }
  23116. return new (n || (n = Promise))(function(a, o) {
  23117. function s(c) {
  23118. try {
  23119. u(r.next(c));
  23120. } catch (f) {
  23121. o(f);
  23122. }
  23123. }
  23124. function l(c) {
  23125. try {
  23126. u(r.throw(c));
  23127. } catch (f) {
  23128. o(f);
  23129. }
  23130. }
  23131. function u(c) {
  23132. c.done ? a(c.value) : i(c.value).then(s, l);
  23133. }
  23134. u((r = r.apply(t, e || [])).next());
  23135. });
  23136. };
  23137. const fxe = _0;
  23138. function dxe(t, e) {
  23139. return t.replace(/\$\{\w+\}/g, (n) => {
  23140. const r = n.slice(2, -1);
  23141. return e[r];
  23142. });
  23143. }
  23144. function G2(t, e, n, r, i) {
  23145. return _x(this, void 0, void 0, function* () {
  23146. const a = I({}, n);
  23147. delete a.ruleIndex, delete a.trigger;
  23148. let o = null;
  23149. a && a.type === "array" && a.defaultField && (o = a.defaultField, delete a.defaultField);
  23150. const s = new fxe({
  23151. [t]: [a]
  23152. }), l = uxe({}, bx, r.validateMessages);
  23153. s.messages(l);
  23154. let u = [];
  23155. try {
  23156. yield Promise.resolve(s.validate({
  23157. [t]: e
  23158. }, I({}, r)));
  23159. } catch (d) {
  23160. d.errors ? u = d.errors.map((h, p) => {
  23161. let {
  23162. message: v
  23163. } = h;
  23164. return (
  23165. // Wrap VueNode with `key`
  23166. Ui(v) ? Ns(v, {
  23167. key: `error_${p}`
  23168. }) : v
  23169. );
  23170. }) : (console.error(d), u = [l.default()]);
  23171. }
  23172. if (!u.length && o)
  23173. return (yield Promise.all(e.map((h, p) => G2(`${t}.${p}`, h, o, r, i)))).reduce((h, p) => [...h, ...p], []);
  23174. const c = I(I(I({}, n), {
  23175. name: t,
  23176. enum: (n.enum || []).join(", ")
  23177. }), i);
  23178. return u.map((d) => typeof d == "string" ? dxe(d, c) : d);
  23179. });
  23180. }
  23181. function SX(t, e, n, r, i, a) {
  23182. const o = t.join("."), s = n.map((u, c) => {
  23183. const f = u.validator, d = I(I({}, u), {
  23184. ruleIndex: c
  23185. });
  23186. return f && (d.validator = (h, p, v) => {
  23187. let g = !1;
  23188. const y = f(h, p, function() {
  23189. for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
  23190. _[O] = arguments[O];
  23191. Promise.resolve().then(() => {
  23192. cf(!g, "Your validator function has already return a promise. `callback` will be ignored."), g || v(..._);
  23193. });
  23194. });
  23195. g = y && typeof y.then == "function" && typeof y.catch == "function", cf(g, "`callback` is deprecated. Please return a promise instead."), g && y.then(() => {
  23196. v();
  23197. }).catch((b) => {
  23198. v(b || " ");
  23199. });
  23200. }), d;
  23201. }).sort((u, c) => {
  23202. let {
  23203. warningOnly: f,
  23204. ruleIndex: d
  23205. } = u, {
  23206. warningOnly: h,
  23207. ruleIndex: p
  23208. } = c;
  23209. return !!f == !!h ? d - p : f ? 1 : -1;
  23210. });
  23211. let l;
  23212. if (i === !0)
  23213. l = new Promise((u, c) => _x(this, void 0, void 0, function* () {
  23214. for (let f = 0; f < s.length; f += 1) {
  23215. const d = s[f], h = yield G2(o, e, d, r, a);
  23216. if (h.length) {
  23217. c([{
  23218. errors: h,
  23219. rule: d
  23220. }]);
  23221. return;
  23222. }
  23223. }
  23224. u([]);
  23225. }));
  23226. else {
  23227. const u = s.map((c) => G2(o, e, c, r, a).then((f) => ({
  23228. errors: f,
  23229. rule: c
  23230. })));
  23231. l = (i ? pxe(u) : hxe(u)).then((c) => Promise.reject(c));
  23232. }
  23233. return l.catch((u) => u), l;
  23234. }
  23235. function hxe(t) {
  23236. return _x(this, void 0, void 0, function* () {
  23237. return Promise.all(t).then((e) => [].concat(...e));
  23238. });
  23239. }
  23240. function pxe(t) {
  23241. return _x(this, void 0, void 0, function* () {
  23242. let e = 0;
  23243. return new Promise((n) => {
  23244. t.forEach((r) => {
  23245. r.then((i) => {
  23246. i.errors.length && n([i]), e += 1, e === t.length && n([]);
  23247. });
  23248. });
  23249. });
  23250. });
  23251. }
  23252. const xX = Symbol("formContextKey"), wX = (t) => {
  23253. pt(xX, t);
  23254. }, cD = () => Ge(xX, {
  23255. name: L(() => {
  23256. }),
  23257. labelAlign: L(() => "right"),
  23258. vertical: L(() => !1),
  23259. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  23260. addField: (t, e) => {
  23261. },
  23262. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  23263. removeField: (t) => {
  23264. },
  23265. model: L(() => {
  23266. }),
  23267. rules: L(() => {
  23268. }),
  23269. colon: L(() => {
  23270. }),
  23271. labelWrap: L(() => {
  23272. }),
  23273. labelCol: L(() => {
  23274. }),
  23275. requiredMark: L(() => !1),
  23276. validateTrigger: L(() => {
  23277. }),
  23278. onValidate: () => {
  23279. },
  23280. validateMessages: L(() => bx)
  23281. }), CX = Symbol("formItemPrefixContextKey"), vxe = (t) => {
  23282. pt(CX, t);
  23283. }, gxe = () => Ge(CX, {
  23284. prefixCls: L(() => "")
  23285. });
  23286. function mxe(t) {
  23287. return typeof t == "number" ? `${t} ${t} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(t) ? `0 0 ${t}` : t;
  23288. }
  23289. const yxe = () => ({
  23290. span: [String, Number],
  23291. order: [String, Number],
  23292. offset: [String, Number],
  23293. push: [String, Number],
  23294. pull: [String, Number],
  23295. xs: {
  23296. type: [String, Number, Object],
  23297. default: void 0
  23298. },
  23299. sm: {
  23300. type: [String, Number, Object],
  23301. default: void 0
  23302. },
  23303. md: {
  23304. type: [String, Number, Object],
  23305. default: void 0
  23306. },
  23307. lg: {
  23308. type: [String, Number, Object],
  23309. default: void 0
  23310. },
  23311. xl: {
  23312. type: [String, Number, Object],
  23313. default: void 0
  23314. },
  23315. xxl: {
  23316. type: [String, Number, Object],
  23317. default: void 0
  23318. },
  23319. prefixCls: String,
  23320. flex: [String, Number]
  23321. }), bxe = ["xs", "sm", "md", "lg", "xl", "xxl"], TX = te({
  23322. compatConfig: {
  23323. MODE: 3
  23324. },
  23325. name: "ACol",
  23326. inheritAttrs: !1,
  23327. props: yxe(),
  23328. setup(t, e) {
  23329. let {
  23330. slots: n,
  23331. attrs: r
  23332. } = e;
  23333. const {
  23334. gutter: i,
  23335. supportFlexGap: a,
  23336. wrap: o
  23337. } = bSe(), {
  23338. prefixCls: s,
  23339. direction: l
  23340. } = It("col", t), [u, c] = CSe(s), f = L(() => {
  23341. const {
  23342. span: h,
  23343. order: p,
  23344. offset: v,
  23345. push: g,
  23346. pull: m
  23347. } = t, y = s.value;
  23348. let b = {};
  23349. return bxe.forEach((_) => {
  23350. let O = {};
  23351. const S = t[_];
  23352. typeof S == "number" ? O.span = S : typeof S == "object" && (O = S || {}), b = I(I({}, b), {
  23353. [`${y}-${_}-${O.span}`]: O.span !== void 0,
  23354. [`${y}-${_}-order-${O.order}`]: O.order || O.order === 0,
  23355. [`${y}-${_}-offset-${O.offset}`]: O.offset || O.offset === 0,
  23356. [`${y}-${_}-push-${O.push}`]: O.push || O.push === 0,
  23357. [`${y}-${_}-pull-${O.pull}`]: O.pull || O.pull === 0,
  23358. [`${y}-rtl`]: l.value === "rtl"
  23359. });
  23360. }), ye(y, {
  23361. [`${y}-${h}`]: h !== void 0,
  23362. [`${y}-order-${p}`]: p,
  23363. [`${y}-offset-${v}`]: v,
  23364. [`${y}-push-${g}`]: g,
  23365. [`${y}-pull-${m}`]: m
  23366. }, b, r.class, c.value);
  23367. }), d = L(() => {
  23368. const {
  23369. flex: h
  23370. } = t, p = i.value, v = {};
  23371. if (p && p[0] > 0) {
  23372. const g = `${p[0] / 2}px`;
  23373. v.paddingLeft = g, v.paddingRight = g;
  23374. }
  23375. if (p && p[1] > 0 && !a.value) {
  23376. const g = `${p[1] / 2}px`;
  23377. v.paddingTop = g, v.paddingBottom = g;
  23378. }
  23379. return h && (v.flex = mxe(h), o.value === !1 && !v.minWidth && (v.minWidth = 0)), v;
  23380. });
  23381. return () => {
  23382. var h;
  23383. return u(M("div", j(j({}, r), {}, {
  23384. class: f.value,
  23385. style: [d.value, r.style]
  23386. }), [(h = n.default) === null || h === void 0 ? void 0 : h.call(n)]));
  23387. };
  23388. }
  23389. });
  23390. var _xe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
  23391. function V5(t) {
  23392. for (var e = 1; e < arguments.length; e++) {
  23393. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  23394. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  23395. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  23396. }))), r.forEach(function(i) {
  23397. Oxe(t, i, n[i]);
  23398. });
  23399. }
  23400. return t;
  23401. }
  23402. function Oxe(t, e, n) {
  23403. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  23404. }
  23405. var fD = function(e, n) {
  23406. var r = V5({}, e, n.attrs);
  23407. return M(lt, V5({}, r, {
  23408. icon: _xe
  23409. }), null);
  23410. };
  23411. fD.displayName = "QuestionCircleOutlined";
  23412. fD.inheritAttrs = !1;
  23413. const dD = (t, e) => {
  23414. let {
  23415. slots: n,
  23416. emit: r,
  23417. attrs: i
  23418. } = e;
  23419. var a, o, s, l, u;
  23420. const {
  23421. prefixCls: c,
  23422. htmlFor: f,
  23423. labelCol: d,
  23424. labelAlign: h,
  23425. colon: p,
  23426. required: v,
  23427. requiredMark: g
  23428. } = I(I({}, t), i), [m] = RS("Form"), y = (a = t.label) !== null && a !== void 0 ? a : (o = n.label) === null || o === void 0 ? void 0 : o.call(n);
  23429. if (!y) return null;
  23430. const {
  23431. vertical: b,
  23432. labelAlign: _,
  23433. labelCol: O,
  23434. labelWrap: S,
  23435. colon: x
  23436. } = cD(), C = d || (O == null ? void 0 : O.value) || {}, T = h || (_ == null ? void 0 : _.value), w = `${c}-item-label`, P = ye(w, T === "left" && `${w}-left`, C.class, {
  23437. [`${w}-wrap`]: !!S.value
  23438. });
  23439. let $ = y;
  23440. const A = p === !0 || (x == null ? void 0 : x.value) !== !1 && p !== !1;
  23441. if (A && !b.value && typeof y == "string" && y.trim() !== "" && ($ = y.replace(/[:|:]\s*$/, "")), t.tooltip || n.tooltip) {
  23442. const R = M("span", {
  23443. class: `${c}-item-tooltip`
  23444. }, [M(dx, {
  23445. title: t.tooltip
  23446. }, {
  23447. default: () => [M(fD, null, null)]
  23448. })]);
  23449. $ = M(wt, null, [$, n.tooltip ? (s = n.tooltip) === null || s === void 0 ? void 0 : s.call(n, {
  23450. class: `${c}-item-tooltip`
  23451. }) : R]);
  23452. }
  23453. g === "optional" && !v && ($ = M(wt, null, [$, M("span", {
  23454. class: `${c}-item-optional`
  23455. }, [((l = m.value) === null || l === void 0 ? void 0 : l.optional) || ((u = zs.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  23456. const E = ye({
  23457. [`${c}-item-required`]: v,
  23458. [`${c}-item-required-mark-optional`]: g === "optional",
  23459. [`${c}-item-no-colon`]: !A
  23460. });
  23461. return M(TX, j(j({}, C), {}, {
  23462. class: P
  23463. }), {
  23464. default: () => [M("label", {
  23465. for: f,
  23466. class: E,
  23467. title: typeof y == "string" ? y : "",
  23468. onClick: (R) => r("click", R)
  23469. }, [$])]
  23470. });
  23471. };
  23472. dD.displayName = "FormItemLabel";
  23473. dD.inheritAttrs = !1;
  23474. const Sxe = (t) => {
  23475. const {
  23476. componentCls: e
  23477. } = t, n = `${e}-show-help`, r = `${e}-show-help-item`;
  23478. return {
  23479. [n]: {
  23480. // Explain holder
  23481. transition: `opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,
  23482. "&-appear, &-enter": {
  23483. opacity: 0,
  23484. "&-active": {
  23485. opacity: 1
  23486. }
  23487. },
  23488. "&-leave": {
  23489. opacity: 1,
  23490. "&-active": {
  23491. opacity: 0
  23492. }
  23493. },
  23494. // Explain
  23495. [r]: {
  23496. overflow: "hidden",
  23497. transition: `height ${t.motionDurationSlow} ${t.motionEaseInOut},
  23498. opacity ${t.motionDurationSlow} ${t.motionEaseInOut},
  23499. transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,
  23500. [`&${r}-appear, &${r}-enter`]: {
  23501. transform: "translateY(-5px)",
  23502. opacity: 0,
  23503. "&-active": {
  23504. transform: "translateY(0)",
  23505. opacity: 1
  23506. }
  23507. },
  23508. [`&${r}-leave-active`]: {
  23509. transform: "translateY(-5px)"
  23510. }
  23511. }
  23512. }
  23513. };
  23514. }, xxe = (t) => ({
  23515. legend: {
  23516. display: "block",
  23517. width: "100%",
  23518. marginBottom: t.marginLG,
  23519. padding: 0,
  23520. color: t.colorTextDescription,
  23521. fontSize: t.fontSizeLG,
  23522. lineHeight: "inherit",
  23523. border: 0,
  23524. borderBottom: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  23525. },
  23526. label: {
  23527. fontSize: t.fontSize
  23528. },
  23529. 'input[type="search"]': {
  23530. boxSizing: "border-box"
  23531. },
  23532. // Position radios and checkboxes better
  23533. 'input[type="radio"], input[type="checkbox"]': {
  23534. lineHeight: "normal"
  23535. },
  23536. 'input[type="file"]': {
  23537. display: "block"
  23538. },
  23539. // Make range inputs behave like textual form controls
  23540. 'input[type="range"]': {
  23541. display: "block",
  23542. width: "100%"
  23543. },
  23544. // Make multiple select elements height not fixed
  23545. "select[multiple], select[size]": {
  23546. height: "auto"
  23547. },
  23548. // Focus for file, radio, and checkbox
  23549. "input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
  23550. outline: 0,
  23551. boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`
  23552. },
  23553. // Adjust output element
  23554. output: {
  23555. display: "block",
  23556. paddingTop: 15,
  23557. color: t.colorText,
  23558. fontSize: t.fontSize,
  23559. lineHeight: t.lineHeight
  23560. }
  23561. }), F5 = (t, e) => {
  23562. const {
  23563. formItemCls: n
  23564. } = t;
  23565. return {
  23566. [n]: {
  23567. [`${n}-label > label`]: {
  23568. height: e
  23569. },
  23570. [`${n}-control-input`]: {
  23571. minHeight: e
  23572. }
  23573. }
  23574. };
  23575. }, wxe = (t) => {
  23576. const {
  23577. componentCls: e
  23578. } = t;
  23579. return {
  23580. [t.componentCls]: I(I(I({}, nn(t)), xxe(t)), {
  23581. [`${e}-text`]: {
  23582. display: "inline-block",
  23583. paddingInlineEnd: t.paddingSM
  23584. },
  23585. // ================================================================
  23586. // = Size =
  23587. // ================================================================
  23588. "&-small": I({}, F5(t, t.controlHeightSM)),
  23589. "&-large": I({}, F5(t, t.controlHeightLG))
  23590. })
  23591. };
  23592. }, Cxe = (t) => {
  23593. const {
  23594. formItemCls: e,
  23595. iconCls: n,
  23596. componentCls: r,
  23597. rootPrefixCls: i
  23598. } = t;
  23599. return {
  23600. [e]: I(I({}, nn(t)), {
  23601. marginBottom: t.marginLG,
  23602. verticalAlign: "top",
  23603. "&-with-help": {
  23604. transition: "none"
  23605. },
  23606. [`&-hidden,
  23607. &-hidden.${i}-row`]: {
  23608. // https://github.com/ant-design/ant-design/issues/26141
  23609. display: "none"
  23610. },
  23611. "&-has-warning": {
  23612. [`${e}-split`]: {
  23613. color: t.colorError
  23614. }
  23615. },
  23616. "&-has-error": {
  23617. [`${e}-split`]: {
  23618. color: t.colorWarning
  23619. }
  23620. },
  23621. // ==============================================================
  23622. // = Label =
  23623. // ==============================================================
  23624. [`${e}-label`]: {
  23625. display: "inline-block",
  23626. flexGrow: 0,
  23627. overflow: "hidden",
  23628. whiteSpace: "nowrap",
  23629. textAlign: "end",
  23630. verticalAlign: "middle",
  23631. "&-left": {
  23632. textAlign: "start"
  23633. },
  23634. "&-wrap": {
  23635. overflow: "unset",
  23636. lineHeight: `${t.lineHeight} - 0.25em`,
  23637. whiteSpace: "unset"
  23638. },
  23639. "> label": {
  23640. position: "relative",
  23641. display: "inline-flex",
  23642. alignItems: "center",
  23643. maxWidth: "100%",
  23644. height: t.controlHeight,
  23645. color: t.colorTextHeading,
  23646. fontSize: t.fontSize,
  23647. [`> ${n}`]: {
  23648. fontSize: t.fontSize,
  23649. verticalAlign: "top"
  23650. },
  23651. // Required mark
  23652. [`&${e}-required:not(${e}-required-mark-optional)::before`]: {
  23653. display: "inline-block",
  23654. marginInlineEnd: t.marginXXS,
  23655. color: t.colorError,
  23656. fontSize: t.fontSize,
  23657. fontFamily: "SimSun, sans-serif",
  23658. lineHeight: 1,
  23659. content: '"*"',
  23660. [`${r}-hide-required-mark &`]: {
  23661. display: "none"
  23662. }
  23663. },
  23664. // Optional mark
  23665. [`${e}-optional`]: {
  23666. display: "inline-block",
  23667. marginInlineStart: t.marginXXS,
  23668. color: t.colorTextDescription,
  23669. [`${r}-hide-required-mark &`]: {
  23670. display: "none"
  23671. }
  23672. },
  23673. // Optional mark
  23674. [`${e}-tooltip`]: {
  23675. color: t.colorTextDescription,
  23676. cursor: "help",
  23677. writingMode: "horizontal-tb",
  23678. marginInlineStart: t.marginXXS
  23679. },
  23680. "&::after": {
  23681. content: '":"',
  23682. position: "relative",
  23683. marginBlock: 0,
  23684. marginInlineStart: t.marginXXS / 2,
  23685. marginInlineEnd: t.marginXS
  23686. },
  23687. [`&${e}-no-colon::after`]: {
  23688. content: '" "'
  23689. }
  23690. }
  23691. },
  23692. // ==============================================================
  23693. // = Input =
  23694. // ==============================================================
  23695. [`${e}-control`]: {
  23696. display: "flex",
  23697. flexDirection: "column",
  23698. flexGrow: 1,
  23699. [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
  23700. width: "100%"
  23701. },
  23702. "&-input": {
  23703. position: "relative",
  23704. display: "flex",
  23705. alignItems: "center",
  23706. minHeight: t.controlHeight,
  23707. "&-content": {
  23708. flex: "auto",
  23709. maxWidth: "100%"
  23710. }
  23711. }
  23712. },
  23713. // ==============================================================
  23714. // = Explain =
  23715. // ==============================================================
  23716. [e]: {
  23717. "&-explain, &-extra": {
  23718. clear: "both",
  23719. color: t.colorTextDescription,
  23720. fontSize: t.fontSize,
  23721. lineHeight: t.lineHeight
  23722. },
  23723. "&-explain-connected": {
  23724. width: "100%"
  23725. },
  23726. "&-extra": {
  23727. minHeight: t.controlHeightSM,
  23728. transition: `color ${t.motionDurationMid} ${t.motionEaseOut}`
  23729. // sync input color transition
  23730. },
  23731. "&-explain": {
  23732. "&-error": {
  23733. color: t.colorError
  23734. },
  23735. "&-warning": {
  23736. color: t.colorWarning
  23737. }
  23738. }
  23739. },
  23740. [`&-with-help ${e}-explain`]: {
  23741. height: "auto",
  23742. opacity: 1
  23743. },
  23744. // ==============================================================
  23745. // = Feedback Icon =
  23746. // ==============================================================
  23747. [`${e}-feedback-icon`]: {
  23748. fontSize: t.fontSize,
  23749. textAlign: "center",
  23750. visibility: "visible",
  23751. animationName: qI,
  23752. animationDuration: t.motionDurationMid,
  23753. animationTimingFunction: t.motionEaseOutBack,
  23754. pointerEvents: "none",
  23755. "&-success": {
  23756. color: t.colorSuccess
  23757. },
  23758. "&-error": {
  23759. color: t.colorError
  23760. },
  23761. "&-warning": {
  23762. color: t.colorWarning
  23763. },
  23764. "&-validating": {
  23765. color: t.colorPrimary
  23766. }
  23767. }
  23768. })
  23769. };
  23770. }, Txe = (t) => {
  23771. const {
  23772. componentCls: e,
  23773. formItemCls: n,
  23774. rootPrefixCls: r
  23775. } = t;
  23776. return {
  23777. [`${e}-horizontal`]: {
  23778. [`${n}-label`]: {
  23779. flexGrow: 0
  23780. },
  23781. [`${n}-control`]: {
  23782. flex: "1 1 0",
  23783. // https://github.com/ant-design/ant-design/issues/32777
  23784. // https://github.com/ant-design/ant-design/issues/33773
  23785. minWidth: 0
  23786. },
  23787. // https://github.com/ant-design/ant-design/issues/32980
  23788. [`${n}-label.${r}-col-24 + ${n}-control`]: {
  23789. minWidth: "unset"
  23790. }
  23791. }
  23792. };
  23793. }, Pxe = (t) => {
  23794. const {
  23795. componentCls: e,
  23796. formItemCls: n
  23797. } = t;
  23798. return {
  23799. [`${e}-inline`]: {
  23800. display: "flex",
  23801. flexWrap: "wrap",
  23802. [n]: {
  23803. flex: "none",
  23804. flexWrap: "nowrap",
  23805. marginInlineEnd: t.margin,
  23806. marginBottom: 0,
  23807. "&-with-help": {
  23808. marginBottom: t.marginLG
  23809. },
  23810. [`> ${n}-label,
  23811. > ${n}-control`]: {
  23812. display: "inline-block",
  23813. verticalAlign: "top"
  23814. },
  23815. [`> ${n}-label`]: {
  23816. flex: "none"
  23817. },
  23818. [`${e}-text`]: {
  23819. display: "inline-block"
  23820. },
  23821. [`${n}-has-feedback`]: {
  23822. display: "inline-block"
  23823. }
  23824. }
  23825. }
  23826. };
  23827. }, Td = (t) => ({
  23828. margin: 0,
  23829. padding: `0 0 ${t.paddingXS}px`,
  23830. whiteSpace: "initial",
  23831. textAlign: "start",
  23832. "> label": {
  23833. margin: 0,
  23834. "&::after": {
  23835. display: "none"
  23836. }
  23837. }
  23838. }), $xe = (t) => {
  23839. const {
  23840. componentCls: e,
  23841. formItemCls: n
  23842. } = t;
  23843. return {
  23844. [`${n} ${n}-label`]: Td(t),
  23845. [e]: {
  23846. [n]: {
  23847. flexWrap: "wrap",
  23848. [`${n}-label,
  23849. ${n}-control`]: {
  23850. flex: "0 0 100%",
  23851. maxWidth: "100%"
  23852. }
  23853. }
  23854. }
  23855. };
  23856. }, Axe = (t) => {
  23857. const {
  23858. componentCls: e,
  23859. formItemCls: n,
  23860. rootPrefixCls: r
  23861. } = t;
  23862. return {
  23863. [`${e}-vertical`]: {
  23864. [n]: {
  23865. "&-row": {
  23866. flexDirection: "column"
  23867. },
  23868. "&-label > label": {
  23869. height: "auto"
  23870. },
  23871. [`${e}-item-control`]: {
  23872. width: "100%"
  23873. }
  23874. }
  23875. },
  23876. [`${e}-vertical ${n}-label,
  23877. .${r}-col-24${n}-label,
  23878. .${r}-col-xl-24${n}-label`]: Td(t),
  23879. [`@media (max-width: ${t.screenXSMax}px)`]: [$xe(t), {
  23880. [e]: {
  23881. [`.${r}-col-xs-24${n}-label`]: Td(t)
  23882. }
  23883. }],
  23884. [`@media (max-width: ${t.screenSMMax}px)`]: {
  23885. [e]: {
  23886. [`.${r}-col-sm-24${n}-label`]: Td(t)
  23887. }
  23888. },
  23889. [`@media (max-width: ${t.screenMDMax}px)`]: {
  23890. [e]: {
  23891. [`.${r}-col-md-24${n}-label`]: Td(t)
  23892. }
  23893. },
  23894. [`@media (max-width: ${t.screenLGMax}px)`]: {
  23895. [e]: {
  23896. [`.${r}-col-lg-24${n}-label`]: Td(t)
  23897. }
  23898. }
  23899. };
  23900. }, hD = Sn("Form", (t, e) => {
  23901. let {
  23902. rootPrefixCls: n
  23903. } = e;
  23904. const r = Bt(t, {
  23905. formItemCls: `${t.componentCls}-item`,
  23906. rootPrefixCls: n
  23907. });
  23908. return [wxe(r), Cxe(r), Sxe(r), Txe(r), Pxe(r), Axe(r), KI(r), qI];
  23909. }), Exe = te({
  23910. compatConfig: {
  23911. MODE: 3
  23912. },
  23913. name: "ErrorList",
  23914. inheritAttrs: !1,
  23915. props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  23916. setup(t, e) {
  23917. let {
  23918. attrs: n
  23919. } = e;
  23920. const {
  23921. prefixCls: r,
  23922. status: i
  23923. } = gxe(), a = L(() => `${r.value}-item-explain`), o = L(() => !!(t.errors && t.errors.length)), s = U(i.value), [, l] = hD(r);
  23924. return se([o, i], () => {
  23925. o.value && (s.value = i.value);
  23926. }), () => {
  23927. var u, c;
  23928. const f = sD(`${r.value}-show-help-item`), d = wI(`${r.value}-show-help-item`, f);
  23929. return d.role = "alert", d.class = [l.value, a.value, n.class, `${r.value}-show-help`], M(co, j(j({}, g0(`${r.value}-show-help`)), {}, {
  23930. onAfterEnter: () => t.onErrorVisibleChanged(!0),
  23931. onAfterLeave: () => t.onErrorVisibleChanged(!1)
  23932. }), {
  23933. default: () => [bi(M(JM, j(j({}, d), {}, {
  23934. tag: "div"
  23935. }), {
  23936. default: () => [(c = t.errors) === null || c === void 0 ? void 0 : c.map((h, p) => M("div", {
  23937. key: p,
  23938. class: s.value ? `${a.value}-${s.value}` : ""
  23939. }, [h]))]
  23940. }), [[Bs, !!(!((u = t.errors) === null || u === void 0) && u.length)]])]
  23941. });
  23942. };
  23943. }
  23944. }), Mxe = te({
  23945. compatConfig: {
  23946. MODE: 3
  23947. },
  23948. slots: Object,
  23949. inheritAttrs: !1,
  23950. props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  23951. setup(t, e) {
  23952. let {
  23953. slots: n
  23954. } = e;
  23955. const r = cD(), {
  23956. wrapperCol: i
  23957. } = r, a = I({}, r);
  23958. return delete a.labelCol, delete a.wrapperCol, wX(a), vxe({
  23959. prefixCls: L(() => t.prefixCls),
  23960. status: L(() => t.status)
  23961. }), () => {
  23962. var o, s, l;
  23963. const {
  23964. prefixCls: u,
  23965. wrapperCol: c,
  23966. marginBottom: f,
  23967. onErrorVisibleChanged: d,
  23968. help: h = (o = n.help) === null || o === void 0 ? void 0 : o.call(n),
  23969. errors: p = os((s = n.errors) === null || s === void 0 ? void 0 : s.call(n)),
  23970. // hasFeedback,
  23971. // status,
  23972. extra: v = (l = n.extra) === null || l === void 0 ? void 0 : l.call(n)
  23973. } = t, g = `${u}-item`, m = c || (i == null ? void 0 : i.value) || {}, y = ye(`${g}-control`, m.class);
  23974. return M(TX, j(j({}, m), {}, {
  23975. class: y
  23976. }), {
  23977. default: () => {
  23978. var b;
  23979. return M(wt, null, [M("div", {
  23980. class: `${g}-control-input`
  23981. }, [M("div", {
  23982. class: `${g}-control-input-content`
  23983. }, [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)])]), f !== null || p.length ? M("div", {
  23984. style: {
  23985. display: "flex",
  23986. flexWrap: "nowrap"
  23987. }
  23988. }, [M(Exe, {
  23989. errors: p,
  23990. help: h,
  23991. class: `${g}-explain-connected`,
  23992. onErrorVisibleChanged: d
  23993. }, null), !!f && M("div", {
  23994. style: {
  23995. width: 0,
  23996. height: `${f}px`
  23997. }
  23998. }, null)]) : null, v ? M("div", {
  23999. class: `${g}-extra`
  24000. }, [v]) : null]);
  24001. }
  24002. });
  24003. };
  24004. }
  24005. });
  24006. function Ixe(t) {
  24007. const e = ae(t.value.slice());
  24008. let n = null;
  24009. return ht(() => {
  24010. clearTimeout(n), n = setTimeout(() => {
  24011. e.value = t.value;
  24012. }, t.value.length ? 0 : 10);
  24013. }), e;
  24014. }
  24015. ru("success", "warning", "error", "validating", "");
  24016. const Dxe = {
  24017. success: Ou,
  24018. warning: Su,
  24019. error: Da,
  24020. validating: ts
  24021. };
  24022. function CC(t, e, n) {
  24023. let r = t;
  24024. const i = e;
  24025. let a = 0;
  24026. try {
  24027. for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
  24028. const s = i[a];
  24029. if (s in r)
  24030. r = r[s];
  24031. else {
  24032. if (n)
  24033. throw Error("please transfer a valid name path to form item!");
  24034. break;
  24035. }
  24036. }
  24037. if (n && !r)
  24038. throw Error("please transfer a valid name path to form item!");
  24039. } catch {
  24040. console.error("please transfer a valid name path to form item!");
  24041. }
  24042. return {
  24043. o: r,
  24044. k: i[a],
  24045. v: r ? r[i[a]] : void 0
  24046. };
  24047. }
  24048. const Rxe = () => ({
  24049. htmlFor: String,
  24050. prefixCls: String,
  24051. label: Y.any,
  24052. help: Y.any,
  24053. extra: Y.any,
  24054. labelCol: {
  24055. type: Object
  24056. },
  24057. wrapperCol: {
  24058. type: Object
  24059. },
  24060. hasFeedback: {
  24061. type: Boolean,
  24062. default: !1
  24063. },
  24064. colon: {
  24065. type: Boolean,
  24066. default: void 0
  24067. },
  24068. labelAlign: String,
  24069. prop: {
  24070. type: [String, Number, Array]
  24071. },
  24072. name: {
  24073. type: [String, Number, Array]
  24074. },
  24075. rules: [Array, Object],
  24076. autoLink: {
  24077. type: Boolean,
  24078. default: !0
  24079. },
  24080. required: {
  24081. type: Boolean,
  24082. default: void 0
  24083. },
  24084. validateFirst: {
  24085. type: Boolean,
  24086. default: void 0
  24087. },
  24088. validateStatus: Y.oneOf(ru("", "success", "warning", "error", "validating")),
  24089. validateTrigger: {
  24090. type: [String, Array]
  24091. },
  24092. messageVariables: {
  24093. type: Object
  24094. },
  24095. hidden: Boolean,
  24096. noStyle: Boolean,
  24097. tooltip: String
  24098. });
  24099. let kxe = 0;
  24100. const Lxe = "form_item", PX = te({
  24101. compatConfig: {
  24102. MODE: 3
  24103. },
  24104. name: "AFormItem",
  24105. inheritAttrs: !1,
  24106. __ANT_NEW_FORM_ITEM: !0,
  24107. props: Rxe(),
  24108. slots: Object,
  24109. setup(t, e) {
  24110. let {
  24111. slots: n,
  24112. attrs: r,
  24113. expose: i
  24114. } = e;
  24115. cf(t.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
  24116. const a = `form-item-${++kxe}`, {
  24117. prefixCls: o
  24118. } = It("form", t), [s, l] = hD(o), u = ae(), c = cD(), f = L(() => t.name || t.prop), d = ae([]), h = ae(!1), p = ae(), v = L(() => {
  24119. const ee = f.value;
  24120. return H2(ee);
  24121. }), g = L(() => {
  24122. if (v.value.length) {
  24123. const ee = c.name.value, oe = v.value.join("_");
  24124. return ee ? `${ee}_${oe}` : `${Lxe}_${oe}`;
  24125. } else
  24126. return;
  24127. }), m = () => {
  24128. const ee = c.model.value;
  24129. if (!(!ee || !f.value))
  24130. return CC(ee, v.value, !0).v;
  24131. }, y = L(() => m()), b = ae(Zc(y.value)), _ = L(() => {
  24132. let ee = t.validateTrigger !== void 0 ? t.validateTrigger : c.validateTrigger.value;
  24133. return ee = ee === void 0 ? "change" : ee, Zl(ee);
  24134. }), O = L(() => {
  24135. let ee = c.rules.value;
  24136. const oe = t.rules, K = t.required !== void 0 ? {
  24137. required: !!t.required,
  24138. trigger: _.value
  24139. } : [], ie = CC(ee, v.value);
  24140. ee = ee ? ie.o[ie.k] || ie.v : [];
  24141. const X = [].concat(oe || ee || []);
  24142. return mbe(X, (H) => H.required) ? X : X.concat(K);
  24143. }), S = L(() => {
  24144. const ee = O.value;
  24145. let oe = !1;
  24146. return ee && ee.length && ee.every((K) => K.required ? (oe = !0, !1) : !0), oe || t.required;
  24147. }), x = ae();
  24148. ht(() => {
  24149. x.value = t.validateStatus;
  24150. });
  24151. const C = L(() => {
  24152. let ee = {};
  24153. return typeof t.label == "string" ? ee.label = t.label : t.name && (ee.label = String(t.name)), t.messageVariables && (ee = I(I({}, ee), t.messageVariables)), ee;
  24154. }), T = (ee) => {
  24155. if (v.value.length === 0)
  24156. return;
  24157. const {
  24158. validateFirst: oe = !1
  24159. } = t, {
  24160. triggerName: K
  24161. } = ee || {};
  24162. let ie = O.value;
  24163. if (K && (ie = ie.filter((H) => {
  24164. const {
  24165. trigger: G
  24166. } = H;
  24167. return !G && !_.value.length ? !0 : Zl(G || _.value).includes(K);
  24168. })), !ie.length)
  24169. return Promise.resolve();
  24170. const X = SX(v.value, y.value, ie, I({
  24171. validateMessages: c.validateMessages.value
  24172. }, ee), oe, C.value);
  24173. return x.value = "validating", d.value = [], X.catch((H) => H).then(function() {
  24174. let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  24175. if (x.value === "validating") {
  24176. const G = H.filter((re) => re && re.errors.length);
  24177. x.value = G.length ? "error" : "success", d.value = G.map((re) => re.errors), c.onValidate(f.value, !d.value.length, d.value.length ? qo(d.value[0]) : null);
  24178. }
  24179. }), X;
  24180. }, w = () => {
  24181. T({
  24182. triggerName: "blur"
  24183. });
  24184. }, P = () => {
  24185. if (h.value) {
  24186. h.value = !1;
  24187. return;
  24188. }
  24189. T({
  24190. triggerName: "change"
  24191. });
  24192. }, $ = () => {
  24193. x.value = t.validateStatus, h.value = !1, d.value = [];
  24194. }, A = () => {
  24195. var ee;
  24196. x.value = t.validateStatus, h.value = !0, d.value = [];
  24197. const oe = c.model.value || {}, K = y.value, ie = CC(oe, v.value, !0);
  24198. Array.isArray(K) ? ie.o[ie.k] = [].concat((ee = b.value) !== null && ee !== void 0 ? ee : []) : ie.o[ie.k] = b.value, Tt(() => {
  24199. h.value = !1;
  24200. });
  24201. }, D = L(() => t.htmlFor === void 0 ? g.value : t.htmlFor), E = () => {
  24202. const ee = D.value;
  24203. if (!ee || !p.value)
  24204. return;
  24205. const oe = p.value.$el.querySelector(`[id="${ee}"]`);
  24206. oe && oe.focus && oe.focus();
  24207. };
  24208. i({
  24209. onFieldBlur: w,
  24210. onFieldChange: P,
  24211. clearValidate: $,
  24212. resetField: A
  24213. }), Mme({
  24214. id: g,
  24215. onFieldBlur: () => {
  24216. t.autoLink && w();
  24217. },
  24218. onFieldChange: () => {
  24219. t.autoLink && P();
  24220. },
  24221. clearValidate: $
  24222. }, L(() => !!(t.autoLink && c.model.value && f.value)));
  24223. let R = !1;
  24224. se(f, (ee) => {
  24225. ee ? R || (R = !0, c.addField(a, {
  24226. fieldValue: y,
  24227. fieldId: g,
  24228. fieldName: f,
  24229. resetField: A,
  24230. clearValidate: $,
  24231. namePath: v,
  24232. validateRules: T,
  24233. rules: O
  24234. })) : (R = !1, c.removeField(a));
  24235. }, {
  24236. immediate: !0
  24237. }), yt(() => {
  24238. c.removeField(a);
  24239. });
  24240. const N = Ixe(d), V = L(() => t.validateStatus !== void 0 ? t.validateStatus : N.value.length ? "error" : x.value), z = L(() => ({
  24241. [`${o.value}-item`]: !0,
  24242. [l.value]: !0,
  24243. // Status
  24244. [`${o.value}-item-has-feedback`]: V.value && t.hasFeedback,
  24245. [`${o.value}-item-has-success`]: V.value === "success",
  24246. [`${o.value}-item-has-warning`]: V.value === "warning",
  24247. [`${o.value}-item-has-error`]: V.value === "error",
  24248. [`${o.value}-item-is-validating`]: V.value === "validating",
  24249. [`${o.value}-item-hidden`]: t.hidden
  24250. })), W = tn({});
  24251. ro.useProvide(W), ht(() => {
  24252. let ee;
  24253. if (t.hasFeedback) {
  24254. const oe = V.value && Dxe[V.value];
  24255. ee = oe ? M("span", {
  24256. class: ye(`${o.value}-item-feedback-icon`, `${o.value}-item-feedback-icon-${V.value}`)
  24257. }, [M(oe, null, null)]) : null;
  24258. }
  24259. I(W, {
  24260. status: V.value,
  24261. hasFeedback: t.hasFeedback,
  24262. feedbackIcon: ee,
  24263. isFormItemInput: !0
  24264. });
  24265. });
  24266. const F = ae(null), Q = ae(!1), Z = () => {
  24267. if (u.value) {
  24268. const ee = getComputedStyle(u.value);
  24269. F.value = parseInt(ee.marginBottom, 10);
  24270. }
  24271. };
  24272. it(() => {
  24273. se(Q, () => {
  24274. Q.value && Z();
  24275. }, {
  24276. flush: "post",
  24277. immediate: !0
  24278. });
  24279. });
  24280. const ne = (ee) => {
  24281. ee || (F.value = null);
  24282. };
  24283. return () => {
  24284. var ee, oe;
  24285. if (t.noStyle) return (ee = n.default) === null || ee === void 0 ? void 0 : ee.call(n);
  24286. const K = (oe = t.help) !== null && oe !== void 0 ? oe : n.help ? os(n.help()) : null, ie = !!(K != null && Array.isArray(K) && K.length || N.value.length);
  24287. return Q.value = ie, s(M("div", {
  24288. class: [z.value, ie ? `${o.value}-item-with-help` : "", r.class],
  24289. ref: u
  24290. }, [M(PSe, j(j({}, r), {}, {
  24291. class: `${o.value}-item-row`,
  24292. key: "row"
  24293. }), {
  24294. default: () => {
  24295. var X, H;
  24296. return M(wt, null, [M(dD, j(j({}, t), {}, {
  24297. htmlFor: D.value,
  24298. required: S.value,
  24299. requiredMark: c.requiredMark.value,
  24300. prefixCls: o.value,
  24301. onClick: E,
  24302. label: t.label
  24303. }), {
  24304. label: n.label,
  24305. tooltip: n.tooltip
  24306. }), M(Mxe, j(j({}, t), {}, {
  24307. errors: K != null ? Zl(K) : N.value,
  24308. marginBottom: F.value,
  24309. prefixCls: o.value,
  24310. status: V.value,
  24311. ref: p,
  24312. help: K,
  24313. extra: (X = t.extra) !== null && X !== void 0 ? X : (H = n.extra) === null || H === void 0 ? void 0 : H.call(n),
  24314. onErrorVisibleChanged: ne
  24315. }), {
  24316. default: n.default
  24317. })]);
  24318. }
  24319. }), !!F.value && M("div", {
  24320. class: `${o.value}-margin-offset`,
  24321. style: {
  24322. marginBottom: `-${F.value}px`
  24323. }
  24324. }, null)]));
  24325. };
  24326. }
  24327. });
  24328. function $X(t) {
  24329. let e = !1, n = t.length;
  24330. const r = [];
  24331. return t.length ? new Promise((i, a) => {
  24332. t.forEach((o, s) => {
  24333. o.catch((l) => (e = !0, l)).then((l) => {
  24334. n -= 1, r[s] = l, !(n > 0) && (e && a(r), i(r));
  24335. });
  24336. });
  24337. }) : Promise.resolve([]);
  24338. }
  24339. function W5(t) {
  24340. let e = !1;
  24341. return t && t.length && t.every((n) => n.required ? (e = !0, !1) : !0), e;
  24342. }
  24343. function Q5(t) {
  24344. return t == null ? [] : Array.isArray(t) ? t : [t];
  24345. }
  24346. function TC(t, e, n) {
  24347. let r = t;
  24348. e = e.replace(/\[(\w+)\]/g, ".$1"), e = e.replace(/^\./, "");
  24349. const i = e.split(".");
  24350. let a = 0;
  24351. for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
  24352. const s = i[a];
  24353. if (s in r)
  24354. r = r[s];
  24355. else {
  24356. if (n)
  24357. throw new Error("please transfer a valid name path to validate!");
  24358. break;
  24359. }
  24360. }
  24361. return {
  24362. o: r,
  24363. k: i[a],
  24364. v: r ? r[i[a]] : null,
  24365. isValid: r && i[a] in r
  24366. };
  24367. }
  24368. function Nxe(t) {
  24369. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : U({}), n = arguments.length > 2 ? arguments[2] : void 0;
  24370. const r = Zc(B(t)), i = tn({}), a = ae([]), o = (b) => {
  24371. I(B(t), I(I({}, Zc(r)), b)), Tt(() => {
  24372. Object.keys(i).forEach((_) => {
  24373. i[_] = {
  24374. autoLink: !1,
  24375. required: W5(B(e)[_])
  24376. };
  24377. });
  24378. });
  24379. }, s = function() {
  24380. let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], _ = arguments.length > 1 ? arguments[1] : void 0;
  24381. return _.length ? b.filter((O) => {
  24382. const S = Q5(O.trigger || "change");
  24383. return Obe(S, _).length;
  24384. }) : b;
  24385. };
  24386. let l = null;
  24387. const u = function(b) {
  24388. let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = arguments.length > 2 ? arguments[2] : void 0;
  24389. const S = [], x = {};
  24390. for (let w = 0; w < b.length; w++) {
  24391. const P = b[w], $ = TC(B(t), P, O);
  24392. if (!$.isValid) continue;
  24393. x[P] = $.v;
  24394. const A = s(B(e)[P], Q5(_ && _.trigger));
  24395. A.length && S.push(c(P, $.v, A, _ || {}).then(() => ({
  24396. name: P,
  24397. errors: [],
  24398. warnings: []
  24399. })).catch((D) => {
  24400. const E = [], R = [];
  24401. return D.forEach((N) => {
  24402. let {
  24403. rule: {
  24404. warningOnly: V
  24405. },
  24406. errors: z
  24407. } = N;
  24408. V ? R.push(...z) : E.push(...z);
  24409. }), E.length ? Promise.reject({
  24410. name: P,
  24411. errors: E,
  24412. warnings: R
  24413. }) : {
  24414. name: P,
  24415. errors: E,
  24416. warnings: R
  24417. };
  24418. }));
  24419. }
  24420. const C = $X(S);
  24421. l = C;
  24422. const T = C.then(() => l === C ? Promise.resolve(x) : Promise.reject([])).catch((w) => {
  24423. const P = w.filter(($) => $ && $.errors.length);
  24424. return P.length ? Promise.reject({
  24425. values: x,
  24426. errorFields: P,
  24427. outOfDate: l !== C
  24428. }) : Promise.resolve(x);
  24429. });
  24430. return T.catch((w) => w), T;
  24431. }, c = function(b, _, O) {
  24432. let S = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
  24433. const x = SX([b], _, O, I({
  24434. validateMessages: bx
  24435. }, S), !!S.validateFirst);
  24436. return i[b] ? (i[b].validateStatus = "validating", x.catch((C) => C).then(function() {
  24437. let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  24438. var T;
  24439. if (i[b].validateStatus === "validating") {
  24440. const w = C.filter((P) => P && P.errors.length);
  24441. i[b].validateStatus = w.length ? "error" : "success", i[b].help = w.length ? w.map((P) => P.errors) : null, (T = n == null ? void 0 : n.onValidate) === null || T === void 0 || T.call(n, b, !w.length, w.length ? qo(i[b].help[0]) : null);
  24442. }
  24443. }), x) : x.catch((C) => C);
  24444. }, f = (b, _) => {
  24445. let O = [], S = !0;
  24446. b ? Array.isArray(b) ? O = b : O = [b] : (S = !1, O = a.value);
  24447. const x = u(O, _ || {}, S);
  24448. return x.catch((C) => C), x;
  24449. }, d = (b) => {
  24450. let _ = [];
  24451. b ? Array.isArray(b) ? _ = b : _ = [b] : _ = a.value, _.forEach((O) => {
  24452. i[O] && I(i[O], {
  24453. validateStatus: "",
  24454. help: null
  24455. });
  24456. });
  24457. }, h = (b) => {
  24458. const _ = {
  24459. autoLink: !1
  24460. }, O = [], S = Array.isArray(b) ? b : [b];
  24461. for (let x = 0; x < S.length; x++) {
  24462. const C = S[x];
  24463. (C == null ? void 0 : C.validateStatus) === "error" && (_.validateStatus = "error", C.help && O.push(C.help)), _.required = _.required || (C == null ? void 0 : C.required);
  24464. }
  24465. return _.help = O, _;
  24466. };
  24467. let p = r, v = !0;
  24468. const g = (b) => {
  24469. const _ = [];
  24470. a.value.forEach((O) => {
  24471. const S = TC(b, O, !1), x = TC(p, O, !1);
  24472. (v && (n == null ? void 0 : n.immediate) && S.isValid || !YS(S.v, x.v)) && _.push(O);
  24473. }), f(_, {
  24474. trigger: "change"
  24475. }), v = !1, p = Zc(qo(b));
  24476. }, m = n == null ? void 0 : n.debounce;
  24477. let y = !0;
  24478. return se(e, () => {
  24479. a.value = e ? Object.keys(B(e)) : [], !y && n && n.validateOnRuleChange && f(), y = !1;
  24480. }, {
  24481. deep: !0,
  24482. immediate: !0
  24483. }), se(a, () => {
  24484. const b = {};
  24485. a.value.forEach((_) => {
  24486. b[_] = I({}, i[_], {
  24487. autoLink: !1,
  24488. required: W5(B(e)[_])
  24489. }), delete i[_];
  24490. });
  24491. for (const _ in i)
  24492. Object.prototype.hasOwnProperty.call(i, _) && delete i[_];
  24493. I(i, b);
  24494. }, {
  24495. immediate: !0
  24496. }), se(t, m && m.wait ? UI(g, m.wait, wU(m, ["wait"])) : g, {
  24497. immediate: n && !!n.immediate,
  24498. deep: !0
  24499. }), {
  24500. modelRef: t,
  24501. rulesRef: e,
  24502. initialModel: r,
  24503. validateInfos: i,
  24504. resetFields: o,
  24505. validate: f,
  24506. validateField: c,
  24507. mergeValidateInfo: h,
  24508. clearValidate: d
  24509. };
  24510. }
  24511. const Bxe = () => ({
  24512. layout: Y.oneOf(ru("horizontal", "inline", "vertical")),
  24513. labelCol: $t(),
  24514. wrapperCol: $t(),
  24515. colon: nt(),
  24516. labelAlign: hn(),
  24517. labelWrap: nt(),
  24518. prefixCls: String,
  24519. requiredMark: gn([String, Boolean]),
  24520. /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  24521. hideRequiredMark: nt(),
  24522. model: Y.object,
  24523. rules: $t(),
  24524. validateMessages: $t(),
  24525. validateOnRuleChange: nt(),
  24526. // 提交失败自动滚动到第一个错误字段
  24527. scrollToFirstError: fa(),
  24528. onSubmit: tt(),
  24529. name: String,
  24530. validateTrigger: gn([String, Array]),
  24531. size: hn(),
  24532. disabled: nt(),
  24533. onValuesChange: tt(),
  24534. onFieldsChange: tt(),
  24535. onFinish: tt(),
  24536. onFinishFailed: tt(),
  24537. onValidate: tt()
  24538. });
  24539. function zxe(t, e) {
  24540. return YS(Zl(t), Zl(e));
  24541. }
  24542. const dr = te({
  24543. compatConfig: {
  24544. MODE: 3
  24545. },
  24546. name: "AForm",
  24547. inheritAttrs: !1,
  24548. props: sr(Bxe(), {
  24549. layout: "horizontal",
  24550. hideRequiredMark: !1,
  24551. colon: !0
  24552. }),
  24553. Item: PX,
  24554. useForm: Nxe,
  24555. // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  24556. setup(t, e) {
  24557. let {
  24558. emit: n,
  24559. slots: r,
  24560. expose: i,
  24561. attrs: a
  24562. } = e;
  24563. const {
  24564. prefixCls: o,
  24565. direction: s,
  24566. form: l,
  24567. size: u,
  24568. disabled: c
  24569. } = It("form", t), f = L(() => t.requiredMark === "" || t.requiredMark), d = L(() => {
  24570. var N;
  24571. return f.value !== void 0 ? f.value : l && ((N = l.value) === null || N === void 0 ? void 0 : N.requiredMark) !== void 0 ? l.value.requiredMark : !t.hideRequiredMark;
  24572. });
  24573. Uj(u), cj(c);
  24574. const h = L(() => {
  24575. var N, V;
  24576. return (N = t.colon) !== null && N !== void 0 ? N : (V = l.value) === null || V === void 0 ? void 0 : V.colon;
  24577. }), {
  24578. validateMessages: p
  24579. } = Rue(), v = L(() => I(I(I({}, bx), p.value), t.validateMessages)), [g, m] = hD(o), y = L(() => ye(o.value, {
  24580. [`${o.value}-${t.layout}`]: !0,
  24581. [`${o.value}-hide-required-mark`]: d.value === !1,
  24582. [`${o.value}-rtl`]: s.value === "rtl",
  24583. [`${o.value}-${u.value}`]: u.value
  24584. }, m.value)), b = U(), _ = {}, O = (N, V) => {
  24585. _[N] = V;
  24586. }, S = (N) => {
  24587. delete _[N];
  24588. }, x = (N) => {
  24589. const V = !!N, z = V ? Zl(N).map(H2) : [];
  24590. return V ? Object.values(_).filter((W) => z.findIndex((F) => zxe(F, W.fieldName.value)) > -1) : Object.values(_);
  24591. }, C = (N) => {
  24592. if (!t.model) {
  24593. Xr(!1, "Form", "model is required for resetFields to work.");
  24594. return;
  24595. }
  24596. x(N).forEach((V) => {
  24597. V.resetField();
  24598. });
  24599. }, T = (N) => {
  24600. x(N).forEach((V) => {
  24601. V.clearValidate();
  24602. });
  24603. }, w = (N) => {
  24604. const {
  24605. scrollToFirstError: V
  24606. } = t;
  24607. if (n("finishFailed", N), V && N.errorFields.length) {
  24608. let z = {};
  24609. typeof V == "object" && (z = V), $(N.errorFields[0].name, z);
  24610. }
  24611. }, P = function() {
  24612. return E(...arguments);
  24613. }, $ = function(N) {
  24614. let V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  24615. const z = x(N ? [N] : void 0);
  24616. if (z.length) {
  24617. const W = z[0].fieldId.value, F = W ? document.getElementById(W) : null;
  24618. F && Efe(F, I({
  24619. scrollMode: "if-needed",
  24620. block: "nearest"
  24621. }, V));
  24622. }
  24623. }, A = function() {
  24624. let N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
  24625. if (N === !0) {
  24626. const V = [];
  24627. return Object.values(_).forEach((z) => {
  24628. let {
  24629. namePath: W
  24630. } = z;
  24631. V.push(W.value);
  24632. }), z5(t.model, V);
  24633. } else
  24634. return z5(t.model, N);
  24635. }, D = (N, V) => {
  24636. if (Xr(!(N instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !t.model)
  24637. return Xr(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
  24638. const z = !!N, W = z ? Zl(N).map(H2) : [], F = [];
  24639. Object.values(_).forEach((ne) => {
  24640. var ee;
  24641. if (z || W.push(ne.namePath.value), !(!((ee = ne.rules) === null || ee === void 0) && ee.value.length))
  24642. return;
  24643. const oe = ne.namePath.value;
  24644. if (!z || lxe(W, oe)) {
  24645. const K = ne.validateRules(I({
  24646. validateMessages: v.value
  24647. }, V));
  24648. F.push(K.then(() => ({
  24649. name: oe,
  24650. errors: [],
  24651. warnings: []
  24652. })).catch((ie) => {
  24653. const X = [], H = [];
  24654. return ie.forEach((G) => {
  24655. let {
  24656. rule: {
  24657. warningOnly: re
  24658. },
  24659. errors: fe
  24660. } = G;
  24661. re ? H.push(...fe) : X.push(...fe);
  24662. }), X.length ? Promise.reject({
  24663. name: oe,
  24664. errors: X,
  24665. warnings: H
  24666. }) : {
  24667. name: oe,
  24668. errors: X,
  24669. warnings: H
  24670. };
  24671. }));
  24672. }
  24673. });
  24674. const Q = $X(F);
  24675. b.value = Q;
  24676. const Z = Q.then(() => b.value === Q ? Promise.resolve(A(W)) : Promise.reject([])).catch((ne) => {
  24677. const ee = ne.filter((oe) => oe && oe.errors.length);
  24678. return Promise.reject({
  24679. values: A(W),
  24680. errorFields: ee,
  24681. outOfDate: b.value !== Q
  24682. });
  24683. });
  24684. return Z.catch((ne) => ne), Z;
  24685. }, E = function() {
  24686. return D(...arguments);
  24687. }, R = (N) => {
  24688. N.preventDefault(), N.stopPropagation(), n("submit", N), t.model && D().then((z) => {
  24689. n("finish", z);
  24690. }).catch((z) => {
  24691. w(z);
  24692. });
  24693. };
  24694. return i({
  24695. resetFields: C,
  24696. clearValidate: T,
  24697. validateFields: D,
  24698. getFieldsValue: A,
  24699. validate: P,
  24700. scrollToField: $
  24701. }), wX({
  24702. model: L(() => t.model),
  24703. name: L(() => t.name),
  24704. labelAlign: L(() => t.labelAlign),
  24705. labelCol: L(() => t.labelCol),
  24706. labelWrap: L(() => t.labelWrap),
  24707. wrapperCol: L(() => t.wrapperCol),
  24708. vertical: L(() => t.layout === "vertical"),
  24709. colon: h,
  24710. requiredMark: d,
  24711. validateTrigger: L(() => t.validateTrigger),
  24712. rules: L(() => t.rules),
  24713. addField: O,
  24714. removeField: S,
  24715. onValidate: (N, V, z) => {
  24716. n("validate", N, V, z);
  24717. },
  24718. validateMessages: v
  24719. }), se(() => t.rules, () => {
  24720. t.validateOnRuleChange && D();
  24721. }), () => {
  24722. var N;
  24723. return g(M("form", j(j({}, a), {}, {
  24724. onSubmit: R,
  24725. class: [y.value, a.class]
  24726. }), [(N = r.default) === null || N === void 0 ? void 0 : N.call(r)]));
  24727. };
  24728. }
  24729. });
  24730. dr.useInjectFormItemContext = ss;
  24731. dr.ItemRest = im;
  24732. dr.install = function(t) {
  24733. return t.component(dr.name, dr), t.component(dr.Item.name, dr.Item), t.component(im.name, im), t;
  24734. };
  24735. const Vxe = new Ot("antCheckboxEffect", {
  24736. "0%": {
  24737. transform: "scale(1)",
  24738. opacity: 0.5
  24739. },
  24740. "100%": {
  24741. transform: "scale(1.6)",
  24742. opacity: 0
  24743. }
  24744. }), Fxe = (t) => {
  24745. const {
  24746. checkboxCls: e
  24747. } = t, n = `${e}-wrapper`;
  24748. return [
  24749. // ===================== Basic =====================
  24750. {
  24751. // Group
  24752. [`${e}-group`]: I(I({}, nn(t)), {
  24753. display: "inline-flex",
  24754. flexWrap: "wrap",
  24755. columnGap: t.marginXS,
  24756. // Group > Grid
  24757. [`> ${t.antCls}-row`]: {
  24758. flex: 1
  24759. }
  24760. }),
  24761. // Wrapper
  24762. [n]: I(I({}, nn(t)), {
  24763. display: "inline-flex",
  24764. alignItems: "baseline",
  24765. cursor: "pointer",
  24766. // Fix checkbox & radio in flex align #30260
  24767. "&:after": {
  24768. display: "inline-block",
  24769. width: 0,
  24770. overflow: "hidden",
  24771. content: "'\\a0'"
  24772. },
  24773. // Checkbox near checkbox
  24774. [`& + ${n}`]: {
  24775. marginInlineStart: 0
  24776. },
  24777. [`&${n}-in-form-item`]: {
  24778. 'input[type="checkbox"]': {
  24779. width: 14,
  24780. height: 14
  24781. // FIXME: magic
  24782. }
  24783. }
  24784. }),
  24785. // Wrapper > Checkbox
  24786. [e]: I(I({}, nn(t)), {
  24787. position: "relative",
  24788. whiteSpace: "nowrap",
  24789. lineHeight: 1,
  24790. cursor: "pointer",
  24791. // To make alignment right when `controlHeight` is changed
  24792. // Ref: https://github.com/ant-design/ant-design/issues/41564
  24793. alignSelf: "center",
  24794. // Wrapper > Checkbox > input
  24795. [`${e}-input`]: {
  24796. position: "absolute",
  24797. // Since baseline align will get additional space offset,
  24798. // we need to move input to top to make it align with text.
  24799. // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
  24800. inset: 0,
  24801. zIndex: 1,
  24802. cursor: "pointer",
  24803. opacity: 0,
  24804. margin: 0,
  24805. [`&:focus-visible + ${e}-inner`]: I({}, d0(t))
  24806. },
  24807. // Wrapper > Checkbox > inner
  24808. [`${e}-inner`]: {
  24809. boxSizing: "border-box",
  24810. position: "relative",
  24811. top: 0,
  24812. insetInlineStart: 0,
  24813. display: "block",
  24814. width: t.checkboxSize,
  24815. height: t.checkboxSize,
  24816. direction: "ltr",
  24817. backgroundColor: t.colorBgContainer,
  24818. border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
  24819. borderRadius: t.borderRadiusSM,
  24820. borderCollapse: "separate",
  24821. transition: `all ${t.motionDurationSlow}`,
  24822. "&:after": {
  24823. boxSizing: "border-box",
  24824. position: "absolute",
  24825. top: "50%",
  24826. insetInlineStart: "21.5%",
  24827. display: "table",
  24828. width: t.checkboxSize / 14 * 5,
  24829. height: t.checkboxSize / 14 * 8,
  24830. border: `${t.lineWidthBold}px solid ${t.colorWhite}`,
  24831. borderTop: 0,
  24832. borderInlineStart: 0,
  24833. transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
  24834. opacity: 0,
  24835. content: '""',
  24836. transition: `all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`
  24837. }
  24838. },
  24839. // Wrapper > Checkbox + Text
  24840. "& + span": {
  24841. paddingInlineStart: t.paddingXS,
  24842. paddingInlineEnd: t.paddingXS
  24843. }
  24844. })
  24845. },
  24846. // ================= Indeterminate =================
  24847. {
  24848. [e]: {
  24849. "&-indeterminate": {
  24850. // Wrapper > Checkbox > inner
  24851. [`${e}-inner`]: {
  24852. "&:after": {
  24853. top: "50%",
  24854. insetInlineStart: "50%",
  24855. width: t.fontSizeLG / 2,
  24856. height: t.fontSizeLG / 2,
  24857. backgroundColor: t.colorPrimary,
  24858. border: 0,
  24859. transform: "translate(-50%, -50%) scale(1)",
  24860. opacity: 1,
  24861. content: '""'
  24862. }
  24863. }
  24864. }
  24865. }
  24866. },
  24867. // ===================== Hover =====================
  24868. {
  24869. // Wrapper
  24870. [`${n}:hover ${e}:after`]: {
  24871. visibility: "visible"
  24872. },
  24873. // Wrapper & Wrapper > Checkbox
  24874. [`
  24875. ${n}:not(${n}-disabled),
  24876. ${e}:not(${e}-disabled)
  24877. `]: {
  24878. [`&:hover ${e}-inner`]: {
  24879. borderColor: t.colorPrimary
  24880. }
  24881. },
  24882. [`${n}:not(${n}-disabled)`]: {
  24883. [`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]: {
  24884. backgroundColor: t.colorPrimaryHover,
  24885. borderColor: "transparent"
  24886. },
  24887. [`&:hover ${e}-checked:not(${e}-disabled):after`]: {
  24888. borderColor: t.colorPrimaryHover
  24889. }
  24890. }
  24891. },
  24892. // ==================== Checked ====================
  24893. {
  24894. // Wrapper > Checkbox
  24895. [`${e}-checked`]: {
  24896. [`${e}-inner`]: {
  24897. backgroundColor: t.colorPrimary,
  24898. borderColor: t.colorPrimary,
  24899. "&:after": {
  24900. opacity: 1,
  24901. transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
  24902. transition: `all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`
  24903. }
  24904. },
  24905. // Checked Effect
  24906. "&:after": {
  24907. position: "absolute",
  24908. top: 0,
  24909. insetInlineStart: 0,
  24910. width: "100%",
  24911. height: "100%",
  24912. borderRadius: t.borderRadiusSM,
  24913. visibility: "hidden",
  24914. border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
  24915. animationName: Vxe,
  24916. animationDuration: t.motionDurationSlow,
  24917. animationTimingFunction: "ease-in-out",
  24918. animationFillMode: "backwards",
  24919. content: '""',
  24920. transition: `all ${t.motionDurationSlow}`
  24921. }
  24922. },
  24923. [`
  24924. ${n}-checked:not(${n}-disabled),
  24925. ${e}-checked:not(${e}-disabled)
  24926. `]: {
  24927. [`&:hover ${e}-inner`]: {
  24928. backgroundColor: t.colorPrimaryHover,
  24929. borderColor: "transparent"
  24930. },
  24931. [`&:hover ${e}:after`]: {
  24932. borderColor: t.colorPrimaryHover
  24933. }
  24934. }
  24935. },
  24936. // ==================== Disable ====================
  24937. {
  24938. // Wrapper
  24939. [`${n}-disabled`]: {
  24940. cursor: "not-allowed"
  24941. },
  24942. // Wrapper > Checkbox
  24943. [`${e}-disabled`]: {
  24944. // Wrapper > Checkbox > input
  24945. [`&, ${e}-input`]: {
  24946. cursor: "not-allowed",
  24947. // Disabled for native input to enable Tooltip event handler
  24948. // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
  24949. pointerEvents: "none"
  24950. },
  24951. // Wrapper > Checkbox > inner
  24952. [`${e}-inner`]: {
  24953. background: t.colorBgContainerDisabled,
  24954. borderColor: t.colorBorder,
  24955. "&:after": {
  24956. borderColor: t.colorTextDisabled
  24957. }
  24958. },
  24959. "&:after": {
  24960. display: "none"
  24961. },
  24962. "& + span": {
  24963. color: t.colorTextDisabled
  24964. },
  24965. [`&${e}-indeterminate ${e}-inner::after`]: {
  24966. background: t.colorTextDisabled
  24967. }
  24968. }
  24969. }
  24970. ];
  24971. };
  24972. function Wxe(t, e) {
  24973. const n = Bt(e, {
  24974. checkboxCls: `.${t}`,
  24975. checkboxSize: e.controlInteractiveSize
  24976. });
  24977. return [Fxe(n)];
  24978. }
  24979. const AX = Sn("Checkbox", (t, e) => {
  24980. let {
  24981. prefixCls: n
  24982. } = e;
  24983. return [Wxe(n, t)];
  24984. }), Qxe = () => ({
  24985. name: String,
  24986. prefixCls: String,
  24987. options: uf([]),
  24988. disabled: Boolean,
  24989. id: String
  24990. }), Hxe = () => I(I({}, Qxe()), {
  24991. defaultValue: uf(),
  24992. value: uf(),
  24993. onChange: tt(),
  24994. "onUpdate:value": tt()
  24995. }), Gxe = () => ({
  24996. prefixCls: String,
  24997. defaultChecked: nt(),
  24998. checked: nt(),
  24999. disabled: nt(),
  25000. isGroup: nt(),
  25001. value: Y.any,
  25002. name: String,
  25003. id: String,
  25004. indeterminate: nt(),
  25005. type: hn("checkbox"),
  25006. autofocus: nt(),
  25007. onChange: tt(),
  25008. "onUpdate:checked": tt(),
  25009. onClick: tt(),
  25010. skipGroup: nt(!1)
  25011. }), jxe = () => I(I({}, Gxe()), {
  25012. indeterminate: nt(!1)
  25013. }), EX = Symbol("CheckboxGroupContext");
  25014. var H5 = function(t, e) {
  25015. var n = {};
  25016. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25017. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25018. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25019. return n;
  25020. };
  25021. const dg = te({
  25022. compatConfig: {
  25023. MODE: 3
  25024. },
  25025. name: "ACheckbox",
  25026. inheritAttrs: !1,
  25027. __ANT_CHECKBOX: !0,
  25028. props: jxe(),
  25029. // emits: ['change', 'update:checked'],
  25030. setup(t, e) {
  25031. let {
  25032. emit: n,
  25033. attrs: r,
  25034. slots: i,
  25035. expose: a
  25036. } = e;
  25037. const o = ss(), s = ro.useInject(), {
  25038. prefixCls: l,
  25039. direction: u,
  25040. disabled: c
  25041. } = It("checkbox", t), f = Ko(), [d, h] = AX(l), p = Ge(EX, void 0), v = Symbol("checkboxUniId"), g = L(() => (p == null ? void 0 : p.disabled.value) || c.value);
  25042. ht(() => {
  25043. !t.skipGroup && p && p.registerValue(v, t.value);
  25044. }), yt(() => {
  25045. p && p.cancelValue(v);
  25046. }), it(() => {
  25047. Xr(!!(t.checked !== void 0 || p || t.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
  25048. });
  25049. const m = (O) => {
  25050. const S = O.target.checked;
  25051. n("update:checked", S), n("change", O), o.onFieldChange();
  25052. }, y = U();
  25053. return a({
  25054. focus: () => {
  25055. var O;
  25056. (O = y.value) === null || O === void 0 || O.focus();
  25057. },
  25058. blur: () => {
  25059. var O;
  25060. (O = y.value) === null || O === void 0 || O.blur();
  25061. }
  25062. }), () => {
  25063. var O;
  25064. const S = Yn((O = i.default) === null || O === void 0 ? void 0 : O.call(i)), {
  25065. indeterminate: x,
  25066. skipGroup: C,
  25067. id: T = o.id.value
  25068. } = t, w = H5(t, ["indeterminate", "skipGroup", "id"]), {
  25069. onMouseenter: P,
  25070. onMouseleave: $,
  25071. onInput: A,
  25072. class: D,
  25073. style: E
  25074. } = r, R = H5(r, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), N = I(I(I(I({}, w), {
  25075. id: T,
  25076. prefixCls: l.value
  25077. }), R), {
  25078. disabled: g.value
  25079. });
  25080. p && !C ? (N.onChange = function() {
  25081. for (var F = arguments.length, Q = new Array(F), Z = 0; Z < F; Z++)
  25082. Q[Z] = arguments[Z];
  25083. n("change", ...Q), p.toggleOption({
  25084. label: S,
  25085. value: t.value
  25086. });
  25087. }, N.name = p.name.value, N.checked = p.mergedValue.value.includes(t.value), N.disabled = g.value || f.value, N.indeterminate = x) : N.onChange = m;
  25088. const V = ye({
  25089. [`${l.value}-wrapper`]: !0,
  25090. [`${l.value}-rtl`]: u.value === "rtl",
  25091. [`${l.value}-wrapper-checked`]: N.checked,
  25092. [`${l.value}-wrapper-disabled`]: N.disabled,
  25093. [`${l.value}-wrapper-in-form-item`]: s.isFormItemInput
  25094. }, D, h.value), z = ye({
  25095. [`${l.value}-indeterminate`]: x
  25096. }, h.value);
  25097. return d(M("label", {
  25098. class: V,
  25099. style: E,
  25100. onMouseenter: P,
  25101. onMouseleave: $
  25102. }, [M(KU, j(j({
  25103. "aria-checked": x ? "mixed" : void 0
  25104. }, N), {}, {
  25105. class: z,
  25106. ref: y
  25107. }), null), S.length ? M("span", null, [S]) : null]));
  25108. };
  25109. }
  25110. }), z1 = te({
  25111. compatConfig: {
  25112. MODE: 3
  25113. },
  25114. name: "ACheckboxGroup",
  25115. inheritAttrs: !1,
  25116. props: Hxe(),
  25117. // emits: ['change', 'update:value'],
  25118. setup(t, e) {
  25119. let {
  25120. slots: n,
  25121. attrs: r,
  25122. emit: i,
  25123. expose: a
  25124. } = e;
  25125. const o = ss(), {
  25126. prefixCls: s,
  25127. direction: l
  25128. } = It("checkbox", t), u = L(() => `${s.value}-group`), [c, f] = AX(u), d = U((t.value === void 0 ? t.defaultValue : t.value) || []);
  25129. se(() => t.value, () => {
  25130. d.value = t.value || [];
  25131. });
  25132. const h = L(() => t.options.map((_) => typeof _ == "string" || typeof _ == "number" ? {
  25133. label: _,
  25134. value: _
  25135. } : _)), p = U(Symbol()), v = U(/* @__PURE__ */ new Map()), g = (_) => {
  25136. v.value.delete(_), p.value = Symbol();
  25137. }, m = (_, O) => {
  25138. v.value.set(_, O), p.value = Symbol();
  25139. }, y = U(/* @__PURE__ */ new Map());
  25140. return se(p, () => {
  25141. const _ = /* @__PURE__ */ new Map();
  25142. for (const O of v.value.values())
  25143. _.set(O, !0);
  25144. y.value = _;
  25145. }), pt(EX, {
  25146. cancelValue: g,
  25147. registerValue: m,
  25148. toggleOption: (_) => {
  25149. const O = d.value.indexOf(_.value), S = [...d.value];
  25150. O === -1 ? S.push(_.value) : S.splice(O, 1), t.value === void 0 && (d.value = S);
  25151. const x = S.filter((C) => y.value.has(C)).sort((C, T) => {
  25152. const w = h.value.findIndex(($) => $.value === C), P = h.value.findIndex(($) => $.value === T);
  25153. return w - P;
  25154. });
  25155. i("update:value", x), i("change", x), o.onFieldChange();
  25156. },
  25157. mergedValue: d,
  25158. name: L(() => t.name),
  25159. disabled: L(() => t.disabled)
  25160. }), a({
  25161. mergedValue: d
  25162. }), () => {
  25163. var _;
  25164. const {
  25165. id: O = o.id.value
  25166. } = t;
  25167. let S = null;
  25168. return h.value && h.value.length > 0 && (S = h.value.map((x) => {
  25169. var C;
  25170. return M(dg, {
  25171. prefixCls: s.value,
  25172. key: x.value.toString(),
  25173. disabled: "disabled" in x ? x.disabled : t.disabled,
  25174. indeterminate: x.indeterminate,
  25175. value: x.value,
  25176. checked: d.value.indexOf(x.value) !== -1,
  25177. onChange: x.onChange,
  25178. class: `${u.value}-item`
  25179. }, {
  25180. default: () => [n.label !== void 0 ? (C = n.label) === null || C === void 0 ? void 0 : C.call(n, x) : x.label]
  25181. });
  25182. })), c(M("div", j(j({}, r), {}, {
  25183. class: [u.value, {
  25184. [`${u.value}-rtl`]: l.value === "rtl"
  25185. }, r.class, f.value],
  25186. id: O
  25187. }), [S || ((_ = n.default) === null || _ === void 0 ? void 0 : _.call(n))]));
  25188. };
  25189. }
  25190. });
  25191. dg.Group = z1;
  25192. dg.install = function(t) {
  25193. return t.component(dg.name, dg), t.component(z1.name, z1), t;
  25194. };
  25195. let $_ = I({}, zs.Modal);
  25196. function Zxe(t) {
  25197. t ? $_ = I(I({}, $_), t) : $_ = I({}, zs.Modal);
  25198. }
  25199. function Uxe() {
  25200. return $_;
  25201. }
  25202. const j2 = "internalMark", A_ = te({
  25203. compatConfig: {
  25204. MODE: 3
  25205. },
  25206. name: "ALocaleProvider",
  25207. props: {
  25208. locale: {
  25209. type: Object
  25210. },
  25211. ANT_MARK__: String
  25212. },
  25213. setup(t, e) {
  25214. let {
  25215. slots: n
  25216. } = e;
  25217. Xr(t.ANT_MARK__ === j2, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
  25218. const r = tn({
  25219. antLocale: I(I({}, t.locale), {
  25220. exist: !0
  25221. }),
  25222. ANT_MARK__: j2
  25223. });
  25224. return pt("localeData", r), se(() => t.locale, (i) => {
  25225. Zxe(i && i.Modal), r.antLocale = I(I({}, i), {
  25226. exist: !0
  25227. });
  25228. }, {
  25229. immediate: !0
  25230. }), () => {
  25231. var i;
  25232. return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
  25233. };
  25234. }
  25235. });
  25236. A_.install = function(t) {
  25237. return t.component(A_.name, A_), t;
  25238. };
  25239. const Xxe = np(A_), Ox = te({
  25240. name: "Notice",
  25241. inheritAttrs: !1,
  25242. props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  25243. setup(t, e) {
  25244. let {
  25245. attrs: n,
  25246. slots: r
  25247. } = e, i, a = !1;
  25248. const o = L(() => t.duration === void 0 ? 4.5 : t.duration), s = () => {
  25249. o.value && !a && (i = setTimeout(() => {
  25250. u();
  25251. }, o.value * 1e3));
  25252. }, l = () => {
  25253. i && (clearTimeout(i), i = null);
  25254. }, u = (f) => {
  25255. f && f.stopPropagation(), l();
  25256. const {
  25257. onClose: d,
  25258. noticeKey: h
  25259. } = t;
  25260. d && d(h);
  25261. }, c = () => {
  25262. l(), s();
  25263. };
  25264. return it(() => {
  25265. s();
  25266. }), nl(() => {
  25267. a = !0, l();
  25268. }), se([o, () => t.updateMark, () => t.visible], (f, d) => {
  25269. let [h, p, v] = f, [g, m, y] = d;
  25270. (h !== g || p !== m || v !== y && y) && c();
  25271. }, {
  25272. flush: "post"
  25273. }), () => {
  25274. var f, d;
  25275. const {
  25276. prefixCls: h,
  25277. closable: p,
  25278. closeIcon: v = (f = r.closeIcon) === null || f === void 0 ? void 0 : f.call(r),
  25279. onClick: g,
  25280. holder: m
  25281. } = t, {
  25282. class: y,
  25283. style: b
  25284. } = n, _ = `${h}-notice`, O = Object.keys(n).reduce((x, C) => ((C.startsWith("data-") || C.startsWith("aria-") || C === "role") && (x[C] = n[C]), x), {}), S = M("div", j({
  25285. class: ye(_, y, {
  25286. [`${_}-closable`]: p
  25287. }),
  25288. style: b,
  25289. onMouseenter: l,
  25290. onMouseleave: s,
  25291. onClick: g
  25292. }, O), [M("div", {
  25293. class: `${_}-content`
  25294. }, [(d = r.default) === null || d === void 0 ? void 0 : d.call(r)]), p ? M("a", {
  25295. tabindex: 0,
  25296. onClick: u,
  25297. class: `${_}-close`
  25298. }, [v || M("span", {
  25299. class: `${_}-close-x`
  25300. }, null)]) : null]);
  25301. return m ? M(PS, {
  25302. to: m
  25303. }, {
  25304. default: () => S
  25305. }) : S;
  25306. };
  25307. }
  25308. });
  25309. var Yxe = function(t, e) {
  25310. var n = {};
  25311. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25312. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25313. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25314. return n;
  25315. };
  25316. let G5 = 0;
  25317. const qxe = Date.now();
  25318. function j5() {
  25319. const t = G5;
  25320. return G5 += 1, `rcNotification_${qxe}_${t}`;
  25321. }
  25322. const V1 = te({
  25323. name: "Notification",
  25324. inheritAttrs: !1,
  25325. props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  25326. setup(t, e) {
  25327. let {
  25328. attrs: n,
  25329. expose: r,
  25330. slots: i
  25331. } = e;
  25332. const a = /* @__PURE__ */ new Map(), o = U([]), s = L(() => {
  25333. const {
  25334. prefixCls: c,
  25335. animation: f = "fade"
  25336. } = t;
  25337. let d = t.transitionName;
  25338. return !d && f && (d = `${c}-${f}`), wI(d);
  25339. }), l = (c, f) => {
  25340. const d = c.key || j5(), h = I(I({}, c), {
  25341. key: d
  25342. }), {
  25343. maxCount: p
  25344. } = t, v = o.value.map((m) => m.notice.key).indexOf(d), g = o.value.concat();
  25345. v !== -1 ? g.splice(v, 1, {
  25346. notice: h,
  25347. holderCallback: f
  25348. }) : (p && o.value.length >= p && (h.key = g[0].notice.key, h.updateMark = j5(), h.userPassKey = d, g.shift()), g.push({
  25349. notice: h,
  25350. holderCallback: f
  25351. })), o.value = g;
  25352. }, u = (c) => {
  25353. o.value = o.value.filter((f) => {
  25354. let {
  25355. notice: {
  25356. key: d,
  25357. userPassKey: h
  25358. }
  25359. } = f;
  25360. return (h || d) !== c;
  25361. });
  25362. };
  25363. return r({
  25364. add: l,
  25365. remove: u,
  25366. notices: o
  25367. }), () => {
  25368. var c;
  25369. const {
  25370. prefixCls: f,
  25371. closeIcon: d = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
  25372. prefixCls: f
  25373. })
  25374. } = t, h = o.value.map((v, g) => {
  25375. let {
  25376. notice: m,
  25377. holderCallback: y
  25378. } = v;
  25379. const b = g === o.value.length - 1 ? m.updateMark : void 0, {
  25380. key: _,
  25381. userPassKey: O
  25382. } = m, {
  25383. content: S
  25384. } = m, x = I(I(I({
  25385. prefixCls: f,
  25386. closeIcon: typeof d == "function" ? d({
  25387. prefixCls: f
  25388. }) : d
  25389. }, m), m.props), {
  25390. key: _,
  25391. noticeKey: O || _,
  25392. updateMark: b,
  25393. onClose: (C) => {
  25394. var T;
  25395. u(C), (T = m.onClose) === null || T === void 0 || T.call(m);
  25396. },
  25397. onClick: m.onClick
  25398. });
  25399. return y ? M("div", {
  25400. key: _,
  25401. class: `${f}-hook-holder`,
  25402. ref: (C) => {
  25403. typeof _ > "u" || (C ? (a.set(_, C), y(C, x)) : a.delete(_));
  25404. }
  25405. }, null) : M(Ox, j(j({}, x), {}, {
  25406. class: ye(x.class, t.hashId)
  25407. }), {
  25408. default: () => [typeof S == "function" ? S({
  25409. prefixCls: f
  25410. }) : S]
  25411. });
  25412. }), p = {
  25413. [f]: 1,
  25414. [n.class]: !!n.class,
  25415. [t.hashId]: !0
  25416. };
  25417. return M("div", {
  25418. class: p,
  25419. style: n.style || {
  25420. top: "65px",
  25421. left: "50%"
  25422. }
  25423. }, [M(JM, j({
  25424. tag: "div"
  25425. }, s.value), {
  25426. default: () => [h]
  25427. })]);
  25428. };
  25429. }
  25430. });
  25431. V1.newInstance = function(e, n) {
  25432. const r = e || {}, {
  25433. name: i = "notification",
  25434. getContainer: a,
  25435. appContext: o,
  25436. prefixCls: s,
  25437. rootPrefixCls: l,
  25438. transitionName: u,
  25439. hasTransitionName: c,
  25440. useStyle: f
  25441. } = r, d = Yxe(r, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), h = document.createElement("div");
  25442. a ? a().appendChild(h) : document.body.appendChild(h);
  25443. const p = te({
  25444. compatConfig: {
  25445. MODE: 3
  25446. },
  25447. name: "NotificationWrapper",
  25448. setup(g, m) {
  25449. let {
  25450. attrs: y
  25451. } = m;
  25452. const b = ae(), _ = L(() => hr.getPrefixCls(i, s)), [, O] = f(_);
  25453. return it(() => {
  25454. n({
  25455. notice(S) {
  25456. var x;
  25457. (x = b.value) === null || x === void 0 || x.add(S);
  25458. },
  25459. removeNotice(S) {
  25460. var x;
  25461. (x = b.value) === null || x === void 0 || x.remove(S);
  25462. },
  25463. destroy() {
  25464. sf(null, h), h.parentNode && h.parentNode.removeChild(h);
  25465. },
  25466. component: b
  25467. });
  25468. }), () => {
  25469. const S = hr, x = S.getRootPrefixCls(l, _.value), C = c ? u : `${_.value}-${u}`;
  25470. return M(Xd, j(j({}, S), {}, {
  25471. prefixCls: x
  25472. }), {
  25473. default: () => [M(V1, j(j({
  25474. ref: b
  25475. }, y), {}, {
  25476. prefixCls: _.value,
  25477. transitionName: C,
  25478. hashId: O.value
  25479. }), null)]
  25480. });
  25481. };
  25482. }
  25483. }), v = M(p, d);
  25484. v.appContext = o || v.appContext, sf(v, h);
  25485. };
  25486. let Z5 = 0;
  25487. const Kxe = Date.now();
  25488. function U5() {
  25489. const t = Z5;
  25490. return Z5 += 1, `rcNotification_${Kxe}_${t}`;
  25491. }
  25492. const Jxe = te({
  25493. name: "HookNotification",
  25494. inheritAttrs: !1,
  25495. props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  25496. setup(t, e) {
  25497. let {
  25498. attrs: n,
  25499. slots: r
  25500. } = e;
  25501. const i = /* @__PURE__ */ new Map(), a = L(() => t.notices), o = L(() => {
  25502. let c = t.transitionName;
  25503. if (!c && t.animation)
  25504. switch (typeof t.animation) {
  25505. case "string":
  25506. c = t.animation;
  25507. break;
  25508. case "function":
  25509. c = t.animation().name;
  25510. break;
  25511. case "object":
  25512. c = t.animation.name;
  25513. break;
  25514. default:
  25515. c = `${t.prefixCls}-fade`;
  25516. break;
  25517. }
  25518. return wI(c);
  25519. }), s = (c) => t.remove(c), l = U({});
  25520. se(a, () => {
  25521. const c = {};
  25522. Object.keys(l.value).forEach((f) => {
  25523. c[f] = [];
  25524. }), t.notices.forEach((f) => {
  25525. const {
  25526. placement: d = "topRight"
  25527. } = f.notice;
  25528. d && (c[d] = c[d] || [], c[d].push(f));
  25529. }), l.value = c;
  25530. });
  25531. const u = L(() => Object.keys(l.value));
  25532. return () => {
  25533. var c;
  25534. const {
  25535. prefixCls: f,
  25536. closeIcon: d = (c = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
  25537. prefixCls: f
  25538. })
  25539. } = t, h = u.value.map((p) => {
  25540. var v, g;
  25541. const m = l.value[p], y = (v = t.getClassName) === null || v === void 0 ? void 0 : v.call(t, p), b = (g = t.getStyles) === null || g === void 0 ? void 0 : g.call(t, p), _ = m.map((x, C) => {
  25542. let {
  25543. notice: T,
  25544. holderCallback: w
  25545. } = x;
  25546. const P = C === a.value.length - 1 ? T.updateMark : void 0, {
  25547. key: $,
  25548. userPassKey: A
  25549. } = T, {
  25550. content: D
  25551. } = T, E = I(I(I({
  25552. prefixCls: f,
  25553. closeIcon: typeof d == "function" ? d({
  25554. prefixCls: f
  25555. }) : d
  25556. }, T), T.props), {
  25557. key: $,
  25558. noticeKey: A || $,
  25559. updateMark: P,
  25560. onClose: (R) => {
  25561. var N;
  25562. s(R), (N = T.onClose) === null || N === void 0 || N.call(T);
  25563. },
  25564. onClick: T.onClick
  25565. });
  25566. return w ? M("div", {
  25567. key: $,
  25568. class: `${f}-hook-holder`,
  25569. ref: (R) => {
  25570. typeof $ > "u" || (R ? (i.set($, R), w(R, E)) : i.delete($));
  25571. }
  25572. }, null) : M(Ox, j(j({}, E), {}, {
  25573. class: ye(E.class, t.hashId)
  25574. }), {
  25575. default: () => [typeof D == "function" ? D({
  25576. prefixCls: f
  25577. }) : D]
  25578. });
  25579. }), O = {
  25580. [f]: 1,
  25581. [`${f}-${p}`]: 1,
  25582. [n.class]: !!n.class,
  25583. [t.hashId]: !0,
  25584. [y]: !!y
  25585. };
  25586. function S() {
  25587. var x;
  25588. m.length > 0 || (Reflect.deleteProperty(l.value, p), (x = t.onAllRemoved) === null || x === void 0 || x.call(t));
  25589. }
  25590. return M("div", {
  25591. key: p,
  25592. class: O,
  25593. style: n.style || b || {
  25594. top: "65px",
  25595. left: "50%"
  25596. }
  25597. }, [M(JM, j(j({
  25598. tag: "div"
  25599. }, o.value), {}, {
  25600. onAfterLeave: S
  25601. }), {
  25602. default: () => [_]
  25603. })]);
  25604. });
  25605. return M(AZ, {
  25606. getContainer: t.getContainer
  25607. }, {
  25608. default: () => [h]
  25609. });
  25610. };
  25611. }
  25612. }), ewe = Jxe;
  25613. var twe = function(t, e) {
  25614. var n = {};
  25615. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25616. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25617. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25618. return n;
  25619. };
  25620. const nwe = () => document.body;
  25621. let X5 = 0;
  25622. function rwe() {
  25623. const t = {};
  25624. for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
  25625. n[r] = arguments[r];
  25626. return n.forEach((i) => {
  25627. i && Object.keys(i).forEach((a) => {
  25628. const o = i[a];
  25629. o !== void 0 && (t[a] = o);
  25630. });
  25631. }), t;
  25632. }
  25633. function MX() {
  25634. let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  25635. const {
  25636. getContainer: e = nwe,
  25637. motion: n,
  25638. prefixCls: r,
  25639. maxCount: i,
  25640. getClassName: a,
  25641. getStyles: o,
  25642. onAllRemoved: s
  25643. } = t, l = twe(t, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = ae([]), c = ae(), f = (m, y) => {
  25644. const b = m.key || U5(), _ = I(I({}, m), {
  25645. key: b
  25646. }), O = u.value.map((x) => x.notice.key).indexOf(b), S = u.value.concat();
  25647. O !== -1 ? S.splice(O, 1, {
  25648. notice: _,
  25649. holderCallback: y
  25650. }) : (i && u.value.length >= i && (_.key = S[0].notice.key, _.updateMark = U5(), _.userPassKey = b, S.shift()), S.push({
  25651. notice: _,
  25652. holderCallback: y
  25653. })), u.value = S;
  25654. }, d = (m) => {
  25655. u.value = u.value.filter((y) => {
  25656. let {
  25657. notice: {
  25658. key: b,
  25659. userPassKey: _
  25660. }
  25661. } = y;
  25662. return (_ || b) !== m;
  25663. });
  25664. }, h = () => {
  25665. u.value = [];
  25666. }, p = () => M(ewe, {
  25667. ref: c,
  25668. prefixCls: r,
  25669. maxCount: i,
  25670. notices: u.value,
  25671. remove: d,
  25672. getClassName: a,
  25673. getStyles: o,
  25674. animation: n,
  25675. hashId: t.hashId,
  25676. onAllRemoved: s,
  25677. getContainer: e
  25678. }, null), v = ae([]), g = {
  25679. open: (m) => {
  25680. const y = rwe(l, m);
  25681. (y.key === null || y.key === void 0) && (y.key = `vc-notification-${X5}`, X5 += 1), v.value = [...v.value, {
  25682. type: "open",
  25683. config: y
  25684. }];
  25685. },
  25686. close: (m) => {
  25687. v.value = [...v.value, {
  25688. type: "close",
  25689. key: m
  25690. }];
  25691. },
  25692. destroy: () => {
  25693. v.value = [...v.value, {
  25694. type: "destroy"
  25695. }];
  25696. }
  25697. };
  25698. return se(v, () => {
  25699. v.value.length && (v.value.forEach((m) => {
  25700. switch (m.type) {
  25701. case "open":
  25702. f(m.config);
  25703. break;
  25704. case "close":
  25705. d(m.key);
  25706. break;
  25707. case "destroy":
  25708. h();
  25709. break;
  25710. }
  25711. }), v.value = []);
  25712. }), [g, p];
  25713. }
  25714. const iwe = (t) => {
  25715. const {
  25716. componentCls: e,
  25717. iconCls: n,
  25718. boxShadowSecondary: r,
  25719. colorBgElevated: i,
  25720. colorSuccess: a,
  25721. colorError: o,
  25722. colorWarning: s,
  25723. colorInfo: l,
  25724. fontSizeLG: u,
  25725. motionEaseInOutCirc: c,
  25726. motionDurationSlow: f,
  25727. marginXS: d,
  25728. paddingXS: h,
  25729. borderRadiusLG: p,
  25730. zIndexPopup: v,
  25731. // Custom token
  25732. messageNoticeContentPadding: g
  25733. } = t, m = new Ot("MessageMoveIn", {
  25734. "0%": {
  25735. padding: 0,
  25736. transform: "translateY(-100%)",
  25737. opacity: 0
  25738. },
  25739. "100%": {
  25740. padding: h,
  25741. transform: "translateY(0)",
  25742. opacity: 1
  25743. }
  25744. }), y = new Ot("MessageMoveOut", {
  25745. "0%": {
  25746. maxHeight: t.height,
  25747. padding: h,
  25748. opacity: 1
  25749. },
  25750. "100%": {
  25751. maxHeight: 0,
  25752. padding: 0,
  25753. opacity: 0
  25754. }
  25755. });
  25756. return [
  25757. // ============================ Holder ============================
  25758. {
  25759. [e]: I(I({}, nn(t)), {
  25760. position: "fixed",
  25761. top: d,
  25762. left: "50%",
  25763. transform: "translateX(-50%)",
  25764. width: "100%",
  25765. pointerEvents: "none",
  25766. zIndex: v,
  25767. [`${e}-move-up`]: {
  25768. animationFillMode: "forwards"
  25769. },
  25770. [`
  25771. ${e}-move-up-appear,
  25772. ${e}-move-up-enter
  25773. `]: {
  25774. animationName: m,
  25775. animationDuration: f,
  25776. animationPlayState: "paused",
  25777. animationTimingFunction: c
  25778. },
  25779. [`
  25780. ${e}-move-up-appear${e}-move-up-appear-active,
  25781. ${e}-move-up-enter${e}-move-up-enter-active
  25782. `]: {
  25783. animationPlayState: "running"
  25784. },
  25785. [`${e}-move-up-leave`]: {
  25786. animationName: y,
  25787. animationDuration: f,
  25788. animationPlayState: "paused",
  25789. animationTimingFunction: c
  25790. },
  25791. [`${e}-move-up-leave${e}-move-up-leave-active`]: {
  25792. animationPlayState: "running"
  25793. },
  25794. "&-rtl": {
  25795. direction: "rtl",
  25796. span: {
  25797. direction: "rtl"
  25798. }
  25799. }
  25800. })
  25801. },
  25802. // ============================ Notice ============================
  25803. {
  25804. [`${e}-notice`]: {
  25805. padding: h,
  25806. textAlign: "center",
  25807. [n]: {
  25808. verticalAlign: "text-bottom",
  25809. marginInlineEnd: d,
  25810. fontSize: u
  25811. },
  25812. [`${e}-notice-content`]: {
  25813. display: "inline-block",
  25814. padding: g,
  25815. background: i,
  25816. borderRadius: p,
  25817. boxShadow: r,
  25818. pointerEvents: "all"
  25819. },
  25820. [`${e}-success ${n}`]: {
  25821. color: a
  25822. },
  25823. [`${e}-error ${n}`]: {
  25824. color: o
  25825. },
  25826. [`${e}-warning ${n}`]: {
  25827. color: s
  25828. },
  25829. [`
  25830. ${e}-info ${n},
  25831. ${e}-loading ${n}`]: {
  25832. color: l
  25833. }
  25834. }
  25835. },
  25836. // ============================= Pure =============================
  25837. {
  25838. [`${e}-notice-pure-panel`]: {
  25839. padding: 0,
  25840. textAlign: "start"
  25841. }
  25842. }
  25843. ];
  25844. }, pD = Sn("Message", (t) => {
  25845. const e = Bt(t, {
  25846. messageNoticeContentPadding: `${(t.controlHeightLG - t.fontSize * t.lineHeight) / 2}px ${t.paddingSM}px`
  25847. });
  25848. return [iwe(e)];
  25849. }, (t) => ({
  25850. height: 150,
  25851. zIndexPopup: t.zIndexPopupBase + 10
  25852. })), awe = {
  25853. info: M(If, null, null),
  25854. success: M(Ou, null, null),
  25855. error: M(Da, null, null),
  25856. warning: M(Su, null, null),
  25857. loading: M(ts, null, null)
  25858. }, IX = te({
  25859. name: "PureContent",
  25860. inheritAttrs: !1,
  25861. props: ["prefixCls", "type", "icon"],
  25862. setup(t, e) {
  25863. let {
  25864. slots: n
  25865. } = e;
  25866. return () => {
  25867. var r;
  25868. return M("div", {
  25869. class: ye(`${t.prefixCls}-custom-content`, `${t.prefixCls}-${t.type}`)
  25870. }, [t.icon || awe[t.type], M("span", null, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
  25871. };
  25872. }
  25873. });
  25874. te({
  25875. name: "PurePanel",
  25876. inheritAttrs: !1,
  25877. props: ["prefixCls", "class", "type", "icon", "content"],
  25878. setup(t, e) {
  25879. let {
  25880. slots: n,
  25881. attrs: r
  25882. } = e;
  25883. var i;
  25884. const {
  25885. getPrefixCls: a
  25886. } = DS(), o = L(() => t.prefixCls || a("message")), [, s] = pD(o);
  25887. return M(Ox, j(j({}, r), {}, {
  25888. prefixCls: o.value,
  25889. class: ye(s.value, `${o.value}-notice-pure-panel`),
  25890. noticeKey: "pure",
  25891. duration: null
  25892. }), {
  25893. default: () => [M(IX, {
  25894. prefixCls: o.value,
  25895. type: t.type,
  25896. icon: t.icon
  25897. }, {
  25898. default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
  25899. })]
  25900. });
  25901. }
  25902. });
  25903. var owe = function(t, e) {
  25904. var n = {};
  25905. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  25906. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  25907. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  25908. return n;
  25909. };
  25910. const swe = 8, lwe = 3, uwe = te({
  25911. name: "Holder",
  25912. inheritAttrs: !1,
  25913. props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved"],
  25914. setup(t, e) {
  25915. let {
  25916. expose: n
  25917. } = e;
  25918. var r, i;
  25919. const {
  25920. getPrefixCls: a,
  25921. getPopupContainer: o
  25922. } = It("message", t), s = L(() => a("message", t.prefixCls)), [, l] = pD(s), u = () => {
  25923. var v;
  25924. const g = (v = t.top) !== null && v !== void 0 ? v : swe;
  25925. return {
  25926. left: "50%",
  25927. transform: "translateX(-50%)",
  25928. top: typeof g == "number" ? `${g}px` : g
  25929. };
  25930. }, c = () => ye(l.value, t.rtl ? `${s.value}-rtl` : ""), f = () => {
  25931. var v;
  25932. return hI({
  25933. prefixCls: s.value,
  25934. animation: (v = t.animation) !== null && v !== void 0 ? v : "move-up",
  25935. transitionName: t.transitionName
  25936. });
  25937. }, d = M("span", {
  25938. class: `${s.value}-close-x`
  25939. }, [M(al, {
  25940. class: `${s.value}-close-icon`
  25941. }, null)]), [h, p] = MX({
  25942. //@ts-ignore
  25943. getStyles: u,
  25944. prefixCls: s.value,
  25945. getClassName: c,
  25946. motion: f,
  25947. closable: !1,
  25948. closeIcon: d,
  25949. duration: (r = t.duration) !== null && r !== void 0 ? r : lwe,
  25950. getContainer: (i = t.staticGetContainer) !== null && i !== void 0 ? i : o.value,
  25951. maxCount: t.maxCount,
  25952. onAllRemoved: t.onAllRemoved
  25953. });
  25954. return n(I(I({}, h), {
  25955. prefixCls: s,
  25956. hashId: l
  25957. })), p;
  25958. }
  25959. });
  25960. let Y5 = 0;
  25961. function cwe(t) {
  25962. const e = ae(null), n = Symbol("messageHolderKey"), r = (l) => {
  25963. var u;
  25964. (u = e.value) === null || u === void 0 || u.close(l);
  25965. }, i = (l) => {
  25966. if (!e.value) {
  25967. const O = () => {
  25968. };
  25969. return O.then = () => {
  25970. }, O;
  25971. }
  25972. const {
  25973. open: u,
  25974. prefixCls: c,
  25975. hashId: f
  25976. } = e.value, d = `${c}-notice`, {
  25977. content: h,
  25978. icon: p,
  25979. type: v,
  25980. key: g,
  25981. class: m,
  25982. onClose: y
  25983. } = l, b = owe(l, ["content", "icon", "type", "key", "class", "onClose"]);
  25984. let _ = g;
  25985. return _ == null && (Y5 += 1, _ = `antd-message-${Y5}`), uue((O) => (u(I(I({}, b), {
  25986. key: _,
  25987. content: () => M(IX, {
  25988. prefixCls: c,
  25989. type: v,
  25990. icon: typeof p == "function" ? p() : p
  25991. }, {
  25992. default: () => [typeof h == "function" ? h() : h]
  25993. }),
  25994. placement: "top",
  25995. // @ts-ignore
  25996. class: ye(v && `${d}-${v}`, f, m),
  25997. onClose: () => {
  25998. y == null || y(), O();
  25999. }
  26000. })), () => {
  26001. r(_);
  26002. }));
  26003. }, o = {
  26004. open: i,
  26005. destroy: (l) => {
  26006. var u;
  26007. l !== void 0 ? r(l) : (u = e.value) === null || u === void 0 || u.destroy();
  26008. }
  26009. };
  26010. return ["info", "success", "warning", "error", "loading"].forEach((l) => {
  26011. const u = (c, f, d) => {
  26012. let h;
  26013. c && typeof c == "object" && "content" in c ? h = c : h = {
  26014. content: c
  26015. };
  26016. let p, v;
  26017. typeof f == "function" ? v = f : (p = f, v = d);
  26018. const g = I(I({
  26019. onClose: v,
  26020. duration: p
  26021. }, h), {
  26022. type: l
  26023. });
  26024. return i(g);
  26025. };
  26026. o[l] = u;
  26027. }), [o, () => M(uwe, j(j({
  26028. key: n
  26029. }, t), {}, {
  26030. ref: e
  26031. }), null)];
  26032. }
  26033. function fwe(t) {
  26034. return cwe(t);
  26035. }
  26036. let DX = 3, RX, Zr, dwe = 1, kX = "", LX = "move-up", NX = !1, BX = () => document.body, zX, VX = !1;
  26037. function hwe() {
  26038. return dwe++;
  26039. }
  26040. function pwe(t) {
  26041. t.top !== void 0 && (RX = t.top, Zr = null), t.duration !== void 0 && (DX = t.duration), t.prefixCls !== void 0 && (kX = t.prefixCls), t.getContainer !== void 0 && (BX = t.getContainer, Zr = null), t.transitionName !== void 0 && (LX = t.transitionName, Zr = null, NX = !0), t.maxCount !== void 0 && (zX = t.maxCount, Zr = null), t.rtl !== void 0 && (VX = t.rtl);
  26042. }
  26043. function vwe(t, e) {
  26044. if (Zr) {
  26045. e(Zr);
  26046. return;
  26047. }
  26048. V1.newInstance({
  26049. appContext: t.appContext,
  26050. prefixCls: t.prefixCls || kX,
  26051. rootPrefixCls: t.rootPrefixCls,
  26052. transitionName: LX,
  26053. hasTransitionName: NX,
  26054. style: {
  26055. top: RX
  26056. },
  26057. getContainer: BX || t.getPopupContainer,
  26058. maxCount: zX,
  26059. name: "message",
  26060. useStyle: pD
  26061. }, (n) => {
  26062. if (Zr) {
  26063. e(Zr);
  26064. return;
  26065. }
  26066. Zr = n, e(n);
  26067. });
  26068. }
  26069. const FX = {
  26070. info: If,
  26071. success: Ou,
  26072. error: Da,
  26073. warning: Su,
  26074. loading: ts
  26075. }, gwe = Object.keys(FX);
  26076. function mwe(t) {
  26077. const e = t.duration !== void 0 ? t.duration : DX, n = t.key || hwe(), r = new Promise((a) => {
  26078. const o = () => (typeof t.onClose == "function" && t.onClose(), a(!0));
  26079. vwe(t, (s) => {
  26080. s.notice({
  26081. key: n,
  26082. duration: e,
  26083. style: t.style || {},
  26084. class: t.class,
  26085. content: (l) => {
  26086. let {
  26087. prefixCls: u
  26088. } = l;
  26089. const c = FX[t.type], f = c ? M(c, null, null) : "", d = ye(`${u}-custom-content`, {
  26090. [`${u}-${t.type}`]: t.type,
  26091. [`${u}-rtl`]: VX === !0
  26092. });
  26093. return M("div", {
  26094. class: d
  26095. }, [typeof t.icon == "function" ? t.icon() : t.icon || f, M("span", null, [typeof t.content == "function" ? t.content() : t.content])]);
  26096. },
  26097. onClose: o,
  26098. onClick: t.onClick
  26099. });
  26100. });
  26101. }), i = () => {
  26102. Zr && Zr.removeNotice(n);
  26103. };
  26104. return i.then = (a, o) => r.then(a, o), i.promise = r, i;
  26105. }
  26106. function ywe(t) {
  26107. return Object.prototype.toString.call(t) === "[object Object]" && !!t.content;
  26108. }
  26109. const $h = {
  26110. open: mwe,
  26111. config: pwe,
  26112. destroy(t) {
  26113. if (Zr)
  26114. if (t) {
  26115. const {
  26116. removeNotice: e
  26117. } = Zr;
  26118. e(t);
  26119. } else {
  26120. const {
  26121. destroy: e
  26122. } = Zr;
  26123. e(), Zr = null;
  26124. }
  26125. }
  26126. };
  26127. function bwe(t, e) {
  26128. t[e] = (n, r, i) => ywe(n) ? t.open(I(I({}, n), {
  26129. type: e
  26130. })) : (typeof r == "function" && (i = r, r = void 0), t.open({
  26131. content: n,
  26132. duration: r,
  26133. type: e,
  26134. onClose: i
  26135. }));
  26136. }
  26137. gwe.forEach((t) => bwe($h, t));
  26138. $h.warn = $h.warning;
  26139. $h.useMessage = fwe;
  26140. const _we = (t) => {
  26141. const {
  26142. componentCls: e,
  26143. width: n,
  26144. notificationMarginEdge: r
  26145. } = t, i = new Ot("antNotificationTopFadeIn", {
  26146. "0%": {
  26147. marginTop: "-100%",
  26148. opacity: 0
  26149. },
  26150. "100%": {
  26151. marginTop: 0,
  26152. opacity: 1
  26153. }
  26154. }), a = new Ot("antNotificationBottomFadeIn", {
  26155. "0%": {
  26156. marginBottom: "-100%",
  26157. opacity: 0
  26158. },
  26159. "100%": {
  26160. marginBottom: 0,
  26161. opacity: 1
  26162. }
  26163. }), o = new Ot("antNotificationLeftFadeIn", {
  26164. "0%": {
  26165. right: {
  26166. _skip_check_: !0,
  26167. value: n
  26168. },
  26169. opacity: 0
  26170. },
  26171. "100%": {
  26172. right: {
  26173. _skip_check_: !0,
  26174. value: 0
  26175. },
  26176. opacity: 1
  26177. }
  26178. });
  26179. return {
  26180. [`&${e}-top, &${e}-bottom`]: {
  26181. marginInline: 0
  26182. },
  26183. [`&${e}-top`]: {
  26184. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26185. animationName: i
  26186. }
  26187. },
  26188. [`&${e}-bottom`]: {
  26189. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26190. animationName: a
  26191. }
  26192. },
  26193. [`&${e}-topLeft, &${e}-bottomLeft`]: {
  26194. marginInlineEnd: 0,
  26195. marginInlineStart: r,
  26196. [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
  26197. animationName: o
  26198. }
  26199. }
  26200. };
  26201. }, Owe = (t) => {
  26202. const {
  26203. iconCls: e,
  26204. componentCls: n,
  26205. // .ant-notification
  26206. boxShadowSecondary: r,
  26207. fontSizeLG: i,
  26208. notificationMarginBottom: a,
  26209. borderRadiusLG: o,
  26210. colorSuccess: s,
  26211. colorInfo: l,
  26212. colorWarning: u,
  26213. colorError: c,
  26214. colorTextHeading: f,
  26215. notificationBg: d,
  26216. notificationPadding: h,
  26217. notificationMarginEdge: p,
  26218. motionDurationMid: v,
  26219. motionEaseInOut: g,
  26220. fontSize: m,
  26221. lineHeight: y,
  26222. width: b,
  26223. notificationIconSize: _
  26224. } = t, O = `${n}-notice`, S = new Ot("antNotificationFadeIn", {
  26225. "0%": {
  26226. left: {
  26227. _skip_check_: !0,
  26228. value: b
  26229. },
  26230. opacity: 0
  26231. },
  26232. "100%": {
  26233. left: {
  26234. _skip_check_: !0,
  26235. value: 0
  26236. },
  26237. opacity: 1
  26238. }
  26239. }), x = new Ot("antNotificationFadeOut", {
  26240. "0%": {
  26241. maxHeight: t.animationMaxHeight,
  26242. marginBottom: a,
  26243. opacity: 1
  26244. },
  26245. "100%": {
  26246. maxHeight: 0,
  26247. marginBottom: 0,
  26248. paddingTop: 0,
  26249. paddingBottom: 0,
  26250. opacity: 0
  26251. }
  26252. });
  26253. return [
  26254. // ============================ Holder ============================
  26255. {
  26256. [n]: I(I(I(I({}, nn(t)), {
  26257. position: "fixed",
  26258. zIndex: t.zIndexPopup,
  26259. marginInlineEnd: p,
  26260. [`${n}-hook-holder`]: {
  26261. position: "relative"
  26262. },
  26263. [`&${n}-top, &${n}-bottom`]: {
  26264. [`${n}-notice`]: {
  26265. marginInline: "auto auto"
  26266. }
  26267. },
  26268. [`&${n}-topLeft, &${n}-bottomLeft`]: {
  26269. [`${n}-notice`]: {
  26270. marginInlineEnd: "auto",
  26271. marginInlineStart: 0
  26272. }
  26273. },
  26274. // animation
  26275. [`${n}-fade-enter, ${n}-fade-appear`]: {
  26276. animationDuration: t.motionDurationMid,
  26277. animationTimingFunction: g,
  26278. animationFillMode: "both",
  26279. opacity: 0,
  26280. animationPlayState: "paused"
  26281. },
  26282. [`${n}-fade-leave`]: {
  26283. animationTimingFunction: g,
  26284. animationFillMode: "both",
  26285. animationDuration: v,
  26286. animationPlayState: "paused"
  26287. },
  26288. [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
  26289. animationName: S,
  26290. animationPlayState: "running"
  26291. },
  26292. [`${n}-fade-leave${n}-fade-leave-active`]: {
  26293. animationName: x,
  26294. animationPlayState: "running"
  26295. }
  26296. }), _we(t)), {
  26297. // RTL
  26298. "&-rtl": {
  26299. direction: "rtl",
  26300. [`${n}-notice-btn`]: {
  26301. float: "left"
  26302. }
  26303. }
  26304. })
  26305. },
  26306. // ============================ Notice ============================
  26307. {
  26308. [O]: {
  26309. position: "relative",
  26310. width: b,
  26311. maxWidth: `calc(100vw - ${p * 2}px)`,
  26312. marginBottom: a,
  26313. marginInlineStart: "auto",
  26314. padding: h,
  26315. overflow: "hidden",
  26316. lineHeight: y,
  26317. wordWrap: "break-word",
  26318. background: d,
  26319. borderRadius: o,
  26320. boxShadow: r,
  26321. [`${n}-close-icon`]: {
  26322. fontSize: m,
  26323. cursor: "pointer"
  26324. },
  26325. [`${O}-message`]: {
  26326. marginBottom: t.marginXS,
  26327. color: f,
  26328. fontSize: i,
  26329. lineHeight: t.lineHeightLG
  26330. },
  26331. [`${O}-description`]: {
  26332. fontSize: m
  26333. },
  26334. [`&${O}-closable ${O}-message`]: {
  26335. paddingInlineEnd: t.paddingLG
  26336. },
  26337. [`${O}-with-icon ${O}-message`]: {
  26338. marginBottom: t.marginXS,
  26339. marginInlineStart: t.marginSM + _,
  26340. fontSize: i
  26341. },
  26342. [`${O}-with-icon ${O}-description`]: {
  26343. marginInlineStart: t.marginSM + _,
  26344. fontSize: m
  26345. },
  26346. // Icon & color style in different selector level
  26347. // https://github.com/ant-design/ant-design/issues/16503
  26348. // https://github.com/ant-design/ant-design/issues/15512
  26349. [`${O}-icon`]: {
  26350. position: "absolute",
  26351. fontSize: _,
  26352. lineHeight: 0,
  26353. // icon-font
  26354. [`&-success${e}`]: {
  26355. color: s
  26356. },
  26357. [`&-info${e}`]: {
  26358. color: l
  26359. },
  26360. [`&-warning${e}`]: {
  26361. color: u
  26362. },
  26363. [`&-error${e}`]: {
  26364. color: c
  26365. }
  26366. },
  26367. [`${O}-close`]: {
  26368. position: "absolute",
  26369. top: t.notificationPaddingVertical,
  26370. insetInlineEnd: t.notificationPaddingHorizontal,
  26371. color: t.colorIcon,
  26372. outline: "none",
  26373. width: t.notificationCloseButtonSize,
  26374. height: t.notificationCloseButtonSize,
  26375. borderRadius: t.borderRadiusSM,
  26376. transition: `background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,
  26377. display: "flex",
  26378. alignItems: "center",
  26379. justifyContent: "center",
  26380. "&:hover": {
  26381. color: t.colorIconHover,
  26382. backgroundColor: t.wireframe ? "transparent" : t.colorFillContent
  26383. }
  26384. },
  26385. [`${O}-btn`]: {
  26386. float: "right",
  26387. marginTop: t.marginSM
  26388. }
  26389. }
  26390. },
  26391. // ============================= Pure =============================
  26392. {
  26393. [`${O}-pure-panel`]: {
  26394. margin: 0
  26395. }
  26396. }
  26397. ];
  26398. }, vD = Sn("Notification", (t) => {
  26399. const e = t.paddingMD, n = t.paddingLG, r = Bt(t, {
  26400. // default.less variables
  26401. notificationBg: t.colorBgElevated,
  26402. notificationPaddingVertical: e,
  26403. notificationPaddingHorizontal: n,
  26404. // index.less variables
  26405. notificationPadding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,
  26406. notificationMarginBottom: t.margin,
  26407. notificationMarginEdge: t.marginLG,
  26408. animationMaxHeight: 150,
  26409. notificationIconSize: t.fontSizeLG * t.lineHeightLG,
  26410. notificationCloseButtonSize: t.controlHeightLG * 0.55
  26411. });
  26412. return [Owe(r)];
  26413. }, (t) => ({
  26414. zIndexPopup: t.zIndexPopupBase + 50,
  26415. width: 384
  26416. }));
  26417. function WX(t, e) {
  26418. return e || M("span", {
  26419. class: `${t}-close-x`
  26420. }, [M(al, {
  26421. class: `${t}-close-icon`
  26422. }, null)]);
  26423. }
  26424. M(If, null, null), M(Ou, null, null), M(Da, null, null), M(Su, null, null), M(ts, null, null);
  26425. const Swe = {
  26426. success: Ou,
  26427. info: If,
  26428. error: Da,
  26429. warning: Su
  26430. };
  26431. function QX(t) {
  26432. let {
  26433. prefixCls: e,
  26434. icon: n,
  26435. type: r,
  26436. message: i,
  26437. description: a,
  26438. btn: o
  26439. } = t, s = null;
  26440. if (n)
  26441. s = M("span", {
  26442. class: `${e}-icon`
  26443. }, [Ld(n)]);
  26444. else if (r) {
  26445. const l = Swe[r];
  26446. s = M(l, {
  26447. class: `${e}-icon ${e}-icon-${r}`
  26448. }, null);
  26449. }
  26450. return M("div", {
  26451. class: ye({
  26452. [`${e}-with-icon`]: s
  26453. }),
  26454. role: "alert"
  26455. }, [s, M("div", {
  26456. class: `${e}-message`
  26457. }, [i]), M("div", {
  26458. class: `${e}-description`
  26459. }, [a]), o && M("div", {
  26460. class: `${e}-btn`
  26461. }, [o])]);
  26462. }
  26463. te({
  26464. name: "PurePanel",
  26465. inheritAttrs: !1,
  26466. props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  26467. setup(t) {
  26468. const {
  26469. getPrefixCls: e
  26470. } = It("notification", t), n = L(() => t.prefixCls || e("notification")), r = L(() => `${n.value}-notice`), [, i] = vD(n);
  26471. return () => M(Ox, j(j({}, t), {}, {
  26472. prefixCls: n.value,
  26473. class: ye(i.value, `${r.value}-pure-panel`),
  26474. noticeKey: "pure",
  26475. duration: null,
  26476. closable: t.closable,
  26477. closeIcon: WX(n.value, t.closeIcon)
  26478. }), {
  26479. default: () => [M(QX, {
  26480. prefixCls: r.value,
  26481. icon: t.icon,
  26482. type: t.type,
  26483. message: t.message,
  26484. description: t.description,
  26485. btn: t.btn
  26486. }, null)]
  26487. });
  26488. }
  26489. });
  26490. function HX(t, e, n) {
  26491. let r;
  26492. switch (e = typeof e == "number" ? `${e}px` : e, n = typeof n == "number" ? `${n}px` : n, t) {
  26493. case "top":
  26494. r = {
  26495. left: "50%",
  26496. transform: "translateX(-50%)",
  26497. right: "auto",
  26498. top: e,
  26499. bottom: "auto"
  26500. };
  26501. break;
  26502. case "topLeft":
  26503. r = {
  26504. left: 0,
  26505. top: e,
  26506. bottom: "auto"
  26507. };
  26508. break;
  26509. case "topRight":
  26510. r = {
  26511. right: 0,
  26512. top: e,
  26513. bottom: "auto"
  26514. };
  26515. break;
  26516. case "bottom":
  26517. r = {
  26518. left: "50%",
  26519. transform: "translateX(-50%)",
  26520. right: "auto",
  26521. top: "auto",
  26522. bottom: n
  26523. };
  26524. break;
  26525. case "bottomLeft":
  26526. r = {
  26527. left: 0,
  26528. top: "auto",
  26529. bottom: n
  26530. };
  26531. break;
  26532. default:
  26533. r = {
  26534. right: 0,
  26535. top: "auto",
  26536. bottom: n
  26537. };
  26538. break;
  26539. }
  26540. return r;
  26541. }
  26542. function xwe(t) {
  26543. return {
  26544. name: `${t}-fade`
  26545. };
  26546. }
  26547. var wwe = function(t, e) {
  26548. var n = {};
  26549. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  26550. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  26551. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  26552. return n;
  26553. };
  26554. const q5 = 24, Cwe = 4.5, Twe = te({
  26555. name: "Holder",
  26556. inheritAttrs: !1,
  26557. props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  26558. setup(t, e) {
  26559. let {
  26560. expose: n
  26561. } = e;
  26562. const {
  26563. getPrefixCls: r,
  26564. getPopupContainer: i
  26565. } = It("notification", t), a = L(() => t.prefixCls || r("notification")), o = (d) => {
  26566. var h, p;
  26567. return HX(d, (h = t.top) !== null && h !== void 0 ? h : q5, (p = t.bottom) !== null && p !== void 0 ? p : q5);
  26568. }, [, s] = vD(a), l = () => ye(s.value, {
  26569. [`${a.value}-rtl`]: t.rtl
  26570. }), u = () => xwe(a.value), [c, f] = MX({
  26571. prefixCls: a.value,
  26572. getStyles: o,
  26573. getClassName: l,
  26574. motion: u,
  26575. closable: !0,
  26576. closeIcon: WX(a.value),
  26577. duration: Cwe,
  26578. getContainer: () => {
  26579. var d, h;
  26580. return ((d = t.getPopupContainer) === null || d === void 0 ? void 0 : d.call(t)) || ((h = i.value) === null || h === void 0 ? void 0 : h.call(i)) || document.body;
  26581. },
  26582. maxCount: t.maxCount,
  26583. hashId: s.value,
  26584. onAllRemoved: t.onAllRemoved
  26585. });
  26586. return n(I(I({}, c), {
  26587. prefixCls: a.value,
  26588. hashId: s
  26589. })), f;
  26590. }
  26591. });
  26592. function Pwe(t) {
  26593. const e = ae(null), n = Symbol("notificationHolderKey"), r = (s) => {
  26594. if (!e.value)
  26595. return;
  26596. const {
  26597. open: l,
  26598. prefixCls: u,
  26599. hashId: c
  26600. } = e.value, f = `${u}-notice`, {
  26601. message: d,
  26602. description: h,
  26603. icon: p,
  26604. type: v,
  26605. btn: g,
  26606. class: m
  26607. } = s, y = wwe(s, ["message", "description", "icon", "type", "btn", "class"]);
  26608. return l(I(I({
  26609. placement: "topRight"
  26610. }, y), {
  26611. content: () => M(QX, {
  26612. prefixCls: f,
  26613. icon: typeof p == "function" ? p() : p,
  26614. type: v,
  26615. message: typeof d == "function" ? d() : d,
  26616. description: typeof h == "function" ? h() : h,
  26617. btn: typeof g == "function" ? g() : g
  26618. }, null),
  26619. // @ts-ignore
  26620. class: ye(v && `${f}-${v}`, c, m)
  26621. }));
  26622. }, a = {
  26623. open: r,
  26624. destroy: (s) => {
  26625. var l, u;
  26626. s !== void 0 ? (l = e.value) === null || l === void 0 || l.close(s) : (u = e.value) === null || u === void 0 || u.destroy();
  26627. }
  26628. };
  26629. return ["success", "info", "warning", "error"].forEach((s) => {
  26630. a[s] = (l) => r(I(I({}, l), {
  26631. type: s
  26632. }));
  26633. }), [a, () => M(Twe, j(j({
  26634. key: n
  26635. }, t), {}, {
  26636. ref: e
  26637. }), null)];
  26638. }
  26639. function $we(t) {
  26640. return Pwe(t);
  26641. }
  26642. const _c = {};
  26643. let GX = 4.5, jX = "24px", ZX = "24px", Z2 = "", UX = "topRight", XX = () => document.body, YX = null, U2 = !1, qX;
  26644. function Awe(t) {
  26645. const {
  26646. duration: e,
  26647. placement: n,
  26648. bottom: r,
  26649. top: i,
  26650. getContainer: a,
  26651. closeIcon: o,
  26652. prefixCls: s
  26653. } = t;
  26654. s !== void 0 && (Z2 = s), e !== void 0 && (GX = e), n !== void 0 && (UX = n), r !== void 0 && (ZX = typeof r == "number" ? `${r}px` : r), i !== void 0 && (jX = typeof i == "number" ? `${i}px` : i), a !== void 0 && (XX = a), o !== void 0 && (YX = o), t.rtl !== void 0 && (U2 = t.rtl), t.maxCount !== void 0 && (qX = t.maxCount);
  26655. }
  26656. function Ewe(t, e) {
  26657. let {
  26658. prefixCls: n,
  26659. placement: r = UX,
  26660. getContainer: i = XX,
  26661. top: a,
  26662. bottom: o,
  26663. closeIcon: s = YX,
  26664. appContext: l
  26665. } = t;
  26666. const {
  26667. getPrefixCls: u
  26668. } = Wwe(), c = u("notification", n || Z2), f = `${c}-${r}-${U2}`, d = _c[f];
  26669. if (d) {
  26670. Promise.resolve(d).then((p) => {
  26671. e(p);
  26672. });
  26673. return;
  26674. }
  26675. const h = ye(`${c}-${r}`, {
  26676. [`${c}-rtl`]: U2 === !0
  26677. });
  26678. V1.newInstance({
  26679. name: "notification",
  26680. prefixCls: n || Z2,
  26681. useStyle: vD,
  26682. class: h,
  26683. style: HX(r, a ?? jX, o ?? ZX),
  26684. appContext: l,
  26685. getContainer: i,
  26686. closeIcon: (p) => {
  26687. let {
  26688. prefixCls: v
  26689. } = p;
  26690. return M("span", {
  26691. class: `${v}-close-x`
  26692. }, [Ld(s, {}, M(al, {
  26693. class: `${v}-close-icon`
  26694. }, null))]);
  26695. },
  26696. maxCount: qX,
  26697. hasTransitionName: !0
  26698. }, (p) => {
  26699. _c[f] = p, e(p);
  26700. });
  26701. }
  26702. const Mwe = {
  26703. success: JI,
  26704. info: fx,
  26705. error: tD,
  26706. warning: eD
  26707. };
  26708. function Iwe(t) {
  26709. const {
  26710. icon: e,
  26711. type: n,
  26712. description: r,
  26713. message: i,
  26714. btn: a
  26715. } = t, o = t.duration === void 0 ? GX : t.duration;
  26716. Ewe(t, (s) => {
  26717. s.notice({
  26718. content: (l) => {
  26719. let {
  26720. prefixCls: u
  26721. } = l;
  26722. const c = `${u}-notice`;
  26723. let f = null;
  26724. if (e)
  26725. f = () => M("span", {
  26726. class: `${c}-icon`
  26727. }, [Ld(e)]);
  26728. else if (n) {
  26729. const d = Mwe[n];
  26730. f = () => M(d, {
  26731. class: `${c}-icon ${c}-icon-${n}`
  26732. }, null);
  26733. }
  26734. return M("div", {
  26735. class: f ? `${c}-with-icon` : ""
  26736. }, [f && f(), M("div", {
  26737. class: `${c}-message`
  26738. }, [!r && f ? M("span", {
  26739. class: `${c}-message-single-line-auto-margin`
  26740. }, null) : null, Ld(i)]), M("div", {
  26741. class: `${c}-description`
  26742. }, [Ld(r)]), a ? M("span", {
  26743. class: `${c}-btn`
  26744. }, [Ld(a)]) : null]);
  26745. },
  26746. duration: o,
  26747. closable: !0,
  26748. onClose: t.onClose,
  26749. onClick: t.onClick,
  26750. key: t.key,
  26751. style: t.style || {},
  26752. class: t.class
  26753. });
  26754. });
  26755. }
  26756. const Ah = {
  26757. open: Iwe,
  26758. close(t) {
  26759. Object.keys(_c).forEach((e) => Promise.resolve(_c[e]).then((n) => {
  26760. n.removeNotice(t);
  26761. }));
  26762. },
  26763. config: Awe,
  26764. destroy() {
  26765. Object.keys(_c).forEach((t) => {
  26766. Promise.resolve(_c[t]).then((e) => {
  26767. e.destroy();
  26768. }), delete _c[t];
  26769. });
  26770. }
  26771. }, Dwe = ["success", "info", "warning", "error"];
  26772. Dwe.forEach((t) => {
  26773. Ah[t] = (e) => Ah.open(I(I({}, e), {
  26774. type: t
  26775. }));
  26776. });
  26777. Ah.warn = Ah.warning;
  26778. Ah.useNotification = $we;
  26779. const Rwe = `-ant-${Date.now()}-${Math.random()}`;
  26780. function kwe(t, e) {
  26781. const n = {}, r = (o, s) => {
  26782. let l = o.clone();
  26783. return l = (s == null ? void 0 : s(l)) || l, l.toRgbString();
  26784. }, i = (o, s) => {
  26785. const l = new en(o), u = ff(l.toRgbString());
  26786. n[`${s}-color`] = r(l), n[`${s}-color-disabled`] = u[1], n[`${s}-color-hover`] = u[4], n[`${s}-color-active`] = u[6], n[`${s}-color-outline`] = l.clone().setAlpha(0.2).toRgbString(), n[`${s}-color-deprecated-bg`] = u[0], n[`${s}-color-deprecated-border`] = u[2];
  26787. };
  26788. if (e.primaryColor) {
  26789. i(e.primaryColor, "primary");
  26790. const o = new en(e.primaryColor), s = ff(o.toRgbString());
  26791. s.forEach((u, c) => {
  26792. n[`primary-${c + 1}`] = u;
  26793. }), n["primary-color-deprecated-l-35"] = r(o, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = r(o, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = r(o, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = r(o, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = r(o, (u) => u.setAlpha(u.getAlpha() * 0.12));
  26794. const l = new en(s[0]);
  26795. n["primary-color-active-deprecated-f-30"] = r(l, (u) => u.setAlpha(u.getAlpha() * 0.3)), n["primary-color-active-deprecated-d-02"] = r(l, (u) => u.darken(2));
  26796. }
  26797. return e.successColor && i(e.successColor, "success"), e.warningColor && i(e.warningColor, "warning"), e.errorColor && i(e.errorColor, "error"), e.infoColor && i(e.infoColor, "info"), `
  26798. :root {
  26799. ${Object.keys(n).map((o) => `--${t}-${o}: ${n[o]};`).join(`
  26800. `)}
  26801. }
  26802. `.trim();
  26803. }
  26804. function Lwe(t, e) {
  26805. const n = kwe(t, e);
  26806. wa() ? Yg(n, `${Rwe}-dynamic-theme`) : Xr(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
  26807. }
  26808. const Nwe = (t) => {
  26809. const [e, n] = ap();
  26810. return d2(L(() => ({
  26811. theme: e.value,
  26812. token: n.value,
  26813. hashId: "",
  26814. path: ["ant-design-icons", t.value]
  26815. })), () => [{
  26816. [`.${t.value}`]: I(I({}, ip()), {
  26817. [`.${t.value} .${t.value}-icon`]: {
  26818. display: "block"
  26819. }
  26820. })
  26821. }]);
  26822. };
  26823. function Bwe(t, e) {
  26824. const n = L(() => (t == null ? void 0 : t.value) || {}), r = L(() => n.value.inherit === !1 || !(e != null && e.value) ? Vj : e.value);
  26825. return L(() => {
  26826. if (!(t != null && t.value))
  26827. return e == null ? void 0 : e.value;
  26828. const a = I({}, r.value.components);
  26829. return Object.keys(t.value.components || {}).forEach((o) => {
  26830. a[o] = I(I({}, a[o]), t.value.components[o]);
  26831. }), I(I(I({}, r.value), n.value), {
  26832. token: I(I({}, r.value.token), n.value.token),
  26833. components: a
  26834. });
  26835. });
  26836. }
  26837. var zwe = function(t, e) {
  26838. var n = {};
  26839. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  26840. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  26841. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  26842. return n;
  26843. };
  26844. const Vwe = "ant";
  26845. function Ud() {
  26846. return hr.prefixCls || Vwe;
  26847. }
  26848. function KX() {
  26849. return hr.iconPrefixCls || iI;
  26850. }
  26851. const gD = tn({}), hr = tn({});
  26852. ht(() => {
  26853. I(hr, gD), hr.prefixCls = Ud(), hr.iconPrefixCls = KX(), hr.getPrefixCls = (t, e) => e || (t ? `${hr.prefixCls}-${t}` : hr.prefixCls), hr.getRootPrefixCls = () => hr.prefixCls ? hr.prefixCls : Ud();
  26854. });
  26855. let PC;
  26856. const Fwe = (t) => {
  26857. PC && PC(), PC = ht(() => {
  26858. I(gD, tn(t)), I(hr, tn(t));
  26859. }), t.theme && Lwe(Ud(), t.theme);
  26860. }, Wwe = () => ({
  26861. getPrefixCls: (t, e) => e || (t ? `${Ud()}-${t}` : Ud()),
  26862. getIconPrefixCls: KX,
  26863. getRootPrefixCls: () => hr.prefixCls ? hr.prefixCls : Ud()
  26864. }), Xd = te({
  26865. compatConfig: {
  26866. MODE: 3
  26867. },
  26868. name: "AConfigProvider",
  26869. inheritAttrs: !1,
  26870. props: kue(),
  26871. setup(t, e) {
  26872. let {
  26873. slots: n
  26874. } = e;
  26875. const r = DS(), i = (E, R) => {
  26876. const {
  26877. prefixCls: N = "ant"
  26878. } = t;
  26879. if (R) return R;
  26880. const V = N || r.getPrefixCls("");
  26881. return E ? `${V}-${E}` : V;
  26882. }, a = L(() => t.iconPrefixCls || r.iconPrefixCls.value || iI), o = L(() => a.value !== r.iconPrefixCls.value), s = L(() => {
  26883. var E;
  26884. return t.csp || ((E = r.csp) === null || E === void 0 ? void 0 : E.value);
  26885. }), l = Nwe(a), u = Bwe(L(() => t.theme), L(() => {
  26886. var E;
  26887. return (E = r.theme) === null || E === void 0 ? void 0 : E.value;
  26888. })), c = (E) => (t.renderEmpty || n.renderEmpty || r.renderEmpty || Pfe)(E), f = L(() => {
  26889. var E, R;
  26890. return (E = t.autoInsertSpaceInButton) !== null && E !== void 0 ? E : (R = r.autoInsertSpaceInButton) === null || R === void 0 ? void 0 : R.value;
  26891. }), d = L(() => {
  26892. var E;
  26893. return t.locale || ((E = r.locale) === null || E === void 0 ? void 0 : E.value);
  26894. });
  26895. se(d, () => {
  26896. gD.locale = d.value;
  26897. }, {
  26898. immediate: !0
  26899. });
  26900. const h = L(() => {
  26901. var E;
  26902. return t.direction || ((E = r.direction) === null || E === void 0 ? void 0 : E.value);
  26903. }), p = L(() => {
  26904. var E, R;
  26905. return (E = t.space) !== null && E !== void 0 ? E : (R = r.space) === null || R === void 0 ? void 0 : R.value;
  26906. }), v = L(() => {
  26907. var E, R;
  26908. return (E = t.virtual) !== null && E !== void 0 ? E : (R = r.virtual) === null || R === void 0 ? void 0 : R.value;
  26909. }), g = L(() => {
  26910. var E, R;
  26911. return (E = t.dropdownMatchSelectWidth) !== null && E !== void 0 ? E : (R = r.dropdownMatchSelectWidth) === null || R === void 0 ? void 0 : R.value;
  26912. }), m = L(() => {
  26913. var E;
  26914. return t.getTargetContainer !== void 0 ? t.getTargetContainer : (E = r.getTargetContainer) === null || E === void 0 ? void 0 : E.value;
  26915. }), y = L(() => {
  26916. var E;
  26917. return t.getPopupContainer !== void 0 ? t.getPopupContainer : (E = r.getPopupContainer) === null || E === void 0 ? void 0 : E.value;
  26918. }), b = L(() => {
  26919. var E;
  26920. return t.pageHeader !== void 0 ? t.pageHeader : (E = r.pageHeader) === null || E === void 0 ? void 0 : E.value;
  26921. }), _ = L(() => {
  26922. var E;
  26923. return t.input !== void 0 ? t.input : (E = r.input) === null || E === void 0 ? void 0 : E.value;
  26924. }), O = L(() => {
  26925. var E;
  26926. return t.pagination !== void 0 ? t.pagination : (E = r.pagination) === null || E === void 0 ? void 0 : E.value;
  26927. }), S = L(() => {
  26928. var E;
  26929. return t.form !== void 0 ? t.form : (E = r.form) === null || E === void 0 ? void 0 : E.value;
  26930. }), x = L(() => {
  26931. var E;
  26932. return t.select !== void 0 ? t.select : (E = r.select) === null || E === void 0 ? void 0 : E.value;
  26933. }), C = L(() => t.componentSize), T = L(() => t.componentDisabled), w = L(() => {
  26934. var E, R;
  26935. return (E = t.wave) !== null && E !== void 0 ? E : (R = r.wave) === null || R === void 0 ? void 0 : R.value;
  26936. }), P = {
  26937. csp: s,
  26938. autoInsertSpaceInButton: f,
  26939. locale: d,
  26940. direction: h,
  26941. space: p,
  26942. virtual: v,
  26943. dropdownMatchSelectWidth: g,
  26944. getPrefixCls: i,
  26945. iconPrefixCls: a,
  26946. theme: L(() => {
  26947. var E, R;
  26948. return (E = u.value) !== null && E !== void 0 ? E : (R = r.theme) === null || R === void 0 ? void 0 : R.value;
  26949. }),
  26950. renderEmpty: c,
  26951. getTargetContainer: m,
  26952. getPopupContainer: y,
  26953. pageHeader: b,
  26954. input: _,
  26955. pagination: O,
  26956. form: S,
  26957. select: x,
  26958. componentSize: C,
  26959. componentDisabled: T,
  26960. transformCellText: L(() => t.transformCellText),
  26961. wave: w
  26962. }, $ = L(() => {
  26963. const E = u.value || {}, {
  26964. algorithm: R,
  26965. token: N
  26966. } = E, V = zwe(E, ["algorithm", "token"]), z = R && (!Array.isArray(R) || R.length > 0) ? xj(R) : void 0;
  26967. return I(I({}, V), {
  26968. theme: z,
  26969. token: I(I({}, zS), N)
  26970. });
  26971. }), A = L(() => {
  26972. var E, R;
  26973. let N = {};
  26974. return d.value && (N = ((E = d.value.Form) === null || E === void 0 ? void 0 : E.defaultValidateMessages) || ((R = zs.Form) === null || R === void 0 ? void 0 : R.defaultValidateMessages) || {}), t.form && t.form.validateMessages && (N = I(I({}, N), t.form.validateMessages)), N;
  26975. });
  26976. Lue(P), Due({
  26977. validateMessages: A
  26978. }), Uj(C), cj(T);
  26979. const D = (E) => {
  26980. var R, N;
  26981. let V = o.value ? l((R = n.default) === null || R === void 0 ? void 0 : R.call(n)) : (N = n.default) === null || N === void 0 ? void 0 : N.call(n);
  26982. if (t.theme) {
  26983. const z = /* @__PURE__ */ function() {
  26984. return V;
  26985. }();
  26986. V = M(Sfe, {
  26987. value: $.value
  26988. }, {
  26989. default: () => [z]
  26990. });
  26991. }
  26992. return M(Xxe, {
  26993. locale: d.value || E,
  26994. ANT_MARK__: j2
  26995. }, {
  26996. default: () => [V]
  26997. });
  26998. };
  26999. return ht(() => {
  27000. h.value && ($h.config({
  27001. rtl: h.value === "rtl"
  27002. }), Ah.config({
  27003. rtl: h.value === "rtl"
  27004. }));
  27005. }), () => M(dj, {
  27006. children: (E, R, N) => D(N)
  27007. }, null);
  27008. }
  27009. });
  27010. Xd.config = Fwe;
  27011. Xd.install = function(t) {
  27012. t.component(Xd.name, Xd);
  27013. };
  27014. const Qwe = (t) => {
  27015. const {
  27016. componentCls: e,
  27017. sizePaddingEdgeHorizontal: n,
  27018. colorSplit: r,
  27019. lineWidth: i
  27020. } = t;
  27021. return {
  27022. [e]: I(I({}, nn(t)), {
  27023. borderBlockStart: `${i}px solid ${r}`,
  27024. // vertical
  27025. "&-vertical": {
  27026. position: "relative",
  27027. top: "-0.06em",
  27028. display: "inline-block",
  27029. height: "0.9em",
  27030. margin: `0 ${t.dividerVerticalGutterMargin}px`,
  27031. verticalAlign: "middle",
  27032. borderTop: 0,
  27033. borderInlineStart: `${i}px solid ${r}`
  27034. },
  27035. "&-horizontal": {
  27036. display: "flex",
  27037. clear: "both",
  27038. width: "100%",
  27039. minWidth: "100%",
  27040. margin: `${t.dividerHorizontalGutterMargin}px 0`
  27041. },
  27042. [`&-horizontal${e}-with-text`]: {
  27043. display: "flex",
  27044. alignItems: "center",
  27045. margin: `${t.dividerHorizontalWithTextGutterMargin}px 0`,
  27046. color: t.colorTextHeading,
  27047. fontWeight: 500,
  27048. fontSize: t.fontSizeLG,
  27049. whiteSpace: "nowrap",
  27050. textAlign: "center",
  27051. borderBlockStart: `0 ${r}`,
  27052. "&::before, &::after": {
  27053. position: "relative",
  27054. width: "50%",
  27055. borderBlockStart: `${i}px solid transparent`,
  27056. // Chrome not accept `inherit` in `border-top`
  27057. borderBlockStartColor: "inherit",
  27058. borderBlockEnd: 0,
  27059. transform: "translateY(50%)",
  27060. content: "''"
  27061. }
  27062. },
  27063. [`&-horizontal${e}-with-text-left`]: {
  27064. "&::before": {
  27065. width: "5%"
  27066. },
  27067. "&::after": {
  27068. width: "95%"
  27069. }
  27070. },
  27071. [`&-horizontal${e}-with-text-right`]: {
  27072. "&::before": {
  27073. width: "95%"
  27074. },
  27075. "&::after": {
  27076. width: "5%"
  27077. }
  27078. },
  27079. [`${e}-inner-text`]: {
  27080. display: "inline-block",
  27081. padding: "0 1em"
  27082. },
  27083. "&-dashed": {
  27084. background: "none",
  27085. borderColor: r,
  27086. borderStyle: "dashed",
  27087. borderWidth: `${i}px 0 0`
  27088. },
  27089. [`&-horizontal${e}-with-text${e}-dashed`]: {
  27090. "&::before, &::after": {
  27091. borderStyle: "dashed none none"
  27092. }
  27093. },
  27094. [`&-vertical${e}-dashed`]: {
  27095. borderInlineStartWidth: i,
  27096. borderInlineEnd: 0,
  27097. borderBlockStart: 0,
  27098. borderBlockEnd: 0
  27099. },
  27100. [`&-plain${e}-with-text`]: {
  27101. color: t.colorText,
  27102. fontWeight: "normal",
  27103. fontSize: t.fontSize
  27104. },
  27105. [`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]: {
  27106. "&::before": {
  27107. width: 0
  27108. },
  27109. "&::after": {
  27110. width: "100%"
  27111. },
  27112. [`${e}-inner-text`]: {
  27113. paddingInlineStart: n
  27114. }
  27115. },
  27116. [`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]: {
  27117. "&::before": {
  27118. width: "100%"
  27119. },
  27120. "&::after": {
  27121. width: 0
  27122. },
  27123. [`${e}-inner-text`]: {
  27124. paddingInlineEnd: n
  27125. }
  27126. }
  27127. })
  27128. };
  27129. }, Hwe = Sn("Divider", (t) => {
  27130. const e = Bt(t, {
  27131. dividerVerticalGutterMargin: t.marginXS,
  27132. dividerHorizontalWithTextGutterMargin: t.margin,
  27133. dividerHorizontalGutterMargin: t.marginLG
  27134. });
  27135. return [Qwe(e)];
  27136. }, {
  27137. sizePaddingEdgeHorizontal: 0
  27138. }), Gwe = () => ({
  27139. prefixCls: String,
  27140. type: {
  27141. type: String,
  27142. default: "horizontal"
  27143. },
  27144. dashed: {
  27145. type: Boolean,
  27146. default: !1
  27147. },
  27148. orientation: {
  27149. type: String,
  27150. default: "center"
  27151. },
  27152. plain: {
  27153. type: Boolean,
  27154. default: !1
  27155. },
  27156. orientationMargin: [String, Number]
  27157. }), jwe = te({
  27158. name: "ADivider",
  27159. inheritAttrs: !1,
  27160. compatConfig: {
  27161. MODE: 3
  27162. },
  27163. props: Gwe(),
  27164. setup(t, e) {
  27165. let {
  27166. slots: n,
  27167. attrs: r
  27168. } = e;
  27169. const {
  27170. prefixCls: i,
  27171. direction: a
  27172. } = It("divider", t), [o, s] = Hwe(i), l = L(() => t.orientation === "left" && t.orientationMargin != null), u = L(() => t.orientation === "right" && t.orientationMargin != null), c = L(() => {
  27173. const {
  27174. type: h,
  27175. dashed: p,
  27176. plain: v
  27177. } = t, g = i.value;
  27178. return {
  27179. [g]: !0,
  27180. [s.value]: !!s.value,
  27181. [`${g}-${h}`]: !0,
  27182. [`${g}-dashed`]: !!p,
  27183. [`${g}-plain`]: !!v,
  27184. [`${g}-rtl`]: a.value === "rtl",
  27185. [`${g}-no-default-orientation-margin-left`]: l.value,
  27186. [`${g}-no-default-orientation-margin-right`]: u.value
  27187. };
  27188. }), f = L(() => {
  27189. const h = typeof t.orientationMargin == "number" ? `${t.orientationMargin}px` : t.orientationMargin;
  27190. return I(I({}, l.value && {
  27191. marginLeft: h
  27192. }), u.value && {
  27193. marginRight: h
  27194. });
  27195. }), d = L(() => t.orientation.length > 0 ? "-" + t.orientation : t.orientation);
  27196. return () => {
  27197. var h;
  27198. const p = Yn((h = n.default) === null || h === void 0 ? void 0 : h.call(n));
  27199. return o(M("div", j(j({}, r), {}, {
  27200. class: [c.value, p.length ? `${i.value}-with-text ${i.value}-with-text${d.value}` : "", r.class],
  27201. role: "separator"
  27202. }), [p.length ? M("span", {
  27203. class: `${i.value}-inner-text`,
  27204. style: f.value
  27205. }, [p]) : null]));
  27206. };
  27207. }
  27208. }), Zwe = np(jwe), hg = (t) => t != null && (Array.isArray(t) ? os(t).length : !0);
  27209. function mD(t) {
  27210. return hg(t.prefix) || hg(t.suffix) || hg(t.allowClear);
  27211. }
  27212. function E_(t) {
  27213. return hg(t.addonBefore) || hg(t.addonAfter);
  27214. }
  27215. function X2(t) {
  27216. return typeof t > "u" || t === null ? "" : String(t);
  27217. }
  27218. function pg(t, e, n, r) {
  27219. if (!n)
  27220. return;
  27221. const i = e;
  27222. if (e.type === "click") {
  27223. Object.defineProperty(i, "target", {
  27224. writable: !0
  27225. }), Object.defineProperty(i, "currentTarget", {
  27226. writable: !0
  27227. });
  27228. const a = t.cloneNode(!0);
  27229. i.target = a, i.currentTarget = a, a.value = "", n(i);
  27230. return;
  27231. }
  27232. if (r !== void 0) {
  27233. Object.defineProperty(i, "target", {
  27234. writable: !0
  27235. }), Object.defineProperty(i, "currentTarget", {
  27236. writable: !0
  27237. }), i.target = t, i.currentTarget = t, t.value = r, n(i);
  27238. return;
  27239. }
  27240. n(i);
  27241. }
  27242. function JX(t, e) {
  27243. if (!t) return;
  27244. t.focus(e);
  27245. const {
  27246. cursor: n
  27247. } = e || {};
  27248. if (n) {
  27249. const r = t.value.length;
  27250. switch (n) {
  27251. case "start":
  27252. t.setSelectionRange(0, 0);
  27253. break;
  27254. case "end":
  27255. t.setSelectionRange(r, r);
  27256. break;
  27257. default:
  27258. t.setSelectionRange(0, r);
  27259. }
  27260. }
  27261. }
  27262. const Uwe = () => ({
  27263. addonBefore: Y.any,
  27264. addonAfter: Y.any,
  27265. prefix: Y.any,
  27266. suffix: Y.any,
  27267. clearIcon: Y.any,
  27268. affixWrapperClassName: String,
  27269. groupClassName: String,
  27270. wrapperClassName: String,
  27271. inputClassName: String,
  27272. allowClear: {
  27273. type: Boolean,
  27274. default: void 0
  27275. }
  27276. }), eY = () => I(I({}, Uwe()), {
  27277. value: {
  27278. type: [String, Number, Symbol],
  27279. default: void 0
  27280. },
  27281. defaultValue: {
  27282. type: [String, Number, Symbol],
  27283. default: void 0
  27284. },
  27285. inputElement: Y.any,
  27286. prefixCls: String,
  27287. disabled: {
  27288. type: Boolean,
  27289. default: void 0
  27290. },
  27291. focused: {
  27292. type: Boolean,
  27293. default: void 0
  27294. },
  27295. triggerFocus: Function,
  27296. readonly: {
  27297. type: Boolean,
  27298. default: void 0
  27299. },
  27300. handleReset: Function,
  27301. hidden: {
  27302. type: Boolean,
  27303. default: void 0
  27304. }
  27305. }), tY = () => I(I({}, eY()), {
  27306. id: String,
  27307. placeholder: {
  27308. type: [String, Number]
  27309. },
  27310. autocomplete: String,
  27311. type: hn("text"),
  27312. name: String,
  27313. size: {
  27314. type: String
  27315. },
  27316. autofocus: {
  27317. type: Boolean,
  27318. default: void 0
  27319. },
  27320. lazy: {
  27321. type: Boolean,
  27322. default: !0
  27323. },
  27324. maxlength: Number,
  27325. loading: {
  27326. type: Boolean,
  27327. default: void 0
  27328. },
  27329. bordered: {
  27330. type: Boolean,
  27331. default: void 0
  27332. },
  27333. showCount: {
  27334. type: [Boolean, Object]
  27335. },
  27336. htmlSize: Number,
  27337. onPressEnter: Function,
  27338. onKeydown: Function,
  27339. onKeyup: Function,
  27340. onFocus: Function,
  27341. onBlur: Function,
  27342. onChange: Function,
  27343. onInput: Function,
  27344. "onUpdate:value": Function,
  27345. onCompositionstart: Function,
  27346. onCompositionend: Function,
  27347. valueModifiers: Object,
  27348. hidden: {
  27349. type: Boolean,
  27350. default: void 0
  27351. },
  27352. status: String
  27353. }), Xwe = te({
  27354. name: "BaseInput",
  27355. inheritAttrs: !1,
  27356. props: eY(),
  27357. setup(t, e) {
  27358. let {
  27359. slots: n,
  27360. attrs: r
  27361. } = e;
  27362. const i = U(), a = (s) => {
  27363. var l;
  27364. if (!((l = i.value) === null || l === void 0) && l.contains(s.target)) {
  27365. const {
  27366. triggerFocus: u
  27367. } = t;
  27368. u == null || u();
  27369. }
  27370. }, o = () => {
  27371. var s;
  27372. const {
  27373. allowClear: l,
  27374. value: u,
  27375. disabled: c,
  27376. readonly: f,
  27377. handleReset: d,
  27378. suffix: h = n.suffix,
  27379. prefixCls: p
  27380. } = t;
  27381. if (!l)
  27382. return null;
  27383. const v = !c && !f && u, g = `${p}-clear-icon`, m = ((s = n.clearIcon) === null || s === void 0 ? void 0 : s.call(n)) || "*";
  27384. return M("span", {
  27385. onClick: d,
  27386. onMousedown: (y) => y.preventDefault(),
  27387. class: ye({
  27388. [`${g}-hidden`]: !v,
  27389. [`${g}-has-suffix`]: !!h
  27390. }, g),
  27391. role: "button",
  27392. tabindex: -1
  27393. }, [m]);
  27394. };
  27395. return () => {
  27396. var s, l;
  27397. const {
  27398. focused: u,
  27399. value: c,
  27400. disabled: f,
  27401. allowClear: d,
  27402. readonly: h,
  27403. hidden: p,
  27404. prefixCls: v,
  27405. prefix: g = (s = n.prefix) === null || s === void 0 ? void 0 : s.call(n),
  27406. suffix: m = (l = n.suffix) === null || l === void 0 ? void 0 : l.call(n),
  27407. addonAfter: y = n.addonAfter,
  27408. addonBefore: b = n.addonBefore,
  27409. inputElement: _,
  27410. affixWrapperClassName: O,
  27411. wrapperClassName: S,
  27412. groupClassName: x
  27413. } = t;
  27414. let C = Pn(_, {
  27415. value: c,
  27416. hidden: p
  27417. });
  27418. if (mD({
  27419. prefix: g,
  27420. suffix: m,
  27421. allowClear: d
  27422. })) {
  27423. const T = `${v}-affix-wrapper`, w = ye(T, {
  27424. [`${T}-disabled`]: f,
  27425. [`${T}-focused`]: u,
  27426. [`${T}-readonly`]: h,
  27427. [`${T}-input-with-clear-btn`]: m && d && c
  27428. }, !E_({
  27429. addonAfter: y,
  27430. addonBefore: b
  27431. }) && r.class, O), P = (m || d) && M("span", {
  27432. class: `${v}-suffix`
  27433. }, [o(), m]);
  27434. C = M("span", {
  27435. class: w,
  27436. style: r.style,
  27437. hidden: !E_({
  27438. addonAfter: y,
  27439. addonBefore: b
  27440. }) && p,
  27441. onMousedown: a,
  27442. ref: i
  27443. }, [g && M("span", {
  27444. class: `${v}-prefix`
  27445. }, [g]), Pn(_, {
  27446. style: null,
  27447. value: c,
  27448. hidden: null
  27449. }), P]);
  27450. }
  27451. if (E_({
  27452. addonAfter: y,
  27453. addonBefore: b
  27454. })) {
  27455. const T = `${v}-group`, w = `${T}-addon`, P = ye(`${v}-wrapper`, T, S), $ = ye(`${v}-group-wrapper`, r.class, x);
  27456. return M("span", {
  27457. class: $,
  27458. style: r.style,
  27459. hidden: p
  27460. }, [M("span", {
  27461. class: P
  27462. }, [b && M("span", {
  27463. class: w
  27464. }, [b]), Pn(C, {
  27465. style: null,
  27466. hidden: null
  27467. }), y && M("span", {
  27468. class: w
  27469. }, [y])])]);
  27470. }
  27471. return C;
  27472. };
  27473. }
  27474. });
  27475. var Ywe = function(t, e) {
  27476. var n = {};
  27477. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27478. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27479. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27480. return n;
  27481. };
  27482. const qwe = te({
  27483. name: "VCInput",
  27484. inheritAttrs: !1,
  27485. props: tY(),
  27486. setup(t, e) {
  27487. let {
  27488. slots: n,
  27489. attrs: r,
  27490. expose: i,
  27491. emit: a
  27492. } = e;
  27493. const o = ae(t.value === void 0 ? t.defaultValue : t.value), s = ae(!1), l = ae(), u = ae();
  27494. se(() => t.value, () => {
  27495. o.value = t.value;
  27496. }), se(() => t.disabled, () => {
  27497. t.disabled && (s.value = !1);
  27498. });
  27499. const c = (x) => {
  27500. l.value && JX(l.value.input, x);
  27501. }, f = () => {
  27502. var x;
  27503. (x = l.value.input) === null || x === void 0 || x.blur();
  27504. }, d = (x, C, T) => {
  27505. var w;
  27506. (w = l.value.input) === null || w === void 0 || w.setSelectionRange(x, C, T);
  27507. }, h = () => {
  27508. var x;
  27509. (x = l.value.input) === null || x === void 0 || x.select();
  27510. };
  27511. i({
  27512. focus: c,
  27513. blur: f,
  27514. input: L(() => {
  27515. var x;
  27516. return (x = l.value.input) === null || x === void 0 ? void 0 : x.input;
  27517. }),
  27518. stateValue: o,
  27519. setSelectionRange: d,
  27520. select: h
  27521. });
  27522. const p = (x) => {
  27523. a("change", x);
  27524. }, v = (x, C) => {
  27525. o.value !== x && (t.value === void 0 ? o.value = x : Tt(() => {
  27526. var T;
  27527. l.value.input.value !== o.value && ((T = u.value) === null || T === void 0 || T.$forceUpdate());
  27528. }), Tt(() => {
  27529. C && C();
  27530. }));
  27531. }, g = (x) => {
  27532. const {
  27533. value: C
  27534. } = x.target;
  27535. if (o.value === C) return;
  27536. const T = x.target.value;
  27537. pg(l.value.input, x, p), v(T);
  27538. }, m = (x) => {
  27539. x.keyCode === 13 && a("pressEnter", x), a("keydown", x);
  27540. }, y = (x) => {
  27541. s.value = !0, a("focus", x);
  27542. }, b = (x) => {
  27543. s.value = !1, a("blur", x);
  27544. }, _ = (x) => {
  27545. pg(l.value.input, x, p), v("", () => {
  27546. c();
  27547. });
  27548. }, O = () => {
  27549. var x, C;
  27550. const {
  27551. addonBefore: T = n.addonBefore,
  27552. addonAfter: w = n.addonAfter,
  27553. disabled: P,
  27554. valueModifiers: $ = {},
  27555. htmlSize: A,
  27556. autocomplete: D,
  27557. prefixCls: E,
  27558. inputClassName: R,
  27559. prefix: N = (x = n.prefix) === null || x === void 0 ? void 0 : x.call(n),
  27560. suffix: V = (C = n.suffix) === null || C === void 0 ? void 0 : C.call(n),
  27561. allowClear: z,
  27562. type: W = "text"
  27563. } = t, F = or(t, [
  27564. "prefixCls",
  27565. "onPressEnter",
  27566. "addonBefore",
  27567. "addonAfter",
  27568. "prefix",
  27569. "suffix",
  27570. "allowClear",
  27571. // Input elements must be either controlled or uncontrolled,
  27572. // specify either the value prop, or the defaultValue prop, but not both.
  27573. "defaultValue",
  27574. "size",
  27575. "bordered",
  27576. "htmlSize",
  27577. "lazy",
  27578. "showCount",
  27579. "valueModifiers",
  27580. "showCount",
  27581. "affixWrapperClassName",
  27582. "groupClassName",
  27583. "inputClassName",
  27584. "wrapperClassName"
  27585. ]), Q = I(I(I({}, F), r), {
  27586. autocomplete: D,
  27587. onChange: g,
  27588. onInput: g,
  27589. onFocus: y,
  27590. onBlur: b,
  27591. onKeydown: m,
  27592. class: ye(E, {
  27593. [`${E}-disabled`]: P
  27594. }, R, !E_({
  27595. addonAfter: w,
  27596. addonBefore: T
  27597. }) && !mD({
  27598. prefix: N,
  27599. suffix: V,
  27600. allowClear: z
  27601. }) && r.class),
  27602. ref: l,
  27603. key: "ant-input",
  27604. size: A,
  27605. type: W,
  27606. lazy: t.lazy
  27607. });
  27608. return $.lazy && delete Q.onInput, Q.autofocus || delete Q.autofocus, M(TI, or(Q, ["size"]), null);
  27609. }, S = () => {
  27610. var x;
  27611. const {
  27612. maxlength: C,
  27613. suffix: T = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n),
  27614. showCount: w,
  27615. prefixCls: P
  27616. } = t, $ = Number(C) > 0;
  27617. if (T || w) {
  27618. const A = [...X2(o.value)].length, D = typeof w == "object" ? w.formatter({
  27619. count: A,
  27620. maxlength: C
  27621. }) : `${A}${$ ? ` / ${C}` : ""}`;
  27622. return M(wt, null, [!!w && M("span", {
  27623. class: ye(`${P}-show-count-suffix`, {
  27624. [`${P}-show-count-has-suffix`]: !!T
  27625. })
  27626. }, [D]), T]);
  27627. }
  27628. return null;
  27629. };
  27630. return it(() => {
  27631. process.env.NODE_ENV === "test" && t.autofocus && c();
  27632. }), () => {
  27633. const {
  27634. prefixCls: x,
  27635. disabled: C
  27636. } = t, T = Ywe(t, ["prefixCls", "disabled"]);
  27637. return M(Xwe, j(j(j({}, T), r), {}, {
  27638. ref: u,
  27639. prefixCls: x,
  27640. inputElement: O(),
  27641. handleReset: _,
  27642. value: X2(o.value),
  27643. focused: s.value,
  27644. triggerFocus: c,
  27645. suffix: S(),
  27646. disabled: C
  27647. }), n);
  27648. };
  27649. }
  27650. }), Sx = () => or(tY(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), nY = () => I(I({}, or(Sx(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  27651. rows: Number,
  27652. autosize: {
  27653. type: [Boolean, Object],
  27654. default: void 0
  27655. },
  27656. autoSize: {
  27657. type: [Boolean, Object],
  27658. default: void 0
  27659. },
  27660. onResize: {
  27661. type: Function
  27662. },
  27663. onCompositionstart: g1(),
  27664. onCompositionend: g1(),
  27665. valueModifiers: Object
  27666. });
  27667. var Kwe = function(t, e) {
  27668. var n = {};
  27669. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27670. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27671. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27672. return n;
  27673. };
  27674. const Hn = te({
  27675. compatConfig: {
  27676. MODE: 3
  27677. },
  27678. name: "AInput",
  27679. inheritAttrs: !1,
  27680. props: Sx(),
  27681. setup(t, e) {
  27682. let {
  27683. slots: n,
  27684. attrs: r,
  27685. expose: i,
  27686. emit: a
  27687. } = e;
  27688. const o = U(), s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), {
  27689. direction: c,
  27690. prefixCls: f,
  27691. size: d,
  27692. autocomplete: h
  27693. } = It("input", t), {
  27694. compactSize: p,
  27695. compactItemClassnames: v
  27696. } = sx(f, c), g = L(() => p.value || d.value), [m, y] = lD(f), b = Ko();
  27697. i({
  27698. focus: (A) => {
  27699. var D;
  27700. (D = o.value) === null || D === void 0 || D.focus(A);
  27701. },
  27702. blur: () => {
  27703. var A;
  27704. (A = o.value) === null || A === void 0 || A.blur();
  27705. },
  27706. input: o,
  27707. setSelectionRange: (A, D, E) => {
  27708. var R;
  27709. (R = o.value) === null || R === void 0 || R.setSelectionRange(A, D, E);
  27710. },
  27711. select: () => {
  27712. var A;
  27713. (A = o.value) === null || A === void 0 || A.select();
  27714. }
  27715. });
  27716. const C = U([]), T = () => {
  27717. C.value.push(setTimeout(() => {
  27718. var A, D, E, R;
  27719. !((A = o.value) === null || A === void 0) && A.input && ((D = o.value) === null || D === void 0 ? void 0 : D.input.getAttribute("type")) === "password" && (!((E = o.value) === null || E === void 0) && E.input.hasAttribute("value")) && ((R = o.value) === null || R === void 0 || R.input.removeAttribute("value"));
  27720. }));
  27721. };
  27722. it(() => {
  27723. T();
  27724. }), GG(() => {
  27725. C.value.forEach((A) => clearTimeout(A));
  27726. }), yt(() => {
  27727. C.value.forEach((A) => clearTimeout(A));
  27728. });
  27729. const w = (A) => {
  27730. T(), a("blur", A), s.onFieldBlur();
  27731. }, P = (A) => {
  27732. T(), a("focus", A);
  27733. }, $ = (A) => {
  27734. a("update:value", A.target.value), a("change", A), a("input", A), s.onFieldChange();
  27735. };
  27736. return () => {
  27737. var A, D, E, R, N, V;
  27738. const {
  27739. hasFeedback: z,
  27740. feedbackIcon: W
  27741. } = l, {
  27742. allowClear: F,
  27743. bordered: Q = !0,
  27744. prefix: Z = (A = n.prefix) === null || A === void 0 ? void 0 : A.call(n),
  27745. suffix: ne = (D = n.suffix) === null || D === void 0 ? void 0 : D.call(n),
  27746. addonAfter: ee = (E = n.addonAfter) === null || E === void 0 ? void 0 : E.call(n),
  27747. addonBefore: oe = (R = n.addonBefore) === null || R === void 0 ? void 0 : R.call(n),
  27748. id: K = (N = s.id) === null || N === void 0 ? void 0 : N.value
  27749. } = t, ie = Kwe(t, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), X = (z || ne) && M(wt, null, [ne, z && W]), H = f.value, G = mD({
  27750. prefix: Z,
  27751. suffix: ne
  27752. }) || !!z, re = n.clearIcon || (() => M(Da, null, null));
  27753. return m(M(qwe, j(j(j({}, r), or(ie, ["onUpdate:value", "onChange", "onInput"])), {}, {
  27754. onChange: $,
  27755. id: K,
  27756. disabled: (V = t.disabled) !== null && V !== void 0 ? V : b.value,
  27757. ref: o,
  27758. prefixCls: H,
  27759. autocomplete: h.value,
  27760. onBlur: w,
  27761. onFocus: P,
  27762. prefix: Z,
  27763. suffix: X,
  27764. allowClear: F,
  27765. addonAfter: ee && M(E1, null, {
  27766. default: () => [M(P1, null, {
  27767. default: () => [ee]
  27768. })]
  27769. }),
  27770. addonBefore: oe && M(E1, null, {
  27771. default: () => [M(P1, null, {
  27772. default: () => [oe]
  27773. })]
  27774. }),
  27775. class: [r.class, v.value],
  27776. inputClassName: ye({
  27777. [`${H}-sm`]: g.value === "small",
  27778. [`${H}-lg`]: g.value === "large",
  27779. [`${H}-rtl`]: c.value === "rtl",
  27780. [`${H}-borderless`]: !Q
  27781. }, !G && Is(H, u.value), y.value),
  27782. affixWrapperClassName: ye({
  27783. [`${H}-affix-wrapper-sm`]: g.value === "small",
  27784. [`${H}-affix-wrapper-lg`]: g.value === "large",
  27785. [`${H}-affix-wrapper-rtl`]: c.value === "rtl",
  27786. [`${H}-affix-wrapper-borderless`]: !Q
  27787. }, Is(`${H}-affix-wrapper`, u.value, z), y.value),
  27788. wrapperClassName: ye({
  27789. [`${H}-group-rtl`]: c.value === "rtl"
  27790. }, y.value),
  27791. groupClassName: ye({
  27792. [`${H}-group-wrapper-sm`]: g.value === "small",
  27793. [`${H}-group-wrapper-lg`]: g.value === "large",
  27794. [`${H}-group-wrapper-rtl`]: c.value === "rtl"
  27795. }, Is(`${H}-group-wrapper`, u.value, z), y.value)
  27796. }), I(I({}, n), {
  27797. clearIcon: re
  27798. })));
  27799. };
  27800. }
  27801. }), Jwe = te({
  27802. compatConfig: {
  27803. MODE: 3
  27804. },
  27805. name: "AInputGroup",
  27806. inheritAttrs: !1,
  27807. props: {
  27808. prefixCls: String,
  27809. size: {
  27810. type: String
  27811. },
  27812. compact: {
  27813. type: Boolean,
  27814. default: void 0
  27815. }
  27816. },
  27817. setup(t, e) {
  27818. let {
  27819. slots: n,
  27820. attrs: r
  27821. } = e;
  27822. const {
  27823. prefixCls: i,
  27824. direction: a,
  27825. getPrefixCls: o
  27826. } = It("input-group", t), s = ro.useInject();
  27827. ro.useProvide(s, {
  27828. isFormItemInput: !1
  27829. });
  27830. const l = L(() => o("input")), [u, c] = lD(l), f = L(() => {
  27831. const d = i.value;
  27832. return {
  27833. [`${d}`]: !0,
  27834. [c.value]: !0,
  27835. [`${d}-lg`]: t.size === "large",
  27836. [`${d}-sm`]: t.size === "small",
  27837. [`${d}-compact`]: t.compact,
  27838. [`${d}-rtl`]: a.value === "rtl"
  27839. };
  27840. });
  27841. return () => {
  27842. var d;
  27843. return u(M("span", j(j({}, r), {}, {
  27844. class: ye(f.value, r.class)
  27845. }), [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]));
  27846. };
  27847. }
  27848. });
  27849. var eCe = function(t, e) {
  27850. var n = {};
  27851. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  27852. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  27853. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  27854. return n;
  27855. };
  27856. const tCe = te({
  27857. compatConfig: {
  27858. MODE: 3
  27859. },
  27860. name: "AInputSearch",
  27861. inheritAttrs: !1,
  27862. props: I(I({}, Sx()), {
  27863. inputPrefixCls: String,
  27864. // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
  27865. enterButton: Y.any,
  27866. onSearch: {
  27867. type: Function
  27868. }
  27869. }),
  27870. setup(t, e) {
  27871. let {
  27872. slots: n,
  27873. attrs: r,
  27874. expose: i,
  27875. emit: a
  27876. } = e;
  27877. const o = ae(), s = ae(!1);
  27878. i({
  27879. focus: () => {
  27880. var O;
  27881. (O = o.value) === null || O === void 0 || O.focus();
  27882. },
  27883. blur: () => {
  27884. var O;
  27885. (O = o.value) === null || O === void 0 || O.blur();
  27886. }
  27887. });
  27888. const c = (O) => {
  27889. a("update:value", O.target.value), O && O.target && O.type === "click" && a("search", O.target.value, O), a("change", O);
  27890. }, f = (O) => {
  27891. var S;
  27892. document.activeElement === ((S = o.value) === null || S === void 0 ? void 0 : S.input) && O.preventDefault();
  27893. }, d = (O) => {
  27894. var S, x;
  27895. a("search", (x = (S = o.value) === null || S === void 0 ? void 0 : S.input) === null || x === void 0 ? void 0 : x.stateValue, O);
  27896. }, h = (O) => {
  27897. s.value || t.loading || d(O);
  27898. }, p = (O) => {
  27899. s.value = !0, a("compositionstart", O);
  27900. }, v = (O) => {
  27901. s.value = !1, a("compositionend", O);
  27902. }, {
  27903. prefixCls: g,
  27904. getPrefixCls: m,
  27905. direction: y,
  27906. size: b
  27907. } = It("input-search", t), _ = L(() => m("input", t.inputPrefixCls));
  27908. return () => {
  27909. var O, S, x, C;
  27910. const {
  27911. disabled: T,
  27912. loading: w,
  27913. addonAfter: P = (O = n.addonAfter) === null || O === void 0 ? void 0 : O.call(n),
  27914. suffix: $ = (S = n.suffix) === null || S === void 0 ? void 0 : S.call(n)
  27915. } = t, A = eCe(t, ["disabled", "loading", "addonAfter", "suffix"]);
  27916. let {
  27917. enterButton: D = (C = (x = n.enterButton) === null || x === void 0 ? void 0 : x.call(n)) !== null && C !== void 0 ? C : !1
  27918. } = t;
  27919. D = D || D === "";
  27920. const E = typeof D == "boolean" ? M(nx, null, null) : null, R = `${g.value}-button`, N = Array.isArray(D) ? D[0] : D;
  27921. let V;
  27922. const z = N.type && jI(N.type) && N.type.__ANT_BUTTON;
  27923. if (z || N.tagName === "button")
  27924. V = Pn(N, I({
  27925. onMousedown: f,
  27926. onClick: d,
  27927. key: "enterButton"
  27928. }, z ? {
  27929. class: R,
  27930. size: b.value
  27931. } : {}), !1);
  27932. else {
  27933. const F = E && !D;
  27934. V = M(Ur, {
  27935. class: R,
  27936. type: D ? "primary" : void 0,
  27937. size: b.value,
  27938. disabled: T,
  27939. key: "enterButton",
  27940. onMousedown: f,
  27941. onClick: d,
  27942. loading: w,
  27943. icon: F ? E : null
  27944. }, {
  27945. default: () => [F ? null : E || D]
  27946. });
  27947. }
  27948. P && (V = [V, P]);
  27949. const W = ye(g.value, {
  27950. [`${g.value}-rtl`]: y.value === "rtl",
  27951. [`${g.value}-${b.value}`]: !!b.value,
  27952. [`${g.value}-with-button`]: !!D
  27953. }, r.class);
  27954. return M(Hn, j(j(j({
  27955. ref: o
  27956. }, or(A, ["onUpdate:value", "onSearch", "enterButton"])), r), {}, {
  27957. onPressEnter: h,
  27958. onCompositionstart: p,
  27959. onCompositionend: v,
  27960. size: b.value,
  27961. prefixCls: _.value,
  27962. addonAfter: V,
  27963. suffix: $,
  27964. onChange: c,
  27965. class: W,
  27966. disabled: T
  27967. }), n);
  27968. };
  27969. }
  27970. }), K5 = (t) => t != null && (Array.isArray(t) ? os(t).length : !0);
  27971. function nCe(t) {
  27972. return K5(t.addonBefore) || K5(t.addonAfter);
  27973. }
  27974. const rCe = ["text", "input"], iCe = te({
  27975. compatConfig: {
  27976. MODE: 3
  27977. },
  27978. name: "ClearableLabeledInput",
  27979. inheritAttrs: !1,
  27980. props: {
  27981. prefixCls: String,
  27982. inputType: Y.oneOf(ru("text", "input")),
  27983. value: fa(),
  27984. defaultValue: fa(),
  27985. allowClear: {
  27986. type: Boolean,
  27987. default: void 0
  27988. },
  27989. element: fa(),
  27990. handleReset: Function,
  27991. disabled: {
  27992. type: Boolean,
  27993. default: void 0
  27994. },
  27995. direction: {
  27996. type: String
  27997. },
  27998. size: {
  27999. type: String
  28000. },
  28001. suffix: fa(),
  28002. prefix: fa(),
  28003. addonBefore: fa(),
  28004. addonAfter: fa(),
  28005. readonly: {
  28006. type: Boolean,
  28007. default: void 0
  28008. },
  28009. focused: {
  28010. type: Boolean,
  28011. default: void 0
  28012. },
  28013. bordered: {
  28014. type: Boolean,
  28015. default: !0
  28016. },
  28017. triggerFocus: {
  28018. type: Function
  28019. },
  28020. hidden: Boolean,
  28021. status: String,
  28022. hashId: String
  28023. },
  28024. setup(t, e) {
  28025. let {
  28026. slots: n,
  28027. attrs: r
  28028. } = e;
  28029. const i = ro.useInject(), a = (s) => {
  28030. const {
  28031. value: l,
  28032. disabled: u,
  28033. readonly: c,
  28034. handleReset: f,
  28035. suffix: d = n.suffix
  28036. } = t, h = !u && !c && l, p = `${s}-clear-icon`;
  28037. return M(Da, {
  28038. onClick: f,
  28039. onMousedown: (v) => v.preventDefault(),
  28040. class: ye({
  28041. [`${p}-hidden`]: !h,
  28042. [`${p}-has-suffix`]: !!d
  28043. }, p),
  28044. role: "button"
  28045. }, null);
  28046. }, o = (s, l) => {
  28047. const {
  28048. value: u,
  28049. allowClear: c,
  28050. direction: f,
  28051. bordered: d,
  28052. hidden: h,
  28053. status: p,
  28054. addonAfter: v = n.addonAfter,
  28055. addonBefore: g = n.addonBefore,
  28056. hashId: m
  28057. } = t, {
  28058. status: y,
  28059. hasFeedback: b
  28060. } = i;
  28061. if (!c)
  28062. return Pn(l, {
  28063. value: u,
  28064. disabled: t.disabled
  28065. });
  28066. const _ = ye(`${s}-affix-wrapper`, `${s}-affix-wrapper-textarea-with-clear-btn`, Is(`${s}-affix-wrapper`, m0(y, p), b), {
  28067. [`${s}-affix-wrapper-rtl`]: f === "rtl",
  28068. [`${s}-affix-wrapper-borderless`]: !d,
  28069. // className will go to addon wrapper
  28070. [`${r.class}`]: !nCe({
  28071. addonAfter: v,
  28072. addonBefore: g
  28073. }) && r.class
  28074. }, m);
  28075. return M("span", {
  28076. class: _,
  28077. style: r.style,
  28078. hidden: h
  28079. }, [Pn(l, {
  28080. style: null,
  28081. value: u,
  28082. disabled: t.disabled
  28083. }), a(s)]);
  28084. };
  28085. return () => {
  28086. var s;
  28087. const {
  28088. prefixCls: l,
  28089. inputType: u,
  28090. element: c = (s = n.element) === null || s === void 0 ? void 0 : s.call(n)
  28091. } = t;
  28092. return u === rCe[0] ? o(l, c) : null;
  28093. };
  28094. }
  28095. }), aCe = `
  28096. min-height:0 !important;
  28097. max-height:none !important;
  28098. height:0 !important;
  28099. visibility:hidden !important;
  28100. overflow:hidden !important;
  28101. position:absolute !important;
  28102. z-index:-1000 !important;
  28103. top:0 !important;
  28104. right:0 !important;
  28105. pointer-events: none !important;
  28106. `, oCe = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], $C = {};
  28107. let Ji;
  28108. function sCe(t) {
  28109. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  28110. const n = t.getAttribute("id") || t.getAttribute("data-reactid") || t.getAttribute("name");
  28111. if (e && $C[n])
  28112. return $C[n];
  28113. const r = window.getComputedStyle(t), i = r.getPropertyValue("box-sizing") || r.getPropertyValue("-moz-box-sizing") || r.getPropertyValue("-webkit-box-sizing"), a = parseFloat(r.getPropertyValue("padding-bottom")) + parseFloat(r.getPropertyValue("padding-top")), o = parseFloat(r.getPropertyValue("border-bottom-width")) + parseFloat(r.getPropertyValue("border-top-width")), l = {
  28114. sizingStyle: oCe.map((u) => `${u}:${r.getPropertyValue(u)}`).join(";"),
  28115. paddingSize: a,
  28116. borderSize: o,
  28117. boxSizing: i
  28118. };
  28119. return e && n && ($C[n] = l), l;
  28120. }
  28121. function lCe(t) {
  28122. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
  28123. Ji || (Ji = document.createElement("textarea"), Ji.setAttribute("tab-index", "-1"), Ji.setAttribute("aria-hidden", "true"), document.body.appendChild(Ji)), t.getAttribute("wrap") ? Ji.setAttribute("wrap", t.getAttribute("wrap")) : Ji.removeAttribute("wrap");
  28124. const {
  28125. paddingSize: i,
  28126. borderSize: a,
  28127. boxSizing: o,
  28128. sizingStyle: s
  28129. } = sCe(t, e);
  28130. Ji.setAttribute("style", `${s};${aCe}`), Ji.value = t.value || t.placeholder || "";
  28131. let l, u, c, f = Ji.scrollHeight;
  28132. if (o === "border-box" ? f += a : o === "content-box" && (f -= i), n !== null || r !== null) {
  28133. Ji.value = " ";
  28134. const h = Ji.scrollHeight - i;
  28135. n !== null && (l = h * n, o === "border-box" && (l = l + i + a), f = Math.max(l, f)), r !== null && (u = h * r, o === "border-box" && (u = u + i + a), c = f > u ? "" : "hidden", f = Math.min(u, f));
  28136. }
  28137. const d = {
  28138. height: `${f}px`,
  28139. overflowY: c,
  28140. resize: "none"
  28141. };
  28142. return l && (d.minHeight = `${l}px`), u && (d.maxHeight = `${u}px`), d;
  28143. }
  28144. const AC = 0, EC = 1, MC = 2, uCe = te({
  28145. compatConfig: {
  28146. MODE: 3
  28147. },
  28148. name: "ResizableTextArea",
  28149. inheritAttrs: !1,
  28150. props: nY(),
  28151. setup(t, e) {
  28152. let {
  28153. attrs: n,
  28154. emit: r,
  28155. expose: i
  28156. } = e, a, o;
  28157. const s = U(), l = U({}), u = U(MC);
  28158. yt(() => {
  28159. xt.cancel(a), xt.cancel(o);
  28160. });
  28161. const c = () => {
  28162. try {
  28163. if (s.value && document.activeElement === s.value.input) {
  28164. const S = s.value.getSelectionStart(), x = s.value.getSelectionEnd(), C = s.value.getScrollTop();
  28165. s.value.setSelectionRange(S, x), s.value.setScrollTop(C);
  28166. }
  28167. } catch {
  28168. }
  28169. }, f = U(), d = U();
  28170. ht(() => {
  28171. const S = t.autoSize || t.autosize;
  28172. S ? (f.value = S.minRows, d.value = S.maxRows) : (f.value = void 0, d.value = void 0);
  28173. });
  28174. const h = L(() => !!(t.autoSize || t.autosize)), p = () => {
  28175. u.value = AC;
  28176. };
  28177. se([() => t.value, f, d, h], () => {
  28178. h.value && p();
  28179. }, {
  28180. immediate: !0
  28181. });
  28182. const v = U();
  28183. se([u, s], () => {
  28184. if (s.value)
  28185. if (u.value === AC)
  28186. u.value = EC;
  28187. else if (u.value === EC) {
  28188. const S = lCe(s.value.input, !1, f.value, d.value);
  28189. u.value = MC, v.value = S;
  28190. } else
  28191. c();
  28192. }, {
  28193. immediate: !0,
  28194. flush: "post"
  28195. });
  28196. const g = vn(), m = U(), y = () => {
  28197. xt.cancel(m.value);
  28198. }, b = (S) => {
  28199. u.value === MC && (r("resize", S), h.value && (y(), m.value = xt(() => {
  28200. p();
  28201. })));
  28202. };
  28203. yt(() => {
  28204. y();
  28205. }), i({
  28206. resizeTextarea: () => {
  28207. p();
  28208. },
  28209. textArea: L(() => {
  28210. var S;
  28211. return (S = s.value) === null || S === void 0 ? void 0 : S.input;
  28212. }),
  28213. instance: g
  28214. }), Xr(t.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
  28215. const O = () => {
  28216. const {
  28217. prefixCls: S,
  28218. disabled: x
  28219. } = t, C = or(t, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), T = ye(S, n.class, {
  28220. [`${S}-disabled`]: x
  28221. }), w = h.value ? v.value : null, P = [n.style, l.value, w], $ = I(I(I({}, C), n), {
  28222. style: P,
  28223. class: T
  28224. });
  28225. return (u.value === AC || u.value === EC) && P.push({
  28226. overflowX: "hidden",
  28227. overflowY: "hidden"
  28228. }), $.autofocus || delete $.autofocus, $.rows === 0 && delete $.rows, M(ph, {
  28229. onResize: b,
  28230. disabled: !h.value
  28231. }, {
  28232. default: () => [M(TI, j(j({}, $), {}, {
  28233. ref: s,
  28234. tag: "textarea"
  28235. }), null)]
  28236. });
  28237. };
  28238. return () => O();
  28239. }
  28240. });
  28241. function rY(t, e) {
  28242. return [...t || ""].slice(0, e).join("");
  28243. }
  28244. function J5(t, e, n, r) {
  28245. let i = n;
  28246. return t ? i = rY(n, r) : [...e || ""].length < n.length && [...n || ""].length > r && (i = e), i;
  28247. }
  28248. const cCe = te({
  28249. compatConfig: {
  28250. MODE: 3
  28251. },
  28252. name: "ATextarea",
  28253. inheritAttrs: !1,
  28254. props: nY(),
  28255. setup(t, e) {
  28256. let {
  28257. attrs: n,
  28258. expose: r,
  28259. emit: i
  28260. } = e;
  28261. var a;
  28262. const o = ss(), s = ro.useInject(), l = L(() => m0(s.status, t.status)), u = ae((a = t.value) !== null && a !== void 0 ? a : t.defaultValue), c = ae(), f = ae(""), {
  28263. prefixCls: d,
  28264. size: h,
  28265. direction: p
  28266. } = It("input", t), [v, g] = lD(d), m = Ko(), y = L(() => t.showCount === "" || t.showCount || !1), b = L(() => Number(t.maxlength) > 0), _ = ae(!1), O = ae(), S = ae(0), x = (z) => {
  28267. _.value = !0, O.value = f.value, S.value = z.currentTarget.selectionStart, i("compositionstart", z);
  28268. }, C = (z) => {
  28269. var W;
  28270. _.value = !1;
  28271. let F = z.currentTarget.value;
  28272. if (b.value) {
  28273. const Q = S.value >= t.maxlength + 1 || S.value === ((W = O.value) === null || W === void 0 ? void 0 : W.length);
  28274. F = J5(Q, O.value, F, t.maxlength);
  28275. }
  28276. F !== f.value && ($(F), pg(z.currentTarget, z, E, F)), i("compositionend", z);
  28277. }, T = vn();
  28278. se(() => t.value, () => {
  28279. var z;
  28280. "value" in T.vnode.props, u.value = (z = t.value) !== null && z !== void 0 ? z : "";
  28281. });
  28282. const w = (z) => {
  28283. var W;
  28284. JX((W = c.value) === null || W === void 0 ? void 0 : W.textArea, z);
  28285. }, P = () => {
  28286. var z, W;
  28287. (W = (z = c.value) === null || z === void 0 ? void 0 : z.textArea) === null || W === void 0 || W.blur();
  28288. }, $ = (z, W) => {
  28289. u.value !== z && (t.value === void 0 ? u.value = z : Tt(() => {
  28290. var F, Q, Z;
  28291. c.value.textArea.value !== f.value && ((Z = (F = c.value) === null || F === void 0 ? void 0 : (Q = F.instance).update) === null || Z === void 0 || Z.call(Q));
  28292. }), Tt(() => {
  28293. W && W();
  28294. }));
  28295. }, A = (z) => {
  28296. z.keyCode === 13 && i("pressEnter", z), i("keydown", z);
  28297. }, D = (z) => {
  28298. const {
  28299. onBlur: W
  28300. } = t;
  28301. W == null || W(z), o.onFieldBlur();
  28302. }, E = (z) => {
  28303. i("update:value", z.target.value), i("change", z), i("input", z), o.onFieldChange();
  28304. }, R = (z) => {
  28305. pg(c.value.textArea, z, E), $("", () => {
  28306. w();
  28307. });
  28308. }, N = (z) => {
  28309. let W = z.target.value;
  28310. if (u.value !== W) {
  28311. if (b.value) {
  28312. const F = z.target, Q = F.selectionStart >= t.maxlength + 1 || F.selectionStart === W.length || !F.selectionStart;
  28313. W = J5(Q, f.value, W, t.maxlength);
  28314. }
  28315. pg(z.currentTarget, z, E, W), $(W);
  28316. }
  28317. }, V = () => {
  28318. var z, W;
  28319. const {
  28320. class: F
  28321. } = n, {
  28322. bordered: Q = !0
  28323. } = t, Z = I(I(I({}, or(t, ["allowClear"])), n), {
  28324. class: [{
  28325. [`${d.value}-borderless`]: !Q,
  28326. [`${F}`]: F && !y.value,
  28327. [`${d.value}-sm`]: h.value === "small",
  28328. [`${d.value}-lg`]: h.value === "large"
  28329. }, Is(d.value, l.value), g.value],
  28330. disabled: m.value,
  28331. showCount: null,
  28332. prefixCls: d.value,
  28333. onInput: N,
  28334. onChange: N,
  28335. onBlur: D,
  28336. onKeydown: A,
  28337. onCompositionstart: x,
  28338. onCompositionend: C
  28339. });
  28340. return !((z = t.valueModifiers) === null || z === void 0) && z.lazy && delete Z.onInput, M(uCe, j(j({}, Z), {}, {
  28341. id: (W = Z == null ? void 0 : Z.id) !== null && W !== void 0 ? W : o.id.value,
  28342. ref: c,
  28343. maxlength: t.maxlength,
  28344. lazy: t.lazy
  28345. }), null);
  28346. };
  28347. return r({
  28348. focus: w,
  28349. blur: P,
  28350. resizableTextArea: c
  28351. }), ht(() => {
  28352. let z = X2(u.value);
  28353. !_.value && b.value && (t.value === null || t.value === void 0) && (z = rY(z, t.maxlength)), f.value = z;
  28354. }), () => {
  28355. var z;
  28356. const {
  28357. maxlength: W,
  28358. bordered: F = !0,
  28359. hidden: Q
  28360. } = t, {
  28361. style: Z,
  28362. class: ne
  28363. } = n, ee = I(I(I({}, t), n), {
  28364. prefixCls: d.value,
  28365. inputType: "text",
  28366. handleReset: R,
  28367. direction: p.value,
  28368. bordered: F,
  28369. style: y.value ? void 0 : Z,
  28370. hashId: g.value,
  28371. disabled: (z = t.disabled) !== null && z !== void 0 ? z : m.value
  28372. });
  28373. let oe = M(iCe, j(j({}, ee), {}, {
  28374. value: f.value,
  28375. status: t.status
  28376. }), {
  28377. element: V
  28378. });
  28379. if (y.value || s.hasFeedback) {
  28380. const K = [...f.value].length;
  28381. let ie = "";
  28382. typeof y.value == "object" ? ie = y.value.formatter({
  28383. value: f.value,
  28384. count: K,
  28385. maxlength: W
  28386. }) : ie = `${K}${b.value ? ` / ${W}` : ""}`, oe = M("div", {
  28387. hidden: Q,
  28388. class: ye(`${d.value}-textarea`, {
  28389. [`${d.value}-textarea-rtl`]: p.value === "rtl",
  28390. [`${d.value}-textarea-show-count`]: y.value,
  28391. [`${d.value}-textarea-in-form-item`]: s.isFormItemInput
  28392. }, `${d.value}-textarea-show-count`, ne, g.value),
  28393. style: Z,
  28394. "data-count": typeof ie != "object" ? ie : void 0
  28395. }, [oe, s.hasFeedback && M("span", {
  28396. class: `${d.value}-textarea-suffix`
  28397. }, [s.feedbackIcon])]);
  28398. }
  28399. return v(oe);
  28400. };
  28401. }
  28402. });
  28403. var fCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
  28404. function e3(t) {
  28405. for (var e = 1; e < arguments.length; e++) {
  28406. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  28407. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  28408. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  28409. }))), r.forEach(function(i) {
  28410. dCe(t, i, n[i]);
  28411. });
  28412. }
  28413. return t;
  28414. }
  28415. function dCe(t, e, n) {
  28416. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  28417. }
  28418. var xx = function(e, n) {
  28419. var r = e3({}, e, n.attrs);
  28420. return M(lt, e3({}, r, {
  28421. icon: fCe
  28422. }), null);
  28423. };
  28424. xx.displayName = "EyeOutlined";
  28425. xx.inheritAttrs = !1;
  28426. var hCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
  28427. function t3(t) {
  28428. for (var e = 1; e < arguments.length; e++) {
  28429. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  28430. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  28431. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  28432. }))), r.forEach(function(i) {
  28433. pCe(t, i, n[i]);
  28434. });
  28435. }
  28436. return t;
  28437. }
  28438. function pCe(t, e, n) {
  28439. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  28440. }
  28441. var yD = function(e, n) {
  28442. var r = t3({}, e, n.attrs);
  28443. return M(lt, t3({}, r, {
  28444. icon: hCe
  28445. }), null);
  28446. };
  28447. yD.displayName = "EyeInvisibleOutlined";
  28448. yD.inheritAttrs = !1;
  28449. var vCe = function(t, e) {
  28450. var n = {};
  28451. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  28452. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  28453. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  28454. return n;
  28455. };
  28456. const gCe = {
  28457. click: "onClick",
  28458. hover: "onMouseover"
  28459. }, mCe = (t) => t ? M(xx, null, null) : M(yD, null, null), yCe = te({
  28460. compatConfig: {
  28461. MODE: 3
  28462. },
  28463. name: "AInputPassword",
  28464. inheritAttrs: !1,
  28465. props: I(I({}, Sx()), {
  28466. prefixCls: String,
  28467. inputPrefixCls: String,
  28468. action: {
  28469. type: String,
  28470. default: "click"
  28471. },
  28472. visibilityToggle: {
  28473. type: Boolean,
  28474. default: !0
  28475. },
  28476. visible: {
  28477. type: Boolean,
  28478. default: void 0
  28479. },
  28480. "onUpdate:visible": Function,
  28481. iconRender: Function
  28482. }),
  28483. setup(t, e) {
  28484. let {
  28485. slots: n,
  28486. attrs: r,
  28487. expose: i,
  28488. emit: a
  28489. } = e;
  28490. const o = ae(!1), s = () => {
  28491. const {
  28492. disabled: g
  28493. } = t;
  28494. g || (o.value = !o.value, a("update:visible", o.value));
  28495. };
  28496. ht(() => {
  28497. t.visible !== void 0 && (o.value = !!t.visible);
  28498. });
  28499. const l = ae();
  28500. i({
  28501. focus: () => {
  28502. var g;
  28503. (g = l.value) === null || g === void 0 || g.focus();
  28504. },
  28505. blur: () => {
  28506. var g;
  28507. (g = l.value) === null || g === void 0 || g.blur();
  28508. }
  28509. });
  28510. const f = (g) => {
  28511. const {
  28512. action: m,
  28513. iconRender: y = n.iconRender || mCe
  28514. } = t, b = gCe[m] || "", _ = y(o.value), O = {
  28515. [b]: s,
  28516. class: `${g}-icon`,
  28517. key: "passwordIcon",
  28518. onMousedown: (S) => {
  28519. S.preventDefault();
  28520. },
  28521. onMouseup: (S) => {
  28522. S.preventDefault();
  28523. }
  28524. };
  28525. return Pn(Ui(_) ? _ : M("span", null, [_]), O);
  28526. }, {
  28527. prefixCls: d,
  28528. getPrefixCls: h
  28529. } = It("input-password", t), p = L(() => h("input", t.inputPrefixCls)), v = () => {
  28530. const {
  28531. size: g,
  28532. visibilityToggle: m
  28533. } = t, y = vCe(t, ["size", "visibilityToggle"]), b = m && f(d.value), _ = ye(d.value, r.class, {
  28534. [`${d.value}-${g}`]: !!g
  28535. }), O = I(I(I({}, or(y, ["suffix", "iconRender", "action"])), r), {
  28536. type: o.value ? "text" : "password",
  28537. class: _,
  28538. prefixCls: p.value,
  28539. suffix: b
  28540. });
  28541. return g && (O.size = g), M(Hn, j({
  28542. ref: l
  28543. }, O), n);
  28544. };
  28545. return () => v();
  28546. }
  28547. });
  28548. Hn.Group = Jwe;
  28549. Hn.Search = tCe;
  28550. Hn.TextArea = cCe;
  28551. Hn.Password = yCe;
  28552. Hn.install = function(t) {
  28553. return t.component(Hn.name, Hn), t.component(Hn.Group.name, Hn.Group), t.component(Hn.Search.name, Hn.Search), t.component(Hn.TextArea.name, Hn.TextArea), t.component(Hn.Password.name, Hn.Password), t;
  28554. };
  28555. function Cx() {
  28556. return {
  28557. keyboard: {
  28558. type: Boolean,
  28559. default: void 0
  28560. },
  28561. mask: {
  28562. type: Boolean,
  28563. default: void 0
  28564. },
  28565. afterClose: Function,
  28566. closable: {
  28567. type: Boolean,
  28568. default: void 0
  28569. },
  28570. maskClosable: {
  28571. type: Boolean,
  28572. default: void 0
  28573. },
  28574. visible: {
  28575. type: Boolean,
  28576. default: void 0
  28577. },
  28578. destroyOnClose: {
  28579. type: Boolean,
  28580. default: void 0
  28581. },
  28582. mousePosition: Y.shape({
  28583. x: Number,
  28584. y: Number
  28585. }).loose,
  28586. title: Y.any,
  28587. footer: Y.any,
  28588. transitionName: String,
  28589. maskTransitionName: String,
  28590. animation: Y.any,
  28591. maskAnimation: Y.any,
  28592. wrapStyle: {
  28593. type: Object,
  28594. default: void 0
  28595. },
  28596. bodyStyle: {
  28597. type: Object,
  28598. default: void 0
  28599. },
  28600. maskStyle: {
  28601. type: Object,
  28602. default: void 0
  28603. },
  28604. prefixCls: String,
  28605. wrapClassName: String,
  28606. rootClassName: String,
  28607. width: [String, Number],
  28608. height: [String, Number],
  28609. zIndex: Number,
  28610. bodyProps: Y.any,
  28611. maskProps: Y.any,
  28612. wrapProps: Y.any,
  28613. getContainer: Y.any,
  28614. dialogStyle: {
  28615. type: Object,
  28616. default: void 0
  28617. },
  28618. dialogClass: String,
  28619. closeIcon: Y.any,
  28620. forceRender: {
  28621. type: Boolean,
  28622. default: void 0
  28623. },
  28624. getOpenCount: Function,
  28625. // https://github.com/ant-design/ant-design/issues/19771
  28626. // https://github.com/react-component/dialog/issues/95
  28627. focusTriggerAfterClose: {
  28628. type: Boolean,
  28629. default: void 0
  28630. },
  28631. onClose: Function,
  28632. modalRender: Function
  28633. };
  28634. }
  28635. function n3(t, e, n) {
  28636. let r = e;
  28637. return !r && n && (r = `${t}-${n}`), r;
  28638. }
  28639. let r3 = -1;
  28640. function bCe() {
  28641. return r3 += 1, r3;
  28642. }
  28643. function i3(t, e) {
  28644. let n = t[`page${e ? "Y" : "X"}Offset`];
  28645. const r = `scroll${e ? "Top" : "Left"}`;
  28646. if (typeof n != "number") {
  28647. const i = t.document;
  28648. n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  28649. }
  28650. return n;
  28651. }
  28652. function _Ce(t) {
  28653. const e = t.getBoundingClientRect(), n = {
  28654. left: e.left,
  28655. top: e.top
  28656. }, r = t.ownerDocument, i = r.defaultView || r.parentWindow;
  28657. return n.left += i3(i), n.top += i3(i, !0), n;
  28658. }
  28659. const a3 = {
  28660. width: 0,
  28661. height: 0,
  28662. overflow: "hidden",
  28663. outline: "none"
  28664. }, OCe = te({
  28665. compatConfig: {
  28666. MODE: 3
  28667. },
  28668. name: "DialogContent",
  28669. inheritAttrs: !1,
  28670. props: I(I({}, Cx()), {
  28671. motionName: String,
  28672. ariaId: String,
  28673. onVisibleChanged: Function,
  28674. onMousedown: Function,
  28675. onMouseup: Function
  28676. }),
  28677. setup(t, e) {
  28678. let {
  28679. expose: n,
  28680. slots: r,
  28681. attrs: i
  28682. } = e;
  28683. const a = U(), o = U(), s = U();
  28684. n({
  28685. focus: () => {
  28686. var d;
  28687. (d = a.value) === null || d === void 0 || d.focus();
  28688. },
  28689. changeActive: (d) => {
  28690. const {
  28691. activeElement: h
  28692. } = document;
  28693. d && h === o.value ? a.value.focus() : !d && h === a.value && o.value.focus();
  28694. }
  28695. });
  28696. const l = U(), u = L(() => {
  28697. const {
  28698. width: d,
  28699. height: h
  28700. } = t, p = {};
  28701. return d !== void 0 && (p.width = typeof d == "number" ? `${d}px` : d), h !== void 0 && (p.height = typeof h == "number" ? `${h}px` : h), l.value && (p.transformOrigin = l.value), p;
  28702. }), c = () => {
  28703. Tt(() => {
  28704. if (s.value) {
  28705. const d = _Ce(s.value);
  28706. l.value = t.mousePosition ? `${t.mousePosition.x - d.left}px ${t.mousePosition.y - d.top}px` : "";
  28707. }
  28708. });
  28709. }, f = (d) => {
  28710. t.onVisibleChanged(d);
  28711. };
  28712. return () => {
  28713. var d, h, p, v;
  28714. const {
  28715. prefixCls: g,
  28716. footer: m = (d = r.footer) === null || d === void 0 ? void 0 : d.call(r),
  28717. title: y = (h = r.title) === null || h === void 0 ? void 0 : h.call(r),
  28718. ariaId: b,
  28719. closable: _,
  28720. closeIcon: O = (p = r.closeIcon) === null || p === void 0 ? void 0 : p.call(r),
  28721. onClose: S,
  28722. bodyStyle: x,
  28723. bodyProps: C,
  28724. onMousedown: T,
  28725. onMouseup: w,
  28726. visible: P,
  28727. modalRender: $ = r.modalRender,
  28728. destroyOnClose: A,
  28729. motionName: D
  28730. } = t;
  28731. let E;
  28732. m && (E = M("div", {
  28733. class: `${g}-footer`
  28734. }, [m]));
  28735. let R;
  28736. y && (R = M("div", {
  28737. class: `${g}-header`
  28738. }, [M("div", {
  28739. class: `${g}-title`,
  28740. id: b
  28741. }, [y])]));
  28742. let N;
  28743. _ && (N = M("button", {
  28744. type: "button",
  28745. onClick: S,
  28746. "aria-label": "Close",
  28747. class: `${g}-close`
  28748. }, [O || M("span", {
  28749. class: `${g}-close-x`
  28750. }, null)]));
  28751. const V = M("div", {
  28752. class: `${g}-content`
  28753. }, [N, R, M("div", j({
  28754. class: `${g}-body`,
  28755. style: x
  28756. }, C), [(v = r.default) === null || v === void 0 ? void 0 : v.call(r)]), E]), z = g0(D);
  28757. return M(co, j(j({}, z), {}, {
  28758. onBeforeEnter: c,
  28759. onAfterEnter: () => f(!0),
  28760. onAfterLeave: () => f(!1)
  28761. }), {
  28762. default: () => [P || !A ? bi(M("div", j(j({}, i), {}, {
  28763. ref: s,
  28764. key: "dialog-element",
  28765. role: "document",
  28766. style: [u.value, i.style],
  28767. class: [g, i.class],
  28768. onMousedown: T,
  28769. onMouseup: w
  28770. }), [M("div", {
  28771. tabindex: 0,
  28772. ref: a,
  28773. style: a3,
  28774. "aria-hidden": "true"
  28775. }, null), $ ? $({
  28776. originVNode: V
  28777. }) : V, M("div", {
  28778. tabindex: 0,
  28779. ref: o,
  28780. style: a3,
  28781. "aria-hidden": "true"
  28782. }, null)]), [[Bs, P]]) : null]
  28783. });
  28784. };
  28785. }
  28786. }), SCe = te({
  28787. compatConfig: {
  28788. MODE: 3
  28789. },
  28790. name: "DialogMask",
  28791. props: {
  28792. prefixCls: String,
  28793. visible: Boolean,
  28794. motionName: String,
  28795. maskProps: Object
  28796. },
  28797. setup(t, e) {
  28798. return () => {
  28799. const {
  28800. prefixCls: n,
  28801. visible: r,
  28802. maskProps: i,
  28803. motionName: a
  28804. } = t, o = g0(a);
  28805. return M(co, o, {
  28806. default: () => [bi(M("div", j({
  28807. class: `${n}-mask`
  28808. }, i), null), [[Bs, r]])]
  28809. });
  28810. };
  28811. }
  28812. }), o3 = te({
  28813. compatConfig: {
  28814. MODE: 3
  28815. },
  28816. name: "VcDialog",
  28817. inheritAttrs: !1,
  28818. props: sr(I(I({}, Cx()), {
  28819. getOpenCount: Function,
  28820. scrollLocker: Object
  28821. }), {
  28822. mask: !0,
  28823. visible: !1,
  28824. keyboard: !0,
  28825. closable: !0,
  28826. maskClosable: !0,
  28827. destroyOnClose: !1,
  28828. prefixCls: "rc-dialog",
  28829. getOpenCount: () => null,
  28830. focusTriggerAfterClose: !0
  28831. }),
  28832. setup(t, e) {
  28833. let {
  28834. attrs: n,
  28835. slots: r
  28836. } = e;
  28837. const i = ae(), a = ae(), o = ae(), s = ae(t.visible), l = ae(`vcDialogTitle${bCe()}`), u = (m) => {
  28838. var y, b;
  28839. if (m)
  28840. $l(a.value, document.activeElement) || (i.value = document.activeElement, (y = o.value) === null || y === void 0 || y.focus());
  28841. else {
  28842. const _ = s.value;
  28843. if (s.value = !1, t.mask && i.value && t.focusTriggerAfterClose) {
  28844. try {
  28845. i.value.focus({
  28846. preventScroll: !0
  28847. });
  28848. } catch {
  28849. }
  28850. i.value = null;
  28851. }
  28852. _ && ((b = t.afterClose) === null || b === void 0 || b.call(t));
  28853. }
  28854. }, c = (m) => {
  28855. var y;
  28856. (y = t.onClose) === null || y === void 0 || y.call(t, m);
  28857. }, f = ae(!1), d = ae(), h = () => {
  28858. clearTimeout(d.value), f.value = !0;
  28859. }, p = () => {
  28860. d.value = setTimeout(() => {
  28861. f.value = !1;
  28862. });
  28863. }, v = (m) => {
  28864. if (!t.maskClosable) return null;
  28865. f.value ? f.value = !1 : a.value === m.target && c(m);
  28866. }, g = (m) => {
  28867. if (t.keyboard && m.keyCode === ge.ESC) {
  28868. m.stopPropagation(), c(m);
  28869. return;
  28870. }
  28871. t.visible && m.keyCode === ge.TAB && o.value.changeActive(!m.shiftKey);
  28872. };
  28873. return se(() => t.visible, () => {
  28874. t.visible && (s.value = !0);
  28875. }, {
  28876. flush: "post"
  28877. }), yt(() => {
  28878. var m;
  28879. clearTimeout(d.value), (m = t.scrollLocker) === null || m === void 0 || m.unLock();
  28880. }), ht(() => {
  28881. var m, y;
  28882. (m = t.scrollLocker) === null || m === void 0 || m.unLock(), s.value && ((y = t.scrollLocker) === null || y === void 0 || y.lock());
  28883. }), () => {
  28884. const {
  28885. prefixCls: m,
  28886. mask: y,
  28887. visible: b,
  28888. maskTransitionName: _,
  28889. maskAnimation: O,
  28890. zIndex: S,
  28891. wrapClassName: x,
  28892. rootClassName: C,
  28893. wrapStyle: T,
  28894. closable: w,
  28895. maskProps: P,
  28896. maskStyle: $,
  28897. transitionName: A,
  28898. animation: D,
  28899. wrapProps: E,
  28900. title: R = r.title
  28901. } = t, {
  28902. style: N,
  28903. class: V
  28904. } = n;
  28905. return M("div", j({
  28906. class: [`${m}-root`, C]
  28907. }, JS(t, {
  28908. data: !0
  28909. })), [M(SCe, {
  28910. prefixCls: m,
  28911. visible: y && b,
  28912. motionName: n3(m, _, O),
  28913. style: I({
  28914. zIndex: S
  28915. }, $),
  28916. maskProps: P
  28917. }, null), M("div", j({
  28918. tabIndex: -1,
  28919. onKeydown: g,
  28920. class: ye(`${m}-wrap`, x),
  28921. ref: a,
  28922. onClick: v,
  28923. role: "dialog",
  28924. "aria-labelledby": R ? l.value : null,
  28925. style: I(I({
  28926. zIndex: S
  28927. }, T), {
  28928. display: s.value ? null : "none"
  28929. })
  28930. }, E), [M(OCe, j(j({}, or(t, ["scrollLocker"])), {}, {
  28931. style: N,
  28932. class: V,
  28933. onMousedown: h,
  28934. onMouseup: p,
  28935. ref: o,
  28936. closable: w,
  28937. ariaId: l.value,
  28938. prefixCls: m,
  28939. visible: b,
  28940. onClose: c,
  28941. onVisibleChanged: u,
  28942. motionName: n3(m, A, D)
  28943. }), r)])]);
  28944. };
  28945. }
  28946. }), xCe = Cx(), iY = te({
  28947. compatConfig: {
  28948. MODE: 3
  28949. },
  28950. name: "DialogWrap",
  28951. inheritAttrs: !1,
  28952. props: sr(xCe, {
  28953. visible: !1
  28954. }),
  28955. setup(t, e) {
  28956. let {
  28957. attrs: n,
  28958. slots: r
  28959. } = e;
  28960. const i = U(t.visible);
  28961. return CI({}, {
  28962. inTriggerContext: !1
  28963. }), se(() => t.visible, () => {
  28964. t.visible && (i.value = !0);
  28965. }, {
  28966. flush: "post"
  28967. }), () => {
  28968. const {
  28969. visible: a,
  28970. getContainer: o,
  28971. forceRender: s,
  28972. destroyOnClose: l = !1,
  28973. afterClose: u
  28974. } = t;
  28975. let c = I(I(I({}, t), n), {
  28976. ref: "_component",
  28977. key: "dialog"
  28978. });
  28979. return o === !1 ? M(o3, j(j({}, c), {}, {
  28980. getOpenCount: () => 2
  28981. }), r) : !s && l && !i.value ? null : M(EZ, {
  28982. autoLock: !0,
  28983. visible: a,
  28984. forceRender: s,
  28985. getContainer: o
  28986. }, {
  28987. default: (f) => (c = I(I(I({}, c), f), {
  28988. afterClose: () => {
  28989. u == null || u(), i.value = !1;
  28990. }
  28991. }), M(o3, c, r))
  28992. });
  28993. };
  28994. }
  28995. });
  28996. function wCe(t) {
  28997. const e = U(null), n = tn(I({}, t)), r = U([]), i = (a) => {
  28998. e.value === null && (r.value = [], e.value = xt(() => {
  28999. let o;
  29000. r.value.forEach((s) => {
  29001. o = I(I({}, o), s);
  29002. }), I(n, o), e.value = null;
  29003. })), r.value.push(a);
  29004. };
  29005. return it(() => {
  29006. e.value && xt.cancel(e.value);
  29007. }), [n, i];
  29008. }
  29009. function s3(t, e, n, r) {
  29010. const i = e + n, a = (n - r) / 2;
  29011. if (n > r) {
  29012. if (e > 0)
  29013. return {
  29014. [t]: a
  29015. };
  29016. if (e < 0 && i < r)
  29017. return {
  29018. [t]: -a
  29019. };
  29020. } else if (e < 0 || i > r)
  29021. return {
  29022. [t]: e < 0 ? a : -a
  29023. };
  29024. return {};
  29025. }
  29026. function CCe(t, e, n, r) {
  29027. const {
  29028. width: i,
  29029. height: a
  29030. } = Eve();
  29031. let o = null;
  29032. return t <= i && e <= a ? o = {
  29033. x: 0,
  29034. y: 0
  29035. } : (t > i || e > a) && (o = I(I({}, s3("x", n, t, i)), s3("y", r, e, a))), o;
  29036. }
  29037. var TCe = function(t, e) {
  29038. var n = {};
  29039. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  29040. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  29041. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  29042. return n;
  29043. };
  29044. const l3 = Symbol("previewGroupContext"), bD = {
  29045. provide: (t) => {
  29046. pt(l3, t);
  29047. },
  29048. inject: () => Ge(l3, {
  29049. isPreviewGroup: ae(!1),
  29050. previewUrls: L(() => /* @__PURE__ */ new Map()),
  29051. setPreviewUrls: () => {
  29052. },
  29053. current: U(null),
  29054. setCurrent: () => {
  29055. },
  29056. setShowPreview: () => {
  29057. },
  29058. setMousePosition: () => {
  29059. },
  29060. registerImage: null,
  29061. rootClassName: ""
  29062. })
  29063. }, PCe = () => ({
  29064. previewPrefixCls: String,
  29065. preview: {
  29066. type: [Boolean, Object],
  29067. default: !0
  29068. },
  29069. icons: {
  29070. type: Object,
  29071. default: () => ({})
  29072. }
  29073. }), $Ce = te({
  29074. compatConfig: {
  29075. MODE: 3
  29076. },
  29077. name: "PreviewGroup",
  29078. inheritAttrs: !1,
  29079. props: PCe(),
  29080. setup(t, e) {
  29081. let {
  29082. slots: n
  29083. } = e;
  29084. const r = L(() => {
  29085. const O = {
  29086. visible: void 0,
  29087. onVisibleChange: () => {
  29088. },
  29089. getContainer: void 0,
  29090. current: 0
  29091. };
  29092. return typeof t.preview == "object" ? lY(t.preview, O) : O;
  29093. }), i = tn(/* @__PURE__ */ new Map()), a = U(), o = L(() => r.value.visible), s = L(() => r.value.getContainer), l = (O, S) => {
  29094. var x, C;
  29095. (C = (x = r.value).onVisibleChange) === null || C === void 0 || C.call(x, O, S);
  29096. }, [u, c] = wh(!!o.value, {
  29097. value: o,
  29098. onChange: l
  29099. }), f = U(null), d = L(() => o.value !== void 0), h = L(() => Array.from(i.keys())), p = L(() => h.value[r.value.current]), v = L(() => new Map(Array.from(i).filter((O) => {
  29100. let [, {
  29101. canPreview: S
  29102. }] = O;
  29103. return !!S;
  29104. }).map((O) => {
  29105. let [S, {
  29106. url: x
  29107. }] = O;
  29108. return [S, x];
  29109. }))), g = function(O, S) {
  29110. let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
  29111. i.set(O, {
  29112. url: S,
  29113. canPreview: x
  29114. });
  29115. }, m = (O) => {
  29116. a.value = O;
  29117. }, y = (O) => {
  29118. f.value = O;
  29119. }, b = function(O, S) {
  29120. let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
  29121. const C = () => {
  29122. i.delete(O);
  29123. };
  29124. return i.set(O, {
  29125. url: S,
  29126. canPreview: x
  29127. }), C;
  29128. }, _ = (O) => {
  29129. O == null || O.stopPropagation(), c(!1), y(null);
  29130. };
  29131. return se(p, (O) => {
  29132. m(O);
  29133. }, {
  29134. immediate: !0,
  29135. flush: "post"
  29136. }), ht(() => {
  29137. u.value && d.value && m(p.value);
  29138. }, {
  29139. flush: "post"
  29140. }), bD.provide({
  29141. isPreviewGroup: ae(!0),
  29142. previewUrls: v,
  29143. setPreviewUrls: g,
  29144. current: a,
  29145. setCurrent: m,
  29146. setShowPreview: c,
  29147. setMousePosition: y,
  29148. registerImage: b
  29149. }), () => {
  29150. const O = TCe(r.value, []);
  29151. return M(wt, null, [n.default && n.default(), M(oY, j(j({}, O), {}, {
  29152. "ria-hidden": !u.value,
  29153. visible: u.value,
  29154. prefixCls: t.previewPrefixCls,
  29155. onClose: _,
  29156. mousePosition: f.value,
  29157. src: v.value.get(a.value),
  29158. icons: t.icons,
  29159. getContainer: s.value
  29160. }), null)]);
  29161. };
  29162. }
  29163. }), aY = $Ce, ku = {
  29164. x: 0,
  29165. y: 0
  29166. }, ACe = I(I({}, Cx()), {
  29167. src: String,
  29168. alt: String,
  29169. rootClassName: String,
  29170. icons: {
  29171. type: Object,
  29172. default: () => ({})
  29173. }
  29174. }), oY = te({
  29175. compatConfig: {
  29176. MODE: 3
  29177. },
  29178. name: "Preview",
  29179. inheritAttrs: !1,
  29180. props: ACe,
  29181. emits: ["close", "afterClose"],
  29182. setup(t, e) {
  29183. let {
  29184. emit: n,
  29185. attrs: r
  29186. } = e;
  29187. const {
  29188. rotateLeft: i,
  29189. rotateRight: a,
  29190. zoomIn: o,
  29191. zoomOut: s,
  29192. close: l,
  29193. left: u,
  29194. right: c,
  29195. flipX: f,
  29196. flipY: d
  29197. } = tn(t.icons), h = ae(1), p = ae(0), v = tn({
  29198. x: 1,
  29199. y: 1
  29200. }), [g, m] = wCe(ku), y = () => n("close"), b = ae(), _ = tn({
  29201. originX: 0,
  29202. originY: 0,
  29203. deltaX: 0,
  29204. deltaY: 0
  29205. }), O = ae(!1), S = bD.inject(), {
  29206. previewUrls: x,
  29207. current: C,
  29208. isPreviewGroup: T,
  29209. setCurrent: w
  29210. } = S, P = L(() => x.value.size), $ = L(() => Array.from(x.value.keys())), A = L(() => $.value.indexOf(C.value)), D = L(() => T.value ? x.value.get(C.value) : t.src), E = L(() => T.value && P.value > 1), R = ae({
  29211. wheelDirection: 0
  29212. }), N = () => {
  29213. h.value = 1, p.value = 0, v.x = 1, v.y = 1, m(ku), n("afterClose");
  29214. }, V = (Se) => {
  29215. Se ? h.value += 0.5 : h.value++, m(ku);
  29216. }, z = (Se) => {
  29217. h.value > 1 && (Se ? h.value -= 0.5 : h.value--), m(ku);
  29218. }, W = () => {
  29219. p.value += 90;
  29220. }, F = () => {
  29221. p.value -= 90;
  29222. }, Q = () => {
  29223. v.x = -v.x;
  29224. }, Z = () => {
  29225. v.y = -v.y;
  29226. }, ne = (Se) => {
  29227. Se.preventDefault(), Se.stopPropagation(), A.value > 0 && w($.value[A.value - 1]);
  29228. }, ee = (Se) => {
  29229. Se.preventDefault(), Se.stopPropagation(), A.value < P.value - 1 && w($.value[A.value + 1]);
  29230. }, oe = ye({
  29231. [`${t.prefixCls}-moving`]: O.value
  29232. }), K = `${t.prefixCls}-operations-operation`, ie = `${t.prefixCls}-operations-icon`, X = [{
  29233. icon: l,
  29234. onClick: y,
  29235. type: "close"
  29236. }, {
  29237. icon: o,
  29238. onClick: () => V(),
  29239. type: "zoomIn"
  29240. }, {
  29241. icon: s,
  29242. onClick: () => z(),
  29243. type: "zoomOut",
  29244. disabled: L(() => h.value === 1)
  29245. }, {
  29246. icon: a,
  29247. onClick: W,
  29248. type: "rotateRight"
  29249. }, {
  29250. icon: i,
  29251. onClick: F,
  29252. type: "rotateLeft"
  29253. }, {
  29254. icon: f,
  29255. onClick: Q,
  29256. type: "flipX"
  29257. }, {
  29258. icon: d,
  29259. onClick: Z,
  29260. type: "flipY"
  29261. }], H = () => {
  29262. if (t.visible && O.value) {
  29263. const Se = b.value.offsetWidth * h.value, be = b.value.offsetHeight * h.value, {
  29264. left: he,
  29265. top: Te
  29266. } = MZ(b.value), ze = p.value % 180 !== 0;
  29267. O.value = !1;
  29268. const ut = CCe(ze ? be : Se, ze ? Se : be, he, Te);
  29269. ut && m(I({}, ut));
  29270. }
  29271. }, G = (Se) => {
  29272. Se.button === 0 && (Se.preventDefault(), Se.stopPropagation(), _.deltaX = Se.pageX - g.x, _.deltaY = Se.pageY - g.y, _.originX = g.x, _.originY = g.y, O.value = !0);
  29273. }, re = (Se) => {
  29274. t.visible && O.value && m({
  29275. x: Se.pageX - _.deltaX,
  29276. y: Se.pageY - _.deltaY
  29277. });
  29278. }, fe = (Se) => {
  29279. if (!t.visible) return;
  29280. Se.preventDefault();
  29281. const be = Se.deltaY;
  29282. R.value = {
  29283. wheelDirection: be
  29284. };
  29285. }, de = (Se) => {
  29286. !t.visible || !E.value || (Se.preventDefault(), Se.keyCode === ge.LEFT ? A.value > 0 && w($.value[A.value - 1]) : Se.keyCode === ge.RIGHT && A.value < P.value - 1 && w($.value[A.value + 1]));
  29287. }, Ee = () => {
  29288. t.visible && (h.value !== 1 && (h.value = 1), (g.x !== ku.x || g.y !== ku.y) && m(ku));
  29289. };
  29290. let $e = () => {
  29291. };
  29292. return it(() => {
  29293. se([() => t.visible, O], () => {
  29294. $e();
  29295. let Se, be;
  29296. const he = vr(window, "mouseup", H, !1), Te = vr(window, "mousemove", re, !1), ze = vr(window, "wheel", fe, {
  29297. passive: !1
  29298. }), ut = vr(window, "keydown", de, !1);
  29299. try {
  29300. window.top !== window.self && (Se = vr(window.top, "mouseup", H, !1), be = vr(window.top, "mousemove", re, !1));
  29301. } catch (ct) {
  29302. cf(!1, `[vc-image] ${ct}`);
  29303. }
  29304. $e = () => {
  29305. he.remove(), Te.remove(), ze.remove(), ut.remove(), Se && Se.remove(), be && be.remove();
  29306. };
  29307. }, {
  29308. flush: "post",
  29309. immediate: !0
  29310. }), se([R], () => {
  29311. const {
  29312. wheelDirection: Se
  29313. } = R.value;
  29314. Se > 0 ? z(!0) : Se < 0 && V(!0);
  29315. });
  29316. }), nl(() => {
  29317. $e();
  29318. }), () => {
  29319. const {
  29320. visible: Se,
  29321. prefixCls: be,
  29322. rootClassName: he
  29323. } = t;
  29324. return M(iY, j(j({}, r), {}, {
  29325. transitionName: t.transitionName,
  29326. maskTransitionName: t.maskTransitionName,
  29327. closable: !1,
  29328. keyboard: !0,
  29329. prefixCls: be,
  29330. onClose: y,
  29331. afterClose: N,
  29332. visible: Se,
  29333. wrapClassName: oe,
  29334. rootClassName: he,
  29335. getContainer: t.getContainer
  29336. }), {
  29337. default: () => [M("div", {
  29338. class: [`${t.prefixCls}-operations-wrapper`, he]
  29339. }, [M("ul", {
  29340. class: `${t.prefixCls}-operations`
  29341. }, [X.map((Te) => {
  29342. let {
  29343. icon: ze,
  29344. onClick: ut,
  29345. type: ct,
  29346. disabled: Dt
  29347. } = Te;
  29348. return M("li", {
  29349. class: ye(K, {
  29350. [`${t.prefixCls}-operations-operation-disabled`]: Dt && (Dt == null ? void 0 : Dt.value)
  29351. }),
  29352. onClick: ut,
  29353. key: ct
  29354. }, [Ns(ze, {
  29355. class: ie
  29356. })]);
  29357. })])]), M("div", {
  29358. class: `${t.prefixCls}-img-wrapper`,
  29359. style: {
  29360. transform: `translate3d(${g.x}px, ${g.y}px, 0)`
  29361. }
  29362. }, [M("img", {
  29363. onMousedown: G,
  29364. onDblclick: Ee,
  29365. ref: b,
  29366. class: `${t.prefixCls}-img`,
  29367. src: D.value,
  29368. alt: t.alt,
  29369. style: {
  29370. transform: `scale3d(${v.x * h.value}, ${v.y * h.value}, 1) rotate(${p.value}deg)`
  29371. }
  29372. }, null)]), E.value && M("div", {
  29373. class: ye(`${t.prefixCls}-switch-left`, {
  29374. [`${t.prefixCls}-switch-left-disabled`]: A.value <= 0
  29375. }),
  29376. onClick: ne
  29377. }, [u]), E.value && M("div", {
  29378. class: ye(`${t.prefixCls}-switch-right`, {
  29379. [`${t.prefixCls}-switch-right-disabled`]: A.value >= P.value - 1
  29380. }),
  29381. onClick: ee
  29382. }, [c])]
  29383. });
  29384. };
  29385. }
  29386. });
  29387. var ECe = function(t, e) {
  29388. var n = {};
  29389. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  29390. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  29391. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  29392. return n;
  29393. };
  29394. const sY = () => ({
  29395. src: String,
  29396. wrapperClassName: String,
  29397. wrapperStyle: {
  29398. type: Object,
  29399. default: void 0
  29400. },
  29401. rootClassName: String,
  29402. prefixCls: String,
  29403. previewPrefixCls: String,
  29404. previewMask: {
  29405. type: [Boolean, Function],
  29406. default: void 0
  29407. },
  29408. placeholder: Y.any,
  29409. fallback: String,
  29410. preview: {
  29411. type: [Boolean, Object],
  29412. default: !0
  29413. },
  29414. onClick: {
  29415. type: Function
  29416. },
  29417. onError: {
  29418. type: Function
  29419. }
  29420. }), lY = (t, e) => {
  29421. const n = I({}, t);
  29422. return Object.keys(e).forEach((r) => {
  29423. t[r] === void 0 && (n[r] = e[r]);
  29424. }), n;
  29425. };
  29426. let MCe = 0;
  29427. const uY = te({
  29428. compatConfig: {
  29429. MODE: 3
  29430. },
  29431. name: "VcImage",
  29432. inheritAttrs: !1,
  29433. props: sY(),
  29434. emits: ["click", "error"],
  29435. setup(t, e) {
  29436. let {
  29437. attrs: n,
  29438. slots: r,
  29439. emit: i
  29440. } = e;
  29441. const a = L(() => t.prefixCls), o = L(() => `${a.value}-preview`), s = L(() => {
  29442. const V = {
  29443. visible: void 0,
  29444. onVisibleChange: () => {
  29445. },
  29446. getContainer: void 0
  29447. };
  29448. return typeof t.preview == "object" ? lY(t.preview, V) : V;
  29449. }), l = L(() => {
  29450. var V;
  29451. return (V = s.value.src) !== null && V !== void 0 ? V : t.src;
  29452. }), u = L(() => t.placeholder && t.placeholder !== !0 || r.placeholder), c = L(() => s.value.visible), f = L(() => s.value.getContainer), d = L(() => c.value !== void 0), h = (V, z) => {
  29453. var W, F;
  29454. (F = (W = s.value).onVisibleChange) === null || F === void 0 || F.call(W, V, z);
  29455. }, [p, v] = wh(!!c.value, {
  29456. value: c,
  29457. onChange: h
  29458. }), g = U(u.value ? "loading" : "normal");
  29459. se(() => t.src, () => {
  29460. g.value = u.value ? "loading" : "normal";
  29461. });
  29462. const m = U(null), y = L(() => g.value === "error"), b = bD.inject(), {
  29463. isPreviewGroup: _,
  29464. setCurrent: O,
  29465. setShowPreview: S,
  29466. setMousePosition: x,
  29467. registerImage: C
  29468. } = b, T = U(MCe++), w = L(() => t.preview && !y.value), P = () => {
  29469. g.value = "normal";
  29470. }, $ = (V) => {
  29471. g.value = "error", i("error", V);
  29472. }, A = (V) => {
  29473. if (!d.value) {
  29474. const {
  29475. left: z,
  29476. top: W
  29477. } = MZ(V.target);
  29478. _.value ? (O(T.value), x({
  29479. x: z,
  29480. y: W
  29481. })) : m.value = {
  29482. x: z,
  29483. y: W
  29484. };
  29485. }
  29486. _.value ? S(!0) : v(!0), i("click", V);
  29487. }, D = () => {
  29488. v(!1), d.value || (m.value = null);
  29489. }, E = U(null);
  29490. se(() => E, () => {
  29491. g.value === "loading" && E.value.complete && (E.value.naturalWidth || E.value.naturalHeight) && P();
  29492. });
  29493. let R = () => {
  29494. };
  29495. it(() => {
  29496. se([l, w], () => {
  29497. if (R(), !_.value)
  29498. return () => {
  29499. };
  29500. R = C(T.value, l.value, w.value), w.value || R();
  29501. }, {
  29502. flush: "post",
  29503. immediate: !0
  29504. });
  29505. }), nl(() => {
  29506. R();
  29507. });
  29508. const N = (V) => $be(V) ? V + "px" : V;
  29509. return () => {
  29510. const {
  29511. prefixCls: V,
  29512. wrapperClassName: z,
  29513. fallback: W,
  29514. src: F,
  29515. placeholder: Q,
  29516. wrapperStyle: Z,
  29517. rootClassName: ne
  29518. } = t, {
  29519. width: ee,
  29520. height: oe,
  29521. crossorigin: K,
  29522. decoding: ie,
  29523. alt: X,
  29524. sizes: H,
  29525. srcset: G,
  29526. usemap: re,
  29527. class: fe,
  29528. style: de
  29529. } = n, Ee = s.value, {
  29530. icons: $e,
  29531. maskClassName: Se
  29532. } = Ee, be = ECe(Ee, ["icons", "maskClassName"]), he = ye(V, z, ne, {
  29533. [`${V}-error`]: y.value
  29534. }), Te = y.value && W ? W : l.value, ze = {
  29535. crossorigin: K,
  29536. decoding: ie,
  29537. alt: X,
  29538. sizes: H,
  29539. srcset: G,
  29540. usemap: re,
  29541. width: ee,
  29542. height: oe,
  29543. class: ye(`${V}-img`, {
  29544. [`${V}-img-placeholder`]: Q === !0
  29545. }, fe),
  29546. style: I({
  29547. height: N(oe)
  29548. }, de)
  29549. };
  29550. return M(wt, null, [M("div", {
  29551. class: he,
  29552. onClick: w.value ? A : (ut) => {
  29553. i("click", ut);
  29554. },
  29555. style: I({
  29556. width: N(ee),
  29557. height: N(oe)
  29558. }, Z)
  29559. }, [M("img", j(j(j({}, ze), y.value && W ? {
  29560. src: W
  29561. } : {
  29562. onLoad: P,
  29563. onError: $,
  29564. src: F
  29565. }), {}, {
  29566. ref: E
  29567. }), null), g.value === "loading" && M("div", {
  29568. "aria-hidden": "true",
  29569. class: `${V}-placeholder`
  29570. }, [Q || r.placeholder && r.placeholder()]), r.previewMask && w.value && M("div", {
  29571. class: [`${V}-mask`, Se]
  29572. }, [r.previewMask()])]), !_.value && w.value && M(oY, j(j({}, be), {}, {
  29573. "aria-hidden": !p.value,
  29574. visible: p.value,
  29575. prefixCls: o.value,
  29576. onClose: D,
  29577. mousePosition: m.value,
  29578. src: Te,
  29579. alt: X,
  29580. getContainer: f.value,
  29581. icons: $e,
  29582. rootClassName: ne
  29583. }), null)]);
  29584. };
  29585. }
  29586. });
  29587. uY.PreviewGroup = aY;
  29588. const ICe = uY;
  29589. var DCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { tag: "path", attrs: { d: "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, name: "rotate-left", theme: "outlined" };
  29590. function u3(t) {
  29591. for (var e = 1; e < arguments.length; e++) {
  29592. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29593. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29594. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29595. }))), r.forEach(function(i) {
  29596. RCe(t, i, n[i]);
  29597. });
  29598. }
  29599. return t;
  29600. }
  29601. function RCe(t, e, n) {
  29602. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29603. }
  29604. var _D = function(e, n) {
  29605. var r = u3({}, e, n.attrs);
  29606. return M(lt, u3({}, r, {
  29607. icon: DCe
  29608. }), null);
  29609. };
  29610. _D.displayName = "RotateLeftOutlined";
  29611. _D.inheritAttrs = !1;
  29612. var kCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { tag: "path", attrs: { d: "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, name: "rotate-right", theme: "outlined" };
  29613. function c3(t) {
  29614. for (var e = 1; e < arguments.length; e++) {
  29615. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29616. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29617. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29618. }))), r.forEach(function(i) {
  29619. LCe(t, i, n[i]);
  29620. });
  29621. }
  29622. return t;
  29623. }
  29624. function LCe(t, e, n) {
  29625. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29626. }
  29627. var OD = function(e, n) {
  29628. var r = c3({}, e, n.attrs);
  29629. return M(lt, c3({}, r, {
  29630. icon: kCe
  29631. }), null);
  29632. };
  29633. OD.displayName = "RotateRightOutlined";
  29634. OD.inheritAttrs = !1;
  29635. var NCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-in", theme: "outlined" };
  29636. function f3(t) {
  29637. for (var e = 1; e < arguments.length; e++) {
  29638. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29639. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29640. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29641. }))), r.forEach(function(i) {
  29642. BCe(t, i, n[i]);
  29643. });
  29644. }
  29645. return t;
  29646. }
  29647. function BCe(t, e, n) {
  29648. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29649. }
  29650. var SD = function(e, n) {
  29651. var r = f3({}, e, n.attrs);
  29652. return M(lt, f3({}, r, {
  29653. icon: NCe
  29654. }), null);
  29655. };
  29656. SD.displayName = "ZoomInOutlined";
  29657. SD.inheritAttrs = !1;
  29658. var zCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-out", theme: "outlined" };
  29659. function d3(t) {
  29660. for (var e = 1; e < arguments.length; e++) {
  29661. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29662. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29663. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29664. }))), r.forEach(function(i) {
  29665. VCe(t, i, n[i]);
  29666. });
  29667. }
  29668. return t;
  29669. }
  29670. function VCe(t, e, n) {
  29671. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29672. }
  29673. var xD = function(e, n) {
  29674. var r = d3({}, e, n.attrs);
  29675. return M(lt, d3({}, r, {
  29676. icon: zCe
  29677. }), null);
  29678. };
  29679. xD.displayName = "ZoomOutOutlined";
  29680. xD.inheritAttrs = !1;
  29681. var FCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, name: "swap", theme: "outlined" };
  29682. function h3(t) {
  29683. for (var e = 1; e < arguments.length; e++) {
  29684. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  29685. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  29686. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  29687. }))), r.forEach(function(i) {
  29688. WCe(t, i, n[i]);
  29689. });
  29690. }
  29691. return t;
  29692. }
  29693. function WCe(t, e, n) {
  29694. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  29695. }
  29696. var F1 = function(e, n) {
  29697. var r = h3({}, e, n.attrs);
  29698. return M(lt, h3({}, r, {
  29699. icon: FCe
  29700. }), null);
  29701. };
  29702. F1.displayName = "SwapOutlined";
  29703. F1.inheritAttrs = !1;
  29704. function p3(t) {
  29705. return {
  29706. position: t,
  29707. top: 0,
  29708. insetInlineEnd: 0,
  29709. bottom: 0,
  29710. insetInlineStart: 0
  29711. };
  29712. }
  29713. const cY = (t) => {
  29714. const {
  29715. componentCls: e
  29716. } = t;
  29717. return [{
  29718. [`${e}-root`]: {
  29719. [`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]: {
  29720. // reset scale avoid mousePosition bug
  29721. transform: "none",
  29722. opacity: 0,
  29723. animationDuration: t.motionDurationSlow,
  29724. // https://github.com/ant-design/ant-design/issues/11777
  29725. userSelect: "none"
  29726. },
  29727. [`${e}${t.antCls}-zoom-leave ${e}-content`]: {
  29728. pointerEvents: "none"
  29729. },
  29730. [`${e}-mask`]: I(I({}, p3("fixed")), {
  29731. zIndex: t.zIndexPopupBase,
  29732. height: "100%",
  29733. backgroundColor: t.colorBgMask,
  29734. [`${e}-hidden`]: {
  29735. display: "none"
  29736. }
  29737. }),
  29738. [`${e}-wrap`]: I(I({}, p3("fixed")), {
  29739. overflow: "auto",
  29740. outline: 0,
  29741. WebkitOverflowScrolling: "touch"
  29742. })
  29743. }
  29744. }, {
  29745. [`${e}-root`]: TU(t)
  29746. }];
  29747. }, QCe = (t) => {
  29748. const {
  29749. componentCls: e
  29750. } = t;
  29751. return [
  29752. // ======================== Root =========================
  29753. {
  29754. [`${e}-root`]: {
  29755. [`${e}-wrap`]: {
  29756. zIndex: t.zIndexPopupBase,
  29757. position: "fixed",
  29758. inset: 0,
  29759. overflow: "auto",
  29760. outline: 0,
  29761. WebkitOverflowScrolling: "touch"
  29762. },
  29763. [`${e}-wrap-rtl`]: {
  29764. direction: "rtl"
  29765. },
  29766. [`${e}-centered`]: {
  29767. textAlign: "center",
  29768. "&::before": {
  29769. display: "inline-block",
  29770. width: 0,
  29771. height: "100%",
  29772. verticalAlign: "middle",
  29773. content: '""'
  29774. },
  29775. [e]: {
  29776. top: 0,
  29777. display: "inline-block",
  29778. paddingBottom: 0,
  29779. textAlign: "start",
  29780. verticalAlign: "middle"
  29781. }
  29782. },
  29783. [`@media (max-width: ${t.screenSMMax})`]: {
  29784. [e]: {
  29785. maxWidth: "calc(100vw - 16px)",
  29786. margin: `${t.marginXS} auto`
  29787. },
  29788. [`${e}-centered`]: {
  29789. [e]: {
  29790. flex: 1
  29791. }
  29792. }
  29793. }
  29794. }
  29795. },
  29796. // ======================== Modal ========================
  29797. {
  29798. [e]: I(I({}, nn(t)), {
  29799. pointerEvents: "none",
  29800. position: "relative",
  29801. top: 100,
  29802. width: "auto",
  29803. maxWidth: `calc(100vw - ${t.margin * 2}px)`,
  29804. margin: "0 auto",
  29805. paddingBottom: t.paddingLG,
  29806. [`${e}-title`]: {
  29807. margin: 0,
  29808. color: t.modalHeadingColor,
  29809. fontWeight: t.fontWeightStrong,
  29810. fontSize: t.modalHeaderTitleFontSize,
  29811. lineHeight: t.modalHeaderTitleLineHeight,
  29812. wordWrap: "break-word"
  29813. },
  29814. [`${e}-content`]: {
  29815. position: "relative",
  29816. backgroundColor: t.modalContentBg,
  29817. backgroundClip: "padding-box",
  29818. border: 0,
  29819. borderRadius: t.borderRadiusLG,
  29820. boxShadow: t.boxShadowSecondary,
  29821. pointerEvents: "auto",
  29822. padding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`
  29823. },
  29824. [`${e}-close`]: I({
  29825. position: "absolute",
  29826. top: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
  29827. insetInlineEnd: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
  29828. zIndex: t.zIndexPopupBase + 10,
  29829. padding: 0,
  29830. color: t.modalCloseColor,
  29831. fontWeight: t.fontWeightStrong,
  29832. lineHeight: 1,
  29833. textDecoration: "none",
  29834. background: "transparent",
  29835. borderRadius: t.borderRadiusSM,
  29836. width: t.modalConfirmIconSize,
  29837. height: t.modalConfirmIconSize,
  29838. border: 0,
  29839. outline: 0,
  29840. cursor: "pointer",
  29841. transition: `color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,
  29842. "&-x": {
  29843. display: "block",
  29844. fontSize: t.fontSizeLG,
  29845. fontStyle: "normal",
  29846. lineHeight: `${t.modalCloseBtnSize}px`,
  29847. textAlign: "center",
  29848. textTransform: "none",
  29849. textRendering: "auto"
  29850. },
  29851. "&:hover": {
  29852. color: t.modalIconHoverColor,
  29853. backgroundColor: t.wireframe ? "transparent" : t.colorFillContent,
  29854. textDecoration: "none"
  29855. },
  29856. "&:active": {
  29857. backgroundColor: t.wireframe ? "transparent" : t.colorFillContentHover
  29858. }
  29859. }, VS(t)),
  29860. [`${e}-header`]: {
  29861. color: t.colorText,
  29862. background: t.modalHeaderBg,
  29863. borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
  29864. marginBottom: t.marginXS
  29865. },
  29866. [`${e}-body`]: {
  29867. fontSize: t.fontSize,
  29868. lineHeight: t.lineHeight,
  29869. wordWrap: "break-word"
  29870. },
  29871. [`${e}-footer`]: {
  29872. textAlign: "end",
  29873. background: t.modalFooterBg,
  29874. marginTop: t.marginSM,
  29875. [`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]: {
  29876. marginBottom: 0,
  29877. marginInlineStart: t.marginXS
  29878. }
  29879. },
  29880. [`${e}-open`]: {
  29881. overflow: "hidden"
  29882. }
  29883. })
  29884. },
  29885. // ======================== Pure =========================
  29886. {
  29887. [`${e}-pure-panel`]: {
  29888. top: "auto",
  29889. padding: 0,
  29890. display: "flex",
  29891. flexDirection: "column",
  29892. [`${e}-content,
  29893. ${e}-body,
  29894. ${e}-confirm-body-wrapper`]: {
  29895. display: "flex",
  29896. flexDirection: "column",
  29897. flex: "auto"
  29898. },
  29899. [`${e}-confirm-body`]: {
  29900. marginBottom: "auto"
  29901. }
  29902. }
  29903. }
  29904. ];
  29905. }, HCe = (t) => {
  29906. const {
  29907. componentCls: e
  29908. } = t, n = `${e}-confirm`;
  29909. return {
  29910. [n]: {
  29911. "&-rtl": {
  29912. direction: "rtl"
  29913. },
  29914. [`${t.antCls}-modal-header`]: {
  29915. display: "none"
  29916. },
  29917. [`${n}-body-wrapper`]: I({}, _1()),
  29918. [`${n}-body`]: {
  29919. display: "flex",
  29920. flexWrap: "wrap",
  29921. alignItems: "center",
  29922. [`${n}-title`]: {
  29923. flex: "0 0 100%",
  29924. display: "block",
  29925. // create BFC to avoid
  29926. // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
  29927. overflow: "hidden",
  29928. color: t.colorTextHeading,
  29929. fontWeight: t.fontWeightStrong,
  29930. fontSize: t.modalHeaderTitleFontSize,
  29931. lineHeight: t.modalHeaderTitleLineHeight,
  29932. [`+ ${n}-content`]: {
  29933. marginBlockStart: t.marginXS,
  29934. flexBasis: "100%",
  29935. maxWidth: `calc(100% - ${t.modalConfirmIconSize + t.marginSM}px)`
  29936. }
  29937. },
  29938. [`${n}-content`]: {
  29939. color: t.colorText,
  29940. fontSize: t.fontSize
  29941. },
  29942. [`> ${t.iconCls}`]: {
  29943. flex: "none",
  29944. marginInlineEnd: t.marginSM,
  29945. fontSize: t.modalConfirmIconSize,
  29946. [`+ ${n}-title`]: {
  29947. flex: 1
  29948. },
  29949. // `content` after `icon` should set marginLeft
  29950. [`+ ${n}-title + ${n}-content`]: {
  29951. marginInlineStart: t.modalConfirmIconSize + t.marginSM
  29952. }
  29953. }
  29954. },
  29955. [`${n}-btns`]: {
  29956. textAlign: "end",
  29957. marginTop: t.marginSM,
  29958. [`${t.antCls}-btn + ${t.antCls}-btn`]: {
  29959. marginBottom: 0,
  29960. marginInlineStart: t.marginXS
  29961. }
  29962. }
  29963. },
  29964. [`${n}-error ${n}-body > ${t.iconCls}`]: {
  29965. color: t.colorError
  29966. },
  29967. [`${n}-warning ${n}-body > ${t.iconCls},
  29968. ${n}-confirm ${n}-body > ${t.iconCls}`]: {
  29969. color: t.colorWarning
  29970. },
  29971. [`${n}-info ${n}-body > ${t.iconCls}`]: {
  29972. color: t.colorInfo
  29973. },
  29974. [`${n}-success ${n}-body > ${t.iconCls}`]: {
  29975. color: t.colorSuccess
  29976. },
  29977. // https://github.com/ant-design/ant-design/issues/37329
  29978. [`${e}-zoom-leave ${e}-btns`]: {
  29979. pointerEvents: "none"
  29980. }
  29981. };
  29982. }, GCe = (t) => {
  29983. const {
  29984. componentCls: e
  29985. } = t;
  29986. return {
  29987. [`${e}-root`]: {
  29988. [`${e}-wrap-rtl`]: {
  29989. direction: "rtl",
  29990. [`${e}-confirm-body`]: {
  29991. direction: "rtl"
  29992. }
  29993. }
  29994. }
  29995. };
  29996. }, jCe = (t) => {
  29997. const {
  29998. componentCls: e,
  29999. antCls: n
  30000. } = t, r = `${e}-confirm`;
  30001. return {
  30002. [e]: {
  30003. [`${e}-content`]: {
  30004. padding: 0
  30005. },
  30006. [`${e}-header`]: {
  30007. padding: t.modalHeaderPadding,
  30008. borderBottom: `${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,
  30009. marginBottom: 0
  30010. },
  30011. [`${e}-body`]: {
  30012. padding: t.modalBodyPadding
  30013. },
  30014. [`${e}-footer`]: {
  30015. padding: `${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,
  30016. borderTop: `${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,
  30017. borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,
  30018. marginTop: 0
  30019. }
  30020. },
  30021. [r]: {
  30022. [`${n}-modal-body`]: {
  30023. padding: `${t.padding * 2}px ${t.padding * 2}px ${t.paddingLG}px`
  30024. },
  30025. [`${r}-body`]: {
  30026. [`> ${t.iconCls}`]: {
  30027. marginInlineEnd: t.margin,
  30028. // `content` after `icon` should set marginLeft
  30029. [`+ ${r}-title + ${r}-content`]: {
  30030. marginInlineStart: t.modalConfirmIconSize + t.margin
  30031. }
  30032. }
  30033. },
  30034. [`${r}-btns`]: {
  30035. marginTop: t.marginLG
  30036. }
  30037. }
  30038. };
  30039. }, ZCe = Sn("Modal", (t) => {
  30040. const e = t.padding, n = t.fontSizeHeading5, r = t.lineHeightHeading5, i = Bt(t, {
  30041. modalBodyPadding: t.paddingLG,
  30042. modalHeaderBg: t.colorBgElevated,
  30043. modalHeaderPadding: `${e}px ${t.paddingLG}px`,
  30044. modalHeaderBorderWidth: t.lineWidth,
  30045. modalHeaderBorderStyle: t.lineType,
  30046. modalHeaderTitleLineHeight: r,
  30047. modalHeaderTitleFontSize: n,
  30048. modalHeaderBorderColorSplit: t.colorSplit,
  30049. modalHeaderCloseSize: r * n + e * 2,
  30050. modalContentBg: t.colorBgElevated,
  30051. modalHeadingColor: t.colorTextHeading,
  30052. modalCloseColor: t.colorTextDescription,
  30053. modalFooterBg: "transparent",
  30054. modalFooterBorderColorSplit: t.colorSplit,
  30055. modalFooterBorderStyle: t.lineType,
  30056. modalFooterPaddingVertical: t.paddingXS,
  30057. modalFooterPaddingHorizontal: t.padding,
  30058. modalFooterBorderWidth: t.lineWidth,
  30059. modalConfirmTitleFontSize: t.fontSizeLG,
  30060. modalIconHoverColor: t.colorIconHover,
  30061. modalConfirmIconSize: t.fontSize * t.lineHeight,
  30062. modalCloseBtnSize: t.controlHeightLG * 0.55
  30063. });
  30064. return [QCe(i), HCe(i), GCe(i), cY(i), t.wireframe && jCe(i), ux(i, "zoom")];
  30065. }), Y2 = (t) => ({
  30066. position: t || "absolute",
  30067. inset: 0
  30068. }), UCe = (t) => {
  30069. const {
  30070. iconCls: e,
  30071. motionDurationSlow: n,
  30072. paddingXXS: r,
  30073. marginXXS: i,
  30074. prefixCls: a
  30075. } = t;
  30076. return {
  30077. position: "absolute",
  30078. inset: 0,
  30079. display: "flex",
  30080. alignItems: "center",
  30081. justifyContent: "center",
  30082. color: "#fff",
  30083. background: new en("#000").setAlpha(0.5).toRgbString(),
  30084. cursor: "pointer",
  30085. opacity: 0,
  30086. transition: `opacity ${n}`,
  30087. [`.${a}-mask-info`]: I(I({}, mh), {
  30088. padding: `0 ${r}px`,
  30089. [e]: {
  30090. marginInlineEnd: i,
  30091. svg: {
  30092. verticalAlign: "baseline"
  30093. }
  30094. }
  30095. })
  30096. };
  30097. }, XCe = (t) => {
  30098. const {
  30099. previewCls: e,
  30100. modalMaskBg: n,
  30101. paddingSM: r,
  30102. previewOperationColorDisabled: i,
  30103. motionDurationSlow: a
  30104. } = t, o = new en(n).setAlpha(0.1), s = o.clone().setAlpha(0.2);
  30105. return {
  30106. [`${e}-operations`]: I(I({}, nn(t)), {
  30107. display: "flex",
  30108. flexDirection: "row-reverse",
  30109. alignItems: "center",
  30110. color: t.previewOperationColor,
  30111. listStyle: "none",
  30112. background: o.toRgbString(),
  30113. pointerEvents: "auto",
  30114. "&-operation": {
  30115. marginInlineStart: r,
  30116. padding: r,
  30117. cursor: "pointer",
  30118. transition: `all ${a}`,
  30119. userSelect: "none",
  30120. "&:hover": {
  30121. background: s.toRgbString()
  30122. },
  30123. "&-disabled": {
  30124. color: i,
  30125. pointerEvents: "none"
  30126. },
  30127. "&:last-of-type": {
  30128. marginInlineStart: 0
  30129. }
  30130. },
  30131. "&-progress": {
  30132. position: "absolute",
  30133. left: {
  30134. _skip_check_: !0,
  30135. value: "50%"
  30136. },
  30137. transform: "translateX(-50%)"
  30138. },
  30139. "&-icon": {
  30140. fontSize: t.previewOperationSize
  30141. }
  30142. })
  30143. };
  30144. }, YCe = (t) => {
  30145. const {
  30146. modalMaskBg: e,
  30147. iconCls: n,
  30148. previewOperationColorDisabled: r,
  30149. previewCls: i,
  30150. zIndexPopup: a,
  30151. motionDurationSlow: o
  30152. } = t, s = new en(e).setAlpha(0.1), l = s.clone().setAlpha(0.2);
  30153. return {
  30154. [`${i}-switch-left, ${i}-switch-right`]: {
  30155. position: "fixed",
  30156. insetBlockStart: "50%",
  30157. zIndex: a + 1,
  30158. display: "flex",
  30159. alignItems: "center",
  30160. justifyContent: "center",
  30161. width: t.imagePreviewSwitchSize,
  30162. height: t.imagePreviewSwitchSize,
  30163. marginTop: -t.imagePreviewSwitchSize / 2,
  30164. color: t.previewOperationColor,
  30165. background: s.toRgbString(),
  30166. borderRadius: "50%",
  30167. transform: "translateY(-50%)",
  30168. cursor: "pointer",
  30169. transition: `all ${o}`,
  30170. pointerEvents: "auto",
  30171. userSelect: "none",
  30172. "&:hover": {
  30173. background: l.toRgbString()
  30174. },
  30175. "&-disabled": {
  30176. "&, &:hover": {
  30177. color: r,
  30178. background: "transparent",
  30179. cursor: "not-allowed",
  30180. [`> ${n}`]: {
  30181. cursor: "not-allowed"
  30182. }
  30183. }
  30184. },
  30185. [`> ${n}`]: {
  30186. fontSize: t.previewOperationSize
  30187. }
  30188. },
  30189. [`${i}-switch-left`]: {
  30190. insetInlineStart: t.marginSM
  30191. },
  30192. [`${i}-switch-right`]: {
  30193. insetInlineEnd: t.marginSM
  30194. }
  30195. };
  30196. }, qCe = (t) => {
  30197. const {
  30198. motionEaseOut: e,
  30199. previewCls: n,
  30200. motionDurationSlow: r,
  30201. componentCls: i
  30202. } = t;
  30203. return [
  30204. {
  30205. [`${i}-preview-root`]: {
  30206. [n]: {
  30207. height: "100%",
  30208. textAlign: "center",
  30209. pointerEvents: "none"
  30210. },
  30211. [`${n}-body`]: I(I({}, Y2()), {
  30212. overflow: "hidden"
  30213. }),
  30214. [`${n}-img`]: {
  30215. maxWidth: "100%",
  30216. maxHeight: "100%",
  30217. verticalAlign: "middle",
  30218. transform: "scale3d(1, 1, 1)",
  30219. cursor: "grab",
  30220. transition: `transform ${r} ${e} 0s`,
  30221. userSelect: "none",
  30222. pointerEvents: "auto",
  30223. "&-wrapper": I(I({}, Y2()), {
  30224. transition: `transform ${r} ${e} 0s`,
  30225. // https://github.com/ant-design/ant-design/issues/39913
  30226. // TailwindCSS will reset img default style.
  30227. // Let's set back.
  30228. display: "flex",
  30229. justifyContent: "center",
  30230. alignItems: "center",
  30231. "&::before": {
  30232. display: "inline-block",
  30233. width: 1,
  30234. height: "50%",
  30235. marginInlineEnd: -1,
  30236. content: '""'
  30237. }
  30238. })
  30239. },
  30240. [`${n}-moving`]: {
  30241. [`${n}-preview-img`]: {
  30242. cursor: "grabbing",
  30243. "&-wrapper": {
  30244. transitionDuration: "0s"
  30245. }
  30246. }
  30247. }
  30248. }
  30249. },
  30250. // Override
  30251. {
  30252. [`${i}-preview-root`]: {
  30253. [`${n}-wrap`]: {
  30254. zIndex: t.zIndexPopup
  30255. }
  30256. }
  30257. },
  30258. // Preview operations & switch
  30259. {
  30260. [`${i}-preview-operations-wrapper`]: {
  30261. position: "fixed",
  30262. insetBlockStart: 0,
  30263. insetInlineEnd: 0,
  30264. zIndex: t.zIndexPopup + 1,
  30265. width: "100%"
  30266. },
  30267. "&": [XCe(t), YCe(t)]
  30268. }
  30269. ];
  30270. }, KCe = (t) => {
  30271. const {
  30272. componentCls: e
  30273. } = t;
  30274. return {
  30275. // ============================== image ==============================
  30276. [e]: {
  30277. position: "relative",
  30278. display: "inline-block",
  30279. [`${e}-img`]: {
  30280. width: "100%",
  30281. height: "auto",
  30282. verticalAlign: "middle"
  30283. },
  30284. [`${e}-img-placeholder`]: {
  30285. backgroundColor: t.colorBgContainerDisabled,
  30286. backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
  30287. backgroundRepeat: "no-repeat",
  30288. backgroundPosition: "center center",
  30289. backgroundSize: "30%"
  30290. },
  30291. [`${e}-mask`]: I({}, UCe(t)),
  30292. [`${e}-mask:hover`]: {
  30293. opacity: 1
  30294. },
  30295. [`${e}-placeholder`]: I({}, Y2())
  30296. }
  30297. };
  30298. }, JCe = (t) => {
  30299. const {
  30300. previewCls: e
  30301. } = t;
  30302. return {
  30303. [`${e}-root`]: ux(t, "zoom"),
  30304. "&": TU(t, !0)
  30305. };
  30306. }, fY = Sn("Image", (t) => {
  30307. const e = `${t.componentCls}-preview`, n = Bt(t, {
  30308. previewCls: e,
  30309. modalMaskBg: new en("#000").setAlpha(0.45).toRgbString(),
  30310. imagePreviewSwitchSize: t.controlHeightLG
  30311. });
  30312. return [KCe(n), qCe(n), cY(Bt(n, {
  30313. componentCls: e
  30314. })), JCe(n)];
  30315. }, (t) => ({
  30316. zIndexPopup: t.zIndexPopupBase + 80,
  30317. previewOperationColor: new en(t.colorTextLightSolid).toRgbString(),
  30318. previewOperationColorDisabled: new en(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
  30319. previewOperationSize: t.fontSizeIcon * 1.5
  30320. // FIXME: fontSizeIconLG
  30321. })), dY = {
  30322. rotateLeft: M(_D, null, null),
  30323. rotateRight: M(OD, null, null),
  30324. zoomIn: M(SD, null, null),
  30325. zoomOut: M(xD, null, null),
  30326. close: M(al, null, null),
  30327. left: M(uD, null, null),
  30328. right: M(px, null, null),
  30329. flipX: M(F1, null, null),
  30330. flipY: M(F1, {
  30331. rotate: 90
  30332. }, null)
  30333. }, eTe = () => ({
  30334. previewPrefixCls: String,
  30335. preview: fa()
  30336. }), tTe = te({
  30337. compatConfig: {
  30338. MODE: 3
  30339. },
  30340. name: "AImagePreviewGroup",
  30341. inheritAttrs: !1,
  30342. props: eTe(),
  30343. setup(t, e) {
  30344. let {
  30345. attrs: n,
  30346. slots: r
  30347. } = e;
  30348. const {
  30349. prefixCls: i,
  30350. rootPrefixCls: a
  30351. } = It("image", t), o = L(() => `${i.value}-preview`), [s, l] = fY(i), u = L(() => {
  30352. const {
  30353. preview: c
  30354. } = t;
  30355. if (c === !1)
  30356. return c;
  30357. const f = typeof c == "object" ? c : {};
  30358. return I(I({}, f), {
  30359. rootClassName: l.value,
  30360. transitionName: es(a.value, "zoom", f.transitionName),
  30361. maskTransitionName: es(a.value, "fade", f.maskTransitionName)
  30362. });
  30363. });
  30364. return () => s(M(aY, j(j({}, I(I({}, n), t)), {}, {
  30365. preview: u.value,
  30366. icons: dY,
  30367. previewPrefixCls: o.value
  30368. }), r));
  30369. }
  30370. }), nTe = tTe, Al = te({
  30371. name: "AImage",
  30372. inheritAttrs: !1,
  30373. props: sY(),
  30374. setup(t, e) {
  30375. let {
  30376. slots: n,
  30377. attrs: r
  30378. } = e;
  30379. const {
  30380. prefixCls: i,
  30381. rootPrefixCls: a,
  30382. configProvider: o
  30383. } = It("image", t), [s, l] = fY(i), u = L(() => {
  30384. const {
  30385. preview: c
  30386. } = t;
  30387. if (c === !1)
  30388. return c;
  30389. const f = typeof c == "object" ? c : {};
  30390. return I(I({
  30391. icons: dY
  30392. }, f), {
  30393. transitionName: es(a.value, "zoom", f.transitionName),
  30394. maskTransitionName: es(a.value, "fade", f.maskTransitionName)
  30395. });
  30396. });
  30397. return () => {
  30398. var c, f;
  30399. const d = ((f = (c = o.locale) === null || c === void 0 ? void 0 : c.value) === null || f === void 0 ? void 0 : f.Image) || zs.Image, h = () => M("div", {
  30400. class: `${i.value}-mask-info`
  30401. }, [M(xx, null, null), d == null ? void 0 : d.preview]), {
  30402. previewMask: p = n.previewMask || h
  30403. } = t;
  30404. return s(M(ICe, j(j({}, I(I(I({}, r), t), {
  30405. prefixCls: i.value
  30406. })), {}, {
  30407. preview: u.value,
  30408. rootClassName: ye(t.rootClassName, l.value)
  30409. }), I(I({}, n), {
  30410. previewMask: typeof p == "function" ? p : null
  30411. })));
  30412. };
  30413. }
  30414. });
  30415. Al.PreviewGroup = nTe;
  30416. Al.install = function(t) {
  30417. return t.component(Al.name, Al), t.component(Al.PreviewGroup.name, Al.PreviewGroup), t;
  30418. };
  30419. var rTe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
  30420. function v3(t) {
  30421. for (var e = 1; e < arguments.length; e++) {
  30422. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  30423. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  30424. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  30425. }))), r.forEach(function(i) {
  30426. iTe(t, i, n[i]);
  30427. });
  30428. }
  30429. return t;
  30430. }
  30431. function iTe(t, e, n) {
  30432. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  30433. }
  30434. var wD = function(e, n) {
  30435. var r = v3({}, e, n.attrs);
  30436. return M(lt, v3({}, r, {
  30437. icon: rTe
  30438. }), null);
  30439. };
  30440. wD.displayName = "UpOutlined";
  30441. wD.inheritAttrs = !1;
  30442. function q2() {
  30443. return typeof BigInt == "function";
  30444. }
  30445. function vg(t) {
  30446. let e = t.trim(), n = e.startsWith("-");
  30447. n && (e = e.slice(1)), e = e.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), e.startsWith(".") && (e = `0${e}`);
  30448. const r = e || "0", i = r.split("."), a = i[0] || "0", o = i[1] || "0";
  30449. a === "0" && o === "0" && (n = !1);
  30450. const s = n ? "-" : "";
  30451. return {
  30452. negative: n,
  30453. negativeStr: s,
  30454. trimStr: r,
  30455. integerStr: a,
  30456. decimalStr: o,
  30457. fullStr: `${s}${r}`
  30458. };
  30459. }
  30460. function CD(t) {
  30461. const e = String(t);
  30462. return !Number.isNaN(Number(e)) && e.includes("e");
  30463. }
  30464. function sm(t) {
  30465. const e = String(t);
  30466. if (CD(t)) {
  30467. let n = Number(e.slice(e.indexOf("e-") + 2));
  30468. const r = e.match(/\.(\d+)/);
  30469. return r != null && r[1] && (n += r[1].length), n;
  30470. }
  30471. return e.includes(".") && PD(e) ? e.length - e.indexOf(".") - 1 : 0;
  30472. }
  30473. function TD(t) {
  30474. let e = String(t);
  30475. if (CD(t)) {
  30476. if (t > Number.MAX_SAFE_INTEGER)
  30477. return String(q2() ? BigInt(t).toString() : Number.MAX_SAFE_INTEGER);
  30478. if (t < Number.MIN_SAFE_INTEGER)
  30479. return String(q2() ? BigInt(t).toString() : Number.MIN_SAFE_INTEGER);
  30480. e = t.toFixed(sm(e));
  30481. }
  30482. return vg(e).fullStr;
  30483. }
  30484. function PD(t) {
  30485. return typeof t == "number" ? !Number.isNaN(t) : t ? (
  30486. // Normal type: 11.28
  30487. /^\s*-?\d+(\.\d+)?\s*$/.test(t) || // Pre-number: 1.
  30488. /^\s*-?\d+\.\s*$/.test(t) || // Post-number: .1
  30489. /^\s*-?\.\d+\s*$/.test(t)
  30490. ) : !1;
  30491. }
  30492. function hY(t) {
  30493. return !t && t !== 0 && !Number.isNaN(t) || !String(t).trim();
  30494. }
  30495. class Oc {
  30496. constructor(e) {
  30497. if (this.origin = "", hY(e)) {
  30498. this.empty = !0;
  30499. return;
  30500. }
  30501. this.origin = String(e), this.number = Number(e);
  30502. }
  30503. negate() {
  30504. return new Oc(-this.toNumber());
  30505. }
  30506. add(e) {
  30507. if (this.isInvalidate())
  30508. return new Oc(e);
  30509. const n = Number(e);
  30510. if (Number.isNaN(n))
  30511. return this;
  30512. const r = this.number + n;
  30513. if (r > Number.MAX_SAFE_INTEGER)
  30514. return new Oc(Number.MAX_SAFE_INTEGER);
  30515. if (r < Number.MIN_SAFE_INTEGER)
  30516. return new Oc(Number.MIN_SAFE_INTEGER);
  30517. const i = Math.max(sm(this.number), sm(n));
  30518. return new Oc(r.toFixed(i));
  30519. }
  30520. isEmpty() {
  30521. return this.empty;
  30522. }
  30523. isNaN() {
  30524. return Number.isNaN(this.number);
  30525. }
  30526. isInvalidate() {
  30527. return this.isEmpty() || this.isNaN();
  30528. }
  30529. equals(e) {
  30530. return this.toNumber() === (e == null ? void 0 : e.toNumber());
  30531. }
  30532. lessEquals(e) {
  30533. return this.add(e.negate().toString()).toNumber() <= 0;
  30534. }
  30535. toNumber() {
  30536. return this.number;
  30537. }
  30538. toString() {
  30539. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : TD(this.number) : this.origin;
  30540. }
  30541. }
  30542. class Bd {
  30543. constructor(e) {
  30544. if (this.origin = "", hY(e)) {
  30545. this.empty = !0;
  30546. return;
  30547. }
  30548. if (this.origin = String(e), e === "-" || Number.isNaN(e)) {
  30549. this.nan = !0;
  30550. return;
  30551. }
  30552. let n = e;
  30553. if (CD(n) && (n = Number(n)), n = typeof n == "string" ? n : TD(n), PD(n)) {
  30554. const r = vg(n);
  30555. this.negative = r.negative;
  30556. const i = r.trimStr.split(".");
  30557. this.integer = BigInt(i[0]);
  30558. const a = i[1] || "0";
  30559. this.decimal = BigInt(a), this.decimalLen = a.length;
  30560. } else
  30561. this.nan = !0;
  30562. }
  30563. getMark() {
  30564. return this.negative ? "-" : "";
  30565. }
  30566. getIntegerStr() {
  30567. return this.integer.toString();
  30568. }
  30569. getDecimalStr() {
  30570. return this.decimal.toString().padStart(this.decimalLen, "0");
  30571. }
  30572. /**
  30573. * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
  30574. * This is used for add function only.
  30575. */
  30576. alignDecimal(e) {
  30577. const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e, "0")}`;
  30578. return BigInt(n);
  30579. }
  30580. negate() {
  30581. const e = new Bd(this.toString());
  30582. return e.negative = !e.negative, e;
  30583. }
  30584. add(e) {
  30585. if (this.isInvalidate())
  30586. return new Bd(e);
  30587. const n = new Bd(e);
  30588. if (n.isInvalidate())
  30589. return this;
  30590. const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(r), a = n.alignDecimal(r), o = (i + a).toString(), {
  30591. negativeStr: s,
  30592. trimStr: l
  30593. } = vg(o), u = `${s}${l.padStart(r + 1, "0")}`;
  30594. return new Bd(`${u.slice(0, -r)}.${u.slice(-r)}`);
  30595. }
  30596. isEmpty() {
  30597. return this.empty;
  30598. }
  30599. isNaN() {
  30600. return this.nan;
  30601. }
  30602. isInvalidate() {
  30603. return this.isEmpty() || this.isNaN();
  30604. }
  30605. equals(e) {
  30606. return this.toString() === (e == null ? void 0 : e.toString());
  30607. }
  30608. lessEquals(e) {
  30609. return this.add(e.negate().toString()).toNumber() <= 0;
  30610. }
  30611. toNumber() {
  30612. return this.isNaN() ? NaN : Number(this.toString());
  30613. }
  30614. toString() {
  30615. return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : vg(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  30616. }
  30617. }
  30618. function Mo(t) {
  30619. return q2() ? new Bd(t) : new Oc(t);
  30620. }
  30621. function K2(t, e, n) {
  30622. let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  30623. if (t === "")
  30624. return "";
  30625. const {
  30626. negativeStr: i,
  30627. integerStr: a,
  30628. decimalStr: o
  30629. } = vg(t), s = `${e}${o}`, l = `${i}${a}`;
  30630. if (n >= 0) {
  30631. const u = Number(o[n]);
  30632. if (u >= 5 && !r) {
  30633. const c = Mo(t).add(`${i}0.${"0".repeat(n)}${10 - u}`);
  30634. return K2(c.toString(), e, n, r);
  30635. }
  30636. return n === 0 ? l : `${l}${e}${o.padEnd(n, "0").slice(0, n)}`;
  30637. }
  30638. return s === ".0" ? l : `${l}${s}`;
  30639. }
  30640. const aTe = 200, oTe = 600, sTe = te({
  30641. compatConfig: {
  30642. MODE: 3
  30643. },
  30644. name: "StepHandler",
  30645. inheritAttrs: !1,
  30646. props: {
  30647. prefixCls: String,
  30648. upDisabled: Boolean,
  30649. downDisabled: Boolean,
  30650. onStep: tt()
  30651. },
  30652. slots: Object,
  30653. setup(t, e) {
  30654. let {
  30655. slots: n,
  30656. emit: r
  30657. } = e;
  30658. const i = U(), a = (s, l) => {
  30659. s.preventDefault(), r("step", l);
  30660. function u() {
  30661. r("step", l), i.value = setTimeout(u, aTe);
  30662. }
  30663. i.value = setTimeout(u, oTe);
  30664. }, o = () => {
  30665. clearTimeout(i.value);
  30666. };
  30667. return yt(() => {
  30668. o();
  30669. }), () => {
  30670. if (AI())
  30671. return null;
  30672. const {
  30673. prefixCls: s,
  30674. upDisabled: l,
  30675. downDisabled: u
  30676. } = t, c = `${s}-handler`, f = ye(c, `${c}-up`, {
  30677. [`${c}-up-disabled`]: l
  30678. }), d = ye(c, `${c}-down`, {
  30679. [`${c}-down-disabled`]: u
  30680. }), h = {
  30681. unselectable: "on",
  30682. role: "button",
  30683. onMouseup: o,
  30684. onMouseleave: o
  30685. }, {
  30686. upNode: p,
  30687. downNode: v
  30688. } = n;
  30689. return M("div", {
  30690. class: `${c}-wrap`
  30691. }, [M("span", j(j({}, h), {}, {
  30692. onMousedown: (g) => {
  30693. a(g, !0);
  30694. },
  30695. "aria-label": "Increase Value",
  30696. "aria-disabled": l,
  30697. class: f
  30698. }), [(p == null ? void 0 : p()) || M("span", {
  30699. unselectable: "on",
  30700. class: `${s}-handler-up-inner`
  30701. }, null)]), M("span", j(j({}, h), {}, {
  30702. onMousedown: (g) => {
  30703. a(g, !1);
  30704. },
  30705. "aria-label": "Decrease Value",
  30706. "aria-disabled": u,
  30707. class: d
  30708. }), [(v == null ? void 0 : v()) || M("span", {
  30709. unselectable: "on",
  30710. class: `${s}-handler-down-inner`
  30711. }, null)])]);
  30712. };
  30713. }
  30714. });
  30715. function lTe(t, e) {
  30716. const n = U(null);
  30717. function r() {
  30718. try {
  30719. const {
  30720. selectionStart: a,
  30721. selectionEnd: o,
  30722. value: s
  30723. } = t.value, l = s.substring(0, a), u = s.substring(o);
  30724. n.value = {
  30725. start: a,
  30726. end: o,
  30727. value: s,
  30728. beforeTxt: l,
  30729. afterTxt: u
  30730. };
  30731. } catch {
  30732. }
  30733. }
  30734. function i() {
  30735. if (t.value && n.value && e.value)
  30736. try {
  30737. const {
  30738. value: a
  30739. } = t.value, {
  30740. beforeTxt: o,
  30741. afterTxt: s,
  30742. start: l
  30743. } = n.value;
  30744. let u = a.length;
  30745. if (a.endsWith(s))
  30746. u = a.length - n.value.afterTxt.length;
  30747. else if (a.startsWith(o))
  30748. u = o.length;
  30749. else {
  30750. const c = o[l - 1], f = a.indexOf(c, l - 1);
  30751. f !== -1 && (u = f + 1);
  30752. }
  30753. t.value.setSelectionRange(u, u);
  30754. } catch (a) {
  30755. cf(!1, `Something warning of cursor restore. Please fire issue about this: ${a.message}`);
  30756. }
  30757. }
  30758. return [r, i];
  30759. }
  30760. const uTe = () => {
  30761. const t = ae(0), e = () => {
  30762. xt.cancel(t.value);
  30763. };
  30764. return yt(() => {
  30765. e();
  30766. }), (n) => {
  30767. e(), t.value = xt(() => {
  30768. n();
  30769. });
  30770. };
  30771. };
  30772. var cTe = function(t, e) {
  30773. var n = {};
  30774. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  30775. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  30776. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  30777. return n;
  30778. };
  30779. const g3 = (t, e) => t || e.isEmpty() ? e.toString() : e.toNumber(), m3 = (t) => {
  30780. const e = Mo(t);
  30781. return e.isInvalidate() ? null : e;
  30782. }, pY = () => ({
  30783. /** value will show as string */
  30784. stringMode: nt(),
  30785. defaultValue: gn([String, Number]),
  30786. value: gn([String, Number]),
  30787. prefixCls: hn(),
  30788. min: gn([String, Number]),
  30789. max: gn([String, Number]),
  30790. step: gn([String, Number], 1),
  30791. tabindex: Number,
  30792. controls: nt(!0),
  30793. readonly: nt(),
  30794. disabled: nt(),
  30795. autofocus: nt(),
  30796. keyboard: nt(!0),
  30797. /** Parse display value to validate number */
  30798. parser: tt(),
  30799. /** Transform `value` to display value show in input */
  30800. formatter: tt(),
  30801. /** Syntactic sugar of `formatter`. Config precision of display. */
  30802. precision: Number,
  30803. /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  30804. decimalSeparator: String,
  30805. onInput: tt(),
  30806. onChange: tt(),
  30807. onPressEnter: tt(),
  30808. onStep: tt(),
  30809. onBlur: tt(),
  30810. onFocus: tt()
  30811. }), fTe = te({
  30812. compatConfig: {
  30813. MODE: 3
  30814. },
  30815. name: "InnerInputNumber",
  30816. inheritAttrs: !1,
  30817. props: I(I({}, pY()), {
  30818. lazy: Boolean
  30819. }),
  30820. slots: Object,
  30821. setup(t, e) {
  30822. let {
  30823. attrs: n,
  30824. slots: r,
  30825. emit: i,
  30826. expose: a
  30827. } = e;
  30828. const o = ae(), s = ae(!1), l = ae(!1), u = ae(!1), c = ae(Mo(t.value));
  30829. function f(F) {
  30830. t.value === void 0 && (c.value = F);
  30831. }
  30832. const d = (F, Q) => {
  30833. if (!Q)
  30834. return t.precision >= 0 ? t.precision : Math.max(sm(F), sm(t.step));
  30835. }, h = (F) => {
  30836. const Q = String(F);
  30837. if (t.parser)
  30838. return t.parser(Q);
  30839. let Z = Q;
  30840. return t.decimalSeparator && (Z = Z.replace(t.decimalSeparator, ".")), Z.replace(/[^\w.-]+/g, "");
  30841. }, p = ae(""), v = (F, Q) => {
  30842. if (t.formatter)
  30843. return t.formatter(F, {
  30844. userTyping: Q,
  30845. input: String(p.value)
  30846. });
  30847. let Z = typeof F == "number" ? TD(F) : F;
  30848. if (!Q) {
  30849. const ne = d(Z, Q);
  30850. if (PD(Z) && (t.decimalSeparator || ne >= 0)) {
  30851. const ee = t.decimalSeparator || ".";
  30852. Z = K2(Z, ee, ne);
  30853. }
  30854. }
  30855. return Z;
  30856. }, g = (() => {
  30857. const F = t.value;
  30858. return c.value.isInvalidate() && ["string", "number"].includes(typeof F) ? Number.isNaN(F) ? "" : F : v(c.value.toString(), !1);
  30859. })();
  30860. p.value = g;
  30861. function m(F, Q) {
  30862. p.value = v(
  30863. // Invalidate number is sometime passed by external control, we should let it go
  30864. // Otherwise is controlled by internal interactive logic which check by userTyping
  30865. // You can ref 'show limited value when input is not focused' test for more info.
  30866. F.isInvalidate() ? F.toString(!1) : F.toString(!Q),
  30867. Q
  30868. );
  30869. }
  30870. const y = L(() => m3(t.max)), b = L(() => m3(t.min)), _ = L(() => !y.value || !c.value || c.value.isInvalidate() ? !1 : y.value.lessEquals(c.value)), O = L(() => !b.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(b.value)), [S, x] = lTe(o, s), C = (F) => y.value && !F.lessEquals(y.value) ? y.value : b.value && !b.value.lessEquals(F) ? b.value : null, T = (F) => !C(F), w = (F, Q) => {
  30871. var Z;
  30872. let ne = F, ee = T(ne) || ne.isEmpty();
  30873. if (!ne.isEmpty() && !Q && (ne = C(ne) || ne, ee = !0), !t.readonly && !t.disabled && ee) {
  30874. const oe = ne.toString(), K = d(oe, Q);
  30875. return K >= 0 && (ne = Mo(K2(oe, ".", K))), ne.equals(c.value) || (f(ne), (Z = t.onChange) === null || Z === void 0 || Z.call(t, ne.isEmpty() ? null : g3(t.stringMode, ne)), t.value === void 0 && m(ne, Q)), ne;
  30876. }
  30877. return c.value;
  30878. }, P = uTe(), $ = (F) => {
  30879. var Q;
  30880. if (S(), p.value = F, !u.value) {
  30881. const Z = h(F), ne = Mo(Z);
  30882. ne.isNaN() || w(ne, !0);
  30883. }
  30884. (Q = t.onInput) === null || Q === void 0 || Q.call(t, F), P(() => {
  30885. let Z = F;
  30886. t.parser || (Z = F.replace(/。/g, ".")), Z !== F && $(Z);
  30887. });
  30888. }, A = () => {
  30889. u.value = !0;
  30890. }, D = () => {
  30891. u.value = !1, $(o.value.value);
  30892. }, E = (F) => {
  30893. $(F.target.value);
  30894. }, R = (F) => {
  30895. var Q, Z;
  30896. if (F && _.value || !F && O.value)
  30897. return;
  30898. l.value = !1;
  30899. let ne = Mo(t.step);
  30900. F || (ne = ne.negate());
  30901. const ee = (c.value || Mo(0)).add(ne.toString()), oe = w(ee, !1);
  30902. (Q = t.onStep) === null || Q === void 0 || Q.call(t, g3(t.stringMode, oe), {
  30903. offset: t.step,
  30904. type: F ? "up" : "down"
  30905. }), (Z = o.value) === null || Z === void 0 || Z.focus();
  30906. }, N = (F) => {
  30907. const Q = Mo(h(p.value));
  30908. let Z = Q;
  30909. Q.isNaN() ? Z = c.value : Z = w(Q, F), t.value !== void 0 ? m(c.value, !1) : Z.isNaN() || m(Z, !1);
  30910. }, V = (F) => {
  30911. var Q;
  30912. const {
  30913. which: Z
  30914. } = F;
  30915. l.value = !0, Z === ge.ENTER && (u.value || (l.value = !1), N(!1), (Q = t.onPressEnter) === null || Q === void 0 || Q.call(t, F)), t.keyboard !== !1 && !u.value && [ge.UP, ge.DOWN].includes(Z) && (R(ge.UP === Z), F.preventDefault());
  30916. }, z = () => {
  30917. l.value = !1;
  30918. }, W = (F) => {
  30919. N(!1), s.value = !1, l.value = !1, i("blur", F);
  30920. };
  30921. return se(() => t.precision, () => {
  30922. c.value.isInvalidate() || m(c.value, !1);
  30923. }, {
  30924. flush: "post"
  30925. }), se(() => t.value, () => {
  30926. const F = Mo(t.value);
  30927. c.value = F;
  30928. const Q = Mo(h(p.value));
  30929. (!F.equals(Q) || !l.value || t.formatter) && m(F, l.value);
  30930. }, {
  30931. flush: "post"
  30932. }), se(p, () => {
  30933. t.formatter && x();
  30934. }, {
  30935. flush: "post"
  30936. }), se(() => t.disabled, (F) => {
  30937. F && (s.value = !1);
  30938. }), a({
  30939. focus: () => {
  30940. var F;
  30941. (F = o.value) === null || F === void 0 || F.focus();
  30942. },
  30943. blur: () => {
  30944. var F;
  30945. (F = o.value) === null || F === void 0 || F.blur();
  30946. }
  30947. }), () => {
  30948. const F = I(I({}, n), t), {
  30949. prefixCls: Q = "rc-input-number",
  30950. min: Z,
  30951. max: ne,
  30952. step: ee = 1,
  30953. defaultValue: oe,
  30954. value: K,
  30955. disabled: ie,
  30956. readonly: X,
  30957. keyboard: H,
  30958. controls: G = !0,
  30959. autofocus: re,
  30960. stringMode: fe,
  30961. parser: de,
  30962. formatter: Ee,
  30963. precision: $e,
  30964. decimalSeparator: Se,
  30965. onChange: be,
  30966. onInput: he,
  30967. onPressEnter: Te,
  30968. onStep: ze,
  30969. lazy: ut,
  30970. class: ct,
  30971. style: Dt
  30972. } = F, ve = cTe(F, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
  30973. upHandler: Xe,
  30974. downHandler: Rt
  30975. } = r, An = `${Q}-input`, sn = {};
  30976. return ut ? sn.onChange = E : sn.onInput = E, M("div", {
  30977. class: ye(Q, ct, {
  30978. [`${Q}-focused`]: s.value,
  30979. [`${Q}-disabled`]: ie,
  30980. [`${Q}-readonly`]: X,
  30981. [`${Q}-not-a-number`]: c.value.isNaN(),
  30982. [`${Q}-out-of-range`]: !c.value.isInvalidate() && !T(c.value)
  30983. }),
  30984. style: Dt,
  30985. onKeydown: V,
  30986. onKeyup: z
  30987. }, [G && M(sTe, {
  30988. prefixCls: Q,
  30989. upDisabled: _.value,
  30990. downDisabled: O.value,
  30991. onStep: R
  30992. }, {
  30993. upNode: Xe,
  30994. downNode: Rt
  30995. }), M("div", {
  30996. class: `${An}-wrap`
  30997. }, [M("input", j(j(j({
  30998. autofocus: re,
  30999. autocomplete: "off",
  31000. role: "spinbutton",
  31001. "aria-valuemin": Z,
  31002. "aria-valuemax": ne,
  31003. "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
  31004. step: ee
  31005. }, ve), {}, {
  31006. ref: o,
  31007. class: An,
  31008. value: p.value,
  31009. disabled: ie,
  31010. readonly: X,
  31011. onFocus: ($r) => {
  31012. s.value = !0, i("focus", $r);
  31013. }
  31014. }, sn), {}, {
  31015. onBlur: W,
  31016. onCompositionstart: A,
  31017. onCompositionend: D
  31018. }), null)])]);
  31019. };
  31020. }
  31021. });
  31022. function IC(t) {
  31023. return t != null;
  31024. }
  31025. const dTe = (t) => {
  31026. const {
  31027. componentCls: e,
  31028. lineWidth: n,
  31029. lineType: r,
  31030. colorBorder: i,
  31031. borderRadius: a,
  31032. fontSizeLG: o,
  31033. controlHeightLG: s,
  31034. controlHeightSM: l,
  31035. colorError: u,
  31036. inputPaddingHorizontalSM: c,
  31037. colorTextDescription: f,
  31038. motionDurationMid: d,
  31039. colorPrimary: h,
  31040. controlHeight: p,
  31041. inputPaddingHorizontal: v,
  31042. colorBgContainer: g,
  31043. colorTextDisabled: m,
  31044. borderRadiusSM: y,
  31045. borderRadiusLG: b,
  31046. controlWidth: _,
  31047. handleVisible: O
  31048. } = t;
  31049. return [
  31050. {
  31051. [e]: I(I(I(I({}, nn(t)), mx(t)), gx(t, e)), {
  31052. display: "inline-block",
  31053. width: _,
  31054. margin: 0,
  31055. padding: 0,
  31056. border: `${n}px ${r} ${i}`,
  31057. borderRadius: a,
  31058. "&-rtl": {
  31059. direction: "rtl",
  31060. [`${e}-input`]: {
  31061. direction: "rtl"
  31062. }
  31063. },
  31064. "&-lg": {
  31065. padding: 0,
  31066. fontSize: o,
  31067. borderRadius: b,
  31068. [`input${e}-input`]: {
  31069. height: s - 2 * n
  31070. }
  31071. },
  31072. "&-sm": {
  31073. padding: 0,
  31074. borderRadius: y,
  31075. [`input${e}-input`]: {
  31076. height: l - 2 * n,
  31077. padding: `0 ${c}px`
  31078. }
  31079. },
  31080. "&:hover": I({}, b0(t)),
  31081. "&-focused": I({}, N1(t)),
  31082. "&-disabled": I(I({}, iX(t)), {
  31083. [`${e}-input`]: {
  31084. cursor: "not-allowed"
  31085. }
  31086. }),
  31087. // ===================== Out Of Range =====================
  31088. "&-out-of-range": {
  31089. input: {
  31090. color: u
  31091. }
  31092. },
  31093. // Style for input-group: input with label, with button or dropdown...
  31094. "&-group": I(I(I({}, nn(t)), sX(t)), {
  31095. "&-wrapper": {
  31096. display: "inline-block",
  31097. textAlign: "start",
  31098. verticalAlign: "top",
  31099. [`${e}-affix-wrapper`]: {
  31100. width: "100%"
  31101. },
  31102. // Size
  31103. "&-lg": {
  31104. [`${e}-group-addon`]: {
  31105. borderRadius: b
  31106. }
  31107. },
  31108. "&-sm": {
  31109. [`${e}-group-addon`]: {
  31110. borderRadius: y
  31111. }
  31112. }
  31113. }
  31114. }),
  31115. [e]: {
  31116. "&-input": I(I({
  31117. width: "100%",
  31118. height: p - 2 * n,
  31119. padding: `0 ${v}px`,
  31120. textAlign: "start",
  31121. backgroundColor: "transparent",
  31122. border: 0,
  31123. borderRadius: a,
  31124. outline: 0,
  31125. transition: `all ${d} linear`,
  31126. appearance: "textfield",
  31127. color: t.colorText,
  31128. fontSize: "inherit",
  31129. verticalAlign: "top"
  31130. }, rX(t.colorTextPlaceholder)), {
  31131. '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
  31132. margin: 0,
  31133. /* stylelint-disable-next-line property-no-vendor-prefix */
  31134. webkitAppearance: "none",
  31135. appearance: "none"
  31136. }
  31137. })
  31138. }
  31139. })
  31140. },
  31141. // Handler
  31142. {
  31143. [e]: {
  31144. [`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]: {
  31145. opacity: 1
  31146. },
  31147. [`${e}-handler-wrap`]: {
  31148. position: "absolute",
  31149. insetBlockStart: 0,
  31150. insetInlineEnd: 0,
  31151. width: t.handleWidth,
  31152. height: "100%",
  31153. background: g,
  31154. borderStartStartRadius: 0,
  31155. borderStartEndRadius: a,
  31156. borderEndEndRadius: a,
  31157. borderEndStartRadius: 0,
  31158. opacity: O === !0 ? 1 : 0,
  31159. display: "flex",
  31160. flexDirection: "column",
  31161. alignItems: "stretch",
  31162. transition: `opacity ${d} linear ${d}`,
  31163. // Fix input number inside Menu makes icon too large
  31164. // We arise the selector priority by nest selector here
  31165. // https://github.com/ant-design/ant-design/issues/14367
  31166. [`${e}-handler`]: {
  31167. display: "flex",
  31168. alignItems: "center",
  31169. justifyContent: "center",
  31170. flex: "auto",
  31171. height: "40%",
  31172. [`
  31173. ${e}-handler-up-inner,
  31174. ${e}-handler-down-inner
  31175. `]: {
  31176. marginInlineEnd: 0,
  31177. fontSize: t.handleFontSize
  31178. }
  31179. }
  31180. },
  31181. [`${e}-handler`]: {
  31182. height: "50%",
  31183. overflow: "hidden",
  31184. color: f,
  31185. fontWeight: "bold",
  31186. lineHeight: 0,
  31187. textAlign: "center",
  31188. cursor: "pointer",
  31189. borderInlineStart: `${n}px ${r} ${i}`,
  31190. transition: `all ${d} linear`,
  31191. "&:active": {
  31192. background: t.colorFillAlter
  31193. },
  31194. // Hover
  31195. "&:hover": {
  31196. height: "60%",
  31197. [`
  31198. ${e}-handler-up-inner,
  31199. ${e}-handler-down-inner
  31200. `]: {
  31201. color: h
  31202. }
  31203. },
  31204. "&-up-inner, &-down-inner": I(I({}, ip()), {
  31205. color: f,
  31206. transition: `all ${d} linear`,
  31207. userSelect: "none"
  31208. })
  31209. },
  31210. [`${e}-handler-up`]: {
  31211. borderStartEndRadius: a
  31212. },
  31213. [`${e}-handler-down`]: {
  31214. borderBlockStart: `${n}px ${r} ${i}`,
  31215. borderEndEndRadius: a
  31216. },
  31217. // Disabled
  31218. "&-disabled, &-readonly": {
  31219. [`${e}-handler-wrap`]: {
  31220. display: "none"
  31221. }
  31222. },
  31223. [`
  31224. ${e}-handler-up-disabled,
  31225. ${e}-handler-down-disabled
  31226. `]: {
  31227. cursor: "not-allowed"
  31228. },
  31229. [`
  31230. ${e}-handler-up-disabled:hover &-handler-up-inner,
  31231. ${e}-handler-down-disabled:hover &-handler-down-inner
  31232. `]: {
  31233. color: m
  31234. }
  31235. }
  31236. },
  31237. // Border-less
  31238. {
  31239. [`${e}-borderless`]: {
  31240. borderColor: "transparent",
  31241. boxShadow: "none",
  31242. [`${e}-handler-down`]: {
  31243. borderBlockStartWidth: 0
  31244. }
  31245. }
  31246. }
  31247. ];
  31248. }, hTe = (t) => {
  31249. const {
  31250. componentCls: e,
  31251. inputPaddingHorizontal: n,
  31252. inputAffixPadding: r,
  31253. controlWidth: i,
  31254. borderRadiusLG: a,
  31255. borderRadiusSM: o
  31256. } = t;
  31257. return {
  31258. [`${e}-affix-wrapper`]: I(I(I({}, mx(t)), gx(t, `${e}-affix-wrapper`)), {
  31259. // or number handler will cover form status
  31260. position: "relative",
  31261. display: "inline-flex",
  31262. width: i,
  31263. padding: 0,
  31264. paddingInlineStart: n,
  31265. "&-lg": {
  31266. borderRadius: a
  31267. },
  31268. "&-sm": {
  31269. borderRadius: o
  31270. },
  31271. [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, b0(t)), {
  31272. zIndex: 1
  31273. }),
  31274. "&-focused, &:focus": {
  31275. zIndex: 1
  31276. },
  31277. "&-disabled": {
  31278. [`${e}[disabled]`]: {
  31279. background: "transparent"
  31280. }
  31281. },
  31282. [`> div${e}`]: {
  31283. width: "100%",
  31284. border: "none",
  31285. outline: "none",
  31286. [`&${e}-focused`]: {
  31287. boxShadow: "none !important"
  31288. }
  31289. },
  31290. [`input${e}-input`]: {
  31291. padding: 0
  31292. },
  31293. "&::before": {
  31294. width: 0,
  31295. visibility: "hidden",
  31296. content: '"\\a0"'
  31297. },
  31298. [`${e}-handler-wrap`]: {
  31299. zIndex: 2
  31300. },
  31301. [e]: {
  31302. "&-prefix, &-suffix": {
  31303. display: "flex",
  31304. flex: "none",
  31305. alignItems: "center",
  31306. pointerEvents: "none"
  31307. },
  31308. "&-prefix": {
  31309. marginInlineEnd: r
  31310. },
  31311. "&-suffix": {
  31312. position: "absolute",
  31313. insetBlockStart: 0,
  31314. insetInlineEnd: 0,
  31315. zIndex: 1,
  31316. height: "100%",
  31317. marginInlineEnd: n,
  31318. marginInlineStart: r
  31319. }
  31320. }
  31321. })
  31322. };
  31323. }, pTe = Sn("InputNumber", (t) => {
  31324. const e = lX(t);
  31325. return [
  31326. dTe(e),
  31327. hTe(e),
  31328. // =====================================================
  31329. // == Space Compact ==
  31330. // =====================================================
  31331. cx(e)
  31332. ];
  31333. }, (t) => ({
  31334. controlWidth: 90,
  31335. handleWidth: t.controlHeightSM - t.lineWidth * 2,
  31336. handleFontSize: t.fontSize / 2,
  31337. handleVisible: "auto"
  31338. }));
  31339. var vTe = function(t, e) {
  31340. var n = {};
  31341. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31342. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31343. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31344. return n;
  31345. };
  31346. const y3 = pY(), gTe = () => I(I({}, y3), {
  31347. size: hn(),
  31348. bordered: nt(!0),
  31349. placeholder: String,
  31350. name: String,
  31351. id: String,
  31352. type: String,
  31353. addonBefore: Y.any,
  31354. addonAfter: Y.any,
  31355. prefix: Y.any,
  31356. "onUpdate:value": y3.onChange,
  31357. valueModifiers: Object,
  31358. status: hn()
  31359. }), DC = te({
  31360. compatConfig: {
  31361. MODE: 3
  31362. },
  31363. name: "AInputNumber",
  31364. inheritAttrs: !1,
  31365. props: gTe(),
  31366. // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  31367. slots: Object,
  31368. setup(t, e) {
  31369. let {
  31370. emit: n,
  31371. expose: r,
  31372. attrs: i,
  31373. slots: a
  31374. } = e;
  31375. var o;
  31376. const s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), {
  31377. prefixCls: c,
  31378. size: f,
  31379. direction: d,
  31380. disabled: h
  31381. } = It("input-number", t), {
  31382. compactSize: p,
  31383. compactItemClassnames: v
  31384. } = sx(c, d), g = Ko(), m = L(() => {
  31385. var A;
  31386. return (A = h.value) !== null && A !== void 0 ? A : g.value;
  31387. }), [y, b] = pTe(c), _ = L(() => p.value || f.value), O = ae((o = t.value) !== null && o !== void 0 ? o : t.defaultValue), S = ae(!1);
  31388. se(() => t.value, () => {
  31389. O.value = t.value;
  31390. });
  31391. const x = ae(null), C = () => {
  31392. var A;
  31393. (A = x.value) === null || A === void 0 || A.focus();
  31394. };
  31395. r({
  31396. focus: C,
  31397. blur: () => {
  31398. var A;
  31399. (A = x.value) === null || A === void 0 || A.blur();
  31400. }
  31401. });
  31402. const w = (A) => {
  31403. t.value === void 0 && (O.value = A), n("update:value", A), n("change", A), s.onFieldChange();
  31404. }, P = (A) => {
  31405. S.value = !1, n("blur", A), s.onFieldBlur();
  31406. }, $ = (A) => {
  31407. S.value = !0, n("focus", A);
  31408. };
  31409. return () => {
  31410. var A, D, E, R;
  31411. const {
  31412. hasFeedback: N,
  31413. isFormItemInput: V,
  31414. feedbackIcon: z
  31415. } = l, W = (A = t.id) !== null && A !== void 0 ? A : s.id.value, F = I(I(I({}, i), t), {
  31416. id: W,
  31417. disabled: m.value
  31418. }), {
  31419. class: Q,
  31420. bordered: Z,
  31421. readonly: ne,
  31422. style: ee,
  31423. addonBefore: oe = (D = a.addonBefore) === null || D === void 0 ? void 0 : D.call(a),
  31424. addonAfter: K = (E = a.addonAfter) === null || E === void 0 ? void 0 : E.call(a),
  31425. prefix: ie = (R = a.prefix) === null || R === void 0 ? void 0 : R.call(a),
  31426. valueModifiers: X = {}
  31427. } = F, H = vTe(F, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), G = c.value, re = ye({
  31428. [`${G}-lg`]: _.value === "large",
  31429. [`${G}-sm`]: _.value === "small",
  31430. [`${G}-rtl`]: d.value === "rtl",
  31431. [`${G}-readonly`]: ne,
  31432. [`${G}-borderless`]: !Z,
  31433. [`${G}-in-form-item`]: V
  31434. }, Is(G, u.value), Q, v.value, b.value);
  31435. let fe = M(fTe, j(j({}, or(H, ["size", "defaultValue"])), {}, {
  31436. ref: x,
  31437. lazy: !!X.lazy,
  31438. value: O.value,
  31439. class: re,
  31440. prefixCls: G,
  31441. readonly: ne,
  31442. onChange: w,
  31443. onBlur: P,
  31444. onFocus: $
  31445. }), {
  31446. upHandler: a.upIcon ? () => M("span", {
  31447. class: `${G}-handler-up-inner`
  31448. }, [a.upIcon()]) : () => M(wD, {
  31449. class: `${G}-handler-up-inner`
  31450. }, null),
  31451. downHandler: a.downIcon ? () => M("span", {
  31452. class: `${G}-handler-down-inner`
  31453. }, [a.downIcon()]) : () => M(tx, {
  31454. class: `${G}-handler-down-inner`
  31455. }, null)
  31456. });
  31457. const de = IC(oe) || IC(K), Ee = IC(ie);
  31458. if (Ee || N) {
  31459. const $e = ye(`${G}-affix-wrapper`, Is(`${G}-affix-wrapper`, u.value, N), {
  31460. [`${G}-affix-wrapper-focused`]: S.value,
  31461. [`${G}-affix-wrapper-disabled`]: m.value,
  31462. [`${G}-affix-wrapper-sm`]: _.value === "small",
  31463. [`${G}-affix-wrapper-lg`]: _.value === "large",
  31464. [`${G}-affix-wrapper-rtl`]: d.value === "rtl",
  31465. [`${G}-affix-wrapper-readonly`]: ne,
  31466. [`${G}-affix-wrapper-borderless`]: !Z,
  31467. // className will go to addon wrapper
  31468. [`${Q}`]: !de && Q
  31469. }, b.value);
  31470. fe = M("div", {
  31471. class: $e,
  31472. style: ee,
  31473. onClick: C
  31474. }, [Ee && M("span", {
  31475. class: `${G}-prefix`
  31476. }, [ie]), fe, N && M("span", {
  31477. class: `${G}-suffix`
  31478. }, [z])]);
  31479. }
  31480. if (de) {
  31481. const $e = `${G}-group`, Se = `${$e}-addon`, be = oe ? M("div", {
  31482. class: Se
  31483. }, [oe]) : null, he = K ? M("div", {
  31484. class: Se
  31485. }, [K]) : null, Te = ye(`${G}-wrapper`, $e, {
  31486. [`${$e}-rtl`]: d.value === "rtl"
  31487. }, b.value), ze = ye(`${G}-group-wrapper`, {
  31488. [`${G}-group-wrapper-sm`]: _.value === "small",
  31489. [`${G}-group-wrapper-lg`]: _.value === "large",
  31490. [`${G}-group-wrapper-rtl`]: d.value === "rtl"
  31491. }, Is(`${c}-group-wrapper`, u.value, N), Q, b.value);
  31492. fe = M("div", {
  31493. class: ze,
  31494. style: ee
  31495. }, [M("div", {
  31496. class: Te
  31497. }, [be && M(E1, null, {
  31498. default: () => [M(P1, null, {
  31499. default: () => [be]
  31500. })]
  31501. }), fe, he && M(E1, null, {
  31502. default: () => [M(P1, null, {
  31503. default: () => [he]
  31504. })]
  31505. })])]);
  31506. }
  31507. return y(Pn(fe, {
  31508. style: ee
  31509. }));
  31510. };
  31511. }
  31512. }), O0 = I(DC, {
  31513. install: (t) => (t.component(DC.name, DC), t)
  31514. });
  31515. function mTe(t, e, n) {
  31516. var r = n || {}, i = r.noTrailing, a = i === void 0 ? !1 : i, o = r.noLeading, s = o === void 0 ? !1 : o, l = r.debounceMode, u = l === void 0 ? void 0 : l, c, f = !1, d = 0;
  31517. function h() {
  31518. c && clearTimeout(c);
  31519. }
  31520. function p(g) {
  31521. var m = g || {}, y = m.upcomingOnly, b = y === void 0 ? !1 : y;
  31522. h(), f = !b;
  31523. }
  31524. function v() {
  31525. for (var g = arguments.length, m = new Array(g), y = 0; y < g; y++)
  31526. m[y] = arguments[y];
  31527. var b = this, _ = Date.now() - d;
  31528. if (f)
  31529. return;
  31530. function O() {
  31531. d = Date.now(), e.apply(b, m);
  31532. }
  31533. function S() {
  31534. c = void 0;
  31535. }
  31536. !s && u && !c && O(), h(), u === void 0 && _ > t ? s ? (d = Date.now(), a || (c = setTimeout(u ? S : O, t))) : O() : a !== !0 && (c = setTimeout(u ? S : O, u === void 0 ? t - _ : t));
  31537. }
  31538. return v.cancel = p, v;
  31539. }
  31540. function yTe(t, e, n) {
  31541. var r = {}, i = r.atBegin, a = i === void 0 ? !1 : i;
  31542. return mTe(t, e, {
  31543. debounceMode: a !== !1
  31544. });
  31545. }
  31546. const bTe = new Ot("antSpinMove", {
  31547. to: {
  31548. opacity: 1
  31549. }
  31550. }), _Te = new Ot("antRotate", {
  31551. to: {
  31552. transform: "rotate(405deg)"
  31553. }
  31554. }), OTe = (t) => ({
  31555. [`${t.componentCls}`]: I(I({}, nn(t)), {
  31556. position: "absolute",
  31557. display: "none",
  31558. color: t.colorPrimary,
  31559. textAlign: "center",
  31560. verticalAlign: "middle",
  31561. opacity: 0,
  31562. transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,
  31563. "&-spinning": {
  31564. position: "static",
  31565. display: "inline-block",
  31566. opacity: 1
  31567. },
  31568. "&-nested-loading": {
  31569. position: "relative",
  31570. [`> div > ${t.componentCls}`]: {
  31571. position: "absolute",
  31572. top: 0,
  31573. insetInlineStart: 0,
  31574. zIndex: 4,
  31575. display: "block",
  31576. width: "100%",
  31577. height: "100%",
  31578. maxHeight: t.contentHeight,
  31579. [`${t.componentCls}-dot`]: {
  31580. position: "absolute",
  31581. top: "50%",
  31582. insetInlineStart: "50%",
  31583. margin: -t.spinDotSize / 2
  31584. },
  31585. [`${t.componentCls}-text`]: {
  31586. position: "absolute",
  31587. top: "50%",
  31588. width: "100%",
  31589. paddingTop: (t.spinDotSize - t.fontSize) / 2 + 2,
  31590. textShadow: `0 1px 2px ${t.colorBgContainer}`
  31591. // FIXME: shadow
  31592. },
  31593. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31594. marginTop: -(t.spinDotSize / 2) - 10
  31595. },
  31596. "&-sm": {
  31597. [`${t.componentCls}-dot`]: {
  31598. margin: -t.spinDotSizeSM / 2
  31599. },
  31600. [`${t.componentCls}-text`]: {
  31601. paddingTop: (t.spinDotSizeSM - t.fontSize) / 2 + 2
  31602. },
  31603. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31604. marginTop: -(t.spinDotSizeSM / 2) - 10
  31605. }
  31606. },
  31607. "&-lg": {
  31608. [`${t.componentCls}-dot`]: {
  31609. margin: -(t.spinDotSizeLG / 2)
  31610. },
  31611. [`${t.componentCls}-text`]: {
  31612. paddingTop: (t.spinDotSizeLG - t.fontSize) / 2 + 2
  31613. },
  31614. [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
  31615. marginTop: -(t.spinDotSizeLG / 2) - 10
  31616. }
  31617. }
  31618. },
  31619. [`${t.componentCls}-container`]: {
  31620. position: "relative",
  31621. transition: `opacity ${t.motionDurationSlow}`,
  31622. "&::after": {
  31623. position: "absolute",
  31624. top: 0,
  31625. insetInlineEnd: 0,
  31626. bottom: 0,
  31627. insetInlineStart: 0,
  31628. zIndex: 10,
  31629. width: "100%",
  31630. height: "100%",
  31631. background: t.colorBgContainer,
  31632. opacity: 0,
  31633. transition: `all ${t.motionDurationSlow}`,
  31634. content: '""',
  31635. pointerEvents: "none"
  31636. }
  31637. },
  31638. [`${t.componentCls}-blur`]: {
  31639. clear: "both",
  31640. opacity: 0.5,
  31641. userSelect: "none",
  31642. pointerEvents: "none",
  31643. "&::after": {
  31644. opacity: 0.4,
  31645. pointerEvents: "auto"
  31646. }
  31647. }
  31648. },
  31649. // tip
  31650. // ------------------------------
  31651. "&-tip": {
  31652. color: t.spinDotDefault
  31653. },
  31654. // dots
  31655. // ------------------------------
  31656. [`${t.componentCls}-dot`]: {
  31657. position: "relative",
  31658. display: "inline-block",
  31659. fontSize: t.spinDotSize,
  31660. width: "1em",
  31661. height: "1em",
  31662. "&-item": {
  31663. position: "absolute",
  31664. display: "block",
  31665. width: (t.spinDotSize - t.marginXXS / 2) / 2,
  31666. height: (t.spinDotSize - t.marginXXS / 2) / 2,
  31667. backgroundColor: t.colorPrimary,
  31668. borderRadius: "100%",
  31669. transform: "scale(0.75)",
  31670. transformOrigin: "50% 50%",
  31671. opacity: 0.3,
  31672. animationName: bTe,
  31673. animationDuration: "1s",
  31674. animationIterationCount: "infinite",
  31675. animationTimingFunction: "linear",
  31676. animationDirection: "alternate",
  31677. "&:nth-child(1)": {
  31678. top: 0,
  31679. insetInlineStart: 0
  31680. },
  31681. "&:nth-child(2)": {
  31682. top: 0,
  31683. insetInlineEnd: 0,
  31684. animationDelay: "0.4s"
  31685. },
  31686. "&:nth-child(3)": {
  31687. insetInlineEnd: 0,
  31688. bottom: 0,
  31689. animationDelay: "0.8s"
  31690. },
  31691. "&:nth-child(4)": {
  31692. bottom: 0,
  31693. insetInlineStart: 0,
  31694. animationDelay: "1.2s"
  31695. }
  31696. },
  31697. "&-spin": {
  31698. transform: "rotate(45deg)",
  31699. animationName: _Te,
  31700. animationDuration: "1.2s",
  31701. animationIterationCount: "infinite",
  31702. animationTimingFunction: "linear"
  31703. }
  31704. },
  31705. // Sizes
  31706. // ------------------------------
  31707. // small
  31708. [`&-sm ${t.componentCls}-dot`]: {
  31709. fontSize: t.spinDotSizeSM,
  31710. i: {
  31711. width: (t.spinDotSizeSM - t.marginXXS / 2) / 2,
  31712. height: (t.spinDotSizeSM - t.marginXXS / 2) / 2
  31713. }
  31714. },
  31715. // large
  31716. [`&-lg ${t.componentCls}-dot`]: {
  31717. fontSize: t.spinDotSizeLG,
  31718. i: {
  31719. width: (t.spinDotSizeLG - t.marginXXS) / 2,
  31720. height: (t.spinDotSizeLG - t.marginXXS) / 2
  31721. }
  31722. },
  31723. [`&${t.componentCls}-show-text ${t.componentCls}-text`]: {
  31724. display: "block"
  31725. }
  31726. })
  31727. }), STe = Sn("Spin", (t) => {
  31728. const e = Bt(t, {
  31729. spinDotDefault: t.colorTextDescription,
  31730. spinDotSize: t.controlHeightLG / 2,
  31731. spinDotSizeSM: t.controlHeightLG * 0.35,
  31732. spinDotSizeLG: t.controlHeight
  31733. });
  31734. return [OTe(e)];
  31735. }, {
  31736. contentHeight: 400
  31737. });
  31738. var xTe = function(t, e) {
  31739. var n = {};
  31740. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31741. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31742. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31743. return n;
  31744. };
  31745. const wTe = () => ({
  31746. prefixCls: String,
  31747. spinning: {
  31748. type: Boolean,
  31749. default: void 0
  31750. },
  31751. size: String,
  31752. wrapperClassName: String,
  31753. tip: Y.any,
  31754. delay: Number,
  31755. indicator: Y.any
  31756. });
  31757. let M_ = null;
  31758. function CTe(t, e) {
  31759. return !!t && !!e && !isNaN(Number(e));
  31760. }
  31761. function TTe(t) {
  31762. const e = t.indicator;
  31763. M_ = typeof e == "function" ? e : () => M(e, null, null);
  31764. }
  31765. const gg = te({
  31766. compatConfig: {
  31767. MODE: 3
  31768. },
  31769. name: "ASpin",
  31770. inheritAttrs: !1,
  31771. props: sr(wTe(), {
  31772. size: "default",
  31773. spinning: !0,
  31774. wrapperClassName: ""
  31775. }),
  31776. setup(t, e) {
  31777. let {
  31778. attrs: n,
  31779. slots: r
  31780. } = e;
  31781. const {
  31782. prefixCls: i,
  31783. size: a,
  31784. direction: o
  31785. } = It("spin", t), [s, l] = STe(i), u = ae(t.spinning && !CTe(t.spinning, t.delay));
  31786. let c;
  31787. return se([() => t.spinning, () => t.delay], () => {
  31788. c == null || c.cancel(), c = yTe(t.delay, () => {
  31789. u.value = t.spinning;
  31790. }), c == null || c();
  31791. }, {
  31792. immediate: !0,
  31793. flush: "post"
  31794. }), yt(() => {
  31795. c == null || c.cancel();
  31796. }), () => {
  31797. var f, d;
  31798. const {
  31799. class: h
  31800. } = n, p = xTe(n, ["class"]), {
  31801. tip: v = (f = r.tip) === null || f === void 0 ? void 0 : f.call(r)
  31802. } = t, g = (d = r.default) === null || d === void 0 ? void 0 : d.call(r), m = {
  31803. [l.value]: !0,
  31804. [i.value]: !0,
  31805. [`${i.value}-sm`]: a.value === "small",
  31806. [`${i.value}-lg`]: a.value === "large",
  31807. [`${i.value}-spinning`]: u.value,
  31808. [`${i.value}-show-text`]: !!v,
  31809. [`${i.value}-rtl`]: o.value === "rtl",
  31810. [h]: !!h
  31811. };
  31812. function y(_) {
  31813. const O = `${_}-dot`;
  31814. let S = IS(r, t, "indicator");
  31815. return S === null ? null : (Array.isArray(S) && (S = S.length === 1 ? S[0] : S), nu(S) ? Ns(S, {
  31816. class: O
  31817. }) : M_ && nu(M_()) ? Ns(M_(), {
  31818. class: O
  31819. }) : M("span", {
  31820. class: `${O} ${_}-dot-spin`
  31821. }, [M("i", {
  31822. class: `${_}-dot-item`
  31823. }, null), M("i", {
  31824. class: `${_}-dot-item`
  31825. }, null), M("i", {
  31826. class: `${_}-dot-item`
  31827. }, null), M("i", {
  31828. class: `${_}-dot-item`
  31829. }, null)]));
  31830. }
  31831. const b = M("div", j(j({}, p), {}, {
  31832. class: m,
  31833. "aria-live": "polite",
  31834. "aria-busy": u.value
  31835. }), [y(i.value), v ? M("div", {
  31836. class: `${i.value}-text`
  31837. }, [v]) : null]);
  31838. if (g && os(g).length) {
  31839. const _ = {
  31840. [`${i.value}-container`]: !0,
  31841. [`${i.value}-blur`]: u.value
  31842. };
  31843. return s(M("div", {
  31844. class: [`${i.value}-nested-loading`, t.wrapperClassName, l.value]
  31845. }, [u.value && M("div", {
  31846. key: "loading"
  31847. }, [b]), M("div", {
  31848. class: _,
  31849. key: "container"
  31850. }, [g])]));
  31851. }
  31852. return s(b);
  31853. };
  31854. }
  31855. });
  31856. gg.setDefaultIndicator = TTe;
  31857. gg.install = function(t) {
  31858. return t.component(gg.name, gg), t;
  31859. };
  31860. var PTe = function(t, e) {
  31861. var n = {};
  31862. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  31863. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  31864. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  31865. return n;
  31866. };
  31867. let J2;
  31868. const $Te = (t) => {
  31869. J2 = {
  31870. x: t.pageX,
  31871. y: t.pageY
  31872. }, setTimeout(() => J2 = null, 100);
  31873. };
  31874. vX() && vr(document.documentElement, "click", $Te, !0);
  31875. const ATe = () => ({
  31876. prefixCls: String,
  31877. /** @deprecated Please use `open` instead. */
  31878. visible: {
  31879. type: Boolean,
  31880. default: void 0
  31881. },
  31882. open: {
  31883. type: Boolean,
  31884. default: void 0
  31885. },
  31886. confirmLoading: {
  31887. type: Boolean,
  31888. default: void 0
  31889. },
  31890. title: Y.any,
  31891. closable: {
  31892. type: Boolean,
  31893. default: void 0
  31894. },
  31895. closeIcon: Y.any,
  31896. onOk: Function,
  31897. onCancel: Function,
  31898. "onUpdate:visible": Function,
  31899. "onUpdate:open": Function,
  31900. onChange: Function,
  31901. afterClose: Function,
  31902. centered: {
  31903. type: Boolean,
  31904. default: void 0
  31905. },
  31906. width: [String, Number],
  31907. footer: Y.any,
  31908. okText: Y.any,
  31909. okType: String,
  31910. cancelText: Y.any,
  31911. icon: Y.any,
  31912. maskClosable: {
  31913. type: Boolean,
  31914. default: void 0
  31915. },
  31916. forceRender: {
  31917. type: Boolean,
  31918. default: void 0
  31919. },
  31920. okButtonProps: $t(),
  31921. cancelButtonProps: $t(),
  31922. destroyOnClose: {
  31923. type: Boolean,
  31924. default: void 0
  31925. },
  31926. wrapClassName: String,
  31927. maskTransitionName: String,
  31928. transitionName: String,
  31929. getContainer: {
  31930. type: [String, Function, Boolean, Object],
  31931. default: void 0
  31932. },
  31933. zIndex: Number,
  31934. bodyStyle: $t(),
  31935. maskStyle: $t(),
  31936. mask: {
  31937. type: Boolean,
  31938. default: void 0
  31939. },
  31940. keyboard: {
  31941. type: Boolean,
  31942. default: void 0
  31943. },
  31944. wrapProps: Object,
  31945. focusTriggerAfterClose: {
  31946. type: Boolean,
  31947. default: void 0
  31948. },
  31949. modalRender: Function,
  31950. mousePosition: $t()
  31951. }), Hi = te({
  31952. compatConfig: {
  31953. MODE: 3
  31954. },
  31955. name: "AModal",
  31956. inheritAttrs: !1,
  31957. props: sr(ATe(), {
  31958. width: 520,
  31959. confirmLoading: !1,
  31960. okType: "primary"
  31961. }),
  31962. setup(t, e) {
  31963. let {
  31964. emit: n,
  31965. slots: r,
  31966. attrs: i
  31967. } = e;
  31968. const [a] = RS("Modal"), {
  31969. prefixCls: o,
  31970. rootPrefixCls: s,
  31971. direction: l,
  31972. getPopupContainer: u
  31973. } = It("modal", t), [c, f] = ZCe(o);
  31974. Xr(t.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
  31975. const d = (v) => {
  31976. n("update:visible", !1), n("update:open", !1), n("cancel", v), n("change", !1);
  31977. }, h = (v) => {
  31978. n("ok", v);
  31979. }, p = () => {
  31980. var v, g;
  31981. const {
  31982. okText: m = (v = r.okText) === null || v === void 0 ? void 0 : v.call(r),
  31983. okType: y,
  31984. cancelText: b = (g = r.cancelText) === null || g === void 0 ? void 0 : g.call(r),
  31985. confirmLoading: _
  31986. } = t;
  31987. return M(wt, null, [M(Ur, j({
  31988. onClick: d
  31989. }, t.cancelButtonProps), {
  31990. default: () => [b || a.value.cancelText]
  31991. }), M(Ur, j(j({}, LU(y)), {}, {
  31992. loading: _,
  31993. onClick: h
  31994. }, t.okButtonProps), {
  31995. default: () => [m || a.value.okText]
  31996. })]);
  31997. };
  31998. return () => {
  31999. var v, g;
  32000. const {
  32001. prefixCls: m,
  32002. visible: y,
  32003. open: b,
  32004. wrapClassName: _,
  32005. centered: O,
  32006. getContainer: S,
  32007. closeIcon: x = (v = r.closeIcon) === null || v === void 0 ? void 0 : v.call(r),
  32008. focusTriggerAfterClose: C = !0
  32009. } = t, T = PTe(t, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), w = ye(_, {
  32010. [`${o.value}-centered`]: !!O,
  32011. [`${o.value}-wrap-rtl`]: l.value === "rtl"
  32012. });
  32013. return c(M(iY, j(j(j({}, T), i), {}, {
  32014. rootClassName: f.value,
  32015. class: ye(f.value, i.class),
  32016. getContainer: S || (u == null ? void 0 : u.value),
  32017. prefixCls: o.value,
  32018. wrapClassName: w,
  32019. visible: b ?? y,
  32020. onClose: d,
  32021. focusTriggerAfterClose: C,
  32022. transitionName: es(s.value, "zoom", t.transitionName),
  32023. maskTransitionName: es(s.value, "fade", t.maskTransitionName),
  32024. mousePosition: (g = T.mousePosition) !== null && g !== void 0 ? g : J2
  32025. }), I(I({}, r), {
  32026. footer: r.footer || p,
  32027. closeIcon: () => M("span", {
  32028. class: `${o.value}-close-x`
  32029. }, [x || M(al, {
  32030. class: `${o.value}-close-icon`
  32031. }, null)])
  32032. })));
  32033. };
  32034. }
  32035. }), ETe = () => {
  32036. const t = ae(!1);
  32037. return yt(() => {
  32038. t.value = !0;
  32039. }), t;
  32040. }, MTe = {
  32041. type: {
  32042. type: String
  32043. },
  32044. actionFn: Function,
  32045. close: Function,
  32046. autofocus: Boolean,
  32047. prefixCls: String,
  32048. buttonProps: $t(),
  32049. emitEvent: Boolean,
  32050. quitOnNullishReturnValue: Boolean
  32051. };
  32052. function b3(t) {
  32053. return !!(t && t.then);
  32054. }
  32055. const _3 = te({
  32056. compatConfig: {
  32057. MODE: 3
  32058. },
  32059. name: "ActionButton",
  32060. props: MTe,
  32061. setup(t, e) {
  32062. let {
  32063. slots: n
  32064. } = e;
  32065. const r = ae(!1), i = ae(), a = ae(!1);
  32066. let o;
  32067. const s = ETe();
  32068. it(() => {
  32069. t.autofocus && (o = setTimeout(() => {
  32070. var f, d;
  32071. return (d = (f = Cs(i.value)) === null || f === void 0 ? void 0 : f.focus) === null || d === void 0 ? void 0 : d.call(f);
  32072. }));
  32073. }), yt(() => {
  32074. clearTimeout(o);
  32075. });
  32076. const l = function() {
  32077. for (var f, d = arguments.length, h = new Array(d), p = 0; p < d; p++)
  32078. h[p] = arguments[p];
  32079. (f = t.close) === null || f === void 0 || f.call(t, ...h);
  32080. }, u = (f) => {
  32081. b3(f) && (a.value = !0, f.then(function() {
  32082. s.value || (a.value = !1), l(...arguments), r.value = !1;
  32083. }, (d) => (s.value || (a.value = !1), r.value = !1, Promise.reject(d))));
  32084. }, c = (f) => {
  32085. const {
  32086. actionFn: d
  32087. } = t;
  32088. if (r.value)
  32089. return;
  32090. if (r.value = !0, !d) {
  32091. l();
  32092. return;
  32093. }
  32094. let h;
  32095. if (t.emitEvent) {
  32096. if (h = d(f), t.quitOnNullishReturnValue && !b3(h)) {
  32097. r.value = !1, l(f);
  32098. return;
  32099. }
  32100. } else if (d.length)
  32101. h = d(t.close), r.value = !1;
  32102. else if (h = d(), !h) {
  32103. l();
  32104. return;
  32105. }
  32106. u(h);
  32107. };
  32108. return () => {
  32109. const {
  32110. type: f,
  32111. prefixCls: d,
  32112. buttonProps: h
  32113. } = t;
  32114. return M(Ur, j(j(j({}, LU(f)), {}, {
  32115. onClick: c,
  32116. loading: a.value,
  32117. prefixCls: d
  32118. }, h), {}, {
  32119. ref: i
  32120. }), n);
  32121. };
  32122. }
  32123. });
  32124. function Kf(t) {
  32125. return typeof t == "function" ? t() : t;
  32126. }
  32127. const vY = te({
  32128. name: "ConfirmDialog",
  32129. inheritAttrs: !1,
  32130. props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
  32131. setup(t, e) {
  32132. let {
  32133. attrs: n
  32134. } = e;
  32135. const [r] = RS("Modal");
  32136. return process.env.NODE_ENV !== "production" && Xr(t.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
  32137. const {
  32138. icon: i,
  32139. onCancel: a,
  32140. onOk: o,
  32141. close: s,
  32142. okText: l,
  32143. closable: u = !1,
  32144. zIndex: c,
  32145. afterClose: f,
  32146. keyboard: d,
  32147. centered: h,
  32148. getContainer: p,
  32149. maskStyle: v,
  32150. okButtonProps: g,
  32151. cancelButtonProps: m,
  32152. okCancel: y,
  32153. width: b = 416,
  32154. mask: _ = !0,
  32155. maskClosable: O = !1,
  32156. type: S,
  32157. open: x,
  32158. title: C,
  32159. content: T,
  32160. direction: w,
  32161. closeIcon: P,
  32162. modalRender: $,
  32163. focusTriggerAfterClose: A,
  32164. rootPrefixCls: D,
  32165. bodyStyle: E,
  32166. wrapClassName: R,
  32167. footer: N
  32168. } = t;
  32169. let V = i;
  32170. if (!i && i !== null)
  32171. switch (S) {
  32172. case "info":
  32173. V = M(If, null, null);
  32174. break;
  32175. case "success":
  32176. V = M(Ou, null, null);
  32177. break;
  32178. case "error":
  32179. V = M(Da, null, null);
  32180. break;
  32181. default:
  32182. V = M(Su, null, null);
  32183. }
  32184. const z = t.okType || "primary", W = t.prefixCls || "ant-modal", F = `${W}-confirm`, Q = n.style || {}, Z = y ?? S === "confirm", ne = t.autoFocusButton === null ? !1 : t.autoFocusButton || "ok", ee = `${W}-confirm`, oe = ye(ee, `${ee}-${t.type}`, {
  32185. [`${ee}-rtl`]: w === "rtl"
  32186. }, n.class), K = r.value, ie = Z && M(_3, {
  32187. actionFn: a,
  32188. close: s,
  32189. autofocus: ne === "cancel",
  32190. buttonProps: m,
  32191. prefixCls: `${D}-btn`
  32192. }, {
  32193. default: () => [Kf(t.cancelText) || K.cancelText]
  32194. });
  32195. return M(Hi, {
  32196. prefixCls: W,
  32197. class: oe,
  32198. wrapClassName: ye({
  32199. [`${ee}-centered`]: !!h
  32200. }, R),
  32201. onCancel: (X) => s == null ? void 0 : s({
  32202. triggerCancel: !0
  32203. }, X),
  32204. open: x,
  32205. title: "",
  32206. footer: "",
  32207. transitionName: es(D, "zoom", t.transitionName),
  32208. maskTransitionName: es(D, "fade", t.maskTransitionName),
  32209. mask: _,
  32210. maskClosable: O,
  32211. maskStyle: v,
  32212. style: Q,
  32213. bodyStyle: E,
  32214. width: b,
  32215. zIndex: c,
  32216. afterClose: f,
  32217. keyboard: d,
  32218. centered: h,
  32219. getContainer: p,
  32220. closable: u,
  32221. closeIcon: P,
  32222. modalRender: $,
  32223. focusTriggerAfterClose: A
  32224. }, {
  32225. default: () => [M("div", {
  32226. class: `${F}-body-wrapper`
  32227. }, [M("div", {
  32228. class: `${F}-body`
  32229. }, [Kf(V), C === void 0 ? null : M("span", {
  32230. class: `${F}-title`
  32231. }, [Kf(C)]), M("div", {
  32232. class: `${F}-content`
  32233. }, [Kf(T)])]), N !== void 0 ? Kf(N) : M("div", {
  32234. class: `${F}-btns`
  32235. }, [ie, M(_3, {
  32236. type: z,
  32237. actionFn: o,
  32238. close: s,
  32239. autofocus: ne === "ok",
  32240. buttonProps: g,
  32241. prefixCls: `${D}-btn`
  32242. }, {
  32243. default: () => [Kf(l) || (Z ? K.okText : K.justOkText)]
  32244. })])])]
  32245. });
  32246. };
  32247. }
  32248. }), Dc = [], S0 = (t) => {
  32249. const e = document.createDocumentFragment();
  32250. let n = I(I({}, or(t, ["parentContext", "appContext"])), {
  32251. close: a,
  32252. open: !0
  32253. }), r = null;
  32254. function i() {
  32255. r && (sf(null, e), r = null);
  32256. for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
  32257. c[f] = arguments[f];
  32258. const d = c.some((h) => h && h.triggerCancel);
  32259. t.onCancel && d && t.onCancel(() => {
  32260. }, ...c.slice(1));
  32261. for (let h = 0; h < Dc.length; h++)
  32262. if (Dc[h] === a) {
  32263. Dc.splice(h, 1);
  32264. break;
  32265. }
  32266. }
  32267. function a() {
  32268. for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
  32269. c[f] = arguments[f];
  32270. n = I(I({}, n), {
  32271. open: !1,
  32272. afterClose: () => {
  32273. typeof t.afterClose == "function" && t.afterClose(), i.apply(this, c);
  32274. }
  32275. }), n.visible && delete n.visible, o(n);
  32276. }
  32277. function o(u) {
  32278. typeof u == "function" ? n = u(n) : n = I(I({}, n), u), r && Lde(r, n, e);
  32279. }
  32280. const s = (u) => {
  32281. const c = hr, f = c.prefixCls, d = u.prefixCls || `${f}-modal`, h = c.iconPrefixCls, p = Uxe();
  32282. return M(Xd, j(j({}, c), {}, {
  32283. prefixCls: f
  32284. }), {
  32285. default: () => [M(vY, j(j({}, u), {}, {
  32286. rootPrefixCls: f,
  32287. prefixCls: d,
  32288. iconPrefixCls: h,
  32289. locale: p,
  32290. cancelText: u.cancelText || p.cancelText
  32291. }), null)]
  32292. });
  32293. };
  32294. function l(u) {
  32295. const c = M(s, I({}, u));
  32296. return c.appContext = t.parentContext || t.appContext || c.appContext, sf(c, e), c;
  32297. }
  32298. return r = l(n), Dc.push(a), {
  32299. destroy: a,
  32300. update: o
  32301. };
  32302. };
  32303. function gY(t) {
  32304. return I(I({}, t), {
  32305. type: "warning"
  32306. });
  32307. }
  32308. function mY(t) {
  32309. return I(I({}, t), {
  32310. type: "info"
  32311. });
  32312. }
  32313. function yY(t) {
  32314. return I(I({}, t), {
  32315. type: "success"
  32316. });
  32317. }
  32318. function bY(t) {
  32319. return I(I({}, t), {
  32320. type: "error"
  32321. });
  32322. }
  32323. function _Y(t) {
  32324. return I(I({}, t), {
  32325. type: "confirm"
  32326. });
  32327. }
  32328. const ITe = () => ({
  32329. config: Object,
  32330. afterClose: Function,
  32331. destroyAction: Function,
  32332. open: Boolean
  32333. }), DTe = te({
  32334. name: "HookModal",
  32335. inheritAttrs: !1,
  32336. props: sr(ITe(), {
  32337. config: {
  32338. width: 520,
  32339. okType: "primary"
  32340. }
  32341. }),
  32342. setup(t, e) {
  32343. let {
  32344. expose: n
  32345. } = e;
  32346. var r;
  32347. const i = L(() => t.open), a = L(() => t.config), {
  32348. direction: o,
  32349. getPrefixCls: s
  32350. } = DS(), l = s("modal"), u = s(), c = () => {
  32351. var p, v;
  32352. t == null || t.afterClose(), (v = (p = a.value).afterClose) === null || v === void 0 || v.call(p);
  32353. }, f = function() {
  32354. t.destroyAction(...arguments);
  32355. };
  32356. n({
  32357. destroy: f
  32358. });
  32359. const d = (r = a.value.okCancel) !== null && r !== void 0 ? r : a.value.type === "confirm", [h] = RS("Modal", zs.Modal);
  32360. return () => M(vY, j(j({
  32361. prefixCls: l,
  32362. rootPrefixCls: u
  32363. }, a.value), {}, {
  32364. close: f,
  32365. open: i.value,
  32366. afterClose: c,
  32367. okText: a.value.okText || (d ? h == null ? void 0 : h.value.okText : h == null ? void 0 : h.value.justOkText),
  32368. direction: a.value.direction || o.value,
  32369. cancelText: a.value.cancelText || (h == null ? void 0 : h.value.cancelText)
  32370. }), null);
  32371. }
  32372. });
  32373. let O3 = 0;
  32374. const RTe = te({
  32375. name: "ElementsHolder",
  32376. inheritAttrs: !1,
  32377. setup(t, e) {
  32378. let {
  32379. expose: n
  32380. } = e;
  32381. const r = ae([]);
  32382. return n({
  32383. addModal: (a) => (r.value.push(a), r.value = r.value.slice(), () => {
  32384. r.value = r.value.filter((o) => o !== a);
  32385. })
  32386. }), () => r.value.map((a) => a());
  32387. }
  32388. });
  32389. function kTe() {
  32390. const t = ae(null), e = ae([]);
  32391. se(e, () => {
  32392. e.value.length && ([...e.value].forEach((o) => {
  32393. o();
  32394. }), e.value = []);
  32395. }, {
  32396. immediate: !0
  32397. });
  32398. const n = (a) => function(s) {
  32399. var l;
  32400. O3 += 1;
  32401. const u = ae(!0), c = ae(null), f = ae(B(s)), d = ae({});
  32402. se(() => s, (b) => {
  32403. g(I(I({}, tp(b) ? b.value : b), d.value));
  32404. });
  32405. const h = function() {
  32406. u.value = !1;
  32407. for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
  32408. _[O] = arguments[O];
  32409. const S = _.some((x) => x && x.triggerCancel);
  32410. f.value.onCancel && S && f.value.onCancel(() => {
  32411. }, ..._.slice(1));
  32412. };
  32413. let p;
  32414. const v = () => M(DTe, {
  32415. key: `modal-${O3}`,
  32416. config: a(f.value),
  32417. ref: c,
  32418. open: u.value,
  32419. destroyAction: h,
  32420. afterClose: () => {
  32421. p == null || p();
  32422. }
  32423. }, null);
  32424. p = (l = t.value) === null || l === void 0 ? void 0 : l.addModal(v), p && Dc.push(p);
  32425. const g = (b) => {
  32426. f.value = I(I({}, f.value), b);
  32427. };
  32428. return {
  32429. destroy: () => {
  32430. c.value ? h() : e.value = [...e.value, h];
  32431. },
  32432. update: (b) => {
  32433. d.value = b, c.value ? g(b) : e.value = [...e.value, () => g(b)];
  32434. }
  32435. };
  32436. }, r = L(() => ({
  32437. info: n(mY),
  32438. success: n(yY),
  32439. error: n(bY),
  32440. warning: n(gY),
  32441. confirm: n(_Y)
  32442. })), i = Symbol("modalHolderKey");
  32443. return [r.value, () => M(RTe, {
  32444. key: i,
  32445. ref: t
  32446. }, null)];
  32447. }
  32448. function OY(t) {
  32449. return S0(gY(t));
  32450. }
  32451. Hi.useModal = kTe;
  32452. Hi.info = function(e) {
  32453. return S0(mY(e));
  32454. };
  32455. Hi.success = function(e) {
  32456. return S0(yY(e));
  32457. };
  32458. Hi.error = function(e) {
  32459. return S0(bY(e));
  32460. };
  32461. Hi.warning = OY;
  32462. Hi.warn = OY;
  32463. Hi.confirm = function(e) {
  32464. return S0(_Y(e));
  32465. };
  32466. Hi.destroyAll = function() {
  32467. for (; Dc.length; ) {
  32468. const e = Dc.pop();
  32469. e && e();
  32470. }
  32471. };
  32472. Hi.install = function(t) {
  32473. return t.component(Hi.name, Hi), t;
  32474. };
  32475. const $D = (t, e) => {
  32476. let {
  32477. attrs: n
  32478. } = e;
  32479. const {
  32480. included: r,
  32481. vertical: i,
  32482. style: a,
  32483. class: o
  32484. } = n;
  32485. let {
  32486. length: s,
  32487. offset: l,
  32488. reverse: u
  32489. } = n;
  32490. s < 0 && (u = !u, s = Math.abs(s), l = 100 - l);
  32491. const c = i ? {
  32492. [u ? "top" : "bottom"]: `${l}%`,
  32493. [u ? "bottom" : "top"]: "auto",
  32494. height: `${s}%`
  32495. } : {
  32496. [u ? "right" : "left"]: `${l}%`,
  32497. [u ? "left" : "right"]: "auto",
  32498. width: `${s}%`
  32499. }, f = I(I({}, a), c);
  32500. return r ? M("div", {
  32501. class: o,
  32502. style: f
  32503. }, null) : null;
  32504. };
  32505. $D.inheritAttrs = !1;
  32506. const LTe = (t, e, n, r, i, a) => {
  32507. Xr(n ? r > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  32508. const o = Object.keys(e).map(parseFloat).sort((s, l) => s - l);
  32509. if (n && r)
  32510. for (let s = i; s <= a; s += r)
  32511. o.indexOf(s) === -1 && o.push(s);
  32512. return o;
  32513. }, SY = (t, e) => {
  32514. let {
  32515. attrs: n
  32516. } = e;
  32517. const {
  32518. prefixCls: r,
  32519. vertical: i,
  32520. reverse: a,
  32521. marks: o,
  32522. dots: s,
  32523. step: l,
  32524. included: u,
  32525. lowerBound: c,
  32526. upperBound: f,
  32527. max: d,
  32528. min: h,
  32529. dotStyle: p,
  32530. activeDotStyle: v
  32531. } = n, g = d - h, m = LTe(i, o, s, l, h, d).map((y) => {
  32532. const b = `${Math.abs(y - h) / g * 100}%`, _ = !u && y === f || u && y <= f && y >= c;
  32533. let O = i ? I(I({}, p), {
  32534. [a ? "top" : "bottom"]: b
  32535. }) : I(I({}, p), {
  32536. [a ? "right" : "left"]: b
  32537. });
  32538. _ && (O = I(I({}, O), v));
  32539. const S = ye({
  32540. [`${r}-dot`]: !0,
  32541. [`${r}-dot-active`]: _,
  32542. [`${r}-dot-reverse`]: a
  32543. });
  32544. return M("span", {
  32545. class: S,
  32546. style: O,
  32547. key: y
  32548. }, null);
  32549. });
  32550. return M("div", {
  32551. class: `${r}-step`
  32552. }, [m]);
  32553. };
  32554. SY.inheritAttrs = !1;
  32555. const xY = (t, e) => {
  32556. let {
  32557. attrs: n,
  32558. slots: r
  32559. } = e;
  32560. const {
  32561. class: i,
  32562. vertical: a,
  32563. reverse: o,
  32564. marks: s,
  32565. included: l,
  32566. upperBound: u,
  32567. lowerBound: c,
  32568. max: f,
  32569. min: d,
  32570. onClickLabel: h
  32571. } = n, p = Object.keys(s), v = r.mark, g = f - d, m = p.map(parseFloat).sort((y, b) => y - b).map((y) => {
  32572. const b = typeof s[y] == "function" ? s[y]() : s[y], _ = typeof b == "object" && !Ui(b);
  32573. let O = _ ? b.label : b;
  32574. if (!O && O !== 0)
  32575. return null;
  32576. v && (O = v({
  32577. point: y,
  32578. label: O
  32579. }));
  32580. const S = !l && y === u || l && y <= u && y >= c, x = ye({
  32581. [`${i}-text`]: !0,
  32582. [`${i}-text-active`]: S
  32583. }), C = {
  32584. marginBottom: "-50%",
  32585. [o ? "top" : "bottom"]: `${(y - d) / g * 100}%`
  32586. }, T = {
  32587. transform: `translateX(${o ? "50%" : "-50%"})`,
  32588. msTransform: `translateX(${o ? "50%" : "-50%"})`,
  32589. [o ? "right" : "left"]: `${(y - d) / g * 100}%`
  32590. }, w = a ? C : T, P = _ ? I(I({}, w), b.style) : w, $ = {
  32591. [pr ? "onTouchstartPassive" : "onTouchstart"]: (A) => h(A, y)
  32592. };
  32593. return M("span", j({
  32594. class: x,
  32595. style: P,
  32596. key: y,
  32597. onMousedown: (A) => h(A, y)
  32598. }, $), [O]);
  32599. });
  32600. return M("div", {
  32601. class: i
  32602. }, [m]);
  32603. };
  32604. xY.inheritAttrs = !1;
  32605. const wY = te({
  32606. compatConfig: {
  32607. MODE: 3
  32608. },
  32609. name: "Handle",
  32610. inheritAttrs: !1,
  32611. props: {
  32612. prefixCls: String,
  32613. vertical: {
  32614. type: Boolean,
  32615. default: void 0
  32616. },
  32617. offset: Number,
  32618. disabled: {
  32619. type: Boolean,
  32620. default: void 0
  32621. },
  32622. min: Number,
  32623. max: Number,
  32624. value: Number,
  32625. tabindex: Y.oneOfType([Y.number, Y.string]),
  32626. reverse: {
  32627. type: Boolean,
  32628. default: void 0
  32629. },
  32630. ariaLabel: String,
  32631. ariaLabelledBy: String,
  32632. ariaValueTextFormatter: Function,
  32633. onMouseenter: {
  32634. type: Function
  32635. },
  32636. onMouseleave: {
  32637. type: Function
  32638. },
  32639. onMousedown: {
  32640. type: Function
  32641. }
  32642. },
  32643. setup(t, e) {
  32644. let {
  32645. attrs: n,
  32646. emit: r,
  32647. expose: i
  32648. } = e;
  32649. const a = ae(!1), o = ae(), s = () => {
  32650. document.activeElement === o.value && (a.value = !0);
  32651. }, l = (g) => {
  32652. a.value = !1, r("blur", g);
  32653. }, u = () => {
  32654. a.value = !1;
  32655. }, c = () => {
  32656. var g;
  32657. (g = o.value) === null || g === void 0 || g.focus();
  32658. }, f = () => {
  32659. var g;
  32660. (g = o.value) === null || g === void 0 || g.blur();
  32661. }, d = () => {
  32662. a.value = !0, c();
  32663. }, h = (g) => {
  32664. g.preventDefault(), c(), r("mousedown", g);
  32665. };
  32666. i({
  32667. focus: c,
  32668. blur: f,
  32669. clickFocus: d,
  32670. ref: o
  32671. });
  32672. let p = null;
  32673. it(() => {
  32674. p = vr(document, "mouseup", s);
  32675. }), yt(() => {
  32676. p == null || p.remove();
  32677. });
  32678. const v = L(() => {
  32679. const {
  32680. vertical: g,
  32681. offset: m,
  32682. reverse: y
  32683. } = t;
  32684. return g ? {
  32685. [y ? "top" : "bottom"]: `${m}%`,
  32686. [y ? "bottom" : "top"]: "auto",
  32687. transform: y ? null : "translateY(+50%)"
  32688. } : {
  32689. [y ? "right" : "left"]: `${m}%`,
  32690. [y ? "left" : "right"]: "auto",
  32691. transform: `translateX(${y ? "+" : "-"}50%)`
  32692. };
  32693. });
  32694. return () => {
  32695. const {
  32696. prefixCls: g,
  32697. disabled: m,
  32698. min: y,
  32699. max: b,
  32700. value: _,
  32701. tabindex: O,
  32702. ariaLabel: S,
  32703. ariaLabelledBy: x,
  32704. ariaValueTextFormatter: C,
  32705. onMouseenter: T,
  32706. onMouseleave: w
  32707. } = t, P = ye(n.class, {
  32708. [`${g}-handle-click-focused`]: a.value
  32709. }), $ = {
  32710. "aria-valuemin": y,
  32711. "aria-valuemax": b,
  32712. "aria-valuenow": _,
  32713. "aria-disabled": !!m
  32714. }, A = [n.style, v.value];
  32715. let D = O || 0;
  32716. (m || O === null) && (D = null);
  32717. let E;
  32718. C && (E = C(_));
  32719. const R = I(I(I(I({}, n), {
  32720. role: "slider",
  32721. tabindex: D
  32722. }), $), {
  32723. class: P,
  32724. onBlur: l,
  32725. onKeydown: u,
  32726. onMousedown: h,
  32727. onMouseenter: T,
  32728. onMouseleave: w,
  32729. ref: o,
  32730. style: A
  32731. });
  32732. return M("div", j(j({}, R), {}, {
  32733. "aria-label": S,
  32734. "aria-labelledby": x,
  32735. "aria-valuetext": E
  32736. }), null);
  32737. };
  32738. }
  32739. });
  32740. function RC(t, e) {
  32741. try {
  32742. return Object.keys(e).some((n) => t.target === e[n].ref);
  32743. } catch {
  32744. return !1;
  32745. }
  32746. }
  32747. function CY(t, e) {
  32748. let {
  32749. min: n,
  32750. max: r
  32751. } = e;
  32752. return t < n || t > r;
  32753. }
  32754. function S3(t) {
  32755. return t.touches.length > 1 || t.type.toLowerCase() === "touchend" && t.touches.length > 0;
  32756. }
  32757. function x3(t, e) {
  32758. let {
  32759. marks: n,
  32760. step: r,
  32761. min: i,
  32762. max: a
  32763. } = e;
  32764. const o = Object.keys(n).map(parseFloat);
  32765. if (r !== null) {
  32766. const l = Math.pow(10, TY(r)), u = Math.floor((a * l - i * l) / (r * l)), c = Math.min((t - i) / r, u), f = Math.round(c) * r + i;
  32767. o.push(f);
  32768. }
  32769. const s = o.map((l) => Math.abs(t - l));
  32770. return o[s.indexOf(Math.min(...s))];
  32771. }
  32772. function TY(t) {
  32773. const e = t.toString();
  32774. let n = 0;
  32775. return e.indexOf(".") >= 0 && (n = e.length - e.indexOf(".") - 1), n;
  32776. }
  32777. function w3(t, e) {
  32778. let n = 1;
  32779. return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.clientY : e.pageX) / n;
  32780. }
  32781. function C3(t, e) {
  32782. let n = 1;
  32783. return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.touches[0].clientY : e.touches[0].pageX) / n;
  32784. }
  32785. function T3(t, e) {
  32786. const n = e.getBoundingClientRect();
  32787. return t ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
  32788. }
  32789. function AD(t, e) {
  32790. let {
  32791. max: n,
  32792. min: r
  32793. } = e;
  32794. return t <= r ? r : t >= n ? n : t;
  32795. }
  32796. function PY(t, e) {
  32797. const {
  32798. step: n
  32799. } = e, r = isFinite(x3(t, e)) ? x3(t, e) : 0;
  32800. return n === null ? r : parseFloat(r.toFixed(TY(n)));
  32801. }
  32802. function Eh(t) {
  32803. t.stopPropagation(), t.preventDefault();
  32804. }
  32805. function NTe(t, e, n) {
  32806. const r = {
  32807. increase: (o, s) => o + s,
  32808. decrease: (o, s) => o - s
  32809. }, i = r[t](Object.keys(n.marks).indexOf(JSON.stringify(e)), 1), a = Object.keys(n.marks)[i];
  32810. return n.step ? r[t](e, n.step) : Object.keys(n.marks).length && n.marks[a] ? n.marks[a] : e;
  32811. }
  32812. function $Y(t, e, n) {
  32813. const r = "increase", i = "decrease";
  32814. let a = r;
  32815. switch (t.keyCode) {
  32816. case ge.UP:
  32817. a = e && n ? i : r;
  32818. break;
  32819. case ge.RIGHT:
  32820. a = !e && n ? i : r;
  32821. break;
  32822. case ge.DOWN:
  32823. a = e && n ? r : i;
  32824. break;
  32825. case ge.LEFT:
  32826. a = !e && n ? r : i;
  32827. break;
  32828. case ge.END:
  32829. return (o, s) => s.max;
  32830. case ge.HOME:
  32831. return (o, s) => s.min;
  32832. case ge.PAGE_UP:
  32833. return (o, s) => o + s.step * 2;
  32834. case ge.PAGE_DOWN:
  32835. return (o, s) => o - s.step * 2;
  32836. default:
  32837. return;
  32838. }
  32839. return (o, s) => NTe(a, o, s);
  32840. }
  32841. var BTe = function(t, e) {
  32842. var n = {};
  32843. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  32844. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  32845. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  32846. return n;
  32847. };
  32848. function Lu() {
  32849. }
  32850. function AY(t) {
  32851. const e = {
  32852. id: String,
  32853. min: Number,
  32854. max: Number,
  32855. step: Number,
  32856. marks: Y.object,
  32857. included: {
  32858. type: Boolean,
  32859. default: void 0
  32860. },
  32861. prefixCls: String,
  32862. disabled: {
  32863. type: Boolean,
  32864. default: void 0
  32865. },
  32866. handle: Function,
  32867. dots: {
  32868. type: Boolean,
  32869. default: void 0
  32870. },
  32871. vertical: {
  32872. type: Boolean,
  32873. default: void 0
  32874. },
  32875. reverse: {
  32876. type: Boolean,
  32877. default: void 0
  32878. },
  32879. minimumTrackStyle: Y.object,
  32880. maximumTrackStyle: Y.object,
  32881. handleStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
  32882. trackStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
  32883. railStyle: Y.object,
  32884. dotStyle: Y.object,
  32885. activeDotStyle: Y.object,
  32886. autofocus: {
  32887. type: Boolean,
  32888. default: void 0
  32889. },
  32890. draggableTrack: {
  32891. type: Boolean,
  32892. default: void 0
  32893. }
  32894. };
  32895. return te({
  32896. compatConfig: {
  32897. MODE: 3
  32898. },
  32899. name: "CreateSlider",
  32900. mixins: [qS, t],
  32901. inheritAttrs: !1,
  32902. props: sr(e, {
  32903. prefixCls: "rc-slider",
  32904. min: 0,
  32905. max: 100,
  32906. step: 1,
  32907. marks: {},
  32908. included: !0,
  32909. disabled: !1,
  32910. dots: !1,
  32911. vertical: !1,
  32912. reverse: !1,
  32913. trackStyle: [{}],
  32914. handleStyle: [{}],
  32915. railStyle: {},
  32916. dotStyle: {},
  32917. activeDotStyle: {}
  32918. }),
  32919. emits: ["change", "blur", "focus"],
  32920. data() {
  32921. const {
  32922. step: n,
  32923. max: r,
  32924. min: i
  32925. } = this, a = isFinite(r - i) ? (r - i) % n === 0 : !0;
  32926. return Xr(n && Math.floor(n) === n ? a : !0, `Slider[max] - Slider[min] (${r - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
  32927. },
  32928. mounted() {
  32929. this.$nextTick(() => {
  32930. this.document = this.sliderRef && this.sliderRef.ownerDocument;
  32931. const {
  32932. autofocus: n,
  32933. disabled: r
  32934. } = this;
  32935. n && !r && this.focus();
  32936. });
  32937. },
  32938. beforeUnmount() {
  32939. this.$nextTick(() => {
  32940. this.removeDocumentEvents();
  32941. });
  32942. },
  32943. methods: {
  32944. defaultHandle(n) {
  32945. var {
  32946. index: r,
  32947. directives: i,
  32948. className: a,
  32949. style: o
  32950. } = n, s = BTe(n, ["index", "directives", "className", "style"]);
  32951. if (delete s.dragging, s.value === null)
  32952. return null;
  32953. const l = I(I({}, s), {
  32954. class: a,
  32955. style: o,
  32956. key: r
  32957. });
  32958. return M(wY, l, null);
  32959. },
  32960. onDown(n, r) {
  32961. let i = r;
  32962. const {
  32963. draggableTrack: a,
  32964. vertical: o
  32965. } = this.$props, {
  32966. bounds: s
  32967. } = this.$data, l = a && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = RC(n, this.handlesRefs);
  32968. if (this.dragTrack = a && s.length >= 2 && !u && !l.map((c, f) => {
  32969. const d = f ? !0 : c >= s[f];
  32970. return f === l.length - 1 ? c <= s[f] : d;
  32971. }).some((c) => !c), this.dragTrack)
  32972. this.dragOffset = i, this.startBounds = [...s];
  32973. else {
  32974. if (!u)
  32975. this.dragOffset = 0;
  32976. else {
  32977. const c = T3(o, n.target);
  32978. this.dragOffset = i - c, i = c;
  32979. }
  32980. this.onStart(i);
  32981. }
  32982. },
  32983. onMouseDown(n) {
  32984. if (n.button !== 0)
  32985. return;
  32986. this.removeDocumentEvents();
  32987. const r = this.$props.vertical, i = w3(r, n);
  32988. this.onDown(n, i), this.addDocumentMouseEvents();
  32989. },
  32990. onTouchStart(n) {
  32991. if (S3(n)) return;
  32992. const r = this.vertical, i = C3(r, n);
  32993. this.onDown(n, i), this.addDocumentTouchEvents(), Eh(n);
  32994. },
  32995. onFocus(n) {
  32996. const {
  32997. vertical: r
  32998. } = this;
  32999. if (RC(n, this.handlesRefs) && !this.dragTrack) {
  33000. const i = T3(r, n.target);
  33001. this.dragOffset = 0, this.onStart(i), Eh(n), this.$emit("focus", n);
  33002. }
  33003. },
  33004. onBlur(n) {
  33005. this.dragTrack || this.onEnd(), this.$emit("blur", n);
  33006. },
  33007. onMouseUp() {
  33008. this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
  33009. },
  33010. onMouseMove(n) {
  33011. if (!this.sliderRef) {
  33012. this.onEnd();
  33013. return;
  33014. }
  33015. const r = w3(this.vertical, n);
  33016. this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
  33017. },
  33018. onTouchMove(n) {
  33019. if (S3(n) || !this.sliderRef) {
  33020. this.onEnd();
  33021. return;
  33022. }
  33023. const r = C3(this.vertical, n);
  33024. this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
  33025. },
  33026. onKeyDown(n) {
  33027. this.sliderRef && RC(n, this.handlesRefs) && this.onKeyboard(n);
  33028. },
  33029. onClickMarkLabel(n, r) {
  33030. n.stopPropagation(), this.onChange({
  33031. sValue: r
  33032. }), this.setState({
  33033. sValue: r
  33034. }, () => this.onEnd(!0));
  33035. },
  33036. getSliderStart() {
  33037. const n = this.sliderRef, {
  33038. vertical: r,
  33039. reverse: i
  33040. } = this, a = n.getBoundingClientRect();
  33041. return r ? i ? a.bottom : a.top : window.scrollX + (i ? a.right : a.left);
  33042. },
  33043. getSliderLength() {
  33044. const n = this.sliderRef;
  33045. if (!n)
  33046. return 0;
  33047. const r = n.getBoundingClientRect();
  33048. return this.vertical ? r.height : r.width;
  33049. },
  33050. addDocumentTouchEvents() {
  33051. this.onTouchMoveListener = vr(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = vr(this.document, "touchend", this.onEnd);
  33052. },
  33053. addDocumentMouseEvents() {
  33054. this.onMouseMoveListener = vr(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = vr(this.document, "mouseup", this.onEnd);
  33055. },
  33056. removeDocumentEvents() {
  33057. this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
  33058. },
  33059. focus() {
  33060. var n;
  33061. this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
  33062. },
  33063. blur() {
  33064. this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
  33065. var r, i;
  33066. (i = (r = this.handlesRefs[n]) === null || r === void 0 ? void 0 : r.blur) === null || i === void 0 || i.call(r);
  33067. });
  33068. },
  33069. calcValue(n) {
  33070. const {
  33071. vertical: r,
  33072. min: i,
  33073. max: a
  33074. } = this, o = Math.abs(Math.max(n, 0) / this.getSliderLength());
  33075. return r ? (1 - o) * (a - i) + i : o * (a - i) + i;
  33076. },
  33077. calcValueByPos(n) {
  33078. const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
  33079. return this.trimAlignValue(this.calcValue(i));
  33080. },
  33081. calcOffset(n) {
  33082. const {
  33083. min: r,
  33084. max: i
  33085. } = this, a = (n - r) / (i - r);
  33086. return Math.max(0, a * 100);
  33087. },
  33088. saveSlider(n) {
  33089. this.sliderRef = n;
  33090. },
  33091. saveHandle(n, r) {
  33092. this.handlesRefs[n] = r;
  33093. }
  33094. },
  33095. render() {
  33096. const {
  33097. prefixCls: n,
  33098. marks: r,
  33099. dots: i,
  33100. step: a,
  33101. included: o,
  33102. disabled: s,
  33103. vertical: l,
  33104. reverse: u,
  33105. min: c,
  33106. max: f,
  33107. maximumTrackStyle: d,
  33108. railStyle: h,
  33109. dotStyle: p,
  33110. activeDotStyle: v,
  33111. id: g
  33112. } = this, {
  33113. class: m,
  33114. style: y
  33115. } = this.$attrs, {
  33116. tracks: b,
  33117. handles: _
  33118. } = this.renderSlider(), O = ye(n, m, {
  33119. [`${n}-with-marks`]: Object.keys(r).length,
  33120. [`${n}-disabled`]: s,
  33121. [`${n}-vertical`]: l,
  33122. [`${n}-horizontal`]: !l
  33123. }), S = {
  33124. vertical: l,
  33125. marks: r,
  33126. included: o,
  33127. lowerBound: this.getLowerBound(),
  33128. upperBound: this.getUpperBound(),
  33129. max: f,
  33130. min: c,
  33131. reverse: u,
  33132. class: `${n}-mark`,
  33133. onClickLabel: s ? Lu : this.onClickMarkLabel
  33134. }, x = {
  33135. [pr ? "onTouchstartPassive" : "onTouchstart"]: s ? Lu : this.onTouchStart
  33136. };
  33137. return M("div", j(j({
  33138. id: g,
  33139. ref: this.saveSlider,
  33140. tabindex: "-1",
  33141. class: O
  33142. }, x), {}, {
  33143. onMousedown: s ? Lu : this.onMouseDown,
  33144. onMouseup: s ? Lu : this.onMouseUp,
  33145. onKeydown: s ? Lu : this.onKeyDown,
  33146. onFocus: s ? Lu : this.onFocus,
  33147. onBlur: s ? Lu : this.onBlur,
  33148. style: y
  33149. }), [M("div", {
  33150. class: `${n}-rail`,
  33151. style: I(I({}, d), h)
  33152. }, null), b, M(SY, {
  33153. prefixCls: n,
  33154. vertical: l,
  33155. reverse: u,
  33156. marks: r,
  33157. dots: i,
  33158. step: a,
  33159. included: o,
  33160. lowerBound: this.getLowerBound(),
  33161. upperBound: this.getUpperBound(),
  33162. max: f,
  33163. min: c,
  33164. dotStyle: p,
  33165. activeDotStyle: v
  33166. }, null), _, M(xY, S, {
  33167. mark: this.$slots.mark
  33168. }), rj(this)]);
  33169. }
  33170. });
  33171. }
  33172. const zTe = te({
  33173. compatConfig: {
  33174. MODE: 3
  33175. },
  33176. name: "Slider",
  33177. mixins: [qS],
  33178. inheritAttrs: !1,
  33179. props: {
  33180. defaultValue: Number,
  33181. value: Number,
  33182. disabled: {
  33183. type: Boolean,
  33184. default: void 0
  33185. },
  33186. autofocus: {
  33187. type: Boolean,
  33188. default: void 0
  33189. },
  33190. tabindex: Y.oneOfType([Y.number, Y.string]),
  33191. reverse: {
  33192. type: Boolean,
  33193. default: void 0
  33194. },
  33195. min: Number,
  33196. max: Number,
  33197. ariaLabelForHandle: String,
  33198. ariaLabelledByForHandle: String,
  33199. ariaValueTextFormatterForHandle: String,
  33200. startPoint: Number
  33201. },
  33202. emits: ["beforeChange", "afterChange", "change"],
  33203. data() {
  33204. const t = this.defaultValue !== void 0 ? this.defaultValue : this.min, e = this.value !== void 0 ? this.value : t;
  33205. return {
  33206. sValue: this.trimAlignValue(e),
  33207. dragging: !1
  33208. };
  33209. },
  33210. watch: {
  33211. value: {
  33212. handler(t) {
  33213. this.setChangeValue(t);
  33214. },
  33215. deep: !0
  33216. },
  33217. min() {
  33218. const {
  33219. sValue: t
  33220. } = this;
  33221. this.setChangeValue(t);
  33222. },
  33223. max() {
  33224. const {
  33225. sValue: t
  33226. } = this;
  33227. this.setChangeValue(t);
  33228. }
  33229. },
  33230. methods: {
  33231. setChangeValue(t) {
  33232. const e = t !== void 0 ? t : this.sValue, n = this.trimAlignValue(e, this.$props);
  33233. n !== this.sValue && (this.setState({
  33234. sValue: n
  33235. }), CY(e, this.$props) && this.$emit("change", n));
  33236. },
  33237. onChange(t) {
  33238. const e = !v1(this, "value"), n = t.sValue > this.max ? I(I({}, t), {
  33239. sValue: this.max
  33240. }) : t;
  33241. e && this.setState(n);
  33242. const r = n.sValue;
  33243. this.$emit("change", r);
  33244. },
  33245. onStart(t) {
  33246. this.setState({
  33247. dragging: !0
  33248. });
  33249. const {
  33250. sValue: e
  33251. } = this;
  33252. this.$emit("beforeChange", e);
  33253. const n = this.calcValueByPos(t);
  33254. this.startValue = n, this.startPosition = t, n !== e && (this.prevMovedHandleIndex = 0, this.onChange({
  33255. sValue: n
  33256. }));
  33257. },
  33258. onEnd(t) {
  33259. const {
  33260. dragging: e
  33261. } = this;
  33262. this.removeDocumentEvents(), (e || t) && this.$emit("afterChange", this.sValue), this.setState({
  33263. dragging: !1
  33264. });
  33265. },
  33266. onMove(t, e) {
  33267. Eh(t);
  33268. const {
  33269. sValue: n
  33270. } = this, r = this.calcValueByPos(e);
  33271. r !== n && this.onChange({
  33272. sValue: r
  33273. });
  33274. },
  33275. onKeyboard(t) {
  33276. const {
  33277. reverse: e,
  33278. vertical: n
  33279. } = this.$props, r = $Y(t, n, e);
  33280. if (r) {
  33281. Eh(t);
  33282. const {
  33283. sValue: i
  33284. } = this, a = r(i, this.$props), o = this.trimAlignValue(a);
  33285. if (o === i) return;
  33286. this.onChange({
  33287. sValue: o
  33288. }), this.$emit("afterChange", o), this.onEnd();
  33289. }
  33290. },
  33291. getLowerBound() {
  33292. const t = this.$props.startPoint || this.$props.min;
  33293. return this.$data.sValue > t ? t : this.$data.sValue;
  33294. },
  33295. getUpperBound() {
  33296. return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
  33297. },
  33298. trimAlignValue(t) {
  33299. let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  33300. if (t === null)
  33301. return null;
  33302. const n = I(I({}, this.$props), e), r = AD(t, n);
  33303. return PY(r, n);
  33304. },
  33305. getTrack(t) {
  33306. let {
  33307. prefixCls: e,
  33308. reverse: n,
  33309. vertical: r,
  33310. included: i,
  33311. minimumTrackStyle: a,
  33312. mergedTrackStyle: o,
  33313. length: s,
  33314. offset: l
  33315. } = t;
  33316. return M($D, {
  33317. class: `${e}-track`,
  33318. vertical: r,
  33319. included: i,
  33320. offset: l,
  33321. reverse: n,
  33322. length: s,
  33323. style: I(I({}, a), o)
  33324. }, null);
  33325. },
  33326. renderSlider() {
  33327. const {
  33328. prefixCls: t,
  33329. vertical: e,
  33330. included: n,
  33331. disabled: r,
  33332. minimumTrackStyle: i,
  33333. trackStyle: a,
  33334. handleStyle: o,
  33335. tabindex: s,
  33336. ariaLabelForHandle: l,
  33337. ariaLabelledByForHandle: u,
  33338. ariaValueTextFormatterForHandle: c,
  33339. min: f,
  33340. max: d,
  33341. startPoint: h,
  33342. reverse: p,
  33343. handle: v,
  33344. defaultHandle: g
  33345. } = this, m = v || g, {
  33346. sValue: y,
  33347. dragging: b
  33348. } = this, _ = this.calcOffset(y), O = m({
  33349. class: `${t}-handle`,
  33350. prefixCls: t,
  33351. vertical: e,
  33352. offset: _,
  33353. value: y,
  33354. dragging: b,
  33355. disabled: r,
  33356. min: f,
  33357. max: d,
  33358. reverse: p,
  33359. index: 0,
  33360. tabindex: s,
  33361. ariaLabel: l,
  33362. ariaLabelledBy: u,
  33363. ariaValueTextFormatter: c,
  33364. style: o[0] || o,
  33365. ref: (C) => this.saveHandle(0, C),
  33366. onFocus: this.onFocus,
  33367. onBlur: this.onBlur
  33368. }), S = h !== void 0 ? this.calcOffset(h) : 0, x = a[0] || a;
  33369. return {
  33370. tracks: this.getTrack({
  33371. prefixCls: t,
  33372. reverse: p,
  33373. vertical: e,
  33374. included: n,
  33375. offset: S,
  33376. minimumTrackStyle: i,
  33377. mergedTrackStyle: x,
  33378. length: _ - S
  33379. }),
  33380. handles: O
  33381. };
  33382. }
  33383. }
  33384. }), VTe = AY(zTe), Up = (t) => {
  33385. let {
  33386. value: e,
  33387. handle: n,
  33388. bounds: r,
  33389. props: i
  33390. } = t;
  33391. const {
  33392. allowCross: a,
  33393. pushable: o
  33394. } = i, s = Number(o), l = AD(e, i);
  33395. let u = l;
  33396. return !a && n != null && r !== void 0 && (n > 0 && l <= r[n - 1] + s && (u = r[n - 1] + s), n < r.length - 1 && l >= r[n + 1] - s && (u = r[n + 1] - s)), PY(u, i);
  33397. }, FTe = {
  33398. defaultValue: Y.arrayOf(Y.number),
  33399. value: Y.arrayOf(Y.number),
  33400. count: Number,
  33401. pushable: qfe(Y.oneOfType([Y.looseBool, Y.number])),
  33402. allowCross: {
  33403. type: Boolean,
  33404. default: void 0
  33405. },
  33406. disabled: {
  33407. type: Boolean,
  33408. default: void 0
  33409. },
  33410. reverse: {
  33411. type: Boolean,
  33412. default: void 0
  33413. },
  33414. tabindex: Y.arrayOf(Y.number),
  33415. prefixCls: String,
  33416. min: Number,
  33417. max: Number,
  33418. autofocus: {
  33419. type: Boolean,
  33420. default: void 0
  33421. },
  33422. ariaLabelGroupForHandles: Array,
  33423. ariaLabelledByGroupForHandles: Array,
  33424. ariaValueTextFormatterGroupForHandles: Array,
  33425. draggableTrack: {
  33426. type: Boolean,
  33427. default: void 0
  33428. }
  33429. }, WTe = te({
  33430. compatConfig: {
  33431. MODE: 3
  33432. },
  33433. name: "Range",
  33434. mixins: [qS],
  33435. inheritAttrs: !1,
  33436. props: sr(FTe, {
  33437. count: 1,
  33438. allowCross: !0,
  33439. pushable: !1,
  33440. tabindex: [],
  33441. draggableTrack: !1,
  33442. ariaLabelGroupForHandles: [],
  33443. ariaLabelledByGroupForHandles: [],
  33444. ariaValueTextFormatterGroupForHandles: []
  33445. }),
  33446. emits: ["beforeChange", "afterChange", "change"],
  33447. displayName: "Range",
  33448. data() {
  33449. const {
  33450. count: t,
  33451. min: e,
  33452. max: n
  33453. } = this, r = Array(...Array(t + 1)).map(() => e), i = v1(this, "defaultValue") ? this.defaultValue : r;
  33454. let {
  33455. value: a
  33456. } = this;
  33457. a === void 0 && (a = i);
  33458. const o = a.map((l, u) => Up({
  33459. value: l,
  33460. handle: u,
  33461. props: this.$props
  33462. }));
  33463. return {
  33464. sHandle: null,
  33465. recent: o[0] === n ? 0 : o.length - 1,
  33466. bounds: o
  33467. };
  33468. },
  33469. watch: {
  33470. value: {
  33471. handler(t) {
  33472. const {
  33473. bounds: e
  33474. } = this;
  33475. this.setChangeValue(t || e);
  33476. },
  33477. deep: !0
  33478. },
  33479. min() {
  33480. const {
  33481. value: t
  33482. } = this;
  33483. this.setChangeValue(t || this.bounds);
  33484. },
  33485. max() {
  33486. const {
  33487. value: t
  33488. } = this;
  33489. this.setChangeValue(t || this.bounds);
  33490. }
  33491. },
  33492. methods: {
  33493. setChangeValue(t) {
  33494. const {
  33495. bounds: e
  33496. } = this;
  33497. let n = t.map((r, i) => Up({
  33498. value: r,
  33499. handle: i,
  33500. bounds: e,
  33501. props: this.$props
  33502. }));
  33503. if (e.length === n.length) {
  33504. if (n.every((r, i) => r === e[i]))
  33505. return null;
  33506. } else
  33507. n = t.map((r, i) => Up({
  33508. value: r,
  33509. handle: i,
  33510. props: this.$props
  33511. }));
  33512. if (this.setState({
  33513. bounds: n
  33514. }), t.some((r) => CY(r, this.$props))) {
  33515. const r = t.map((i) => AD(i, this.$props));
  33516. this.$emit("change", r);
  33517. }
  33518. },
  33519. onChange(t) {
  33520. if (!v1(this, "value"))
  33521. this.setState(t);
  33522. else {
  33523. const i = {};
  33524. ["sHandle", "recent"].forEach((a) => {
  33525. t[a] !== void 0 && (i[a] = t[a]);
  33526. }), Object.keys(i).length && this.setState(i);
  33527. }
  33528. const r = I(I({}, this.$data), t).bounds;
  33529. this.$emit("change", r);
  33530. },
  33531. positionGetValue(t) {
  33532. const e = this.getValue(), n = this.calcValueByPos(t), r = this.getClosestBound(n), i = this.getBoundNeedMoving(n, r), a = e[i];
  33533. if (n === a) return null;
  33534. const o = [...e];
  33535. return o[i] = n, o;
  33536. },
  33537. onStart(t) {
  33538. const {
  33539. bounds: e
  33540. } = this;
  33541. this.$emit("beforeChange", e);
  33542. const n = this.calcValueByPos(t);
  33543. this.startValue = n, this.startPosition = t;
  33544. const r = this.getClosestBound(n);
  33545. this.prevMovedHandleIndex = this.getBoundNeedMoving(n, r), this.setState({
  33546. sHandle: this.prevMovedHandleIndex,
  33547. recent: this.prevMovedHandleIndex
  33548. });
  33549. const i = e[this.prevMovedHandleIndex];
  33550. if (n === i) return;
  33551. const a = [...e];
  33552. a[this.prevMovedHandleIndex] = n, this.onChange({
  33553. bounds: a
  33554. });
  33555. },
  33556. onEnd(t) {
  33557. const {
  33558. sHandle: e
  33559. } = this;
  33560. this.removeDocumentEvents(), e || (this.dragTrack = !1), (e !== null || t) && this.$emit("afterChange", this.bounds), this.setState({
  33561. sHandle: null
  33562. });
  33563. },
  33564. onMove(t, e, n, r) {
  33565. Eh(t);
  33566. const {
  33567. $data: i,
  33568. $props: a
  33569. } = this, o = a.max || 100, s = a.min || 0;
  33570. if (n) {
  33571. let d = a.vertical ? -e : e;
  33572. d = a.reverse ? -d : d;
  33573. const h = o - Math.max(...r), p = s - Math.min(...r), v = Math.min(Math.max(d / (this.getSliderLength() / 100), p), h), g = r.map((m) => Math.floor(Math.max(Math.min(m + v, o), s)));
  33574. i.bounds.map((m, y) => m === g[y]).some((m) => !m) && this.onChange({
  33575. bounds: g
  33576. });
  33577. return;
  33578. }
  33579. const {
  33580. bounds: l,
  33581. sHandle: u
  33582. } = this, c = this.calcValueByPos(e), f = l[u];
  33583. c !== f && this.moveTo(c);
  33584. },
  33585. onKeyboard(t) {
  33586. const {
  33587. reverse: e,
  33588. vertical: n
  33589. } = this.$props, r = $Y(t, n, e);
  33590. if (r) {
  33591. Eh(t);
  33592. const {
  33593. bounds: i,
  33594. sHandle: a
  33595. } = this, o = i[a === null ? this.recent : a], s = r(o, this.$props), l = Up({
  33596. value: s,
  33597. handle: a,
  33598. bounds: i,
  33599. props: this.$props
  33600. });
  33601. if (l === o) return;
  33602. this.moveTo(l, !0);
  33603. }
  33604. },
  33605. getClosestBound(t) {
  33606. const {
  33607. bounds: e
  33608. } = this;
  33609. let n = 0;
  33610. for (let r = 1; r < e.length - 1; r += 1)
  33611. t >= e[r] && (n = r);
  33612. return Math.abs(e[n + 1] - t) < Math.abs(e[n] - t) && (n += 1), n;
  33613. },
  33614. getBoundNeedMoving(t, e) {
  33615. const {
  33616. bounds: n,
  33617. recent: r
  33618. } = this;
  33619. let i = e;
  33620. const a = n[e + 1] === n[e];
  33621. return a && n[r] === n[e] && (i = r), a && t !== n[e + 1] && (i = t < n[e + 1] ? e : e + 1), i;
  33622. },
  33623. getLowerBound() {
  33624. return this.bounds[0];
  33625. },
  33626. getUpperBound() {
  33627. const {
  33628. bounds: t
  33629. } = this;
  33630. return t[t.length - 1];
  33631. },
  33632. /**
  33633. * Returns an array of possible slider points, taking into account both
  33634. * `marks` and `step`. The result is cached.
  33635. */
  33636. getPoints() {
  33637. const {
  33638. marks: t,
  33639. step: e,
  33640. min: n,
  33641. max: r
  33642. } = this, i = this.internalPointsCache;
  33643. if (!i || i.marks !== t || i.step !== e) {
  33644. const a = I({}, t);
  33645. if (e !== null)
  33646. for (let s = n; s <= r; s += e)
  33647. a[s] = s;
  33648. const o = Object.keys(a).map(parseFloat);
  33649. o.sort((s, l) => s - l), this.internalPointsCache = {
  33650. marks: t,
  33651. step: e,
  33652. points: o
  33653. };
  33654. }
  33655. return this.internalPointsCache.points;
  33656. },
  33657. moveTo(t, e) {
  33658. const n = [...this.bounds], {
  33659. sHandle: r,
  33660. recent: i
  33661. } = this, a = r === null ? i : r;
  33662. n[a] = t;
  33663. let o = a;
  33664. this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, o) : this.$props.allowCross && (n.sort((s, l) => s - l), o = n.indexOf(t)), this.onChange({
  33665. recent: o,
  33666. sHandle: o,
  33667. bounds: n
  33668. }), e && (this.$emit("afterChange", n), this.setState({}, () => {
  33669. this.handlesRefs[o].focus();
  33670. }), this.onEnd());
  33671. },
  33672. pushSurroundingHandles(t, e) {
  33673. const n = t[e], {
  33674. pushable: r
  33675. } = this, i = Number(r);
  33676. let a = 0;
  33677. if (t[e + 1] - n < i && (a = 1), n - t[e - 1] < i && (a = -1), a === 0)
  33678. return;
  33679. const o = e + a, s = a * (t[o] - n);
  33680. this.pushHandle(t, o, a, i - s) || (t[e] = t[o] - a * i);
  33681. },
  33682. pushHandle(t, e, n, r) {
  33683. const i = t[e];
  33684. let a = t[e];
  33685. for (; n * (a - i) < r; ) {
  33686. if (!this.pushHandleOnePoint(t, e, n))
  33687. return t[e] = i, !1;
  33688. a = t[e];
  33689. }
  33690. return !0;
  33691. },
  33692. pushHandleOnePoint(t, e, n) {
  33693. const r = this.getPoints(), a = r.indexOf(t[e]) + n;
  33694. if (a >= r.length || a < 0)
  33695. return !1;
  33696. const o = e + n, s = r[a], {
  33697. pushable: l
  33698. } = this, u = Number(l), c = n * (t[o] - s);
  33699. return this.pushHandle(t, o, n, u - c) ? (t[e] = s, !0) : !1;
  33700. },
  33701. trimAlignValue(t) {
  33702. const {
  33703. sHandle: e,
  33704. bounds: n
  33705. } = this;
  33706. return Up({
  33707. value: t,
  33708. handle: e,
  33709. bounds: n,
  33710. props: this.$props
  33711. });
  33712. },
  33713. ensureValueNotConflict(t, e, n) {
  33714. let {
  33715. allowCross: r,
  33716. pushable: i
  33717. } = n;
  33718. const a = this.$data || {}, {
  33719. bounds: o
  33720. } = a;
  33721. if (t = t === void 0 ? a.sHandle : t, i = Number(i), !r && t != null && o !== void 0) {
  33722. if (t > 0 && e <= o[t - 1] + i)
  33723. return o[t - 1] + i;
  33724. if (t < o.length - 1 && e >= o[t + 1] - i)
  33725. return o[t + 1] - i;
  33726. }
  33727. return e;
  33728. },
  33729. getTrack(t) {
  33730. let {
  33731. bounds: e,
  33732. prefixCls: n,
  33733. reverse: r,
  33734. vertical: i,
  33735. included: a,
  33736. offsets: o,
  33737. trackStyle: s
  33738. } = t;
  33739. return e.slice(0, -1).map((l, u) => {
  33740. const c = u + 1, f = ye({
  33741. [`${n}-track`]: !0,
  33742. [`${n}-track-${c}`]: !0
  33743. });
  33744. return M($D, {
  33745. class: f,
  33746. vertical: i,
  33747. reverse: r,
  33748. included: a,
  33749. offset: o[c - 1],
  33750. length: o[c] - o[c - 1],
  33751. style: s[u],
  33752. key: c
  33753. }, null);
  33754. });
  33755. },
  33756. renderSlider() {
  33757. const {
  33758. sHandle: t,
  33759. bounds: e,
  33760. prefixCls: n,
  33761. vertical: r,
  33762. included: i,
  33763. disabled: a,
  33764. min: o,
  33765. max: s,
  33766. reverse: l,
  33767. handle: u,
  33768. defaultHandle: c,
  33769. trackStyle: f,
  33770. handleStyle: d,
  33771. tabindex: h,
  33772. ariaLabelGroupForHandles: p,
  33773. ariaLabelledByGroupForHandles: v,
  33774. ariaValueTextFormatterGroupForHandles: g
  33775. } = this, m = u || c, y = e.map((O) => this.calcOffset(O)), b = `${n}-handle`, _ = e.map((O, S) => {
  33776. let x = h[S] || 0;
  33777. (a || h[S] === null) && (x = null);
  33778. const C = t === S;
  33779. return m({
  33780. class: ye({
  33781. [b]: !0,
  33782. [`${b}-${S + 1}`]: !0,
  33783. [`${b}-dragging`]: C
  33784. }),
  33785. prefixCls: n,
  33786. vertical: r,
  33787. dragging: C,
  33788. offset: y[S],
  33789. value: O,
  33790. index: S,
  33791. tabindex: x,
  33792. min: o,
  33793. max: s,
  33794. reverse: l,
  33795. disabled: a,
  33796. style: d[S],
  33797. ref: (T) => this.saveHandle(S, T),
  33798. onFocus: this.onFocus,
  33799. onBlur: this.onBlur,
  33800. ariaLabel: p[S],
  33801. ariaLabelledBy: v[S],
  33802. ariaValueTextFormatter: g[S]
  33803. });
  33804. });
  33805. return {
  33806. tracks: this.getTrack({
  33807. bounds: e,
  33808. prefixCls: n,
  33809. reverse: l,
  33810. vertical: r,
  33811. included: i,
  33812. offsets: y,
  33813. trackStyle: f
  33814. }),
  33815. handles: _
  33816. };
  33817. }
  33818. }
  33819. }), QTe = AY(WTe), HTe = te({
  33820. compatConfig: {
  33821. MODE: 3
  33822. },
  33823. name: "SliderTooltip",
  33824. inheritAttrs: !1,
  33825. props: kU(),
  33826. setup(t, e) {
  33827. let {
  33828. attrs: n,
  33829. slots: r
  33830. } = e;
  33831. const i = U(null), a = U(null);
  33832. function o() {
  33833. xt.cancel(a.value), a.value = null;
  33834. }
  33835. function s() {
  33836. a.value = xt(() => {
  33837. var u;
  33838. (u = i.value) === null || u === void 0 || u.forcePopupAlign(), a.value = null;
  33839. });
  33840. }
  33841. const l = () => {
  33842. o(), t.open && s();
  33843. };
  33844. return se([() => t.open, () => t.title], () => {
  33845. l();
  33846. }, {
  33847. flush: "post",
  33848. immediate: !0
  33849. }), Fle(() => {
  33850. l();
  33851. }), yt(() => {
  33852. o();
  33853. }), () => M(dx, j(j({
  33854. ref: i
  33855. }, t), n), r);
  33856. }
  33857. }), GTe = (t) => {
  33858. const {
  33859. componentCls: e,
  33860. controlSize: n,
  33861. dotSize: r,
  33862. marginFull: i,
  33863. marginPart: a,
  33864. colorFillContentHover: o
  33865. } = t;
  33866. return {
  33867. [e]: I(I({}, nn(t)), {
  33868. position: "relative",
  33869. height: n,
  33870. margin: `${a}px ${i}px`,
  33871. padding: 0,
  33872. cursor: "pointer",
  33873. touchAction: "none",
  33874. "&-vertical": {
  33875. margin: `${i}px ${a}px`
  33876. },
  33877. [`${e}-rail`]: {
  33878. position: "absolute",
  33879. backgroundColor: t.colorFillTertiary,
  33880. borderRadius: t.borderRadiusXS,
  33881. transition: `background-color ${t.motionDurationMid}`
  33882. },
  33883. [`${e}-track`]: {
  33884. position: "absolute",
  33885. backgroundColor: t.colorPrimaryBorder,
  33886. borderRadius: t.borderRadiusXS,
  33887. transition: `background-color ${t.motionDurationMid}`
  33888. },
  33889. "&:hover": {
  33890. [`${e}-rail`]: {
  33891. backgroundColor: t.colorFillSecondary
  33892. },
  33893. [`${e}-track`]: {
  33894. backgroundColor: t.colorPrimaryBorderHover
  33895. },
  33896. [`${e}-dot`]: {
  33897. borderColor: o
  33898. },
  33899. [`${e}-handle::after`]: {
  33900. boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`
  33901. },
  33902. [`${e}-dot-active`]: {
  33903. borderColor: t.colorPrimary
  33904. }
  33905. },
  33906. [`${e}-handle`]: {
  33907. position: "absolute",
  33908. width: t.handleSize,
  33909. height: t.handleSize,
  33910. outline: "none",
  33911. [`${e}-dragging`]: {
  33912. zIndex: 1
  33913. },
  33914. // 扩大选区
  33915. "&::before": {
  33916. content: '""',
  33917. position: "absolute",
  33918. insetInlineStart: -t.handleLineWidth,
  33919. insetBlockStart: -t.handleLineWidth,
  33920. width: t.handleSize + t.handleLineWidth * 2,
  33921. height: t.handleSize + t.handleLineWidth * 2,
  33922. backgroundColor: "transparent"
  33923. },
  33924. "&::after": {
  33925. content: '""',
  33926. position: "absolute",
  33927. insetBlockStart: 0,
  33928. insetInlineStart: 0,
  33929. width: t.handleSize,
  33930. height: t.handleSize,
  33931. backgroundColor: t.colorBgElevated,
  33932. boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,
  33933. borderRadius: "50%",
  33934. cursor: "pointer",
  33935. transition: `
  33936. inset-inline-start ${t.motionDurationMid},
  33937. inset-block-start ${t.motionDurationMid},
  33938. width ${t.motionDurationMid},
  33939. height ${t.motionDurationMid},
  33940. box-shadow ${t.motionDurationMid}
  33941. `
  33942. },
  33943. "&:hover, &:active, &:focus": {
  33944. "&::before": {
  33945. insetInlineStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
  33946. insetBlockStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
  33947. width: t.handleSizeHover + t.handleLineWidthHover * 2,
  33948. height: t.handleSizeHover + t.handleLineWidthHover * 2
  33949. },
  33950. "&::after": {
  33951. boxShadow: `0 0 0 ${t.handleLineWidthHover}px ${t.colorPrimary}`,
  33952. width: t.handleSizeHover,
  33953. height: t.handleSizeHover,
  33954. insetInlineStart: (t.handleSize - t.handleSizeHover) / 2,
  33955. insetBlockStart: (t.handleSize - t.handleSizeHover) / 2
  33956. }
  33957. }
  33958. },
  33959. [`${e}-mark`]: {
  33960. position: "absolute",
  33961. fontSize: t.fontSize
  33962. },
  33963. [`${e}-mark-text`]: {
  33964. position: "absolute",
  33965. display: "inline-block",
  33966. color: t.colorTextDescription,
  33967. textAlign: "center",
  33968. wordBreak: "keep-all",
  33969. cursor: "pointer",
  33970. userSelect: "none",
  33971. "&-active": {
  33972. color: t.colorText
  33973. }
  33974. },
  33975. [`${e}-step`]: {
  33976. position: "absolute",
  33977. background: "transparent",
  33978. pointerEvents: "none"
  33979. },
  33980. [`${e}-dot`]: {
  33981. position: "absolute",
  33982. width: r,
  33983. height: r,
  33984. backgroundColor: t.colorBgElevated,
  33985. border: `${t.handleLineWidth}px solid ${t.colorBorderSecondary}`,
  33986. borderRadius: "50%",
  33987. cursor: "pointer",
  33988. transition: `border-color ${t.motionDurationSlow}`,
  33989. "&-active": {
  33990. borderColor: t.colorPrimaryBorder
  33991. }
  33992. },
  33993. [`&${e}-disabled`]: {
  33994. cursor: "not-allowed",
  33995. [`${e}-rail`]: {
  33996. backgroundColor: `${t.colorFillSecondary} !important`
  33997. },
  33998. [`${e}-track`]: {
  33999. backgroundColor: `${t.colorTextDisabled} !important`
  34000. },
  34001. [`
  34002. ${e}-dot
  34003. `]: {
  34004. backgroundColor: t.colorBgElevated,
  34005. borderColor: t.colorTextDisabled,
  34006. boxShadow: "none",
  34007. cursor: "not-allowed"
  34008. },
  34009. [`${e}-handle::after`]: {
  34010. backgroundColor: t.colorBgElevated,
  34011. cursor: "not-allowed",
  34012. width: t.handleSize,
  34013. height: t.handleSize,
  34014. boxShadow: `0 0 0 ${t.handleLineWidth}px ${new en(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString()}`,
  34015. insetInlineStart: 0,
  34016. insetBlockStart: 0
  34017. },
  34018. [`
  34019. ${e}-mark-text,
  34020. ${e}-dot
  34021. `]: {
  34022. cursor: "not-allowed !important"
  34023. }
  34024. }
  34025. })
  34026. };
  34027. }, EY = (t, e) => {
  34028. const {
  34029. componentCls: n,
  34030. railSize: r,
  34031. handleSize: i,
  34032. dotSize: a
  34033. } = t, o = e ? "paddingBlock" : "paddingInline", s = e ? "width" : "height", l = e ? "height" : "width", u = e ? "insetBlockStart" : "insetInlineStart", c = e ? "top" : "insetInlineStart";
  34034. return {
  34035. [o]: r,
  34036. [l]: r * 3,
  34037. [`${n}-rail`]: {
  34038. [s]: "100%",
  34039. [l]: r
  34040. },
  34041. [`${n}-track`]: {
  34042. [l]: r
  34043. },
  34044. [`${n}-handle`]: {
  34045. [u]: (r * 3 - i) / 2
  34046. },
  34047. [`${n}-mark`]: {
  34048. // Reset all
  34049. insetInlineStart: 0,
  34050. top: 0,
  34051. [c]: i,
  34052. [s]: "100%"
  34053. },
  34054. [`${n}-step`]: {
  34055. // Reset all
  34056. insetInlineStart: 0,
  34057. top: 0,
  34058. [c]: r,
  34059. [s]: "100%",
  34060. [l]: r
  34061. },
  34062. [`${n}-dot`]: {
  34063. position: "absolute",
  34064. [u]: (r - a) / 2
  34065. }
  34066. };
  34067. }, jTe = (t) => {
  34068. const {
  34069. componentCls: e,
  34070. marginPartWithMark: n
  34071. } = t;
  34072. return {
  34073. [`${e}-horizontal`]: I(I({}, EY(t, !0)), {
  34074. [`&${e}-with-marks`]: {
  34075. marginBottom: n
  34076. }
  34077. })
  34078. };
  34079. }, ZTe = (t) => {
  34080. const {
  34081. componentCls: e
  34082. } = t;
  34083. return {
  34084. [`${e}-vertical`]: I(I({}, EY(t, !1)), {
  34085. height: "100%"
  34086. })
  34087. };
  34088. }, UTe = Sn("Slider", (t) => {
  34089. const e = Bt(t, {
  34090. marginPart: (t.controlHeight - t.controlSize) / 2,
  34091. marginFull: t.controlSize / 2,
  34092. marginPartWithMark: t.controlHeightLG - t.controlSize
  34093. });
  34094. return [GTe(e), jTe(e), ZTe(e)];
  34095. }, (t) => {
  34096. const n = t.controlHeightLG / 4, r = t.controlHeightSM / 2, i = t.lineWidth + 1, a = t.lineWidth + 1 * 3;
  34097. return {
  34098. controlSize: n,
  34099. railSize: 4,
  34100. handleSize: n,
  34101. handleSizeHover: r,
  34102. dotSize: 8,
  34103. handleLineWidth: i,
  34104. handleLineWidthHover: a
  34105. };
  34106. });
  34107. var P3 = function(t, e) {
  34108. var n = {};
  34109. for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  34110. if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
  34111. e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  34112. return n;
  34113. };
  34114. const XTe = (t) => typeof t == "number" ? t.toString() : "", YTe = () => ({
  34115. id: String,
  34116. prefixCls: String,
  34117. tooltipPrefixCls: String,
  34118. range: gn([Boolean, Object]),
  34119. reverse: nt(),
  34120. min: Number,
  34121. max: Number,
  34122. step: gn([Object, Number]),
  34123. marks: $t(),
  34124. dots: nt(),
  34125. value: gn([Array, Number]),
  34126. defaultValue: gn([Array, Number]),
  34127. included: nt(),
  34128. disabled: nt(),
  34129. vertical: nt(),
  34130. tipFormatter: gn([Function, Object], () => XTe),
  34131. tooltipOpen: nt(),
  34132. /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  34133. tooltipVisible: nt(),
  34134. tooltipPlacement: hn(),
  34135. getTooltipPopupContainer: tt(),
  34136. autofocus: nt(),
  34137. handleStyle: gn([Array, Object]),
  34138. trackStyle: gn([Array, Object]),
  34139. onChange: tt(),
  34140. onAfterChange: tt(),
  34141. onFocus: tt(),
  34142. onBlur: tt(),
  34143. "onUpdate:value": tt()
  34144. }), qTe = te({
  34145. compatConfig: {
  34146. MODE: 3
  34147. },
  34148. name: "ASlider",
  34149. inheritAttrs: !1,
  34150. props: YTe(),
  34151. // emits: ['update:value', 'change', 'afterChange', 'blur'],
  34152. slots: Object,
  34153. setup(t, e) {
  34154. let {
  34155. attrs: n,
  34156. slots: r,
  34157. emit: i,
  34158. expose: a
  34159. } = e;
  34160. process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((x) => {
  34161. let [C, T] = x;
  34162. Qi(t.tooltipVisible === void 0, "Slider", `\`${C}\` is deprecated, please use \`${T}\` instead.`);
  34163. });
  34164. const {
  34165. prefixCls: o,
  34166. rootPrefixCls: s,
  34167. direction: l,
  34168. getPopupContainer: u,
  34169. configProvider: c
  34170. } = It("slider", t), [f, d] = UTe(o), h = ss(), p = U(), v = U({}), g = (x, C) => {
  34171. v.value[x] = C;
  34172. }, m = L(() => t.tooltipPlacement ? t.tooltipPlacement : t.vertical ? l.value === "rtl" ? "left" : "right" : "top"), y = () => {
  34173. var x;
  34174. (x = p.value) === null || x === void 0 || x.focus();
  34175. }, b = () => {
  34176. var x;
  34177. (x = p.value) === null || x === void 0 || x.blur();
  34178. }, _ = (x) => {
  34179. i("update:value", x), i("change", x), h.onFieldChange();
  34180. }, O = (x) => {
  34181. i("blur", x);
  34182. };
  34183. a({
  34184. focus: y,
  34185. blur: b
  34186. });
  34187. const S = (x) => {
  34188. var {
  34189. tooltipPrefixCls: C
  34190. } = x, T = x.info, {
  34191. value: w,
  34192. dragging: P,
  34193. index: $
  34194. } = T, A = P3(T, ["value", "dragging", "index"]);
  34195. const {
  34196. tipFormatter: D,
  34197. tooltipOpen: E = t.tooltipVisible,
  34198. getTooltipPopupContainer: R
  34199. } = t, N = D ? v.value[$] || P : !1, V = E || E === void 0 && N;
  34200. return M(HTe, {
  34201. prefixCls: C,
  34202. title: D ? D(w) : "",
  34203. open: V,
  34204. placement: m.value,
  34205. transitionName: `${s.value}-zoom-down`,
  34206. key: $,
  34207. overlayClassName: `${o.value}-tooltip`,
  34208. getPopupContainer: R || (u == null ? void 0 : u.value)
  34209. }, {
  34210. default: () => [M(wY, j(j({}, A), {}, {
  34211. value: w,
  34212. onMouseenter: () => g($, !0),
  34213. onMouseleave: () => g($, !1)
  34214. }), null)]
  34215. });
  34216. };
  34217. return () => {
  34218. const {
  34219. tooltipPrefixCls: x,
  34220. range: C,
  34221. id: T = h.id.value
  34222. } = t, w = P3(t, ["tooltipPrefixCls", "range", "id"]), P = c.getPrefixCls("tooltip", x), $ = ye(n.class, {
  34223. [`${o.value}-rtl`]: l.value === "rtl"
  34224. }, d.value);
  34225. l.value === "rtl" && !w.vertical && (w.reverse = !w.reverse);
  34226. let A;
  34227. return typeof C == "object" && (A = C.draggableTrack), f(C ? M(QTe, j(j(j({}, n), w), {}, {
  34228. step: w.step,
  34229. draggableTrack: A,
  34230. class: $,
  34231. ref: p,
  34232. handle: (D) => S({
  34233. tooltipPrefixCls: P,
  34234. prefixCls: o.value,
  34235. info: D
  34236. }),
  34237. prefixCls: o.value,
  34238. onChange: _,
  34239. onBlur: O
  34240. }), {
  34241. mark: r.mark
  34242. }) : M(VTe, j(j(j({}, n), w), {}, {
  34243. id: T,
  34244. step: w.step,
  34245. class: $,
  34246. ref: p,
  34247. handle: (D) => S({
  34248. tooltipPrefixCls: P,
  34249. prefixCls: o.value,
  34250. info: D
  34251. }),
  34252. prefixCls: o.value,
  34253. onChange: _,
  34254. onBlur: O
  34255. }), {
  34256. mark: r.mark
  34257. }));
  34258. };
  34259. }
  34260. }), KTe = np(qTe);
  34261. var JTe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-center", theme: "outlined" };
  34262. function $3(t) {
  34263. for (var e = 1; e < arguments.length; e++) {
  34264. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34265. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34266. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34267. }))), r.forEach(function(i) {
  34268. ePe(t, i, n[i]);
  34269. });
  34270. }
  34271. return t;
  34272. }
  34273. function ePe(t, e, n) {
  34274. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34275. }
  34276. var ED = function(e, n) {
  34277. var r = $3({}, e, n.attrs);
  34278. return M(lt, $3({}, r, {
  34279. icon: JTe
  34280. }), null);
  34281. };
  34282. ED.displayName = "AlignCenterOutlined";
  34283. ED.inheritAttrs = !1;
  34284. var tPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-left", theme: "outlined" };
  34285. function A3(t) {
  34286. for (var e = 1; e < arguments.length; e++) {
  34287. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34288. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34289. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34290. }))), r.forEach(function(i) {
  34291. nPe(t, i, n[i]);
  34292. });
  34293. }
  34294. return t;
  34295. }
  34296. function nPe(t, e, n) {
  34297. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34298. }
  34299. var MD = function(e, n) {
  34300. var r = A3({}, e, n.attrs);
  34301. return M(lt, A3({}, r, {
  34302. icon: tPe
  34303. }), null);
  34304. };
  34305. MD.displayName = "AlignLeftOutlined";
  34306. MD.inheritAttrs = !1;
  34307. var rPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-right", theme: "outlined" };
  34308. function E3(t) {
  34309. for (var e = 1; e < arguments.length; e++) {
  34310. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34311. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34312. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34313. }))), r.forEach(function(i) {
  34314. iPe(t, i, n[i]);
  34315. });
  34316. }
  34317. return t;
  34318. }
  34319. function iPe(t, e, n) {
  34320. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34321. }
  34322. var ID = function(e, n) {
  34323. var r = E3({}, e, n.attrs);
  34324. return M(lt, E3({}, r, {
  34325. icon: rPe
  34326. }), null);
  34327. };
  34328. ID.displayName = "AlignRightOutlined";
  34329. ID.inheritAttrs = !1;
  34330. var aPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z" } }] }, name: "bold", theme: "outlined" };
  34331. function M3(t) {
  34332. for (var e = 1; e < arguments.length; e++) {
  34333. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34334. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34335. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34336. }))), r.forEach(function(i) {
  34337. oPe(t, i, n[i]);
  34338. });
  34339. }
  34340. return t;
  34341. }
  34342. function oPe(t, e, n) {
  34343. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34344. }
  34345. var DD = function(e, n) {
  34346. var r = M3({}, e, n.attrs);
  34347. return M(lt, M3({}, r, {
  34348. icon: aPe
  34349. }), null);
  34350. };
  34351. DD.displayName = "BoldOutlined";
  34352. DD.inheritAttrs = !1;
  34353. var sPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 808H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-720-94h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-498h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm166 166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm332 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm222-72h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388 426h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, name: "border-bottom", theme: "outlined" };
  34354. function I3(t) {
  34355. for (var e = 1; e < arguments.length; e++) {
  34356. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34357. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34358. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34359. }))), r.forEach(function(i) {
  34360. lPe(t, i, n[i]);
  34361. });
  34362. }
  34363. return t;
  34364. }
  34365. function lPe(t, e, n) {
  34366. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34367. }
  34368. var RD = function(e, n) {
  34369. var r = I3({}, e, n.attrs);
  34370. return M(lt, I3({}, r, {
  34371. icon: sPe
  34372. }), null);
  34373. };
  34374. RD.displayName = "BorderBottomOutlined";
  34375. RD.inheritAttrs = !1;
  34376. var uPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M208 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM540 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-left", theme: "outlined" };
  34377. function D3(t) {
  34378. for (var e = 1; e < arguments.length; e++) {
  34379. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34380. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34381. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34382. }))), r.forEach(function(i) {
  34383. cPe(t, i, n[i]);
  34384. });
  34385. }
  34386. return t;
  34387. }
  34388. function cPe(t, e, n) {
  34389. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34390. }
  34391. var kD = function(e, n) {
  34392. var r = D3({}, e, n.attrs);
  34393. return M(lt, D3({}, r, {
  34394. icon: uPe
  34395. }), null);
  34396. };
  34397. kD.displayName = "BorderLeftOutlined";
  34398. kD.inheritAttrs = !1;
  34399. var fPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-right", theme: "outlined" };
  34400. function R3(t) {
  34401. for (var e = 1; e < arguments.length; e++) {
  34402. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34403. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34404. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34405. }))), r.forEach(function(i) {
  34406. dPe(t, i, n[i]);
  34407. });
  34408. }
  34409. return t;
  34410. }
  34411. function dPe(t, e, n) {
  34412. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34413. }
  34414. var LD = function(e, n) {
  34415. var r = R3({}, e, n.attrs);
  34416. return M(lt, R3({}, r, {
  34417. icon: fPe
  34418. }), null);
  34419. };
  34420. LD.displayName = "BorderRightOutlined";
  34421. LD.inheritAttrs = !1;
  34422. var hPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166-166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332-498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-top", theme: "outlined" };
  34423. function k3(t) {
  34424. for (var e = 1; e < arguments.length; e++) {
  34425. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34426. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34427. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34428. }))), r.forEach(function(i) {
  34429. pPe(t, i, n[i]);
  34430. });
  34431. }
  34432. return t;
  34433. }
  34434. function pPe(t, e, n) {
  34435. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34436. }
  34437. var ND = function(e, n) {
  34438. var r = k3({}, e, n.attrs);
  34439. return M(lt, k3({}, r, {
  34440. icon: hPe
  34441. }), null);
  34442. };
  34443. ND.displayName = "BorderTopOutlined";
  34444. ND.inheritAttrs = !1;
  34445. var vPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "database", theme: "outlined" };
  34446. function L3(t) {
  34447. for (var e = 1; e < arguments.length; e++) {
  34448. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34449. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34450. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34451. }))), r.forEach(function(i) {
  34452. gPe(t, i, n[i]);
  34453. });
  34454. }
  34455. return t;
  34456. }
  34457. function gPe(t, e, n) {
  34458. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34459. }
  34460. var x0 = function(e, n) {
  34461. var r = L3({}, e, n.attrs);
  34462. return M(lt, L3({}, r, {
  34463. icon: vPe
  34464. }), null);
  34465. };
  34466. x0.displayName = "DatabaseOutlined";
  34467. x0.inheritAttrs = !1;
  34468. var mPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-650.3-80h85c4.2 0 8-2.7 9.3-6.8l53.7-166h219.2l53.2 166c1.3 4 5 6.8 9.3 6.8h89.1c1.1 0 2.2-.2 3.2-.5a9.7 9.7 0 006-12.4L573.6 118.6a9.9 9.9 0 00-9.2-6.6H462.1c-4.2 0-7.9 2.6-9.2 6.6L244.5 723.1c-.4 1-.5 2.1-.5 3.2-.1 5.3 4.3 9.7 9.7 9.7zm255.9-516.1h4.1l83.8 263.8H424.9l84.7-263.8z" } }] }, name: "font-colors", theme: "outlined" };
  34469. function N3(t) {
  34470. for (var e = 1; e < arguments.length; e++) {
  34471. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34472. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34473. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34474. }))), r.forEach(function(i) {
  34475. yPe(t, i, n[i]);
  34476. });
  34477. }
  34478. return t;
  34479. }
  34480. function yPe(t, e, n) {
  34481. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34482. }
  34483. var BD = function(e, n) {
  34484. var r = N3({}, e, n.attrs);
  34485. return M(lt, N3({}, r, {
  34486. icon: mPe
  34487. }), null);
  34488. };
  34489. BD.displayName = "FontColorsOutlined";
  34490. BD.inheritAttrs = !1;
  34491. var bPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, name: "italic", theme: "outlined" };
  34492. function B3(t) {
  34493. for (var e = 1; e < arguments.length; e++) {
  34494. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34495. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34496. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34497. }))), r.forEach(function(i) {
  34498. _Pe(t, i, n[i]);
  34499. });
  34500. }
  34501. return t;
  34502. }
  34503. function _Pe(t, e, n) {
  34504. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34505. }
  34506. var zD = function(e, n) {
  34507. var r = B3({}, e, n.attrs);
  34508. return M(lt, B3({}, r, {
  34509. icon: bPe
  34510. }), null);
  34511. };
  34512. zD.displayName = "ItalicOutlined";
  34513. zD.inheritAttrs = !1;
  34514. var OPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M712 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm2-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM136 374h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-174h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm752 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-230 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 624H358c-87.3 0-158-70.7-158-158V484c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v182c0 127 103 230 230 230h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomleft", theme: "outlined" };
  34515. function z3(t) {
  34516. for (var e = 1; e < arguments.length; e++) {
  34517. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34518. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34519. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34520. }))), r.forEach(function(i) {
  34521. SPe(t, i, n[i]);
  34522. });
  34523. }
  34524. return t;
  34525. }
  34526. function SPe(t, e, n) {
  34527. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34528. }
  34529. var VD = function(e, n) {
  34530. var r = z3({}, e, n.attrs);
  34531. return M(lt, z3({}, r, {
  34532. icon: OPe
  34533. }), null);
  34534. };
  34535. VD.displayName = "RadiusBottomleftOutlined";
  34536. VD.inheritAttrs = !1;
  34537. var xPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-58-624h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm578 102h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm292 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm174 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 276h-56c-4.4 0-8 3.6-8 8v182c0 87.3-70.7 158-158 158H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c127 0 230-103 230-230V484c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomright", theme: "outlined" };
  34538. function V3(t) {
  34539. for (var e = 1; e < arguments.length; e++) {
  34540. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34541. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34542. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34543. }))), r.forEach(function(i) {
  34544. wPe(t, i, n[i]);
  34545. });
  34546. }
  34547. return t;
  34548. }
  34549. function wPe(t, e, n) {
  34550. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34551. }
  34552. var FD = function(e, n) {
  34553. var r = V3({}, e, n.attrs);
  34554. return M(lt, V3({}, r, {
  34555. icon: xPe
  34556. }), null);
  34557. };
  34558. FD.displayName = "RadiusBottomrightOutlined";
  34559. FD.inheritAttrs = !1;
  34560. var CPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M656 200h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm58 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 650h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm696-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174-696H358c-127 0-230 103-230 230v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-87.3 70.7-158 158-158h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-upleft", theme: "outlined" };
  34561. function F3(t) {
  34562. for (var e = 1; e < arguments.length; e++) {
  34563. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34564. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34565. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34566. }))), r.forEach(function(i) {
  34567. TPe(t, i, n[i]);
  34568. });
  34569. }
  34570. return t;
  34571. }
  34572. function TPe(t, e, n) {
  34573. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34574. }
  34575. var WD = function(e, n) {
  34576. var r = F3({}, e, n.attrs);
  34577. return M(lt, F3({}, r, {
  34578. icon: CPe
  34579. }), null);
  34580. };
  34581. WD.displayName = "RadiusUpleftOutlined";
  34582. WD.inheritAttrs = !1;
  34583. var PPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-2 696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm522-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-48-696H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c87.3 0 158 70.7 158 158v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-127-103-230-230-230z" } }] }, name: "radius-upright", theme: "outlined" };
  34584. function W3(t) {
  34585. for (var e = 1; e < arguments.length; e++) {
  34586. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34587. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34588. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34589. }))), r.forEach(function(i) {
  34590. $Pe(t, i, n[i]);
  34591. });
  34592. }
  34593. return t;
  34594. }
  34595. function $Pe(t, e, n) {
  34596. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34597. }
  34598. var QD = function(e, n) {
  34599. var r = W3({}, e, n.attrs);
  34600. return M(lt, W3({}, r, {
  34601. icon: PPe
  34602. }), null);
  34603. };
  34604. QD.displayName = "RadiusUprightOutlined";
  34605. QD.inheritAttrs = !1;
  34606. var APe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z" } }] }, name: "skin", theme: "outlined" };
  34607. function Q3(t) {
  34608. for (var e = 1; e < arguments.length; e++) {
  34609. var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
  34610. typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
  34611. return Object.getOwnPropertyDescriptor(n, i).enumerable;
  34612. }))), r.forEach(function(i) {
  34613. EPe(t, i, n[i]);
  34614. });
  34615. }
  34616. return t;
  34617. }
  34618. function EPe(t, e, n) {
  34619. return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
  34620. }
  34621. var w0 = function(e, n) {
  34622. var r = Q3({}, e, n.attrs);
  34623. return M(lt, Q3({}, r, {
  34624. icon: APe
  34625. }), null);
  34626. };
  34627. w0.displayName = "SkinOutlined";
  34628. w0.inheritAttrs = !1;
  34629. const bs = (t, e, { checkForDefaultPrevented: n = !0 } = {}) => (i) => {
  34630. const a = t == null ? void 0 : t(i);
  34631. if (n === !1 || !a)
  34632. return e == null ? void 0 : e(i);
  34633. };
  34634. var H3;
  34635. const Yr = typeof window < "u", MPe = (t) => typeof t == "string", MY = () => {
  34636. }, IPe = Yr && ((H3 = window == null ? void 0 : window.navigator) == null ? void 0 : H3.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
  34637. function IY(t) {
  34638. return typeof t == "function" ? t() : B(t);
  34639. }
  34640. function DPe(t) {
  34641. return t;
  34642. }
  34643. function HD(t) {
  34644. return jG() ? (f0(t), !0) : !1;
  34645. }
  34646. function RPe(t, e = !0) {
  34647. vn() ? it(t) : e ? t() : Tt(t);
  34648. }
  34649. function Rl(t) {
  34650. var e;
  34651. const n = IY(t);
  34652. return (e = n == null ? void 0 : n.$el) != null ? e : n;
  34653. }
  34654. const GD = Yr ? window : void 0;
  34655. function I_(...t) {
  34656. let e, n, r, i;
  34657. if (MPe(t[0]) || Array.isArray(t[0]) ? ([n, r, i] = t, e = GD) : [e, n, r, i] = t, !e)
  34658. return MY;
  34659. Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  34660. const a = [], o = () => {
  34661. a.forEach((c) => c()), a.length = 0;
  34662. }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(() => [Rl(e), IY(i)], ([c, f]) => {
  34663. o(), c && a.push(...n.flatMap((d) => r.map((h) => s(c, d, h, f))));
  34664. }, { immediate: !0, flush: "post" }), u = () => {
  34665. l(), o();
  34666. };
  34667. return HD(u), u;
  34668. }
  34669. let G3 = !1;
  34670. function kPe(t, e, n = {}) {
  34671. const { window: r = GD, ignore: i = [], capture: a = !0, detectIframe: o = !1 } = n;
  34672. if (!r)
  34673. return;
  34674. IPe && !G3 && (G3 = !0, Array.from(r.document.body.children).forEach((d) => d.addEventListener("click", MY)));
  34675. let s = !0;
  34676. const l = (d) => i.some((h) => {
  34677. if (typeof h == "string")
  34678. return Array.from(r.document.querySelectorAll(h)).some((p) => p === d.target || d.composedPath().includes(p));
  34679. {
  34680. const p = Rl(h);
  34681. return p && (d.target === p || d.composedPath().includes(p));
  34682. }
  34683. }), c = [
  34684. I_(r, "click", (d) => {
  34685. const h = Rl(t);
  34686. if (!(!h || h === d.target || d.composedPath().includes(h))) {
  34687. if (d.detail === 0 && (s = !l(d)), !s) {
  34688. s = !0;
  34689. return;
  34690. }
  34691. e(d);
  34692. }
  34693. }, { passive: !0, capture: a }),
  34694. I_(r, "pointerdown", (d) => {
  34695. const h = Rl(t);
  34696. h && (s = !d.composedPath().includes(h) && !l(d));
  34697. }, { passive: !0 }),
  34698. o && I_(r, "blur", (d) => {
  34699. var h;
  34700. const p = Rl(t);
  34701. ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && e(d);
  34702. })
  34703. ].filter(Boolean);
  34704. return () => c.forEach((d) => d());
  34705. }
  34706. function LPe(t, e = !1) {
  34707. const n = U(), r = () => n.value = !!t();
  34708. return r(), RPe(r, e), n;
  34709. }
  34710. const j3 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Z3 = "__vueuse_ssr_handlers__";
  34711. j3[Z3] = j3[Z3] || {};
  34712. var U3 = Object.getOwnPropertySymbols, NPe = Object.prototype.hasOwnProperty, BPe = Object.prototype.propertyIsEnumerable, zPe = (t, e) => {
  34713. var n = {};
  34714. for (var r in t)
  34715. NPe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  34716. if (t != null && U3)
  34717. for (var r of U3(t))
  34718. e.indexOf(r) < 0 && BPe.call(t, r) && (n[r] = t[r]);
  34719. return n;
  34720. };
  34721. function VPe(t, e, n = {}) {
  34722. const r = n, { window: i = GD } = r, a = zPe(r, ["window"]);
  34723. let o;
  34724. const s = LPe(() => i && "ResizeObserver" in i), l = () => {
  34725. o && (o.disconnect(), o = void 0);
  34726. }, u = se(() => Rl(t), (f) => {
  34727. l(), s.value && i && f && (o = new ResizeObserver(e), o.observe(f, a));
  34728. }, { immediate: !0, flush: "post" }), c = () => {
  34729. l(), u();
  34730. };
  34731. return HD(c), {
  34732. isSupported: s,
  34733. stop: c
  34734. };
  34735. }
  34736. var X3;
  34737. (function(t) {
  34738. t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
  34739. })(X3 || (X3 = {}));
  34740. var FPe = Object.defineProperty, Y3 = Object.getOwnPropertySymbols, WPe = Object.prototype.hasOwnProperty, QPe = Object.prototype.propertyIsEnumerable, q3 = (t, e, n) => e in t ? FPe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, HPe = (t, e) => {
  34741. for (var n in e || (e = {}))
  34742. WPe.call(e, n) && q3(t, n, e[n]);
  34743. if (Y3)
  34744. for (var n of Y3(e))
  34745. QPe.call(e, n) && q3(t, n, e[n]);
  34746. return t;
  34747. };
  34748. const GPe = {
  34749. easeInSine: [0.12, 0, 0.39, 0],
  34750. easeOutSine: [0.61, 1, 0.88, 1],
  34751. easeInOutSine: [0.37, 0, 0.63, 1],
  34752. easeInQuad: [0.11, 0, 0.5, 0],
  34753. easeOutQuad: [0.5, 1, 0.89, 1],
  34754. easeInOutQuad: [0.45, 0, 0.55, 1],
  34755. easeInCubic: [0.32, 0, 0.67, 0],
  34756. easeOutCubic: [0.33, 1, 0.68, 1],
  34757. easeInOutCubic: [0.65, 0, 0.35, 1],
  34758. easeInQuart: [0.5, 0, 0.75, 0],
  34759. easeOutQuart: [0.25, 1, 0.5, 1],
  34760. easeInOutQuart: [0.76, 0, 0.24, 1],
  34761. easeInQuint: [0.64, 0, 0.78, 0],
  34762. easeOutQuint: [0.22, 1, 0.36, 1],
  34763. easeInOutQuint: [0.83, 0, 0.17, 1],
  34764. easeInExpo: [0.7, 0, 0.84, 0],
  34765. easeOutExpo: [0.16, 1, 0.3, 1],
  34766. easeInOutExpo: [0.87, 0, 0.13, 1],
  34767. easeInCirc: [0.55, 0, 1, 0.45],
  34768. easeOutCirc: [0, 0.55, 0.45, 1],
  34769. easeInOutCirc: [0.85, 0, 0.15, 1],
  34770. easeInBack: [0.36, 0, 0.66, -0.56],
  34771. easeOutBack: [0.34, 1.56, 0.64, 1],
  34772. easeInOutBack: [0.68, -0.6, 0.32, 1.6]
  34773. };
  34774. HPe({
  34775. linear: DPe
  34776. }, GPe);
  34777. const jPe = () => Yr && /firefox/i.test(window.navigator.userAgent), jD = (t) => {
  34778. let e, n;
  34779. return t.type === "touchend" ? (n = t.changedTouches[0].clientY, e = t.changedTouches[0].clientX) : t.type.startsWith("touch") ? (n = t.touches[0].clientY, e = t.touches[0].clientX) : (n = t.clientY, e = t.clientX), {
  34780. clientX: e,
  34781. clientY: n
  34782. };
  34783. };
  34784. /**
  34785. * @vue/shared v3.4.31
  34786. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  34787. * @license MIT
  34788. **/
  34789. process.env.NODE_ENV !== "production" && Object.freeze({});
  34790. process.env.NODE_ENV !== "production" && Object.freeze([]);
  34791. const lm = () => {
  34792. }, ZPe = Object.prototype.hasOwnProperty, W1 = (t, e) => ZPe.call(t, e), UPe = Array.isArray, zv = (t) => typeof t == "function", ba = (t) => typeof t == "string", um = (t) => t !== null && typeof t == "object", XPe = (t) => t === void 0, Q1 = (t) => typeof t == "boolean", Ws = (t) => typeof t == "number", cm = (t) => typeof Element > "u" ? !1 : t instanceof Element, K3 = (t) => Gl(t), YPe = (t) => ba(t) ? !Number.isNaN(Number(t)) : !1;
  34793. class qPe extends Error {
  34794. constructor(e) {
  34795. super(e), this.name = "ElementPlusError";
  34796. }
  34797. }
  34798. function Gi(t, e) {
  34799. if (process.env.NODE_ENV !== "production") {
  34800. const n = ba(t) ? new qPe(`[${t}] ${e}`) : t;
  34801. console.warn(n);
  34802. }
  34803. }
  34804. const KPe = "utils/dom/style";
  34805. function eA(t, e = "px") {
  34806. if (!t)
  34807. return "";
  34808. if (Ws(t) || YPe(t))
  34809. return `${t}${e}`;
  34810. if (ba(t))
  34811. return t;
  34812. Gi(KPe, "binding value must be a string or number");
  34813. }
  34814. /*! Element Plus Icons Vue v2.3.1 */
  34815. var JPe = /* @__PURE__ */ te({
  34816. name: "ArrowDown",
  34817. __name: "arrow-down",
  34818. setup(t) {
  34819. return (e, n) => (pe(), Qe("svg", {
  34820. xmlns: "http://www.w3.org/2000/svg",
  34821. viewBox: "0 0 1024 1024"
  34822. }, [
  34823. He("path", {
  34824. fill: "currentColor",
  34825. d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
  34826. })
  34827. ]));
  34828. }
  34829. }), e$e = JPe, t$e = /* @__PURE__ */ te({
  34830. name: "CircleCheck",
  34831. __name: "circle-check",
  34832. setup(t) {
  34833. return (e, n) => (pe(), Qe("svg", {
  34834. xmlns: "http://www.w3.org/2000/svg",
  34835. viewBox: "0 0 1024 1024"
  34836. }, [
  34837. He("path", {
  34838. fill: "currentColor",
  34839. d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
  34840. }),
  34841. He("path", {
  34842. fill: "currentColor",
  34843. d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
  34844. })
  34845. ]));
  34846. }
  34847. }), n$e = t$e, r$e = /* @__PURE__ */ te({
  34848. name: "CircleClose",
  34849. __name: "circle-close",
  34850. setup(t) {
  34851. return (e, n) => (pe(), Qe("svg", {
  34852. xmlns: "http://www.w3.org/2000/svg",
  34853. viewBox: "0 0 1024 1024"
  34854. }, [
  34855. He("path", {
  34856. fill: "currentColor",
  34857. d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
  34858. }),
  34859. He("path", {
  34860. fill: "currentColor",
  34861. d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
  34862. })
  34863. ]));
  34864. }
  34865. }), DY = r$e, i$e = /* @__PURE__ */ te({
  34866. name: "Close",
  34867. __name: "close",
  34868. setup(t) {
  34869. return (e, n) => (pe(), Qe("svg", {
  34870. xmlns: "http://www.w3.org/2000/svg",
  34871. viewBox: "0 0 1024 1024"
  34872. }, [
  34873. He("path", {
  34874. fill: "currentColor",
  34875. d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
  34876. })
  34877. ]));
  34878. }
  34879. }), a$e = i$e, o$e = /* @__PURE__ */ te({
  34880. name: "Hide",
  34881. __name: "hide",
  34882. setup(t) {
  34883. return (e, n) => (pe(), Qe("svg", {
  34884. xmlns: "http://www.w3.org/2000/svg",
  34885. viewBox: "0 0 1024 1024"
  34886. }, [
  34887. He("path", {
  34888. fill: "currentColor",
  34889. d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
  34890. }),
  34891. He("path", {
  34892. fill: "currentColor",
  34893. d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
  34894. })
  34895. ]));
  34896. }
  34897. }), s$e = o$e, l$e = /* @__PURE__ */ te({
  34898. name: "Loading",
  34899. __name: "loading",
  34900. setup(t) {
  34901. return (e, n) => (pe(), Qe("svg", {
  34902. xmlns: "http://www.w3.org/2000/svg",
  34903. viewBox: "0 0 1024 1024"
  34904. }, [
  34905. He("path", {
  34906. fill: "currentColor",
  34907. d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
  34908. })
  34909. ]));
  34910. }
  34911. }), RY = l$e, u$e = /* @__PURE__ */ te({
  34912. name: "View",
  34913. __name: "view",
  34914. setup(t) {
  34915. return (e, n) => (pe(), Qe("svg", {
  34916. xmlns: "http://www.w3.org/2000/svg",
  34917. viewBox: "0 0 1024 1024"
  34918. }, [
  34919. He("path", {
  34920. fill: "currentColor",
  34921. d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
  34922. })
  34923. ]));
  34924. }
  34925. }), c$e = u$e;
  34926. const kY = "__epPropKey", jt = (t) => t, f$e = (t) => um(t) && !!t[kY], Tx = (t, e) => {
  34927. if (!um(t) || f$e(t))
  34928. return t;
  34929. const { values: n, required: r, default: i, type: a, validator: o } = t, l = {
  34930. type: a,
  34931. required: !!r,
  34932. validator: n || o ? (u) => {
  34933. let c = !1, f = [];
  34934. if (n && (f = Array.from(n), W1(t, "default") && f.push(i), c || (c = f.includes(u))), o && (c || (c = o(u))), !c && f.length > 0) {
  34935. const d = [...new Set(f)].map((h) => JSON.stringify(h)).join(", ");
  34936. Wle(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
  34937. }
  34938. return c;
  34939. } : void 0,
  34940. [kY]: !0
  34941. };
  34942. return W1(t, "default") && (l.default = i), l;
  34943. }, rr = (t) => A1(Object.entries(t).map(([e, n]) => [
  34944. e,
  34945. Tx(n, e)
  34946. ])), H1 = jt([
  34947. String,
  34948. Object,
  34949. Function
  34950. ]), d$e = {
  34951. validating: RY,
  34952. success: n$e,
  34953. error: DY
  34954. }, Df = (t, e) => {
  34955. if (t.install = (n) => {
  34956. for (const r of [t, ...Object.values(e ?? {})])
  34957. n.component(r.name, r);
  34958. }, e)
  34959. for (const [n, r] of Object.entries(e))
  34960. t[n] = r;
  34961. return t;
  34962. }, ZD = (t) => (t.install = lm, t), Xc = {
  34963. tab: "Tab",
  34964. enter: "Enter",
  34965. space: "Space",
  34966. left: "ArrowLeft",
  34967. up: "ArrowUp",
  34968. right: "ArrowRight",
  34969. down: "ArrowDown",
  34970. esc: "Escape",
  34971. delete: "Delete",
  34972. backspace: "Backspace",
  34973. numpadEnter: "NumpadEnter",
  34974. pageUp: "PageUp",
  34975. pageDown: "PageDown",
  34976. home: "Home",
  34977. end: "End"
  34978. }, Qs = "update:modelValue", LY = "change", h$e = ["", "default", "small", "large"], p$e = (t) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t), v$e = (t) => t, g$e = ["class", "style"], m$e = /^on[A-Z]/, y$e = (t = {}) => {
  34979. const { excludeListeners: e = !1, excludeKeys: n } = t, r = L(() => ((n == null ? void 0 : n.value) || []).concat(g$e)), i = vn();
  34980. return i ? L(() => {
  34981. var a;
  34982. return A1(Object.entries((a = i.proxy) == null ? void 0 : a.$attrs).filter(([o]) => !r.value.includes(o) && !(e && m$e.test(o))));
  34983. }) : (Gi("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), L(() => ({})));
  34984. }, C0 = ({ from: t, replacement: e, scope: n, version: r, ref: i, type: a = "API" }, o) => {
  34985. se(() => B(o), (s) => {
  34986. s && Gi(n, `[${a}] ${t} is about to be deprecated in version ${r}, please use ${e} instead.
  34987. For more detail, please visit: ${i}
  34988. `);
  34989. }, {
  34990. immediate: !0
  34991. });
  34992. };
  34993. var b$e = {
  34994. name: "en",
  34995. el: {
  34996. breadcrumb: {
  34997. label: "Breadcrumb"
  34998. },
  34999. colorpicker: {
  35000. confirm: "OK",
  35001. clear: "Clear",
  35002. defaultLabel: "color picker",
  35003. description: "current color is {color}. press enter to select a new color."
  35004. },
  35005. datepicker: {
  35006. now: "Now",
  35007. today: "Today",
  35008. cancel: "Cancel",
  35009. clear: "Clear",
  35010. confirm: "OK",
  35011. dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
  35012. monthTablePrompt: "Use the arrow keys and enter to select the month",
  35013. yearTablePrompt: "Use the arrow keys and enter to select the year",
  35014. selectedDate: "Selected date",
  35015. selectDate: "Select date",
  35016. selectTime: "Select time",
  35017. startDate: "Start Date",
  35018. startTime: "Start Time",
  35019. endDate: "End Date",
  35020. endTime: "End Time",
  35021. prevYear: "Previous Year",
  35022. nextYear: "Next Year",
  35023. prevMonth: "Previous Month",
  35024. nextMonth: "Next Month",
  35025. year: "",
  35026. month1: "January",
  35027. month2: "February",
  35028. month3: "March",
  35029. month4: "April",
  35030. month5: "May",
  35031. month6: "June",
  35032. month7: "July",
  35033. month8: "August",
  35034. month9: "September",
  35035. month10: "October",
  35036. month11: "November",
  35037. month12: "December",
  35038. week: "week",
  35039. weeks: {
  35040. sun: "Sun",
  35041. mon: "Mon",
  35042. tue: "Tue",
  35043. wed: "Wed",
  35044. thu: "Thu",
  35045. fri: "Fri",
  35046. sat: "Sat"
  35047. },
  35048. weeksFull: {
  35049. sun: "Sunday",
  35050. mon: "Monday",
  35051. tue: "Tuesday",
  35052. wed: "Wednesday",
  35053. thu: "Thursday",
  35054. fri: "Friday",
  35055. sat: "Saturday"
  35056. },
  35057. months: {
  35058. jan: "Jan",
  35059. feb: "Feb",
  35060. mar: "Mar",
  35061. apr: "Apr",
  35062. may: "May",
  35063. jun: "Jun",
  35064. jul: "Jul",
  35065. aug: "Aug",
  35066. sep: "Sep",
  35067. oct: "Oct",
  35068. nov: "Nov",
  35069. dec: "Dec"
  35070. }
  35071. },
  35072. inputNumber: {
  35073. decrease: "decrease number",
  35074. increase: "increase number"
  35075. },
  35076. select: {
  35077. loading: "Loading",
  35078. noMatch: "No matching data",
  35079. noData: "No data",
  35080. placeholder: "Select"
  35081. },
  35082. dropdown: {
  35083. toggleDropdown: "Toggle Dropdown"
  35084. },
  35085. cascader: {
  35086. noMatch: "No matching data",
  35087. loading: "Loading",
  35088. placeholder: "Select",
  35089. noData: "No data"
  35090. },
  35091. pagination: {
  35092. goto: "Go to",
  35093. pagesize: "/page",
  35094. total: "Total {total}",
  35095. pageClassifier: "",
  35096. page: "Page",
  35097. prev: "Go to previous page",
  35098. next: "Go to next page",
  35099. currentPage: "page {pager}",
  35100. prevPages: "Previous {pager} pages",
  35101. nextPages: "Next {pager} pages",
  35102. deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
  35103. },
  35104. dialog: {
  35105. close: "Close this dialog"
  35106. },
  35107. drawer: {
  35108. close: "Close this dialog"
  35109. },
  35110. messagebox: {
  35111. title: "Message",
  35112. confirm: "OK",
  35113. cancel: "Cancel",
  35114. error: "Illegal input",
  35115. close: "Close this dialog"
  35116. },
  35117. upload: {
  35118. deleteTip: "press delete to remove",
  35119. delete: "Delete",
  35120. preview: "Preview",
  35121. continue: "Continue"
  35122. },
  35123. slider: {
  35124. defaultLabel: "slider between {min} and {max}",
  35125. defaultRangeStartLabel: "pick start value",
  35126. defaultRangeEndLabel: "pick end value"
  35127. },
  35128. table: {
  35129. emptyText: "No Data",
  35130. confirmFilter: "Confirm",
  35131. resetFilter: "Reset",
  35132. clearFilter: "All",
  35133. sumText: "Sum"
  35134. },
  35135. tour: {
  35136. next: "Next",
  35137. previous: "Previous",
  35138. finish: "Finish"
  35139. },
  35140. tree: {
  35141. emptyText: "No Data"
  35142. },
  35143. transfer: {
  35144. noMatch: "No matching data",
  35145. noData: "No data",
  35146. titles: ["List 1", "List 2"],
  35147. filterPlaceholder: "Enter keyword",
  35148. noCheckedFormat: "{total} items",
  35149. hasCheckedFormat: "{checked}/{total} checked"
  35150. },
  35151. image: {
  35152. error: "FAILED"
  35153. },
  35154. pageHeader: {
  35155. title: "Back"
  35156. },
  35157. popconfirm: {
  35158. confirmButtonText: "Yes",
  35159. cancelButtonText: "No"
  35160. },
  35161. carousel: {
  35162. leftArrow: "Carousel arrow left",
  35163. rightArrow: "Carousel arrow right",
  35164. indicator: "Carousel switch to index {index}"
  35165. }
  35166. }
  35167. };
  35168. const _$e = (t) => (e, n) => O$e(e, n, B(t)), O$e = (t, e, n) => kt(n, t, t).replace(/\{(\w+)\}/g, (r, i) => {
  35169. var a;
  35170. return `${(a = e == null ? void 0 : e[i]) != null ? a : `{${i}}`}`;
  35171. }), S$e = (t) => {
  35172. const e = L(() => B(t).name), n = tp(t) ? t : U(t);
  35173. return {
  35174. lang: e,
  35175. locale: n,
  35176. t: _$e(t)
  35177. };
  35178. }, x$e = Symbol("localeContextKey"), w$e = (t) => {
  35179. const e = Ge(x$e, U());
  35180. return S$e(L(() => e.value || b$e));
  35181. }, kC = "el", C$e = "is-", Nu = (t, e, n, r, i) => {
  35182. let a = `${t}-${e}`;
  35183. return n && (a += `-${n}`), r && (a += `__${r}`), i && (a += `--${i}`), a;
  35184. }, T$e = Symbol("namespaceContextKey"), UD = (t) => {
  35185. const e = vn() ? Ge(T$e, U(kC)) : U(kC);
  35186. return L(() => B(e) || kC);
  35187. }, Jn = (t, e) => {
  35188. const n = UD();
  35189. return {
  35190. namespace: n,
  35191. b: (v = "") => Nu(n.value, t, v, "", ""),
  35192. e: (v) => v ? Nu(n.value, t, "", v, "") : "",
  35193. m: (v) => v ? Nu(n.value, t, "", "", v) : "",
  35194. be: (v, g) => v && g ? Nu(n.value, t, v, g, "") : "",
  35195. em: (v, g) => v && g ? Nu(n.value, t, "", v, g) : "",
  35196. bm: (v, g) => v && g ? Nu(n.value, t, v, "", g) : "",
  35197. bem: (v, g, m) => v && g && m ? Nu(n.value, t, v, g, m) : "",
  35198. is: (v, ...g) => {
  35199. const m = g.length >= 1 ? g[0] : !0;
  35200. return v && m ? `${C$e}${v}` : "";
  35201. },
  35202. cssVar: (v) => {
  35203. const g = {};
  35204. for (const m in v)
  35205. v[m] && (g[`--${n.value}-${m}`] = v[m]);
  35206. return g;
  35207. },
  35208. cssVarName: (v) => `--${n.value}-${v}`,
  35209. cssVarBlock: (v) => {
  35210. const g = {};
  35211. for (const m in v)
  35212. v[m] && (g[`--${n.value}-${t}-${m}`] = v[m]);
  35213. return g;
  35214. },
  35215. cssVarBlockName: (v) => `--${n.value}-${t}-${v}`
  35216. };
  35217. }, P$e = Tx({
  35218. type: jt(Boolean),
  35219. default: null
  35220. }), $$e = Tx({
  35221. type: jt(Function)
  35222. }), NY = (t) => {
  35223. const e = `update:${t}`, n = `onUpdate:${t}`, r = [e], i = {
  35224. [t]: P$e,
  35225. [n]: $$e
  35226. };
  35227. return {
  35228. useModelToggle: ({
  35229. indicator: o,
  35230. toggleReason: s,
  35231. shouldHideWhenRouteChanges: l,
  35232. shouldProceed: u,
  35233. onShow: c,
  35234. onHide: f
  35235. }) => {
  35236. const d = vn(), { emit: h } = d, p = d.props, v = L(() => zv(p[n])), g = L(() => p[t] === null), m = (x) => {
  35237. o.value !== !0 && (o.value = !0, s && (s.value = x), zv(c) && c(x));
  35238. }, y = (x) => {
  35239. o.value !== !1 && (o.value = !1, s && (s.value = x), zv(f) && f(x));
  35240. }, b = (x) => {
  35241. if (p.disabled === !0 || zv(u) && !u())
  35242. return;
  35243. const C = v.value && Yr;
  35244. C && h(e, !0), (g.value || !C) && m(x);
  35245. }, _ = (x) => {
  35246. if (p.disabled === !0 || !Yr)
  35247. return;
  35248. const C = v.value && Yr;
  35249. C && h(e, !1), (g.value || !C) && y(x);
  35250. }, O = (x) => {
  35251. Q1(x) && (p.disabled && x ? v.value && h(e, !1) : o.value !== x && (x ? m() : y()));
  35252. }, S = () => {
  35253. o.value ? _() : b();
  35254. };
  35255. return se(() => p[t], O), l && d.appContext.config.globalProperties.$route !== void 0 && se(() => ({
  35256. ...d.proxy.$route
  35257. }), () => {
  35258. l.value && o.value && _();
  35259. }), it(() => {
  35260. O(p[t]);
  35261. }), {
  35262. hide: _,
  35263. show: b,
  35264. toggle: S,
  35265. hasUpdateHandler: v
  35266. };
  35267. },
  35268. useModelToggleProps: i,
  35269. useModelToggleEmits: r
  35270. };
  35271. };
  35272. NY("modelValue");
  35273. const BY = (t) => {
  35274. const e = vn();
  35275. return L(() => {
  35276. var n, r;
  35277. return (r = (n = e == null ? void 0 : e.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[t];
  35278. });
  35279. };
  35280. var _i = "top", Pa = "bottom", $a = "right", Oi = "left", XD = "auto", T0 = [_i, Pa, $a, Oi], Mh = "start", fm = "end", A$e = "clippingParents", zY = "viewport", Xp = "popper", E$e = "reference", J3 = T0.reduce(function(t, e) {
  35281. return t.concat([e + "-" + Mh, e + "-" + fm]);
  35282. }, []), YD = [].concat(T0, [XD]).reduce(function(t, e) {
  35283. return t.concat([e, e + "-" + Mh, e + "-" + fm]);
  35284. }, []), M$e = "beforeRead", I$e = "read", D$e = "afterRead", R$e = "beforeMain", k$e = "main", L$e = "afterMain", N$e = "beforeWrite", B$e = "write", z$e = "afterWrite", V$e = [M$e, I$e, D$e, R$e, k$e, L$e, N$e, B$e, z$e];
  35285. function ns(t) {
  35286. return t ? (t.nodeName || "").toLowerCase() : null;
  35287. }
  35288. function ho(t) {
  35289. if (t == null) return window;
  35290. if (t.toString() !== "[object Window]") {
  35291. var e = t.ownerDocument;
  35292. return e && e.defaultView || window;
  35293. }
  35294. return t;
  35295. }
  35296. function Ih(t) {
  35297. var e = ho(t).Element;
  35298. return t instanceof e || t instanceof Element;
  35299. }
  35300. function _a(t) {
  35301. var e = ho(t).HTMLElement;
  35302. return t instanceof e || t instanceof HTMLElement;
  35303. }
  35304. function qD(t) {
  35305. if (typeof ShadowRoot > "u") return !1;
  35306. var e = ho(t).ShadowRoot;
  35307. return t instanceof e || t instanceof ShadowRoot;
  35308. }
  35309. function F$e(t) {
  35310. var e = t.state;
  35311. Object.keys(e.elements).forEach(function(n) {
  35312. var r = e.styles[n] || {}, i = e.attributes[n] || {}, a = e.elements[n];
  35313. !_a(a) || !ns(a) || (Object.assign(a.style, r), Object.keys(i).forEach(function(o) {
  35314. var s = i[o];
  35315. s === !1 ? a.removeAttribute(o) : a.setAttribute(o, s === !0 ? "" : s);
  35316. }));
  35317. });
  35318. }
  35319. function W$e(t) {
  35320. var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
  35321. return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
  35322. Object.keys(e.elements).forEach(function(r) {
  35323. var i = e.elements[r], a = e.attributes[r] || {}, o = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s = o.reduce(function(l, u) {
  35324. return l[u] = "", l;
  35325. }, {});
  35326. !_a(i) || !ns(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) {
  35327. i.removeAttribute(l);
  35328. }));
  35329. });
  35330. };
  35331. }
  35332. var VY = { name: "applyStyles", enabled: !0, phase: "write", fn: F$e, effect: W$e, requires: ["computeStyles"] };
  35333. function jo(t) {
  35334. return t.split("-")[0];
  35335. }
  35336. var Yc = Math.max, G1 = Math.min, Dh = Math.round;
  35337. function Rh(t, e) {
  35338. e === void 0 && (e = !1);
  35339. var n = t.getBoundingClientRect(), r = 1, i = 1;
  35340. if (_a(t) && e) {
  35341. var a = t.offsetHeight, o = t.offsetWidth;
  35342. o > 0 && (r = Dh(n.width) / o || 1), a > 0 && (i = Dh(n.height) / a || 1);
  35343. }
  35344. return { width: n.width / r, height: n.height / i, top: n.top / i, right: n.right / r, bottom: n.bottom / i, left: n.left / r, x: n.left / r, y: n.top / i };
  35345. }
  35346. function KD(t) {
  35347. var e = Rh(t), n = t.offsetWidth, r = t.offsetHeight;
  35348. return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r };
  35349. }
  35350. function FY(t, e) {
  35351. var n = e.getRootNode && e.getRootNode();
  35352. if (t.contains(e)) return !0;
  35353. if (n && qD(n)) {
  35354. var r = e;
  35355. do {
  35356. if (r && t.isSameNode(r)) return !0;
  35357. r = r.parentNode || r.host;
  35358. } while (r);
  35359. }
  35360. return !1;
  35361. }
  35362. function Hs(t) {
  35363. return ho(t).getComputedStyle(t);
  35364. }
  35365. function Q$e(t) {
  35366. return ["table", "td", "th"].indexOf(ns(t)) >= 0;
  35367. }
  35368. function xu(t) {
  35369. return ((Ih(t) ? t.ownerDocument : t.document) || window.document).documentElement;
  35370. }
  35371. function Px(t) {
  35372. return ns(t) === "html" ? t : t.assignedSlot || t.parentNode || (qD(t) ? t.host : null) || xu(t);
  35373. }
  35374. function e6(t) {
  35375. return !_a(t) || Hs(t).position === "fixed" ? null : t.offsetParent;
  35376. }
  35377. function H$e(t) {
  35378. var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
  35379. if (n && _a(t)) {
  35380. var r = Hs(t);
  35381. if (r.position === "fixed") return null;
  35382. }
  35383. var i = Px(t);
  35384. for (qD(i) && (i = i.host); _a(i) && ["html", "body"].indexOf(ns(i)) < 0; ) {
  35385. var a = Hs(i);
  35386. if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || e && a.willChange === "filter" || e && a.filter && a.filter !== "none") return i;
  35387. i = i.parentNode;
  35388. }
  35389. return null;
  35390. }
  35391. function P0(t) {
  35392. for (var e = ho(t), n = e6(t); n && Q$e(n) && Hs(n).position === "static"; ) n = e6(n);
  35393. return n && (ns(n) === "html" || ns(n) === "body" && Hs(n).position === "static") ? e : n || H$e(t) || e;
  35394. }
  35395. function JD(t) {
  35396. return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
  35397. }
  35398. function mg(t, e, n) {
  35399. return Yc(t, G1(e, n));
  35400. }
  35401. function G$e(t, e, n) {
  35402. var r = mg(t, e, n);
  35403. return r > n ? n : r;
  35404. }
  35405. function WY() {
  35406. return { top: 0, right: 0, bottom: 0, left: 0 };
  35407. }
  35408. function QY(t) {
  35409. return Object.assign({}, WY(), t);
  35410. }
  35411. function HY(t, e) {
  35412. return e.reduce(function(n, r) {
  35413. return n[r] = t, n;
  35414. }, {});
  35415. }
  35416. var j$e = function(t, e) {
  35417. return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, QY(typeof t != "number" ? t : HY(t, T0));
  35418. };
  35419. function Z$e(t) {
  35420. var e, n = t.state, r = t.name, i = t.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = jo(n.placement), l = JD(s), u = [Oi, $a].indexOf(s) >= 0, c = u ? "height" : "width";
  35421. if (!(!a || !o)) {
  35422. var f = j$e(i.padding, n), d = KD(a), h = l === "y" ? _i : Oi, p = l === "y" ? Pa : $a, v = n.rects.reference[c] + n.rects.reference[l] - o[l] - n.rects.popper[c], g = o[l] - n.rects.reference[l], m = P0(a), y = m ? l === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, b = v / 2 - g / 2, _ = f[h], O = y - d[c] - f[p], S = y / 2 - d[c] / 2 + b, x = mg(_, S, O), C = l;
  35423. n.modifiersData[r] = (e = {}, e[C] = x, e.centerOffset = x - S, e);
  35424. }
  35425. }
  35426. function U$e(t) {
  35427. var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
  35428. i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || !FY(e.elements.popper, i) || (e.elements.arrow = i));
  35429. }
  35430. var X$e = { name: "arrow", enabled: !0, phase: "main", fn: Z$e, effect: U$e, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
  35431. function kh(t) {
  35432. return t.split("-")[1];
  35433. }
  35434. var Y$e = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
  35435. function q$e(t) {
  35436. var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
  35437. return { x: Dh(e * i) / i || 0, y: Dh(n * i) / i || 0 };
  35438. }
  35439. function t6(t) {
  35440. var e, n = t.popper, r = t.popperRect, i = t.placement, a = t.variation, o = t.offsets, s = t.position, l = t.gpuAcceleration, u = t.adaptive, c = t.roundOffsets, f = t.isFixed, d = o.x, h = d === void 0 ? 0 : d, p = o.y, v = p === void 0 ? 0 : p, g = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v };
  35441. h = g.x, v = g.y;
  35442. var m = o.hasOwnProperty("x"), y = o.hasOwnProperty("y"), b = Oi, _ = _i, O = window;
  35443. if (u) {
  35444. var S = P0(n), x = "clientHeight", C = "clientWidth";
  35445. if (S === ho(n) && (S = xu(n), Hs(S).position !== "static" && s === "absolute" && (x = "scrollHeight", C = "scrollWidth")), S = S, i === _i || (i === Oi || i === $a) && a === fm) {
  35446. _ = Pa;
  35447. var T = f && S === O && O.visualViewport ? O.visualViewport.height : S[x];
  35448. v -= T - r.height, v *= l ? 1 : -1;
  35449. }
  35450. if (i === Oi || (i === _i || i === Pa) && a === fm) {
  35451. b = $a;
  35452. var w = f && S === O && O.visualViewport ? O.visualViewport.width : S[C];
  35453. h -= w - r.width, h *= l ? 1 : -1;
  35454. }
  35455. }
  35456. var P = Object.assign({ position: s }, u && Y$e), $ = c === !0 ? q$e({ x: h, y: v }) : { x: h, y: v };
  35457. if (h = $.x, v = $.y, l) {
  35458. var A;
  35459. return Object.assign({}, P, (A = {}, A[_] = y ? "0" : "", A[b] = m ? "0" : "", A.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", A));
  35460. }
  35461. return Object.assign({}, P, (e = {}, e[_] = y ? v + "px" : "", e[b] = m ? h + "px" : "", e.transform = "", e));
  35462. }
  35463. function K$e(t) {
  35464. var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, a = n.adaptive, o = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: jo(e.placement), variation: kh(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: i, isFixed: e.options.strategy === "fixed" };
  35465. e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, t6(Object.assign({}, u, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: o, roundOffsets: l })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, t6(Object.assign({}, u, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
  35466. }
  35467. var GY = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: K$e, data: {} }, ky = { passive: !0 };
  35468. function J$e(t) {
  35469. var e = t.state, n = t.instance, r = t.options, i = r.scroll, a = i === void 0 ? !0 : i, o = r.resize, s = o === void 0 ? !0 : o, l = ho(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
  35470. return a && u.forEach(function(c) {
  35471. c.addEventListener("scroll", n.update, ky);
  35472. }), s && l.addEventListener("resize", n.update, ky), function() {
  35473. a && u.forEach(function(c) {
  35474. c.removeEventListener("scroll", n.update, ky);
  35475. }), s && l.removeEventListener("resize", n.update, ky);
  35476. };
  35477. }
  35478. var jY = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
  35479. }, effect: J$e, data: {} }, e2e = { left: "right", right: "left", bottom: "top", top: "bottom" };
  35480. function D_(t) {
  35481. return t.replace(/left|right|bottom|top/g, function(e) {
  35482. return e2e[e];
  35483. });
  35484. }
  35485. var t2e = { start: "end", end: "start" };
  35486. function n6(t) {
  35487. return t.replace(/start|end/g, function(e) {
  35488. return t2e[e];
  35489. });
  35490. }
  35491. function eR(t) {
  35492. var e = ho(t), n = e.pageXOffset, r = e.pageYOffset;
  35493. return { scrollLeft: n, scrollTop: r };
  35494. }
  35495. function tR(t) {
  35496. return Rh(xu(t)).left + eR(t).scrollLeft;
  35497. }
  35498. function n2e(t) {
  35499. var e = ho(t), n = xu(t), r = e.visualViewport, i = n.clientWidth, a = n.clientHeight, o = 0, s = 0;
  35500. return r && (i = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (o = r.offsetLeft, s = r.offsetTop)), { width: i, height: a, x: o + tR(t), y: s };
  35501. }
  35502. function r2e(t) {
  35503. var e, n = xu(t), r = eR(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, a = Yc(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Yc(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -r.scrollLeft + tR(t), l = -r.scrollTop;
  35504. return Hs(i || n).direction === "rtl" && (s += Yc(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: o, x: s, y: l };
  35505. }
  35506. function nR(t) {
  35507. var e = Hs(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
  35508. return /auto|scroll|overlay|hidden/.test(n + i + r);
  35509. }
  35510. function ZY(t) {
  35511. return ["html", "body", "#document"].indexOf(ns(t)) >= 0 ? t.ownerDocument.body : _a(t) && nR(t) ? t : ZY(Px(t));
  35512. }
  35513. function yg(t, e) {
  35514. var n;
  35515. e === void 0 && (e = []);
  35516. var r = ZY(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), a = ho(r), o = i ? [a].concat(a.visualViewport || [], nR(r) ? r : []) : r, s = e.concat(o);
  35517. return i ? s : s.concat(yg(Px(o)));
  35518. }
  35519. function tA(t) {
  35520. return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
  35521. }
  35522. function i2e(t) {
  35523. var e = Rh(t);
  35524. return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e;
  35525. }
  35526. function r6(t, e) {
  35527. return e === zY ? tA(n2e(t)) : Ih(e) ? i2e(e) : tA(r2e(xu(t)));
  35528. }
  35529. function a2e(t) {
  35530. var e = yg(Px(t)), n = ["absolute", "fixed"].indexOf(Hs(t).position) >= 0, r = n && _a(t) ? P0(t) : t;
  35531. return Ih(r) ? e.filter(function(i) {
  35532. return Ih(i) && FY(i, r) && ns(i) !== "body";
  35533. }) : [];
  35534. }
  35535. function o2e(t, e, n) {
  35536. var r = e === "clippingParents" ? a2e(t) : [].concat(e), i = [].concat(r, [n]), a = i[0], o = i.reduce(function(s, l) {
  35537. var u = r6(t, l);
  35538. return s.top = Yc(u.top, s.top), s.right = G1(u.right, s.right), s.bottom = G1(u.bottom, s.bottom), s.left = Yc(u.left, s.left), s;
  35539. }, r6(t, a));
  35540. return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
  35541. }
  35542. function UY(t) {
  35543. var e = t.reference, n = t.element, r = t.placement, i = r ? jo(r) : null, a = r ? kh(r) : null, o = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, l;
  35544. switch (i) {
  35545. case _i:
  35546. l = { x: o, y: e.y - n.height };
  35547. break;
  35548. case Pa:
  35549. l = { x: o, y: e.y + e.height };
  35550. break;
  35551. case $a:
  35552. l = { x: e.x + e.width, y: s };
  35553. break;
  35554. case Oi:
  35555. l = { x: e.x - n.width, y: s };
  35556. break;
  35557. default:
  35558. l = { x: e.x, y: e.y };
  35559. }
  35560. var u = i ? JD(i) : null;
  35561. if (u != null) {
  35562. var c = u === "y" ? "height" : "width";
  35563. switch (a) {
  35564. case Mh:
  35565. l[u] = l[u] - (e[c] / 2 - n[c] / 2);
  35566. break;
  35567. case fm:
  35568. l[u] = l[u] + (e[c] / 2 - n[c] / 2);
  35569. break;
  35570. }
  35571. }
  35572. return l;
  35573. }
  35574. function dm(t, e) {
  35575. e === void 0 && (e = {});
  35576. var n = e, r = n.placement, i = r === void 0 ? t.placement : r, a = n.boundary, o = a === void 0 ? A$e : a, s = n.rootBoundary, l = s === void 0 ? zY : s, u = n.elementContext, c = u === void 0 ? Xp : u, f = n.altBoundary, d = f === void 0 ? !1 : f, h = n.padding, p = h === void 0 ? 0 : h, v = QY(typeof p != "number" ? p : HY(p, T0)), g = c === Xp ? E$e : Xp, m = t.rects.popper, y = t.elements[d ? g : c], b = o2e(Ih(y) ? y : y.contextElement || xu(t.elements.popper), o, l), _ = Rh(t.elements.reference), O = UY({ reference: _, element: m, strategy: "absolute", placement: i }), S = tA(Object.assign({}, m, O)), x = c === Xp ? S : _, C = { top: b.top - x.top + v.top, bottom: x.bottom - b.bottom + v.bottom, left: b.left - x.left + v.left, right: x.right - b.right + v.right }, T = t.modifiersData.offset;
  35577. if (c === Xp && T) {
  35578. var w = T[i];
  35579. Object.keys(C).forEach(function(P) {
  35580. var $ = [$a, Pa].indexOf(P) >= 0 ? 1 : -1, A = [_i, Pa].indexOf(P) >= 0 ? "y" : "x";
  35581. C[P] += w[A] * $;
  35582. });
  35583. }
  35584. return C;
  35585. }
  35586. function s2e(t, e) {
  35587. e === void 0 && (e = {});
  35588. var n = e, r = n.placement, i = n.boundary, a = n.rootBoundary, o = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? YD : l, c = kh(r), f = c ? s ? J3 : J3.filter(function(p) {
  35589. return kh(p) === c;
  35590. }) : T0, d = f.filter(function(p) {
  35591. return u.indexOf(p) >= 0;
  35592. });
  35593. d.length === 0 && (d = f);
  35594. var h = d.reduce(function(p, v) {
  35595. return p[v] = dm(t, { placement: v, boundary: i, rootBoundary: a, padding: o })[jo(v)], p;
  35596. }, {});
  35597. return Object.keys(h).sort(function(p, v) {
  35598. return h[p] - h[v];
  35599. });
  35600. }
  35601. function l2e(t) {
  35602. if (jo(t) === XD) return [];
  35603. var e = D_(t);
  35604. return [n6(t), e, n6(e)];
  35605. }
  35606. function u2e(t) {
  35607. var e = t.state, n = t.options, r = t.name;
  35608. if (!e.modifiersData[r]._skip) {
  35609. for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, l = n.fallbackPlacements, u = n.padding, c = n.boundary, f = n.rootBoundary, d = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, g = e.options.placement, m = jo(g), y = m === g, b = l || (y || !p ? [D_(g)] : l2e(g)), _ = [g].concat(b).reduce(function(ne, ee) {
  35610. return ne.concat(jo(ee) === XD ? s2e(e, { placement: ee, boundary: c, rootBoundary: f, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ee);
  35611. }, []), O = e.rects.reference, S = e.rects.popper, x = /* @__PURE__ */ new Map(), C = !0, T = _[0], w = 0; w < _.length; w++) {
  35612. var P = _[w], $ = jo(P), A = kh(P) === Mh, D = [_i, Pa].indexOf($) >= 0, E = D ? "width" : "height", R = dm(e, { placement: P, boundary: c, rootBoundary: f, altBoundary: d, padding: u }), N = D ? A ? $a : Oi : A ? Pa : _i;
  35613. O[E] > S[E] && (N = D_(N));
  35614. var V = D_(N), z = [];
  35615. if (a && z.push(R[$] <= 0), s && z.push(R[N] <= 0, R[V] <= 0), z.every(function(ne) {
  35616. return ne;
  35617. })) {
  35618. T = P, C = !1;
  35619. break;
  35620. }
  35621. x.set(P, z);
  35622. }
  35623. if (C) for (var W = p ? 3 : 1, F = function(ne) {
  35624. var ee = _.find(function(oe) {
  35625. var K = x.get(oe);
  35626. if (K) return K.slice(0, ne).every(function(ie) {
  35627. return ie;
  35628. });
  35629. });
  35630. if (ee) return T = ee, "break";
  35631. }, Q = W; Q > 0; Q--) {
  35632. var Z = F(Q);
  35633. if (Z === "break") break;
  35634. }
  35635. e.placement !== T && (e.modifiersData[r]._skip = !0, e.placement = T, e.reset = !0);
  35636. }
  35637. }
  35638. var c2e = { name: "flip", enabled: !0, phase: "main", fn: u2e, requiresIfExists: ["offset"], data: { _skip: !1 } };
  35639. function i6(t, e, n) {
  35640. return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x };
  35641. }
  35642. function a6(t) {
  35643. return [_i, $a, Pa, Oi].some(function(e) {
  35644. return t[e] >= 0;
  35645. });
  35646. }
  35647. function f2e(t) {
  35648. var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, o = dm(e, { elementContext: "reference" }), s = dm(e, { altBoundary: !0 }), l = i6(o, r), u = i6(s, i, a), c = a6(l), f = a6(u);
  35649. e.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: f }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": f });
  35650. }
  35651. var d2e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: f2e };
  35652. function h2e(t, e, n) {
  35653. var r = jo(t), i = [Oi, _i].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, o = a[0], s = a[1];
  35654. return o = o || 0, s = (s || 0) * i, [Oi, $a].indexOf(r) >= 0 ? { x: s, y: o } : { x: o, y: s };
  35655. }
  35656. function p2e(t) {
  35657. var e = t.state, n = t.options, r = t.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = YD.reduce(function(c, f) {
  35658. return c[f] = h2e(f, e.rects, a), c;
  35659. }, {}), s = o[e.placement], l = s.x, u = s.y;
  35660. e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = o;
  35661. }
  35662. var v2e = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: p2e };
  35663. function g2e(t) {
  35664. var e = t.state, n = t.name;
  35665. e.modifiersData[n] = UY({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
  35666. }
  35667. var XY = { name: "popperOffsets", enabled: !0, phase: "read", fn: g2e, data: {} };
  35668. function m2e(t) {
  35669. return t === "x" ? "y" : "x";
  35670. }
  35671. function y2e(t) {
  35672. var e = t.state, n = t.options, r = t.name, i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !1 : o, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, f = n.padding, d = n.tether, h = d === void 0 ? !0 : d, p = n.tetherOffset, v = p === void 0 ? 0 : p, g = dm(e, { boundary: l, rootBoundary: u, padding: f, altBoundary: c }), m = jo(e.placement), y = kh(e.placement), b = !y, _ = JD(m), O = m2e(_), S = e.modifiersData.popperOffsets, x = e.rects.reference, C = e.rects.popper, T = typeof v == "function" ? v(Object.assign({}, e.rects, { placement: e.placement })) : v, w = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), P = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, $ = { x: 0, y: 0 };
  35673. if (S) {
  35674. if (a) {
  35675. var A, D = _ === "y" ? _i : Oi, E = _ === "y" ? Pa : $a, R = _ === "y" ? "height" : "width", N = S[_], V = N + g[D], z = N - g[E], W = h ? -C[R] / 2 : 0, F = y === Mh ? x[R] : C[R], Q = y === Mh ? -C[R] : -x[R], Z = e.elements.arrow, ne = h && Z ? KD(Z) : { width: 0, height: 0 }, ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : WY(), oe = ee[D], K = ee[E], ie = mg(0, x[R], ne[R]), X = b ? x[R] / 2 - W - ie - oe - w.mainAxis : F - ie - oe - w.mainAxis, H = b ? -x[R] / 2 + W + ie + K + w.mainAxis : Q + ie + K + w.mainAxis, G = e.elements.arrow && P0(e.elements.arrow), re = G ? _ === "y" ? G.clientTop || 0 : G.clientLeft || 0 : 0, fe = (A = P == null ? void 0 : P[_]) != null ? A : 0, de = N + X - fe - re, Ee = N + H - fe, $e = mg(h ? G1(V, de) : V, N, h ? Yc(z, Ee) : z);
  35676. S[_] = $e, $[_] = $e - N;
  35677. }
  35678. if (s) {
  35679. var Se, be = _ === "x" ? _i : Oi, he = _ === "x" ? Pa : $a, Te = S[O], ze = O === "y" ? "height" : "width", ut = Te + g[be], ct = Te - g[he], Dt = [_i, Oi].indexOf(m) !== -1, ve = (Se = P == null ? void 0 : P[O]) != null ? Se : 0, Xe = Dt ? ut : Te - x[ze] - C[ze] - ve + w.altAxis, Rt = Dt ? Te + x[ze] + C[ze] - ve - w.altAxis : ct, An = h && Dt ? G$e(Xe, Te, Rt) : mg(h ? Xe : ut, Te, h ? Rt : ct);
  35680. S[O] = An, $[O] = An - Te;
  35681. }
  35682. e.modifiersData[r] = $;
  35683. }
  35684. }
  35685. var b2e = { name: "preventOverflow", enabled: !0, phase: "main", fn: y2e, requiresIfExists: ["offset"] };
  35686. function _2e(t) {
  35687. return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
  35688. }
  35689. function O2e(t) {
  35690. return t === ho(t) || !_a(t) ? eR(t) : _2e(t);
  35691. }
  35692. function S2e(t) {
  35693. var e = t.getBoundingClientRect(), n = Dh(e.width) / t.offsetWidth || 1, r = Dh(e.height) / t.offsetHeight || 1;
  35694. return n !== 1 || r !== 1;
  35695. }
  35696. function x2e(t, e, n) {
  35697. n === void 0 && (n = !1);
  35698. var r = _a(e), i = _a(e) && S2e(e), a = xu(e), o = Rh(t, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
  35699. return (r || !r && !n) && ((ns(e) !== "body" || nR(a)) && (s = O2e(e)), _a(e) ? (l = Rh(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : a && (l.x = tR(a))), { x: o.left + s.scrollLeft - l.x, y: o.top + s.scrollTop - l.y, width: o.width, height: o.height };
  35700. }
  35701. function w2e(t) {
  35702. var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  35703. t.forEach(function(a) {
  35704. e.set(a.name, a);
  35705. });
  35706. function i(a) {
  35707. n.add(a.name);
  35708. var o = [].concat(a.requires || [], a.requiresIfExists || []);
  35709. o.forEach(function(s) {
  35710. if (!n.has(s)) {
  35711. var l = e.get(s);
  35712. l && i(l);
  35713. }
  35714. }), r.push(a);
  35715. }
  35716. return t.forEach(function(a) {
  35717. n.has(a.name) || i(a);
  35718. }), r;
  35719. }
  35720. function C2e(t) {
  35721. var e = w2e(t);
  35722. return V$e.reduce(function(n, r) {
  35723. return n.concat(e.filter(function(i) {
  35724. return i.phase === r;
  35725. }));
  35726. }, []);
  35727. }
  35728. function T2e(t) {
  35729. var e;
  35730. return function() {
  35731. return e || (e = new Promise(function(n) {
  35732. Promise.resolve().then(function() {
  35733. e = void 0, n(t());
  35734. });
  35735. })), e;
  35736. };
  35737. }
  35738. function P2e(t) {
  35739. var e = t.reduce(function(n, r) {
  35740. var i = n[r.name];
  35741. return n[r.name] = i ? Object.assign({}, i, r, { options: Object.assign({}, i.options, r.options), data: Object.assign({}, i.data, r.data) }) : r, n;
  35742. }, {});
  35743. return Object.keys(e).map(function(n) {
  35744. return e[n];
  35745. });
  35746. }
  35747. var o6 = { placement: "bottom", modifiers: [], strategy: "absolute" };
  35748. function s6() {
  35749. for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
  35750. return !e.some(function(r) {
  35751. return !(r && typeof r.getBoundingClientRect == "function");
  35752. });
  35753. }
  35754. function rR(t) {
  35755. t === void 0 && (t = {});
  35756. var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, a = i === void 0 ? o6 : i;
  35757. return function(o, s, l) {
  35758. l === void 0 && (l = a);
  35759. var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, o6, a), modifiersData: {}, elements: { reference: o, popper: s }, attributes: {}, styles: {} }, c = [], f = !1, d = { state: u, setOptions: function(v) {
  35760. var g = typeof v == "function" ? v(u.options) : v;
  35761. p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: Ih(o) ? yg(o) : o.contextElement ? yg(o.contextElement) : [], popper: yg(s) };
  35762. var m = C2e(P2e([].concat(r, u.options.modifiers)));
  35763. return u.orderedModifiers = m.filter(function(y) {
  35764. return y.enabled;
  35765. }), h(), d.update();
  35766. }, forceUpdate: function() {
  35767. if (!f) {
  35768. var v = u.elements, g = v.reference, m = v.popper;
  35769. if (s6(g, m)) {
  35770. u.rects = { reference: x2e(g, P0(m), u.options.strategy === "fixed"), popper: KD(m) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(C) {
  35771. return u.modifiersData[C.name] = Object.assign({}, C.data);
  35772. });
  35773. for (var y = 0; y < u.orderedModifiers.length; y++) {
  35774. if (u.reset === !0) {
  35775. u.reset = !1, y = -1;
  35776. continue;
  35777. }
  35778. var b = u.orderedModifiers[y], _ = b.fn, O = b.options, S = O === void 0 ? {} : O, x = b.name;
  35779. typeof _ == "function" && (u = _({ state: u, options: S, name: x, instance: d }) || u);
  35780. }
  35781. }
  35782. }
  35783. }, update: T2e(function() {
  35784. return new Promise(function(v) {
  35785. d.forceUpdate(), v(u);
  35786. });
  35787. }), destroy: function() {
  35788. p(), f = !0;
  35789. } };
  35790. if (!s6(o, s)) return d;
  35791. d.setOptions(l).then(function(v) {
  35792. !f && l.onFirstUpdate && l.onFirstUpdate(v);
  35793. });
  35794. function h() {
  35795. u.orderedModifiers.forEach(function(v) {
  35796. var g = v.name, m = v.options, y = m === void 0 ? {} : m, b = v.effect;
  35797. if (typeof b == "function") {
  35798. var _ = b({ state: u, name: g, instance: d, options: y }), O = function() {
  35799. };
  35800. c.push(_ || O);
  35801. }
  35802. });
  35803. }
  35804. function p() {
  35805. c.forEach(function(v) {
  35806. return v();
  35807. }), c = [];
  35808. }
  35809. return d;
  35810. };
  35811. }
  35812. rR();
  35813. var $2e = [jY, XY, GY, VY];
  35814. rR({ defaultModifiers: $2e });
  35815. var A2e = [jY, XY, GY, VY, v2e, c2e, b2e, X$e, d2e], E2e = rR({ defaultModifiers: A2e });
  35816. const M2e = (t, e, n = {}) => {
  35817. const r = {
  35818. name: "updateState",
  35819. enabled: !0,
  35820. phase: "write",
  35821. fn: ({ state: l }) => {
  35822. const u = I2e(l);
  35823. Object.assign(o.value, u);
  35824. },
  35825. requires: ["computeStyles"]
  35826. }, i = L(() => {
  35827. const { onFirstUpdate: l, placement: u, strategy: c, modifiers: f } = B(n);
  35828. return {
  35829. onFirstUpdate: l,
  35830. placement: u || "bottom",
  35831. strategy: c || "absolute",
  35832. modifiers: [
  35833. ...f || [],
  35834. r,
  35835. { name: "applyStyles", enabled: !1 }
  35836. ]
  35837. };
  35838. }), a = ae(), o = U({
  35839. styles: {
  35840. popper: {
  35841. position: B(i).strategy,
  35842. left: "0",
  35843. top: "0"
  35844. },
  35845. arrow: {
  35846. position: "absolute"
  35847. }
  35848. },
  35849. attributes: {}
  35850. }), s = () => {
  35851. a.value && (a.value.destroy(), a.value = void 0);
  35852. };
  35853. return se(i, (l) => {
  35854. const u = B(a);
  35855. u && u.setOptions(l);
  35856. }, {
  35857. deep: !0
  35858. }), se([t, e], ([l, u]) => {
  35859. s(), !(!l || !u) && (a.value = E2e(l, u, B(i)));
  35860. }), yt(() => {
  35861. s();
  35862. }), {
  35863. state: L(() => {
  35864. var l;
  35865. return { ...((l = B(a)) == null ? void 0 : l.state) || {} };
  35866. }),
  35867. styles: L(() => B(o).styles),
  35868. attributes: L(() => B(o).attributes),
  35869. update: () => {
  35870. var l;
  35871. return (l = B(a)) == null ? void 0 : l.update();
  35872. },
  35873. forceUpdate: () => {
  35874. var l;
  35875. return (l = B(a)) == null ? void 0 : l.forceUpdate();
  35876. },
  35877. instanceRef: L(() => B(a))
  35878. };
  35879. };
  35880. function I2e(t) {
  35881. const e = Object.keys(t.elements), n = A1(e.map((i) => [i, t.styles[i] || {}])), r = A1(e.map((i) => [i, t.attributes[i]]));
  35882. return {
  35883. styles: n,
  35884. attributes: r
  35885. };
  35886. }
  35887. function l6() {
  35888. let t;
  35889. const e = (r, i) => {
  35890. n(), t = window.setTimeout(r, i);
  35891. }, n = () => window.clearTimeout(t);
  35892. return HD(() => n()), {
  35893. registerTimeout: e,
  35894. cancelTimeout: n
  35895. };
  35896. }
  35897. const nA = {
  35898. prefix: Math.floor(Math.random() * 1e4),
  35899. current: 0
  35900. }, D2e = Symbol("elIdInjection"), YY = () => vn() ? Ge(D2e, nA) : nA, iR = (t) => {
  35901. const e = YY();
  35902. !Yr && e === nA && Gi("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
  35903. usage: app.provide(ID_INJECTION_KEY, {
  35904. prefix: number,
  35905. current: number,
  35906. })`);
  35907. const n = UD();
  35908. return L(() => B(t) || `${n.value}-id-${e.prefix}-${e.current++}`);
  35909. };
  35910. let Pd = [];
  35911. const u6 = (t) => {
  35912. const e = t;
  35913. e.key === Xc.esc && Pd.forEach((n) => n(e));
  35914. }, R2e = (t) => {
  35915. it(() => {
  35916. Pd.length === 0 && document.addEventListener("keydown", u6), Yr && Pd.push(t);
  35917. }), yt(() => {
  35918. Pd = Pd.filter((e) => e !== t), Pd.length === 0 && Yr && document.removeEventListener("keydown", u6);
  35919. });
  35920. };
  35921. let c6;
  35922. const qY = () => {
  35923. const t = UD(), e = YY(), n = L(() => `${t.value}-popper-container-${e.prefix}`), r = L(() => `#${n.value}`);
  35924. return {
  35925. id: n,
  35926. selector: r
  35927. };
  35928. }, k2e = (t) => {
  35929. const e = document.createElement("div");
  35930. return e.id = t, document.body.appendChild(e), e;
  35931. }, L2e = () => {
  35932. const { id: t, selector: e } = qY();
  35933. return HG(() => {
  35934. Yr && (process.env.NODE_ENV === "test" || !c6 && !document.body.querySelector(e.value)) && (c6 = k2e(t.value));
  35935. }), {
  35936. id: t,
  35937. selector: e
  35938. };
  35939. }, N2e = rr({
  35940. showAfter: {
  35941. type: Number,
  35942. default: 0
  35943. },
  35944. hideAfter: {
  35945. type: Number,
  35946. default: 200
  35947. },
  35948. autoClose: {
  35949. type: Number,
  35950. default: 0
  35951. }
  35952. }), B2e = ({
  35953. showAfter: t,
  35954. hideAfter: e,
  35955. autoClose: n,
  35956. open: r,
  35957. close: i
  35958. }) => {
  35959. const { registerTimeout: a } = l6(), {
  35960. registerTimeout: o,
  35961. cancelTimeout: s
  35962. } = l6();
  35963. return {
  35964. onOpen: (c) => {
  35965. a(() => {
  35966. r(c);
  35967. const f = B(n);
  35968. Ws(f) && f > 0 && o(() => {
  35969. i(c);
  35970. }, f);
  35971. }, B(t));
  35972. },
  35973. onClose: (c) => {
  35974. s(), a(() => {
  35975. i(c);
  35976. }, B(e));
  35977. }
  35978. };
  35979. }, KY = Symbol("elForwardRef"), z2e = (t) => {
  35980. pt(KY, {
  35981. setForwardRef: (n) => {
  35982. t.value = n;
  35983. }
  35984. });
  35985. }, V2e = (t) => ({
  35986. mounted(e) {
  35987. t(e);
  35988. },
  35989. updated(e) {
  35990. t(e);
  35991. },
  35992. unmounted() {
  35993. t(null);
  35994. }
  35995. }), f6 = {
  35996. current: 0
  35997. }, d6 = U(0), F2e = 2e3, h6 = Symbol("elZIndexContextKey"), W2e = Symbol("zIndexContextKey"), Q2e = (t) => {
  35998. const e = vn() ? Ge(h6, f6) : f6, n = vn() ? Ge(W2e, void 0) : void 0, r = L(() => {
  35999. const o = B(n);
  36000. return Ws(o) ? o : F2e;
  36001. }), i = L(() => r.value + d6.value), a = () => (e.current++, d6.value = e.current, i.value);
  36002. return !Yr && !Ge(h6) && Gi("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
  36003. usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
  36004. initialZIndex: r,
  36005. currentZIndex: i,
  36006. nextZIndex: a
  36007. };
  36008. };
  36009. function H2e(t) {
  36010. const e = U();
  36011. function n() {
  36012. if (t.value == null)
  36013. return;
  36014. const { selectionStart: i, selectionEnd: a, value: o } = t.value;
  36015. if (i == null || a == null)
  36016. return;
  36017. const s = o.slice(0, Math.max(0, i)), l = o.slice(Math.max(0, a));
  36018. e.value = {
  36019. selectionStart: i,
  36020. selectionEnd: a,
  36021. value: o,
  36022. beforeTxt: s,
  36023. afterTxt: l
  36024. };
  36025. }
  36026. function r() {
  36027. if (t.value == null || e.value == null)
  36028. return;
  36029. const { value: i } = t.value, { beforeTxt: a, afterTxt: o, selectionStart: s } = e.value;
  36030. if (a == null || o == null || s == null)
  36031. return;
  36032. let l = i.length;
  36033. if (i.endsWith(o))
  36034. l = i.length - o.length;
  36035. else if (i.startsWith(a))
  36036. l = a.length;
  36037. else {
  36038. const u = a[s - 1], c = i.indexOf(u, s - 1);
  36039. c !== -1 && (l = c + 1);
  36040. }
  36041. t.value.setSelectionRange(l, l);
  36042. }
  36043. return [n, r];
  36044. }
  36045. const $0 = Tx({
  36046. type: String,
  36047. values: h$e,
  36048. required: !1
  36049. }), G2e = Symbol("size"), j2e = () => {
  36050. const t = Ge(G2e, {});
  36051. return L(() => B(t.size) || "");
  36052. };
  36053. function JY(t, { afterFocus: e, beforeBlur: n, afterBlur: r } = {}) {
  36054. const i = vn(), { emit: a } = i, o = ae(), s = U(!1), l = (f) => {
  36055. s.value || (s.value = !0, a("focus", f), e == null || e());
  36056. }, u = (f) => {
  36057. var d;
  36058. zv(n) && n(f) || f.relatedTarget && ((d = o.value) != null && d.contains(f.relatedTarget)) || (s.value = !1, a("blur", f), r == null || r());
  36059. }, c = () => {
  36060. var f;
  36061. (f = t.value) == null || f.focus();
  36062. };
  36063. return se(o, (f) => {
  36064. f && f.setAttribute("tabindex", "-1");
  36065. }), I_(o, "click", c), {
  36066. wrapperRef: o,
  36067. isFocused: s,
  36068. handleFocus: l,
  36069. handleBlur: u
  36070. };
  36071. }
  36072. const Z2e = rr({
  36073. ariaLabel: String,
  36074. ariaOrientation: {
  36075. type: String,
  36076. values: ["horizontal", "vertical", "undefined"]
  36077. },
  36078. ariaControls: String
  36079. }), A0 = (t) => am(Z2e, t), U2e = Symbol(), p6 = U();
  36080. function X2e(t, e = void 0) {
  36081. const n = vn() ? Ge(U2e, p6) : p6;
  36082. return L(() => {
  36083. var r, i;
  36084. return (i = (r = n.value) == null ? void 0 : r[t]) != null ? i : e;
  36085. });
  36086. }
  36087. var Qn = (t, e) => {
  36088. const n = t.__vccOpts || t;
  36089. for (const [r, i] of e)
  36090. n[r] = i;
  36091. return n;
  36092. };
  36093. const Y2e = rr({
  36094. size: {
  36095. type: jt([Number, String])
  36096. },
  36097. color: {
  36098. type: String
  36099. }
  36100. }), q2e = te({
  36101. name: "ElIcon",
  36102. inheritAttrs: !1
  36103. }), K2e = /* @__PURE__ */ te({
  36104. ...q2e,
  36105. props: Y2e,
  36106. setup(t) {
  36107. const e = t, n = Jn("icon"), r = L(() => {
  36108. const { size: i, color: a } = e;
  36109. return !i && !a ? {} : {
  36110. fontSize: XPe(i) ? void 0 : eA(i),
  36111. "--color": a
  36112. };
  36113. });
  36114. return (i, a) => (pe(), Qe("i", _n({
  36115. class: B(n).b(),
  36116. style: B(r)
  36117. }, i.$attrs), [
  36118. zn(i.$slots, "default")
  36119. ], 16));
  36120. }
  36121. });
  36122. var J2e = /* @__PURE__ */ Qn(K2e, [["__file", "icon.vue"]]);
  36123. const ws = Df(J2e), aR = Symbol("formContextKey"), j1 = Symbol("formItemContextKey"), $x = (t, e = {}) => {
  36124. const n = U(void 0), r = e.prop ? n : BY("size"), i = e.global ? n : j2e(), a = e.form ? { size: void 0 } : Ge(aR, void 0), o = e.formItem ? { size: void 0 } : Ge(j1, void 0);
  36125. return L(() => r.value || B(t) || (o == null ? void 0 : o.size) || (a == null ? void 0 : a.size) || i.value || "");
  36126. }, E0 = (t) => {
  36127. const e = BY("disabled"), n = Ge(aR, void 0);
  36128. return L(() => e.value || B(t) || (n == null ? void 0 : n.disabled) || !1);
  36129. }, Ax = () => {
  36130. const t = Ge(aR, void 0), e = Ge(j1, void 0);
  36131. return {
  36132. form: t,
  36133. formItem: e
  36134. };
  36135. }, oR = (t, {
  36136. formItemContext: e,
  36137. disableIdGeneration: n,
  36138. disableIdManagement: r
  36139. }) => {
  36140. n || (n = U(!1)), r || (r = U(!1));
  36141. const i = U();
  36142. let a;
  36143. const o = L(() => {
  36144. var s;
  36145. return !!(!(t.label || t.ariaLabel) && e && e.inputIds && ((s = e.inputIds) == null ? void 0 : s.length) <= 1);
  36146. });
  36147. return it(() => {
  36148. a = se([Nn(t, "id"), n], ([s, l]) => {
  36149. const u = s ?? (l ? void 0 : iR().value);
  36150. u !== i.value && (e != null && e.removeInputId && (i.value && e.removeInputId(i.value), !(r != null && r.value) && !l && u && e.addInputId(u)), i.value = u);
  36151. }, { immediate: !0 });
  36152. }), nl(() => {
  36153. a && a(), e != null && e.removeInputId && i.value && e.removeInputId(i.value);
  36154. }), {
  36155. isLabeledByFormItem: o,
  36156. inputId: i
  36157. };
  36158. };
  36159. let Fa;
  36160. const eAe = `
  36161. height:0 !important;
  36162. visibility:hidden !important;
  36163. ${jPe() ? "" : "overflow:hidden !important;"}
  36164. position:absolute !important;
  36165. z-index:-1000 !important;
  36166. top:0 !important;
  36167. right:0 !important;
  36168. `, tAe = [
  36169. "letter-spacing",
  36170. "line-height",
  36171. "padding-top",
  36172. "padding-bottom",
  36173. "font-family",
  36174. "font-weight",
  36175. "font-size",
  36176. "text-rendering",
  36177. "text-transform",
  36178. "width",
  36179. "text-indent",
  36180. "padding-left",
  36181. "padding-right",
  36182. "border-width",
  36183. "box-sizing"
  36184. ];
  36185. function nAe(t) {
  36186. const e = window.getComputedStyle(t), n = e.getPropertyValue("box-sizing"), r = Number.parseFloat(e.getPropertyValue("padding-bottom")) + Number.parseFloat(e.getPropertyValue("padding-top")), i = Number.parseFloat(e.getPropertyValue("border-bottom-width")) + Number.parseFloat(e.getPropertyValue("border-top-width"));
  36187. return { contextStyle: tAe.map((o) => `${o}:${e.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: i, boxSizing: n };
  36188. }
  36189. function v6(t, e = 1, n) {
  36190. var r;
  36191. Fa || (Fa = document.createElement("textarea"), document.body.appendChild(Fa));
  36192. const { paddingSize: i, borderSize: a, boxSizing: o, contextStyle: s } = nAe(t);
  36193. Fa.setAttribute("style", `${s};${eAe}`), Fa.value = t.value || t.placeholder || "";
  36194. let l = Fa.scrollHeight;
  36195. const u = {};
  36196. o === "border-box" ? l = l + a : o === "content-box" && (l = l - i), Fa.value = "";
  36197. const c = Fa.scrollHeight - i;
  36198. if (Ws(e)) {
  36199. let f = c * e;
  36200. o === "border-box" && (f = f + i + a), l = Math.max(f, l), u.minHeight = `${f}px`;
  36201. }
  36202. if (Ws(n)) {
  36203. let f = c * n;
  36204. o === "border-box" && (f = f + i + a), l = Math.min(f, l);
  36205. }
  36206. return u.height = `${l}px`, (r = Fa.parentNode) == null || r.removeChild(Fa), Fa = void 0, u;
  36207. }
  36208. const rAe = rr({
  36209. id: {
  36210. type: String,
  36211. default: void 0
  36212. },
  36213. size: $0,
  36214. disabled: Boolean,
  36215. modelValue: {
  36216. type: jt([
  36217. String,
  36218. Number,
  36219. Object
  36220. ]),
  36221. default: ""
  36222. },
  36223. maxlength: {
  36224. type: [String, Number]
  36225. },
  36226. minlength: {
  36227. type: [String, Number]
  36228. },
  36229. type: {
  36230. type: String,
  36231. default: "text"
  36232. },
  36233. resize: {
  36234. type: String,
  36235. values: ["none", "both", "horizontal", "vertical"]
  36236. },
  36237. autosize: {
  36238. type: jt([Boolean, Object]),
  36239. default: !1
  36240. },
  36241. autocomplete: {
  36242. type: String,
  36243. default: "off"
  36244. },
  36245. formatter: {
  36246. type: Function
  36247. },
  36248. parser: {
  36249. type: Function
  36250. },
  36251. placeholder: {
  36252. type: String
  36253. },
  36254. form: {
  36255. type: String
  36256. },
  36257. readonly: {
  36258. type: Boolean,
  36259. default: !1
  36260. },
  36261. clearable: {
  36262. type: Boolean,
  36263. default: !1
  36264. },
  36265. showPassword: {
  36266. type: Boolean,
  36267. default: !1
  36268. },
  36269. showWordLimit: {
  36270. type: Boolean,
  36271. default: !1
  36272. },
  36273. suffixIcon: {
  36274. type: H1
  36275. },
  36276. prefixIcon: {
  36277. type: H1
  36278. },
  36279. containerRole: {
  36280. type: String,
  36281. default: void 0
  36282. },
  36283. label: {
  36284. type: String,
  36285. default: void 0
  36286. },
  36287. tabindex: {
  36288. type: [String, Number],
  36289. default: 0
  36290. },
  36291. validateEvent: {
  36292. type: Boolean,
  36293. default: !0
  36294. },
  36295. inputStyle: {
  36296. type: jt([Object, Array, String]),
  36297. default: () => v$e({})
  36298. },
  36299. autofocus: {
  36300. type: Boolean,
  36301. default: !1
  36302. },
  36303. ...A0(["ariaLabel"])
  36304. }), iAe = {
  36305. [Qs]: (t) => ba(t),
  36306. input: (t) => ba(t),
  36307. change: (t) => ba(t),
  36308. focus: (t) => t instanceof FocusEvent,
  36309. blur: (t) => t instanceof FocusEvent,
  36310. clear: () => !0,
  36311. mouseleave: (t) => t instanceof MouseEvent,
  36312. mouseenter: (t) => t instanceof MouseEvent,
  36313. keydown: (t) => t instanceof Event,
  36314. compositionstart: (t) => t instanceof CompositionEvent,
  36315. compositionupdate: (t) => t instanceof CompositionEvent,
  36316. compositionend: (t) => t instanceof CompositionEvent
  36317. }, aAe = ["role"], oAe = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"], sAe = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"], lAe = te({
  36318. name: "ElInput",
  36319. inheritAttrs: !1
  36320. }), uAe = /* @__PURE__ */ te({
  36321. ...lAe,
  36322. props: rAe,
  36323. emits: iAe,
  36324. setup(t, { expose: e, emit: n }) {
  36325. const r = t, i = Qle(), a = ZG(), o = L(() => {
  36326. const ve = {};
  36327. return r.containerRole === "combobox" && (ve["aria-haspopup"] = i["aria-haspopup"], ve["aria-owns"] = i["aria-owns"], ve["aria-expanded"] = i["aria-expanded"]), ve;
  36328. }), s = L(() => [
  36329. r.type === "textarea" ? g.b() : v.b(),
  36330. v.m(h.value),
  36331. v.is("disabled", p.value),
  36332. v.is("exceed", ne.value),
  36333. {
  36334. [v.b("group")]: a.prepend || a.append,
  36335. [v.m("prefix")]: a.prefix || r.prefixIcon,
  36336. [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
  36337. [v.bm("suffix", "password-clear")]: W.value && F.value,
  36338. [v.b("hidden")]: r.type === "hidden"
  36339. },
  36340. i.class
  36341. ]), l = L(() => [
  36342. v.e("wrapper"),
  36343. v.is("focus", w.value)
  36344. ]), u = y$e({
  36345. excludeKeys: L(() => Object.keys(o.value))
  36346. }), { form: c, formItem: f } = Ax(), { inputId: d } = oR(r, {
  36347. formItemContext: f
  36348. }), h = $x(), p = E0(), v = Jn("input"), g = Jn("textarea"), m = ae(), y = ae(), b = U(!1), _ = U(!1), O = U(!1), S = U(), x = ae(r.inputStyle), C = L(() => m.value || y.value), { wrapperRef: T, isFocused: w, handleFocus: P, handleBlur: $ } = JY(C, {
  36349. afterBlur() {
  36350. var ve;
  36351. r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "blur").catch((Xe) => Gi(Xe)));
  36352. }
  36353. }), A = L(() => {
  36354. var ve;
  36355. return (ve = c == null ? void 0 : c.statusIcon) != null ? ve : !1;
  36356. }), D = L(() => (f == null ? void 0 : f.validateState) || ""), E = L(() => D.value && d$e[D.value]), R = L(() => O.value ? c$e : s$e), N = L(() => [
  36357. i.style
  36358. ]), V = L(() => [
  36359. r.inputStyle,
  36360. x.value,
  36361. { resize: r.resize }
  36362. ]), z = L(() => Gl(r.modelValue) ? "" : String(r.modelValue)), W = L(() => r.clearable && !p.value && !r.readonly && !!z.value && (w.value || b.value)), F = L(() => r.showPassword && !p.value && !r.readonly && !!z.value && (!!z.value || w.value)), Q = L(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), Z = L(() => z.value.length), ne = L(() => !!Q.value && Z.value > Number(r.maxlength)), ee = L(() => !!a.suffix || !!r.suffixIcon || W.value || r.showPassword || Q.value || !!D.value && A.value), [oe, K] = H2e(m);
  36363. VPe(y, (ve) => {
  36364. if (H(), !Q.value || r.resize !== "both")
  36365. return;
  36366. const Xe = ve[0], { width: Rt } = Xe.contentRect;
  36367. S.value = {
  36368. right: `calc(100% - ${Rt + 15 + 6}px)`
  36369. };
  36370. });
  36371. const ie = () => {
  36372. const { type: ve, autosize: Xe } = r;
  36373. if (!(!Yr || ve !== "textarea" || !y.value))
  36374. if (Xe) {
  36375. const Rt = um(Xe) ? Xe.minRows : void 0, An = um(Xe) ? Xe.maxRows : void 0, sn = v6(y.value, Rt, An);
  36376. x.value = {
  36377. overflowY: "hidden",
  36378. ...sn
  36379. }, Tt(() => {
  36380. y.value.offsetHeight, x.value = sn;
  36381. });
  36382. } else
  36383. x.value = {
  36384. minHeight: v6(y.value).minHeight
  36385. };
  36386. }, H = ((ve) => {
  36387. let Xe = !1;
  36388. return () => {
  36389. var Rt;
  36390. if (Xe || !r.autosize)
  36391. return;
  36392. ((Rt = y.value) == null ? void 0 : Rt.offsetParent) === null || (ve(), Xe = !0);
  36393. };
  36394. })(ie), G = () => {
  36395. const ve = C.value, Xe = r.formatter ? r.formatter(z.value) : z.value;
  36396. !ve || ve.value === Xe || (ve.value = Xe);
  36397. }, re = async (ve) => {
  36398. oe();
  36399. let { value: Xe } = ve.target;
  36400. if (r.formatter && (Xe = r.parser ? r.parser(Xe) : Xe), !_.value) {
  36401. if (Xe === z.value) {
  36402. G();
  36403. return;
  36404. }
  36405. n(Qs, Xe), n("input", Xe), await Tt(), G(), K();
  36406. }
  36407. }, fe = (ve) => {
  36408. n("change", ve.target.value);
  36409. }, de = (ve) => {
  36410. n("compositionstart", ve), _.value = !0;
  36411. }, Ee = (ve) => {
  36412. var Xe;
  36413. n("compositionupdate", ve);
  36414. const Rt = (Xe = ve.target) == null ? void 0 : Xe.value, An = Rt[Rt.length - 1] || "";
  36415. _.value = !p$e(An);
  36416. }, $e = (ve) => {
  36417. n("compositionend", ve), _.value && (_.value = !1, re(ve));
  36418. }, Se = () => {
  36419. O.value = !O.value, be();
  36420. }, be = async () => {
  36421. var ve;
  36422. await Tt(), (ve = C.value) == null || ve.focus();
  36423. }, he = () => {
  36424. var ve;
  36425. return (ve = C.value) == null ? void 0 : ve.blur();
  36426. }, Te = (ve) => {
  36427. b.value = !1, n("mouseleave", ve);
  36428. }, ze = (ve) => {
  36429. b.value = !0, n("mouseenter", ve);
  36430. }, ut = (ve) => {
  36431. n("keydown", ve);
  36432. }, ct = () => {
  36433. var ve;
  36434. (ve = C.value) == null || ve.select();
  36435. }, Dt = () => {
  36436. n(Qs, ""), n("change", ""), n("clear"), n("input", "");
  36437. };
  36438. return se(() => r.modelValue, () => {
  36439. var ve;
  36440. Tt(() => ie()), r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "change").catch((Xe) => Gi(Xe)));
  36441. }), se(z, () => G()), se(() => r.type, async () => {
  36442. await Tt(), G(), ie();
  36443. }), it(() => {
  36444. !r.formatter && r.parser && Gi("ElInput", "If you set the parser, you also need to set the formatter."), G(), Tt(ie);
  36445. }), C0({
  36446. from: "label",
  36447. replacement: "aria-label",
  36448. version: "2.8.0",
  36449. scope: "el-input",
  36450. ref: "https://element-plus.org/en-US/component/input.html"
  36451. }, L(() => !!r.label)), e({
  36452. input: m,
  36453. textarea: y,
  36454. ref: C,
  36455. textareaStyle: V,
  36456. autosize: Nn(r, "autosize"),
  36457. focus: be,
  36458. blur: he,
  36459. select: ct,
  36460. clear: Dt,
  36461. resizeTextarea: ie
  36462. }), (ve, Xe) => (pe(), Qe("div", _n(B(o), {
  36463. class: [
  36464. B(s),
  36465. {
  36466. [B(v).bm("group", "append")]: ve.$slots.append,
  36467. [B(v).bm("group", "prepend")]: ve.$slots.prepend
  36468. }
  36469. ],
  36470. style: B(N),
  36471. role: ve.containerRole,
  36472. onMouseenter: ze,
  36473. onMouseleave: Te
  36474. }), [
  36475. _t(" input "),
  36476. ve.type !== "textarea" ? (pe(), Qe(wt, { key: 0 }, [
  36477. _t(" prepend slot "),
  36478. ve.$slots.prepend ? (pe(), Qe("div", {
  36479. key: 0,
  36480. class: Ye(B(v).be("group", "prepend"))
  36481. }, [
  36482. zn(ve.$slots, "prepend")
  36483. ], 2)) : _t("v-if", !0),
  36484. He("div", {
  36485. ref_key: "wrapperRef",
  36486. ref: T,
  36487. class: Ye(B(l))
  36488. }, [
  36489. _t(" prefix slot "),
  36490. ve.$slots.prefix || ve.prefixIcon ? (pe(), Qe("span", {
  36491. key: 0,
  36492. class: Ye(B(v).e("prefix"))
  36493. }, [
  36494. He("span", {
  36495. class: Ye(B(v).e("prefix-inner"))
  36496. }, [
  36497. zn(ve.$slots, "prefix"),
  36498. ve.prefixIcon ? (pe(), je(B(ws), {
  36499. key: 0,
  36500. class: Ye(B(v).e("icon"))
  36501. }, {
  36502. default: we(() => [
  36503. (pe(), je(Ec(ve.prefixIcon)))
  36504. ]),
  36505. _: 1
  36506. }, 8, ["class"])) : _t("v-if", !0)
  36507. ], 2)
  36508. ], 2)) : _t("v-if", !0),
  36509. He("input", _n({
  36510. id: B(d),
  36511. ref_key: "input",
  36512. ref: m,
  36513. class: B(v).e("inner")
  36514. }, B(u), {
  36515. minlength: ve.minlength,
  36516. maxlength: ve.maxlength,
  36517. type: ve.showPassword ? O.value ? "text" : "password" : ve.type,
  36518. disabled: B(p),
  36519. readonly: ve.readonly,
  36520. autocomplete: ve.autocomplete,
  36521. tabindex: ve.tabindex,
  36522. "aria-label": ve.label || ve.ariaLabel,
  36523. placeholder: ve.placeholder,
  36524. style: ve.inputStyle,
  36525. form: ve.form,
  36526. autofocus: ve.autofocus,
  36527. onCompositionstart: de,
  36528. onCompositionupdate: Ee,
  36529. onCompositionend: $e,
  36530. onInput: re,
  36531. onFocus: Xe[0] || (Xe[0] = (...Rt) => B(P) && B(P)(...Rt)),
  36532. onBlur: Xe[1] || (Xe[1] = (...Rt) => B($) && B($)(...Rt)),
  36533. onChange: fe,
  36534. onKeydown: ut
  36535. }), null, 16, oAe),
  36536. _t(" suffix slot "),
  36537. B(ee) ? (pe(), Qe("span", {
  36538. key: 1,
  36539. class: Ye(B(v).e("suffix"))
  36540. }, [
  36541. He("span", {
  36542. class: Ye(B(v).e("suffix-inner"))
  36543. }, [
  36544. !B(W) || !B(F) || !B(Q) ? (pe(), Qe(wt, { key: 0 }, [
  36545. zn(ve.$slots, "suffix"),
  36546. ve.suffixIcon ? (pe(), je(B(ws), {
  36547. key: 0,
  36548. class: Ye(B(v).e("icon"))
  36549. }, {
  36550. default: we(() => [
  36551. (pe(), je(Ec(ve.suffixIcon)))
  36552. ]),
  36553. _: 1
  36554. }, 8, ["class"])) : _t("v-if", !0)
  36555. ], 64)) : _t("v-if", !0),
  36556. B(W) ? (pe(), je(B(ws), {
  36557. key: 1,
  36558. class: Ye([B(v).e("icon"), B(v).e("clear")]),
  36559. onMousedown: lf(B(lm), ["prevent"]),
  36560. onClick: Dt
  36561. }, {
  36562. default: we(() => [
  36563. M(B(DY))
  36564. ]),
  36565. _: 1
  36566. }, 8, ["class", "onMousedown"])) : _t("v-if", !0),
  36567. B(F) ? (pe(), je(B(ws), {
  36568. key: 2,
  36569. class: Ye([B(v).e("icon"), B(v).e("password")]),
  36570. onClick: Se
  36571. }, {
  36572. default: we(() => [
  36573. (pe(), je(Ec(B(R))))
  36574. ]),
  36575. _: 1
  36576. }, 8, ["class"])) : _t("v-if", !0),
  36577. B(Q) ? (pe(), Qe("span", {
  36578. key: 3,
  36579. class: Ye(B(v).e("count"))
  36580. }, [
  36581. He("span", {
  36582. class: Ye(B(v).e("count-inner"))
  36583. }, Bi(B(Z)) + " / " + Bi(ve.maxlength), 3)
  36584. ], 2)) : _t("v-if", !0),
  36585. B(D) && B(E) && B(A) ? (pe(), je(B(ws), {
  36586. key: 4,
  36587. class: Ye([
  36588. B(v).e("icon"),
  36589. B(v).e("validateIcon"),
  36590. B(v).is("loading", B(D) === "validating")
  36591. ])
  36592. }, {
  36593. default: we(() => [
  36594. (pe(), je(Ec(B(E))))
  36595. ]),
  36596. _: 1
  36597. }, 8, ["class"])) : _t("v-if", !0)
  36598. ], 2)
  36599. ], 2)) : _t("v-if", !0)
  36600. ], 2),
  36601. _t(" append slot "),
  36602. ve.$slots.append ? (pe(), Qe("div", {
  36603. key: 1,
  36604. class: Ye(B(v).be("group", "append"))
  36605. }, [
  36606. zn(ve.$slots, "append")
  36607. ], 2)) : _t("v-if", !0)
  36608. ], 64)) : (pe(), Qe(wt, { key: 1 }, [
  36609. _t(" textarea "),
  36610. He("textarea", _n({
  36611. id: B(d),
  36612. ref_key: "textarea",
  36613. ref: y,
  36614. class: [B(g).e("inner"), B(v).is("focus", B(w))]
  36615. }, B(u), {
  36616. minlength: ve.minlength,
  36617. maxlength: ve.maxlength,
  36618. tabindex: ve.tabindex,
  36619. disabled: B(p),
  36620. readonly: ve.readonly,
  36621. autocomplete: ve.autocomplete,
  36622. style: B(V),
  36623. "aria-label": ve.label || ve.ariaLabel,
  36624. placeholder: ve.placeholder,
  36625. form: ve.form,
  36626. autofocus: ve.autofocus,
  36627. onCompositionstart: de,
  36628. onCompositionupdate: Ee,
  36629. onCompositionend: $e,
  36630. onInput: re,
  36631. onFocus: Xe[2] || (Xe[2] = (...Rt) => B(P) && B(P)(...Rt)),
  36632. onBlur: Xe[3] || (Xe[3] = (...Rt) => B($) && B($)(...Rt)),
  36633. onChange: fe,
  36634. onKeydown: ut
  36635. }), null, 16, sAe),
  36636. B(Q) ? (pe(), Qe("span", {
  36637. key: 0,
  36638. style: Sr(S.value),
  36639. class: Ye(B(v).e("count"))
  36640. }, Bi(B(Z)) + " / " + Bi(ve.maxlength), 7)) : _t("v-if", !0)
  36641. ], 64))
  36642. ], 16, aAe));
  36643. }
  36644. });
  36645. var cAe = /* @__PURE__ */ Qn(uAe, [["__file", "input.vue"]]);
  36646. const sR = Df(cAe), lR = Symbol("popper"), eq = Symbol("popperContent"), fAe = [
  36647. "dialog",
  36648. "grid",
  36649. "group",
  36650. "listbox",
  36651. "menu",
  36652. "navigation",
  36653. "tooltip",
  36654. "tree"
  36655. ], tq = rr({
  36656. role: {
  36657. type: String,
  36658. values: fAe,
  36659. default: "tooltip"
  36660. }
  36661. }), dAe = te({
  36662. name: "ElPopper",
  36663. inheritAttrs: !1
  36664. }), hAe = /* @__PURE__ */ te({
  36665. ...dAe,
  36666. props: tq,
  36667. setup(t, { expose: e }) {
  36668. const n = t, r = U(), i = U(), a = U(), o = U(), s = L(() => n.role), l = {
  36669. triggerRef: r,
  36670. popperInstanceRef: i,
  36671. contentRef: a,
  36672. referenceRef: o,
  36673. role: s
  36674. };
  36675. return e(l), pt(lR, l), (u, c) => zn(u.$slots, "default");
  36676. }
  36677. });
  36678. var pAe = /* @__PURE__ */ Qn(hAe, [["__file", "popper.vue"]]);
  36679. const nq = rr({
  36680. arrowOffset: {
  36681. type: Number,
  36682. default: 5
  36683. }
  36684. }), vAe = te({
  36685. name: "ElPopperArrow",
  36686. inheritAttrs: !1
  36687. }), gAe = /* @__PURE__ */ te({
  36688. ...vAe,
  36689. props: nq,
  36690. setup(t, { expose: e }) {
  36691. const n = t, r = Jn("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: o } = Ge(eq, void 0);
  36692. return se(() => n.arrowOffset, (s) => {
  36693. i.value = s;
  36694. }), yt(() => {
  36695. a.value = void 0;
  36696. }), e({
  36697. arrowRef: a
  36698. }), (s, l) => (pe(), Qe("span", {
  36699. ref_key: "arrowRef",
  36700. ref: a,
  36701. class: Ye(B(r).e("arrow")),
  36702. style: Sr(B(o)),
  36703. "data-popper-arrow": ""
  36704. }, null, 6));
  36705. }
  36706. });
  36707. var mAe = /* @__PURE__ */ Qn(gAe, [["__file", "arrow.vue"]]);
  36708. const LC = "ElOnlyChild", yAe = te({
  36709. name: LC,
  36710. setup(t, {
  36711. slots: e,
  36712. attrs: n
  36713. }) {
  36714. var r;
  36715. const i = Ge(KY), a = V2e((r = i == null ? void 0 : i.setForwardRef) != null ? r : lm);
  36716. return () => {
  36717. var o;
  36718. const s = (o = e.default) == null ? void 0 : o.call(e, n);
  36719. if (!s)
  36720. return null;
  36721. if (s.length > 1)
  36722. return Gi(LC, "requires exact only one valid child."), null;
  36723. const l = rq(s);
  36724. return l ? bi(Ns(l, n), [[a]]) : (Gi(LC, "no valid child node found"), null);
  36725. };
  36726. }
  36727. });
  36728. function rq(t) {
  36729. if (!t)
  36730. return null;
  36731. const e = t;
  36732. for (const n of e) {
  36733. if (um(n))
  36734. switch (n.type) {
  36735. case QG:
  36736. continue;
  36737. case TS:
  36738. case "svg":
  36739. return g6(n);
  36740. case wt:
  36741. return rq(n.children);
  36742. default:
  36743. return n;
  36744. }
  36745. return g6(n);
  36746. }
  36747. return null;
  36748. }
  36749. function g6(t) {
  36750. const e = Jn("only-child");
  36751. return M("span", {
  36752. class: e.e("content")
  36753. }, [t]);
  36754. }
  36755. const iq = rr({
  36756. virtualRef: {
  36757. type: jt(Object)
  36758. },
  36759. virtualTriggering: Boolean,
  36760. onMouseenter: {
  36761. type: jt(Function)
  36762. },
  36763. onMouseleave: {
  36764. type: jt(Function)
  36765. },
  36766. onClick: {
  36767. type: jt(Function)
  36768. },
  36769. onKeydown: {
  36770. type: jt(Function)
  36771. },
  36772. onFocus: {
  36773. type: jt(Function)
  36774. },
  36775. onBlur: {
  36776. type: jt(Function)
  36777. },
  36778. onContextmenu: {
  36779. type: jt(Function)
  36780. },
  36781. id: String,
  36782. open: Boolean
  36783. }), bAe = te({
  36784. name: "ElPopperTrigger",
  36785. inheritAttrs: !1
  36786. }), _Ae = /* @__PURE__ */ te({
  36787. ...bAe,
  36788. props: iq,
  36789. setup(t, { expose: e }) {
  36790. const n = t, { role: r, triggerRef: i } = Ge(lR, void 0);
  36791. z2e(i);
  36792. const a = L(() => s.value ? n.id : void 0), o = L(() => {
  36793. if (r && r.value === "tooltip")
  36794. return n.open && n.id ? n.id : void 0;
  36795. }), s = L(() => {
  36796. if (r && r.value !== "tooltip")
  36797. return r.value;
  36798. }), l = L(() => s.value ? `${n.open}` : void 0);
  36799. let u;
  36800. return it(() => {
  36801. se(() => n.virtualRef, (c) => {
  36802. c && (i.value = Rl(c));
  36803. }, {
  36804. immediate: !0
  36805. }), se(i, (c, f) => {
  36806. u == null || u(), u = void 0, cm(c) && ([
  36807. "onMouseenter",
  36808. "onMouseleave",
  36809. "onClick",
  36810. "onKeydown",
  36811. "onFocus",
  36812. "onBlur",
  36813. "onContextmenu"
  36814. ].forEach((d) => {
  36815. var h;
  36816. const p = n[d];
  36817. p && (c.addEventListener(d.slice(2).toLowerCase(), p), (h = f == null ? void 0 : f.removeEventListener) == null || h.call(f, d.slice(2).toLowerCase(), p));
  36818. }), u = se([a, o, s, l], (d) => {
  36819. [
  36820. "aria-controls",
  36821. "aria-describedby",
  36822. "aria-haspopup",
  36823. "aria-expanded"
  36824. ].forEach((h, p) => {
  36825. Gl(d[p]) ? c.removeAttribute(h) : c.setAttribute(h, d[p]);
  36826. });
  36827. }, { immediate: !0 })), cm(f) && [
  36828. "aria-controls",
  36829. "aria-describedby",
  36830. "aria-haspopup",
  36831. "aria-expanded"
  36832. ].forEach((d) => f.removeAttribute(d));
  36833. }, {
  36834. immediate: !0
  36835. });
  36836. }), yt(() => {
  36837. u == null || u(), u = void 0;
  36838. }), e({
  36839. triggerRef: i
  36840. }), (c, f) => c.virtualTriggering ? _t("v-if", !0) : (pe(), je(B(yAe), _n({ key: 0 }, c.$attrs, {
  36841. "aria-controls": B(a),
  36842. "aria-describedby": B(o),
  36843. "aria-expanded": B(l),
  36844. "aria-haspopup": B(s)
  36845. }), {
  36846. default: we(() => [
  36847. zn(c.$slots, "default")
  36848. ]),
  36849. _: 3
  36850. }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
  36851. }
  36852. });
  36853. var OAe = /* @__PURE__ */ Qn(_Ae, [["__file", "trigger.vue"]]);
  36854. const NC = "focus-trap.focus-after-trapped", BC = "focus-trap.focus-after-released", SAe = "focus-trap.focusout-prevented", m6 = {
  36855. cancelable: !0,
  36856. bubbles: !1
  36857. }, xAe = {
  36858. cancelable: !0,
  36859. bubbles: !1
  36860. }, y6 = "focusAfterTrapped", b6 = "focusAfterReleased", wAe = Symbol("elFocusTrap"), uR = U(), Ex = U(0), cR = U(0);
  36861. let Ly = 0;
  36862. const aq = (t) => {
  36863. const e = [], n = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
  36864. acceptNode: (r) => {
  36865. const i = r.tagName === "INPUT" && r.type === "hidden";
  36866. return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
  36867. }
  36868. });
  36869. for (; n.nextNode(); )
  36870. e.push(n.currentNode);
  36871. return e;
  36872. }, _6 = (t, e) => {
  36873. for (const n of t)
  36874. if (!CAe(n, e))
  36875. return n;
  36876. }, CAe = (t, e) => {
  36877. if (process.env.NODE_ENV === "test")
  36878. return !1;
  36879. if (getComputedStyle(t).visibility === "hidden")
  36880. return !0;
  36881. for (; t; ) {
  36882. if (e && t === e)
  36883. return !1;
  36884. if (getComputedStyle(t).display === "none")
  36885. return !0;
  36886. t = t.parentElement;
  36887. }
  36888. return !1;
  36889. }, TAe = (t) => {
  36890. const e = aq(t), n = _6(e, t), r = _6(e.reverse(), t);
  36891. return [n, r];
  36892. }, PAe = (t) => t instanceof HTMLInputElement && "select" in t, _l = (t, e) => {
  36893. if (t && t.focus) {
  36894. const n = document.activeElement;
  36895. t.focus({ preventScroll: !0 }), cR.value = window.performance.now(), t !== n && PAe(t) && e && t.select();
  36896. }
  36897. };
  36898. function O6(t, e) {
  36899. const n = [...t], r = t.indexOf(e);
  36900. return r !== -1 && n.splice(r, 1), n;
  36901. }
  36902. const $Ae = () => {
  36903. let t = [];
  36904. return {
  36905. push: (r) => {
  36906. const i = t[0];
  36907. i && r !== i && i.pause(), t = O6(t, r), t.unshift(r);
  36908. },
  36909. remove: (r) => {
  36910. var i, a;
  36911. t = O6(t, r), (a = (i = t[0]) == null ? void 0 : i.resume) == null || a.call(i);
  36912. }
  36913. };
  36914. }, AAe = (t, e = !1) => {
  36915. const n = document.activeElement;
  36916. for (const r of t)
  36917. if (_l(r, e), document.activeElement !== n)
  36918. return;
  36919. }, S6 = $Ae(), EAe = () => Ex.value > cR.value, Ny = () => {
  36920. uR.value = "pointer", Ex.value = window.performance.now();
  36921. }, x6 = () => {
  36922. uR.value = "keyboard", Ex.value = window.performance.now();
  36923. }, MAe = () => (it(() => {
  36924. Ly === 0 && (document.addEventListener("mousedown", Ny), document.addEventListener("touchstart", Ny), document.addEventListener("keydown", x6)), Ly++;
  36925. }), yt(() => {
  36926. Ly--, Ly <= 0 && (document.removeEventListener("mousedown", Ny), document.removeEventListener("touchstart", Ny), document.removeEventListener("keydown", x6));
  36927. }), {
  36928. focusReason: uR,
  36929. lastUserFocusTimestamp: Ex,
  36930. lastAutomatedFocusTimestamp: cR
  36931. }), By = (t) => new CustomEvent(SAe, {
  36932. ...xAe,
  36933. detail: t
  36934. }), IAe = te({
  36935. name: "ElFocusTrap",
  36936. inheritAttrs: !1,
  36937. props: {
  36938. loop: Boolean,
  36939. trapped: Boolean,
  36940. focusTrapEl: Object,
  36941. focusStartEl: {
  36942. type: [Object, String],
  36943. default: "first"
  36944. }
  36945. },
  36946. emits: [
  36947. y6,
  36948. b6,
  36949. "focusin",
  36950. "focusout",
  36951. "focusout-prevented",
  36952. "release-requested"
  36953. ],
  36954. setup(t, { emit: e }) {
  36955. const n = U();
  36956. let r, i;
  36957. const { focusReason: a } = MAe();
  36958. R2e((p) => {
  36959. t.trapped && !o.paused && e("release-requested", p);
  36960. });
  36961. const o = {
  36962. paused: !1,
  36963. pause() {
  36964. this.paused = !0;
  36965. },
  36966. resume() {
  36967. this.paused = !1;
  36968. }
  36969. }, s = (p) => {
  36970. if (!t.loop && !t.trapped || o.paused)
  36971. return;
  36972. const { key: v, altKey: g, ctrlKey: m, metaKey: y, currentTarget: b, shiftKey: _ } = p, { loop: O } = t, S = v === Xc.tab && !g && !m && !y, x = document.activeElement;
  36973. if (S && x) {
  36974. const C = b, [T, w] = TAe(C);
  36975. if (T && w) {
  36976. if (!_ && x === w) {
  36977. const $ = By({
  36978. focusReason: a.value
  36979. });
  36980. e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(T, !0));
  36981. } else if (_ && [T, C].includes(x)) {
  36982. const $ = By({
  36983. focusReason: a.value
  36984. });
  36985. e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(w, !0));
  36986. }
  36987. } else if (x === C) {
  36988. const $ = By({
  36989. focusReason: a.value
  36990. });
  36991. e("focusout-prevented", $), $.defaultPrevented || p.preventDefault();
  36992. }
  36993. }
  36994. };
  36995. pt(wAe, {
  36996. focusTrapRef: n,
  36997. onKeydown: s
  36998. }), se(() => t.focusTrapEl, (p) => {
  36999. p && (n.value = p);
  37000. }, { immediate: !0 }), se([n], ([p], [v]) => {
  37001. p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", f)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", f));
  37002. });
  37003. const l = (p) => {
  37004. e(y6, p);
  37005. }, u = (p) => e(b6, p), c = (p) => {
  37006. const v = B(n);
  37007. if (!v)
  37008. return;
  37009. const g = p.target, m = p.relatedTarget, y = g && v.contains(g);
  37010. t.trapped || m && v.contains(m) || (r = m), y && e("focusin", p), !o.paused && t.trapped && (y ? i = g : _l(i, !0));
  37011. }, f = (p) => {
  37012. const v = B(n);
  37013. if (!(o.paused || !v))
  37014. if (t.trapped) {
  37015. const g = p.relatedTarget;
  37016. !Gl(g) && !v.contains(g) && setTimeout(() => {
  37017. if (!o.paused && t.trapped) {
  37018. const m = By({
  37019. focusReason: a.value
  37020. });
  37021. e("focusout-prevented", m), m.defaultPrevented || _l(i, !0);
  37022. }
  37023. }, 0);
  37024. } else {
  37025. const g = p.target;
  37026. g && v.contains(g) || e("focusout", p);
  37027. }
  37028. };
  37029. async function d() {
  37030. await Tt();
  37031. const p = B(n);
  37032. if (p) {
  37033. S6.push(o);
  37034. const v = p.contains(document.activeElement) ? r : document.activeElement;
  37035. if (r = v, !p.contains(v)) {
  37036. const m = new Event(NC, m6);
  37037. p.addEventListener(NC, l), p.dispatchEvent(m), m.defaultPrevented || Tt(() => {
  37038. let y = t.focusStartEl;
  37039. ba(y) || (_l(y), document.activeElement !== y && (y = "first")), y === "first" && AAe(aq(p), !0), (document.activeElement === v || y === "container") && _l(p);
  37040. });
  37041. }
  37042. }
  37043. }
  37044. function h() {
  37045. const p = B(n);
  37046. if (p) {
  37047. p.removeEventListener(NC, l);
  37048. const v = new CustomEvent(BC, {
  37049. ...m6,
  37050. detail: {
  37051. focusReason: a.value
  37052. }
  37053. });
  37054. p.addEventListener(BC, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !EAe() || p.contains(document.activeElement)) && _l(r ?? document.body), p.removeEventListener(BC, u), S6.remove(o);
  37055. }
  37056. }
  37057. return it(() => {
  37058. t.trapped && d(), se(() => t.trapped, (p) => {
  37059. p ? d() : h();
  37060. });
  37061. }), yt(() => {
  37062. t.trapped && h();
  37063. }), {
  37064. onKeydown: s
  37065. };
  37066. }
  37067. });
  37068. function DAe(t, e, n, r, i, a) {
  37069. return zn(t.$slots, "default", { handleKeydown: t.onKeydown });
  37070. }
  37071. var RAe = /* @__PURE__ */ Qn(IAe, [["render", DAe], ["__file", "focus-trap.vue"]]);
  37072. const kAe = ["fixed", "absolute"], LAe = rr({
  37073. boundariesPadding: {
  37074. type: Number,
  37075. default: 0
  37076. },
  37077. fallbackPlacements: {
  37078. type: jt(Array),
  37079. default: void 0
  37080. },
  37081. gpuAcceleration: {
  37082. type: Boolean,
  37083. default: !0
  37084. },
  37085. offset: {
  37086. type: Number,
  37087. default: 12
  37088. },
  37089. placement: {
  37090. type: String,
  37091. values: YD,
  37092. default: "bottom"
  37093. },
  37094. popperOptions: {
  37095. type: jt(Object),
  37096. default: () => ({})
  37097. },
  37098. strategy: {
  37099. type: String,
  37100. values: kAe,
  37101. default: "absolute"
  37102. }
  37103. }), oq = rr({
  37104. ...LAe,
  37105. id: String,
  37106. style: {
  37107. type: jt([String, Array, Object])
  37108. },
  37109. className: {
  37110. type: jt([String, Array, Object])
  37111. },
  37112. effect: {
  37113. type: String,
  37114. default: "dark"
  37115. },
  37116. visible: Boolean,
  37117. enterable: {
  37118. type: Boolean,
  37119. default: !0
  37120. },
  37121. pure: Boolean,
  37122. focusOnShow: {
  37123. type: Boolean,
  37124. default: !1
  37125. },
  37126. trapping: {
  37127. type: Boolean,
  37128. default: !1
  37129. },
  37130. popperClass: {
  37131. type: jt([String, Array, Object])
  37132. },
  37133. popperStyle: {
  37134. type: jt([String, Array, Object])
  37135. },
  37136. referenceEl: {
  37137. type: jt(Object)
  37138. },
  37139. triggerTargetEl: {
  37140. type: jt(Object)
  37141. },
  37142. stopPopperMouseEvent: {
  37143. type: Boolean,
  37144. default: !0
  37145. },
  37146. virtualTriggering: Boolean,
  37147. zIndex: Number,
  37148. ...A0(["ariaLabel"])
  37149. }), NAe = {
  37150. mouseenter: (t) => t instanceof MouseEvent,
  37151. mouseleave: (t) => t instanceof MouseEvent,
  37152. focus: () => !0,
  37153. blur: () => !0,
  37154. close: () => !0
  37155. }, BAe = (t, e = []) => {
  37156. const { placement: n, strategy: r, popperOptions: i } = t, a = {
  37157. placement: n,
  37158. strategy: r,
  37159. ...i,
  37160. modifiers: [...VAe(t), ...e]
  37161. };
  37162. return FAe(a, i == null ? void 0 : i.modifiers), a;
  37163. }, zAe = (t) => {
  37164. if (Yr)
  37165. return Rl(t);
  37166. };
  37167. function VAe(t) {
  37168. const { offset: e, gpuAcceleration: n, fallbackPlacements: r } = t;
  37169. return [
  37170. {
  37171. name: "offset",
  37172. options: {
  37173. offset: [0, e ?? 12]
  37174. }
  37175. },
  37176. {
  37177. name: "preventOverflow",
  37178. options: {
  37179. padding: {
  37180. top: 2,
  37181. bottom: 2,
  37182. left: 5,
  37183. right: 5
  37184. }
  37185. }
  37186. },
  37187. {
  37188. name: "flip",
  37189. options: {
  37190. padding: 5,
  37191. fallbackPlacements: r
  37192. }
  37193. },
  37194. {
  37195. name: "computeStyles",
  37196. options: {
  37197. gpuAcceleration: n
  37198. }
  37199. }
  37200. ];
  37201. }
  37202. function FAe(t, e) {
  37203. e && (t.modifiers = [...t.modifiers, ...e ?? []]);
  37204. }
  37205. const WAe = 0, QAe = (t) => {
  37206. const { popperInstanceRef: e, contentRef: n, triggerRef: r, role: i } = Ge(lR, void 0), a = U(), o = U(), s = L(() => ({
  37207. name: "eventListeners",
  37208. enabled: !!t.visible
  37209. })), l = L(() => {
  37210. var m;
  37211. const y = B(a), b = (m = B(o)) != null ? m : WAe;
  37212. return {
  37213. name: "arrow",
  37214. enabled: !Abe(y),
  37215. options: {
  37216. element: y,
  37217. padding: b
  37218. }
  37219. };
  37220. }), u = L(() => ({
  37221. onFirstUpdate: () => {
  37222. p();
  37223. },
  37224. ...BAe(t, [
  37225. B(l),
  37226. B(s)
  37227. ])
  37228. })), c = L(() => zAe(t.referenceEl) || B(r)), { attributes: f, state: d, styles: h, update: p, forceUpdate: v, instanceRef: g } = M2e(c, n, u);
  37229. return se(g, (m) => e.value = m), it(() => {
  37230. se(() => {
  37231. var m;
  37232. return (m = B(c)) == null ? void 0 : m.getBoundingClientRect();
  37233. }, () => {
  37234. p();
  37235. });
  37236. }), {
  37237. attributes: f,
  37238. arrowRef: a,
  37239. contentRef: n,
  37240. instanceRef: g,
  37241. state: d,
  37242. styles: h,
  37243. role: i,
  37244. forceUpdate: v,
  37245. update: p
  37246. };
  37247. }, HAe = (t, {
  37248. attributes: e,
  37249. styles: n,
  37250. role: r
  37251. }) => {
  37252. const { nextZIndex: i } = Q2e(), a = Jn("popper"), o = L(() => B(e).popper), s = U(Ws(t.zIndex) ? t.zIndex : i()), l = L(() => [
  37253. a.b(),
  37254. a.is("pure", t.pure),
  37255. a.is(t.effect),
  37256. t.popperClass
  37257. ]), u = L(() => [
  37258. { zIndex: B(s) },
  37259. B(n).popper,
  37260. t.popperStyle || {}
  37261. ]), c = L(() => r.value === "dialog" ? "false" : void 0), f = L(() => B(n).arrow || {});
  37262. return {
  37263. ariaModal: c,
  37264. arrowStyle: f,
  37265. contentAttrs: o,
  37266. contentClass: l,
  37267. contentStyle: u,
  37268. contentZIndex: s,
  37269. updateZIndex: () => {
  37270. s.value = Ws(t.zIndex) ? t.zIndex : i();
  37271. }
  37272. };
  37273. }, GAe = (t, e) => {
  37274. const n = U(!1), r = U();
  37275. return {
  37276. focusStartRef: r,
  37277. trapped: n,
  37278. onFocusAfterReleased: (u) => {
  37279. var c;
  37280. ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", e("blur"));
  37281. },
  37282. onFocusAfterTrapped: () => {
  37283. e("focus");
  37284. },
  37285. onFocusInTrap: (u) => {
  37286. t.visible && !n.value && (u.target && (r.value = u.target), n.value = !0);
  37287. },
  37288. onFocusoutPrevented: (u) => {
  37289. t.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
  37290. },
  37291. onReleaseRequested: () => {
  37292. n.value = !1, e("close");
  37293. }
  37294. };
  37295. }, jAe = te({
  37296. name: "ElPopperContent"
  37297. }), ZAe = /* @__PURE__ */ te({
  37298. ...jAe,
  37299. props: oq,
  37300. emits: NAe,
  37301. setup(t, { expose: e, emit: n }) {
  37302. const r = t, {
  37303. focusStartRef: i,
  37304. trapped: a,
  37305. onFocusAfterReleased: o,
  37306. onFocusAfterTrapped: s,
  37307. onFocusInTrap: l,
  37308. onFocusoutPrevented: u,
  37309. onReleaseRequested: c
  37310. } = GAe(r, n), { attributes: f, arrowRef: d, contentRef: h, styles: p, instanceRef: v, role: g, update: m } = QAe(r), {
  37311. ariaModal: y,
  37312. arrowStyle: b,
  37313. contentAttrs: _,
  37314. contentClass: O,
  37315. contentStyle: S,
  37316. updateZIndex: x
  37317. } = HAe(r, {
  37318. styles: p,
  37319. attributes: f,
  37320. role: g
  37321. }), C = Ge(j1, void 0), T = U();
  37322. pt(eq, {
  37323. arrowStyle: b,
  37324. arrowRef: d,
  37325. arrowOffset: T
  37326. }), C && pt(j1, {
  37327. ...C,
  37328. addInputId: lm,
  37329. removeInputId: lm
  37330. });
  37331. let w;
  37332. const P = (A = !0) => {
  37333. m(), A && x();
  37334. }, $ = () => {
  37335. P(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
  37336. };
  37337. return it(() => {
  37338. se(() => r.triggerTargetEl, (A, D) => {
  37339. w == null || w(), w = void 0;
  37340. const E = B(A || h.value), R = B(D || h.value);
  37341. cm(E) && (w = se([g, () => r.ariaLabel, y, () => r.id], (N) => {
  37342. ["role", "aria-label", "aria-modal", "id"].forEach((V, z) => {
  37343. Gl(N[z]) ? E.removeAttribute(V) : E.setAttribute(V, N[z]);
  37344. });
  37345. }, { immediate: !0 })), R !== E && cm(R) && ["role", "aria-label", "aria-modal", "id"].forEach((N) => {
  37346. R.removeAttribute(N);
  37347. });
  37348. }, { immediate: !0 }), se(() => r.visible, $, { immediate: !0 });
  37349. }), yt(() => {
  37350. w == null || w(), w = void 0;
  37351. }), e({
  37352. popperContentRef: h,
  37353. popperInstanceRef: v,
  37354. updatePopper: P,
  37355. contentStyle: S
  37356. }), (A, D) => (pe(), Qe("div", _n({
  37357. ref_key: "contentRef",
  37358. ref: h
  37359. }, B(_), {
  37360. style: B(S),
  37361. class: B(O),
  37362. tabindex: "-1",
  37363. onMouseenter: D[0] || (D[0] = (E) => A.$emit("mouseenter", E)),
  37364. onMouseleave: D[1] || (D[1] = (E) => A.$emit("mouseleave", E))
  37365. }), [
  37366. M(B(RAe), {
  37367. trapped: B(a),
  37368. "trap-on-focus-in": !0,
  37369. "focus-trap-el": B(h),
  37370. "focus-start-el": B(i),
  37371. onFocusAfterTrapped: B(s),
  37372. onFocusAfterReleased: B(o),
  37373. onFocusin: B(l),
  37374. onFocusoutPrevented: B(u),
  37375. onReleaseRequested: B(c)
  37376. }, {
  37377. default: we(() => [
  37378. zn(A.$slots, "default")
  37379. ]),
  37380. _: 3
  37381. }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
  37382. ], 16));
  37383. }
  37384. });
  37385. var UAe = /* @__PURE__ */ Qn(ZAe, [["__file", "content.vue"]]);
  37386. const XAe = Df(pAe), fR = Symbol("elTooltip"), dR = rr({
  37387. ...N2e,
  37388. ...oq,
  37389. appendTo: {
  37390. type: jt([String, Object])
  37391. },
  37392. content: {
  37393. type: String,
  37394. default: ""
  37395. },
  37396. rawContent: {
  37397. type: Boolean,
  37398. default: !1
  37399. },
  37400. persistent: Boolean,
  37401. visible: {
  37402. type: jt(Boolean),
  37403. default: null
  37404. },
  37405. transition: String,
  37406. teleported: {
  37407. type: Boolean,
  37408. default: !0
  37409. },
  37410. disabled: Boolean,
  37411. ...A0(["ariaLabel"])
  37412. }), sq = rr({
  37413. ...iq,
  37414. disabled: Boolean,
  37415. trigger: {
  37416. type: jt([String, Array]),
  37417. default: "hover"
  37418. },
  37419. triggerKeys: {
  37420. type: jt(Array),
  37421. default: () => [Xc.enter, Xc.space]
  37422. }
  37423. }), {
  37424. useModelToggleProps: YAe,
  37425. useModelToggleEmits: qAe,
  37426. useModelToggle: KAe
  37427. } = NY("visible"), JAe = rr({
  37428. ...tq,
  37429. ...YAe,
  37430. ...dR,
  37431. ...sq,
  37432. ...nq,
  37433. showArrow: {
  37434. type: Boolean,
  37435. default: !0
  37436. }
  37437. }), eEe = [
  37438. ...qAe,
  37439. "before-show",
  37440. "before-hide",
  37441. "show",
  37442. "hide",
  37443. "open",
  37444. "close"
  37445. ], tEe = (t, e) => UPe(t) ? t.includes(e) : t === e, Jf = (t, e, n) => (r) => {
  37446. tEe(B(t), e) && n(r);
  37447. }, nEe = te({
  37448. name: "ElTooltipTrigger"
  37449. }), rEe = /* @__PURE__ */ te({
  37450. ...nEe,
  37451. props: sq,
  37452. setup(t, { expose: e }) {
  37453. const n = t, r = Jn("tooltip"), { controlled: i, id: a, open: o, onOpen: s, onClose: l, onToggle: u } = Ge(fR, void 0), c = U(null), f = () => {
  37454. if (B(i) || n.disabled)
  37455. return !0;
  37456. }, d = Nn(n, "trigger"), h = bs(f, Jf(d, "hover", s)), p = bs(f, Jf(d, "hover", l)), v = bs(f, Jf(d, "click", (_) => {
  37457. _.button === 0 && u(_);
  37458. })), g = bs(f, Jf(d, "focus", s)), m = bs(f, Jf(d, "focus", l)), y = bs(f, Jf(d, "contextmenu", (_) => {
  37459. _.preventDefault(), u(_);
  37460. })), b = bs(f, (_) => {
  37461. const { code: O } = _;
  37462. n.triggerKeys.includes(O) && (_.preventDefault(), u(_));
  37463. });
  37464. return e({
  37465. triggerRef: c
  37466. }), (_, O) => (pe(), je(B(OAe), {
  37467. id: B(a),
  37468. "virtual-ref": _.virtualRef,
  37469. open: B(o),
  37470. "virtual-triggering": _.virtualTriggering,
  37471. class: Ye(B(r).e("trigger")),
  37472. onBlur: B(m),
  37473. onClick: B(v),
  37474. onContextmenu: B(y),
  37475. onFocus: B(g),
  37476. onMouseenter: B(h),
  37477. onMouseleave: B(p),
  37478. onKeydown: B(b)
  37479. }, {
  37480. default: we(() => [
  37481. zn(_.$slots, "default")
  37482. ]),
  37483. _: 3
  37484. }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
  37485. }
  37486. });
  37487. var iEe = /* @__PURE__ */ Qn(rEe, [["__file", "trigger.vue"]]);
  37488. const aEe = te({
  37489. name: "ElTooltipContent",
  37490. inheritAttrs: !1
  37491. }), oEe = /* @__PURE__ */ te({
  37492. ...aEe,
  37493. props: dR,
  37494. setup(t, { expose: e }) {
  37495. const n = t, { selector: r } = qY(), i = Jn("tooltip"), a = U(null), o = U(!1), {
  37496. controlled: s,
  37497. id: l,
  37498. open: u,
  37499. trigger: c,
  37500. onClose: f,
  37501. onOpen: d,
  37502. onShow: h,
  37503. onHide: p,
  37504. onBeforeShow: v,
  37505. onBeforeHide: g
  37506. } = Ge(fR, void 0), m = L(() => n.transition || `${i.namespace.value}-fade-in-linear`), y = L(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
  37507. yt(() => {
  37508. o.value = !0;
  37509. });
  37510. const b = L(() => B(y) ? !0 : B(u)), _ = L(() => n.disabled ? !1 : B(u)), O = L(() => n.appendTo || r.value), S = L(() => {
  37511. var N;
  37512. return (N = n.style) != null ? N : {};
  37513. }), x = L(() => !B(u)), C = () => {
  37514. p();
  37515. }, T = () => {
  37516. if (B(s))
  37517. return !0;
  37518. }, w = bs(T, () => {
  37519. n.enterable && B(c) === "hover" && d();
  37520. }), P = bs(T, () => {
  37521. B(c) === "hover" && f();
  37522. }), $ = () => {
  37523. var N, V;
  37524. (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N), v == null || v();
  37525. }, A = () => {
  37526. g == null || g();
  37527. }, D = () => {
  37528. h(), R = kPe(L(() => {
  37529. var N;
  37530. return (N = a.value) == null ? void 0 : N.popperContentRef;
  37531. }), () => {
  37532. if (B(s))
  37533. return;
  37534. B(c) !== "hover" && f();
  37535. });
  37536. }, E = () => {
  37537. n.virtualTriggering || f();
  37538. };
  37539. let R;
  37540. return se(() => B(u), (N) => {
  37541. N || R == null || R();
  37542. }, {
  37543. flush: "post"
  37544. }), se(() => n.content, () => {
  37545. var N, V;
  37546. (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N);
  37547. }), e({
  37548. contentRef: a
  37549. }), (N, V) => (pe(), je(PS, {
  37550. disabled: !N.teleported,
  37551. to: B(O)
  37552. }, [
  37553. M(co, {
  37554. name: B(m),
  37555. onAfterLeave: C,
  37556. onBeforeEnter: $,
  37557. onAfterEnter: D,
  37558. onBeforeLeave: A
  37559. }, {
  37560. default: we(() => [
  37561. B(b) ? bi((pe(), je(B(UAe), _n({
  37562. key: 0,
  37563. id: B(l),
  37564. ref_key: "contentRef",
  37565. ref: a
  37566. }, N.$attrs, {
  37567. "aria-label": N.ariaLabel,
  37568. "aria-hidden": B(x),
  37569. "boundaries-padding": N.boundariesPadding,
  37570. "fallback-placements": N.fallbackPlacements,
  37571. "gpu-acceleration": N.gpuAcceleration,
  37572. offset: N.offset,
  37573. placement: N.placement,
  37574. "popper-options": N.popperOptions,
  37575. strategy: N.strategy,
  37576. effect: N.effect,
  37577. enterable: N.enterable,
  37578. pure: N.pure,
  37579. "popper-class": N.popperClass,
  37580. "popper-style": [N.popperStyle, B(S)],
  37581. "reference-el": N.referenceEl,
  37582. "trigger-target-el": N.triggerTargetEl,
  37583. visible: B(_),
  37584. "z-index": N.zIndex,
  37585. onMouseenter: B(w),
  37586. onMouseleave: B(P),
  37587. onBlur: E,
  37588. onClose: B(f)
  37589. }), {
  37590. default: we(() => [
  37591. o.value ? _t("v-if", !0) : zn(N.$slots, "default", { key: 0 })
  37592. ]),
  37593. _: 3
  37594. }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
  37595. [Bs, B(_)]
  37596. ]) : _t("v-if", !0)
  37597. ]),
  37598. _: 3
  37599. }, 8, ["name"])
  37600. ], 8, ["disabled", "to"]));
  37601. }
  37602. });
  37603. var sEe = /* @__PURE__ */ Qn(oEe, [["__file", "content.vue"]]);
  37604. const lEe = ["innerHTML"], uEe = { key: 1 }, cEe = te({
  37605. name: "ElTooltip"
  37606. }), fEe = /* @__PURE__ */ te({
  37607. ...cEe,
  37608. props: JAe,
  37609. emits: eEe,
  37610. setup(t, { expose: e, emit: n }) {
  37611. const r = t;
  37612. L2e();
  37613. const i = iR(), a = U(), o = U(), s = () => {
  37614. var m;
  37615. const y = B(a);
  37616. y && ((m = y.popperInstanceRef) == null || m.update());
  37617. }, l = U(!1), u = U(), { show: c, hide: f, hasUpdateHandler: d } = KAe({
  37618. indicator: l,
  37619. toggleReason: u
  37620. }), { onOpen: h, onClose: p } = B2e({
  37621. showAfter: Nn(r, "showAfter"),
  37622. hideAfter: Nn(r, "hideAfter"),
  37623. autoClose: Nn(r, "autoClose"),
  37624. open: c,
  37625. close: f
  37626. }), v = L(() => Q1(r.visible) && !d.value);
  37627. pt(fR, {
  37628. controlled: v,
  37629. id: i,
  37630. open: Hle(l),
  37631. trigger: Nn(r, "trigger"),
  37632. onOpen: (m) => {
  37633. h(m);
  37634. },
  37635. onClose: (m) => {
  37636. p(m);
  37637. },
  37638. onToggle: (m) => {
  37639. B(l) ? p(m) : h(m);
  37640. },
  37641. onShow: () => {
  37642. n("show", u.value);
  37643. },
  37644. onHide: () => {
  37645. n("hide", u.value);
  37646. },
  37647. onBeforeShow: () => {
  37648. n("before-show", u.value);
  37649. },
  37650. onBeforeHide: () => {
  37651. n("before-hide", u.value);
  37652. },
  37653. updatePopper: s
  37654. }), se(() => r.disabled, (m) => {
  37655. m && l.value && (l.value = !1);
  37656. });
  37657. const g = (m) => {
  37658. var y, b;
  37659. const _ = (b = (y = o.value) == null ? void 0 : y.contentRef) == null ? void 0 : b.popperContentRef, O = (m == null ? void 0 : m.relatedTarget) || document.activeElement;
  37660. return _ && _.contains(O);
  37661. };
  37662. return Gle(() => l.value && f()), e({
  37663. popperRef: a,
  37664. contentRef: o,
  37665. isFocusInsideContent: g,
  37666. updatePopper: s,
  37667. onOpen: h,
  37668. onClose: p,
  37669. hide: f
  37670. }), (m, y) => (pe(), je(B(XAe), {
  37671. ref_key: "popperRef",
  37672. ref: a,
  37673. role: m.role
  37674. }, {
  37675. default: we(() => [
  37676. M(iEe, {
  37677. disabled: m.disabled,
  37678. trigger: m.trigger,
  37679. "trigger-keys": m.triggerKeys,
  37680. "virtual-ref": m.virtualRef,
  37681. "virtual-triggering": m.virtualTriggering
  37682. }, {
  37683. default: we(() => [
  37684. m.$slots.default ? zn(m.$slots, "default", { key: 0 }) : _t("v-if", !0)
  37685. ]),
  37686. _: 3
  37687. }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
  37688. M(sEe, {
  37689. ref_key: "contentRef",
  37690. ref: o,
  37691. "aria-label": m.ariaLabel,
  37692. "boundaries-padding": m.boundariesPadding,
  37693. content: m.content,
  37694. disabled: m.disabled,
  37695. effect: m.effect,
  37696. enterable: m.enterable,
  37697. "fallback-placements": m.fallbackPlacements,
  37698. "hide-after": m.hideAfter,
  37699. "gpu-acceleration": m.gpuAcceleration,
  37700. offset: m.offset,
  37701. persistent: m.persistent,
  37702. "popper-class": m.popperClass,
  37703. "popper-style": m.popperStyle,
  37704. placement: m.placement,
  37705. "popper-options": m.popperOptions,
  37706. pure: m.pure,
  37707. "raw-content": m.rawContent,
  37708. "reference-el": m.referenceEl,
  37709. "trigger-target-el": m.triggerTargetEl,
  37710. "show-after": m.showAfter,
  37711. strategy: m.strategy,
  37712. teleported: m.teleported,
  37713. transition: m.transition,
  37714. "virtual-triggering": m.virtualTriggering,
  37715. "z-index": m.zIndex,
  37716. "append-to": m.appendTo
  37717. }, {
  37718. default: we(() => [
  37719. zn(m.$slots, "content", {}, () => [
  37720. m.rawContent ? (pe(), Qe("span", {
  37721. key: 0,
  37722. innerHTML: m.content
  37723. }, null, 8, lEe)) : (pe(), Qe("span", uEe, Bi(m.content), 1))
  37724. ]),
  37725. m.showArrow ? (pe(), je(B(mAe), {
  37726. key: 0,
  37727. "arrow-offset": m.arrowOffset
  37728. }, null, 8, ["arrow-offset"])) : _t("v-if", !0)
  37729. ]),
  37730. _: 3
  37731. }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
  37732. ]),
  37733. _: 3
  37734. }, 8, ["role"]));
  37735. }
  37736. });
  37737. var dEe = /* @__PURE__ */ Qn(fEe, [["__file", "tooltip.vue"]]);
  37738. const hEe = Df(dEe), lq = Symbol("buttonGroupContextKey"), pEe = (t, e) => {
  37739. C0({
  37740. from: "type.text",
  37741. replacement: "link",
  37742. version: "3.0.0",
  37743. scope: "props",
  37744. ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  37745. }, L(() => t.type === "text"));
  37746. const n = Ge(lq, void 0), r = X2e("button"), { form: i } = Ax(), a = $x(L(() => n == null ? void 0 : n.size)), o = E0(), s = U(), l = ZG(), u = L(() => t.type || (n == null ? void 0 : n.type) || ""), c = L(() => {
  37747. var p, v, g;
  37748. return (g = (v = t.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? g : !1;
  37749. }), f = L(() => t.tag === "button" ? {
  37750. ariaDisabled: o.value || t.loading,
  37751. disabled: o.value || t.loading,
  37752. autofocus: t.autofocus,
  37753. type: t.nativeType
  37754. } : {}), d = L(() => {
  37755. var p;
  37756. const v = (p = l.default) == null ? void 0 : p.call(l);
  37757. if (c.value && (v == null ? void 0 : v.length) === 1) {
  37758. const g = v[0];
  37759. if ((g == null ? void 0 : g.type) === TS) {
  37760. const m = g.children;
  37761. return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
  37762. }
  37763. }
  37764. return !1;
  37765. });
  37766. return {
  37767. _disabled: o,
  37768. _size: a,
  37769. _type: u,
  37770. _ref: s,
  37771. _props: f,
  37772. shouldAddSpace: d,
  37773. handleClick: (p) => {
  37774. t.nativeType === "reset" && (i == null || i.resetFields()), e("click", p);
  37775. }
  37776. };
  37777. }, vEe = [
  37778. "default",
  37779. "primary",
  37780. "success",
  37781. "warning",
  37782. "info",
  37783. "danger",
  37784. "text",
  37785. ""
  37786. ], gEe = ["button", "submit", "reset"], rA = rr({
  37787. size: $0,
  37788. disabled: Boolean,
  37789. type: {
  37790. type: String,
  37791. values: vEe,
  37792. default: ""
  37793. },
  37794. icon: {
  37795. type: H1
  37796. },
  37797. nativeType: {
  37798. type: String,
  37799. values: gEe,
  37800. default: "button"
  37801. },
  37802. loading: Boolean,
  37803. loadingIcon: {
  37804. type: H1,
  37805. default: () => RY
  37806. },
  37807. plain: Boolean,
  37808. text: Boolean,
  37809. link: Boolean,
  37810. bg: Boolean,
  37811. autofocus: Boolean,
  37812. round: Boolean,
  37813. circle: Boolean,
  37814. color: String,
  37815. dark: Boolean,
  37816. autoInsertSpace: {
  37817. type: Boolean,
  37818. default: void 0
  37819. },
  37820. tag: {
  37821. type: jt([String, Object]),
  37822. default: "button"
  37823. }
  37824. }), mEe = {
  37825. click: (t) => t instanceof MouseEvent
  37826. };
  37827. function fl(t, e = 20) {
  37828. return t.mix("#141414", e).toString();
  37829. }
  37830. function yEe(t) {
  37831. const e = E0(), n = Jn("button");
  37832. return L(() => {
  37833. let r = {}, i = t.color;
  37834. if (i) {
  37835. const a = i.match(/var\((.*?)\)/);
  37836. a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
  37837. const o = new en(i), s = t.dark ? o.tint(20).toString() : fl(o, 20);
  37838. if (t.plain)
  37839. r = n.cssVarBlock({
  37840. "bg-color": t.dark ? fl(o, 90) : o.tint(90).toString(),
  37841. "text-color": i,
  37842. "border-color": t.dark ? fl(o, 50) : o.tint(50).toString(),
  37843. "hover-text-color": `var(${n.cssVarName("color-white")})`,
  37844. "hover-bg-color": i,
  37845. "hover-border-color": i,
  37846. "active-bg-color": s,
  37847. "active-text-color": `var(${n.cssVarName("color-white")})`,
  37848. "active-border-color": s
  37849. }), e.value && (r[n.cssVarBlockName("disabled-bg-color")] = t.dark ? fl(o, 90) : o.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = t.dark ? fl(o, 50) : o.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = t.dark ? fl(o, 80) : o.tint(80).toString());
  37850. else {
  37851. const l = t.dark ? fl(o, 30) : o.tint(30).toString(), u = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
  37852. if (r = n.cssVarBlock({
  37853. "bg-color": i,
  37854. "text-color": u,
  37855. "border-color": i,
  37856. "hover-bg-color": l,
  37857. "hover-text-color": u,
  37858. "hover-border-color": l,
  37859. "active-bg-color": s,
  37860. "active-border-color": s
  37861. }), e.value) {
  37862. const c = t.dark ? fl(o, 50) : o.tint(50).toString();
  37863. r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c;
  37864. }
  37865. }
  37866. }
  37867. return r;
  37868. });
  37869. }
  37870. const bEe = te({
  37871. name: "ElButton"
  37872. }), _Ee = /* @__PURE__ */ te({
  37873. ...bEe,
  37874. props: rA,
  37875. emits: mEe,
  37876. setup(t, { expose: e, emit: n }) {
  37877. const r = t, i = yEe(r), a = Jn("button"), { _ref: o, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: f, handleClick: d } = pEe(r, n), h = L(() => [
  37878. a.b(),
  37879. a.m(l.value),
  37880. a.m(s.value),
  37881. a.is("disabled", u.value),
  37882. a.is("loading", r.loading),
  37883. a.is("plain", r.plain),
  37884. a.is("round", r.round),
  37885. a.is("circle", r.circle),
  37886. a.is("text", r.text),
  37887. a.is("link", r.link),
  37888. a.is("has-bg", r.bg)
  37889. ]);
  37890. return e({
  37891. ref: o,
  37892. size: s,
  37893. type: l,
  37894. disabled: u,
  37895. shouldAddSpace: f
  37896. }), (p, v) => (pe(), je(Ec(p.tag), _n({
  37897. ref_key: "_ref",
  37898. ref: o
  37899. }, B(c), {
  37900. class: B(h),
  37901. style: B(i),
  37902. onClick: B(d)
  37903. }), {
  37904. default: we(() => [
  37905. p.loading ? (pe(), Qe(wt, { key: 0 }, [
  37906. p.$slots.loading ? zn(p.$slots, "loading", { key: 0 }) : (pe(), je(B(ws), {
  37907. key: 1,
  37908. class: Ye(B(a).is("loading"))
  37909. }, {
  37910. default: we(() => [
  37911. (pe(), je(Ec(p.loadingIcon)))
  37912. ]),
  37913. _: 1
  37914. }, 8, ["class"]))
  37915. ], 64)) : p.icon || p.$slots.icon ? (pe(), je(B(ws), { key: 1 }, {
  37916. default: we(() => [
  37917. p.icon ? (pe(), je(Ec(p.icon), { key: 0 })) : zn(p.$slots, "icon", { key: 1 })
  37918. ]),
  37919. _: 3
  37920. })) : _t("v-if", !0),
  37921. p.$slots.default ? (pe(), Qe("span", {
  37922. key: 2,
  37923. class: Ye({ [B(a).em("text", "expand")]: B(f) })
  37924. }, [
  37925. zn(p.$slots, "default")
  37926. ], 2)) : _t("v-if", !0)
  37927. ]),
  37928. _: 3
  37929. }, 16, ["class", "style", "onClick"]));
  37930. }
  37931. });
  37932. var OEe = /* @__PURE__ */ Qn(_Ee, [["__file", "button.vue"]]);
  37933. const SEe = {
  37934. size: rA.size,
  37935. type: rA.type
  37936. }, xEe = te({
  37937. name: "ElButtonGroup"
  37938. }), wEe = /* @__PURE__ */ te({
  37939. ...xEe,
  37940. props: SEe,
  37941. setup(t) {
  37942. const e = t;
  37943. pt(lq, tn({
  37944. size: Nn(e, "size"),
  37945. type: Nn(e, "type")
  37946. }));
  37947. const n = Jn("button");
  37948. return (r, i) => (pe(), Qe("div", {
  37949. class: Ye(`${B(n).b("group")}`)
  37950. }, [
  37951. zn(r.$slots, "default")
  37952. ], 2));
  37953. }
  37954. });
  37955. var uq = /* @__PURE__ */ Qn(wEe, [["__file", "button-group.vue"]]);
  37956. const w6 = Df(OEe, {
  37957. ButtonGroup: uq
  37958. });
  37959. ZD(uq);
  37960. const Ol = /* @__PURE__ */ new Map();
  37961. let C6;
  37962. Yr && (document.addEventListener("mousedown", (t) => C6 = t), document.addEventListener("mouseup", (t) => {
  37963. for (const e of Ol.values())
  37964. for (const { documentHandler: n } of e)
  37965. n(t, C6);
  37966. }));
  37967. function T6(t, e) {
  37968. let n = [];
  37969. return Array.isArray(e.arg) ? n = e.arg : cm(e.arg) && n.push(e.arg), function(r, i) {
  37970. const a = e.instance.popperRef, o = r.target, s = i == null ? void 0 : i.target, l = !e || !e.instance, u = !o || !s, c = t.contains(o) || t.contains(s), f = t === o, d = n.length && n.some((p) => p == null ? void 0 : p.contains(o)) || n.length && n.includes(s), h = a && (a.contains(o) || a.contains(s));
  37971. l || u || c || f || d || h || e.value(r, i);
  37972. };
  37973. }
  37974. const CEe = {
  37975. beforeMount(t, e) {
  37976. Ol.has(t) || Ol.set(t, []), Ol.get(t).push({
  37977. documentHandler: T6(t, e),
  37978. bindingFn: e.value
  37979. });
  37980. },
  37981. updated(t, e) {
  37982. Ol.has(t) || Ol.set(t, []);
  37983. const n = Ol.get(t), r = n.findIndex((a) => a.bindingFn === e.oldValue), i = {
  37984. documentHandler: T6(t, e),
  37985. bindingFn: e.value
  37986. };
  37987. r >= 0 ? n.splice(r, 1, i) : n.push(i);
  37988. },
  37989. unmounted(t) {
  37990. Ol.delete(t);
  37991. }
  37992. }, cq = rr({
  37993. modelValue: {
  37994. type: [String, Number, Boolean],
  37995. default: void 0
  37996. },
  37997. size: $0,
  37998. disabled: Boolean,
  37999. label: {
  38000. type: [String, Number, Boolean],
  38001. default: void 0
  38002. },
  38003. value: {
  38004. type: [String, Number, Boolean],
  38005. default: void 0
  38006. },
  38007. name: {
  38008. type: String,
  38009. default: void 0
  38010. }
  38011. }), TEe = rr({
  38012. ...cq,
  38013. border: Boolean
  38014. }), fq = {
  38015. [Qs]: (t) => ba(t) || Ws(t) || Q1(t),
  38016. [LY]: (t) => ba(t) || Ws(t) || Q1(t)
  38017. }, dq = Symbol("radioGroupKey"), hq = (t, e) => {
  38018. const n = U(), r = Ge(dq, void 0), i = L(() => !!r), a = L(() => K3(t.value) ? t.label : t.value), o = L({
  38019. get() {
  38020. return i.value ? r.modelValue : t.modelValue;
  38021. },
  38022. set(f) {
  38023. i.value ? r.changeEvent(f) : e && e(Qs, f), n.value.checked = t.modelValue === a.value;
  38024. }
  38025. }), s = $x(L(() => r == null ? void 0 : r.size)), l = E0(L(() => r == null ? void 0 : r.disabled)), u = U(!1), c = L(() => l.value || i.value && o.value !== a.value ? -1 : 0);
  38026. return C0({
  38027. from: "label act as value",
  38028. replacement: "value",
  38029. version: "3.0.0",
  38030. scope: "el-radio",
  38031. ref: "https://element-plus.org/en-US/component/radio.html"
  38032. }, L(() => i.value && K3(t.value))), {
  38033. radioRef: n,
  38034. isGroup: i,
  38035. radioGroup: r,
  38036. focus: u,
  38037. size: s,
  38038. disabled: l,
  38039. tabIndex: c,
  38040. modelValue: o,
  38041. actualValue: a
  38042. };
  38043. }, PEe = ["value", "name", "disabled"], $Ee = te({
  38044. name: "ElRadio"
  38045. }), AEe = /* @__PURE__ */ te({
  38046. ...$Ee,
  38047. props: TEe,
  38048. emits: fq,
  38049. setup(t, { emit: e }) {
  38050. const n = t, r = Jn("radio"), { radioRef: i, radioGroup: a, focus: o, size: s, disabled: l, modelValue: u, actualValue: c } = hq(n, e);
  38051. function f() {
  38052. Tt(() => e("change", u.value));
  38053. }
  38054. return (d, h) => {
  38055. var p;
  38056. return pe(), Qe("label", {
  38057. class: Ye([
  38058. B(r).b(),
  38059. B(r).is("disabled", B(l)),
  38060. B(r).is("focus", B(o)),
  38061. B(r).is("bordered", d.border),
  38062. B(r).is("checked", B(u) === B(c)),
  38063. B(r).m(B(s))
  38064. ])
  38065. }, [
  38066. He("span", {
  38067. class: Ye([
  38068. B(r).e("input"),
  38069. B(r).is("disabled", B(l)),
  38070. B(r).is("checked", B(u) === B(c))
  38071. ])
  38072. }, [
  38073. bi(He("input", {
  38074. ref_key: "radioRef",
  38075. ref: i,
  38076. "onUpdate:modelValue": h[0] || (h[0] = (v) => tp(u) ? u.value = v : null),
  38077. class: Ye(B(r).e("original")),
  38078. value: B(c),
  38079. name: d.name || ((p = B(a)) == null ? void 0 : p.name),
  38080. disabled: B(l),
  38081. type: "radio",
  38082. onFocus: h[1] || (h[1] = (v) => o.value = !0),
  38083. onBlur: h[2] || (h[2] = (v) => o.value = !1),
  38084. onChange: f,
  38085. onClick: h[3] || (h[3] = lf(() => {
  38086. }, ["stop"]))
  38087. }, null, 42, PEe), [
  38088. [UG, B(u)]
  38089. ]),
  38090. He("span", {
  38091. class: Ye(B(r).e("inner"))
  38092. }, null, 2)
  38093. ], 2),
  38094. He("span", {
  38095. class: Ye(B(r).e("label")),
  38096. onKeydown: h[4] || (h[4] = lf(() => {
  38097. }, ["stop"]))
  38098. }, [
  38099. zn(d.$slots, "default", {}, () => [
  38100. Kt(Bi(d.label), 1)
  38101. ])
  38102. ], 34)
  38103. ], 2);
  38104. };
  38105. }
  38106. });
  38107. var EEe = /* @__PURE__ */ Qn(AEe, [["__file", "radio.vue"]]);
  38108. const MEe = rr({
  38109. ...cq
  38110. }), IEe = ["value", "name", "disabled"], DEe = te({
  38111. name: "ElRadioButton"
  38112. }), REe = /* @__PURE__ */ te({
  38113. ...DEe,
  38114. props: MEe,
  38115. setup(t) {
  38116. const e = t, n = Jn("radio"), { radioRef: r, focus: i, size: a, disabled: o, modelValue: s, radioGroup: l, actualValue: u } = hq(e), c = L(() => ({
  38117. backgroundColor: (l == null ? void 0 : l.fill) || "",
  38118. borderColor: (l == null ? void 0 : l.fill) || "",
  38119. boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
  38120. color: (l == null ? void 0 : l.textColor) || ""
  38121. }));
  38122. return (f, d) => {
  38123. var h;
  38124. return pe(), Qe("label", {
  38125. class: Ye([
  38126. B(n).b("button"),
  38127. B(n).is("active", B(s) === B(u)),
  38128. B(n).is("disabled", B(o)),
  38129. B(n).is("focus", B(i)),
  38130. B(n).bm("button", B(a))
  38131. ])
  38132. }, [
  38133. bi(He("input", {
  38134. ref_key: "radioRef",
  38135. ref: r,
  38136. "onUpdate:modelValue": d[0] || (d[0] = (p) => tp(s) ? s.value = p : null),
  38137. class: Ye(B(n).be("button", "original-radio")),
  38138. value: B(u),
  38139. type: "radio",
  38140. name: f.name || ((h = B(l)) == null ? void 0 : h.name),
  38141. disabled: B(o),
  38142. onFocus: d[1] || (d[1] = (p) => i.value = !0),
  38143. onBlur: d[2] || (d[2] = (p) => i.value = !1),
  38144. onClick: d[3] || (d[3] = lf(() => {
  38145. }, ["stop"]))
  38146. }, null, 42, IEe), [
  38147. [UG, B(s)]
  38148. ]),
  38149. He("span", {
  38150. class: Ye(B(n).be("button", "inner")),
  38151. style: Sr(B(s) === B(u) ? B(c) : {}),
  38152. onKeydown: d[4] || (d[4] = lf(() => {
  38153. }, ["stop"]))
  38154. }, [
  38155. zn(f.$slots, "default", {}, () => [
  38156. Kt(Bi(f.label), 1)
  38157. ])
  38158. ], 38)
  38159. ], 2);
  38160. };
  38161. }
  38162. });
  38163. var pq = /* @__PURE__ */ Qn(REe, [["__file", "radio-button.vue"]]);
  38164. const kEe = rr({
  38165. id: {
  38166. type: String,
  38167. default: void 0
  38168. },
  38169. size: $0,
  38170. disabled: Boolean,
  38171. modelValue: {
  38172. type: [String, Number, Boolean],
  38173. default: void 0
  38174. },
  38175. fill: {
  38176. type: String,
  38177. default: ""
  38178. },
  38179. label: {
  38180. type: String,
  38181. default: void 0
  38182. },
  38183. textColor: {
  38184. type: String,
  38185. default: ""
  38186. },
  38187. name: {
  38188. type: String,
  38189. default: void 0
  38190. },
  38191. validateEvent: {
  38192. type: Boolean,
  38193. default: !0
  38194. },
  38195. ...A0(["ariaLabel"])
  38196. }), LEe = fq, NEe = ["id", "aria-label", "aria-labelledby"], BEe = te({
  38197. name: "ElRadioGroup"
  38198. }), zEe = /* @__PURE__ */ te({
  38199. ...BEe,
  38200. props: kEe,
  38201. emits: LEe,
  38202. setup(t, { emit: e }) {
  38203. const n = t, r = Jn("radio"), i = iR(), a = U(), { formItem: o } = Ax(), { inputId: s, isLabeledByFormItem: l } = oR(n, {
  38204. formItemContext: o
  38205. }), u = (f) => {
  38206. e(Qs, f), Tt(() => e("change", f));
  38207. };
  38208. it(() => {
  38209. const f = a.value.querySelectorAll("[type=radio]"), d = f[0];
  38210. !Array.from(f).some((h) => h.checked) && d && (d.tabIndex = 0);
  38211. });
  38212. const c = L(() => n.name || i.value);
  38213. return pt(dq, tn({
  38214. ...$S(n),
  38215. changeEvent: u,
  38216. name: c
  38217. })), se(() => n.modelValue, () => {
  38218. n.validateEvent && (o == null || o.validate("change").catch((f) => Gi(f)));
  38219. }), C0({
  38220. from: "label",
  38221. replacement: "aria-label",
  38222. version: "2.8.0",
  38223. scope: "el-radio-group",
  38224. ref: "https://element-plus.org/en-US/component/radio.html"
  38225. }, L(() => !!n.label)), (f, d) => (pe(), Qe("div", {
  38226. id: B(s),
  38227. ref_key: "radioGroupRef",
  38228. ref: a,
  38229. class: Ye(B(r).b("group")),
  38230. role: "radiogroup",
  38231. "aria-label": B(l) ? void 0 : f.label || f.ariaLabel || "radio-group",
  38232. "aria-labelledby": B(l) ? B(o).labelId : void 0
  38233. }, [
  38234. zn(f.$slots, "default")
  38235. ], 10, NEe));
  38236. }
  38237. });
  38238. var vq = /* @__PURE__ */ Qn(zEe, [["__file", "radio-group.vue"]]);
  38239. Df(EEe, {
  38240. RadioButton: pq,
  38241. RadioGroup: vq
  38242. });
  38243. const gq = ZD(vq), bg = ZD(pq), VEe = rr({
  38244. color: {
  38245. type: jt(Object),
  38246. required: !0
  38247. },
  38248. vertical: {
  38249. type: Boolean,
  38250. default: !1
  38251. }
  38252. });
  38253. let zC = !1;
  38254. function hm(t, e) {
  38255. if (!Yr)
  38256. return;
  38257. const n = function(a) {
  38258. var o;
  38259. (o = e.drag) == null || o.call(e, a);
  38260. }, r = function(a) {
  38261. var o;
  38262. document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, zC = !1, (o = e.end) == null || o.call(e, a);
  38263. }, i = function(a) {
  38264. var o;
  38265. zC || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), zC = !0, (o = e.start) == null || o.call(e, a));
  38266. };
  38267. t.addEventListener("mousedown", i), t.addEventListener("touchstart", i);
  38268. }
  38269. const FEe = (t) => {
  38270. const e = vn(), n = ae(), r = ae();
  38271. function i(o) {
  38272. o.target !== n.value && a(o);
  38273. }
  38274. function a(o) {
  38275. if (!r.value || !n.value)
  38276. return;
  38277. const l = e.vnode.el.getBoundingClientRect(), { clientX: u, clientY: c } = jD(o);
  38278. if (t.vertical) {
  38279. let f = c - l.top;
  38280. f = Math.max(n.value.offsetHeight / 2, f), f = Math.min(f, l.height - n.value.offsetHeight / 2), t.color.set("alpha", Math.round((f - n.value.offsetHeight / 2) / (l.height - n.value.offsetHeight) * 100));
  38281. } else {
  38282. let f = u - l.left;
  38283. f = Math.max(n.value.offsetWidth / 2, f), f = Math.min(f, l.width - n.value.offsetWidth / 2), t.color.set("alpha", Math.round((f - n.value.offsetWidth / 2) / (l.width - n.value.offsetWidth) * 100));
  38284. }
  38285. }
  38286. return {
  38287. thumb: n,
  38288. bar: r,
  38289. handleDrag: a,
  38290. handleClick: i
  38291. };
  38292. }, WEe = (t, {
  38293. bar: e,
  38294. thumb: n,
  38295. handleDrag: r
  38296. }) => {
  38297. const i = vn(), a = Jn("color-alpha-slider"), o = U(0), s = U(0), l = U();
  38298. function u() {
  38299. if (!n.value || t.vertical)
  38300. return 0;
  38301. const y = i.vnode.el, b = t.color.get("alpha");
  38302. return y ? Math.round(b * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0;
  38303. }
  38304. function c() {
  38305. if (!n.value)
  38306. return 0;
  38307. const y = i.vnode.el;
  38308. if (!t.vertical)
  38309. return 0;
  38310. const b = t.color.get("alpha");
  38311. return y ? Math.round(b * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0;
  38312. }
  38313. function f() {
  38314. if (t.color && t.color.value) {
  38315. const { r: y, g: b, b: _ } = t.color.toRgb();
  38316. return `linear-gradient(to right, rgba(${y}, ${b}, ${_}, 0) 0%, rgba(${y}, ${b}, ${_}, 1) 100%)`;
  38317. }
  38318. return "";
  38319. }
  38320. function d() {
  38321. o.value = u(), s.value = c(), l.value = f();
  38322. }
  38323. it(() => {
  38324. if (!e.value || !n.value)
  38325. return;
  38326. const y = {
  38327. drag: (b) => {
  38328. r(b);
  38329. },
  38330. end: (b) => {
  38331. r(b);
  38332. }
  38333. };
  38334. hm(e.value, y), hm(n.value, y), d();
  38335. }), se(() => t.color.get("alpha"), () => d()), se(() => t.color.value, () => d());
  38336. const h = L(() => [a.b(), a.is("vertical", t.vertical)]), p = L(() => a.e("bar")), v = L(() => a.e("thumb")), g = L(() => ({ background: l.value })), m = L(() => ({
  38337. left: eA(o.value),
  38338. top: eA(s.value)
  38339. }));
  38340. return { rootKls: h, barKls: p, barStyle: g, thumbKls: v, thumbStyle: m, update: d };
  38341. }, QEe = "ElColorAlphaSlider", HEe = te({
  38342. name: QEe
  38343. }), GEe = /* @__PURE__ */ te({
  38344. ...HEe,
  38345. props: VEe,
  38346. setup(t, { expose: e }) {
  38347. const n = t, { bar: r, thumb: i, handleDrag: a, handleClick: o } = FEe(n), { rootKls: s, barKls: l, barStyle: u, thumbKls: c, thumbStyle: f, update: d } = WEe(n, {
  38348. bar: r,
  38349. thumb: i,
  38350. handleDrag: a
  38351. });
  38352. return e({
  38353. update: d,
  38354. bar: r,
  38355. thumb: i
  38356. }), (h, p) => (pe(), Qe("div", {
  38357. class: Ye(B(s))
  38358. }, [
  38359. He("div", {
  38360. ref_key: "bar",
  38361. ref: r,
  38362. class: Ye(B(l)),
  38363. style: Sr(B(u)),
  38364. onClick: p[0] || (p[0] = (...v) => B(o) && B(o)(...v))
  38365. }, null, 6),
  38366. He("div", {
  38367. ref_key: "thumb",
  38368. ref: i,
  38369. class: Ye(B(c)),
  38370. style: Sr(B(f))
  38371. }, null, 6)
  38372. ], 2));
  38373. }
  38374. });
  38375. var jEe = /* @__PURE__ */ Qn(GEe, [["__file", "alpha-slider.vue"]]);
  38376. const ZEe = te({
  38377. name: "ElColorHueSlider",
  38378. props: {
  38379. color: {
  38380. type: Object,
  38381. required: !0
  38382. },
  38383. vertical: Boolean
  38384. },
  38385. setup(t) {
  38386. const e = Jn("color-hue-slider"), n = vn(), r = U(), i = U(), a = U(0), o = U(0), s = L(() => t.color.get("hue"));
  38387. se(() => s.value, () => {
  38388. d();
  38389. });
  38390. function l(h) {
  38391. h.target !== r.value && u(h);
  38392. }
  38393. function u(h) {
  38394. if (!i.value || !r.value)
  38395. return;
  38396. const v = n.vnode.el.getBoundingClientRect(), { clientX: g, clientY: m } = jD(h);
  38397. let y;
  38398. if (t.vertical) {
  38399. let b = m - v.top;
  38400. b = Math.min(b, v.height - r.value.offsetHeight / 2), b = Math.max(r.value.offsetHeight / 2, b), y = Math.round((b - r.value.offsetHeight / 2) / (v.height - r.value.offsetHeight) * 360);
  38401. } else {
  38402. let b = g - v.left;
  38403. b = Math.min(b, v.width - r.value.offsetWidth / 2), b = Math.max(r.value.offsetWidth / 2, b), y = Math.round((b - r.value.offsetWidth / 2) / (v.width - r.value.offsetWidth) * 360);
  38404. }
  38405. t.color.set("hue", y);
  38406. }
  38407. function c() {
  38408. if (!r.value)
  38409. return 0;
  38410. const h = n.vnode.el;
  38411. if (t.vertical)
  38412. return 0;
  38413. const p = t.color.get("hue");
  38414. return h ? Math.round(p * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0;
  38415. }
  38416. function f() {
  38417. if (!r.value)
  38418. return 0;
  38419. const h = n.vnode.el;
  38420. if (!t.vertical)
  38421. return 0;
  38422. const p = t.color.get("hue");
  38423. return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0;
  38424. }
  38425. function d() {
  38426. a.value = c(), o.value = f();
  38427. }
  38428. return it(() => {
  38429. if (!i.value || !r.value)
  38430. return;
  38431. const h = {
  38432. drag: (p) => {
  38433. u(p);
  38434. },
  38435. end: (p) => {
  38436. u(p);
  38437. }
  38438. };
  38439. hm(i.value, h), hm(r.value, h), d();
  38440. }), {
  38441. bar: i,
  38442. thumb: r,
  38443. thumbLeft: a,
  38444. thumbTop: o,
  38445. hueValue: s,
  38446. handleClick: l,
  38447. update: d,
  38448. ns: e
  38449. };
  38450. }
  38451. });
  38452. function UEe(t, e, n, r, i, a) {
  38453. return pe(), Qe("div", {
  38454. class: Ye([t.ns.b(), t.ns.is("vertical", t.vertical)])
  38455. }, [
  38456. He("div", {
  38457. ref: "bar",
  38458. class: Ye(t.ns.e("bar")),
  38459. onClick: e[0] || (e[0] = (...o) => t.handleClick && t.handleClick(...o))
  38460. }, null, 2),
  38461. He("div", {
  38462. ref: "thumb",
  38463. class: Ye(t.ns.e("thumb")),
  38464. style: Sr({
  38465. left: t.thumbLeft + "px",
  38466. top: t.thumbTop + "px"
  38467. })
  38468. }, null, 6)
  38469. ], 2);
  38470. }
  38471. var XEe = /* @__PURE__ */ Qn(ZEe, [["render", UEe], ["__file", "hue-slider.vue"]]);
  38472. const YEe = rr({
  38473. modelValue: String,
  38474. id: String,
  38475. showAlpha: Boolean,
  38476. colorFormat: String,
  38477. disabled: Boolean,
  38478. size: $0,
  38479. popperClass: {
  38480. type: String,
  38481. default: ""
  38482. },
  38483. label: {
  38484. type: String,
  38485. default: void 0
  38486. },
  38487. tabindex: {
  38488. type: [String, Number],
  38489. default: 0
  38490. },
  38491. teleported: dR.teleported,
  38492. predefine: {
  38493. type: jt(Array)
  38494. },
  38495. validateEvent: {
  38496. type: Boolean,
  38497. default: !0
  38498. },
  38499. ...A0(["ariaLabel"])
  38500. }), qEe = {
  38501. [Qs]: (t) => ba(t) || Gl(t),
  38502. [LY]: (t) => ba(t) || Gl(t),
  38503. activeChange: (t) => ba(t) || Gl(t),
  38504. focus: (t) => t instanceof FocusEvent,
  38505. blur: (t) => t instanceof FocusEvent
  38506. }, mq = Symbol("colorPickerContextKey"), P6 = function(t, e, n) {
  38507. return [
  38508. t,
  38509. e * n / ((t = (2 - e) * n) < 1 ? t : 2 - t) || 0,
  38510. t / 2
  38511. ];
  38512. }, KEe = function(t) {
  38513. return typeof t == "string" && t.includes(".") && Number.parseFloat(t) === 1;
  38514. }, JEe = function(t) {
  38515. return typeof t == "string" && t.includes("%");
  38516. }, Yd = function(t, e) {
  38517. KEe(t) && (t = "100%");
  38518. const n = JEe(t);
  38519. return t = Math.min(e, Math.max(0, Number.parseFloat(`${t}`))), n && (t = Number.parseInt(`${t * e}`, 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : t % e / Number.parseFloat(e);
  38520. }, $6 = {
  38521. 10: "A",
  38522. 11: "B",
  38523. 12: "C",
  38524. 13: "D",
  38525. 14: "E",
  38526. 15: "F"
  38527. }, R_ = (t) => {
  38528. t = Math.min(Math.round(t), 255);
  38529. const e = Math.floor(t / 16), n = t % 16;
  38530. return `${$6[e] || e}${$6[n] || n}`;
  38531. }, A6 = function({ r: t, g: e, b: n }) {
  38532. return Number.isNaN(+t) || Number.isNaN(+e) || Number.isNaN(+n) ? "" : `#${R_(t)}${R_(e)}${R_(n)}`;
  38533. }, VC = {
  38534. A: 10,
  38535. B: 11,
  38536. C: 12,
  38537. D: 13,
  38538. E: 14,
  38539. F: 15
  38540. }, Bu = function(t) {
  38541. return t.length === 2 ? (VC[t[0].toUpperCase()] || +t[0]) * 16 + (VC[t[1].toUpperCase()] || +t[1]) : VC[t[1].toUpperCase()] || +t[1];
  38542. }, eMe = function(t, e, n) {
  38543. e = e / 100, n = n / 100;
  38544. let r = e;
  38545. const i = Math.max(n, 0.01);
  38546. n *= 2, e *= n <= 1 ? n : 2 - n, r *= i <= 1 ? i : 2 - i;
  38547. const a = (n + e) / 2, o = n === 0 ? 2 * r / (i + r) : 2 * e / (n + e);
  38548. return {
  38549. h: t,
  38550. s: o * 100,
  38551. v: a * 100
  38552. };
  38553. }, E6 = (t, e, n) => {
  38554. t = Yd(t, 255), e = Yd(e, 255), n = Yd(n, 255);
  38555. const r = Math.max(t, e, n), i = Math.min(t, e, n);
  38556. let a;
  38557. const o = r, s = r - i, l = r === 0 ? 0 : s / r;
  38558. if (r === i)
  38559. a = 0;
  38560. else {
  38561. switch (r) {
  38562. case t: {
  38563. a = (e - n) / s + (e < n ? 6 : 0);
  38564. break;
  38565. }
  38566. case e: {
  38567. a = (n - t) / s + 2;
  38568. break;
  38569. }
  38570. case n: {
  38571. a = (t - e) / s + 4;
  38572. break;
  38573. }
  38574. }
  38575. a /= 6;
  38576. }
  38577. return { h: a * 360, s: l * 100, v: o * 100 };
  38578. }, Yp = function(t, e, n) {
  38579. t = Yd(t, 360) * 6, e = Yd(e, 100), n = Yd(n, 100);
  38580. const r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
  38581. return {
  38582. r: Math.round(u * 255),
  38583. g: Math.round(c * 255),
  38584. b: Math.round(f * 255)
  38585. };
  38586. };
  38587. class _g {
  38588. constructor(e = {}) {
  38589. this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = "";
  38590. for (const n in e)
  38591. W1(e, n) && (this[n] = e[n]);
  38592. e.value ? this.fromString(e.value) : this.doOnChange();
  38593. }
  38594. set(e, n) {
  38595. if (arguments.length === 1 && typeof e == "object") {
  38596. for (const r in e)
  38597. W1(e, r) && this.set(r, e[r]);
  38598. return;
  38599. }
  38600. this[`_${e}`] = n, this.doOnChange();
  38601. }
  38602. get(e) {
  38603. return e === "alpha" ? Math.floor(this[`_${e}`]) : this[`_${e}`];
  38604. }
  38605. toRgb() {
  38606. return Yp(this._hue, this._saturation, this._value);
  38607. }
  38608. fromString(e) {
  38609. if (!e) {
  38610. this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
  38611. return;
  38612. }
  38613. const n = (r, i, a) => {
  38614. this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, i)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange();
  38615. };
  38616. if (e.includes("hsl")) {
  38617. const r = e.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
  38618. if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
  38619. const { h: i, s: a, v: o } = eMe(r[0], r[1], r[2]);
  38620. n(i, a, o);
  38621. }
  38622. } else if (e.includes("hsv")) {
  38623. const r = e.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
  38624. r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3 && n(r[0], r[1], r[2]);
  38625. } else if (e.includes("rgb")) {
  38626. const r = e.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
  38627. if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
  38628. const { h: i, s: a, v: o } = E6(r[0], r[1], r[2]);
  38629. n(i, a, o);
  38630. }
  38631. } else if (e.includes("#")) {
  38632. const r = e.replace("#", "").trim();
  38633. if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))
  38634. return;
  38635. let i, a, o;
  38636. r.length === 3 ? (i = Bu(r[0] + r[0]), a = Bu(r[1] + r[1]), o = Bu(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (i = Bu(r.slice(0, 2)), a = Bu(r.slice(2, 4)), o = Bu(r.slice(4, 6))), r.length === 8 ? this._alpha = Bu(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100);
  38637. const { h: s, s: l, v: u } = E6(i, a, o);
  38638. n(s, l, u);
  38639. }
  38640. }
  38641. compare(e) {
  38642. return Math.abs(e._hue - this._hue) < 2 && Math.abs(e._saturation - this._saturation) < 1 && Math.abs(e._value - this._value) < 1 && Math.abs(e._alpha - this._alpha) < 1;
  38643. }
  38644. doOnChange() {
  38645. const { _hue: e, _saturation: n, _value: r, _alpha: i, format: a } = this;
  38646. if (this.enableAlpha)
  38647. switch (a) {
  38648. case "hsl": {
  38649. const o = P6(e, n / 100, r / 100);
  38650. this.value = `hsla(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%, ${this.get("alpha") / 100})`;
  38651. break;
  38652. }
  38653. case "hsv": {
  38654. this.value = `hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`;
  38655. break;
  38656. }
  38657. case "hex": {
  38658. this.value = `${A6(Yp(e, n, r))}${R_(i * 255 / 100)}`;
  38659. break;
  38660. }
  38661. default: {
  38662. const { r: o, g: s, b: l } = Yp(e, n, r);
  38663. this.value = `rgba(${o}, ${s}, ${l}, ${this.get("alpha") / 100})`;
  38664. }
  38665. }
  38666. else
  38667. switch (a) {
  38668. case "hsl": {
  38669. const o = P6(e, n / 100, r / 100);
  38670. this.value = `hsl(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%)`;
  38671. break;
  38672. }
  38673. case "hsv": {
  38674. this.value = `hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;
  38675. break;
  38676. }
  38677. case "rgb": {
  38678. const { r: o, g: s, b: l } = Yp(e, n, r);
  38679. this.value = `rgb(${o}, ${s}, ${l})`;
  38680. break;
  38681. }
  38682. default:
  38683. this.value = A6(Yp(e, n, r));
  38684. }
  38685. }
  38686. }
  38687. const tMe = te({
  38688. props: {
  38689. colors: {
  38690. type: Array,
  38691. required: !0
  38692. },
  38693. color: {
  38694. type: Object,
  38695. required: !0
  38696. },
  38697. enableAlpha: {
  38698. type: Boolean,
  38699. required: !0
  38700. }
  38701. },
  38702. setup(t) {
  38703. const e = Jn("color-predefine"), { currentColor: n } = Ge(mq), r = U(a(t.colors, t.color));
  38704. se(() => n.value, (o) => {
  38705. const s = new _g();
  38706. s.fromString(o), r.value.forEach((l) => {
  38707. l.selected = s.compare(l);
  38708. });
  38709. }), ht(() => {
  38710. r.value = a(t.colors, t.color);
  38711. });
  38712. function i(o) {
  38713. t.color.fromString(t.colors[o]);
  38714. }
  38715. function a(o, s) {
  38716. return o.map((l) => {
  38717. const u = new _g();
  38718. return u.enableAlpha = t.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u;
  38719. });
  38720. }
  38721. return {
  38722. rgbaColors: r,
  38723. handleSelect: i,
  38724. ns: e
  38725. };
  38726. }
  38727. }), nMe = ["onClick"];
  38728. function rMe(t, e, n, r, i, a) {
  38729. return pe(), Qe("div", {
  38730. class: Ye(t.ns.b())
  38731. }, [
  38732. He("div", {
  38733. class: Ye(t.ns.e("colors"))
  38734. }, [
  38735. (pe(!0), Qe(wt, null, ag(t.rgbaColors, (o, s) => (pe(), Qe("div", {
  38736. key: t.colors[s],
  38737. class: Ye([
  38738. t.ns.e("color-selector"),
  38739. t.ns.is("alpha", o._alpha < 100),
  38740. { selected: o.selected }
  38741. ]),
  38742. onClick: (l) => t.handleSelect(s)
  38743. }, [
  38744. He("div", {
  38745. style: Sr({ backgroundColor: o.value })
  38746. }, null, 4)
  38747. ], 10, nMe))), 128))
  38748. ], 2)
  38749. ], 2);
  38750. }
  38751. var iMe = /* @__PURE__ */ Qn(tMe, [["render", rMe], ["__file", "predefine.vue"]]);
  38752. const aMe = te({
  38753. name: "ElSlPanel",
  38754. props: {
  38755. color: {
  38756. type: Object,
  38757. required: !0
  38758. }
  38759. },
  38760. setup(t) {
  38761. const e = Jn("color-svpanel"), n = vn(), r = U(0), i = U(0), a = U("hsl(0, 100%, 50%)"), o = L(() => {
  38762. const u = t.color.get("hue"), c = t.color.get("value");
  38763. return { hue: u, value: c };
  38764. });
  38765. function s() {
  38766. const u = t.color.get("saturation"), c = t.color.get("value"), f = n.vnode.el, { clientWidth: d, clientHeight: h } = f;
  38767. i.value = u * d / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${t.color.get("hue")}, 100%, 50%)`;
  38768. }
  38769. function l(u) {
  38770. const f = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: h } = jD(u);
  38771. let p = d - f.left, v = h - f.top;
  38772. p = Math.max(0, p), p = Math.min(p, f.width), v = Math.max(0, v), v = Math.min(v, f.height), i.value = p, r.value = v, t.color.set({
  38773. saturation: p / f.width * 100,
  38774. value: 100 - v / f.height * 100
  38775. });
  38776. }
  38777. return se(() => o.value, () => {
  38778. s();
  38779. }), it(() => {
  38780. hm(n.vnode.el, {
  38781. drag: (u) => {
  38782. l(u);
  38783. },
  38784. end: (u) => {
  38785. l(u);
  38786. }
  38787. }), s();
  38788. }), {
  38789. cursorTop: r,
  38790. cursorLeft: i,
  38791. background: a,
  38792. colorValue: o,
  38793. handleDrag: l,
  38794. update: s,
  38795. ns: e
  38796. };
  38797. }
  38798. }), oMe = /* @__PURE__ */ He("div", null, null, -1), sMe = [
  38799. oMe
  38800. ];
  38801. function lMe(t, e, n, r, i, a) {
  38802. return pe(), Qe("div", {
  38803. class: Ye(t.ns.b()),
  38804. style: Sr({
  38805. backgroundColor: t.background
  38806. })
  38807. }, [
  38808. He("div", {
  38809. class: Ye(t.ns.e("white"))
  38810. }, null, 2),
  38811. He("div", {
  38812. class: Ye(t.ns.e("black"))
  38813. }, null, 2),
  38814. He("div", {
  38815. class: Ye(t.ns.e("cursor")),
  38816. style: Sr({
  38817. top: t.cursorTop + "px",
  38818. left: t.cursorLeft + "px"
  38819. })
  38820. }, sMe, 6)
  38821. ], 6);
  38822. }
  38823. var uMe = /* @__PURE__ */ Qn(aMe, [["render", lMe], ["__file", "sv-panel.vue"]]);
  38824. const cMe = ["onKeydown"], fMe = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"], dMe = te({
  38825. name: "ElColorPicker"
  38826. }), hMe = /* @__PURE__ */ te({
  38827. ...dMe,
  38828. props: YEe,
  38829. emits: qEe,
  38830. setup(t, { expose: e, emit: n }) {
  38831. const r = t, { t: i } = w$e(), a = Jn("color"), { formItem: o } = Ax(), s = $x(), l = E0(), { inputId: u, isLabeledByFormItem: c } = oR(r, {
  38832. formItemContext: o
  38833. }), f = U(), d = U(), h = U(), p = U(), v = U(), g = U(), {
  38834. isFocused: m,
  38835. handleFocus: y,
  38836. handleBlur: b
  38837. } = JY(v, {
  38838. beforeBlur(H) {
  38839. var G;
  38840. return (G = p.value) == null ? void 0 : G.isFocusInsideContent(H);
  38841. },
  38842. afterBlur() {
  38843. R(!1), W();
  38844. }
  38845. }), _ = (H) => {
  38846. if (l.value)
  38847. return X();
  38848. y(H);
  38849. };
  38850. let O = !0;
  38851. const S = tn(new _g({
  38852. enableAlpha: r.showAlpha,
  38853. format: r.colorFormat || "",
  38854. value: r.modelValue
  38855. })), x = U(!1), C = U(!1), T = U(""), w = L(() => !r.modelValue && !C.value ? "transparent" : E(S, r.showAlpha)), P = L(() => !r.modelValue && !C.value ? "" : S.value), $ = L(() => c.value ? void 0 : r.label || r.ariaLabel || i("el.colorpicker.defaultLabel"));
  38856. C0({
  38857. from: "label",
  38858. replacement: "aria-label",
  38859. version: "2.8.0",
  38860. scope: "el-color-picker",
  38861. ref: "https://element-plus.org/en-US/component/color-picker.html"
  38862. }, L(() => !!r.label));
  38863. const A = L(() => c.value ? o == null ? void 0 : o.labelId : void 0), D = L(() => [
  38864. a.b("picker"),
  38865. a.is("disabled", l.value),
  38866. a.bm("picker", s.value),
  38867. a.is("focused", m.value)
  38868. ]);
  38869. function E(H, G) {
  38870. if (!(H instanceof _g))
  38871. throw new TypeError("color should be instance of _color Class");
  38872. const { r: re, g: fe, b: de } = H.toRgb();
  38873. return G ? `rgba(${re}, ${fe}, ${de}, ${H.get("alpha") / 100})` : `rgb(${re}, ${fe}, ${de})`;
  38874. }
  38875. function R(H) {
  38876. x.value = H;
  38877. }
  38878. const N = UI(R, 100, { leading: !0 });
  38879. function V() {
  38880. l.value || R(!0);
  38881. }
  38882. function z() {
  38883. N(!1), W();
  38884. }
  38885. function W() {
  38886. Tt(() => {
  38887. r.modelValue ? S.fromString(r.modelValue) : (S.value = "", Tt(() => {
  38888. C.value = !1;
  38889. }));
  38890. });
  38891. }
  38892. function F() {
  38893. l.value || N(!x.value);
  38894. }
  38895. function Q() {
  38896. S.fromString(T.value);
  38897. }
  38898. function Z() {
  38899. const H = S.value;
  38900. n(Qs, H), n("change", H), r.validateEvent && (o == null || o.validate("change").catch((G) => Gi(G))), N(!1), Tt(() => {
  38901. const G = new _g({
  38902. enableAlpha: r.showAlpha,
  38903. format: r.colorFormat || "",
  38904. value: r.modelValue
  38905. });
  38906. S.compare(G) || W();
  38907. });
  38908. }
  38909. function ne() {
  38910. N(!1), n(Qs, null), n("change", null), r.modelValue !== null && r.validateEvent && (o == null || o.validate("change").catch((H) => Gi(H))), W();
  38911. }
  38912. function ee(H) {
  38913. if (x.value && (z(), m.value)) {
  38914. const G = new FocusEvent("focus", H);
  38915. b(G);
  38916. }
  38917. }
  38918. function oe(H) {
  38919. H.preventDefault(), H.stopPropagation(), R(!1), W();
  38920. }
  38921. function K(H) {
  38922. switch (H.code) {
  38923. case Xc.enter:
  38924. case Xc.space:
  38925. H.preventDefault(), H.stopPropagation(), V(), g.value.focus();
  38926. break;
  38927. case Xc.esc:
  38928. oe(H);
  38929. break;
  38930. }
  38931. }
  38932. function ie() {
  38933. v.value.focus();
  38934. }
  38935. function X() {
  38936. v.value.blur();
  38937. }
  38938. return it(() => {
  38939. r.modelValue && (T.value = P.value);
  38940. }), se(() => r.modelValue, (H) => {
  38941. H ? H && H !== S.value && (O = !1, S.fromString(H)) : C.value = !1;
  38942. }), se(() => P.value, (H) => {
  38943. T.value = H, O && n("activeChange", H), O = !0;
  38944. }), se(() => S.value, () => {
  38945. !r.modelValue && !C.value && (C.value = !0);
  38946. }), se(() => x.value, () => {
  38947. Tt(() => {
  38948. var H, G, re;
  38949. (H = f.value) == null || H.update(), (G = d.value) == null || G.update(), (re = h.value) == null || re.update();
  38950. });
  38951. }), pt(mq, {
  38952. currentColor: P
  38953. }), e({
  38954. color: S,
  38955. show: V,
  38956. hide: z,
  38957. focus: ie,
  38958. blur: X
  38959. }), (H, G) => (pe(), je(B(hEe), {
  38960. ref_key: "popper",
  38961. ref: p,
  38962. visible: x.value,
  38963. "show-arrow": !1,
  38964. "fallback-placements": ["bottom", "top", "right", "left"],
  38965. offset: 0,
  38966. "gpu-acceleration": !1,
  38967. "popper-class": [B(a).be("picker", "panel"), B(a).b("dropdown"), H.popperClass],
  38968. "stop-popper-mouse-event": !1,
  38969. effect: "light",
  38970. trigger: "click",
  38971. teleported: H.teleported,
  38972. transition: `${B(a).namespace.value}-zoom-in-top`,
  38973. persistent: "",
  38974. onHide: G[2] || (G[2] = (re) => R(!1))
  38975. }, {
  38976. content: we(() => [
  38977. bi((pe(), Qe("div", {
  38978. onKeydown: Y4(oe, ["esc"])
  38979. }, [
  38980. He("div", {
  38981. class: Ye(B(a).be("dropdown", "main-wrapper"))
  38982. }, [
  38983. M(XEe, {
  38984. ref_key: "hue",
  38985. ref: f,
  38986. class: "hue-slider",
  38987. color: B(S),
  38988. vertical: ""
  38989. }, null, 8, ["color"]),
  38990. M(uMe, {
  38991. ref_key: "sv",
  38992. ref: d,
  38993. color: B(S)
  38994. }, null, 8, ["color"])
  38995. ], 2),
  38996. H.showAlpha ? (pe(), je(jEe, {
  38997. key: 0,
  38998. ref_key: "alpha",
  38999. ref: h,
  39000. color: B(S)
  39001. }, null, 8, ["color"])) : _t("v-if", !0),
  39002. H.predefine ? (pe(), je(iMe, {
  39003. key: 1,
  39004. ref: "predefine",
  39005. "enable-alpha": H.showAlpha,
  39006. color: B(S),
  39007. colors: H.predefine
  39008. }, null, 8, ["enable-alpha", "color", "colors"])) : _t("v-if", !0),
  39009. He("div", {
  39010. class: Ye(B(a).be("dropdown", "btns"))
  39011. }, [
  39012. He("span", {
  39013. class: Ye(B(a).be("dropdown", "value"))
  39014. }, [
  39015. M(B(sR), {
  39016. ref_key: "inputRef",
  39017. ref: g,
  39018. modelValue: T.value,
  39019. "onUpdate:modelValue": G[0] || (G[0] = (re) => T.value = re),
  39020. "validate-event": !1,
  39021. size: "small",
  39022. onKeyup: Y4(Q, ["enter"]),
  39023. onBlur: Q
  39024. }, null, 8, ["modelValue", "onKeyup"])
  39025. ], 2),
  39026. M(B(w6), {
  39027. class: Ye(B(a).be("dropdown", "link-btn")),
  39028. text: "",
  39029. size: "small",
  39030. onClick: ne
  39031. }, {
  39032. default: we(() => [
  39033. Kt(Bi(B(i)("el.colorpicker.clear")), 1)
  39034. ]),
  39035. _: 1
  39036. }, 8, ["class"]),
  39037. M(B(w6), {
  39038. plain: "",
  39039. size: "small",
  39040. class: Ye(B(a).be("dropdown", "btn")),
  39041. onClick: Z
  39042. }, {
  39043. default: we(() => [
  39044. Kt(Bi(B(i)("el.colorpicker.confirm")), 1)
  39045. ]),
  39046. _: 1
  39047. }, 8, ["class"])
  39048. ], 2)
  39049. ], 40, cMe)), [
  39050. [B(CEe), ee]
  39051. ])
  39052. ]),
  39053. default: we(() => [
  39054. He("div", _n({
  39055. id: B(u),
  39056. ref_key: "triggerRef",
  39057. ref: v
  39058. }, H.$attrs, {
  39059. class: B(D),
  39060. role: "button",
  39061. "aria-label": B($),
  39062. "aria-labelledby": B(A),
  39063. "aria-description": B(i)("el.colorpicker.description", { color: H.modelValue || "" }),
  39064. "aria-disabled": B(l),
  39065. tabindex: B(l) ? -1 : H.tabindex,
  39066. onKeydown: K,
  39067. onFocus: _,
  39068. onBlur: G[1] || (G[1] = (...re) => B(b) && B(b)(...re))
  39069. }), [
  39070. B(l) ? (pe(), Qe("div", {
  39071. key: 0,
  39072. class: Ye(B(a).be("picker", "mask"))
  39073. }, null, 2)) : _t("v-if", !0),
  39074. He("div", {
  39075. class: Ye(B(a).be("picker", "trigger")),
  39076. onClick: F
  39077. }, [
  39078. He("span", {
  39079. class: Ye([B(a).be("picker", "color"), B(a).is("alpha", H.showAlpha)])
  39080. }, [
  39081. He("span", {
  39082. class: Ye(B(a).be("picker", "color-inner")),
  39083. style: Sr({
  39084. backgroundColor: B(w)
  39085. })
  39086. }, [
  39087. bi(M(B(ws), {
  39088. class: Ye([B(a).be("picker", "icon"), B(a).is("icon-arrow-down")])
  39089. }, {
  39090. default: we(() => [
  39091. M(B(e$e))
  39092. ]),
  39093. _: 1
  39094. }, 8, ["class"]), [
  39095. [Bs, H.modelValue || C.value]
  39096. ]),
  39097. bi(M(B(ws), {
  39098. class: Ye([B(a).be("picker", "empty"), B(a).is("icon-close")])
  39099. }, {
  39100. default: we(() => [
  39101. M(B(a$e))
  39102. ]),
  39103. _: 1
  39104. }, 8, ["class"]), [
  39105. [Bs, !H.modelValue && !C.value]
  39106. ])
  39107. ], 6)
  39108. ], 2)
  39109. ], 2)
  39110. ], 16, fMe)
  39111. ]),
  39112. _: 1
  39113. }, 8, ["visible", "popper-class", "teleported", "transition"]));
  39114. }
  39115. });
  39116. var pMe = /* @__PURE__ */ Qn(hMe, [["__file", "color-picker.vue"]]);
  39117. const qd = Df(pMe), yq = (t) => (AS("data-v-70598cf2"), t = t(), ES(), t), vMe = {
  39118. key: 0,
  39119. class: "color-box"
  39120. }, gMe = { class: "img-preview" }, mMe = /* @__PURE__ */ yq(() => /* @__PURE__ */ He("div", { class: "img-empty" }, "未选择", -1)), yMe = /* @__PURE__ */ yq(() => /* @__PURE__ */ He("div", { class: "img-tip" }, "选择素材", -1)), bMe = /* @__PURE__ */ te({
  39121. __name: "BackgroundSelect",
  39122. props: {
  39123. value: { default: () => ({
  39124. type: "none",
  39125. color: "",
  39126. image: "",
  39127. fillType: ""
  39128. }) },
  39129. filterOptions: {}
  39130. },
  39131. emits: ["update:value"],
  39132. setup(t, { emit: e }) {
  39133. const n = t, r = e, i = U(n.value), a = [
  39134. { label: "无", value: "none" },
  39135. { label: "颜色", value: "color" },
  39136. { label: "图片", value: "image" }
  39137. ], o = L(() => n.filterOptions ? a.filter((l) => {
  39138. var u;
  39139. return !((u = n.filterOptions) != null && u.includes(l.value));
  39140. }) : a);
  39141. se(
  39142. () => i.value,
  39143. () => {
  39144. r("update:value", i.value);
  39145. },
  39146. {
  39147. deep: !0
  39148. }
  39149. );
  39150. const s = (l) => {
  39151. l === "color" && !i.value.color && (i.value.color = "#0B074BFF");
  39152. };
  39153. return (l, u) => (pe(), Qe(wt, null, [
  39154. M(B(ci), {
  39155. value: i.value.type,
  39156. "onUpdate:value": u[0] || (u[0] = (c) => i.value.type = c),
  39157. style: { width: "100%" },
  39158. options: o.value,
  39159. onChange: s
  39160. }, null, 8, ["value", "options"]),
  39161. i.value.type === "color" ? (pe(), Qe("div", vMe, [
  39162. M(B(qd), {
  39163. modelValue: i.value.color,
  39164. "onUpdate:modelValue": u[1] || (u[1] = (c) => i.value.color = c),
  39165. "color-format": "hex",
  39166. "show-alpha": "",
  39167. size: "small"
  39168. }, null, 8, ["modelValue"]),
  39169. M(B(sR), {
  39170. modelValue: i.value.color,
  39171. "onUpdate:modelValue": u[2] || (u[2] = (c) => i.value.color = c),
  39172. size: "small"
  39173. }, null, 8, ["modelValue"])
  39174. ])) : i.value.type === "image" ? (pe(), Qe(wt, { key: 1 }, [
  39175. He("div", gMe, [
  39176. mMe,
  39177. M(B(Al), {
  39178. src: i.value.image
  39179. }, null, 8, ["src"]),
  39180. yMe
  39181. ]),
  39182. M(B(gq), {
  39183. modelValue: i.value.fillType,
  39184. "onUpdate:modelValue": u[3] || (u[3] = (c) => i.value.fillType = c)
  39185. }, {
  39186. default: we(() => [
  39187. M(B(bg), { value: "cover" }, {
  39188. default: we(() => [
  39189. Kt("填充")
  39190. ]),
  39191. _: 1
  39192. }),
  39193. M(B(bg), { value: "contain" }, {
  39194. default: we(() => [
  39195. Kt("适应")
  39196. ]),
  39197. _: 1
  39198. }),
  39199. M(B(bg), { value: "stretch" }, {
  39200. default: we(() => [
  39201. Kt("拉伸")
  39202. ]),
  39203. _: 1
  39204. })
  39205. ]),
  39206. _: 1
  39207. }, 8, ["modelValue"])
  39208. ], 64)) : _t("", !0)
  39209. ], 64));
  39210. }
  39211. }), po = (t, e) => {
  39212. const n = t.__vccOpts || t;
  39213. for (const [r, i] of e)
  39214. n[r] = i;
  39215. return n;
  39216. }, _Me = /* @__PURE__ */ po(bMe, [["__scopeId", "data-v-70598cf2"]]), OMe = /* @__PURE__ */ te({
  39217. __name: "ColorSelect",
  39218. props: {
  39219. value: {},
  39220. gradient: { type: Boolean, default: !0 }
  39221. },
  39222. emits: ["update:value"],
  39223. setup(t, { emit: e }) {
  39224. var s, l;
  39225. const n = e, r = t, i = U(((s = r.value) == null ? void 0 : s.length) <= 9 || !r.value ? "pure" : "gradient"), a = U(r.value), o = U(((l = r.value) == null ? void 0 : l.length) >= 9 ? r.value.slice(22).replace(")", "").split(",") : ["#4ba9ff", "#fff"]);
  39226. return se(
  39227. () => [i.value, a.value, o.value],
  39228. () => {
  39229. i.value === "pure" ? a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value : a.value = `linear-gradient(90deg, ${o.value.join(",")})`, n("update:value", a.value);
  39230. },
  39231. {
  39232. deep: !0
  39233. }
  39234. ), se(
  39235. () => r.gradient,
  39236. (u) => {
  39237. u || (i.value = "pure", a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value);
  39238. }
  39239. ), (u, c) => (pe(), Qe(wt, null, [
  39240. u.gradient ? (pe(), je(B(gq), {
  39241. key: 0,
  39242. modelValue: i.value,
  39243. "onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
  39244. size: "small",
  39245. style: { width: "100%" }
  39246. }, {
  39247. default: we(() => [
  39248. M(B(bg), { value: "pure" }, {
  39249. default: we(() => [
  39250. Kt("单色")
  39251. ]),
  39252. _: 1
  39253. }),
  39254. M(B(bg), { value: "gradient" }, {
  39255. default: we(() => [
  39256. Kt("渐变色")
  39257. ]),
  39258. _: 1
  39259. })
  39260. ]),
  39261. _: 1
  39262. }, 8, ["modelValue"])) : _t("", !0),
  39263. i.value === "pure" ? (pe(), Qe("div", {
  39264. key: 1,
  39265. class: "color-box",
  39266. style: Sr({ marginTop: u.gradient ? "12px" : "0" })
  39267. }, [
  39268. M(B(qd), {
  39269. modelValue: a.value,
  39270. "onUpdate:modelValue": c[1] || (c[1] = (f) => a.value = f),
  39271. "color-format": "hex",
  39272. "show-alpha": "",
  39273. size: "small"
  39274. }, null, 8, ["modelValue"]),
  39275. M(B(sR), {
  39276. modelValue: a.value,
  39277. "onUpdate:modelValue": c[2] || (c[2] = (f) => a.value = f),
  39278. size: "small"
  39279. }, null, 8, ["modelValue"])
  39280. ], 4)) : i.value === "gradient" ? (pe(), Qe("div", {
  39281. key: 2,
  39282. class: "gradient-box",
  39283. style: Sr({ background: a.value })
  39284. }, [
  39285. M(B(qd), {
  39286. modelValue: o.value[0],
  39287. "onUpdate:modelValue": c[3] || (c[3] = (f) => o.value[0] = f),
  39288. "color-format": "hex",
  39289. "show-alpha": "",
  39290. size: "small"
  39291. }, null, 8, ["modelValue"]),
  39292. M(B(qd), {
  39293. modelValue: o.value[1],
  39294. "onUpdate:modelValue": c[4] || (c[4] = (f) => o.value[1] = f),
  39295. "color-format": "hex",
  39296. "show-alpha": "",
  39297. size: "small"
  39298. }, null, 8, ["modelValue"])
  39299. ], 4)) : _t("", !0)
  39300. ], 64));
  39301. }
  39302. }), SMe = /* @__PURE__ */ po(OMe, [["__scopeId", "data-v-d5768739"]]), Z1 = [
  39303. {
  39304. name: "清新",
  39305. color: ["#00a8e1", "#99cc00", "#e30039", "#fcd300", "#800080"]
  39306. },
  39307. {
  39308. name: "复古",
  39309. color: ["#FFA69E", "#FAE3D9", "#B8F2E6", "#56E39F", "#3A837D"]
  39310. },
  39311. {
  39312. name: "商务",
  39313. color: ["#194f97", "#555555", "#bd6b08", "#00686b", "#c82d31"]
  39314. },
  39315. {
  39316. name: "经典",
  39317. color: ["#002c53", "#ffa510", "#0c84c6", "#ffffff", "#f74d4d"]
  39318. },
  39319. {
  39320. name: "怀旧",
  39321. color: ["#3b6291", "#943c39", "#779043", "#624c7c", "#388498"]
  39322. }
  39323. ], xMe = {
  39324. // 调色盘-预设颜色
  39325. color: Z1[0].color,
  39326. // 标题
  39327. title: {
  39328. show: !0,
  39329. left: "center",
  39330. top: 8,
  39331. textStyle: {
  39332. color: "#FFFFFFFF",
  39333. fontSize: 16,
  39334. fontWeight: "normal"
  39335. }
  39336. },
  39337. // 图例
  39338. legend: {
  39339. show: !0,
  39340. textStyle: {
  39341. color: "#FFFFFFFF"
  39342. },
  39343. top: 32
  39344. },
  39345. // 布局
  39346. grid: {
  39347. bottom: 34,
  39348. right: 20,
  39349. left: 50,
  39350. top: 60
  39351. },
  39352. // x轴
  39353. xAxis: {
  39354. type: "category",
  39355. name: "",
  39356. nameLocation: "middle",
  39357. nameTruncate: {
  39358. ellipsis: "...",
  39359. maxWidth: 80
  39360. },
  39361. nameTextStyle: {
  39362. color: "#FFFFFFFF",
  39363. fontSize: 12,
  39364. fontWeight: "normal",
  39365. fontStyle: "normal"
  39366. },
  39367. axisLabel: {
  39368. show: !0,
  39369. color: "#9fadbf",
  39370. fontSize: 12,
  39371. fontWeight: "normal",
  39372. fontStyle: "normal"
  39373. },
  39374. axisLine: {
  39375. show: !0,
  39376. lineStyle: {
  39377. width: 1
  39378. }
  39379. },
  39380. axisTick: {
  39381. show: !0,
  39382. lineStyle: {
  39383. width: 1,
  39384. color: "#ccc"
  39385. }
  39386. }
  39387. },
  39388. // y轴
  39389. yAxis: {
  39390. splitLine: {
  39391. show: !0,
  39392. lineStyle: {
  39393. type: "dashed",
  39394. color: "#36485f"
  39395. }
  39396. },
  39397. type: "category",
  39398. name: "",
  39399. nameLocation: "middle",
  39400. nameTruncate: {
  39401. ellipsis: "...",
  39402. maxWidth: 80
  39403. },
  39404. nameTextStyle: {
  39405. color: "#FFFFFFFF",
  39406. fontSize: 12,
  39407. fontWeight: "normal",
  39408. fontStyle: "normal"
  39409. },
  39410. axisLabel: {
  39411. show: !0,
  39412. color: "#9fadbf",
  39413. fontSize: 12,
  39414. fontWeight: "normal",
  39415. fontStyle: "normal",
  39416. rotate: 0
  39417. },
  39418. axisLine: {
  39419. show: !1,
  39420. lineStyle: {
  39421. width: 1,
  39422. color: "#ccc"
  39423. }
  39424. },
  39425. axisTick: {
  39426. show: !1,
  39427. lineStyle: {
  39428. width: 1,
  39429. color: "#ccc"
  39430. }
  39431. }
  39432. },
  39433. // 提示
  39434. tooltip: {
  39435. show: !0,
  39436. trigger: "axis",
  39437. formatter: "{b} {c}",
  39438. // valueFormatter: "(value, dataIndex) => value",
  39439. axisPointer: {
  39440. type: "line"
  39441. },
  39442. textStyle: {
  39443. color: "#000000FF",
  39444. fontSize: 12,
  39445. fontWeight: "normal",
  39446. fontStyle: "normal"
  39447. },
  39448. padding: 10,
  39449. borderWidth: 1,
  39450. borderColor: "#ccc",
  39451. borderRadius: 4,
  39452. backgroundColor: "#FFFFFFFF",
  39453. extraCssText: ""
  39454. }
  39455. }, wMe = { class: "color-list" }, CMe = { class: "del-btn" }, TMe = /* @__PURE__ */ te({
  39456. __name: "ColorScheme",
  39457. props: {
  39458. value: {
  39459. type: Array,
  39460. default: () => []
  39461. }
  39462. },
  39463. emits: ["update:value"],
  39464. setup(t, { emit: e }) {
  39465. const n = t, r = Z1.map((d) => d.color.join(",")), i = e, a = U(r.includes(n.value.join(",")) ? n.value.join(",") : "custom"), o = U(n.value), s = U();
  39466. function l(d) {
  39467. d === "custom" || (o.value = d.split(","), i("update:value", d.split(",")));
  39468. }
  39469. const u = () => {
  39470. var d;
  39471. (d = s.value) == null || d.show();
  39472. };
  39473. function c(d) {
  39474. o.value.push(d), a.value = "custom", i("update:value", o.value);
  39475. }
  39476. const f = (d) => {
  39477. o.value.splice(d, 1), a.value = "custom", i("update:value", o.value);
  39478. };
  39479. return (d, h) => (pe(), Qe("div", null, [
  39480. M(B(ci), {
  39481. value: a.value,
  39482. "onUpdate:value": h[0] || (h[0] = (p) => a.value = p),
  39483. size: "small",
  39484. style: { width: "100%" },
  39485. onChange: l
  39486. }, {
  39487. default: we(() => [
  39488. (pe(!0), Qe(wt, null, ag(B(Z1), (p) => (pe(), je(B(M1), {
  39489. key: p.name,
  39490. value: p.color.join(",")
  39491. }, {
  39492. default: we(() => [
  39493. (pe(!0), Qe(wt, null, ag(p.color.slice(0, 5), (v) => (pe(), Qe("span", {
  39494. class: "color-block",
  39495. key: v,
  39496. style: Sr({ background: v })
  39497. }, null, 4))), 128)),
  39498. Kt(" " + Bi(p.name), 1)
  39499. ]),
  39500. _: 2
  39501. }, 1032, ["value"]))), 128)),
  39502. M(B(M1), { value: "custom" }, {
  39503. default: we(() => [
  39504. Kt("自定义组合")
  39505. ]),
  39506. _: 1
  39507. })
  39508. ]),
  39509. _: 1
  39510. }, 8, ["value"]),
  39511. He("div", wMe, [
  39512. (pe(!0), Qe(wt, null, ag(o.value, (p, v) => (pe(), Qe("span", {
  39513. class: "color-block",
  39514. key: v,
  39515. style: Sr({ background: p })
  39516. }, [
  39517. He("span", CMe, [
  39518. M(B(Da), {
  39519. onClick: (g) => f(v)
  39520. }, null, 8, ["onClick"])
  39521. ])
  39522. ], 4))), 128)),
  39523. He("span", {
  39524. class: "color-block cus-btn",
  39525. onClick: u
  39526. }, [
  39527. M(B(yx))
  39528. ]),
  39529. M(B(qd), {
  39530. ref_key: "colorPickerRef",
  39531. ref: s,
  39532. style: { width: "0", height: "0", opacity: "0" },
  39533. onChange: c
  39534. }, null, 512)
  39535. ])
  39536. ]));
  39537. }
  39538. }), PMe = /* @__PURE__ */ po(TMe, [["__scopeId", "data-v-b29b1b78"]]), $Me = { class: "position" }, AMe = /* @__PURE__ */ te({
  39539. __name: "Position",
  39540. props: {
  39541. value: {},
  39542. type: { default: "line" }
  39543. },
  39544. emits: ["update:value"],
  39545. setup(t) {
  39546. return (e, n) => (pe(), Qe("div", $Me, [
  39547. e.type === "line" ? (pe(), je(B(vf), {
  39548. key: 0,
  39549. value: e.value,
  39550. onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r.target.value))
  39551. }, {
  39552. default: we(() => [
  39553. M(B(Io), { value: "left" }, {
  39554. default: we(() => [
  39555. M(B(MD))
  39556. ]),
  39557. _: 1
  39558. }),
  39559. M(B(Io), { value: "center" }, {
  39560. default: we(() => [
  39561. M(B(ED))
  39562. ]),
  39563. _: 1
  39564. }),
  39565. M(B(Io), { value: "right" }, {
  39566. default: we(() => [
  39567. M(B(ID))
  39568. ]),
  39569. _: 1
  39570. })
  39571. ]),
  39572. _: 1
  39573. }, 8, ["value"])) : e.type === "round" ? (pe(), je(B(vf), {
  39574. key: 1,
  39575. value: e.value,
  39576. onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r.target.value))
  39577. }, {
  39578. default: we(() => [
  39579. M(B(Io), { value: "top" }, {
  39580. default: we(() => [
  39581. M(B(ND))
  39582. ]),
  39583. _: 1
  39584. }),
  39585. M(B(Io), { value: "bottom" }, {
  39586. default: we(() => [
  39587. M(B(RD))
  39588. ]),
  39589. _: 1
  39590. }),
  39591. M(B(Io), { value: "left" }, {
  39592. default: we(() => [
  39593. M(B(kD))
  39594. ]),
  39595. _: 1
  39596. }),
  39597. M(B(Io), { value: "right" }, {
  39598. default: we(() => [
  39599. M(B(LD))
  39600. ]),
  39601. _: 1
  39602. })
  39603. ]),
  39604. _: 1
  39605. }, 8, ["value"])) : _t("", !0)
  39606. ]));
  39607. }
  39608. }), EMe = /* @__PURE__ */ po(AMe, [["__scopeId", "data-v-a4b8591a"]]), MMe = { class: "font-style" }, IMe = { class: "cus-btn" }, DMe = /* @__PURE__ */ te({
  39609. __name: "FontStyle",
  39610. props: {
  39611. value: {}
  39612. },
  39613. emits: ["update:value"],
  39614. setup(t, { emit: e }) {
  39615. var v, g, m, y;
  39616. const n = t, r = e, i = U((v = n.value) == null ? void 0 : v.bold), a = U((g = n.value) == null ? void 0 : g.italic), o = U((m = n.value) == null ? void 0 : m.size), s = U((y = n.value) == null ? void 0 : y.color), l = U(), u = () => {
  39617. r("update:value", {
  39618. size: o.value,
  39619. bold: i.value,
  39620. italic: a.value,
  39621. color: s.value
  39622. });
  39623. }, c = () => {
  39624. i.value = !i.value, u();
  39625. }, f = () => {
  39626. a.value = !a.value, u();
  39627. };
  39628. function d(b) {
  39629. s.value = b, u();
  39630. }
  39631. function h(b) {
  39632. o.value = b, u();
  39633. }
  39634. const p = () => {
  39635. var b;
  39636. (b = l.value) == null || b.show();
  39637. };
  39638. return (b, _) => (pe(), Qe("div", MMe, [
  39639. M(B(Ur), {
  39640. size: "small",
  39641. onClick: p
  39642. }, {
  39643. default: we(() => [
  39644. He("span", IMe, [
  39645. M(B(BD)),
  39646. He("div", {
  39647. class: "color-block",
  39648. style: Sr({ background: s.value })
  39649. }, null, 4),
  39650. M(B(qd), {
  39651. ref_key: "colorPickerRef",
  39652. ref: l,
  39653. style: { width: "0", height: "0", opacity: "0" },
  39654. value: s.value,
  39655. "onUpdate:value": _[0] || (_[0] = (O) => s.value = O),
  39656. onChange: d
  39657. }, null, 8, ["value"])
  39658. ])
  39659. ]),
  39660. _: 1
  39661. }),
  39662. M(B(Ur), {
  39663. size: "small",
  39664. onClick: c
  39665. }, {
  39666. default: we(() => [
  39667. He("span", {
  39668. class: Ye(["cus-btn", { "active-btn": i.value }])
  39669. }, [
  39670. M(B(DD))
  39671. ], 2)
  39672. ]),
  39673. _: 1
  39674. }),
  39675. M(B(Ur), {
  39676. size: "small",
  39677. onClick: f
  39678. }, {
  39679. default: we(() => [
  39680. He("span", {
  39681. class: Ye(["cus-btn", { "active-btn": a.value }])
  39682. }, [
  39683. M(B(zD))
  39684. ], 2)
  39685. ]),
  39686. _: 1
  39687. }),
  39688. M(B(O0), {
  39689. size: "small",
  39690. value: o.value,
  39691. min: 12,
  39692. step: 1,
  39693. precision: 0,
  39694. style: { width: "80px" },
  39695. onChange: h
  39696. }, {
  39697. addonAfter: we(() => [
  39698. Kt("px")
  39699. ]),
  39700. _: 1
  39701. }, 8, ["value"])
  39702. ]));
  39703. }
  39704. }), RMe = /* @__PURE__ */ po(DMe, [["__scopeId", "data-v-12e62bfe"]]), kMe = { class: "cus-slider" }, LMe = /* @__PURE__ */ te({
  39705. __name: "CusSlider",
  39706. props: {
  39707. value: {}
  39708. },
  39709. emits: ["update:value"],
  39710. setup(t) {
  39711. return (e, n) => (pe(), Qe("div", kMe, [
  39712. M(B(KTe), {
  39713. value: e.value,
  39714. onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r)),
  39715. "tip-formatter": (r) => `${r}%`
  39716. }, null, 8, ["value", "tip-formatter"]),
  39717. M(B(O0), {
  39718. value: e.value,
  39719. onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r)),
  39720. "addon-after": "%"
  39721. }, null, 8, ["value"])
  39722. ]));
  39723. }
  39724. }), NMe = /* @__PURE__ */ po(LMe, [["__scopeId", "data-v-2fe8fa98"]]), BMe = te({
  39725. name: "FmBorderRadius",
  39726. components: {
  39727. RadioGroup: vf,
  39728. RadioButton: Io,
  39729. InputNumber: O0,
  39730. Select: ci,
  39731. RadiusUpleftOutlined: WD,
  39732. RadiusUprightOutlined: QD,
  39733. RadiusBottomleftOutlined: VD,
  39734. RadiusBottomrightOutlined: FD
  39735. },
  39736. props: {
  39737. value: {
  39738. type: Object,
  39739. default: () => ({})
  39740. }
  39741. },
  39742. emits: ["update:value"],
  39743. setup(t, { emit: e }) {
  39744. var r, i, a, o;
  39745. const n = tn({
  39746. type: t.value.type || "all",
  39747. value: t.value.type === "all" ? t.value.value : 0,
  39748. unit: t.value.unit || "px",
  39749. topLeft: typeof t.value.value == "object" ? (r = t.value.value) == null ? void 0 : r.topLeft : 0,
  39750. topRight: typeof t.value.value == "object" ? (i = t.value.value) == null ? void 0 : i.topRight : 0,
  39751. bottomLeft: typeof t.value.value == "object" ? (a = t.value.value) == null ? void 0 : a.bottomLeft : 0,
  39752. bottomRight: typeof t.value.value == "object" ? (o = t.value.value) == null ? void 0 : o.bottomRight : 0
  39753. });
  39754. return se(
  39755. () => n,
  39756. (s) => {
  39757. e("update:value", {
  39758. type: s.type,
  39759. value: s.type === "all" ? s.value : {
  39760. topLeft: s.topLeft,
  39761. topRight: s.topRight,
  39762. bottomLeft: s.bottomLeft,
  39763. bottomRight: s.bottomRight
  39764. },
  39765. unit: s.unit
  39766. });
  39767. },
  39768. {
  39769. deep: !0
  39770. }
  39771. ), {
  39772. radius: n,
  39773. unitOptions: [
  39774. { label: "px", value: "px" },
  39775. { label: "%", value: "%" }
  39776. ]
  39777. };
  39778. }
  39779. }), zMe = {
  39780. key: 0,
  39781. class: "all"
  39782. }, VMe = {
  39783. key: 1,
  39784. class: "custom"
  39785. };
  39786. function FMe(t, e, n, r, i, a) {
  39787. const o = cl("RadioButton"), s = cl("RadioGroup"), l = cl("InputNumber"), u = cl("Select"), c = cl("RadiusUpleftOutlined"), f = cl("RadiusUprightOutlined"), d = cl("RadiusBottomleftOutlined"), h = cl("RadiusBottomrightOutlined");
  39788. return pe(), Qe("div", null, [
  39789. M(s, {
  39790. value: t.radius.type,
  39791. "onUpdate:value": e[0] || (e[0] = (p) => t.radius.type = p)
  39792. }, {
  39793. default: we(() => [
  39794. M(o, { value: "all" }, {
  39795. default: we(() => [
  39796. Kt("整体")
  39797. ]),
  39798. _: 1
  39799. }),
  39800. M(o, { value: "custom" }, {
  39801. default: we(() => [
  39802. Kt("单个")
  39803. ]),
  39804. _: 1
  39805. })
  39806. ]),
  39807. _: 1
  39808. }, 8, ["value"]),
  39809. t.radius.type === "all" ? (pe(), Qe("div", zMe, [
  39810. M(l, {
  39811. value: t.radius.value,
  39812. "onUpdate:value": e[1] || (e[1] = (p) => t.radius.value = p)
  39813. }, null, 8, ["value"]),
  39814. M(u, {
  39815. value: t.radius.unit,
  39816. "onUpdate:value": e[2] || (e[2] = (p) => t.radius.unit = p),
  39817. options: t.unitOptions
  39818. }, null, 8, ["value", "options"])
  39819. ])) : (pe(), Qe("div", VMe, [
  39820. M(l, {
  39821. value: t.radius.topLeft,
  39822. "onUpdate:value": e[3] || (e[3] = (p) => t.radius.topLeft = p)
  39823. }, {
  39824. addonBefore: we(() => [
  39825. M(c)
  39826. ]),
  39827. _: 1
  39828. }, 8, ["value"]),
  39829. M(l, {
  39830. value: t.radius.topRight,
  39831. "onUpdate:value": e[4] || (e[4] = (p) => t.radius.topRight = p)
  39832. }, {
  39833. addonBefore: we(() => [
  39834. M(f)
  39835. ]),
  39836. _: 1
  39837. }, 8, ["value"]),
  39838. M(l, {
  39839. value: t.radius.bottomLeft,
  39840. "onUpdate:value": e[5] || (e[5] = (p) => t.radius.bottomLeft = p)
  39841. }, {
  39842. addonBefore: we(() => [
  39843. M(d)
  39844. ]),
  39845. _: 1
  39846. }, 8, ["value"]),
  39847. M(l, {
  39848. value: t.radius.bottomRight,
  39849. "onUpdate:value": e[6] || (e[6] = (p) => t.radius.bottomRight = p)
  39850. }, {
  39851. addonBefore: we(() => [
  39852. M(h)
  39853. ]),
  39854. _: 1
  39855. }, 8, ["value"]),
  39856. M(u, {
  39857. value: t.radius.unit,
  39858. "onUpdate:value": e[7] || (e[7] = (p) => t.radius.unit = p),
  39859. options: t.unitOptions
  39860. }, null, 8, ["value", "options"])
  39861. ]))
  39862. ]);
  39863. }
  39864. const WMe = /* @__PURE__ */ po(BMe, [["render", FMe], ["__scopeId", "data-v-da2b5cf6"]]), QMe = /* @__PURE__ */ te({
  39865. __name: "CusFormItem",
  39866. props: {
  39867. item: {},
  39868. modelValue: {}
  39869. },
  39870. emits: ["update:modelValue"],
  39871. setup(t, { emit: e }) {
  39872. const n = t, r = e, i = U(n.modelValue);
  39873. return se(
  39874. () => i.value,
  39875. () => {
  39876. r("update:modelValue", i.value);
  39877. },
  39878. { deep: !0 }
  39879. ), se(
  39880. () => n.modelValue,
  39881. (a) => {
  39882. YS(a, i.value) || (i.value = a);
  39883. }
  39884. ), (a, o) => (pe(), je(B(PX), {
  39885. label: a.item.type !== "divider" ? a.item.label : "",
  39886. name: a.item.prop,
  39887. rules: a.item.rules
  39888. }, {
  39889. default: we(() => {
  39890. var s, l, u, c, f, d, h, p, v, g, m;
  39891. return [
  39892. a.item.type === "divider" ? (pe(), je(B(Zwe), {
  39893. key: 0,
  39894. style: { margin: "0" }
  39895. }, {
  39896. default: we(() => [
  39897. Kt(Bi(a.item.label), 1)
  39898. ]),
  39899. _: 1
  39900. })) : a.item.type === "input" ? (pe(), je(B(Hn), _n({
  39901. key: 1,
  39902. value: i.value,
  39903. "onUpdate:value": o[0] || (o[0] = (y) => i.value = y)
  39904. }, (s = a.item) == null ? void 0 : s.fieldProps), null, 16, ["value"])) : a.item.type === "select" ? (pe(), je(B(ci), _n({
  39905. key: 2,
  39906. value: i.value,
  39907. "onUpdate:value": o[1] || (o[1] = (y) => i.value = y)
  39908. }, (l = a.item) == null ? void 0 : l.fieldProps), null, 16, ["value"])) : a.item.type === "inputNumber" ? (pe(), je(B(O0), _n({
  39909. key: 3,
  39910. value: i.value,
  39911. "onUpdate:value": o[2] || (o[2] = (y) => i.value = y)
  39912. }, (u = a.item) == null ? void 0 : u.fieldProps, { style: { width: "100%" } }), null, 16, ["value"])) : a.item.type === "image" ? (pe(), je(B(Al), _n({
  39913. key: 4,
  39914. value: i.value,
  39915. "onUpdate:value": o[3] || (o[3] = (y) => i.value = y)
  39916. }, (c = a.item) == null ? void 0 : c.fieldProps), null, 16, ["value"])) : a.item.type === "checkboxGroup" ? (pe(), je(B(z1), _n({
  39917. key: 5,
  39918. value: i.value,
  39919. "onUpdate:value": o[4] || (o[4] = (y) => i.value = y)
  39920. }, (f = a.item) == null ? void 0 : f.fieldProps), null, 16, ["value"])) : a.item.type === "backgroundSelect" ? (pe(), je(_Me, _n({
  39921. key: 6,
  39922. value: i.value,
  39923. "onUpdate:value": o[5] || (o[5] = (y) => i.value = y)
  39924. }, (d = a.item) == null ? void 0 : d.fieldProps), null, 16, ["value"])) : a.item.type === "colorSelect" ? (pe(), je(SMe, _n({
  39925. key: 7,
  39926. value: i.value,
  39927. "onUpdate:value": o[6] || (o[6] = (y) => i.value = y)
  39928. }, (h = a.item) == null ? void 0 : h.fieldProps), null, 16, ["value"])) : a.item.type === "colorScheme" ? (pe(), je(PMe, _n({
  39929. key: 8,
  39930. value: i.value,
  39931. "onUpdate:value": o[7] || (o[7] = (y) => i.value = y)
  39932. }, (p = a.item) == null ? void 0 : p.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroup" ? (pe(), je(B(vf), _n({
  39933. key: 9,
  39934. value: i.value,
  39935. "onUpdate:value": o[8] || (o[8] = (y) => i.value = y),
  39936. size: "small"
  39937. }, (v = a.item) == null ? void 0 : v.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroupButton" ? (pe(), je(B(vf), {
  39938. key: 10,
  39939. value: i.value,
  39940. "onUpdate:value": o[9] || (o[9] = (y) => i.value = y),
  39941. size: "small"
  39942. }, {
  39943. default: we(() => [
  39944. (pe(!0), Qe(wt, null, ag(a.item.fieldProps.options, (y) => (pe(), je(B(Io), {
  39945. key: y.value,
  39946. value: y.value
  39947. }, {
  39948. default: we(() => [
  39949. Kt(Bi(y.label), 1)
  39950. ]),
  39951. _: 2
  39952. }, 1032, ["value"]))), 128))
  39953. ]),
  39954. _: 1
  39955. }, 8, ["value"])) : a.item.type === "position" ? (pe(), je(EMe, _n({
  39956. key: 11,
  39957. value: i.value,
  39958. "onUpdate:value": o[10] || (o[10] = (y) => i.value = y)
  39959. }, (g = a.item) == null ? void 0 : g.fieldProps), null, 16, ["value"])) : a.item.type === "fontStyle" ? (pe(), je(RMe, _n({
  39960. key: 12,
  39961. value: i.value,
  39962. "onUpdate:value": o[11] || (o[11] = (y) => i.value = y)
  39963. }, (m = a.item) == null ? void 0 : m.fieldProps), null, 16, ["value"])) : a.item.type === "slider" ? (pe(), je(B(im), { key: 13 }, {
  39964. default: we(() => {
  39965. var y;
  39966. return [
  39967. M(NMe, _n({
  39968. value: i.value,
  39969. "onUpdate:value": o[12] || (o[12] = (b) => i.value = b)
  39970. }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
  39971. ];
  39972. }),
  39973. _: 1
  39974. })) : a.item.type === "boderRadiusSelect" ? (pe(), je(B(im), { key: 14 }, {
  39975. default: we(() => {
  39976. var y;
  39977. return [
  39978. M(WMe, _n({
  39979. value: i.value,
  39980. "onUpdate:value": o[13] || (o[13] = (b) => i.value = b)
  39981. }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
  39982. ];
  39983. }),
  39984. _: 1
  39985. })) : _t("", !0),
  39986. a.item.tip ? (pe(), je(B(dx), {
  39987. key: 15,
  39988. title: a.item.tip
  39989. }, {
  39990. default: we(() => [
  39991. M(B(fx), { style: { color: "#666" } })
  39992. ]),
  39993. _: 1
  39994. }, 8, ["title"])) : _t("", !0)
  39995. ];
  39996. }),
  39997. _: 1
  39998. }, 8, ["label", "name", "rules"]));
  39999. }
  40000. }), HMe = /* @__PURE__ */ po(QMe, [["__scopeId", "data-v-04c55003"]]), Mx = te({
  40001. props: {
  40002. columns: {
  40003. type: Array,
  40004. default: () => []
  40005. },
  40006. formModel: {
  40007. type: Object,
  40008. default: () => ({})
  40009. }
  40010. },
  40011. emits: ["change"],
  40012. setup(t, { emit: e }) {
  40013. const n = U({}), r = U(), i = U({}), a = L(() => t.columns.map((f) => ({
  40014. ...f,
  40015. rules: (f == null ? void 0 : f.rules) || []
  40016. }))), o = (f) => {
  40017. f == null || f.forEach((d) => {
  40018. var h;
  40019. if (d.type === "group")
  40020. o(d.children);
  40021. else if (d.type === "dependency") {
  40022. const p = (h = d.children) == null ? void 0 : h.call(
  40023. d,
  40024. am(n.value, d.name || []),
  40025. n
  40026. );
  40027. o(p);
  40028. } else {
  40029. if (d.type === "divider") return;
  40030. const p = kt(t.formModel, d.prop);
  40031. n.value[d.prop] = d != null && d.valueToForm ? d.valueToForm(p, t.formModel) : p ?? d.defaultValue, d.format ? d.format(i, n.value[d.prop]) : i.value[d.prop] = p ?? d.defaultValue;
  40032. }
  40033. });
  40034. }, s = (f, d) => {
  40035. n.value[d.prop] = f, d.format ? d.format(i, f) : i.value[d.prop] = f, e("change", i.value);
  40036. }, l = (f) => {
  40037. var d;
  40038. switch (f.type) {
  40039. case "dependency": {
  40040. const h = (d = f.children) == null ? void 0 : d.call(
  40041. f,
  40042. am(n.value, f.name || []),
  40043. n
  40044. );
  40045. return o(h), c(h);
  40046. }
  40047. case "group":
  40048. return u(f);
  40049. default:
  40050. return /* @__PURE__ */ React.createElement(
  40051. HMe,
  40052. {
  40053. key: f.prop,
  40054. item: f,
  40055. modelValue: n.value[f.prop],
  40056. "onUpdate:modelValue": (h) => {
  40057. s(h, f);
  40058. }
  40059. }
  40060. );
  40061. }
  40062. }, u = (f) => {
  40063. var d;
  40064. return /* @__PURE__ */ React.createElement(cg, { style: { borderRadius: 0 } }, /* @__PURE__ */ React.createElement(B1, { style: { borderRadius: 0 }, key: f.prop, header: f.label }, (d = f.children) == null ? void 0 : d.map((h) => l(h))));
  40065. }, c = (f) => f.map((d) => {
  40066. switch (d.type) {
  40067. case "group":
  40068. return u(d);
  40069. default:
  40070. return l(d);
  40071. }
  40072. });
  40073. return se(
  40074. () => a.value,
  40075. (f) => {
  40076. f && o(f);
  40077. },
  40078. { immediate: !0 }
  40079. ), () => /* @__PURE__ */ React.createElement(
  40080. dr,
  40081. {
  40082. model: n,
  40083. colon: !1,
  40084. "label-col": { span: 8 },
  40085. ref: r,
  40086. layout: "horizontal",
  40087. size: "small"
  40088. },
  40089. c(a.value)
  40090. );
  40091. }
  40092. }), bq = /* @__PURE__ */ te({
  40093. __name: "Config",
  40094. props: eI,
  40095. emits: ["change"],
  40096. setup(t, { emit: e }) {
  40097. const n = t, r = e, i = L(() => [
  40098. {
  40099. label: "内容",
  40100. prop: "text",
  40101. type: "input",
  40102. defaultValue: n.text
  40103. },
  40104. {
  40105. label: "字体",
  40106. prop: "fontSize",
  40107. type: "inputNumber",
  40108. defaultValue: n.fontSize
  40109. },
  40110. {
  40111. label: "颜色",
  40112. prop: "color",
  40113. type: "colorSelect",
  40114. defaultValue: n.color
  40115. },
  40116. {
  40117. label: "对齐",
  40118. prop: "textAlign",
  40119. type: "radioGroup",
  40120. defaultValue: n.textAlign,
  40121. fieldProps: {
  40122. options: [
  40123. { label: "左对齐", value: "left" },
  40124. { label: "居中", value: "center" },
  40125. { label: "右对齐", value: "right" }
  40126. ]
  40127. }
  40128. }
  40129. ]), a = (o) => {
  40130. r("change", o);
  40131. };
  40132. return (o, s) => (pe(), je(B(Mx), _n({ columns: i.value }, o.$attrs, { onChange: a }), null, 16, ["columns"]));
  40133. }
  40134. });
  40135. Zg.Config = bq;
  40136. Zg.install = (t) => (t.component("FmDashboardTitle", Zg), t);
  40137. const GMe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40138. __proto__: null,
  40139. Config: bq,
  40140. default: Zg,
  40141. defaultPropsValue: jle,
  40142. titleProps: eI
  40143. }, Symbol.toStringTag, { value: "Module" }));
  40144. /*! *****************************************************************************
  40145. Copyright (c) Microsoft Corporation.
  40146. Permission to use, copy, modify, and/or distribute this software for any
  40147. purpose with or without fee is hereby granted.
  40148. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  40149. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  40150. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  40151. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  40152. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  40153. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  40154. PERFORMANCE OF THIS SOFTWARE.
  40155. ***************************************************************************** */
  40156. var iA = function(t, e) {
  40157. return iA = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
  40158. n.__proto__ = r;
  40159. } || function(n, r) {
  40160. for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
  40161. }, iA(t, e);
  40162. };
  40163. function q(t, e) {
  40164. if (typeof e != "function" && e !== null)
  40165. throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  40166. iA(t, e);
  40167. function n() {
  40168. this.constructor = t;
  40169. }
  40170. t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
  40171. }
  40172. var jMe = /* @__PURE__ */ function() {
  40173. function t() {
  40174. this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
  40175. }
  40176. return t;
  40177. }(), ZMe = /* @__PURE__ */ function() {
  40178. function t() {
  40179. this.browser = new jMe(), this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = typeof window < "u";
  40180. }
  40181. return t;
  40182. }(), fc = new ZMe();
  40183. typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (fc.wxa = !0, fc.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? fc.worker = !0 : typeof navigator > "u" || navigator.userAgent.indexOf("Node.js") === 0 ? (fc.node = !0, fc.svgSupported = !0) : UMe(navigator.userAgent, fc);
  40184. function UMe(t, e) {
  40185. var n = e.browser, r = t.match(/Firefox\/([\d.]+)/), i = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(t);
  40186. r && (n.firefox = !0, n.version = r[1]), i && (n.ie = !0, n.version = i[1]), a && (n.edge = !0, n.version = a[1], n.newEdge = +a[1].split(".")[0] > 18), o && (n.weChat = !0), e.svgSupported = typeof SVGRect < "u", e.touchEventsSupported = "ontouchstart" in window && !n.ie && !n.edge, e.pointerEventsSupported = "onpointerdown" in window && (n.edge || n.ie && +n.version >= 11), e.domSupported = typeof document < "u";
  40187. var s = document.documentElement.style;
  40188. e.transform3dSupported = (n.ie && "transition" in s || n.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || n.ie && +n.version >= 9;
  40189. }
  40190. const vt = fc;
  40191. var hR = 12, _q = "sans-serif", iu = hR + "px " + _q, XMe = 20, YMe = 100, qMe = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
  40192. function KMe(t) {
  40193. var e = {};
  40194. if (typeof JSON > "u")
  40195. return e;
  40196. for (var n = 0; n < t.length; n++) {
  40197. var r = String.fromCharCode(n + 32), i = (t.charCodeAt(n) - XMe) / YMe;
  40198. e[r] = i;
  40199. }
  40200. return e;
  40201. }
  40202. var JMe = KMe(qMe), io = {
  40203. createCanvas: function() {
  40204. return typeof document < "u" && document.createElement("canvas");
  40205. },
  40206. measureText: /* @__PURE__ */ function() {
  40207. var t, e;
  40208. return function(n, r) {
  40209. if (!t) {
  40210. var i = io.createCanvas();
  40211. t = i && i.getContext("2d");
  40212. }
  40213. if (t)
  40214. return e !== r && (e = t.font = r || iu), t.measureText(n);
  40215. n = n || "", r = r || iu;
  40216. var a = /((?:\d+)?\.?\d*)px/.exec(r), o = a && +a[1] || hR, s = 0;
  40217. if (r.indexOf("mono") >= 0)
  40218. s = o * n.length;
  40219. else
  40220. for (var l = 0; l < n.length; l++) {
  40221. var u = JMe[n[l]];
  40222. s += u == null ? o : u * o;
  40223. }
  40224. return { width: s };
  40225. };
  40226. }(),
  40227. loadImage: function(t, e, n) {
  40228. var r = new Image();
  40229. return r.onload = e, r.onerror = n, r.src = t, r;
  40230. }
  40231. };
  40232. function Oq(t) {
  40233. for (var e in io)
  40234. t[e] && (io[e] = t[e]);
  40235. }
  40236. var Sq = Aa([
  40237. "Function",
  40238. "RegExp",
  40239. "Date",
  40240. "Error",
  40241. "CanvasGradient",
  40242. "CanvasPattern",
  40243. "Image",
  40244. "Canvas"
  40245. ], function(t, e) {
  40246. return t["[object " + e + "]"] = !0, t;
  40247. }, {}), xq = Aa([
  40248. "Int8",
  40249. "Uint8",
  40250. "Uint8Clamped",
  40251. "Int16",
  40252. "Uint16",
  40253. "Int32",
  40254. "Uint32",
  40255. "Float32",
  40256. "Float64"
  40257. ], function(t, e) {
  40258. return t["[object " + e + "Array]"] = !0, t;
  40259. }, {}), cp = Object.prototype.toString, Ix = Array.prototype, eIe = Ix.forEach, tIe = Ix.filter, pR = Ix.slice, nIe = Ix.map, M6 = (function() {
  40260. }).constructor, zy = M6 ? M6.prototype : null, vR = "__proto__", rIe = 2311;
  40261. function gR() {
  40262. return rIe++;
  40263. }
  40264. function Oa() {
  40265. for (var t = [], e = 0; e < arguments.length; e++)
  40266. t[e] = arguments[e];
  40267. typeof console < "u" && console.error.apply(console, t);
  40268. }
  40269. function Le(t) {
  40270. if (t == null || typeof t != "object")
  40271. return t;
  40272. var e = t, n = cp.call(t);
  40273. if (n === "[object Array]") {
  40274. if (!Kd(t)) {
  40275. e = [];
  40276. for (var r = 0, i = t.length; r < i; r++)
  40277. e[r] = Le(t[r]);
  40278. }
  40279. } else if (xq[n]) {
  40280. if (!Kd(t)) {
  40281. var a = t.constructor;
  40282. if (a.from)
  40283. e = a.from(t);
  40284. else {
  40285. e = new a(t.length);
  40286. for (var r = 0, i = t.length; r < i; r++)
  40287. e[r] = t[r];
  40288. }
  40289. }
  40290. } else if (!Sq[n] && !Kd(t) && !au(t)) {
  40291. e = {};
  40292. for (var o in t)
  40293. t.hasOwnProperty(o) && o !== vR && (e[o] = Le(t[o]));
  40294. }
  40295. return e;
  40296. }
  40297. function qe(t, e, n) {
  40298. if (!Ie(e) || !Ie(t))
  40299. return n ? Le(e) : t;
  40300. for (var r in e)
  40301. if (e.hasOwnProperty(r) && r !== vR) {
  40302. var i = t[r], a = e[r];
  40303. Ie(a) && Ie(i) && !ue(a) && !ue(i) && !au(a) && !au(i) && !aA(a) && !aA(i) && !Kd(a) && !Kd(i) ? qe(i, a, n) : (n || !(r in t)) && (t[r] = Le(e[r]));
  40304. }
  40305. return t;
  40306. }
  40307. function Dx(t, e) {
  40308. for (var n = t[0], r = 1, i = t.length; r < i; r++)
  40309. n = qe(n, t[r], e);
  40310. return n;
  40311. }
  40312. function le(t, e) {
  40313. if (Object.assign)
  40314. Object.assign(t, e);
  40315. else
  40316. for (var n in e)
  40317. e.hasOwnProperty(n) && n !== vR && (t[n] = e[n]);
  40318. return t;
  40319. }
  40320. function Re(t, e, n) {
  40321. for (var r = st(e), i = 0; i < r.length; i++) {
  40322. var a = r[i];
  40323. (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  40324. }
  40325. return t;
  40326. }
  40327. var iIe = io.createCanvas;
  40328. function et(t, e) {
  40329. if (t) {
  40330. if (t.indexOf)
  40331. return t.indexOf(e);
  40332. for (var n = 0, r = t.length; n < r; n++)
  40333. if (t[n] === e)
  40334. return n;
  40335. }
  40336. return -1;
  40337. }
  40338. function mR(t, e) {
  40339. var n = t.prototype;
  40340. function r() {
  40341. }
  40342. r.prototype = e.prototype, t.prototype = new r();
  40343. for (var i in n)
  40344. n.hasOwnProperty(i) && (t.prototype[i] = n[i]);
  40345. t.prototype.constructor = t, t.superClass = e;
  40346. }
  40347. function xn(t, e, n) {
  40348. if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
  40349. for (var r = Object.getOwnPropertyNames(e), i = 0; i < r.length; i++) {
  40350. var a = r[i];
  40351. a !== "constructor" && (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  40352. }
  40353. else
  40354. Re(t, e, n);
  40355. }
  40356. function wr(t) {
  40357. return !t || typeof t == "string" ? !1 : typeof t.length == "number";
  40358. }
  40359. function k(t, e, n) {
  40360. if (t && e)
  40361. if (t.forEach && t.forEach === eIe)
  40362. t.forEach(e, n);
  40363. else if (t.length === +t.length)
  40364. for (var r = 0, i = t.length; r < i; r++)
  40365. e.call(n, t[r], r, t);
  40366. else
  40367. for (var a in t)
  40368. t.hasOwnProperty(a) && e.call(n, t[a], a, t);
  40369. }
  40370. function ce(t, e, n) {
  40371. if (!t)
  40372. return [];
  40373. if (!e)
  40374. return Rx(t);
  40375. if (t.map && t.map === nIe)
  40376. return t.map(e, n);
  40377. for (var r = [], i = 0, a = t.length; i < a; i++)
  40378. r.push(e.call(n, t[i], i, t));
  40379. return r;
  40380. }
  40381. function Aa(t, e, n, r) {
  40382. if (t && e) {
  40383. for (var i = 0, a = t.length; i < a; i++)
  40384. n = e.call(r, n, t[i], i, t);
  40385. return n;
  40386. }
  40387. }
  40388. function Nt(t, e, n) {
  40389. if (!t)
  40390. return [];
  40391. if (!e)
  40392. return Rx(t);
  40393. if (t.filter && t.filter === tIe)
  40394. return t.filter(e, n);
  40395. for (var r = [], i = 0, a = t.length; i < a; i++)
  40396. e.call(n, t[i], i, t) && r.push(t[i]);
  40397. return r;
  40398. }
  40399. function wq(t, e, n) {
  40400. if (t && e) {
  40401. for (var r = 0, i = t.length; r < i; r++)
  40402. if (e.call(n, t[r], r, t))
  40403. return t[r];
  40404. }
  40405. }
  40406. function st(t) {
  40407. if (!t)
  40408. return [];
  40409. if (Object.keys)
  40410. return Object.keys(t);
  40411. var e = [];
  40412. for (var n in t)
  40413. t.hasOwnProperty(n) && e.push(n);
  40414. return e;
  40415. }
  40416. function aIe(t, e) {
  40417. for (var n = [], r = 2; r < arguments.length; r++)
  40418. n[r - 2] = arguments[r];
  40419. return function() {
  40420. return t.apply(e, n.concat(pR.call(arguments)));
  40421. };
  40422. }
  40423. var xe = zy && Me(zy.bind) ? zy.call.bind(zy.bind) : aIe;
  40424. function Ue(t) {
  40425. for (var e = [], n = 1; n < arguments.length; n++)
  40426. e[n - 1] = arguments[n];
  40427. return function() {
  40428. return t.apply(this, e.concat(pR.call(arguments)));
  40429. };
  40430. }
  40431. function ue(t) {
  40432. return Array.isArray ? Array.isArray(t) : cp.call(t) === "[object Array]";
  40433. }
  40434. function Me(t) {
  40435. return typeof t == "function";
  40436. }
  40437. function Oe(t) {
  40438. return typeof t == "string";
  40439. }
  40440. function pm(t) {
  40441. return cp.call(t) === "[object String]";
  40442. }
  40443. function St(t) {
  40444. return typeof t == "number";
  40445. }
  40446. function Ie(t) {
  40447. var e = typeof t;
  40448. return e === "function" || !!t && e === "object";
  40449. }
  40450. function aA(t) {
  40451. return !!Sq[cp.call(t)];
  40452. }
  40453. function Nr(t) {
  40454. return !!xq[cp.call(t)];
  40455. }
  40456. function au(t) {
  40457. return typeof t == "object" && typeof t.nodeType == "number" && typeof t.ownerDocument == "object";
  40458. }
  40459. function M0(t) {
  40460. return t.colorStops != null;
  40461. }
  40462. function Cq(t) {
  40463. return t.image != null;
  40464. }
  40465. function yR(t) {
  40466. return cp.call(t) === "[object RegExp]";
  40467. }
  40468. function ou(t) {
  40469. return t !== t;
  40470. }
  40471. function Tn() {
  40472. for (var t = [], e = 0; e < arguments.length; e++)
  40473. t[e] = arguments[e];
  40474. for (var n = 0, r = t.length; n < r; n++)
  40475. if (t[n] != null)
  40476. return t[n];
  40477. }
  40478. function We(t, e) {
  40479. return t ?? e;
  40480. }
  40481. function ji(t, e, n) {
  40482. return t ?? e ?? n;
  40483. }
  40484. function Rx(t) {
  40485. for (var e = [], n = 1; n < arguments.length; n++)
  40486. e[n - 1] = arguments[n];
  40487. return pR.apply(t, e);
  40488. }
  40489. function kx(t) {
  40490. if (typeof t == "number")
  40491. return [t, t, t, t];
  40492. var e = t.length;
  40493. return e === 2 ? [t[0], t[1], t[0], t[1]] : e === 3 ? [t[0], t[1], t[2], t[1]] : t;
  40494. }
  40495. function ke(t, e) {
  40496. if (!t)
  40497. throw new Error(e);
  40498. }
  40499. function ma(t) {
  40500. return t == null ? null : typeof t.trim == "function" ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
  40501. }
  40502. var Tq = "__ec_primitive__";
  40503. function vm(t) {
  40504. t[Tq] = !0;
  40505. }
  40506. function Kd(t) {
  40507. return t[Tq];
  40508. }
  40509. var oIe = function() {
  40510. function t() {
  40511. this.data = {};
  40512. }
  40513. return t.prototype.delete = function(e) {
  40514. var n = this.has(e);
  40515. return n && delete this.data[e], n;
  40516. }, t.prototype.has = function(e) {
  40517. return this.data.hasOwnProperty(e);
  40518. }, t.prototype.get = function(e) {
  40519. return this.data[e];
  40520. }, t.prototype.set = function(e, n) {
  40521. return this.data[e] = n, this;
  40522. }, t.prototype.keys = function() {
  40523. return st(this.data);
  40524. }, t.prototype.forEach = function(e) {
  40525. var n = this.data;
  40526. for (var r in n)
  40527. n.hasOwnProperty(r) && e(n[r], r);
  40528. }, t;
  40529. }(), Pq = typeof Map == "function";
  40530. function sIe() {
  40531. return Pq ? /* @__PURE__ */ new Map() : new oIe();
  40532. }
  40533. var $q = function() {
  40534. function t(e) {
  40535. var n = ue(e);
  40536. this.data = sIe();
  40537. var r = this;
  40538. e instanceof t ? e.each(i) : e && k(e, i);
  40539. function i(a, o) {
  40540. n ? r.set(a, o) : r.set(o, a);
  40541. }
  40542. }
  40543. return t.prototype.hasKey = function(e) {
  40544. return this.data.has(e);
  40545. }, t.prototype.get = function(e) {
  40546. return this.data.get(e);
  40547. }, t.prototype.set = function(e, n) {
  40548. return this.data.set(e, n), n;
  40549. }, t.prototype.each = function(e, n) {
  40550. this.data.forEach(function(r, i) {
  40551. e.call(n, r, i);
  40552. });
  40553. }, t.prototype.keys = function() {
  40554. var e = this.data.keys();
  40555. return Pq ? Array.from(e) : e;
  40556. }, t.prototype.removeKey = function(e) {
  40557. this.data.delete(e);
  40558. }, t;
  40559. }();
  40560. function Pe(t) {
  40561. return new $q(t);
  40562. }
  40563. function gm(t, e) {
  40564. for (var n = new t.constructor(t.length + e.length), r = 0; r < t.length; r++)
  40565. n[r] = t[r];
  40566. for (var i = t.length, r = 0; r < e.length; r++)
  40567. n[r + i] = e[r];
  40568. return n;
  40569. }
  40570. function I0(t, e) {
  40571. var n;
  40572. if (Object.create)
  40573. n = Object.create(t);
  40574. else {
  40575. var r = function() {
  40576. };
  40577. r.prototype = t, n = new r();
  40578. }
  40579. return e && le(n, e), n;
  40580. }
  40581. function bR(t) {
  40582. var e = t.style;
  40583. e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
  40584. }
  40585. function Ce(t, e) {
  40586. return t.hasOwnProperty(e);
  40587. }
  40588. function On() {
  40589. }
  40590. var Og = 180 / Math.PI;
  40591. const lIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40592. __proto__: null,
  40593. HashMap: $q,
  40594. RADIAN_TO_DEGREE: Og,
  40595. assert: ke,
  40596. bind: xe,
  40597. clone: Le,
  40598. concatArray: gm,
  40599. createCanvas: iIe,
  40600. createHashMap: Pe,
  40601. createObject: I0,
  40602. curry: Ue,
  40603. defaults: Re,
  40604. disableUserSelect: bR,
  40605. each: k,
  40606. eqNaN: ou,
  40607. extend: le,
  40608. filter: Nt,
  40609. find: wq,
  40610. guid: gR,
  40611. hasOwn: Ce,
  40612. indexOf: et,
  40613. inherits: mR,
  40614. isArray: ue,
  40615. isArrayLike: wr,
  40616. isBuiltInObject: aA,
  40617. isDom: au,
  40618. isFunction: Me,
  40619. isGradientObject: M0,
  40620. isImagePatternObject: Cq,
  40621. isNumber: St,
  40622. isObject: Ie,
  40623. isPrimitive: Kd,
  40624. isRegExp: yR,
  40625. isString: Oe,
  40626. isStringSafe: pm,
  40627. isTypedArray: Nr,
  40628. keys: st,
  40629. logError: Oa,
  40630. map: ce,
  40631. merge: qe,
  40632. mergeAll: Dx,
  40633. mixin: xn,
  40634. noop: On,
  40635. normalizeCssArray: kx,
  40636. reduce: Aa,
  40637. retrieve: Tn,
  40638. retrieve2: We,
  40639. retrieve3: ji,
  40640. setAsPrimitive: vm,
  40641. slice: Rx,
  40642. trim: ma
  40643. }, Symbol.toStringTag, { value: "Module" }));
  40644. function wu(t, e) {
  40645. return t == null && (t = 0), e == null && (e = 0), [t, e];
  40646. }
  40647. function Mr(t, e) {
  40648. return t[0] = e[0], t[1] = e[1], t;
  40649. }
  40650. function Zo(t) {
  40651. return [t[0], t[1]];
  40652. }
  40653. function Aq(t, e, n) {
  40654. return t[0] = e, t[1] = n, t;
  40655. }
  40656. function oA(t, e, n) {
  40657. return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t;
  40658. }
  40659. function U1(t, e, n, r) {
  40660. return t[0] = e[0] + n[0] * r, t[1] = e[1] + n[1] * r, t;
  40661. }
  40662. function kl(t, e, n) {
  40663. return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t;
  40664. }
  40665. function mm(t) {
  40666. return Math.sqrt(_R(t));
  40667. }
  40668. var uIe = mm;
  40669. function _R(t) {
  40670. return t[0] * t[0] + t[1] * t[1];
  40671. }
  40672. var cIe = _R;
  40673. function fIe(t, e, n) {
  40674. return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t;
  40675. }
  40676. function dIe(t, e, n) {
  40677. return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t;
  40678. }
  40679. function hIe(t, e) {
  40680. return t[0] * e[0] + t[1] * e[1];
  40681. }
  40682. function Sg(t, e, n) {
  40683. return t[0] = e[0] * n, t[1] = e[1] * n, t;
  40684. }
  40685. function Rf(t, e) {
  40686. var n = mm(e);
  40687. return n === 0 ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t;
  40688. }
  40689. function X1(t, e) {
  40690. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
  40691. }
  40692. var Ts = X1;
  40693. function Eq(t, e) {
  40694. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
  40695. }
  40696. var Ul = Eq;
  40697. function pIe(t, e) {
  40698. return t[0] = -e[0], t[1] = -e[1], t;
  40699. }
  40700. function xg(t, e, n, r) {
  40701. return t[0] = e[0] + r * (n[0] - e[0]), t[1] = e[1] + r * (n[1] - e[1]), t;
  40702. }
  40703. function ar(t, e, n) {
  40704. var r = e[0], i = e[1];
  40705. return t[0] = n[0] * r + n[2] * i + n[4], t[1] = n[1] * r + n[3] * i + n[5], t;
  40706. }
  40707. function Ps(t, e, n) {
  40708. return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t;
  40709. }
  40710. function $s(t, e, n) {
  40711. return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t;
  40712. }
  40713. const vIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  40714. __proto__: null,
  40715. add: oA,
  40716. applyTransform: ar,
  40717. clone: Zo,
  40718. copy: Mr,
  40719. create: wu,
  40720. dist: Ts,
  40721. distSquare: Ul,
  40722. distance: X1,
  40723. distanceSquare: Eq,
  40724. div: dIe,
  40725. dot: hIe,
  40726. len: mm,
  40727. lenSquare: _R,
  40728. length: uIe,
  40729. lengthSquare: cIe,
  40730. lerp: xg,
  40731. max: $s,
  40732. min: Ps,
  40733. mul: fIe,
  40734. negate: pIe,
  40735. normalize: Rf,
  40736. scale: Sg,
  40737. scaleAndAdd: U1,
  40738. set: Aq,
  40739. sub: kl
  40740. }, Symbol.toStringTag, { value: "Module" }));
  40741. var ed = /* @__PURE__ */ function() {
  40742. function t(e, n) {
  40743. this.target = e, this.topTarget = n && n.topTarget;
  40744. }
  40745. return t;
  40746. }(), gIe = function() {
  40747. function t(e) {
  40748. this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
  40749. }
  40750. return t.prototype._dragStart = function(e) {
  40751. for (var n = e.target; n && !n.draggable; )
  40752. n = n.parent || n.__hostTarget;
  40753. n && (this._draggingTarget = n, n.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new ed(n, e), "dragstart", e.event));
  40754. }, t.prototype._drag = function(e) {
  40755. var n = this._draggingTarget;
  40756. if (n) {
  40757. var r = e.offsetX, i = e.offsetY, a = r - this._x, o = i - this._y;
  40758. this._x = r, this._y = i, n.drift(a, o, e), this.handler.dispatchToElement(new ed(n, e), "drag", e.event);
  40759. var s = this.handler.findHover(r, i, n).target, l = this._dropTarget;
  40760. this._dropTarget = s, n !== s && (l && s !== l && this.handler.dispatchToElement(new ed(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new ed(s, e), "dragenter", e.event));
  40761. }
  40762. }, t.prototype._dragEnd = function(e) {
  40763. var n = this._draggingTarget;
  40764. n && (n.dragging = !1), this.handler.dispatchToElement(new ed(n, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new ed(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
  40765. }, t;
  40766. }(), Ra = function() {
  40767. function t(e) {
  40768. e && (this._$eventProcessor = e);
  40769. }
  40770. return t.prototype.on = function(e, n, r, i) {
  40771. this._$handlers || (this._$handlers = {});
  40772. var a = this._$handlers;
  40773. if (typeof n == "function" && (i = r, r = n, n = null), !r || !e)
  40774. return this;
  40775. var o = this._$eventProcessor;
  40776. n != null && o && o.normalizeQuery && (n = o.normalizeQuery(n)), a[e] || (a[e] = []);
  40777. for (var s = 0; s < a[e].length; s++)
  40778. if (a[e][s].h === r)
  40779. return this;
  40780. var l = {
  40781. h: r,
  40782. query: n,
  40783. ctx: i || this,
  40784. callAtLast: r.zrEventfulCallAtLast
  40785. }, u = a[e].length - 1, c = a[e][u];
  40786. return c && c.callAtLast ? a[e].splice(u, 0, l) : a[e].push(l), this;
  40787. }, t.prototype.isSilent = function(e) {
  40788. var n = this._$handlers;
  40789. return !n || !n[e] || !n[e].length;
  40790. }, t.prototype.off = function(e, n) {
  40791. var r = this._$handlers;
  40792. if (!r)
  40793. return this;
  40794. if (!e)
  40795. return this._$handlers = {}, this;
  40796. if (n) {
  40797. if (r[e]) {
  40798. for (var i = [], a = 0, o = r[e].length; a < o; a++)
  40799. r[e][a].h !== n && i.push(r[e][a]);
  40800. r[e] = i;
  40801. }
  40802. r[e] && r[e].length === 0 && delete r[e];
  40803. } else
  40804. delete r[e];
  40805. return this;
  40806. }, t.prototype.trigger = function(e) {
  40807. for (var n = [], r = 1; r < arguments.length; r++)
  40808. n[r - 1] = arguments[r];
  40809. if (!this._$handlers)
  40810. return this;
  40811. var i = this._$handlers[e], a = this._$eventProcessor;
  40812. if (i)
  40813. for (var o = n.length, s = i.length, l = 0; l < s; l++) {
  40814. var u = i[l];
  40815. if (!(a && a.filter && u.query != null && !a.filter(e, u.query)))
  40816. switch (o) {
  40817. case 0:
  40818. u.h.call(u.ctx);
  40819. break;
  40820. case 1:
  40821. u.h.call(u.ctx, n[0]);
  40822. break;
  40823. case 2:
  40824. u.h.call(u.ctx, n[0], n[1]);
  40825. break;
  40826. default:
  40827. u.h.apply(u.ctx, n);
  40828. break;
  40829. }
  40830. }
  40831. return a && a.afterTrigger && a.afterTrigger(e), this;
  40832. }, t.prototype.triggerWithContext = function(e) {
  40833. for (var n = [], r = 1; r < arguments.length; r++)
  40834. n[r - 1] = arguments[r];
  40835. if (!this._$handlers)
  40836. return this;
  40837. var i = this._$handlers[e], a = this._$eventProcessor;
  40838. if (i)
  40839. for (var o = n.length, s = n[o - 1], l = i.length, u = 0; u < l; u++) {
  40840. var c = i[u];
  40841. if (!(a && a.filter && c.query != null && !a.filter(e, c.query)))
  40842. switch (o) {
  40843. case 0:
  40844. c.h.call(s);
  40845. break;
  40846. case 1:
  40847. c.h.call(s, n[0]);
  40848. break;
  40849. case 2:
  40850. c.h.call(s, n[0], n[1]);
  40851. break;
  40852. default:
  40853. c.h.apply(s, n.slice(1, o - 1));
  40854. break;
  40855. }
  40856. }
  40857. return a && a.afterTrigger && a.afterTrigger(e), this;
  40858. }, t;
  40859. }(), mIe = Math.log(2);
  40860. function sA(t, e, n, r, i, a) {
  40861. var o = r + "-" + i, s = t.length;
  40862. if (a.hasOwnProperty(o))
  40863. return a[o];
  40864. if (e === 1) {
  40865. var l = Math.round(Math.log((1 << s) - 1 & ~i) / mIe);
  40866. return t[n][l];
  40867. }
  40868. for (var u = r | 1 << n, c = n + 1; r & 1 << c; )
  40869. c++;
  40870. for (var f = 0, d = 0, h = 0; d < s; d++) {
  40871. var p = 1 << d;
  40872. p & i || (f += (h % 2 ? -1 : 1) * t[n][d] * sA(t, e - 1, c, u, i | p, a), h++);
  40873. }
  40874. return a[o] = f, f;
  40875. }
  40876. function I6(t, e) {
  40877. var n = [
  40878. [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
  40879. [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
  40880. [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
  40881. [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
  40882. [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
  40883. [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
  40884. [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
  40885. [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
  40886. ], r = {}, i = sA(n, 8, 0, 0, 0, r);
  40887. if (i !== 0) {
  40888. for (var a = [], o = 0; o < 8; o++)
  40889. for (var s = 0; s < 8; s++)
  40890. a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * sA(n, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, r) / i * e[o];
  40891. return function(l, u, c) {
  40892. var f = u * a[6] + c * a[7] + 1;
  40893. l[0] = (u * a[0] + c * a[1] + a[2]) / f, l[1] = (u * a[3] + c * a[4] + a[5]) / f;
  40894. };
  40895. }
  40896. }
  40897. var D6 = "___zrEVENTSAVED", FC = [];
  40898. function yIe(t, e, n, r, i) {
  40899. return lA(FC, e, r, i, !0) && lA(t, n, FC[0], FC[1]);
  40900. }
  40901. function lA(t, e, n, r, i) {
  40902. if (e.getBoundingClientRect && vt.domSupported && !Mq(e)) {
  40903. var a = e[D6] || (e[D6] = {}), o = bIe(e, a), s = _Ie(o, a, i);
  40904. if (s)
  40905. return s(t, n, r), !0;
  40906. }
  40907. return !1;
  40908. }
  40909. function bIe(t, e) {
  40910. var n = e.markers;
  40911. if (n)
  40912. return n;
  40913. n = e.markers = [];
  40914. for (var r = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) {
  40915. var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
  40916. s.cssText = [
  40917. "position: absolute",
  40918. "visibility: hidden",
  40919. "padding: 0",
  40920. "margin: 0",
  40921. "border-width: 0",
  40922. "user-select: none",
  40923. "width:0",
  40924. "height:0",
  40925. r[l] + ":0",
  40926. i[u] + ":0",
  40927. r[1 - l] + ":auto",
  40928. i[1 - u] + ":auto",
  40929. ""
  40930. ].join("!important;"), t.appendChild(o), n.push(o);
  40931. }
  40932. return n;
  40933. }
  40934. function _Ie(t, e, n) {
  40935. for (var r = n ? "invTrans" : "trans", i = e[r], a = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
  40936. var c = t[u].getBoundingClientRect(), f = 2 * u, d = c.left, h = c.top;
  40937. o.push(d, h), l = l && a && d === a[f] && h === a[f + 1], s.push(t[u].offsetLeft, t[u].offsetTop);
  40938. }
  40939. return l && i ? i : (e.srcCoords = o, e[r] = n ? I6(s, o) : I6(o, s));
  40940. }
  40941. function Mq(t) {
  40942. return t.nodeName.toUpperCase() === "CANVAS";
  40943. }
  40944. var OIe = /([&<>"'])/g, SIe = {
  40945. "&": "&amp;",
  40946. "<": "&lt;",
  40947. ">": "&gt;",
  40948. '"': "&quot;",
  40949. "'": "&#39;"
  40950. };
  40951. function Gr(t) {
  40952. return t == null ? "" : (t + "").replace(OIe, function(e, n) {
  40953. return SIe[n];
  40954. });
  40955. }
  40956. var xIe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, WC = [], wIe = vt.browser.firefox && +vt.browser.version.split(".")[0] < 39;
  40957. function uA(t, e, n, r) {
  40958. return n = n || {}, r ? R6(t, e, n) : wIe && e.layerX != null && e.layerX !== e.offsetX ? (n.zrX = e.layerX, n.zrY = e.layerY) : e.offsetX != null ? (n.zrX = e.offsetX, n.zrY = e.offsetY) : R6(t, e, n), n;
  40959. }
  40960. function R6(t, e, n) {
  40961. if (vt.domSupported && t.getBoundingClientRect) {
  40962. var r = e.clientX, i = e.clientY;
  40963. if (Mq(t)) {
  40964. var a = t.getBoundingClientRect();
  40965. n.zrX = r - a.left, n.zrY = i - a.top;
  40966. return;
  40967. } else if (lA(WC, t, r, i)) {
  40968. n.zrX = WC[0], n.zrY = WC[1];
  40969. return;
  40970. }
  40971. }
  40972. n.zrX = n.zrY = 0;
  40973. }
  40974. function OR(t) {
  40975. return t || window.event;
  40976. }
  40977. function sa(t, e, n) {
  40978. if (e = OR(e), e.zrX != null)
  40979. return e;
  40980. var r = e.type, i = r && r.indexOf("touch") >= 0;
  40981. if (i) {
  40982. var o = r !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
  40983. o && uA(t, o, e, n);
  40984. } else {
  40985. uA(t, e, e, n);
  40986. var a = CIe(e);
  40987. e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3;
  40988. }
  40989. var s = e.button;
  40990. return e.which == null && s !== void 0 && xIe.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
  40991. }
  40992. function CIe(t) {
  40993. var e = t.wheelDelta;
  40994. if (e)
  40995. return e;
  40996. var n = t.deltaX, r = t.deltaY;
  40997. if (n == null || r == null)
  40998. return e;
  40999. var i = Math.abs(r !== 0 ? r : n), a = r > 0 ? -1 : r < 0 ? 1 : n > 0 ? -1 : 1;
  41000. return 3 * i * a;
  41001. }
  41002. function cA(t, e, n, r) {
  41003. t.addEventListener(e, n, r);
  41004. }
  41005. function TIe(t, e, n, r) {
  41006. t.removeEventListener(e, n, r);
  41007. }
  41008. var Gs = function(t) {
  41009. t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
  41010. };
  41011. function k6(t) {
  41012. return t.which === 2 || t.which === 3;
  41013. }
  41014. var PIe = function() {
  41015. function t() {
  41016. this._track = [];
  41017. }
  41018. return t.prototype.recognize = function(e, n, r) {
  41019. return this._doTrack(e, n, r), this._recognize(e);
  41020. }, t.prototype.clear = function() {
  41021. return this._track.length = 0, this;
  41022. }, t.prototype._doTrack = function(e, n, r) {
  41023. var i = e.touches;
  41024. if (i) {
  41025. for (var a = {
  41026. points: [],
  41027. touches: [],
  41028. target: n,
  41029. event: e
  41030. }, o = 0, s = i.length; o < s; o++) {
  41031. var l = i[o], u = uA(r, l, {});
  41032. a.points.push([u.zrX, u.zrY]), a.touches.push(l);
  41033. }
  41034. this._track.push(a);
  41035. }
  41036. }, t.prototype._recognize = function(e) {
  41037. for (var n in QC)
  41038. if (QC.hasOwnProperty(n)) {
  41039. var r = QC[n](this._track, e);
  41040. if (r)
  41041. return r;
  41042. }
  41043. }, t;
  41044. }();
  41045. function L6(t) {
  41046. var e = t[1][0] - t[0][0], n = t[1][1] - t[0][1];
  41047. return Math.sqrt(e * e + n * n);
  41048. }
  41049. function $Ie(t) {
  41050. return [
  41051. (t[0][0] + t[1][0]) / 2,
  41052. (t[0][1] + t[1][1]) / 2
  41053. ];
  41054. }
  41055. var QC = {
  41056. pinch: function(t, e) {
  41057. var n = t.length;
  41058. if (n) {
  41059. var r = (t[n - 1] || {}).points, i = (t[n - 2] || {}).points || r;
  41060. if (i && i.length > 1 && r && r.length > 1) {
  41061. var a = L6(r) / L6(i);
  41062. !isFinite(a) && (a = 1), e.pinchScale = a;
  41063. var o = $Ie(r);
  41064. return e.pinchX = o[0], e.pinchY = o[1], {
  41065. type: "pinch",
  41066. target: t[0].target,
  41067. event: e
  41068. };
  41069. }
  41070. }
  41071. }
  41072. };
  41073. function Si() {
  41074. return [1, 0, 0, 1, 0, 0];
  41075. }
  41076. function D0(t) {
  41077. return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
  41078. }
  41079. function Lx(t, e) {
  41080. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t;
  41081. }
  41082. function Uo(t, e, n) {
  41083. var r = e[0] * n[0] + e[2] * n[1], i = e[1] * n[0] + e[3] * n[1], a = e[0] * n[2] + e[2] * n[3], o = e[1] * n[2] + e[3] * n[3], s = e[0] * n[4] + e[2] * n[5] + e[4], l = e[1] * n[4] + e[3] * n[5] + e[5];
  41084. return t[0] = r, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
  41085. }
  41086. function ao(t, e, n) {
  41087. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + n[0], t[5] = e[5] + n[1], t;
  41088. }
  41089. function Cu(t, e, n, r) {
  41090. r === void 0 && (r = [0, 0]);
  41091. var i = e[0], a = e[2], o = e[4], s = e[1], l = e[3], u = e[5], c = Math.sin(n), f = Math.cos(n);
  41092. return t[0] = i * f + s * c, t[1] = -i * c + s * f, t[2] = a * f + l * c, t[3] = -a * c + f * l, t[4] = f * (o - r[0]) + c * (u - r[1]) + r[0], t[5] = f * (u - r[1]) - c * (o - r[0]) + r[1], t;
  41093. }
  41094. function Nx(t, e, n) {
  41095. var r = n[0], i = n[1];
  41096. return t[0] = e[0] * r, t[1] = e[1] * i, t[2] = e[2] * r, t[3] = e[3] * i, t[4] = e[4] * r, t[5] = e[5] * i, t;
  41097. }
  41098. function kf(t, e) {
  41099. var n = e[0], r = e[2], i = e[4], a = e[1], o = e[3], s = e[5], l = n * o - a * r;
  41100. return l ? (l = 1 / l, t[0] = o * l, t[1] = -a * l, t[2] = -r * l, t[3] = n * l, t[4] = (r * s - o * i) * l, t[5] = (a * i - n * s) * l, t) : null;
  41101. }
  41102. function Iq(t) {
  41103. var e = Si();
  41104. return Lx(e, t), e;
  41105. }
  41106. const AIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  41107. __proto__: null,
  41108. clone: Iq,
  41109. copy: Lx,
  41110. create: Si,
  41111. identity: D0,
  41112. invert: kf,
  41113. mul: Uo,
  41114. rotate: Cu,
  41115. scale: Nx,
  41116. translate: ao
  41117. }, Symbol.toStringTag, { value: "Module" }));
  41118. var Ke = function() {
  41119. function t(e, n) {
  41120. this.x = e || 0, this.y = n || 0;
  41121. }
  41122. return t.prototype.copy = function(e) {
  41123. return this.x = e.x, this.y = e.y, this;
  41124. }, t.prototype.clone = function() {
  41125. return new t(this.x, this.y);
  41126. }, t.prototype.set = function(e, n) {
  41127. return this.x = e, this.y = n, this;
  41128. }, t.prototype.equal = function(e) {
  41129. return e.x === this.x && e.y === this.y;
  41130. }, t.prototype.add = function(e) {
  41131. return this.x += e.x, this.y += e.y, this;
  41132. }, t.prototype.scale = function(e) {
  41133. this.x *= e, this.y *= e;
  41134. }, t.prototype.scaleAndAdd = function(e, n) {
  41135. this.x += e.x * n, this.y += e.y * n;
  41136. }, t.prototype.sub = function(e) {
  41137. return this.x -= e.x, this.y -= e.y, this;
  41138. }, t.prototype.dot = function(e) {
  41139. return this.x * e.x + this.y * e.y;
  41140. }, t.prototype.len = function() {
  41141. return Math.sqrt(this.x * this.x + this.y * this.y);
  41142. }, t.prototype.lenSquare = function() {
  41143. return this.x * this.x + this.y * this.y;
  41144. }, t.prototype.normalize = function() {
  41145. var e = this.len();
  41146. return this.x /= e, this.y /= e, this;
  41147. }, t.prototype.distance = function(e) {
  41148. var n = this.x - e.x, r = this.y - e.y;
  41149. return Math.sqrt(n * n + r * r);
  41150. }, t.prototype.distanceSquare = function(e) {
  41151. var n = this.x - e.x, r = this.y - e.y;
  41152. return n * n + r * r;
  41153. }, t.prototype.negate = function() {
  41154. return this.x = -this.x, this.y = -this.y, this;
  41155. }, t.prototype.transform = function(e) {
  41156. if (e) {
  41157. var n = this.x, r = this.y;
  41158. return this.x = e[0] * n + e[2] * r + e[4], this.y = e[1] * n + e[3] * r + e[5], this;
  41159. }
  41160. }, t.prototype.toArray = function(e) {
  41161. return e[0] = this.x, e[1] = this.y, e;
  41162. }, t.prototype.fromArray = function(e) {
  41163. this.x = e[0], this.y = e[1];
  41164. }, t.set = function(e, n, r) {
  41165. e.x = n, e.y = r;
  41166. }, t.copy = function(e, n) {
  41167. e.x = n.x, e.y = n.y;
  41168. }, t.len = function(e) {
  41169. return Math.sqrt(e.x * e.x + e.y * e.y);
  41170. }, t.lenSquare = function(e) {
  41171. return e.x * e.x + e.y * e.y;
  41172. }, t.dot = function(e, n) {
  41173. return e.x * n.x + e.y * n.y;
  41174. }, t.add = function(e, n, r) {
  41175. e.x = n.x + r.x, e.y = n.y + r.y;
  41176. }, t.sub = function(e, n, r) {
  41177. e.x = n.x - r.x, e.y = n.y - r.y;
  41178. }, t.scale = function(e, n, r) {
  41179. e.x = n.x * r, e.y = n.y * r;
  41180. }, t.scaleAndAdd = function(e, n, r, i) {
  41181. e.x = n.x + r.x * i, e.y = n.y + r.y * i;
  41182. }, t.lerp = function(e, n, r, i) {
  41183. var a = 1 - i;
  41184. e.x = a * n.x + i * r.x, e.y = a * n.y + i * r.y;
  41185. }, t;
  41186. }(), Vy = Math.min, Fy = Math.max, zu = new Ke(), Vu = new Ke(), Fu = new Ke(), Wu = new Ke(), qp = new Ke(), Kp = new Ke(), EIe = function() {
  41187. function t(e, n, r, i) {
  41188. r < 0 && (e = e + r, r = -r), i < 0 && (n = n + i, i = -i), this.x = e, this.y = n, this.width = r, this.height = i;
  41189. }
  41190. return t.prototype.union = function(e) {
  41191. var n = Vy(e.x, this.x), r = Vy(e.y, this.y);
  41192. isFinite(this.x) && isFinite(this.width) ? this.width = Fy(e.x + e.width, this.x + this.width) - n : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = Fy(e.y + e.height, this.y + this.height) - r : this.height = e.height, this.x = n, this.y = r;
  41193. }, t.prototype.applyTransform = function(e) {
  41194. t.applyTransform(this, this, e);
  41195. }, t.prototype.calculateTransform = function(e) {
  41196. var n = this, r = e.width / n.width, i = e.height / n.height, a = Si();
  41197. return ao(a, a, [-n.x, -n.y]), Nx(a, a, [r, i]), ao(a, a, [e.x, e.y]), a;
  41198. }, t.prototype.intersect = function(e, n) {
  41199. if (!e)
  41200. return !1;
  41201. e instanceof t || (e = t.create(e));
  41202. var r = this, i = r.x, a = r.x + r.width, o = r.y, s = r.y + r.height, l = e.x, u = e.x + e.width, c = e.y, f = e.y + e.height, d = !(a < l || u < i || s < c || f < o);
  41203. if (n) {
  41204. var h = 1 / 0, p = 0, v = Math.abs(a - l), g = Math.abs(u - i), m = Math.abs(s - c), y = Math.abs(f - o), b = Math.min(v, g), _ = Math.min(m, y);
  41205. a < l || u < i ? b > p && (p = b, v < g ? Ke.set(Kp, -v, 0) : Ke.set(Kp, g, 0)) : b < h && (h = b, v < g ? Ke.set(qp, v, 0) : Ke.set(qp, -g, 0)), s < c || f < o ? _ > p && (p = _, m < y ? Ke.set(Kp, 0, -m) : Ke.set(Kp, 0, y)) : b < h && (h = b, m < y ? Ke.set(qp, 0, m) : Ke.set(qp, 0, -y));
  41206. }
  41207. return n && Ke.copy(n, d ? qp : Kp), d;
  41208. }, t.prototype.contain = function(e, n) {
  41209. var r = this;
  41210. return e >= r.x && e <= r.x + r.width && n >= r.y && n <= r.y + r.height;
  41211. }, t.prototype.clone = function() {
  41212. return new t(this.x, this.y, this.width, this.height);
  41213. }, t.prototype.copy = function(e) {
  41214. t.copy(this, e);
  41215. }, t.prototype.plain = function() {
  41216. return {
  41217. x: this.x,
  41218. y: this.y,
  41219. width: this.width,
  41220. height: this.height
  41221. };
  41222. }, t.prototype.isFinite = function() {
  41223. return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
  41224. }, t.prototype.isZero = function() {
  41225. return this.width === 0 || this.height === 0;
  41226. }, t.create = function(e) {
  41227. return new t(e.x, e.y, e.width, e.height);
  41228. }, t.copy = function(e, n) {
  41229. e.x = n.x, e.y = n.y, e.width = n.width, e.height = n.height;
  41230. }, t.applyTransform = function(e, n, r) {
  41231. if (!r) {
  41232. e !== n && t.copy(e, n);
  41233. return;
  41234. }
  41235. if (r[1] < 1e-5 && r[1] > -1e-5 && r[2] < 1e-5 && r[2] > -1e-5) {
  41236. var i = r[0], a = r[3], o = r[4], s = r[5];
  41237. e.x = n.x * i + o, e.y = n.y * a + s, e.width = n.width * i, e.height = n.height * a, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
  41238. return;
  41239. }
  41240. zu.x = Fu.x = n.x, zu.y = Wu.y = n.y, Vu.x = Wu.x = n.x + n.width, Vu.y = Fu.y = n.y + n.height, zu.transform(r), Wu.transform(r), Vu.transform(r), Fu.transform(r), e.x = Vy(zu.x, Vu.x, Fu.x, Wu.x), e.y = Vy(zu.y, Vu.y, Fu.y, Wu.y);
  41241. var l = Fy(zu.x, Vu.x, Fu.x, Wu.x), u = Fy(zu.y, Vu.y, Fu.y, Wu.y);
  41242. e.width = l - e.x, e.height = u - e.y;
  41243. }, t;
  41244. }();
  41245. const Je = EIe;
  41246. var Dq = "silent";
  41247. function MIe(t, e, n) {
  41248. return {
  41249. type: t,
  41250. event: n,
  41251. target: e.target,
  41252. topTarget: e.topTarget,
  41253. cancelBubble: !1,
  41254. offsetX: n.zrX,
  41255. offsetY: n.zrY,
  41256. gestureEvent: n.gestureEvent,
  41257. pinchX: n.pinchX,
  41258. pinchY: n.pinchY,
  41259. pinchScale: n.pinchScale,
  41260. wheelDelta: n.zrDelta,
  41261. zrByTouch: n.zrByTouch,
  41262. which: n.which,
  41263. stop: IIe
  41264. };
  41265. }
  41266. function IIe() {
  41267. Gs(this.event);
  41268. }
  41269. var DIe = function(t) {
  41270. q(e, t);
  41271. function e() {
  41272. var n = t !== null && t.apply(this, arguments) || this;
  41273. return n.handler = null, n;
  41274. }
  41275. return e.prototype.dispose = function() {
  41276. }, e.prototype.setCursor = function() {
  41277. }, e;
  41278. }(Ra), Jp = /* @__PURE__ */ function() {
  41279. function t(e, n) {
  41280. this.x = e, this.y = n;
  41281. }
  41282. return t;
  41283. }(), RIe = [
  41284. "click",
  41285. "dblclick",
  41286. "mousewheel",
  41287. "mouseout",
  41288. "mouseup",
  41289. "mousedown",
  41290. "mousemove",
  41291. "contextmenu"
  41292. ], HC = new Je(0, 0, 0, 0), Rq = function(t) {
  41293. q(e, t);
  41294. function e(n, r, i, a, o) {
  41295. var s = t.call(this) || this;
  41296. return s._hovered = new Jp(0, 0), s.storage = n, s.painter = r, s.painterRoot = a, s._pointerSize = o, i = i || new DIe(), s.proxy = null, s.setHandlerProxy(i), s._draggingMgr = new gIe(s), s;
  41297. }
  41298. return e.prototype.setHandlerProxy = function(n) {
  41299. this.proxy && this.proxy.dispose(), n && (k(RIe, function(r) {
  41300. n.on && n.on(r, this[r], this);
  41301. }, this), n.handler = this), this.proxy = n;
  41302. }, e.prototype.mousemove = function(n) {
  41303. var r = n.zrX, i = n.zrY, a = kq(this, r, i), o = this._hovered, s = o.target;
  41304. s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
  41305. var l = this._hovered = a ? new Jp(r, i) : this.findHover(r, i), u = l.target, c = this.proxy;
  41306. c.setCursor && c.setCursor(u ? u.cursor : "default"), s && u !== s && this.dispatchToElement(o, "mouseout", n), this.dispatchToElement(l, "mousemove", n), u && u !== s && this.dispatchToElement(l, "mouseover", n);
  41307. }, e.prototype.mouseout = function(n) {
  41308. var r = n.zrEventControl;
  41309. r !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", n), r !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: n });
  41310. }, e.prototype.resize = function() {
  41311. this._hovered = new Jp(0, 0);
  41312. }, e.prototype.dispatch = function(n, r) {
  41313. var i = this[n];
  41314. i && i.call(this, r);
  41315. }, e.prototype.dispose = function() {
  41316. this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
  41317. }, e.prototype.setCursorStyle = function(n) {
  41318. var r = this.proxy;
  41319. r.setCursor && r.setCursor(n);
  41320. }, e.prototype.dispatchToElement = function(n, r, i) {
  41321. n = n || {};
  41322. var a = n.target;
  41323. if (!(a && a.silent)) {
  41324. for (var o = "on" + r, s = MIe(r, n, i); a && (a[o] && (s.cancelBubble = !!a[o].call(a, s)), a.trigger(r, s), a = a.__hostTarget ? a.__hostTarget : a.parent, !s.cancelBubble); )
  41325. ;
  41326. s.cancelBubble || (this.trigger(r, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
  41327. typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(r, s);
  41328. }));
  41329. }
  41330. }, e.prototype.findHover = function(n, r, i) {
  41331. var a = this.storage.getDisplayList(), o = new Jp(n, r);
  41332. if (N6(a, o, n, r, i), this._pointerSize && !o.target) {
  41333. for (var s = [], l = this._pointerSize, u = l / 2, c = new Je(n - u, r - u, l, l), f = a.length - 1; f >= 0; f--) {
  41334. var d = a[f];
  41335. d !== i && !d.ignore && !d.ignoreCoarsePointer && (!d.parent || !d.parent.ignoreCoarsePointer) && (HC.copy(d.getBoundingRect()), d.transform && HC.applyTransform(d.transform), HC.intersect(c) && s.push(d));
  41336. }
  41337. if (s.length)
  41338. for (var h = 4, p = Math.PI / 12, v = Math.PI * 2, g = 0; g < u; g += h)
  41339. for (var m = 0; m < v; m += p) {
  41340. var y = n + g * Math.cos(m), b = r + g * Math.sin(m);
  41341. if (N6(s, o, y, b, i), o.target)
  41342. return o;
  41343. }
  41344. }
  41345. return o;
  41346. }, e.prototype.processGesture = function(n, r) {
  41347. this._gestureMgr || (this._gestureMgr = new PIe());
  41348. var i = this._gestureMgr;
  41349. r === "start" && i.clear();
  41350. var a = i.recognize(n, this.findHover(n.zrX, n.zrY, null).target, this.proxy.dom);
  41351. if (r === "end" && i.clear(), a) {
  41352. var o = a.type;
  41353. n.gestureEvent = o;
  41354. var s = new Jp();
  41355. s.target = a.target, this.dispatchToElement(s, o, a.event);
  41356. }
  41357. }, e;
  41358. }(Ra);
  41359. k(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  41360. Rq.prototype[t] = function(e) {
  41361. var n = e.zrX, r = e.zrY, i = kq(this, n, r), a, o;
  41362. if ((t !== "mouseup" || !i) && (a = this.findHover(n, r), o = a.target), t === "mousedown")
  41363. this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
  41364. else if (t === "mouseup")
  41365. this._upEl = o;
  41366. else if (t === "click") {
  41367. if (this._downEl !== this._upEl || !this._downPoint || Ts(this._downPoint, [e.zrX, e.zrY]) > 4)
  41368. return;
  41369. this._downPoint = null;
  41370. }
  41371. this.dispatchToElement(a, t, e);
  41372. };
  41373. });
  41374. function kIe(t, e, n) {
  41375. if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
  41376. for (var r = t, i = void 0, a = !1; r; ) {
  41377. if (r.ignoreClip && (a = !0), !a) {
  41378. var o = r.getClipPath();
  41379. if (o && !o.contain(e, n))
  41380. return !1;
  41381. }
  41382. r.silent && (i = !0);
  41383. var s = r.__hostTarget;
  41384. r = s || r.parent;
  41385. }
  41386. return i ? Dq : !0;
  41387. }
  41388. return !1;
  41389. }
  41390. function N6(t, e, n, r, i) {
  41391. for (var a = t.length - 1; a >= 0; a--) {
  41392. var o = t[a], s = void 0;
  41393. if (o !== i && !o.ignore && (s = kIe(o, n, r)) && (!e.topTarget && (e.topTarget = o), s !== Dq)) {
  41394. e.target = o;
  41395. break;
  41396. }
  41397. }
  41398. }
  41399. function kq(t, e, n) {
  41400. var r = t.painter;
  41401. return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
  41402. }
  41403. var Lq = 32, ev = 7;
  41404. function LIe(t) {
  41405. for (var e = 0; t >= Lq; )
  41406. e |= t & 1, t >>= 1;
  41407. return t + e;
  41408. }
  41409. function B6(t, e, n, r) {
  41410. var i = e + 1;
  41411. if (i === n)
  41412. return 1;
  41413. if (r(t[i++], t[e]) < 0) {
  41414. for (; i < n && r(t[i], t[i - 1]) < 0; )
  41415. i++;
  41416. NIe(t, e, i);
  41417. } else
  41418. for (; i < n && r(t[i], t[i - 1]) >= 0; )
  41419. i++;
  41420. return i - e;
  41421. }
  41422. function NIe(t, e, n) {
  41423. for (n--; e < n; ) {
  41424. var r = t[e];
  41425. t[e++] = t[n], t[n--] = r;
  41426. }
  41427. }
  41428. function z6(t, e, n, r, i) {
  41429. for (r === e && r++; r < n; r++) {
  41430. for (var a = t[r], o = e, s = r, l; o < s; )
  41431. l = o + s >>> 1, i(a, t[l]) < 0 ? s = l : o = l + 1;
  41432. var u = r - o;
  41433. switch (u) {
  41434. case 3:
  41435. t[o + 3] = t[o + 2];
  41436. case 2:
  41437. t[o + 2] = t[o + 1];
  41438. case 1:
  41439. t[o + 1] = t[o];
  41440. break;
  41441. default:
  41442. for (; u > 0; )
  41443. t[o + u] = t[o + u - 1], u--;
  41444. }
  41445. t[o] = a;
  41446. }
  41447. }
  41448. function GC(t, e, n, r, i, a) {
  41449. var o = 0, s = 0, l = 1;
  41450. if (a(t, e[n + i]) > 0) {
  41451. for (s = r - i; l < s && a(t, e[n + i + l]) > 0; )
  41452. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41453. l > s && (l = s), o += i, l += i;
  41454. } else {
  41455. for (s = i + 1; l < s && a(t, e[n + i - l]) <= 0; )
  41456. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41457. l > s && (l = s);
  41458. var u = o;
  41459. o = i - l, l = i - u;
  41460. }
  41461. for (o++; o < l; ) {
  41462. var c = o + (l - o >>> 1);
  41463. a(t, e[n + c]) > 0 ? o = c + 1 : l = c;
  41464. }
  41465. return l;
  41466. }
  41467. function jC(t, e, n, r, i, a) {
  41468. var o = 0, s = 0, l = 1;
  41469. if (a(t, e[n + i]) < 0) {
  41470. for (s = i + 1; l < s && a(t, e[n + i - l]) < 0; )
  41471. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41472. l > s && (l = s);
  41473. var u = o;
  41474. o = i - l, l = i - u;
  41475. } else {
  41476. for (s = r - i; l < s && a(t, e[n + i + l]) >= 0; )
  41477. o = l, l = (l << 1) + 1, l <= 0 && (l = s);
  41478. l > s && (l = s), o += i, l += i;
  41479. }
  41480. for (o++; o < l; ) {
  41481. var c = o + (l - o >>> 1);
  41482. a(t, e[n + c]) < 0 ? l = c : o = c + 1;
  41483. }
  41484. return l;
  41485. }
  41486. function BIe(t, e) {
  41487. var n = ev, r, i, a = 0, o = [];
  41488. r = [], i = [];
  41489. function s(h, p) {
  41490. r[a] = h, i[a] = p, a += 1;
  41491. }
  41492. function l() {
  41493. for (; a > 1; ) {
  41494. var h = a - 2;
  41495. if (h >= 1 && i[h - 1] <= i[h] + i[h + 1] || h >= 2 && i[h - 2] <= i[h] + i[h - 1])
  41496. i[h - 1] < i[h + 1] && h--;
  41497. else if (i[h] > i[h + 1])
  41498. break;
  41499. c(h);
  41500. }
  41501. }
  41502. function u() {
  41503. for (; a > 1; ) {
  41504. var h = a - 2;
  41505. h > 0 && i[h - 1] < i[h + 1] && h--, c(h);
  41506. }
  41507. }
  41508. function c(h) {
  41509. var p = r[h], v = i[h], g = r[h + 1], m = i[h + 1];
  41510. i[h] = v + m, h === a - 3 && (r[h + 1] = r[h + 2], i[h + 1] = i[h + 2]), a--;
  41511. var y = jC(t[g], t, p, v, 0, e);
  41512. p += y, v -= y, v !== 0 && (m = GC(t[p + v - 1], t, g, m, m - 1, e), m !== 0 && (v <= m ? f(p, v, g, m) : d(p, v, g, m)));
  41513. }
  41514. function f(h, p, v, g) {
  41515. var m = 0;
  41516. for (m = 0; m < p; m++)
  41517. o[m] = t[h + m];
  41518. var y = 0, b = v, _ = h;
  41519. if (t[_++] = t[b++], --g === 0) {
  41520. for (m = 0; m < p; m++)
  41521. t[_ + m] = o[y + m];
  41522. return;
  41523. }
  41524. if (p === 1) {
  41525. for (m = 0; m < g; m++)
  41526. t[_ + m] = t[b + m];
  41527. t[_ + g] = o[y];
  41528. return;
  41529. }
  41530. for (var O = n, S, x, C; ; ) {
  41531. S = 0, x = 0, C = !1;
  41532. do
  41533. if (e(t[b], o[y]) < 0) {
  41534. if (t[_++] = t[b++], x++, S = 0, --g === 0) {
  41535. C = !0;
  41536. break;
  41537. }
  41538. } else if (t[_++] = o[y++], S++, x = 0, --p === 1) {
  41539. C = !0;
  41540. break;
  41541. }
  41542. while ((S | x) < O);
  41543. if (C)
  41544. break;
  41545. do {
  41546. if (S = jC(t[b], o, y, p, 0, e), S !== 0) {
  41547. for (m = 0; m < S; m++)
  41548. t[_ + m] = o[y + m];
  41549. if (_ += S, y += S, p -= S, p <= 1) {
  41550. C = !0;
  41551. break;
  41552. }
  41553. }
  41554. if (t[_++] = t[b++], --g === 0) {
  41555. C = !0;
  41556. break;
  41557. }
  41558. if (x = GC(o[y], t, b, g, 0, e), x !== 0) {
  41559. for (m = 0; m < x; m++)
  41560. t[_ + m] = t[b + m];
  41561. if (_ += x, b += x, g -= x, g === 0) {
  41562. C = !0;
  41563. break;
  41564. }
  41565. }
  41566. if (t[_++] = o[y++], --p === 1) {
  41567. C = !0;
  41568. break;
  41569. }
  41570. O--;
  41571. } while (S >= ev || x >= ev);
  41572. if (C)
  41573. break;
  41574. O < 0 && (O = 0), O += 2;
  41575. }
  41576. if (n = O, n < 1 && (n = 1), p === 1) {
  41577. for (m = 0; m < g; m++)
  41578. t[_ + m] = t[b + m];
  41579. t[_ + g] = o[y];
  41580. } else {
  41581. if (p === 0)
  41582. throw new Error();
  41583. for (m = 0; m < p; m++)
  41584. t[_ + m] = o[y + m];
  41585. }
  41586. }
  41587. function d(h, p, v, g) {
  41588. var m = 0;
  41589. for (m = 0; m < g; m++)
  41590. o[m] = t[v + m];
  41591. var y = h + p - 1, b = g - 1, _ = v + g - 1, O = 0, S = 0;
  41592. if (t[_--] = t[y--], --p === 0) {
  41593. for (O = _ - (g - 1), m = 0; m < g; m++)
  41594. t[O + m] = o[m];
  41595. return;
  41596. }
  41597. if (g === 1) {
  41598. for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
  41599. t[S + m] = t[O + m];
  41600. t[_] = o[b];
  41601. return;
  41602. }
  41603. for (var x = n; ; ) {
  41604. var C = 0, T = 0, w = !1;
  41605. do
  41606. if (e(o[b], t[y]) < 0) {
  41607. if (t[_--] = t[y--], C++, T = 0, --p === 0) {
  41608. w = !0;
  41609. break;
  41610. }
  41611. } else if (t[_--] = o[b--], T++, C = 0, --g === 1) {
  41612. w = !0;
  41613. break;
  41614. }
  41615. while ((C | T) < x);
  41616. if (w)
  41617. break;
  41618. do {
  41619. if (C = p - jC(o[b], t, h, p, p - 1, e), C !== 0) {
  41620. for (_ -= C, y -= C, p -= C, S = _ + 1, O = y + 1, m = C - 1; m >= 0; m--)
  41621. t[S + m] = t[O + m];
  41622. if (p === 0) {
  41623. w = !0;
  41624. break;
  41625. }
  41626. }
  41627. if (t[_--] = o[b--], --g === 1) {
  41628. w = !0;
  41629. break;
  41630. }
  41631. if (T = g - GC(t[y], o, 0, g, g - 1, e), T !== 0) {
  41632. for (_ -= T, b -= T, g -= T, S = _ + 1, O = b + 1, m = 0; m < T; m++)
  41633. t[S + m] = o[O + m];
  41634. if (g <= 1) {
  41635. w = !0;
  41636. break;
  41637. }
  41638. }
  41639. if (t[_--] = t[y--], --p === 0) {
  41640. w = !0;
  41641. break;
  41642. }
  41643. x--;
  41644. } while (C >= ev || T >= ev);
  41645. if (w)
  41646. break;
  41647. x < 0 && (x = 0), x += 2;
  41648. }
  41649. if (n = x, n < 1 && (n = 1), g === 1) {
  41650. for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
  41651. t[S + m] = t[O + m];
  41652. t[_] = o[b];
  41653. } else {
  41654. if (g === 0)
  41655. throw new Error();
  41656. for (O = _ - (g - 1), m = 0; m < g; m++)
  41657. t[O + m] = o[m];
  41658. }
  41659. }
  41660. return {
  41661. mergeRuns: l,
  41662. forceMergeRuns: u,
  41663. pushRun: s
  41664. };
  41665. }
  41666. function k_(t, e, n, r) {
  41667. n || (n = 0), r || (r = t.length);
  41668. var i = r - n;
  41669. if (!(i < 2)) {
  41670. var a = 0;
  41671. if (i < Lq) {
  41672. a = B6(t, n, r, e), z6(t, n, r, n + a, e);
  41673. return;
  41674. }
  41675. var o = BIe(t, e), s = LIe(i);
  41676. do {
  41677. if (a = B6(t, n, r, e), a < s) {
  41678. var l = i;
  41679. l > s && (l = s), z6(t, n, n + l, n + a, e), a = l;
  41680. }
  41681. o.pushRun(n, a), o.mergeRuns(), i -= a, n += a;
  41682. } while (i !== 0);
  41683. o.forceMergeRuns();
  41684. }
  41685. }
  41686. var ki = 1, Vv = 2, $d = 4, V6 = !1;
  41687. function ZC() {
  41688. V6 || (V6 = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
  41689. }
  41690. function F6(t, e) {
  41691. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
  41692. }
  41693. var zIe = function() {
  41694. function t() {
  41695. this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = F6;
  41696. }
  41697. return t.prototype.traverse = function(e, n) {
  41698. for (var r = 0; r < this._roots.length; r++)
  41699. this._roots[r].traverse(e, n);
  41700. }, t.prototype.getDisplayList = function(e, n) {
  41701. n = n || !1;
  41702. var r = this._displayList;
  41703. return (e || !r.length) && this.updateDisplayList(n), r;
  41704. }, t.prototype.updateDisplayList = function(e) {
  41705. this._displayListLen = 0;
  41706. for (var n = this._roots, r = this._displayList, i = 0, a = n.length; i < a; i++)
  41707. this._updateAndAddDisplayable(n[i], null, e);
  41708. r.length = this._displayListLen, k_(r, F6);
  41709. }, t.prototype._updateAndAddDisplayable = function(e, n, r) {
  41710. if (!(e.ignore && !r)) {
  41711. e.beforeUpdate(), e.update(), e.afterUpdate();
  41712. var i = e.getClipPath();
  41713. if (e.ignoreClip)
  41714. n = null;
  41715. else if (i) {
  41716. n ? n = n.slice() : n = [];
  41717. for (var a = i, o = e; a; )
  41718. a.parent = o, a.updateTransform(), n.push(a), o = a, a = a.getClipPath();
  41719. }
  41720. if (e.childrenRef) {
  41721. for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
  41722. var u = s[l];
  41723. e.__dirty && (u.__dirty |= ki), this._updateAndAddDisplayable(u, n, r);
  41724. }
  41725. e.__dirty = 0;
  41726. } else {
  41727. var c = e;
  41728. n && n.length ? c.__clipPaths = n : c.__clipPaths && c.__clipPaths.length > 0 && (c.__clipPaths = []), isNaN(c.z) && (ZC(), c.z = 0), isNaN(c.z2) && (ZC(), c.z2 = 0), isNaN(c.zlevel) && (ZC(), c.zlevel = 0), this._displayList[this._displayListLen++] = c;
  41729. }
  41730. var f = e.getDecalElement && e.getDecalElement();
  41731. f && this._updateAndAddDisplayable(f, n, r);
  41732. var d = e.getTextGuideLine();
  41733. d && this._updateAndAddDisplayable(d, n, r);
  41734. var h = e.getTextContent();
  41735. h && this._updateAndAddDisplayable(h, n, r);
  41736. }
  41737. }, t.prototype.addRoot = function(e) {
  41738. e.__zr && e.__zr.storage === this || this._roots.push(e);
  41739. }, t.prototype.delRoot = function(e) {
  41740. if (e instanceof Array) {
  41741. for (var n = 0, r = e.length; n < r; n++)
  41742. this.delRoot(e[n]);
  41743. return;
  41744. }
  41745. var i = et(this._roots, e);
  41746. i >= 0 && this._roots.splice(i, 1);
  41747. }, t.prototype.delAllRoots = function() {
  41748. this._roots = [], this._displayList = [], this._displayListLen = 0;
  41749. }, t.prototype.getRoots = function() {
  41750. return this._roots;
  41751. }, t.prototype.dispose = function() {
  41752. this._displayList = null, this._roots = null;
  41753. }, t;
  41754. }(), Y1;
  41755. Y1 = vt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
  41756. return setTimeout(t, 16);
  41757. };
  41758. var wg = {
  41759. linear: function(t) {
  41760. return t;
  41761. },
  41762. quadraticIn: function(t) {
  41763. return t * t;
  41764. },
  41765. quadraticOut: function(t) {
  41766. return t * (2 - t);
  41767. },
  41768. quadraticInOut: function(t) {
  41769. return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
  41770. },
  41771. cubicIn: function(t) {
  41772. return t * t * t;
  41773. },
  41774. cubicOut: function(t) {
  41775. return --t * t * t + 1;
  41776. },
  41777. cubicInOut: function(t) {
  41778. return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
  41779. },
  41780. quarticIn: function(t) {
  41781. return t * t * t * t;
  41782. },
  41783. quarticOut: function(t) {
  41784. return 1 - --t * t * t * t;
  41785. },
  41786. quarticInOut: function(t) {
  41787. return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
  41788. },
  41789. quinticIn: function(t) {
  41790. return t * t * t * t * t;
  41791. },
  41792. quinticOut: function(t) {
  41793. return --t * t * t * t * t + 1;
  41794. },
  41795. quinticInOut: function(t) {
  41796. return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
  41797. },
  41798. sinusoidalIn: function(t) {
  41799. return 1 - Math.cos(t * Math.PI / 2);
  41800. },
  41801. sinusoidalOut: function(t) {
  41802. return Math.sin(t * Math.PI / 2);
  41803. },
  41804. sinusoidalInOut: function(t) {
  41805. return 0.5 * (1 - Math.cos(Math.PI * t));
  41806. },
  41807. exponentialIn: function(t) {
  41808. return t === 0 ? 0 : Math.pow(1024, t - 1);
  41809. },
  41810. exponentialOut: function(t) {
  41811. return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
  41812. },
  41813. exponentialInOut: function(t) {
  41814. return t === 0 ? 0 : t === 1 ? 1 : (t *= 2) < 1 ? 0.5 * Math.pow(1024, t - 1) : 0.5 * (-Math.pow(2, -10 * (t - 1)) + 2);
  41815. },
  41816. circularIn: function(t) {
  41817. return 1 - Math.sqrt(1 - t * t);
  41818. },
  41819. circularOut: function(t) {
  41820. return Math.sqrt(1 - --t * t);
  41821. },
  41822. circularInOut: function(t) {
  41823. return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  41824. },
  41825. elasticIn: function(t) {
  41826. var e, n = 0.1, r = 0.4;
  41827. return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), -(n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)));
  41828. },
  41829. elasticOut: function(t) {
  41830. var e, n = 0.1, r = 0.4;
  41831. return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), n * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / r) + 1);
  41832. },
  41833. elasticInOut: function(t) {
  41834. var e, n = 0.1, r = 0.4;
  41835. return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), (t *= 2) < 1 ? -0.5 * (n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)) : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r) * 0.5 + 1);
  41836. },
  41837. backIn: function(t) {
  41838. var e = 1.70158;
  41839. return t * t * ((e + 1) * t - e);
  41840. },
  41841. backOut: function(t) {
  41842. var e = 1.70158;
  41843. return --t * t * ((e + 1) * t + e) + 1;
  41844. },
  41845. backInOut: function(t) {
  41846. var e = 2.5949095;
  41847. return (t *= 2) < 1 ? 0.5 * (t * t * ((e + 1) * t - e)) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
  41848. },
  41849. bounceIn: function(t) {
  41850. return 1 - wg.bounceOut(1 - t);
  41851. },
  41852. bounceOut: function(t) {
  41853. return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;
  41854. },
  41855. bounceInOut: function(t) {
  41856. return t < 0.5 ? wg.bounceIn(t * 2) * 0.5 : wg.bounceOut(t * 2 - 1) * 0.5 + 0.5;
  41857. }
  41858. }, Wy = Math.pow, Xl = Math.sqrt, q1 = 1e-8, Nq = 1e-4, W6 = Xl(3), Qy = 1 / 3, ko = wu(), ha = wu(), Jd = wu();
  41859. function Ll(t) {
  41860. return t > -q1 && t < q1;
  41861. }
  41862. function Bq(t) {
  41863. return t > q1 || t < -q1;
  41864. }
  41865. function Gn(t, e, n, r, i) {
  41866. var a = 1 - i;
  41867. return a * a * (a * t + 3 * i * e) + i * i * (i * r + 3 * a * n);
  41868. }
  41869. function Q6(t, e, n, r, i) {
  41870. var a = 1 - i;
  41871. return 3 * (((e - t) * a + 2 * (n - e) * i) * a + (r - n) * i * i);
  41872. }
  41873. function K1(t, e, n, r, i, a) {
  41874. var o = r + 3 * (e - n) - t, s = 3 * (n - e * 2 + t), l = 3 * (e - t), u = t - i, c = s * s - 3 * o * l, f = s * l - 9 * o * u, d = l * l - 3 * s * u, h = 0;
  41875. if (Ll(c) && Ll(f))
  41876. if (Ll(s))
  41877. a[0] = 0;
  41878. else {
  41879. var p = -l / s;
  41880. p >= 0 && p <= 1 && (a[h++] = p);
  41881. }
  41882. else {
  41883. var v = f * f - 4 * c * d;
  41884. if (Ll(v)) {
  41885. var g = f / c, p = -s / o + g, m = -g / 2;
  41886. p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m);
  41887. } else if (v > 0) {
  41888. var y = Xl(v), b = c * s + 1.5 * o * (-f + y), _ = c * s + 1.5 * o * (-f - y);
  41889. b < 0 ? b = -Wy(-b, Qy) : b = Wy(b, Qy), _ < 0 ? _ = -Wy(-_, Qy) : _ = Wy(_, Qy);
  41890. var p = (-s - (b + _)) / (3 * o);
  41891. p >= 0 && p <= 1 && (a[h++] = p);
  41892. } else {
  41893. var O = (2 * c * s - 3 * o * f) / (2 * Xl(c * c * c)), S = Math.acos(O) / 3, x = Xl(c), C = Math.cos(S), p = (-s - 2 * x * C) / (3 * o), m = (-s + x * (C + W6 * Math.sin(S))) / (3 * o), T = (-s + x * (C - W6 * Math.sin(S))) / (3 * o);
  41894. p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m), T >= 0 && T <= 1 && (a[h++] = T);
  41895. }
  41896. }
  41897. return h;
  41898. }
  41899. function zq(t, e, n, r, i) {
  41900. var a = 6 * n - 12 * e + 6 * t, o = 9 * e + 3 * r - 3 * t - 9 * n, s = 3 * e - 3 * t, l = 0;
  41901. if (Ll(o)) {
  41902. if (Bq(a)) {
  41903. var u = -s / a;
  41904. u >= 0 && u <= 1 && (i[l++] = u);
  41905. }
  41906. } else {
  41907. var c = a * a - 4 * o * s;
  41908. if (Ll(c))
  41909. i[0] = -a / (2 * o);
  41910. else if (c > 0) {
  41911. var f = Xl(c), u = (-a + f) / (2 * o), d = (-a - f) / (2 * o);
  41912. u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
  41913. }
  41914. }
  41915. return l;
  41916. }
  41917. function su(t, e, n, r, i, a) {
  41918. var o = (e - t) * i + t, s = (n - e) * i + e, l = (r - n) * i + n, u = (s - o) * i + o, c = (l - s) * i + s, f = (c - u) * i + u;
  41919. a[0] = t, a[1] = o, a[2] = u, a[3] = f, a[4] = f, a[5] = c, a[6] = l, a[7] = r;
  41920. }
  41921. function Vq(t, e, n, r, i, a, o, s, l, u, c) {
  41922. var f, d = 5e-3, h = 1 / 0, p, v, g, m;
  41923. ko[0] = l, ko[1] = u;
  41924. for (var y = 0; y < 1; y += 0.05)
  41925. ha[0] = Gn(t, n, i, o, y), ha[1] = Gn(e, r, a, s, y), g = Ul(ko, ha), g < h && (f = y, h = g);
  41926. h = 1 / 0;
  41927. for (var b = 0; b < 32 && !(d < Nq); b++)
  41928. p = f - d, v = f + d, ha[0] = Gn(t, n, i, o, p), ha[1] = Gn(e, r, a, s, p), g = Ul(ha, ko), p >= 0 && g < h ? (f = p, h = g) : (Jd[0] = Gn(t, n, i, o, v), Jd[1] = Gn(e, r, a, s, v), m = Ul(Jd, ko), v <= 1 && m < h ? (f = v, h = m) : d *= 0.5);
  41929. return c && (c[0] = Gn(t, n, i, o, f), c[1] = Gn(e, r, a, s, f)), Xl(h);
  41930. }
  41931. function VIe(t, e, n, r, i, a, o, s, l) {
  41932. for (var u = t, c = e, f = 0, d = 1 / l, h = 1; h <= l; h++) {
  41933. var p = h * d, v = Gn(t, n, i, o, p), g = Gn(e, r, a, s, p), m = v - u, y = g - c;
  41934. f += Math.sqrt(m * m + y * y), u = v, c = g;
  41935. }
  41936. return f;
  41937. }
  41938. function ir(t, e, n, r) {
  41939. var i = 1 - r;
  41940. return i * (i * t + 2 * r * e) + r * r * n;
  41941. }
  41942. function fA(t, e, n, r) {
  41943. return 2 * ((1 - r) * (e - t) + r * (n - e));
  41944. }
  41945. function FIe(t, e, n, r, i) {
  41946. var a = t - 2 * e + n, o = 2 * (e - t), s = t - r, l = 0;
  41947. if (Ll(a)) {
  41948. if (Bq(o)) {
  41949. var u = -s / o;
  41950. u >= 0 && u <= 1 && (i[l++] = u);
  41951. }
  41952. } else {
  41953. var c = o * o - 4 * a * s;
  41954. if (Ll(c)) {
  41955. var u = -o / (2 * a);
  41956. u >= 0 && u <= 1 && (i[l++] = u);
  41957. } else if (c > 0) {
  41958. var f = Xl(c), u = (-o + f) / (2 * a), d = (-o - f) / (2 * a);
  41959. u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
  41960. }
  41961. }
  41962. return l;
  41963. }
  41964. function Fq(t, e, n) {
  41965. var r = t + n - 2 * e;
  41966. return r === 0 ? 0.5 : (t - e) / r;
  41967. }
  41968. function ym(t, e, n, r, i) {
  41969. var a = (e - t) * r + t, o = (n - e) * r + e, s = (o - a) * r + a;
  41970. i[0] = t, i[1] = a, i[2] = s, i[3] = s, i[4] = o, i[5] = n;
  41971. }
  41972. function Wq(t, e, n, r, i, a, o, s, l) {
  41973. var u, c = 5e-3, f = 1 / 0;
  41974. ko[0] = o, ko[1] = s;
  41975. for (var d = 0; d < 1; d += 0.05) {
  41976. ha[0] = ir(t, n, i, d), ha[1] = ir(e, r, a, d);
  41977. var h = Ul(ko, ha);
  41978. h < f && (u = d, f = h);
  41979. }
  41980. f = 1 / 0;
  41981. for (var p = 0; p < 32 && !(c < Nq); p++) {
  41982. var v = u - c, g = u + c;
  41983. ha[0] = ir(t, n, i, v), ha[1] = ir(e, r, a, v);
  41984. var h = Ul(ha, ko);
  41985. if (v >= 0 && h < f)
  41986. u = v, f = h;
  41987. else {
  41988. Jd[0] = ir(t, n, i, g), Jd[1] = ir(e, r, a, g);
  41989. var m = Ul(Jd, ko);
  41990. g <= 1 && m < f ? (u = g, f = m) : c *= 0.5;
  41991. }
  41992. }
  41993. return l && (l[0] = ir(t, n, i, u), l[1] = ir(e, r, a, u)), Xl(f);
  41994. }
  41995. function WIe(t, e, n, r, i, a, o) {
  41996. for (var s = t, l = e, u = 0, c = 1 / o, f = 1; f <= o; f++) {
  41997. var d = f * c, h = ir(t, n, i, d), p = ir(e, r, a, d), v = h - s, g = p - l;
  41998. u += Math.sqrt(v * v + g * g), s = h, l = p;
  41999. }
  42000. return u;
  42001. }
  42002. var QIe = /cubic-bezier\(([0-9,\.e ]+)\)/;
  42003. function SR(t) {
  42004. var e = t && QIe.exec(t);
  42005. if (e) {
  42006. var n = e[1].split(","), r = +ma(n[0]), i = +ma(n[1]), a = +ma(n[2]), o = +ma(n[3]);
  42007. if (isNaN(r + i + a + o))
  42008. return;
  42009. var s = [];
  42010. return function(l) {
  42011. return l <= 0 ? 0 : l >= 1 ? 1 : K1(0, r, a, 1, l, s) && Gn(0, i, o, 1, s[0]);
  42012. };
  42013. }
  42014. }
  42015. var HIe = function() {
  42016. function t(e) {
  42017. this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = e.life || 1e3, this._delay = e.delay || 0, this.loop = e.loop || !1, this.onframe = e.onframe || On, this.ondestroy = e.ondestroy || On, this.onrestart = e.onrestart || On, e.easing && this.setEasing(e.easing);
  42018. }
  42019. return t.prototype.step = function(e, n) {
  42020. if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
  42021. this._pausedTime += n;
  42022. return;
  42023. }
  42024. var r = this._life, i = e - this._startTime - this._pausedTime, a = i / r;
  42025. a < 0 && (a = 0), a = Math.min(a, 1);
  42026. var o = this.easingFunc, s = o ? o(a) : a;
  42027. if (this.onframe(s), a === 1)
  42028. if (this.loop) {
  42029. var l = i % r;
  42030. this._startTime = e - l, this._pausedTime = 0, this.onrestart();
  42031. } else
  42032. return !0;
  42033. return !1;
  42034. }, t.prototype.pause = function() {
  42035. this._paused = !0;
  42036. }, t.prototype.resume = function() {
  42037. this._paused = !1;
  42038. }, t.prototype.setEasing = function(e) {
  42039. this.easing = e, this.easingFunc = Me(e) ? e : wg[e] || SR(e);
  42040. }, t;
  42041. }(), Qq = /* @__PURE__ */ function() {
  42042. function t(e) {
  42043. this.value = e;
  42044. }
  42045. return t;
  42046. }(), GIe = function() {
  42047. function t() {
  42048. this._len = 0;
  42049. }
  42050. return t.prototype.insert = function(e) {
  42051. var n = new Qq(e);
  42052. return this.insertEntry(n), n;
  42053. }, t.prototype.insertEntry = function(e) {
  42054. this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++;
  42055. }, t.prototype.remove = function(e) {
  42056. var n = e.prev, r = e.next;
  42057. n ? n.next = r : this.head = r, r ? r.prev = n : this.tail = n, e.next = e.prev = null, this._len--;
  42058. }, t.prototype.len = function() {
  42059. return this._len;
  42060. }, t.prototype.clear = function() {
  42061. this.head = this.tail = null, this._len = 0;
  42062. }, t;
  42063. }(), R0 = function() {
  42064. function t(e) {
  42065. this._list = new GIe(), this._maxSize = 10, this._map = {}, this._maxSize = e;
  42066. }
  42067. return t.prototype.put = function(e, n) {
  42068. var r = this._list, i = this._map, a = null;
  42069. if (i[e] == null) {
  42070. var o = r.len(), s = this._lastRemovedEntry;
  42071. if (o >= this._maxSize && o > 0) {
  42072. var l = r.head;
  42073. r.remove(l), delete i[l.key], a = l.value, this._lastRemovedEntry = l;
  42074. }
  42075. s ? s.value = n : s = new Qq(n), s.key = e, r.insertEntry(s), i[e] = s;
  42076. }
  42077. return a;
  42078. }, t.prototype.get = function(e) {
  42079. var n = this._map[e], r = this._list;
  42080. if (n != null)
  42081. return n !== r.tail && (r.remove(n), r.insertEntry(n)), n.value;
  42082. }, t.prototype.clear = function() {
  42083. this._list.clear(), this._map = {};
  42084. }, t.prototype.len = function() {
  42085. return this._list.len();
  42086. }, t;
  42087. }(), H6 = {
  42088. transparent: [0, 0, 0, 0],
  42089. aliceblue: [240, 248, 255, 1],
  42090. antiquewhite: [250, 235, 215, 1],
  42091. aqua: [0, 255, 255, 1],
  42092. aquamarine: [127, 255, 212, 1],
  42093. azure: [240, 255, 255, 1],
  42094. beige: [245, 245, 220, 1],
  42095. bisque: [255, 228, 196, 1],
  42096. black: [0, 0, 0, 1],
  42097. blanchedalmond: [255, 235, 205, 1],
  42098. blue: [0, 0, 255, 1],
  42099. blueviolet: [138, 43, 226, 1],
  42100. brown: [165, 42, 42, 1],
  42101. burlywood: [222, 184, 135, 1],
  42102. cadetblue: [95, 158, 160, 1],
  42103. chartreuse: [127, 255, 0, 1],
  42104. chocolate: [210, 105, 30, 1],
  42105. coral: [255, 127, 80, 1],
  42106. cornflowerblue: [100, 149, 237, 1],
  42107. cornsilk: [255, 248, 220, 1],
  42108. crimson: [220, 20, 60, 1],
  42109. cyan: [0, 255, 255, 1],
  42110. darkblue: [0, 0, 139, 1],
  42111. darkcyan: [0, 139, 139, 1],
  42112. darkgoldenrod: [184, 134, 11, 1],
  42113. darkgray: [169, 169, 169, 1],
  42114. darkgreen: [0, 100, 0, 1],
  42115. darkgrey: [169, 169, 169, 1],
  42116. darkkhaki: [189, 183, 107, 1],
  42117. darkmagenta: [139, 0, 139, 1],
  42118. darkolivegreen: [85, 107, 47, 1],
  42119. darkorange: [255, 140, 0, 1],
  42120. darkorchid: [153, 50, 204, 1],
  42121. darkred: [139, 0, 0, 1],
  42122. darksalmon: [233, 150, 122, 1],
  42123. darkseagreen: [143, 188, 143, 1],
  42124. darkslateblue: [72, 61, 139, 1],
  42125. darkslategray: [47, 79, 79, 1],
  42126. darkslategrey: [47, 79, 79, 1],
  42127. darkturquoise: [0, 206, 209, 1],
  42128. darkviolet: [148, 0, 211, 1],
  42129. deeppink: [255, 20, 147, 1],
  42130. deepskyblue: [0, 191, 255, 1],
  42131. dimgray: [105, 105, 105, 1],
  42132. dimgrey: [105, 105, 105, 1],
  42133. dodgerblue: [30, 144, 255, 1],
  42134. firebrick: [178, 34, 34, 1],
  42135. floralwhite: [255, 250, 240, 1],
  42136. forestgreen: [34, 139, 34, 1],
  42137. fuchsia: [255, 0, 255, 1],
  42138. gainsboro: [220, 220, 220, 1],
  42139. ghostwhite: [248, 248, 255, 1],
  42140. gold: [255, 215, 0, 1],
  42141. goldenrod: [218, 165, 32, 1],
  42142. gray: [128, 128, 128, 1],
  42143. green: [0, 128, 0, 1],
  42144. greenyellow: [173, 255, 47, 1],
  42145. grey: [128, 128, 128, 1],
  42146. honeydew: [240, 255, 240, 1],
  42147. hotpink: [255, 105, 180, 1],
  42148. indianred: [205, 92, 92, 1],
  42149. indigo: [75, 0, 130, 1],
  42150. ivory: [255, 255, 240, 1],
  42151. khaki: [240, 230, 140, 1],
  42152. lavender: [230, 230, 250, 1],
  42153. lavenderblush: [255, 240, 245, 1],
  42154. lawngreen: [124, 252, 0, 1],
  42155. lemonchiffon: [255, 250, 205, 1],
  42156. lightblue: [173, 216, 230, 1],
  42157. lightcoral: [240, 128, 128, 1],
  42158. lightcyan: [224, 255, 255, 1],
  42159. lightgoldenrodyellow: [250, 250, 210, 1],
  42160. lightgray: [211, 211, 211, 1],
  42161. lightgreen: [144, 238, 144, 1],
  42162. lightgrey: [211, 211, 211, 1],
  42163. lightpink: [255, 182, 193, 1],
  42164. lightsalmon: [255, 160, 122, 1],
  42165. lightseagreen: [32, 178, 170, 1],
  42166. lightskyblue: [135, 206, 250, 1],
  42167. lightslategray: [119, 136, 153, 1],
  42168. lightslategrey: [119, 136, 153, 1],
  42169. lightsteelblue: [176, 196, 222, 1],
  42170. lightyellow: [255, 255, 224, 1],
  42171. lime: [0, 255, 0, 1],
  42172. limegreen: [50, 205, 50, 1],
  42173. linen: [250, 240, 230, 1],
  42174. magenta: [255, 0, 255, 1],
  42175. maroon: [128, 0, 0, 1],
  42176. mediumaquamarine: [102, 205, 170, 1],
  42177. mediumblue: [0, 0, 205, 1],
  42178. mediumorchid: [186, 85, 211, 1],
  42179. mediumpurple: [147, 112, 219, 1],
  42180. mediumseagreen: [60, 179, 113, 1],
  42181. mediumslateblue: [123, 104, 238, 1],
  42182. mediumspringgreen: [0, 250, 154, 1],
  42183. mediumturquoise: [72, 209, 204, 1],
  42184. mediumvioletred: [199, 21, 133, 1],
  42185. midnightblue: [25, 25, 112, 1],
  42186. mintcream: [245, 255, 250, 1],
  42187. mistyrose: [255, 228, 225, 1],
  42188. moccasin: [255, 228, 181, 1],
  42189. navajowhite: [255, 222, 173, 1],
  42190. navy: [0, 0, 128, 1],
  42191. oldlace: [253, 245, 230, 1],
  42192. olive: [128, 128, 0, 1],
  42193. olivedrab: [107, 142, 35, 1],
  42194. orange: [255, 165, 0, 1],
  42195. orangered: [255, 69, 0, 1],
  42196. orchid: [218, 112, 214, 1],
  42197. palegoldenrod: [238, 232, 170, 1],
  42198. palegreen: [152, 251, 152, 1],
  42199. paleturquoise: [175, 238, 238, 1],
  42200. palevioletred: [219, 112, 147, 1],
  42201. papayawhip: [255, 239, 213, 1],
  42202. peachpuff: [255, 218, 185, 1],
  42203. peru: [205, 133, 63, 1],
  42204. pink: [255, 192, 203, 1],
  42205. plum: [221, 160, 221, 1],
  42206. powderblue: [176, 224, 230, 1],
  42207. purple: [128, 0, 128, 1],
  42208. red: [255, 0, 0, 1],
  42209. rosybrown: [188, 143, 143, 1],
  42210. royalblue: [65, 105, 225, 1],
  42211. saddlebrown: [139, 69, 19, 1],
  42212. salmon: [250, 128, 114, 1],
  42213. sandybrown: [244, 164, 96, 1],
  42214. seagreen: [46, 139, 87, 1],
  42215. seashell: [255, 245, 238, 1],
  42216. sienna: [160, 82, 45, 1],
  42217. silver: [192, 192, 192, 1],
  42218. skyblue: [135, 206, 235, 1],
  42219. slateblue: [106, 90, 205, 1],
  42220. slategray: [112, 128, 144, 1],
  42221. slategrey: [112, 128, 144, 1],
  42222. snow: [255, 250, 250, 1],
  42223. springgreen: [0, 255, 127, 1],
  42224. steelblue: [70, 130, 180, 1],
  42225. tan: [210, 180, 140, 1],
  42226. teal: [0, 128, 128, 1],
  42227. thistle: [216, 191, 216, 1],
  42228. tomato: [255, 99, 71, 1],
  42229. turquoise: [64, 224, 208, 1],
  42230. violet: [238, 130, 238, 1],
  42231. wheat: [245, 222, 179, 1],
  42232. white: [255, 255, 255, 1],
  42233. whitesmoke: [245, 245, 245, 1],
  42234. yellow: [255, 255, 0, 1],
  42235. yellowgreen: [154, 205, 50, 1]
  42236. };
  42237. function Ja(t) {
  42238. return t = Math.round(t), t < 0 ? 0 : t > 255 ? 255 : t;
  42239. }
  42240. function jIe(t) {
  42241. return t = Math.round(t), t < 0 ? 0 : t > 360 ? 360 : t;
  42242. }
  42243. function bm(t) {
  42244. return t < 0 ? 0 : t > 1 ? 1 : t;
  42245. }
  42246. function UC(t) {
  42247. var e = t;
  42248. return e.length && e.charAt(e.length - 1) === "%" ? Ja(parseFloat(e) / 100 * 255) : Ja(parseInt(e, 10));
  42249. }
  42250. function qc(t) {
  42251. var e = t;
  42252. return e.length && e.charAt(e.length - 1) === "%" ? bm(parseFloat(e) / 100) : bm(parseFloat(e));
  42253. }
  42254. function XC(t, e, n) {
  42255. return n < 0 ? n += 1 : n > 1 && (n -= 1), n * 6 < 1 ? t + (e - t) * n * 6 : n * 2 < 1 ? e : n * 3 < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t;
  42256. }
  42257. function Nl(t, e, n) {
  42258. return t + (e - t) * n;
  42259. }
  42260. function aa(t, e, n, r, i) {
  42261. return t[0] = e, t[1] = n, t[2] = r, t[3] = i, t;
  42262. }
  42263. function dA(t, e) {
  42264. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
  42265. }
  42266. var Hq = new R0(20), Hy = null;
  42267. function td(t, e) {
  42268. Hy && dA(Hy, e), Hy = Hq.put(t, Hy || e.slice());
  42269. }
  42270. function qr(t, e) {
  42271. if (t) {
  42272. e = e || [];
  42273. var n = Hq.get(t);
  42274. if (n)
  42275. return dA(e, n);
  42276. t = t + "";
  42277. var r = t.replace(/ /g, "").toLowerCase();
  42278. if (r in H6)
  42279. return dA(e, H6[r]), td(t, e), e;
  42280. var i = r.length;
  42281. if (r.charAt(0) === "#") {
  42282. if (i === 4 || i === 5) {
  42283. var a = parseInt(r.slice(1, 4), 16);
  42284. if (!(a >= 0 && a <= 4095)) {
  42285. aa(e, 0, 0, 0, 1);
  42286. return;
  42287. }
  42288. return aa(e, (a & 3840) >> 4 | (a & 3840) >> 8, a & 240 | (a & 240) >> 4, a & 15 | (a & 15) << 4, i === 5 ? parseInt(r.slice(4), 16) / 15 : 1), td(t, e), e;
  42289. } else if (i === 7 || i === 9) {
  42290. var a = parseInt(r.slice(1, 7), 16);
  42291. if (!(a >= 0 && a <= 16777215)) {
  42292. aa(e, 0, 0, 0, 1);
  42293. return;
  42294. }
  42295. return aa(e, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255, i === 9 ? parseInt(r.slice(7), 16) / 255 : 1), td(t, e), e;
  42296. }
  42297. return;
  42298. }
  42299. var o = r.indexOf("("), s = r.indexOf(")");
  42300. if (o !== -1 && s + 1 === i) {
  42301. var l = r.substr(0, o), u = r.substr(o + 1, s - (o + 1)).split(","), c = 1;
  42302. switch (l) {
  42303. case "rgba":
  42304. if (u.length !== 4)
  42305. return u.length === 3 ? aa(e, +u[0], +u[1], +u[2], 1) : aa(e, 0, 0, 0, 1);
  42306. c = qc(u.pop());
  42307. case "rgb":
  42308. if (u.length >= 3)
  42309. return aa(e, UC(u[0]), UC(u[1]), UC(u[2]), u.length === 3 ? c : qc(u[3])), td(t, e), e;
  42310. aa(e, 0, 0, 0, 1);
  42311. return;
  42312. case "hsla":
  42313. if (u.length !== 4) {
  42314. aa(e, 0, 0, 0, 1);
  42315. return;
  42316. }
  42317. return u[3] = qc(u[3]), hA(u, e), td(t, e), e;
  42318. case "hsl":
  42319. if (u.length !== 3) {
  42320. aa(e, 0, 0, 0, 1);
  42321. return;
  42322. }
  42323. return hA(u, e), td(t, e), e;
  42324. default:
  42325. return;
  42326. }
  42327. }
  42328. aa(e, 0, 0, 0, 1);
  42329. }
  42330. }
  42331. function hA(t, e) {
  42332. var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360, r = qc(t[1]), i = qc(t[2]), a = i <= 0.5 ? i * (r + 1) : i + r - i * r, o = i * 2 - a;
  42333. return e = e || [], aa(e, Ja(XC(o, a, n + 1 / 3) * 255), Ja(XC(o, a, n) * 255), Ja(XC(o, a, n - 1 / 3) * 255), 1), t.length === 4 && (e[3] = t[3]), e;
  42334. }
  42335. function ZIe(t) {
  42336. if (t) {
  42337. var e = t[0] / 255, n = t[1] / 255, r = t[2] / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = a - i, s = (a + i) / 2, l, u;
  42338. if (o === 0)
  42339. l = 0, u = 0;
  42340. else {
  42341. s < 0.5 ? u = o / (a + i) : u = o / (2 - a - i);
  42342. var c = ((a - e) / 6 + o / 2) / o, f = ((a - n) / 6 + o / 2) / o, d = ((a - r) / 6 + o / 2) / o;
  42343. e === a ? l = d - f : n === a ? l = 1 / 3 + c - d : r === a && (l = 2 / 3 + f - c), l < 0 && (l += 1), l > 1 && (l -= 1);
  42344. }
  42345. var h = [l * 360, u, s];
  42346. return t[3] != null && h.push(t[3]), h;
  42347. }
  42348. }
  42349. function J1(t, e) {
  42350. var n = qr(t);
  42351. if (n) {
  42352. for (var r = 0; r < 3; r++)
  42353. e < 0 ? n[r] = n[r] * (1 - e) | 0 : n[r] = (255 - n[r]) * e + n[r] | 0, n[r] > 255 ? n[r] = 255 : n[r] < 0 && (n[r] = 0);
  42354. return eo(n, n.length === 4 ? "rgba" : "rgb");
  42355. }
  42356. }
  42357. function UIe(t) {
  42358. var e = qr(t);
  42359. if (e)
  42360. return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1);
  42361. }
  42362. function Cg(t, e, n) {
  42363. if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
  42364. n = n || [];
  42365. var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = e[i], s = e[a], l = r - i;
  42366. return n[0] = Ja(Nl(o[0], s[0], l)), n[1] = Ja(Nl(o[1], s[1], l)), n[2] = Ja(Nl(o[2], s[2], l)), n[3] = bm(Nl(o[3], s[3], l)), n;
  42367. }
  42368. }
  42369. var XIe = Cg;
  42370. function xR(t, e, n) {
  42371. if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
  42372. var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = qr(e[i]), s = qr(e[a]), l = r - i, u = eo([
  42373. Ja(Nl(o[0], s[0], l)),
  42374. Ja(Nl(o[1], s[1], l)),
  42375. Ja(Nl(o[2], s[2], l)),
  42376. bm(Nl(o[3], s[3], l))
  42377. ], "rgba");
  42378. return n ? {
  42379. color: u,
  42380. leftIndex: i,
  42381. rightIndex: a,
  42382. value: r
  42383. } : u;
  42384. }
  42385. }
  42386. var YIe = xR;
  42387. function eh(t, e, n, r) {
  42388. var i = qr(t);
  42389. if (t)
  42390. return i = ZIe(i), e != null && (i[0] = jIe(e)), n != null && (i[1] = qc(n)), r != null && (i[2] = qc(r)), eo(hA(i), "rgba");
  42391. }
  42392. function _m(t, e) {
  42393. var n = qr(t);
  42394. if (n && e != null)
  42395. return n[3] = bm(e), eo(n, "rgba");
  42396. }
  42397. function eo(t, e) {
  42398. if (!(!t || !t.length)) {
  42399. var n = t[0] + "," + t[1] + "," + t[2];
  42400. return (e === "rgba" || e === "hsva" || e === "hsla") && (n += "," + t[3]), e + "(" + n + ")";
  42401. }
  42402. }
  42403. function Om(t, e) {
  42404. var n = qr(t);
  42405. return n ? (0.299 * n[0] + 0.587 * n[1] + 0.114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0;
  42406. }
  42407. function qIe() {
  42408. return eo([
  42409. Math.round(Math.random() * 255),
  42410. Math.round(Math.random() * 255),
  42411. Math.round(Math.random() * 255)
  42412. ], "rgb");
  42413. }
  42414. var G6 = new R0(100);
  42415. function eO(t) {
  42416. if (Oe(t)) {
  42417. var e = G6.get(t);
  42418. return e || (e = J1(t, -0.1), G6.put(t, e)), e;
  42419. } else if (M0(t)) {
  42420. var n = le({}, t);
  42421. return n.colorStops = ce(t.colorStops, function(r) {
  42422. return {
  42423. offset: r.offset,
  42424. color: J1(r.color, -0.1)
  42425. };
  42426. }), n;
  42427. }
  42428. return t;
  42429. }
  42430. const KIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42431. __proto__: null,
  42432. fastLerp: Cg,
  42433. fastMapToColor: XIe,
  42434. lerp: xR,
  42435. lift: J1,
  42436. liftColor: eO,
  42437. lum: Om,
  42438. mapToColor: YIe,
  42439. modifyAlpha: _m,
  42440. modifyHSL: eh,
  42441. parse: qr,
  42442. random: qIe,
  42443. stringify: eo,
  42444. toHex: UIe
  42445. }, Symbol.toStringTag, { value: "Module" }));
  42446. var tO = Math.round;
  42447. function Sm(t) {
  42448. var e;
  42449. if (!t || t === "transparent")
  42450. t = "none";
  42451. else if (typeof t == "string" && t.indexOf("rgba") > -1) {
  42452. var n = qr(t);
  42453. n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3]);
  42454. }
  42455. return {
  42456. color: t,
  42457. opacity: e ?? 1
  42458. };
  42459. }
  42460. var j6 = 1e-4;
  42461. function Bl(t) {
  42462. return t < j6 && t > -j6;
  42463. }
  42464. function Gy(t) {
  42465. return tO(t * 1e3) / 1e3;
  42466. }
  42467. function pA(t) {
  42468. return tO(t * 1e4) / 1e4;
  42469. }
  42470. function JIe(t) {
  42471. return "matrix(" + Gy(t[0]) + "," + Gy(t[1]) + "," + Gy(t[2]) + "," + Gy(t[3]) + "," + pA(t[4]) + "," + pA(t[5]) + ")";
  42472. }
  42473. var eDe = {
  42474. left: "start",
  42475. right: "end",
  42476. center: "middle",
  42477. middle: "middle"
  42478. };
  42479. function tDe(t, e, n) {
  42480. return n === "top" ? t += e / 2 : n === "bottom" && (t -= e / 2), t;
  42481. }
  42482. function nDe(t) {
  42483. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY);
  42484. }
  42485. function rDe(t) {
  42486. var e = t.style, n = t.getGlobalScale();
  42487. return [
  42488. e.shadowColor,
  42489. (e.shadowBlur || 0).toFixed(2),
  42490. (e.shadowOffsetX || 0).toFixed(2),
  42491. (e.shadowOffsetY || 0).toFixed(2),
  42492. n[0],
  42493. n[1]
  42494. ].join(",");
  42495. }
  42496. function Gq(t) {
  42497. return t && !!t.image;
  42498. }
  42499. function iDe(t) {
  42500. return t && !!t.svgElement;
  42501. }
  42502. function wR(t) {
  42503. return Gq(t) || iDe(t);
  42504. }
  42505. function jq(t) {
  42506. return t.type === "linear";
  42507. }
  42508. function Zq(t) {
  42509. return t.type === "radial";
  42510. }
  42511. function Uq(t) {
  42512. return t && (t.type === "linear" || t.type === "radial");
  42513. }
  42514. function Bx(t) {
  42515. return "url(#" + t + ")";
  42516. }
  42517. function Xq(t) {
  42518. var e = t.getGlobalScale(), n = Math.max(e[0], e[1]);
  42519. return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1);
  42520. }
  42521. function Yq(t) {
  42522. var e = t.x || 0, n = t.y || 0, r = (t.rotation || 0) * Og, i = We(t.scaleX, 1), a = We(t.scaleY, 1), o = t.skewX || 0, s = t.skewY || 0, l = [];
  42523. return (e || n) && l.push("translate(" + e + "px," + n + "px)"), r && l.push("rotate(" + r + ")"), (i !== 1 || a !== 1) && l.push("scale(" + i + "," + a + ")"), (o || s) && l.push("skew(" + tO(o * Og) + "deg, " + tO(s * Og) + "deg)"), l.join(" ");
  42524. }
  42525. var aDe = function() {
  42526. return vt.hasGlobalWindow && Me(window.btoa) ? function(t) {
  42527. return window.btoa(unescape(encodeURIComponent(t)));
  42528. } : typeof Buffer < "u" ? function(t) {
  42529. return Buffer.from(t).toString("base64");
  42530. } : function(t) {
  42531. return process.env.NODE_ENV !== "production" && Oa("Base64 isn't natively supported in the current environment."), null;
  42532. };
  42533. }(), vA = Array.prototype.slice;
  42534. function _s(t, e, n) {
  42535. return (e - t) * n + t;
  42536. }
  42537. function YC(t, e, n, r) {
  42538. for (var i = e.length, a = 0; a < i; a++)
  42539. t[a] = _s(e[a], n[a], r);
  42540. return t;
  42541. }
  42542. function oDe(t, e, n, r) {
  42543. for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
  42544. t[o] || (t[o] = []);
  42545. for (var s = 0; s < a; s++)
  42546. t[o][s] = _s(e[o][s], n[o][s], r);
  42547. }
  42548. return t;
  42549. }
  42550. function jy(t, e, n, r) {
  42551. for (var i = e.length, a = 0; a < i; a++)
  42552. t[a] = e[a] + n[a] * r;
  42553. return t;
  42554. }
  42555. function Z6(t, e, n, r) {
  42556. for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
  42557. t[o] || (t[o] = []);
  42558. for (var s = 0; s < a; s++)
  42559. t[o][s] = e[o][s] + n[o][s] * r;
  42560. }
  42561. return t;
  42562. }
  42563. function sDe(t, e) {
  42564. for (var n = t.length, r = e.length, i = n > r ? e : t, a = Math.min(n, r), o = i[a - 1] || { color: [0, 0, 0, 0], offset: 0 }, s = a; s < Math.max(n, r); s++)
  42565. i.push({
  42566. offset: o.offset,
  42567. color: o.color.slice()
  42568. });
  42569. }
  42570. function lDe(t, e, n) {
  42571. var r = t, i = e;
  42572. if (!(!r.push || !i.push)) {
  42573. var a = r.length, o = i.length;
  42574. if (a !== o) {
  42575. var s = a > o;
  42576. if (s)
  42577. r.length = o;
  42578. else
  42579. for (var l = a; l < o; l++)
  42580. r.push(n === 1 ? i[l] : vA.call(i[l]));
  42581. }
  42582. for (var u = r[0] && r[0].length, l = 0; l < r.length; l++)
  42583. if (n === 1)
  42584. isNaN(r[l]) && (r[l] = i[l]);
  42585. else
  42586. for (var c = 0; c < u; c++)
  42587. isNaN(r[l][c]) && (r[l][c] = i[l][c]);
  42588. }
  42589. }
  42590. function Tg(t) {
  42591. if (wr(t)) {
  42592. var e = t.length;
  42593. if (wr(t[0])) {
  42594. for (var n = [], r = 0; r < e; r++)
  42595. n.push(vA.call(t[r]));
  42596. return n;
  42597. }
  42598. return vA.call(t);
  42599. }
  42600. return t;
  42601. }
  42602. function L_(t) {
  42603. return t[0] = Math.floor(t[0]) || 0, t[1] = Math.floor(t[1]) || 0, t[2] = Math.floor(t[2]) || 0, t[3] = t[3] == null ? 1 : t[3], "rgba(" + t.join(",") + ")";
  42604. }
  42605. function uDe(t) {
  42606. return wr(t && t[0]) ? 2 : 1;
  42607. }
  42608. var Zy = 0, N_ = 1, qq = 2, Fv = 3, gA = 4, mA = 5, U6 = 6;
  42609. function X6(t) {
  42610. return t === gA || t === mA;
  42611. }
  42612. function Uy(t) {
  42613. return t === N_ || t === qq;
  42614. }
  42615. var tv = [0, 0, 0, 0], cDe = function() {
  42616. function t(e) {
  42617. this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
  42618. }
  42619. return t.prototype.isFinished = function() {
  42620. return this._finished;
  42621. }, t.prototype.setFinished = function() {
  42622. this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
  42623. }, t.prototype.needsAnimate = function() {
  42624. return this.keyframes.length >= 1;
  42625. }, t.prototype.getAdditiveTrack = function() {
  42626. return this._additiveTrack;
  42627. }, t.prototype.addKeyframe = function(e, n, r) {
  42628. this._needsSort = !0;
  42629. var i = this.keyframes, a = i.length, o = !1, s = U6, l = n;
  42630. if (wr(n)) {
  42631. var u = uDe(n);
  42632. s = u, (u === 1 && !St(n[0]) || u === 2 && !St(n[0][0])) && (o = !0);
  42633. } else if (St(n) && !ou(n))
  42634. s = Zy;
  42635. else if (Oe(n))
  42636. if (!isNaN(+n))
  42637. s = Zy;
  42638. else {
  42639. var c = qr(n);
  42640. c && (l = c, s = Fv);
  42641. }
  42642. else if (M0(n)) {
  42643. var f = le({}, l);
  42644. f.colorStops = ce(n.colorStops, function(h) {
  42645. return {
  42646. offset: h.offset,
  42647. color: qr(h.color)
  42648. };
  42649. }), jq(n) ? s = gA : Zq(n) && (s = mA), l = f;
  42650. }
  42651. a === 0 ? this.valType = s : (s !== this.valType || s === U6) && (o = !0), this.discrete = this.discrete || o;
  42652. var d = {
  42653. time: e,
  42654. value: l,
  42655. rawValue: n,
  42656. percent: 0
  42657. };
  42658. return r && (d.easing = r, d.easingFunc = Me(r) ? r : wg[r] || SR(r)), i.push(d), d;
  42659. }, t.prototype.prepare = function(e, n) {
  42660. var r = this.keyframes;
  42661. this._needsSort && r.sort(function(v, g) {
  42662. return v.time - g.time;
  42663. });
  42664. for (var i = this.valType, a = r.length, o = r[a - 1], s = this.discrete, l = Uy(i), u = X6(i), c = 0; c < a; c++) {
  42665. var f = r[c], d = f.value, h = o.value;
  42666. f.percent = f.time / e, s || (l && c !== a - 1 ? lDe(d, h, i) : u && sDe(d.colorStops, h.colorStops));
  42667. }
  42668. if (!s && i !== mA && n && this.needsAnimate() && n.needsAnimate() && i === n.valType && !n._finished) {
  42669. this._additiveTrack = n;
  42670. for (var p = r[0].value, c = 0; c < a; c++)
  42671. i === Zy ? r[c].additiveValue = r[c].value - p : i === Fv ? r[c].additiveValue = jy([], r[c].value, p, -1) : Uy(i) && (r[c].additiveValue = i === N_ ? jy([], r[c].value, p, -1) : Z6([], r[c].value, p, -1));
  42672. }
  42673. }, t.prototype.step = function(e, n) {
  42674. if (!this._finished) {
  42675. this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
  42676. var r = this._additiveTrack != null, i = r ? "additiveValue" : "value", a = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = a === Fv, c, f = this._lastFr, d = Math.min, h, p;
  42677. if (s === 1)
  42678. h = p = o[0];
  42679. else {
  42680. if (n < 0)
  42681. c = 0;
  42682. else if (n < this._lastFrP) {
  42683. var v = d(f + 1, s - 1);
  42684. for (c = v; c >= 0 && !(o[c].percent <= n); c--)
  42685. ;
  42686. c = d(c, s - 2);
  42687. } else {
  42688. for (c = f; c < s && !(o[c].percent > n); c++)
  42689. ;
  42690. c = d(c - 1, s - 2);
  42691. }
  42692. p = o[c + 1], h = o[c];
  42693. }
  42694. if (h && p) {
  42695. this._lastFr = c, this._lastFrP = n;
  42696. var g = p.percent - h.percent, m = g === 0 ? 1 : d((n - h.percent) / g, 1);
  42697. p.easingFunc && (m = p.easingFunc(m));
  42698. var y = r ? this._additiveValue : u ? tv : e[l];
  42699. if ((Uy(a) || u) && !y && (y = this._additiveValue = []), this.discrete)
  42700. e[l] = m < 1 ? h.rawValue : p.rawValue;
  42701. else if (Uy(a))
  42702. a === N_ ? YC(y, h[i], p[i], m) : oDe(y, h[i], p[i], m);
  42703. else if (X6(a)) {
  42704. var b = h[i], _ = p[i], O = a === gA;
  42705. e[l] = {
  42706. type: O ? "linear" : "radial",
  42707. x: _s(b.x, _.x, m),
  42708. y: _s(b.y, _.y, m),
  42709. colorStops: ce(b.colorStops, function(x, C) {
  42710. var T = _.colorStops[C];
  42711. return {
  42712. offset: _s(x.offset, T.offset, m),
  42713. color: L_(YC([], x.color, T.color, m))
  42714. };
  42715. }),
  42716. global: _.global
  42717. }, O ? (e[l].x2 = _s(b.x2, _.x2, m), e[l].y2 = _s(b.y2, _.y2, m)) : e[l].r = _s(b.r, _.r, m);
  42718. } else if (u)
  42719. YC(y, h[i], p[i], m), r || (e[l] = L_(y));
  42720. else {
  42721. var S = _s(h[i], p[i], m);
  42722. r ? this._additiveValue = S : e[l] = S;
  42723. }
  42724. r && this._addToTarget(e);
  42725. }
  42726. }
  42727. }, t.prototype._addToTarget = function(e) {
  42728. var n = this.valType, r = this.propName, i = this._additiveValue;
  42729. n === Zy ? e[r] = e[r] + i : n === Fv ? (qr(e[r], tv), jy(tv, tv, i, 1), e[r] = L_(tv)) : n === N_ ? jy(e[r], e[r], i, 1) : n === qq && Z6(e[r], e[r], i, 1);
  42730. }, t;
  42731. }(), CR = function() {
  42732. function t(e, n, r, i) {
  42733. if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = n, n && i) {
  42734. Oa("Can' use additive animation on looped animation.");
  42735. return;
  42736. }
  42737. this._additiveAnimators = i, this._allowDiscrete = r;
  42738. }
  42739. return t.prototype.getMaxTime = function() {
  42740. return this._maxTime;
  42741. }, t.prototype.getDelay = function() {
  42742. return this._delay;
  42743. }, t.prototype.getLoop = function() {
  42744. return this._loop;
  42745. }, t.prototype.getTarget = function() {
  42746. return this._target;
  42747. }, t.prototype.changeTarget = function(e) {
  42748. this._target = e;
  42749. }, t.prototype.when = function(e, n, r) {
  42750. return this.whenWithKeys(e, n, st(n), r);
  42751. }, t.prototype.whenWithKeys = function(e, n, r, i) {
  42752. for (var a = this._tracks, o = 0; o < r.length; o++) {
  42753. var s = r[o], l = a[s];
  42754. if (!l) {
  42755. l = a[s] = new cDe(s);
  42756. var u = void 0, c = this._getAdditiveTrack(s);
  42757. if (c) {
  42758. var f = c.keyframes, d = f[f.length - 1];
  42759. u = d && d.value, c.valType === Fv && u && (u = L_(u));
  42760. } else
  42761. u = this._target[s];
  42762. if (u == null)
  42763. continue;
  42764. e > 0 && l.addKeyframe(0, Tg(u), i), this._trackKeys.push(s);
  42765. }
  42766. l.addKeyframe(e, Tg(n[s]), i);
  42767. }
  42768. return this._maxTime = Math.max(this._maxTime, e), this;
  42769. }, t.prototype.pause = function() {
  42770. this._clip.pause(), this._paused = !0;
  42771. }, t.prototype.resume = function() {
  42772. this._clip.resume(), this._paused = !1;
  42773. }, t.prototype.isPaused = function() {
  42774. return !!this._paused;
  42775. }, t.prototype.duration = function(e) {
  42776. return this._maxTime = e, this._force = !0, this;
  42777. }, t.prototype._doneCallback = function() {
  42778. this._setTracksFinished(), this._clip = null;
  42779. var e = this._doneCbs;
  42780. if (e)
  42781. for (var n = e.length, r = 0; r < n; r++)
  42782. e[r].call(this);
  42783. }, t.prototype._abortedCallback = function() {
  42784. this._setTracksFinished();
  42785. var e = this.animation, n = this._abortedCbs;
  42786. if (e && e.removeClip(this._clip), this._clip = null, n)
  42787. for (var r = 0; r < n.length; r++)
  42788. n[r].call(this);
  42789. }, t.prototype._setTracksFinished = function() {
  42790. for (var e = this._tracks, n = this._trackKeys, r = 0; r < n.length; r++)
  42791. e[n[r]].setFinished();
  42792. }, t.prototype._getAdditiveTrack = function(e) {
  42793. var n, r = this._additiveAnimators;
  42794. if (r)
  42795. for (var i = 0; i < r.length; i++) {
  42796. var a = r[i].getTrack(e);
  42797. a && (n = a);
  42798. }
  42799. return n;
  42800. }, t.prototype.start = function(e) {
  42801. if (!(this._started > 0)) {
  42802. this._started = 1;
  42803. for (var n = this, r = [], i = this._maxTime || 0, a = 0; a < this._trackKeys.length; a++) {
  42804. var o = this._trackKeys[a], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, c = u.length;
  42805. if (s.prepare(i, l), s.needsAnimate())
  42806. if (!this._allowDiscrete && s.discrete) {
  42807. var f = u[c - 1];
  42808. f && (n._target[s.propName] = f.rawValue), s.setFinished();
  42809. } else
  42810. r.push(s);
  42811. }
  42812. if (r.length || this._force) {
  42813. var d = new HIe({
  42814. life: i,
  42815. loop: this._loop,
  42816. delay: this._delay || 0,
  42817. onframe: function(h) {
  42818. n._started = 2;
  42819. var p = n._additiveAnimators;
  42820. if (p) {
  42821. for (var v = !1, g = 0; g < p.length; g++)
  42822. if (p[g]._clip) {
  42823. v = !0;
  42824. break;
  42825. }
  42826. v || (n._additiveAnimators = null);
  42827. }
  42828. for (var g = 0; g < r.length; g++)
  42829. r[g].step(n._target, h);
  42830. var m = n._onframeCbs;
  42831. if (m)
  42832. for (var g = 0; g < m.length; g++)
  42833. m[g](n._target, h);
  42834. },
  42835. ondestroy: function() {
  42836. n._doneCallback();
  42837. }
  42838. });
  42839. this._clip = d, this.animation && this.animation.addClip(d), e && d.setEasing(e);
  42840. } else
  42841. this._doneCallback();
  42842. return this;
  42843. }
  42844. }, t.prototype.stop = function(e) {
  42845. if (this._clip) {
  42846. var n = this._clip;
  42847. e && n.onframe(1), this._abortedCallback();
  42848. }
  42849. }, t.prototype.delay = function(e) {
  42850. return this._delay = e, this;
  42851. }, t.prototype.during = function(e) {
  42852. return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
  42853. }, t.prototype.done = function(e) {
  42854. return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
  42855. }, t.prototype.aborted = function(e) {
  42856. return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
  42857. }, t.prototype.getClip = function() {
  42858. return this._clip;
  42859. }, t.prototype.getTrack = function(e) {
  42860. return this._tracks[e];
  42861. }, t.prototype.getTracks = function() {
  42862. var e = this;
  42863. return ce(this._trackKeys, function(n) {
  42864. return e._tracks[n];
  42865. });
  42866. }, t.prototype.stopTracks = function(e, n) {
  42867. if (!e.length || !this._clip)
  42868. return !0;
  42869. for (var r = this._tracks, i = this._trackKeys, a = 0; a < e.length; a++) {
  42870. var o = r[e[a]];
  42871. o && !o.isFinished() && (n ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
  42872. }
  42873. for (var s = !0, a = 0; a < i.length; a++)
  42874. if (!r[i[a]].isFinished()) {
  42875. s = !1;
  42876. break;
  42877. }
  42878. return s && this._abortedCallback(), s;
  42879. }, t.prototype.saveTo = function(e, n, r) {
  42880. if (e) {
  42881. n = n || this._trackKeys;
  42882. for (var i = 0; i < n.length; i++) {
  42883. var a = n[i], o = this._tracks[a];
  42884. if (!(!o || o.isFinished())) {
  42885. var s = o.keyframes, l = s[r ? 0 : s.length - 1];
  42886. l && (e[a] = Tg(l.rawValue));
  42887. }
  42888. }
  42889. }
  42890. }, t.prototype.__changeFinalValue = function(e, n) {
  42891. n = n || st(e);
  42892. for (var r = 0; r < n.length; r++) {
  42893. var i = n[r], a = this._tracks[i];
  42894. if (a) {
  42895. var o = a.keyframes;
  42896. if (o.length > 1) {
  42897. var s = o.pop();
  42898. a.addKeyframe(s.time, e[i]), a.prepare(this._maxTime, a.getAdditiveTrack());
  42899. }
  42900. }
  42901. }
  42902. }, t;
  42903. }();
  42904. function zd() {
  42905. return (/* @__PURE__ */ new Date()).getTime();
  42906. }
  42907. var fDe = function(t) {
  42908. q(e, t);
  42909. function e(n) {
  42910. var r = t.call(this) || this;
  42911. return r._running = !1, r._time = 0, r._pausedTime = 0, r._pauseStart = 0, r._paused = !1, n = n || {}, r.stage = n.stage || {}, r;
  42912. }
  42913. return e.prototype.addClip = function(n) {
  42914. n.animation && this.removeClip(n), this._head ? (this._tail.next = n, n.prev = this._tail, n.next = null, this._tail = n) : this._head = this._tail = n, n.animation = this;
  42915. }, e.prototype.addAnimator = function(n) {
  42916. n.animation = this;
  42917. var r = n.getClip();
  42918. r && this.addClip(r);
  42919. }, e.prototype.removeClip = function(n) {
  42920. if (n.animation) {
  42921. var r = n.prev, i = n.next;
  42922. r ? r.next = i : this._head = i, i ? i.prev = r : this._tail = r, n.next = n.prev = n.animation = null;
  42923. }
  42924. }, e.prototype.removeAnimator = function(n) {
  42925. var r = n.getClip();
  42926. r && this.removeClip(r), n.animation = null;
  42927. }, e.prototype.update = function(n) {
  42928. for (var r = zd() - this._pausedTime, i = r - this._time, a = this._head; a; ) {
  42929. var o = a.next, s = a.step(r, i);
  42930. s && (a.ondestroy(), this.removeClip(a)), a = o;
  42931. }
  42932. this._time = r, n || (this.trigger("frame", i), this.stage.update && this.stage.update());
  42933. }, e.prototype._startLoop = function() {
  42934. var n = this;
  42935. this._running = !0;
  42936. function r() {
  42937. n._running && (Y1(r), !n._paused && n.update());
  42938. }
  42939. Y1(r);
  42940. }, e.prototype.start = function() {
  42941. this._running || (this._time = zd(), this._pausedTime = 0, this._startLoop());
  42942. }, e.prototype.stop = function() {
  42943. this._running = !1;
  42944. }, e.prototype.pause = function() {
  42945. this._paused || (this._pauseStart = zd(), this._paused = !0);
  42946. }, e.prototype.resume = function() {
  42947. this._paused && (this._pausedTime += zd() - this._pauseStart, this._paused = !1);
  42948. }, e.prototype.clear = function() {
  42949. for (var n = this._head; n; ) {
  42950. var r = n.next;
  42951. n.prev = n.next = n.animation = null, n = r;
  42952. }
  42953. this._head = this._tail = null;
  42954. }, e.prototype.isFinished = function() {
  42955. return this._head == null;
  42956. }, e.prototype.animate = function(n, r) {
  42957. r = r || {}, this.start();
  42958. var i = new CR(n, r.loop);
  42959. return this.addAnimator(i), i;
  42960. }, e;
  42961. }(Ra), dDe = 300, qC = vt.domSupported, KC = function() {
  42962. var t = [
  42963. "click",
  42964. "dblclick",
  42965. "mousewheel",
  42966. "wheel",
  42967. "mouseout",
  42968. "mouseup",
  42969. "mousedown",
  42970. "mousemove",
  42971. "contextmenu"
  42972. ], e = [
  42973. "touchstart",
  42974. "touchend",
  42975. "touchmove"
  42976. ], n = {
  42977. pointerdown: 1,
  42978. pointerup: 1,
  42979. pointermove: 1,
  42980. pointerout: 1
  42981. }, r = ce(t, function(i) {
  42982. var a = i.replace("mouse", "pointer");
  42983. return n.hasOwnProperty(a) ? a : i;
  42984. });
  42985. return {
  42986. mouse: t,
  42987. touch: e,
  42988. pointer: r
  42989. };
  42990. }(), Y6 = {
  42991. mouse: ["mousemove", "mouseup"],
  42992. pointer: ["pointermove", "pointerup"]
  42993. }, q6 = !1;
  42994. function yA(t) {
  42995. var e = t.pointerType;
  42996. return e === "pen" || e === "touch";
  42997. }
  42998. function hDe(t) {
  42999. t.touching = !0, t.touchTimer != null && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout(function() {
  43000. t.touching = !1, t.touchTimer = null;
  43001. }, 700);
  43002. }
  43003. function JC(t) {
  43004. t && (t.zrByTouch = !0);
  43005. }
  43006. function pDe(t, e) {
  43007. return sa(t.dom, new vDe(t, e), !0);
  43008. }
  43009. function Kq(t, e) {
  43010. for (var n = e, r = !1; n && n.nodeType !== 9 && !(r = n.domBelongToZr || n !== e && n === t.painterRoot); )
  43011. n = n.parentNode;
  43012. return r;
  43013. }
  43014. var vDe = /* @__PURE__ */ function() {
  43015. function t(e, n) {
  43016. this.stopPropagation = On, this.stopImmediatePropagation = On, this.preventDefault = On, this.type = n.type, this.target = this.currentTarget = e.dom, this.pointerType = n.pointerType, this.clientX = n.clientX, this.clientY = n.clientY;
  43017. }
  43018. return t;
  43019. }(), Ga = {
  43020. mousedown: function(t) {
  43021. t = sa(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t);
  43022. },
  43023. mousemove: function(t) {
  43024. t = sa(this.dom, t);
  43025. var e = this.__mayPointerCapture;
  43026. e && (t.zrX !== e[0] || t.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", t);
  43027. },
  43028. mouseup: function(t) {
  43029. t = sa(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t);
  43030. },
  43031. mouseout: function(t) {
  43032. t = sa(this.dom, t);
  43033. var e = t.toElement || t.relatedTarget;
  43034. Kq(this, e) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t));
  43035. },
  43036. wheel: function(t) {
  43037. q6 = !0, t = sa(this.dom, t), this.trigger("mousewheel", t);
  43038. },
  43039. mousewheel: function(t) {
  43040. q6 || (t = sa(this.dom, t), this.trigger("mousewheel", t));
  43041. },
  43042. touchstart: function(t) {
  43043. t = sa(this.dom, t), JC(t), this.__lastTouchMoment = /* @__PURE__ */ new Date(), this.handler.processGesture(t, "start"), Ga.mousemove.call(this, t), Ga.mousedown.call(this, t);
  43044. },
  43045. touchmove: function(t) {
  43046. t = sa(this.dom, t), JC(t), this.handler.processGesture(t, "change"), Ga.mousemove.call(this, t);
  43047. },
  43048. touchend: function(t) {
  43049. t = sa(this.dom, t), JC(t), this.handler.processGesture(t, "end"), Ga.mouseup.call(this, t), +/* @__PURE__ */ new Date() - +this.__lastTouchMoment < dDe && Ga.click.call(this, t);
  43050. },
  43051. pointerdown: function(t) {
  43052. Ga.mousedown.call(this, t);
  43053. },
  43054. pointermove: function(t) {
  43055. yA(t) || Ga.mousemove.call(this, t);
  43056. },
  43057. pointerup: function(t) {
  43058. Ga.mouseup.call(this, t);
  43059. },
  43060. pointerout: function(t) {
  43061. yA(t) || Ga.mouseout.call(this, t);
  43062. }
  43063. };
  43064. k(["click", "dblclick", "contextmenu"], function(t) {
  43065. Ga[t] = function(e) {
  43066. e = sa(this.dom, e), this.trigger(t, e);
  43067. };
  43068. });
  43069. var bA = {
  43070. pointermove: function(t) {
  43071. yA(t) || bA.mousemove.call(this, t);
  43072. },
  43073. pointerup: function(t) {
  43074. bA.mouseup.call(this, t);
  43075. },
  43076. mousemove: function(t) {
  43077. this.trigger("mousemove", t);
  43078. },
  43079. mouseup: function(t) {
  43080. var e = this.__pointerCapturing;
  43081. this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t));
  43082. }
  43083. };
  43084. function gDe(t, e) {
  43085. var n = e.domHandlers;
  43086. vt.pointerEventsSupported ? k(KC.pointer, function(r) {
  43087. B_(e, r, function(i) {
  43088. n[r].call(t, i);
  43089. });
  43090. }) : (vt.touchEventsSupported && k(KC.touch, function(r) {
  43091. B_(e, r, function(i) {
  43092. n[r].call(t, i), hDe(e);
  43093. });
  43094. }), k(KC.mouse, function(r) {
  43095. B_(e, r, function(i) {
  43096. i = OR(i), e.touching || n[r].call(t, i);
  43097. });
  43098. }));
  43099. }
  43100. function mDe(t, e) {
  43101. vt.pointerEventsSupported ? k(Y6.pointer, n) : vt.touchEventsSupported || k(Y6.mouse, n);
  43102. function n(r) {
  43103. function i(a) {
  43104. a = OR(a), Kq(t, a.target) || (a = pDe(t, a), e.domHandlers[r].call(t, a));
  43105. }
  43106. B_(e, r, i, { capture: !0 });
  43107. }
  43108. }
  43109. function B_(t, e, n, r) {
  43110. t.mounted[e] = n, t.listenerOpts[e] = r, cA(t.domTarget, e, n, r);
  43111. }
  43112. function eT(t) {
  43113. var e = t.mounted;
  43114. for (var n in e)
  43115. e.hasOwnProperty(n) && TIe(t.domTarget, n, e[n], t.listenerOpts[n]);
  43116. t.mounted = {};
  43117. }
  43118. var K6 = /* @__PURE__ */ function() {
  43119. function t(e, n) {
  43120. this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = n;
  43121. }
  43122. return t;
  43123. }(), yDe = function(t) {
  43124. q(e, t);
  43125. function e(n, r) {
  43126. var i = t.call(this) || this;
  43127. return i.__pointerCapturing = !1, i.dom = n, i.painterRoot = r, i._localHandlerScope = new K6(n, Ga), qC && (i._globalHandlerScope = new K6(document, bA)), gDe(i, i._localHandlerScope), i;
  43128. }
  43129. return e.prototype.dispose = function() {
  43130. eT(this._localHandlerScope), qC && eT(this._globalHandlerScope);
  43131. }, e.prototype.setCursor = function(n) {
  43132. this.dom.style && (this.dom.style.cursor = n || "default");
  43133. }, e.prototype.__togglePointerCapture = function(n) {
  43134. if (this.__mayPointerCapture = null, qC && +this.__pointerCapturing ^ +n) {
  43135. this.__pointerCapturing = n;
  43136. var r = this._globalHandlerScope;
  43137. n ? mDe(this, r) : eT(r);
  43138. }
  43139. }, e;
  43140. }(Ra), Jq = 1;
  43141. vt.hasGlobalWindow && (Jq = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
  43142. var nO = Jq, _A = 0.4, OA = "#333", SA = "#ccc", bDe = "#eee", J6 = D0, eB = 5e-5;
  43143. function Qu(t) {
  43144. return t > eB || t < -eB;
  43145. }
  43146. var Hu = [], nd = [], tT = Si(), nT = Math.abs, _De = function() {
  43147. function t() {
  43148. }
  43149. return t.prototype.getLocalTransform = function(e) {
  43150. return t.getLocalTransform(this, e);
  43151. }, t.prototype.setPosition = function(e) {
  43152. this.x = e[0], this.y = e[1];
  43153. }, t.prototype.setScale = function(e) {
  43154. this.scaleX = e[0], this.scaleY = e[1];
  43155. }, t.prototype.setSkew = function(e) {
  43156. this.skewX = e[0], this.skewY = e[1];
  43157. }, t.prototype.setOrigin = function(e) {
  43158. this.originX = e[0], this.originY = e[1];
  43159. }, t.prototype.needLocalTransform = function() {
  43160. return Qu(this.rotation) || Qu(this.x) || Qu(this.y) || Qu(this.scaleX - 1) || Qu(this.scaleY - 1) || Qu(this.skewX) || Qu(this.skewY);
  43161. }, t.prototype.updateTransform = function() {
  43162. var e = this.parent && this.parent.transform, n = this.needLocalTransform(), r = this.transform;
  43163. if (!(n || e)) {
  43164. r && (J6(r), this.invTransform = null);
  43165. return;
  43166. }
  43167. r = r || Si(), n ? this.getLocalTransform(r) : J6(r), e && (n ? Uo(r, e, r) : Lx(r, e)), this.transform = r, this._resolveGlobalScaleRatio(r);
  43168. }, t.prototype._resolveGlobalScaleRatio = function(e) {
  43169. var n = this.globalScaleRatio;
  43170. if (n != null && n !== 1) {
  43171. this.getGlobalScale(Hu);
  43172. var r = Hu[0] < 0 ? -1 : 1, i = Hu[1] < 0 ? -1 : 1, a = ((Hu[0] - r) * n + r) / Hu[0] || 0, o = ((Hu[1] - i) * n + i) / Hu[1] || 0;
  43173. e[0] *= a, e[1] *= a, e[2] *= o, e[3] *= o;
  43174. }
  43175. this.invTransform = this.invTransform || Si(), kf(this.invTransform, e);
  43176. }, t.prototype.getComputedTransform = function() {
  43177. for (var e = this, n = []; e; )
  43178. n.push(e), e = e.parent;
  43179. for (; e = n.pop(); )
  43180. e.updateTransform();
  43181. return this.transform;
  43182. }, t.prototype.setLocalTransform = function(e) {
  43183. if (e) {
  43184. var n = e[0] * e[0] + e[1] * e[1], r = e[2] * e[2] + e[3] * e[3], i = Math.atan2(e[1], e[0]), a = Math.PI / 2 + i - Math.atan2(e[3], e[2]);
  43185. r = Math.sqrt(r) * Math.cos(a), n = Math.sqrt(n), this.skewX = a, this.skewY = 0, this.rotation = -i, this.x = +e[4], this.y = +e[5], this.scaleX = n, this.scaleY = r, this.originX = 0, this.originY = 0;
  43186. }
  43187. }, t.prototype.decomposeTransform = function() {
  43188. if (this.transform) {
  43189. var e = this.parent, n = this.transform;
  43190. e && e.transform && (e.invTransform = e.invTransform || Si(), Uo(nd, e.invTransform, n), n = nd);
  43191. var r = this.originX, i = this.originY;
  43192. (r || i) && (tT[4] = r, tT[5] = i, Uo(nd, n, tT), nd[4] -= r, nd[5] -= i, n = nd), this.setLocalTransform(n);
  43193. }
  43194. }, t.prototype.getGlobalScale = function(e) {
  43195. var n = this.transform;
  43196. return e = e || [], n ? (e[0] = Math.sqrt(n[0] * n[0] + n[1] * n[1]), e[1] = Math.sqrt(n[2] * n[2] + n[3] * n[3]), n[0] < 0 && (e[0] = -e[0]), n[3] < 0 && (e[1] = -e[1]), e) : (e[0] = 1, e[1] = 1, e);
  43197. }, t.prototype.transformCoordToLocal = function(e, n) {
  43198. var r = [e, n], i = this.invTransform;
  43199. return i && ar(r, r, i), r;
  43200. }, t.prototype.transformCoordToGlobal = function(e, n) {
  43201. var r = [e, n], i = this.transform;
  43202. return i && ar(r, r, i), r;
  43203. }, t.prototype.getLineScale = function() {
  43204. var e = this.transform;
  43205. return e && nT(e[0] - 1) > 1e-10 && nT(e[3] - 1) > 1e-10 ? Math.sqrt(nT(e[0] * e[3] - e[2] * e[1])) : 1;
  43206. }, t.prototype.copyTransform = function(e) {
  43207. eK(this, e);
  43208. }, t.getLocalTransform = function(e, n) {
  43209. n = n || [];
  43210. var r = e.originX || 0, i = e.originY || 0, a = e.scaleX, o = e.scaleY, s = e.anchorX, l = e.anchorY, u = e.rotation || 0, c = e.x, f = e.y, d = e.skewX ? Math.tan(e.skewX) : 0, h = e.skewY ? Math.tan(-e.skewY) : 0;
  43211. if (r || i || s || l) {
  43212. var p = r + s, v = i + l;
  43213. n[4] = -p * a - d * v * o, n[5] = -v * o - h * p * a;
  43214. } else
  43215. n[4] = n[5] = 0;
  43216. return n[0] = a, n[3] = o, n[1] = h * a, n[2] = d * o, u && Cu(n, n, u), n[4] += r + c, n[5] += i + f, n;
  43217. }, t.initDefaultProps = function() {
  43218. var e = t.prototype;
  43219. e.scaleX = e.scaleY = e.globalScaleRatio = 1, e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0;
  43220. }(), t;
  43221. }(), rs = [
  43222. "x",
  43223. "y",
  43224. "originX",
  43225. "originY",
  43226. "anchorX",
  43227. "anchorY",
  43228. "rotation",
  43229. "scaleX",
  43230. "scaleY",
  43231. "skewX",
  43232. "skewY"
  43233. ];
  43234. function eK(t, e) {
  43235. for (var n = 0; n < rs.length; n++) {
  43236. var r = rs[n];
  43237. t[r] = e[r];
  43238. }
  43239. }
  43240. const As = _De;
  43241. var tB = {};
  43242. function Zi(t, e) {
  43243. e = e || iu;
  43244. var n = tB[e];
  43245. n || (n = tB[e] = new R0(500));
  43246. var r = n.get(t);
  43247. return r == null && (r = io.measureText(t, e).width, n.put(t, r)), r;
  43248. }
  43249. function nB(t, e, n, r) {
  43250. var i = Zi(t, e), a = zx(e), o = Wv(0, i, n), s = Ad(0, a, r), l = new Je(o, s, i, a);
  43251. return l;
  43252. }
  43253. function k0(t, e, n, r) {
  43254. var i = ((t || "") + "").split(`
  43255. `), a = i.length;
  43256. if (a === 1)
  43257. return nB(i[0], e, n, r);
  43258. for (var o = new Je(0, 0, 0, 0), s = 0; s < i.length; s++) {
  43259. var l = nB(i[s], e, n, r);
  43260. s === 0 ? o.copy(l) : o.union(l);
  43261. }
  43262. return o;
  43263. }
  43264. function Wv(t, e, n) {
  43265. return n === "right" ? t -= e : n === "center" && (t -= e / 2), t;
  43266. }
  43267. function Ad(t, e, n) {
  43268. return n === "middle" ? t -= e / 2 : n === "bottom" && (t -= e), t;
  43269. }
  43270. function zx(t) {
  43271. return Zi("国", t);
  43272. }
  43273. function oo(t, e) {
  43274. return typeof t == "string" ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
  43275. }
  43276. function rO(t, e, n) {
  43277. var r = e.position || "inside", i = e.distance != null ? e.distance : 5, a = n.height, o = n.width, s = a / 2, l = n.x, u = n.y, c = "left", f = "top";
  43278. if (r instanceof Array)
  43279. l += oo(r[0], n.width), u += oo(r[1], n.height), c = null, f = null;
  43280. else
  43281. switch (r) {
  43282. case "left":
  43283. l -= i, u += s, c = "right", f = "middle";
  43284. break;
  43285. case "right":
  43286. l += i + o, u += s, f = "middle";
  43287. break;
  43288. case "top":
  43289. l += o / 2, u -= i, c = "center", f = "bottom";
  43290. break;
  43291. case "bottom":
  43292. l += o / 2, u += a + i, c = "center";
  43293. break;
  43294. case "inside":
  43295. l += o / 2, u += s, c = "center", f = "middle";
  43296. break;
  43297. case "insideLeft":
  43298. l += i, u += s, f = "middle";
  43299. break;
  43300. case "insideRight":
  43301. l += o - i, u += s, c = "right", f = "middle";
  43302. break;
  43303. case "insideTop":
  43304. l += o / 2, u += i, c = "center";
  43305. break;
  43306. case "insideBottom":
  43307. l += o / 2, u += a - i, c = "center", f = "bottom";
  43308. break;
  43309. case "insideTopLeft":
  43310. l += i, u += i;
  43311. break;
  43312. case "insideTopRight":
  43313. l += o - i, u += i, c = "right";
  43314. break;
  43315. case "insideBottomLeft":
  43316. l += i, u += a - i, f = "bottom";
  43317. break;
  43318. case "insideBottomRight":
  43319. l += o - i, u += a - i, c = "right", f = "bottom";
  43320. break;
  43321. }
  43322. return t = t || {}, t.x = l, t.y = u, t.align = c, t.verticalAlign = f, t;
  43323. }
  43324. var rT = "__zr_normal__", iT = rs.concat(["ignore"]), ODe = Aa(rs, function(t, e) {
  43325. return t[e] = !0, t;
  43326. }, { ignore: !1 }), rd = {}, SDe = new Je(0, 0, 0, 0), Vx = function() {
  43327. function t(e) {
  43328. this.id = gR(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
  43329. }
  43330. return t.prototype._init = function(e) {
  43331. this.attr(e);
  43332. }, t.prototype.drift = function(e, n, r) {
  43333. switch (this.draggable) {
  43334. case "horizontal":
  43335. n = 0;
  43336. break;
  43337. case "vertical":
  43338. e = 0;
  43339. break;
  43340. }
  43341. var i = this.transform;
  43342. i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += e, i[5] += n, this.decomposeTransform(), this.markRedraw();
  43343. }, t.prototype.beforeUpdate = function() {
  43344. }, t.prototype.afterUpdate = function() {
  43345. }, t.prototype.update = function() {
  43346. this.updateTransform(), this.__dirty && this.updateInnerText();
  43347. }, t.prototype.updateInnerText = function(e) {
  43348. var n = this._textContent;
  43349. if (n && (!n.ignore || e)) {
  43350. this.textConfig || (this.textConfig = {});
  43351. var r = this.textConfig, i = r.local, a = n.innerTransformable, o = void 0, s = void 0, l = !1;
  43352. a.parent = i ? this : null;
  43353. var u = !1;
  43354. if (a.copyTransform(n), r.position != null) {
  43355. var c = SDe;
  43356. r.layoutRect ? c.copy(r.layoutRect) : c.copy(this.getBoundingRect()), i || c.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(rd, r, c) : rO(rd, r, c), a.x = rd.x, a.y = rd.y, o = rd.align, s = rd.verticalAlign;
  43357. var f = r.origin;
  43358. if (f && r.rotation != null) {
  43359. var d = void 0, h = void 0;
  43360. f === "center" ? (d = c.width * 0.5, h = c.height * 0.5) : (d = oo(f[0], c.width), h = oo(f[1], c.height)), u = !0, a.originX = -a.x + d + (i ? 0 : c.x), a.originY = -a.y + h + (i ? 0 : c.y);
  43361. }
  43362. }
  43363. r.rotation != null && (a.rotation = r.rotation);
  43364. var p = r.offset;
  43365. p && (a.x += p[0], a.y += p[1], u || (a.originX = -p[0], a.originY = -p[1]));
  43366. var v = r.inside == null ? typeof r.position == "string" && r.position.indexOf("inside") >= 0 : r.inside, g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}), m = void 0, y = void 0, b = void 0;
  43367. v && this.canBeInsideText() ? (m = r.insideFill, y = r.insideStroke, (m == null || m === "auto") && (m = this.getInsideTextFill()), (y == null || y === "auto") && (y = this.getInsideTextStroke(m), b = !0)) : (m = r.outsideFill, y = r.outsideStroke, (m == null || m === "auto") && (m = this.getOutsideFill()), (y == null || y === "auto") && (y = this.getOutsideStroke(m), b = !0)), m = m || "#000", (m !== g.fill || y !== g.stroke || b !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (l = !0, g.fill = m, g.stroke = y, g.autoStroke = b, g.align = o, g.verticalAlign = s, n.setDefaultTextStyle(g)), n.__dirty |= ki, l && n.dirtyStyle(!0);
  43368. }
  43369. }, t.prototype.canBeInsideText = function() {
  43370. return !0;
  43371. }, t.prototype.getInsideTextFill = function() {
  43372. return "#fff";
  43373. }, t.prototype.getInsideTextStroke = function(e) {
  43374. return "#000";
  43375. }, t.prototype.getOutsideFill = function() {
  43376. return this.__zr && this.__zr.isDarkMode() ? SA : OA;
  43377. }, t.prototype.getOutsideStroke = function(e) {
  43378. var n = this.__zr && this.__zr.getBackgroundColor(), r = typeof n == "string" && qr(n);
  43379. r || (r = [255, 255, 255, 1]);
  43380. for (var i = r[3], a = this.__zr.isDarkMode(), o = 0; o < 3; o++)
  43381. r[o] = r[o] * i + (a ? 0 : 255) * (1 - i);
  43382. return r[3] = 1, eo(r, "rgba");
  43383. }, t.prototype.traverse = function(e, n) {
  43384. }, t.prototype.attrKV = function(e, n) {
  43385. e === "textConfig" ? this.setTextConfig(n) : e === "textContent" ? this.setTextContent(n) : e === "clipPath" ? this.setClipPath(n) : e === "extra" ? (this.extra = this.extra || {}, le(this.extra, n)) : this[e] = n;
  43386. }, t.prototype.hide = function() {
  43387. this.ignore = !0, this.markRedraw();
  43388. }, t.prototype.show = function() {
  43389. this.ignore = !1, this.markRedraw();
  43390. }, t.prototype.attr = function(e, n) {
  43391. if (typeof e == "string")
  43392. this.attrKV(e, n);
  43393. else if (Ie(e))
  43394. for (var r = e, i = st(r), a = 0; a < i.length; a++) {
  43395. var o = i[a];
  43396. this.attrKV(o, e[o]);
  43397. }
  43398. return this.markRedraw(), this;
  43399. }, t.prototype.saveCurrentToNormalState = function(e) {
  43400. this._innerSaveToNormal(e);
  43401. for (var n = this._normalState, r = 0; r < this.animators.length; r++) {
  43402. var i = this.animators[r], a = i.__fromStateTransition;
  43403. if (!(i.getLoop() || a && a !== rT)) {
  43404. var o = i.targetName, s = o ? n[o] : n;
  43405. i.saveTo(s);
  43406. }
  43407. }
  43408. }, t.prototype._innerSaveToNormal = function(e) {
  43409. var n = this._normalState;
  43410. n || (n = this._normalState = {}), e.textConfig && !n.textConfig && (n.textConfig = this.textConfig), this._savePrimaryToNormal(e, n, iT);
  43411. }, t.prototype._savePrimaryToNormal = function(e, n, r) {
  43412. for (var i = 0; i < r.length; i++) {
  43413. var a = r[i];
  43414. e[a] != null && !(a in n) && (n[a] = this[a]);
  43415. }
  43416. }, t.prototype.hasState = function() {
  43417. return this.currentStates.length > 0;
  43418. }, t.prototype.getState = function(e) {
  43419. return this.states[e];
  43420. }, t.prototype.ensureState = function(e) {
  43421. var n = this.states;
  43422. return n[e] || (n[e] = {}), n[e];
  43423. }, t.prototype.clearStates = function(e) {
  43424. this.useState(rT, !1, e);
  43425. }, t.prototype.useState = function(e, n, r, i) {
  43426. var a = e === rT, o = this.hasState();
  43427. if (!(!o && a)) {
  43428. var s = this.currentStates, l = this.stateTransition;
  43429. if (!(et(s, e) >= 0 && (n || s.length === 1))) {
  43430. var u;
  43431. if (this.stateProxy && !a && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !a) {
  43432. Oa("State " + e + " not exists.");
  43433. return;
  43434. }
  43435. a || this.saveCurrentToNormalState(u);
  43436. var c = !!(u && u.hoverLayer || i);
  43437. c && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, n, !r && !this.__inHover && l && l.duration > 0, l);
  43438. var f = this._textContent, d = this._textGuide;
  43439. return f && f.useState(e, n, r, c), d && d.useState(e, n, r, c), a ? (this.currentStates = [], this._normalState = {}) : n ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~ki), u;
  43440. }
  43441. }
  43442. }, t.prototype.useStates = function(e, n, r) {
  43443. if (!e.length)
  43444. this.clearStates();
  43445. else {
  43446. var i = [], a = this.currentStates, o = e.length, s = o === a.length;
  43447. if (s) {
  43448. for (var l = 0; l < o; l++)
  43449. if (e[l] !== a[l]) {
  43450. s = !1;
  43451. break;
  43452. }
  43453. }
  43454. if (s)
  43455. return;
  43456. for (var l = 0; l < o; l++) {
  43457. var u = e[l], c = void 0;
  43458. this.stateProxy && (c = this.stateProxy(u, e)), c || (c = this.states[u]), c && i.push(c);
  43459. }
  43460. var f = i[o - 1], d = !!(f && f.hoverLayer || r);
  43461. d && this._toggleHoverLayerFlag(!0);
  43462. var h = this._mergeStates(i), p = this.stateTransition;
  43463. this.saveCurrentToNormalState(h), this._applyStateObj(e.join(","), h, this._normalState, !1, !n && !this.__inHover && p && p.duration > 0, p);
  43464. var v = this._textContent, g = this._textGuide;
  43465. v && v.useStates(e, n, d), g && g.useStates(e, n, d), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !d && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~ki);
  43466. }
  43467. }, t.prototype.isSilent = function() {
  43468. for (var e = this.silent, n = this.parent; !e && n; ) {
  43469. if (n.silent) {
  43470. e = !0;
  43471. break;
  43472. }
  43473. n = n.parent;
  43474. }
  43475. return e;
  43476. }, t.prototype._updateAnimationTargets = function() {
  43477. for (var e = 0; e < this.animators.length; e++) {
  43478. var n = this.animators[e];
  43479. n.targetName && n.changeTarget(this[n.targetName]);
  43480. }
  43481. }, t.prototype.removeState = function(e) {
  43482. var n = et(this.currentStates, e);
  43483. if (n >= 0) {
  43484. var r = this.currentStates.slice();
  43485. r.splice(n, 1), this.useStates(r);
  43486. }
  43487. }, t.prototype.replaceState = function(e, n, r) {
  43488. var i = this.currentStates.slice(), a = et(i, e), o = et(i, n) >= 0;
  43489. a >= 0 ? o ? i.splice(a, 1) : i[a] = n : r && !o && i.push(n), this.useStates(i);
  43490. }, t.prototype.toggleState = function(e, n) {
  43491. n ? this.useState(e, !0) : this.removeState(e);
  43492. }, t.prototype._mergeStates = function(e) {
  43493. for (var n = {}, r, i = 0; i < e.length; i++) {
  43494. var a = e[i];
  43495. le(n, a), a.textConfig && (r = r || {}, le(r, a.textConfig));
  43496. }
  43497. return r && (n.textConfig = r), n;
  43498. }, t.prototype._applyStateObj = function(e, n, r, i, a, o) {
  43499. var s = !(n && i);
  43500. n && n.textConfig ? (this.textConfig = le({}, i ? this.textConfig : r.textConfig), le(this.textConfig, n.textConfig)) : s && r.textConfig && (this.textConfig = r.textConfig);
  43501. for (var l = {}, u = !1, c = 0; c < iT.length; c++) {
  43502. var f = iT[c], d = a && ODe[f];
  43503. n && n[f] != null ? d ? (u = !0, l[f] = n[f]) : this[f] = n[f] : s && r[f] != null && (d ? (u = !0, l[f] = r[f]) : this[f] = r[f]);
  43504. }
  43505. if (!a)
  43506. for (var c = 0; c < this.animators.length; c++) {
  43507. var h = this.animators[c], p = h.targetName;
  43508. h.getLoop() || h.__changeFinalValue(p ? (n || r)[p] : n || r);
  43509. }
  43510. u && this._transitionState(e, l, o);
  43511. }, t.prototype._attachComponent = function(e) {
  43512. if (e.__zr && !e.__hostTarget) {
  43513. if (process.env.NODE_ENV !== "production")
  43514. throw new Error("Text element has been added to zrender.");
  43515. return;
  43516. }
  43517. if (e === this) {
  43518. if (process.env.NODE_ENV !== "production")
  43519. throw new Error("Recursive component attachment.");
  43520. return;
  43521. }
  43522. var n = this.__zr;
  43523. n && e.addSelfToZr(n), e.__zr = n, e.__hostTarget = this;
  43524. }, t.prototype._detachComponent = function(e) {
  43525. e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
  43526. }, t.prototype.getClipPath = function() {
  43527. return this._clipPath;
  43528. }, t.prototype.setClipPath = function(e) {
  43529. this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
  43530. }, t.prototype.removeClipPath = function() {
  43531. var e = this._clipPath;
  43532. e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
  43533. }, t.prototype.getTextContent = function() {
  43534. return this._textContent;
  43535. }, t.prototype.setTextContent = function(e) {
  43536. var n = this._textContent;
  43537. if (n !== e) {
  43538. if (n && n !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
  43539. throw new Error("Text element has been added to zrender.");
  43540. e.innerTransformable = new As(), this._attachComponent(e), this._textContent = e, this.markRedraw();
  43541. }
  43542. }, t.prototype.setTextConfig = function(e) {
  43543. this.textConfig || (this.textConfig = {}), le(this.textConfig, e), this.markRedraw();
  43544. }, t.prototype.removeTextConfig = function() {
  43545. this.textConfig = null, this.markRedraw();
  43546. }, t.prototype.removeTextContent = function() {
  43547. var e = this._textContent;
  43548. e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
  43549. }, t.prototype.getTextGuideLine = function() {
  43550. return this._textGuide;
  43551. }, t.prototype.setTextGuideLine = function(e) {
  43552. this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
  43553. }, t.prototype.removeTextGuideLine = function() {
  43554. var e = this._textGuide;
  43555. e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
  43556. }, t.prototype.markRedraw = function() {
  43557. this.__dirty |= ki;
  43558. var e = this.__zr;
  43559. e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
  43560. }, t.prototype.dirty = function() {
  43561. this.markRedraw();
  43562. }, t.prototype._toggleHoverLayerFlag = function(e) {
  43563. this.__inHover = e;
  43564. var n = this._textContent, r = this._textGuide;
  43565. n && (n.__inHover = e), r && (r.__inHover = e);
  43566. }, t.prototype.addSelfToZr = function(e) {
  43567. if (this.__zr !== e) {
  43568. this.__zr = e;
  43569. var n = this.animators;
  43570. if (n)
  43571. for (var r = 0; r < n.length; r++)
  43572. e.animation.addAnimator(n[r]);
  43573. this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
  43574. }
  43575. }, t.prototype.removeSelfFromZr = function(e) {
  43576. if (this.__zr) {
  43577. this.__zr = null;
  43578. var n = this.animators;
  43579. if (n)
  43580. for (var r = 0; r < n.length; r++)
  43581. e.animation.removeAnimator(n[r]);
  43582. this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
  43583. }
  43584. }, t.prototype.animate = function(e, n, r) {
  43585. var i = e ? this[e] : this;
  43586. if (process.env.NODE_ENV !== "production" && !i) {
  43587. Oa('Property "' + e + '" is not existed in element ' + this.id);
  43588. return;
  43589. }
  43590. var a = new CR(i, n, r);
  43591. return e && (a.targetName = e), this.addAnimator(a, e), a;
  43592. }, t.prototype.addAnimator = function(e, n) {
  43593. var r = this.__zr, i = this;
  43594. e.during(function() {
  43595. i.updateDuringAnimation(n);
  43596. }).done(function() {
  43597. var a = i.animators, o = et(a, e);
  43598. o >= 0 && a.splice(o, 1);
  43599. }), this.animators.push(e), r && r.animation.addAnimator(e), r && r.wakeUp();
  43600. }, t.prototype.updateDuringAnimation = function(e) {
  43601. this.markRedraw();
  43602. }, t.prototype.stopAnimation = function(e, n) {
  43603. for (var r = this.animators, i = r.length, a = [], o = 0; o < i; o++) {
  43604. var s = r[o];
  43605. !e || e === s.scope ? s.stop(n) : a.push(s);
  43606. }
  43607. return this.animators = a, this;
  43608. }, t.prototype.animateTo = function(e, n, r) {
  43609. aT(this, e, n, r);
  43610. }, t.prototype.animateFrom = function(e, n, r) {
  43611. aT(this, e, n, r, !0);
  43612. }, t.prototype._transitionState = function(e, n, r, i) {
  43613. for (var a = aT(this, n, r, i), o = 0; o < a.length; o++)
  43614. a[o].__fromStateTransition = e;
  43615. }, t.prototype.getBoundingRect = function() {
  43616. return null;
  43617. }, t.prototype.getPaintRect = function() {
  43618. return null;
  43619. }, t.initDefaultProps = function() {
  43620. var e = t.prototype;
  43621. e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = ki;
  43622. var n = {};
  43623. function r(a, o, s) {
  43624. n[a + o + s] || (console.warn("DEPRECATED: '" + a + "' has been deprecated. use '" + o + "', '" + s + "' instead"), n[a + o + s] = !0);
  43625. }
  43626. function i(a, o, s, l) {
  43627. Object.defineProperty(e, a, {
  43628. get: function() {
  43629. if (process.env.NODE_ENV !== "production" && r(a, s, l), !this[o]) {
  43630. var c = this[o] = [];
  43631. u(this, c);
  43632. }
  43633. return this[o];
  43634. },
  43635. set: function(c) {
  43636. process.env.NODE_ENV !== "production" && r(a, s, l), this[s] = c[0], this[l] = c[1], this[o] = c, u(this, c);
  43637. }
  43638. });
  43639. function u(c, f) {
  43640. Object.defineProperty(f, 0, {
  43641. get: function() {
  43642. return c[s];
  43643. },
  43644. set: function(d) {
  43645. c[s] = d;
  43646. }
  43647. }), Object.defineProperty(f, 1, {
  43648. get: function() {
  43649. return c[l];
  43650. },
  43651. set: function(d) {
  43652. c[l] = d;
  43653. }
  43654. });
  43655. }
  43656. }
  43657. Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY"));
  43658. }(), t;
  43659. }();
  43660. xn(Vx, Ra);
  43661. xn(Vx, As);
  43662. function aT(t, e, n, r, i) {
  43663. n = n || {};
  43664. var a = [];
  43665. tK(t, "", t, e, n, r, a, i);
  43666. var o = a.length, s = !1, l = n.done, u = n.aborted, c = function() {
  43667. s = !0, o--, o <= 0 && (s ? l && l() : u && u());
  43668. }, f = function() {
  43669. o--, o <= 0 && (s ? l && l() : u && u());
  43670. };
  43671. o || l && l(), a.length > 0 && n.during && a[0].during(function(p, v) {
  43672. n.during(v);
  43673. });
  43674. for (var d = 0; d < a.length; d++) {
  43675. var h = a[d];
  43676. c && h.done(c), f && h.aborted(f), n.force && h.duration(n.duration), h.start(n.easing);
  43677. }
  43678. return a;
  43679. }
  43680. function oT(t, e, n) {
  43681. for (var r = 0; r < n; r++)
  43682. t[r] = e[r];
  43683. }
  43684. function xDe(t) {
  43685. return wr(t[0]);
  43686. }
  43687. function wDe(t, e, n) {
  43688. if (wr(e[n]))
  43689. if (wr(t[n]) || (t[n] = []), Nr(e[n])) {
  43690. var r = e[n].length;
  43691. t[n].length !== r && (t[n] = new e[n].constructor(r), oT(t[n], e[n], r));
  43692. } else {
  43693. var i = e[n], a = t[n], o = i.length;
  43694. if (xDe(i))
  43695. for (var s = i[0].length, l = 0; l < o; l++)
  43696. a[l] ? oT(a[l], i[l], s) : a[l] = Array.prototype.slice.call(i[l]);
  43697. else
  43698. oT(a, i, o);
  43699. a.length = i.length;
  43700. }
  43701. else
  43702. t[n] = e[n];
  43703. }
  43704. function CDe(t, e) {
  43705. return t === e || wr(t) && wr(e) && TDe(t, e);
  43706. }
  43707. function TDe(t, e) {
  43708. var n = t.length;
  43709. if (n !== e.length)
  43710. return !1;
  43711. for (var r = 0; r < n; r++)
  43712. if (t[r] !== e[r])
  43713. return !1;
  43714. return !0;
  43715. }
  43716. function tK(t, e, n, r, i, a, o, s) {
  43717. for (var l = st(r), u = i.duration, c = i.delay, f = i.additive, d = i.setToFinal, h = !Ie(a), p = t.animators, v = [], g = 0; g < l.length; g++) {
  43718. var m = l[g], y = r[m];
  43719. if (y != null && n[m] != null && (h || a[m]))
  43720. if (Ie(y) && !wr(y) && !M0(y)) {
  43721. if (e) {
  43722. s || (n[m] = y, t.updateDuringAnimation(e));
  43723. continue;
  43724. }
  43725. tK(t, m, n[m], y, i, a && a[m], o, s);
  43726. } else
  43727. v.push(m);
  43728. else s || (n[m] = y, t.updateDuringAnimation(e), v.push(m));
  43729. }
  43730. var b = v.length;
  43731. if (!f && b)
  43732. for (var _ = 0; _ < p.length; _++) {
  43733. var O = p[_];
  43734. if (O.targetName === e) {
  43735. var S = O.stopTracks(v);
  43736. if (S) {
  43737. var x = et(p, O);
  43738. p.splice(x, 1);
  43739. }
  43740. }
  43741. }
  43742. if (i.force || (v = Nt(v, function(P) {
  43743. return !CDe(r[P], n[P]);
  43744. }), b = v.length), b > 0 || i.force && !o.length) {
  43745. var C = void 0, T = void 0, w = void 0;
  43746. if (s) {
  43747. T = {}, d && (C = {});
  43748. for (var _ = 0; _ < b; _++) {
  43749. var m = v[_];
  43750. T[m] = n[m], d ? C[m] = r[m] : n[m] = r[m];
  43751. }
  43752. } else if (d) {
  43753. w = {};
  43754. for (var _ = 0; _ < b; _++) {
  43755. var m = v[_];
  43756. w[m] = Tg(n[m]), wDe(n, r, m);
  43757. }
  43758. }
  43759. var O = new CR(n, !1, !1, f ? Nt(p, function($) {
  43760. return $.targetName === e;
  43761. }) : null);
  43762. O.targetName = e, i.scope && (O.scope = i.scope), d && C && O.whenWithKeys(0, C, v), w && O.whenWithKeys(0, w, v), O.whenWithKeys(u ?? 500, s ? T : r, v).delay(c || 0), t.addAnimator(O, e), o.push(O);
  43763. }
  43764. }
  43765. var nK = function(t) {
  43766. q(e, t);
  43767. function e(n) {
  43768. var r = t.call(this) || this;
  43769. return r.isGroup = !0, r._children = [], r.attr(n), r;
  43770. }
  43771. return e.prototype.childrenRef = function() {
  43772. return this._children;
  43773. }, e.prototype.children = function() {
  43774. return this._children.slice();
  43775. }, e.prototype.childAt = function(n) {
  43776. return this._children[n];
  43777. }, e.prototype.childOfName = function(n) {
  43778. for (var r = this._children, i = 0; i < r.length; i++)
  43779. if (r[i].name === n)
  43780. return r[i];
  43781. }, e.prototype.childCount = function() {
  43782. return this._children.length;
  43783. }, e.prototype.add = function(n) {
  43784. if (n && (n !== this && n.parent !== this && (this._children.push(n), this._doAdd(n)), process.env.NODE_ENV !== "production" && n.__hostTarget))
  43785. throw "This elemenet has been used as an attachment";
  43786. return this;
  43787. }, e.prototype.addBefore = function(n, r) {
  43788. if (n && n !== this && n.parent !== this && r && r.parent === this) {
  43789. var i = this._children, a = i.indexOf(r);
  43790. a >= 0 && (i.splice(a, 0, n), this._doAdd(n));
  43791. }
  43792. return this;
  43793. }, e.prototype.replace = function(n, r) {
  43794. var i = et(this._children, n);
  43795. return i >= 0 && this.replaceAt(r, i), this;
  43796. }, e.prototype.replaceAt = function(n, r) {
  43797. var i = this._children, a = i[r];
  43798. if (n && n !== this && n.parent !== this && n !== a) {
  43799. i[r] = n, a.parent = null;
  43800. var o = this.__zr;
  43801. o && a.removeSelfFromZr(o), this._doAdd(n);
  43802. }
  43803. return this;
  43804. }, e.prototype._doAdd = function(n) {
  43805. n.parent && n.parent.remove(n), n.parent = this;
  43806. var r = this.__zr;
  43807. r && r !== n.__zr && n.addSelfToZr(r), r && r.refresh();
  43808. }, e.prototype.remove = function(n) {
  43809. var r = this.__zr, i = this._children, a = et(i, n);
  43810. return a < 0 ? this : (i.splice(a, 1), n.parent = null, r && n.removeSelfFromZr(r), r && r.refresh(), this);
  43811. }, e.prototype.removeAll = function() {
  43812. for (var n = this._children, r = this.__zr, i = 0; i < n.length; i++) {
  43813. var a = n[i];
  43814. r && a.removeSelfFromZr(r), a.parent = null;
  43815. }
  43816. return n.length = 0, this;
  43817. }, e.prototype.eachChild = function(n, r) {
  43818. for (var i = this._children, a = 0; a < i.length; a++) {
  43819. var o = i[a];
  43820. n.call(r, o, a);
  43821. }
  43822. return this;
  43823. }, e.prototype.traverse = function(n, r) {
  43824. for (var i = 0; i < this._children.length; i++) {
  43825. var a = this._children[i], o = n.call(r, a);
  43826. a.isGroup && !o && a.traverse(n, r);
  43827. }
  43828. return this;
  43829. }, e.prototype.addSelfToZr = function(n) {
  43830. t.prototype.addSelfToZr.call(this, n);
  43831. for (var r = 0; r < this._children.length; r++) {
  43832. var i = this._children[r];
  43833. i.addSelfToZr(n);
  43834. }
  43835. }, e.prototype.removeSelfFromZr = function(n) {
  43836. t.prototype.removeSelfFromZr.call(this, n);
  43837. for (var r = 0; r < this._children.length; r++) {
  43838. var i = this._children[r];
  43839. i.removeSelfFromZr(n);
  43840. }
  43841. }, e.prototype.getBoundingRect = function(n) {
  43842. for (var r = new Je(0, 0, 0, 0), i = n || this._children, a = [], o = null, s = 0; s < i.length; s++) {
  43843. var l = i[s];
  43844. if (!(l.ignore || l.invisible)) {
  43845. var u = l.getBoundingRect(), c = l.getLocalTransform(a);
  43846. c ? (Je.applyTransform(r, u, c), o = o || r.clone(), o.union(r)) : (o = o || u.clone(), o.union(u));
  43847. }
  43848. }
  43849. return o || r;
  43850. }, e;
  43851. }(Vx);
  43852. nK.prototype.type = "group";
  43853. const Ve = nK;
  43854. /*!
  43855. * ZRender, a high performance 2d drawing library.
  43856. *
  43857. * Copyright (c) 2013, Baidu Inc.
  43858. * All rights reserved.
  43859. *
  43860. * LICENSE
  43861. * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
  43862. */
  43863. var Qv = {}, Rc = {};
  43864. function PDe(t) {
  43865. delete Rc[t];
  43866. }
  43867. function $De(t) {
  43868. if (!t)
  43869. return !1;
  43870. if (typeof t == "string")
  43871. return Om(t, 1) < _A;
  43872. if (t.colorStops) {
  43873. for (var e = t.colorStops, n = 0, r = e.length, i = 0; i < r; i++)
  43874. n += Om(e[i].color, 1);
  43875. return n /= r, n < _A;
  43876. }
  43877. return !1;
  43878. }
  43879. var ADe = function() {
  43880. function t(e, n, r) {
  43881. var i = this;
  43882. this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, r = r || {}, this.dom = n, this.id = e;
  43883. var a = new zIe(), o = r.renderer || "canvas";
  43884. if (Qv[o] || (o = st(Qv)[0]), process.env.NODE_ENV !== "production" && !Qv[o])
  43885. throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
  43886. r.useDirtyRect = r.useDirtyRect == null ? !1 : r.useDirtyRect;
  43887. var s = new Qv[o](n, a, r, e), l = r.ssr || s.ssrOnly;
  43888. this.storage = a, this.painter = s;
  43889. var u = !vt.node && !vt.worker && !l ? new yDe(s.getViewportRoot(), s.root) : null, c = r.useCoarsePointer, f = c == null || c === "auto" ? vt.touchEventsSupported : !!c, d = 44, h;
  43890. f && (h = We(r.pointerSize, d)), this.handler = new Rq(a, s, u, s.root, h), this.animation = new fDe({
  43891. stage: {
  43892. update: l ? null : function() {
  43893. return i._flush(!0);
  43894. }
  43895. }
  43896. }), l || this.animation.start();
  43897. }
  43898. return t.prototype.add = function(e) {
  43899. this._disposed || !e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
  43900. }, t.prototype.remove = function(e) {
  43901. this._disposed || !e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
  43902. }, t.prototype.configLayer = function(e, n) {
  43903. this._disposed || (this.painter.configLayer && this.painter.configLayer(e, n), this.refresh());
  43904. }, t.prototype.setBackgroundColor = function(e) {
  43905. this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = $De(e));
  43906. }, t.prototype.getBackgroundColor = function() {
  43907. return this._backgroundColor;
  43908. }, t.prototype.setDarkMode = function(e) {
  43909. this._darkMode = e;
  43910. }, t.prototype.isDarkMode = function() {
  43911. return this._darkMode;
  43912. }, t.prototype.refreshImmediately = function(e) {
  43913. this._disposed || (e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1);
  43914. }, t.prototype.refresh = function() {
  43915. this._disposed || (this._needsRefresh = !0, this.animation.start());
  43916. }, t.prototype.flush = function() {
  43917. this._disposed || this._flush(!1);
  43918. }, t.prototype._flush = function(e) {
  43919. var n, r = zd();
  43920. this._needsRefresh && (n = !0, this.refreshImmediately(e)), this._needsRefreshHover && (n = !0, this.refreshHoverImmediately());
  43921. var i = zd();
  43922. n ? (this._stillFrameAccum = 0, this.trigger("rendered", {
  43923. elapsedTime: i - r
  43924. })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
  43925. }, t.prototype.setSleepAfterStill = function(e) {
  43926. this._sleepAfterStill = e;
  43927. }, t.prototype.wakeUp = function() {
  43928. this._disposed || (this.animation.start(), this._stillFrameAccum = 0);
  43929. }, t.prototype.refreshHover = function() {
  43930. this._needsRefreshHover = !0;
  43931. }, t.prototype.refreshHoverImmediately = function() {
  43932. this._disposed || (this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover());
  43933. }, t.prototype.resize = function(e) {
  43934. this._disposed || (e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize());
  43935. }, t.prototype.clearAnimation = function() {
  43936. this._disposed || this.animation.clear();
  43937. }, t.prototype.getWidth = function() {
  43938. if (!this._disposed)
  43939. return this.painter.getWidth();
  43940. }, t.prototype.getHeight = function() {
  43941. if (!this._disposed)
  43942. return this.painter.getHeight();
  43943. }, t.prototype.setCursorStyle = function(e) {
  43944. this._disposed || this.handler.setCursorStyle(e);
  43945. }, t.prototype.findHover = function(e, n) {
  43946. if (!this._disposed)
  43947. return this.handler.findHover(e, n);
  43948. }, t.prototype.on = function(e, n, r) {
  43949. return this._disposed || this.handler.on(e, n, r), this;
  43950. }, t.prototype.off = function(e, n) {
  43951. this._disposed || this.handler.off(e, n);
  43952. }, t.prototype.trigger = function(e, n) {
  43953. this._disposed || this.handler.trigger(e, n);
  43954. }, t.prototype.clear = function() {
  43955. if (!this._disposed) {
  43956. for (var e = this.storage.getRoots(), n = 0; n < e.length; n++)
  43957. e[n] instanceof Ve && e[n].removeSelfFromZr(this);
  43958. this.storage.delAllRoots(), this.painter.clear();
  43959. }
  43960. }, t.prototype.dispose = function() {
  43961. this._disposed || (this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, this._disposed = !0, PDe(this.id));
  43962. }, t;
  43963. }();
  43964. function xA(t, e) {
  43965. var n = new ADe(gR(), t, e);
  43966. return Rc[n.id] = n, n;
  43967. }
  43968. function EDe(t) {
  43969. t.dispose();
  43970. }
  43971. function MDe() {
  43972. for (var t in Rc)
  43973. Rc.hasOwnProperty(t) && Rc[t].dispose();
  43974. Rc = {};
  43975. }
  43976. function IDe(t) {
  43977. return Rc[t];
  43978. }
  43979. function rK(t, e) {
  43980. Qv[t] = e;
  43981. }
  43982. var wA;
  43983. function iK(t) {
  43984. if (typeof wA == "function")
  43985. return wA(t);
  43986. }
  43987. function aK(t) {
  43988. wA = t;
  43989. }
  43990. var DDe = "5.6.0";
  43991. const RDe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  43992. __proto__: null,
  43993. dispose: EDe,
  43994. disposeAll: MDe,
  43995. getElementSSRData: iK,
  43996. getInstance: IDe,
  43997. init: xA,
  43998. registerPainter: rK,
  43999. registerSSRDataGetter: aK,
  44000. version: DDe
  44001. }, Symbol.toStringTag, { value: "Module" }));
  44002. var rB = 1e-4, oK = 20;
  44003. function kDe(t) {
  44004. return t.replace(/^\s+|\s+$/g, "");
  44005. }
  44006. function Lt(t, e, n, r) {
  44007. var i = e[0], a = e[1], o = n[0], s = n[1], l = a - i, u = s - o;
  44008. if (l === 0)
  44009. return u === 0 ? o : (o + s) / 2;
  44010. if (r)
  44011. if (l > 0) {
  44012. if (t <= i)
  44013. return o;
  44014. if (t >= a)
  44015. return s;
  44016. } else {
  44017. if (t >= i)
  44018. return o;
  44019. if (t <= a)
  44020. return s;
  44021. }
  44022. else {
  44023. if (t === i)
  44024. return o;
  44025. if (t === a)
  44026. return s;
  44027. }
  44028. return (t - i) / l * u + o;
  44029. }
  44030. function _e(t, e) {
  44031. switch (t) {
  44032. case "center":
  44033. case "middle":
  44034. t = "50%";
  44035. break;
  44036. case "left":
  44037. case "top":
  44038. t = "0%";
  44039. break;
  44040. case "right":
  44041. case "bottom":
  44042. t = "100%";
  44043. break;
  44044. }
  44045. return Oe(t) ? kDe(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : t == null ? NaN : +t;
  44046. }
  44047. function mn(t, e, n) {
  44048. return e == null && (e = 10), e = Math.min(Math.max(0, e), oK), t = (+t).toFixed(e), n ? t : +t;
  44049. }
  44050. function Vi(t) {
  44051. return t.sort(function(e, n) {
  44052. return e - n;
  44053. }), t;
  44054. }
  44055. function Ua(t) {
  44056. if (t = +t, isNaN(t))
  44057. return 0;
  44058. if (t > 1e-14) {
  44059. for (var e = 1, n = 0; n < 15; n++, e *= 10)
  44060. if (Math.round(t * e) / e === t)
  44061. return n;
  44062. }
  44063. return iO(t);
  44064. }
  44065. function iO(t) {
  44066. var e = t.toString().toLowerCase(), n = e.indexOf("e"), r = n > 0 ? +e.slice(n + 1) : 0, i = n > 0 ? n : e.length, a = e.indexOf("."), o = a < 0 ? 0 : i - 1 - a;
  44067. return Math.max(0, o - r);
  44068. }
  44069. function TR(t, e) {
  44070. var n = Math.log, r = Math.LN10, i = Math.floor(n(t[1] - t[0]) / r), a = Math.round(n(Math.abs(e[1] - e[0])) / r), o = Math.min(Math.max(-i + a, 0), 20);
  44071. return isFinite(o) ? o : 20;
  44072. }
  44073. function LDe(t, e, n) {
  44074. if (!t[e])
  44075. return 0;
  44076. var r = sK(t, n);
  44077. return r[e] || 0;
  44078. }
  44079. function sK(t, e) {
  44080. var n = Aa(t, function(h, p) {
  44081. return h + (isNaN(p) ? 0 : p);
  44082. }, 0);
  44083. if (n === 0)
  44084. return [];
  44085. for (var r = Math.pow(10, e), i = ce(t, function(h) {
  44086. return (isNaN(h) ? 0 : h) / n * r * 100;
  44087. }), a = r * 100, o = ce(i, function(h) {
  44088. return Math.floor(h);
  44089. }), s = Aa(o, function(h, p) {
  44090. return h + p;
  44091. }, 0), l = ce(i, function(h, p) {
  44092. return h - o[p];
  44093. }); s < a; ) {
  44094. for (var u = Number.NEGATIVE_INFINITY, c = null, f = 0, d = l.length; f < d; ++f)
  44095. l[f] > u && (u = l[f], c = f);
  44096. ++o[c], l[c] = 0, ++s;
  44097. }
  44098. return ce(o, function(h) {
  44099. return h / r;
  44100. });
  44101. }
  44102. function NDe(t, e) {
  44103. var n = Math.max(Ua(t), Ua(e)), r = t + e;
  44104. return n > oK ? r : mn(r, n);
  44105. }
  44106. var CA = 9007199254740991;
  44107. function PR(t) {
  44108. var e = Math.PI * 2;
  44109. return (t % e + e) % e;
  44110. }
  44111. function Lh(t) {
  44112. return t > -rB && t < rB;
  44113. }
  44114. var BDe = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
  44115. function Yi(t) {
  44116. if (t instanceof Date)
  44117. return t;
  44118. if (Oe(t)) {
  44119. var e = BDe.exec(t);
  44120. if (!e)
  44121. return /* @__PURE__ */ new Date(NaN);
  44122. if (e[8]) {
  44123. var n = +e[4] || 0;
  44124. return e[8].toUpperCase() !== "Z" && (n -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, n, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0));
  44125. } else
  44126. return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0);
  44127. } else if (t == null)
  44128. return /* @__PURE__ */ new Date(NaN);
  44129. return new Date(Math.round(t));
  44130. }
  44131. function lK(t) {
  44132. return Math.pow(10, L0(t));
  44133. }
  44134. function L0(t) {
  44135. if (t === 0)
  44136. return 0;
  44137. var e = Math.floor(Math.log(t) / Math.LN10);
  44138. return t / Math.pow(10, e) >= 10 && e++, e;
  44139. }
  44140. function $R(t, e) {
  44141. var n = L0(t), r = Math.pow(10, n), i = t / r, a;
  44142. return e ? i < 1.5 ? a = 1 : i < 2.5 ? a = 2 : i < 4 ? a = 3 : i < 7 ? a = 5 : a = 10 : i < 1 ? a = 1 : i < 2 ? a = 2 : i < 3 ? a = 3 : i < 5 ? a = 5 : a = 10, t = a * r, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t;
  44143. }
  44144. function z_(t, e) {
  44145. var n = (t.length - 1) * e + 1, r = Math.floor(n), i = +t[r - 1], a = n - r;
  44146. return a ? i + a * (t[r] - i) : i;
  44147. }
  44148. function TA(t) {
  44149. t.sort(function(l, u) {
  44150. return s(l, u, 0) ? -1 : 1;
  44151. });
  44152. for (var e = -1 / 0, n = 1, r = 0; r < t.length; ) {
  44153. for (var i = t[r].interval, a = t[r].close, o = 0; o < 2; o++)
  44154. i[o] <= e && (i[o] = e, a[o] = o ? 1 : 1 - n), e = i[o], n = a[o];
  44155. i[0] === i[1] && a[0] * a[1] !== 1 ? t.splice(r, 1) : r++;
  44156. }
  44157. return t;
  44158. function s(l, u, c) {
  44159. return l.interval[c] < u.interval[c] || l.interval[c] === u.interval[c] && (l.close[c] - u.close[c] === (c ? -1 : 1) || !c && s(l, u, 1));
  44160. }
  44161. }
  44162. function is(t) {
  44163. var e = parseFloat(t);
  44164. return e == t && (e !== 0 || !Oe(t) || t.indexOf("x") <= 0) ? e : NaN;
  44165. }
  44166. function Fx(t) {
  44167. return !isNaN(is(t));
  44168. }
  44169. function uK() {
  44170. return Math.round(Math.random() * 9);
  44171. }
  44172. function cK(t, e) {
  44173. return e === 0 ? t : cK(e, t % e);
  44174. }
  44175. function iB(t, e) {
  44176. return t == null ? e : e == null ? t : t * e / cK(t, e);
  44177. }
  44178. var zDe = "[ECharts] ", aB = {}, VDe = typeof console < "u" && console.warn && console.log;
  44179. function Wx(t, e, n) {
  44180. if (VDe) {
  44181. if (n) {
  44182. if (aB[e])
  44183. return;
  44184. aB[e] = !0;
  44185. }
  44186. console[t](zDe + e);
  44187. }
  44188. }
  44189. function FDe(t, e) {
  44190. Wx("log", t, e);
  44191. }
  44192. function dn(t, e) {
  44193. Wx("warn", t, e);
  44194. }
  44195. function Cr(t, e) {
  44196. Wx("error", t, e);
  44197. }
  44198. function Ea(t) {
  44199. process.env.NODE_ENV !== "production" && Wx("warn", "DEPRECATED: " + t, !0);
  44200. }
  44201. function Cn(t, e, n) {
  44202. process.env.NODE_ENV !== "production" && Ea((n ? "[" + n + "]" : "") + (t + " is deprecated, use " + e + " instead."));
  44203. }
  44204. function ti() {
  44205. for (var t = [], e = 0; e < arguments.length; e++)
  44206. t[e] = arguments[e];
  44207. var n = "";
  44208. if (process.env.NODE_ENV !== "production") {
  44209. var r = function(i) {
  44210. return i === void 0 ? "undefined" : i === 1 / 0 ? "Infinity" : i === -1 / 0 ? "-Infinity" : ou(i) ? "NaN" : i instanceof Date ? "Date(" + i.toISOString() + ")" : Me(i) ? "function () { ... }" : yR(i) ? i + "" : null;
  44211. };
  44212. n = ce(t, function(i) {
  44213. if (Oe(i))
  44214. return i;
  44215. var a = r(i);
  44216. if (a != null)
  44217. return a;
  44218. if (typeof JSON < "u" && JSON.stringify)
  44219. try {
  44220. return JSON.stringify(i, function(o, s) {
  44221. var l = r(s);
  44222. return l ?? s;
  44223. });
  44224. } catch {
  44225. return "?";
  44226. }
  44227. else
  44228. return "?";
  44229. }).join(" ");
  44230. }
  44231. return n;
  44232. }
  44233. function Et(t) {
  44234. throw new Error(t);
  44235. }
  44236. function oB(t, e, n) {
  44237. return (e - t) * n + t;
  44238. }
  44239. var fK = "series\0", dK = "\0_ec_\0";
  44240. function Qt(t) {
  44241. return t instanceof Array ? t : t == null ? [] : [t];
  44242. }
  44243. function gf(t, e, n) {
  44244. if (t) {
  44245. t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
  44246. for (var r = 0, i = n.length; r < i; r++) {
  44247. var a = n[r];
  44248. !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
  44249. }
  44250. }
  44251. }
  44252. var sB = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"];
  44253. function fp(t) {
  44254. return Ie(t) && !ue(t) && !(t instanceof Date) ? t.value : t;
  44255. }
  44256. function WDe(t) {
  44257. return Ie(t) && !(t instanceof Array);
  44258. }
  44259. function hK(t, e, n) {
  44260. var r = n === "normalMerge", i = n === "replaceMerge", a = n === "replaceAll";
  44261. t = t || [], e = (e || []).slice();
  44262. var o = Pe();
  44263. k(e, function(l, u) {
  44264. if (!Ie(l)) {
  44265. e[u] = null;
  44266. return;
  44267. }
  44268. process.env.NODE_ENV !== "production" && (l.id != null && !uB(l.id) && lB(l.id), l.name != null && !uB(l.name) && lB(l.name));
  44269. });
  44270. var s = QDe(t, o, n);
  44271. return (r || i) && HDe(s, t, o, e), r && GDe(s, e), r || i ? jDe(s, e, i) : a && ZDe(s, e), UDe(s), s;
  44272. }
  44273. function QDe(t, e, n) {
  44274. var r = [];
  44275. if (n === "replaceAll")
  44276. return r;
  44277. for (var i = 0; i < t.length; i++) {
  44278. var a = t[i];
  44279. a && a.id != null && e.set(a.id, i), r.push({
  44280. existing: n === "replaceMerge" || Nh(a) ? null : a,
  44281. newOption: null,
  44282. keyInfo: null,
  44283. brandNew: null
  44284. });
  44285. }
  44286. return r;
  44287. }
  44288. function HDe(t, e, n, r) {
  44289. k(r, function(i, a) {
  44290. if (!(!i || i.id == null)) {
  44291. var o = Pg(i.id), s = n.get(o);
  44292. if (s != null) {
  44293. var l = t[s];
  44294. ke(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = i, l.existing = e[s], r[a] = null;
  44295. }
  44296. }
  44297. });
  44298. }
  44299. function GDe(t, e) {
  44300. k(e, function(n, r) {
  44301. if (!(!n || n.name == null))
  44302. for (var i = 0; i < t.length; i++) {
  44303. var a = t[i].existing;
  44304. if (!t[i].newOption && a && (a.id == null || n.id == null) && !Nh(n) && !Nh(a) && pK("name", a, n)) {
  44305. t[i].newOption = n, e[r] = null;
  44306. return;
  44307. }
  44308. }
  44309. });
  44310. }
  44311. function jDe(t, e, n) {
  44312. k(e, function(r) {
  44313. if (r) {
  44314. for (
  44315. var i, a = 0;
  44316. // Be `!resultItem` only when `nextIdx >= result.length`.
  44317. (i = t[a]) && (i.newOption || Nh(i.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing.
  44318. i.existing && r.id != null && !pK("id", r, i.existing));
  44319. )
  44320. a++;
  44321. i ? (i.newOption = r, i.brandNew = n) : t.push({
  44322. newOption: r,
  44323. brandNew: n,
  44324. existing: null,
  44325. keyInfo: null
  44326. }), a++;
  44327. }
  44328. });
  44329. }
  44330. function ZDe(t, e) {
  44331. k(e, function(n) {
  44332. t.push({
  44333. newOption: n,
  44334. brandNew: !0,
  44335. existing: null,
  44336. keyInfo: null
  44337. });
  44338. });
  44339. }
  44340. function UDe(t) {
  44341. var e = Pe();
  44342. k(t, function(n) {
  44343. var r = n.existing;
  44344. r && e.set(r.id, n);
  44345. }), k(t, function(n) {
  44346. var r = n.newOption;
  44347. ke(!r || r.id == null || !e.get(r.id) || e.get(r.id) === n, "id duplicates: " + (r && r.id)), r && r.id != null && e.set(r.id, n), !n.keyInfo && (n.keyInfo = {});
  44348. }), k(t, function(n, r) {
  44349. var i = n.existing, a = n.newOption, o = n.keyInfo;
  44350. if (Ie(a)) {
  44351. if (o.name = a.name != null ? Pg(a.name) : i ? i.name : fK + r, i)
  44352. o.id = Pg(i.id);
  44353. else if (a.id != null)
  44354. o.id = Pg(a.id);
  44355. else {
  44356. var s = 0;
  44357. do
  44358. o.id = "\0" + o.name + "\0" + s++;
  44359. while (e.get(o.id));
  44360. }
  44361. e.set(o.id, n);
  44362. }
  44363. });
  44364. }
  44365. function pK(t, e, n) {
  44366. var r = Vn(e[t], null), i = Vn(n[t], null);
  44367. return r != null && i != null && r === i;
  44368. }
  44369. function Pg(t) {
  44370. if (process.env.NODE_ENV !== "production" && t == null)
  44371. throw new Error();
  44372. return Vn(t, "");
  44373. }
  44374. function Vn(t, e) {
  44375. return t == null ? e : Oe(t) ? t : St(t) || pm(t) ? t + "" : e;
  44376. }
  44377. function lB(t) {
  44378. process.env.NODE_ENV !== "production" && dn("`" + t + "` is invalid id or name. Must be a string or number.");
  44379. }
  44380. function uB(t) {
  44381. return pm(t) || Fx(t);
  44382. }
  44383. function AR(t) {
  44384. var e = t.name;
  44385. return !!(e && e.indexOf(fK));
  44386. }
  44387. function Nh(t) {
  44388. return t && t.id != null && Pg(t.id).indexOf(dK) === 0;
  44389. }
  44390. function XDe(t) {
  44391. return dK + t;
  44392. }
  44393. function YDe(t, e, n) {
  44394. k(t, function(r) {
  44395. var i = r.newOption;
  44396. Ie(i) && (r.keyInfo.mainType = e, r.keyInfo.subType = qDe(e, i, r.existing, n));
  44397. });
  44398. }
  44399. function qDe(t, e, n, r) {
  44400. var i = e.type ? e.type : n ? n.subType : r.determineSubType(t, e);
  44401. return i;
  44402. }
  44403. function KDe(t, e) {
  44404. var n = {}, r = {};
  44405. return i(t || [], n), i(e || [], r, n), [a(n), a(r)];
  44406. function i(o, s, l) {
  44407. for (var u = 0, c = o.length; u < c; u++) {
  44408. var f = Vn(o[u].seriesId, null);
  44409. if (f == null)
  44410. return;
  44411. for (var d = Qt(o[u].dataIndex), h = l && l[f], p = 0, v = d.length; p < v; p++) {
  44412. var g = d[p];
  44413. h && h[g] ? h[g] = null : (s[f] || (s[f] = {}))[g] = 1;
  44414. }
  44415. }
  44416. }
  44417. function a(o, s) {
  44418. var l = [];
  44419. for (var u in o)
  44420. if (o.hasOwnProperty(u) && o[u] != null)
  44421. if (s)
  44422. l.push(+u);
  44423. else {
  44424. var c = a(o[u], !0);
  44425. c.length && l.push({
  44426. seriesId: u,
  44427. dataIndex: c
  44428. });
  44429. }
  44430. return l;
  44431. }
  44432. }
  44433. function mf(t, e) {
  44434. if (e.dataIndexInside != null)
  44435. return e.dataIndexInside;
  44436. if (e.dataIndex != null)
  44437. return ue(e.dataIndex) ? ce(e.dataIndex, function(n) {
  44438. return t.indexOfRawIndex(n);
  44439. }) : t.indexOfRawIndex(e.dataIndex);
  44440. if (e.name != null)
  44441. return ue(e.name) ? ce(e.name, function(n) {
  44442. return t.indexOfName(n);
  44443. }) : t.indexOfName(e.name);
  44444. }
  44445. function bt() {
  44446. var t = "__ec_inner_" + JDe++;
  44447. return function(e) {
  44448. return e[t] || (e[t] = {});
  44449. };
  44450. }
  44451. var JDe = uK();
  44452. function $g(t, e, n) {
  44453. var r = ER(e, n), i = r.mainTypeSpecified, a = r.queryOptionMap, o = r.others, s = o, l = n ? n.defaultMainType : null;
  44454. return !i && l && a.set(l, {}), a.each(function(u, c) {
  44455. var f = N0(t, c, u, {
  44456. useDefault: l === c,
  44457. enableAll: n && n.enableAll != null ? n.enableAll : !0,
  44458. enableNone: n && n.enableNone != null ? n.enableNone : !0
  44459. });
  44460. s[c + "Models"] = f.models, s[c + "Model"] = f.models[0];
  44461. }), s;
  44462. }
  44463. function ER(t, e) {
  44464. var n;
  44465. if (Oe(t)) {
  44466. var r = {};
  44467. r[t + "Index"] = 0, n = r;
  44468. } else
  44469. n = t;
  44470. var i = Pe(), a = {}, o = !1;
  44471. return k(n, function(s, l) {
  44472. if (l === "dataIndex" || l === "dataIndexInside") {
  44473. a[l] = s;
  44474. return;
  44475. }
  44476. var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], c = u[1], f = (u[2] || "").toLowerCase();
  44477. if (!(!c || !f || e && e.includeMainTypes && et(e.includeMainTypes, c) < 0)) {
  44478. o = o || !!c;
  44479. var d = i.get(c) || i.set(c, {});
  44480. d[f] = s;
  44481. }
  44482. }), {
  44483. mainTypeSpecified: o,
  44484. queryOptionMap: i,
  44485. others: a
  44486. };
  44487. }
  44488. var Dn = {
  44489. useDefault: !0,
  44490. enableAll: !1,
  44491. enableNone: !1
  44492. }, eRe = {
  44493. useDefault: !1,
  44494. enableAll: !0,
  44495. enableNone: !0
  44496. };
  44497. function N0(t, e, n, r) {
  44498. r = r || Dn;
  44499. var i = n.index, a = n.id, o = n.name, s = {
  44500. models: null,
  44501. specified: i != null || a != null || o != null
  44502. };
  44503. if (!s.specified) {
  44504. var l = void 0;
  44505. return s.models = r.useDefault && (l = t.getComponent(e)) ? [l] : [], s;
  44506. }
  44507. return i === "none" || i === !1 ? (ke(r.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (i === "all" && (ke(r.enableAll, '`"all"` is not a valid value on index option.'), i = a = o = null), s.models = t.queryComponents({
  44508. mainType: e,
  44509. index: i,
  44510. id: a,
  44511. name: o
  44512. }), s);
  44513. }
  44514. function vK(t, e, n) {
  44515. t.setAttribute ? t.setAttribute(e, n) : t[e] = n;
  44516. }
  44517. function tRe(t, e) {
  44518. return t.getAttribute ? t.getAttribute(e) : t[e];
  44519. }
  44520. function nRe(t) {
  44521. return t === "auto" ? vt.domSupported ? "html" : "richText" : t || "html";
  44522. }
  44523. function PA(t, e) {
  44524. var n = Pe(), r = [];
  44525. return k(t, function(i) {
  44526. var a = e(i);
  44527. (n.get(a) || (r.push(a), n.set(a, []))).push(i);
  44528. }), {
  44529. keys: r,
  44530. buckets: n
  44531. };
  44532. }
  44533. function gK(t, e, n, r, i) {
  44534. var a = e == null || e === "auto";
  44535. if (r == null)
  44536. return r;
  44537. if (St(r)) {
  44538. var o = oB(n || 0, r, i);
  44539. return mn(o, a ? Math.max(Ua(n || 0), Ua(r)) : e);
  44540. } else {
  44541. if (Oe(r))
  44542. return i < 1 ? n : r;
  44543. for (var s = [], l = n, u = r, c = Math.max(l ? l.length : 0, u.length), f = 0; f < c; ++f) {
  44544. var d = t.getDimensionInfo(f);
  44545. if (d && d.type === "ordinal")
  44546. s[f] = (i < 1 && l ? l : u)[f];
  44547. else {
  44548. var h = l && l[f] ? l[f] : 0, p = u[f], o = oB(h, p, i);
  44549. s[f] = mn(o, a ? Math.max(Ua(h), Ua(p)) : e);
  44550. }
  44551. }
  44552. return s;
  44553. }
  44554. }
  44555. var rRe = ".", Gu = "___EC__COMPONENT__CONTAINER___", mK = "___EC__EXTENDED_CLASS___";
  44556. function Vo(t) {
  44557. var e = {
  44558. main: "",
  44559. sub: ""
  44560. };
  44561. if (t) {
  44562. var n = t.split(rRe);
  44563. e.main = n[0] || "", e.sub = n[1] || "";
  44564. }
  44565. return e;
  44566. }
  44567. function iRe(t) {
  44568. ke(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
  44569. }
  44570. function aRe(t) {
  44571. return !!(t && t[mK]);
  44572. }
  44573. function MR(t, e) {
  44574. t.$constructor = t, t.extend = function(n) {
  44575. process.env.NODE_ENV !== "production" && k(e, function(a) {
  44576. n[a] || console.warn("Method `" + a + "` should be implemented" + (n.type ? " in " + n.type : "") + ".");
  44577. });
  44578. var r = this, i;
  44579. return oRe(r) ? i = /** @class */
  44580. function(a) {
  44581. q(o, a);
  44582. function o() {
  44583. return a.apply(this, arguments) || this;
  44584. }
  44585. return o;
  44586. }(r) : (i = function() {
  44587. (n.$constructor || r).apply(this, arguments);
  44588. }, mR(i, this)), le(i.prototype, n), i[mK] = !0, i.extend = this.extend, i.superCall = uRe, i.superApply = cRe, i.superClass = r, i;
  44589. };
  44590. }
  44591. function oRe(t) {
  44592. return Me(t) && /^class\s/.test(Function.prototype.toString.call(t));
  44593. }
  44594. function yK(t, e) {
  44595. t.extend = e.extend;
  44596. }
  44597. var sRe = Math.round(Math.random() * 10);
  44598. function lRe(t) {
  44599. var e = ["__\0is_clz", sRe++].join("_");
  44600. t.prototype[e] = !0, process.env.NODE_ENV !== "production" && ke(!t.isInstance, 'The method "is" can not be defined.'), t.isInstance = function(n) {
  44601. return !!(n && n[e]);
  44602. };
  44603. }
  44604. function uRe(t, e) {
  44605. for (var n = [], r = 2; r < arguments.length; r++)
  44606. n[r - 2] = arguments[r];
  44607. return this.superClass.prototype[e].apply(t, n);
  44608. }
  44609. function cRe(t, e, n) {
  44610. return this.superClass.prototype[e].apply(t, n);
  44611. }
  44612. function Qx(t) {
  44613. var e = {};
  44614. t.registerClass = function(r) {
  44615. var i = r.type || r.prototype.type;
  44616. if (i) {
  44617. iRe(i), r.prototype.type = i;
  44618. var a = Vo(i);
  44619. if (!a.sub)
  44620. process.env.NODE_ENV !== "production" && e[a.main] && console.warn(a.main + " exists."), e[a.main] = r;
  44621. else if (a.sub !== Gu) {
  44622. var o = n(a);
  44623. o[a.sub] = r;
  44624. }
  44625. }
  44626. return r;
  44627. }, t.getClass = function(r, i, a) {
  44628. var o = e[r];
  44629. if (o && o[Gu] && (o = i ? o[i] : null), a && !o)
  44630. throw new Error(i ? "Component " + r + "." + (i || "") + " is used but not imported." : r + ".type should be specified.");
  44631. return o;
  44632. }, t.getClassesByMainType = function(r) {
  44633. var i = Vo(r), a = [], o = e[i.main];
  44634. return o && o[Gu] ? k(o, function(s, l) {
  44635. l !== Gu && a.push(s);
  44636. }) : a.push(o), a;
  44637. }, t.hasClass = function(r) {
  44638. var i = Vo(r);
  44639. return !!e[i.main];
  44640. }, t.getAllClassMainTypes = function() {
  44641. var r = [];
  44642. return k(e, function(i, a) {
  44643. r.push(a);
  44644. }), r;
  44645. }, t.hasSubTypes = function(r) {
  44646. var i = Vo(r), a = e[i.main];
  44647. return a && a[Gu];
  44648. };
  44649. function n(r) {
  44650. var i = e[r.main];
  44651. return (!i || !i[Gu]) && (i = e[r.main] = {}, i[Gu] = !0), i;
  44652. }
  44653. }
  44654. function yf(t, e) {
  44655. for (var n = 0; n < t.length; n++)
  44656. t[n][1] || (t[n][1] = t[n][0]);
  44657. return e = e || !1, function(r, i, a) {
  44658. for (var o = {}, s = 0; s < t.length; s++) {
  44659. var l = t[s][1];
  44660. if (!(i && et(i, l) >= 0 || a && et(a, l) < 0)) {
  44661. var u = r.getShallow(l, e);
  44662. u != null && (o[t[s][0]] = u);
  44663. }
  44664. }
  44665. return o;
  44666. };
  44667. }
  44668. var fRe = [
  44669. ["fill", "color"],
  44670. ["shadowBlur"],
  44671. ["shadowOffsetX"],
  44672. ["shadowOffsetY"],
  44673. ["opacity"],
  44674. ["shadowColor"]
  44675. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  44676. // So do not transfer decal directly.
  44677. ], dRe = yf(fRe), hRe = (
  44678. /** @class */
  44679. function() {
  44680. function t() {
  44681. }
  44682. return t.prototype.getAreaStyle = function(e, n) {
  44683. return dRe(this, e, n);
  44684. }, t;
  44685. }()
  44686. ), $A = new R0(50);
  44687. function pRe(t) {
  44688. if (typeof t == "string") {
  44689. var e = $A.get(t);
  44690. return e && e.image;
  44691. } else
  44692. return t;
  44693. }
  44694. function IR(t, e, n, r, i) {
  44695. if (t)
  44696. if (typeof t == "string") {
  44697. if (e && e.__zrImageSrc === t || !n)
  44698. return e;
  44699. var a = $A.get(t), o = { hostEl: n, cb: r, cbPayload: i };
  44700. return a ? (e = a.image, !Hx(e) && a.pending.push(o)) : (e = io.loadImage(t, cB, cB), e.__zrImageSrc = t, $A.put(t, e.__cachedImgObj = {
  44701. image: e,
  44702. pending: [o]
  44703. })), e;
  44704. } else
  44705. return t;
  44706. else return e;
  44707. }
  44708. function cB() {
  44709. var t = this.__cachedImgObj;
  44710. this.onload = this.onerror = this.__cachedImgObj = null;
  44711. for (var e = 0; e < t.pending.length; e++) {
  44712. var n = t.pending[e], r = n.cb;
  44713. r && r(this, n.cbPayload), n.hostEl.dirty();
  44714. }
  44715. t.pending.length = 0;
  44716. }
  44717. function Hx(t) {
  44718. return t && t.width && t.height;
  44719. }
  44720. var sT = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
  44721. function bK(t, e, n, r, i) {
  44722. if (!e)
  44723. return "";
  44724. var a = (t + "").split(`
  44725. `);
  44726. i = _K(e, n, r, i);
  44727. for (var o = 0, s = a.length; o < s; o++)
  44728. a[o] = OK(a[o], i);
  44729. return a.join(`
  44730. `);
  44731. }
  44732. function _K(t, e, n, r) {
  44733. r = r || {};
  44734. var i = le({}, r);
  44735. i.font = e, n = We(n, "..."), i.maxIterations = We(r.maxIterations, 2);
  44736. var a = i.minChar = We(r.minChar, 0);
  44737. i.cnCharWidth = Zi("国", e);
  44738. var o = i.ascCharWidth = Zi("a", e);
  44739. i.placeholder = We(r.placeholder, "");
  44740. for (var s = t = Math.max(0, t - 1), l = 0; l < a && s >= o; l++)
  44741. s -= o;
  44742. var u = Zi(n, e);
  44743. return u > s && (n = "", u = 0), s = t - u, i.ellipsis = n, i.ellipsisWidth = u, i.contentWidth = s, i.containerWidth = t, i;
  44744. }
  44745. function OK(t, e) {
  44746. var n = e.containerWidth, r = e.font, i = e.contentWidth;
  44747. if (!n)
  44748. return "";
  44749. var a = Zi(t, r);
  44750. if (a <= n)
  44751. return t;
  44752. for (var o = 0; ; o++) {
  44753. if (a <= i || o >= e.maxIterations) {
  44754. t += e.ellipsis;
  44755. break;
  44756. }
  44757. var s = o === 0 ? vRe(t, i, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * i / a) : 0;
  44758. t = t.substr(0, s), a = Zi(t, r);
  44759. }
  44760. return t === "" && (t = e.placeholder), t;
  44761. }
  44762. function vRe(t, e, n, r) {
  44763. for (var i = 0, a = 0, o = t.length; a < o && i < e; a++) {
  44764. var s = t.charCodeAt(a);
  44765. i += 0 <= s && s <= 127 ? n : r;
  44766. }
  44767. return a;
  44768. }
  44769. function gRe(t, e) {
  44770. t != null && (t += "");
  44771. var n = e.overflow, r = e.padding, i = e.font, a = n === "truncate", o = zx(i), s = We(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", c = e.width, f;
  44772. c != null && (n === "break" || n === "breakAll") ? f = t ? SK(t, e.font, c, n === "breakAll", 0).lines : [] : f = t ? t.split(`
  44773. `) : [];
  44774. var d = f.length * s, h = We(e.height, d);
  44775. if (d > h && u) {
  44776. var p = Math.floor(h / s);
  44777. f = f.slice(0, p);
  44778. }
  44779. if (t && a && c != null)
  44780. for (var v = _K(c, i, e.ellipsis, {
  44781. minChar: e.truncateMinChar,
  44782. placeholder: e.placeholder
  44783. }), g = 0; g < f.length; g++)
  44784. f[g] = OK(f[g], v);
  44785. for (var m = h, y = 0, g = 0; g < f.length; g++)
  44786. y = Math.max(Zi(f[g], i), y);
  44787. c == null && (c = y);
  44788. var b = y;
  44789. return r && (m += r[0] + r[2], b += r[1] + r[3], c += r[1] + r[3]), l && (b = c), {
  44790. lines: f,
  44791. height: h,
  44792. outerWidth: b,
  44793. outerHeight: m,
  44794. lineHeight: s,
  44795. calculatedLineHeight: o,
  44796. contentWidth: y,
  44797. contentHeight: d,
  44798. width: c
  44799. };
  44800. }
  44801. var mRe = /* @__PURE__ */ function() {
  44802. function t() {
  44803. }
  44804. return t;
  44805. }(), fB = /* @__PURE__ */ function() {
  44806. function t(e) {
  44807. this.tokens = [], e && (this.tokens = e);
  44808. }
  44809. return t;
  44810. }(), yRe = /* @__PURE__ */ function() {
  44811. function t() {
  44812. this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
  44813. }
  44814. return t;
  44815. }();
  44816. function bRe(t, e) {
  44817. var n = new yRe();
  44818. if (t != null && (t += ""), !t)
  44819. return n;
  44820. for (var r = e.width, i = e.height, a = e.overflow, o = (a === "break" || a === "breakAll") && r != null ? { width: r, accumWidth: 0, breakAll: a === "breakAll" } : null, s = sT.lastIndex = 0, l; (l = sT.exec(t)) != null; ) {
  44821. var u = l.index;
  44822. u > s && lT(n, t.substring(s, u), e, o), lT(n, l[2], e, o, l[1]), s = sT.lastIndex;
  44823. }
  44824. s < t.length && lT(n, t.substring(s, t.length), e, o);
  44825. var c = [], f = 0, d = 0, h = e.padding, p = a === "truncate", v = e.lineOverflow === "truncate";
  44826. function g(V, z, W) {
  44827. V.width = z, V.lineHeight = W, f += W, d = Math.max(d, z);
  44828. }
  44829. e: for (var m = 0; m < n.lines.length; m++) {
  44830. for (var y = n.lines[m], b = 0, _ = 0, O = 0; O < y.tokens.length; O++) {
  44831. var S = y.tokens[O], x = S.styleName && e.rich[S.styleName] || {}, C = S.textPadding = x.padding, T = C ? C[1] + C[3] : 0, w = S.font = x.font || e.font;
  44832. S.contentHeight = zx(w);
  44833. var P = We(x.height, S.contentHeight);
  44834. if (S.innerHeight = P, C && (P += C[0] + C[2]), S.height = P, S.lineHeight = ji(x.lineHeight, e.lineHeight, P), S.align = x && x.align || e.align, S.verticalAlign = x && x.verticalAlign || "middle", v && i != null && f + S.lineHeight > i) {
  44835. O > 0 ? (y.tokens = y.tokens.slice(0, O), g(y, _, b), n.lines = n.lines.slice(0, m + 1)) : n.lines = n.lines.slice(0, m);
  44836. break e;
  44837. }
  44838. var $ = x.width, A = $ == null || $ === "auto";
  44839. if (typeof $ == "string" && $.charAt($.length - 1) === "%")
  44840. S.percentWidth = $, c.push(S), S.contentWidth = Zi(S.text, w);
  44841. else {
  44842. if (A) {
  44843. var D = x.backgroundColor, E = D && D.image;
  44844. E && (E = pRe(E), Hx(E) && (S.width = Math.max(S.width, E.width * P / E.height)));
  44845. }
  44846. var R = p && r != null ? r - _ : null;
  44847. R != null && R < S.width ? !A || R < T ? (S.text = "", S.width = S.contentWidth = 0) : (S.text = bK(S.text, R - T, w, e.ellipsis, { minChar: e.truncateMinChar }), S.width = S.contentWidth = Zi(S.text, w)) : S.contentWidth = Zi(S.text, w);
  44848. }
  44849. S.width += T, _ += S.width, x && (b = Math.max(b, S.lineHeight));
  44850. }
  44851. g(y, _, b);
  44852. }
  44853. n.outerWidth = n.width = We(r, d), n.outerHeight = n.height = We(i, f), n.contentHeight = f, n.contentWidth = d, h && (n.outerWidth += h[1] + h[3], n.outerHeight += h[0] + h[2]);
  44854. for (var m = 0; m < c.length; m++) {
  44855. var S = c[m], N = S.percentWidth;
  44856. S.width = parseInt(N, 10) / 100 * n.width;
  44857. }
  44858. return n;
  44859. }
  44860. function lT(t, e, n, r, i) {
  44861. var a = e === "", o = i && n.rich[i] || {}, s = t.lines, l = o.font || n.font, u = !1, c, f;
  44862. if (r) {
  44863. var d = o.padding, h = d ? d[1] + d[3] : 0;
  44864. if (o.width != null && o.width !== "auto") {
  44865. var p = oo(o.width, r.width) + h;
  44866. s.length > 0 && p + r.accumWidth > r.width && (c = e.split(`
  44867. `), u = !0), r.accumWidth = p;
  44868. } else {
  44869. var v = SK(e, l, r.width, r.breakAll, r.accumWidth);
  44870. r.accumWidth = v.accumWidth + h, f = v.linesWidths, c = v.lines;
  44871. }
  44872. } else
  44873. c = e.split(`
  44874. `);
  44875. for (var g = 0; g < c.length; g++) {
  44876. var m = c[g], y = new mRe();
  44877. if (y.styleName = i, y.text = m, y.isLineHolder = !m && !a, typeof o.width == "number" ? y.width = o.width : y.width = f ? f[g] : Zi(m, l), !g && !u) {
  44878. var b = (s[s.length - 1] || (s[0] = new fB())).tokens, _ = b.length;
  44879. _ === 1 && b[0].isLineHolder ? b[0] = y : (m || !_ || a) && b.push(y);
  44880. } else
  44881. s.push(new fB([y]));
  44882. }
  44883. }
  44884. function _Re(t) {
  44885. var e = t.charCodeAt(0);
  44886. return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303;
  44887. }
  44888. var ORe = Aa(",&?/;] ".split(""), function(t, e) {
  44889. return t[e] = !0, t;
  44890. }, {});
  44891. function SRe(t) {
  44892. return _Re(t) ? !!ORe[t] : !0;
  44893. }
  44894. function SK(t, e, n, r, i) {
  44895. for (var a = [], o = [], s = "", l = "", u = 0, c = 0, f = 0; f < t.length; f++) {
  44896. var d = t.charAt(f);
  44897. if (d === `
  44898. `) {
  44899. l && (s += l, c += u), a.push(s), o.push(c), s = "", l = "", u = 0, c = 0;
  44900. continue;
  44901. }
  44902. var h = Zi(d, e), p = r ? !1 : !SRe(d);
  44903. if (a.length ? c + h > n : i + c + h > n) {
  44904. c ? (s || l) && (p ? (s || (s = l, l = "", u = 0, c = u), a.push(s), o.push(c - u), l += d, u += h, s = "", c = u) : (l && (s += l, l = "", u = 0), a.push(s), o.push(c), s = d, c = h)) : p ? (a.push(l), o.push(u), l = d, u = h) : (a.push(d), o.push(h));
  44905. continue;
  44906. }
  44907. c += h, p ? (l += d, u += h) : (l && (s += l, l = "", u = 0), s += d);
  44908. }
  44909. return !a.length && !s && (s = t, l = "", u = 0), l && (s += l), s && (a.push(s), o.push(c)), a.length === 1 && (c += i), {
  44910. accumWidth: c,
  44911. lines: a,
  44912. linesWidths: o
  44913. };
  44914. }
  44915. var AA = "__zr_style_" + Math.round(Math.random() * 10), Kc = {
  44916. shadowBlur: 0,
  44917. shadowOffsetX: 0,
  44918. shadowOffsetY: 0,
  44919. shadowColor: "#000",
  44920. opacity: 1,
  44921. blend: "source-over"
  44922. }, Gx = {
  44923. style: {
  44924. shadowBlur: !0,
  44925. shadowOffsetX: !0,
  44926. shadowOffsetY: !0,
  44927. shadowColor: !0,
  44928. opacity: !0
  44929. }
  44930. };
  44931. Kc[AA] = !0;
  44932. var dB = ["z", "z2", "invisible"], xRe = ["invisible"], wRe = function(t) {
  44933. q(e, t);
  44934. function e(n) {
  44935. return t.call(this, n) || this;
  44936. }
  44937. return e.prototype._init = function(n) {
  44938. for (var r = st(n), i = 0; i < r.length; i++) {
  44939. var a = r[i];
  44940. a === "style" ? this.useStyle(n[a]) : t.prototype.attrKV.call(this, a, n[a]);
  44941. }
  44942. this.style || this.useStyle({});
  44943. }, e.prototype.beforeBrush = function() {
  44944. }, e.prototype.afterBrush = function() {
  44945. }, e.prototype.innerBeforeBrush = function() {
  44946. }, e.prototype.innerAfterBrush = function() {
  44947. }, e.prototype.shouldBePainted = function(n, r, i, a) {
  44948. var o = this.transform;
  44949. if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && CRe(this, n, r) || o && !o[0] && !o[3])
  44950. return !1;
  44951. if (i && this.__clipPaths) {
  44952. for (var s = 0; s < this.__clipPaths.length; ++s)
  44953. if (this.__clipPaths[s].isZeroArea())
  44954. return !1;
  44955. }
  44956. if (a && this.parent)
  44957. for (var l = this.parent; l; ) {
  44958. if (l.ignore)
  44959. return !1;
  44960. l = l.parent;
  44961. }
  44962. return !0;
  44963. }, e.prototype.contain = function(n, r) {
  44964. return this.rectContain(n, r);
  44965. }, e.prototype.traverse = function(n, r) {
  44966. n.call(r, this);
  44967. }, e.prototype.rectContain = function(n, r) {
  44968. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  44969. return a.contain(i[0], i[1]);
  44970. }, e.prototype.getPaintRect = function() {
  44971. var n = this._paintRect;
  44972. if (!this._paintRect || this.__dirty) {
  44973. var r = this.transform, i = this.getBoundingRect(), a = this.style, o = a.shadowBlur || 0, s = a.shadowOffsetX || 0, l = a.shadowOffsetY || 0;
  44974. n = this._paintRect || (this._paintRect = new Je(0, 0, 0, 0)), r ? Je.applyTransform(n, i, r) : n.copy(i), (o || s || l) && (n.width += o * 2 + Math.abs(s), n.height += o * 2 + Math.abs(l), n.x = Math.min(n.x, n.x + s - o), n.y = Math.min(n.y, n.y + l - o));
  44975. var u = this.dirtyRectTolerance;
  44976. n.isZero() || (n.x = Math.floor(n.x - u), n.y = Math.floor(n.y - u), n.width = Math.ceil(n.width + 1 + u * 2), n.height = Math.ceil(n.height + 1 + u * 2));
  44977. }
  44978. return n;
  44979. }, e.prototype.setPrevPaintRect = function(n) {
  44980. n ? (this._prevPaintRect = this._prevPaintRect || new Je(0, 0, 0, 0), this._prevPaintRect.copy(n)) : this._prevPaintRect = null;
  44981. }, e.prototype.getPrevPaintRect = function() {
  44982. return this._prevPaintRect;
  44983. }, e.prototype.animateStyle = function(n) {
  44984. return this.animate("style", n);
  44985. }, e.prototype.updateDuringAnimation = function(n) {
  44986. n === "style" ? this.dirtyStyle() : this.markRedraw();
  44987. }, e.prototype.attrKV = function(n, r) {
  44988. n !== "style" ? t.prototype.attrKV.call(this, n, r) : this.style ? this.setStyle(r) : this.useStyle(r);
  44989. }, e.prototype.setStyle = function(n, r) {
  44990. return typeof n == "string" ? this.style[n] = r : le(this.style, n), this.dirtyStyle(), this;
  44991. }, e.prototype.dirtyStyle = function(n) {
  44992. n || this.markRedraw(), this.__dirty |= Vv, this._rect && (this._rect = null);
  44993. }, e.prototype.dirty = function() {
  44994. this.dirtyStyle();
  44995. }, e.prototype.styleChanged = function() {
  44996. return !!(this.__dirty & Vv);
  44997. }, e.prototype.styleUpdated = function() {
  44998. this.__dirty &= ~Vv;
  44999. }, e.prototype.createStyle = function(n) {
  45000. return I0(Kc, n);
  45001. }, e.prototype.useStyle = function(n) {
  45002. n[AA] || (n = this.createStyle(n)), this.__inHover ? this.__hoverStyle = n : this.style = n, this.dirtyStyle();
  45003. }, e.prototype.isStyleObject = function(n) {
  45004. return n[AA];
  45005. }, e.prototype._innerSaveToNormal = function(n) {
  45006. t.prototype._innerSaveToNormal.call(this, n);
  45007. var r = this._normalState;
  45008. n.style && !r.style && (r.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(n, r, dB);
  45009. }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
  45010. t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
  45011. var l = !(r && a), u;
  45012. if (r && r.style ? o ? a ? u = r.style : (u = this._mergeStyle(this.createStyle(), i.style), this._mergeStyle(u, r.style)) : (u = this._mergeStyle(this.createStyle(), a ? this.style : i.style), this._mergeStyle(u, r.style)) : l && (u = i.style), u)
  45013. if (o) {
  45014. var c = this.style;
  45015. if (this.style = this.createStyle(l ? {} : c), l)
  45016. for (var f = st(c), d = 0; d < f.length; d++) {
  45017. var h = f[d];
  45018. h in u && (u[h] = u[h], this.style[h] = c[h]);
  45019. }
  45020. for (var p = st(u), d = 0; d < p.length; d++) {
  45021. var h = p[d];
  45022. this.style[h] = this.style[h];
  45023. }
  45024. this._transitionState(n, {
  45025. style: u
  45026. }, s, this.getAnimationStyleProps());
  45027. } else
  45028. this.useStyle(u);
  45029. for (var v = this.__inHover ? xRe : dB, d = 0; d < v.length; d++) {
  45030. var h = v[d];
  45031. r && r[h] != null ? this[h] = r[h] : l && i[h] != null && (this[h] = i[h]);
  45032. }
  45033. }, e.prototype._mergeStates = function(n) {
  45034. for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
  45035. var o = n[a];
  45036. o.style && (i = i || {}, this._mergeStyle(i, o.style));
  45037. }
  45038. return i && (r.style = i), r;
  45039. }, e.prototype._mergeStyle = function(n, r) {
  45040. return le(n, r), n;
  45041. }, e.prototype.getAnimationStyleProps = function() {
  45042. return Gx;
  45043. }, e.initDefaultProps = function() {
  45044. var n = e.prototype;
  45045. n.type = "displayable", n.invisible = !1, n.z = 0, n.z2 = 0, n.zlevel = 0, n.culling = !1, n.cursor = "pointer", n.rectHover = !1, n.incremental = !1, n._rect = null, n.dirtyRectTolerance = 0, n.__dirty = ki | Vv;
  45046. }(), e;
  45047. }(Vx), uT = new Je(0, 0, 0, 0), cT = new Je(0, 0, 0, 0);
  45048. function CRe(t, e, n) {
  45049. return uT.copy(t.getBoundingRect()), t.transform && uT.applyTransform(t.transform), cT.width = e, cT.height = n, !uT.intersect(cT);
  45050. }
  45051. const Ma = wRe;
  45052. var di = Math.min, hi = Math.max, fT = Math.sin, dT = Math.cos, ju = Math.PI * 2, Xy = wu(), Yy = wu(), qy = wu();
  45053. function jx(t, e, n) {
  45054. if (t.length !== 0) {
  45055. for (var r = t[0], i = r[0], a = r[0], o = r[1], s = r[1], l = 1; l < t.length; l++)
  45056. r = t[l], i = di(i, r[0]), a = hi(a, r[0]), o = di(o, r[1]), s = hi(s, r[1]);
  45057. e[0] = i, e[1] = o, n[0] = a, n[1] = s;
  45058. }
  45059. }
  45060. function hB(t, e, n, r, i, a) {
  45061. i[0] = di(t, n), i[1] = di(e, r), a[0] = hi(t, n), a[1] = hi(e, r);
  45062. }
  45063. var pB = [], vB = [];
  45064. function TRe(t, e, n, r, i, a, o, s, l, u) {
  45065. var c = zq, f = Gn, d = c(t, n, i, o, pB);
  45066. l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  45067. for (var h = 0; h < d; h++) {
  45068. var p = f(t, n, i, o, pB[h]);
  45069. l[0] = di(p, l[0]), u[0] = hi(p, u[0]);
  45070. }
  45071. d = c(e, r, a, s, vB);
  45072. for (var h = 0; h < d; h++) {
  45073. var v = f(e, r, a, s, vB[h]);
  45074. l[1] = di(v, l[1]), u[1] = hi(v, u[1]);
  45075. }
  45076. l[0] = di(t, l[0]), u[0] = hi(t, u[0]), l[0] = di(o, l[0]), u[0] = hi(o, u[0]), l[1] = di(e, l[1]), u[1] = hi(e, u[1]), l[1] = di(s, l[1]), u[1] = hi(s, u[1]);
  45077. }
  45078. function PRe(t, e, n, r, i, a, o, s) {
  45079. var l = Fq, u = ir, c = hi(di(l(t, n, i), 1), 0), f = hi(di(l(e, r, a), 1), 0), d = u(t, n, i, c), h = u(e, r, a, f);
  45080. o[0] = di(t, i, d), o[1] = di(e, a, h), s[0] = hi(t, i, d), s[1] = hi(e, a, h);
  45081. }
  45082. function $Re(t, e, n, r, i, a, o, s, l) {
  45083. var u = Ps, c = $s, f = Math.abs(i - a);
  45084. if (f % ju < 1e-4 && f > 1e-4) {
  45085. s[0] = t - n, s[1] = e - r, l[0] = t + n, l[1] = e + r;
  45086. return;
  45087. }
  45088. if (Xy[0] = dT(i) * n + t, Xy[1] = fT(i) * r + e, Yy[0] = dT(a) * n + t, Yy[1] = fT(a) * r + e, u(s, Xy, Yy), c(l, Xy, Yy), i = i % ju, i < 0 && (i = i + ju), a = a % ju, a < 0 && (a = a + ju), i > a && !o ? a += ju : i < a && o && (i += ju), o) {
  45089. var d = a;
  45090. a = i, i = d;
  45091. }
  45092. for (var h = 0; h < a; h += Math.PI / 2)
  45093. h > i && (qy[0] = dT(h) * n + t, qy[1] = fT(h) * r + e, u(s, qy, s), c(l, qy, l));
  45094. }
  45095. var Gt = {
  45096. M: 1,
  45097. L: 2,
  45098. C: 3,
  45099. Q: 4,
  45100. A: 5,
  45101. Z: 6,
  45102. R: 7
  45103. }, Zu = [], Uu = [], bo = [], dl = [], _o = [], Oo = [], hT = Math.min, pT = Math.max, Xu = Math.cos, Yu = Math.sin, gs = Math.abs, EA = Math.PI, Sl = EA * 2, vT = typeof Float32Array < "u", nv = [];
  45104. function gT(t) {
  45105. var e = Math.round(t / EA * 1e8) / 1e8;
  45106. return e % 2 * EA;
  45107. }
  45108. function DR(t, e) {
  45109. var n = gT(t[0]);
  45110. n < 0 && (n += Sl);
  45111. var r = n - t[0], i = t[1];
  45112. i += r, !e && i - n >= Sl ? i = n + Sl : e && n - i >= Sl ? i = n - Sl : !e && n > i ? i = n + (Sl - gT(n - i)) : e && n < i && (i = n - (Sl - gT(i - n))), t[0] = n, t[1] = i;
  45113. }
  45114. var as = function() {
  45115. function t(e) {
  45116. this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, e && (this._saveData = !1), this._saveData && (this.data = []);
  45117. }
  45118. return t.prototype.increaseVersion = function() {
  45119. this._version++;
  45120. }, t.prototype.getVersion = function() {
  45121. return this._version;
  45122. }, t.prototype.setScale = function(e, n, r) {
  45123. r = r || 0, r > 0 && (this._ux = gs(r / nO / e) || 0, this._uy = gs(r / nO / n) || 0);
  45124. }, t.prototype.setDPR = function(e) {
  45125. this.dpr = e;
  45126. }, t.prototype.setContext = function(e) {
  45127. this._ctx = e;
  45128. }, t.prototype.getContext = function() {
  45129. return this._ctx;
  45130. }, t.prototype.beginPath = function() {
  45131. return this._ctx && this._ctx.beginPath(), this.reset(), this;
  45132. }, t.prototype.reset = function() {
  45133. this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
  45134. }, t.prototype.moveTo = function(e, n) {
  45135. return this._drawPendingPt(), this.addData(Gt.M, e, n), this._ctx && this._ctx.moveTo(e, n), this._x0 = e, this._y0 = n, this._xi = e, this._yi = n, this;
  45136. }, t.prototype.lineTo = function(e, n) {
  45137. var r = gs(e - this._xi), i = gs(n - this._yi), a = r > this._ux || i > this._uy;
  45138. if (this.addData(Gt.L, e, n), this._ctx && a && this._ctx.lineTo(e, n), a)
  45139. this._xi = e, this._yi = n, this._pendingPtDist = 0;
  45140. else {
  45141. var o = r * r + i * i;
  45142. o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = n, this._pendingPtDist = o);
  45143. }
  45144. return this;
  45145. }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
  45146. return this._drawPendingPt(), this.addData(Gt.C, e, n, r, i, a, o), this._ctx && this._ctx.bezierCurveTo(e, n, r, i, a, o), this._xi = a, this._yi = o, this;
  45147. }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
  45148. return this._drawPendingPt(), this.addData(Gt.Q, e, n, r, i), this._ctx && this._ctx.quadraticCurveTo(e, n, r, i), this._xi = r, this._yi = i, this;
  45149. }, t.prototype.arc = function(e, n, r, i, a, o) {
  45150. this._drawPendingPt(), nv[0] = i, nv[1] = a, DR(nv, o), i = nv[0], a = nv[1];
  45151. var s = a - i;
  45152. return this.addData(Gt.A, e, n, r, r, i, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, n, r, i, a, o), this._xi = Xu(a) * r + e, this._yi = Yu(a) * r + n, this;
  45153. }, t.prototype.arcTo = function(e, n, r, i, a) {
  45154. return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, n, r, i, a), this;
  45155. }, t.prototype.rect = function(e, n, r, i) {
  45156. return this._drawPendingPt(), this._ctx && this._ctx.rect(e, n, r, i), this.addData(Gt.R, e, n, r, i), this;
  45157. }, t.prototype.closePath = function() {
  45158. this._drawPendingPt(), this.addData(Gt.Z);
  45159. var e = this._ctx, n = this._x0, r = this._y0;
  45160. return e && e.closePath(), this._xi = n, this._yi = r, this;
  45161. }, t.prototype.fill = function(e) {
  45162. e && e.fill(), this.toStatic();
  45163. }, t.prototype.stroke = function(e) {
  45164. e && e.stroke(), this.toStatic();
  45165. }, t.prototype.len = function() {
  45166. return this._len;
  45167. }, t.prototype.setData = function(e) {
  45168. var n = e.length;
  45169. !(this.data && this.data.length === n) && vT && (this.data = new Float32Array(n));
  45170. for (var r = 0; r < n; r++)
  45171. this.data[r] = e[r];
  45172. this._len = n;
  45173. }, t.prototype.appendPath = function(e) {
  45174. e instanceof Array || (e = [e]);
  45175. for (var n = e.length, r = 0, i = this._len, a = 0; a < n; a++)
  45176. r += e[a].len();
  45177. vT && this.data instanceof Float32Array && (this.data = new Float32Array(i + r));
  45178. for (var a = 0; a < n; a++)
  45179. for (var o = e[a].data, s = 0; s < o.length; s++)
  45180. this.data[i++] = o[s];
  45181. this._len = i;
  45182. }, t.prototype.addData = function(e, n, r, i, a, o, s, l, u) {
  45183. if (this._saveData) {
  45184. var c = this.data;
  45185. this._len + arguments.length > c.length && (this._expandData(), c = this.data);
  45186. for (var f = 0; f < arguments.length; f++)
  45187. c[this._len++] = arguments[f];
  45188. }
  45189. }, t.prototype._drawPendingPt = function() {
  45190. this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
  45191. }, t.prototype._expandData = function() {
  45192. if (!(this.data instanceof Array)) {
  45193. for (var e = [], n = 0; n < this._len; n++)
  45194. e[n] = this.data[n];
  45195. this.data = e;
  45196. }
  45197. }, t.prototype.toStatic = function() {
  45198. if (this._saveData) {
  45199. this._drawPendingPt();
  45200. var e = this.data;
  45201. e instanceof Array && (e.length = this._len, vT && this._len > 11 && (this.data = new Float32Array(e)));
  45202. }
  45203. }, t.prototype.getBoundingRect = function() {
  45204. bo[0] = bo[1] = _o[0] = _o[1] = Number.MAX_VALUE, dl[0] = dl[1] = Oo[0] = Oo[1] = -Number.MAX_VALUE;
  45205. var e = this.data, n = 0, r = 0, i = 0, a = 0, o;
  45206. for (o = 0; o < this._len; ) {
  45207. var s = e[o++], l = o === 1;
  45208. switch (l && (n = e[o], r = e[o + 1], i = n, a = r), s) {
  45209. case Gt.M:
  45210. n = i = e[o++], r = a = e[o++], _o[0] = i, _o[1] = a, Oo[0] = i, Oo[1] = a;
  45211. break;
  45212. case Gt.L:
  45213. hB(n, r, e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
  45214. break;
  45215. case Gt.C:
  45216. TRe(n, r, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
  45217. break;
  45218. case Gt.Q:
  45219. PRe(n, r, e[o++], e[o++], e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
  45220. break;
  45221. case Gt.A:
  45222. var u = e[o++], c = e[o++], f = e[o++], d = e[o++], h = e[o++], p = e[o++] + h;
  45223. o += 1;
  45224. var v = !e[o++];
  45225. l && (i = Xu(h) * f + u, a = Yu(h) * d + c), $Re(u, c, f, d, h, p, v, _o, Oo), n = Xu(p) * f + u, r = Yu(p) * d + c;
  45226. break;
  45227. case Gt.R:
  45228. i = n = e[o++], a = r = e[o++];
  45229. var g = e[o++], m = e[o++];
  45230. hB(i, a, i + g, a + m, _o, Oo);
  45231. break;
  45232. case Gt.Z:
  45233. n = i, r = a;
  45234. break;
  45235. }
  45236. Ps(bo, bo, _o), $s(dl, dl, Oo);
  45237. }
  45238. return o === 0 && (bo[0] = bo[1] = dl[0] = dl[1] = 0), new Je(bo[0], bo[1], dl[0] - bo[0], dl[1] - bo[1]);
  45239. }, t.prototype._calculateLength = function() {
  45240. var e = this.data, n = this._len, r = this._ux, i = this._uy, a = 0, o = 0, s = 0, l = 0;
  45241. this._pathSegLen || (this._pathSegLen = []);
  45242. for (var u = this._pathSegLen, c = 0, f = 0, d = 0; d < n; ) {
  45243. var h = e[d++], p = d === 1;
  45244. p && (a = e[d], o = e[d + 1], s = a, l = o);
  45245. var v = -1;
  45246. switch (h) {
  45247. case Gt.M:
  45248. a = s = e[d++], o = l = e[d++];
  45249. break;
  45250. case Gt.L: {
  45251. var g = e[d++], m = e[d++], y = g - a, b = m - o;
  45252. (gs(y) > r || gs(b) > i || d === n - 1) && (v = Math.sqrt(y * y + b * b), a = g, o = m);
  45253. break;
  45254. }
  45255. case Gt.C: {
  45256. var _ = e[d++], O = e[d++], g = e[d++], m = e[d++], S = e[d++], x = e[d++];
  45257. v = VIe(a, o, _, O, g, m, S, x, 10), a = S, o = x;
  45258. break;
  45259. }
  45260. case Gt.Q: {
  45261. var _ = e[d++], O = e[d++], g = e[d++], m = e[d++];
  45262. v = WIe(a, o, _, O, g, m, 10), a = g, o = m;
  45263. break;
  45264. }
  45265. case Gt.A:
  45266. var C = e[d++], T = e[d++], w = e[d++], P = e[d++], $ = e[d++], A = e[d++], D = A + $;
  45267. d += 1, p && (s = Xu($) * w + C, l = Yu($) * P + T), v = pT(w, P) * hT(Sl, Math.abs(A)), a = Xu(D) * w + C, o = Yu(D) * P + T;
  45268. break;
  45269. case Gt.R: {
  45270. s = a = e[d++], l = o = e[d++];
  45271. var E = e[d++], R = e[d++];
  45272. v = E * 2 + R * 2;
  45273. break;
  45274. }
  45275. case Gt.Z: {
  45276. var y = s - a, b = l - o;
  45277. v = Math.sqrt(y * y + b * b), a = s, o = l;
  45278. break;
  45279. }
  45280. }
  45281. v >= 0 && (u[f++] = v, c += v);
  45282. }
  45283. return this._pathLen = c, c;
  45284. }, t.prototype.rebuildPath = function(e, n) {
  45285. var r = this.data, i = this._ux, a = this._uy, o = this._len, s, l, u, c, f, d, h = n < 1, p, v, g = 0, m = 0, y, b = 0, _, O;
  45286. if (!(h && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, v = this._pathLen, y = n * v, !y)))
  45287. e: for (var S = 0; S < o; ) {
  45288. var x = r[S++], C = S === 1;
  45289. switch (C && (u = r[S], c = r[S + 1], s = u, l = c), x !== Gt.L && b > 0 && (e.lineTo(_, O), b = 0), x) {
  45290. case Gt.M:
  45291. s = u = r[S++], l = c = r[S++], e.moveTo(u, c);
  45292. break;
  45293. case Gt.L: {
  45294. f = r[S++], d = r[S++];
  45295. var T = gs(f - u), w = gs(d - c);
  45296. if (T > i || w > a) {
  45297. if (h) {
  45298. var P = p[m++];
  45299. if (g + P > y) {
  45300. var $ = (y - g) / P;
  45301. e.lineTo(u * (1 - $) + f * $, c * (1 - $) + d * $);
  45302. break e;
  45303. }
  45304. g += P;
  45305. }
  45306. e.lineTo(f, d), u = f, c = d, b = 0;
  45307. } else {
  45308. var A = T * T + w * w;
  45309. A > b && (_ = f, O = d, b = A);
  45310. }
  45311. break;
  45312. }
  45313. case Gt.C: {
  45314. var D = r[S++], E = r[S++], R = r[S++], N = r[S++], V = r[S++], z = r[S++];
  45315. if (h) {
  45316. var P = p[m++];
  45317. if (g + P > y) {
  45318. var $ = (y - g) / P;
  45319. su(u, D, R, V, $, Zu), su(c, E, N, z, $, Uu), e.bezierCurveTo(Zu[1], Uu[1], Zu[2], Uu[2], Zu[3], Uu[3]);
  45320. break e;
  45321. }
  45322. g += P;
  45323. }
  45324. e.bezierCurveTo(D, E, R, N, V, z), u = V, c = z;
  45325. break;
  45326. }
  45327. case Gt.Q: {
  45328. var D = r[S++], E = r[S++], R = r[S++], N = r[S++];
  45329. if (h) {
  45330. var P = p[m++];
  45331. if (g + P > y) {
  45332. var $ = (y - g) / P;
  45333. ym(u, D, R, $, Zu), ym(c, E, N, $, Uu), e.quadraticCurveTo(Zu[1], Uu[1], Zu[2], Uu[2]);
  45334. break e;
  45335. }
  45336. g += P;
  45337. }
  45338. e.quadraticCurveTo(D, E, R, N), u = R, c = N;
  45339. break;
  45340. }
  45341. case Gt.A:
  45342. var W = r[S++], F = r[S++], Q = r[S++], Z = r[S++], ne = r[S++], ee = r[S++], oe = r[S++], K = !r[S++], ie = Q > Z ? Q : Z, X = gs(Q - Z) > 1e-3, H = ne + ee, G = !1;
  45343. if (h) {
  45344. var P = p[m++];
  45345. g + P > y && (H = ne + ee * (y - g) / P, G = !0), g += P;
  45346. }
  45347. if (X && e.ellipse ? e.ellipse(W, F, Q, Z, oe, ne, H, K) : e.arc(W, F, ie, ne, H, K), G)
  45348. break e;
  45349. C && (s = Xu(ne) * Q + W, l = Yu(ne) * Z + F), u = Xu(H) * Q + W, c = Yu(H) * Z + F;
  45350. break;
  45351. case Gt.R:
  45352. s = u = r[S], l = c = r[S + 1], f = r[S++], d = r[S++];
  45353. var re = r[S++], fe = r[S++];
  45354. if (h) {
  45355. var P = p[m++];
  45356. if (g + P > y) {
  45357. var de = y - g;
  45358. e.moveTo(f, d), e.lineTo(f + hT(de, re), d), de -= re, de > 0 && e.lineTo(f + re, d + hT(de, fe)), de -= fe, de > 0 && e.lineTo(f + pT(re - de, 0), d + fe), de -= re, de > 0 && e.lineTo(f, d + pT(fe - de, 0));
  45359. break e;
  45360. }
  45361. g += P;
  45362. }
  45363. e.rect(f, d, re, fe);
  45364. break;
  45365. case Gt.Z:
  45366. if (h) {
  45367. var P = p[m++];
  45368. if (g + P > y) {
  45369. var $ = (y - g) / P;
  45370. e.lineTo(u * (1 - $) + s * $, c * (1 - $) + l * $);
  45371. break e;
  45372. }
  45373. g += P;
  45374. }
  45375. e.closePath(), u = s, c = l;
  45376. }
  45377. }
  45378. }, t.prototype.clone = function() {
  45379. var e = new t(), n = this.data;
  45380. return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e;
  45381. }, t.CMD = Gt, t.initDefaultProps = function() {
  45382. var e = t.prototype;
  45383. e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
  45384. }(), t;
  45385. }();
  45386. function wl(t, e, n, r, i, a, o) {
  45387. if (i === 0)
  45388. return !1;
  45389. var s = i, l = 0, u = t;
  45390. if (o > e + s && o > r + s || o < e - s && o < r - s || a > t + s && a > n + s || a < t - s && a < n - s)
  45391. return !1;
  45392. if (t !== n)
  45393. l = (e - r) / (t - n), u = (t * r - n * e) / (t - n);
  45394. else
  45395. return Math.abs(a - t) <= s / 2;
  45396. var c = l * a - o + u, f = c * c / (l * l + 1);
  45397. return f <= s / 2 * s / 2;
  45398. }
  45399. function ARe(t, e, n, r, i, a, o, s, l, u, c) {
  45400. if (l === 0)
  45401. return !1;
  45402. var f = l;
  45403. if (c > e + f && c > r + f && c > a + f && c > s + f || c < e - f && c < r - f && c < a - f && c < s - f || u > t + f && u > n + f && u > i + f && u > o + f || u < t - f && u < n - f && u < i - f && u < o - f)
  45404. return !1;
  45405. var d = Vq(t, e, n, r, i, a, o, s, u, c, null);
  45406. return d <= f / 2;
  45407. }
  45408. function xK(t, e, n, r, i, a, o, s, l) {
  45409. if (o === 0)
  45410. return !1;
  45411. var u = o;
  45412. if (l > e + u && l > r + u && l > a + u || l < e - u && l < r - u && l < a - u || s > t + u && s > n + u && s > i + u || s < t - u && s < n - u && s < i - u)
  45413. return !1;
  45414. var c = Wq(t, e, n, r, i, a, s, l, null);
  45415. return c <= u / 2;
  45416. }
  45417. var gB = Math.PI * 2;
  45418. function Fi(t) {
  45419. return t %= gB, t < 0 && (t += gB), t;
  45420. }
  45421. var rv = Math.PI * 2;
  45422. function ERe(t, e, n, r, i, a, o, s, l) {
  45423. if (o === 0)
  45424. return !1;
  45425. var u = o;
  45426. s -= t, l -= e;
  45427. var c = Math.sqrt(s * s + l * l);
  45428. if (c - u > n || c + u < n)
  45429. return !1;
  45430. if (Math.abs(r - i) % rv < 1e-4)
  45431. return !0;
  45432. if (a) {
  45433. var f = r;
  45434. r = Fi(i), i = Fi(f);
  45435. } else
  45436. r = Fi(r), i = Fi(i);
  45437. r > i && (i += rv);
  45438. var d = Math.atan2(l, s);
  45439. return d < 0 && (d += rv), d >= r && d <= i || d + rv >= r && d + rv <= i;
  45440. }
  45441. function Os(t, e, n, r, i, a) {
  45442. if (a > e && a > r || a < e && a < r || r === e)
  45443. return 0;
  45444. var o = (a - e) / (r - e), s = r < e ? 1 : -1;
  45445. (o === 1 || o === 0) && (s = r < e ? 0.5 : -0.5);
  45446. var l = o * (n - t) + t;
  45447. return l === i ? 1 / 0 : l > i ? s : 0;
  45448. }
  45449. var hl = as.CMD, qu = Math.PI * 2, MRe = 1e-4;
  45450. function IRe(t, e) {
  45451. return Math.abs(t - e) < MRe;
  45452. }
  45453. var Wr = [-1, -1, -1], ua = [-1, -1];
  45454. function DRe() {
  45455. var t = ua[0];
  45456. ua[0] = ua[1], ua[1] = t;
  45457. }
  45458. function RRe(t, e, n, r, i, a, o, s, l, u) {
  45459. if (u > e && u > r && u > a && u > s || u < e && u < r && u < a && u < s)
  45460. return 0;
  45461. var c = K1(e, r, a, s, u, Wr);
  45462. if (c === 0)
  45463. return 0;
  45464. for (var f = 0, d = -1, h = void 0, p = void 0, v = 0; v < c; v++) {
  45465. var g = Wr[v], m = g === 0 || g === 1 ? 0.5 : 1, y = Gn(t, n, i, o, g);
  45466. y < l || (d < 0 && (d = zq(e, r, a, s, ua), ua[1] < ua[0] && d > 1 && DRe(), h = Gn(e, r, a, s, ua[0]), d > 1 && (p = Gn(e, r, a, s, ua[1]))), d === 2 ? g < ua[0] ? f += h < e ? m : -m : g < ua[1] ? f += p < h ? m : -m : f += s < p ? m : -m : g < ua[0] ? f += h < e ? m : -m : f += s < h ? m : -m);
  45467. }
  45468. return f;
  45469. }
  45470. function kRe(t, e, n, r, i, a, o, s) {
  45471. if (s > e && s > r && s > a || s < e && s < r && s < a)
  45472. return 0;
  45473. var l = FIe(e, r, a, s, Wr);
  45474. if (l === 0)
  45475. return 0;
  45476. var u = Fq(e, r, a);
  45477. if (u >= 0 && u <= 1) {
  45478. for (var c = 0, f = ir(e, r, a, u), d = 0; d < l; d++) {
  45479. var h = Wr[d] === 0 || Wr[d] === 1 ? 0.5 : 1, p = ir(t, n, i, Wr[d]);
  45480. p < o || (Wr[d] < u ? c += f < e ? h : -h : c += a < f ? h : -h);
  45481. }
  45482. return c;
  45483. } else {
  45484. var h = Wr[0] === 0 || Wr[0] === 1 ? 0.5 : 1, p = ir(t, n, i, Wr[0]);
  45485. return p < o ? 0 : a < e ? h : -h;
  45486. }
  45487. }
  45488. function LRe(t, e, n, r, i, a, o, s) {
  45489. if (s -= e, s > n || s < -n)
  45490. return 0;
  45491. var l = Math.sqrt(n * n - s * s);
  45492. Wr[0] = -l, Wr[1] = l;
  45493. var u = Math.abs(r - i);
  45494. if (u < 1e-4)
  45495. return 0;
  45496. if (u >= qu - 1e-4) {
  45497. r = 0, i = qu;
  45498. var c = a ? 1 : -1;
  45499. return o >= Wr[0] + t && o <= Wr[1] + t ? c : 0;
  45500. }
  45501. if (r > i) {
  45502. var f = r;
  45503. r = i, i = f;
  45504. }
  45505. r < 0 && (r += qu, i += qu);
  45506. for (var d = 0, h = 0; h < 2; h++) {
  45507. var p = Wr[h];
  45508. if (p + t > o) {
  45509. var v = Math.atan2(s, p), c = a ? 1 : -1;
  45510. v < 0 && (v = qu + v), (v >= r && v <= i || v + qu >= r && v + qu <= i) && (v > Math.PI / 2 && v < Math.PI * 1.5 && (c = -c), d += c);
  45511. }
  45512. }
  45513. return d;
  45514. }
  45515. function wK(t, e, n, r, i) {
  45516. for (var a = t.data, o = t.len(), s = 0, l = 0, u = 0, c = 0, f = 0, d, h, p = 0; p < o; ) {
  45517. var v = a[p++], g = p === 1;
  45518. switch (v === hl.M && p > 1 && (n || (s += Os(l, u, c, f, r, i))), g && (l = a[p], u = a[p + 1], c = l, f = u), v) {
  45519. case hl.M:
  45520. c = a[p++], f = a[p++], l = c, u = f;
  45521. break;
  45522. case hl.L:
  45523. if (n) {
  45524. if (wl(l, u, a[p], a[p + 1], e, r, i))
  45525. return !0;
  45526. } else
  45527. s += Os(l, u, a[p], a[p + 1], r, i) || 0;
  45528. l = a[p++], u = a[p++];
  45529. break;
  45530. case hl.C:
  45531. if (n) {
  45532. if (ARe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], e, r, i))
  45533. return !0;
  45534. } else
  45535. s += RRe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
  45536. l = a[p++], u = a[p++];
  45537. break;
  45538. case hl.Q:
  45539. if (n) {
  45540. if (xK(l, u, a[p++], a[p++], a[p], a[p + 1], e, r, i))
  45541. return !0;
  45542. } else
  45543. s += kRe(l, u, a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
  45544. l = a[p++], u = a[p++];
  45545. break;
  45546. case hl.A:
  45547. var m = a[p++], y = a[p++], b = a[p++], _ = a[p++], O = a[p++], S = a[p++];
  45548. p += 1;
  45549. var x = !!(1 - a[p++]);
  45550. d = Math.cos(O) * b + m, h = Math.sin(O) * _ + y, g ? (c = d, f = h) : s += Os(l, u, d, h, r, i);
  45551. var C = (r - m) * _ / b + m;
  45552. if (n) {
  45553. if (ERe(m, y, _, O, O + S, x, e, C, i))
  45554. return !0;
  45555. } else
  45556. s += LRe(m, y, _, O, O + S, x, C, i);
  45557. l = Math.cos(O + S) * b + m, u = Math.sin(O + S) * _ + y;
  45558. break;
  45559. case hl.R:
  45560. c = l = a[p++], f = u = a[p++];
  45561. var T = a[p++], w = a[p++];
  45562. if (d = c + T, h = f + w, n) {
  45563. if (wl(c, f, d, f, e, r, i) || wl(d, f, d, h, e, r, i) || wl(d, h, c, h, e, r, i) || wl(c, h, c, f, e, r, i))
  45564. return !0;
  45565. } else
  45566. s += Os(d, f, d, h, r, i), s += Os(c, h, c, f, r, i);
  45567. break;
  45568. case hl.Z:
  45569. if (n) {
  45570. if (wl(l, u, c, f, e, r, i))
  45571. return !0;
  45572. } else
  45573. s += Os(l, u, c, f, r, i);
  45574. l = c, u = f;
  45575. break;
  45576. }
  45577. }
  45578. return !n && !IRe(u, f) && (s += Os(l, u, c, f, r, i) || 0), s !== 0;
  45579. }
  45580. function NRe(t, e, n) {
  45581. return wK(t, 0, !1, e, n);
  45582. }
  45583. function BRe(t, e, n, r) {
  45584. return wK(t, e, !0, n, r);
  45585. }
  45586. var aO = Re({
  45587. fill: "#000",
  45588. stroke: null,
  45589. strokePercent: 1,
  45590. fillOpacity: 1,
  45591. strokeOpacity: 1,
  45592. lineDashOffset: 0,
  45593. lineWidth: 1,
  45594. lineCap: "butt",
  45595. miterLimit: 10,
  45596. strokeNoScale: !1,
  45597. strokeFirst: !1
  45598. }, Kc), zRe = {
  45599. style: Re({
  45600. fill: !0,
  45601. stroke: !0,
  45602. strokePercent: !0,
  45603. fillOpacity: !0,
  45604. strokeOpacity: !0,
  45605. lineDashOffset: !0,
  45606. lineWidth: !0,
  45607. miterLimit: !0
  45608. }, Gx.style)
  45609. }, mT = rs.concat([
  45610. "invisible",
  45611. "culling",
  45612. "z",
  45613. "z2",
  45614. "zlevel",
  45615. "parent"
  45616. ]), ot = function(t) {
  45617. q(e, t);
  45618. function e(n) {
  45619. return t.call(this, n) || this;
  45620. }
  45621. return e.prototype.update = function() {
  45622. var n = this;
  45623. t.prototype.update.call(this);
  45624. var r = this.style;
  45625. if (r.decal) {
  45626. var i = this._decalEl = this._decalEl || new e();
  45627. i.buildPath === e.prototype.buildPath && (i.buildPath = function(l) {
  45628. n.buildPath(l, n.shape);
  45629. }), i.silent = !0;
  45630. var a = i.style;
  45631. for (var o in r)
  45632. a[o] !== r[o] && (a[o] = r[o]);
  45633. a.fill = r.fill ? r.decal : null, a.decal = null, a.shadowColor = null, r.strokeFirst && (a.stroke = null);
  45634. for (var s = 0; s < mT.length; ++s)
  45635. i[mT[s]] = this[mT[s]];
  45636. i.__dirty |= ki;
  45637. } else this._decalEl && (this._decalEl = null);
  45638. }, e.prototype.getDecalElement = function() {
  45639. return this._decalEl;
  45640. }, e.prototype._init = function(n) {
  45641. var r = st(n);
  45642. this.shape = this.getDefaultShape();
  45643. var i = this.getDefaultStyle();
  45644. i && this.useStyle(i);
  45645. for (var a = 0; a < r.length; a++) {
  45646. var o = r[a], s = n[o];
  45647. o === "style" ? this.style ? le(this.style, s) : this.useStyle(s) : o === "shape" ? le(this.shape, s) : t.prototype.attrKV.call(this, o, s);
  45648. }
  45649. this.style || this.useStyle({});
  45650. }, e.prototype.getDefaultStyle = function() {
  45651. return null;
  45652. }, e.prototype.getDefaultShape = function() {
  45653. return {};
  45654. }, e.prototype.canBeInsideText = function() {
  45655. return this.hasFill();
  45656. }, e.prototype.getInsideTextFill = function() {
  45657. var n = this.style.fill;
  45658. if (n !== "none") {
  45659. if (Oe(n)) {
  45660. var r = Om(n, 0);
  45661. return r > 0.5 ? OA : r > 0.2 ? bDe : SA;
  45662. } else if (n)
  45663. return SA;
  45664. }
  45665. return OA;
  45666. }, e.prototype.getInsideTextStroke = function(n) {
  45667. var r = this.style.fill;
  45668. if (Oe(r)) {
  45669. var i = this.__zr, a = !!(i && i.isDarkMode()), o = Om(n, 0) < _A;
  45670. if (a === o)
  45671. return r;
  45672. }
  45673. }, e.prototype.buildPath = function(n, r, i) {
  45674. }, e.prototype.pathUpdated = function() {
  45675. this.__dirty &= ~$d;
  45676. }, e.prototype.getUpdatedPathProxy = function(n) {
  45677. return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, n), this.path;
  45678. }, e.prototype.createPathProxy = function() {
  45679. this.path = new as(!1);
  45680. }, e.prototype.hasStroke = function() {
  45681. var n = this.style, r = n.stroke;
  45682. return !(r == null || r === "none" || !(n.lineWidth > 0));
  45683. }, e.prototype.hasFill = function() {
  45684. var n = this.style, r = n.fill;
  45685. return r != null && r !== "none";
  45686. }, e.prototype.getBoundingRect = function() {
  45687. var n = this._rect, r = this.style, i = !n;
  45688. if (i) {
  45689. var a = !1;
  45690. this.path || (a = !0, this.createPathProxy());
  45691. var o = this.path;
  45692. (a || this.__dirty & $d) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), n = o.getBoundingRect();
  45693. }
  45694. if (this._rect = n, this.hasStroke() && this.path && this.path.len() > 0) {
  45695. var s = this._rectStroke || (this._rectStroke = n.clone());
  45696. if (this.__dirty || i) {
  45697. s.copy(n);
  45698. var l = r.strokeNoScale ? this.getLineScale() : 1, u = r.lineWidth;
  45699. if (!this.hasFill()) {
  45700. var c = this.strokeContainThreshold;
  45701. u = Math.max(u, c ?? 4);
  45702. }
  45703. l > 1e-10 && (s.width += u / l, s.height += u / l, s.x -= u / l / 2, s.y -= u / l / 2);
  45704. }
  45705. return s;
  45706. }
  45707. return n;
  45708. }, e.prototype.contain = function(n, r) {
  45709. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect(), o = this.style;
  45710. if (n = i[0], r = i[1], a.contain(n, r)) {
  45711. var s = this.path;
  45712. if (this.hasStroke()) {
  45713. var l = o.lineWidth, u = o.strokeNoScale ? this.getLineScale() : 1;
  45714. if (u > 1e-10 && (this.hasFill() || (l = Math.max(l, this.strokeContainThreshold)), BRe(s, l / u, n, r)))
  45715. return !0;
  45716. }
  45717. if (this.hasFill())
  45718. return NRe(s, n, r);
  45719. }
  45720. return !1;
  45721. }, e.prototype.dirtyShape = function() {
  45722. this.__dirty |= $d, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
  45723. }, e.prototype.dirty = function() {
  45724. this.dirtyStyle(), this.dirtyShape();
  45725. }, e.prototype.animateShape = function(n) {
  45726. return this.animate("shape", n);
  45727. }, e.prototype.updateDuringAnimation = function(n) {
  45728. n === "style" ? this.dirtyStyle() : n === "shape" ? this.dirtyShape() : this.markRedraw();
  45729. }, e.prototype.attrKV = function(n, r) {
  45730. n === "shape" ? this.setShape(r) : t.prototype.attrKV.call(this, n, r);
  45731. }, e.prototype.setShape = function(n, r) {
  45732. var i = this.shape;
  45733. return i || (i = this.shape = {}), typeof n == "string" ? i[n] = r : le(i, n), this.dirtyShape(), this;
  45734. }, e.prototype.shapeChanged = function() {
  45735. return !!(this.__dirty & $d);
  45736. }, e.prototype.createStyle = function(n) {
  45737. return I0(aO, n);
  45738. }, e.prototype._innerSaveToNormal = function(n) {
  45739. t.prototype._innerSaveToNormal.call(this, n);
  45740. var r = this._normalState;
  45741. n.shape && !r.shape && (r.shape = le({}, this.shape));
  45742. }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
  45743. t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
  45744. var l = !(r && a), u;
  45745. if (r && r.shape ? o ? a ? u = r.shape : (u = le({}, i.shape), le(u, r.shape)) : (u = le({}, a ? this.shape : i.shape), le(u, r.shape)) : l && (u = i.shape), u)
  45746. if (o) {
  45747. this.shape = le({}, this.shape);
  45748. for (var c = {}, f = st(u), d = 0; d < f.length; d++) {
  45749. var h = f[d];
  45750. typeof u[h] == "object" ? this.shape[h] = u[h] : c[h] = u[h];
  45751. }
  45752. this._transitionState(n, {
  45753. shape: c
  45754. }, s);
  45755. } else
  45756. this.shape = u, this.dirtyShape();
  45757. }, e.prototype._mergeStates = function(n) {
  45758. for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
  45759. var o = n[a];
  45760. o.shape && (i = i || {}, this._mergeStyle(i, o.shape));
  45761. }
  45762. return i && (r.shape = i), r;
  45763. }, e.prototype.getAnimationStyleProps = function() {
  45764. return zRe;
  45765. }, e.prototype.isZeroArea = function() {
  45766. return !1;
  45767. }, e.extend = function(n) {
  45768. var r = function(a) {
  45769. q(o, a);
  45770. function o(s) {
  45771. var l = a.call(this, s) || this;
  45772. return n.init && n.init.call(l, s), l;
  45773. }
  45774. return o.prototype.getDefaultStyle = function() {
  45775. return Le(n.style);
  45776. }, o.prototype.getDefaultShape = function() {
  45777. return Le(n.shape);
  45778. }, o;
  45779. }(e);
  45780. for (var i in n)
  45781. typeof n[i] == "function" && (r.prototype[i] = n[i]);
  45782. return r;
  45783. }, e.initDefaultProps = function() {
  45784. var n = e.prototype;
  45785. n.type = "path", n.strokeContainThreshold = 5, n.segmentIgnoreThreshold = 0, n.subPixelOptimize = !1, n.autoBatch = !1, n.__dirty = ki | Vv | $d;
  45786. }(), e;
  45787. }(Ma), VRe = Re({
  45788. strokeFirst: !0,
  45789. font: iu,
  45790. x: 0,
  45791. y: 0,
  45792. textAlign: "left",
  45793. textBaseline: "top",
  45794. miterLimit: 2
  45795. }, aO), Bh = function(t) {
  45796. q(e, t);
  45797. function e() {
  45798. return t !== null && t.apply(this, arguments) || this;
  45799. }
  45800. return e.prototype.hasStroke = function() {
  45801. var n = this.style, r = n.stroke;
  45802. return r != null && r !== "none" && n.lineWidth > 0;
  45803. }, e.prototype.hasFill = function() {
  45804. var n = this.style, r = n.fill;
  45805. return r != null && r !== "none";
  45806. }, e.prototype.createStyle = function(n) {
  45807. return I0(VRe, n);
  45808. }, e.prototype.setBoundingRect = function(n) {
  45809. this._rect = n;
  45810. }, e.prototype.getBoundingRect = function() {
  45811. var n = this.style;
  45812. if (!this._rect) {
  45813. var r = n.text;
  45814. r != null ? r += "" : r = "";
  45815. var i = k0(r, n.font, n.textAlign, n.textBaseline);
  45816. if (i.x += n.x || 0, i.y += n.y || 0, this.hasStroke()) {
  45817. var a = n.lineWidth;
  45818. i.x -= a / 2, i.y -= a / 2, i.width += a, i.height += a;
  45819. }
  45820. this._rect = i;
  45821. }
  45822. return this._rect;
  45823. }, e.initDefaultProps = function() {
  45824. var n = e.prototype;
  45825. n.dirtyRectTolerance = 10;
  45826. }(), e;
  45827. }(Ma);
  45828. Bh.prototype.type = "tspan";
  45829. var FRe = Re({
  45830. x: 0,
  45831. y: 0
  45832. }, Kc), WRe = {
  45833. style: Re({
  45834. x: !0,
  45835. y: !0,
  45836. width: !0,
  45837. height: !0,
  45838. sx: !0,
  45839. sy: !0,
  45840. sWidth: !0,
  45841. sHeight: !0
  45842. }, Gx.style)
  45843. };
  45844. function QRe(t) {
  45845. return !!(t && typeof t != "string" && t.width && t.height);
  45846. }
  45847. var CK = function(t) {
  45848. q(e, t);
  45849. function e() {
  45850. return t !== null && t.apply(this, arguments) || this;
  45851. }
  45852. return e.prototype.createStyle = function(n) {
  45853. return I0(FRe, n);
  45854. }, e.prototype._getSize = function(n) {
  45855. var r = this.style, i = r[n];
  45856. if (i != null)
  45857. return i;
  45858. var a = QRe(r.image) ? r.image : this.__image;
  45859. if (!a)
  45860. return 0;
  45861. var o = n === "width" ? "height" : "width", s = r[o];
  45862. return s == null ? a[n] : a[n] / a[o] * s;
  45863. }, e.prototype.getWidth = function() {
  45864. return this._getSize("width");
  45865. }, e.prototype.getHeight = function() {
  45866. return this._getSize("height");
  45867. }, e.prototype.getAnimationStyleProps = function() {
  45868. return WRe;
  45869. }, e.prototype.getBoundingRect = function() {
  45870. var n = this.style;
  45871. return this._rect || (this._rect = new Je(n.x || 0, n.y || 0, this.getWidth(), this.getHeight())), this._rect;
  45872. }, e;
  45873. }(Ma);
  45874. CK.prototype.type = "image";
  45875. const lr = CK;
  45876. function HRe(t, e) {
  45877. var n = e.x, r = e.y, i = e.width, a = e.height, o = e.r, s, l, u, c;
  45878. i < 0 && (n = n + i, i = -i), a < 0 && (r = r + a, a = -a), typeof o == "number" ? s = l = u = c = o : o instanceof Array ? o.length === 1 ? s = l = u = c = o[0] : o.length === 2 ? (s = u = o[0], l = c = o[1]) : o.length === 3 ? (s = o[0], l = c = o[1], u = o[2]) : (s = o[0], l = o[1], u = o[2], c = o[3]) : s = l = u = c = 0;
  45879. var f;
  45880. s + l > i && (f = s + l, s *= i / f, l *= i / f), u + c > i && (f = u + c, u *= i / f, c *= i / f), l + u > a && (f = l + u, l *= a / f, u *= a / f), s + c > a && (f = s + c, s *= a / f, c *= a / f), t.moveTo(n + s, r), t.lineTo(n + i - l, r), l !== 0 && t.arc(n + i - l, r + l, l, -Math.PI / 2, 0), t.lineTo(n + i, r + a - u), u !== 0 && t.arc(n + i - u, r + a - u, u, 0, Math.PI / 2), t.lineTo(n + c, r + a), c !== 0 && t.arc(n + c, r + a - c, c, Math.PI / 2, Math.PI), t.lineTo(n, r + s), s !== 0 && t.arc(n + s, r + s, s, Math.PI, Math.PI * 1.5);
  45881. }
  45882. var Vd = Math.round;
  45883. function TK(t, e, n) {
  45884. if (e) {
  45885. var r = e.x1, i = e.x2, a = e.y1, o = e.y2;
  45886. t.x1 = r, t.x2 = i, t.y1 = a, t.y2 = o;
  45887. var s = n && n.lineWidth;
  45888. return s && (Vd(r * 2) === Vd(i * 2) && (t.x1 = t.x2 = kc(r, s, !0)), Vd(a * 2) === Vd(o * 2) && (t.y1 = t.y2 = kc(a, s, !0))), t;
  45889. }
  45890. }
  45891. function PK(t, e, n) {
  45892. if (e) {
  45893. var r = e.x, i = e.y, a = e.width, o = e.height;
  45894. t.x = r, t.y = i, t.width = a, t.height = o;
  45895. var s = n && n.lineWidth;
  45896. return s && (t.x = kc(r, s, !0), t.y = kc(i, s, !0), t.width = Math.max(kc(r + a, s, !1) - t.x, a === 0 ? 0 : 1), t.height = Math.max(kc(i + o, s, !1) - t.y, o === 0 ? 0 : 1)), t;
  45897. }
  45898. }
  45899. function kc(t, e, n) {
  45900. if (!e)
  45901. return t;
  45902. var r = Vd(t * 2);
  45903. return (r + Vd(e)) % 2 === 0 ? r / 2 : (r + (n ? 1 : -1)) / 2;
  45904. }
  45905. var GRe = /* @__PURE__ */ function() {
  45906. function t() {
  45907. this.x = 0, this.y = 0, this.width = 0, this.height = 0;
  45908. }
  45909. return t;
  45910. }(), jRe = {}, $K = function(t) {
  45911. q(e, t);
  45912. function e(n) {
  45913. return t.call(this, n) || this;
  45914. }
  45915. return e.prototype.getDefaultShape = function() {
  45916. return new GRe();
  45917. }, e.prototype.buildPath = function(n, r) {
  45918. var i, a, o, s;
  45919. if (this.subPixelOptimize) {
  45920. var l = PK(jRe, r, this.style);
  45921. i = l.x, a = l.y, o = l.width, s = l.height, l.r = r.r, r = l;
  45922. } else
  45923. i = r.x, a = r.y, o = r.width, s = r.height;
  45924. r.r ? HRe(n, r) : n.rect(i, a, o, s);
  45925. }, e.prototype.isZeroArea = function() {
  45926. return !this.shape.width || !this.shape.height;
  45927. }, e;
  45928. }(ot);
  45929. $K.prototype.type = "rect";
  45930. const mt = $K;
  45931. var mB = {
  45932. fill: "#000"
  45933. }, yB = 2, ZRe = {
  45934. style: Re({
  45935. fill: !0,
  45936. stroke: !0,
  45937. fillOpacity: !0,
  45938. strokeOpacity: !0,
  45939. lineWidth: !0,
  45940. fontSize: !0,
  45941. lineHeight: !0,
  45942. width: !0,
  45943. height: !0,
  45944. textShadowColor: !0,
  45945. textShadowBlur: !0,
  45946. textShadowOffsetX: !0,
  45947. textShadowOffsetY: !0,
  45948. backgroundColor: !0,
  45949. padding: !0,
  45950. borderColor: !0,
  45951. borderWidth: !0,
  45952. borderRadius: !0
  45953. }, Gx.style)
  45954. }, AK = function(t) {
  45955. q(e, t);
  45956. function e(n) {
  45957. var r = t.call(this) || this;
  45958. return r.type = "text", r._children = [], r._defaultStyle = mB, r.attr(n), r;
  45959. }
  45960. return e.prototype.childrenRef = function() {
  45961. return this._children;
  45962. }, e.prototype.update = function() {
  45963. t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
  45964. for (var n = 0; n < this._children.length; n++) {
  45965. var r = this._children[n];
  45966. r.zlevel = this.zlevel, r.z = this.z, r.z2 = this.z2, r.culling = this.culling, r.cursor = this.cursor, r.invisible = this.invisible;
  45967. }
  45968. }, e.prototype.updateTransform = function() {
  45969. var n = this.innerTransformable;
  45970. n ? (n.updateTransform(), n.transform && (this.transform = n.transform)) : t.prototype.updateTransform.call(this);
  45971. }, e.prototype.getLocalTransform = function(n) {
  45972. var r = this.innerTransformable;
  45973. return r ? r.getLocalTransform(n) : t.prototype.getLocalTransform.call(this, n);
  45974. }, e.prototype.getComputedTransform = function() {
  45975. return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this);
  45976. }, e.prototype._updateSubTexts = function() {
  45977. this._childCursor = 0, YRe(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
  45978. }, e.prototype.addSelfToZr = function(n) {
  45979. t.prototype.addSelfToZr.call(this, n);
  45980. for (var r = 0; r < this._children.length; r++)
  45981. this._children[r].__zr = n;
  45982. }, e.prototype.removeSelfFromZr = function(n) {
  45983. t.prototype.removeSelfFromZr.call(this, n);
  45984. for (var r = 0; r < this._children.length; r++)
  45985. this._children[r].__zr = null;
  45986. }, e.prototype.getBoundingRect = function() {
  45987. if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
  45988. for (var n = new Je(0, 0, 0, 0), r = this._children, i = [], a = null, o = 0; o < r.length; o++) {
  45989. var s = r[o], l = s.getBoundingRect(), u = s.getLocalTransform(i);
  45990. u ? (n.copy(l), n.applyTransform(u), a = a || n.clone(), a.union(n)) : (a = a || l.clone(), a.union(l));
  45991. }
  45992. this._rect = a || n;
  45993. }
  45994. return this._rect;
  45995. }, e.prototype.setDefaultTextStyle = function(n) {
  45996. this._defaultStyle = n || mB;
  45997. }, e.prototype.setTextContent = function(n) {
  45998. if (process.env.NODE_ENV !== "production")
  45999. throw new Error("Can't attach text on another text");
  46000. }, e.prototype._mergeStyle = function(n, r) {
  46001. if (!r)
  46002. return n;
  46003. var i = r.rich, a = n.rich || i && {};
  46004. return le(n, r), i && a ? (this._mergeRich(a, i), n.rich = a) : a && (n.rich = a), n;
  46005. }, e.prototype._mergeRich = function(n, r) {
  46006. for (var i = st(r), a = 0; a < i.length; a++) {
  46007. var o = i[a];
  46008. n[o] = n[o] || {}, le(n[o], r[o]);
  46009. }
  46010. }, e.prototype.getAnimationStyleProps = function() {
  46011. return ZRe;
  46012. }, e.prototype._getOrCreateChild = function(n) {
  46013. var r = this._children[this._childCursor];
  46014. return (!r || !(r instanceof n)) && (r = new n()), this._children[this._childCursor++] = r, r.__zr = this.__zr, r.parent = this, r;
  46015. }, e.prototype._updatePlainTexts = function() {
  46016. var n = this.style, r = n.font || iu, i = n.padding, a = CB(n), o = gRe(a, n), s = yT(n), l = !!n.backgroundColor, u = o.outerHeight, c = o.outerWidth, f = o.contentWidth, d = o.lines, h = o.lineHeight, p = this._defaultStyle, v = n.x || 0, g = n.y || 0, m = n.align || p.align || "left", y = n.verticalAlign || p.verticalAlign || "top", b = v, _ = Ad(g, o.contentHeight, y);
  46017. if (s || i) {
  46018. var O = Wv(v, c, m), S = Ad(g, u, y);
  46019. s && this._renderBackground(n, n, O, S, c, u);
  46020. }
  46021. _ += h / 2, i && (b = wB(v, m, i), y === "top" ? _ += i[0] : y === "bottom" && (_ -= i[2]));
  46022. for (var x = 0, C = !1, T = xB("fill" in n ? n.fill : (C = !0, p.fill)), w = SB("stroke" in n ? n.stroke : !l && (!p.autoStroke || C) ? (x = yB, p.stroke) : null), P = n.textShadowBlur > 0, $ = n.width != null && (n.overflow === "truncate" || n.overflow === "break" || n.overflow === "breakAll"), A = o.calculatedLineHeight, D = 0; D < d.length; D++) {
  46023. var E = this._getOrCreateChild(Bh), R = E.createStyle();
  46024. E.useStyle(R), R.text = d[D], R.x = b, R.y = _, m && (R.textAlign = m), R.textBaseline = "middle", R.opacity = n.opacity, R.strokeFirst = !0, P && (R.shadowBlur = n.textShadowBlur || 0, R.shadowColor = n.textShadowColor || "transparent", R.shadowOffsetX = n.textShadowOffsetX || 0, R.shadowOffsetY = n.textShadowOffsetY || 0), R.stroke = w, R.fill = T, w && (R.lineWidth = n.lineWidth || x, R.lineDash = n.lineDash, R.lineDashOffset = n.lineDashOffset || 0), R.font = r, _B(R, n), _ += h, $ && E.setBoundingRect(new Je(Wv(R.x, n.width, R.textAlign), Ad(R.y, A, R.textBaseline), f, A));
  46025. }
  46026. }, e.prototype._updateRichTexts = function() {
  46027. var n = this.style, r = CB(n), i = bRe(r, n), a = i.width, o = i.outerWidth, s = i.outerHeight, l = n.padding, u = n.x || 0, c = n.y || 0, f = this._defaultStyle, d = n.align || f.align, h = n.verticalAlign || f.verticalAlign, p = Wv(u, o, d), v = Ad(c, s, h), g = p, m = v;
  46028. l && (g += l[3], m += l[0]);
  46029. var y = g + a;
  46030. yT(n) && this._renderBackground(n, n, p, v, o, s);
  46031. for (var b = !!n.backgroundColor, _ = 0; _ < i.lines.length; _++) {
  46032. for (var O = i.lines[_], S = O.tokens, x = S.length, C = O.lineHeight, T = O.width, w = 0, P = g, $ = y, A = x - 1, D = void 0; w < x && (D = S[w], !D.align || D.align === "left"); )
  46033. this._placeToken(D, n, C, m, P, "left", b), T -= D.width, P += D.width, w++;
  46034. for (; A >= 0 && (D = S[A], D.align === "right"); )
  46035. this._placeToken(D, n, C, m, $, "right", b), T -= D.width, $ -= D.width, A--;
  46036. for (P += (a - (P - g) - (y - $) - T) / 2; w <= A; )
  46037. D = S[w], this._placeToken(D, n, C, m, P + D.width / 2, "center", b), P += D.width, w++;
  46038. m += C;
  46039. }
  46040. }, e.prototype._placeToken = function(n, r, i, a, o, s, l) {
  46041. var u = r.rich[n.styleName] || {};
  46042. u.text = n.text;
  46043. var c = n.verticalAlign, f = a + i / 2;
  46044. c === "top" ? f = a + n.height / 2 : c === "bottom" && (f = a + i - n.height / 2);
  46045. var d = !n.isLineHolder && yT(u);
  46046. d && this._renderBackground(u, r, s === "right" ? o - n.width : s === "center" ? o - n.width / 2 : o, f - n.height / 2, n.width, n.height);
  46047. var h = !!u.backgroundColor, p = n.textPadding;
  46048. p && (o = wB(o, s, p), f -= n.height / 2 - p[0] - n.innerHeight / 2);
  46049. var v = this._getOrCreateChild(Bh), g = v.createStyle();
  46050. v.useStyle(g);
  46051. var m = this._defaultStyle, y = !1, b = 0, _ = xB("fill" in u ? u.fill : "fill" in r ? r.fill : (y = !0, m.fill)), O = SB("stroke" in u ? u.stroke : "stroke" in r ? r.stroke : !h && !l && (!m.autoStroke || y) ? (b = yB, m.stroke) : null), S = u.textShadowBlur > 0 || r.textShadowBlur > 0;
  46052. g.text = n.text, g.x = o, g.y = f, S && (g.shadowBlur = u.textShadowBlur || r.textShadowBlur || 0, g.shadowColor = u.textShadowColor || r.textShadowColor || "transparent", g.shadowOffsetX = u.textShadowOffsetX || r.textShadowOffsetX || 0, g.shadowOffsetY = u.textShadowOffsetY || r.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = n.font || iu, g.opacity = ji(u.opacity, r.opacity, 1), _B(g, u), O && (g.lineWidth = ji(u.lineWidth, r.lineWidth, b), g.lineDash = We(u.lineDash, r.lineDash), g.lineDashOffset = r.lineDashOffset || 0, g.stroke = O), _ && (g.fill = _);
  46053. var x = n.contentWidth, C = n.contentHeight;
  46054. v.setBoundingRect(new Je(Wv(g.x, x, g.textAlign), Ad(g.y, C, g.textBaseline), x, C));
  46055. }, e.prototype._renderBackground = function(n, r, i, a, o, s) {
  46056. var l = n.backgroundColor, u = n.borderWidth, c = n.borderColor, f = l && l.image, d = l && !f, h = n.borderRadius, p = this, v, g;
  46057. if (d || n.lineHeight || u && c) {
  46058. v = this._getOrCreateChild(mt), v.useStyle(v.createStyle()), v.style.fill = null;
  46059. var m = v.shape;
  46060. m.x = i, m.y = a, m.width = o, m.height = s, m.r = h, v.dirtyShape();
  46061. }
  46062. if (d) {
  46063. var y = v.style;
  46064. y.fill = l || null, y.fillOpacity = We(n.fillOpacity, 1);
  46065. } else if (f) {
  46066. g = this._getOrCreateChild(lr), g.onload = function() {
  46067. p.dirtyStyle();
  46068. };
  46069. var b = g.style;
  46070. b.image = l.image, b.x = i, b.y = a, b.width = o, b.height = s;
  46071. }
  46072. if (u && c) {
  46073. var y = v.style;
  46074. y.lineWidth = u, y.stroke = c, y.strokeOpacity = We(n.strokeOpacity, 1), y.lineDash = n.borderDash, y.lineDashOffset = n.borderDashOffset || 0, v.strokeContainThreshold = 0, v.hasFill() && v.hasStroke() && (y.strokeFirst = !0, y.lineWidth *= 2);
  46075. }
  46076. var _ = (v || g).style;
  46077. _.shadowBlur = n.shadowBlur || 0, _.shadowColor = n.shadowColor || "transparent", _.shadowOffsetX = n.shadowOffsetX || 0, _.shadowOffsetY = n.shadowOffsetY || 0, _.opacity = ji(n.opacity, r.opacity, 1);
  46078. }, e.makeFont = function(n) {
  46079. var r = "";
  46080. return MK(n) && (r = [
  46081. n.fontStyle,
  46082. n.fontWeight,
  46083. EK(n.fontSize),
  46084. n.fontFamily || "sans-serif"
  46085. ].join(" ")), r && ma(r) || n.textFont || n.font;
  46086. }, e;
  46087. }(Ma), URe = { left: !0, right: 1, center: 1 }, XRe = { top: 1, bottom: 1, middle: 1 }, bB = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
  46088. function EK(t) {
  46089. return typeof t == "string" && (t.indexOf("px") !== -1 || t.indexOf("rem") !== -1 || t.indexOf("em") !== -1) ? t : isNaN(+t) ? hR + "px" : t + "px";
  46090. }
  46091. function _B(t, e) {
  46092. for (var n = 0; n < bB.length; n++) {
  46093. var r = bB[n], i = e[r];
  46094. i != null && (t[r] = i);
  46095. }
  46096. }
  46097. function MK(t) {
  46098. return t.fontSize != null || t.fontFamily || t.fontWeight;
  46099. }
  46100. function YRe(t) {
  46101. return OB(t), k(t.rich, OB), t;
  46102. }
  46103. function OB(t) {
  46104. if (t) {
  46105. t.font = AK.makeFont(t);
  46106. var e = t.align;
  46107. e === "middle" && (e = "center"), t.align = e == null || URe[e] ? e : "left";
  46108. var n = t.verticalAlign;
  46109. n === "center" && (n = "middle"), t.verticalAlign = n == null || XRe[n] ? n : "top";
  46110. var r = t.padding;
  46111. r && (t.padding = kx(t.padding));
  46112. }
  46113. }
  46114. function SB(t, e) {
  46115. return t == null || e <= 0 || t === "transparent" || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
  46116. }
  46117. function xB(t) {
  46118. return t == null || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
  46119. }
  46120. function wB(t, e, n) {
  46121. return e === "right" ? t - n[1] : e === "center" ? t + n[3] / 2 - n[1] / 2 : t + n[3];
  46122. }
  46123. function CB(t) {
  46124. var e = t.text;
  46125. return e != null && (e += ""), e;
  46126. }
  46127. function yT(t) {
  46128. return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor);
  46129. }
  46130. const gt = AK;
  46131. var Fe = bt(), MA = function(t, e, n, r) {
  46132. if (r) {
  46133. var i = Fe(r);
  46134. i.dataIndex = n, i.dataType = e, i.seriesIndex = t, i.ssrType = "chart", r.type === "group" && r.traverse(function(a) {
  46135. var o = Fe(a);
  46136. o.seriesIndex = t, o.dataIndex = n, o.dataType = e, o.ssrType = "chart";
  46137. });
  46138. }
  46139. }, TB = 1, PB = {}, IK = bt(), RR = bt(), kR = 0, B0 = 1, Zx = 2, ni = ["emphasis", "blur", "select"], xm = ["normal", "emphasis", "blur", "select"], dp = 10, qRe = 9, Jc = "highlight", V_ = "downplay", Ag = "select", F_ = "unselect", Eg = "toggleSelect";
  46140. function id(t) {
  46141. return t != null && t !== "none";
  46142. }
  46143. function Ux(t, e, n) {
  46144. t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n;
  46145. }
  46146. function DK(t) {
  46147. Ux(t, "emphasis", Zx);
  46148. }
  46149. function RK(t) {
  46150. t.hoverState === Zx && Ux(t, "normal", kR);
  46151. }
  46152. function LR(t) {
  46153. Ux(t, "blur", B0);
  46154. }
  46155. function kK(t) {
  46156. t.hoverState === B0 && Ux(t, "normal", kR);
  46157. }
  46158. function KRe(t) {
  46159. t.selected = !0;
  46160. }
  46161. function JRe(t) {
  46162. t.selected = !1;
  46163. }
  46164. function $B(t, e, n) {
  46165. e(t, n);
  46166. }
  46167. function sl(t, e, n) {
  46168. $B(t, e, n), t.isGroup && t.traverse(function(r) {
  46169. $B(r, e, n);
  46170. });
  46171. }
  46172. function oO(t, e) {
  46173. switch (e) {
  46174. case "emphasis":
  46175. t.hoverState = Zx;
  46176. break;
  46177. case "normal":
  46178. t.hoverState = kR;
  46179. break;
  46180. case "blur":
  46181. t.hoverState = B0;
  46182. break;
  46183. case "select":
  46184. t.selected = !0;
  46185. }
  46186. }
  46187. function eke(t, e, n, r) {
  46188. for (var i = t.style, a = {}, o = 0; o < e.length; o++) {
  46189. var s = e[o], l = i[s];
  46190. a[s] = l ?? (r && r[s]);
  46191. }
  46192. for (var o = 0; o < t.animators.length; o++) {
  46193. var u = t.animators[o];
  46194. u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && u.targetName === "style" && u.saveTo(a, e);
  46195. }
  46196. return a;
  46197. }
  46198. function tke(t, e, n, r) {
  46199. var i = n && et(n, "select") >= 0, a = !1;
  46200. if (t instanceof ot) {
  46201. var o = IK(t), s = i && o.selectFill || o.normalFill, l = i && o.selectStroke || o.normalStroke;
  46202. if (id(s) || id(l)) {
  46203. r = r || {};
  46204. var u = r.style || {};
  46205. u.fill === "inherit" ? (a = !0, r = le({}, r), u = le({}, u), u.fill = s) : !id(u.fill) && id(s) ? (a = !0, r = le({}, r), u = le({}, u), u.fill = eO(s)) : !id(u.stroke) && id(l) && (a || (r = le({}, r), u = le({}, u)), u.stroke = eO(l)), r.style = u;
  46206. }
  46207. }
  46208. if (r && r.z2 == null) {
  46209. a || (r = le({}, r));
  46210. var c = t.z2EmphasisLift;
  46211. r.z2 = t.z2 + (c ?? dp);
  46212. }
  46213. return r;
  46214. }
  46215. function nke(t, e, n) {
  46216. if (n && n.z2 == null) {
  46217. n = le({}, n);
  46218. var r = t.z2SelectLift;
  46219. n.z2 = t.z2 + (r ?? qRe);
  46220. }
  46221. return n;
  46222. }
  46223. function rke(t, e, n) {
  46224. var r = et(t.currentStates, e) >= 0, i = t.style.opacity, a = r ? null : eke(t, ["opacity"], e, {
  46225. opacity: 1
  46226. });
  46227. n = n || {};
  46228. var o = n.style || {};
  46229. return o.opacity == null && (n = le({}, n), o = le({
  46230. // Already being applied 'emphasis'. DON'T mul opacity multiple times.
  46231. opacity: r ? i : a.opacity * 0.1
  46232. }, o), n.style = o), n;
  46233. }
  46234. function bT(t, e) {
  46235. var n = this.states[t];
  46236. if (this.style) {
  46237. if (t === "emphasis")
  46238. return tke(this, t, e, n);
  46239. if (t === "blur")
  46240. return rke(this, t, n);
  46241. if (t === "select")
  46242. return nke(this, t, n);
  46243. }
  46244. return n;
  46245. }
  46246. function bf(t) {
  46247. t.stateProxy = bT;
  46248. var e = t.getTextContent(), n = t.getTextGuideLine();
  46249. e && (e.stateProxy = bT), n && (n.stateProxy = bT);
  46250. }
  46251. function AB(t, e) {
  46252. !zK(t, e) && !t.__highByOuter && sl(t, DK);
  46253. }
  46254. function EB(t, e) {
  46255. !zK(t, e) && !t.__highByOuter && sl(t, RK);
  46256. }
  46257. function js(t, e) {
  46258. t.__highByOuter |= 1 << (e || 0), sl(t, DK);
  46259. }
  46260. function Zs(t, e) {
  46261. !(t.__highByOuter &= ~(1 << (e || 0))) && sl(t, RK);
  46262. }
  46263. function LK(t) {
  46264. sl(t, LR);
  46265. }
  46266. function NR(t) {
  46267. sl(t, kK);
  46268. }
  46269. function NK(t) {
  46270. sl(t, KRe);
  46271. }
  46272. function BK(t) {
  46273. sl(t, JRe);
  46274. }
  46275. function zK(t, e) {
  46276. return t.__highDownSilentOnTouch && e.zrByTouch;
  46277. }
  46278. function VK(t) {
  46279. var e = t.getModel(), n = [], r = [];
  46280. e.eachComponent(function(i, a) {
  46281. var o = RR(a), s = i === "series", l = s ? t.getViewOfSeriesModel(a) : t.getViewOfComponentModel(a);
  46282. !s && r.push(l), o.isBlured && (l.group.traverse(function(u) {
  46283. kK(u);
  46284. }), s && n.push(a)), o.isBlured = !1;
  46285. }), k(r, function(i) {
  46286. i && i.toggleBlurSeries && i.toggleBlurSeries(n, !1, e);
  46287. });
  46288. }
  46289. function IA(t, e, n, r) {
  46290. var i = r.getModel();
  46291. n = n || "coordinateSystem";
  46292. function a(u, c) {
  46293. for (var f = 0; f < c.length; f++) {
  46294. var d = u.getItemGraphicEl(c[f]);
  46295. d && NR(d);
  46296. }
  46297. }
  46298. if (t != null && !(!e || e === "none")) {
  46299. var o = i.getSeriesByIndex(t), s = o.coordinateSystem;
  46300. s && s.master && (s = s.master);
  46301. var l = [];
  46302. i.eachSeries(function(u) {
  46303. var c = o === u, f = u.coordinateSystem;
  46304. f && f.master && (f = f.master);
  46305. var d = f && s ? f === s : c;
  46306. if (!// Not blur other series if blurScope series
  46307. (n === "series" && !c || n === "coordinateSystem" && !d || e === "series" && c)) {
  46308. var h = r.getViewOfSeriesModel(u);
  46309. if (h.group.traverse(function(g) {
  46310. g.__highByOuter && c && e === "self" || LR(g);
  46311. }), wr(e))
  46312. a(u.getData(), e);
  46313. else if (Ie(e))
  46314. for (var p = st(e), v = 0; v < p.length; v++)
  46315. a(u.getData(p[v]), e[p[v]]);
  46316. l.push(u), RR(u).isBlured = !0;
  46317. }
  46318. }), i.eachComponent(function(u, c) {
  46319. if (u !== "series") {
  46320. var f = r.getViewOfComponentModel(c);
  46321. f && f.toggleBlurSeries && f.toggleBlurSeries(l, !0, i);
  46322. }
  46323. });
  46324. }
  46325. }
  46326. function DA(t, e, n) {
  46327. if (!(t == null || e == null)) {
  46328. var r = n.getModel().getComponent(t, e);
  46329. if (r) {
  46330. RR(r).isBlured = !0;
  46331. var i = n.getViewOfComponentModel(r);
  46332. !i || !i.focusBlurEnabled || i.group.traverse(function(a) {
  46333. LR(a);
  46334. });
  46335. }
  46336. }
  46337. }
  46338. function ike(t, e, n) {
  46339. var r = t.seriesIndex, i = t.getData(e.dataType);
  46340. if (!i) {
  46341. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + e.dataType);
  46342. return;
  46343. }
  46344. var a = mf(i, e);
  46345. a = (ue(a) ? a[0] : a) || 0;
  46346. var o = i.getItemGraphicEl(a);
  46347. if (!o)
  46348. for (var s = i.count(), l = 0; !o && l < s; )
  46349. o = i.getItemGraphicEl(l++);
  46350. if (o) {
  46351. var u = Fe(o);
  46352. IA(r, u.focus, u.blurScope, n);
  46353. } else {
  46354. var c = t.get(["emphasis", "focus"]), f = t.get(["emphasis", "blurScope"]);
  46355. c != null && IA(r, c, f, n);
  46356. }
  46357. }
  46358. function BR(t, e, n, r) {
  46359. var i = {
  46360. focusSelf: !1,
  46361. dispatchers: null
  46362. };
  46363. if (t == null || t === "series" || e == null || n == null)
  46364. return i;
  46365. var a = r.getModel().getComponent(t, e);
  46366. if (!a)
  46367. return i;
  46368. var o = r.getViewOfComponentModel(a);
  46369. if (!o || !o.findHighDownDispatchers)
  46370. return i;
  46371. for (var s = o.findHighDownDispatchers(n), l, u = 0; u < s.length; u++)
  46372. if (process.env.NODE_ENV !== "production" && !lu(s[u]) && Cr("param should be highDownDispatcher"), Fe(s[u]).focus === "self") {
  46373. l = !0;
  46374. break;
  46375. }
  46376. return {
  46377. focusSelf: l,
  46378. dispatchers: s
  46379. };
  46380. }
  46381. function ake(t, e, n) {
  46382. process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher");
  46383. var r = Fe(t), i = BR(r.componentMainType, r.componentIndex, r.componentHighDownName, n), a = i.dispatchers, o = i.focusSelf;
  46384. a ? (o && DA(r.componentMainType, r.componentIndex, n), k(a, function(s) {
  46385. return AB(s, e);
  46386. })) : (IA(r.seriesIndex, r.focus, r.blurScope, n), r.focus === "self" && DA(r.componentMainType, r.componentIndex, n), AB(t, e));
  46387. }
  46388. function oke(t, e, n) {
  46389. process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher"), VK(n);
  46390. var r = Fe(t), i = BR(r.componentMainType, r.componentIndex, r.componentHighDownName, n).dispatchers;
  46391. i ? k(i, function(a) {
  46392. return EB(a, e);
  46393. }) : EB(t, e);
  46394. }
  46395. function ske(t, e, n) {
  46396. if (kA(e)) {
  46397. var r = e.dataType, i = t.getData(r), a = mf(i, e);
  46398. ue(a) || (a = [a]), t[e.type === Eg ? "toggleSelect" : e.type === Ag ? "select" : "unselect"](a, r);
  46399. }
  46400. }
  46401. function MB(t) {
  46402. var e = t.getAllData();
  46403. k(e, function(n) {
  46404. var r = n.data, i = n.type;
  46405. r.eachItemGraphicEl(function(a, o) {
  46406. t.isSelected(o, i) ? NK(a) : BK(a);
  46407. });
  46408. });
  46409. }
  46410. function lke(t) {
  46411. var e = [];
  46412. return t.eachSeries(function(n) {
  46413. var r = n.getAllData();
  46414. k(r, function(i) {
  46415. i.data;
  46416. var a = i.type, o = n.getSelectedDataIndices();
  46417. if (o.length > 0) {
  46418. var s = {
  46419. dataIndex: o,
  46420. seriesIndex: n.seriesIndex
  46421. };
  46422. a != null && (s.dataType = a), e.push(s);
  46423. }
  46424. });
  46425. }), e;
  46426. }
  46427. function Yl(t, e, n) {
  46428. Lc(t, !0), sl(t, bf), RA(t, e, n);
  46429. }
  46430. function uke(t) {
  46431. Lc(t, !1);
  46432. }
  46433. function bn(t, e, n, r) {
  46434. r ? uke(t) : Yl(t, e, n);
  46435. }
  46436. function RA(t, e, n) {
  46437. var r = Fe(t);
  46438. e != null ? (r.focus = e, r.blurScope = n) : r.focus && (r.focus = null);
  46439. }
  46440. var IB = ["emphasis", "blur", "select"], cke = {
  46441. itemStyle: "getItemStyle",
  46442. lineStyle: "getLineStyle",
  46443. areaStyle: "getAreaStyle"
  46444. };
  46445. function Tr(t, e, n, r) {
  46446. n = n || "itemStyle";
  46447. for (var i = 0; i < IB.length; i++) {
  46448. var a = IB[i], o = e.getModel([a, n]), s = t.ensureState(a);
  46449. s.style = r ? r(o) : o[cke[n]]();
  46450. }
  46451. }
  46452. function Lc(t, e) {
  46453. var n = e === !1, r = t;
  46454. t.highDownSilentOnTouch && (r.__highDownSilentOnTouch = t.highDownSilentOnTouch), (!n || r.__highDownDispatcher) && (r.__highByOuter = r.__highByOuter || 0, r.__highDownDispatcher = !n);
  46455. }
  46456. function lu(t) {
  46457. return !!(t && t.__highDownDispatcher);
  46458. }
  46459. function fke(t, e, n) {
  46460. var r = Fe(t);
  46461. r.componentMainType = e.mainType, r.componentIndex = e.componentIndex, r.componentHighDownName = n;
  46462. }
  46463. function dke(t) {
  46464. var e = PB[t];
  46465. return e == null && TB <= 32 && (e = PB[t] = TB++), e;
  46466. }
  46467. function kA(t) {
  46468. var e = t.type;
  46469. return e === Ag || e === F_ || e === Eg;
  46470. }
  46471. function DB(t) {
  46472. var e = t.type;
  46473. return e === Jc || e === V_;
  46474. }
  46475. function hke(t) {
  46476. var e = IK(t);
  46477. e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
  46478. var n = t.states.select || {};
  46479. e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null;
  46480. }
  46481. var ad = as.CMD, pke = [[], [], []], RB = Math.sqrt, vke = Math.atan2;
  46482. function FK(t, e) {
  46483. if (e) {
  46484. var n = t.data, r = t.len(), i, a, o, s, l, u, c = ad.M, f = ad.C, d = ad.L, h = ad.R, p = ad.A, v = ad.Q;
  46485. for (o = 0, s = 0; o < r; ) {
  46486. switch (i = n[o++], s = o, a = 0, i) {
  46487. case c:
  46488. a = 1;
  46489. break;
  46490. case d:
  46491. a = 1;
  46492. break;
  46493. case f:
  46494. a = 3;
  46495. break;
  46496. case v:
  46497. a = 2;
  46498. break;
  46499. case p:
  46500. var g = e[4], m = e[5], y = RB(e[0] * e[0] + e[1] * e[1]), b = RB(e[2] * e[2] + e[3] * e[3]), _ = vke(-e[1] / b, e[0] / y);
  46501. n[o] *= y, n[o++] += g, n[o] *= b, n[o++] += m, n[o++] *= y, n[o++] *= b, n[o++] += _, n[o++] += _, o += 2, s = o;
  46502. break;
  46503. case h:
  46504. u[0] = n[o++], u[1] = n[o++], ar(u, u, e), n[s++] = u[0], n[s++] = u[1], u[0] += n[o++], u[1] += n[o++], ar(u, u, e), n[s++] = u[0], n[s++] = u[1];
  46505. }
  46506. for (l = 0; l < a; l++) {
  46507. var O = pke[l];
  46508. O[0] = n[o++], O[1] = n[o++], ar(O, O, e), n[s++] = O[0], n[s++] = O[1];
  46509. }
  46510. }
  46511. t.increaseVersion();
  46512. }
  46513. }
  46514. var _T = Math.sqrt, Ky = Math.sin, Jy = Math.cos, iv = Math.PI;
  46515. function kB(t) {
  46516. return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
  46517. }
  46518. function LA(t, e) {
  46519. return (t[0] * e[0] + t[1] * e[1]) / (kB(t) * kB(e));
  46520. }
  46521. function LB(t, e) {
  46522. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(LA(t, e));
  46523. }
  46524. function NB(t, e, n, r, i, a, o, s, l, u, c) {
  46525. var f = l * (iv / 180), d = Jy(f) * (t - n) / 2 + Ky(f) * (e - r) / 2, h = -1 * Ky(f) * (t - n) / 2 + Jy(f) * (e - r) / 2, p = d * d / (o * o) + h * h / (s * s);
  46526. p > 1 && (o *= _T(p), s *= _T(p));
  46527. var v = (i === a ? -1 : 1) * _T((o * o * (s * s) - o * o * (h * h) - s * s * (d * d)) / (o * o * (h * h) + s * s * (d * d))) || 0, g = v * o * h / s, m = v * -s * d / o, y = (t + n) / 2 + Jy(f) * g - Ky(f) * m, b = (e + r) / 2 + Ky(f) * g + Jy(f) * m, _ = LB([1, 0], [(d - g) / o, (h - m) / s]), O = [(d - g) / o, (h - m) / s], S = [(-1 * d - g) / o, (-1 * h - m) / s], x = LB(O, S);
  46528. if (LA(O, S) <= -1 && (x = iv), LA(O, S) >= 1 && (x = 0), x < 0) {
  46529. var C = Math.round(x / iv * 1e6) / 1e6;
  46530. x = iv * 2 + C % 2 * iv;
  46531. }
  46532. c.addData(u, y, b, o, s, _, x, f, a);
  46533. }
  46534. var gke = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, mke = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  46535. function yke(t) {
  46536. var e = new as();
  46537. if (!t)
  46538. return e;
  46539. var n = 0, r = 0, i = n, a = r, o, s = as.CMD, l = t.match(gke);
  46540. if (!l)
  46541. return e;
  46542. for (var u = 0; u < l.length; u++) {
  46543. for (var c = l[u], f = c.charAt(0), d = void 0, h = c.match(mke) || [], p = h.length, v = 0; v < p; v++)
  46544. h[v] = parseFloat(h[v]);
  46545. for (var g = 0; g < p; ) {
  46546. var m = void 0, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = n, T = r, w = void 0, P = void 0;
  46547. switch (f) {
  46548. case "l":
  46549. n += h[g++], r += h[g++], d = s.L, e.addData(d, n, r);
  46550. break;
  46551. case "L":
  46552. n = h[g++], r = h[g++], d = s.L, e.addData(d, n, r);
  46553. break;
  46554. case "m":
  46555. n += h[g++], r += h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "l";
  46556. break;
  46557. case "M":
  46558. n = h[g++], r = h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "L";
  46559. break;
  46560. case "h":
  46561. n += h[g++], d = s.L, e.addData(d, n, r);
  46562. break;
  46563. case "H":
  46564. n = h[g++], d = s.L, e.addData(d, n, r);
  46565. break;
  46566. case "v":
  46567. r += h[g++], d = s.L, e.addData(d, n, r);
  46568. break;
  46569. case "V":
  46570. r = h[g++], d = s.L, e.addData(d, n, r);
  46571. break;
  46572. case "C":
  46573. d = s.C, e.addData(d, h[g++], h[g++], h[g++], h[g++], h[g++], h[g++]), n = h[g - 2], r = h[g - 1];
  46574. break;
  46575. case "c":
  46576. d = s.C, e.addData(d, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r), n += h[g - 2], r += h[g - 1];
  46577. break;
  46578. case "S":
  46579. m = n, y = r, w = e.len(), P = e.data, o === s.C && (m += n - P[w - 4], y += r - P[w - 3]), d = s.C, C = h[g++], T = h[g++], n = h[g++], r = h[g++], e.addData(d, m, y, C, T, n, r);
  46580. break;
  46581. case "s":
  46582. m = n, y = r, w = e.len(), P = e.data, o === s.C && (m += n - P[w - 4], y += r - P[w - 3]), d = s.C, C = n + h[g++], T = r + h[g++], n += h[g++], r += h[g++], e.addData(d, m, y, C, T, n, r);
  46583. break;
  46584. case "Q":
  46585. C = h[g++], T = h[g++], n = h[g++], r = h[g++], d = s.Q, e.addData(d, C, T, n, r);
  46586. break;
  46587. case "q":
  46588. C = h[g++] + n, T = h[g++] + r, n += h[g++], r += h[g++], d = s.Q, e.addData(d, C, T, n, r);
  46589. break;
  46590. case "T":
  46591. m = n, y = r, w = e.len(), P = e.data, o === s.Q && (m += n - P[w - 4], y += r - P[w - 3]), n = h[g++], r = h[g++], d = s.Q, e.addData(d, m, y, n, r);
  46592. break;
  46593. case "t":
  46594. m = n, y = r, w = e.len(), P = e.data, o === s.Q && (m += n - P[w - 4], y += r - P[w - 3]), n += h[g++], r += h[g++], d = s.Q, e.addData(d, m, y, n, r);
  46595. break;
  46596. case "A":
  46597. b = h[g++], _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = n, T = r, n = h[g++], r = h[g++], d = s.A, NB(C, T, n, r, S, x, b, _, O, d, e);
  46598. break;
  46599. case "a":
  46600. b = h[g++], _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = n, T = r, n += h[g++], r += h[g++], d = s.A, NB(C, T, n, r, S, x, b, _, O, d, e);
  46601. break;
  46602. }
  46603. }
  46604. (f === "z" || f === "Z") && (d = s.Z, e.addData(d), n = i, r = a), o = d;
  46605. }
  46606. return e.toStatic(), e;
  46607. }
  46608. var WK = function(t) {
  46609. q(e, t);
  46610. function e() {
  46611. return t !== null && t.apply(this, arguments) || this;
  46612. }
  46613. return e.prototype.applyTransform = function(n) {
  46614. }, e;
  46615. }(ot);
  46616. function QK(t) {
  46617. return t.setData != null;
  46618. }
  46619. function HK(t, e) {
  46620. var n = yke(t), r = le({}, e);
  46621. return r.buildPath = function(i) {
  46622. if (QK(i)) {
  46623. i.setData(n.data);
  46624. var a = i.getContext();
  46625. a && i.rebuildPath(a, 1);
  46626. } else {
  46627. var a = i;
  46628. n.rebuildPath(a, 1);
  46629. }
  46630. }, r.applyTransform = function(i) {
  46631. FK(n, i), this.dirtyShape();
  46632. }, r;
  46633. }
  46634. function GK(t, e) {
  46635. return new WK(HK(t, e));
  46636. }
  46637. function bke(t, e) {
  46638. var n = HK(t, e), r = function(i) {
  46639. q(a, i);
  46640. function a(o) {
  46641. var s = i.call(this, o) || this;
  46642. return s.applyTransform = n.applyTransform, s.buildPath = n.buildPath, s;
  46643. }
  46644. return a;
  46645. }(WK);
  46646. return r;
  46647. }
  46648. function _ke(t, e) {
  46649. for (var n = [], r = t.length, i = 0; i < r; i++) {
  46650. var a = t[i];
  46651. n.push(a.getUpdatedPathProxy(!0));
  46652. }
  46653. var o = new ot(e);
  46654. return o.createPathProxy(), o.buildPath = function(s) {
  46655. if (QK(s)) {
  46656. s.appendPath(n);
  46657. var l = s.getContext();
  46658. l && s.rebuildPath(l, 1);
  46659. }
  46660. }, o;
  46661. }
  46662. function zR(t, e) {
  46663. e = e || {};
  46664. var n = new ot();
  46665. return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? FK(n.path, t.getComputedTransform()) : e.toLocal ? n.setLocalTransform(t.getComputedTransform()) : n.copyTransform(t), n.buildPath = t.buildPath, n.applyTransform = n.applyTransform, n.z = t.z, n.z2 = t.z2, n.zlevel = t.zlevel, n;
  46666. }
  46667. var Oke = /* @__PURE__ */ function() {
  46668. function t() {
  46669. this.cx = 0, this.cy = 0, this.r = 0;
  46670. }
  46671. return t;
  46672. }(), jK = function(t) {
  46673. q(e, t);
  46674. function e(n) {
  46675. return t.call(this, n) || this;
  46676. }
  46677. return e.prototype.getDefaultShape = function() {
  46678. return new Oke();
  46679. }, e.prototype.buildPath = function(n, r) {
  46680. n.moveTo(r.cx + r.r, r.cy), n.arc(r.cx, r.cy, r.r, 0, Math.PI * 2);
  46681. }, e;
  46682. }(ot);
  46683. jK.prototype.type = "circle";
  46684. const ll = jK;
  46685. var Ske = /* @__PURE__ */ function() {
  46686. function t() {
  46687. this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
  46688. }
  46689. return t;
  46690. }(), ZK = function(t) {
  46691. q(e, t);
  46692. function e(n) {
  46693. return t.call(this, n) || this;
  46694. }
  46695. return e.prototype.getDefaultShape = function() {
  46696. return new Ske();
  46697. }, e.prototype.buildPath = function(n, r) {
  46698. var i = 0.5522848, a = r.cx, o = r.cy, s = r.rx, l = r.ry, u = s * i, c = l * i;
  46699. n.moveTo(a - s, o), n.bezierCurveTo(a - s, o - c, a - u, o - l, a, o - l), n.bezierCurveTo(a + u, o - l, a + s, o - c, a + s, o), n.bezierCurveTo(a + s, o + c, a + u, o + l, a, o + l), n.bezierCurveTo(a - u, o + l, a - s, o + c, a - s, o), n.closePath();
  46700. }, e;
  46701. }(ot);
  46702. ZK.prototype.type = "ellipse";
  46703. const Xx = ZK;
  46704. var UK = Math.PI, OT = UK * 2, Ku = Math.sin, od = Math.cos, xke = Math.acos, Ar = Math.atan2, BB = Math.abs, Mg = Math.sqrt, Hv = Math.max, So = Math.min, Ha = 1e-4;
  46705. function wke(t, e, n, r, i, a, o, s) {
  46706. var l = n - t, u = r - e, c = o - i, f = s - a, d = f * l - c * u;
  46707. if (!(d * d < Ha))
  46708. return d = (c * (e - a) - f * (t - i)) / d, [t + d * l, e + d * u];
  46709. }
  46710. function eb(t, e, n, r, i, a, o) {
  46711. var s = t - n, l = e - r, u = (o ? a : -a) / Mg(s * s + l * l), c = u * l, f = -u * s, d = t + c, h = e + f, p = n + c, v = r + f, g = (d + p) / 2, m = (h + v) / 2, y = p - d, b = v - h, _ = y * y + b * b, O = i - a, S = d * v - p * h, x = (b < 0 ? -1 : 1) * Mg(Hv(0, O * O * _ - S * S)), C = (S * b - y * x) / _, T = (-S * y - b * x) / _, w = (S * b + y * x) / _, P = (-S * y + b * x) / _, $ = C - g, A = T - m, D = w - g, E = P - m;
  46712. return $ * $ + A * A > D * D + E * E && (C = w, T = P), {
  46713. cx: C,
  46714. cy: T,
  46715. x0: -c,
  46716. y0: -f,
  46717. x1: C * (i / O - 1),
  46718. y1: T * (i / O - 1)
  46719. };
  46720. }
  46721. function Cke(t) {
  46722. var e;
  46723. if (ue(t)) {
  46724. var n = t.length;
  46725. if (!n)
  46726. return t;
  46727. n === 1 ? e = [t[0], t[0], 0, 0] : n === 2 ? e = [t[0], t[0], t[1], t[1]] : n === 3 ? e = t.concat(t[2]) : e = t;
  46728. } else
  46729. e = [t, t, t, t];
  46730. return e;
  46731. }
  46732. function Tke(t, e) {
  46733. var n, r = Hv(e.r, 0), i = Hv(e.r0 || 0, 0), a = r > 0, o = i > 0;
  46734. if (!(!a && !o)) {
  46735. if (a || (r = i, i = 0), i > r) {
  46736. var s = r;
  46737. r = i, i = s;
  46738. }
  46739. var l = e.startAngle, u = e.endAngle;
  46740. if (!(isNaN(l) || isNaN(u))) {
  46741. var c = e.cx, f = e.cy, d = !!e.clockwise, h = BB(u - l), p = h > OT && h % OT;
  46742. if (p > Ha && (h = p), !(r > Ha))
  46743. t.moveTo(c, f);
  46744. else if (h > OT - Ha)
  46745. t.moveTo(c + r * od(l), f + r * Ku(l)), t.arc(c, f, r, l, u, !d), i > Ha && (t.moveTo(c + i * od(u), f + i * Ku(u)), t.arc(c, f, i, u, l, d));
  46746. else {
  46747. var v = void 0, g = void 0, m = void 0, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = void 0, T = void 0, w = void 0, P = void 0, $ = void 0, A = void 0, D = void 0, E = r * od(l), R = r * Ku(l), N = i * od(u), V = i * Ku(u), z = h > Ha;
  46748. if (z) {
  46749. var W = e.cornerRadius;
  46750. W && (n = Cke(W), v = n[0], g = n[1], m = n[2], y = n[3]);
  46751. var F = BB(r - i) / 2;
  46752. if (b = So(F, m), _ = So(F, y), O = So(F, v), S = So(F, g), T = x = Hv(b, _), w = C = Hv(O, S), (x > Ha || C > Ha) && (P = r * od(u), $ = r * Ku(u), A = i * od(l), D = i * Ku(l), h < UK)) {
  46753. var Q = wke(E, R, A, D, P, $, N, V);
  46754. if (Q) {
  46755. var Z = E - Q[0], ne = R - Q[1], ee = P - Q[0], oe = $ - Q[1], K = 1 / Ku(xke((Z * ee + ne * oe) / (Mg(Z * Z + ne * ne) * Mg(ee * ee + oe * oe))) / 2), ie = Mg(Q[0] * Q[0] + Q[1] * Q[1]);
  46756. T = So(x, (r - ie) / (K + 1)), w = So(C, (i - ie) / (K - 1));
  46757. }
  46758. }
  46759. }
  46760. if (!z)
  46761. t.moveTo(c + E, f + R);
  46762. else if (T > Ha) {
  46763. var X = So(m, T), H = So(y, T), G = eb(A, D, E, R, r, X, d), re = eb(P, $, N, V, r, H, d);
  46764. t.moveTo(c + G.cx + G.x0, f + G.cy + G.y0), T < x && X === H ? t.arc(c + G.cx, f + G.cy, T, Ar(G.y0, G.x0), Ar(re.y0, re.x0), !d) : (X > 0 && t.arc(c + G.cx, f + G.cy, X, Ar(G.y0, G.x0), Ar(G.y1, G.x1), !d), t.arc(c, f, r, Ar(G.cy + G.y1, G.cx + G.x1), Ar(re.cy + re.y1, re.cx + re.x1), !d), H > 0 && t.arc(c + re.cx, f + re.cy, H, Ar(re.y1, re.x1), Ar(re.y0, re.x0), !d));
  46765. } else
  46766. t.moveTo(c + E, f + R), t.arc(c, f, r, l, u, !d);
  46767. if (!(i > Ha) || !z)
  46768. t.lineTo(c + N, f + V);
  46769. else if (w > Ha) {
  46770. var X = So(v, w), H = So(g, w), G = eb(N, V, P, $, i, -H, d), re = eb(E, R, A, D, i, -X, d);
  46771. t.lineTo(c + G.cx + G.x0, f + G.cy + G.y0), w < C && X === H ? t.arc(c + G.cx, f + G.cy, w, Ar(G.y0, G.x0), Ar(re.y0, re.x0), !d) : (H > 0 && t.arc(c + G.cx, f + G.cy, H, Ar(G.y0, G.x0), Ar(G.y1, G.x1), !d), t.arc(c, f, i, Ar(G.cy + G.y1, G.cx + G.x1), Ar(re.cy + re.y1, re.cx + re.x1), d), X > 0 && t.arc(c + re.cx, f + re.cy, X, Ar(re.y1, re.x1), Ar(re.y0, re.x0), !d));
  46772. } else
  46773. t.lineTo(c + N, f + V), t.arc(c, f, i, u, l, d);
  46774. }
  46775. t.closePath();
  46776. }
  46777. }
  46778. }
  46779. var Pke = /* @__PURE__ */ function() {
  46780. function t() {
  46781. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0, this.cornerRadius = 0;
  46782. }
  46783. return t;
  46784. }(), XK = function(t) {
  46785. q(e, t);
  46786. function e(n) {
  46787. return t.call(this, n) || this;
  46788. }
  46789. return e.prototype.getDefaultShape = function() {
  46790. return new Pke();
  46791. }, e.prototype.buildPath = function(n, r) {
  46792. Tke(n, r);
  46793. }, e.prototype.isZeroArea = function() {
  46794. return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
  46795. }, e;
  46796. }(ot);
  46797. XK.prototype.type = "sector";
  46798. const ri = XK;
  46799. var $ke = /* @__PURE__ */ function() {
  46800. function t() {
  46801. this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
  46802. }
  46803. return t;
  46804. }(), YK = function(t) {
  46805. q(e, t);
  46806. function e(n) {
  46807. return t.call(this, n) || this;
  46808. }
  46809. return e.prototype.getDefaultShape = function() {
  46810. return new $ke();
  46811. }, e.prototype.buildPath = function(n, r) {
  46812. var i = r.cx, a = r.cy, o = Math.PI * 2;
  46813. n.moveTo(i + r.r, a), n.arc(i, a, r.r, 0, o, !1), n.moveTo(i + r.r0, a), n.arc(i, a, r.r0, 0, o, !0);
  46814. }, e;
  46815. }(ot);
  46816. YK.prototype.type = "ring";
  46817. const z0 = YK;
  46818. function Ake(t, e, n, r) {
  46819. var i = [], a = [], o = [], s = [], l, u, c, f;
  46820. if (r) {
  46821. c = [1 / 0, 1 / 0], f = [-1 / 0, -1 / 0];
  46822. for (var d = 0, h = t.length; d < h; d++)
  46823. Ps(c, c, t[d]), $s(f, f, t[d]);
  46824. Ps(c, c, r[0]), $s(f, f, r[1]);
  46825. }
  46826. for (var d = 0, h = t.length; d < h; d++) {
  46827. var p = t[d];
  46828. if (n)
  46829. l = t[d ? d - 1 : h - 1], u = t[(d + 1) % h];
  46830. else if (d === 0 || d === h - 1) {
  46831. i.push(Zo(t[d]));
  46832. continue;
  46833. } else
  46834. l = t[d - 1], u = t[d + 1];
  46835. kl(a, u, l), Sg(a, a, e);
  46836. var v = X1(p, l), g = X1(p, u), m = v + g;
  46837. m !== 0 && (v /= m, g /= m), Sg(o, a, -v), Sg(s, a, g);
  46838. var y = oA([], p, o), b = oA([], p, s);
  46839. r && ($s(y, y, c), Ps(y, y, f), $s(b, b, c), Ps(b, b, f)), i.push(y), i.push(b);
  46840. }
  46841. return n && i.push(i.shift()), i;
  46842. }
  46843. function qK(t, e, n) {
  46844. var r = e.smooth, i = e.points;
  46845. if (i && i.length >= 2) {
  46846. if (r) {
  46847. var a = Ake(i, r, n, e.smoothConstraint);
  46848. t.moveTo(i[0][0], i[0][1]);
  46849. for (var o = i.length, s = 0; s < (n ? o : o - 1); s++) {
  46850. var l = a[s * 2], u = a[s * 2 + 1], c = i[(s + 1) % o];
  46851. t.bezierCurveTo(l[0], l[1], u[0], u[1], c[0], c[1]);
  46852. }
  46853. } else {
  46854. t.moveTo(i[0][0], i[0][1]);
  46855. for (var s = 1, f = i.length; s < f; s++)
  46856. t.lineTo(i[s][0], i[s][1]);
  46857. }
  46858. n && t.closePath();
  46859. }
  46860. }
  46861. var Eke = /* @__PURE__ */ function() {
  46862. function t() {
  46863. this.points = null, this.smooth = 0, this.smoothConstraint = null;
  46864. }
  46865. return t;
  46866. }(), KK = function(t) {
  46867. q(e, t);
  46868. function e(n) {
  46869. return t.call(this, n) || this;
  46870. }
  46871. return e.prototype.getDefaultShape = function() {
  46872. return new Eke();
  46873. }, e.prototype.buildPath = function(n, r) {
  46874. qK(n, r, !0);
  46875. }, e;
  46876. }(ot);
  46877. KK.prototype.type = "polygon";
  46878. const ii = KK;
  46879. var Mke = /* @__PURE__ */ function() {
  46880. function t() {
  46881. this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
  46882. }
  46883. return t;
  46884. }(), JK = function(t) {
  46885. q(e, t);
  46886. function e(n) {
  46887. return t.call(this, n) || this;
  46888. }
  46889. return e.prototype.getDefaultStyle = function() {
  46890. return {
  46891. stroke: "#000",
  46892. fill: null
  46893. };
  46894. }, e.prototype.getDefaultShape = function() {
  46895. return new Mke();
  46896. }, e.prototype.buildPath = function(n, r) {
  46897. qK(n, r, !1);
  46898. }, e;
  46899. }(ot);
  46900. JK.prototype.type = "polyline";
  46901. const ai = JK;
  46902. var Ike = {}, Dke = /* @__PURE__ */ function() {
  46903. function t() {
  46904. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  46905. }
  46906. return t;
  46907. }(), eJ = function(t) {
  46908. q(e, t);
  46909. function e(n) {
  46910. return t.call(this, n) || this;
  46911. }
  46912. return e.prototype.getDefaultStyle = function() {
  46913. return {
  46914. stroke: "#000",
  46915. fill: null
  46916. };
  46917. }, e.prototype.getDefaultShape = function() {
  46918. return new Dke();
  46919. }, e.prototype.buildPath = function(n, r) {
  46920. var i, a, o, s;
  46921. if (this.subPixelOptimize) {
  46922. var l = TK(Ike, r, this.style);
  46923. i = l.x1, a = l.y1, o = l.x2, s = l.y2;
  46924. } else
  46925. i = r.x1, a = r.y1, o = r.x2, s = r.y2;
  46926. var u = r.percent;
  46927. u !== 0 && (n.moveTo(i, a), u < 1 && (o = i * (1 - u) + o * u, s = a * (1 - u) + s * u), n.lineTo(o, s));
  46928. }, e.prototype.pointAt = function(n) {
  46929. var r = this.shape;
  46930. return [
  46931. r.x1 * (1 - n) + r.x2 * n,
  46932. r.y1 * (1 - n) + r.y2 * n
  46933. ];
  46934. }, e;
  46935. }(ot);
  46936. eJ.prototype.type = "line";
  46937. const Un = eJ;
  46938. var oi = [], Rke = /* @__PURE__ */ function() {
  46939. function t() {
  46940. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
  46941. }
  46942. return t;
  46943. }();
  46944. function zB(t, e, n) {
  46945. var r = t.cpx2, i = t.cpy2;
  46946. return r != null || i != null ? [
  46947. (n ? Q6 : Gn)(t.x1, t.cpx1, t.cpx2, t.x2, e),
  46948. (n ? Q6 : Gn)(t.y1, t.cpy1, t.cpy2, t.y2, e)
  46949. ] : [
  46950. (n ? fA : ir)(t.x1, t.cpx1, t.x2, e),
  46951. (n ? fA : ir)(t.y1, t.cpy1, t.y2, e)
  46952. ];
  46953. }
  46954. var tJ = function(t) {
  46955. q(e, t);
  46956. function e(n) {
  46957. return t.call(this, n) || this;
  46958. }
  46959. return e.prototype.getDefaultStyle = function() {
  46960. return {
  46961. stroke: "#000",
  46962. fill: null
  46963. };
  46964. }, e.prototype.getDefaultShape = function() {
  46965. return new Rke();
  46966. }, e.prototype.buildPath = function(n, r) {
  46967. var i = r.x1, a = r.y1, o = r.x2, s = r.y2, l = r.cpx1, u = r.cpy1, c = r.cpx2, f = r.cpy2, d = r.percent;
  46968. d !== 0 && (n.moveTo(i, a), c == null || f == null ? (d < 1 && (ym(i, l, o, d, oi), l = oi[1], o = oi[2], ym(a, u, s, d, oi), u = oi[1], s = oi[2]), n.quadraticCurveTo(l, u, o, s)) : (d < 1 && (su(i, l, c, o, d, oi), l = oi[1], c = oi[2], o = oi[3], su(a, u, f, s, d, oi), u = oi[1], f = oi[2], s = oi[3]), n.bezierCurveTo(l, u, c, f, o, s)));
  46969. }, e.prototype.pointAt = function(n) {
  46970. return zB(this.shape, n, !1);
  46971. }, e.prototype.tangentAt = function(n) {
  46972. var r = zB(this.shape, n, !0);
  46973. return Rf(r, r);
  46974. }, e;
  46975. }(ot);
  46976. tJ.prototype.type = "bezier-curve";
  46977. const V0 = tJ;
  46978. var kke = /* @__PURE__ */ function() {
  46979. function t() {
  46980. this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  46981. }
  46982. return t;
  46983. }(), nJ = function(t) {
  46984. q(e, t);
  46985. function e(n) {
  46986. return t.call(this, n) || this;
  46987. }
  46988. return e.prototype.getDefaultStyle = function() {
  46989. return {
  46990. stroke: "#000",
  46991. fill: null
  46992. };
  46993. }, e.prototype.getDefaultShape = function() {
  46994. return new kke();
  46995. }, e.prototype.buildPath = function(n, r) {
  46996. var i = r.cx, a = r.cy, o = Math.max(r.r, 0), s = r.startAngle, l = r.endAngle, u = r.clockwise, c = Math.cos(s), f = Math.sin(s);
  46997. n.moveTo(c * o + i, f * o + a), n.arc(i, a, o, s, l, !u);
  46998. }, e;
  46999. }(ot);
  47000. nJ.prototype.type = "arc";
  47001. const Yx = nJ;
  47002. var Lke = function(t) {
  47003. q(e, t);
  47004. function e() {
  47005. var n = t !== null && t.apply(this, arguments) || this;
  47006. return n.type = "compound", n;
  47007. }
  47008. return e.prototype._updatePathDirty = function() {
  47009. for (var n = this.shape.paths, r = this.shapeChanged(), i = 0; i < n.length; i++)
  47010. r = r || n[i].shapeChanged();
  47011. r && this.dirtyShape();
  47012. }, e.prototype.beforeBrush = function() {
  47013. this._updatePathDirty();
  47014. for (var n = this.shape.paths || [], r = this.getGlobalScale(), i = 0; i < n.length; i++)
  47015. n[i].path || n[i].createPathProxy(), n[i].path.setScale(r[0], r[1], n[i].segmentIgnoreThreshold);
  47016. }, e.prototype.buildPath = function(n, r) {
  47017. for (var i = r.paths || [], a = 0; a < i.length; a++)
  47018. i[a].buildPath(n, i[a].shape, !0);
  47019. }, e.prototype.afterBrush = function() {
  47020. for (var n = this.shape.paths || [], r = 0; r < n.length; r++)
  47021. n[r].pathUpdated();
  47022. }, e.prototype.getBoundingRect = function() {
  47023. return this._updatePathDirty.call(this), ot.prototype.getBoundingRect.call(this);
  47024. }, e;
  47025. }(ot);
  47026. const qx = Lke;
  47027. var rJ = function() {
  47028. function t(e) {
  47029. this.colorStops = e || [];
  47030. }
  47031. return t.prototype.addColorStop = function(e, n) {
  47032. this.colorStops.push({
  47033. offset: e,
  47034. color: n
  47035. });
  47036. }, t;
  47037. }(), Nke = function(t) {
  47038. q(e, t);
  47039. function e(n, r, i, a, o, s) {
  47040. var l = t.call(this, o) || this;
  47041. return l.x = n ?? 0, l.y = r ?? 0, l.x2 = i ?? 1, l.y2 = a ?? 0, l.type = "linear", l.global = s || !1, l;
  47042. }
  47043. return e;
  47044. }(rJ);
  47045. const hp = Nke;
  47046. var Bke = function(t) {
  47047. q(e, t);
  47048. function e(n, r, i, a, o) {
  47049. var s = t.call(this, a) || this;
  47050. return s.x = n ?? 0.5, s.y = r ?? 0.5, s.r = i ?? 0.5, s.type = "radial", s.global = o || !1, s;
  47051. }
  47052. return e;
  47053. }(rJ);
  47054. const VR = Bke;
  47055. var Ju = [0, 0], ec = [0, 0], tb = new Ke(), nb = new Ke(), zke = function() {
  47056. function t(e, n) {
  47057. this._corners = [], this._axes = [], this._origin = [0, 0];
  47058. for (var r = 0; r < 4; r++)
  47059. this._corners[r] = new Ke();
  47060. for (var r = 0; r < 2; r++)
  47061. this._axes[r] = new Ke();
  47062. e && this.fromBoundingRect(e, n);
  47063. }
  47064. return t.prototype.fromBoundingRect = function(e, n) {
  47065. var r = this._corners, i = this._axes, a = e.x, o = e.y, s = a + e.width, l = o + e.height;
  47066. if (r[0].set(a, o), r[1].set(s, o), r[2].set(s, l), r[3].set(a, l), n)
  47067. for (var u = 0; u < 4; u++)
  47068. r[u].transform(n);
  47069. Ke.sub(i[0], r[1], r[0]), Ke.sub(i[1], r[3], r[0]), i[0].normalize(), i[1].normalize();
  47070. for (var u = 0; u < 2; u++)
  47071. this._origin[u] = i[u].dot(r[0]);
  47072. }, t.prototype.intersect = function(e, n) {
  47073. var r = !0, i = !n;
  47074. return tb.set(1 / 0, 1 / 0), nb.set(0, 0), !this._intersectCheckOneSide(this, e, tb, nb, i, 1) && (r = !1, i) || !this._intersectCheckOneSide(e, this, tb, nb, i, -1) && (r = !1, i) || i || Ke.copy(n, r ? tb : nb), r;
  47075. }, t.prototype._intersectCheckOneSide = function(e, n, r, i, a, o) {
  47076. for (var s = !0, l = 0; l < 2; l++) {
  47077. var u = this._axes[l];
  47078. if (this._getProjMinMaxOnAxis(l, e._corners, Ju), this._getProjMinMaxOnAxis(l, n._corners, ec), Ju[1] < ec[0] || Ju[0] > ec[1]) {
  47079. if (s = !1, a)
  47080. return s;
  47081. var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
  47082. Math.min(c, f) > i.len() && (c < f ? Ke.scale(i, u, -c * o) : Ke.scale(i, u, f * o));
  47083. } else if (r) {
  47084. var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
  47085. Math.min(c, f) < r.len() && (c < f ? Ke.scale(r, u, c * o) : Ke.scale(r, u, -f * o));
  47086. }
  47087. }
  47088. return s;
  47089. }, t.prototype._getProjMinMaxOnAxis = function(e, n, r) {
  47090. for (var i = this._axes[e], a = this._origin, o = n[0].dot(i) + a[e], s = o, l = o, u = 1; u < n.length; u++) {
  47091. var c = n[u].dot(i) + a[e];
  47092. s = Math.min(c, s), l = Math.max(c, l);
  47093. }
  47094. r[0] = s, r[1] = l;
  47095. }, t;
  47096. }();
  47097. const sO = zke;
  47098. var Vke = [], Fke = function(t) {
  47099. q(e, t);
  47100. function e() {
  47101. var n = t !== null && t.apply(this, arguments) || this;
  47102. return n.notClear = !0, n.incremental = !0, n._displayables = [], n._temporaryDisplayables = [], n._cursor = 0, n;
  47103. }
  47104. return e.prototype.traverse = function(n, r) {
  47105. n.call(r, this);
  47106. }, e.prototype.useStyle = function() {
  47107. this.style = {};
  47108. }, e.prototype.getCursor = function() {
  47109. return this._cursor;
  47110. }, e.prototype.innerAfterBrush = function() {
  47111. this._cursor = this._displayables.length;
  47112. }, e.prototype.clearDisplaybles = function() {
  47113. this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1;
  47114. }, e.prototype.clearTemporalDisplayables = function() {
  47115. this._temporaryDisplayables = [];
  47116. }, e.prototype.addDisplayable = function(n, r) {
  47117. r ? this._temporaryDisplayables.push(n) : this._displayables.push(n), this.markRedraw();
  47118. }, e.prototype.addDisplayables = function(n, r) {
  47119. r = r || !1;
  47120. for (var i = 0; i < n.length; i++)
  47121. this.addDisplayable(n[i], r);
  47122. }, e.prototype.getDisplayables = function() {
  47123. return this._displayables;
  47124. }, e.prototype.getTemporalDisplayables = function() {
  47125. return this._temporaryDisplayables;
  47126. }, e.prototype.eachPendingDisplayable = function(n) {
  47127. for (var r = this._cursor; r < this._displayables.length; r++)
  47128. n && n(this._displayables[r]);
  47129. for (var r = 0; r < this._temporaryDisplayables.length; r++)
  47130. n && n(this._temporaryDisplayables[r]);
  47131. }, e.prototype.update = function() {
  47132. this.updateTransform();
  47133. for (var n = this._cursor; n < this._displayables.length; n++) {
  47134. var r = this._displayables[n];
  47135. r.parent = this, r.update(), r.parent = null;
  47136. }
  47137. for (var n = 0; n < this._temporaryDisplayables.length; n++) {
  47138. var r = this._temporaryDisplayables[n];
  47139. r.parent = this, r.update(), r.parent = null;
  47140. }
  47141. }, e.prototype.getBoundingRect = function() {
  47142. if (!this._rect) {
  47143. for (var n = new Je(1 / 0, 1 / 0, -1 / 0, -1 / 0), r = 0; r < this._displayables.length; r++) {
  47144. var i = this._displayables[r], a = i.getBoundingRect().clone();
  47145. i.needLocalTransform() && a.applyTransform(i.getLocalTransform(Vke)), n.union(a);
  47146. }
  47147. this._rect = n;
  47148. }
  47149. return this._rect;
  47150. }, e.prototype.contain = function(n, r) {
  47151. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  47152. if (a.contain(i[0], i[1]))
  47153. for (var o = 0; o < this._displayables.length; o++) {
  47154. var s = this._displayables[o];
  47155. if (s.contain(n, r))
  47156. return !0;
  47157. }
  47158. return !1;
  47159. }, e;
  47160. }(Ma);
  47161. const iJ = Fke;
  47162. var aJ = bt();
  47163. function pp(t, e, n, r, i) {
  47164. var a;
  47165. if (e && e.ecModel) {
  47166. var o = e.ecModel.getUpdatePayload();
  47167. a = o && o.animation;
  47168. }
  47169. var s = e && e.isAnimationEnabled(), l = t === "update";
  47170. if (s) {
  47171. var u = void 0, c = void 0, f = void 0;
  47172. r ? (u = We(r.duration, 200), c = We(r.easing, "cubicOut"), f = 0) : (u = e.getShallow(l ? "animationDurationUpdate" : "animationDuration"), c = e.getShallow(l ? "animationEasingUpdate" : "animationEasing"), f = e.getShallow(l ? "animationDelayUpdate" : "animationDelay")), a && (a.duration != null && (u = a.duration), a.easing != null && (c = a.easing), a.delay != null && (f = a.delay)), Me(f) && (f = f(n, i)), Me(u) && (u = u(n));
  47173. var d = {
  47174. duration: u || 0,
  47175. delay: f,
  47176. easing: c
  47177. };
  47178. return d;
  47179. } else
  47180. return null;
  47181. }
  47182. function FR(t, e, n, r, i, a, o) {
  47183. var s = !1, l;
  47184. Me(i) ? (o = a, a = i, i = null) : Ie(i) && (a = i.cb, o = i.during, s = i.isFrom, l = i.removeOpt, i = i.dataIndex);
  47185. var u = t === "leave";
  47186. u || e.stopAnimation("leave");
  47187. var c = pp(t, r, i, u ? l || {} : null, r && r.getAnimationDelayParams ? r.getAnimationDelayParams(e, i) : null);
  47188. if (c && c.duration > 0) {
  47189. var f = c.duration, d = c.delay, h = c.easing, p = {
  47190. duration: f,
  47191. delay: d || 0,
  47192. easing: h,
  47193. done: a,
  47194. force: !!a || !!o,
  47195. // Set to final state in update/init animation.
  47196. // So the post processing based on the path shape can be done correctly.
  47197. setToFinal: !u,
  47198. scope: t,
  47199. during: o
  47200. };
  47201. s ? e.animateFrom(n, p) : e.animateTo(n, p);
  47202. } else
  47203. e.stopAnimation(), !s && e.attr(n), o && o(1), a && a();
  47204. }
  47205. function Ct(t, e, n, r, i, a) {
  47206. FR("update", t, e, n, r, i, a);
  47207. }
  47208. function Yt(t, e, n, r, i, a) {
  47209. FR("enter", t, e, n, r, i, a);
  47210. }
  47211. function th(t) {
  47212. if (!t.__zr)
  47213. return !0;
  47214. for (var e = 0; e < t.animators.length; e++) {
  47215. var n = t.animators[e];
  47216. if (n.scope === "leave")
  47217. return !0;
  47218. }
  47219. return !1;
  47220. }
  47221. function uu(t, e, n, r, i, a) {
  47222. th(t) || FR("leave", t, e, n, r, i, a);
  47223. }
  47224. function VB(t, e, n, r) {
  47225. t.removeTextContent(), t.removeTextGuideLine(), uu(t, {
  47226. style: {
  47227. opacity: 0
  47228. }
  47229. }, e, n, r);
  47230. }
  47231. function wm(t, e, n) {
  47232. function r() {
  47233. t.parent && t.parent.remove(t);
  47234. }
  47235. t.isGroup ? t.traverse(function(i) {
  47236. i.isGroup || VB(i, e, n, r);
  47237. }) : VB(t, e, n, r);
  47238. }
  47239. function so(t) {
  47240. aJ(t).oldStyle = t.style;
  47241. }
  47242. function Wke(t) {
  47243. return aJ(t).oldStyle;
  47244. }
  47245. var lO = Math.max, uO = Math.min, NA = {};
  47246. function oJ(t) {
  47247. return ot.extend(t);
  47248. }
  47249. var Qke = bke;
  47250. function sJ(t, e) {
  47251. return Qke(t, e);
  47252. }
  47253. function ka(t, e) {
  47254. NA[t] = e;
  47255. }
  47256. function Kx(t) {
  47257. if (NA.hasOwnProperty(t))
  47258. return NA[t];
  47259. }
  47260. function F0(t, e, n, r) {
  47261. var i = GK(t, e);
  47262. return n && (r === "center" && (n = lJ(n, i.getBoundingRect())), QR(i, n)), i;
  47263. }
  47264. function WR(t, e, n) {
  47265. var r = new lr({
  47266. style: {
  47267. image: t,
  47268. x: e.x,
  47269. y: e.y,
  47270. width: e.width,
  47271. height: e.height
  47272. },
  47273. onload: function(i) {
  47274. if (n === "center") {
  47275. var a = {
  47276. width: i.width,
  47277. height: i.height
  47278. };
  47279. r.setStyle(lJ(e, a));
  47280. }
  47281. }
  47282. });
  47283. return r;
  47284. }
  47285. function lJ(t, e) {
  47286. var n = e.width / e.height, r = t.height * n, i;
  47287. r <= t.width ? i = t.height : (r = t.width, i = r / n);
  47288. var a = t.x + t.width / 2, o = t.y + t.height / 2;
  47289. return {
  47290. x: a - r / 2,
  47291. y: o - i / 2,
  47292. width: r,
  47293. height: i
  47294. };
  47295. }
  47296. var Li = _ke;
  47297. function QR(t, e) {
  47298. if (t.applyTransform) {
  47299. var n = t.getBoundingRect(), r = n.calculateTransform(e);
  47300. t.applyTransform(r);
  47301. }
  47302. }
  47303. function zh(t, e) {
  47304. return TK(t, t, {
  47305. lineWidth: e
  47306. }), t;
  47307. }
  47308. function Hke(t) {
  47309. return PK(t.shape, t.shape, t.style), t;
  47310. }
  47311. var W_ = kc;
  47312. function ql(t, e) {
  47313. for (var n = D0([]); t && t !== e; )
  47314. Uo(n, t.getLocalTransform(), n), t = t.parent;
  47315. return n;
  47316. }
  47317. function to(t, e, n) {
  47318. return e && !wr(e) && (e = As.getLocalTransform(e)), n && (e = kf([], e)), ar([], t, e);
  47319. }
  47320. function Jx(t, e, n) {
  47321. var r = e[4] === 0 || e[5] === 0 || e[0] === 0 ? 1 : Math.abs(2 * e[4] / e[0]), i = e[4] === 0 || e[5] === 0 || e[2] === 0 ? 1 : Math.abs(2 * e[4] / e[2]), a = [t === "left" ? -r : t === "right" ? r : 0, t === "top" ? -i : t === "bottom" ? i : 0];
  47322. return a = to(a, e, n), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
  47323. }
  47324. function FB(t) {
  47325. return !t.isGroup;
  47326. }
  47327. function Gke(t) {
  47328. return t.shape != null;
  47329. }
  47330. function W0(t, e, n) {
  47331. if (!t || !e)
  47332. return;
  47333. function r(o) {
  47334. var s = {};
  47335. return o.traverse(function(l) {
  47336. FB(l) && l.anid && (s[l.anid] = l);
  47337. }), s;
  47338. }
  47339. function i(o) {
  47340. var s = {
  47341. x: o.x,
  47342. y: o.y,
  47343. rotation: o.rotation
  47344. };
  47345. return Gke(o) && (s.shape = le({}, o.shape)), s;
  47346. }
  47347. var a = r(t);
  47348. e.traverse(function(o) {
  47349. if (FB(o) && o.anid) {
  47350. var s = a[o.anid];
  47351. if (s) {
  47352. var l = i(o);
  47353. o.attr(i(s)), Ct(o, l, n, Fe(o).dataIndex);
  47354. }
  47355. }
  47356. });
  47357. }
  47358. function HR(t, e) {
  47359. return ce(t, function(n) {
  47360. var r = n[0];
  47361. r = lO(r, e.x), r = uO(r, e.x + e.width);
  47362. var i = n[1];
  47363. return i = lO(i, e.y), i = uO(i, e.y + e.height), [r, i];
  47364. });
  47365. }
  47366. function uJ(t, e) {
  47367. var n = lO(t.x, e.x), r = uO(t.x + t.width, e.x + e.width), i = lO(t.y, e.y), a = uO(t.y + t.height, e.y + e.height);
  47368. if (r >= n && a >= i)
  47369. return {
  47370. x: n,
  47371. y: i,
  47372. width: r - n,
  47373. height: a - i
  47374. };
  47375. }
  47376. function vp(t, e, n) {
  47377. var r = le({
  47378. rectHover: !0
  47379. }, e), i = r.style = {
  47380. strokeNoScale: !0
  47381. };
  47382. if (n = n || {
  47383. x: -1,
  47384. y: -1,
  47385. width: 2,
  47386. height: 2
  47387. }, t)
  47388. return t.indexOf("image://") === 0 ? (i.image = t.slice(8), Re(i, n), new lr(r)) : F0(t.replace("path://", ""), r, n, "center");
  47389. }
  47390. function Gv(t, e, n, r, i) {
  47391. for (var a = 0, o = i[i.length - 1]; a < i.length; a++) {
  47392. var s = i[a];
  47393. if (cJ(t, e, n, r, s[0], s[1], o[0], o[1]))
  47394. return !0;
  47395. o = s;
  47396. }
  47397. }
  47398. function cJ(t, e, n, r, i, a, o, s) {
  47399. var l = n - t, u = r - e, c = o - i, f = s - a, d = ST(c, f, l, u);
  47400. if (jke(d))
  47401. return !1;
  47402. var h = t - i, p = e - a, v = ST(h, p, l, u) / d;
  47403. if (v < 0 || v > 1)
  47404. return !1;
  47405. var g = ST(h, p, c, f) / d;
  47406. return !(g < 0 || g > 1);
  47407. }
  47408. function ST(t, e, n, r) {
  47409. return t * r - n * e;
  47410. }
  47411. function jke(t) {
  47412. return t <= 1e-6 && t >= -1e-6;
  47413. }
  47414. function gp(t) {
  47415. var e = t.itemTooltipOption, n = t.componentModel, r = t.itemName, i = Oe(e) ? {
  47416. formatter: e
  47417. } : e, a = n.mainType, o = n.componentIndex, s = {
  47418. componentType: a,
  47419. name: r,
  47420. $vars: ["name"]
  47421. };
  47422. s[a + "Index"] = o;
  47423. var l = t.formatterParamsExtra;
  47424. l && k(st(l), function(c) {
  47425. Ce(s, c) || (s[c] = l[c], s.$vars.push(c));
  47426. });
  47427. var u = Fe(t.el);
  47428. u.componentMainType = a, u.componentIndex = o, u.tooltipConfig = {
  47429. name: r,
  47430. option: Re({
  47431. content: r,
  47432. encodeHTMLContent: !0,
  47433. formatterParams: s
  47434. }, i)
  47435. };
  47436. }
  47437. function WB(t, e) {
  47438. var n;
  47439. t.isGroup && (n = e(t)), n || t.traverse(e);
  47440. }
  47441. function Tu(t, e) {
  47442. if (t)
  47443. if (ue(t))
  47444. for (var n = 0; n < t.length; n++)
  47445. WB(t[n], e);
  47446. else
  47447. WB(t, e);
  47448. }
  47449. ka("circle", ll);
  47450. ka("ellipse", Xx);
  47451. ka("sector", ri);
  47452. ka("ring", z0);
  47453. ka("polygon", ii);
  47454. ka("polyline", ai);
  47455. ka("rect", mt);
  47456. ka("line", Un);
  47457. ka("bezierCurve", V0);
  47458. ka("arc", Yx);
  47459. const Lf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  47460. __proto__: null,
  47461. Arc: Yx,
  47462. BezierCurve: V0,
  47463. BoundingRect: Je,
  47464. Circle: ll,
  47465. CompoundPath: qx,
  47466. Ellipse: Xx,
  47467. Group: Ve,
  47468. Image: lr,
  47469. IncrementalDisplayable: iJ,
  47470. Line: Un,
  47471. LinearGradient: hp,
  47472. OrientedBoundingRect: sO,
  47473. Path: ot,
  47474. Point: Ke,
  47475. Polygon: ii,
  47476. Polyline: ai,
  47477. RadialGradient: VR,
  47478. Rect: mt,
  47479. Ring: z0,
  47480. Sector: ri,
  47481. Text: gt,
  47482. applyTransform: to,
  47483. clipPointsByRect: HR,
  47484. clipRectByRect: uJ,
  47485. createIcon: vp,
  47486. extendPath: sJ,
  47487. extendShape: oJ,
  47488. getShapeClass: Kx,
  47489. getTransform: ql,
  47490. groupTransition: W0,
  47491. initProps: Yt,
  47492. isElementRemoved: th,
  47493. lineLineIntersect: cJ,
  47494. linePolygonIntersect: Gv,
  47495. makeImage: WR,
  47496. makePath: F0,
  47497. mergePath: Li,
  47498. registerShape: ka,
  47499. removeElement: uu,
  47500. removeElementWithFadeOut: wm,
  47501. resizePath: QR,
  47502. setTooltipConfig: gp,
  47503. subPixelOptimize: W_,
  47504. subPixelOptimizeLine: zh,
  47505. subPixelOptimizeRect: Hke,
  47506. transformDirection: Jx,
  47507. traverseElements: Tu,
  47508. updateProps: Ct
  47509. }, Symbol.toStringTag, { value: "Module" }));
  47510. var ew = {};
  47511. function fJ(t, e) {
  47512. for (var n = 0; n < ni.length; n++) {
  47513. var r = ni[n], i = e[r], a = t.ensureState(r);
  47514. a.style = a.style || {}, a.style.text = i;
  47515. }
  47516. var o = t.currentStates.slice();
  47517. t.clearStates(!0), t.setStyle({
  47518. text: e.normal
  47519. }), t.useStates(o, !0);
  47520. }
  47521. function BA(t, e, n) {
  47522. var r = t.labelFetcher, i = t.labelDataIndex, a = t.labelDimIndex, o = e.normal, s;
  47523. r && (s = r.getFormattedLabel(i, "normal", null, a, o && o.get("formatter"), n != null ? {
  47524. interpolatedValue: n
  47525. } : null)), s == null && (s = Me(t.defaultText) ? t.defaultText(i, t, n) : t.defaultText);
  47526. for (var l = {
  47527. normal: s
  47528. }, u = 0; u < ni.length; u++) {
  47529. var c = ni[u], f = e[c];
  47530. l[c] = We(r ? r.getFormattedLabel(i, c, null, a, f && f.get("formatter")) : null, s);
  47531. }
  47532. return l;
  47533. }
  47534. function Pr(t, e, n, r) {
  47535. n = n || ew;
  47536. for (var i = t instanceof gt, a = !1, o = 0; o < xm.length; o++) {
  47537. var s = e[xm[o]];
  47538. if (s && s.getShallow("show")) {
  47539. a = !0;
  47540. break;
  47541. }
  47542. }
  47543. var l = i ? t : t.getTextContent();
  47544. if (a) {
  47545. i || (l || (l = new gt(), t.setTextContent(l)), t.stateProxy && (l.stateProxy = t.stateProxy));
  47546. var u = BA(n, e), c = e.normal, f = !!c.getShallow("show"), d = Zt(c, r && r.normal, n, !1, !i);
  47547. d.text = u.normal, i || t.setTextConfig(cO(c, n, !1));
  47548. for (var o = 0; o < ni.length; o++) {
  47549. var h = ni[o], s = e[h];
  47550. if (s) {
  47551. var p = l.ensureState(h), v = !!We(s.getShallow("show"), f);
  47552. if (v !== f && (p.ignore = !v), p.style = Zt(s, r && r[h], n, !0, !i), p.style.text = u[h], !i) {
  47553. var g = t.ensureState(h);
  47554. g.textConfig = cO(s, n, !0);
  47555. }
  47556. }
  47557. }
  47558. l.silent = !!c.getShallow("silent"), l.style.x != null && (d.x = l.style.x), l.style.y != null && (d.y = l.style.y), l.ignore = !f, l.useStyle(d), l.dirty(), n.enableTextSetter && (mp(l).setLabelText = function(m) {
  47559. var y = BA(n, e, m);
  47560. fJ(l, y);
  47561. });
  47562. } else l && (l.ignore = !0);
  47563. t.dirty();
  47564. }
  47565. function er(t, e) {
  47566. e = e || "label";
  47567. for (var n = {
  47568. normal: t.getModel(e)
  47569. }, r = 0; r < ni.length; r++) {
  47570. var i = ni[r];
  47571. n[i] = t.getModel([i, e]);
  47572. }
  47573. return n;
  47574. }
  47575. function Zt(t, e, n, r, i) {
  47576. var a = {};
  47577. return Zke(a, t, n, r, i), e && le(a, e), a;
  47578. }
  47579. function cO(t, e, n) {
  47580. e = e || {};
  47581. var r = {}, i, a = t.getShallow("rotate"), o = We(t.getShallow("distance"), n ? null : 5), s = t.getShallow("offset");
  47582. return i = t.getShallow("position") || (n ? null : "inside"), i === "outside" && (i = e.defaultOutsidePosition || "top"), i != null && (r.position = i), s != null && (r.offset = s), a != null && (a *= Math.PI / 180, r.rotation = a), o != null && (r.distance = o), r.outsideFill = t.get("color") === "inherit" ? e.inheritColor || null : "auto", r;
  47583. }
  47584. function Zke(t, e, n, r, i) {
  47585. n = n || ew;
  47586. var a = e.ecModel, o = a && a.option.textStyle, s = Uke(e), l;
  47587. if (s) {
  47588. l = {};
  47589. for (var u in s)
  47590. if (s.hasOwnProperty(u)) {
  47591. var c = e.getModel(["rich", u]);
  47592. jB(l[u] = {}, c, o, n, r, i, !1, !0);
  47593. }
  47594. }
  47595. l && (t.rich = l);
  47596. var f = e.get("overflow");
  47597. f && (t.overflow = f);
  47598. var d = e.get("minMargin");
  47599. d != null && (t.margin = d), jB(t, e, o, n, r, i, !0, !1);
  47600. }
  47601. function Uke(t) {
  47602. for (var e; t && t !== t.ecModel; ) {
  47603. var n = (t.option || ew).rich;
  47604. if (n) {
  47605. e = e || {};
  47606. for (var r = st(n), i = 0; i < r.length; i++) {
  47607. var a = r[i];
  47608. e[a] = 1;
  47609. }
  47610. }
  47611. t = t.parentModel;
  47612. }
  47613. return e;
  47614. }
  47615. var QB = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], HB = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"], GB = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  47616. function jB(t, e, n, r, i, a, o, s) {
  47617. n = !i && n || ew;
  47618. var l = r && r.inheritColor, u = e.getShallow("color"), c = e.getShallow("textBorderColor"), f = We(e.getShallow("opacity"), n.opacity);
  47619. (u === "inherit" || u === "auto") && (process.env.NODE_ENV !== "production" && u === "auto" && Cn("color: 'auto'", "color: 'inherit'"), l ? u = l : u = null), (c === "inherit" || c === "auto") && (process.env.NODE_ENV !== "production" && c === "auto" && Cn("color: 'auto'", "color: 'inherit'"), l ? c = l : c = null), a || (u = u || n.color, c = c || n.textBorderColor), u != null && (t.fill = u), c != null && (t.stroke = c);
  47620. var d = We(e.getShallow("textBorderWidth"), n.textBorderWidth);
  47621. d != null && (t.lineWidth = d);
  47622. var h = We(e.getShallow("textBorderType"), n.textBorderType);
  47623. h != null && (t.lineDash = h);
  47624. var p = We(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  47625. p != null && (t.lineDashOffset = p), !i && f == null && !s && (f = r && r.defaultOpacity), f != null && (t.opacity = f), !i && !a && t.fill == null && r.inheritColor && (t.fill = r.inheritColor);
  47626. for (var v = 0; v < QB.length; v++) {
  47627. var g = QB[v], m = We(e.getShallow(g), n[g]);
  47628. m != null && (t[g] = m);
  47629. }
  47630. for (var v = 0; v < HB.length; v++) {
  47631. var g = HB[v], m = e.getShallow(g);
  47632. m != null && (t[g] = m);
  47633. }
  47634. if (t.verticalAlign == null) {
  47635. var y = e.getShallow("baseline");
  47636. y != null && (t.verticalAlign = y);
  47637. }
  47638. if (!o || !r.disableBox) {
  47639. for (var v = 0; v < GB.length; v++) {
  47640. var g = GB[v], m = e.getShallow(g);
  47641. m != null && (t[g] = m);
  47642. }
  47643. var b = e.getShallow("borderType");
  47644. b != null && (t.borderDash = b), (t.backgroundColor === "auto" || t.backgroundColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.backgroundColor === "auto" && Cn("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), t.backgroundColor = l), (t.borderColor === "auto" || t.borderColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.borderColor === "auto" && Cn("borderColor: 'auto'", "borderColor: 'inherit'"), t.borderColor = l);
  47645. }
  47646. }
  47647. function GR(t, e) {
  47648. var n = e && e.getModel("textStyle");
  47649. return ma([
  47650. // FIXME in node-canvas fontWeight is before fontStyle
  47651. t.fontStyle || n && n.getShallow("fontStyle") || "",
  47652. t.fontWeight || n && n.getShallow("fontWeight") || "",
  47653. (t.fontSize || n && n.getShallow("fontSize") || 12) + "px",
  47654. t.fontFamily || n && n.getShallow("fontFamily") || "sans-serif"
  47655. ].join(" "));
  47656. }
  47657. var mp = bt();
  47658. function dJ(t, e, n, r) {
  47659. if (t) {
  47660. var i = mp(t);
  47661. i.prevValue = i.value, i.value = n;
  47662. var a = e.normal;
  47663. i.valueAnimation = a.get("valueAnimation"), i.valueAnimation && (i.precision = a.get("precision"), i.defaultInterpolatedText = r, i.statesModels = e);
  47664. }
  47665. }
  47666. function hJ(t, e, n, r, i) {
  47667. var a = mp(t);
  47668. if (!a.valueAnimation || a.prevValue === a.value)
  47669. return;
  47670. var o = a.defaultInterpolatedText, s = We(a.interpolatedValue, a.prevValue), l = a.value;
  47671. function u(c) {
  47672. var f = gK(n, a.precision, s, l, c);
  47673. a.interpolatedValue = c === 1 ? null : f;
  47674. var d = BA({
  47675. labelDataIndex: e,
  47676. labelFetcher: i,
  47677. defaultText: o ? o(f) : f + ""
  47678. }, a.statesModels, f);
  47679. fJ(t, d);
  47680. }
  47681. t.percent = 0, (a.prevValue == null ? Yt : Ct)(t, {
  47682. // percent is used to prevent animation from being aborted #15916
  47683. percent: 1
  47684. }, r, e, null, u);
  47685. }
  47686. var Xke = ["textStyle", "color"], xT = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], wT = new gt(), Yke = (
  47687. /** @class */
  47688. function() {
  47689. function t() {
  47690. }
  47691. return t.prototype.getTextColor = function(e) {
  47692. var n = this.ecModel;
  47693. return this.getShallow("color") || (!e && n ? n.get(Xke) : null);
  47694. }, t.prototype.getFont = function() {
  47695. return GR({
  47696. fontStyle: this.getShallow("fontStyle"),
  47697. fontWeight: this.getShallow("fontWeight"),
  47698. fontSize: this.getShallow("fontSize"),
  47699. fontFamily: this.getShallow("fontFamily")
  47700. }, this.ecModel);
  47701. }, t.prototype.getTextRect = function(e) {
  47702. for (var n = {
  47703. text: e,
  47704. verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
  47705. }, r = 0; r < xT.length; r++)
  47706. n[xT[r]] = this.getShallow(xT[r]);
  47707. return wT.useStyle(n), wT.update(), wT.getBoundingRect();
  47708. }, t;
  47709. }()
  47710. ), pJ = [
  47711. ["lineWidth", "width"],
  47712. ["stroke", "color"],
  47713. ["opacity"],
  47714. ["shadowBlur"],
  47715. ["shadowOffsetX"],
  47716. ["shadowOffsetY"],
  47717. ["shadowColor"],
  47718. ["lineDash", "type"],
  47719. ["lineDashOffset", "dashOffset"],
  47720. ["lineCap", "cap"],
  47721. ["lineJoin", "join"],
  47722. ["miterLimit"]
  47723. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  47724. // So do not transfer decal directly.
  47725. ], qke = yf(pJ), Kke = (
  47726. /** @class */
  47727. function() {
  47728. function t() {
  47729. }
  47730. return t.prototype.getLineStyle = function(e) {
  47731. return qke(this, e);
  47732. }, t;
  47733. }()
  47734. ), vJ = [
  47735. ["fill", "color"],
  47736. ["stroke", "borderColor"],
  47737. ["lineWidth", "borderWidth"],
  47738. ["opacity"],
  47739. ["shadowBlur"],
  47740. ["shadowOffsetX"],
  47741. ["shadowOffsetY"],
  47742. ["shadowColor"],
  47743. ["lineDash", "borderType"],
  47744. ["lineDashOffset", "borderDashOffset"],
  47745. ["lineCap", "borderCap"],
  47746. ["lineJoin", "borderJoin"],
  47747. ["miterLimit", "borderMiterLimit"]
  47748. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  47749. // So do not transfer decal directly.
  47750. ], Jke = yf(vJ), eLe = (
  47751. /** @class */
  47752. function() {
  47753. function t() {
  47754. }
  47755. return t.prototype.getItemStyle = function(e, n) {
  47756. return Jke(this, e, n);
  47757. }, t;
  47758. }()
  47759. ), Nf = (
  47760. /** @class */
  47761. function() {
  47762. function t(e, n, r) {
  47763. this.parentModel = n, this.ecModel = r, this.option = e;
  47764. }
  47765. return t.prototype.init = function(e, n, r) {
  47766. }, t.prototype.mergeOption = function(e, n) {
  47767. qe(this.option, e, !0);
  47768. }, t.prototype.get = function(e, n) {
  47769. return e == null ? this.option : this._doGet(this.parsePath(e), !n && this.parentModel);
  47770. }, t.prototype.getShallow = function(e, n) {
  47771. var r = this.option, i = r == null ? r : r[e];
  47772. if (i == null && !n) {
  47773. var a = this.parentModel;
  47774. a && (i = a.getShallow(e));
  47775. }
  47776. return i;
  47777. }, t.prototype.getModel = function(e, n) {
  47778. var r = e != null, i = r ? this.parsePath(e) : null, a = r ? this._doGet(i) : this.option;
  47779. return n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(i)), new t(a, n, this.ecModel);
  47780. }, t.prototype.isEmpty = function() {
  47781. return this.option == null;
  47782. }, t.prototype.restoreData = function() {
  47783. }, t.prototype.clone = function() {
  47784. var e = this.constructor;
  47785. return new e(Le(this.option));
  47786. }, t.prototype.parsePath = function(e) {
  47787. return typeof e == "string" ? e.split(".") : e;
  47788. }, t.prototype.resolveParentPath = function(e) {
  47789. return e;
  47790. }, t.prototype.isAnimationEnabled = function() {
  47791. if (!vt.node && this.option) {
  47792. if (this.option.animation != null)
  47793. return !!this.option.animation;
  47794. if (this.parentModel)
  47795. return this.parentModel.isAnimationEnabled();
  47796. }
  47797. }, t.prototype._doGet = function(e, n) {
  47798. var r = this.option;
  47799. if (!e)
  47800. return r;
  47801. for (var i = 0; i < e.length && !(e[i] && (r = r && typeof r == "object" ? r[e[i]] : null, r == null)); i++)
  47802. ;
  47803. return r == null && n && (r = n._doGet(this.resolveParentPath(e), n.parentModel)), r;
  47804. }, t;
  47805. }()
  47806. );
  47807. MR(Nf);
  47808. lRe(Nf);
  47809. xn(Nf, Kke);
  47810. xn(Nf, eLe);
  47811. xn(Nf, hRe);
  47812. xn(Nf, Yke);
  47813. const Wt = Nf;
  47814. var tLe = Math.round(Math.random() * 10);
  47815. function yp(t) {
  47816. return [t || "", tLe++].join("_");
  47817. }
  47818. function nLe(t) {
  47819. var e = {};
  47820. t.registerSubTypeDefaulter = function(n, r) {
  47821. var i = Vo(n);
  47822. e[i.main] = r;
  47823. }, t.determineSubType = function(n, r) {
  47824. var i = r.type;
  47825. if (!i) {
  47826. var a = Vo(n).main;
  47827. t.hasSubTypes(n) && e[a] && (i = e[a](r));
  47828. }
  47829. return i;
  47830. };
  47831. }
  47832. function rLe(t, e) {
  47833. t.topologicalTravel = function(a, o, s, l) {
  47834. if (!a.length)
  47835. return;
  47836. var u = n(o), c = u.graph, f = u.noEntryList, d = {};
  47837. for (k(a, function(y) {
  47838. d[y] = !0;
  47839. }); f.length; ) {
  47840. var h = f.pop(), p = c[h], v = !!d[h];
  47841. v && (s.call(l, h, p.originalDeps.slice()), delete d[h]), k(p.successor, v ? m : g);
  47842. }
  47843. k(d, function() {
  47844. var y = "";
  47845. throw process.env.NODE_ENV !== "production" && (y = ti("Circular dependency may exists: ", d, a, o)), new Error(y);
  47846. });
  47847. function g(y) {
  47848. c[y].entryCount--, c[y].entryCount === 0 && f.push(y);
  47849. }
  47850. function m(y) {
  47851. d[y] = !0, g(y);
  47852. }
  47853. };
  47854. function n(a) {
  47855. var o = {}, s = [];
  47856. return k(a, function(l) {
  47857. var u = r(o, l), c = u.originalDeps = e(l), f = i(c, a);
  47858. u.entryCount = f.length, u.entryCount === 0 && s.push(l), k(f, function(d) {
  47859. et(u.predecessor, d) < 0 && u.predecessor.push(d);
  47860. var h = r(o, d);
  47861. et(h.successor, d) < 0 && h.successor.push(l);
  47862. });
  47863. }), {
  47864. graph: o,
  47865. noEntryList: s
  47866. };
  47867. }
  47868. function r(a, o) {
  47869. return a[o] || (a[o] = {
  47870. predecessor: [],
  47871. successor: []
  47872. }), a[o];
  47873. }
  47874. function i(a, o) {
  47875. var s = [];
  47876. return k(a, function(l) {
  47877. et(o, l) >= 0 && s.push(l);
  47878. }), s;
  47879. }
  47880. }
  47881. function Pu(t, e) {
  47882. return qe(qe({}, t, !0), e, !0);
  47883. }
  47884. const iLe = {
  47885. time: {
  47886. month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  47887. monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  47888. dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  47889. dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  47890. },
  47891. legend: {
  47892. selector: {
  47893. all: "All",
  47894. inverse: "Inv"
  47895. }
  47896. },
  47897. toolbox: {
  47898. brush: {
  47899. title: {
  47900. rect: "Box Select",
  47901. polygon: "Lasso Select",
  47902. lineX: "Horizontally Select",
  47903. lineY: "Vertically Select",
  47904. keep: "Keep Selections",
  47905. clear: "Clear Selections"
  47906. }
  47907. },
  47908. dataView: {
  47909. title: "Data View",
  47910. lang: ["Data View", "Close", "Refresh"]
  47911. },
  47912. dataZoom: {
  47913. title: {
  47914. zoom: "Zoom",
  47915. back: "Zoom Reset"
  47916. }
  47917. },
  47918. magicType: {
  47919. title: {
  47920. line: "Switch to Line Chart",
  47921. bar: "Switch to Bar Chart",
  47922. stack: "Stack",
  47923. tiled: "Tile"
  47924. }
  47925. },
  47926. restore: {
  47927. title: "Restore"
  47928. },
  47929. saveAsImage: {
  47930. title: "Save as Image",
  47931. lang: ["Right Click to Save Image"]
  47932. }
  47933. },
  47934. series: {
  47935. typeNames: {
  47936. pie: "Pie chart",
  47937. bar: "Bar chart",
  47938. line: "Line chart",
  47939. scatter: "Scatter plot",
  47940. effectScatter: "Ripple scatter plot",
  47941. radar: "Radar chart",
  47942. tree: "Tree",
  47943. treemap: "Treemap",
  47944. boxplot: "Boxplot",
  47945. candlestick: "Candlestick",
  47946. k: "K line chart",
  47947. heatmap: "Heat map",
  47948. map: "Map",
  47949. parallel: "Parallel coordinate map",
  47950. lines: "Line graph",
  47951. graph: "Relationship graph",
  47952. sankey: "Sankey diagram",
  47953. funnel: "Funnel chart",
  47954. gauge: "Gauge",
  47955. pictorialBar: "Pictorial bar",
  47956. themeRiver: "Theme River Map",
  47957. sunburst: "Sunburst",
  47958. custom: "Custom chart",
  47959. chart: "Chart"
  47960. }
  47961. },
  47962. aria: {
  47963. general: {
  47964. withTitle: 'This is a chart about "{title}"',
  47965. withoutTitle: "This is a chart"
  47966. },
  47967. series: {
  47968. single: {
  47969. prefix: "",
  47970. withName: " with type {seriesType} named {seriesName}.",
  47971. withoutName: " with type {seriesType}."
  47972. },
  47973. multiple: {
  47974. prefix: ". It consists of {seriesCount} series count.",
  47975. withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
  47976. withoutName: " The {seriesId} series is a {seriesType}.",
  47977. separator: {
  47978. middle: "",
  47979. end: ""
  47980. }
  47981. }
  47982. },
  47983. data: {
  47984. allData: "The data is as follows: ",
  47985. partialData: "The first {displayCnt} items are: ",
  47986. withName: "the data for {name} is {value}",
  47987. withoutName: "{value}",
  47988. separator: {
  47989. middle: ", ",
  47990. end: ". "
  47991. }
  47992. }
  47993. }
  47994. }, aLe = {
  47995. time: {
  47996. month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  47997. monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  47998. dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  47999. dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  48000. },
  48001. legend: {
  48002. selector: {
  48003. all: "全选",
  48004. inverse: "反选"
  48005. }
  48006. },
  48007. toolbox: {
  48008. brush: {
  48009. title: {
  48010. rect: "矩形选择",
  48011. polygon: "圈选",
  48012. lineX: "横向选择",
  48013. lineY: "纵向选择",
  48014. keep: "保持选择",
  48015. clear: "清除选择"
  48016. }
  48017. },
  48018. dataView: {
  48019. title: "数据视图",
  48020. lang: ["数据视图", "关闭", "刷新"]
  48021. },
  48022. dataZoom: {
  48023. title: {
  48024. zoom: "区域缩放",
  48025. back: "区域缩放还原"
  48026. }
  48027. },
  48028. magicType: {
  48029. title: {
  48030. line: "切换为折线图",
  48031. bar: "切换为柱状图",
  48032. stack: "切换为堆叠",
  48033. tiled: "切换为平铺"
  48034. }
  48035. },
  48036. restore: {
  48037. title: "还原"
  48038. },
  48039. saveAsImage: {
  48040. title: "保存为图片",
  48041. lang: ["右键另存为图片"]
  48042. }
  48043. },
  48044. series: {
  48045. typeNames: {
  48046. pie: "饼图",
  48047. bar: "柱状图",
  48048. line: "折线图",
  48049. scatter: "散点图",
  48050. effectScatter: "涟漪散点图",
  48051. radar: "雷达图",
  48052. tree: "树图",
  48053. treemap: "矩形树图",
  48054. boxplot: "箱型图",
  48055. candlestick: "K线图",
  48056. k: "K线图",
  48057. heatmap: "热力图",
  48058. map: "地图",
  48059. parallel: "平行坐标图",
  48060. lines: "线图",
  48061. graph: "关系图",
  48062. sankey: "桑基图",
  48063. funnel: "漏斗图",
  48064. gauge: "仪表盘图",
  48065. pictorialBar: "象形柱图",
  48066. themeRiver: "主题河流图",
  48067. sunburst: "旭日图",
  48068. custom: "自定义图表",
  48069. chart: "图表"
  48070. }
  48071. },
  48072. aria: {
  48073. general: {
  48074. withTitle: "这是一个关于“{title}”的图表。",
  48075. withoutTitle: "这是一个图表,"
  48076. },
  48077. series: {
  48078. single: {
  48079. prefix: "",
  48080. withName: "图表类型是{seriesType},表示{seriesName}。",
  48081. withoutName: "图表类型是{seriesType}。"
  48082. },
  48083. multiple: {
  48084. prefix: "它由{seriesCount}个图表系列组成。",
  48085. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  48086. withoutName: "第{seriesId}个系列是一个{seriesType},",
  48087. separator: {
  48088. middle: ";",
  48089. end: "。"
  48090. }
  48091. }
  48092. },
  48093. data: {
  48094. allData: "其数据是——",
  48095. partialData: "其中,前{displayCnt}项是——",
  48096. withName: "{name}的数据是{value}",
  48097. withoutName: "{value}",
  48098. separator: {
  48099. middle: ",",
  48100. end: ""
  48101. }
  48102. }
  48103. }
  48104. };
  48105. var fO = "ZH", jR = "EN", nh = jR, Q_ = {}, ZR = {}, gJ = vt.domSupported ? function() {
  48106. var t = (
  48107. /* eslint-disable-next-line */
  48108. (document.documentElement.lang || navigator.language || navigator.browserLanguage || nh).toUpperCase()
  48109. );
  48110. return t.indexOf(fO) > -1 ? fO : nh;
  48111. }() : nh;
  48112. function UR(t, e) {
  48113. t = t.toUpperCase(), ZR[t] = new Wt(e), Q_[t] = e;
  48114. }
  48115. function oLe(t) {
  48116. if (Oe(t)) {
  48117. var e = Q_[t.toUpperCase()] || {};
  48118. return t === fO || t === jR ? Le(e) : qe(Le(e), Le(Q_[nh]), !1);
  48119. } else
  48120. return qe(Le(t), Le(Q_[nh]), !1);
  48121. }
  48122. function zA(t) {
  48123. return ZR[t];
  48124. }
  48125. function sLe() {
  48126. return ZR[nh];
  48127. }
  48128. UR(jR, iLe);
  48129. UR(fO, aLe);
  48130. var XR = 1e3, YR = XR * 60, Ig = YR * 60, va = Ig * 24, ZB = va * 365, jv = {
  48131. year: "{yyyy}",
  48132. month: "{MMM}",
  48133. day: "{d}",
  48134. hour: "{HH}:{mm}",
  48135. minute: "{HH}:{mm}",
  48136. second: "{HH}:{mm}:{ss}",
  48137. millisecond: "{HH}:{mm}:{ss} {SSS}",
  48138. none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
  48139. }, rb = "{yyyy}-{MM}-{dd}", UB = {
  48140. year: "{yyyy}",
  48141. month: "{yyyy}-{MM}",
  48142. day: rb,
  48143. hour: rb + " " + jv.hour,
  48144. minute: rb + " " + jv.minute,
  48145. second: rb + " " + jv.second,
  48146. millisecond: jv.none
  48147. }, CT = ["year", "month", "day", "hour", "minute", "second", "millisecond"], mJ = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
  48148. function Qr(t, e) {
  48149. return t += "", "0000".substr(0, e - t.length) + t;
  48150. }
  48151. function rh(t) {
  48152. switch (t) {
  48153. case "half-year":
  48154. case "quarter":
  48155. return "month";
  48156. case "week":
  48157. case "half-week":
  48158. return "day";
  48159. case "half-day":
  48160. case "quarter-day":
  48161. return "hour";
  48162. default:
  48163. return t;
  48164. }
  48165. }
  48166. function lLe(t) {
  48167. return t === rh(t);
  48168. }
  48169. function uLe(t) {
  48170. switch (t) {
  48171. case "year":
  48172. case "month":
  48173. return "day";
  48174. case "millisecond":
  48175. return "millisecond";
  48176. default:
  48177. return "second";
  48178. }
  48179. }
  48180. function Q0(t, e, n, r) {
  48181. var i = Yi(t), a = i[qR(n)](), o = i[ih(n)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = i[tw(n)](), u = i["get" + (n ? "UTC" : "") + "Day"](), c = i[Cm(n)](), f = (c - 1) % 12 + 1, d = i[nw(n)](), h = i[rw(n)](), p = i[iw(n)](), v = c >= 12 ? "pm" : "am", g = v.toUpperCase(), m = r instanceof Wt ? r : zA(r || gJ) || sLe(), y = m.getModel("time"), b = y.get("month"), _ = y.get("monthAbbr"), O = y.get("dayOfWeek"), S = y.get("dayOfWeekAbbr");
  48182. return (e || "").replace(/{a}/g, v + "").replace(/{A}/g, g + "").replace(/{yyyy}/g, a + "").replace(/{yy}/g, Qr(a % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, b[o - 1]).replace(/{MMM}/g, _[o - 1]).replace(/{MM}/g, Qr(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Qr(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, O[u]).replace(/{ee}/g, S[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Qr(c, 2)).replace(/{H}/g, c + "").replace(/{hh}/g, Qr(f + "", 2)).replace(/{h}/g, f + "").replace(/{mm}/g, Qr(d, 2)).replace(/{m}/g, d + "").replace(/{ss}/g, Qr(h, 2)).replace(/{s}/g, h + "").replace(/{SSS}/g, Qr(p, 3)).replace(/{S}/g, p + "");
  48183. }
  48184. function cLe(t, e, n, r, i) {
  48185. var a = null;
  48186. if (Oe(n))
  48187. a = n;
  48188. else if (Me(n))
  48189. a = n(t.value, e, {
  48190. level: t.level
  48191. });
  48192. else {
  48193. var o = le({}, jv);
  48194. if (t.level > 0)
  48195. for (var s = 0; s < CT.length; ++s)
  48196. o[CT[s]] = "{primary|" + o[CT[s]] + "}";
  48197. var l = n ? n.inherit === !1 ? n : Re(n, o) : o, u = yJ(t.value, i);
  48198. if (l[u])
  48199. a = l[u];
  48200. else if (l.inherit) {
  48201. for (var c = mJ.indexOf(u), s = c - 1; s >= 0; --s)
  48202. if (l[u]) {
  48203. a = l[u];
  48204. break;
  48205. }
  48206. a = a || o.none;
  48207. }
  48208. if (ue(a)) {
  48209. var f = t.level == null ? 0 : t.level >= 0 ? t.level : a.length + t.level;
  48210. f = Math.min(f, a.length - 1), a = a[f];
  48211. }
  48212. }
  48213. return Q0(new Date(t.value), a, i, r);
  48214. }
  48215. function yJ(t, e) {
  48216. var n = Yi(t), r = n[ih(e)]() + 1, i = n[tw(e)](), a = n[Cm(e)](), o = n[nw(e)](), s = n[rw(e)](), l = n[iw(e)](), u = l === 0, c = u && s === 0, f = c && o === 0, d = f && a === 0, h = d && i === 1, p = h && r === 1;
  48217. return p ? "year" : h ? "month" : d ? "day" : f ? "hour" : c ? "minute" : u ? "second" : "millisecond";
  48218. }
  48219. function XB(t, e, n) {
  48220. var r = St(t) ? Yi(t) : t;
  48221. switch (e = e || yJ(t, n), e) {
  48222. case "year":
  48223. return r[qR(n)]();
  48224. case "half-year":
  48225. return r[ih(n)]() >= 6 ? 1 : 0;
  48226. case "quarter":
  48227. return Math.floor((r[ih(n)]() + 1) / 4);
  48228. case "month":
  48229. return r[ih(n)]();
  48230. case "day":
  48231. return r[tw(n)]();
  48232. case "half-day":
  48233. return r[Cm(n)]() / 24;
  48234. case "hour":
  48235. return r[Cm(n)]();
  48236. case "minute":
  48237. return r[nw(n)]();
  48238. case "second":
  48239. return r[rw(n)]();
  48240. case "millisecond":
  48241. return r[iw(n)]();
  48242. }
  48243. }
  48244. function qR(t) {
  48245. return t ? "getUTCFullYear" : "getFullYear";
  48246. }
  48247. function ih(t) {
  48248. return t ? "getUTCMonth" : "getMonth";
  48249. }
  48250. function tw(t) {
  48251. return t ? "getUTCDate" : "getDate";
  48252. }
  48253. function Cm(t) {
  48254. return t ? "getUTCHours" : "getHours";
  48255. }
  48256. function nw(t) {
  48257. return t ? "getUTCMinutes" : "getMinutes";
  48258. }
  48259. function rw(t) {
  48260. return t ? "getUTCSeconds" : "getSeconds";
  48261. }
  48262. function iw(t) {
  48263. return t ? "getUTCMilliseconds" : "getMilliseconds";
  48264. }
  48265. function fLe(t) {
  48266. return t ? "setUTCFullYear" : "setFullYear";
  48267. }
  48268. function bJ(t) {
  48269. return t ? "setUTCMonth" : "setMonth";
  48270. }
  48271. function _J(t) {
  48272. return t ? "setUTCDate" : "setDate";
  48273. }
  48274. function OJ(t) {
  48275. return t ? "setUTCHours" : "setHours";
  48276. }
  48277. function SJ(t) {
  48278. return t ? "setUTCMinutes" : "setMinutes";
  48279. }
  48280. function xJ(t) {
  48281. return t ? "setUTCSeconds" : "setSeconds";
  48282. }
  48283. function wJ(t) {
  48284. return t ? "setUTCMilliseconds" : "setMilliseconds";
  48285. }
  48286. function dLe(t, e, n, r, i, a, o, s) {
  48287. var l = new gt({
  48288. style: {
  48289. text: t,
  48290. font: e,
  48291. align: n,
  48292. verticalAlign: r,
  48293. padding: i,
  48294. rich: a,
  48295. overflow: o ? "truncate" : null,
  48296. lineHeight: s
  48297. }
  48298. });
  48299. return l.getBoundingRect();
  48300. }
  48301. function KR(t) {
  48302. if (!Fx(t))
  48303. return Oe(t) ? t : "-";
  48304. var e = (t + "").split(".");
  48305. return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
  48306. }
  48307. function JR(t, e) {
  48308. return t = (t || "").toLowerCase().replace(/-(.)/g, function(n, r) {
  48309. return r.toUpperCase();
  48310. }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
  48311. }
  48312. var Bf = kx;
  48313. function VA(t, e, n) {
  48314. var r = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
  48315. function i(c) {
  48316. return c && ma(c) ? c : "-";
  48317. }
  48318. function a(c) {
  48319. return !!(c != null && !isNaN(c) && isFinite(c));
  48320. }
  48321. var o = e === "time", s = t instanceof Date;
  48322. if (o || s) {
  48323. var l = o ? Yi(t) : t;
  48324. if (isNaN(+l)) {
  48325. if (s)
  48326. return "-";
  48327. } else return Q0(l, r, n);
  48328. }
  48329. if (e === "ordinal")
  48330. return pm(t) ? i(t) : St(t) && a(t) ? t + "" : "-";
  48331. var u = is(t);
  48332. return a(u) ? KR(u) : pm(t) ? i(t) : typeof t == "boolean" ? t + "" : "-";
  48333. }
  48334. var YB = ["a", "b", "c", "d", "e", "f", "g"], TT = function(t, e) {
  48335. return "{" + t + (e ?? "") + "}";
  48336. };
  48337. function ek(t, e, n) {
  48338. ue(e) || (e = [e]);
  48339. var r = e.length;
  48340. if (!r)
  48341. return "";
  48342. for (var i = e[0].$vars || [], a = 0; a < i.length; a++) {
  48343. var o = YB[a];
  48344. t = t.replace(TT(o), TT(o, 0));
  48345. }
  48346. for (var s = 0; s < r; s++)
  48347. for (var l = 0; l < i.length; l++) {
  48348. var u = e[s][i[l]];
  48349. t = t.replace(TT(YB[l], s), n ? Gr(u) : u);
  48350. }
  48351. return t;
  48352. }
  48353. function hLe(t, e, n) {
  48354. return k(e, function(r, i) {
  48355. t = t.replace("{" + i + "}", r);
  48356. }), t;
  48357. }
  48358. function CJ(t, e) {
  48359. var n = Oe(t) ? {
  48360. color: t,
  48361. extraCssText: e
  48362. } : t || {}, r = n.color, i = n.type;
  48363. e = n.extraCssText;
  48364. var a = n.renderMode || "html";
  48365. if (!r)
  48366. return "";
  48367. if (a === "html")
  48368. return i === "subItem" ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + Gr(r) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + Gr(r) + ";" + (e || "") + '"></span>';
  48369. var o = n.markerId || "markerX";
  48370. return {
  48371. renderMode: a,
  48372. content: "{" + o + "|} ",
  48373. style: i === "subItem" ? {
  48374. width: 4,
  48375. height: 4,
  48376. borderRadius: 2,
  48377. backgroundColor: r
  48378. } : {
  48379. width: 10,
  48380. height: 10,
  48381. borderRadius: 5,
  48382. backgroundColor: r
  48383. }
  48384. };
  48385. }
  48386. function pLe(t, e, n) {
  48387. process.env.NODE_ENV !== "production" && Cn("echarts.format.formatTime", "echarts.time.format"), (t === "week" || t === "month" || t === "quarter" || t === "half-year" || t === "year") && (t = `MM-dd
  48388. yyyy`);
  48389. var r = Yi(e), i = n ? "getUTC" : "get", a = r[i + "FullYear"](), o = r[i + "Month"]() + 1, s = r[i + "Date"](), l = r[i + "Hours"](), u = r[i + "Minutes"](), c = r[i + "Seconds"](), f = r[i + "Milliseconds"]();
  48390. return t = t.replace("MM", Qr(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", Qr(a % 100 + "", 2)).replace("dd", Qr(s, 2)).replace("d", s).replace("hh", Qr(l, 2)).replace("h", l).replace("mm", Qr(u, 2)).replace("m", u).replace("ss", Qr(c, 2)).replace("s", c).replace("SSS", Qr(f, 3)), t;
  48391. }
  48392. function vLe(t) {
  48393. return t && t.charAt(0).toUpperCase() + t.substr(1);
  48394. }
  48395. function _f(t, e) {
  48396. return e = e || "transparent", Oe(t) ? t : Ie(t) && t.colorStops && (t.colorStops[0] || {}).color || e;
  48397. }
  48398. function dO(t, e) {
  48399. if (e === "_blank" || e === "blank") {
  48400. var n = window.open();
  48401. n.opener = null, n.location.href = t;
  48402. } else
  48403. window.open(t, e);
  48404. }
  48405. var H_ = k, TJ = ["left", "right", "top", "bottom", "width", "height"], Nc = [["width", "left", "right"], ["height", "top", "bottom"]];
  48406. function tk(t, e, n, r, i) {
  48407. var a = 0, o = 0;
  48408. r == null && (r = 1 / 0), i == null && (i = 1 / 0);
  48409. var s = 0;
  48410. e.eachChild(function(l, u) {
  48411. var c = l.getBoundingRect(), f = e.childAt(u + 1), d = f && f.getBoundingRect(), h, p;
  48412. if (t === "horizontal") {
  48413. var v = c.width + (d ? -d.x + c.x : 0);
  48414. h = a + v, h > r || l.newline ? (a = 0, h = v, o += s + n, s = c.height) : s = Math.max(s, c.height);
  48415. } else {
  48416. var g = c.height + (d ? -d.y + c.y : 0);
  48417. p = o + g, p > i || l.newline ? (a += s + n, o = 0, p = g, s = c.width) : s = Math.max(s, c.width);
  48418. }
  48419. l.newline || (l.x = a, l.y = o, l.markRedraw(), t === "horizontal" ? a = h + n : o = p + n);
  48420. });
  48421. }
  48422. var ef = tk;
  48423. Ue(tk, "vertical");
  48424. Ue(tk, "horizontal");
  48425. function gLe(t, e, n) {
  48426. var r = e.width, i = e.height, a = _e(t.left, r), o = _e(t.top, i), s = _e(t.right, r), l = _e(t.bottom, i);
  48427. return (isNaN(a) || isNaN(parseFloat(t.left))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.right))) && (s = r), (isNaN(o) || isNaN(parseFloat(t.top))) && (o = 0), (isNaN(l) || isNaN(parseFloat(t.bottom))) && (l = i), n = Bf(n || 0), {
  48428. width: Math.max(s - a - n[1] - n[3], 0),
  48429. height: Math.max(l - o - n[0] - n[2], 0)
  48430. };
  48431. }
  48432. function Rn(t, e, n) {
  48433. n = Bf(n || 0);
  48434. var r = e.width, i = e.height, a = _e(t.left, r), o = _e(t.top, i), s = _e(t.right, r), l = _e(t.bottom, i), u = _e(t.width, r), c = _e(t.height, i), f = n[2] + n[0], d = n[1] + n[3], h = t.aspect;
  48435. switch (isNaN(u) && (u = r - s - d - a), isNaN(c) && (c = i - l - f - o), h != null && (isNaN(u) && isNaN(c) && (h > r / i ? u = r * 0.8 : c = i * 0.8), isNaN(u) && (u = h * c), isNaN(c) && (c = u / h)), isNaN(a) && (a = r - s - u - d), isNaN(o) && (o = i - l - c - f), t.left || t.right) {
  48436. case "center":
  48437. a = r / 2 - u / 2 - n[3];
  48438. break;
  48439. case "right":
  48440. a = r - u - d;
  48441. break;
  48442. }
  48443. switch (t.top || t.bottom) {
  48444. case "middle":
  48445. case "center":
  48446. o = i / 2 - c / 2 - n[0];
  48447. break;
  48448. case "bottom":
  48449. o = i - c - f;
  48450. break;
  48451. }
  48452. a = a || 0, o = o || 0, isNaN(u) && (u = r - d - a - (s || 0)), isNaN(c) && (c = i - f - o - (l || 0));
  48453. var p = new Je(a + n[3], o + n[0], u, c);
  48454. return p.margin = n, p;
  48455. }
  48456. function aw(t, e, n, r, i, a) {
  48457. var o = !i || !i.hv || i.hv[0], s = !i || !i.hv || i.hv[1], l = i && i.boundingMode || "all";
  48458. if (a = a || t, a.x = t.x, a.y = t.y, !o && !s)
  48459. return !1;
  48460. var u;
  48461. if (l === "raw")
  48462. u = t.type === "group" ? new Je(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  48463. else if (u = t.getBoundingRect(), t.needLocalTransform()) {
  48464. var c = t.getLocalTransform();
  48465. u = u.clone(), u.applyTransform(c);
  48466. }
  48467. var f = Rn(Re({
  48468. width: u.width,
  48469. height: u.height
  48470. }, e), n, r), d = o ? f.x - u.x : 0, h = s ? f.y - u.y : 0;
  48471. return l === "raw" ? (a.x = d, a.y = h) : (a.x += d, a.y += h), a === t && t.markRedraw(), !0;
  48472. }
  48473. function mLe(t, e) {
  48474. return t[Nc[e][0]] != null || t[Nc[e][1]] != null && t[Nc[e][2]] != null;
  48475. }
  48476. function Tm(t) {
  48477. var e = t.layoutMode || t.constructor.layoutMode;
  48478. return Ie(e) ? e : e ? {
  48479. type: e
  48480. } : null;
  48481. }
  48482. function cu(t, e, n) {
  48483. var r = n && n.ignoreSize;
  48484. !ue(r) && (r = [r, r]);
  48485. var i = o(Nc[0], 0), a = o(Nc[1], 1);
  48486. u(Nc[0], t, i), u(Nc[1], t, a);
  48487. function o(c, f) {
  48488. var d = {}, h = 0, p = {}, v = 0, g = 2;
  48489. if (H_(c, function(b) {
  48490. p[b] = t[b];
  48491. }), H_(c, function(b) {
  48492. s(e, b) && (d[b] = p[b] = e[b]), l(d, b) && h++, l(p, b) && v++;
  48493. }), r[f])
  48494. return l(e, c[1]) ? p[c[2]] = null : l(e, c[2]) && (p[c[1]] = null), p;
  48495. if (v === g || !h)
  48496. return p;
  48497. if (h >= g)
  48498. return d;
  48499. for (var m = 0; m < c.length; m++) {
  48500. var y = c[m];
  48501. if (!s(d, y) && s(t, y)) {
  48502. d[y] = t[y];
  48503. break;
  48504. }
  48505. }
  48506. return d;
  48507. }
  48508. function s(c, f) {
  48509. return c.hasOwnProperty(f);
  48510. }
  48511. function l(c, f) {
  48512. return c[f] != null && c[f] !== "auto";
  48513. }
  48514. function u(c, f, d) {
  48515. H_(c, function(h) {
  48516. f[h] = d[h];
  48517. });
  48518. }
  48519. }
  48520. function bp(t) {
  48521. return PJ({}, t);
  48522. }
  48523. function PJ(t, e) {
  48524. return e && t && H_(TJ, function(n) {
  48525. e.hasOwnProperty(n) && (t[n] = e[n]);
  48526. }), t;
  48527. }
  48528. var yLe = bt(), rt = (
  48529. /** @class */
  48530. function(t) {
  48531. q(e, t);
  48532. function e(n, r, i) {
  48533. var a = t.call(this, n, r, i) || this;
  48534. return a.uid = yp("ec_cpt_model"), a;
  48535. }
  48536. return e.prototype.init = function(n, r, i) {
  48537. this.mergeDefaultAndTheme(n, i);
  48538. }, e.prototype.mergeDefaultAndTheme = function(n, r) {
  48539. var i = Tm(this), a = i ? bp(n) : {}, o = r.getTheme();
  48540. qe(n, o.get(this.mainType)), qe(n, this.getDefaultOption()), i && cu(n, a, i);
  48541. }, e.prototype.mergeOption = function(n, r) {
  48542. qe(this.option, n, !0);
  48543. var i = Tm(this);
  48544. i && cu(this.option, n, i);
  48545. }, e.prototype.optionUpdated = function(n, r) {
  48546. }, e.prototype.getDefaultOption = function() {
  48547. var n = this.constructor;
  48548. if (!aRe(n))
  48549. return n.defaultOption;
  48550. var r = yLe(this);
  48551. if (!r.defaultOption) {
  48552. for (var i = [], a = n; a; ) {
  48553. var o = a.prototype.defaultOption;
  48554. o && i.push(o), a = a.superClass;
  48555. }
  48556. for (var s = {}, l = i.length - 1; l >= 0; l--)
  48557. s = qe(s, i[l], !0);
  48558. r.defaultOption = s;
  48559. }
  48560. return r.defaultOption;
  48561. }, e.prototype.getReferringComponents = function(n, r) {
  48562. var i = n + "Index", a = n + "Id";
  48563. return N0(this.ecModel, n, {
  48564. index: this.get(i, !0),
  48565. id: this.get(a, !0)
  48566. }, r);
  48567. }, e.prototype.getBoxLayoutParams = function() {
  48568. var n = this;
  48569. return {
  48570. left: n.get("left"),
  48571. top: n.get("top"),
  48572. right: n.get("right"),
  48573. bottom: n.get("bottom"),
  48574. width: n.get("width"),
  48575. height: n.get("height")
  48576. };
  48577. }, e.prototype.getZLevelKey = function() {
  48578. return "";
  48579. }, e.prototype.setZLevel = function(n) {
  48580. this.option.zlevel = n;
  48581. }, e.protoInitialize = function() {
  48582. var n = e.prototype;
  48583. n.type = "component", n.id = "", n.name = "", n.mainType = "", n.subType = "", n.componentIndex = 0;
  48584. }(), e;
  48585. }(Wt)
  48586. );
  48587. yK(rt, Wt);
  48588. Qx(rt);
  48589. nLe(rt);
  48590. rLe(rt, bLe);
  48591. function bLe(t) {
  48592. var e = [];
  48593. return k(rt.getClassesByMainType(t), function(n) {
  48594. e = e.concat(n.dependencies || n.prototype.dependencies || []);
  48595. }), e = ce(e, function(n) {
  48596. return Vo(n).main;
  48597. }), t !== "dataset" && et(e, "dataset") <= 0 && e.unshift("dataset"), e;
  48598. }
  48599. var $J = "";
  48600. typeof navigator < "u" && ($J = navigator.platform || "");
  48601. var sd = "rgba(0, 0, 0, 0.2)";
  48602. const _Le = {
  48603. darkMode: "auto",
  48604. // backgroundColor: 'rgba(0,0,0,0)',
  48605. colorBy: "series",
  48606. color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
  48607. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  48608. aria: {
  48609. decal: {
  48610. decals: [{
  48611. color: sd,
  48612. dashArrayX: [1, 0],
  48613. dashArrayY: [2, 5],
  48614. symbolSize: 1,
  48615. rotation: Math.PI / 6
  48616. }, {
  48617. color: sd,
  48618. symbol: "circle",
  48619. dashArrayX: [[8, 8], [0, 8, 8, 0]],
  48620. dashArrayY: [6, 0],
  48621. symbolSize: 0.8
  48622. }, {
  48623. color: sd,
  48624. dashArrayX: [1, 0],
  48625. dashArrayY: [4, 3],
  48626. rotation: -Math.PI / 4
  48627. }, {
  48628. color: sd,
  48629. dashArrayX: [[6, 6], [0, 6, 6, 0]],
  48630. dashArrayY: [6, 0]
  48631. }, {
  48632. color: sd,
  48633. dashArrayX: [[1, 0], [1, 6]],
  48634. dashArrayY: [1, 0, 6, 0],
  48635. rotation: Math.PI / 4
  48636. }, {
  48637. color: sd,
  48638. symbol: "triangle",
  48639. dashArrayX: [[9, 9], [0, 9, 9, 0]],
  48640. dashArrayY: [7, 2],
  48641. symbolSize: 0.75
  48642. }]
  48643. }
  48644. },
  48645. // If xAxis and yAxis declared, grid is created by default.
  48646. // grid: {},
  48647. textStyle: {
  48648. // color: '#000',
  48649. // decoration: 'none',
  48650. // PENDING
  48651. fontFamily: $J.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  48652. // fontFamily: 'Arial, Verdana, sans-serif',
  48653. fontSize: 12,
  48654. fontStyle: "normal",
  48655. fontWeight: "normal"
  48656. },
  48657. // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/
  48658. // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
  48659. // Default is source-over
  48660. blendMode: null,
  48661. stateAnimation: {
  48662. duration: 300,
  48663. easing: "cubicOut"
  48664. },
  48665. animation: "auto",
  48666. animationDuration: 1e3,
  48667. animationDurationUpdate: 500,
  48668. animationEasing: "cubicInOut",
  48669. animationEasingUpdate: "cubicInOut",
  48670. animationThreshold: 2e3,
  48671. // Configuration for progressive/incremental rendering
  48672. progressiveThreshold: 3e3,
  48673. progressive: 400,
  48674. // Threshold of if use single hover layer to optimize.
  48675. // It is recommended that `hoverLayerThreshold` is equivalent to or less than
  48676. // `progressiveThreshold`, otherwise hover will cause restart of progressive,
  48677. // which is unexpected.
  48678. // see example <echarts/test/heatmap-large.html>.
  48679. hoverLayerThreshold: 3e3,
  48680. // See: module:echarts/scale/Time
  48681. useUTC: !1
  48682. };
  48683. var FA = Pe(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"]), La = "original", Br = "arrayRows", Na = "objectRows", ls = "keyedColumns", Ds = "typedArray", AJ = "unknown", Xo = "column", _p = "row", cr = {
  48684. Must: 1,
  48685. Might: 2,
  48686. Not: 3
  48687. // Other cases
  48688. }, EJ = bt();
  48689. function OLe(t) {
  48690. EJ(t).datasetMap = Pe();
  48691. }
  48692. function MJ(t, e, n) {
  48693. var r = {}, i = rk(e);
  48694. if (!i || !t)
  48695. return r;
  48696. var a = [], o = [], s = e.ecModel, l = EJ(s).datasetMap, u = i.uid + "_" + n.seriesLayoutBy, c, f;
  48697. t = t.slice(), k(t, function(v, g) {
  48698. var m = Ie(v) ? v : t[g] = {
  48699. name: v
  48700. };
  48701. m.type === "ordinal" && c == null && (c = g, f = p(m)), r[m.name] = [];
  48702. });
  48703. var d = l.get(u) || l.set(u, {
  48704. categoryWayDim: f,
  48705. valueWayDim: 0
  48706. });
  48707. k(t, function(v, g) {
  48708. var m = v.name, y = p(v);
  48709. if (c == null) {
  48710. var b = d.valueWayDim;
  48711. h(r[m], b, y), h(o, b, y), d.valueWayDim += y;
  48712. } else if (c === g)
  48713. h(r[m], 0, y), h(a, 0, y);
  48714. else {
  48715. var b = d.categoryWayDim;
  48716. h(r[m], b, y), h(o, b, y), d.categoryWayDim += y;
  48717. }
  48718. });
  48719. function h(v, g, m) {
  48720. for (var y = 0; y < m; y++)
  48721. v.push(g + y);
  48722. }
  48723. function p(v) {
  48724. var g = v.dimsDef;
  48725. return g ? g.length : 1;
  48726. }
  48727. return a.length && (r.itemName = a), o.length && (r.seriesName = o), r;
  48728. }
  48729. function nk(t, e, n) {
  48730. var r = {}, i = rk(t);
  48731. if (!i)
  48732. return r;
  48733. var a = e.sourceFormat, o = e.dimensionsDefine, s;
  48734. (a === Na || a === ls) && k(o, function(c, f) {
  48735. (Ie(c) ? c.name : c) === "name" && (s = f);
  48736. });
  48737. var l = function() {
  48738. for (var c = {}, f = {}, d = [], h = 0, p = Math.min(5, n); h < p; h++) {
  48739. var v = DJ(e.data, a, e.seriesLayoutBy, o, e.startIndex, h);
  48740. d.push(v);
  48741. var g = v === cr.Not;
  48742. if (g && c.v == null && h !== s && (c.v = h), (c.n == null || c.n === c.v || !g && d[c.n] === cr.Not) && (c.n = h), m(c) && d[c.n] !== cr.Not)
  48743. return c;
  48744. g || (v === cr.Might && f.v == null && h !== s && (f.v = h), (f.n == null || f.n === f.v) && (f.n = h));
  48745. }
  48746. function m(y) {
  48747. return y.v != null && y.n != null;
  48748. }
  48749. return m(c) ? c : m(f) ? f : null;
  48750. }();
  48751. if (l) {
  48752. r.value = [l.v];
  48753. var u = s ?? l.n;
  48754. r.itemName = [u], r.seriesName = [u];
  48755. }
  48756. return r;
  48757. }
  48758. function rk(t) {
  48759. var e = t.get("data", !0);
  48760. if (!e)
  48761. return N0(t.ecModel, "dataset", {
  48762. index: t.get("datasetIndex", !0),
  48763. id: t.get("datasetId", !0)
  48764. }, Dn).models[0];
  48765. }
  48766. function SLe(t) {
  48767. return !t.get("transform", !0) && !t.get("fromTransformResult", !0) ? [] : N0(t.ecModel, "dataset", {
  48768. index: t.get("fromDatasetIndex", !0),
  48769. id: t.get("fromDatasetId", !0)
  48770. }, Dn).models;
  48771. }
  48772. function IJ(t, e) {
  48773. return DJ(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
  48774. }
  48775. function DJ(t, e, n, r, i, a) {
  48776. var o, s = 5;
  48777. if (Nr(t))
  48778. return cr.Not;
  48779. var l, u;
  48780. if (r) {
  48781. var c = r[a];
  48782. Ie(c) ? (l = c.name, u = c.type) : Oe(c) && (l = c);
  48783. }
  48784. if (u != null)
  48785. return u === "ordinal" ? cr.Must : cr.Not;
  48786. if (e === Br) {
  48787. var f = t;
  48788. if (n === _p) {
  48789. for (var d = f[a], h = 0; h < (d || []).length && h < s; h++)
  48790. if ((o = _(d[i + h])) != null)
  48791. return o;
  48792. } else
  48793. for (var h = 0; h < f.length && h < s; h++) {
  48794. var p = f[i + h];
  48795. if (p && (o = _(p[a])) != null)
  48796. return o;
  48797. }
  48798. } else if (e === Na) {
  48799. var v = t;
  48800. if (!l)
  48801. return cr.Not;
  48802. for (var h = 0; h < v.length && h < s; h++) {
  48803. var g = v[h];
  48804. if (g && (o = _(g[l])) != null)
  48805. return o;
  48806. }
  48807. } else if (e === ls) {
  48808. var m = t;
  48809. if (!l)
  48810. return cr.Not;
  48811. var d = m[l];
  48812. if (!d || Nr(d))
  48813. return cr.Not;
  48814. for (var h = 0; h < d.length && h < s; h++)
  48815. if ((o = _(d[h])) != null)
  48816. return o;
  48817. } else if (e === La)
  48818. for (var y = t, h = 0; h < y.length && h < s; h++) {
  48819. var g = y[h], b = fp(g);
  48820. if (!ue(b))
  48821. return cr.Not;
  48822. if ((o = _(b[a])) != null)
  48823. return o;
  48824. }
  48825. function _(O) {
  48826. var S = Oe(O);
  48827. if (O != null && Number.isFinite(Number(O)) && O !== "")
  48828. return S ? cr.Might : cr.Not;
  48829. if (S && O !== "-")
  48830. return cr.Must;
  48831. }
  48832. return cr.Not;
  48833. }
  48834. var WA = Pe();
  48835. function xLe(t, e) {
  48836. ke(WA.get(t) == null && e), WA.set(t, e);
  48837. }
  48838. function wLe(t, e, n) {
  48839. var r = WA.get(e);
  48840. if (!r)
  48841. return n;
  48842. var i = r(t);
  48843. if (!i)
  48844. return n;
  48845. if (process.env.NODE_ENV !== "production")
  48846. for (var a = 0; a < i.length; a++)
  48847. ke(Nh(i[a]));
  48848. return n.concat(i);
  48849. }
  48850. var qB = bt(), CLe = bt(), ik = (
  48851. /** @class */
  48852. function() {
  48853. function t() {
  48854. }
  48855. return t.prototype.getColorFromPalette = function(e, n, r) {
  48856. var i = Qt(this.get("color", !0)), a = this.get("colorLayer", !0);
  48857. return RJ(this, qB, i, a, e, n, r);
  48858. }, t.prototype.clearColorPalette = function() {
  48859. PLe(this, qB);
  48860. }, t;
  48861. }()
  48862. );
  48863. function QA(t, e, n, r) {
  48864. var i = Qt(t.get(["aria", "decal", "decals"]));
  48865. return RJ(t, CLe, i, null, e, n, r);
  48866. }
  48867. function TLe(t, e) {
  48868. for (var n = t.length, r = 0; r < n; r++)
  48869. if (t[r].length > e)
  48870. return t[r];
  48871. return t[n - 1];
  48872. }
  48873. function RJ(t, e, n, r, i, a, o) {
  48874. a = a || t;
  48875. var s = e(a), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
  48876. if (u.hasOwnProperty(i))
  48877. return u[i];
  48878. var c = o == null || !r ? n : TLe(r, o);
  48879. if (c = c || n, !(!c || !c.length)) {
  48880. var f = c[l];
  48881. return i && (u[i] = f), s.paletteIdx = (l + 1) % c.length, f;
  48882. }
  48883. }
  48884. function PLe(t, e) {
  48885. e(t).paletteIdx = 0, e(t).paletteNameMap = {};
  48886. }
  48887. var ib, av, KB, PT = "\0_ec_inner", JB = 1, $Le = {
  48888. grid: "GridComponent",
  48889. polar: "PolarComponent",
  48890. geo: "GeoComponent",
  48891. singleAxis: "SingleAxisComponent",
  48892. parallel: "ParallelComponent",
  48893. calendar: "CalendarComponent",
  48894. graphic: "GraphicComponent",
  48895. toolbox: "ToolboxComponent",
  48896. tooltip: "TooltipComponent",
  48897. axisPointer: "AxisPointerComponent",
  48898. brush: "BrushComponent",
  48899. title: "TitleComponent",
  48900. timeline: "TimelineComponent",
  48901. markPoint: "MarkPointComponent",
  48902. markLine: "MarkLineComponent",
  48903. markArea: "MarkAreaComponent",
  48904. legend: "LegendComponent",
  48905. dataZoom: "DataZoomComponent",
  48906. visualMap: "VisualMapComponent",
  48907. // aria: 'AriaComponent',
  48908. // dataset: 'DatasetComponent',
  48909. // Dependencies
  48910. xAxis: "GridComponent",
  48911. yAxis: "GridComponent",
  48912. angleAxis: "PolarComponent",
  48913. radiusAxis: "PolarComponent"
  48914. }, ALe = {
  48915. line: "LineChart",
  48916. bar: "BarChart",
  48917. pie: "PieChart",
  48918. scatter: "ScatterChart",
  48919. radar: "RadarChart",
  48920. map: "MapChart",
  48921. tree: "TreeChart",
  48922. treemap: "TreemapChart",
  48923. graph: "GraphChart",
  48924. gauge: "GaugeChart",
  48925. funnel: "FunnelChart",
  48926. parallel: "ParallelChart",
  48927. sankey: "SankeyChart",
  48928. boxplot: "BoxplotChart",
  48929. candlestick: "CandlestickChart",
  48930. effectScatter: "EffectScatterChart",
  48931. lines: "LinesChart",
  48932. heatmap: "HeatmapChart",
  48933. pictorialBar: "PictorialBarChart",
  48934. themeRiver: "ThemeRiverChart",
  48935. sunburst: "SunburstChart",
  48936. custom: "CustomChart"
  48937. }, hO = {};
  48938. function ELe(t) {
  48939. k(t, function(e, n) {
  48940. if (!rt.hasClass(n)) {
  48941. var r = $Le[n];
  48942. r && !hO[r] && (Cr("Component " + n + ` is used but not imported.
  48943. import { ` + r + ` } from 'echarts/components';
  48944. echarts.use([` + r + "]);"), hO[r] = !0);
  48945. }
  48946. });
  48947. }
  48948. var ak = (
  48949. /** @class */
  48950. function(t) {
  48951. q(e, t);
  48952. function e() {
  48953. return t !== null && t.apply(this, arguments) || this;
  48954. }
  48955. return e.prototype.init = function(n, r, i, a, o, s) {
  48956. a = a || {}, this.option = null, this._theme = new Wt(a), this._locale = new Wt(o), this._optionManager = s;
  48957. }, e.prototype.setOption = function(n, r, i) {
  48958. process.env.NODE_ENV !== "production" && (ke(n != null, "option is null/undefined"), ke(n[PT] !== JB, "please use chart.getOption()"));
  48959. var a = nz(r);
  48960. this._optionManager.setOption(n, i, a), this._resetOption(null, a);
  48961. }, e.prototype.resetOption = function(n, r) {
  48962. return this._resetOption(n, nz(r));
  48963. }, e.prototype._resetOption = function(n, r) {
  48964. var i = !1, a = this._optionManager;
  48965. if (!n || n === "recreate") {
  48966. var o = a.mountOption(n === "recreate");
  48967. process.env.NODE_ENV !== "production" && ELe(o), !this.option || n === "recreate" ? KB(this, o) : (this.restoreData(), this._mergeOption(o, r)), i = !0;
  48968. }
  48969. if ((n === "timeline" || n === "media") && this.restoreData(), !n || n === "recreate" || n === "timeline") {
  48970. var s = a.getTimelineOption(this);
  48971. s && (i = !0, this._mergeOption(s, r));
  48972. }
  48973. if (!n || n === "recreate" || n === "media") {
  48974. var l = a.getMediaOption(this);
  48975. l.length && k(l, function(u) {
  48976. i = !0, this._mergeOption(u, r);
  48977. }, this);
  48978. }
  48979. return i;
  48980. }, e.prototype.mergeOption = function(n) {
  48981. this._mergeOption(n, null);
  48982. }, e.prototype._mergeOption = function(n, r) {
  48983. var i = this.option, a = this._componentsMap, o = this._componentsCount, s = [], l = Pe(), u = r && r.replaceMergeMainTypeMap;
  48984. OLe(this), k(n, function(f, d) {
  48985. f != null && (rt.hasClass(d) ? d && (s.push(d), l.set(d, !0)) : i[d] = i[d] == null ? Le(f) : qe(i[d], f, !0));
  48986. }), u && u.each(function(f, d) {
  48987. rt.hasClass(d) && !l.get(d) && (s.push(d), l.set(d, !0));
  48988. }), rt.topologicalTravel(s, rt.getAllClassMainTypes(), c, this);
  48989. function c(f) {
  48990. var d = wLe(this, f, Qt(n[f])), h = a.get(f), p = (
  48991. // `!oldCmptList` means init. See the comment in `mappingToExists`
  48992. h ? u && u.get(f) ? "replaceMerge" : "normalMerge" : "replaceAll"
  48993. ), v = hK(h, d, p);
  48994. YDe(v, f, rt), i[f] = null, a.set(f, null), o.set(f, 0);
  48995. var g = [], m = [], y = 0, b, _;
  48996. k(v, function(O, S) {
  48997. var x = O.existing, C = O.newOption;
  48998. if (!C)
  48999. x && (x.mergeOption({}, this), x.optionUpdated({}, !1));
  49000. else {
  49001. var T = f === "series", w = rt.getClass(
  49002. f,
  49003. O.keyInfo.subType,
  49004. !T
  49005. // Give a more detailed warn later if series don't exists
  49006. );
  49007. if (!w) {
  49008. if (process.env.NODE_ENV !== "production") {
  49009. var P = O.keyInfo.subType, $ = ALe[P];
  49010. hO[P] || (hO[P] = !0, Cr($ ? "Series " + P + ` is used but not imported.
  49011. import { ` + $ + ` } from 'echarts/charts';
  49012. echarts.use([` + $ + "]);" : "Unknown series " + P));
  49013. }
  49014. return;
  49015. }
  49016. if (f === "tooltip") {
  49017. if (b) {
  49018. process.env.NODE_ENV !== "production" && (_ || (dn("Currently only one tooltip component is allowed."), _ = !0));
  49019. return;
  49020. }
  49021. b = !0;
  49022. }
  49023. if (x && x.constructor === w)
  49024. x.name = O.keyInfo.name, x.mergeOption(C, this), x.optionUpdated(C, !1);
  49025. else {
  49026. var A = le({
  49027. componentIndex: S
  49028. }, O.keyInfo);
  49029. x = new w(C, this, this, A), le(x, A), O.brandNew && (x.__requireNewView = !0), x.init(C, this, this), x.optionUpdated(null, !0);
  49030. }
  49031. }
  49032. x ? (g.push(x.option), m.push(x), y++) : (g.push(void 0), m.push(void 0));
  49033. }, this), i[f] = g, a.set(f, m), o.set(f, y), f === "series" && ib(this);
  49034. }
  49035. this._seriesIndices || ib(this);
  49036. }, e.prototype.getOption = function() {
  49037. var n = Le(this.option);
  49038. return k(n, function(r, i) {
  49039. if (rt.hasClass(i)) {
  49040. for (var a = Qt(r), o = a.length, s = !1, l = o - 1; l >= 0; l--)
  49041. a[l] && !Nh(a[l]) ? s = !0 : (a[l] = null, !s && o--);
  49042. a.length = o, n[i] = a;
  49043. }
  49044. }), delete n[PT], n;
  49045. }, e.prototype.getTheme = function() {
  49046. return this._theme;
  49047. }, e.prototype.getLocaleModel = function() {
  49048. return this._locale;
  49049. }, e.prototype.setUpdatePayload = function(n) {
  49050. this._payload = n;
  49051. }, e.prototype.getUpdatePayload = function() {
  49052. return this._payload;
  49053. }, e.prototype.getComponent = function(n, r) {
  49054. var i = this._componentsMap.get(n);
  49055. if (i) {
  49056. var a = i[r || 0];
  49057. if (a)
  49058. return a;
  49059. if (r == null) {
  49060. for (var o = 0; o < i.length; o++)
  49061. if (i[o])
  49062. return i[o];
  49063. }
  49064. }
  49065. }, e.prototype.queryComponents = function(n) {
  49066. var r = n.mainType;
  49067. if (!r)
  49068. return [];
  49069. var i = n.index, a = n.id, o = n.name, s = this._componentsMap.get(r);
  49070. if (!s || !s.length)
  49071. return [];
  49072. var l;
  49073. return i != null ? (l = [], k(Qt(i), function(u) {
  49074. s[u] && l.push(s[u]);
  49075. })) : a != null ? l = ez("id", a, s) : o != null ? l = ez("name", o, s) : l = Nt(s, function(u) {
  49076. return !!u;
  49077. }), tz(l, n);
  49078. }, e.prototype.findComponents = function(n) {
  49079. var r = n.query, i = n.mainType, a = s(r), o = a ? this.queryComponents(a) : Nt(this._componentsMap.get(i), function(u) {
  49080. return !!u;
  49081. });
  49082. return l(tz(o, n));
  49083. function s(u) {
  49084. var c = i + "Index", f = i + "Id", d = i + "Name";
  49085. return u && (u[c] != null || u[f] != null || u[d] != null) ? {
  49086. mainType: i,
  49087. // subType will be filtered finally.
  49088. index: u[c],
  49089. id: u[f],
  49090. name: u[d]
  49091. } : null;
  49092. }
  49093. function l(u) {
  49094. return n.filter ? Nt(u, n.filter) : u;
  49095. }
  49096. }, e.prototype.eachComponent = function(n, r, i) {
  49097. var a = this._componentsMap;
  49098. if (Me(n)) {
  49099. var o = r, s = n;
  49100. a.each(function(f, d) {
  49101. for (var h = 0; f && h < f.length; h++) {
  49102. var p = f[h];
  49103. p && s.call(o, d, p, p.componentIndex);
  49104. }
  49105. });
  49106. } else
  49107. for (var l = Oe(n) ? a.get(n) : Ie(n) ? this.findComponents(n) : null, u = 0; l && u < l.length; u++) {
  49108. var c = l[u];
  49109. c && r.call(i, c, c.componentIndex);
  49110. }
  49111. }, e.prototype.getSeriesByName = function(n) {
  49112. var r = Vn(n, null);
  49113. return Nt(this._componentsMap.get("series"), function(i) {
  49114. return !!i && r != null && i.name === r;
  49115. });
  49116. }, e.prototype.getSeriesByIndex = function(n) {
  49117. return this._componentsMap.get("series")[n];
  49118. }, e.prototype.getSeriesByType = function(n) {
  49119. return Nt(this._componentsMap.get("series"), function(r) {
  49120. return !!r && r.subType === n;
  49121. });
  49122. }, e.prototype.getSeries = function() {
  49123. return Nt(this._componentsMap.get("series"), function(n) {
  49124. return !!n;
  49125. });
  49126. }, e.prototype.getSeriesCount = function() {
  49127. return this._componentsCount.get("series");
  49128. }, e.prototype.eachSeries = function(n, r) {
  49129. av(this), k(this._seriesIndices, function(i) {
  49130. var a = this._componentsMap.get("series")[i];
  49131. n.call(r, a, i);
  49132. }, this);
  49133. }, e.prototype.eachRawSeries = function(n, r) {
  49134. k(this._componentsMap.get("series"), function(i) {
  49135. i && n.call(r, i, i.componentIndex);
  49136. });
  49137. }, e.prototype.eachSeriesByType = function(n, r, i) {
  49138. av(this), k(this._seriesIndices, function(a) {
  49139. var o = this._componentsMap.get("series")[a];
  49140. o.subType === n && r.call(i, o, a);
  49141. }, this);
  49142. }, e.prototype.eachRawSeriesByType = function(n, r, i) {
  49143. return k(this.getSeriesByType(n), r, i);
  49144. }, e.prototype.isSeriesFiltered = function(n) {
  49145. return av(this), this._seriesIndicesMap.get(n.componentIndex) == null;
  49146. }, e.prototype.getCurrentSeriesIndices = function() {
  49147. return (this._seriesIndices || []).slice();
  49148. }, e.prototype.filterSeries = function(n, r) {
  49149. av(this);
  49150. var i = [];
  49151. k(this._seriesIndices, function(a) {
  49152. var o = this._componentsMap.get("series")[a];
  49153. n.call(r, o, a) && i.push(a);
  49154. }, this), this._seriesIndices = i, this._seriesIndicesMap = Pe(i);
  49155. }, e.prototype.restoreData = function(n) {
  49156. ib(this);
  49157. var r = this._componentsMap, i = [];
  49158. r.each(function(a, o) {
  49159. rt.hasClass(o) && i.push(o);
  49160. }), rt.topologicalTravel(i, rt.getAllClassMainTypes(), function(a) {
  49161. k(r.get(a), function(o) {
  49162. o && (a !== "series" || !MLe(o, n)) && o.restoreData();
  49163. });
  49164. });
  49165. }, e.internalField = function() {
  49166. ib = function(n) {
  49167. var r = n._seriesIndices = [];
  49168. k(n._componentsMap.get("series"), function(i) {
  49169. i && r.push(i.componentIndex);
  49170. }), n._seriesIndicesMap = Pe(r);
  49171. }, av = function(n) {
  49172. if (process.env.NODE_ENV !== "production" && !n._seriesIndices)
  49173. throw new Error("Option should contains series.");
  49174. }, KB = function(n, r) {
  49175. n.option = {}, n.option[PT] = JB, n._componentsMap = Pe({
  49176. series: []
  49177. }), n._componentsCount = Pe();
  49178. var i = r.aria;
  49179. Ie(i) && i.enabled == null && (i.enabled = !0), ILe(r, n._theme.option), qe(r, _Le, !1), n._mergeOption(r, null);
  49180. };
  49181. }(), e;
  49182. }(Wt)
  49183. );
  49184. function MLe(t, e) {
  49185. if (e) {
  49186. var n = e.seriesIndex, r = e.seriesId, i = e.seriesName;
  49187. return n != null && t.componentIndex !== n || r != null && t.id !== r || i != null && t.name !== i;
  49188. }
  49189. }
  49190. function ILe(t, e) {
  49191. var n = t.color && !t.colorLayer;
  49192. k(e, function(r, i) {
  49193. i === "colorLayer" && n || rt.hasClass(i) || (typeof r == "object" ? t[i] = t[i] ? qe(t[i], r, !1) : Le(r) : t[i] == null && (t[i] = r));
  49194. });
  49195. }
  49196. function ez(t, e, n) {
  49197. if (ue(e)) {
  49198. var r = Pe();
  49199. return k(e, function(a) {
  49200. if (a != null) {
  49201. var o = Vn(a, null);
  49202. o != null && r.set(a, !0);
  49203. }
  49204. }), Nt(n, function(a) {
  49205. return a && r.get(a[t]);
  49206. });
  49207. } else {
  49208. var i = Vn(e, null);
  49209. return Nt(n, function(a) {
  49210. return a && i != null && a[t] === i;
  49211. });
  49212. }
  49213. }
  49214. function tz(t, e) {
  49215. return e.hasOwnProperty("subType") ? Nt(t, function(n) {
  49216. return n && n.subType === e.subType;
  49217. }) : t;
  49218. }
  49219. function nz(t) {
  49220. var e = Pe();
  49221. return t && k(Qt(t.replaceMerge), function(n) {
  49222. process.env.NODE_ENV !== "production" && ke(rt.hasClass(n), '"' + n + '" is not valid component main type in "replaceMerge"'), e.set(n, !0);
  49223. }), {
  49224. replaceMergeMainTypeMap: e
  49225. };
  49226. }
  49227. xn(ak, ik);
  49228. var DLe = [
  49229. "getDom",
  49230. "getZr",
  49231. "getWidth",
  49232. "getHeight",
  49233. "getDevicePixelRatio",
  49234. "dispatchAction",
  49235. "isSSR",
  49236. "isDisposed",
  49237. "on",
  49238. "off",
  49239. "getDataURL",
  49240. "getConnectedDataURL",
  49241. // 'getModel',
  49242. "getOption",
  49243. // 'getViewOfComponentModel',
  49244. // 'getViewOfSeriesModel',
  49245. "getId",
  49246. "updateLabelLayout"
  49247. ], kJ = (
  49248. /** @class */
  49249. /* @__PURE__ */ function() {
  49250. function t(e) {
  49251. k(DLe, function(n) {
  49252. this[n] = xe(e[n], e);
  49253. }, this);
  49254. }
  49255. return t;
  49256. }()
  49257. ), $T = {}, zf = (
  49258. /** @class */
  49259. function() {
  49260. function t() {
  49261. this._coordinateSystems = [];
  49262. }
  49263. return t.prototype.create = function(e, n) {
  49264. var r = [];
  49265. k($T, function(i, a) {
  49266. var o = i.create(e, n);
  49267. r = r.concat(o || []);
  49268. }), this._coordinateSystems = r;
  49269. }, t.prototype.update = function(e, n) {
  49270. k(this._coordinateSystems, function(r) {
  49271. r.update && r.update(e, n);
  49272. });
  49273. }, t.prototype.getCoordinateSystems = function() {
  49274. return this._coordinateSystems.slice();
  49275. }, t.register = function(e, n) {
  49276. $T[e] = n;
  49277. }, t.get = function(e) {
  49278. return $T[e];
  49279. }, t;
  49280. }()
  49281. ), RLe = /^(min|max)?(.+)$/, kLe = (
  49282. /** @class */
  49283. function() {
  49284. function t(e) {
  49285. this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
  49286. }
  49287. return t.prototype.setOption = function(e, n, r) {
  49288. e && (k(Qt(e.series), function(o) {
  49289. o && o.data && Nr(o.data) && vm(o.data);
  49290. }), k(Qt(e.dataset), function(o) {
  49291. o && o.source && Nr(o.source) && vm(o.source);
  49292. })), e = Le(e);
  49293. var i = this._optionBackup, a = LLe(e, n, !i);
  49294. this._newBaseOption = a.baseOption, i ? (a.timelineOptions.length && (i.timelineOptions = a.timelineOptions), a.mediaList.length && (i.mediaList = a.mediaList), a.mediaDefault && (i.mediaDefault = a.mediaDefault)) : this._optionBackup = a;
  49295. }, t.prototype.mountOption = function(e) {
  49296. var n = this._optionBackup;
  49297. return this._timelineOptions = n.timelineOptions, this._mediaList = n.mediaList, this._mediaDefault = n.mediaDefault, this._currentMediaIndices = [], Le(e ? n.baseOption : this._newBaseOption);
  49298. }, t.prototype.getTimelineOption = function(e) {
  49299. var n, r = this._timelineOptions;
  49300. if (r.length) {
  49301. var i = e.getComponent("timeline");
  49302. i && (n = Le(
  49303. // FIXME:TS as TimelineModel or quivlant interface
  49304. r[i.getCurrentIndex()]
  49305. ));
  49306. }
  49307. return n;
  49308. }, t.prototype.getMediaOption = function(e) {
  49309. var n = this._api.getWidth(), r = this._api.getHeight(), i = this._mediaList, a = this._mediaDefault, o = [], s = [];
  49310. if (!i.length && !a)
  49311. return s;
  49312. for (var l = 0, u = i.length; l < u; l++)
  49313. NLe(i[l].query, n, r) && o.push(l);
  49314. return !o.length && a && (o = [-1]), o.length && !zLe(o, this._currentMediaIndices) && (s = ce(o, function(c) {
  49315. return Le(c === -1 ? a.option : i[c].option);
  49316. })), this._currentMediaIndices = o, s;
  49317. }, t;
  49318. }()
  49319. );
  49320. function LLe(t, e, n) {
  49321. var r = [], i, a, o = t.baseOption, s = t.timeline, l = t.options, u = t.media, c = !!t.media, f = !!(l || s || o && o.timeline);
  49322. o ? (a = o, a.timeline || (a.timeline = s)) : ((f || c) && (t.options = t.media = null), a = t), c && (ue(u) ? k(u, function(h) {
  49323. process.env.NODE_ENV !== "production" && h && !h.option && Ie(h.query) && Ie(h.query.option) && Cr("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), h && h.option && (h.query ? r.push(h) : i || (i = h));
  49324. }) : process.env.NODE_ENV !== "production" && Cr("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), d(a), k(l, function(h) {
  49325. return d(h);
  49326. }), k(r, function(h) {
  49327. return d(h.option);
  49328. });
  49329. function d(h) {
  49330. k(e, function(p) {
  49331. p(h, n);
  49332. });
  49333. }
  49334. return {
  49335. baseOption: a,
  49336. timelineOptions: l || [],
  49337. mediaDefault: i,
  49338. mediaList: r
  49339. };
  49340. }
  49341. function NLe(t, e, n) {
  49342. var r = {
  49343. width: e,
  49344. height: n,
  49345. aspectratio: e / n
  49346. // lower case for convenience.
  49347. }, i = !0;
  49348. return k(t, function(a, o) {
  49349. var s = o.match(RLe);
  49350. if (!(!s || !s[1] || !s[2])) {
  49351. var l = s[1], u = s[2].toLowerCase();
  49352. BLe(r[u], a, l) || (i = !1);
  49353. }
  49354. }), i;
  49355. }
  49356. function BLe(t, e, n) {
  49357. return n === "min" ? t >= e : n === "max" ? t <= e : t === e;
  49358. }
  49359. function zLe(t, e) {
  49360. return t.join(",") === e.join(",");
  49361. }
  49362. var ea = k, Pm = Ie, rz = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
  49363. function AT(t) {
  49364. var e = t && t.itemStyle;
  49365. if (e)
  49366. for (var n = 0, r = rz.length; n < r; n++) {
  49367. var i = rz[n], a = e.normal, o = e.emphasis;
  49368. a && a[i] && (process.env.NODE_ENV !== "production" && Cn("itemStyle.normal." + i, i), t[i] = t[i] || {}, t[i].normal ? qe(t[i].normal, a[i]) : t[i].normal = a[i], a[i] = null), o && o[i] && (process.env.NODE_ENV !== "production" && Cn("itemStyle.emphasis." + i, "emphasis." + i), t[i] = t[i] || {}, t[i].emphasis ? qe(t[i].emphasis, o[i]) : t[i].emphasis = o[i], o[i] = null);
  49369. }
  49370. }
  49371. function Ir(t, e, n) {
  49372. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  49373. var r = t[e].normal, i = t[e].emphasis;
  49374. r && (process.env.NODE_ENV !== "production" && Ea("'normal' hierarchy in " + e + " has been removed since 4.0. All style properties are configured in " + e + " directly now."), n ? (t[e].normal = t[e].emphasis = null, Re(t[e], r)) : t[e] = r), i && (process.env.NODE_ENV !== "production" && Ea(e + ".emphasis has been changed to emphasis." + e + " since 4.0"), t.emphasis = t.emphasis || {}, t.emphasis[e] = i, i.focus && (t.emphasis.focus = i.focus), i.blurScope && (t.emphasis.blurScope = i.blurScope));
  49375. }
  49376. }
  49377. function Zv(t) {
  49378. Ir(t, "itemStyle"), Ir(t, "lineStyle"), Ir(t, "areaStyle"), Ir(t, "label"), Ir(t, "labelLine"), Ir(t, "upperLabel"), Ir(t, "edgeLabel");
  49379. }
  49380. function En(t, e) {
  49381. var n = Pm(t) && t[e], r = Pm(n) && n.textStyle;
  49382. if (r) {
  49383. process.env.NODE_ENV !== "production" && Ea("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
  49384. for (var i = 0, a = sB.length; i < a; i++) {
  49385. var o = sB[i];
  49386. r.hasOwnProperty(o) && (n[o] = r[o]);
  49387. }
  49388. }
  49389. }
  49390. function la(t) {
  49391. t && (Zv(t), En(t, "label"), t.emphasis && En(t.emphasis, "label"));
  49392. }
  49393. function VLe(t) {
  49394. if (Pm(t)) {
  49395. AT(t), Zv(t), En(t, "label"), En(t, "upperLabel"), En(t, "edgeLabel"), t.emphasis && (En(t.emphasis, "label"), En(t.emphasis, "upperLabel"), En(t.emphasis, "edgeLabel"));
  49396. var e = t.markPoint;
  49397. e && (AT(e), la(e));
  49398. var n = t.markLine;
  49399. n && (AT(n), la(n));
  49400. var r = t.markArea;
  49401. r && la(r);
  49402. var i = t.data;
  49403. if (t.type === "graph") {
  49404. i = i || t.nodes;
  49405. var a = t.links || t.edges;
  49406. if (a && !Nr(a))
  49407. for (var o = 0; o < a.length; o++)
  49408. la(a[o]);
  49409. k(t.categories, function(u) {
  49410. Zv(u);
  49411. });
  49412. }
  49413. if (i && !Nr(i))
  49414. for (var o = 0; o < i.length; o++)
  49415. la(i[o]);
  49416. if (e = t.markPoint, e && e.data)
  49417. for (var s = e.data, o = 0; o < s.length; o++)
  49418. la(s[o]);
  49419. if (n = t.markLine, n && n.data)
  49420. for (var l = n.data, o = 0; o < l.length; o++)
  49421. ue(l[o]) ? (la(l[o][0]), la(l[o][1])) : la(l[o]);
  49422. t.type === "gauge" ? (En(t, "axisLabel"), En(t, "title"), En(t, "detail")) : t.type === "treemap" ? (Ir(t.breadcrumb, "itemStyle"), k(t.levels, function(u) {
  49423. Zv(u);
  49424. })) : t.type === "tree" && Zv(t.leaves);
  49425. }
  49426. }
  49427. function ms(t) {
  49428. return ue(t) ? t : t ? [t] : [];
  49429. }
  49430. function iz(t) {
  49431. return (ue(t) ? t[0] : t) || {};
  49432. }
  49433. function FLe(t, e) {
  49434. ea(ms(t.series), function(r) {
  49435. Pm(r) && VLe(r);
  49436. });
  49437. var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  49438. e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), ea(n, function(r) {
  49439. ea(ms(t[r]), function(i) {
  49440. i && (En(i, "axisLabel"), En(i.axisPointer, "label"));
  49441. });
  49442. }), ea(ms(t.parallel), function(r) {
  49443. var i = r && r.parallelAxisDefault;
  49444. En(i, "axisLabel"), En(i && i.axisPointer, "label");
  49445. }), ea(ms(t.calendar), function(r) {
  49446. Ir(r, "itemStyle"), En(r, "dayLabel"), En(r, "monthLabel"), En(r, "yearLabel");
  49447. }), ea(ms(t.radar), function(r) {
  49448. En(r, "name"), r.name && r.axisName == null && (r.axisName = r.name, delete r.name, process.env.NODE_ENV !== "production" && Ea("name property in radar component has been changed to axisName")), r.nameGap != null && r.axisNameGap == null && (r.axisNameGap = r.nameGap, delete r.nameGap, process.env.NODE_ENV !== "production" && Ea("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && ea(r.indicator, function(i) {
  49449. i.text && Cn("text", "name", "radar.indicator");
  49450. });
  49451. }), ea(ms(t.geo), function(r) {
  49452. Pm(r) && (la(r), ea(ms(r.regions), function(i) {
  49453. la(i);
  49454. }));
  49455. }), ea(ms(t.timeline), function(r) {
  49456. la(r), Ir(r, "label"), Ir(r, "itemStyle"), Ir(r, "controlStyle", !0);
  49457. var i = r.data;
  49458. ue(i) && k(i, function(a) {
  49459. Ie(a) && (Ir(a, "label"), Ir(a, "itemStyle"));
  49460. });
  49461. }), ea(ms(t.toolbox), function(r) {
  49462. Ir(r, "iconStyle"), ea(r.feature, function(i) {
  49463. Ir(i, "iconStyle");
  49464. });
  49465. }), En(iz(t.axisPointer), "label"), En(iz(t.tooltip).axisPointer, "label");
  49466. }
  49467. function WLe(t, e) {
  49468. for (var n = e.split(","), r = t, i = 0; i < n.length && (r = r && r[n[i]], r != null); i++)
  49469. ;
  49470. return r;
  49471. }
  49472. function QLe(t, e, n, r) {
  49473. for (var i = e.split(","), a = t, o, s = 0; s < i.length - 1; s++)
  49474. o = i[s], a[o] == null && (a[o] = {}), a = a[o];
  49475. a[i[s]] == null && (a[i[s]] = n);
  49476. }
  49477. function az(t) {
  49478. t && k(HLe, function(e) {
  49479. e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
  49480. });
  49481. }
  49482. var HLe = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], GLe = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], ET = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
  49483. function ov(t) {
  49484. var e = t && t.itemStyle;
  49485. if (e)
  49486. for (var n = 0; n < ET.length; n++) {
  49487. var r = ET[n][1], i = ET[n][0];
  49488. e[r] != null && (e[i] = e[r], process.env.NODE_ENV !== "production" && Cn(r, i));
  49489. }
  49490. }
  49491. function oz(t) {
  49492. t && t.alignTo === "edge" && t.margin != null && t.edgeDistance == null && (process.env.NODE_ENV !== "production" && Cn("label.margin", "label.edgeDistance", "pie"), t.edgeDistance = t.margin);
  49493. }
  49494. function sz(t) {
  49495. t && t.downplay && !t.blur && (t.blur = t.downplay, process.env.NODE_ENV !== "production" && Cn("downplay", "blur", "sunburst"));
  49496. }
  49497. function jLe(t) {
  49498. t && t.focusNodeAdjacency != null && (t.emphasis = t.emphasis || {}, t.emphasis.focus == null && (process.env.NODE_ENV !== "production" && Cn("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), t.emphasis.focus = "adjacency"));
  49499. }
  49500. function LJ(t, e) {
  49501. if (t)
  49502. for (var n = 0; n < t.length; n++)
  49503. e(t[n]), t[n] && LJ(t[n].children, e);
  49504. }
  49505. function NJ(t, e) {
  49506. FLe(t, e), t.series = Qt(t.series), k(t.series, function(n) {
  49507. if (Ie(n)) {
  49508. var r = n.type;
  49509. if (r === "line")
  49510. n.clipOverflow != null && (n.clip = n.clipOverflow, process.env.NODE_ENV !== "production" && Cn("clipOverflow", "clip", "line"));
  49511. else if (r === "pie" || r === "gauge") {
  49512. n.clockWise != null && (n.clockwise = n.clockWise, process.env.NODE_ENV !== "production" && Cn("clockWise", "clockwise")), oz(n.label);
  49513. var i = n.data;
  49514. if (i && !Nr(i))
  49515. for (var a = 0; a < i.length; a++)
  49516. oz(i[a]);
  49517. n.hoverOffset != null && (n.emphasis = n.emphasis || {}, (n.emphasis.scaleSize = null) && (process.env.NODE_ENV !== "production" && Cn("hoverOffset", "emphasis.scaleSize"), n.emphasis.scaleSize = n.hoverOffset));
  49518. } else if (r === "gauge") {
  49519. var o = WLe(n, "pointer.color");
  49520. o != null && QLe(n, "itemStyle.color", o);
  49521. } else if (r === "bar") {
  49522. ov(n), ov(n.backgroundStyle), ov(n.emphasis);
  49523. var i = n.data;
  49524. if (i && !Nr(i))
  49525. for (var a = 0; a < i.length; a++)
  49526. typeof i[a] == "object" && (ov(i[a]), ov(i[a] && i[a].emphasis));
  49527. } else if (r === "sunburst") {
  49528. var s = n.highlightPolicy;
  49529. s && (n.emphasis = n.emphasis || {}, n.emphasis.focus || (n.emphasis.focus = s, process.env.NODE_ENV !== "production" && Cn("highlightPolicy", "emphasis.focus", "sunburst"))), sz(n), LJ(n.data, sz);
  49530. } else r === "graph" || r === "sankey" ? jLe(n) : r === "map" && (n.mapType && !n.map && (process.env.NODE_ENV !== "production" && Cn("mapType", "map", "map"), n.map = n.mapType), n.mapLocation && (process.env.NODE_ENV !== "production" && Ea("`mapLocation` is not used anymore."), Re(n, n.mapLocation)));
  49531. n.hoverAnimation != null && (n.emphasis = n.emphasis || {}, n.emphasis && n.emphasis.scale == null && (process.env.NODE_ENV !== "production" && Cn("hoverAnimation", "emphasis.scale"), n.emphasis.scale = n.hoverAnimation)), az(n);
  49532. }
  49533. }), t.dataRange && (t.visualMap = t.dataRange), k(GLe, function(n) {
  49534. var r = t[n];
  49535. r && (ue(r) || (r = [r]), k(r, function(i) {
  49536. az(i);
  49537. }));
  49538. });
  49539. }
  49540. function ZLe(t) {
  49541. var e = Pe();
  49542. t.eachSeries(function(n) {
  49543. var r = n.get("stack");
  49544. if (r) {
  49545. var i = e.get(r) || e.set(r, []), a = n.getData(), o = {
  49546. // Used for calculate axis extent automatically.
  49547. // TODO: Type getCalculationInfo return more specific type?
  49548. stackResultDimension: a.getCalculationInfo("stackResultDimension"),
  49549. stackedOverDimension: a.getCalculationInfo("stackedOverDimension"),
  49550. stackedDimension: a.getCalculationInfo("stackedDimension"),
  49551. stackedByDimension: a.getCalculationInfo("stackedByDimension"),
  49552. isStackedByIndex: a.getCalculationInfo("isStackedByIndex"),
  49553. data: a,
  49554. seriesModel: n
  49555. };
  49556. if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
  49557. return;
  49558. i.length && a.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o);
  49559. }
  49560. }), e.each(ULe);
  49561. }
  49562. function ULe(t) {
  49563. k(t, function(e, n) {
  49564. var r = [], i = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
  49565. o.modify(a, function(u, c, f) {
  49566. var d = o.get(e.stackedDimension, f);
  49567. if (isNaN(d))
  49568. return i;
  49569. var h, p;
  49570. s ? p = o.getRawIndex(f) : h = o.get(e.stackedByDimension, f);
  49571. for (var v = NaN, g = n - 1; g >= 0; g--) {
  49572. var m = t[g];
  49573. if (s || (p = m.data.rawIndexOf(m.stackedByDimension, h)), p >= 0) {
  49574. var y = m.data.getByRawIndex(m.stackResultDimension, p);
  49575. if (l === "all" || l === "positive" && y > 0 || l === "negative" && y < 0 || l === "samesign" && d >= 0 && y > 0 || l === "samesign" && d <= 0 && y < 0) {
  49576. d = NDe(d, y), v = y;
  49577. break;
  49578. }
  49579. }
  49580. }
  49581. return r[0] = d, r[1] = v, r;
  49582. });
  49583. });
  49584. }
  49585. var ow = (
  49586. /** @class */
  49587. /* @__PURE__ */ function() {
  49588. function t(e) {
  49589. this.data = e.data || (e.sourceFormat === ls ? {} : []), this.sourceFormat = e.sourceFormat || AJ, this.seriesLayoutBy = e.seriesLayoutBy || Xo, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
  49590. var n = this.dimensionsDefine = e.dimensionsDefine;
  49591. if (n)
  49592. for (var r = 0; r < n.length; r++) {
  49593. var i = n[r];
  49594. i.type == null && IJ(this, r) === cr.Must && (i.type = "ordinal");
  49595. }
  49596. }
  49597. return t;
  49598. }()
  49599. );
  49600. function ok(t) {
  49601. return t instanceof ow;
  49602. }
  49603. function HA(t, e, n) {
  49604. n = n || BJ(t);
  49605. var r = e.seriesLayoutBy, i = YLe(t, n, r, e.sourceHeader, e.dimensions), a = new ow({
  49606. data: t,
  49607. sourceFormat: n,
  49608. seriesLayoutBy: r,
  49609. dimensionsDefine: i.dimensionsDefine,
  49610. startIndex: i.startIndex,
  49611. dimensionsDetectedCount: i.dimensionsDetectedCount,
  49612. metaRawOption: Le(e)
  49613. });
  49614. return a;
  49615. }
  49616. function sk(t) {
  49617. return new ow({
  49618. data: t,
  49619. sourceFormat: Nr(t) ? Ds : La
  49620. });
  49621. }
  49622. function XLe(t) {
  49623. return new ow({
  49624. data: t.data,
  49625. sourceFormat: t.sourceFormat,
  49626. seriesLayoutBy: t.seriesLayoutBy,
  49627. dimensionsDefine: Le(t.dimensionsDefine),
  49628. startIndex: t.startIndex,
  49629. dimensionsDetectedCount: t.dimensionsDetectedCount
  49630. });
  49631. }
  49632. function BJ(t) {
  49633. var e = AJ;
  49634. if (Nr(t))
  49635. e = Ds;
  49636. else if (ue(t)) {
  49637. t.length === 0 && (e = Br);
  49638. for (var n = 0, r = t.length; n < r; n++) {
  49639. var i = t[n];
  49640. if (i != null) {
  49641. if (ue(i) || Nr(i)) {
  49642. e = Br;
  49643. break;
  49644. } else if (Ie(i)) {
  49645. e = Na;
  49646. break;
  49647. }
  49648. }
  49649. }
  49650. } else if (Ie(t)) {
  49651. for (var a in t)
  49652. if (Ce(t, a) && wr(t[a])) {
  49653. e = ls;
  49654. break;
  49655. }
  49656. }
  49657. return e;
  49658. }
  49659. function YLe(t, e, n, r, i) {
  49660. var a, o;
  49661. if (!t)
  49662. return {
  49663. dimensionsDefine: lz(i),
  49664. startIndex: o,
  49665. dimensionsDetectedCount: a
  49666. };
  49667. if (e === Br) {
  49668. var s = t;
  49669. r === "auto" || r == null ? uz(function(u) {
  49670. u != null && u !== "-" && (Oe(u) ? o == null && (o = 1) : o = 0);
  49671. }, n, s, 10) : o = St(r) ? r : r ? 1 : 0, !i && o === 1 && (i = [], uz(function(u, c) {
  49672. i[c] = u != null ? u + "" : "";
  49673. }, n, s, 1 / 0)), a = i ? i.length : n === _p ? s.length : s[0] ? s[0].length : null;
  49674. } else if (e === Na)
  49675. i || (i = qLe(t));
  49676. else if (e === ls)
  49677. i || (i = [], k(t, function(u, c) {
  49678. i.push(c);
  49679. }));
  49680. else if (e === La) {
  49681. var l = fp(t[0]);
  49682. a = ue(l) && l.length || 1;
  49683. } else e === Ds && process.env.NODE_ENV !== "production" && ke(!!i, "dimensions must be given if data is TypedArray.");
  49684. return {
  49685. startIndex: o,
  49686. dimensionsDefine: lz(i),
  49687. dimensionsDetectedCount: a
  49688. };
  49689. }
  49690. function qLe(t) {
  49691. for (var e = 0, n; e < t.length && !(n = t[e++]); )
  49692. ;
  49693. if (n)
  49694. return st(n);
  49695. }
  49696. function lz(t) {
  49697. if (t) {
  49698. var e = Pe();
  49699. return ce(t, function(n, r) {
  49700. n = Ie(n) ? n : {
  49701. name: n
  49702. };
  49703. var i = {
  49704. name: n.name,
  49705. displayName: n.displayName,
  49706. type: n.type
  49707. };
  49708. if (i.name == null)
  49709. return i;
  49710. i.name += "", i.displayName == null && (i.displayName = i.name);
  49711. var a = e.get(i.name);
  49712. return a ? i.name += "-" + a.count++ : e.set(i.name, {
  49713. count: 1
  49714. }), i;
  49715. });
  49716. }
  49717. }
  49718. function uz(t, e, n, r) {
  49719. if (e === _p)
  49720. for (var i = 0; i < n.length && i < r; i++)
  49721. t(n[i] ? n[i][0] : null, i);
  49722. else
  49723. for (var a = n[0] || [], i = 0; i < a.length && i < r; i++)
  49724. t(a[i], i);
  49725. }
  49726. function zJ(t) {
  49727. var e = t.sourceFormat;
  49728. return e === Na || e === ls;
  49729. }
  49730. var tc, nc, rc, cz, fz, VJ = (
  49731. /** @class */
  49732. function() {
  49733. function t(e, n) {
  49734. var r = ok(e) ? e : sk(e);
  49735. this._source = r;
  49736. var i = this._data = r.data;
  49737. if (r.sourceFormat === Ds) {
  49738. if (process.env.NODE_ENV !== "production" && n == null)
  49739. throw new Error("Typed array data must specify dimension size");
  49740. this._offset = 0, this._dimSize = n, this._data = i;
  49741. }
  49742. fz(this, i, r);
  49743. }
  49744. return t.prototype.getSource = function() {
  49745. return this._source;
  49746. }, t.prototype.count = function() {
  49747. return 0;
  49748. }, t.prototype.getItem = function(e, n) {
  49749. }, t.prototype.appendData = function(e) {
  49750. }, t.prototype.clean = function() {
  49751. }, t.protoInitialize = function() {
  49752. var e = t.prototype;
  49753. e.pure = !1, e.persistent = !0;
  49754. }(), t.internalField = function() {
  49755. var e;
  49756. fz = function(o, s, l) {
  49757. var u = l.sourceFormat, c = l.seriesLayoutBy, f = l.startIndex, d = l.dimensionsDefine, h = cz[lk(u, c)];
  49758. if (process.env.NODE_ENV !== "production" && ke(h, "Invalide sourceFormat: " + u), le(o, h), u === Ds)
  49759. o.getItem = n, o.count = i, o.fillStorage = r;
  49760. else {
  49761. var p = FJ(u, c);
  49762. o.getItem = xe(p, null, s, f, d);
  49763. var v = WJ(u, c);
  49764. o.count = xe(v, null, s, f, d);
  49765. }
  49766. };
  49767. var n = function(o, s) {
  49768. o = o - this._offset, s = s || [];
  49769. for (var l = this._data, u = this._dimSize, c = u * o, f = 0; f < u; f++)
  49770. s[f] = l[c + f];
  49771. return s;
  49772. }, r = function(o, s, l, u) {
  49773. for (var c = this._data, f = this._dimSize, d = 0; d < f; d++) {
  49774. for (var h = u[d], p = h[0] == null ? 1 / 0 : h[0], v = h[1] == null ? -1 / 0 : h[1], g = s - o, m = l[d], y = 0; y < g; y++) {
  49775. var b = c[y * f + d];
  49776. m[o + y] = b, b < p && (p = b), b > v && (v = b);
  49777. }
  49778. h[0] = p, h[1] = v;
  49779. }
  49780. }, i = function() {
  49781. return this._data ? this._data.length / this._dimSize : 0;
  49782. };
  49783. cz = (e = {}, e[Br + "_" + Xo] = {
  49784. pure: !0,
  49785. appendData: a
  49786. }, e[Br + "_" + _p] = {
  49787. pure: !0,
  49788. appendData: function() {
  49789. throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
  49790. }
  49791. }, e[Na] = {
  49792. pure: !0,
  49793. appendData: a
  49794. }, e[ls] = {
  49795. pure: !0,
  49796. appendData: function(o) {
  49797. var s = this._data;
  49798. k(o, function(l, u) {
  49799. for (var c = s[u] || (s[u] = []), f = 0; f < (l || []).length; f++)
  49800. c.push(l[f]);
  49801. });
  49802. }
  49803. }, e[La] = {
  49804. appendData: a
  49805. }, e[Ds] = {
  49806. persistent: !1,
  49807. pure: !0,
  49808. appendData: function(o) {
  49809. process.env.NODE_ENV !== "production" && ke(Nr(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o;
  49810. },
  49811. // Clean self if data is already used.
  49812. clean: function() {
  49813. this._offset += this.count(), this._data = null;
  49814. }
  49815. }, e);
  49816. function a(o) {
  49817. for (var s = 0; s < o.length; s++)
  49818. this._data.push(o[s]);
  49819. }
  49820. }(), t;
  49821. }()
  49822. ), dz = function(t, e, n, r) {
  49823. return t[r];
  49824. }, KLe = (tc = {}, tc[Br + "_" + Xo] = function(t, e, n, r) {
  49825. return t[r + e];
  49826. }, tc[Br + "_" + _p] = function(t, e, n, r, i) {
  49827. r += e;
  49828. for (var a = i || [], o = t, s = 0; s < o.length; s++) {
  49829. var l = o[s];
  49830. a[s] = l ? l[r] : null;
  49831. }
  49832. return a;
  49833. }, tc[Na] = dz, tc[ls] = function(t, e, n, r, i) {
  49834. for (var a = i || [], o = 0; o < n.length; o++) {
  49835. var s = n[o].name;
  49836. if (process.env.NODE_ENV !== "production" && s == null)
  49837. throw new Error();
  49838. var l = t[s];
  49839. a[o] = l ? l[r] : null;
  49840. }
  49841. return a;
  49842. }, tc[La] = dz, tc);
  49843. function FJ(t, e) {
  49844. var n = KLe[lk(t, e)];
  49845. return process.env.NODE_ENV !== "production" && ke(n, 'Do not support get item on "' + t + '", "' + e + '".'), n;
  49846. }
  49847. var hz = function(t, e, n) {
  49848. return t.length;
  49849. }, JLe = (nc = {}, nc[Br + "_" + Xo] = function(t, e, n) {
  49850. return Math.max(0, t.length - e);
  49851. }, nc[Br + "_" + _p] = function(t, e, n) {
  49852. var r = t[0];
  49853. return r ? Math.max(0, r.length - e) : 0;
  49854. }, nc[Na] = hz, nc[ls] = function(t, e, n) {
  49855. var r = n[0].name;
  49856. if (process.env.NODE_ENV !== "production" && r == null)
  49857. throw new Error();
  49858. var i = t[r];
  49859. return i ? i.length : 0;
  49860. }, nc[La] = hz, nc);
  49861. function WJ(t, e) {
  49862. var n = JLe[lk(t, e)];
  49863. return process.env.NODE_ENV !== "production" && ke(n, 'Do not support count on "' + t + '", "' + e + '".'), n;
  49864. }
  49865. var MT = function(t, e, n) {
  49866. return t[e];
  49867. }, e4e = (rc = {}, rc[Br] = MT, rc[Na] = function(t, e, n) {
  49868. return t[n];
  49869. }, rc[ls] = MT, rc[La] = function(t, e, n) {
  49870. var r = fp(t);
  49871. return r instanceof Array ? r[e] : r;
  49872. }, rc[Ds] = MT, rc);
  49873. function QJ(t) {
  49874. var e = e4e[t];
  49875. return process.env.NODE_ENV !== "production" && ke(e, 'Do not support get value on "' + t + '".'), e;
  49876. }
  49877. function lk(t, e) {
  49878. return t === Br ? t + "_" + e : t;
  49879. }
  49880. function Vh(t, e, n) {
  49881. if (t) {
  49882. var r = t.getRawDataItem(e);
  49883. if (r != null) {
  49884. var i = t.getStore(), a = i.getSource().sourceFormat;
  49885. if (n != null) {
  49886. var o = t.getDimensionIndex(n), s = i.getDimensionProperty(o);
  49887. return QJ(a)(r, o, s);
  49888. } else {
  49889. var l = r;
  49890. return a === La && (l = fp(r)), l;
  49891. }
  49892. }
  49893. }
  49894. }
  49895. var t4e = /\{@(.+?)\}/g, sw = (
  49896. /** @class */
  49897. function() {
  49898. function t() {
  49899. }
  49900. return t.prototype.getDataParams = function(e, n) {
  49901. var r = this.getData(n), i = this.getRawValue(e, n), a = r.getRawIndex(e), o = r.getName(e), s = r.getRawDataItem(e), l = r.getItemVisual(e, "style"), u = l && l[r.getItemVisual(e, "drawType") || "fill"], c = l && l.stroke, f = this.mainType, d = f === "series", h = r.userOutput && r.userOutput.get();
  49902. return {
  49903. componentType: f,
  49904. componentSubType: this.subType,
  49905. componentIndex: this.componentIndex,
  49906. seriesType: d ? this.subType : null,
  49907. seriesIndex: this.seriesIndex,
  49908. seriesId: d ? this.id : null,
  49909. seriesName: d ? this.name : null,
  49910. name: o,
  49911. dataIndex: a,
  49912. data: s,
  49913. dataType: n,
  49914. value: i,
  49915. color: u,
  49916. borderColor: c,
  49917. dimensionNames: h ? h.fullDimensions : null,
  49918. encode: h ? h.encode : null,
  49919. // Param name list for mapping `a`, `b`, `c`, `d`, `e`
  49920. $vars: ["seriesName", "name", "value"]
  49921. };
  49922. }, t.prototype.getFormattedLabel = function(e, n, r, i, a, o) {
  49923. n = n || "normal";
  49924. var s = this.getData(r), l = this.getDataParams(e, r);
  49925. if (o && (l.value = o.interpolatedValue), i != null && ue(l.value) && (l.value = l.value[i]), !a) {
  49926. var u = s.getItemModel(e);
  49927. a = u.get(n === "normal" ? ["label", "formatter"] : [n, "label", "formatter"]);
  49928. }
  49929. if (Me(a))
  49930. return l.status = n, l.dimensionIndex = i, a(l);
  49931. if (Oe(a)) {
  49932. var c = ek(a, l);
  49933. return c.replace(t4e, function(f, d) {
  49934. var h = d.length, p = d;
  49935. p.charAt(0) === "[" && p.charAt(h - 1) === "]" && (p = +p.slice(1, h - 1), process.env.NODE_ENV !== "production" && isNaN(p) && Cr("Invalide label formatter: @" + d + ", only support @[0], @[1], @[2], ..."));
  49936. var v = Vh(s, e, p);
  49937. if (o && ue(o.interpolatedValue)) {
  49938. var g = s.getDimensionIndex(p);
  49939. g >= 0 && (v = o.interpolatedValue[g]);
  49940. }
  49941. return v != null ? v + "" : "";
  49942. });
  49943. }
  49944. }, t.prototype.getRawValue = function(e, n) {
  49945. return Vh(this.getData(n), e);
  49946. }, t.prototype.formatTooltip = function(e, n, r) {
  49947. }, t;
  49948. }()
  49949. );
  49950. function pz(t) {
  49951. var e, n;
  49952. return Ie(t) ? t.type ? n = t : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + ti(t)) : e = t, {
  49953. text: e,
  49954. // markers: markers || markersExisting,
  49955. frag: n
  49956. };
  49957. }
  49958. function Dg(t) {
  49959. return new n4e(t);
  49960. }
  49961. var n4e = (
  49962. /** @class */
  49963. function() {
  49964. function t(e) {
  49965. e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
  49966. }
  49967. return t.prototype.perform = function(e) {
  49968. var n = this._upstream, r = e && e.skip;
  49969. if (this._dirty && n) {
  49970. var i = this.context;
  49971. i.data = i.outputData = n.context.outputData;
  49972. }
  49973. this.__pipeline && (this.__pipeline.currentTask = this);
  49974. var a;
  49975. this._plan && !r && (a = this._plan(this.context));
  49976. var o = c(this._modBy), s = this._modDataCount || 0, l = c(e && e.modBy), u = e && e.modDataCount || 0;
  49977. (o !== l || s !== u) && (a = "reset");
  49978. function c(y) {
  49979. return !(y >= 1) && (y = 1), y;
  49980. }
  49981. var f;
  49982. (this._dirty || a === "reset") && (this._dirty = !1, f = this._doReset(r)), this._modBy = l, this._modDataCount = u;
  49983. var d = e && e.step;
  49984. if (n ? (process.env.NODE_ENV !== "production" && ke(n._outputDueEnd != null), this._dueEnd = n._outputDueEnd) : (process.env.NODE_ENV !== "production" && ke(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) {
  49985. var h = this._dueIndex, p = Math.min(d != null ? this._dueIndex + d : 1 / 0, this._dueEnd);
  49986. if (!r && (f || h < p)) {
  49987. var v = this._progress;
  49988. if (ue(v))
  49989. for (var g = 0; g < v.length; g++)
  49990. this._doProgress(v[g], h, p, l, u);
  49991. else
  49992. this._doProgress(v, h, p, l, u);
  49993. }
  49994. this._dueIndex = p;
  49995. var m = this._settedOutputEnd != null ? this._settedOutputEnd : p;
  49996. process.env.NODE_ENV !== "production" && ke(m >= this._outputDueEnd), this._outputDueEnd = m;
  49997. } else
  49998. this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
  49999. return this.unfinished();
  50000. }, t.prototype.dirty = function() {
  50001. this._dirty = !0, this._onDirty && this._onDirty(this.context);
  50002. }, t.prototype._doProgress = function(e, n, r, i, a) {
  50003. vz.reset(n, r, i, a), this._callingProgress = e, this._callingProgress({
  50004. start: n,
  50005. end: r,
  50006. count: r - n,
  50007. next: vz.next
  50008. }, this.context);
  50009. }, t.prototype._doReset = function(e) {
  50010. this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
  50011. var n, r;
  50012. !e && this._reset && (n = this._reset(this.context), n && n.progress && (r = n.forceFirstProgress, n = n.progress), ue(n) && !n.length && (n = null)), this._progress = n, this._modBy = this._modDataCount = null;
  50013. var i = this._downstream;
  50014. return i && i.dirty(), r;
  50015. }, t.prototype.unfinished = function() {
  50016. return this._progress && this._dueIndex < this._dueEnd;
  50017. }, t.prototype.pipe = function(e) {
  50018. process.env.NODE_ENV !== "production" && ke(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
  50019. }, t.prototype.dispose = function() {
  50020. this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
  50021. }, t.prototype.getUpstream = function() {
  50022. return this._upstream;
  50023. }, t.prototype.getDownstream = function() {
  50024. return this._downstream;
  50025. }, t.prototype.setOutputEnd = function(e) {
  50026. this._outputDueEnd = this._settedOutputEnd = e;
  50027. }, t;
  50028. }()
  50029. ), vz = /* @__PURE__ */ function() {
  50030. var t, e, n, r, i, a = {
  50031. reset: function(l, u, c, f) {
  50032. e = l, t = u, n = c, r = f, i = Math.ceil(r / n), a.next = n > 1 && r > 0 ? s : o;
  50033. }
  50034. };
  50035. return a;
  50036. function o() {
  50037. return e < t ? e++ : null;
  50038. }
  50039. function s() {
  50040. var l = e % i * n + Math.ceil(e / i), u = e >= t ? null : l < r ? l : e;
  50041. return e++, u;
  50042. }
  50043. }();
  50044. function Kl(t, e) {
  50045. var n = e && e.type;
  50046. return n === "ordinal" ? t : (n === "time" && !St(t) && t != null && t !== "-" && (t = +Yi(t)), t == null || t === "" ? NaN : Number(t));
  50047. }
  50048. var r4e = Pe({
  50049. number: function(t) {
  50050. return parseFloat(t);
  50051. },
  50052. time: function(t) {
  50053. return +Yi(t);
  50054. },
  50055. trim: function(t) {
  50056. return Oe(t) ? ma(t) : t;
  50057. }
  50058. });
  50059. function HJ(t) {
  50060. return r4e.get(t);
  50061. }
  50062. var GJ = {
  50063. lt: function(t, e) {
  50064. return t < e;
  50065. },
  50066. lte: function(t, e) {
  50067. return t <= e;
  50068. },
  50069. gt: function(t, e) {
  50070. return t > e;
  50071. },
  50072. gte: function(t, e) {
  50073. return t >= e;
  50074. }
  50075. }, i4e = (
  50076. /** @class */
  50077. function() {
  50078. function t(e, n) {
  50079. if (!St(n)) {
  50080. var r = "";
  50081. process.env.NODE_ENV !== "production" && (r = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), Et(r);
  50082. }
  50083. this._opFn = GJ[e], this._rvalFloat = is(n);
  50084. }
  50085. return t.prototype.evaluate = function(e) {
  50086. return St(e) ? this._opFn(e, this._rvalFloat) : this._opFn(is(e), this._rvalFloat);
  50087. }, t;
  50088. }()
  50089. ), jJ = (
  50090. /** @class */
  50091. function() {
  50092. function t(e, n) {
  50093. var r = e === "desc";
  50094. this._resultLT = r ? 1 : -1, n == null && (n = r ? "min" : "max"), this._incomparable = n === "min" ? -1 / 0 : 1 / 0;
  50095. }
  50096. return t.prototype.evaluate = function(e, n) {
  50097. var r = St(e) ? e : is(e), i = St(n) ? n : is(n), a = isNaN(r), o = isNaN(i);
  50098. if (a && (r = this._incomparable), o && (i = this._incomparable), a && o) {
  50099. var s = Oe(e), l = Oe(n);
  50100. s && (r = l ? e : 0), l && (i = s ? n : 0);
  50101. }
  50102. return r < i ? this._resultLT : r > i ? -this._resultLT : 0;
  50103. }, t;
  50104. }()
  50105. ), a4e = (
  50106. /** @class */
  50107. function() {
  50108. function t(e, n) {
  50109. this._rval = n, this._isEQ = e, this._rvalTypeof = typeof n, this._rvalFloat = is(n);
  50110. }
  50111. return t.prototype.evaluate = function(e) {
  50112. var n = e === this._rval;
  50113. if (!n) {
  50114. var r = typeof e;
  50115. r !== this._rvalTypeof && (r === "number" || this._rvalTypeof === "number") && (n = is(e) === this._rvalFloat);
  50116. }
  50117. return this._isEQ ? n : !n;
  50118. }, t;
  50119. }()
  50120. );
  50121. function o4e(t, e) {
  50122. return t === "eq" || t === "ne" ? new a4e(t === "eq", e) : Ce(GJ, t) ? new i4e(t, e) : null;
  50123. }
  50124. var s4e = (
  50125. /** @class */
  50126. function() {
  50127. function t() {
  50128. }
  50129. return t.prototype.getRawData = function() {
  50130. throw new Error("not supported");
  50131. }, t.prototype.getRawDataItem = function(e) {
  50132. throw new Error("not supported");
  50133. }, t.prototype.cloneRawData = function() {
  50134. }, t.prototype.getDimensionInfo = function(e) {
  50135. }, t.prototype.cloneAllDimensionInfo = function() {
  50136. }, t.prototype.count = function() {
  50137. }, t.prototype.retrieveValue = function(e, n) {
  50138. }, t.prototype.retrieveValueFromItem = function(e, n) {
  50139. }, t.prototype.convertValue = function(e, n) {
  50140. return Kl(e, n);
  50141. }, t;
  50142. }()
  50143. );
  50144. function l4e(t, e) {
  50145. var n = new s4e(), r = t.data, i = n.sourceFormat = t.sourceFormat, a = t.startIndex, o = "";
  50146. t.seriesLayoutBy !== Xo && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), Et(o));
  50147. var s = [], l = {}, u = t.dimensionsDefine;
  50148. if (u)
  50149. k(u, function(v, g) {
  50150. var m = v.name, y = {
  50151. index: g,
  50152. name: m,
  50153. displayName: v.displayName
  50154. };
  50155. if (s.push(y), m != null) {
  50156. var b = "";
  50157. Ce(l, m) && (process.env.NODE_ENV !== "production" && (b = 'dimension name "' + m + '" duplicated.'), Et(b)), l[m] = y;
  50158. }
  50159. });
  50160. else
  50161. for (var c = 0; c < t.dimensionsDetectedCount; c++)
  50162. s.push({
  50163. index: c
  50164. });
  50165. var f = FJ(i, Xo);
  50166. e.__isBuiltIn && (n.getRawDataItem = function(v) {
  50167. return f(r, a, s, v);
  50168. }, n.getRawData = xe(u4e, null, t)), n.cloneRawData = xe(c4e, null, t);
  50169. var d = WJ(i, Xo);
  50170. n.count = xe(d, null, r, a, s);
  50171. var h = QJ(i);
  50172. n.retrieveValue = function(v, g) {
  50173. var m = f(r, a, s, v);
  50174. return p(m, g);
  50175. };
  50176. var p = n.retrieveValueFromItem = function(v, g) {
  50177. if (v != null) {
  50178. var m = s[g];
  50179. if (m)
  50180. return h(v, g, m.name);
  50181. }
  50182. };
  50183. return n.getDimensionInfo = xe(f4e, null, s, l), n.cloneAllDimensionInfo = xe(d4e, null, s), n;
  50184. }
  50185. function u4e(t) {
  50186. var e = t.sourceFormat;
  50187. if (!uk(e)) {
  50188. var n = "";
  50189. process.env.NODE_ENV !== "production" && (n = "`getRawData` is not supported in source format " + e), Et(n);
  50190. }
  50191. return t.data;
  50192. }
  50193. function c4e(t) {
  50194. var e = t.sourceFormat, n = t.data;
  50195. if (!uk(e)) {
  50196. var r = "";
  50197. process.env.NODE_ENV !== "production" && (r = "`cloneRawData` is not supported in source format " + e), Et(r);
  50198. }
  50199. if (e === Br) {
  50200. for (var i = [], a = 0, o = n.length; a < o; a++)
  50201. i.push(n[a].slice());
  50202. return i;
  50203. } else if (e === Na) {
  50204. for (var i = [], a = 0, o = n.length; a < o; a++)
  50205. i.push(le({}, n[a]));
  50206. return i;
  50207. }
  50208. }
  50209. function f4e(t, e, n) {
  50210. if (n != null) {
  50211. if (St(n) || !isNaN(n) && !Ce(e, n))
  50212. return t[n];
  50213. if (Ce(e, n))
  50214. return e[n];
  50215. }
  50216. }
  50217. function d4e(t) {
  50218. return Le(t);
  50219. }
  50220. var ZJ = Pe();
  50221. function h4e(t) {
  50222. t = Le(t);
  50223. var e = t.type, n = "";
  50224. e || (process.env.NODE_ENV !== "production" && (n = "Must have a `type` when `registerTransform`."), Et(n));
  50225. var r = e.split(":");
  50226. r.length !== 2 && (process.env.NODE_ENV !== "production" && (n = 'Name must include namespace like "ns:regression".'), Et(n));
  50227. var i = !1;
  50228. r[0] === "echarts" && (e = r[1], i = !0), t.__isBuiltIn = i, ZJ.set(e, t);
  50229. }
  50230. function p4e(t, e, n) {
  50231. var r = Qt(t), i = r.length, a = "";
  50232. i || (process.env.NODE_ENV !== "production" && (a = "If `transform` declared, it should at least contain one transform."), Et(a));
  50233. for (var o = 0, s = i; o < s; o++) {
  50234. var l = r[o];
  50235. e = v4e(l, e, n, i === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
  50236. }
  50237. return e;
  50238. }
  50239. function v4e(t, e, n, r) {
  50240. var i = "";
  50241. e.length || (process.env.NODE_ENV !== "production" && (i = "Must have at least one upstream dataset."), Et(i)), Ie(t) || (process.env.NODE_ENV !== "production" && (i = "transform declaration must be an object rather than " + typeof t + "."), Et(i));
  50242. var a = t.type, o = ZJ.get(a);
  50243. o || (process.env.NODE_ENV !== "production" && (i = 'Can not find transform on type "' + a + '".'), Et(i));
  50244. var s = ce(e, function(c) {
  50245. return l4e(c, o);
  50246. }), l = Qt(o.transform({
  50247. upstream: s[0],
  50248. upstreamList: s,
  50249. config: Le(t.config)
  50250. }));
  50251. if (process.env.NODE_ENV !== "production" && t.print) {
  50252. var u = ce(l, function(c) {
  50253. var f = r != null ? " === pipe index: " + r : "";
  50254. return ["=== dataset index: " + n.datasetIndex + f + " ===", "- transform result data:", ti(c.data), "- transform result dimensions:", ti(c.dimensions)].join(`
  50255. `);
  50256. }).join(`
  50257. `);
  50258. FDe(u);
  50259. }
  50260. return ce(l, function(c, f) {
  50261. var d = "";
  50262. Ie(c) || (process.env.NODE_ENV !== "production" && (d = "A transform should not return some empty results."), Et(d)), c.data || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be not be null or undefined"), Et(d));
  50263. var h = BJ(c.data);
  50264. uk(h) || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be array rows or object rows."), Et(d));
  50265. var p, v = e[0];
  50266. if (v && f === 0 && !c.dimensions) {
  50267. var g = v.startIndex;
  50268. g && (c.data = v.data.slice(0, g).concat(c.data)), p = {
  50269. seriesLayoutBy: Xo,
  50270. sourceHeader: g,
  50271. dimensions: v.metaRawOption.dimensions
  50272. };
  50273. } else
  50274. p = {
  50275. seriesLayoutBy: Xo,
  50276. sourceHeader: 0,
  50277. dimensions: c.dimensions
  50278. };
  50279. return HA(c.data, p, null);
  50280. });
  50281. }
  50282. function uk(t) {
  50283. return t === Br || t === Na;
  50284. }
  50285. var lw = "undefined", g4e = typeof Uint32Array === lw ? Array : Uint32Array, m4e = typeof Uint16Array === lw ? Array : Uint16Array, UJ = typeof Int32Array === lw ? Array : Int32Array, gz = typeof Float64Array === lw ? Array : Float64Array, XJ = {
  50286. float: gz,
  50287. int: UJ,
  50288. // Ordinal data type can be string or int
  50289. ordinal: Array,
  50290. number: Array,
  50291. time: gz
  50292. }, IT;
  50293. function sv(t) {
  50294. return t > 65535 ? g4e : m4e;
  50295. }
  50296. function ld() {
  50297. return [1 / 0, -1 / 0];
  50298. }
  50299. function y4e(t) {
  50300. var e = t.constructor;
  50301. return e === Array ? t.slice() : new e(t);
  50302. }
  50303. function mz(t, e, n, r, i) {
  50304. var a = XJ[n || "float"];
  50305. if (i) {
  50306. var o = t[e], s = o && o.length;
  50307. if (s !== r) {
  50308. for (var l = new a(r), u = 0; u < s; u++)
  50309. l[u] = o[u];
  50310. t[e] = l;
  50311. }
  50312. } else
  50313. t[e] = new a(r);
  50314. }
  50315. var GA = (
  50316. /** @class */
  50317. function() {
  50318. function t() {
  50319. this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = Pe();
  50320. }
  50321. return t.prototype.initData = function(e, n, r) {
  50322. process.env.NODE_ENV !== "production" && ke(Me(e.getItem) && Me(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
  50323. var i = e.getSource(), a = this.defaultDimValueGetter = IT[i.sourceFormat];
  50324. this._dimValueGetter = r || a, this._rawExtent = [];
  50325. var o = zJ(i);
  50326. this._dimensions = ce(n, function(s) {
  50327. return process.env.NODE_ENV !== "production" && o && ke(s.property != null), {
  50328. // Only pick these two props. Not leak other properties like orderMeta.
  50329. type: s.type,
  50330. property: s.property
  50331. };
  50332. }), this._initDataFromProvider(0, e.count());
  50333. }, t.prototype.getProvider = function() {
  50334. return this._provider;
  50335. }, t.prototype.getSource = function() {
  50336. return this._provider.getSource();
  50337. }, t.prototype.ensureCalculationDimension = function(e, n) {
  50338. var r = this._calcDimNameToIdx, i = this._dimensions, a = r.get(e);
  50339. if (a != null) {
  50340. if (i[a].type === n)
  50341. return a;
  50342. } else
  50343. a = i.length;
  50344. return i[a] = {
  50345. type: n
  50346. }, r.set(e, a), this._chunks[a] = new XJ[n || "float"](this._rawCount), this._rawExtent[a] = ld(), a;
  50347. }, t.prototype.collectOrdinalMeta = function(e, n) {
  50348. var r = this._chunks[e], i = this._dimensions[e], a = this._rawExtent, o = i.ordinalOffset || 0, s = r.length;
  50349. o === 0 && (a[e] = ld());
  50350. for (var l = a[e], u = o; u < s; u++) {
  50351. var c = r[u] = n.parseAndCollect(r[u]);
  50352. isNaN(c) || (l[0] = Math.min(c, l[0]), l[1] = Math.max(c, l[1]));
  50353. }
  50354. i.ordinalMeta = n, i.ordinalOffset = s, i.type = "ordinal";
  50355. }, t.prototype.getOrdinalMeta = function(e) {
  50356. var n = this._dimensions[e], r = n.ordinalMeta;
  50357. return r;
  50358. }, t.prototype.getDimensionProperty = function(e) {
  50359. var n = this._dimensions[e];
  50360. return n && n.property;
  50361. }, t.prototype.appendData = function(e) {
  50362. process.env.NODE_ENV !== "production" && ke(!this._indices, "appendData can only be called on raw data.");
  50363. var n = this._provider, r = this.count();
  50364. n.appendData(e);
  50365. var i = n.count();
  50366. return n.persistent || (i += r), r < i && this._initDataFromProvider(r, i, !0), [r, i];
  50367. }, t.prototype.appendValues = function(e, n) {
  50368. for (var r = this._chunks, i = this._dimensions, a = i.length, o = this._rawExtent, s = this.count(), l = s + Math.max(e.length, n || 0), u = 0; u < a; u++) {
  50369. var c = i[u];
  50370. mz(r, u, c.type, l, !0);
  50371. }
  50372. for (var f = [], d = s; d < l; d++)
  50373. for (var h = d - s, p = 0; p < a; p++) {
  50374. var c = i[p], v = IT.arrayRows.call(this, e[h] || f, c.property, h, p);
  50375. r[p][d] = v;
  50376. var g = o[p];
  50377. v < g[0] && (g[0] = v), v > g[1] && (g[1] = v);
  50378. }
  50379. return this._rawCount = this._count = l, {
  50380. start: s,
  50381. end: l
  50382. };
  50383. }, t.prototype._initDataFromProvider = function(e, n, r) {
  50384. for (var i = this._provider, a = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = ce(o, function(y) {
  50385. return y.property;
  50386. }), c = 0; c < s; c++) {
  50387. var f = o[c];
  50388. l[c] || (l[c] = ld()), mz(a, c, f.type, n, r);
  50389. }
  50390. if (i.fillStorage)
  50391. i.fillStorage(e, n, a, l);
  50392. else
  50393. for (var d = [], h = e; h < n; h++) {
  50394. d = i.getItem(h, d);
  50395. for (var p = 0; p < s; p++) {
  50396. var v = a[p], g = this._dimValueGetter(d, u[p], h, p);
  50397. v[h] = g;
  50398. var m = l[p];
  50399. g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
  50400. }
  50401. }
  50402. !i.persistent && i.clean && i.clean(), this._rawCount = this._count = n, this._extent = [];
  50403. }, t.prototype.count = function() {
  50404. return this._count;
  50405. }, t.prototype.get = function(e, n) {
  50406. if (!(n >= 0 && n < this._count))
  50407. return NaN;
  50408. var r = this._chunks[e];
  50409. return r ? r[this.getRawIndex(n)] : NaN;
  50410. }, t.prototype.getValues = function(e, n) {
  50411. var r = [], i = [];
  50412. if (n == null) {
  50413. n = e, e = [];
  50414. for (var a = 0; a < this._dimensions.length; a++)
  50415. i.push(a);
  50416. } else
  50417. i = e;
  50418. for (var a = 0, o = i.length; a < o; a++)
  50419. r.push(this.get(i[a], n));
  50420. return r;
  50421. }, t.prototype.getByRawIndex = function(e, n) {
  50422. if (!(n >= 0 && n < this._rawCount))
  50423. return NaN;
  50424. var r = this._chunks[e];
  50425. return r ? r[n] : NaN;
  50426. }, t.prototype.getSum = function(e) {
  50427. var n = this._chunks[e], r = 0;
  50428. if (n)
  50429. for (var i = 0, a = this.count(); i < a; i++) {
  50430. var o = this.get(e, i);
  50431. isNaN(o) || (r += o);
  50432. }
  50433. return r;
  50434. }, t.prototype.getMedian = function(e) {
  50435. var n = [];
  50436. this.each([e], function(a) {
  50437. isNaN(a) || n.push(a);
  50438. });
  50439. var r = n.sort(function(a, o) {
  50440. return a - o;
  50441. }), i = this.count();
  50442. return i === 0 ? 0 : i % 2 === 1 ? r[(i - 1) / 2] : (r[i / 2] + r[i / 2 - 1]) / 2;
  50443. }, t.prototype.indexOfRawIndex = function(e) {
  50444. if (e >= this._rawCount || e < 0)
  50445. return -1;
  50446. if (!this._indices)
  50447. return e;
  50448. var n = this._indices, r = n[e];
  50449. if (r != null && r < this._count && r === e)
  50450. return e;
  50451. for (var i = 0, a = this._count - 1; i <= a; ) {
  50452. var o = (i + a) / 2 | 0;
  50453. if (n[o] < e)
  50454. i = o + 1;
  50455. else if (n[o] > e)
  50456. a = o - 1;
  50457. else
  50458. return o;
  50459. }
  50460. return -1;
  50461. }, t.prototype.indicesOfNearest = function(e, n, r) {
  50462. var i = this._chunks, a = i[e], o = [];
  50463. if (!a)
  50464. return o;
  50465. r == null && (r = 1 / 0);
  50466. for (var s = 1 / 0, l = -1, u = 0, c = 0, f = this.count(); c < f; c++) {
  50467. var d = this.getRawIndex(c), h = n - a[d], p = Math.abs(h);
  50468. p <= r && ((p < s || p === s && h >= 0 && l < 0) && (s = p, l = h, u = 0), h === l && (o[u++] = c));
  50469. }
  50470. return o.length = u, o;
  50471. }, t.prototype.getIndices = function() {
  50472. var e, n = this._indices;
  50473. if (n) {
  50474. var r = n.constructor, i = this._count;
  50475. if (r === Array) {
  50476. e = new r(i);
  50477. for (var a = 0; a < i; a++)
  50478. e[a] = n[a];
  50479. } else
  50480. e = new r(n.buffer, 0, i);
  50481. } else {
  50482. var r = sv(this._rawCount);
  50483. e = new r(this.count());
  50484. for (var a = 0; a < e.length; a++)
  50485. e[a] = a;
  50486. }
  50487. return e;
  50488. }, t.prototype.filter = function(e, n) {
  50489. if (!this._count)
  50490. return this;
  50491. for (var r = this.clone(), i = r.count(), a = sv(r._rawCount), o = new a(i), s = [], l = e.length, u = 0, c = e[0], f = r._chunks, d = 0; d < i; d++) {
  50492. var h = void 0, p = r.getRawIndex(d);
  50493. if (l === 0)
  50494. h = n(d);
  50495. else if (l === 1) {
  50496. var v = f[c][p];
  50497. h = n(v, d);
  50498. } else {
  50499. for (var g = 0; g < l; g++)
  50500. s[g] = f[e[g]][p];
  50501. s[g] = d, h = n.apply(null, s);
  50502. }
  50503. h && (o[u++] = p);
  50504. }
  50505. return u < i && (r._indices = o), r._count = u, r._extent = [], r._updateGetRawIdx(), r;
  50506. }, t.prototype.selectRange = function(e) {
  50507. var n = this.clone(), r = n._count;
  50508. if (!r)
  50509. return this;
  50510. var i = st(e), a = i.length;
  50511. if (!a)
  50512. return this;
  50513. var o = n.count(), s = sv(n._rawCount), l = new s(o), u = 0, c = i[0], f = e[c][0], d = e[c][1], h = n._chunks, p = !1;
  50514. if (!n._indices) {
  50515. var v = 0;
  50516. if (a === 1) {
  50517. for (var g = h[i[0]], m = 0; m < r; m++) {
  50518. var y = g[m];
  50519. (y >= f && y <= d || isNaN(y)) && (l[u++] = v), v++;
  50520. }
  50521. p = !0;
  50522. } else if (a === 2) {
  50523. for (var g = h[i[0]], b = h[i[1]], _ = e[i[1]][0], O = e[i[1]][1], m = 0; m < r; m++) {
  50524. var y = g[m], S = b[m];
  50525. (y >= f && y <= d || isNaN(y)) && (S >= _ && S <= O || isNaN(S)) && (l[u++] = v), v++;
  50526. }
  50527. p = !0;
  50528. }
  50529. }
  50530. if (!p)
  50531. if (a === 1)
  50532. for (var m = 0; m < o; m++) {
  50533. var x = n.getRawIndex(m), y = h[i[0]][x];
  50534. (y >= f && y <= d || isNaN(y)) && (l[u++] = x);
  50535. }
  50536. else
  50537. for (var m = 0; m < o; m++) {
  50538. for (var C = !0, x = n.getRawIndex(m), T = 0; T < a; T++) {
  50539. var w = i[T], y = h[w][x];
  50540. (y < e[w][0] || y > e[w][1]) && (C = !1);
  50541. }
  50542. C && (l[u++] = n.getRawIndex(m));
  50543. }
  50544. return u < o && (n._indices = l), n._count = u, n._extent = [], n._updateGetRawIdx(), n;
  50545. }, t.prototype.map = function(e, n) {
  50546. var r = this.clone(e);
  50547. return this._updateDims(r, e, n), r;
  50548. }, t.prototype.modify = function(e, n) {
  50549. this._updateDims(this, e, n);
  50550. }, t.prototype._updateDims = function(e, n, r) {
  50551. for (var i = e._chunks, a = [], o = n.length, s = e.count(), l = [], u = e._rawExtent, c = 0; c < n.length; c++)
  50552. u[n[c]] = ld();
  50553. for (var f = 0; f < s; f++) {
  50554. for (var d = e.getRawIndex(f), h = 0; h < o; h++)
  50555. l[h] = i[n[h]][d];
  50556. l[o] = f;
  50557. var p = r && r.apply(null, l);
  50558. if (p != null) {
  50559. typeof p != "object" && (a[0] = p, p = a);
  50560. for (var c = 0; c < p.length; c++) {
  50561. var v = n[c], g = p[c], m = u[v], y = i[v];
  50562. y && (y[d] = g), g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
  50563. }
  50564. }
  50565. }
  50566. }, t.prototype.lttbDownSample = function(e, n) {
  50567. var r = this.clone([e], !0), i = r._chunks, a = i[e], o = this.count(), s = 0, l = Math.floor(1 / n), u = this.getRawIndex(0), c, f, d, h = new (sv(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
  50568. h[s++] = u;
  50569. for (var p = 1; p < o - 1; p += l) {
  50570. for (var v = Math.min(p + l, o - 1), g = Math.min(p + l * 2, o), m = (g + v) / 2, y = 0, b = v; b < g; b++) {
  50571. var _ = this.getRawIndex(b), O = a[_];
  50572. isNaN(O) || (y += O);
  50573. }
  50574. y /= g - v;
  50575. var S = p, x = Math.min(p + l, o), C = p - 1, T = a[u];
  50576. c = -1, d = S;
  50577. for (var w = -1, P = 0, b = S; b < x; b++) {
  50578. var _ = this.getRawIndex(b), O = a[_];
  50579. if (isNaN(O)) {
  50580. P++, w < 0 && (w = _);
  50581. continue;
  50582. }
  50583. f = Math.abs((C - m) * (O - T) - (C - b) * (y - T)), f > c && (c = f, d = _);
  50584. }
  50585. P > 0 && P < x - S && (h[s++] = Math.min(w, d), d = Math.max(w, d)), h[s++] = d, u = d;
  50586. }
  50587. return h[s++] = this.getRawIndex(o - 1), r._count = s, r._indices = h, r.getRawIndex = this._getRawIdx, r;
  50588. }, t.prototype.downSample = function(e, n, r, i) {
  50589. for (var a = this.clone([e], !0), o = a._chunks, s = [], l = Math.floor(1 / n), u = o[e], c = this.count(), f = a._rawExtent[e] = ld(), d = new (sv(this._rawCount))(Math.ceil(c / l)), h = 0, p = 0; p < c; p += l) {
  50590. l > c - p && (l = c - p, s.length = l);
  50591. for (var v = 0; v < l; v++) {
  50592. var g = this.getRawIndex(p + v);
  50593. s[v] = u[g];
  50594. }
  50595. var m = r(s), y = this.getRawIndex(Math.min(p + i(s, m) || 0, c - 1));
  50596. u[y] = m, m < f[0] && (f[0] = m), m > f[1] && (f[1] = m), d[h++] = y;
  50597. }
  50598. return a._count = h, a._indices = d, a._updateGetRawIdx(), a;
  50599. }, t.prototype.each = function(e, n) {
  50600. if (this._count)
  50601. for (var r = e.length, i = this._chunks, a = 0, o = this.count(); a < o; a++) {
  50602. var s = this.getRawIndex(a);
  50603. switch (r) {
  50604. case 0:
  50605. n(a);
  50606. break;
  50607. case 1:
  50608. n(i[e[0]][s], a);
  50609. break;
  50610. case 2:
  50611. n(i[e[0]][s], i[e[1]][s], a);
  50612. break;
  50613. default:
  50614. for (var l = 0, u = []; l < r; l++)
  50615. u[l] = i[e[l]][s];
  50616. u[l] = a, n.apply(null, u);
  50617. }
  50618. }
  50619. }, t.prototype.getDataExtent = function(e) {
  50620. var n = this._chunks[e], r = ld();
  50621. if (!n)
  50622. return r;
  50623. var i = this.count(), a = !this._indices, o;
  50624. if (a)
  50625. return this._rawExtent[e].slice();
  50626. if (o = this._extent[e], o)
  50627. return o.slice();
  50628. o = r;
  50629. for (var s = o[0], l = o[1], u = 0; u < i; u++) {
  50630. var c = this.getRawIndex(u), f = n[c];
  50631. f < s && (s = f), f > l && (l = f);
  50632. }
  50633. return o = [s, l], this._extent[e] = o, o;
  50634. }, t.prototype.getRawDataItem = function(e) {
  50635. var n = this.getRawIndex(e);
  50636. if (this._provider.persistent)
  50637. return this._provider.getItem(n);
  50638. for (var r = [], i = this._chunks, a = 0; a < i.length; a++)
  50639. r.push(i[a][n]);
  50640. return r;
  50641. }, t.prototype.clone = function(e, n) {
  50642. var r = new t(), i = this._chunks, a = e && Aa(e, function(s, l) {
  50643. return s[l] = !0, s;
  50644. }, {});
  50645. if (a)
  50646. for (var o = 0; o < i.length; o++)
  50647. r._chunks[o] = a[o] ? y4e(i[o]) : i[o];
  50648. else
  50649. r._chunks = i;
  50650. return this._copyCommonProps(r), n || (r._indices = this._cloneIndices()), r._updateGetRawIdx(), r;
  50651. }, t.prototype._copyCommonProps = function(e) {
  50652. e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = Le(this._extent), e._rawExtent = Le(this._rawExtent);
  50653. }, t.prototype._cloneIndices = function() {
  50654. if (this._indices) {
  50655. var e = this._indices.constructor, n = void 0;
  50656. if (e === Array) {
  50657. var r = this._indices.length;
  50658. n = new e(r);
  50659. for (var i = 0; i < r; i++)
  50660. n[i] = this._indices[i];
  50661. } else
  50662. n = new e(this._indices);
  50663. return n;
  50664. }
  50665. return null;
  50666. }, t.prototype._getRawIdxIdentity = function(e) {
  50667. return e;
  50668. }, t.prototype._getRawIdx = function(e) {
  50669. return e < this._count && e >= 0 ? this._indices[e] : -1;
  50670. }, t.prototype._updateGetRawIdx = function() {
  50671. this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
  50672. }, t.internalField = function() {
  50673. function e(n, r, i, a) {
  50674. return Kl(n[a], this._dimensions[a]);
  50675. }
  50676. IT = {
  50677. arrayRows: e,
  50678. objectRows: function(n, r, i, a) {
  50679. return Kl(n[r], this._dimensions[a]);
  50680. },
  50681. keyedColumns: e,
  50682. original: function(n, r, i, a) {
  50683. var o = n && (n.value == null ? n : n.value);
  50684. return Kl(o instanceof Array ? o[a] : o, this._dimensions[a]);
  50685. },
  50686. typedArray: function(n, r, i, a) {
  50687. return n[a];
  50688. }
  50689. };
  50690. }(), t;
  50691. }()
  50692. ), YJ = (
  50693. /** @class */
  50694. function() {
  50695. function t(e) {
  50696. this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
  50697. }
  50698. return t.prototype.dirty = function() {
  50699. this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
  50700. }, t.prototype._setLocalSource = function(e, n) {
  50701. this._sourceList = e, this._upstreamSignList = n, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
  50702. }, t.prototype._getVersionSign = function() {
  50703. return this._sourceHost.uid + "_" + this._versionSignBase;
  50704. }, t.prototype.prepareSource = function() {
  50705. this._isDirty() && (this._createSource(), this._dirty = !1);
  50706. }, t.prototype._createSource = function() {
  50707. this._setLocalSource([], []);
  50708. var e = this._sourceHost, n = this._getUpstreamSourceManagers(), r = !!n.length, i, a;
  50709. if (lv(e)) {
  50710. var o = e, s = void 0, l = void 0, u = void 0;
  50711. if (r) {
  50712. var c = n[0];
  50713. c.prepareSource(), u = c.getSource(), s = u.data, l = u.sourceFormat, a = [c._getVersionSign()];
  50714. } else
  50715. s = o.get("data", !0), l = Nr(s) ? Ds : La, a = [];
  50716. var f = this._getSourceMetaRawOption() || {}, d = u && u.metaRawOption || {}, h = We(f.seriesLayoutBy, d.seriesLayoutBy) || null, p = We(f.sourceHeader, d.sourceHeader), v = We(f.dimensions, d.dimensions), g = h !== d.seriesLayoutBy || !!p != !!d.sourceHeader || v;
  50717. i = g ? [HA(s, {
  50718. seriesLayoutBy: h,
  50719. sourceHeader: p,
  50720. dimensions: v
  50721. }, l)] : [];
  50722. } else {
  50723. var m = e;
  50724. if (r) {
  50725. var y = this._applyTransform(n);
  50726. i = y.sourceList, a = y.upstreamSignList;
  50727. } else {
  50728. var b = m.get("source", !0);
  50729. i = [HA(b, this._getSourceMetaRawOption(), null)], a = [];
  50730. }
  50731. }
  50732. process.env.NODE_ENV !== "production" && ke(i && a), this._setLocalSource(i, a);
  50733. }, t.prototype._applyTransform = function(e) {
  50734. var n = this._sourceHost, r = n.get("transform", !0), i = n.get("fromTransformResult", !0);
  50735. if (process.env.NODE_ENV !== "production" && ke(i != null || r != null), i != null) {
  50736. var a = "";
  50737. e.length !== 1 && (process.env.NODE_ENV !== "production" && (a = "When using `fromTransformResult`, there should be only one upstream dataset"), bz(a));
  50738. }
  50739. var o, s = [], l = [];
  50740. return k(e, function(u) {
  50741. u.prepareSource();
  50742. var c = u.getSource(i || 0), f = "";
  50743. i != null && !c && (process.env.NODE_ENV !== "production" && (f = "Can not retrieve result by `fromTransformResult`: " + i), bz(f)), s.push(c), l.push(u._getVersionSign());
  50744. }), r ? o = p4e(r, s, {
  50745. datasetIndex: n.componentIndex
  50746. }) : i != null && (o = [XLe(s[0])]), {
  50747. sourceList: o,
  50748. upstreamSignList: l
  50749. };
  50750. }, t.prototype._isDirty = function() {
  50751. if (this._dirty)
  50752. return !0;
  50753. for (var e = this._getUpstreamSourceManagers(), n = 0; n < e.length; n++) {
  50754. var r = e[n];
  50755. if (
  50756. // Consider the case that there is ancestor diry, call it recursively.
  50757. // The performance is probably not an issue because usually the chain is not long.
  50758. r._isDirty() || this._upstreamSignList[n] !== r._getVersionSign()
  50759. )
  50760. return !0;
  50761. }
  50762. }, t.prototype.getSource = function(e) {
  50763. e = e || 0;
  50764. var n = this._sourceList[e];
  50765. if (!n) {
  50766. var r = this._getUpstreamSourceManagers();
  50767. return r[0] && r[0].getSource(e);
  50768. }
  50769. return n;
  50770. }, t.prototype.getSharedDataStore = function(e) {
  50771. process.env.NODE_ENV !== "production" && ke(lv(this._sourceHost), "Can only call getDataStore on series source manager.");
  50772. var n = e.makeStoreSchema();
  50773. return this._innerGetDataStore(n.dimensions, e.source, n.hash);
  50774. }, t.prototype._innerGetDataStore = function(e, n, r) {
  50775. var i = 0, a = this._storeList, o = a[i];
  50776. o || (o = a[i] = {});
  50777. var s = o[r];
  50778. if (!s) {
  50779. var l = this._getUpstreamSourceManagers()[0];
  50780. lv(this._sourceHost) && l ? s = l._innerGetDataStore(e, n, r) : (s = new GA(), s.initData(new VJ(n, e.length), e)), o[r] = s;
  50781. }
  50782. return s;
  50783. }, t.prototype._getUpstreamSourceManagers = function() {
  50784. var e = this._sourceHost;
  50785. if (lv(e)) {
  50786. var n = rk(e);
  50787. return n ? [n.getSourceManager()] : [];
  50788. } else
  50789. return ce(SLe(e), function(r) {
  50790. return r.getSourceManager();
  50791. });
  50792. }, t.prototype._getSourceMetaRawOption = function() {
  50793. var e = this._sourceHost, n, r, i;
  50794. if (lv(e))
  50795. n = e.get("seriesLayoutBy", !0), r = e.get("sourceHeader", !0), i = e.get("dimensions", !0);
  50796. else if (!this._getUpstreamSourceManagers().length) {
  50797. var a = e;
  50798. n = a.get("seriesLayoutBy", !0), r = a.get("sourceHeader", !0), i = a.get("dimensions", !0);
  50799. }
  50800. return {
  50801. seriesLayoutBy: n,
  50802. sourceHeader: r,
  50803. dimensions: i
  50804. };
  50805. }, t;
  50806. }()
  50807. );
  50808. function yz(t) {
  50809. var e = t.option.transform;
  50810. e && vm(t.option.transform);
  50811. }
  50812. function lv(t) {
  50813. return t.mainType === "series";
  50814. }
  50815. function bz(t) {
  50816. throw new Error(t);
  50817. }
  50818. var qJ = "line-height:1";
  50819. function KJ(t, e) {
  50820. var n = t.color || "#6e7079", r = t.fontSize || 12, i = t.fontWeight || "400", a = t.color || "#464646", o = t.fontSize || 14, s = t.fontWeight || "900";
  50821. return e === "html" ? {
  50822. // eslint-disable-next-line max-len
  50823. nameStyle: "font-size:" + Gr(r + "") + "px;color:" + Gr(n) + ";font-weight:" + Gr(i + ""),
  50824. // eslint-disable-next-line max-len
  50825. valueStyle: "font-size:" + Gr(o + "") + "px;color:" + Gr(a) + ";font-weight:" + Gr(s + "")
  50826. } : {
  50827. nameStyle: {
  50828. fontSize: r,
  50829. fill: n,
  50830. fontWeight: i
  50831. },
  50832. valueStyle: {
  50833. fontSize: o,
  50834. fill: a,
  50835. fontWeight: s
  50836. }
  50837. };
  50838. }
  50839. var b4e = [0, 10, 20, 30], _4e = ["", `
  50840. `, `
  50841. `, `
  50842. `];
  50843. function tr(t, e) {
  50844. return e.type = t, e;
  50845. }
  50846. function jA(t) {
  50847. return t.type === "section";
  50848. }
  50849. function JJ(t) {
  50850. return jA(t) ? O4e : S4e;
  50851. }
  50852. function eee(t) {
  50853. if (jA(t)) {
  50854. var e = 0, n = t.blocks.length, r = n > 1 || n > 0 && !t.noHeader;
  50855. return k(t.blocks, function(i) {
  50856. var a = eee(i);
  50857. a >= e && (e = a + +(r && // 0 always can not be readable gap level.
  50858. (!a || jA(i) && !i.noHeader)));
  50859. }), e;
  50860. }
  50861. return 0;
  50862. }
  50863. function O4e(t, e, n, r) {
  50864. var i = e.noHeader, a = x4e(eee(e)), o = [], s = e.blocks || [];
  50865. ke(!s || ue(s)), s = s || [];
  50866. var l = t.orderMode;
  50867. if (e.sortBlocks && l) {
  50868. s = s.slice();
  50869. var u = {
  50870. valueAsc: "asc",
  50871. valueDesc: "desc"
  50872. };
  50873. if (Ce(u, l)) {
  50874. var c = new jJ(u[l], null);
  50875. s.sort(function(p, v) {
  50876. return c.evaluate(p.sortParam, v.sortParam);
  50877. });
  50878. } else l === "seriesDesc" && s.reverse();
  50879. }
  50880. k(s, function(p, v) {
  50881. var g = e.valueFormatter, m = JJ(p)(
  50882. // Inherit valueFormatter
  50883. g ? le(le({}, t), {
  50884. valueFormatter: g
  50885. }) : t,
  50886. p,
  50887. v > 0 ? a.html : 0,
  50888. r
  50889. );
  50890. m != null && o.push(m);
  50891. });
  50892. var f = t.renderMode === "richText" ? o.join(a.richText) : ZA(o.join(""), i ? n : a.html);
  50893. if (i)
  50894. return f;
  50895. var d = VA(e.header, "ordinal", t.useUTC), h = KJ(r, t.renderMode).nameStyle;
  50896. return t.renderMode === "richText" ? tee(t, d, h) + a.richText + f : ZA('<div style="' + h + ";" + qJ + ';">' + Gr(d) + "</div>" + f, n);
  50897. }
  50898. function S4e(t, e, n, r) {
  50899. var i = t.renderMode, a = e.noName, o = e.noValue, s = !e.markerType, l = e.name, u = t.useUTC, c = e.valueFormatter || t.valueFormatter || function(_) {
  50900. return _ = ue(_) ? _ : [_], ce(_, function(O, S) {
  50901. return VA(O, ue(h) ? h[S] : h, u);
  50902. });
  50903. };
  50904. if (!(a && o)) {
  50905. var f = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", i), d = a ? "" : VA(l, "ordinal", u), h = e.valueType, p = o ? [] : c(e.value, e.dataIndex), v = !s || !a, g = !s && a, m = KJ(r, i), y = m.nameStyle, b = m.valueStyle;
  50906. return i === "richText" ? (s ? "" : f) + (a ? "" : tee(t, d, y)) + (o ? "" : T4e(t, p, v, g, b)) : ZA((s ? "" : f) + (a ? "" : w4e(d, !s, y)) + (o ? "" : C4e(p, v, g, b)), n);
  50907. }
  50908. }
  50909. function _z(t, e, n, r, i, a) {
  50910. if (t) {
  50911. var o = JJ(t), s = {
  50912. useUTC: i,
  50913. renderMode: n,
  50914. orderMode: r,
  50915. markupStyleCreator: e,
  50916. valueFormatter: t.valueFormatter
  50917. };
  50918. return o(s, t, 0, a);
  50919. }
  50920. }
  50921. function x4e(t) {
  50922. return {
  50923. html: b4e[t],
  50924. richText: _4e[t]
  50925. };
  50926. }
  50927. function ZA(t, e) {
  50928. var n = '<div style="clear:both"></div>', r = "margin: " + e + "px 0 0";
  50929. return '<div style="' + r + ";" + qJ + ';">' + t + n + "</div>";
  50930. }
  50931. function w4e(t, e, n) {
  50932. var r = e ? "margin-left:2px" : "";
  50933. return '<span style="' + n + ";" + r + '">' + Gr(t) + "</span>";
  50934. }
  50935. function C4e(t, e, n, r) {
  50936. var i = n ? "10px" : "20px", a = e ? "float:right;margin-left:" + i : "";
  50937. return t = ue(t) ? t : [t], '<span style="' + a + ";" + r + '">' + ce(t, function(o) {
  50938. return Gr(o);
  50939. }).join("&nbsp;&nbsp;") + "</span>";
  50940. }
  50941. function tee(t, e, n) {
  50942. return t.markupStyleCreator.wrapRichTextStyle(e, n);
  50943. }
  50944. function T4e(t, e, n, r, i) {
  50945. var a = [i], o = r ? 10 : 20;
  50946. return n && a.push({
  50947. padding: [0, 0, 0, o],
  50948. align: "right"
  50949. }), t.markupStyleCreator.wrapRichTextStyle(ue(e) ? e.join(" ") : e, a);
  50950. }
  50951. function nee(t, e) {
  50952. var n = t.getData().getItemVisual(e, "style"), r = n[t.visualDrawType];
  50953. return _f(r);
  50954. }
  50955. function ree(t, e) {
  50956. var n = t.get("padding");
  50957. return n ?? (e === "richText" ? [8, 10] : 10);
  50958. }
  50959. var DT = (
  50960. /** @class */
  50961. function() {
  50962. function t() {
  50963. this.richTextStyles = {}, this._nextStyleNameId = uK();
  50964. }
  50965. return t.prototype._generateStyleName = function() {
  50966. return "__EC_aUTo_" + this._nextStyleNameId++;
  50967. }, t.prototype.makeTooltipMarker = function(e, n, r) {
  50968. var i = r === "richText" ? this._generateStyleName() : null, a = CJ({
  50969. color: n,
  50970. type: e,
  50971. renderMode: r,
  50972. markerId: i
  50973. });
  50974. return Oe(a) ? a : (process.env.NODE_ENV !== "production" && ke(i), this.richTextStyles[i] = a.style, a.content);
  50975. }, t.prototype.wrapRichTextStyle = function(e, n) {
  50976. var r = {};
  50977. ue(n) ? k(n, function(a) {
  50978. return le(r, a);
  50979. }) : le(r, n);
  50980. var i = this._generateStyleName();
  50981. return this.richTextStyles[i] = r, "{" + i + "|" + e + "}";
  50982. }, t;
  50983. }()
  50984. );
  50985. function iee(t) {
  50986. var e = t.series, n = t.dataIndex, r = t.multipleSeries, i = e.getData(), a = i.mapDimensionsAll("defaultedTooltip"), o = a.length, s = e.getRawValue(n), l = ue(s), u = nee(e, n), c, f, d, h;
  50987. if (o > 1 || l && !o) {
  50988. var p = P4e(s, e, n, a, u);
  50989. c = p.inlineValues, f = p.inlineValueTypes, d = p.blocks, h = p.inlineValues[0];
  50990. } else if (o) {
  50991. var v = i.getDimensionInfo(a[0]);
  50992. h = c = Vh(i, n, a[0]), f = v.type;
  50993. } else
  50994. h = c = l ? s[0] : s;
  50995. var g = AR(e), m = g && e.name || "", y = i.getName(n), b = r ? m : y;
  50996. return tr("section", {
  50997. header: m,
  50998. // When series name is not specified, do not show a header line with only '-'.
  50999. // This case always happens in tooltip.trigger: 'item'.
  51000. noHeader: r || !g,
  51001. sortParam: h,
  51002. blocks: [tr("nameValue", {
  51003. markerType: "item",
  51004. markerColor: u,
  51005. // Do not mix display seriesName and itemName in one tooltip,
  51006. // which might confuses users.
  51007. name: b,
  51008. // name dimension might be auto assigned, where the name might
  51009. // be not readable. So we check trim here.
  51010. noName: !ma(b),
  51011. value: c,
  51012. valueType: f,
  51013. dataIndex: n
  51014. })].concat(d || [])
  51015. });
  51016. }
  51017. function P4e(t, e, n, r, i) {
  51018. var a = e.getData(), o = Aa(t, function(f, d, h) {
  51019. var p = a.getDimensionInfo(h);
  51020. return f = f || p && p.tooltip !== !1 && p.displayName != null;
  51021. }, !1), s = [], l = [], u = [];
  51022. r.length ? k(r, function(f) {
  51023. c(Vh(a, n, f), f);
  51024. }) : k(t, c);
  51025. function c(f, d) {
  51026. var h = a.getDimensionInfo(d);
  51027. !h || h.otherDims.tooltip === !1 || (o ? u.push(tr("nameValue", {
  51028. markerType: "subItem",
  51029. markerColor: i,
  51030. name: h.displayName,
  51031. value: f,
  51032. valueType: h.type
  51033. })) : (s.push(f), l.push(h.type)));
  51034. }
  51035. return {
  51036. inlineValues: s,
  51037. inlineValueTypes: l,
  51038. blocks: u
  51039. };
  51040. }
  51041. var pl = bt();
  51042. function ab(t, e) {
  51043. return t.getName(e) || t.getId(e);
  51044. }
  51045. var G_ = "__universalTransitionEnabled", Ht = (
  51046. /** @class */
  51047. function(t) {
  51048. q(e, t);
  51049. function e() {
  51050. var n = t !== null && t.apply(this, arguments) || this;
  51051. return n._selectedDataIndicesMap = {}, n;
  51052. }
  51053. return e.prototype.init = function(n, r, i) {
  51054. this.seriesIndex = this.componentIndex, this.dataTask = Dg({
  51055. count: A4e,
  51056. reset: E4e
  51057. }), this.dataTask.context = {
  51058. model: this
  51059. }, this.mergeDefaultAndTheme(n, i);
  51060. var a = pl(this).sourceManager = new YJ(this);
  51061. a.prepareSource();
  51062. var o = this.getInitialData(n, i);
  51063. Sz(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && ke(o, "getInitialData returned invalid data."), pl(this).dataBeforeProcessed = o, Oz(this), this._initSelectedMapFromData(o);
  51064. }, e.prototype.mergeDefaultAndTheme = function(n, r) {
  51065. var i = Tm(this), a = i ? bp(n) : {}, o = this.subType;
  51066. rt.hasClass(o) && (o += "Series"), qe(n, r.getTheme().get(this.subType)), qe(n, this.getDefaultOption()), gf(n, "label", ["show"]), this.fillDataTextStyle(n.data), i && cu(n, a, i);
  51067. }, e.prototype.mergeOption = function(n, r) {
  51068. n = qe(this.option, n, !0), this.fillDataTextStyle(n.data);
  51069. var i = Tm(this);
  51070. i && cu(this.option, n, i);
  51071. var a = pl(this).sourceManager;
  51072. a.dirty(), a.prepareSource();
  51073. var o = this.getInitialData(n, r);
  51074. Sz(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, pl(this).dataBeforeProcessed = o, Oz(this), this._initSelectedMapFromData(o);
  51075. }, e.prototype.fillDataTextStyle = function(n) {
  51076. if (n && !Nr(n))
  51077. for (var r = ["show"], i = 0; i < n.length; i++)
  51078. n[i] && n[i].label && gf(n[i], "label", r);
  51079. }, e.prototype.getInitialData = function(n, r) {
  51080. }, e.prototype.appendData = function(n) {
  51081. var r = this.getRawData();
  51082. r.appendData(n.data);
  51083. }, e.prototype.getData = function(n) {
  51084. var r = UA(this);
  51085. if (r) {
  51086. var i = r.context.data;
  51087. return n == null || !i.getLinkedData ? i : i.getLinkedData(n);
  51088. } else
  51089. return pl(this).data;
  51090. }, e.prototype.getAllData = function() {
  51091. var n = this.getData();
  51092. return n && n.getLinkedDataAll ? n.getLinkedDataAll() : [{
  51093. data: n
  51094. }];
  51095. }, e.prototype.setData = function(n) {
  51096. var r = UA(this);
  51097. if (r) {
  51098. var i = r.context;
  51099. i.outputData = n, r !== this.dataTask && (i.data = n);
  51100. }
  51101. pl(this).data = n;
  51102. }, e.prototype.getEncode = function() {
  51103. var n = this.get("encode", !0);
  51104. if (n)
  51105. return Pe(n);
  51106. }, e.prototype.getSourceManager = function() {
  51107. return pl(this).sourceManager;
  51108. }, e.prototype.getSource = function() {
  51109. return this.getSourceManager().getSource();
  51110. }, e.prototype.getRawData = function() {
  51111. return pl(this).dataBeforeProcessed;
  51112. }, e.prototype.getColorBy = function() {
  51113. var n = this.get("colorBy");
  51114. return n || "series";
  51115. }, e.prototype.isColorBySeries = function() {
  51116. return this.getColorBy() === "series";
  51117. }, e.prototype.getBaseAxis = function() {
  51118. var n = this.coordinateSystem;
  51119. return n && n.getBaseAxis && n.getBaseAxis();
  51120. }, e.prototype.formatTooltip = function(n, r, i) {
  51121. return iee({
  51122. series: this,
  51123. dataIndex: n,
  51124. multipleSeries: r
  51125. });
  51126. }, e.prototype.isAnimationEnabled = function() {
  51127. var n = this.ecModel;
  51128. if (vt.node && !(n && n.ssr))
  51129. return !1;
  51130. var r = this.getShallow("animation");
  51131. return r && this.getData().count() > this.getShallow("animationThreshold") && (r = !1), !!r;
  51132. }, e.prototype.restoreData = function() {
  51133. this.dataTask.dirty();
  51134. }, e.prototype.getColorFromPalette = function(n, r, i) {
  51135. var a = this.ecModel, o = ik.prototype.getColorFromPalette.call(this, n, r, i);
  51136. return o || (o = a.getColorFromPalette(n, r, i)), o;
  51137. }, e.prototype.coordDimToDataDim = function(n) {
  51138. return this.getRawData().mapDimensionsAll(n);
  51139. }, e.prototype.getProgressive = function() {
  51140. return this.get("progressive");
  51141. }, e.prototype.getProgressiveThreshold = function() {
  51142. return this.get("progressiveThreshold");
  51143. }, e.prototype.select = function(n, r) {
  51144. this._innerSelect(this.getData(r), n);
  51145. }, e.prototype.unselect = function(n, r) {
  51146. var i = this.option.selectedMap;
  51147. if (i) {
  51148. var a = this.option.selectedMode, o = this.getData(r);
  51149. if (a === "series" || i === "all") {
  51150. this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
  51151. return;
  51152. }
  51153. for (var s = 0; s < n.length; s++) {
  51154. var l = n[s], u = ab(o, l);
  51155. i[u] = !1, this._selectedDataIndicesMap[u] = -1;
  51156. }
  51157. }
  51158. }, e.prototype.toggleSelect = function(n, r) {
  51159. for (var i = [], a = 0; a < n.length; a++)
  51160. i[0] = n[a], this.isSelected(n[a], r) ? this.unselect(i, r) : this.select(i, r);
  51161. }, e.prototype.getSelectedDataIndices = function() {
  51162. if (this.option.selectedMap === "all")
  51163. return [].slice.call(this.getData().getIndices());
  51164. for (var n = this._selectedDataIndicesMap, r = st(n), i = [], a = 0; a < r.length; a++) {
  51165. var o = n[r[a]];
  51166. o >= 0 && i.push(o);
  51167. }
  51168. return i;
  51169. }, e.prototype.isSelected = function(n, r) {
  51170. var i = this.option.selectedMap;
  51171. if (!i)
  51172. return !1;
  51173. var a = this.getData(r);
  51174. return (i === "all" || i[ab(a, n)]) && !a.getItemModel(n).get(["select", "disabled"]);
  51175. }, e.prototype.isUniversalTransitionEnabled = function() {
  51176. if (this[G_])
  51177. return !0;
  51178. var n = this.option.universalTransition;
  51179. return n ? n === !0 ? !0 : n && n.enabled : !1;
  51180. }, e.prototype._innerSelect = function(n, r) {
  51181. var i, a, o = this.option, s = o.selectedMode, l = r.length;
  51182. if (!(!s || !l)) {
  51183. if (s === "series")
  51184. o.selectedMap = "all";
  51185. else if (s === "multiple") {
  51186. Ie(o.selectedMap) || (o.selectedMap = {});
  51187. for (var u = o.selectedMap, c = 0; c < l; c++) {
  51188. var f = r[c], d = ab(n, f);
  51189. u[d] = !0, this._selectedDataIndicesMap[d] = n.getRawIndex(f);
  51190. }
  51191. } else if (s === "single" || s === !0) {
  51192. var h = r[l - 1], d = ab(n, h);
  51193. o.selectedMap = (i = {}, i[d] = !0, i), this._selectedDataIndicesMap = (a = {}, a[d] = n.getRawIndex(h), a);
  51194. }
  51195. }
  51196. }, e.prototype._initSelectedMapFromData = function(n) {
  51197. if (!this.option.selectedMap) {
  51198. var r = [];
  51199. n.hasItemOption && n.each(function(i) {
  51200. var a = n.getRawDataItem(i);
  51201. a && a.selected && r.push(i);
  51202. }), r.length > 0 && this._innerSelect(n, r);
  51203. }
  51204. }, e.registerClass = function(n) {
  51205. return rt.registerClass(n);
  51206. }, e.protoInitialize = function() {
  51207. var n = e.prototype;
  51208. n.type = "series.__base__", n.seriesIndex = 0, n.ignoreStyleOnData = !1, n.hasSymbolVisual = !1, n.defaultSymbol = "circle", n.visualStyleAccessPath = "itemStyle", n.visualDrawType = "fill";
  51209. }(), e;
  51210. }(rt)
  51211. );
  51212. xn(Ht, sw);
  51213. xn(Ht, ik);
  51214. yK(Ht, rt);
  51215. function Oz(t) {
  51216. var e = t.name;
  51217. AR(t) || (t.name = $4e(t) || e);
  51218. }
  51219. function $4e(t) {
  51220. var e = t.getRawData(), n = e.mapDimensionsAll("seriesName"), r = [];
  51221. return k(n, function(i) {
  51222. var a = e.getDimensionInfo(i);
  51223. a.displayName && r.push(a.displayName);
  51224. }), r.join(" ");
  51225. }
  51226. function A4e(t) {
  51227. return t.model.getRawData().count();
  51228. }
  51229. function E4e(t) {
  51230. var e = t.model;
  51231. return e.setData(e.getRawData().cloneShallow()), M4e;
  51232. }
  51233. function M4e(t, e) {
  51234. e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
  51235. }
  51236. function Sz(t, e) {
  51237. k(gm(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), function(n) {
  51238. t.wrapMethod(n, Ue(I4e, e));
  51239. });
  51240. }
  51241. function I4e(t, e) {
  51242. var n = UA(t);
  51243. return n && n.setOutputEnd((e || this).count()), e;
  51244. }
  51245. function UA(t) {
  51246. var e = (t.ecModel || {}).scheduler, n = e && e.getPipeline(t.uid);
  51247. if (n) {
  51248. var r = n.currentTask;
  51249. if (r) {
  51250. var i = r.agentStubMap;
  51251. i && (r = i.get(t.uid));
  51252. }
  51253. return r;
  51254. }
  51255. }
  51256. var Xt = (
  51257. /** @class */
  51258. function() {
  51259. function t() {
  51260. this.group = new Ve(), this.uid = yp("viewComponent");
  51261. }
  51262. return t.prototype.init = function(e, n) {
  51263. }, t.prototype.render = function(e, n, r, i) {
  51264. }, t.prototype.dispose = function(e, n) {
  51265. }, t.prototype.updateView = function(e, n, r, i) {
  51266. }, t.prototype.updateLayout = function(e, n, r, i) {
  51267. }, t.prototype.updateVisual = function(e, n, r, i) {
  51268. }, t.prototype.toggleBlurSeries = function(e, n, r) {
  51269. }, t.prototype.eachRendered = function(e) {
  51270. var n = this.group;
  51271. n && n.traverse(e);
  51272. }, t;
  51273. }()
  51274. );
  51275. MR(Xt);
  51276. Qx(Xt);
  51277. function Op() {
  51278. var t = bt();
  51279. return function(e) {
  51280. var n = t(e), r = e.pipelineContext, i = !!n.large, a = !!n.progressiveRender, o = n.large = !!(r && r.large), s = n.progressiveRender = !!(r && r.progressiveRender);
  51281. return (i !== o || a !== s) && "reset";
  51282. };
  51283. }
  51284. var aee = bt(), D4e = Op(), zt = (
  51285. /** @class */
  51286. function() {
  51287. function t() {
  51288. this.group = new Ve(), this.uid = yp("viewChart"), this.renderTask = Dg({
  51289. plan: R4e,
  51290. reset: k4e
  51291. }), this.renderTask.context = {
  51292. view: this
  51293. };
  51294. }
  51295. return t.prototype.init = function(e, n) {
  51296. }, t.prototype.render = function(e, n, r, i) {
  51297. if (process.env.NODE_ENV !== "production")
  51298. throw new Error("render method must been implemented");
  51299. }, t.prototype.highlight = function(e, n, r, i) {
  51300. var a = e.getData(i && i.dataType);
  51301. if (!a) {
  51302. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
  51303. return;
  51304. }
  51305. wz(a, i, "emphasis");
  51306. }, t.prototype.downplay = function(e, n, r, i) {
  51307. var a = e.getData(i && i.dataType);
  51308. if (!a) {
  51309. process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
  51310. return;
  51311. }
  51312. wz(a, i, "normal");
  51313. }, t.prototype.remove = function(e, n) {
  51314. this.group.removeAll();
  51315. }, t.prototype.dispose = function(e, n) {
  51316. }, t.prototype.updateView = function(e, n, r, i) {
  51317. this.render(e, n, r, i);
  51318. }, t.prototype.updateLayout = function(e, n, r, i) {
  51319. this.render(e, n, r, i);
  51320. }, t.prototype.updateVisual = function(e, n, r, i) {
  51321. this.render(e, n, r, i);
  51322. }, t.prototype.eachRendered = function(e) {
  51323. Tu(this.group, e);
  51324. }, t.markUpdateMethod = function(e, n) {
  51325. aee(e).updateMethod = n;
  51326. }, t.protoInitialize = function() {
  51327. var e = t.prototype;
  51328. e.type = "chart";
  51329. }(), t;
  51330. }()
  51331. );
  51332. function xz(t, e, n) {
  51333. t && lu(t) && (e === "emphasis" ? js : Zs)(t, n);
  51334. }
  51335. function wz(t, e, n) {
  51336. var r = mf(t, e), i = e && e.highlightKey != null ? dke(e.highlightKey) : null;
  51337. r != null ? k(Qt(r), function(a) {
  51338. xz(t.getItemGraphicEl(a), n, i);
  51339. }) : t.eachItemGraphicEl(function(a) {
  51340. xz(a, n, i);
  51341. });
  51342. }
  51343. MR(zt, ["dispose"]);
  51344. Qx(zt);
  51345. function R4e(t) {
  51346. return D4e(t.model);
  51347. }
  51348. function k4e(t) {
  51349. var e = t.model, n = t.ecModel, r = t.api, i = t.payload, a = e.pipelineContext.progressiveRender, o = t.view, s = i && aee(i).updateMethod, l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
  51350. return l !== "render" && o[l](e, n, r, i), L4e[l];
  51351. }
  51352. var L4e = {
  51353. incrementalPrepareRender: {
  51354. progress: function(t, e) {
  51355. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
  51356. }
  51357. },
  51358. render: {
  51359. // Put view.render in `progress` to support appendData. But in this case
  51360. // view.render should not be called in reset, otherwise it will be called
  51361. // twise. Use `forceFirstProgress` to make sure that view.render is called
  51362. // in any cases.
  51363. forceFirstProgress: !0,
  51364. progress: function(t, e) {
  51365. e.view.render(e.model, e.ecModel, e.api, e.payload);
  51366. }
  51367. }
  51368. }, pO = "\0__throttleOriginMethod", Cz = "\0__throttleRate", Tz = "\0__throttleType";
  51369. function uw(t, e, n) {
  51370. var r, i = 0, a = 0, o = null, s, l, u, c;
  51371. e = e || 0;
  51372. function f() {
  51373. a = (/* @__PURE__ */ new Date()).getTime(), o = null, t.apply(l, u || []);
  51374. }
  51375. var d = function() {
  51376. for (var h = [], p = 0; p < arguments.length; p++)
  51377. h[p] = arguments[p];
  51378. r = (/* @__PURE__ */ new Date()).getTime(), l = this, u = h;
  51379. var v = c || e, g = c || n;
  51380. c = null, s = r - (g ? i : a) - v, clearTimeout(o), g ? o = setTimeout(f, v) : s >= 0 ? f() : o = setTimeout(f, -s), i = r;
  51381. };
  51382. return d.clear = function() {
  51383. o && (clearTimeout(o), o = null);
  51384. }, d.debounceNextCall = function(h) {
  51385. c = h;
  51386. }, d;
  51387. }
  51388. function Sp(t, e, n, r) {
  51389. var i = t[e];
  51390. if (i) {
  51391. var a = i[pO] || i, o = i[Tz], s = i[Cz];
  51392. if (s !== n || o !== r) {
  51393. if (n == null || !r)
  51394. return t[e] = a;
  51395. i = t[e] = uw(a, n, r === "debounce"), i[pO] = a, i[Tz] = r, i[Cz] = n;
  51396. }
  51397. return i;
  51398. }
  51399. }
  51400. function $m(t, e) {
  51401. var n = t[e];
  51402. n && n[pO] && (n.clear && n.clear(), t[e] = n[pO]);
  51403. }
  51404. var Pz = bt(), $z = {
  51405. itemStyle: yf(vJ, !0),
  51406. lineStyle: yf(pJ, !0)
  51407. }, N4e = {
  51408. lineStyle: "stroke",
  51409. itemStyle: "fill"
  51410. };
  51411. function oee(t, e) {
  51412. var n = t.visualStyleMapper || $z[e];
  51413. return n || (console.warn("Unknown style type '" + e + "'."), $z.itemStyle);
  51414. }
  51415. function see(t, e) {
  51416. var n = t.visualDrawType || N4e[e];
  51417. return n || (console.warn("Unknown style type '" + e + "'."), "fill");
  51418. }
  51419. var B4e = {
  51420. createOnAllSeries: !0,
  51421. performRawSeries: !0,
  51422. reset: function(t, e) {
  51423. var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = t.getModel(r), a = oee(t, r), o = a(i), s = i.getShallow("decal");
  51424. s && (n.setVisual("decal", s), s.dirty = !0);
  51425. var l = see(t, r), u = o[l], c = Me(u) ? u : null, f = o.fill === "auto" || o.stroke === "auto";
  51426. if (!o[l] || c || f) {
  51427. var d = t.getColorFromPalette(
  51428. // TODO series count changed.
  51429. t.name,
  51430. null,
  51431. e.getSeriesCount()
  51432. );
  51433. o[l] || (o[l] = d, n.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || Me(o.fill) ? d : o.fill, o.stroke = o.stroke === "auto" || Me(o.stroke) ? d : o.stroke;
  51434. }
  51435. if (n.setVisual("style", o), n.setVisual("drawType", l), !e.isSeriesFiltered(t) && c)
  51436. return n.setVisual("colorFromPalette", !1), {
  51437. dataEach: function(h, p) {
  51438. var v = t.getDataParams(p), g = le({}, o);
  51439. g[l] = c(v), h.setItemVisual(p, "style", g);
  51440. }
  51441. };
  51442. }
  51443. }, uv = new Wt(), z4e = {
  51444. createOnAllSeries: !0,
  51445. performRawSeries: !0,
  51446. reset: function(t, e) {
  51447. if (!(t.ignoreStyleOnData || e.isSeriesFiltered(t))) {
  51448. var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = oee(t, r), a = n.getVisual("drawType");
  51449. return {
  51450. dataEach: n.hasItemOption ? function(o, s) {
  51451. var l = o.getRawDataItem(s);
  51452. if (l && l[r]) {
  51453. uv.option = l[r];
  51454. var u = i(uv), c = o.ensureUniqueItemVisual(s, "style");
  51455. le(c, u), uv.option.decal && (o.setItemVisual(s, "decal", uv.option.decal), uv.option.decal.dirty = !0), a in u && o.setItemVisual(s, "colorFromPalette", !1);
  51456. }
  51457. } : null
  51458. };
  51459. }
  51460. }
  51461. }, V4e = {
  51462. performRawSeries: !0,
  51463. overallReset: function(t) {
  51464. var e = Pe();
  51465. t.eachSeries(function(n) {
  51466. var r = n.getColorBy();
  51467. if (!n.isColorBySeries()) {
  51468. var i = n.type + "-" + r, a = e.get(i);
  51469. a || (a = {}, e.set(i, a)), Pz(n).scope = a;
  51470. }
  51471. }), t.eachSeries(function(n) {
  51472. if (!(n.isColorBySeries() || t.isSeriesFiltered(n))) {
  51473. var r = n.getRawData(), i = {}, a = n.getData(), o = Pz(n).scope, s = n.visualStyleAccessPath || "itemStyle", l = see(n, s);
  51474. a.each(function(u) {
  51475. var c = a.getRawIndex(u);
  51476. i[c] = u;
  51477. }), r.each(function(u) {
  51478. var c = i[u], f = a.getItemVisual(c, "colorFromPalette");
  51479. if (f) {
  51480. var d = a.ensureUniqueItemVisual(c, "style"), h = r.getName(u) || u + "", p = r.count();
  51481. d[l] = n.getColorFromPalette(h, o, p);
  51482. }
  51483. });
  51484. }
  51485. });
  51486. }
  51487. }, ob = Math.PI;
  51488. function F4e(t, e) {
  51489. e = e || {}, Re(e, {
  51490. text: "loading",
  51491. textColor: "#000",
  51492. fontSize: 12,
  51493. fontWeight: "normal",
  51494. fontStyle: "normal",
  51495. fontFamily: "sans-serif",
  51496. maskColor: "rgba(255, 255, 255, 0.8)",
  51497. showSpinner: !0,
  51498. color: "#5470c6",
  51499. spinnerRadius: 10,
  51500. lineWidth: 5,
  51501. zlevel: 0
  51502. });
  51503. var n = new Ve(), r = new mt({
  51504. style: {
  51505. fill: e.maskColor
  51506. },
  51507. zlevel: e.zlevel,
  51508. z: 1e4
  51509. });
  51510. n.add(r);
  51511. var i = new gt({
  51512. style: {
  51513. text: e.text,
  51514. fill: e.textColor,
  51515. fontSize: e.fontSize,
  51516. fontWeight: e.fontWeight,
  51517. fontStyle: e.fontStyle,
  51518. fontFamily: e.fontFamily
  51519. },
  51520. zlevel: e.zlevel,
  51521. z: 10001
  51522. }), a = new mt({
  51523. style: {
  51524. fill: "none"
  51525. },
  51526. textContent: i,
  51527. textConfig: {
  51528. position: "right",
  51529. distance: 10
  51530. },
  51531. zlevel: e.zlevel,
  51532. z: 10001
  51533. });
  51534. n.add(a);
  51535. var o;
  51536. return e.showSpinner && (o = new Yx({
  51537. shape: {
  51538. startAngle: -ob / 2,
  51539. endAngle: -ob / 2 + 0.1,
  51540. r: e.spinnerRadius
  51541. },
  51542. style: {
  51543. stroke: e.color,
  51544. lineCap: "round",
  51545. lineWidth: e.lineWidth
  51546. },
  51547. zlevel: e.zlevel,
  51548. z: 10001
  51549. }), o.animateShape(!0).when(1e3, {
  51550. endAngle: ob * 3 / 2
  51551. }).start("circularInOut"), o.animateShape(!0).when(1e3, {
  51552. startAngle: ob * 3 / 2
  51553. }).delay(300).start("circularInOut"), n.add(o)), n.resize = function() {
  51554. var s = i.getBoundingRect().width, l = e.showSpinner ? e.spinnerRadius : 0, u = (t.getWidth() - l * 2 - (e.showSpinner && s ? 10 : 0) - s) / 2 - (e.showSpinner && s ? 0 : 5 + s / 2) + (e.showSpinner ? 0 : s / 2) + (s ? 0 : l), c = t.getHeight() / 2;
  51555. e.showSpinner && o.setShape({
  51556. cx: u,
  51557. cy: c
  51558. }), a.setShape({
  51559. x: u - l,
  51560. y: c - l,
  51561. width: l * 2,
  51562. height: l * 2
  51563. }), r.setShape({
  51564. x: 0,
  51565. y: 0,
  51566. width: t.getWidth(),
  51567. height: t.getHeight()
  51568. });
  51569. }, n.resize(), n;
  51570. }
  51571. var lee = (
  51572. /** @class */
  51573. function() {
  51574. function t(e, n, r, i) {
  51575. this._stageTaskMap = Pe(), this.ecInstance = e, this.api = n, r = this._dataProcessorHandlers = r.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = r.concat(i);
  51576. }
  51577. return t.prototype.restoreData = function(e, n) {
  51578. e.restoreData(n), this._stageTaskMap.each(function(r) {
  51579. var i = r.overallTask;
  51580. i && i.dirty();
  51581. });
  51582. }, t.prototype.getPerformArgs = function(e, n) {
  51583. if (e.__pipeline) {
  51584. var r = this._pipelineMap.get(e.__pipeline.id), i = r.context, a = !n && r.progressiveEnabled && (!i || i.progressiveRender) && e.__idxInPipeline > r.blockIndex, o = a ? r.step : null, s = i && i.modDataCount, l = s != null ? Math.ceil(s / o) : null;
  51585. return {
  51586. step: o,
  51587. modBy: l,
  51588. modDataCount: s
  51589. };
  51590. }
  51591. }, t.prototype.getPipeline = function(e) {
  51592. return this._pipelineMap.get(e);
  51593. }, t.prototype.updateStreamModes = function(e, n) {
  51594. var r = this._pipelineMap.get(e.uid), i = e.getData(), a = i.count(), o = r.progressiveEnabled && n.incrementalPrepareRender && a >= r.threshold, s = e.get("large") && a >= e.get("largeThreshold"), l = e.get("progressiveChunkMode") === "mod" ? a : null;
  51595. e.pipelineContext = r.context = {
  51596. progressiveRender: o,
  51597. modDataCount: l,
  51598. large: s
  51599. };
  51600. }, t.prototype.restorePipelines = function(e) {
  51601. var n = this, r = n._pipelineMap = Pe();
  51602. e.eachSeries(function(i) {
  51603. var a = i.getProgressive(), o = i.uid;
  51604. r.set(o, {
  51605. id: o,
  51606. head: null,
  51607. tail: null,
  51608. threshold: i.getProgressiveThreshold(),
  51609. progressiveEnabled: a && !(i.preventIncremental && i.preventIncremental()),
  51610. blockIndex: -1,
  51611. step: Math.round(a || 700),
  51612. count: 0
  51613. }), n._pipe(i, i.dataTask);
  51614. });
  51615. }, t.prototype.prepareStageTasks = function() {
  51616. var e = this._stageTaskMap, n = this.api.getModel(), r = this.api;
  51617. k(this._allHandlers, function(i) {
  51618. var a = e.get(i.uid) || e.set(i.uid, {}), o = "";
  51619. process.env.NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), ke(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, a, n, r), i.overallReset && this._createOverallStageTask(i, a, n, r);
  51620. }, this);
  51621. }, t.prototype.prepareView = function(e, n, r, i) {
  51622. var a = e.renderTask, o = a.context;
  51623. o.model = n, o.ecModel = r, o.api = i, a.__block = !e.incrementalPrepareRender, this._pipe(n, a);
  51624. }, t.prototype.performDataProcessorTasks = function(e, n) {
  51625. this._performStageTasks(this._dataProcessorHandlers, e, n, {
  51626. block: !0
  51627. });
  51628. }, t.prototype.performVisualTasks = function(e, n, r) {
  51629. this._performStageTasks(this._visualHandlers, e, n, r);
  51630. }, t.prototype._performStageTasks = function(e, n, r, i) {
  51631. i = i || {};
  51632. var a = !1, o = this;
  51633. k(e, function(l, u) {
  51634. if (!(i.visualType && i.visualType !== l.visualType)) {
  51635. var c = o._stageTaskMap.get(l.uid), f = c.seriesTaskMap, d = c.overallTask;
  51636. if (d) {
  51637. var h, p = d.agentStubMap;
  51638. p.each(function(g) {
  51639. s(i, g) && (g.dirty(), h = !0);
  51640. }), h && d.dirty(), o.updatePayload(d, r);
  51641. var v = o.getPerformArgs(d, i.block);
  51642. p.each(function(g) {
  51643. g.perform(v);
  51644. }), d.perform(v) && (a = !0);
  51645. } else f && f.each(function(g, m) {
  51646. s(i, g) && g.dirty();
  51647. var y = o.getPerformArgs(g, i.block);
  51648. y.skip = !l.performRawSeries && n.isSeriesFiltered(g.context.model), o.updatePayload(g, r), g.perform(y) && (a = !0);
  51649. });
  51650. }
  51651. });
  51652. function s(l, u) {
  51653. return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
  51654. }
  51655. this.unfinished = a || this.unfinished;
  51656. }, t.prototype.performSeriesTasks = function(e) {
  51657. var n;
  51658. e.eachSeries(function(r) {
  51659. n = r.dataTask.perform() || n;
  51660. }), this.unfinished = n || this.unfinished;
  51661. }, t.prototype.plan = function() {
  51662. this._pipelineMap.each(function(e) {
  51663. var n = e.tail;
  51664. do {
  51665. if (n.__block) {
  51666. e.blockIndex = n.__idxInPipeline;
  51667. break;
  51668. }
  51669. n = n.getUpstream();
  51670. } while (n);
  51671. });
  51672. }, t.prototype.updatePayload = function(e, n) {
  51673. n !== "remain" && (e.context.payload = n);
  51674. }, t.prototype._createSeriesStageTask = function(e, n, r, i) {
  51675. var a = this, o = n.seriesTaskMap, s = n.seriesTaskMap = Pe(), l = e.seriesType, u = e.getTargetSeries;
  51676. e.createOnAllSeries ? r.eachRawSeries(c) : l ? r.eachRawSeriesByType(l, c) : u && u(r, i).each(c);
  51677. function c(f) {
  51678. var d = f.uid, h = s.set(d, o && o.get(d) || Dg({
  51679. plan: j4e,
  51680. reset: Z4e,
  51681. count: X4e
  51682. }));
  51683. h.context = {
  51684. model: f,
  51685. ecModel: r,
  51686. api: i,
  51687. // PENDING: `useClearVisual` not used?
  51688. useClearVisual: e.isVisual && !e.isLayout,
  51689. plan: e.plan,
  51690. reset: e.reset,
  51691. scheduler: a
  51692. }, a._pipe(f, h);
  51693. }
  51694. }, t.prototype._createOverallStageTask = function(e, n, r, i) {
  51695. var a = this, o = n.overallTask = n.overallTask || Dg({
  51696. reset: W4e
  51697. });
  51698. o.context = {
  51699. ecModel: r,
  51700. api: i,
  51701. overallReset: e.overallReset,
  51702. scheduler: a
  51703. };
  51704. var s = o.agentStubMap, l = o.agentStubMap = Pe(), u = e.seriesType, c = e.getTargetSeries, f = !0, d = !1, h = "";
  51705. process.env.NODE_ENV !== "production" && (h = '"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'), ke(!e.createOnAllSeries, h), u ? r.eachRawSeriesByType(u, p) : c ? c(r, i).each(p) : (f = !1, k(r.getSeries(), p));
  51706. function p(v) {
  51707. var g = v.uid, m = l.set(g, s && s.get(g) || // When the result of `getTargetSeries` changed, the overallTask
  51708. // should be set as dirty and re-performed.
  51709. (d = !0, Dg({
  51710. reset: Q4e,
  51711. onDirty: G4e
  51712. })));
  51713. m.context = {
  51714. model: v,
  51715. overallProgress: f
  51716. // FIXME:TS never used, so comment it
  51717. // modifyOutputEnd: modifyOutputEnd
  51718. }, m.agent = o, m.__block = f, a._pipe(v, m);
  51719. }
  51720. d && o.dirty();
  51721. }, t.prototype._pipe = function(e, n) {
  51722. var r = e.uid, i = this._pipelineMap.get(r);
  51723. !i.head && (i.head = n), i.tail && i.tail.pipe(n), i.tail = n, n.__idxInPipeline = i.count++, n.__pipeline = i;
  51724. }, t.wrapStageHandler = function(e, n) {
  51725. return Me(e) && (e = {
  51726. overallReset: e,
  51727. seriesType: Y4e(e)
  51728. }), e.uid = yp("stageHandler"), n && (e.visualType = n), e;
  51729. }, t;
  51730. }()
  51731. );
  51732. function W4e(t) {
  51733. t.overallReset(t.ecModel, t.api, t.payload);
  51734. }
  51735. function Q4e(t) {
  51736. return t.overallProgress && H4e;
  51737. }
  51738. function H4e() {
  51739. this.agent.dirty(), this.getDownstream().dirty();
  51740. }
  51741. function G4e() {
  51742. this.agent && this.agent.dirty();
  51743. }
  51744. function j4e(t) {
  51745. return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null;
  51746. }
  51747. function Z4e(t) {
  51748. t.useClearVisual && t.data.clearAllVisual();
  51749. var e = t.resetDefines = Qt(t.reset(t.model, t.ecModel, t.api, t.payload));
  51750. return e.length > 1 ? ce(e, function(n, r) {
  51751. return uee(r);
  51752. }) : U4e;
  51753. }
  51754. var U4e = uee(0);
  51755. function uee(t) {
  51756. return function(e, n) {
  51757. var r = n.data, i = n.resetDefines[t];
  51758. if (i && i.dataEach)
  51759. for (var a = e.start; a < e.end; a++)
  51760. i.dataEach(r, a);
  51761. else i && i.progress && i.progress(e, r);
  51762. };
  51763. }
  51764. function X4e(t) {
  51765. return t.data.count();
  51766. }
  51767. function Y4e(t) {
  51768. vO = null;
  51769. try {
  51770. t(Am, cee);
  51771. } catch {
  51772. }
  51773. return vO;
  51774. }
  51775. var Am = {}, cee = {}, vO;
  51776. fee(Am, ak);
  51777. fee(cee, kJ);
  51778. Am.eachSeriesByType = Am.eachRawSeriesByType = function(t) {
  51779. vO = t;
  51780. };
  51781. Am.eachComponent = function(t) {
  51782. t.mainType === "series" && t.subType && (vO = t.subType);
  51783. };
  51784. function fee(t, e) {
  51785. for (var n in e.prototype)
  51786. t[n] = On;
  51787. }
  51788. var Az = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
  51789. const q4e = {
  51790. color: Az,
  51791. colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], Az]
  51792. };
  51793. var Fr = "#B9B8CE", Ez = "#100C2A", sb = function() {
  51794. return {
  51795. axisLine: {
  51796. lineStyle: {
  51797. color: Fr
  51798. }
  51799. },
  51800. splitLine: {
  51801. lineStyle: {
  51802. color: "#484753"
  51803. }
  51804. },
  51805. splitArea: {
  51806. areaStyle: {
  51807. color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
  51808. }
  51809. },
  51810. minorSplitLine: {
  51811. lineStyle: {
  51812. color: "#20203B"
  51813. }
  51814. }
  51815. };
  51816. }, Mz = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], dee = {
  51817. darkMode: !0,
  51818. color: Mz,
  51819. backgroundColor: Ez,
  51820. axisPointer: {
  51821. lineStyle: {
  51822. color: "#817f91"
  51823. },
  51824. crossStyle: {
  51825. color: "#817f91"
  51826. },
  51827. label: {
  51828. // TODO Contrast of label backgorundColor
  51829. color: "#fff"
  51830. }
  51831. },
  51832. legend: {
  51833. textStyle: {
  51834. color: Fr
  51835. }
  51836. },
  51837. textStyle: {
  51838. color: Fr
  51839. },
  51840. title: {
  51841. textStyle: {
  51842. color: "#EEF1FA"
  51843. },
  51844. subtextStyle: {
  51845. color: "#B9B8CE"
  51846. }
  51847. },
  51848. toolbox: {
  51849. iconStyle: {
  51850. borderColor: Fr
  51851. }
  51852. },
  51853. dataZoom: {
  51854. borderColor: "#71708A",
  51855. textStyle: {
  51856. color: Fr
  51857. },
  51858. brushStyle: {
  51859. color: "rgba(135,163,206,0.3)"
  51860. },
  51861. handleStyle: {
  51862. color: "#353450",
  51863. borderColor: "#C5CBE3"
  51864. },
  51865. moveHandleStyle: {
  51866. color: "#B0B6C3",
  51867. opacity: 0.3
  51868. },
  51869. fillerColor: "rgba(135,163,206,0.2)",
  51870. emphasis: {
  51871. handleStyle: {
  51872. borderColor: "#91B7F2",
  51873. color: "#4D587D"
  51874. },
  51875. moveHandleStyle: {
  51876. color: "#636D9A",
  51877. opacity: 0.7
  51878. }
  51879. },
  51880. dataBackground: {
  51881. lineStyle: {
  51882. color: "#71708A",
  51883. width: 1
  51884. },
  51885. areaStyle: {
  51886. color: "#71708A"
  51887. }
  51888. },
  51889. selectedDataBackground: {
  51890. lineStyle: {
  51891. color: "#87A3CE"
  51892. },
  51893. areaStyle: {
  51894. color: "#87A3CE"
  51895. }
  51896. }
  51897. },
  51898. visualMap: {
  51899. textStyle: {
  51900. color: Fr
  51901. }
  51902. },
  51903. timeline: {
  51904. lineStyle: {
  51905. color: Fr
  51906. },
  51907. label: {
  51908. color: Fr
  51909. },
  51910. controlStyle: {
  51911. color: Fr,
  51912. borderColor: Fr
  51913. }
  51914. },
  51915. calendar: {
  51916. itemStyle: {
  51917. color: Ez
  51918. },
  51919. dayLabel: {
  51920. color: Fr
  51921. },
  51922. monthLabel: {
  51923. color: Fr
  51924. },
  51925. yearLabel: {
  51926. color: Fr
  51927. }
  51928. },
  51929. timeAxis: sb(),
  51930. logAxis: sb(),
  51931. valueAxis: sb(),
  51932. categoryAxis: sb(),
  51933. line: {
  51934. symbol: "circle"
  51935. },
  51936. graph: {
  51937. color: Mz
  51938. },
  51939. gauge: {
  51940. title: {
  51941. color: Fr
  51942. },
  51943. axisLine: {
  51944. lineStyle: {
  51945. color: [[1, "rgba(207,212,219,0.2)"]]
  51946. }
  51947. },
  51948. axisLabel: {
  51949. color: Fr
  51950. },
  51951. detail: {
  51952. color: "#EEF1FA"
  51953. }
  51954. },
  51955. candlestick: {
  51956. itemStyle: {
  51957. color: "#f64e56",
  51958. color0: "#54ea92",
  51959. borderColor: "#f64e56",
  51960. borderColor0: "#54ea92"
  51961. // borderColor: '#ca2824',
  51962. // borderColor0: '#09a443'
  51963. }
  51964. }
  51965. };
  51966. dee.categoryAxis.splitLine.show = !1;
  51967. var K4e = (
  51968. /** @class */
  51969. function() {
  51970. function t() {
  51971. }
  51972. return t.prototype.normalizeQuery = function(e) {
  51973. var n = {}, r = {}, i = {};
  51974. if (Oe(e)) {
  51975. var a = Vo(e);
  51976. n.mainType = a.main || null, n.subType = a.sub || null;
  51977. } else {
  51978. var o = ["Index", "Name", "Id"], s = {
  51979. name: 1,
  51980. dataIndex: 1,
  51981. dataType: 1
  51982. };
  51983. k(e, function(l, u) {
  51984. for (var c = !1, f = 0; f < o.length; f++) {
  51985. var d = o[f], h = u.lastIndexOf(d);
  51986. if (h > 0 && h === u.length - d.length) {
  51987. var p = u.slice(0, h);
  51988. p !== "data" && (n.mainType = p, n[d.toLowerCase()] = l, c = !0);
  51989. }
  51990. }
  51991. s.hasOwnProperty(u) && (r[u] = l, c = !0), c || (i[u] = l);
  51992. });
  51993. }
  51994. return {
  51995. cptQuery: n,
  51996. dataQuery: r,
  51997. otherQuery: i
  51998. };
  51999. }, t.prototype.filter = function(e, n) {
  52000. var r = this.eventInfo;
  52001. if (!r)
  52002. return !0;
  52003. var i = r.targetEl, a = r.packedEvent, o = r.model, s = r.view;
  52004. if (!o || !s)
  52005. return !0;
  52006. var l = n.cptQuery, u = n.dataQuery;
  52007. return c(l, o, "mainType") && c(l, o, "subType") && c(l, o, "index", "componentIndex") && c(l, o, "name") && c(l, o, "id") && c(u, a, "name") && c(u, a, "dataIndex") && c(u, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, n.otherQuery, i, a));
  52008. function c(f, d, h, p) {
  52009. return f[h] == null || d[p || h] === f[h];
  52010. }
  52011. }, t.prototype.afterTrigger = function() {
  52012. this.eventInfo = null;
  52013. }, t;
  52014. }()
  52015. ), XA = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], Iz = XA.concat(["symbolKeepAspect"]), J4e = {
  52016. createOnAllSeries: !0,
  52017. // For legend.
  52018. performRawSeries: !0,
  52019. reset: function(t, e) {
  52020. var n = t.getData();
  52021. if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), !t.hasSymbolVisual)
  52022. return;
  52023. for (var r = {}, i = {}, a = !1, o = 0; o < XA.length; o++) {
  52024. var s = XA[o], l = t.get(s);
  52025. Me(l) ? (a = !0, i[s] = l) : r[s] = l;
  52026. }
  52027. if (r.symbol = r.symbol || t.defaultSymbol, n.setVisual(le({
  52028. legendIcon: t.legendIcon || r.symbol,
  52029. symbolKeepAspect: t.get("symbolKeepAspect")
  52030. }, r)), e.isSeriesFiltered(t))
  52031. return;
  52032. var u = st(i);
  52033. function c(f, d) {
  52034. for (var h = t.getRawValue(d), p = t.getDataParams(d), v = 0; v < u.length; v++) {
  52035. var g = u[v];
  52036. f.setItemVisual(d, g, i[g](h, p));
  52037. }
  52038. }
  52039. return {
  52040. dataEach: a ? c : null
  52041. };
  52042. }
  52043. }, e8e = {
  52044. createOnAllSeries: !0,
  52045. // For legend.
  52046. performRawSeries: !0,
  52047. reset: function(t, e) {
  52048. if (!t.hasSymbolVisual || e.isSeriesFiltered(t))
  52049. return;
  52050. var n = t.getData();
  52051. function r(i, a) {
  52052. for (var o = i.getItemModel(a), s = 0; s < Iz.length; s++) {
  52053. var l = Iz[s], u = o.getShallow(l, !0);
  52054. u != null && i.setItemVisual(a, l, u);
  52055. }
  52056. }
  52057. return {
  52058. dataEach: n.hasItemOption ? r : null
  52059. };
  52060. }
  52061. };
  52062. function ck(t, e, n) {
  52063. switch (n) {
  52064. case "color":
  52065. var r = t.getItemVisual(e, "style");
  52066. return r[t.getVisual("drawType")];
  52067. case "opacity":
  52068. return t.getItemVisual(e, "style").opacity;
  52069. case "symbol":
  52070. case "symbolSize":
  52071. case "liftZ":
  52072. return t.getItemVisual(e, n);
  52073. default:
  52074. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  52075. }
  52076. }
  52077. function H0(t, e) {
  52078. switch (e) {
  52079. case "color":
  52080. var n = t.getVisual("style");
  52081. return n[t.getVisual("drawType")];
  52082. case "opacity":
  52083. return t.getVisual("style").opacity;
  52084. case "symbol":
  52085. case "symbolSize":
  52086. case "liftZ":
  52087. return t.getVisual(e);
  52088. default:
  52089. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
  52090. }
  52091. }
  52092. function hee(t, e, n, r) {
  52093. switch (n) {
  52094. case "color":
  52095. var i = t.ensureUniqueItemVisual(e, "style");
  52096. i[t.getVisual("drawType")] = r, t.setItemVisual(e, "colorFromPalette", !1);
  52097. break;
  52098. case "opacity":
  52099. t.ensureUniqueItemVisual(e, "style").opacity = r;
  52100. break;
  52101. case "symbol":
  52102. case "symbolSize":
  52103. case "liftZ":
  52104. t.setItemVisual(e, n, r);
  52105. break;
  52106. default:
  52107. process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  52108. }
  52109. }
  52110. function pee(t, e) {
  52111. function n(r, i) {
  52112. var a = [];
  52113. return r.eachComponent({
  52114. mainType: "series",
  52115. subType: t,
  52116. query: i
  52117. }, function(o) {
  52118. a.push(o.seriesIndex);
  52119. }), a;
  52120. }
  52121. k([[t + "ToggleSelect", "toggleSelect"], [t + "Select", "select"], [t + "UnSelect", "unselect"]], function(r) {
  52122. e(r[0], function(i, a, o) {
  52123. i = le({}, i), process.env.NODE_ENV !== "production" && Cn(i.type, r[1]), o.dispatchAction(le(i, {
  52124. type: r[1],
  52125. seriesIndex: n(a, i)
  52126. }));
  52127. });
  52128. });
  52129. }
  52130. function ud(t, e, n, r, i) {
  52131. var a = t + e;
  52132. n.isSilent(a) || (process.env.NODE_ENV !== "production" && Ea("event " + a + " is deprecated."), r.eachComponent({
  52133. mainType: "series",
  52134. subType: "pie"
  52135. }, function(o) {
  52136. for (var s = o.seriesIndex, l = o.option.selectedMap, u = i.selected, c = 0; c < u.length; c++)
  52137. if (u[c].seriesIndex === s) {
  52138. var f = o.getData(), d = mf(f, i.fromActionPayload);
  52139. n.trigger(a, {
  52140. type: a,
  52141. seriesId: o.id,
  52142. name: ue(d) ? f.getName(d[0]) : f.getName(d),
  52143. selected: Oe(l) ? l : le({}, l)
  52144. });
  52145. }
  52146. }));
  52147. }
  52148. function t8e(t, e, n) {
  52149. t.on("selectchanged", function(r) {
  52150. var i = n.getModel();
  52151. r.isFromClick ? (ud("map", "selectchanged", e, i, r), ud("pie", "selectchanged", e, i, r)) : r.fromAction === "select" ? (ud("map", "selected", e, i, r), ud("pie", "selected", e, i, r)) : r.fromAction === "unselect" && (ud("map", "unselected", e, i, r), ud("pie", "unselected", e, i, r));
  52152. });
  52153. }
  52154. function Bc(t, e, n) {
  52155. for (var r; t && !(e(t) && (r = t, n)); )
  52156. t = t.__hostTarget || t.parent;
  52157. return r;
  52158. }
  52159. var n8e = Math.round(Math.random() * 9), r8e = typeof Object.defineProperty == "function", i8e = function() {
  52160. function t() {
  52161. this._id = "__ec_inner_" + n8e++;
  52162. }
  52163. return t.prototype.get = function(e) {
  52164. return this._guard(e)[this._id];
  52165. }, t.prototype.set = function(e, n) {
  52166. var r = this._guard(e);
  52167. return r8e ? Object.defineProperty(r, this._id, {
  52168. value: n,
  52169. enumerable: !1,
  52170. configurable: !0
  52171. }) : r[this._id] = n, this;
  52172. }, t.prototype.delete = function(e) {
  52173. return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
  52174. }, t.prototype.has = function(e) {
  52175. return !!this._guard(e)[this._id];
  52176. }, t.prototype._guard = function(e) {
  52177. if (e !== Object(e))
  52178. throw TypeError("Value of WeakMap is not a non-null object.");
  52179. return e;
  52180. }, t;
  52181. }(), a8e = ot.extend({
  52182. type: "triangle",
  52183. shape: {
  52184. cx: 0,
  52185. cy: 0,
  52186. width: 0,
  52187. height: 0
  52188. },
  52189. buildPath: function(t, e) {
  52190. var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
  52191. t.moveTo(n, r - a), t.lineTo(n + i, r + a), t.lineTo(n - i, r + a), t.closePath();
  52192. }
  52193. }), o8e = ot.extend({
  52194. type: "diamond",
  52195. shape: {
  52196. cx: 0,
  52197. cy: 0,
  52198. width: 0,
  52199. height: 0
  52200. },
  52201. buildPath: function(t, e) {
  52202. var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
  52203. t.moveTo(n, r - a), t.lineTo(n + i, r), t.lineTo(n, r + a), t.lineTo(n - i, r), t.closePath();
  52204. }
  52205. }), s8e = ot.extend({
  52206. type: "pin",
  52207. shape: {
  52208. // x, y on the cusp
  52209. x: 0,
  52210. y: 0,
  52211. width: 0,
  52212. height: 0
  52213. },
  52214. buildPath: function(t, e) {
  52215. var n = e.x, r = e.y, i = e.width / 5 * 3, a = Math.max(i, e.height), o = i / 2, s = o * o / (a - o), l = r - a + o + s, u = Math.asin(s / o), c = Math.cos(u) * o, f = Math.sin(u), d = Math.cos(u), h = o * 0.6, p = o * 0.7;
  52216. t.moveTo(n - c, l + s), t.arc(n, l, o, Math.PI - u, Math.PI * 2 + u), t.bezierCurveTo(n + c - f * h, l + s + d * h, n, r - p, n, r), t.bezierCurveTo(n, r - p, n - c + f * h, l + s + d * h, n - c, l + s), t.closePath();
  52217. }
  52218. }), l8e = ot.extend({
  52219. type: "arrow",
  52220. shape: {
  52221. x: 0,
  52222. y: 0,
  52223. width: 0,
  52224. height: 0
  52225. },
  52226. buildPath: function(t, e) {
  52227. var n = e.height, r = e.width, i = e.x, a = e.y, o = r / 3 * 2;
  52228. t.moveTo(i, a), t.lineTo(i + o, a + n), t.lineTo(i, a + n / 4 * 3), t.lineTo(i - o, a + n), t.lineTo(i, a), t.closePath();
  52229. }
  52230. }), u8e = {
  52231. line: Un,
  52232. rect: mt,
  52233. roundRect: mt,
  52234. square: mt,
  52235. circle: ll,
  52236. diamond: o8e,
  52237. pin: s8e,
  52238. arrow: l8e,
  52239. triangle: a8e
  52240. }, c8e = {
  52241. line: function(t, e, n, r, i) {
  52242. i.x1 = t, i.y1 = e + r / 2, i.x2 = t + n, i.y2 = e + r / 2;
  52243. },
  52244. rect: function(t, e, n, r, i) {
  52245. i.x = t, i.y = e, i.width = n, i.height = r;
  52246. },
  52247. roundRect: function(t, e, n, r, i) {
  52248. i.x = t, i.y = e, i.width = n, i.height = r, i.r = Math.min(n, r) / 4;
  52249. },
  52250. square: function(t, e, n, r, i) {
  52251. var a = Math.min(n, r);
  52252. i.x = t, i.y = e, i.width = a, i.height = a;
  52253. },
  52254. circle: function(t, e, n, r, i) {
  52255. i.cx = t + n / 2, i.cy = e + r / 2, i.r = Math.min(n, r) / 2;
  52256. },
  52257. diamond: function(t, e, n, r, i) {
  52258. i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  52259. },
  52260. pin: function(t, e, n, r, i) {
  52261. i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  52262. },
  52263. arrow: function(t, e, n, r, i) {
  52264. i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  52265. },
  52266. triangle: function(t, e, n, r, i) {
  52267. i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  52268. }
  52269. }, gO = {};
  52270. k(u8e, function(t, e) {
  52271. gO[e] = new t();
  52272. });
  52273. var f8e = ot.extend({
  52274. type: "symbol",
  52275. shape: {
  52276. symbolType: "",
  52277. x: 0,
  52278. y: 0,
  52279. width: 0,
  52280. height: 0
  52281. },
  52282. calculateTextPosition: function(t, e, n) {
  52283. var r = rO(t, e, n), i = this.shape;
  52284. return i && i.symbolType === "pin" && e.position === "inside" && (r.y = n.y + n.height * 0.4), r;
  52285. },
  52286. buildPath: function(t, e, n) {
  52287. var r = e.symbolType;
  52288. if (r !== "none") {
  52289. var i = gO[r];
  52290. i || (r = "rect", i = gO[r]), c8e[r](e.x, e.y, e.width, e.height, i.shape), i.buildPath(t, i.shape, n);
  52291. }
  52292. }
  52293. });
  52294. function d8e(t, e) {
  52295. if (this.type !== "image") {
  52296. var n = this.style;
  52297. this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : this.shape.symbolType === "line" ? n.stroke = t : n.fill = t, this.markRedraw();
  52298. }
  52299. }
  52300. function $n(t, e, n, r, i, a, o) {
  52301. var s = t.indexOf("empty") === 0;
  52302. s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  52303. var l;
  52304. return t.indexOf("image://") === 0 ? l = WR(t.slice(8), new Je(e, n, r, i), o ? "center" : "cover") : t.indexOf("path://") === 0 ? l = F0(t.slice(7), {}, new Je(e, n, r, i), o ? "center" : "cover") : l = new f8e({
  52305. shape: {
  52306. symbolType: t,
  52307. x: e,
  52308. y: n,
  52309. width: r,
  52310. height: i
  52311. }
  52312. }), l.__isEmptyBrush = s, l.setColor = d8e, a && l.setColor(a), l;
  52313. }
  52314. function xp(t) {
  52315. return ue(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0];
  52316. }
  52317. function Vf(t, e) {
  52318. if (t != null)
  52319. return ue(t) || (t = [t, t]), [_e(t[0], e[0]) || 0, _e(We(t[1], t[0]), e[1]) || 0];
  52320. }
  52321. function zc(t) {
  52322. return isFinite(t);
  52323. }
  52324. function h8e(t, e, n) {
  52325. var r = e.x == null ? 0 : e.x, i = e.x2 == null ? 1 : e.x2, a = e.y == null ? 0 : e.y, o = e.y2 == null ? 0 : e.y2;
  52326. e.global || (r = r * n.width + n.x, i = i * n.width + n.x, a = a * n.height + n.y, o = o * n.height + n.y), r = zc(r) ? r : 0, i = zc(i) ? i : 1, a = zc(a) ? a : 0, o = zc(o) ? o : 0;
  52327. var s = t.createLinearGradient(r, a, i, o);
  52328. return s;
  52329. }
  52330. function p8e(t, e, n) {
  52331. var r = n.width, i = n.height, a = Math.min(r, i), o = e.x == null ? 0.5 : e.x, s = e.y == null ? 0.5 : e.y, l = e.r == null ? 0.5 : e.r;
  52332. e.global || (o = o * r + n.x, s = s * i + n.y, l = l * a), o = zc(o) ? o : 0.5, s = zc(s) ? s : 0.5, l = l >= 0 && zc(l) ? l : 0.5;
  52333. var u = t.createRadialGradient(o, s, 0, o, s, l);
  52334. return u;
  52335. }
  52336. function YA(t, e, n) {
  52337. for (var r = e.type === "radial" ? p8e(t, e, n) : h8e(t, e, n), i = e.colorStops, a = 0; a < i.length; a++)
  52338. r.addColorStop(i[a].offset, i[a].color);
  52339. return r;
  52340. }
  52341. function v8e(t, e) {
  52342. if (t === e || !t && !e)
  52343. return !1;
  52344. if (!t || !e || t.length !== e.length)
  52345. return !0;
  52346. for (var n = 0; n < t.length; n++)
  52347. if (t[n] !== e[n])
  52348. return !0;
  52349. return !1;
  52350. }
  52351. function lb(t) {
  52352. return parseInt(t, 10);
  52353. }
  52354. function Fd(t, e, n) {
  52355. var r = ["width", "height"][e], i = ["clientWidth", "clientHeight"][e], a = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
  52356. if (n[r] != null && n[r] !== "auto")
  52357. return parseFloat(n[r]);
  52358. var s = document.defaultView.getComputedStyle(t);
  52359. return (t[i] || lb(s[r]) || lb(t.style[r])) - (lb(s[a]) || 0) - (lb(s[o]) || 0) | 0;
  52360. }
  52361. function g8e(t, e) {
  52362. return !t || t === "solid" || !(e > 0) ? null : t === "dashed" ? [4 * e, 2 * e] : t === "dotted" ? [e] : St(t) ? [t] : ue(t) ? t : null;
  52363. }
  52364. function fk(t) {
  52365. var e = t.style, n = e.lineDash && e.lineWidth > 0 && g8e(e.lineDash, e.lineWidth), r = e.lineDashOffset;
  52366. if (n) {
  52367. var i = e.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
  52368. i && i !== 1 && (n = ce(n, function(a) {
  52369. return a / i;
  52370. }), r /= i);
  52371. }
  52372. return [n, r];
  52373. }
  52374. var m8e = new as(!0);
  52375. function mO(t) {
  52376. var e = t.stroke;
  52377. return !(e == null || e === "none" || !(t.lineWidth > 0));
  52378. }
  52379. function Dz(t) {
  52380. return typeof t == "string" && t !== "none";
  52381. }
  52382. function yO(t) {
  52383. var e = t.fill;
  52384. return e != null && e !== "none";
  52385. }
  52386. function Rz(t, e) {
  52387. if (e.fillOpacity != null && e.fillOpacity !== 1) {
  52388. var n = t.globalAlpha;
  52389. t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n;
  52390. } else
  52391. t.fill();
  52392. }
  52393. function kz(t, e) {
  52394. if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
  52395. var n = t.globalAlpha;
  52396. t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n;
  52397. } else
  52398. t.stroke();
  52399. }
  52400. function qA(t, e, n) {
  52401. var r = IR(e.image, e.__image, n);
  52402. if (Hx(r)) {
  52403. var i = t.createPattern(r, e.repeat || "repeat");
  52404. if (typeof DOMMatrix == "function" && i && i.setTransform) {
  52405. var a = new DOMMatrix();
  52406. a.translateSelf(e.x || 0, e.y || 0), a.rotateSelf(0, 0, (e.rotation || 0) * Og), a.scaleSelf(e.scaleX || 1, e.scaleY || 1), i.setTransform(a);
  52407. }
  52408. return i;
  52409. }
  52410. }
  52411. function y8e(t, e, n, r) {
  52412. var i, a = mO(n), o = yO(n), s = n.strokePercent, l = s < 1, u = !e.path;
  52413. (!e.silent || l) && u && e.createPathProxy();
  52414. var c = e.path || m8e, f = e.__dirty;
  52415. if (!r) {
  52416. var d = n.fill, h = n.stroke, p = o && !!d.colorStops, v = a && !!h.colorStops, g = o && !!d.image, m = a && !!h.image, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0;
  52417. (p || v) && (S = e.getBoundingRect()), p && (y = f ? YA(t, d, S) : e.__canvasFillGradient, e.__canvasFillGradient = y), v && (b = f ? YA(t, h, S) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = b), g && (_ = f || !e.__canvasFillPattern ? qA(t, d, e) : e.__canvasFillPattern, e.__canvasFillPattern = _), m && (O = f || !e.__canvasStrokePattern ? qA(t, h, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = _), p ? t.fillStyle = y : g && (_ ? t.fillStyle = _ : o = !1), v ? t.strokeStyle = b : m && (O ? t.strokeStyle = O : a = !1);
  52418. }
  52419. var x = e.getGlobalScale();
  52420. c.setScale(x[0], x[1], e.segmentIgnoreThreshold);
  52421. var C, T;
  52422. t.setLineDash && n.lineDash && (i = fk(e), C = i[0], T = i[1]);
  52423. var w = !0;
  52424. (u || f & $d) && (c.setDPR(t.dpr), l ? c.setContext(null) : (c.setContext(t), w = !1), c.reset(), e.buildPath(c, e.shape, r), c.toStatic(), e.pathUpdated()), w && c.rebuildPath(t, l ? s : 1), C && (t.setLineDash(C), t.lineDashOffset = T), r || (n.strokeFirst ? (a && kz(t, n), o && Rz(t, n)) : (o && Rz(t, n), a && kz(t, n))), C && t.setLineDash([]);
  52425. }
  52426. function b8e(t, e, n) {
  52427. var r = e.__image = IR(n.image, e.__image, e, e.onload);
  52428. if (!(!r || !Hx(r))) {
  52429. var i = n.x || 0, a = n.y || 0, o = e.getWidth(), s = e.getHeight(), l = r.width / r.height;
  52430. if (o == null && s != null ? o = s * l : s == null && o != null ? s = o / l : o == null && s == null && (o = r.width, s = r.height), n.sWidth && n.sHeight) {
  52431. var u = n.sx || 0, c = n.sy || 0;
  52432. t.drawImage(r, u, c, n.sWidth, n.sHeight, i, a, o, s);
  52433. } else if (n.sx && n.sy) {
  52434. var u = n.sx, c = n.sy, f = o - u, d = s - c;
  52435. t.drawImage(r, u, c, f, d, i, a, o, s);
  52436. } else
  52437. t.drawImage(r, i, a, o, s);
  52438. }
  52439. }
  52440. function _8e(t, e, n) {
  52441. var r, i = n.text;
  52442. if (i != null && (i += ""), i) {
  52443. t.font = n.font || iu, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
  52444. var a = void 0, o = void 0;
  52445. t.setLineDash && n.lineDash && (r = fk(e), a = r[0], o = r[1]), a && (t.setLineDash(a), t.lineDashOffset = o), n.strokeFirst ? (mO(n) && t.strokeText(i, n.x, n.y), yO(n) && t.fillText(i, n.x, n.y)) : (yO(n) && t.fillText(i, n.x, n.y), mO(n) && t.strokeText(i, n.x, n.y)), a && t.setLineDash([]);
  52446. }
  52447. }
  52448. var Lz = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], Nz = [
  52449. ["lineCap", "butt"],
  52450. ["lineJoin", "miter"],
  52451. ["miterLimit", 10]
  52452. ];
  52453. function vee(t, e, n, r, i) {
  52454. var a = !1;
  52455. if (!r && (n = n || {}, e === n))
  52456. return !1;
  52457. if (r || e.opacity !== n.opacity) {
  52458. gi(t, i), a = !0;
  52459. var o = Math.max(Math.min(e.opacity, 1), 0);
  52460. t.globalAlpha = isNaN(o) ? Kc.opacity : o;
  52461. }
  52462. (r || e.blend !== n.blend) && (a || (gi(t, i), a = !0), t.globalCompositeOperation = e.blend || Kc.blend);
  52463. for (var s = 0; s < Lz.length; s++) {
  52464. var l = Lz[s];
  52465. (r || e[l] !== n[l]) && (a || (gi(t, i), a = !0), t[l] = t.dpr * (e[l] || 0));
  52466. }
  52467. return (r || e.shadowColor !== n.shadowColor) && (a || (gi(t, i), a = !0), t.shadowColor = e.shadowColor || Kc.shadowColor), a;
  52468. }
  52469. function Bz(t, e, n, r, i) {
  52470. var a = Em(e, i.inHover), o = r ? null : n && Em(n, i.inHover) || {};
  52471. if (a === o)
  52472. return !1;
  52473. var s = vee(t, a, o, r, i);
  52474. if ((r || a.fill !== o.fill) && (s || (gi(t, i), s = !0), Dz(a.fill) && (t.fillStyle = a.fill)), (r || a.stroke !== o.stroke) && (s || (gi(t, i), s = !0), Dz(a.stroke) && (t.strokeStyle = a.stroke)), (r || a.opacity !== o.opacity) && (s || (gi(t, i), s = !0), t.globalAlpha = a.opacity == null ? 1 : a.opacity), e.hasStroke()) {
  52475. var l = a.lineWidth, u = l / (a.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
  52476. t.lineWidth !== u && (s || (gi(t, i), s = !0), t.lineWidth = u);
  52477. }
  52478. for (var c = 0; c < Nz.length; c++) {
  52479. var f = Nz[c], d = f[0];
  52480. (r || a[d] !== o[d]) && (s || (gi(t, i), s = !0), t[d] = a[d] || f[1]);
  52481. }
  52482. return s;
  52483. }
  52484. function O8e(t, e, n, r, i) {
  52485. return vee(t, Em(e, i.inHover), n && Em(n, i.inHover), r, i);
  52486. }
  52487. function gee(t, e) {
  52488. var n = e.transform, r = t.dpr || 1;
  52489. n ? t.setTransform(r * n[0], r * n[1], r * n[2], r * n[3], r * n[4], r * n[5]) : t.setTransform(r, 0, 0, r, 0, 0);
  52490. }
  52491. function S8e(t, e, n) {
  52492. for (var r = !1, i = 0; i < t.length; i++) {
  52493. var a = t[i];
  52494. r = r || a.isZeroArea(), gee(e, a), e.beginPath(), a.buildPath(e, a.shape), e.clip();
  52495. }
  52496. n.allClipped = r;
  52497. }
  52498. function x8e(t, e) {
  52499. return t && e ? t[0] !== e[0] || t[1] !== e[1] || t[2] !== e[2] || t[3] !== e[3] || t[4] !== e[4] || t[5] !== e[5] : !(!t && !e);
  52500. }
  52501. var zz = 1, Vz = 2, Fz = 3, Wz = 4;
  52502. function w8e(t) {
  52503. var e = yO(t), n = mO(t);
  52504. return !(t.lineDash || !(+e ^ +n) || e && typeof t.fill != "string" || n && typeof t.stroke != "string" || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1);
  52505. }
  52506. function gi(t, e) {
  52507. e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = "";
  52508. }
  52509. function Em(t, e) {
  52510. return e && t.__hoverStyle || t.style;
  52511. }
  52512. function dk(t, e) {
  52513. Vc(t, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
  52514. }
  52515. function Vc(t, e, n, r) {
  52516. var i = e.transform;
  52517. if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) {
  52518. e.__dirty &= ~ki, e.__isRendered = !1;
  52519. return;
  52520. }
  52521. var a = e.__clipPaths, o = n.prevElClipPaths, s = !1, l = !1;
  52522. if ((!o || v8e(a, o)) && (o && o.length && (gi(t, n), t.restore(), l = s = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), a && a.length && (gi(t, n), t.save(), S8e(a, t, n), s = !0), n.prevElClipPaths = a), n.allClipped) {
  52523. e.__isRendered = !1;
  52524. return;
  52525. }
  52526. e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  52527. var u = n.prevEl;
  52528. u || (l = s = !0);
  52529. var c = e instanceof ot && e.autoBatch && w8e(e.style);
  52530. s || x8e(i, u.transform) ? (gi(t, n), gee(t, e)) : c || gi(t, n);
  52531. var f = Em(e, n.inHover);
  52532. e instanceof ot ? (n.lastDrawType !== zz && (l = !0, n.lastDrawType = zz), Bz(t, e, u, l, n), (!c || !n.batchFill && !n.batchStroke) && t.beginPath(), y8e(t, e, f, c), c && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Bh ? (n.lastDrawType !== Fz && (l = !0, n.lastDrawType = Fz), Bz(t, e, u, l, n), _8e(t, e, f)) : e instanceof lr ? (n.lastDrawType !== Vz && (l = !0, n.lastDrawType = Vz), O8e(t, e, u, l, n), b8e(t, e, f)) : e.getTemporalDisplayables && (n.lastDrawType !== Wz && (l = !0, n.lastDrawType = Wz), C8e(t, e, n)), c && r && gi(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
  52533. }
  52534. function C8e(t, e, n) {
  52535. var r = e.getDisplayables(), i = e.getTemporalDisplayables();
  52536. t.save();
  52537. var a = {
  52538. prevElClipPaths: null,
  52539. prevEl: null,
  52540. allClipped: !1,
  52541. viewWidth: n.viewWidth,
  52542. viewHeight: n.viewHeight,
  52543. inHover: n.inHover
  52544. }, o, s;
  52545. for (o = e.getCursor(), s = r.length; o < s; o++) {
  52546. var l = r[o];
  52547. l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  52548. }
  52549. for (var u = 0, c = i.length; u < c; u++) {
  52550. var l = i[u];
  52551. l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, u === c - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  52552. }
  52553. e.clearTemporalDisplayables(), e.notClear = !0, t.restore();
  52554. }
  52555. var RT = new i8e(), Qz = new R0(100), Hz = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
  52556. function Fh(t, e) {
  52557. if (t === "none")
  52558. return null;
  52559. var n = e.getDevicePixelRatio(), r = e.getZr(), i = r.painter.type === "svg";
  52560. t.dirty && RT.delete(t);
  52561. var a = RT.get(t);
  52562. if (a)
  52563. return a;
  52564. var o = Re(t, {
  52565. symbol: "rect",
  52566. symbolSize: 1,
  52567. symbolKeepAspect: !0,
  52568. color: "rgba(0, 0, 0, 0.2)",
  52569. backgroundColor: null,
  52570. dashArrayX: 5,
  52571. dashArrayY: 5,
  52572. rotation: 0,
  52573. maxTileWidth: 512,
  52574. maxTileHeight: 512
  52575. });
  52576. o.backgroundColor === "none" && (o.backgroundColor = null);
  52577. var s = {
  52578. repeat: "repeat"
  52579. };
  52580. return l(s), s.rotation = o.rotation, s.scaleX = s.scaleY = i ? 1 : 1 / n, RT.set(t, s), t.dirty = !1, s;
  52581. function l(u) {
  52582. for (var c = [n], f = !0, d = 0; d < Hz.length; ++d) {
  52583. var h = o[Hz[d]];
  52584. if (h != null && !ue(h) && !Oe(h) && !St(h) && typeof h != "boolean") {
  52585. f = !1;
  52586. break;
  52587. }
  52588. c.push(h);
  52589. }
  52590. var p;
  52591. if (f) {
  52592. p = c.join(",") + (i ? "-svg" : "");
  52593. var v = Qz.get(p);
  52594. v && (i ? u.svgElement = v : u.image = v);
  52595. }
  52596. var g = yee(o.dashArrayX), m = T8e(o.dashArrayY), y = mee(o.symbol), b = P8e(g), _ = bee(m), O = !i && io.createCanvas(), S = i && {
  52597. tag: "g",
  52598. attrs: {},
  52599. key: "dcl",
  52600. children: []
  52601. }, x = T(), C;
  52602. O && (O.width = x.width * n, O.height = x.height * n, C = O.getContext("2d")), w(), f && Qz.put(p, O || S), u.image = O, u.svgElement = S, u.svgWidth = x.width, u.svgHeight = x.height;
  52603. function T() {
  52604. for (var P = 1, $ = 0, A = b.length; $ < A; ++$)
  52605. P = iB(P, b[$]);
  52606. for (var D = 1, $ = 0, A = y.length; $ < A; ++$)
  52607. D = iB(D, y[$].length);
  52608. P *= D;
  52609. var E = _ * b.length * y.length;
  52610. if (process.env.NODE_ENV !== "production") {
  52611. var R = function(N) {
  52612. console.warn("Calculated decal size is greater than " + N + " due to decal option settings so " + N + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + N + " to be larger to avoid incontinuity.");
  52613. };
  52614. P > o.maxTileWidth && R("maxTileWidth"), E > o.maxTileHeight && R("maxTileHeight");
  52615. }
  52616. return {
  52617. width: Math.max(1, Math.min(P, o.maxTileWidth)),
  52618. height: Math.max(1, Math.min(E, o.maxTileHeight))
  52619. };
  52620. }
  52621. function w() {
  52622. C && (C.clearRect(0, 0, O.width, O.height), o.backgroundColor && (C.fillStyle = o.backgroundColor, C.fillRect(0, 0, O.width, O.height)));
  52623. for (var P = 0, $ = 0; $ < m.length; ++$)
  52624. P += m[$];
  52625. if (P <= 0)
  52626. return;
  52627. for (var A = -_, D = 0, E = 0, R = 0; A < x.height; ) {
  52628. if (D % 2 === 0) {
  52629. for (var N = E / 2 % y.length, V = 0, z = 0, W = 0; V < x.width * 2; ) {
  52630. for (var F = 0, $ = 0; $ < g[R].length; ++$)
  52631. F += g[R][$];
  52632. if (F <= 0)
  52633. break;
  52634. if (z % 2 === 0) {
  52635. var Q = (1 - o.symbolSize) * 0.5, Z = V + g[R][z] * Q, ne = A + m[D] * Q, ee = g[R][z] * o.symbolSize, oe = m[D] * o.symbolSize, K = W / 2 % y[N].length;
  52636. ie(Z, ne, ee, oe, y[N][K]);
  52637. }
  52638. V += g[R][z], ++W, ++z, z === g[R].length && (z = 0);
  52639. }
  52640. ++R, R === g.length && (R = 0);
  52641. }
  52642. A += m[D], ++E, ++D, D === m.length && (D = 0);
  52643. }
  52644. function ie(X, H, G, re, fe) {
  52645. var de = i ? 1 : n, Ee = $n(fe, X * de, H * de, G * de, re * de, o.color, o.symbolKeepAspect);
  52646. if (i) {
  52647. var $e = r.painter.renderOneToVNode(Ee);
  52648. $e && S.children.push($e);
  52649. } else
  52650. dk(C, Ee);
  52651. }
  52652. }
  52653. }
  52654. }
  52655. function mee(t) {
  52656. if (!t || t.length === 0)
  52657. return [["rect"]];
  52658. if (Oe(t))
  52659. return [[t]];
  52660. for (var e = !0, n = 0; n < t.length; ++n)
  52661. if (!Oe(t[n])) {
  52662. e = !1;
  52663. break;
  52664. }
  52665. if (e)
  52666. return mee([t]);
  52667. for (var r = [], n = 0; n < t.length; ++n)
  52668. Oe(t[n]) ? r.push([t[n]]) : r.push(t[n]);
  52669. return r;
  52670. }
  52671. function yee(t) {
  52672. if (!t || t.length === 0)
  52673. return [[0, 0]];
  52674. if (St(t)) {
  52675. var e = Math.ceil(t);
  52676. return [[e, e]];
  52677. }
  52678. for (var n = !0, r = 0; r < t.length; ++r)
  52679. if (!St(t[r])) {
  52680. n = !1;
  52681. break;
  52682. }
  52683. if (n)
  52684. return yee([t]);
  52685. for (var i = [], r = 0; r < t.length; ++r)
  52686. if (St(t[r])) {
  52687. var e = Math.ceil(t[r]);
  52688. i.push([e, e]);
  52689. } else {
  52690. var e = ce(t[r], function(s) {
  52691. return Math.ceil(s);
  52692. });
  52693. e.length % 2 === 1 ? i.push(e.concat(e)) : i.push(e);
  52694. }
  52695. return i;
  52696. }
  52697. function T8e(t) {
  52698. if (!t || typeof t == "object" && t.length === 0)
  52699. return [0, 0];
  52700. if (St(t)) {
  52701. var e = Math.ceil(t);
  52702. return [e, e];
  52703. }
  52704. var n = ce(t, function(r) {
  52705. return Math.ceil(r);
  52706. });
  52707. return t.length % 2 ? n.concat(n) : n;
  52708. }
  52709. function P8e(t) {
  52710. return ce(t, function(e) {
  52711. return bee(e);
  52712. });
  52713. }
  52714. function bee(t) {
  52715. for (var e = 0, n = 0; n < t.length; ++n)
  52716. e += t[n];
  52717. return t.length % 2 === 1 ? e * 2 : e;
  52718. }
  52719. function $8e(t, e) {
  52720. t.eachRawSeries(function(n) {
  52721. if (!t.isSeriesFiltered(n)) {
  52722. var r = n.getData();
  52723. r.hasItemVisual() && r.each(function(o) {
  52724. var s = r.getItemVisual(o, "decal");
  52725. if (s) {
  52726. var l = r.ensureUniqueItemVisual(o, "style");
  52727. l.decal = Fh(s, e);
  52728. }
  52729. });
  52730. var i = r.getVisual("decal");
  52731. if (i) {
  52732. var a = r.getVisual("style");
  52733. a.decal = Fh(i, e);
  52734. }
  52735. }
  52736. });
  52737. }
  52738. var ja = new Ra(), bO = {};
  52739. function A8e(t, e) {
  52740. process.env.NODE_ENV !== "production" && bO[t] && Cr("Already has an implementation of " + t + "."), bO[t] = e;
  52741. }
  52742. function _ee(t) {
  52743. return process.env.NODE_ENV !== "production" && (bO[t] || Cr("Implementation of " + t + " doesn't exists.")), bO[t];
  52744. }
  52745. var E8e = "5.5.1", M8e = {
  52746. zrender: "5.6.0"
  52747. }, I8e = 1, D8e = 800, R8e = 900, k8e = 1e3, L8e = 2e3, N8e = 5e3, Oee = 1e3, B8e = 1100, hk = 2e3, See = 3e3, z8e = 4e3, cw = 4500, V8e = 4600, F8e = 5e3, W8e = 6e3, xee = 7e3, wee = {
  52748. PROCESSOR: {
  52749. FILTER: k8e,
  52750. SERIES_FILTER: D8e,
  52751. STATISTIC: N8e
  52752. },
  52753. VISUAL: {
  52754. LAYOUT: Oee,
  52755. PROGRESSIVE_LAYOUT: B8e,
  52756. GLOBAL: hk,
  52757. CHART: See,
  52758. POST_CHART_LAYOUT: V8e,
  52759. COMPONENT: z8e,
  52760. BRUSH: F8e,
  52761. CHART_ITEM: cw,
  52762. ARIA: W8e,
  52763. DECAL: xee
  52764. }
  52765. }, Er = "__flagInMainProcess", si = "__pendingUpdate", kT = "__needsUpdateStatus", Gz = /^[a-zA-Z0-9_]+$/, LT = "__connectUpdateStatus", jz = 0, Q8e = 1, H8e = 2;
  52766. function Cee(t) {
  52767. return function() {
  52768. for (var e = [], n = 0; n < arguments.length; n++)
  52769. e[n] = arguments[n];
  52770. if (this.isDisposed()) {
  52771. Ii(this.id);
  52772. return;
  52773. }
  52774. return Pee(this, t, e);
  52775. };
  52776. }
  52777. function Tee(t) {
  52778. return function() {
  52779. for (var e = [], n = 0; n < arguments.length; n++)
  52780. e[n] = arguments[n];
  52781. return Pee(this, t, e);
  52782. };
  52783. }
  52784. function Pee(t, e, n) {
  52785. return n[0] = n[0] && n[0].toLowerCase(), Ra.prototype[e].apply(t, n);
  52786. }
  52787. var $ee = (
  52788. /** @class */
  52789. function(t) {
  52790. q(e, t);
  52791. function e() {
  52792. return t !== null && t.apply(this, arguments) || this;
  52793. }
  52794. return e;
  52795. }(Ra)
  52796. ), Aee = $ee.prototype;
  52797. Aee.on = Tee("on");
  52798. Aee.off = Tee("off");
  52799. var cd, NT, ub, vl, BT, zT, VT, cv, fv, Zz, Uz, FT, Xz, cb, Yz, Eee, ta, qz, _O = (
  52800. /** @class */
  52801. function(t) {
  52802. q(e, t);
  52803. function e(n, r, i) {
  52804. var a = t.call(this, new K4e()) || this;
  52805. a._chartsViews = [], a._chartsMap = {}, a._componentsViews = [], a._componentsMap = {}, a._pendingActions = [], i = i || {}, Oe(r) && (r = Mee[r]), a._dom = n;
  52806. var o = "canvas", s = "auto", l = !1;
  52807. if (process.env.NODE_ENV !== "production") {
  52808. var u = (
  52809. /* eslint-disable-next-line */
  52810. vt.hasGlobalWindow ? window : global
  52811. );
  52812. u && (o = We(u.__ECHARTS__DEFAULT__RENDERER__, o), s = We(u.__ECHARTS__DEFAULT__COARSE_POINTER, s), l = We(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, l));
  52813. }
  52814. i.ssr && aK(function(h) {
  52815. var p = Fe(h), v = p.dataIndex;
  52816. if (v != null) {
  52817. var g = Pe();
  52818. return g.set("series_index", p.seriesIndex), g.set("data_index", v), p.ssrType && g.set("ssr_type", p.ssrType), g;
  52819. }
  52820. });
  52821. var c = a._zr = xA(n, {
  52822. renderer: i.renderer || o,
  52823. devicePixelRatio: i.devicePixelRatio,
  52824. width: i.width,
  52825. height: i.height,
  52826. ssr: i.ssr,
  52827. useDirtyRect: We(i.useDirtyRect, l),
  52828. useCoarsePointer: We(i.useCoarsePointer, s),
  52829. pointerSize: i.pointerSize
  52830. });
  52831. a._ssr = i.ssr, a._throttledZrFlush = uw(xe(c.flush, c), 17), r = Le(r), r && NJ(r, !0), a._theme = r, a._locale = oLe(i.locale || gJ), a._coordSysMgr = new zf();
  52832. var f = a._api = Yz(a);
  52833. function d(h, p) {
  52834. return h.__prio - p.__prio;
  52835. }
  52836. return k_(SO, d), k_(KA, d), a._scheduler = new lee(a, f, KA, SO), a._messageCenter = new $ee(), a._initEvents(), a.resize = xe(a.resize, a), c.animation.on("frame", a._onframe, a), Zz(c, a), Uz(c, a), vm(a), a;
  52837. }
  52838. return e.prototype._onframe = function() {
  52839. if (!this._disposed) {
  52840. qz(this);
  52841. var n = this._scheduler;
  52842. if (this[si]) {
  52843. var r = this[si].silent;
  52844. this[Er] = !0;
  52845. try {
  52846. cd(this), vl.update.call(this, null, this[si].updateParams);
  52847. } catch (l) {
  52848. throw this[Er] = !1, this[si] = null, l;
  52849. }
  52850. this._zr.flush(), this[Er] = !1, this[si] = null, cv.call(this, r), fv.call(this, r);
  52851. } else if (n.unfinished) {
  52852. var i = I8e, a = this._model, o = this._api;
  52853. n.unfinished = !1;
  52854. do {
  52855. var s = +/* @__PURE__ */ new Date();
  52856. n.performSeriesTasks(a), n.performDataProcessorTasks(a), zT(this, a), n.performVisualTasks(a), cb(this, this._model, o, "remain", {}), i -= +/* @__PURE__ */ new Date() - s;
  52857. } while (i > 0 && n.unfinished);
  52858. n.unfinished || this._zr.flush();
  52859. }
  52860. }
  52861. }, e.prototype.getDom = function() {
  52862. return this._dom;
  52863. }, e.prototype.getId = function() {
  52864. return this.id;
  52865. }, e.prototype.getZr = function() {
  52866. return this._zr;
  52867. }, e.prototype.isSSR = function() {
  52868. return this._ssr;
  52869. }, e.prototype.setOption = function(n, r, i) {
  52870. if (this[Er]) {
  52871. process.env.NODE_ENV !== "production" && Cr("`setOption` should not be called during main process.");
  52872. return;
  52873. }
  52874. if (this._disposed) {
  52875. Ii(this.id);
  52876. return;
  52877. }
  52878. var a, o, s;
  52879. if (Ie(r) && (i = r.lazyUpdate, a = r.silent, o = r.replaceMerge, s = r.transition, r = r.notMerge), this[Er] = !0, !this._model || r) {
  52880. var l = new kLe(this._api), u = this._theme, c = this._model = new ak();
  52881. c.scheduler = this._scheduler, c.ssr = this._ssr, c.init(null, null, null, u, this._locale, l);
  52882. }
  52883. this._model.setOption(n, {
  52884. replaceMerge: o
  52885. }, JA);
  52886. var f = {
  52887. seriesTransition: s,
  52888. optionChanged: !0
  52889. };
  52890. if (i)
  52891. this[si] = {
  52892. silent: a,
  52893. updateParams: f
  52894. }, this[Er] = !1, this.getZr().wakeUp();
  52895. else {
  52896. try {
  52897. cd(this), vl.update.call(this, null, f);
  52898. } catch (d) {
  52899. throw this[si] = null, this[Er] = !1, d;
  52900. }
  52901. this._ssr || this._zr.flush(), this[si] = null, this[Er] = !1, cv.call(this, a), fv.call(this, a);
  52902. }
  52903. }, e.prototype.setTheme = function() {
  52904. Ea("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
  52905. }, e.prototype.getModel = function() {
  52906. return this._model;
  52907. }, e.prototype.getOption = function() {
  52908. return this._model && this._model.getOption();
  52909. }, e.prototype.getWidth = function() {
  52910. return this._zr.getWidth();
  52911. }, e.prototype.getHeight = function() {
  52912. return this._zr.getHeight();
  52913. }, e.prototype.getDevicePixelRatio = function() {
  52914. return this._zr.painter.dpr || vt.hasGlobalWindow && window.devicePixelRatio || 1;
  52915. }, e.prototype.getRenderedCanvas = function(n) {
  52916. return process.env.NODE_ENV !== "production" && Cn("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(n);
  52917. }, e.prototype.renderToCanvas = function(n) {
  52918. n = n || {};
  52919. var r = this._zr.painter;
  52920. if (process.env.NODE_ENV !== "production" && r.type !== "canvas")
  52921. throw new Error("renderToCanvas can only be used in the canvas renderer.");
  52922. return r.getRenderedCanvas({
  52923. backgroundColor: n.backgroundColor || this._model.get("backgroundColor"),
  52924. pixelRatio: n.pixelRatio || this.getDevicePixelRatio()
  52925. });
  52926. }, e.prototype.renderToSVGString = function(n) {
  52927. n = n || {};
  52928. var r = this._zr.painter;
  52929. if (process.env.NODE_ENV !== "production" && r.type !== "svg")
  52930. throw new Error("renderToSVGString can only be used in the svg renderer.");
  52931. return r.renderToString({
  52932. useViewBox: n.useViewBox
  52933. });
  52934. }, e.prototype.getSvgDataURL = function() {
  52935. if (vt.svgSupported) {
  52936. var n = this._zr, r = n.storage.getDisplayList();
  52937. return k(r, function(i) {
  52938. i.stopAnimation(null, !0);
  52939. }), n.painter.toDataURL();
  52940. }
  52941. }, e.prototype.getDataURL = function(n) {
  52942. if (this._disposed) {
  52943. Ii(this.id);
  52944. return;
  52945. }
  52946. n = n || {};
  52947. var r = n.excludeComponents, i = this._model, a = [], o = this;
  52948. k(r, function(l) {
  52949. i.eachComponent({
  52950. mainType: l
  52951. }, function(u) {
  52952. var c = o._componentsMap[u.__viewId];
  52953. c.group.ignore || (a.push(c), c.group.ignore = !0);
  52954. });
  52955. });
  52956. var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(n).toDataURL("image/" + (n && n.type || "png"));
  52957. return k(a, function(l) {
  52958. l.group.ignore = !1;
  52959. }), s;
  52960. }, e.prototype.getConnectedDataURL = function(n) {
  52961. if (this._disposed) {
  52962. Ii(this.id);
  52963. return;
  52964. }
  52965. var r = n.type === "svg", i = this.group, a = Math.min, o = Math.max, s = 1 / 0;
  52966. if (xO[i]) {
  52967. var l = s, u = s, c = -s, f = -s, d = [], h = n && n.pixelRatio || this.getDevicePixelRatio();
  52968. k(tf, function(b, _) {
  52969. if (b.group === i) {
  52970. var O = r ? b.getZr().painter.getSvgDom().innerHTML : b.renderToCanvas(Le(n)), S = b.getDom().getBoundingClientRect();
  52971. l = a(S.left, l), u = a(S.top, u), c = o(S.right, c), f = o(S.bottom, f), d.push({
  52972. dom: O,
  52973. left: S.left,
  52974. top: S.top
  52975. });
  52976. }
  52977. }), l *= h, u *= h, c *= h, f *= h;
  52978. var p = c - l, v = f - u, g = io.createCanvas(), m = xA(g, {
  52979. renderer: r ? "svg" : "canvas"
  52980. });
  52981. if (m.resize({
  52982. width: p,
  52983. height: v
  52984. }), r) {
  52985. var y = "";
  52986. return k(d, function(b) {
  52987. var _ = b.left - l, O = b.top - u;
  52988. y += '<g transform="translate(' + _ + "," + O + ')">' + b.dom + "</g>";
  52989. }), m.painter.getSvgRoot().innerHTML = y, n.connectedBackgroundColor && m.painter.setBackgroundColor(n.connectedBackgroundColor), m.refreshImmediately(), m.painter.toDataURL();
  52990. } else
  52991. return n.connectedBackgroundColor && m.add(new mt({
  52992. shape: {
  52993. x: 0,
  52994. y: 0,
  52995. width: p,
  52996. height: v
  52997. },
  52998. style: {
  52999. fill: n.connectedBackgroundColor
  53000. }
  53001. })), k(d, function(b) {
  53002. var _ = new lr({
  53003. style: {
  53004. x: b.left * h - l,
  53005. y: b.top * h - u,
  53006. image: b.dom
  53007. }
  53008. });
  53009. m.add(_);
  53010. }), m.refreshImmediately(), g.toDataURL("image/" + (n && n.type || "png"));
  53011. } else
  53012. return this.getDataURL(n);
  53013. }, e.prototype.convertToPixel = function(n, r) {
  53014. return BT(this, "convertToPixel", n, r);
  53015. }, e.prototype.convertFromPixel = function(n, r) {
  53016. return BT(this, "convertFromPixel", n, r);
  53017. }, e.prototype.containPixel = function(n, r) {
  53018. if (this._disposed) {
  53019. Ii(this.id);
  53020. return;
  53021. }
  53022. var i = this._model, a, o = $g(i, n);
  53023. return k(o, function(s, l) {
  53024. l.indexOf("Models") >= 0 && k(s, function(u) {
  53025. var c = u.coordinateSystem;
  53026. if (c && c.containPoint)
  53027. a = a || !!c.containPoint(r);
  53028. else if (l === "seriesModels") {
  53029. var f = this._chartsMap[u.__viewId];
  53030. f && f.containPoint ? a = a || f.containPoint(r, u) : process.env.NODE_ENV !== "production" && dn(l + ": " + (f ? "The found component do not support containPoint." : "No view mapping to the found component."));
  53031. } else
  53032. process.env.NODE_ENV !== "production" && dn(l + ": containPoint is not supported");
  53033. }, this);
  53034. }, this), !!a;
  53035. }, e.prototype.getVisual = function(n, r) {
  53036. var i = this._model, a = $g(i, n, {
  53037. defaultMainType: "series"
  53038. }), o = a.seriesModel;
  53039. process.env.NODE_ENV !== "production" && (o || dn("There is no specified series model"));
  53040. var s = o.getData(), l = a.hasOwnProperty("dataIndexInside") ? a.dataIndexInside : a.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(a.dataIndex) : null;
  53041. return l != null ? ck(s, l, r) : H0(s, r);
  53042. }, e.prototype.getViewOfComponentModel = function(n) {
  53043. return this._componentsMap[n.__viewId];
  53044. }, e.prototype.getViewOfSeriesModel = function(n) {
  53045. return this._chartsMap[n.__viewId];
  53046. }, e.prototype._initEvents = function() {
  53047. var n = this;
  53048. k(G8e, function(r) {
  53049. var i = function(a) {
  53050. var o = n.getModel(), s = a.target, l, u = r === "globalout";
  53051. if (u ? l = {} : s && Bc(s, function(p) {
  53052. var v = Fe(p);
  53053. if (v && v.dataIndex != null) {
  53054. var g = v.dataModel || o.getSeriesByIndex(v.seriesIndex);
  53055. return l = g && g.getDataParams(v.dataIndex, v.dataType, s) || {}, !0;
  53056. } else if (v.eventData)
  53057. return l = le({}, v.eventData), !0;
  53058. }, !0), l) {
  53059. var c = l.componentType, f = l.componentIndex;
  53060. (c === "markLine" || c === "markPoint" || c === "markArea") && (c = "series", f = l.seriesIndex);
  53061. var d = c && f != null && o.getComponent(c, f), h = d && n[d.mainType === "series" ? "_chartsMap" : "_componentsMap"][d.__viewId];
  53062. process.env.NODE_ENV !== "production" && !u && !(d && h) && dn("model or view can not be found by params"), l.event = a, l.type = r, n._$eventProcessor.eventInfo = {
  53063. targetEl: s,
  53064. packedEvent: l,
  53065. model: d,
  53066. view: h
  53067. }, n.trigger(r, l);
  53068. }
  53069. };
  53070. i.zrEventfulCallAtLast = !0, n._zr.on(r, i, n);
  53071. }), k(Rg, function(r, i) {
  53072. n._messageCenter.on(i, function(a) {
  53073. this.trigger(i, a);
  53074. }, n);
  53075. }), k(["selectchanged"], function(r) {
  53076. n._messageCenter.on(r, function(i) {
  53077. this.trigger(r, i);
  53078. }, n);
  53079. }), t8e(this._messageCenter, this, this._api);
  53080. }, e.prototype.isDisposed = function() {
  53081. return this._disposed;
  53082. }, e.prototype.clear = function() {
  53083. if (this._disposed) {
  53084. Ii(this.id);
  53085. return;
  53086. }
  53087. this.setOption({
  53088. series: []
  53089. }, !0);
  53090. }, e.prototype.dispose = function() {
  53091. if (this._disposed) {
  53092. Ii(this.id);
  53093. return;
  53094. }
  53095. this._disposed = !0;
  53096. var n = this.getDom();
  53097. n && vK(this.getDom(), vk, "");
  53098. var r = this, i = r._api, a = r._model;
  53099. k(r._componentsViews, function(o) {
  53100. o.dispose(a, i);
  53101. }), k(r._chartsViews, function(o) {
  53102. o.dispose(a, i);
  53103. }), r._zr.dispose(), r._dom = r._model = r._chartsMap = r._componentsMap = r._chartsViews = r._componentsViews = r._scheduler = r._api = r._zr = r._throttledZrFlush = r._theme = r._coordSysMgr = r._messageCenter = null, delete tf[r.id];
  53104. }, e.prototype.resize = function(n) {
  53105. if (this[Er]) {
  53106. process.env.NODE_ENV !== "production" && Cr("`resize` should not be called during main process.");
  53107. return;
  53108. }
  53109. if (this._disposed) {
  53110. Ii(this.id);
  53111. return;
  53112. }
  53113. this._zr.resize(n);
  53114. var r = this._model;
  53115. if (this._loadingFX && this._loadingFX.resize(), !!r) {
  53116. var i = r.resetOption("media"), a = n && n.silent;
  53117. this[si] && (a == null && (a = this[si].silent), i = !0, this[si] = null), this[Er] = !0;
  53118. try {
  53119. i && cd(this), vl.update.call(this, {
  53120. type: "resize",
  53121. animation: le({
  53122. // Disable animation
  53123. duration: 0
  53124. }, n && n.animation)
  53125. });
  53126. } catch (o) {
  53127. throw this[Er] = !1, o;
  53128. }
  53129. this[Er] = !1, cv.call(this, a), fv.call(this, a);
  53130. }
  53131. }, e.prototype.showLoading = function(n, r) {
  53132. if (this._disposed) {
  53133. Ii(this.id);
  53134. return;
  53135. }
  53136. if (Ie(n) && (r = n, n = ""), n = n || "default", this.hideLoading(), !eE[n]) {
  53137. process.env.NODE_ENV !== "production" && dn("Loading effects " + n + " not exists.");
  53138. return;
  53139. }
  53140. var i = eE[n](this._api, r), a = this._zr;
  53141. this._loadingFX = i, a.add(i);
  53142. }, e.prototype.hideLoading = function() {
  53143. if (this._disposed) {
  53144. Ii(this.id);
  53145. return;
  53146. }
  53147. this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
  53148. }, e.prototype.makeActionFromEvent = function(n) {
  53149. var r = le({}, n);
  53150. return r.type = Rg[n.type], r;
  53151. }, e.prototype.dispatchAction = function(n, r) {
  53152. if (this._disposed) {
  53153. Ii(this.id);
  53154. return;
  53155. }
  53156. if (Ie(r) || (r = {
  53157. silent: !!r
  53158. }), !!OO[n.type] && this._model) {
  53159. if (this[Er]) {
  53160. this._pendingActions.push(n);
  53161. return;
  53162. }
  53163. var i = r.silent;
  53164. VT.call(this, n, i);
  53165. var a = r.flush;
  53166. a ? this._zr.flush() : a !== !1 && vt.browser.weChat && this._throttledZrFlush(), cv.call(this, i), fv.call(this, i);
  53167. }
  53168. }, e.prototype.updateLabelLayout = function() {
  53169. ja.trigger("series:layoutlabels", this._model, this._api, {
  53170. // Not adding series labels.
  53171. // TODO
  53172. updatedSeries: []
  53173. });
  53174. }, e.prototype.appendData = function(n) {
  53175. if (this._disposed) {
  53176. Ii(this.id);
  53177. return;
  53178. }
  53179. var r = n.seriesIndex, i = this.getModel(), a = i.getSeriesByIndex(r);
  53180. process.env.NODE_ENV !== "production" && ke(n.data && a), a.appendData(n), this._scheduler.unfinished = !0, this.getZr().wakeUp();
  53181. }, e.internalField = function() {
  53182. cd = function(f) {
  53183. var d = f._scheduler;
  53184. d.restorePipelines(f._model), d.prepareStageTasks(), NT(f, !0), NT(f, !1), d.plan();
  53185. }, NT = function(f, d) {
  53186. for (var h = f._model, p = f._scheduler, v = d ? f._componentsViews : f._chartsViews, g = d ? f._componentsMap : f._chartsMap, m = f._zr, y = f._api, b = 0; b < v.length; b++)
  53187. v[b].__alive = !1;
  53188. d ? h.eachComponent(function(S, x) {
  53189. S !== "series" && _(x);
  53190. }) : h.eachSeries(_);
  53191. function _(S) {
  53192. var x = S.__requireNewView;
  53193. S.__requireNewView = !1;
  53194. var C = "_ec_" + S.id + "_" + S.type, T = !x && g[C];
  53195. if (!T) {
  53196. var w = Vo(S.type), P = d ? Xt.getClass(w.main, w.sub) : (
  53197. // FIXME:TS
  53198. // (ChartView as ChartViewConstructor).getClass('series', classType.sub)
  53199. // For backward compat, still support a chart type declared as only subType
  53200. // like "liquidfill", but recommend "series.liquidfill"
  53201. // But need a base class to make a type series.
  53202. zt.getClass(w.sub)
  53203. );
  53204. process.env.NODE_ENV !== "production" && ke(P, w.sub + " does not exist."), T = new P(), T.init(h, y), g[C] = T, v.push(T), m.add(T.group);
  53205. }
  53206. S.__viewId = T.__id = C, T.__alive = !0, T.__model = S, T.group.__ecComponentInfo = {
  53207. mainType: S.mainType,
  53208. index: S.componentIndex
  53209. }, !d && p.prepareView(T, S, h, y);
  53210. }
  53211. for (var b = 0; b < v.length; ) {
  53212. var O = v[b];
  53213. O.__alive ? b++ : (!d && O.renderTask.dispose(), m.remove(O.group), O.dispose(h, y), v.splice(b, 1), g[O.__id] === O && delete g[O.__id], O.__id = O.group.__ecComponentInfo = null);
  53214. }
  53215. }, ub = function(f, d, h, p, v) {
  53216. var g = f._model;
  53217. if (g.setUpdatePayload(h), !p) {
  53218. k([].concat(f._componentsViews).concat(f._chartsViews), O);
  53219. return;
  53220. }
  53221. var m = {};
  53222. m[p + "Id"] = h[p + "Id"], m[p + "Index"] = h[p + "Index"], m[p + "Name"] = h[p + "Name"];
  53223. var y = {
  53224. mainType: p,
  53225. query: m
  53226. };
  53227. v && (y.subType = v);
  53228. var b = h.excludeSeriesId, _;
  53229. b != null && (_ = Pe(), k(Qt(b), function(S) {
  53230. var x = Vn(S, null);
  53231. x != null && _.set(x, !0);
  53232. })), g && g.eachComponent(y, function(S) {
  53233. var x = _ && _.get(S.id) != null;
  53234. if (!x)
  53235. if (DB(h))
  53236. if (S instanceof Ht)
  53237. h.type === Jc && !h.notBlur && !S.get(["emphasis", "disabled"]) && ike(S, h, f._api);
  53238. else {
  53239. var C = BR(S.mainType, S.componentIndex, h.name, f._api), T = C.focusSelf, w = C.dispatchers;
  53240. h.type === Jc && T && !h.notBlur && DA(S.mainType, S.componentIndex, f._api), w && k(w, function(P) {
  53241. h.type === Jc ? js(P) : Zs(P);
  53242. });
  53243. }
  53244. else kA(h) && S instanceof Ht && (ske(S, h, f._api), MB(S), ta(f));
  53245. }, f), g && g.eachComponent(y, function(S) {
  53246. var x = _ && _.get(S.id) != null;
  53247. x || O(f[p === "series" ? "_chartsMap" : "_componentsMap"][S.__viewId]);
  53248. }, f);
  53249. function O(S) {
  53250. S && S.__alive && S[d] && S[d](S.__model, g, f._api, h);
  53251. }
  53252. }, vl = {
  53253. prepareAndUpdate: function(f) {
  53254. cd(this), vl.update.call(this, f, {
  53255. // Needs to mark option changed if newOption is given.
  53256. // It's from MagicType.
  53257. // TODO If use a separate flag optionChanged in payload?
  53258. optionChanged: f.newOption != null
  53259. });
  53260. },
  53261. update: function(f, d) {
  53262. var h = this._model, p = this._api, v = this._zr, g = this._coordSysMgr, m = this._scheduler;
  53263. if (h) {
  53264. h.setUpdatePayload(f), m.restoreData(h, f), m.performSeriesTasks(h), g.create(h, p), m.performDataProcessorTasks(h, f), zT(this, h), g.update(h, p), n(h), m.performVisualTasks(h, f), FT(this, h, p, f, d);
  53265. var y = h.get("backgroundColor") || "transparent", b = h.get("darkMode");
  53266. v.setBackgroundColor(y), b != null && b !== "auto" && v.setDarkMode(b), ja.trigger("afterupdate", h, p);
  53267. }
  53268. },
  53269. updateTransform: function(f) {
  53270. var d = this, h = this._model, p = this._api;
  53271. if (h) {
  53272. h.setUpdatePayload(f);
  53273. var v = [];
  53274. h.eachComponent(function(m, y) {
  53275. if (m !== "series") {
  53276. var b = d.getViewOfComponentModel(y);
  53277. if (b && b.__alive)
  53278. if (b.updateTransform) {
  53279. var _ = b.updateTransform(y, h, p, f);
  53280. _ && _.update && v.push(b);
  53281. } else
  53282. v.push(b);
  53283. }
  53284. });
  53285. var g = Pe();
  53286. h.eachSeries(function(m) {
  53287. var y = d._chartsMap[m.__viewId];
  53288. if (y.updateTransform) {
  53289. var b = y.updateTransform(m, h, p, f);
  53290. b && b.update && g.set(m.uid, 1);
  53291. } else
  53292. g.set(m.uid, 1);
  53293. }), n(h), this._scheduler.performVisualTasks(h, f, {
  53294. setDirty: !0,
  53295. dirtyMap: g
  53296. }), cb(this, h, p, f, {}, g), ja.trigger("afterupdate", h, p);
  53297. }
  53298. },
  53299. updateView: function(f) {
  53300. var d = this._model;
  53301. d && (d.setUpdatePayload(f), zt.markUpdateMethod(f, "updateView"), n(d), this._scheduler.performVisualTasks(d, f, {
  53302. setDirty: !0
  53303. }), FT(this, d, this._api, f, {}), ja.trigger("afterupdate", d, this._api));
  53304. },
  53305. updateVisual: function(f) {
  53306. var d = this, h = this._model;
  53307. h && (h.setUpdatePayload(f), h.eachSeries(function(p) {
  53308. p.getData().clearAllVisual();
  53309. }), zt.markUpdateMethod(f, "updateVisual"), n(h), this._scheduler.performVisualTasks(h, f, {
  53310. visualType: "visual",
  53311. setDirty: !0
  53312. }), h.eachComponent(function(p, v) {
  53313. if (p !== "series") {
  53314. var g = d.getViewOfComponentModel(v);
  53315. g && g.__alive && g.updateVisual(v, h, d._api, f);
  53316. }
  53317. }), h.eachSeries(function(p) {
  53318. var v = d._chartsMap[p.__viewId];
  53319. v.updateVisual(p, h, d._api, f);
  53320. }), ja.trigger("afterupdate", h, this._api));
  53321. },
  53322. updateLayout: function(f) {
  53323. vl.update.call(this, f);
  53324. }
  53325. }, BT = function(f, d, h, p) {
  53326. if (f._disposed) {
  53327. Ii(f.id);
  53328. return;
  53329. }
  53330. for (var v = f._model, g = f._coordSysMgr.getCoordinateSystems(), m, y = $g(v, h), b = 0; b < g.length; b++) {
  53331. var _ = g[b];
  53332. if (_[d] && (m = _[d](v, y, p)) != null)
  53333. return m;
  53334. }
  53335. process.env.NODE_ENV !== "production" && dn("No coordinate system that supports " + d + " found by the given finder.");
  53336. }, zT = function(f, d) {
  53337. var h = f._chartsMap, p = f._scheduler;
  53338. d.eachSeries(function(v) {
  53339. p.updateStreamModes(v, h[v.__viewId]);
  53340. });
  53341. }, VT = function(f, d) {
  53342. var h = this, p = this.getModel(), v = f.type, g = f.escapeConnect, m = OO[v], y = m.actionInfo, b = (y.update || "update").split(":"), _ = b.pop(), O = b[0] != null && Vo(b[0]);
  53343. this[Er] = !0;
  53344. var S = [f], x = !1;
  53345. f.batch && (x = !0, S = ce(f.batch, function(D) {
  53346. return D = Re(le({}, D), f), D.batch = null, D;
  53347. }));
  53348. var C = [], T, w = kA(f), P = DB(f);
  53349. if (P && VK(this._api), k(S, function(D) {
  53350. if (T = m.action(D, h._model, h._api), T = T || le({}, D), T.type = y.event || T.type, C.push(T), P) {
  53351. var E = ER(f), R = E.queryOptionMap, N = E.mainTypeSpecified, V = N ? R.keys()[0] : "series";
  53352. ub(h, _, D, V), ta(h);
  53353. } else w ? (ub(h, _, D, "series"), ta(h)) : O && ub(h, _, D, O.main, O.sub);
  53354. }), _ !== "none" && !P && !w && !O)
  53355. try {
  53356. this[si] ? (cd(this), vl.update.call(this, f), this[si] = null) : vl[_].call(this, f);
  53357. } catch (D) {
  53358. throw this[Er] = !1, D;
  53359. }
  53360. if (x ? T = {
  53361. type: y.event || v,
  53362. escapeConnect: g,
  53363. batch: C
  53364. } : T = C[0], this[Er] = !1, !d) {
  53365. var $ = this._messageCenter;
  53366. if ($.trigger(T.type, T), w) {
  53367. var A = {
  53368. type: "selectchanged",
  53369. escapeConnect: g,
  53370. selected: lke(p),
  53371. isFromClick: f.isFromClick || !1,
  53372. fromAction: f.type,
  53373. fromActionPayload: f
  53374. };
  53375. $.trigger(A.type, A);
  53376. }
  53377. }
  53378. }, cv = function(f) {
  53379. for (var d = this._pendingActions; d.length; ) {
  53380. var h = d.shift();
  53381. VT.call(this, h, f);
  53382. }
  53383. }, fv = function(f) {
  53384. !f && this.trigger("updated");
  53385. }, Zz = function(f, d) {
  53386. f.on("rendered", function(h) {
  53387. d.trigger("rendered", h), // Although zr is dirty if initial animation is not finished
  53388. // and this checking is called on frame, we also check
  53389. // animation finished for robustness.
  53390. f.animation.isFinished() && !d[si] && !d._scheduler.unfinished && !d._pendingActions.length && d.trigger("finished");
  53391. });
  53392. }, Uz = function(f, d) {
  53393. f.on("mouseover", function(h) {
  53394. var p = h.target, v = Bc(p, lu);
  53395. v && (ake(v, h, d._api), ta(d));
  53396. }).on("mouseout", function(h) {
  53397. var p = h.target, v = Bc(p, lu);
  53398. v && (oke(v, h, d._api), ta(d));
  53399. }).on("click", function(h) {
  53400. var p = h.target, v = Bc(p, function(y) {
  53401. return Fe(y).dataIndex != null;
  53402. }, !0);
  53403. if (v) {
  53404. var g = v.selected ? "unselect" : "select", m = Fe(v);
  53405. d._api.dispatchAction({
  53406. type: g,
  53407. dataType: m.dataType,
  53408. dataIndexInside: m.dataIndex,
  53409. seriesIndex: m.seriesIndex,
  53410. isFromClick: !0
  53411. });
  53412. }
  53413. });
  53414. };
  53415. function n(f) {
  53416. f.clearColorPalette(), f.eachSeries(function(d) {
  53417. d.clearColorPalette();
  53418. });
  53419. }
  53420. function r(f) {
  53421. var d = [], h = [], p = !1;
  53422. if (f.eachComponent(function(y, b) {
  53423. var _ = b.get("zlevel") || 0, O = b.get("z") || 0, S = b.getZLevelKey();
  53424. p = p || !!S, (y === "series" ? h : d).push({
  53425. zlevel: _,
  53426. z: O,
  53427. idx: b.componentIndex,
  53428. type: y,
  53429. key: S
  53430. });
  53431. }), p) {
  53432. var v = d.concat(h), g, m;
  53433. k_(v, function(y, b) {
  53434. return y.zlevel === b.zlevel ? y.z - b.z : y.zlevel - b.zlevel;
  53435. }), k(v, function(y) {
  53436. var b = f.getComponent(y.type, y.idx), _ = y.zlevel, O = y.key;
  53437. g != null && (_ = Math.max(g, _)), O ? (_ === g && O !== m && _++, m = O) : m && (_ === g && _++, m = ""), g = _, b.setZLevel(_);
  53438. });
  53439. }
  53440. }
  53441. FT = function(f, d, h, p, v) {
  53442. r(d), Xz(f, d, h, p, v), k(f._chartsViews, function(g) {
  53443. g.__alive = !1;
  53444. }), cb(f, d, h, p, v), k(f._chartsViews, function(g) {
  53445. g.__alive || g.remove(d, h);
  53446. });
  53447. }, Xz = function(f, d, h, p, v, g) {
  53448. k(g || f._componentsViews, function(m) {
  53449. var y = m.__model;
  53450. u(y, m), m.render(y, d, h, p), s(y, m), c(y, m);
  53451. });
  53452. }, cb = function(f, d, h, p, v, g) {
  53453. var m = f._scheduler;
  53454. v = le(v || {}, {
  53455. updatedSeries: d.getSeries()
  53456. }), ja.trigger("series:beforeupdate", d, h, v);
  53457. var y = !1;
  53458. d.eachSeries(function(b) {
  53459. var _ = f._chartsMap[b.__viewId];
  53460. _.__alive = !0;
  53461. var O = _.renderTask;
  53462. m.updatePayload(O, p), u(b, _), g && g.get(b.uid) && O.dirty(), O.perform(m.getPerformArgs(O)) && (y = !0), _.group.silent = !!b.get("silent"), o(b, _), MB(b);
  53463. }), m.unfinished = y || m.unfinished, ja.trigger("series:layoutlabels", d, h, v), ja.trigger("series:transition", d, h, v), d.eachSeries(function(b) {
  53464. var _ = f._chartsMap[b.__viewId];
  53465. s(b, _), c(b, _);
  53466. }), a(f, d), ja.trigger("series:afterupdate", d, h, v);
  53467. }, ta = function(f) {
  53468. f[kT] = !0, f.getZr().wakeUp();
  53469. }, qz = function(f) {
  53470. f[kT] && (f.getZr().storage.traverse(function(d) {
  53471. th(d) || i(d);
  53472. }), f[kT] = !1);
  53473. };
  53474. function i(f) {
  53475. for (var d = [], h = f.currentStates, p = 0; p < h.length; p++) {
  53476. var v = h[p];
  53477. v === "emphasis" || v === "blur" || v === "select" || d.push(v);
  53478. }
  53479. f.selected && f.states.select && d.push("select"), f.hoverState === Zx && f.states.emphasis ? d.push("emphasis") : f.hoverState === B0 && f.states.blur && d.push("blur"), f.useStates(d);
  53480. }
  53481. function a(f, d) {
  53482. var h = f._zr, p = h.storage, v = 0;
  53483. p.traverse(function(g) {
  53484. g.isGroup || v++;
  53485. }), v > d.get("hoverLayerThreshold") && !vt.node && !vt.worker && d.eachSeries(function(g) {
  53486. if (!g.preventUsingHoverLayer) {
  53487. var m = f._chartsMap[g.__viewId];
  53488. m.__alive && m.eachRendered(function(y) {
  53489. y.states.emphasis && (y.states.emphasis.hoverLayer = !0);
  53490. });
  53491. }
  53492. });
  53493. }
  53494. function o(f, d) {
  53495. var h = f.get("blendMode") || null;
  53496. d.eachRendered(function(p) {
  53497. p.isGroup || (p.style.blend = h);
  53498. });
  53499. }
  53500. function s(f, d) {
  53501. if (!f.preventAutoZ) {
  53502. var h = f.get("z") || 0, p = f.get("zlevel") || 0;
  53503. d.eachRendered(function(v) {
  53504. return l(v, h, p, -1 / 0), !0;
  53505. });
  53506. }
  53507. }
  53508. function l(f, d, h, p) {
  53509. var v = f.getTextContent(), g = f.getTextGuideLine(), m = f.isGroup;
  53510. if (m)
  53511. for (var y = f.childrenRef(), b = 0; b < y.length; b++)
  53512. p = Math.max(l(y[b], d, h, p), p);
  53513. else
  53514. f.z = d, f.zlevel = h, p = Math.max(f.z2, p);
  53515. if (v && (v.z = d, v.zlevel = h, isFinite(p) && (v.z2 = p + 2)), g) {
  53516. var _ = f.textGuideLineConfig;
  53517. g.z = d, g.zlevel = h, isFinite(p) && (g.z2 = p + (_ && _.showAbove ? 1 : -1));
  53518. }
  53519. return p;
  53520. }
  53521. function u(f, d) {
  53522. d.eachRendered(function(h) {
  53523. if (!th(h)) {
  53524. var p = h.getTextContent(), v = h.getTextGuideLine();
  53525. h.stateTransition && (h.stateTransition = null), p && p.stateTransition && (p.stateTransition = null), v && v.stateTransition && (v.stateTransition = null), h.hasState() ? (h.prevStates = h.currentStates, h.clearStates()) : h.prevStates && (h.prevStates = null);
  53526. }
  53527. });
  53528. }
  53529. function c(f, d) {
  53530. var h = f.getModel("stateAnimation"), p = f.isAnimationEnabled(), v = h.get("duration"), g = v > 0 ? {
  53531. duration: v,
  53532. delay: h.get("delay"),
  53533. easing: h.get("easing")
  53534. // additive: stateAnimationModel.get('additive')
  53535. } : null;
  53536. d.eachRendered(function(m) {
  53537. if (m.states && m.states.emphasis) {
  53538. if (th(m))
  53539. return;
  53540. if (m instanceof ot && hke(m), m.__dirty) {
  53541. var y = m.prevStates;
  53542. y && m.useStates(y);
  53543. }
  53544. if (p) {
  53545. m.stateTransition = g;
  53546. var b = m.getTextContent(), _ = m.getTextGuideLine();
  53547. b && (b.stateTransition = g), _ && (_.stateTransition = g);
  53548. }
  53549. m.__dirty && i(m);
  53550. }
  53551. });
  53552. }
  53553. Yz = function(f) {
  53554. return new /** @class */
  53555. (function(d) {
  53556. q(h, d);
  53557. function h() {
  53558. return d !== null && d.apply(this, arguments) || this;
  53559. }
  53560. return h.prototype.getCoordinateSystems = function() {
  53561. return f._coordSysMgr.getCoordinateSystems();
  53562. }, h.prototype.getComponentByElement = function(p) {
  53563. for (; p; ) {
  53564. var v = p.__ecComponentInfo;
  53565. if (v != null)
  53566. return f._model.getComponent(v.mainType, v.index);
  53567. p = p.parent;
  53568. }
  53569. }, h.prototype.enterEmphasis = function(p, v) {
  53570. js(p, v), ta(f);
  53571. }, h.prototype.leaveEmphasis = function(p, v) {
  53572. Zs(p, v), ta(f);
  53573. }, h.prototype.enterBlur = function(p) {
  53574. LK(p), ta(f);
  53575. }, h.prototype.leaveBlur = function(p) {
  53576. NR(p), ta(f);
  53577. }, h.prototype.enterSelect = function(p) {
  53578. NK(p), ta(f);
  53579. }, h.prototype.leaveSelect = function(p) {
  53580. BK(p), ta(f);
  53581. }, h.prototype.getModel = function() {
  53582. return f.getModel();
  53583. }, h.prototype.getViewOfComponentModel = function(p) {
  53584. return f.getViewOfComponentModel(p);
  53585. }, h.prototype.getViewOfSeriesModel = function(p) {
  53586. return f.getViewOfSeriesModel(p);
  53587. }, h;
  53588. }(kJ))(f);
  53589. }, Eee = function(f) {
  53590. function d(h, p) {
  53591. for (var v = 0; v < h.length; v++) {
  53592. var g = h[v];
  53593. g[LT] = p;
  53594. }
  53595. }
  53596. k(Rg, function(h, p) {
  53597. f._messageCenter.on(p, function(v) {
  53598. if (xO[f.group] && f[LT] !== jz) {
  53599. if (v && v.escapeConnect)
  53600. return;
  53601. var g = f.makeActionFromEvent(v), m = [];
  53602. k(tf, function(y) {
  53603. y !== f && y.group === f.group && m.push(y);
  53604. }), d(m, jz), k(m, function(y) {
  53605. y[LT] !== Q8e && y.dispatchAction(g);
  53606. }), d(m, H8e);
  53607. }
  53608. });
  53609. });
  53610. };
  53611. }(), e;
  53612. }(Ra)
  53613. ), pk = _O.prototype;
  53614. pk.on = Cee("on");
  53615. pk.off = Cee("off");
  53616. pk.one = function(t, e, n) {
  53617. var r = this;
  53618. Ea("ECharts#one is deprecated.");
  53619. function i() {
  53620. for (var a = [], o = 0; o < arguments.length; o++)
  53621. a[o] = arguments[o];
  53622. e && e.apply && e.apply(this, a), r.off(t, i);
  53623. }
  53624. this.on.call(this, t, i, n);
  53625. };
  53626. var G8e = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  53627. function Ii(t) {
  53628. process.env.NODE_ENV !== "production" && dn("Instance " + t + " has been disposed");
  53629. }
  53630. var OO = {}, Rg = {}, KA = [], JA = [], SO = [], Mee = {}, eE = {}, tf = {}, xO = {}, j8e = +/* @__PURE__ */ new Date() - 0, Z8e = +/* @__PURE__ */ new Date() - 0, vk = "_echarts_instance_";
  53631. function Iee(t, e, n) {
  53632. var r = !(n && n.ssr);
  53633. if (r) {
  53634. if (process.env.NODE_ENV !== "production" && !t)
  53635. throw new Error("Initialize failed: invalid dom.");
  53636. var i = gk(t);
  53637. if (i)
  53638. return process.env.NODE_ENV !== "production" && dn("There is a chart instance already initialized on the dom."), i;
  53639. process.env.NODE_ENV !== "production" && au(t) && t.nodeName.toUpperCase() !== "CANVAS" && (!t.clientWidth && (!n || n.width == null) || !t.clientHeight && (!n || n.height == null)) && dn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");
  53640. }
  53641. var a = new _O(t, e, n);
  53642. return a.id = "ec_" + j8e++, tf[a.id] = a, r && vK(t, vk, a.id), Eee(a), ja.trigger("afterinit", a), a;
  53643. }
  53644. function U8e(t) {
  53645. if (ue(t)) {
  53646. var e = t;
  53647. t = null, k(e, function(n) {
  53648. n.group != null && (t = n.group);
  53649. }), t = t || "g_" + Z8e++, k(e, function(n) {
  53650. n.group = t;
  53651. });
  53652. }
  53653. return xO[t] = !0, t;
  53654. }
  53655. function Dee(t) {
  53656. xO[t] = !1;
  53657. }
  53658. var X8e = Dee;
  53659. function Y8e(t) {
  53660. Oe(t) ? t = tf[t] : t instanceof _O || (t = gk(t)), t instanceof _O && !t.isDisposed() && t.dispose();
  53661. }
  53662. function gk(t) {
  53663. return tf[tRe(t, vk)];
  53664. }
  53665. function q8e(t) {
  53666. return tf[t];
  53667. }
  53668. function mk(t, e) {
  53669. Mee[t] = e;
  53670. }
  53671. function yk(t) {
  53672. et(JA, t) < 0 && JA.push(t);
  53673. }
  53674. function bk(t, e) {
  53675. _k(KA, t, e, L8e);
  53676. }
  53677. function Ree(t) {
  53678. fw("afterinit", t);
  53679. }
  53680. function kee(t) {
  53681. fw("afterupdate", t);
  53682. }
  53683. function fw(t, e) {
  53684. ja.on(t, e);
  53685. }
  53686. function vo(t, e, n) {
  53687. Me(e) && (n = e, e = "");
  53688. var r = Ie(t) ? t.type : [t, t = {
  53689. event: e
  53690. }][0];
  53691. t.event = (t.event || r).toLowerCase(), e = t.event, !Rg[e] && (ke(Gz.test(r) && Gz.test(e)), OO[r] || (OO[r] = {
  53692. action: n,
  53693. actionInfo: t
  53694. }), Rg[e] = r);
  53695. }
  53696. function Lee(t, e) {
  53697. zf.register(t, e);
  53698. }
  53699. function K8e(t) {
  53700. var e = zf.get(t);
  53701. if (e)
  53702. return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice();
  53703. }
  53704. function Nee(t, e) {
  53705. _k(SO, t, e, Oee, "layout");
  53706. }
  53707. function $u(t, e) {
  53708. _k(SO, t, e, See, "visual");
  53709. }
  53710. var Kz = [];
  53711. function _k(t, e, n, r, i) {
  53712. if ((Me(e) || Ie(e)) && (n = e, e = r), process.env.NODE_ENV !== "production") {
  53713. if (isNaN(e) || e == null)
  53714. throw new Error("Illegal priority");
  53715. k(t, function(o) {
  53716. ke(o.__raw !== n);
  53717. });
  53718. }
  53719. if (!(et(Kz, n) >= 0)) {
  53720. Kz.push(n);
  53721. var a = lee.wrapStageHandler(n, i);
  53722. a.__prio = e, a.__raw = n, t.push(a);
  53723. }
  53724. }
  53725. function Ok(t, e) {
  53726. eE[t] = e;
  53727. }
  53728. function J8e(t) {
  53729. process.env.NODE_ENV !== "production" && Ea("setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead."), Oq({
  53730. createCanvas: t
  53731. });
  53732. }
  53733. function Bee(t, e, n) {
  53734. var r = _ee("registerMap");
  53735. r && r(t, e, n);
  53736. }
  53737. function eNe(t) {
  53738. var e = _ee("getMap");
  53739. return e && e(t);
  53740. }
  53741. var zee = h4e;
  53742. $u(hk, B4e);
  53743. $u(cw, z4e);
  53744. $u(cw, V4e);
  53745. $u(hk, J4e);
  53746. $u(cw, e8e);
  53747. $u(xee, $8e);
  53748. yk(NJ);
  53749. bk(R8e, ZLe);
  53750. Ok("default", F4e);
  53751. vo({
  53752. type: Jc,
  53753. event: Jc,
  53754. update: Jc
  53755. }, On);
  53756. vo({
  53757. type: V_,
  53758. event: V_,
  53759. update: V_
  53760. }, On);
  53761. vo({
  53762. type: Ag,
  53763. event: Ag,
  53764. update: Ag
  53765. }, On);
  53766. vo({
  53767. type: F_,
  53768. event: F_,
  53769. update: F_
  53770. }, On);
  53771. vo({
  53772. type: Eg,
  53773. event: Eg,
  53774. update: Eg
  53775. }, On);
  53776. mk("light", q4e);
  53777. mk("dark", dee);
  53778. var tNe = {}, Jz = [], nNe = {
  53779. registerPreprocessor: yk,
  53780. registerProcessor: bk,
  53781. registerPostInit: Ree,
  53782. registerPostUpdate: kee,
  53783. registerUpdateLifecycle: fw,
  53784. registerAction: vo,
  53785. registerCoordinateSystem: Lee,
  53786. registerLayout: Nee,
  53787. registerVisual: $u,
  53788. registerTransform: zee,
  53789. registerLoading: Ok,
  53790. registerMap: Bee,
  53791. registerImpl: A8e,
  53792. PRIORITY: wee,
  53793. ComponentModel: rt,
  53794. ComponentView: Xt,
  53795. SeriesModel: Ht,
  53796. ChartView: zt,
  53797. // TODO Use ComponentModel and SeriesModel instead of Constructor
  53798. registerComponentModel: function(t) {
  53799. rt.registerClass(t);
  53800. },
  53801. registerComponentView: function(t) {
  53802. Xt.registerClass(t);
  53803. },
  53804. registerSeriesModel: function(t) {
  53805. Ht.registerClass(t);
  53806. },
  53807. registerChartView: function(t) {
  53808. zt.registerClass(t);
  53809. },
  53810. registerSubTypeDefaulter: function(t, e) {
  53811. rt.registerSubTypeDefaulter(t, e);
  53812. },
  53813. registerPainter: function(t, e) {
  53814. rK(t, e);
  53815. }
  53816. };
  53817. function at(t) {
  53818. if (ue(t)) {
  53819. k(t, function(e) {
  53820. at(e);
  53821. });
  53822. return;
  53823. }
  53824. et(Jz, t) >= 0 || (Jz.push(t), Me(t) && (t = {
  53825. install: t
  53826. }), t.install(nNe));
  53827. }
  53828. function dv(t) {
  53829. return t == null ? 0 : t.length || 1;
  53830. }
  53831. function eV(t) {
  53832. return t;
  53833. }
  53834. var Us = (
  53835. /** @class */
  53836. function() {
  53837. function t(e, n, r, i, a, o) {
  53838. this._old = e, this._new = n, this._oldKeyGetter = r || eV, this._newKeyGetter = i || eV, this.context = a, this._diffModeMultiple = o === "multiple";
  53839. }
  53840. return t.prototype.add = function(e) {
  53841. return this._add = e, this;
  53842. }, t.prototype.update = function(e) {
  53843. return this._update = e, this;
  53844. }, t.prototype.updateManyToOne = function(e) {
  53845. return this._updateManyToOne = e, this;
  53846. }, t.prototype.updateOneToMany = function(e) {
  53847. return this._updateOneToMany = e, this;
  53848. }, t.prototype.updateManyToMany = function(e) {
  53849. return this._updateManyToMany = e, this;
  53850. }, t.prototype.remove = function(e) {
  53851. return this._remove = e, this;
  53852. }, t.prototype.execute = function() {
  53853. this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
  53854. }, t.prototype._executeOneToOne = function() {
  53855. var e = this._old, n = this._new, r = {}, i = new Array(e.length), a = new Array(n.length);
  53856. this._initIndexMap(e, null, i, "_oldKeyGetter"), this._initIndexMap(n, r, a, "_newKeyGetter");
  53857. for (var o = 0; o < e.length; o++) {
  53858. var s = i[o], l = r[s], u = dv(l);
  53859. if (u > 1) {
  53860. var c = l.shift();
  53861. l.length === 1 && (r[s] = l[0]), this._update && this._update(c, o);
  53862. } else u === 1 ? (r[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
  53863. }
  53864. this._performRestAdd(a, r);
  53865. }, t.prototype._executeMultiple = function() {
  53866. var e = this._old, n = this._new, r = {}, i = {}, a = [], o = [];
  53867. this._initIndexMap(e, r, a, "_oldKeyGetter"), this._initIndexMap(n, i, o, "_newKeyGetter");
  53868. for (var s = 0; s < a.length; s++) {
  53869. var l = a[s], u = r[l], c = i[l], f = dv(u), d = dv(c);
  53870. if (f > 1 && d === 1)
  53871. this._updateManyToOne && this._updateManyToOne(c, u), i[l] = null;
  53872. else if (f === 1 && d > 1)
  53873. this._updateOneToMany && this._updateOneToMany(c, u), i[l] = null;
  53874. else if (f === 1 && d === 1)
  53875. this._update && this._update(c, u), i[l] = null;
  53876. else if (f > 1 && d > 1)
  53877. this._updateManyToMany && this._updateManyToMany(c, u), i[l] = null;
  53878. else if (f > 1)
  53879. for (var h = 0; h < f; h++)
  53880. this._remove && this._remove(u[h]);
  53881. else
  53882. this._remove && this._remove(u);
  53883. }
  53884. this._performRestAdd(o, i);
  53885. }, t.prototype._performRestAdd = function(e, n) {
  53886. for (var r = 0; r < e.length; r++) {
  53887. var i = e[r], a = n[i], o = dv(a);
  53888. if (o > 1)
  53889. for (var s = 0; s < o; s++)
  53890. this._add && this._add(a[s]);
  53891. else o === 1 && this._add && this._add(a);
  53892. n[i] = null;
  53893. }
  53894. }, t.prototype._initIndexMap = function(e, n, r, i) {
  53895. for (var a = this._diffModeMultiple, o = 0; o < e.length; o++) {
  53896. var s = "_ec_" + this[i](e[o], o);
  53897. if (a || (r[o] = s), !!n) {
  53898. var l = n[s], u = dv(l);
  53899. u === 0 ? (n[s] = o, a && r.push(s)) : u === 1 ? n[s] = [l, o] : l.push(o);
  53900. }
  53901. }
  53902. }, t;
  53903. }()
  53904. ), rNe = (
  53905. /** @class */
  53906. function() {
  53907. function t(e, n) {
  53908. this._encode = e, this._schema = n;
  53909. }
  53910. return t.prototype.get = function() {
  53911. return {
  53912. // Do not generate full dimension name until fist used.
  53913. fullDimensions: this._getFullDimensionNames(),
  53914. encode: this._encode
  53915. };
  53916. }, t.prototype._getFullDimensionNames = function() {
  53917. return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
  53918. }, t;
  53919. }()
  53920. );
  53921. function iNe(t, e) {
  53922. var n = {}, r = n.encode = {}, i = Pe(), a = [], o = [], s = {};
  53923. k(t.dimensions, function(d) {
  53924. var h = t.getDimensionInfo(d), p = h.coordDim;
  53925. if (p) {
  53926. process.env.NODE_ENV !== "production" && ke(FA.get(p) == null);
  53927. var v = h.coordDimIndex;
  53928. WT(r, p)[v] = d, h.isExtraCoord || (i.set(p, 1), aNe(h.type) && (a[0] = d), WT(s, p)[v] = t.getDimensionIndex(h.name)), h.defaultTooltip && o.push(d);
  53929. }
  53930. FA.each(function(g, m) {
  53931. var y = WT(r, m), b = h.otherDims[m];
  53932. b != null && b !== !1 && (y[b] = h.name);
  53933. });
  53934. });
  53935. var l = [], u = {};
  53936. i.each(function(d, h) {
  53937. var p = r[h];
  53938. u[h] = p[0], l = l.concat(p);
  53939. }), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = ce(l, function(d) {
  53940. return t.getDimensionInfo(d).storeDimIndex;
  53941. }), n.encodeFirstDimNotExtra = u;
  53942. var c = r.label;
  53943. c && c.length && (a = c.slice());
  53944. var f = r.tooltip;
  53945. return f && f.length ? o = f.slice() : o.length || (o = a.slice()), r.defaultedLabel = a, r.defaultedTooltip = o, n.userOutput = new rNe(s, e), n;
  53946. }
  53947. function WT(t, e) {
  53948. return t.hasOwnProperty(e) || (t[e] = []), t[e];
  53949. }
  53950. function wO(t) {
  53951. return t === "category" ? "ordinal" : t === "time" ? "time" : "float";
  53952. }
  53953. function aNe(t) {
  53954. return !(t === "ordinal" || t === "time");
  53955. }
  53956. var j_ = (
  53957. /** @class */
  53958. /* @__PURE__ */ function() {
  53959. function t(e) {
  53960. this.otherDims = {}, e != null && le(this, e);
  53961. }
  53962. return t;
  53963. }()
  53964. ), oNe = bt(), sNe = {
  53965. float: "f",
  53966. int: "i",
  53967. ordinal: "o",
  53968. number: "n",
  53969. time: "t"
  53970. }, Vee = (
  53971. /** @class */
  53972. function() {
  53973. function t(e) {
  53974. this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
  53975. }
  53976. return t.prototype.isDimensionOmitted = function() {
  53977. return this._dimOmitted;
  53978. }, t.prototype._updateDimOmitted = function(e) {
  53979. this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = Qee(this.source)));
  53980. }, t.prototype.getSourceDimensionIndex = function(e) {
  53981. return We(this._dimNameMap.get(e), -1);
  53982. }, t.prototype.getSourceDimension = function(e) {
  53983. var n = this.source.dimensionsDefine;
  53984. if (n)
  53985. return n[e];
  53986. }, t.prototype.makeStoreSchema = function() {
  53987. for (var e = this._fullDimCount, n = zJ(this.source), r = !Hee(e), i = "", a = [], o = 0, s = 0; o < e; o++) {
  53988. var l = void 0, u = void 0, c = void 0, f = this.dimensions[s];
  53989. if (f && f.storeDimIndex === o)
  53990. l = n ? f.name : null, u = f.type, c = f.ordinalMeta, s++;
  53991. else {
  53992. var d = this.getSourceDimension(o);
  53993. d && (l = n ? d.name : null, u = d.type);
  53994. }
  53995. a.push({
  53996. property: l,
  53997. type: u,
  53998. ordinalMeta: c
  53999. }), n && l != null && (!f || !f.isCalculationCoord) && (i += r ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), i += "$", i += sNe[u] || "f", c && (i += c.uid), i += "$";
  54000. }
  54001. var h = this.source, p = [h.seriesLayoutBy, h.startIndex, i].join("$$");
  54002. return {
  54003. dimensions: a,
  54004. hash: p
  54005. };
  54006. }, t.prototype.makeOutputDimensionNames = function() {
  54007. for (var e = [], n = 0, r = 0; n < this._fullDimCount; n++) {
  54008. var i = void 0, a = this.dimensions[r];
  54009. if (a && a.storeDimIndex === n)
  54010. a.isCalculationCoord || (i = a.name), r++;
  54011. else {
  54012. var o = this.getSourceDimension(n);
  54013. o && (i = o.name);
  54014. }
  54015. e.push(i);
  54016. }
  54017. return e;
  54018. }, t.prototype.appendCalculationDimension = function(e) {
  54019. this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
  54020. }, t;
  54021. }()
  54022. );
  54023. function Fee(t) {
  54024. return t instanceof Vee;
  54025. }
  54026. function Wee(t) {
  54027. for (var e = Pe(), n = 0; n < (t || []).length; n++) {
  54028. var r = t[n], i = Ie(r) ? r.name : r;
  54029. i != null && e.get(i) == null && e.set(i, n);
  54030. }
  54031. return e;
  54032. }
  54033. function Qee(t) {
  54034. var e = oNe(t);
  54035. return e.dimNameMap || (e.dimNameMap = Wee(t.dimensionsDefine));
  54036. }
  54037. function Hee(t) {
  54038. return t > 30;
  54039. }
  54040. var hv = Ie, gl = ce, lNe = typeof Int32Array > "u" ? Array : Int32Array, uNe = "e\0\0", tV = -1, cNe = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], fNe = ["_approximateExtent"], nV, fb, pv, fd, QT, db, HT, dNe = (
  54041. /** @class */
  54042. function() {
  54043. function t(e, n) {
  54044. this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "lttbDownSample", "map"], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = ["downSample", "lttbDownSample"];
  54045. var r, i = !1;
  54046. Fee(e) ? (r = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (i = !0, r = e), r = r || ["x", "y"];
  54047. for (var a = {}, o = [], s = {}, l = !1, u = {}, c = 0; c < r.length; c++) {
  54048. var f = r[c], d = Oe(f) ? new j_({
  54049. name: f
  54050. }) : f instanceof j_ ? f : new j_(f), h = d.name;
  54051. d.type = d.type || "float", d.coordDim || (d.coordDim = h, d.coordDimIndex = 0);
  54052. var p = d.otherDims = d.otherDims || {};
  54053. o.push(h), a[h] = d, u[h] != null && (l = !0), d.createInvertedIndices && (s[h] = []), p.itemName === 0 && (this._nameDimIdx = c), p.itemId === 0 && (this._idDimIdx = c), process.env.NODE_ENV !== "production" && ke(i || d.storeDimIndex >= 0), i && (d.storeDimIndex = c);
  54054. }
  54055. if (this.dimensions = o, this._dimInfos = a, this._initGetDimensionInfo(l), this.hostModel = n, this._invertedIndicesMap = s, this._dimOmitted) {
  54056. var v = this._dimIdxToName = Pe();
  54057. k(o, function(g) {
  54058. v.set(a[g].storeDimIndex, g);
  54059. });
  54060. }
  54061. }
  54062. return t.prototype.getDimension = function(e) {
  54063. var n = this._recognizeDimIndex(e);
  54064. if (n == null)
  54065. return e;
  54066. if (n = e, !this._dimOmitted)
  54067. return this.dimensions[n];
  54068. var r = this._dimIdxToName.get(n);
  54069. if (r != null)
  54070. return r;
  54071. var i = this._schema.getSourceDimension(n);
  54072. if (i)
  54073. return i.name;
  54074. }, t.prototype.getDimensionIndex = function(e) {
  54075. var n = this._recognizeDimIndex(e);
  54076. if (n != null)
  54077. return n;
  54078. if (e == null)
  54079. return -1;
  54080. var r = this._getDimInfo(e);
  54081. return r ? r.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
  54082. }, t.prototype._recognizeDimIndex = function(e) {
  54083. if (St(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
  54084. return +e;
  54085. }, t.prototype._getStoreDimIndex = function(e) {
  54086. var n = this.getDimensionIndex(e);
  54087. if (process.env.NODE_ENV !== "production" && n == null)
  54088. throw new Error("Unknown dimension " + e);
  54089. return n;
  54090. }, t.prototype.getDimensionInfo = function(e) {
  54091. return this._getDimInfo(this.getDimension(e));
  54092. }, t.prototype._initGetDimensionInfo = function(e) {
  54093. var n = this._dimInfos;
  54094. this._getDimInfo = e ? function(r) {
  54095. return n.hasOwnProperty(r) ? n[r] : void 0;
  54096. } : function(r) {
  54097. return n[r];
  54098. };
  54099. }, t.prototype.getDimensionsOnCoord = function() {
  54100. return this._dimSummary.dataDimsOnCoord.slice();
  54101. }, t.prototype.mapDimension = function(e, n) {
  54102. var r = this._dimSummary;
  54103. if (n == null)
  54104. return r.encodeFirstDimNotExtra[e];
  54105. var i = r.encode[e];
  54106. return i ? i[n] : null;
  54107. }, t.prototype.mapDimensionsAll = function(e) {
  54108. var n = this._dimSummary, r = n.encode[e];
  54109. return (r || []).slice();
  54110. }, t.prototype.getStore = function() {
  54111. return this._store;
  54112. }, t.prototype.initData = function(e, n, r) {
  54113. var i = this, a;
  54114. if (e instanceof GA && (a = e), !a) {
  54115. var o = this.dimensions, s = ok(e) || wr(e) ? new VJ(e, o.length) : e;
  54116. a = new GA();
  54117. var l = gl(o, function(u) {
  54118. return {
  54119. type: i._dimInfos[u].type,
  54120. property: u
  54121. };
  54122. });
  54123. a.initData(s, l, r);
  54124. }
  54125. this._store = a, this._nameList = (n || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, a.count()), this._dimSummary = iNe(this, this._schema), this.userOutput = this._dimSummary.userOutput;
  54126. }, t.prototype.appendData = function(e) {
  54127. var n = this._store.appendData(e);
  54128. this._doInit(n[0], n[1]);
  54129. }, t.prototype.appendValues = function(e, n) {
  54130. var r = this._store.appendValues(e, n.length), i = r.start, a = r.end, o = this._shouldMakeIdFromName();
  54131. if (this._updateOrdinalMeta(), n)
  54132. for (var s = i; s < a; s++) {
  54133. var l = s - i;
  54134. this._nameList[s] = n[l], o && HT(this, s);
  54135. }
  54136. }, t.prototype._updateOrdinalMeta = function() {
  54137. for (var e = this._store, n = this.dimensions, r = 0; r < n.length; r++) {
  54138. var i = this._dimInfos[n[r]];
  54139. i.ordinalMeta && e.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta);
  54140. }
  54141. }, t.prototype._shouldMakeIdFromName = function() {
  54142. var e = this._store.getProvider();
  54143. return this._idDimIdx == null && e.getSource().sourceFormat !== Ds && !e.fillStorage;
  54144. }, t.prototype._doInit = function(e, n) {
  54145. if (!(e >= n)) {
  54146. var r = this._store, i = r.getProvider();
  54147. this._updateOrdinalMeta();
  54148. var a = this._nameList, o = this._idList, s = i.getSource().sourceFormat, l = s === La;
  54149. if (l && !i.pure)
  54150. for (var u = [], c = e; c < n; c++) {
  54151. var f = i.getItem(c, u);
  54152. if (!this.hasItemOption && WDe(f) && (this.hasItemOption = !0), f) {
  54153. var d = f.name;
  54154. a[c] == null && d != null && (a[c] = Vn(d, null));
  54155. var h = f.id;
  54156. o[c] == null && h != null && (o[c] = Vn(h, null));
  54157. }
  54158. }
  54159. if (this._shouldMakeIdFromName())
  54160. for (var c = e; c < n; c++)
  54161. HT(this, c);
  54162. nV(this);
  54163. }
  54164. }, t.prototype.getApproximateExtent = function(e) {
  54165. return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
  54166. }, t.prototype.setApproximateExtent = function(e, n) {
  54167. n = this.getDimension(n), this._approximateExtent[n] = e.slice();
  54168. }, t.prototype.getCalculationInfo = function(e) {
  54169. return this._calculationInfo[e];
  54170. }, t.prototype.setCalculationInfo = function(e, n) {
  54171. hv(e) ? le(this._calculationInfo, e) : this._calculationInfo[e] = n;
  54172. }, t.prototype.getName = function(e) {
  54173. var n = this.getRawIndex(e), r = this._nameList[n];
  54174. return r == null && this._nameDimIdx != null && (r = pv(this, this._nameDimIdx, n)), r == null && (r = ""), r;
  54175. }, t.prototype._getCategory = function(e, n) {
  54176. var r = this._store.get(e, n), i = this._store.getOrdinalMeta(e);
  54177. return i ? i.categories[r] : r;
  54178. }, t.prototype.getId = function(e) {
  54179. return fb(this, this.getRawIndex(e));
  54180. }, t.prototype.count = function() {
  54181. return this._store.count();
  54182. }, t.prototype.get = function(e, n) {
  54183. var r = this._store, i = this._dimInfos[e];
  54184. if (i)
  54185. return r.get(i.storeDimIndex, n);
  54186. }, t.prototype.getByRawIndex = function(e, n) {
  54187. var r = this._store, i = this._dimInfos[e];
  54188. if (i)
  54189. return r.getByRawIndex(i.storeDimIndex, n);
  54190. }, t.prototype.getIndices = function() {
  54191. return this._store.getIndices();
  54192. }, t.prototype.getDataExtent = function(e) {
  54193. return this._store.getDataExtent(this._getStoreDimIndex(e));
  54194. }, t.prototype.getSum = function(e) {
  54195. return this._store.getSum(this._getStoreDimIndex(e));
  54196. }, t.prototype.getMedian = function(e) {
  54197. return this._store.getMedian(this._getStoreDimIndex(e));
  54198. }, t.prototype.getValues = function(e, n) {
  54199. var r = this, i = this._store;
  54200. return ue(e) ? i.getValues(gl(e, function(a) {
  54201. return r._getStoreDimIndex(a);
  54202. }), n) : i.getValues(e);
  54203. }, t.prototype.hasValue = function(e) {
  54204. for (var n = this._dimSummary.dataDimIndicesOnCoord, r = 0, i = n.length; r < i; r++)
  54205. if (isNaN(this._store.get(n[r], e)))
  54206. return !1;
  54207. return !0;
  54208. }, t.prototype.indexOfName = function(e) {
  54209. for (var n = 0, r = this._store.count(); n < r; n++)
  54210. if (this.getName(n) === e)
  54211. return n;
  54212. return -1;
  54213. }, t.prototype.getRawIndex = function(e) {
  54214. return this._store.getRawIndex(e);
  54215. }, t.prototype.indexOfRawIndex = function(e) {
  54216. return this._store.indexOfRawIndex(e);
  54217. }, t.prototype.rawIndexOf = function(e, n) {
  54218. var r = e && this._invertedIndicesMap[e];
  54219. if (process.env.NODE_ENV !== "production" && !r)
  54220. throw new Error("Do not supported yet");
  54221. var i = r[n];
  54222. return i == null || isNaN(i) ? tV : i;
  54223. }, t.prototype.indicesOfNearest = function(e, n, r) {
  54224. return this._store.indicesOfNearest(this._getStoreDimIndex(e), n, r);
  54225. }, t.prototype.each = function(e, n, r) {
  54226. Me(e) && (r = n, n = e, e = []);
  54227. var i = r || this, a = gl(fd(e), this._getStoreDimIndex, this);
  54228. this._store.each(a, i ? xe(n, i) : n);
  54229. }, t.prototype.filterSelf = function(e, n, r) {
  54230. Me(e) && (r = n, n = e, e = []);
  54231. var i = r || this, a = gl(fd(e), this._getStoreDimIndex, this);
  54232. return this._store = this._store.filter(a, i ? xe(n, i) : n), this;
  54233. }, t.prototype.selectRange = function(e) {
  54234. var n = this, r = {}, i = st(e);
  54235. return k(i, function(a) {
  54236. var o = n._getStoreDimIndex(a);
  54237. r[o] = e[a];
  54238. }), this._store = this._store.selectRange(r), this;
  54239. }, t.prototype.mapArray = function(e, n, r) {
  54240. Me(e) && (r = n, n = e, e = []), r = r || this;
  54241. var i = [];
  54242. return this.each(e, function() {
  54243. i.push(n && n.apply(this, arguments));
  54244. }, r), i;
  54245. }, t.prototype.map = function(e, n, r, i) {
  54246. var a = r || i || this, o = gl(fd(e), this._getStoreDimIndex, this), s = db(this);
  54247. return s._store = this._store.map(o, a ? xe(n, a) : n), s;
  54248. }, t.prototype.modify = function(e, n, r, i) {
  54249. var a = this, o = r || i || this;
  54250. process.env.NODE_ENV !== "production" && k(fd(e), function(l) {
  54251. var u = a.getDimensionInfo(l);
  54252. u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
  54253. });
  54254. var s = gl(fd(e), this._getStoreDimIndex, this);
  54255. this._store.modify(s, o ? xe(n, o) : n);
  54256. }, t.prototype.downSample = function(e, n, r, i) {
  54257. var a = db(this);
  54258. return a._store = this._store.downSample(this._getStoreDimIndex(e), n, r, i), a;
  54259. }, t.prototype.lttbDownSample = function(e, n) {
  54260. var r = db(this);
  54261. return r._store = this._store.lttbDownSample(this._getStoreDimIndex(e), n), r;
  54262. }, t.prototype.getRawDataItem = function(e) {
  54263. return this._store.getRawDataItem(e);
  54264. }, t.prototype.getItemModel = function(e) {
  54265. var n = this.hostModel, r = this.getRawDataItem(e);
  54266. return new Wt(r, n, n && n.ecModel);
  54267. }, t.prototype.diff = function(e) {
  54268. var n = this;
  54269. return new Us(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(r) {
  54270. return fb(e, r);
  54271. }, function(r) {
  54272. return fb(n, r);
  54273. });
  54274. }, t.prototype.getVisual = function(e) {
  54275. var n = this._visual;
  54276. return n && n[e];
  54277. }, t.prototype.setVisual = function(e, n) {
  54278. this._visual = this._visual || {}, hv(e) ? le(this._visual, e) : this._visual[e] = n;
  54279. }, t.prototype.getItemVisual = function(e, n) {
  54280. var r = this._itemVisuals[e], i = r && r[n];
  54281. return i ?? this.getVisual(n);
  54282. }, t.prototype.hasItemVisual = function() {
  54283. return this._itemVisuals.length > 0;
  54284. }, t.prototype.ensureUniqueItemVisual = function(e, n) {
  54285. var r = this._itemVisuals, i = r[e];
  54286. i || (i = r[e] = {});
  54287. var a = i[n];
  54288. return a == null && (a = this.getVisual(n), ue(a) ? a = a.slice() : hv(a) && (a = le({}, a)), i[n] = a), a;
  54289. }, t.prototype.setItemVisual = function(e, n, r) {
  54290. var i = this._itemVisuals[e] || {};
  54291. this._itemVisuals[e] = i, hv(n) ? le(i, n) : i[n] = r;
  54292. }, t.prototype.clearAllVisual = function() {
  54293. this._visual = {}, this._itemVisuals = [];
  54294. }, t.prototype.setLayout = function(e, n) {
  54295. hv(e) ? le(this._layout, e) : this._layout[e] = n;
  54296. }, t.prototype.getLayout = function(e) {
  54297. return this._layout[e];
  54298. }, t.prototype.getItemLayout = function(e) {
  54299. return this._itemLayouts[e];
  54300. }, t.prototype.setItemLayout = function(e, n, r) {
  54301. this._itemLayouts[e] = r ? le(this._itemLayouts[e] || {}, n) : n;
  54302. }, t.prototype.clearItemLayouts = function() {
  54303. this._itemLayouts.length = 0;
  54304. }, t.prototype.setItemGraphicEl = function(e, n) {
  54305. var r = this.hostModel && this.hostModel.seriesIndex;
  54306. MA(r, this.dataType, e, n), this._graphicEls[e] = n;
  54307. }, t.prototype.getItemGraphicEl = function(e) {
  54308. return this._graphicEls[e];
  54309. }, t.prototype.eachItemGraphicEl = function(e, n) {
  54310. k(this._graphicEls, function(r, i) {
  54311. r && e && e.call(n, r, i);
  54312. });
  54313. }, t.prototype.cloneShallow = function(e) {
  54314. return e || (e = new t(this._schema ? this._schema : gl(this.dimensions, this._getDimInfo, this), this.hostModel)), QT(e, this), e._store = this._store, e;
  54315. }, t.prototype.wrapMethod = function(e, n) {
  54316. var r = this[e];
  54317. Me(r) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
  54318. var i = r.apply(this, arguments);
  54319. return n.apply(this, [i].concat(Rx(arguments)));
  54320. });
  54321. }, t.internalField = function() {
  54322. nV = function(e) {
  54323. var n = e._invertedIndicesMap;
  54324. k(n, function(r, i) {
  54325. var a = e._dimInfos[i], o = a.ordinalMeta, s = e._store;
  54326. if (o) {
  54327. r = n[i] = new lNe(o.categories.length);
  54328. for (var l = 0; l < r.length; l++)
  54329. r[l] = tV;
  54330. for (var l = 0; l < s.count(); l++)
  54331. r[s.get(a.storeDimIndex, l)] = l;
  54332. }
  54333. });
  54334. }, pv = function(e, n, r) {
  54335. return Vn(e._getCategory(n, r), null);
  54336. }, fb = function(e, n) {
  54337. var r = e._idList[n];
  54338. return r == null && e._idDimIdx != null && (r = pv(e, e._idDimIdx, n)), r == null && (r = uNe + n), r;
  54339. }, fd = function(e) {
  54340. return ue(e) || (e = e != null ? [e] : []), e;
  54341. }, db = function(e) {
  54342. var n = new t(e._schema ? e._schema : gl(e.dimensions, e._getDimInfo, e), e.hostModel);
  54343. return QT(n, e), n;
  54344. }, QT = function(e, n) {
  54345. k(cNe.concat(n.__wrappedMethods || []), function(r) {
  54346. n.hasOwnProperty(r) && (e[r] = n[r]);
  54347. }), e.__wrappedMethods = n.__wrappedMethods, k(fNe, function(r) {
  54348. e[r] = Le(n[r]);
  54349. }), e._calculationInfo = le({}, n._calculationInfo);
  54350. }, HT = function(e, n) {
  54351. var r = e._nameList, i = e._idList, a = e._nameDimIdx, o = e._idDimIdx, s = r[n], l = i[n];
  54352. if (s == null && a != null && (r[n] = s = pv(e, a, n)), l == null && o != null && (i[n] = l = pv(e, o, n)), l == null && s != null) {
  54353. var u = e._nameRepeatCount, c = u[s] = (u[s] || 0) + 1;
  54354. l = s, c > 1 && (l += "__ec__" + c), i[n] = l;
  54355. }
  54356. };
  54357. }(), t;
  54358. }()
  54359. );
  54360. const Lr = dNe;
  54361. function hNe(t, e) {
  54362. return wp(t, e).dimensions;
  54363. }
  54364. function wp(t, e) {
  54365. ok(t) || (t = sk(t)), e = e || {};
  54366. var n = e.coordDimensions || [], r = e.dimensionsDefine || t.dimensionsDefine || [], i = Pe(), a = [], o = vNe(t, n, r, e.dimensionsCount), s = e.canOmitUnusedDimensions && Hee(o), l = r === t.dimensionsDefine, u = l ? Qee(t) : Wee(r), c = e.encodeDefine;
  54367. !c && e.encodeDefaulter && (c = e.encodeDefaulter(t, o));
  54368. for (var f = Pe(c), d = new UJ(o), h = 0; h < d.length; h++)
  54369. d[h] = -1;
  54370. function p(T) {
  54371. var w = d[T];
  54372. if (w < 0) {
  54373. var P = r[T], $ = Ie(P) ? P : {
  54374. name: P
  54375. }, A = new j_(), D = $.name;
  54376. D != null && u.get(D) != null && (A.name = A.displayName = D), $.type != null && (A.type = $.type), $.displayName != null && (A.displayName = $.displayName);
  54377. var E = a.length;
  54378. return d[T] = E, A.storeDimIndex = T, a.push(A), A;
  54379. }
  54380. return a[w];
  54381. }
  54382. if (!s)
  54383. for (var h = 0; h < o; h++)
  54384. p(h);
  54385. f.each(function(T, w) {
  54386. var P = Qt(T).slice();
  54387. if (P.length === 1 && !Oe(P[0]) && P[0] < 0) {
  54388. f.set(w, !1);
  54389. return;
  54390. }
  54391. var $ = f.set(w, []);
  54392. k(P, function(A, D) {
  54393. var E = Oe(A) ? u.get(A) : A;
  54394. E != null && E < o && ($[D] = E, g(p(E), w, D));
  54395. });
  54396. });
  54397. var v = 0;
  54398. k(n, function(T) {
  54399. var w, P, $, A;
  54400. if (Oe(T))
  54401. w = T, A = {};
  54402. else {
  54403. A = T, w = A.name;
  54404. var D = A.ordinalMeta;
  54405. A.ordinalMeta = null, A = le({}, A), A.ordinalMeta = D, P = A.dimsDef, $ = A.otherDims, A.name = A.coordDim = A.coordDimIndex = A.dimsDef = A.otherDims = null;
  54406. }
  54407. var E = f.get(w);
  54408. if (E !== !1) {
  54409. if (E = Qt(E), !E.length)
  54410. for (var R = 0; R < (P && P.length || 1); R++) {
  54411. for (; v < o && p(v).coordDim != null; )
  54412. v++;
  54413. v < o && E.push(v++);
  54414. }
  54415. k(E, function(N, V) {
  54416. var z = p(N);
  54417. if (l && A.type != null && (z.type = A.type), g(Re(z, A), w, V), z.name == null && P) {
  54418. var W = P[V];
  54419. !Ie(W) && (W = {
  54420. name: W
  54421. }), z.name = z.displayName = W.name, z.defaultTooltip = W.defaultTooltip;
  54422. }
  54423. $ && Re(z.otherDims, $);
  54424. });
  54425. }
  54426. });
  54427. function g(T, w, P) {
  54428. FA.get(w) != null ? T.otherDims[w] = P : (T.coordDim = w, T.coordDimIndex = P, i.set(w, !0));
  54429. }
  54430. var m = e.generateCoord, y = e.generateCoordCount, b = y != null;
  54431. y = m ? y || 1 : 0;
  54432. var _ = m || "value";
  54433. function O(T) {
  54434. T.name == null && (T.name = T.coordDim);
  54435. }
  54436. if (s)
  54437. k(a, function(T) {
  54438. O(T);
  54439. }), a.sort(function(T, w) {
  54440. return T.storeDimIndex - w.storeDimIndex;
  54441. });
  54442. else
  54443. for (var S = 0; S < o; S++) {
  54444. var x = p(S), C = x.coordDim;
  54445. C == null && (x.coordDim = gNe(_, i, b), x.coordDimIndex = 0, (!m || y <= 0) && (x.isExtraCoord = !0), y--), O(x), x.type == null && (IJ(t, S) === cr.Must || x.isExtraCoord && (x.otherDims.itemName != null || x.otherDims.seriesName != null)) && (x.type = "ordinal");
  54446. }
  54447. return pNe(a), new Vee({
  54448. source: t,
  54449. dimensions: a,
  54450. fullDimensionCount: o,
  54451. dimensionOmitted: s
  54452. });
  54453. }
  54454. function pNe(t) {
  54455. for (var e = Pe(), n = 0; n < t.length; n++) {
  54456. var r = t[n], i = r.name, a = e.get(i) || 0;
  54457. a > 0 && (r.name = i + (a - 1)), a++, e.set(i, a);
  54458. }
  54459. }
  54460. function vNe(t, e, n, r) {
  54461. var i = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, r || 0);
  54462. return k(e, function(a) {
  54463. var o;
  54464. Ie(a) && (o = a.dimsDef) && (i = Math.max(i, o.length));
  54465. }), i;
  54466. }
  54467. function gNe(t, e, n) {
  54468. if (n || e.hasKey(t)) {
  54469. for (var r = 0; e.hasKey(t + r); )
  54470. r++;
  54471. t += r;
  54472. }
  54473. return e.set(t, !0), t;
  54474. }
  54475. var mNe = (
  54476. /** @class */
  54477. /* @__PURE__ */ function() {
  54478. function t(e) {
  54479. this.coordSysDims = [], this.axisMap = Pe(), this.categoryAxisMap = Pe(), this.coordSysName = e;
  54480. }
  54481. return t;
  54482. }()
  54483. );
  54484. function yNe(t) {
  54485. var e = t.get("coordinateSystem"), n = new mNe(e), r = bNe[e];
  54486. if (r)
  54487. return r(t, n, n.axisMap, n.categoryAxisMap), n;
  54488. }
  54489. var bNe = {
  54490. cartesian2d: function(t, e, n, r) {
  54491. var i = t.getReferringComponents("xAxis", Dn).models[0], a = t.getReferringComponents("yAxis", Dn).models[0];
  54492. if (process.env.NODE_ENV !== "production") {
  54493. if (!i)
  54494. throw new Error('xAxis "' + Tn(t.get("xAxisIndex"), t.get("xAxisId"), 0) + '" not found');
  54495. if (!a)
  54496. throw new Error('yAxis "' + Tn(t.get("xAxisIndex"), t.get("yAxisId"), 0) + '" not found');
  54497. }
  54498. e.coordSysDims = ["x", "y"], n.set("x", i), n.set("y", a), dd(i) && (r.set("x", i), e.firstCategoryDimIndex = 0), dd(a) && (r.set("y", a), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  54499. },
  54500. singleAxis: function(t, e, n, r) {
  54501. var i = t.getReferringComponents("singleAxis", Dn).models[0];
  54502. if (process.env.NODE_ENV !== "production" && !i)
  54503. throw new Error("singleAxis should be specified.");
  54504. e.coordSysDims = ["single"], n.set("single", i), dd(i) && (r.set("single", i), e.firstCategoryDimIndex = 0);
  54505. },
  54506. polar: function(t, e, n, r) {
  54507. var i = t.getReferringComponents("polar", Dn).models[0], a = i.findAxisModel("radiusAxis"), o = i.findAxisModel("angleAxis");
  54508. if (process.env.NODE_ENV !== "production") {
  54509. if (!o)
  54510. throw new Error("angleAxis option not found");
  54511. if (!a)
  54512. throw new Error("radiusAxis option not found");
  54513. }
  54514. e.coordSysDims = ["radius", "angle"], n.set("radius", a), n.set("angle", o), dd(a) && (r.set("radius", a), e.firstCategoryDimIndex = 0), dd(o) && (r.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  54515. },
  54516. geo: function(t, e, n, r) {
  54517. e.coordSysDims = ["lng", "lat"];
  54518. },
  54519. parallel: function(t, e, n, r) {
  54520. var i = t.ecModel, a = i.getComponent("parallel", t.get("parallelIndex")), o = e.coordSysDims = a.dimensions.slice();
  54521. k(a.parallelAxisIndex, function(s, l) {
  54522. var u = i.getComponent("parallelAxis", s), c = o[l];
  54523. n.set(c, u), dd(u) && (r.set(c, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
  54524. });
  54525. }
  54526. };
  54527. function dd(t) {
  54528. return t.get("type") === "category";
  54529. }
  54530. function Gee(t, e, n) {
  54531. n = n || {};
  54532. var r = n.byIndex, i = n.stackedCoordDimension, a, o, s;
  54533. _Ne(e) ? a = e : (o = e.schema, a = o.dimensions, s = e.store);
  54534. var l = !!(t && t.get("stack")), u, c, f, d;
  54535. if (k(a, function(y, b) {
  54536. Oe(y) && (a[b] = y = {
  54537. name: y
  54538. }), l && !y.isExtraCoord && (!r && !u && y.ordinalMeta && (u = y), !c && y.type !== "ordinal" && y.type !== "time" && (!i || i === y.coordDim) && (c = y));
  54539. }), c && !r && !u && (r = !0), c) {
  54540. f = "__\0ecstackresult_" + t.id, d = "__\0ecstackedover_" + t.id, u && (u.createInvertedIndices = !0);
  54541. var h = c.coordDim, p = c.type, v = 0;
  54542. k(a, function(y) {
  54543. y.coordDim === h && v++;
  54544. });
  54545. var g = {
  54546. name: f,
  54547. coordDim: h,
  54548. coordDimIndex: v,
  54549. type: p,
  54550. isExtraCoord: !0,
  54551. isCalculationCoord: !0,
  54552. storeDimIndex: a.length
  54553. }, m = {
  54554. name: d,
  54555. // This dimension contains stack base (generally, 0), so do not set it as
  54556. // `stackedDimCoordDim` to avoid extent calculation, consider log scale.
  54557. coordDim: d,
  54558. coordDimIndex: v + 1,
  54559. type: p,
  54560. isExtraCoord: !0,
  54561. isCalculationCoord: !0,
  54562. storeDimIndex: a.length + 1
  54563. };
  54564. o ? (s && (g.storeDimIndex = s.ensureCalculationDimension(d, p), m.storeDimIndex = s.ensureCalculationDimension(f, p)), o.appendCalculationDimension(g), o.appendCalculationDimension(m)) : (a.push(g), a.push(m));
  54565. }
  54566. return {
  54567. stackedDimension: c && c.name,
  54568. stackedByDimension: u && u.name,
  54569. isStackedByIndex: r,
  54570. stackedOverDimension: d,
  54571. stackResultDimension: f
  54572. };
  54573. }
  54574. function _Ne(t) {
  54575. return !Fee(t.schema);
  54576. }
  54577. function Xs(t, e) {
  54578. return !!e && e === t.getCalculationInfo("stackedDimension");
  54579. }
  54580. function Sk(t, e) {
  54581. return Xs(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
  54582. }
  54583. function ONe(t, e) {
  54584. var n = t.get("coordinateSystem"), r = zf.get(n), i;
  54585. return e && e.coordSysDims && (i = ce(e.coordSysDims, function(a) {
  54586. var o = {
  54587. name: a
  54588. }, s = e.axisMap.get(a);
  54589. if (s) {
  54590. var l = s.get("type");
  54591. o.type = wO(l);
  54592. }
  54593. return o;
  54594. })), i || (i = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), i;
  54595. }
  54596. function SNe(t, e, n) {
  54597. var r, i;
  54598. return n && k(t, function(a, o) {
  54599. var s = a.coordDim, l = n.categoryAxisMap.get(s);
  54600. l && (r == null && (r = o), a.ordinalMeta = l.getOrdinalMeta(), e && (a.createInvertedIndices = !0)), a.otherDims.itemName != null && (i = !0);
  54601. }), !i && r != null && (t[r].otherDims.itemName = 0), r;
  54602. }
  54603. function us(t, e, n) {
  54604. n = n || {};
  54605. var r = e.getSourceManager(), i, a = !1;
  54606. t ? (a = !0, i = sk(t)) : (i = r.getSource(), a = i.sourceFormat === La);
  54607. var o = yNe(e), s = ONe(e, o), l = n.useEncodeDefaulter, u = Me(l) ? l : l ? Ue(MJ, s, e) : null, c = {
  54608. coordDimensions: s,
  54609. generateCoord: n.generateCoord,
  54610. encodeDefine: e.getEncode(),
  54611. encodeDefaulter: u,
  54612. canOmitUnusedDimensions: !a
  54613. }, f = wp(i, c), d = SNe(f.dimensions, n.createInvertedIndices, o), h = a ? null : r.getSharedDataStore(f), p = Gee(e, {
  54614. schema: f,
  54615. store: h
  54616. }), v = new Lr(f, e);
  54617. v.setCalculationInfo(p);
  54618. var g = d != null && xNe(i) ? function(m, y, b, _) {
  54619. return _ === d ? b : this.defaultDimValueGetter(m, y, b, _);
  54620. } : null;
  54621. return v.hasItemOption = !1, v.initData(
  54622. // Try to reuse the data store in sourceManager if using dataset.
  54623. a ? i : h,
  54624. null,
  54625. g
  54626. ), v;
  54627. }
  54628. function xNe(t) {
  54629. if (t.sourceFormat === La) {
  54630. var e = wNe(t.data || []);
  54631. return !ue(fp(e));
  54632. }
  54633. }
  54634. function wNe(t) {
  54635. for (var e = 0; e < t.length && t[e] == null; )
  54636. e++;
  54637. return t[e];
  54638. }
  54639. var cs = (
  54640. /** @class */
  54641. function() {
  54642. function t(e) {
  54643. this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
  54644. }
  54645. return t.prototype.getSetting = function(e) {
  54646. return this._setting[e];
  54647. }, t.prototype.unionExtent = function(e) {
  54648. var n = this._extent;
  54649. e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]);
  54650. }, t.prototype.unionExtentFromData = function(e, n) {
  54651. this.unionExtent(e.getApproximateExtent(n));
  54652. }, t.prototype.getExtent = function() {
  54653. return this._extent.slice();
  54654. }, t.prototype.setExtent = function(e, n) {
  54655. var r = this._extent;
  54656. isNaN(e) || (r[0] = e), isNaN(n) || (r[1] = n);
  54657. }, t.prototype.isInExtentRange = function(e) {
  54658. return this._extent[0] <= e && this._extent[1] >= e;
  54659. }, t.prototype.isBlank = function() {
  54660. return this._isBlank;
  54661. }, t.prototype.setBlank = function(e) {
  54662. this._isBlank = e;
  54663. }, t;
  54664. }()
  54665. );
  54666. Qx(cs);
  54667. var CNe = 0, tE = (
  54668. /** @class */
  54669. function() {
  54670. function t(e) {
  54671. this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++CNe;
  54672. }
  54673. return t.createByAxisModel = function(e) {
  54674. var n = e.option, r = n.data, i = r && ce(r, TNe);
  54675. return new t({
  54676. categories: i,
  54677. needCollect: !i,
  54678. // deduplication is default in axis.
  54679. deduplication: n.dedplication !== !1
  54680. });
  54681. }, t.prototype.getOrdinal = function(e) {
  54682. return this._getOrCreateMap().get(e);
  54683. }, t.prototype.parseAndCollect = function(e) {
  54684. var n, r = this._needCollect;
  54685. if (!Oe(e) && !r)
  54686. return e;
  54687. if (r && !this._deduplication)
  54688. return n = this.categories.length, this.categories[n] = e, n;
  54689. var i = this._getOrCreateMap();
  54690. return n = i.get(e), n == null && (r ? (n = this.categories.length, this.categories[n] = e, i.set(e, n)) : n = NaN), n;
  54691. }, t.prototype._getOrCreateMap = function() {
  54692. return this._map || (this._map = Pe(this.categories));
  54693. }, t;
  54694. }()
  54695. );
  54696. function TNe(t) {
  54697. return Ie(t) && t.value != null ? t.value : t + "";
  54698. }
  54699. function PNe(t) {
  54700. var e = Math.pow(10, L0(Math.abs(t))), n = Math.abs(t / e);
  54701. return n === 0 || n === 1 || n === 2 || n === 3 || n === 5;
  54702. }
  54703. function nE(t) {
  54704. return t.type === "interval" || t.type === "log";
  54705. }
  54706. function $Ne(t, e, n, r) {
  54707. var i = {}, a = t[1] - t[0], o = i.interval = $R(a / e, !0);
  54708. n != null && o < n && (o = i.interval = n), r != null && o > r && (o = i.interval = r);
  54709. var s = i.intervalPrecision = jee(o), l = i.niceTickExtent = [mn(Math.ceil(t[0] / o) * o, s), mn(Math.floor(t[1] / o) * o, s)];
  54710. return ANe(l, t), i;
  54711. }
  54712. function GT(t) {
  54713. var e = Math.pow(10, L0(t)), n = t / e;
  54714. return n ? n === 2 ? n = 3 : n === 3 ? n = 5 : n *= 2 : n = 1, mn(n * e);
  54715. }
  54716. function jee(t) {
  54717. return Ua(t) + 2;
  54718. }
  54719. function rV(t, e, n) {
  54720. t[e] = Math.max(Math.min(t[e], n[1]), n[0]);
  54721. }
  54722. function ANe(t, e) {
  54723. !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), rV(t, 0, e), rV(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
  54724. }
  54725. function dw(t, e) {
  54726. return t >= e[0] && t <= e[1];
  54727. }
  54728. function hw(t, e) {
  54729. return e[1] === e[0] ? 0.5 : (t - e[0]) / (e[1] - e[0]);
  54730. }
  54731. function pw(t, e) {
  54732. return t * (e[1] - e[0]) + e[0];
  54733. }
  54734. var vw = (
  54735. /** @class */
  54736. function(t) {
  54737. q(e, t);
  54738. function e(n) {
  54739. var r = t.call(this, n) || this;
  54740. r.type = "ordinal";
  54741. var i = r.getSetting("ordinalMeta");
  54742. return i || (i = new tE({})), ue(i) && (i = new tE({
  54743. categories: ce(i, function(a) {
  54744. return Ie(a) ? a.value : a;
  54745. })
  54746. })), r._ordinalMeta = i, r._extent = r.getSetting("extent") || [0, i.categories.length - 1], r;
  54747. }
  54748. return e.prototype.parse = function(n) {
  54749. return n == null ? NaN : Oe(n) ? this._ordinalMeta.getOrdinal(n) : Math.round(n);
  54750. }, e.prototype.contain = function(n) {
  54751. return n = this.parse(n), dw(n, this._extent) && this._ordinalMeta.categories[n] != null;
  54752. }, e.prototype.normalize = function(n) {
  54753. return n = this._getTickNumber(this.parse(n)), hw(n, this._extent);
  54754. }, e.prototype.scale = function(n) {
  54755. return n = Math.round(pw(n, this._extent)), this.getRawOrdinalNumber(n);
  54756. }, e.prototype.getTicks = function() {
  54757. for (var n = [], r = this._extent, i = r[0]; i <= r[1]; )
  54758. n.push({
  54759. value: i
  54760. }), i++;
  54761. return n;
  54762. }, e.prototype.getMinorTicks = function(n) {
  54763. }, e.prototype.setSortInfo = function(n) {
  54764. if (n == null) {
  54765. this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
  54766. return;
  54767. }
  54768. for (var r = n.ordinalNumbers, i = this._ordinalNumbersByTick = [], a = this._ticksByOrdinalNumber = [], o = 0, s = this._ordinalMeta.categories.length, l = Math.min(s, r.length); o < l; ++o) {
  54769. var u = r[o];
  54770. i[o] = u, a[u] = o;
  54771. }
  54772. for (var c = 0; o < s; ++o) {
  54773. for (; a[c] != null; )
  54774. c++;
  54775. i.push(c), a[c] = o;
  54776. }
  54777. }, e.prototype._getTickNumber = function(n) {
  54778. var r = this._ticksByOrdinalNumber;
  54779. return r && n >= 0 && n < r.length ? r[n] : n;
  54780. }, e.prototype.getRawOrdinalNumber = function(n) {
  54781. var r = this._ordinalNumbersByTick;
  54782. return r && n >= 0 && n < r.length ? r[n] : n;
  54783. }, e.prototype.getLabel = function(n) {
  54784. if (!this.isBlank()) {
  54785. var r = this.getRawOrdinalNumber(n.value), i = this._ordinalMeta.categories[r];
  54786. return i == null ? "" : i + "";
  54787. }
  54788. }, e.prototype.count = function() {
  54789. return this._extent[1] - this._extent[0] + 1;
  54790. }, e.prototype.unionExtentFromData = function(n, r) {
  54791. this.unionExtent(n.getApproximateExtent(r));
  54792. }, e.prototype.isInExtentRange = function(n) {
  54793. return n = this._getTickNumber(n), this._extent[0] <= n && this._extent[1] >= n;
  54794. }, e.prototype.getOrdinalMeta = function() {
  54795. return this._ordinalMeta;
  54796. }, e.prototype.calcNiceTicks = function() {
  54797. }, e.prototype.calcNiceExtent = function() {
  54798. }, e.type = "ordinal", e;
  54799. }(cs)
  54800. );
  54801. cs.registerClass(vw);
  54802. var ic = mn, Ys = (
  54803. /** @class */
  54804. function(t) {
  54805. q(e, t);
  54806. function e() {
  54807. var n = t !== null && t.apply(this, arguments) || this;
  54808. return n.type = "interval", n._interval = 0, n._intervalPrecision = 2, n;
  54809. }
  54810. return e.prototype.parse = function(n) {
  54811. return n;
  54812. }, e.prototype.contain = function(n) {
  54813. return dw(n, this._extent);
  54814. }, e.prototype.normalize = function(n) {
  54815. return hw(n, this._extent);
  54816. }, e.prototype.scale = function(n) {
  54817. return pw(n, this._extent);
  54818. }, e.prototype.setExtent = function(n, r) {
  54819. var i = this._extent;
  54820. isNaN(n) || (i[0] = parseFloat(n)), isNaN(r) || (i[1] = parseFloat(r));
  54821. }, e.prototype.unionExtent = function(n) {
  54822. var r = this._extent;
  54823. n[0] < r[0] && (r[0] = n[0]), n[1] > r[1] && (r[1] = n[1]), this.setExtent(r[0], r[1]);
  54824. }, e.prototype.getInterval = function() {
  54825. return this._interval;
  54826. }, e.prototype.setInterval = function(n) {
  54827. this._interval = n, this._niceExtent = this._extent.slice(), this._intervalPrecision = jee(n);
  54828. }, e.prototype.getTicks = function(n) {
  54829. var r = this._interval, i = this._extent, a = this._niceExtent, o = this._intervalPrecision, s = [];
  54830. if (!r)
  54831. return s;
  54832. var l = 1e4;
  54833. i[0] < a[0] && (n ? s.push({
  54834. value: ic(a[0] - r, o)
  54835. }) : s.push({
  54836. value: i[0]
  54837. }));
  54838. for (var u = a[0]; u <= a[1] && (s.push({
  54839. value: u
  54840. }), u = ic(u + r, o), u !== s[s.length - 1].value); )
  54841. if (s.length > l)
  54842. return [];
  54843. var c = s.length ? s[s.length - 1].value : a[1];
  54844. return i[1] > c && (n ? s.push({
  54845. value: ic(c + r, o)
  54846. }) : s.push({
  54847. value: i[1]
  54848. })), s;
  54849. }, e.prototype.getMinorTicks = function(n) {
  54850. for (var r = this.getTicks(!0), i = [], a = this.getExtent(), o = 1; o < r.length; o++) {
  54851. for (var s = r[o], l = r[o - 1], u = 0, c = [], f = s.value - l.value, d = f / n; u < n - 1; ) {
  54852. var h = ic(l.value + (u + 1) * d);
  54853. h > a[0] && h < a[1] && c.push(h), u++;
  54854. }
  54855. i.push(c);
  54856. }
  54857. return i;
  54858. }, e.prototype.getLabel = function(n, r) {
  54859. if (n == null)
  54860. return "";
  54861. var i = r && r.precision;
  54862. i == null ? i = Ua(n.value) || 0 : i === "auto" && (i = this._intervalPrecision);
  54863. var a = ic(n.value, i, !0);
  54864. return KR(a);
  54865. }, e.prototype.calcNiceTicks = function(n, r, i) {
  54866. n = n || 5;
  54867. var a = this._extent, o = a[1] - a[0];
  54868. if (isFinite(o)) {
  54869. o < 0 && (o = -o, a.reverse());
  54870. var s = $Ne(a, n, r, i);
  54871. this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
  54872. }
  54873. }, e.prototype.calcNiceExtent = function(n) {
  54874. var r = this._extent;
  54875. if (r[0] === r[1])
  54876. if (r[0] !== 0) {
  54877. var i = Math.abs(r[0]);
  54878. n.fixMax || (r[1] += i / 2), r[0] -= i / 2;
  54879. } else
  54880. r[1] = 1;
  54881. var a = r[1] - r[0];
  54882. isFinite(a) || (r[0] = 0, r[1] = 1), this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
  54883. var o = this._interval;
  54884. n.fixMin || (r[0] = ic(Math.floor(r[0] / o) * o)), n.fixMax || (r[1] = ic(Math.ceil(r[1] / o) * o));
  54885. }, e.prototype.setNiceExtent = function(n, r) {
  54886. this._niceExtent = [n, r];
  54887. }, e.type = "interval", e;
  54888. }(cs)
  54889. );
  54890. cs.registerClass(Ys);
  54891. var Zee = typeof Float32Array < "u", ENe = Zee ? Float32Array : Array;
  54892. function Fo(t) {
  54893. return ue(t) ? Zee ? new Float32Array(t) : t : new ENe(t);
  54894. }
  54895. var rE = "__ec_stack_";
  54896. function xk(t) {
  54897. return t.get("stack") || rE + t.seriesIndex;
  54898. }
  54899. function wk(t) {
  54900. return t.dim + t.index;
  54901. }
  54902. function MNe(t) {
  54903. var e = [], n = t.axis, r = "axis0";
  54904. if (n.type === "category") {
  54905. for (var i = n.getBandWidth(), a = 0; a < t.count; a++)
  54906. e.push(Re({
  54907. bandWidth: i,
  54908. axisKey: r,
  54909. stackId: rE + a
  54910. }, t));
  54911. for (var o = Yee(e), s = [], a = 0; a < t.count; a++) {
  54912. var l = o[r][rE + a];
  54913. l.offsetCenter = l.offset + l.width / 2, s.push(l);
  54914. }
  54915. return s;
  54916. }
  54917. }
  54918. function Uee(t, e) {
  54919. var n = [];
  54920. return e.eachSeriesByType(t, function(r) {
  54921. Jee(r) && n.push(r);
  54922. }), n;
  54923. }
  54924. function INe(t) {
  54925. var e = {};
  54926. k(t, function(l) {
  54927. var u = l.coordinateSystem, c = u.getBaseAxis();
  54928. if (!(c.type !== "time" && c.type !== "value"))
  54929. for (var f = l.getData(), d = c.dim + "_" + c.index, h = f.getDimensionIndex(f.mapDimension(c.dim)), p = f.getStore(), v = 0, g = p.count(); v < g; ++v) {
  54930. var m = p.get(h, v);
  54931. e[d] ? e[d].push(m) : e[d] = [m];
  54932. }
  54933. });
  54934. var n = {};
  54935. for (var r in e)
  54936. if (e.hasOwnProperty(r)) {
  54937. var i = e[r];
  54938. if (i) {
  54939. i.sort(function(l, u) {
  54940. return l - u;
  54941. });
  54942. for (var a = null, o = 1; o < i.length; ++o) {
  54943. var s = i[o] - i[o - 1];
  54944. s > 0 && (a = a === null ? s : Math.min(a, s));
  54945. }
  54946. n[r] = a;
  54947. }
  54948. }
  54949. return n;
  54950. }
  54951. function Xee(t) {
  54952. var e = INe(t), n = [];
  54953. return k(t, function(r) {
  54954. var i = r.coordinateSystem, a = i.getBaseAxis(), o = a.getExtent(), s;
  54955. if (a.type === "category")
  54956. s = a.getBandWidth();
  54957. else if (a.type === "value" || a.type === "time") {
  54958. var l = a.dim + "_" + a.index, u = e[l], c = Math.abs(o[1] - o[0]), f = a.scale.getExtent(), d = Math.abs(f[1] - f[0]);
  54959. s = u ? c / d * u : c;
  54960. } else {
  54961. var h = r.getData();
  54962. s = Math.abs(o[1] - o[0]) / h.count();
  54963. }
  54964. var p = _e(r.get("barWidth"), s), v = _e(r.get("barMaxWidth"), s), g = _e(
  54965. // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,
  54966. // the auto-calculated bar width might be less than 0.5 / 1.
  54967. r.get("barMinWidth") || (ete(r) ? 0.5 : 1),
  54968. s
  54969. ), m = r.get("barGap"), y = r.get("barCategoryGap");
  54970. n.push({
  54971. bandWidth: s,
  54972. barWidth: p,
  54973. barMaxWidth: v,
  54974. barMinWidth: g,
  54975. barGap: m,
  54976. barCategoryGap: y,
  54977. axisKey: wk(a),
  54978. stackId: xk(r)
  54979. });
  54980. }), Yee(n);
  54981. }
  54982. function Yee(t) {
  54983. var e = {};
  54984. k(t, function(r, i) {
  54985. var a = r.axisKey, o = r.bandWidth, s = e[a] || {
  54986. bandWidth: o,
  54987. remainedWidth: o,
  54988. autoWidthCount: 0,
  54989. categoryGap: null,
  54990. gap: "20%",
  54991. stacks: {}
  54992. }, l = s.stacks;
  54993. e[a] = s;
  54994. var u = r.stackId;
  54995. l[u] || s.autoWidthCount++, l[u] = l[u] || {
  54996. width: 0,
  54997. maxWidth: 0
  54998. };
  54999. var c = r.barWidth;
  55000. c && !l[u].width && (l[u].width = c, c = Math.min(s.remainedWidth, c), s.remainedWidth -= c);
  55001. var f = r.barMaxWidth;
  55002. f && (l[u].maxWidth = f);
  55003. var d = r.barMinWidth;
  55004. d && (l[u].minWidth = d);
  55005. var h = r.barGap;
  55006. h != null && (s.gap = h);
  55007. var p = r.barCategoryGap;
  55008. p != null && (s.categoryGap = p);
  55009. });
  55010. var n = {};
  55011. return k(e, function(r, i) {
  55012. n[i] = {};
  55013. var a = r.stacks, o = r.bandWidth, s = r.categoryGap;
  55014. if (s == null) {
  55015. var l = st(a).length;
  55016. s = Math.max(35 - l * 4, 15) + "%";
  55017. }
  55018. var u = _e(s, o), c = _e(r.gap, 1), f = r.remainedWidth, d = r.autoWidthCount, h = (f - u) / (d + (d - 1) * c);
  55019. h = Math.max(h, 0), k(a, function(m) {
  55020. var y = m.maxWidth, b = m.minWidth;
  55021. if (m.width) {
  55022. var _ = m.width;
  55023. y && (_ = Math.min(_, y)), b && (_ = Math.max(_, b)), m.width = _, f -= _ + c * _, d--;
  55024. } else {
  55025. var _ = h;
  55026. y && y < _ && (_ = Math.min(y, f)), b && b > _ && (_ = b), _ !== h && (m.width = _, f -= _ + c * _, d--);
  55027. }
  55028. }), h = (f - u) / (d + (d - 1) * c), h = Math.max(h, 0);
  55029. var p = 0, v;
  55030. k(a, function(m, y) {
  55031. m.width || (m.width = h), v = m, p += m.width * (1 + c);
  55032. }), v && (p -= v.width * c);
  55033. var g = -p / 2;
  55034. k(a, function(m, y) {
  55035. n[i][y] = n[i][y] || {
  55036. bandWidth: o,
  55037. offset: g,
  55038. width: m.width
  55039. }, g += m.width * (1 + c);
  55040. });
  55041. }), n;
  55042. }
  55043. function DNe(t, e, n) {
  55044. if (t && e) {
  55045. var r = t[wk(e)];
  55046. return r != null && n != null ? r[xk(n)] : r;
  55047. }
  55048. }
  55049. function qee(t, e) {
  55050. var n = Uee(t, e), r = Xee(n);
  55051. k(n, function(i) {
  55052. var a = i.getData(), o = i.coordinateSystem, s = o.getBaseAxis(), l = xk(i), u = r[wk(s)][l], c = u.offset, f = u.width;
  55053. a.setLayout({
  55054. bandWidth: u.bandWidth,
  55055. offset: c,
  55056. size: f
  55057. });
  55058. });
  55059. }
  55060. function Kee(t) {
  55061. return {
  55062. seriesType: t,
  55063. plan: Op(),
  55064. reset: function(e) {
  55065. if (Jee(e)) {
  55066. var n = e.getData(), r = e.coordinateSystem, i = r.getBaseAxis(), a = r.getOtherAxis(i), o = n.getDimensionIndex(n.mapDimension(a.dim)), s = n.getDimensionIndex(n.mapDimension(i.dim)), l = e.get("showBackground", !0), u = n.mapDimension(a.dim), c = n.getCalculationInfo("stackResultDimension"), f = Xs(n, u) && !!n.getCalculationInfo("stackedOnSeries"), d = a.isHorizontal(), h = RNe(i, a), p = ete(e), v = e.get("barMinHeight") || 0, g = c && n.getDimensionIndex(c), m = n.getLayout("size"), y = n.getLayout("offset");
  55067. return {
  55068. progress: function(b, _) {
  55069. for (var O = b.count, S = p && Fo(O * 3), x = p && l && Fo(O * 3), C = p && Fo(O), T = r.master.getRect(), w = d ? T.width : T.height, P, $ = _.getStore(), A = 0; (P = b.next()) != null; ) {
  55070. var D = $.get(f ? g : o, P), E = $.get(s, P), R = h, N = void 0;
  55071. f && (N = +D - $.get(o, P));
  55072. var V = void 0, z = void 0, W = void 0, F = void 0;
  55073. if (d) {
  55074. var Q = r.dataToPoint([D, E]);
  55075. if (f) {
  55076. var Z = r.dataToPoint([N, E]);
  55077. R = Z[0];
  55078. }
  55079. V = R, z = Q[1] + y, W = Q[0] - R, F = m, Math.abs(W) < v && (W = (W < 0 ? -1 : 1) * v);
  55080. } else {
  55081. var Q = r.dataToPoint([E, D]);
  55082. if (f) {
  55083. var Z = r.dataToPoint([E, N]);
  55084. R = Z[1];
  55085. }
  55086. V = Q[0] + y, z = R, W = m, F = Q[1] - R, Math.abs(F) < v && (F = (F <= 0 ? -1 : 1) * v);
  55087. }
  55088. p ? (S[A] = V, S[A + 1] = z, S[A + 2] = d ? W : F, x && (x[A] = d ? T.x : V, x[A + 1] = d ? z : T.y, x[A + 2] = w), C[P] = P) : _.setItemLayout(P, {
  55089. x: V,
  55090. y: z,
  55091. width: W,
  55092. height: F
  55093. }), A += 3;
  55094. }
  55095. p && _.setLayout({
  55096. largePoints: S,
  55097. largeDataIndices: C,
  55098. largeBackgroundPoints: x,
  55099. valueAxisHorizontal: d
  55100. });
  55101. }
  55102. };
  55103. }
  55104. }
  55105. };
  55106. }
  55107. function Jee(t) {
  55108. return t.coordinateSystem && t.coordinateSystem.type === "cartesian2d";
  55109. }
  55110. function ete(t) {
  55111. return t.pipelineContext && t.pipelineContext.large;
  55112. }
  55113. function RNe(t, e) {
  55114. var n = e.model.get("startValue");
  55115. return n || (n = 0), e.toGlobalCoord(e.dataToCoord(e.type === "log" ? n > 0 ? n : 1 : n));
  55116. }
  55117. var kNe = function(t, e, n, r) {
  55118. for (; n < r; ) {
  55119. var i = n + r >>> 1;
  55120. t[i][1] < e ? n = i + 1 : r = i;
  55121. }
  55122. return n;
  55123. }, Ck = (
  55124. /** @class */
  55125. function(t) {
  55126. q(e, t);
  55127. function e(n) {
  55128. var r = t.call(this, n) || this;
  55129. return r.type = "time", r;
  55130. }
  55131. return e.prototype.getLabel = function(n) {
  55132. var r = this.getSetting("useUTC");
  55133. return Q0(n.value, UB[uLe(rh(this._minLevelUnit))] || UB.second, r, this.getSetting("locale"));
  55134. }, e.prototype.getFormattedLabel = function(n, r, i) {
  55135. var a = this.getSetting("useUTC"), o = this.getSetting("locale");
  55136. return cLe(n, r, i, o, a);
  55137. }, e.prototype.getTicks = function() {
  55138. var n = this._interval, r = this._extent, i = [];
  55139. if (!n)
  55140. return i;
  55141. i.push({
  55142. value: r[0],
  55143. level: 0
  55144. });
  55145. var a = this.getSetting("useUTC"), o = WNe(this._minLevelUnit, this._approxInterval, a, r);
  55146. return i = i.concat(o), i.push({
  55147. value: r[1],
  55148. level: 0
  55149. }), i;
  55150. }, e.prototype.calcNiceExtent = function(n) {
  55151. var r = this._extent;
  55152. if (r[0] === r[1] && (r[0] -= va, r[1] += va), r[1] === -1 / 0 && r[0] === 1 / 0) {
  55153. var i = /* @__PURE__ */ new Date();
  55154. r[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), r[0] = r[1] - va;
  55155. }
  55156. this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
  55157. }, e.prototype.calcNiceTicks = function(n, r, i) {
  55158. n = n || 10;
  55159. var a = this._extent, o = a[1] - a[0];
  55160. this._approxInterval = o / n, r != null && this._approxInterval < r && (this._approxInterval = r), i != null && this._approxInterval > i && (this._approxInterval = i);
  55161. var s = hb.length, l = Math.min(kNe(hb, this._approxInterval, 0, s), s - 1);
  55162. this._interval = hb[l][1], this._minLevelUnit = hb[Math.max(l - 1, 0)][0];
  55163. }, e.prototype.parse = function(n) {
  55164. return St(n) ? n : +Yi(n);
  55165. }, e.prototype.contain = function(n) {
  55166. return dw(this.parse(n), this._extent);
  55167. }, e.prototype.normalize = function(n) {
  55168. return hw(this.parse(n), this._extent);
  55169. }, e.prototype.scale = function(n) {
  55170. return pw(n, this._extent);
  55171. }, e.type = "time", e;
  55172. }(Ys)
  55173. ), hb = [
  55174. // Format interval
  55175. ["second", XR],
  55176. ["minute", YR],
  55177. ["hour", Ig],
  55178. ["quarter-day", Ig * 6],
  55179. ["half-day", Ig * 12],
  55180. ["day", va * 1.2],
  55181. ["half-week", va * 3.5],
  55182. ["week", va * 7],
  55183. ["month", va * 31],
  55184. ["quarter", va * 95],
  55185. ["half-year", ZB / 2],
  55186. ["year", ZB]
  55187. // 1Y
  55188. ];
  55189. function LNe(t, e, n, r) {
  55190. var i = Yi(e), a = Yi(n), o = function(p) {
  55191. return XB(i, p, r) === XB(a, p, r);
  55192. }, s = function() {
  55193. return o("year");
  55194. }, l = function() {
  55195. return s() && o("month");
  55196. }, u = function() {
  55197. return l() && o("day");
  55198. }, c = function() {
  55199. return u() && o("hour");
  55200. }, f = function() {
  55201. return c() && o("minute");
  55202. }, d = function() {
  55203. return f() && o("second");
  55204. }, h = function() {
  55205. return d() && o("millisecond");
  55206. };
  55207. switch (t) {
  55208. case "year":
  55209. return s();
  55210. case "month":
  55211. return l();
  55212. case "day":
  55213. return u();
  55214. case "hour":
  55215. return c();
  55216. case "minute":
  55217. return f();
  55218. case "second":
  55219. return d();
  55220. case "millisecond":
  55221. return h();
  55222. }
  55223. }
  55224. function NNe(t, e) {
  55225. return t /= va, t > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1;
  55226. }
  55227. function BNe(t) {
  55228. var e = 30 * va;
  55229. return t /= e, t > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1;
  55230. }
  55231. function zNe(t) {
  55232. return t /= Ig, t > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1;
  55233. }
  55234. function iV(t, e) {
  55235. return t /= e ? YR : XR, t > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1;
  55236. }
  55237. function VNe(t) {
  55238. return $R(t, !0);
  55239. }
  55240. function FNe(t, e, n) {
  55241. var r = new Date(t);
  55242. switch (rh(e)) {
  55243. case "year":
  55244. case "month":
  55245. r[bJ(n)](0);
  55246. case "day":
  55247. r[_J(n)](1);
  55248. case "hour":
  55249. r[OJ(n)](0);
  55250. case "minute":
  55251. r[SJ(n)](0);
  55252. case "second":
  55253. r[xJ(n)](0), r[wJ(n)](0);
  55254. }
  55255. return r.getTime();
  55256. }
  55257. function WNe(t, e, n, r) {
  55258. var i = 1e4, a = mJ, o = 0;
  55259. function s(w, P, $, A, D, E, R) {
  55260. for (var N = new Date(P), V = P, z = N[A](); V < $ && V <= r[1]; )
  55261. R.push({
  55262. value: V
  55263. }), z += w, N[D](z), V = N.getTime();
  55264. R.push({
  55265. value: V,
  55266. notAdd: !0
  55267. });
  55268. }
  55269. function l(w, P, $) {
  55270. var A = [], D = !P.length;
  55271. if (!LNe(rh(w), r[0], r[1], n)) {
  55272. D && (P = [{
  55273. // TODO Optimize. Not include so may ticks.
  55274. value: FNe(new Date(r[0]), w, n)
  55275. }, {
  55276. value: r[1]
  55277. }]);
  55278. for (var E = 0; E < P.length - 1; E++) {
  55279. var R = P[E].value, N = P[E + 1].value;
  55280. if (R !== N) {
  55281. var V = void 0, z = void 0, W = void 0, F = !1;
  55282. switch (w) {
  55283. case "year":
  55284. V = Math.max(1, Math.round(e / va / 365)), z = qR(n), W = fLe(n);
  55285. break;
  55286. case "half-year":
  55287. case "quarter":
  55288. case "month":
  55289. V = BNe(e), z = ih(n), W = bJ(n);
  55290. break;
  55291. case "week":
  55292. case "half-week":
  55293. case "day":
  55294. V = NNe(e), z = tw(n), W = _J(n), F = !0;
  55295. break;
  55296. case "half-day":
  55297. case "quarter-day":
  55298. case "hour":
  55299. V = zNe(e), z = Cm(n), W = OJ(n);
  55300. break;
  55301. case "minute":
  55302. V = iV(e, !0), z = nw(n), W = SJ(n);
  55303. break;
  55304. case "second":
  55305. V = iV(e, !1), z = rw(n), W = xJ(n);
  55306. break;
  55307. case "millisecond":
  55308. V = VNe(e), z = iw(n), W = wJ(n);
  55309. break;
  55310. }
  55311. s(V, R, N, z, W, F, A), w === "year" && $.length > 1 && E === 0 && $.unshift({
  55312. value: $[0].value - V
  55313. });
  55314. }
  55315. }
  55316. for (var E = 0; E < A.length; E++)
  55317. $.push(A[E]);
  55318. return A;
  55319. }
  55320. }
  55321. for (var u = [], c = [], f = 0, d = 0, h = 0; h < a.length && o++ < i; ++h) {
  55322. var p = rh(a[h]);
  55323. if (lLe(a[h])) {
  55324. l(a[h], u[u.length - 1] || [], c);
  55325. var v = a[h + 1] ? rh(a[h + 1]) : null;
  55326. if (p !== v) {
  55327. if (c.length) {
  55328. d = f, c.sort(function(w, P) {
  55329. return w.value - P.value;
  55330. });
  55331. for (var g = [], m = 0; m < c.length; ++m) {
  55332. var y = c[m].value;
  55333. (m === 0 || c[m - 1].value !== y) && (g.push(c[m]), y >= r[0] && y <= r[1] && f++);
  55334. }
  55335. var b = (r[1] - r[0]) / e;
  55336. if (f > b * 1.5 && d > b / 1.5 || (u.push(g), f > b || t === a[h]))
  55337. break;
  55338. }
  55339. c = [];
  55340. }
  55341. }
  55342. }
  55343. process.env.NODE_ENV !== "production" && o >= i && dn("Exceed safe limit.");
  55344. for (var _ = Nt(ce(u, function(w) {
  55345. return Nt(w, function(P) {
  55346. return P.value >= r[0] && P.value <= r[1] && !P.notAdd;
  55347. });
  55348. }), function(w) {
  55349. return w.length > 0;
  55350. }), O = [], S = _.length - 1, h = 0; h < _.length; ++h)
  55351. for (var x = _[h], C = 0; C < x.length; ++C)
  55352. O.push({
  55353. value: x[C].value,
  55354. level: S - h
  55355. });
  55356. O.sort(function(w, P) {
  55357. return w.value - P.value;
  55358. });
  55359. for (var T = [], h = 0; h < O.length; ++h)
  55360. (h === 0 || O[h].value !== O[h - 1].value) && T.push(O[h]);
  55361. return T;
  55362. }
  55363. cs.registerClass(Ck);
  55364. var aV = cs.prototype, kg = Ys.prototype, QNe = mn, HNe = Math.floor, GNe = Math.ceil, pb = Math.pow, Wa = Math.log, Tk = (
  55365. /** @class */
  55366. function(t) {
  55367. q(e, t);
  55368. function e() {
  55369. var n = t !== null && t.apply(this, arguments) || this;
  55370. return n.type = "log", n.base = 10, n._originalScale = new Ys(), n._interval = 0, n;
  55371. }
  55372. return e.prototype.getTicks = function(n) {
  55373. var r = this._originalScale, i = this._extent, a = r.getExtent(), o = kg.getTicks.call(this, n);
  55374. return ce(o, function(s) {
  55375. var l = s.value, u = mn(pb(this.base, l));
  55376. return u = l === i[0] && this._fixMin ? vb(u, a[0]) : u, u = l === i[1] && this._fixMax ? vb(u, a[1]) : u, {
  55377. value: u
  55378. };
  55379. }, this);
  55380. }, e.prototype.setExtent = function(n, r) {
  55381. var i = Wa(this.base);
  55382. n = Wa(Math.max(0, n)) / i, r = Wa(Math.max(0, r)) / i, kg.setExtent.call(this, n, r);
  55383. }, e.prototype.getExtent = function() {
  55384. var n = this.base, r = aV.getExtent.call(this);
  55385. r[0] = pb(n, r[0]), r[1] = pb(n, r[1]);
  55386. var i = this._originalScale, a = i.getExtent();
  55387. return this._fixMin && (r[0] = vb(r[0], a[0])), this._fixMax && (r[1] = vb(r[1], a[1])), r;
  55388. }, e.prototype.unionExtent = function(n) {
  55389. this._originalScale.unionExtent(n);
  55390. var r = this.base;
  55391. n[0] = Wa(n[0]) / Wa(r), n[1] = Wa(n[1]) / Wa(r), aV.unionExtent.call(this, n);
  55392. }, e.prototype.unionExtentFromData = function(n, r) {
  55393. this.unionExtent(n.getApproximateExtent(r));
  55394. }, e.prototype.calcNiceTicks = function(n) {
  55395. n = n || 10;
  55396. var r = this._extent, i = r[1] - r[0];
  55397. if (!(i === 1 / 0 || i <= 0)) {
  55398. var a = lK(i), o = n / i * a;
  55399. for (o <= 0.5 && (a *= 10); !isNaN(a) && Math.abs(a) < 1 && Math.abs(a) > 0; )
  55400. a *= 10;
  55401. var s = [mn(GNe(r[0] / a) * a), mn(HNe(r[1] / a) * a)];
  55402. this._interval = a, this._niceExtent = s;
  55403. }
  55404. }, e.prototype.calcNiceExtent = function(n) {
  55405. kg.calcNiceExtent.call(this, n), this._fixMin = n.fixMin, this._fixMax = n.fixMax;
  55406. }, e.prototype.parse = function(n) {
  55407. return n;
  55408. }, e.prototype.contain = function(n) {
  55409. return n = Wa(n) / Wa(this.base), dw(n, this._extent);
  55410. }, e.prototype.normalize = function(n) {
  55411. return n = Wa(n) / Wa(this.base), hw(n, this._extent);
  55412. }, e.prototype.scale = function(n) {
  55413. return n = pw(n, this._extent), pb(this.base, n);
  55414. }, e.type = "log", e;
  55415. }(cs)
  55416. ), tte = Tk.prototype;
  55417. tte.getMinorTicks = kg.getMinorTicks;
  55418. tte.getLabel = kg.getLabel;
  55419. function vb(t, e) {
  55420. return QNe(t, Ua(e));
  55421. }
  55422. cs.registerClass(Tk);
  55423. var jNe = (
  55424. /** @class */
  55425. function() {
  55426. function t(e, n, r) {
  55427. this._prepareParams(e, n, r);
  55428. }
  55429. return t.prototype._prepareParams = function(e, n, r) {
  55430. r[1] < r[0] && (r = [NaN, NaN]), this._dataMin = r[0], this._dataMax = r[1];
  55431. var i = this._isOrdinal = e.type === "ordinal";
  55432. this._needCrossZero = e.type === "interval" && n.getNeedCrossZero && n.getNeedCrossZero();
  55433. var a = n.get("min", !0);
  55434. a == null && (a = n.get("startValue", !0));
  55435. var o = this._modelMinRaw = a;
  55436. Me(o) ? this._modelMinNum = gb(e, o({
  55437. min: r[0],
  55438. max: r[1]
  55439. })) : o !== "dataMin" && (this._modelMinNum = gb(e, o));
  55440. var s = this._modelMaxRaw = n.get("max", !0);
  55441. if (Me(s) ? this._modelMaxNum = gb(e, s({
  55442. min: r[0],
  55443. max: r[1]
  55444. })) : s !== "dataMax" && (this._modelMaxNum = gb(e, s)), i)
  55445. this._axisDataLen = n.getCategories().length;
  55446. else {
  55447. var l = n.get("boundaryGap"), u = ue(l) ? l : [l || 0, l || 0];
  55448. typeof u[0] == "boolean" || typeof u[1] == "boolean" ? (process.env.NODE_ENV !== "production" && console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'), this._boundaryGapInner = [0, 0]) : this._boundaryGapInner = [oo(u[0], 1), oo(u[1], 1)];
  55449. }
  55450. }, t.prototype.calculate = function() {
  55451. var e = this._isOrdinal, n = this._dataMin, r = this._dataMax, i = this._axisDataLen, a = this._boundaryGapInner, o = e ? null : r - n || Math.abs(n), s = this._modelMinRaw === "dataMin" ? n : this._modelMinNum, l = this._modelMaxRaw === "dataMax" ? r : this._modelMaxNum, u = s != null, c = l != null;
  55452. s == null && (s = e ? i ? 0 : NaN : n - a[0] * o), l == null && (l = e ? i ? i - 1 : NaN : r + a[1] * o), (s == null || !isFinite(s)) && (s = NaN), (l == null || !isFinite(l)) && (l = NaN);
  55453. var f = ou(s) || ou(l) || e && !i;
  55454. this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !c && (l = 0));
  55455. var d = this._determinedMin, h = this._determinedMax;
  55456. return d != null && (s = d, u = !0), h != null && (l = h, c = !0), {
  55457. min: s,
  55458. max: l,
  55459. minFixed: u,
  55460. maxFixed: c,
  55461. isBlank: f
  55462. };
  55463. }, t.prototype.modifyDataMinMax = function(e, n) {
  55464. process.env.NODE_ENV !== "production" && ke(!this.frozen), this[UNe[e]] = n;
  55465. }, t.prototype.setDeterminedMinMax = function(e, n) {
  55466. var r = ZNe[e];
  55467. process.env.NODE_ENV !== "production" && ke(!this.frozen && this[r] == null), this[r] = n;
  55468. }, t.prototype.freeze = function() {
  55469. this.frozen = !0;
  55470. }, t;
  55471. }()
  55472. ), ZNe = {
  55473. min: "_determinedMin",
  55474. max: "_determinedMax"
  55475. }, UNe = {
  55476. min: "_dataMin",
  55477. max: "_dataMax"
  55478. };
  55479. function nte(t, e, n) {
  55480. var r = t.rawExtentInfo;
  55481. return r || (r = new jNe(t, e, n), t.rawExtentInfo = r, r);
  55482. }
  55483. function gb(t, e) {
  55484. return e == null ? null : ou(e) ? NaN : t.parse(e);
  55485. }
  55486. function rte(t, e) {
  55487. var n = t.type, r = nte(t, e, t.getExtent()).calculate();
  55488. t.setBlank(r.isBlank);
  55489. var i = r.min, a = r.max, o = e.ecModel;
  55490. if (o && n === "time") {
  55491. var s = Uee("bar", o), l = !1;
  55492. if (k(s, function(f) {
  55493. l = l || f.getBaseAxis() === e.axis;
  55494. }), l) {
  55495. var u = Xee(s), c = XNe(i, a, e, u);
  55496. i = c.min, a = c.max;
  55497. }
  55498. }
  55499. return {
  55500. extent: [i, a],
  55501. // "fix" means "fixed", the value should not be
  55502. // changed in the subsequent steps.
  55503. fixMin: r.minFixed,
  55504. fixMax: r.maxFixed
  55505. };
  55506. }
  55507. function XNe(t, e, n, r) {
  55508. var i = n.axis.getExtent(), a = i[1] - i[0], o = DNe(r, n.axis);
  55509. if (o === void 0)
  55510. return {
  55511. min: t,
  55512. max: e
  55513. };
  55514. var s = 1 / 0;
  55515. k(o, function(h) {
  55516. s = Math.min(h.offset, s);
  55517. });
  55518. var l = -1 / 0;
  55519. k(o, function(h) {
  55520. l = Math.max(h.offset + h.width, l);
  55521. }), s = Math.abs(s), l = Math.abs(l);
  55522. var u = s + l, c = e - t, f = 1 - (s + l) / a, d = c / f - c;
  55523. return e += d * (l / u), t -= d * (s / u), {
  55524. min: t,
  55525. max: e
  55526. };
  55527. }
  55528. function Of(t, e) {
  55529. var n = e, r = rte(t, n), i = r.extent, a = n.get("splitNumber");
  55530. t instanceof Tk && (t.base = n.get("logBase"));
  55531. var o = t.type, s = n.get("interval"), l = o === "interval" || o === "time";
  55532. t.setExtent(i[0], i[1]), t.calcNiceExtent({
  55533. splitNumber: a,
  55534. fixMin: r.fixMin,
  55535. fixMax: r.fixMax,
  55536. minInterval: l ? n.get("minInterval") : null,
  55537. maxInterval: l ? n.get("maxInterval") : null
  55538. }), s != null && t.setInterval && t.setInterval(s);
  55539. }
  55540. function G0(t, e) {
  55541. if (e = e || t.get("type"), e)
  55542. switch (e) {
  55543. case "category":
  55544. return new vw({
  55545. ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
  55546. extent: [1 / 0, -1 / 0]
  55547. });
  55548. case "time":
  55549. return new Ck({
  55550. locale: t.ecModel.getLocaleModel(),
  55551. useUTC: t.ecModel.get("useUTC")
  55552. });
  55553. default:
  55554. return new (cs.getClass(e) || Ys)();
  55555. }
  55556. }
  55557. function YNe(t) {
  55558. var e = t.scale.getExtent(), n = e[0], r = e[1];
  55559. return !(n > 0 && r > 0 || n < 0 && r < 0);
  55560. }
  55561. function Cp(t) {
  55562. var e = t.getLabelModel().get("formatter"), n = t.type === "category" ? t.scale.getExtent()[0] : null;
  55563. return t.scale.type === "time" ? /* @__PURE__ */ function(r) {
  55564. return function(i, a) {
  55565. return t.scale.getFormattedLabel(i, a, r);
  55566. };
  55567. }(e) : Oe(e) ? /* @__PURE__ */ function(r) {
  55568. return function(i) {
  55569. var a = t.scale.getLabel(i), o = r.replace("{value}", a ?? "");
  55570. return o;
  55571. };
  55572. }(e) : Me(e) ? /* @__PURE__ */ function(r) {
  55573. return function(i, a) {
  55574. return n != null && (a = i.value - n), r(Pk(t, i), a, i.level != null ? {
  55575. level: i.level
  55576. } : null);
  55577. };
  55578. }(e) : function(r) {
  55579. return t.scale.getLabel(r);
  55580. };
  55581. }
  55582. function Pk(t, e) {
  55583. return t.type === "category" ? t.scale.getLabel(e) : e.value;
  55584. }
  55585. function qNe(t) {
  55586. var e = t.model, n = t.scale;
  55587. if (!(!e.get(["axisLabel", "show"]) || n.isBlank())) {
  55588. var r, i, a = n.getExtent();
  55589. n instanceof vw ? i = n.count() : (r = n.getTicks(), i = r.length);
  55590. var o = t.getLabelModel(), s = Cp(t), l, u = 1;
  55591. i > 40 && (u = Math.ceil(i / 40));
  55592. for (var c = 0; c < i; c += u) {
  55593. var f = r ? r[c] : {
  55594. value: a[0] + c
  55595. }, d = s(f, c), h = o.getTextRect(d), p = KNe(h, o.get("rotate") || 0);
  55596. l ? l.union(p) : l = p;
  55597. }
  55598. return l;
  55599. }
  55600. }
  55601. function KNe(t, e) {
  55602. var n = e * Math.PI / 180, r = t.width, i = t.height, a = r * Math.abs(Math.cos(n)) + Math.abs(i * Math.sin(n)), o = r * Math.abs(Math.sin(n)) + Math.abs(i * Math.cos(n)), s = new Je(t.x, t.y, a, o);
  55603. return s;
  55604. }
  55605. function $k(t) {
  55606. var e = t.get("interval");
  55607. return e ?? "auto";
  55608. }
  55609. function ite(t) {
  55610. return t.type === "category" && $k(t.getLabelModel()) === 0;
  55611. }
  55612. function CO(t, e) {
  55613. var n = {};
  55614. return k(t.mapDimensionsAll(e), function(r) {
  55615. n[Sk(t, r)] = !0;
  55616. }), st(n);
  55617. }
  55618. function JNe(t, e, n) {
  55619. e && k(CO(e, n), function(r) {
  55620. var i = e.getApproximateExtent(r);
  55621. i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1]);
  55622. });
  55623. }
  55624. var Tp = (
  55625. /** @class */
  55626. function() {
  55627. function t() {
  55628. }
  55629. return t.prototype.getNeedCrossZero = function() {
  55630. var e = this.option;
  55631. return !e.scale;
  55632. }, t.prototype.getCoordSysModel = function() {
  55633. }, t;
  55634. }()
  55635. );
  55636. function e5e(t) {
  55637. return us(null, t);
  55638. }
  55639. var t5e = {
  55640. isDimensionStacked: Xs,
  55641. enableDataStack: Gee,
  55642. getStackedDimension: Sk
  55643. };
  55644. function n5e(t, e) {
  55645. var n = e;
  55646. e instanceof Wt || (n = new Wt(e));
  55647. var r = G0(n);
  55648. return r.setExtent(t[0], t[1]), Of(r, n), r;
  55649. }
  55650. function r5e(t) {
  55651. xn(t, Tp);
  55652. }
  55653. function i5e(t, e) {
  55654. return e = e || {}, Zt(t, null, null, e.state !== "normal");
  55655. }
  55656. const a5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55657. __proto__: null,
  55658. createDimensions: hNe,
  55659. createList: e5e,
  55660. createScale: n5e,
  55661. createSymbol: $n,
  55662. createTextStyle: i5e,
  55663. dataStack: t5e,
  55664. enableHoverEmphasis: Yl,
  55665. getECData: Fe,
  55666. getLayoutRect: Rn,
  55667. mixinAxisModelCommonMethods: r5e
  55668. }, Symbol.toStringTag, { value: "Module" }));
  55669. var o5e = 1e-8;
  55670. function oV(t, e) {
  55671. return Math.abs(t - e) < o5e;
  55672. }
  55673. function Sc(t, e, n) {
  55674. var r = 0, i = t[0];
  55675. if (!i)
  55676. return !1;
  55677. for (var a = 1; a < t.length; a++) {
  55678. var o = t[a];
  55679. r += Os(i[0], i[1], o[0], o[1], e, n), i = o;
  55680. }
  55681. var s = t[0];
  55682. return (!oV(i[0], s[0]) || !oV(i[1], s[1])) && (r += Os(i[0], i[1], s[0], s[1], e, n)), r !== 0;
  55683. }
  55684. var s5e = [];
  55685. function jT(t, e) {
  55686. for (var n = 0; n < t.length; n++)
  55687. ar(t[n], t[n], e);
  55688. }
  55689. function sV(t, e, n, r) {
  55690. for (var i = 0; i < t.length; i++) {
  55691. var a = t[i];
  55692. r && (a = r.project(a)), a && isFinite(a[0]) && isFinite(a[1]) && (Ps(e, e, a), $s(n, n, a));
  55693. }
  55694. }
  55695. function l5e(t) {
  55696. for (var e = 0, n = 0, r = 0, i = t.length, a = t[i - 1][0], o = t[i - 1][1], s = 0; s < i; s++) {
  55697. var l = t[s][0], u = t[s][1], c = a * u - l * o;
  55698. e += c, n += (a + l) * c, r += (o + u) * c, a = l, o = u;
  55699. }
  55700. return e ? [n / e / 3, r / e / 3, e] : [t[0][0] || 0, t[0][1] || 0];
  55701. }
  55702. var ate = (
  55703. /** @class */
  55704. function() {
  55705. function t(e) {
  55706. this.name = e;
  55707. }
  55708. return t.prototype.setCenter = function(e) {
  55709. this._center = e;
  55710. }, t.prototype.getCenter = function() {
  55711. var e = this._center;
  55712. return e || (e = this._center = this.calcCenter()), e;
  55713. }, t;
  55714. }()
  55715. ), lV = (
  55716. /** @class */
  55717. /* @__PURE__ */ function() {
  55718. function t(e, n) {
  55719. this.type = "polygon", this.exterior = e, this.interiors = n;
  55720. }
  55721. return t;
  55722. }()
  55723. ), uV = (
  55724. /** @class */
  55725. /* @__PURE__ */ function() {
  55726. function t(e) {
  55727. this.type = "linestring", this.points = e;
  55728. }
  55729. return t;
  55730. }()
  55731. ), ote = (
  55732. /** @class */
  55733. function(t) {
  55734. q(e, t);
  55735. function e(n, r, i) {
  55736. var a = t.call(this, n) || this;
  55737. return a.type = "geoJSON", a.geometries = r, a._center = i && [i[0], i[1]], a;
  55738. }
  55739. return e.prototype.calcCenter = function() {
  55740. for (var n = this.geometries, r, i = 0, a = 0; a < n.length; a++) {
  55741. var o = n[a], s = o.exterior, l = s && s.length;
  55742. l > i && (r = o, i = l);
  55743. }
  55744. if (r)
  55745. return l5e(r.exterior);
  55746. var u = this.getBoundingRect();
  55747. return [u.x + u.width / 2, u.y + u.height / 2];
  55748. }, e.prototype.getBoundingRect = function(n) {
  55749. var r = this._rect;
  55750. if (r && !n)
  55751. return r;
  55752. var i = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0], o = this.geometries;
  55753. return k(o, function(s) {
  55754. s.type === "polygon" ? sV(s.exterior, i, a, n) : k(s.points, function(l) {
  55755. sV(l, i, a, n);
  55756. });
  55757. }), isFinite(i[0]) && isFinite(i[1]) && isFinite(a[0]) && isFinite(a[1]) || (i[0] = i[1] = a[0] = a[1] = 0), r = new Je(i[0], i[1], a[0] - i[0], a[1] - i[1]), n || (this._rect = r), r;
  55758. }, e.prototype.contain = function(n) {
  55759. var r = this.getBoundingRect(), i = this.geometries;
  55760. if (!r.contain(n[0], n[1]))
  55761. return !1;
  55762. e: for (var a = 0, o = i.length; a < o; a++) {
  55763. var s = i[a];
  55764. if (s.type === "polygon") {
  55765. var l = s.exterior, u = s.interiors;
  55766. if (Sc(l, n[0], n[1])) {
  55767. for (var c = 0; c < (u ? u.length : 0); c++)
  55768. if (Sc(u[c], n[0], n[1]))
  55769. continue e;
  55770. return !0;
  55771. }
  55772. }
  55773. }
  55774. return !1;
  55775. }, e.prototype.transformTo = function(n, r, i, a) {
  55776. var o = this.getBoundingRect(), s = o.width / o.height;
  55777. i ? a || (a = i / s) : i = s * a;
  55778. for (var l = new Je(n, r, i, a), u = o.calculateTransform(l), c = this.geometries, f = 0; f < c.length; f++) {
  55779. var d = c[f];
  55780. d.type === "polygon" ? (jT(d.exterior, u), k(d.interiors, function(h) {
  55781. jT(h, u);
  55782. })) : k(d.points, function(h) {
  55783. jT(h, u);
  55784. });
  55785. }
  55786. o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
  55787. }, e.prototype.cloneShallow = function(n) {
  55788. n == null && (n = this.name);
  55789. var r = new e(n, this.geometries, this._center);
  55790. return r._rect = this._rect, r.transformTo = null, r;
  55791. }, e;
  55792. }(ate)
  55793. ), u5e = (
  55794. /** @class */
  55795. function(t) {
  55796. q(e, t);
  55797. function e(n, r) {
  55798. var i = t.call(this, n) || this;
  55799. return i.type = "geoSVG", i._elOnlyForCalculate = r, i;
  55800. }
  55801. return e.prototype.calcCenter = function() {
  55802. for (var n = this._elOnlyForCalculate, r = n.getBoundingRect(), i = [r.x + r.width / 2, r.y + r.height / 2], a = D0(s5e), o = n; o && !o.isGeoSVGGraphicRoot; )
  55803. Uo(a, o.getLocalTransform(), a), o = o.parent;
  55804. return kf(a, a), ar(i, i, a), i;
  55805. }, e;
  55806. }(ate)
  55807. );
  55808. function c5e(t) {
  55809. if (!t.UTF8Encoding)
  55810. return t;
  55811. var e = t, n = e.UTF8Scale;
  55812. n == null && (n = 1024);
  55813. var r = e.features;
  55814. return k(r, function(i) {
  55815. var a = i.geometry, o = a.encodeOffsets, s = a.coordinates;
  55816. if (o)
  55817. switch (a.type) {
  55818. case "LineString":
  55819. a.coordinates = ste(s, o, n);
  55820. break;
  55821. case "Polygon":
  55822. ZT(s, o, n);
  55823. break;
  55824. case "MultiLineString":
  55825. ZT(s, o, n);
  55826. break;
  55827. case "MultiPolygon":
  55828. k(s, function(l, u) {
  55829. return ZT(l, o[u], n);
  55830. });
  55831. }
  55832. }), e.UTF8Encoding = !1, e;
  55833. }
  55834. function ZT(t, e, n) {
  55835. for (var r = 0; r < t.length; r++)
  55836. t[r] = ste(t[r], e[r], n);
  55837. }
  55838. function ste(t, e, n) {
  55839. for (var r = [], i = e[0], a = e[1], o = 0; o < t.length; o += 2) {
  55840. var s = t.charCodeAt(o) - 64, l = t.charCodeAt(o + 1) - 64;
  55841. s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += i, l += a, i = s, a = l, r.push([s / n, l / n]);
  55842. }
  55843. return r;
  55844. }
  55845. function iE(t, e) {
  55846. return t = c5e(t), ce(Nt(t.features, function(n) {
  55847. return n.geometry && n.properties && n.geometry.coordinates.length > 0;
  55848. }), function(n) {
  55849. var r = n.properties, i = n.geometry, a = [];
  55850. switch (i.type) {
  55851. case "Polygon":
  55852. var o = i.coordinates;
  55853. a.push(new lV(o[0], o.slice(1)));
  55854. break;
  55855. case "MultiPolygon":
  55856. k(i.coordinates, function(l) {
  55857. l[0] && a.push(new lV(l[0], l.slice(1)));
  55858. });
  55859. break;
  55860. case "LineString":
  55861. a.push(new uV([i.coordinates]));
  55862. break;
  55863. case "MultiLineString":
  55864. a.push(new uV(i.coordinates));
  55865. }
  55866. var s = new ote(r[e || "name"], a, r.cp);
  55867. return s.properties = r, s;
  55868. });
  55869. }
  55870. const f5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55871. __proto__: null,
  55872. MAX_SAFE_INTEGER: CA,
  55873. asc: Vi,
  55874. getPercentWithPrecision: LDe,
  55875. getPixelPrecision: TR,
  55876. getPrecision: Ua,
  55877. getPrecisionSafe: iO,
  55878. isNumeric: Fx,
  55879. isRadianAroundZero: Lh,
  55880. linearMap: Lt,
  55881. nice: $R,
  55882. numericToNumber: is,
  55883. parseDate: Yi,
  55884. quantile: z_,
  55885. quantity: lK,
  55886. quantityExponent: L0,
  55887. reformIntervals: TA,
  55888. remRadian: PR,
  55889. round: mn
  55890. }, Symbol.toStringTag, { value: "Module" })), d5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55891. __proto__: null,
  55892. format: Q0,
  55893. parse: Yi
  55894. }, Symbol.toStringTag, { value: "Module" })), h5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55895. __proto__: null,
  55896. Arc: Yx,
  55897. BezierCurve: V0,
  55898. BoundingRect: Je,
  55899. Circle: ll,
  55900. CompoundPath: qx,
  55901. Ellipse: Xx,
  55902. Group: Ve,
  55903. Image: lr,
  55904. IncrementalDisplayable: iJ,
  55905. Line: Un,
  55906. LinearGradient: hp,
  55907. Polygon: ii,
  55908. Polyline: ai,
  55909. RadialGradient: VR,
  55910. Rect: mt,
  55911. Ring: z0,
  55912. Sector: ri,
  55913. Text: gt,
  55914. clipPointsByRect: HR,
  55915. clipRectByRect: uJ,
  55916. createIcon: vp,
  55917. extendPath: sJ,
  55918. extendShape: oJ,
  55919. getShapeClass: Kx,
  55920. getTransform: ql,
  55921. initProps: Yt,
  55922. makeImage: WR,
  55923. makePath: F0,
  55924. mergePath: Li,
  55925. registerShape: ka,
  55926. resizePath: QR,
  55927. updateProps: Ct
  55928. }, Symbol.toStringTag, { value: "Module" })), p5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55929. __proto__: null,
  55930. addCommas: KR,
  55931. capitalFirst: vLe,
  55932. encodeHTML: Gr,
  55933. formatTime: pLe,
  55934. formatTpl: ek,
  55935. getTextRect: dLe,
  55936. getTooltipMarker: CJ,
  55937. normalizeCssArray: Bf,
  55938. toCamelCase: JR,
  55939. truncateText: bK
  55940. }, Symbol.toStringTag, { value: "Module" })), v5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  55941. __proto__: null,
  55942. bind: xe,
  55943. clone: Le,
  55944. curry: Ue,
  55945. defaults: Re,
  55946. each: k,
  55947. extend: le,
  55948. filter: Nt,
  55949. indexOf: et,
  55950. inherits: mR,
  55951. isArray: ue,
  55952. isFunction: Me,
  55953. isObject: Ie,
  55954. isString: Oe,
  55955. map: ce,
  55956. merge: qe,
  55957. reduce: Aa
  55958. }, Symbol.toStringTag, { value: "Module" }));
  55959. var Mm = bt();
  55960. function lte(t, e) {
  55961. var n = ce(e, function(r) {
  55962. return t.scale.parse(r);
  55963. });
  55964. return t.type === "time" && n.length > 0 && (n.sort(), n.unshift(n[0]), n.push(n[n.length - 1])), n;
  55965. }
  55966. function g5e(t) {
  55967. var e = t.getLabelModel().get("customValues");
  55968. if (e) {
  55969. var n = Cp(t);
  55970. return {
  55971. labels: lte(t, e).map(function(r) {
  55972. var i = {
  55973. value: r
  55974. };
  55975. return {
  55976. formattedLabel: n(i),
  55977. rawLabel: t.scale.getLabel(i),
  55978. tickValue: r
  55979. };
  55980. })
  55981. };
  55982. }
  55983. return t.type === "category" ? y5e(t) : _5e(t);
  55984. }
  55985. function m5e(t, e) {
  55986. var n = t.getTickModel().get("customValues");
  55987. return n ? {
  55988. ticks: lte(t, n)
  55989. } : t.type === "category" ? b5e(t, e) : {
  55990. ticks: ce(t.scale.getTicks(), function(r) {
  55991. return r.value;
  55992. })
  55993. };
  55994. }
  55995. function y5e(t) {
  55996. var e = t.getLabelModel(), n = ute(t, e);
  55997. return !e.get("show") || t.scale.isBlank() ? {
  55998. labels: [],
  55999. labelCategoryInterval: n.labelCategoryInterval
  56000. } : n;
  56001. }
  56002. function ute(t, e) {
  56003. var n = cte(t, "labels"), r = $k(e), i = fte(n, r);
  56004. if (i)
  56005. return i;
  56006. var a, o;
  56007. return Me(r) ? a = pte(t, r) : (o = r === "auto" ? O5e(t) : r, a = hte(t, o)), dte(n, r, {
  56008. labels: a,
  56009. labelCategoryInterval: o
  56010. });
  56011. }
  56012. function b5e(t, e) {
  56013. var n = cte(t, "ticks"), r = $k(e), i = fte(n, r);
  56014. if (i)
  56015. return i;
  56016. var a, o;
  56017. if ((!e.get("show") || t.scale.isBlank()) && (a = []), Me(r))
  56018. a = pte(t, r, !0);
  56019. else if (r === "auto") {
  56020. var s = ute(t, t.getLabelModel());
  56021. o = s.labelCategoryInterval, a = ce(s.labels, function(l) {
  56022. return l.tickValue;
  56023. });
  56024. } else
  56025. o = r, a = hte(t, o, !0);
  56026. return dte(n, r, {
  56027. ticks: a,
  56028. tickCategoryInterval: o
  56029. });
  56030. }
  56031. function _5e(t) {
  56032. var e = t.scale.getTicks(), n = Cp(t);
  56033. return {
  56034. labels: ce(e, function(r, i) {
  56035. return {
  56036. level: r.level,
  56037. formattedLabel: n(r, i),
  56038. rawLabel: t.scale.getLabel(r),
  56039. tickValue: r.value
  56040. };
  56041. })
  56042. };
  56043. }
  56044. function cte(t, e) {
  56045. return Mm(t)[e] || (Mm(t)[e] = []);
  56046. }
  56047. function fte(t, e) {
  56048. for (var n = 0; n < t.length; n++)
  56049. if (t[n].key === e)
  56050. return t[n].value;
  56051. }
  56052. function dte(t, e, n) {
  56053. return t.push({
  56054. key: e,
  56055. value: n
  56056. }), n;
  56057. }
  56058. function O5e(t) {
  56059. var e = Mm(t).autoInterval;
  56060. return e ?? (Mm(t).autoInterval = t.calculateCategoryInterval());
  56061. }
  56062. function S5e(t) {
  56063. var e = x5e(t), n = Cp(t), r = (e.axisRotate - e.labelRotate) / 180 * Math.PI, i = t.scale, a = i.getExtent(), o = i.count();
  56064. if (a[1] - a[0] < 1)
  56065. return 0;
  56066. var s = 1;
  56067. o > 40 && (s = Math.max(1, Math.floor(o / 40)));
  56068. for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), c = Math.abs(u * Math.cos(r)), f = Math.abs(u * Math.sin(r)), d = 0, h = 0; l <= a[1]; l += s) {
  56069. var p = 0, v = 0, g = k0(n({
  56070. value: l
  56071. }), e.font, "center", "top");
  56072. p = g.width * 1.3, v = g.height * 1.3, d = Math.max(d, p, 7), h = Math.max(h, v, 7);
  56073. }
  56074. var m = d / c, y = h / f;
  56075. isNaN(m) && (m = 1 / 0), isNaN(y) && (y = 1 / 0);
  56076. var b = Math.max(0, Math.floor(Math.min(m, y))), _ = Mm(t.model), O = t.getExtent(), S = _.lastAutoInterval, x = _.lastTickCount;
  56077. return S != null && x != null && Math.abs(S - b) <= 1 && Math.abs(x - o) <= 1 && S > b && _.axisExtent0 === O[0] && _.axisExtent1 === O[1] ? b = S : (_.lastTickCount = o, _.lastAutoInterval = b, _.axisExtent0 = O[0], _.axisExtent1 = O[1]), b;
  56078. }
  56079. function x5e(t) {
  56080. var e = t.getLabelModel();
  56081. return {
  56082. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  56083. labelRotate: e.get("rotate") || 0,
  56084. font: e.getFont()
  56085. };
  56086. }
  56087. function hte(t, e, n) {
  56088. var r = Cp(t), i = t.scale, a = i.getExtent(), o = t.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = a[0], c = i.count();
  56089. u !== 0 && l > 1 && c / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  56090. var f = ite(t), d = o.get("showMinLabel") || f, h = o.get("showMaxLabel") || f;
  56091. d && u !== a[0] && v(a[0]);
  56092. for (var p = u; p <= a[1]; p += l)
  56093. v(p);
  56094. h && p - l !== a[1] && v(a[1]);
  56095. function v(g) {
  56096. var m = {
  56097. value: g
  56098. };
  56099. s.push(n ? g : {
  56100. formattedLabel: r(m),
  56101. rawLabel: i.getLabel(m),
  56102. tickValue: g
  56103. });
  56104. }
  56105. return s;
  56106. }
  56107. function pte(t, e, n) {
  56108. var r = t.scale, i = Cp(t), a = [];
  56109. return k(r.getTicks(), function(o) {
  56110. var s = r.getLabel(o), l = o.value;
  56111. e(o.value, s) && a.push(n ? l : {
  56112. formattedLabel: i(o),
  56113. rawLabel: s,
  56114. tickValue: l
  56115. });
  56116. }), a;
  56117. }
  56118. var cV = [0, 1], w5e = (
  56119. /** @class */
  56120. function() {
  56121. function t(e, n, r) {
  56122. this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = n, this._extent = r || [0, 0];
  56123. }
  56124. return t.prototype.contain = function(e) {
  56125. var n = this._extent, r = Math.min(n[0], n[1]), i = Math.max(n[0], n[1]);
  56126. return e >= r && e <= i;
  56127. }, t.prototype.containData = function(e) {
  56128. return this.scale.contain(e);
  56129. }, t.prototype.getExtent = function() {
  56130. return this._extent.slice();
  56131. }, t.prototype.getPixelPrecision = function(e) {
  56132. return TR(e || this.scale.getExtent(), this._extent);
  56133. }, t.prototype.setExtent = function(e, n) {
  56134. var r = this._extent;
  56135. r[0] = e, r[1] = n;
  56136. }, t.prototype.dataToCoord = function(e, n) {
  56137. var r = this._extent, i = this.scale;
  56138. return e = i.normalize(e), this.onBand && i.type === "ordinal" && (r = r.slice(), fV(r, i.count())), Lt(e, cV, r, n);
  56139. }, t.prototype.coordToData = function(e, n) {
  56140. var r = this._extent, i = this.scale;
  56141. this.onBand && i.type === "ordinal" && (r = r.slice(), fV(r, i.count()));
  56142. var a = Lt(e, r, cV, n);
  56143. return this.scale.scale(a);
  56144. }, t.prototype.pointToData = function(e, n) {
  56145. }, t.prototype.getTicksCoords = function(e) {
  56146. e = e || {};
  56147. var n = e.tickModel || this.getTickModel(), r = m5e(this, n), i = r.ticks, a = ce(i, function(s) {
  56148. return {
  56149. coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
  56150. tickValue: s
  56151. };
  56152. }, this), o = n.get("alignWithLabel");
  56153. return C5e(this, a, o, e.clamp), a;
  56154. }, t.prototype.getMinorTicksCoords = function() {
  56155. if (this.scale.type === "ordinal")
  56156. return [];
  56157. var e = this.model.getModel("minorTick"), n = e.get("splitNumber");
  56158. n > 0 && n < 100 || (n = 5);
  56159. var r = this.scale.getMinorTicks(n), i = ce(r, function(a) {
  56160. return ce(a, function(o) {
  56161. return {
  56162. coord: this.dataToCoord(o),
  56163. tickValue: o
  56164. };
  56165. }, this);
  56166. }, this);
  56167. return i;
  56168. }, t.prototype.getViewLabels = function() {
  56169. return g5e(this).labels;
  56170. }, t.prototype.getLabelModel = function() {
  56171. return this.model.getModel("axisLabel");
  56172. }, t.prototype.getTickModel = function() {
  56173. return this.model.getModel("axisTick");
  56174. }, t.prototype.getBandWidth = function() {
  56175. var e = this._extent, n = this.scale.getExtent(), r = n[1] - n[0] + (this.onBand ? 1 : 0);
  56176. r === 0 && (r = 1);
  56177. var i = Math.abs(e[1] - e[0]);
  56178. return Math.abs(i) / r;
  56179. }, t.prototype.calculateCategoryInterval = function() {
  56180. return S5e(this);
  56181. }, t;
  56182. }()
  56183. );
  56184. function fV(t, e) {
  56185. var n = t[1] - t[0], r = e, i = n / r / 2;
  56186. t[0] += i, t[1] -= i;
  56187. }
  56188. function C5e(t, e, n, r) {
  56189. var i = e.length;
  56190. if (!t.onBand || n || !i)
  56191. return;
  56192. var a = t.getExtent(), o, s;
  56193. if (i === 1)
  56194. e[0].coord = a[0], o = e[1] = {
  56195. coord: a[1]
  56196. };
  56197. else {
  56198. var l = e[i - 1].tickValue - e[0].tickValue, u = (e[i - 1].coord - e[0].coord) / l;
  56199. k(e, function(h) {
  56200. h.coord -= u / 2;
  56201. });
  56202. var c = t.scale.getExtent();
  56203. s = 1 + c[1] - e[i - 1].tickValue, o = {
  56204. coord: e[i - 1].coord + u * s
  56205. }, e.push(o);
  56206. }
  56207. var f = a[0] > a[1];
  56208. d(e[0].coord, a[0]) && (r ? e[0].coord = a[0] : e.shift()), r && d(a[0], e[0].coord) && e.unshift({
  56209. coord: a[0]
  56210. }), d(a[1], o.coord) && (r ? o.coord = a[1] : e.pop()), r && d(o.coord, a[1]) && e.push({
  56211. coord: a[1]
  56212. });
  56213. function d(h, p) {
  56214. return h = mn(h), p = mn(p), f ? h > p : h < p;
  56215. }
  56216. }
  56217. const Ba = w5e;
  56218. function T5e(t) {
  56219. var e = rt.extend(t);
  56220. return rt.registerClass(e), e;
  56221. }
  56222. function P5e(t) {
  56223. var e = Xt.extend(t);
  56224. return Xt.registerClass(e), e;
  56225. }
  56226. function $5e(t) {
  56227. var e = Ht.extend(t);
  56228. return Ht.registerClass(e), e;
  56229. }
  56230. function A5e(t) {
  56231. var e = zt.extend(t);
  56232. return zt.registerClass(e), e;
  56233. }
  56234. var vv = Math.PI * 2, ac = as.CMD, E5e = ["top", "right", "bottom", "left"];
  56235. function M5e(t, e, n, r, i) {
  56236. var a = n.width, o = n.height;
  56237. switch (t) {
  56238. case "top":
  56239. r.set(n.x + a / 2, n.y - e), i.set(0, -1);
  56240. break;
  56241. case "bottom":
  56242. r.set(n.x + a / 2, n.y + o + e), i.set(0, 1);
  56243. break;
  56244. case "left":
  56245. r.set(n.x - e, n.y + o / 2), i.set(-1, 0);
  56246. break;
  56247. case "right":
  56248. r.set(n.x + a + e, n.y + o / 2), i.set(1, 0);
  56249. break;
  56250. }
  56251. }
  56252. function I5e(t, e, n, r, i, a, o, s, l) {
  56253. o -= t, s -= e;
  56254. var u = Math.sqrt(o * o + s * s);
  56255. o /= u, s /= u;
  56256. var c = o * n + t, f = s * n + e;
  56257. if (Math.abs(r - i) % vv < 1e-4)
  56258. return l[0] = c, l[1] = f, u - n;
  56259. if (a) {
  56260. var d = r;
  56261. r = Fi(i), i = Fi(d);
  56262. } else
  56263. r = Fi(r), i = Fi(i);
  56264. r > i && (i += vv);
  56265. var h = Math.atan2(s, o);
  56266. if (h < 0 && (h += vv), h >= r && h <= i || h + vv >= r && h + vv <= i)
  56267. return l[0] = c, l[1] = f, u - n;
  56268. var p = n * Math.cos(r) + t, v = n * Math.sin(r) + e, g = n * Math.cos(i) + t, m = n * Math.sin(i) + e, y = (p - o) * (p - o) + (v - s) * (v - s), b = (g - o) * (g - o) + (m - s) * (m - s);
  56269. return y < b ? (l[0] = p, l[1] = v, Math.sqrt(y)) : (l[0] = g, l[1] = m, Math.sqrt(b));
  56270. }
  56271. function TO(t, e, n, r, i, a, o, s) {
  56272. var l = i - t, u = a - e, c = n - t, f = r - e, d = Math.sqrt(c * c + f * f);
  56273. c /= d, f /= d;
  56274. var h = l * c + u * f, p = h / d;
  56275. s && (p = Math.min(Math.max(p, 0), 1)), p *= d;
  56276. var v = o[0] = t + p * c, g = o[1] = e + p * f;
  56277. return Math.sqrt((v - i) * (v - i) + (g - a) * (g - a));
  56278. }
  56279. function vte(t, e, n, r, i, a, o) {
  56280. n < 0 && (t = t + n, n = -n), r < 0 && (e = e + r, r = -r);
  56281. var s = t + n, l = e + r, u = o[0] = Math.min(Math.max(i, t), s), c = o[1] = Math.min(Math.max(a, e), l);
  56282. return Math.sqrt((u - i) * (u - i) + (c - a) * (c - a));
  56283. }
  56284. var Za = [];
  56285. function D5e(t, e, n) {
  56286. var r = vte(e.x, e.y, e.width, e.height, t.x, t.y, Za);
  56287. return n.set(Za[0], Za[1]), r;
  56288. }
  56289. function R5e(t, e, n) {
  56290. for (var r = 0, i = 0, a = 0, o = 0, s, l, u = 1 / 0, c = e.data, f = t.x, d = t.y, h = 0; h < c.length; ) {
  56291. var p = c[h++];
  56292. h === 1 && (r = c[h], i = c[h + 1], a = r, o = i);
  56293. var v = u;
  56294. switch (p) {
  56295. case ac.M:
  56296. a = c[h++], o = c[h++], r = a, i = o;
  56297. break;
  56298. case ac.L:
  56299. v = TO(r, i, c[h], c[h + 1], f, d, Za, !0), r = c[h++], i = c[h++];
  56300. break;
  56301. case ac.C:
  56302. v = Vq(r, i, c[h++], c[h++], c[h++], c[h++], c[h], c[h + 1], f, d, Za), r = c[h++], i = c[h++];
  56303. break;
  56304. case ac.Q:
  56305. v = Wq(r, i, c[h++], c[h++], c[h], c[h + 1], f, d, Za), r = c[h++], i = c[h++];
  56306. break;
  56307. case ac.A:
  56308. var g = c[h++], m = c[h++], y = c[h++], b = c[h++], _ = c[h++], O = c[h++];
  56309. h += 1;
  56310. var S = !!(1 - c[h++]);
  56311. s = Math.cos(_) * y + g, l = Math.sin(_) * b + m, h <= 1 && (a = s, o = l);
  56312. var x = (f - g) * b / y + g;
  56313. v = I5e(g, m, b, _, _ + O, S, x, d, Za), r = Math.cos(_ + O) * y + g, i = Math.sin(_ + O) * b + m;
  56314. break;
  56315. case ac.R:
  56316. a = r = c[h++], o = i = c[h++];
  56317. var C = c[h++], T = c[h++];
  56318. v = vte(a, o, C, T, f, d, Za);
  56319. break;
  56320. case ac.Z:
  56321. v = TO(r, i, a, o, f, d, Za, !0), r = a, i = o;
  56322. break;
  56323. }
  56324. v < u && (u = v, n.set(Za[0], Za[1]));
  56325. }
  56326. return u;
  56327. }
  56328. var Xa = new Ke(), Ut = new Ke(), wn = new Ke(), Wo = new Ke(), Lo = new Ke();
  56329. function dV(t, e) {
  56330. if (t) {
  56331. var n = t.getTextGuideLine(), r = t.getTextContent();
  56332. if (r && n) {
  56333. var i = t.textGuideLineConfig || {}, a = [[0, 0], [0, 0], [0, 0]], o = i.candidates || E5e, s = r.getBoundingRect().clone();
  56334. s.applyTransform(r.getComputedTransform());
  56335. var l = 1 / 0, u = i.anchor, c = t.getComputedTransform(), f = c && kf([], c), d = e.get("length2") || 0;
  56336. u && wn.copy(u);
  56337. for (var h = 0; h < o.length; h++) {
  56338. var p = o[h];
  56339. M5e(p, 0, s, Xa, Wo), Ke.scaleAndAdd(Ut, Xa, Wo, d), Ut.transform(f);
  56340. var v = t.getBoundingRect(), g = u ? u.distance(Ut) : t instanceof ot ? R5e(Ut, t.path, wn) : D5e(Ut, v, wn);
  56341. g < l && (l = g, Ut.transform(c), wn.transform(c), wn.toArray(a[0]), Ut.toArray(a[1]), Xa.toArray(a[2]));
  56342. }
  56343. gte(a, e.get("minTurnAngle")), n.setShape({
  56344. points: a
  56345. });
  56346. }
  56347. }
  56348. }
  56349. var PO = [], Hr = new Ke();
  56350. function gte(t, e) {
  56351. if (e <= 180 && e > 0) {
  56352. e = e / 180 * Math.PI, Xa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Wo, Xa, Ut), Ke.sub(Lo, wn, Ut);
  56353. var n = Wo.len(), r = Lo.len();
  56354. if (!(n < 1e-3 || r < 1e-3)) {
  56355. Wo.scale(1 / n), Lo.scale(1 / r);
  56356. var i = Wo.dot(Lo), a = Math.cos(e);
  56357. if (a < i) {
  56358. var o = TO(Ut.x, Ut.y, wn.x, wn.y, Xa.x, Xa.y, PO, !1);
  56359. Hr.fromArray(PO), Hr.scaleAndAdd(Lo, o / Math.tan(Math.PI - e));
  56360. var s = wn.x !== Ut.x ? (Hr.x - Ut.x) / (wn.x - Ut.x) : (Hr.y - Ut.y) / (wn.y - Ut.y);
  56361. if (isNaN(s))
  56362. return;
  56363. s < 0 ? Ke.copy(Hr, Ut) : s > 1 && Ke.copy(Hr, wn), Hr.toArray(t[1]);
  56364. }
  56365. }
  56366. }
  56367. }
  56368. function k5e(t, e, n) {
  56369. if (n <= 180 && n > 0) {
  56370. n = n / 180 * Math.PI, Xa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Wo, Ut, Xa), Ke.sub(Lo, wn, Ut);
  56371. var r = Wo.len(), i = Lo.len();
  56372. if (!(r < 1e-3 || i < 1e-3)) {
  56373. Wo.scale(1 / r), Lo.scale(1 / i);
  56374. var a = Wo.dot(e), o = Math.cos(n);
  56375. if (a < o) {
  56376. var s = TO(Ut.x, Ut.y, wn.x, wn.y, Xa.x, Xa.y, PO, !1);
  56377. Hr.fromArray(PO);
  56378. var l = Math.PI / 2, u = Math.acos(Lo.dot(e)), c = l + u - n;
  56379. if (c >= l)
  56380. Ke.copy(Hr, wn);
  56381. else {
  56382. Hr.scaleAndAdd(Lo, s / Math.tan(Math.PI / 2 - c));
  56383. var f = wn.x !== Ut.x ? (Hr.x - Ut.x) / (wn.x - Ut.x) : (Hr.y - Ut.y) / (wn.y - Ut.y);
  56384. if (isNaN(f))
  56385. return;
  56386. f < 0 ? Ke.copy(Hr, Ut) : f > 1 && Ke.copy(Hr, wn);
  56387. }
  56388. Hr.toArray(t[1]);
  56389. }
  56390. }
  56391. }
  56392. }
  56393. function UT(t, e, n, r) {
  56394. var i = n === "normal", a = i ? t : t.ensureState(n);
  56395. a.ignore = e;
  56396. var o = r.get("smooth");
  56397. o && o === !0 && (o = 0.3), a.shape = a.shape || {}, o > 0 && (a.shape.smooth = o);
  56398. var s = r.getModel("lineStyle").getLineStyle();
  56399. i ? t.useStyle(s) : a.style = s;
  56400. }
  56401. function L5e(t, e) {
  56402. var n = e.smooth, r = e.points;
  56403. if (r)
  56404. if (t.moveTo(r[0][0], r[0][1]), n > 0 && r.length >= 3) {
  56405. var i = Ts(r[0], r[1]), a = Ts(r[1], r[2]);
  56406. if (!i || !a) {
  56407. t.lineTo(r[1][0], r[1][1]), t.lineTo(r[2][0], r[2][1]);
  56408. return;
  56409. }
  56410. var o = Math.min(i, a) * n, s = xg([], r[1], r[0], o / i), l = xg([], r[1], r[2], o / a), u = xg([], s, l, 0.5);
  56411. t.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), t.bezierCurveTo(l[0], l[1], l[0], l[1], r[2][0], r[2][1]);
  56412. } else
  56413. for (var c = 1; c < r.length; c++)
  56414. t.lineTo(r[c][0], r[c][1]);
  56415. }
  56416. function Ak(t, e, n) {
  56417. var r = t.getTextGuideLine(), i = t.getTextContent();
  56418. if (!i) {
  56419. r && t.removeTextGuideLine();
  56420. return;
  56421. }
  56422. for (var a = e.normal, o = a.get("show"), s = i.ignore, l = 0; l < xm.length; l++) {
  56423. var u = xm[l], c = e[u], f = u === "normal";
  56424. if (c) {
  56425. var d = c.get("show"), h = f ? s : We(i.states[u] && i.states[u].ignore, s);
  56426. if (h || !We(d, o)) {
  56427. var p = f ? r : r && r.states[u];
  56428. p && (p.ignore = !0), r && UT(r, !0, u, c);
  56429. continue;
  56430. }
  56431. r || (r = new ai(), t.setTextGuideLine(r), !f && (s || !o) && UT(r, !0, "normal", e.normal), t.stateProxy && (r.stateProxy = t.stateProxy)), UT(r, !1, u, c);
  56432. }
  56433. }
  56434. if (r) {
  56435. Re(r.style, n), r.style.fill = null;
  56436. var v = a.get("showAbove"), g = t.textGuideLineConfig = t.textGuideLineConfig || {};
  56437. g.showAbove = v || !1, r.buildPath = L5e;
  56438. }
  56439. }
  56440. function Ek(t, e) {
  56441. e = e || "labelLine";
  56442. for (var n = {
  56443. normal: t.getModel(e)
  56444. }, r = 0; r < ni.length; r++) {
  56445. var i = ni[r];
  56446. n[i] = t.getModel([i, e]);
  56447. }
  56448. return n;
  56449. }
  56450. function mte(t) {
  56451. for (var e = [], n = 0; n < t.length; n++) {
  56452. var r = t[n];
  56453. if (!r.defaultAttr.ignore) {
  56454. var i = r.label, a = i.getComputedTransform(), o = i.getBoundingRect(), s = !a || a[1] < 1e-5 && a[2] < 1e-5, l = i.style.margin || 0, u = o.clone();
  56455. u.applyTransform(a), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
  56456. var c = s ? new sO(o, a) : null;
  56457. e.push({
  56458. label: i,
  56459. labelLine: r.labelLine,
  56460. rect: u,
  56461. localRect: o,
  56462. obb: c,
  56463. priority: r.priority,
  56464. defaultAttr: r.defaultAttr,
  56465. layoutOption: r.computedLayoutOption,
  56466. axisAligned: s,
  56467. transform: a
  56468. });
  56469. }
  56470. }
  56471. return e;
  56472. }
  56473. function yte(t, e, n, r, i, a) {
  56474. var o = t.length;
  56475. if (o < 2)
  56476. return;
  56477. t.sort(function(C, T) {
  56478. return C.rect[e] - T.rect[e];
  56479. });
  56480. for (var s = 0, l, u = !1, c = 0, f = 0; f < o; f++) {
  56481. var d = t[f], h = d.rect;
  56482. l = h[e] - s, l < 0 && (h[e] -= l, d.label[e] -= l, u = !0);
  56483. var p = Math.max(-l, 0);
  56484. c += p, s = h[e] + h[n];
  56485. }
  56486. c > 0 && a && O(-c / o, 0, o);
  56487. var v = t[0], g = t[o - 1], m, y;
  56488. b(), m < 0 && S(-m, 0.8), y < 0 && S(y, 0.8), b(), _(m, y, 1), _(y, m, -1), b(), m < 0 && x(-m), y < 0 && x(y);
  56489. function b() {
  56490. m = v.rect[e] - r, y = i - g.rect[e] - g.rect[n];
  56491. }
  56492. function _(C, T, w) {
  56493. if (C < 0) {
  56494. var P = Math.min(T, -C);
  56495. if (P > 0) {
  56496. O(P * w, 0, o);
  56497. var $ = P + C;
  56498. $ < 0 && S(-$ * w, 1);
  56499. } else
  56500. S(-C * w, 1);
  56501. }
  56502. }
  56503. function O(C, T, w) {
  56504. C !== 0 && (u = !0);
  56505. for (var P = T; P < w; P++) {
  56506. var $ = t[P], A = $.rect;
  56507. A[e] += C, $.label[e] += C;
  56508. }
  56509. }
  56510. function S(C, T) {
  56511. for (var w = [], P = 0, $ = 1; $ < o; $++) {
  56512. var A = t[$ - 1].rect, D = Math.max(t[$].rect[e] - A[e] - A[n], 0);
  56513. w.push(D), P += D;
  56514. }
  56515. if (P) {
  56516. var E = Math.min(Math.abs(C) / P, T);
  56517. if (C > 0)
  56518. for (var $ = 0; $ < o - 1; $++) {
  56519. var R = w[$] * E;
  56520. O(R, 0, $ + 1);
  56521. }
  56522. else
  56523. for (var $ = o - 1; $ > 0; $--) {
  56524. var R = w[$ - 1] * E;
  56525. O(-R, $, o);
  56526. }
  56527. }
  56528. }
  56529. function x(C) {
  56530. var T = C < 0 ? -1 : 1;
  56531. C = Math.abs(C);
  56532. for (var w = Math.ceil(C / (o - 1)), P = 0; P < o - 1; P++)
  56533. if (T > 0 ? O(w, 0, P + 1) : O(-w, o - P - 1, o), C -= w, C <= 0)
  56534. return;
  56535. }
  56536. return u;
  56537. }
  56538. function N5e(t, e, n, r) {
  56539. return yte(t, "x", "width", e, n, r);
  56540. }
  56541. function bte(t, e, n, r) {
  56542. return yte(t, "y", "height", e, n, r);
  56543. }
  56544. function _te(t) {
  56545. var e = [];
  56546. t.sort(function(v, g) {
  56547. return g.priority - v.priority;
  56548. });
  56549. var n = new Je(0, 0, 0, 0);
  56550. function r(v) {
  56551. if (!v.ignore) {
  56552. var g = v.ensureState("emphasis");
  56553. g.ignore == null && (g.ignore = !1);
  56554. }
  56555. v.ignore = !0;
  56556. }
  56557. for (var i = 0; i < t.length; i++) {
  56558. var a = t[i], o = a.axisAligned, s = a.localRect, l = a.transform, u = a.label, c = a.labelLine;
  56559. n.copy(a.rect), n.width -= 0.1, n.height -= 0.1, n.x += 0.05, n.y += 0.05;
  56560. for (var f = a.obb, d = !1, h = 0; h < e.length; h++) {
  56561. var p = e[h];
  56562. if (n.intersect(p.rect)) {
  56563. if (o && p.axisAligned) {
  56564. d = !0;
  56565. break;
  56566. }
  56567. if (p.obb || (p.obb = new sO(p.localRect, p.transform)), f || (f = new sO(s, l)), f.intersect(p.obb)) {
  56568. d = !0;
  56569. break;
  56570. }
  56571. }
  56572. }
  56573. d ? (r(u), c && r(c)) : (u.attr("ignore", a.defaultAttr.ignore), c && c.attr("ignore", a.defaultAttr.labelGuideIgnore), e.push(a));
  56574. }
  56575. }
  56576. function B5e(t) {
  56577. if (t) {
  56578. for (var e = [], n = 0; n < t.length; n++)
  56579. e.push(t[n].slice());
  56580. return e;
  56581. }
  56582. }
  56583. function z5e(t, e) {
  56584. var n = t.label, r = e && e.getTextGuideLine();
  56585. return {
  56586. dataIndex: t.dataIndex,
  56587. dataType: t.dataType,
  56588. seriesIndex: t.seriesModel.seriesIndex,
  56589. text: t.label.style.text,
  56590. rect: t.hostRect,
  56591. labelRect: t.rect,
  56592. // x: labelAttr.x,
  56593. // y: labelAttr.y,
  56594. align: n.style.align,
  56595. verticalAlign: n.style.verticalAlign,
  56596. labelLinePoints: B5e(r && r.shape.points)
  56597. };
  56598. }
  56599. var hV = ["align", "verticalAlign", "width", "height", "fontSize"], Vr = new As(), XT = bt(), V5e = bt();
  56600. function mb(t, e, n) {
  56601. for (var r = 0; r < n.length; r++) {
  56602. var i = n[r];
  56603. e[i] != null && (t[i] = e[i]);
  56604. }
  56605. }
  56606. var yb = ["x", "y", "rotation"], F5e = (
  56607. /** @class */
  56608. function() {
  56609. function t() {
  56610. this._labelList = [], this._chartViewList = [];
  56611. }
  56612. return t.prototype.clearLabels = function() {
  56613. this._labelList = [], this._chartViewList = [];
  56614. }, t.prototype._addLabel = function(e, n, r, i, a) {
  56615. var o = i.style, s = i.__hostTarget, l = s.textConfig || {}, u = i.getComputedTransform(), c = i.getBoundingRect().plain();
  56616. Je.applyTransform(c, c, u), u ? Vr.setLocalTransform(u) : (Vr.x = Vr.y = Vr.rotation = Vr.originX = Vr.originY = 0, Vr.scaleX = Vr.scaleY = 1), Vr.rotation = Fi(Vr.rotation);
  56617. var f = i.__hostTarget, d;
  56618. if (f) {
  56619. d = f.getBoundingRect().plain();
  56620. var h = f.getComputedTransform();
  56621. Je.applyTransform(d, d, h);
  56622. }
  56623. var p = d && f.getTextGuideLine();
  56624. this._labelList.push({
  56625. label: i,
  56626. labelLine: p,
  56627. seriesModel: r,
  56628. dataIndex: e,
  56629. dataType: n,
  56630. layoutOption: a,
  56631. computedLayoutOption: null,
  56632. rect: c,
  56633. hostRect: d,
  56634. // Label with lower priority will be hidden when overlapped
  56635. // Use rect size as default priority
  56636. priority: d ? d.width * d.height : 0,
  56637. // Save default label attributes.
  56638. // For restore if developers want get back to default value in callback.
  56639. defaultAttr: {
  56640. ignore: i.ignore,
  56641. labelGuideIgnore: p && p.ignore,
  56642. x: Vr.x,
  56643. y: Vr.y,
  56644. scaleX: Vr.scaleX,
  56645. scaleY: Vr.scaleY,
  56646. rotation: Vr.rotation,
  56647. style: {
  56648. x: o.x,
  56649. y: o.y,
  56650. align: o.align,
  56651. verticalAlign: o.verticalAlign,
  56652. width: o.width,
  56653. height: o.height,
  56654. fontSize: o.fontSize
  56655. },
  56656. cursor: i.cursor,
  56657. attachedPos: l.position,
  56658. attachedRot: l.rotation
  56659. }
  56660. });
  56661. }, t.prototype.addLabelsOfSeries = function(e) {
  56662. var n = this;
  56663. this._chartViewList.push(e);
  56664. var r = e.__model, i = r.get("labelLayout");
  56665. (Me(i) || st(i).length) && e.group.traverse(function(a) {
  56666. if (a.ignore)
  56667. return !0;
  56668. var o = a.getTextContent(), s = Fe(a);
  56669. o && !o.disableLabelLayout && n._addLabel(s.dataIndex, s.dataType, r, o, i);
  56670. });
  56671. }, t.prototype.updateLayoutConfig = function(e) {
  56672. var n = e.getWidth(), r = e.getHeight();
  56673. function i(b, _) {
  56674. return function() {
  56675. dV(b, _);
  56676. };
  56677. }
  56678. for (var a = 0; a < this._labelList.length; a++) {
  56679. var o = this._labelList[a], s = o.label, l = s.__hostTarget, u = o.defaultAttr, c = void 0;
  56680. Me(o.layoutOption) ? c = o.layoutOption(z5e(o, l)) : c = o.layoutOption, c = c || {}, o.computedLayoutOption = c;
  56681. var f = Math.PI / 180;
  56682. l && l.setTextConfig({
  56683. // Force to set local false.
  56684. local: !1,
  56685. // Ignore position and rotation config on the host el if x or y is changed.
  56686. position: c.x != null || c.y != null ? null : u.attachedPos,
  56687. // Ignore rotation config on the host el if rotation is changed.
  56688. rotation: c.rotate != null ? c.rotate * f : u.attachedRot,
  56689. offset: [c.dx || 0, c.dy || 0]
  56690. });
  56691. var d = !1;
  56692. if (c.x != null ? (s.x = _e(c.x, n), s.setStyle("x", 0), d = !0) : (s.x = u.x, s.setStyle("x", u.style.x)), c.y != null ? (s.y = _e(c.y, r), s.setStyle("y", 0), d = !0) : (s.y = u.y, s.setStyle("y", u.style.y)), c.labelLinePoints) {
  56693. var h = l.getTextGuideLine();
  56694. h && (h.setShape({
  56695. points: c.labelLinePoints
  56696. }), d = !1);
  56697. }
  56698. var p = XT(s);
  56699. p.needsUpdateLabelLine = d, s.rotation = c.rotate != null ? c.rotate * f : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
  56700. for (var v = 0; v < hV.length; v++) {
  56701. var g = hV[v];
  56702. s.setStyle(g, c[g] != null ? c[g] : u.style[g]);
  56703. }
  56704. if (c.draggable) {
  56705. if (s.draggable = !0, s.cursor = "move", l) {
  56706. var m = o.seriesModel;
  56707. if (o.dataIndex != null) {
  56708. var y = o.seriesModel.getData(o.dataType);
  56709. m = y.getItemModel(o.dataIndex);
  56710. }
  56711. s.on("drag", i(l, m.getModel("labelLine")));
  56712. }
  56713. } else
  56714. s.off("drag"), s.cursor = u.cursor;
  56715. }
  56716. }, t.prototype.layout = function(e) {
  56717. var n = e.getWidth(), r = e.getHeight(), i = mte(this._labelList), a = Nt(i, function(l) {
  56718. return l.layoutOption.moveOverlap === "shiftX";
  56719. }), o = Nt(i, function(l) {
  56720. return l.layoutOption.moveOverlap === "shiftY";
  56721. });
  56722. N5e(a, 0, n), bte(o, 0, r);
  56723. var s = Nt(i, function(l) {
  56724. return l.layoutOption.hideOverlap;
  56725. });
  56726. _te(s);
  56727. }, t.prototype.processLabelsOverall = function() {
  56728. var e = this;
  56729. k(this._chartViewList, function(n) {
  56730. var r = n.__model, i = n.ignoreLabelLineUpdate, a = r.isAnimationEnabled();
  56731. n.group.traverse(function(o) {
  56732. if (o.ignore && !o.forceLabelAnimation)
  56733. return !0;
  56734. var s = !i, l = o.getTextContent();
  56735. !s && l && (s = XT(l).needsUpdateLabelLine), s && e._updateLabelLine(o, r), a && e._animateLabels(o, r);
  56736. });
  56737. });
  56738. }, t.prototype._updateLabelLine = function(e, n) {
  56739. var r = e.getTextContent(), i = Fe(e), a = i.dataIndex;
  56740. if (r && a != null) {
  56741. var o = n.getData(i.dataType), s = o.getItemModel(a), l = {}, u = o.getItemVisual(a, "style");
  56742. if (u) {
  56743. var c = o.getVisual("drawType");
  56744. l.stroke = u[c];
  56745. }
  56746. var f = s.getModel("labelLine");
  56747. Ak(e, Ek(s), l), dV(e, f);
  56748. }
  56749. }, t.prototype._animateLabels = function(e, n) {
  56750. var r = e.getTextContent(), i = e.getTextGuideLine();
  56751. if (r && (e.forceLabelAnimation || !r.ignore && !r.invisible && !e.disableLabelAnimation && !th(e))) {
  56752. var a = XT(r), o = a.oldLayout, s = Fe(e), l = s.dataIndex, u = {
  56753. x: r.x,
  56754. y: r.y,
  56755. rotation: r.rotation
  56756. }, c = n.getData(s.dataType);
  56757. if (o) {
  56758. r.attr(o);
  56759. var d = e.prevStates;
  56760. d && (et(d, "select") >= 0 && r.attr(a.oldLayoutSelect), et(d, "emphasis") >= 0 && r.attr(a.oldLayoutEmphasis)), Ct(r, u, n, l);
  56761. } else if (r.attr(u), !mp(r).valueAnimation) {
  56762. var f = We(r.style.opacity, 1);
  56763. r.style.opacity = 0, Yt(r, {
  56764. style: {
  56765. opacity: f
  56766. }
  56767. }, n, l);
  56768. }
  56769. if (a.oldLayout = u, r.states.select) {
  56770. var h = a.oldLayoutSelect = {};
  56771. mb(h, u, yb), mb(h, r.states.select, yb);
  56772. }
  56773. if (r.states.emphasis) {
  56774. var p = a.oldLayoutEmphasis = {};
  56775. mb(p, u, yb), mb(p, r.states.emphasis, yb);
  56776. }
  56777. hJ(r, l, c, n, n);
  56778. }
  56779. if (i && !i.ignore && !i.invisible) {
  56780. var a = V5e(i), o = a.oldLayout, v = {
  56781. points: i.shape.points
  56782. };
  56783. o ? (i.attr({
  56784. shape: o
  56785. }), Ct(i, {
  56786. shape: v
  56787. }, n)) : (i.setShape(v), i.style.strokePercent = 0, Yt(i, {
  56788. style: {
  56789. strokePercent: 1
  56790. }
  56791. }, n)), a.oldLayout = v;
  56792. }
  56793. }, t;
  56794. }()
  56795. ), YT = bt();
  56796. function W5e(t) {
  56797. t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
  56798. var i = YT(n).labelManager;
  56799. i || (i = YT(n).labelManager = new F5e()), i.clearLabels();
  56800. }), t.registerUpdateLifecycle("series:layoutlabels", function(e, n, r) {
  56801. var i = YT(n).labelManager;
  56802. r.updatedSeries.forEach(function(a) {
  56803. i.addLabelsOfSeries(n.getViewOfSeriesModel(a));
  56804. }), i.updateLayoutConfig(n), i.layout(n), i.processLabelsOverall();
  56805. });
  56806. }
  56807. var qT = Math.sin, KT = Math.cos, Ote = Math.PI, oc = Math.PI * 2, Q5e = 180 / Ote, Ste = function() {
  56808. function t() {
  56809. }
  56810. return t.prototype.reset = function(e) {
  56811. this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
  56812. }, t.prototype.moveTo = function(e, n) {
  56813. this._add("M", e, n);
  56814. }, t.prototype.lineTo = function(e, n) {
  56815. this._add("L", e, n);
  56816. }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
  56817. this._add("C", e, n, r, i, a, o);
  56818. }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
  56819. this._add("Q", e, n, r, i);
  56820. }, t.prototype.arc = function(e, n, r, i, a, o) {
  56821. this.ellipse(e, n, r, r, 0, i, a, o);
  56822. }, t.prototype.ellipse = function(e, n, r, i, a, o, s, l) {
  56823. var u = s - o, c = !l, f = Math.abs(u), d = Bl(f - oc) || (c ? u >= oc : -u >= oc), h = u > 0 ? u % oc : u % oc + oc, p = !1;
  56824. d ? p = !0 : Bl(f) ? p = !1 : p = h >= Ote == !!c;
  56825. var v = e + r * KT(o), g = n + i * qT(o);
  56826. this._start && this._add("M", v, g);
  56827. var m = Math.round(a * Q5e);
  56828. if (d) {
  56829. var y = 1 / this._p, b = (c ? 1 : -1) * (oc - y);
  56830. this._add("A", r, i, m, 1, +c, e + r * KT(o + b), n + i * qT(o + b)), y > 0.01 && this._add("A", r, i, m, 0, +c, v, g);
  56831. } else {
  56832. var _ = e + r * KT(s), O = n + i * qT(s);
  56833. this._add("A", r, i, m, +p, +c, _, O);
  56834. }
  56835. }, t.prototype.rect = function(e, n, r, i) {
  56836. this._add("M", e, n), this._add("l", r, 0), this._add("l", 0, i), this._add("l", -r, 0), this._add("Z");
  56837. }, t.prototype.closePath = function() {
  56838. this._d.length > 0 && this._add("Z");
  56839. }, t.prototype._add = function(e, n, r, i, a, o, s, l, u) {
  56840. for (var c = [], f = this._p, d = 1; d < arguments.length; d++) {
  56841. var h = arguments[d];
  56842. if (isNaN(h)) {
  56843. this._invalid = !0;
  56844. return;
  56845. }
  56846. c.push(Math.round(h * f) / f);
  56847. }
  56848. this._d.push(e + c.join(" ")), this._start = e === "Z";
  56849. }, t.prototype.generateStr = function() {
  56850. this._str = this._invalid ? "" : this._d.join(""), this._d = [];
  56851. }, t.prototype.getStr = function() {
  56852. return this._str;
  56853. }, t;
  56854. }(), Mk = "none", H5e = Math.round;
  56855. function G5e(t) {
  56856. var e = t.fill;
  56857. return e != null && e !== Mk;
  56858. }
  56859. function j5e(t) {
  56860. var e = t.stroke;
  56861. return e != null && e !== Mk;
  56862. }
  56863. var aE = ["lineCap", "miterLimit", "lineJoin"], Z5e = ce(aE, function(t) {
  56864. return "stroke-" + t.toLowerCase();
  56865. });
  56866. function U5e(t, e, n, r) {
  56867. var i = e.opacity == null ? 1 : e.opacity;
  56868. if (n instanceof lr) {
  56869. t("opacity", i);
  56870. return;
  56871. }
  56872. if (G5e(e)) {
  56873. var a = Sm(e.fill);
  56874. t("fill", a.color);
  56875. var o = e.fillOpacity != null ? e.fillOpacity * a.opacity * i : a.opacity * i;
  56876. o < 1 && t("fill-opacity", o);
  56877. } else
  56878. t("fill", Mk);
  56879. if (j5e(e)) {
  56880. var s = Sm(e.stroke);
  56881. t("stroke", s.color);
  56882. var l = e.strokeNoScale ? n.getLineScale() : 1, u = l ? (e.lineWidth || 0) / l : 0, c = e.strokeOpacity != null ? e.strokeOpacity * s.opacity * i : s.opacity * i, f = e.strokeFirst;
  56883. if (u !== 1 && t("stroke-width", u), f && t("paint-order", f ? "stroke" : "fill"), c < 1 && t("stroke-opacity", c), e.lineDash) {
  56884. var d = fk(n), h = d[0], p = d[1];
  56885. h && (p = H5e(p || 0), t("stroke-dasharray", h.join(",")), (p || r) && t("stroke-dashoffset", p));
  56886. }
  56887. for (var v = 0; v < aE.length; v++) {
  56888. var g = aE[v];
  56889. if (e[g] !== aO[g]) {
  56890. var m = e[g] || aO[g];
  56891. m && t(Z5e[v], m);
  56892. }
  56893. }
  56894. }
  56895. }
  56896. var xte = "http://www.w3.org/2000/svg", wte = "http://www.w3.org/1999/xlink", X5e = "http://www.w3.org/2000/xmlns/", Y5e = "http://www.w3.org/XML/1998/namespace", pV = "ecmeta_";
  56897. function Cte(t) {
  56898. return document.createElementNS(xte, t);
  56899. }
  56900. function Xn(t, e, n, r, i) {
  56901. return {
  56902. tag: t,
  56903. attrs: n || {},
  56904. children: r,
  56905. text: i,
  56906. key: e
  56907. };
  56908. }
  56909. function q5e(t, e) {
  56910. var n = [];
  56911. if (e)
  56912. for (var r in e) {
  56913. var i = e[r], a = r;
  56914. i !== !1 && (i !== !0 && i != null && (a += '="' + i + '"'), n.push(a));
  56915. }
  56916. return "<" + t + " " + n.join(" ") + ">";
  56917. }
  56918. function K5e(t) {
  56919. return "</" + t + ">";
  56920. }
  56921. function Ik(t, e) {
  56922. e = e || {};
  56923. var n = e.newline ? `
  56924. ` : "";
  56925. function r(i) {
  56926. var a = i.children, o = i.tag, s = i.attrs, l = i.text;
  56927. return q5e(o, s) + (o !== "style" ? Gr(l) : l || "") + (a ? "" + n + ce(a, function(u) {
  56928. return r(u);
  56929. }).join(n) + n : "") + K5e(o);
  56930. }
  56931. return r(t);
  56932. }
  56933. function J5e(t, e, n) {
  56934. n = n || {};
  56935. var r = n.newline ? `
  56936. ` : "", i = " {" + r, a = r + "}", o = ce(st(t), function(l) {
  56937. return l + i + ce(st(t[l]), function(u) {
  56938. return u + ":" + t[l][u] + ";";
  56939. }).join(r) + a;
  56940. }).join(r), s = ce(st(e), function(l) {
  56941. return "@keyframes " + l + i + ce(st(e[l]), function(u) {
  56942. return u + i + ce(st(e[l][u]), function(c) {
  56943. var f = e[l][u][c];
  56944. return c === "d" && (f = 'path("' + f + '")'), c + ":" + f + ";";
  56945. }).join(r) + a;
  56946. }).join(r) + a;
  56947. }).join(r);
  56948. return !o && !s ? "" : ["<![CDATA[", o, s, "]]>"].join(r);
  56949. }
  56950. function oE(t) {
  56951. return {
  56952. zrId: t,
  56953. shadowCache: {},
  56954. patternCache: {},
  56955. gradientCache: {},
  56956. clipPathCache: {},
  56957. defs: {},
  56958. cssNodes: {},
  56959. cssAnims: {},
  56960. cssStyleCache: {},
  56961. cssAnimIdx: 0,
  56962. shadowIdx: 0,
  56963. gradientIdx: 0,
  56964. patternIdx: 0,
  56965. clipPathIdx: 0
  56966. };
  56967. }
  56968. function vV(t, e, n, r) {
  56969. return Xn("svg", "root", {
  56970. width: t,
  56971. height: e,
  56972. xmlns: xte,
  56973. "xmlns:xlink": wte,
  56974. version: "1.1",
  56975. baseProfile: "full",
  56976. viewBox: r ? "0 0 " + t + " " + e : !1
  56977. }, n);
  56978. }
  56979. var e3e = 0;
  56980. function Tte() {
  56981. return e3e++;
  56982. }
  56983. var gV = {
  56984. cubicIn: "0.32,0,0.67,0",
  56985. cubicOut: "0.33,1,0.68,1",
  56986. cubicInOut: "0.65,0,0.35,1",
  56987. quadraticIn: "0.11,0,0.5,0",
  56988. quadraticOut: "0.5,1,0.89,1",
  56989. quadraticInOut: "0.45,0,0.55,1",
  56990. quarticIn: "0.5,0,0.75,0",
  56991. quarticOut: "0.25,1,0.5,1",
  56992. quarticInOut: "0.76,0,0.24,1",
  56993. quinticIn: "0.64,0,0.78,0",
  56994. quinticOut: "0.22,1,0.36,1",
  56995. quinticInOut: "0.83,0,0.17,1",
  56996. sinusoidalIn: "0.12,0,0.39,0",
  56997. sinusoidalOut: "0.61,1,0.88,1",
  56998. sinusoidalInOut: "0.37,0,0.63,1",
  56999. exponentialIn: "0.7,0,0.84,0",
  57000. exponentialOut: "0.16,1,0.3,1",
  57001. exponentialInOut: "0.87,0,0.13,1",
  57002. circularIn: "0.55,0,1,0.45",
  57003. circularOut: "0,0.55,0.45,1",
  57004. circularInOut: "0.85,0,0.15,1"
  57005. }, dc = "transform-origin";
  57006. function t3e(t, e, n) {
  57007. var r = le({}, t.shape);
  57008. le(r, e), t.buildPath(n, r);
  57009. var i = new Ste();
  57010. return i.reset(Xq(t)), n.rebuildPath(i, 1), i.generateStr(), i.getStr();
  57011. }
  57012. function n3e(t, e) {
  57013. var n = e.originX, r = e.originY;
  57014. (n || r) && (t[dc] = n + "px " + r + "px");
  57015. }
  57016. var r3e = {
  57017. fill: "fill",
  57018. opacity: "opacity",
  57019. lineWidth: "stroke-width",
  57020. lineDashOffset: "stroke-dashoffset"
  57021. };
  57022. function Pte(t, e) {
  57023. var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  57024. return e.cssAnims[n] = t, n;
  57025. }
  57026. function i3e(t, e, n) {
  57027. var r = t.shape.paths, i = {}, a, o;
  57028. if (k(r, function(l) {
  57029. var u = oE(n.zrId);
  57030. u.animation = !0, gw(l, {}, u, !0);
  57031. var c = u.cssAnims, f = u.cssNodes, d = st(c), h = d.length;
  57032. if (h) {
  57033. o = d[h - 1];
  57034. var p = c[o];
  57035. for (var v in p) {
  57036. var g = p[v];
  57037. i[v] = i[v] || { d: "" }, i[v].d += g.d || "";
  57038. }
  57039. for (var m in f) {
  57040. var y = f[m].animation;
  57041. y.indexOf(o) >= 0 && (a = y);
  57042. }
  57043. }
  57044. }), !!a) {
  57045. e.d = !1;
  57046. var s = Pte(i, n);
  57047. return a.replace(o, s);
  57048. }
  57049. }
  57050. function mV(t) {
  57051. return Oe(t) ? gV[t] ? "cubic-bezier(" + gV[t] + ")" : SR(t) ? t : "" : "";
  57052. }
  57053. function gw(t, e, n, r) {
  57054. var i = t.animators, a = i.length, o = [];
  57055. if (t instanceof qx) {
  57056. var s = i3e(t, e, n);
  57057. if (s)
  57058. o.push(s);
  57059. else if (!a)
  57060. return;
  57061. } else if (!a)
  57062. return;
  57063. for (var l = {}, u = 0; u < a; u++) {
  57064. var c = i[u], f = [c.getMaxTime() / 1e3 + "s"], d = mV(c.getClip().easing), h = c.getDelay();
  57065. d ? f.push(d) : f.push("linear"), h && f.push(h / 1e3 + "s"), c.getLoop() && f.push("infinite");
  57066. var p = f.join(" ");
  57067. l[p] = l[p] || [p, []], l[p][1].push(c);
  57068. }
  57069. function v(y) {
  57070. var b = y[1], _ = b.length, O = {}, S = {}, x = {}, C = "animation-timing-function";
  57071. function T(ie, X, H) {
  57072. for (var G = ie.getTracks(), re = ie.getMaxTime(), fe = 0; fe < G.length; fe++) {
  57073. var de = G[fe];
  57074. if (de.needsAnimate()) {
  57075. var Ee = de.keyframes, $e = de.propName;
  57076. if (H && ($e = H($e)), $e)
  57077. for (var Se = 0; Se < Ee.length; Se++) {
  57078. var be = Ee[Se], he = Math.round(be.time / re * 100) + "%", Te = mV(be.easing), ze = be.rawValue;
  57079. (Oe(ze) || St(ze)) && (X[he] = X[he] || {}, X[he][$e] = be.rawValue, Te && (X[he][C] = Te));
  57080. }
  57081. }
  57082. }
  57083. }
  57084. for (var w = 0; w < _; w++) {
  57085. var P = b[w], $ = P.targetName;
  57086. $ ? $ === "shape" && T(P, S) : !r && T(P, O);
  57087. }
  57088. for (var A in O) {
  57089. var D = {};
  57090. eK(D, t), le(D, O[A]);
  57091. var E = Yq(D), R = O[A][C];
  57092. x[A] = E ? {
  57093. transform: E
  57094. } : {}, n3e(x[A], D), R && (x[A][C] = R);
  57095. }
  57096. var N, V = !0;
  57097. for (var A in S) {
  57098. x[A] = x[A] || {};
  57099. var z = !N, R = S[A][C];
  57100. z && (N = new as());
  57101. var W = N.len();
  57102. N.reset(), x[A].d = t3e(t, S[A], N);
  57103. var F = N.len();
  57104. if (!z && W !== F) {
  57105. V = !1;
  57106. break;
  57107. }
  57108. R && (x[A][C] = R);
  57109. }
  57110. if (!V)
  57111. for (var A in x)
  57112. delete x[A].d;
  57113. if (!r)
  57114. for (var w = 0; w < _; w++) {
  57115. var P = b[w], $ = P.targetName;
  57116. $ === "style" && T(P, x, function(G) {
  57117. return r3e[G];
  57118. });
  57119. }
  57120. for (var Q = st(x), Z = !0, ne, w = 1; w < Q.length; w++) {
  57121. var ee = Q[w - 1], oe = Q[w];
  57122. if (x[ee][dc] !== x[oe][dc]) {
  57123. Z = !1;
  57124. break;
  57125. }
  57126. ne = x[ee][dc];
  57127. }
  57128. if (Z && ne) {
  57129. for (var A in x)
  57130. x[A][dc] && delete x[A][dc];
  57131. e[dc] = ne;
  57132. }
  57133. if (Nt(Q, function(ie) {
  57134. return st(x[ie]).length > 0;
  57135. }).length) {
  57136. var K = Pte(x, n);
  57137. return K + " " + y[0] + " both";
  57138. }
  57139. }
  57140. for (var g in l) {
  57141. var s = v(l[g]);
  57142. s && o.push(s);
  57143. }
  57144. if (o.length) {
  57145. var m = n.zrId + "-cls-" + Tte();
  57146. n.cssNodes["." + m] = {
  57147. animation: o.join(",")
  57148. }, e.class = m;
  57149. }
  57150. }
  57151. function a3e(t, e, n) {
  57152. if (!t.ignore)
  57153. if (t.isSilent()) {
  57154. var r = {
  57155. "pointer-events": "none"
  57156. };
  57157. yV(r, e, n);
  57158. } else {
  57159. var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {}, a = i.fill;
  57160. if (!a) {
  57161. var o = t.style && t.style.fill, s = t.states.select && t.states.select.style && t.states.select.style.fill, l = t.currentStates.indexOf("select") >= 0 && s || o;
  57162. l && (a = eO(l));
  57163. }
  57164. var u = i.lineWidth;
  57165. if (u) {
  57166. var c = !i.strokeNoScale && t.transform ? t.transform[0] : 1;
  57167. u = u / c;
  57168. }
  57169. var r = {
  57170. cursor: "pointer"
  57171. };
  57172. a && (r.fill = a), i.stroke && (r.stroke = i.stroke), u && (r["stroke-width"] = u), yV(r, e, n);
  57173. }
  57174. }
  57175. function yV(t, e, n, r) {
  57176. var i = JSON.stringify(t), a = n.cssStyleCache[i];
  57177. a || (a = n.zrId + "-cls-" + Tte(), n.cssStyleCache[i] = a, n.cssNodes["." + a + ":hover"] = t), e.class = e.class ? e.class + " " + a : a;
  57178. }
  57179. var Im = Math.round;
  57180. function $te(t) {
  57181. return t && Oe(t.src);
  57182. }
  57183. function Ate(t) {
  57184. return t && Me(t.toDataURL);
  57185. }
  57186. function Dk(t, e, n, r) {
  57187. U5e(function(i, a) {
  57188. var o = i === "fill" || i === "stroke";
  57189. o && Uq(a) ? Mte(e, t, i, r) : o && wR(a) ? Ite(n, t, i, r) : o && a === "none" ? t[i] = "transparent" : t[i] = a;
  57190. }, e, n, !1), d3e(n, t, r);
  57191. }
  57192. function Rk(t, e) {
  57193. var n = iK(e);
  57194. n && (n.each(function(r, i) {
  57195. r != null && (t[(pV + i).toLowerCase()] = r + "");
  57196. }), e.isSilent() && (t[pV + "silent"] = "true"));
  57197. }
  57198. function bV(t) {
  57199. return Bl(t[0] - 1) && Bl(t[1]) && Bl(t[2]) && Bl(t[3] - 1);
  57200. }
  57201. function o3e(t) {
  57202. return Bl(t[4]) && Bl(t[5]);
  57203. }
  57204. function kk(t, e, n) {
  57205. if (e && !(o3e(e) && bV(e))) {
  57206. var r = 1e4;
  57207. t.transform = bV(e) ? "translate(" + Im(e[4] * r) / r + " " + Im(e[5] * r) / r + ")" : JIe(e);
  57208. }
  57209. }
  57210. function _V(t, e, n) {
  57211. for (var r = t.points, i = [], a = 0; a < r.length; a++)
  57212. i.push(Im(r[a][0] * n) / n), i.push(Im(r[a][1] * n) / n);
  57213. e.points = i.join(" ");
  57214. }
  57215. function OV(t) {
  57216. return !t.smooth;
  57217. }
  57218. function s3e(t) {
  57219. var e = ce(t, function(n) {
  57220. return typeof n == "string" ? [n, n] : n;
  57221. });
  57222. return function(n, r, i) {
  57223. for (var a = 0; a < e.length; a++) {
  57224. var o = e[a], s = n[o[0]];
  57225. s != null && (r[o[1]] = Im(s * i) / i);
  57226. }
  57227. };
  57228. }
  57229. var l3e = {
  57230. circle: [s3e(["cx", "cy", "r"])],
  57231. polyline: [_V, OV],
  57232. polygon: [_V, OV]
  57233. };
  57234. function u3e(t) {
  57235. for (var e = t.animators, n = 0; n < e.length; n++)
  57236. if (e[n].targetName === "shape")
  57237. return !0;
  57238. return !1;
  57239. }
  57240. function Ete(t, e) {
  57241. var n = t.style, r = t.shape, i = l3e[t.type], a = {}, o = e.animation, s = "path", l = t.style.strokePercent, u = e.compress && Xq(t) || 4;
  57242. if (i && !e.willUpdate && !(i[1] && !i[1](r)) && !(o && u3e(t)) && !(l < 1)) {
  57243. s = t.type;
  57244. var c = Math.pow(10, u);
  57245. i[0](r, a, c);
  57246. } else {
  57247. var f = !t.path || t.shapeChanged();
  57248. t.path || t.createPathProxy();
  57249. var d = t.path;
  57250. f && (d.beginPath(), t.buildPath(d, t.shape), t.pathUpdated());
  57251. var h = d.getVersion(), p = t, v = p.__svgPathBuilder;
  57252. (p.__svgPathVersion !== h || !v || l !== p.__svgPathStrokePercent) && (v || (v = p.__svgPathBuilder = new Ste()), v.reset(u), d.rebuildPath(v, l), v.generateStr(), p.__svgPathVersion = h, p.__svgPathStrokePercent = l), a.d = v.getStr();
  57253. }
  57254. return kk(a, t.transform), Dk(a, n, t, e), Rk(a, t), e.animation && gw(t, a, e), e.emphasis && a3e(t, a, e), Xn(s, t.id + "", a);
  57255. }
  57256. function c3e(t, e) {
  57257. var n = t.style, r = n.image;
  57258. if (r && !Oe(r) && ($te(r) ? r = r.src : Ate(r) && (r = r.toDataURL())), !!r) {
  57259. var i = n.x || 0, a = n.y || 0, o = n.width, s = n.height, l = {
  57260. href: r,
  57261. width: o,
  57262. height: s
  57263. };
  57264. return i && (l.x = i), a && (l.y = a), kk(l, t.transform), Dk(l, n, t, e), Rk(l, t), e.animation && gw(t, l, e), Xn("image", t.id + "", l);
  57265. }
  57266. }
  57267. function f3e(t, e) {
  57268. var n = t.style, r = n.text;
  57269. if (r != null && (r += ""), !(!r || isNaN(n.x) || isNaN(n.y))) {
  57270. var i = n.font || iu, a = n.x || 0, o = tDe(n.y || 0, zx(i), n.textBaseline), s = eDe[n.textAlign] || n.textAlign, l = {
  57271. "dominant-baseline": "central",
  57272. "text-anchor": s
  57273. };
  57274. if (MK(n)) {
  57275. var u = "", c = n.fontStyle, f = EK(n.fontSize);
  57276. if (!parseFloat(f))
  57277. return;
  57278. var d = n.fontFamily || _q, h = n.fontWeight;
  57279. u += "font-size:" + f + ";font-family:" + d + ";", c && c !== "normal" && (u += "font-style:" + c + ";"), h && h !== "normal" && (u += "font-weight:" + h + ";"), l.style = u;
  57280. } else
  57281. l.style = "font: " + i;
  57282. return r.match(/\s/) && (l["xml:space"] = "preserve"), a && (l.x = a), o && (l.y = o), kk(l, t.transform), Dk(l, n, t, e), Rk(l, t), e.animation && gw(t, l, e), Xn("text", t.id + "", l, void 0, r);
  57283. }
  57284. }
  57285. function SV(t, e) {
  57286. if (t instanceof ot)
  57287. return Ete(t, e);
  57288. if (t instanceof lr)
  57289. return c3e(t, e);
  57290. if (t instanceof Bh)
  57291. return f3e(t, e);
  57292. }
  57293. function d3e(t, e, n) {
  57294. var r = t.style;
  57295. if (nDe(r)) {
  57296. var i = rDe(t), a = n.shadowCache, o = a[i];
  57297. if (!o) {
  57298. var s = t.getGlobalScale(), l = s[0], u = s[1];
  57299. if (!l || !u)
  57300. return;
  57301. var c = r.shadowOffsetX || 0, f = r.shadowOffsetY || 0, d = r.shadowBlur, h = Sm(r.shadowColor), p = h.opacity, v = h.color, g = d / 2 / l, m = d / 2 / u, y = g + " " + m;
  57302. o = n.zrId + "-s" + n.shadowIdx++, n.defs[o] = Xn("filter", o, {
  57303. id: o,
  57304. x: "-100%",
  57305. y: "-100%",
  57306. width: "300%",
  57307. height: "300%"
  57308. }, [
  57309. Xn("feDropShadow", "", {
  57310. dx: c / l,
  57311. dy: f / u,
  57312. stdDeviation: y,
  57313. "flood-color": v,
  57314. "flood-opacity": p
  57315. })
  57316. ]), a[i] = o;
  57317. }
  57318. e.filter = Bx(o);
  57319. }
  57320. }
  57321. function Mte(t, e, n, r) {
  57322. var i = t[n], a, o = {
  57323. gradientUnits: i.global ? "userSpaceOnUse" : "objectBoundingBox"
  57324. };
  57325. if (jq(i))
  57326. a = "linearGradient", o.x1 = i.x, o.y1 = i.y, o.x2 = i.x2, o.y2 = i.y2;
  57327. else if (Zq(i))
  57328. a = "radialGradient", o.cx = We(i.x, 0.5), o.cy = We(i.y, 0.5), o.r = We(i.r, 0.5);
  57329. else {
  57330. process.env.NODE_ENV !== "production" && Oa("Illegal gradient type.");
  57331. return;
  57332. }
  57333. for (var s = i.colorStops, l = [], u = 0, c = s.length; u < c; ++u) {
  57334. var f = pA(s[u].offset) * 100 + "%", d = s[u].color, h = Sm(d), p = h.color, v = h.opacity, g = {
  57335. offset: f
  57336. };
  57337. g["stop-color"] = p, v < 1 && (g["stop-opacity"] = v), l.push(Xn("stop", u + "", g));
  57338. }
  57339. var m = Xn(a, "", o, l), y = Ik(m), b = r.gradientCache, _ = b[y];
  57340. _ || (_ = r.zrId + "-g" + r.gradientIdx++, b[y] = _, o.id = _, r.defs[_] = Xn(a, _, o, l)), e[n] = Bx(_);
  57341. }
  57342. function Ite(t, e, n, r) {
  57343. var i = t.style[n], a = t.getBoundingRect(), o = {}, s = i.repeat, l = s === "no-repeat", u = s === "repeat-x", c = s === "repeat-y", f;
  57344. if (Gq(i)) {
  57345. var d = i.imageWidth, h = i.imageHeight, p = void 0, v = i.image;
  57346. if (Oe(v) ? p = v : $te(v) ? p = v.src : Ate(v) && (p = v.toDataURL()), typeof Image > "u") {
  57347. var g = "Image width/height must been given explictly in svg-ssr renderer.";
  57348. ke(d, g), ke(h, g);
  57349. } else if (d == null || h == null) {
  57350. var m = function(w, P) {
  57351. if (w) {
  57352. var $ = w.elm, A = d || P.width, D = h || P.height;
  57353. w.tag === "pattern" && (u ? (D = 1, A /= a.width) : c && (A = 1, D /= a.height)), w.attrs.width = A, w.attrs.height = D, $ && ($.setAttribute("width", A), $.setAttribute("height", D));
  57354. }
  57355. }, y = IR(p, null, t, function(w) {
  57356. l || m(S, w), m(f, w);
  57357. });
  57358. y && y.width && y.height && (d = d || y.width, h = h || y.height);
  57359. }
  57360. f = Xn("image", "img", {
  57361. href: p,
  57362. width: d,
  57363. height: h
  57364. }), o.width = d, o.height = h;
  57365. } else i.svgElement && (f = Le(i.svgElement), o.width = i.svgWidth, o.height = i.svgHeight);
  57366. if (f) {
  57367. var b, _;
  57368. l ? b = _ = 1 : u ? (_ = 1, b = o.width / a.width) : c ? (b = 1, _ = o.height / a.height) : o.patternUnits = "userSpaceOnUse", b != null && !isNaN(b) && (o.width = b), _ != null && !isNaN(_) && (o.height = _);
  57369. var O = Yq(i);
  57370. O && (o.patternTransform = O);
  57371. var S = Xn("pattern", "", o, [f]), x = Ik(S), C = r.patternCache, T = C[x];
  57372. T || (T = r.zrId + "-p" + r.patternIdx++, C[x] = T, o.id = T, S = r.defs[T] = Xn("pattern", T, o, [f])), e[n] = Bx(T);
  57373. }
  57374. }
  57375. function h3e(t, e, n) {
  57376. var r = n.clipPathCache, i = n.defs, a = r[t.id];
  57377. if (!a) {
  57378. a = n.zrId + "-c" + n.clipPathIdx++;
  57379. var o = {
  57380. id: a
  57381. };
  57382. r[t.id] = a, i[a] = Xn("clipPath", a, o, [Ete(t, n)]);
  57383. }
  57384. e["clip-path"] = Bx(a);
  57385. }
  57386. function xV(t) {
  57387. return document.createTextNode(t);
  57388. }
  57389. function xc(t, e, n) {
  57390. t.insertBefore(e, n);
  57391. }
  57392. function wV(t, e) {
  57393. t.removeChild(e);
  57394. }
  57395. function CV(t, e) {
  57396. t.appendChild(e);
  57397. }
  57398. function Dte(t) {
  57399. return t.parentNode;
  57400. }
  57401. function Rte(t) {
  57402. return t.nextSibling;
  57403. }
  57404. function JT(t, e) {
  57405. t.textContent = e;
  57406. }
  57407. var TV = 58, p3e = 120, v3e = Xn("", "");
  57408. function sE(t) {
  57409. return t === void 0;
  57410. }
  57411. function Do(t) {
  57412. return t !== void 0;
  57413. }
  57414. function g3e(t, e, n) {
  57415. for (var r = {}, i = e; i <= n; ++i) {
  57416. var a = t[i].key;
  57417. a !== void 0 && (process.env.NODE_ENV !== "production" && r[a] != null && console.error("Duplicate key " + a), r[a] = i);
  57418. }
  57419. return r;
  57420. }
  57421. function Uv(t, e) {
  57422. var n = t.key === e.key, r = t.tag === e.tag;
  57423. return r && n;
  57424. }
  57425. function Dm(t) {
  57426. var e, n = t.children, r = t.tag;
  57427. if (Do(r)) {
  57428. var i = t.elm = Cte(r);
  57429. if (Lk(v3e, t), ue(n))
  57430. for (e = 0; e < n.length; ++e) {
  57431. var a = n[e];
  57432. a != null && CV(i, Dm(a));
  57433. }
  57434. else Do(t.text) && !Ie(t.text) && CV(i, xV(t.text));
  57435. } else
  57436. t.elm = xV(t.text);
  57437. return t.elm;
  57438. }
  57439. function kte(t, e, n, r, i) {
  57440. for (; r <= i; ++r) {
  57441. var a = n[r];
  57442. a != null && xc(t, Dm(a), e);
  57443. }
  57444. }
  57445. function $O(t, e, n, r) {
  57446. for (; n <= r; ++n) {
  57447. var i = e[n];
  57448. if (i != null)
  57449. if (Do(i.tag)) {
  57450. var a = Dte(i.elm);
  57451. wV(a, i.elm);
  57452. } else
  57453. wV(t, i.elm);
  57454. }
  57455. }
  57456. function Lk(t, e) {
  57457. var n, r = e.elm, i = t && t.attrs || {}, a = e.attrs || {};
  57458. if (i !== a) {
  57459. for (n in a) {
  57460. var o = a[n], s = i[n];
  57461. s !== o && (o === !0 ? r.setAttribute(n, "") : o === !1 ? r.removeAttribute(n) : n === "style" ? r.style.cssText = o : n.charCodeAt(0) !== p3e ? r.setAttribute(n, o) : n === "xmlns:xlink" || n === "xmlns" ? r.setAttributeNS(X5e, n, o) : n.charCodeAt(3) === TV ? r.setAttributeNS(Y5e, n, o) : n.charCodeAt(5) === TV ? r.setAttributeNS(wte, n, o) : r.setAttribute(n, o));
  57462. }
  57463. for (n in i)
  57464. n in a || r.removeAttribute(n);
  57465. }
  57466. }
  57467. function m3e(t, e, n) {
  57468. for (var r = 0, i = 0, a = e.length - 1, o = e[0], s = e[a], l = n.length - 1, u = n[0], c = n[l], f, d, h, p; r <= a && i <= l; )
  57469. o == null ? o = e[++r] : s == null ? s = e[--a] : u == null ? u = n[++i] : c == null ? c = n[--l] : Uv(o, u) ? (Ed(o, u), o = e[++r], u = n[++i]) : Uv(s, c) ? (Ed(s, c), s = e[--a], c = n[--l]) : Uv(o, c) ? (Ed(o, c), xc(t, o.elm, Rte(s.elm)), o = e[++r], c = n[--l]) : Uv(s, u) ? (Ed(s, u), xc(t, s.elm, o.elm), s = e[--a], u = n[++i]) : (sE(f) && (f = g3e(e, r, a)), d = f[u.key], sE(d) ? xc(t, Dm(u), o.elm) : (h = e[d], h.tag !== u.tag ? xc(t, Dm(u), o.elm) : (Ed(h, u), e[d] = void 0, xc(t, h.elm, o.elm))), u = n[++i]);
  57470. (r <= a || i <= l) && (r > a ? (p = n[l + 1] == null ? null : n[l + 1].elm, kte(t, p, n, i, l)) : $O(t, e, r, a));
  57471. }
  57472. function Ed(t, e) {
  57473. var n = e.elm = t.elm, r = t.children, i = e.children;
  57474. t !== e && (Lk(t, e), sE(e.text) ? Do(r) && Do(i) ? r !== i && m3e(n, r, i) : Do(i) ? (Do(t.text) && JT(n, ""), kte(n, null, i, 0, i.length - 1)) : Do(r) ? $O(n, r, 0, r.length - 1) : Do(t.text) && JT(n, "") : t.text !== e.text && (Do(r) && $O(n, r, 0, r.length - 1), JT(n, e.text)));
  57475. }
  57476. function y3e(t, e) {
  57477. if (Uv(t, e))
  57478. Ed(t, e);
  57479. else {
  57480. var n = t.elm, r = Dte(n);
  57481. Dm(e), r !== null && (xc(r, e.elm, Rte(n)), $O(r, [t], 0, 0));
  57482. }
  57483. return e;
  57484. }
  57485. var b3e = 0, _3e = function() {
  57486. function t(e, n, r) {
  57487. if (this.type = "svg", this.refreshHover = PV("refreshHover"), this.configLayer = PV("configLayer"), this.storage = n, this._opts = r = le({}, r), this.root = e, this._id = "zr" + b3e++, this._oldVNode = vV(r.width, r.height), e && !r.ssr) {
  57488. var i = this._viewport = document.createElement("div");
  57489. i.style.cssText = "position:relative;overflow:hidden";
  57490. var a = this._svgDom = this._oldVNode.elm = Cte("svg");
  57491. Lk(null, this._oldVNode), i.appendChild(a), e.appendChild(i);
  57492. }
  57493. this.resize(r.width, r.height);
  57494. }
  57495. return t.prototype.getType = function() {
  57496. return this.type;
  57497. }, t.prototype.getViewportRoot = function() {
  57498. return this._viewport;
  57499. }, t.prototype.getViewportRootOffset = function() {
  57500. var e = this.getViewportRoot();
  57501. if (e)
  57502. return {
  57503. offsetLeft: e.offsetLeft || 0,
  57504. offsetTop: e.offsetTop || 0
  57505. };
  57506. }, t.prototype.getSvgDom = function() {
  57507. return this._svgDom;
  57508. }, t.prototype.refresh = function() {
  57509. if (this.root) {
  57510. var e = this.renderToVNode({
  57511. willUpdate: !0
  57512. });
  57513. e.attrs.style = "position:absolute;left:0;top:0;user-select:none", y3e(this._oldVNode, e), this._oldVNode = e;
  57514. }
  57515. }, t.prototype.renderOneToVNode = function(e) {
  57516. return SV(e, oE(this._id));
  57517. }, t.prototype.renderToVNode = function(e) {
  57518. e = e || {};
  57519. var n = this.storage.getDisplayList(!0), r = this._width, i = this._height, a = oE(this._id);
  57520. a.animation = e.animation, a.willUpdate = e.willUpdate, a.compress = e.compress, a.emphasis = e.emphasis;
  57521. var o = [], s = this._bgVNode = O3e(r, i, this._backgroundColor, a);
  57522. s && o.push(s);
  57523. var l = e.compress ? null : this._mainVNode = Xn("g", "main", {}, []);
  57524. this._paintList(n, a, l ? l.children : o), l && o.push(l);
  57525. var u = ce(st(a.defs), function(d) {
  57526. return a.defs[d];
  57527. });
  57528. if (u.length && o.push(Xn("defs", "defs", {}, u)), e.animation) {
  57529. var c = J5e(a.cssNodes, a.cssAnims, { newline: !0 });
  57530. if (c) {
  57531. var f = Xn("style", "stl", {}, [], c);
  57532. o.push(f);
  57533. }
  57534. }
  57535. return vV(r, i, o, e.useViewBox);
  57536. }, t.prototype.renderToString = function(e) {
  57537. return e = e || {}, Ik(this.renderToVNode({
  57538. animation: We(e.cssAnimation, !0),
  57539. emphasis: We(e.cssEmphasis, !0),
  57540. willUpdate: !1,
  57541. compress: !0,
  57542. useViewBox: We(e.useViewBox, !0)
  57543. }), { newline: !0 });
  57544. }, t.prototype.setBackgroundColor = function(e) {
  57545. this._backgroundColor = e;
  57546. }, t.prototype.getSvgRoot = function() {
  57547. return this._mainVNode && this._mainVNode.elm;
  57548. }, t.prototype._paintList = function(e, n, r) {
  57549. for (var i = e.length, a = [], o = 0, s, l, u = 0, c = 0; c < i; c++) {
  57550. var f = e[c];
  57551. if (!f.invisible) {
  57552. var d = f.__clipPaths, h = d && d.length || 0, p = l && l.length || 0, v = void 0;
  57553. for (v = Math.max(h - 1, p - 1); v >= 0 && !(d && l && d[v] === l[v]); v--)
  57554. ;
  57555. for (var g = p - 1; g > v; g--)
  57556. o--, s = a[o - 1];
  57557. for (var m = v + 1; m < h; m++) {
  57558. var y = {};
  57559. h3e(d[m], y, n);
  57560. var b = Xn("g", "clip-g-" + u++, y, []);
  57561. (s ? s.children : r).push(b), a[o++] = b, s = b;
  57562. }
  57563. l = d;
  57564. var _ = SV(f, n);
  57565. _ && (s ? s.children : r).push(_);
  57566. }
  57567. }
  57568. }, t.prototype.resize = function(e, n) {
  57569. var r = this._opts, i = this.root, a = this._viewport;
  57570. if (e != null && (r.width = e), n != null && (r.height = n), i && a && (a.style.display = "none", e = Fd(i, 0, r), n = Fd(i, 1, r), a.style.display = ""), this._width !== e || this._height !== n) {
  57571. if (this._width = e, this._height = n, a) {
  57572. var o = a.style;
  57573. o.width = e + "px", o.height = n + "px";
  57574. }
  57575. if (wR(this._backgroundColor))
  57576. this.refresh();
  57577. else {
  57578. var s = this._svgDom;
  57579. s && (s.setAttribute("width", e), s.setAttribute("height", n));
  57580. var l = this._bgVNode && this._bgVNode.elm;
  57581. l && (l.setAttribute("width", e), l.setAttribute("height", n));
  57582. }
  57583. }
  57584. }, t.prototype.getWidth = function() {
  57585. return this._width;
  57586. }, t.prototype.getHeight = function() {
  57587. return this._height;
  57588. }, t.prototype.dispose = function() {
  57589. this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
  57590. }, t.prototype.clear = function() {
  57591. this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
  57592. }, t.prototype.toDataURL = function(e) {
  57593. var n = this.renderToString(), r = "data:image/svg+xml;";
  57594. return e ? (n = aDe(n), n && r + "base64," + n) : r + "charset=UTF-8," + encodeURIComponent(n);
  57595. }, t;
  57596. }();
  57597. function PV(t) {
  57598. return function() {
  57599. process.env.NODE_ENV !== "production" && Oa('In SVG mode painter not support method "' + t + '"');
  57600. };
  57601. }
  57602. function O3e(t, e, n, r) {
  57603. var i;
  57604. if (n && n !== "none")
  57605. if (i = Xn("rect", "bg", {
  57606. width: t,
  57607. height: e,
  57608. x: "0",
  57609. y: "0"
  57610. }), Uq(n))
  57611. Mte({ fill: n }, i.attrs, "fill", r);
  57612. else if (wR(n))
  57613. Ite({
  57614. style: {
  57615. fill: n
  57616. },
  57617. dirty: On,
  57618. getBoundingRect: function() {
  57619. return { width: t, height: e };
  57620. }
  57621. }, i.attrs, "fill", r);
  57622. else {
  57623. var a = Sm(n), o = a.color, s = a.opacity;
  57624. i.attrs.fill = o, s < 1 && (i.attrs["fill-opacity"] = s);
  57625. }
  57626. return i;
  57627. }
  57628. function S3e(t) {
  57629. t.registerPainter("svg", _3e);
  57630. }
  57631. function $V(t, e, n) {
  57632. var r = io.createCanvas(), i = e.getWidth(), a = e.getHeight(), o = r.style;
  57633. return o && (o.position = "absolute", o.left = "0", o.top = "0", o.width = i + "px", o.height = a + "px", r.setAttribute("data-zr-dom-id", t)), r.width = i * n, r.height = a * n, r;
  57634. }
  57635. var eP = function(t) {
  57636. q(e, t);
  57637. function e(n, r, i) {
  57638. var a = t.call(this) || this;
  57639. a.motionBlur = !1, a.lastFrameAlpha = 0.7, a.dpr = 1, a.virtual = !1, a.config = {}, a.incremental = !1, a.zlevel = 0, a.maxRepaintRectCount = 5, a.__dirty = !0, a.__firstTimePaint = !0, a.__used = !1, a.__drawIndex = 0, a.__startIndex = 0, a.__endIndex = 0, a.__prevStartIndex = null, a.__prevEndIndex = null;
  57640. var o;
  57641. i = i || nO, typeof n == "string" ? o = $V(n, r, i) : Ie(n) && (o = n, n = o.id), a.id = n, a.dom = o;
  57642. var s = o.style;
  57643. return s && (bR(o), o.onselectstart = function() {
  57644. return !1;
  57645. }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), a.painter = r, a.dpr = i, a;
  57646. }
  57647. return e.prototype.getElementCount = function() {
  57648. return this.__endIndex - this.__startIndex;
  57649. }, e.prototype.afterBrush = function() {
  57650. this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex;
  57651. }, e.prototype.initContext = function() {
  57652. this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
  57653. }, e.prototype.setUnpainted = function() {
  57654. this.__firstTimePaint = !0;
  57655. }, e.prototype.createBackBuffer = function() {
  57656. var n = this.dpr;
  57657. this.domBack = $V("back-" + this.id, this.painter, n), this.ctxBack = this.domBack.getContext("2d"), n !== 1 && this.ctxBack.scale(n, n);
  57658. }, e.prototype.createRepaintRects = function(n, r, i, a) {
  57659. if (this.__firstTimePaint)
  57660. return this.__firstTimePaint = !1, null;
  57661. var o = [], s = this.maxRepaintRectCount, l = !1, u = new Je(0, 0, 0, 0);
  57662. function c(y) {
  57663. if (!(!y.isFinite() || y.isZero()))
  57664. if (o.length === 0) {
  57665. var b = new Je(0, 0, 0, 0);
  57666. b.copy(y), o.push(b);
  57667. } else {
  57668. for (var _ = !1, O = 1 / 0, S = 0, x = 0; x < o.length; ++x) {
  57669. var C = o[x];
  57670. if (C.intersect(y)) {
  57671. var T = new Je(0, 0, 0, 0);
  57672. T.copy(C), T.union(y), o[x] = T, _ = !0;
  57673. break;
  57674. } else if (l) {
  57675. u.copy(y), u.union(C);
  57676. var w = y.width * y.height, P = C.width * C.height, $ = u.width * u.height, A = $ - w - P;
  57677. A < O && (O = A, S = x);
  57678. }
  57679. }
  57680. if (l && (o[S].union(y), _ = !0), !_) {
  57681. var b = new Je(0, 0, 0, 0);
  57682. b.copy(y), o.push(b);
  57683. }
  57684. l || (l = o.length >= s);
  57685. }
  57686. }
  57687. for (var f = this.__startIndex; f < this.__endIndex; ++f) {
  57688. var d = n[f];
  57689. if (d) {
  57690. var h = d.shouldBePainted(i, a, !0, !0), p = d.__isRendered && (d.__dirty & ki || !h) ? d.getPrevPaintRect() : null;
  57691. p && c(p);
  57692. var v = h && (d.__dirty & ki || !d.__isRendered) ? d.getPaintRect() : null;
  57693. v && c(v);
  57694. }
  57695. }
  57696. for (var f = this.__prevStartIndex; f < this.__prevEndIndex; ++f) {
  57697. var d = r[f], h = d && d.shouldBePainted(i, a, !0, !0);
  57698. if (d && (!h || !d.__zr) && d.__isRendered) {
  57699. var p = d.getPrevPaintRect();
  57700. p && c(p);
  57701. }
  57702. }
  57703. var g;
  57704. do {
  57705. g = !1;
  57706. for (var f = 0; f < o.length; ) {
  57707. if (o[f].isZero()) {
  57708. o.splice(f, 1);
  57709. continue;
  57710. }
  57711. for (var m = f + 1; m < o.length; )
  57712. o[f].intersect(o[m]) ? (g = !0, o[f].union(o[m]), o.splice(m, 1)) : m++;
  57713. f++;
  57714. }
  57715. } while (g);
  57716. return this._paintRects = o, o;
  57717. }, e.prototype.debugGetPaintRects = function() {
  57718. return (this._paintRects || []).slice();
  57719. }, e.prototype.resize = function(n, r) {
  57720. var i = this.dpr, a = this.dom, o = a.style, s = this.domBack;
  57721. o && (o.width = n + "px", o.height = r + "px"), a.width = n * i, a.height = r * i, s && (s.width = n * i, s.height = r * i, i !== 1 && this.ctxBack.scale(i, i));
  57722. }, e.prototype.clear = function(n, r, i) {
  57723. var a = this.dom, o = this.ctx, s = a.width, l = a.height;
  57724. r = r || this.clearColor;
  57725. var u = this.motionBlur && !n, c = this.lastFrameAlpha, f = this.dpr, d = this;
  57726. u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(a, 0, 0, s / f, l / f));
  57727. var h = this.domBack;
  57728. function p(v, g, m, y) {
  57729. if (o.clearRect(v, g, m, y), r && r !== "transparent") {
  57730. var b = void 0;
  57731. if (M0(r)) {
  57732. var _ = r.global || r.__width === m && r.__height === y;
  57733. b = _ && r.__canvasGradient || YA(o, r, {
  57734. x: 0,
  57735. y: 0,
  57736. width: m,
  57737. height: y
  57738. }), r.__canvasGradient = b, r.__width = m, r.__height = y;
  57739. } else Cq(r) && (r.scaleX = r.scaleX || f, r.scaleY = r.scaleY || f, b = qA(o, r, {
  57740. dirty: function() {
  57741. d.setUnpainted(), d.painter.refresh();
  57742. }
  57743. }));
  57744. o.save(), o.fillStyle = b || r, o.fillRect(v, g, m, y), o.restore();
  57745. }
  57746. u && (o.save(), o.globalAlpha = c, o.drawImage(h, v, g, m, y), o.restore());
  57747. }
  57748. !i || u ? p(0, 0, s, l) : i.length && k(i, function(v) {
  57749. p(v.x * f, v.y * f, v.width * f, v.height * f);
  57750. });
  57751. }, e;
  57752. }(Ra), AV = 1e5, sc = 314159, bb = 0.01, x3e = 1e-3;
  57753. function w3e(t) {
  57754. return t ? t.__builtin__ ? !0 : !(typeof t.resize != "function" || typeof t.refresh != "function") : !1;
  57755. }
  57756. function C3e(t, e) {
  57757. var n = document.createElement("div");
  57758. return n.style.cssText = [
  57759. "position:relative",
  57760. "width:" + t + "px",
  57761. "height:" + e + "px",
  57762. "padding:0",
  57763. "margin:0",
  57764. "border-width:0"
  57765. ].join(";") + ";", n;
  57766. }
  57767. var T3e = function() {
  57768. function t(e, n, r, i) {
  57769. this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
  57770. var a = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
  57771. this._opts = r = le({}, r || {}), this.dpr = r.devicePixelRatio || nO, this._singleCanvas = a, this.root = e;
  57772. var o = e.style;
  57773. o && (bR(e), e.innerHTML = ""), this.storage = n;
  57774. var s = this._zlevelList;
  57775. this._prevDisplayList = [];
  57776. var l = this._layers;
  57777. if (a) {
  57778. var c = e, f = c.width, d = c.height;
  57779. r.width != null && (f = r.width), r.height != null && (d = r.height), this.dpr = r.devicePixelRatio || 1, c.width = f * this.dpr, c.height = d * this.dpr, this._width = f, this._height = d;
  57780. var h = new eP(c, this, this.dpr);
  57781. h.__builtin__ = !0, h.initContext(), l[sc] = h, h.zlevel = sc, s.push(sc), this._domRoot = e;
  57782. } else {
  57783. this._width = Fd(e, 0, r), this._height = Fd(e, 1, r);
  57784. var u = this._domRoot = C3e(this._width, this._height);
  57785. e.appendChild(u);
  57786. }
  57787. }
  57788. return t.prototype.getType = function() {
  57789. return "canvas";
  57790. }, t.prototype.isSingleCanvas = function() {
  57791. return this._singleCanvas;
  57792. }, t.prototype.getViewportRoot = function() {
  57793. return this._domRoot;
  57794. }, t.prototype.getViewportRootOffset = function() {
  57795. var e = this.getViewportRoot();
  57796. if (e)
  57797. return {
  57798. offsetLeft: e.offsetLeft || 0,
  57799. offsetTop: e.offsetTop || 0
  57800. };
  57801. }, t.prototype.refresh = function(e) {
  57802. var n = this.storage.getDisplayList(!0), r = this._prevDisplayList, i = this._zlevelList;
  57803. this._redrawId = Math.random(), this._paintList(n, r, e, this._redrawId);
  57804. for (var a = 0; a < i.length; a++) {
  57805. var o = i[a], s = this._layers[o];
  57806. if (!s.__builtin__ && s.refresh) {
  57807. var l = a === 0 ? this._backgroundColor : null;
  57808. s.refresh(l);
  57809. }
  57810. }
  57811. return this._opts.useDirtyRect && (this._prevDisplayList = n.slice()), this;
  57812. }, t.prototype.refreshHover = function() {
  57813. this._paintHoverList(this.storage.getDisplayList(!1));
  57814. }, t.prototype._paintHoverList = function(e) {
  57815. var n = e.length, r = this._hoverlayer;
  57816. if (r && r.clear(), !!n) {
  57817. for (var i = {
  57818. inHover: !0,
  57819. viewWidth: this._width,
  57820. viewHeight: this._height
  57821. }, a, o = 0; o < n; o++) {
  57822. var s = e[o];
  57823. s.__inHover && (r || (r = this._hoverlayer = this.getLayer(AV)), a || (a = r.ctx, a.save()), Vc(a, s, i, o === n - 1));
  57824. }
  57825. a && a.restore();
  57826. }
  57827. }, t.prototype.getHoverLayer = function() {
  57828. return this.getLayer(AV);
  57829. }, t.prototype.paintOne = function(e, n) {
  57830. dk(e, n);
  57831. }, t.prototype._paintList = function(e, n, r, i) {
  57832. if (this._redrawId === i) {
  57833. r = r || !1, this._updateLayerStatus(e);
  57834. var a = this._doPaintList(e, n, r), o = a.finished, s = a.needsRefreshHover;
  57835. if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
  57836. this.eachLayer(function(u) {
  57837. u.afterBrush && u.afterBrush();
  57838. });
  57839. else {
  57840. var l = this;
  57841. Y1(function() {
  57842. l._paintList(e, n, r, i);
  57843. });
  57844. }
  57845. }
  57846. }, t.prototype._compositeManually = function() {
  57847. var e = this.getLayer(sc).ctx, n = this._domRoot.width, r = this._domRoot.height;
  57848. e.clearRect(0, 0, n, r), this.eachBuiltinLayer(function(i) {
  57849. i.virtual && e.drawImage(i.dom, 0, 0, n, r);
  57850. });
  57851. }, t.prototype._doPaintList = function(e, n, r) {
  57852. for (var i = this, a = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
  57853. var l = this._zlevelList[s], u = this._layers[l];
  57854. u.__builtin__ && u !== this._hoverlayer && (u.__dirty || r) && a.push(u);
  57855. }
  57856. for (var c = !0, f = !1, d = function(v) {
  57857. var g = a[v], m = g.ctx, y = o && g.createRepaintRects(e, n, h._width, h._height), b = r ? g.__startIndex : g.__drawIndex, _ = !r && g.incremental && Date.now, O = _ && Date.now(), S = g.zlevel === h._zlevelList[0] ? h._backgroundColor : null;
  57858. if (g.__startIndex === g.__endIndex)
  57859. g.clear(!1, S, y);
  57860. else if (b === g.__startIndex) {
  57861. var x = e[b];
  57862. (!x.incremental || !x.notClear || r) && g.clear(!1, S, y);
  57863. }
  57864. b === -1 && (console.error("For some unknown reason. drawIndex is -1"), b = g.__startIndex);
  57865. var C, T = function(A) {
  57866. var D = {
  57867. inHover: !1,
  57868. allClipped: !1,
  57869. prevEl: null,
  57870. viewWidth: i._width,
  57871. viewHeight: i._height
  57872. };
  57873. for (C = b; C < g.__endIndex; C++) {
  57874. var E = e[C];
  57875. if (E.__inHover && (f = !0), i._doPaintEl(E, g, o, A, D, C === g.__endIndex - 1), _) {
  57876. var R = Date.now() - O;
  57877. if (R > 15)
  57878. break;
  57879. }
  57880. }
  57881. D.prevElClipPaths && m.restore();
  57882. };
  57883. if (y)
  57884. if (y.length === 0)
  57885. C = g.__endIndex;
  57886. else
  57887. for (var w = h.dpr, P = 0; P < y.length; ++P) {
  57888. var $ = y[P];
  57889. m.save(), m.beginPath(), m.rect($.x * w, $.y * w, $.width * w, $.height * w), m.clip(), T($), m.restore();
  57890. }
  57891. else
  57892. m.save(), T(), m.restore();
  57893. g.__drawIndex = C, g.__drawIndex < g.__endIndex && (c = !1);
  57894. }, h = this, p = 0; p < a.length; p++)
  57895. d(p);
  57896. return vt.wxa && k(this._layers, function(v) {
  57897. v && v.ctx && v.ctx.draw && v.ctx.draw();
  57898. }), {
  57899. finished: c,
  57900. needsRefreshHover: f
  57901. };
  57902. }, t.prototype._doPaintEl = function(e, n, r, i, a, o) {
  57903. var s = n.ctx;
  57904. if (r) {
  57905. var l = e.getPaintRect();
  57906. (!i || l && l.intersect(i)) && (Vc(s, e, a, o), e.setPrevPaintRect(l));
  57907. } else
  57908. Vc(s, e, a, o);
  57909. }, t.prototype.getLayer = function(e, n) {
  57910. this._singleCanvas && !this._needsManuallyCompositing && (e = sc);
  57911. var r = this._layers[e];
  57912. return r || (r = new eP("zr_" + e, this, this.dpr), r.zlevel = e, r.__builtin__ = !0, this._layerConfig[e] ? qe(r, this._layerConfig[e], !0) : this._layerConfig[e - bb] && qe(r, this._layerConfig[e - bb], !0), n && (r.virtual = n), this.insertLayer(e, r), r.initContext()), r;
  57913. }, t.prototype.insertLayer = function(e, n) {
  57914. var r = this._layers, i = this._zlevelList, a = i.length, o = this._domRoot, s = null, l = -1;
  57915. if (r[e]) {
  57916. process.env.NODE_ENV !== "production" && Oa("ZLevel " + e + " has been used already");
  57917. return;
  57918. }
  57919. if (!w3e(n)) {
  57920. process.env.NODE_ENV !== "production" && Oa("Layer of zlevel " + e + " is not valid");
  57921. return;
  57922. }
  57923. if (a > 0 && e > i[0]) {
  57924. for (l = 0; l < a - 1 && !(i[l] < e && i[l + 1] > e); l++)
  57925. ;
  57926. s = r[i[l]];
  57927. }
  57928. if (i.splice(l + 1, 0, e), r[e] = n, !n.virtual)
  57929. if (s) {
  57930. var u = s.dom;
  57931. u.nextSibling ? o.insertBefore(n.dom, u.nextSibling) : o.appendChild(n.dom);
  57932. } else
  57933. o.firstChild ? o.insertBefore(n.dom, o.firstChild) : o.appendChild(n.dom);
  57934. n.painter || (n.painter = this);
  57935. }, t.prototype.eachLayer = function(e, n) {
  57936. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57937. var a = r[i];
  57938. e.call(n, this._layers[a], a);
  57939. }
  57940. }, t.prototype.eachBuiltinLayer = function(e, n) {
  57941. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57942. var a = r[i], o = this._layers[a];
  57943. o.__builtin__ && e.call(n, o, a);
  57944. }
  57945. }, t.prototype.eachOtherLayer = function(e, n) {
  57946. for (var r = this._zlevelList, i = 0; i < r.length; i++) {
  57947. var a = r[i], o = this._layers[a];
  57948. o.__builtin__ || e.call(n, o, a);
  57949. }
  57950. }, t.prototype.getLayers = function() {
  57951. return this._layers;
  57952. }, t.prototype._updateLayerStatus = function(e) {
  57953. this.eachBuiltinLayer(function(f, d) {
  57954. f.__dirty = f.__used = !1;
  57955. });
  57956. function n(f) {
  57957. a && (a.__endIndex !== f && (a.__dirty = !0), a.__endIndex = f);
  57958. }
  57959. if (this._singleCanvas)
  57960. for (var r = 1; r < e.length; r++) {
  57961. var i = e[r];
  57962. if (i.zlevel !== e[r - 1].zlevel || i.incremental) {
  57963. this._needsManuallyCompositing = !0;
  57964. break;
  57965. }
  57966. }
  57967. var a = null, o = 0, s, l;
  57968. for (l = 0; l < e.length; l++) {
  57969. var i = e[l], u = i.zlevel, c = void 0;
  57970. s !== u && (s = u, o = 0), i.incremental ? (c = this.getLayer(u + x3e, this._needsManuallyCompositing), c.incremental = !0, o = 1) : c = this.getLayer(u + (o > 0 ? bb : 0), this._needsManuallyCompositing), c.__builtin__ || Oa("ZLevel " + u + " has been used by unkown layer " + c.id), c !== a && (c.__used = !0, c.__startIndex !== l && (c.__dirty = !0), c.__startIndex = l, c.incremental ? c.__drawIndex = -1 : c.__drawIndex = l, n(l), a = c), i.__dirty & ki && !i.__inHover && (c.__dirty = !0, c.incremental && c.__drawIndex < 0 && (c.__drawIndex = l));
  57971. }
  57972. n(l), this.eachBuiltinLayer(function(f, d) {
  57973. !f.__used && f.getElementCount() > 0 && (f.__dirty = !0, f.__startIndex = f.__endIndex = f.__drawIndex = 0), f.__dirty && f.__drawIndex < 0 && (f.__drawIndex = f.__startIndex);
  57974. });
  57975. }, t.prototype.clear = function() {
  57976. return this.eachBuiltinLayer(this._clearLayer), this;
  57977. }, t.prototype._clearLayer = function(e) {
  57978. e.clear();
  57979. }, t.prototype.setBackgroundColor = function(e) {
  57980. this._backgroundColor = e, k(this._layers, function(n) {
  57981. n.setUnpainted();
  57982. });
  57983. }, t.prototype.configLayer = function(e, n) {
  57984. if (n) {
  57985. var r = this._layerConfig;
  57986. r[e] ? qe(r[e], n, !0) : r[e] = n;
  57987. for (var i = 0; i < this._zlevelList.length; i++) {
  57988. var a = this._zlevelList[i];
  57989. if (a === e || a === e + bb) {
  57990. var o = this._layers[a];
  57991. qe(o, r[e], !0);
  57992. }
  57993. }
  57994. }
  57995. }, t.prototype.delLayer = function(e) {
  57996. var n = this._layers, r = this._zlevelList, i = n[e];
  57997. i && (i.dom.parentNode.removeChild(i.dom), delete n[e], r.splice(et(r, e), 1));
  57998. }, t.prototype.resize = function(e, n) {
  57999. if (this._domRoot.style) {
  58000. var r = this._domRoot;
  58001. r.style.display = "none";
  58002. var i = this._opts, a = this.root;
  58003. if (e != null && (i.width = e), n != null && (i.height = n), e = Fd(a, 0, i), n = Fd(a, 1, i), r.style.display = "", this._width !== e || n !== this._height) {
  58004. r.style.width = e + "px", r.style.height = n + "px";
  58005. for (var o in this._layers)
  58006. this._layers.hasOwnProperty(o) && this._layers[o].resize(e, n);
  58007. this.refresh(!0);
  58008. }
  58009. this._width = e, this._height = n;
  58010. } else {
  58011. if (e == null || n == null)
  58012. return;
  58013. this._width = e, this._height = n, this.getLayer(sc).resize(e, n);
  58014. }
  58015. return this;
  58016. }, t.prototype.clearLayer = function(e) {
  58017. var n = this._layers[e];
  58018. n && n.clear();
  58019. }, t.prototype.dispose = function() {
  58020. this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
  58021. }, t.prototype.getRenderedCanvas = function(e) {
  58022. if (e = e || {}, this._singleCanvas && !this._compositeManually)
  58023. return this._layers[sc].dom;
  58024. var n = new eP("image", this, e.pixelRatio || this.dpr);
  58025. n.initContext(), n.clear(!1, e.backgroundColor || this._backgroundColor);
  58026. var r = n.ctx;
  58027. if (e.pixelRatio <= this.dpr) {
  58028. this.refresh();
  58029. var i = n.dom.width, a = n.dom.height;
  58030. this.eachLayer(function(f) {
  58031. f.__builtin__ ? r.drawImage(f.dom, 0, 0, i, a) : f.renderToCanvas && (r.save(), f.renderToCanvas(r), r.restore());
  58032. });
  58033. } else
  58034. for (var o = {
  58035. inHover: !1,
  58036. viewWidth: this._width,
  58037. viewHeight: this._height
  58038. }, s = this.storage.getDisplayList(!0), l = 0, u = s.length; l < u; l++) {
  58039. var c = s[l];
  58040. Vc(r, c, o, l === u - 1);
  58041. }
  58042. return n.dom;
  58043. }, t.prototype.getWidth = function() {
  58044. return this._width;
  58045. }, t.prototype.getHeight = function() {
  58046. return this._height;
  58047. }, t;
  58048. }();
  58049. function P3e(t) {
  58050. t.registerPainter("canvas", T3e);
  58051. }
  58052. var $3e = (
  58053. /** @class */
  58054. function(t) {
  58055. q(e, t);
  58056. function e() {
  58057. var n = t !== null && t.apply(this, arguments) || this;
  58058. return n.type = e.type, n.hasSymbolVisual = !0, n;
  58059. }
  58060. return e.prototype.getInitialData = function(n) {
  58061. if (process.env.NODE_ENV !== "production") {
  58062. var r = n.coordinateSystem;
  58063. if (r !== "polar" && r !== "cartesian2d")
  58064. throw new Error("Line not support coordinateSystem besides cartesian and polar");
  58065. }
  58066. return us(null, this, {
  58067. useEncodeDefaulter: !0
  58068. });
  58069. }, e.prototype.getLegendIcon = function(n) {
  58070. var r = new Ve(), i = $n("line", 0, n.itemHeight / 2, n.itemWidth, 0, n.lineStyle.stroke, !1);
  58071. r.add(i), i.setStyle(n.lineStyle);
  58072. var a = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = a === "none" ? "circle" : a, l = n.itemHeight * 0.8, u = $n(s, (n.itemWidth - l) / 2, (n.itemHeight - l) / 2, l, l, n.itemStyle.fill);
  58073. r.add(u), u.setStyle(n.itemStyle);
  58074. var c = n.iconRotate === "inherit" ? o : n.iconRotate || 0;
  58075. return u.rotation = c * Math.PI / 180, u.setOrigin([n.itemWidth / 2, n.itemHeight / 2]), s.indexOf("empty") > -1 && (u.style.stroke = u.style.fill, u.style.fill = "#fff", u.style.lineWidth = 2), r;
  58076. }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
  58077. // zlevel: 0,
  58078. z: 3,
  58079. coordinateSystem: "cartesian2d",
  58080. legendHoverLink: !0,
  58081. clip: !0,
  58082. label: {
  58083. position: "top"
  58084. },
  58085. // itemStyle: {
  58086. // },
  58087. endLabel: {
  58088. show: !1,
  58089. valueAnimation: !0,
  58090. distance: 8
  58091. },
  58092. lineStyle: {
  58093. width: 2,
  58094. type: "solid"
  58095. },
  58096. emphasis: {
  58097. scale: !0
  58098. },
  58099. // areaStyle: {
  58100. // origin of areaStyle. Valid values:
  58101. // `'auto'/null/undefined`: from axisLine to data
  58102. // `'start'`: from min to data
  58103. // `'end'`: from data to max
  58104. // origin: 'auto'
  58105. // },
  58106. // false, 'start', 'end', 'middle'
  58107. step: !1,
  58108. // Disabled if step is true
  58109. smooth: !1,
  58110. smoothMonotone: null,
  58111. symbol: "emptyCircle",
  58112. symbolSize: 4,
  58113. symbolRotate: null,
  58114. showSymbol: !0,
  58115. // `false`: follow the label interval strategy.
  58116. // `true`: show all symbols.
  58117. // `'auto'`: If possible, show all symbols, otherwise
  58118. // follow the label interval strategy.
  58119. showAllSymbol: "auto",
  58120. // Whether to connect break point.
  58121. connectNulls: !1,
  58122. // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.
  58123. sampling: "none",
  58124. animationEasing: "linear",
  58125. // Disable progressive
  58126. progressive: 0,
  58127. hoverLayerThreshold: 1 / 0,
  58128. universalTransition: {
  58129. divideShape: "clone"
  58130. },
  58131. triggerLineEvent: !1
  58132. }, e;
  58133. }(Ht)
  58134. );
  58135. function Wh(t, e) {
  58136. var n = t.mapDimensionsAll("defaultedLabel"), r = n.length;
  58137. if (r === 1) {
  58138. var i = Vh(t, e, n[0]);
  58139. return i != null ? i + "" : null;
  58140. } else if (r) {
  58141. for (var a = [], o = 0; o < n.length; o++)
  58142. a.push(Vh(t, e, n[o]));
  58143. return a.join(" ");
  58144. }
  58145. }
  58146. function Lte(t, e) {
  58147. var n = t.mapDimensionsAll("defaultedLabel");
  58148. if (!ue(e))
  58149. return e + "";
  58150. for (var r = [], i = 0; i < n.length; i++) {
  58151. var a = t.getDimensionIndex(n[i]);
  58152. a >= 0 && r.push(e[a]);
  58153. }
  58154. return r.join(" ");
  58155. }
  58156. var j0 = (
  58157. /** @class */
  58158. function(t) {
  58159. q(e, t);
  58160. function e(n, r, i, a) {
  58161. var o = t.call(this) || this;
  58162. return o.updateData(n, r, i, a), o;
  58163. }
  58164. return e.prototype._createSymbol = function(n, r, i, a, o) {
  58165. this.removeAll();
  58166. var s = $n(n, -1, -1, 2, 2, null, o);
  58167. s.attr({
  58168. z2: 100,
  58169. culling: !0,
  58170. scaleX: a[0] / 2,
  58171. scaleY: a[1] / 2
  58172. }), s.drift = A3e, this._symbolType = n, this.add(s);
  58173. }, e.prototype.stopSymbolAnimation = function(n) {
  58174. this.childAt(0).stopAnimation(null, n);
  58175. }, e.prototype.getSymbolType = function() {
  58176. return this._symbolType;
  58177. }, e.prototype.getSymbolPath = function() {
  58178. return this.childAt(0);
  58179. }, e.prototype.highlight = function() {
  58180. js(this.childAt(0));
  58181. }, e.prototype.downplay = function() {
  58182. Zs(this.childAt(0));
  58183. }, e.prototype.setZ = function(n, r) {
  58184. var i = this.childAt(0);
  58185. i.zlevel = n, i.z = r;
  58186. }, e.prototype.setDraggable = function(n, r) {
  58187. var i = this.childAt(0);
  58188. i.draggable = n, i.cursor = !r && n ? "move" : i.cursor;
  58189. }, e.prototype.updateData = function(n, r, i, a) {
  58190. this.silent = !1;
  58191. var o = n.getItemVisual(r, "symbol") || "circle", s = n.hostModel, l = e.getSymbolSize(n, r), u = o !== this._symbolType, c = a && a.disableAnimation;
  58192. if (u) {
  58193. var f = n.getItemVisual(r, "symbolKeepAspect");
  58194. this._createSymbol(o, n, r, l, f);
  58195. } else {
  58196. var d = this.childAt(0);
  58197. d.silent = !1;
  58198. var h = {
  58199. scaleX: l[0] / 2,
  58200. scaleY: l[1] / 2
  58201. };
  58202. c ? d.attr(h) : Ct(d, h, s, r), so(d);
  58203. }
  58204. if (this._updateCommon(n, r, l, i, a), u) {
  58205. var d = this.childAt(0);
  58206. if (!c) {
  58207. var h = {
  58208. scaleX: this._sizeX,
  58209. scaleY: this._sizeY,
  58210. style: {
  58211. // Always fadeIn. Because it has fadeOut animation when symbol is removed..
  58212. opacity: d.style.opacity
  58213. }
  58214. };
  58215. d.scaleX = d.scaleY = 0, d.style.opacity = 0, Yt(d, h, s, r);
  58216. }
  58217. }
  58218. c && this.childAt(0).stopAnimation("leave");
  58219. }, e.prototype._updateCommon = function(n, r, i, a, o) {
  58220. var s = this.childAt(0), l = n.hostModel, u, c, f, d, h, p, v, g, m;
  58221. if (a && (u = a.emphasisItemStyle, c = a.blurItemStyle, f = a.selectItemStyle, d = a.focus, h = a.blurScope, v = a.labelStatesModels, g = a.hoverScale, m = a.cursorStyle, p = a.emphasisDisabled), !a || n.hasItemOption) {
  58222. var y = a && a.itemModel ? a.itemModel : n.getItemModel(r), b = y.getModel("emphasis");
  58223. u = b.getModel("itemStyle").getItemStyle(), f = y.getModel(["select", "itemStyle"]).getItemStyle(), c = y.getModel(["blur", "itemStyle"]).getItemStyle(), d = b.get("focus"), h = b.get("blurScope"), p = b.get("disabled"), v = er(y), g = b.getShallow("scale"), m = y.getShallow("cursor");
  58224. }
  58225. var _ = n.getItemVisual(r, "symbolRotate");
  58226. s.attr("rotation", (_ || 0) * Math.PI / 180 || 0);
  58227. var O = Vf(n.getItemVisual(r, "symbolOffset"), i);
  58228. O && (s.x = O[0], s.y = O[1]), m && s.attr("cursor", m);
  58229. var S = n.getItemVisual(r, "style"), x = S.fill;
  58230. if (s instanceof lr) {
  58231. var C = s.style;
  58232. s.useStyle(le({
  58233. // TODO other properties like x, y ?
  58234. image: C.image,
  58235. x: C.x,
  58236. y: C.y,
  58237. width: C.width,
  58238. height: C.height
  58239. }, S));
  58240. } else
  58241. s.__isEmptyBrush ? s.useStyle(le({}, S)) : s.useStyle(S), s.style.decal = null, s.setColor(x, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
  58242. var T = n.getItemVisual(r, "liftZ"), w = this._z2;
  58243. T != null ? w == null && (this._z2 = s.z2, s.z2 += T) : w != null && (s.z2 = w, this._z2 = null);
  58244. var P = o && o.useNameLabel;
  58245. Pr(s, v, {
  58246. labelFetcher: l,
  58247. labelDataIndex: r,
  58248. defaultText: $,
  58249. inheritColor: x,
  58250. defaultOpacity: S.opacity
  58251. });
  58252. function $(E) {
  58253. return P ? n.getName(E) : Wh(n, E);
  58254. }
  58255. this._sizeX = i[0] / 2, this._sizeY = i[1] / 2;
  58256. var A = s.ensureState("emphasis");
  58257. A.style = u, s.ensureState("select").style = f, s.ensureState("blur").style = c;
  58258. var D = g == null || g === !0 ? Math.max(1.1, 3 / this._sizeY) : isFinite(g) && g > 0 ? +g : 1;
  58259. A.scaleX = this._sizeX * D, A.scaleY = this._sizeY * D, this.setSymbolScale(1), bn(this, d, h, p);
  58260. }, e.prototype.setSymbolScale = function(n) {
  58261. this.scaleX = this.scaleY = n;
  58262. }, e.prototype.fadeOut = function(n, r, i) {
  58263. var a = this.childAt(0), o = Fe(this).dataIndex, s = i && i.animation;
  58264. if (this.silent = a.silent = !0, i && i.fadeLabel) {
  58265. var l = a.getTextContent();
  58266. l && uu(l, {
  58267. style: {
  58268. opacity: 0
  58269. }
  58270. }, r, {
  58271. dataIndex: o,
  58272. removeOpt: s,
  58273. cb: function() {
  58274. a.removeTextContent();
  58275. }
  58276. });
  58277. } else
  58278. a.removeTextContent();
  58279. uu(a, {
  58280. style: {
  58281. opacity: 0
  58282. },
  58283. scaleX: 0,
  58284. scaleY: 0
  58285. }, r, {
  58286. dataIndex: o,
  58287. cb: n,
  58288. removeOpt: s
  58289. });
  58290. }, e.getSymbolSize = function(n, r) {
  58291. return xp(n.getItemVisual(r, "symbolSize"));
  58292. }, e;
  58293. }(Ve)
  58294. );
  58295. function A3e(t, e) {
  58296. this.parent.drift(t, e);
  58297. }
  58298. function tP(t, e, n, r) {
  58299. return e && !isNaN(e[0]) && !isNaN(e[1]) && !(r.isIgnore && r.isIgnore(n)) && !(r.clipShape && !r.clipShape.contain(e[0], e[1])) && t.getItemVisual(n, "symbol") !== "none";
  58300. }
  58301. function EV(t) {
  58302. return t != null && !Ie(t) && (t = {
  58303. isIgnore: t
  58304. }), t || {};
  58305. }
  58306. function MV(t) {
  58307. var e = t.hostModel, n = e.getModel("emphasis");
  58308. return {
  58309. emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
  58310. blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
  58311. selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
  58312. focus: n.get("focus"),
  58313. blurScope: n.get("blurScope"),
  58314. emphasisDisabled: n.get("disabled"),
  58315. hoverScale: n.get("scale"),
  58316. labelStatesModels: er(e),
  58317. cursorStyle: e.get("cursor")
  58318. };
  58319. }
  58320. var Z0 = (
  58321. /** @class */
  58322. function() {
  58323. function t(e) {
  58324. this.group = new Ve(), this._SymbolCtor = e || j0;
  58325. }
  58326. return t.prototype.updateData = function(e, n) {
  58327. this._progressiveEls = null, n = EV(n);
  58328. var r = this.group, i = e.hostModel, a = this._data, o = this._SymbolCtor, s = n.disableAnimation, l = MV(e), u = {
  58329. disableAnimation: s
  58330. }, c = n.getSymbolPoint || function(f) {
  58331. return e.getItemLayout(f);
  58332. };
  58333. a || r.removeAll(), e.diff(a).add(function(f) {
  58334. var d = c(f);
  58335. if (tP(e, d, f, n)) {
  58336. var h = new o(e, f, l, u);
  58337. h.setPosition(d), e.setItemGraphicEl(f, h), r.add(h);
  58338. }
  58339. }).update(function(f, d) {
  58340. var h = a.getItemGraphicEl(d), p = c(f);
  58341. if (!tP(e, p, f, n)) {
  58342. r.remove(h);
  58343. return;
  58344. }
  58345. var v = e.getItemVisual(f, "symbol") || "circle", g = h && h.getSymbolType && h.getSymbolType();
  58346. if (!h || g && g !== v)
  58347. r.remove(h), h = new o(e, f, l, u), h.setPosition(p);
  58348. else {
  58349. h.updateData(e, f, l, u);
  58350. var m = {
  58351. x: p[0],
  58352. y: p[1]
  58353. };
  58354. s ? h.attr(m) : Ct(h, m, i);
  58355. }
  58356. r.add(h), e.setItemGraphicEl(f, h);
  58357. }).remove(function(f) {
  58358. var d = a.getItemGraphicEl(f);
  58359. d && d.fadeOut(function() {
  58360. r.remove(d);
  58361. }, i);
  58362. }).execute(), this._getSymbolPoint = c, this._data = e;
  58363. }, t.prototype.updateLayout = function() {
  58364. var e = this, n = this._data;
  58365. n && n.eachItemGraphicEl(function(r, i) {
  58366. var a = e._getSymbolPoint(i);
  58367. r.setPosition(a), r.markRedraw();
  58368. });
  58369. }, t.prototype.incrementalPrepareUpdate = function(e) {
  58370. this._seriesScope = MV(e), this._data = null, this.group.removeAll();
  58371. }, t.prototype.incrementalUpdate = function(e, n, r) {
  58372. this._progressiveEls = [], r = EV(r);
  58373. function i(l) {
  58374. l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
  58375. }
  58376. for (var a = e.start; a < e.end; a++) {
  58377. var o = n.getItemLayout(a);
  58378. if (tP(n, o, a, r)) {
  58379. var s = new this._SymbolCtor(n, a, this._seriesScope);
  58380. s.traverse(i), s.setPosition(o), this.group.add(s), n.setItemGraphicEl(a, s), this._progressiveEls.push(s);
  58381. }
  58382. }
  58383. }, t.prototype.eachRendered = function(e) {
  58384. Tu(this._progressiveEls || this.group, e);
  58385. }, t.prototype.remove = function(e) {
  58386. var n = this.group, r = this._data;
  58387. r && e ? r.eachItemGraphicEl(function(i) {
  58388. i.fadeOut(function() {
  58389. n.remove(i);
  58390. }, r.hostModel);
  58391. }) : n.removeAll();
  58392. }, t;
  58393. }()
  58394. );
  58395. function Nte(t, e, n) {
  58396. var r = t.getBaseAxis(), i = t.getOtherAxis(r), a = E3e(i, n), o = r.dim, s = i.dim, l = e.mapDimension(s), u = e.mapDimension(o), c = s === "x" || s === "radius" ? 1 : 0, f = ce(t.dimensions, function(p) {
  58397. return e.mapDimension(p);
  58398. }), d = !1, h = e.getCalculationInfo("stackResultDimension");
  58399. return Xs(
  58400. e,
  58401. f[0]
  58402. /* , dims[1] */
  58403. ) && (d = !0, f[0] = h), Xs(
  58404. e,
  58405. f[1]
  58406. /* , dims[0] */
  58407. ) && (d = !0, f[1] = h), {
  58408. dataDimsForPoint: f,
  58409. valueStart: a,
  58410. valueAxisDim: s,
  58411. baseAxisDim: o,
  58412. stacked: !!d,
  58413. valueDim: l,
  58414. baseDim: u,
  58415. baseDataOffset: c,
  58416. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  58417. };
  58418. }
  58419. function E3e(t, e) {
  58420. var n = 0, r = t.scale.getExtent();
  58421. return e === "start" ? n = r[0] : e === "end" ? n = r[1] : St(e) && !isNaN(e) ? n = e : r[0] > 0 ? n = r[0] : r[1] < 0 && (n = r[1]), n;
  58422. }
  58423. function Bte(t, e, n, r) {
  58424. var i = NaN;
  58425. t.stacked && (i = n.get(n.getCalculationInfo("stackedOverDimension"), r)), isNaN(i) && (i = t.valueStart);
  58426. var a = t.baseDataOffset, o = [];
  58427. return o[a] = n.get(t.baseDim, r), o[1 - a] = i, e.dataToPoint(o);
  58428. }
  58429. function M3e(t, e) {
  58430. var n = [];
  58431. return e.diff(t).add(function(r) {
  58432. n.push({
  58433. cmd: "+",
  58434. idx: r
  58435. });
  58436. }).update(function(r, i) {
  58437. n.push({
  58438. cmd: "=",
  58439. idx: i,
  58440. idx1: r
  58441. });
  58442. }).remove(function(r) {
  58443. n.push({
  58444. cmd: "-",
  58445. idx: r
  58446. });
  58447. }).execute(), n;
  58448. }
  58449. function I3e(t, e, n, r, i, a, o, s) {
  58450. for (var l = M3e(t, e), u = [], c = [], f = [], d = [], h = [], p = [], v = [], g = Nte(i, e, o), m = t.getLayout("points") || [], y = e.getLayout("points") || [], b = 0; b < l.length; b++) {
  58451. var _ = l[b], O = !0, S = void 0, x = void 0;
  58452. switch (_.cmd) {
  58453. case "=":
  58454. S = _.idx * 2, x = _.idx1 * 2;
  58455. var C = m[S], T = m[S + 1], w = y[x], P = y[x + 1];
  58456. (isNaN(C) || isNaN(T)) && (C = w, T = P), u.push(C, T), c.push(w, P), f.push(n[S], n[S + 1]), d.push(r[x], r[x + 1]), v.push(e.getRawIndex(_.idx1));
  58457. break;
  58458. case "+":
  58459. var $ = _.idx, A = g.dataDimsForPoint, D = i.dataToPoint([e.get(A[0], $), e.get(A[1], $)]);
  58460. x = $ * 2, u.push(D[0], D[1]), c.push(y[x], y[x + 1]);
  58461. var E = Bte(g, i, e, $);
  58462. f.push(E[0], E[1]), d.push(r[x], r[x + 1]), v.push(e.getRawIndex($));
  58463. break;
  58464. case "-":
  58465. O = !1;
  58466. }
  58467. O && (h.push(_), p.push(p.length));
  58468. }
  58469. p.sort(function(ee, oe) {
  58470. return v[ee] - v[oe];
  58471. });
  58472. for (var R = u.length, N = Fo(R), V = Fo(R), z = Fo(R), W = Fo(R), F = [], b = 0; b < p.length; b++) {
  58473. var Q = p[b], Z = b * 2, ne = Q * 2;
  58474. N[Z] = u[ne], N[Z + 1] = u[ne + 1], V[Z] = c[ne], V[Z + 1] = c[ne + 1], z[Z] = f[ne], z[Z + 1] = f[ne + 1], W[Z] = d[ne], W[Z + 1] = d[ne + 1], F[b] = h[Q];
  58475. }
  58476. return {
  58477. current: N,
  58478. next: V,
  58479. stackedOnCurrent: z,
  58480. stackedOnNext: W,
  58481. status: F
  58482. };
  58483. }
  58484. var ml = Math.min, yl = Math.max;
  58485. function nf(t, e) {
  58486. return isNaN(t) || isNaN(e);
  58487. }
  58488. function lE(t, e, n, r, i, a, o, s, l) {
  58489. for (var u, c, f, d, h, p, v = n, g = 0; g < r; g++) {
  58490. var m = e[v * 2], y = e[v * 2 + 1];
  58491. if (v >= i || v < 0)
  58492. break;
  58493. if (nf(m, y)) {
  58494. if (l) {
  58495. v += a;
  58496. continue;
  58497. }
  58498. break;
  58499. }
  58500. if (v === n)
  58501. t[a > 0 ? "moveTo" : "lineTo"](m, y), f = m, d = y;
  58502. else {
  58503. var b = m - u, _ = y - c;
  58504. if (b * b + _ * _ < 0.5) {
  58505. v += a;
  58506. continue;
  58507. }
  58508. if (o > 0) {
  58509. for (var O = v + a, S = e[O * 2], x = e[O * 2 + 1]; S === m && x === y && g < r; )
  58510. g++, O += a, v += a, S = e[O * 2], x = e[O * 2 + 1], m = e[v * 2], y = e[v * 2 + 1], b = m - u, _ = y - c;
  58511. var C = g + 1;
  58512. if (l)
  58513. for (; nf(S, x) && C < r; )
  58514. C++, O += a, S = e[O * 2], x = e[O * 2 + 1];
  58515. var T = 0.5, w = 0, P = 0, $ = void 0, A = void 0;
  58516. if (C >= r || nf(S, x))
  58517. h = m, p = y;
  58518. else {
  58519. w = S - u, P = x - c;
  58520. var D = m - u, E = S - m, R = y - c, N = x - y, V = void 0, z = void 0;
  58521. if (s === "x") {
  58522. V = Math.abs(D), z = Math.abs(E);
  58523. var W = w > 0 ? 1 : -1;
  58524. h = m - W * V * o, p = y, $ = m + W * z * o, A = y;
  58525. } else if (s === "y") {
  58526. V = Math.abs(R), z = Math.abs(N);
  58527. var F = P > 0 ? 1 : -1;
  58528. h = m, p = y - F * V * o, $ = m, A = y + F * z * o;
  58529. } else
  58530. V = Math.sqrt(D * D + R * R), z = Math.sqrt(E * E + N * N), T = z / (z + V), h = m - w * o * (1 - T), p = y - P * o * (1 - T), $ = m + w * o * T, A = y + P * o * T, $ = ml($, yl(S, m)), A = ml(A, yl(x, y)), $ = yl($, ml(S, m)), A = yl(A, ml(x, y)), w = $ - m, P = A - y, h = m - w * V / z, p = y - P * V / z, h = ml(h, yl(u, m)), p = ml(p, yl(c, y)), h = yl(h, ml(u, m)), p = yl(p, ml(c, y)), w = m - h, P = y - p, $ = m + w * z / V, A = y + P * z / V;
  58531. }
  58532. t.bezierCurveTo(f, d, h, p, m, y), f = $, d = A;
  58533. } else
  58534. t.lineTo(m, y);
  58535. }
  58536. u = m, c = y, v += a;
  58537. }
  58538. return g;
  58539. }
  58540. var zte = (
  58541. /** @class */
  58542. /* @__PURE__ */ function() {
  58543. function t() {
  58544. this.smooth = 0, this.smoothConstraint = !0;
  58545. }
  58546. return t;
  58547. }()
  58548. ), D3e = (
  58549. /** @class */
  58550. function(t) {
  58551. q(e, t);
  58552. function e(n) {
  58553. var r = t.call(this, n) || this;
  58554. return r.type = "ec-polyline", r;
  58555. }
  58556. return e.prototype.getDefaultStyle = function() {
  58557. return {
  58558. stroke: "#000",
  58559. fill: null
  58560. };
  58561. }, e.prototype.getDefaultShape = function() {
  58562. return new zte();
  58563. }, e.prototype.buildPath = function(n, r) {
  58564. var i = r.points, a = 0, o = i.length / 2;
  58565. if (r.connectNulls) {
  58566. for (; o > 0 && nf(i[o * 2 - 2], i[o * 2 - 1]); o--)
  58567. ;
  58568. for (; a < o && nf(i[a * 2], i[a * 2 + 1]); a++)
  58569. ;
  58570. }
  58571. for (; a < o; )
  58572. a += lE(n, i, a, o, o, 1, r.smooth, r.smoothMonotone, r.connectNulls) + 1;
  58573. }, e.prototype.getPointOn = function(n, r) {
  58574. this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
  58575. for (var i = this.path, a = i.data, o = as.CMD, s, l, u = r === "x", c = [], f = 0; f < a.length; ) {
  58576. var d = a[f++], h = void 0, p = void 0, v = void 0, g = void 0, m = void 0, y = void 0, b = void 0;
  58577. switch (d) {
  58578. case o.M:
  58579. s = a[f++], l = a[f++];
  58580. break;
  58581. case o.L:
  58582. if (h = a[f++], p = a[f++], b = u ? (n - s) / (h - s) : (n - l) / (p - l), b <= 1 && b >= 0) {
  58583. var _ = u ? (p - l) * b + l : (h - s) * b + s;
  58584. return u ? [n, _] : [_, n];
  58585. }
  58586. s = h, l = p;
  58587. break;
  58588. case o.C:
  58589. h = a[f++], p = a[f++], v = a[f++], g = a[f++], m = a[f++], y = a[f++];
  58590. var O = u ? K1(s, h, v, m, n, c) : K1(l, p, g, y, n, c);
  58591. if (O > 0)
  58592. for (var S = 0; S < O; S++) {
  58593. var x = c[S];
  58594. if (x <= 1 && x >= 0) {
  58595. var _ = u ? Gn(l, p, g, y, x) : Gn(s, h, v, m, x);
  58596. return u ? [n, _] : [_, n];
  58597. }
  58598. }
  58599. s = m, l = y;
  58600. break;
  58601. }
  58602. }
  58603. }, e;
  58604. }(ot)
  58605. ), R3e = (
  58606. /** @class */
  58607. function(t) {
  58608. q(e, t);
  58609. function e() {
  58610. return t !== null && t.apply(this, arguments) || this;
  58611. }
  58612. return e;
  58613. }(zte)
  58614. ), Vte = (
  58615. /** @class */
  58616. function(t) {
  58617. q(e, t);
  58618. function e(n) {
  58619. var r = t.call(this, n) || this;
  58620. return r.type = "ec-polygon", r;
  58621. }
  58622. return e.prototype.getDefaultShape = function() {
  58623. return new R3e();
  58624. }, e.prototype.buildPath = function(n, r) {
  58625. var i = r.points, a = r.stackedOnPoints, o = 0, s = i.length / 2, l = r.smoothMonotone;
  58626. if (r.connectNulls) {
  58627. for (; s > 0 && nf(i[s * 2 - 2], i[s * 2 - 1]); s--)
  58628. ;
  58629. for (; o < s && nf(i[o * 2], i[o * 2 + 1]); o++)
  58630. ;
  58631. }
  58632. for (; o < s; ) {
  58633. var u = lE(n, i, o, s, s, 1, r.smooth, l, r.connectNulls);
  58634. lE(n, a, o + u - 1, u, s, -1, r.stackedOnSmooth, l, r.connectNulls), o += u + 1, n.closePath();
  58635. }
  58636. }, e;
  58637. }(ot)
  58638. );
  58639. function Fte(t, e, n, r, i) {
  58640. var a = t.getArea(), o = a.x, s = a.y, l = a.width, u = a.height, c = n.get(["lineStyle", "width"]) || 2;
  58641. o -= c / 2, s -= c / 2, l += c, u += c, l = Math.ceil(l), o !== Math.floor(o) && (o = Math.floor(o), l++);
  58642. var f = new mt({
  58643. shape: {
  58644. x: o,
  58645. y: s,
  58646. width: l,
  58647. height: u
  58648. }
  58649. });
  58650. if (e) {
  58651. var d = t.getBaseAxis(), h = d.isHorizontal(), p = d.inverse;
  58652. h ? (p && (f.shape.x += l), f.shape.width = 0) : (p || (f.shape.y += u), f.shape.height = 0);
  58653. var v = Me(i) ? function(g) {
  58654. i(g, f);
  58655. } : null;
  58656. Yt(f, {
  58657. shape: {
  58658. width: l,
  58659. height: u,
  58660. x: o,
  58661. y: s
  58662. }
  58663. }, n, null, r, v);
  58664. }
  58665. return f;
  58666. }
  58667. function Wte(t, e, n) {
  58668. var r = t.getArea(), i = mn(r.r0, 1), a = mn(r.r, 1), o = new ri({
  58669. shape: {
  58670. cx: mn(t.cx, 1),
  58671. cy: mn(t.cy, 1),
  58672. r0: i,
  58673. r: a,
  58674. startAngle: r.startAngle,
  58675. endAngle: r.endAngle,
  58676. clockwise: r.clockwise
  58677. }
  58678. });
  58679. if (e) {
  58680. var s = t.getBaseAxis().dim === "angle";
  58681. s ? o.shape.endAngle = r.startAngle : o.shape.r = i, Yt(o, {
  58682. shape: {
  58683. endAngle: r.endAngle,
  58684. r: a
  58685. }
  58686. }, n);
  58687. }
  58688. return o;
  58689. }
  58690. function U0(t, e, n, r, i) {
  58691. if (t) {
  58692. if (t.type === "polar")
  58693. return Wte(t, e, n);
  58694. if (t.type === "cartesian2d")
  58695. return Fte(t, e, n, r, i);
  58696. } else return null;
  58697. return null;
  58698. }
  58699. function Ff(t, e) {
  58700. return t.type === e;
  58701. }
  58702. function IV(t, e) {
  58703. if (t.length === e.length) {
  58704. for (var n = 0; n < t.length; n++)
  58705. if (t[n] !== e[n])
  58706. return;
  58707. return !0;
  58708. }
  58709. }
  58710. function DV(t) {
  58711. for (var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = 0; a < t.length; ) {
  58712. var o = t[a++], s = t[a++];
  58713. isNaN(o) || (e = Math.min(o, e), r = Math.max(o, r)), isNaN(s) || (n = Math.min(s, n), i = Math.max(s, i));
  58714. }
  58715. return [[e, n], [r, i]];
  58716. }
  58717. function RV(t, e) {
  58718. var n = DV(t), r = n[0], i = n[1], a = DV(e), o = a[0], s = a[1];
  58719. return Math.max(Math.abs(r[0] - o[0]), Math.abs(r[1] - o[1]), Math.abs(i[0] - s[0]), Math.abs(i[1] - s[1]));
  58720. }
  58721. function kV(t) {
  58722. return St(t) ? t : t ? 0.5 : 0;
  58723. }
  58724. function k3e(t, e, n) {
  58725. if (!n.valueDim)
  58726. return [];
  58727. for (var r = e.count(), i = Fo(r * 2), a = 0; a < r; a++) {
  58728. var o = Bte(n, t, e, a);
  58729. i[a * 2] = o[0], i[a * 2 + 1] = o[1];
  58730. }
  58731. return i;
  58732. }
  58733. function bl(t, e, n, r) {
  58734. var i = e.getBaseAxis(), a = i.dim === "x" || i.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], c = [], f = [];
  58735. if (r) {
  58736. for (s = 0; s < t.length; s += 2)
  58737. !isNaN(t[s]) && !isNaN(t[s + 1]) && f.push(t[s], t[s + 1]);
  58738. t = f;
  58739. }
  58740. for (s = 0; s < t.length - 2; s += 2)
  58741. switch (c[0] = t[s + 2], c[1] = t[s + 3], u[0] = t[s], u[1] = t[s + 1], o.push(u[0], u[1]), n) {
  58742. case "end":
  58743. l[a] = c[a], l[1 - a] = u[1 - a], o.push(l[0], l[1]);
  58744. break;
  58745. case "middle":
  58746. var d = (u[a] + c[a]) / 2, h = [];
  58747. l[a] = h[a] = d, l[1 - a] = u[1 - a], h[1 - a] = c[1 - a], o.push(l[0], l[1]), o.push(h[0], h[1]);
  58748. break;
  58749. default:
  58750. l[a] = u[a], l[1 - a] = c[1 - a], o.push(l[0], l[1]);
  58751. }
  58752. return o.push(t[s++], t[s++]), o;
  58753. }
  58754. function L3e(t, e) {
  58755. var n = [], r = t.length, i, a;
  58756. function o(c, f, d) {
  58757. var h = c.coord, p = (d - h) / (f.coord - h), v = xR(p, [c.color, f.color]);
  58758. return {
  58759. coord: d,
  58760. color: v
  58761. };
  58762. }
  58763. for (var s = 0; s < r; s++) {
  58764. var l = t[s], u = l.coord;
  58765. if (u < 0)
  58766. i = l;
  58767. else if (u > e) {
  58768. a ? n.push(o(a, l, e)) : i && n.push(o(i, l, 0), o(i, l, e));
  58769. break;
  58770. } else
  58771. i && (n.push(o(i, l, 0)), i = null), n.push(l), a = l;
  58772. }
  58773. return n;
  58774. }
  58775. function N3e(t, e, n) {
  58776. var r = t.getVisual("visualMeta");
  58777. if (!(!r || !r.length || !t.count())) {
  58778. if (e.type !== "cartesian2d") {
  58779. process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
  58780. return;
  58781. }
  58782. for (var i, a, o = r.length - 1; o >= 0; o--) {
  58783. var s = t.getDimensionInfo(r[o].dimension);
  58784. if (i = s && s.coordDim, i === "x" || i === "y") {
  58785. a = r[o];
  58786. break;
  58787. }
  58788. }
  58789. if (!a) {
  58790. process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
  58791. return;
  58792. }
  58793. var l = e.getAxis(i), u = ce(a.stops, function(b) {
  58794. return {
  58795. coord: l.toGlobalCoord(l.dataToCoord(b.value)),
  58796. color: b.color
  58797. };
  58798. }), c = u.length, f = a.outerColors.slice();
  58799. c && u[0].coord > u[c - 1].coord && (u.reverse(), f.reverse());
  58800. var d = L3e(u, i === "x" ? n.getWidth() : n.getHeight()), h = d.length;
  58801. if (!h && c)
  58802. return u[0].coord < 0 ? f[1] ? f[1] : u[c - 1].color : f[0] ? f[0] : u[0].color;
  58803. var p = 10, v = d[0].coord - p, g = d[h - 1].coord + p, m = g - v;
  58804. if (m < 1e-3)
  58805. return "transparent";
  58806. k(d, function(b) {
  58807. b.offset = (b.coord - v) / m;
  58808. }), d.push({
  58809. // NOTE: inRangeStopLen may still be 0 if stoplen is zero.
  58810. offset: h ? d[h - 1].offset : 0.5,
  58811. color: f[1] || "transparent"
  58812. }), d.unshift({
  58813. offset: h ? d[0].offset : 0.5,
  58814. color: f[0] || "transparent"
  58815. });
  58816. var y = new hp(0, 0, 0, 0, d, !0);
  58817. return y[i] = v, y[i + "2"] = g, y;
  58818. }
  58819. }
  58820. function B3e(t, e, n) {
  58821. var r = t.get("showAllSymbol"), i = r === "auto";
  58822. if (!(r && !i)) {
  58823. var a = n.getAxesByScale("ordinal")[0];
  58824. if (a && !(i && z3e(a, e))) {
  58825. var o = e.mapDimension(a.dim), s = {};
  58826. return k(a.getViewLabels(), function(l) {
  58827. var u = a.scale.getRawOrdinalNumber(l.tickValue);
  58828. s[u] = 1;
  58829. }), function(l) {
  58830. return !s.hasOwnProperty(e.get(o, l));
  58831. };
  58832. }
  58833. }
  58834. }
  58835. function z3e(t, e) {
  58836. var n = t.getExtent(), r = Math.abs(n[1] - n[0]) / t.scale.count();
  58837. isNaN(r) && (r = 0);
  58838. for (var i = e.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a)
  58839. if (j0.getSymbolSize(
  58840. e,
  58841. o
  58842. // Only for cartesian, where `isHorizontal` exists.
  58843. )[t.isHorizontal() ? 1 : 0] * 1.5 > r)
  58844. return !1;
  58845. return !0;
  58846. }
  58847. function V3e(t, e) {
  58848. return isNaN(t) || isNaN(e);
  58849. }
  58850. function F3e(t) {
  58851. for (var e = t.length / 2; e > 0 && V3e(t[e * 2 - 2], t[e * 2 - 1]); e--)
  58852. ;
  58853. return e - 1;
  58854. }
  58855. function LV(t, e) {
  58856. return [t[e * 2], t[e * 2 + 1]];
  58857. }
  58858. function W3e(t, e, n) {
  58859. for (var r = t.length / 2, i = n === "x" ? 0 : 1, a, o, s = 0, l = -1, u = 0; u < r; u++)
  58860. if (o = t[u * 2 + i], !(isNaN(o) || isNaN(t[u * 2 + 1 - i]))) {
  58861. if (u === 0) {
  58862. a = o;
  58863. continue;
  58864. }
  58865. if (a <= e && o >= e || a >= e && o <= e) {
  58866. l = u;
  58867. break;
  58868. }
  58869. s = u, a = o;
  58870. }
  58871. return {
  58872. range: [s, l],
  58873. t: (e - a) / (o - a)
  58874. };
  58875. }
  58876. function Qte(t) {
  58877. if (t.get(["endLabel", "show"]))
  58878. return !0;
  58879. for (var e = 0; e < ni.length; e++)
  58880. if (t.get([ni[e], "endLabel", "show"]))
  58881. return !0;
  58882. return !1;
  58883. }
  58884. function nP(t, e, n, r) {
  58885. if (Ff(e, "cartesian2d")) {
  58886. var i = r.getModel("endLabel"), a = i.get("valueAnimation"), o = r.getData(), s = {
  58887. lastFrameIndex: 0
  58888. }, l = Qte(r) ? function(h, p) {
  58889. t._endLabelOnDuring(h, p, o, s, a, i, e);
  58890. } : null, u = e.getBaseAxis().isHorizontal(), c = Fte(e, n, r, function() {
  58891. var h = t._endLabel;
  58892. h && n && s.originalX != null && h.attr({
  58893. x: s.originalX,
  58894. y: s.originalY
  58895. });
  58896. }, l);
  58897. if (!r.get("clip", !0)) {
  58898. var f = c.shape, d = Math.max(f.width, f.height);
  58899. u ? (f.y -= d, f.height += d * 2) : (f.x -= d, f.width += d * 2);
  58900. }
  58901. return l && l(1, c), c;
  58902. } else
  58903. return process.env.NODE_ENV !== "production" && r.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), Wte(e, n, r);
  58904. }
  58905. function Q3e(t, e) {
  58906. var n = e.getBaseAxis(), r = n.isHorizontal(), i = n.inverse, a = r ? i ? "right" : "left" : "center", o = r ? "middle" : i ? "top" : "bottom";
  58907. return {
  58908. normal: {
  58909. align: t.get("align") || a,
  58910. verticalAlign: t.get("verticalAlign") || o
  58911. }
  58912. };
  58913. }
  58914. var H3e = (
  58915. /** @class */
  58916. function(t) {
  58917. q(e, t);
  58918. function e() {
  58919. return t !== null && t.apply(this, arguments) || this;
  58920. }
  58921. return e.prototype.init = function() {
  58922. var n = new Ve(), r = new Z0();
  58923. this.group.add(r.group), this._symbolDraw = r, this._lineGroup = n;
  58924. }, e.prototype.render = function(n, r, i) {
  58925. var a = this, o = n.coordinateSystem, s = this.group, l = n.getData(), u = n.getModel("lineStyle"), c = n.getModel("areaStyle"), f = l.getLayout("points") || [], d = o.type === "polar", h = this._coordSys, p = this._symbolDraw, v = this._polyline, g = this._polygon, m = this._lineGroup, y = !r.ssr && n.get("animation"), b = !c.isEmpty(), _ = c.get("origin"), O = Nte(o, l, _), S = b && k3e(o, l, O), x = n.get("showSymbol"), C = n.get("connectNulls"), T = x && !d && B3e(n, l, o), w = this._data;
  58926. w && w.eachItemGraphicEl(function(oe, K) {
  58927. oe.__temp && (s.remove(oe), w.setItemGraphicEl(K, null));
  58928. }), x || p.remove(), s.add(m);
  58929. var P = d ? !1 : n.get("step"), $;
  58930. o && o.getArea && n.get("clip", !0) && ($ = o.getArea(), $.width != null ? ($.x -= 0.1, $.y -= 0.1, $.width += 0.2, $.height += 0.2) : $.r0 && ($.r0 -= 0.5, $.r += 0.5)), this._clipShapeForSymbol = $;
  58931. var A = N3e(l, o, i) || l.getVisual("style")[l.getVisual("drawType")];
  58932. if (!(v && h.type === o.type && P === this._step))
  58933. x && p.updateData(l, {
  58934. isIgnore: T,
  58935. clipShape: $,
  58936. disableAnimation: !0,
  58937. getSymbolPoint: function(oe) {
  58938. return [f[oe * 2], f[oe * 2 + 1]];
  58939. }
  58940. }), y && this._initSymbolLabelAnimation(l, o, $), P && (f = bl(f, o, P, C), S && (S = bl(S, o, P, C))), v = this._newPolyline(f), b ? g = this._newPolygon(f, S) : g && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, _f(A)), m.setClipPath(nP(this, o, !0, n));
  58941. else {
  58942. b && !g ? g = this._newPolygon(f, S) : g && !b && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, _f(A));
  58943. var D = m.getClipPath();
  58944. if (D) {
  58945. var E = nP(this, o, !1, n);
  58946. Yt(D, {
  58947. shape: E.shape
  58948. }, n);
  58949. } else
  58950. m.setClipPath(nP(this, o, !0, n));
  58951. x && p.updateData(l, {
  58952. isIgnore: T,
  58953. clipShape: $,
  58954. disableAnimation: !0,
  58955. getSymbolPoint: function(oe) {
  58956. return [f[oe * 2], f[oe * 2 + 1]];
  58957. }
  58958. }), (!IV(this._stackedOnPoints, S) || !IV(this._points, f)) && (y ? this._doUpdateAnimation(l, S, o, i, P, _, C) : (P && (f = bl(f, o, P, C), S && (S = bl(S, o, P, C))), v.setShape({
  58959. points: f
  58960. }), g && g.setShape({
  58961. points: f,
  58962. stackedOnPoints: S
  58963. })));
  58964. }
  58965. var R = n.getModel("emphasis"), N = R.get("focus"), V = R.get("blurScope"), z = R.get("disabled");
  58966. if (v.useStyle(Re(
  58967. // Use color in lineStyle first
  58968. u.getLineStyle(),
  58969. {
  58970. fill: "none",
  58971. stroke: A,
  58972. lineJoin: "bevel"
  58973. }
  58974. )), Tr(v, n, "lineStyle"), v.style.lineWidth > 0 && n.get(["emphasis", "lineStyle", "width"]) === "bolder") {
  58975. var W = v.getState("emphasis").style;
  58976. W.lineWidth = +v.style.lineWidth + 1;
  58977. }
  58978. Fe(v).seriesIndex = n.seriesIndex, bn(v, N, V, z);
  58979. var F = kV(n.get("smooth")), Q = n.get("smoothMonotone");
  58980. if (v.setShape({
  58981. smooth: F,
  58982. smoothMonotone: Q,
  58983. connectNulls: C
  58984. }), g) {
  58985. var Z = l.getCalculationInfo("stackedOnSeries"), ne = 0;
  58986. g.useStyle(Re(c.getAreaStyle(), {
  58987. fill: A,
  58988. opacity: 0.7,
  58989. lineJoin: "bevel",
  58990. decal: l.getVisual("style").decal
  58991. })), Z && (ne = kV(Z.get("smooth"))), g.setShape({
  58992. smooth: F,
  58993. stackedOnSmooth: ne,
  58994. smoothMonotone: Q,
  58995. connectNulls: C
  58996. }), Tr(g, n, "areaStyle"), Fe(g).seriesIndex = n.seriesIndex, bn(g, N, V, z);
  58997. }
  58998. var ee = function(oe) {
  58999. a._changePolyState(oe);
  59000. };
  59001. l.eachItemGraphicEl(function(oe) {
  59002. oe && (oe.onHoverStateChange = ee);
  59003. }), this._polyline.onHoverStateChange = ee, this._data = l, this._coordSys = o, this._stackedOnPoints = S, this._points = f, this._step = P, this._valueOrigin = _, n.get("triggerLineEvent") && (this.packEventData(n, v), g && this.packEventData(n, g));
  59004. }, e.prototype.packEventData = function(n, r) {
  59005. Fe(r).eventData = {
  59006. componentType: "series",
  59007. componentSubType: "line",
  59008. componentIndex: n.componentIndex,
  59009. seriesIndex: n.seriesIndex,
  59010. seriesName: n.name,
  59011. seriesType: "line"
  59012. };
  59013. }, e.prototype.highlight = function(n, r, i, a) {
  59014. var o = n.getData(), s = mf(o, a);
  59015. if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
  59016. var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
  59017. if (!u) {
  59018. var c = l[s * 2], f = l[s * 2 + 1];
  59019. if (isNaN(c) || isNaN(f) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, f))
  59020. return;
  59021. var d = n.get("zlevel") || 0, h = n.get("z") || 0;
  59022. u = new j0(o, s), u.x = c, u.y = f, u.setZ(d, h);
  59023. var p = u.getSymbolPath().getTextContent();
  59024. p && (p.zlevel = d, p.z = h, p.z2 = this._polyline.z2 + 1), u.__temp = !0, o.setItemGraphicEl(s, u), u.stopSymbolAnimation(!0), this.group.add(u);
  59025. }
  59026. u.highlight();
  59027. } else
  59028. zt.prototype.highlight.call(this, n, r, i, a);
  59029. }, e.prototype.downplay = function(n, r, i, a) {
  59030. var o = n.getData(), s = mf(o, a);
  59031. if (this._changePolyState("normal"), s != null && s >= 0) {
  59032. var l = o.getItemGraphicEl(s);
  59033. l && (l.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(l)) : l.downplay());
  59034. } else
  59035. zt.prototype.downplay.call(this, n, r, i, a);
  59036. }, e.prototype._changePolyState = function(n) {
  59037. var r = this._polygon;
  59038. oO(this._polyline, n), r && oO(r, n);
  59039. }, e.prototype._newPolyline = function(n) {
  59040. var r = this._polyline;
  59041. return r && this._lineGroup.remove(r), r = new D3e({
  59042. shape: {
  59043. points: n
  59044. },
  59045. segmentIgnoreThreshold: 2,
  59046. z2: 10
  59047. }), this._lineGroup.add(r), this._polyline = r, r;
  59048. }, e.prototype._newPolygon = function(n, r) {
  59049. var i = this._polygon;
  59050. return i && this._lineGroup.remove(i), i = new Vte({
  59051. shape: {
  59052. points: n,
  59053. stackedOnPoints: r
  59054. },
  59055. segmentIgnoreThreshold: 2
  59056. }), this._lineGroup.add(i), this._polygon = i, i;
  59057. }, e.prototype._initSymbolLabelAnimation = function(n, r, i) {
  59058. var a, o, s = r.getBaseAxis(), l = s.inverse;
  59059. r.type === "cartesian2d" ? (a = s.isHorizontal(), o = !1) : r.type === "polar" && (a = s.dim === "angle", o = !0);
  59060. var u = n.hostModel, c = u.get("animationDuration");
  59061. Me(c) && (c = c(null));
  59062. var f = u.get("animationDelay") || 0, d = Me(f) ? f(null) : f;
  59063. n.eachItemGraphicEl(function(h, p) {
  59064. var v = h;
  59065. if (v) {
  59066. var g = [h.x, h.y], m = void 0, y = void 0, b = void 0;
  59067. if (i)
  59068. if (o) {
  59069. var _ = i, O = r.pointToCoord(g);
  59070. a ? (m = _.startAngle, y = _.endAngle, b = -O[1] / 180 * Math.PI) : (m = _.r0, y = _.r, b = O[0]);
  59071. } else {
  59072. var S = i;
  59073. a ? (m = S.x, y = S.x + S.width, b = h.x) : (m = S.y + S.height, y = S.y, b = h.y);
  59074. }
  59075. var x = y === m ? 0 : (b - m) / (y - m);
  59076. l && (x = 1 - x);
  59077. var C = Me(f) ? f(p) : c * x + d, T = v.getSymbolPath(), w = T.getTextContent();
  59078. v.attr({
  59079. scaleX: 0,
  59080. scaleY: 0
  59081. }), v.animateTo({
  59082. scaleX: 1,
  59083. scaleY: 1
  59084. }, {
  59085. duration: 200,
  59086. setToFinal: !0,
  59087. delay: C
  59088. }), w && w.animateFrom({
  59089. style: {
  59090. opacity: 0
  59091. }
  59092. }, {
  59093. duration: 300,
  59094. delay: C
  59095. }), T.disableLabelAnimation = !0;
  59096. }
  59097. });
  59098. }, e.prototype._initOrUpdateEndLabel = function(n, r, i) {
  59099. var a = n.getModel("endLabel");
  59100. if (Qte(n)) {
  59101. var o = n.getData(), s = this._polyline, l = o.getLayout("points");
  59102. if (!l) {
  59103. s.removeTextContent(), this._endLabel = null;
  59104. return;
  59105. }
  59106. var u = this._endLabel;
  59107. u || (u = this._endLabel = new gt({
  59108. z2: 200
  59109. // should be higher than item symbol
  59110. }), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
  59111. var c = F3e(l);
  59112. c >= 0 && (Pr(s, er(n, "endLabel"), {
  59113. inheritColor: i,
  59114. labelFetcher: n,
  59115. labelDataIndex: c,
  59116. defaultText: function(f, d, h) {
  59117. return h != null ? Lte(o, h) : Wh(o, f);
  59118. },
  59119. enableTextSetter: !0
  59120. }, Q3e(a, r)), s.textConfig.position = null);
  59121. } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
  59122. }, e.prototype._endLabelOnDuring = function(n, r, i, a, o, s, l) {
  59123. var u = this._endLabel, c = this._polyline;
  59124. if (u) {
  59125. n < 1 && a.originalX == null && (a.originalX = u.x, a.originalY = u.y);
  59126. var f = i.getLayout("points"), d = i.hostModel, h = d.get("connectNulls"), p = s.get("precision"), v = s.get("distance") || 0, g = l.getBaseAxis(), m = g.isHorizontal(), y = g.inverse, b = r.shape, _ = y ? m ? b.x : b.y + b.height : m ? b.x + b.width : b.y, O = (m ? v : 0) * (y ? -1 : 1), S = (m ? 0 : -v) * (y ? -1 : 1), x = m ? "x" : "y", C = W3e(f, _, x), T = C.range, w = T[1] - T[0], P = void 0;
  59127. if (w >= 1) {
  59128. if (w > 1 && !h) {
  59129. var $ = LV(f, T[0]);
  59130. u.attr({
  59131. x: $[0] + O,
  59132. y: $[1] + S
  59133. }), o && (P = d.getRawValue(T[0]));
  59134. } else {
  59135. var $ = c.getPointOn(_, x);
  59136. $ && u.attr({
  59137. x: $[0] + O,
  59138. y: $[1] + S
  59139. });
  59140. var A = d.getRawValue(T[0]), D = d.getRawValue(T[1]);
  59141. o && (P = gK(i, p, A, D, C.t));
  59142. }
  59143. a.lastFrameIndex = T[0];
  59144. } else {
  59145. var E = n === 1 || a.lastFrameIndex > 0 ? T[0] : 0, $ = LV(f, E);
  59146. o && (P = d.getRawValue(E)), u.attr({
  59147. x: $[0] + O,
  59148. y: $[1] + S
  59149. });
  59150. }
  59151. if (o) {
  59152. var R = mp(u);
  59153. typeof R.setLabelText == "function" && R.setLabelText(P);
  59154. }
  59155. }
  59156. }, e.prototype._doUpdateAnimation = function(n, r, i, a, o, s, l) {
  59157. var u = this._polyline, c = this._polygon, f = n.hostModel, d = I3e(this._data, n, this._stackedOnPoints, r, this._coordSys, i, this._valueOrigin), h = d.current, p = d.stackedOnCurrent, v = d.next, g = d.stackedOnNext;
  59158. if (o && (h = bl(d.current, i, o, l), p = bl(d.stackedOnCurrent, i, o, l), v = bl(d.next, i, o, l), g = bl(d.stackedOnNext, i, o, l)), RV(h, v) > 3e3 || c && RV(p, g) > 3e3) {
  59159. u.stopAnimation(), u.setShape({
  59160. points: v
  59161. }), c && (c.stopAnimation(), c.setShape({
  59162. points: v,
  59163. stackedOnPoints: g
  59164. }));
  59165. return;
  59166. }
  59167. u.shape.__points = d.current, u.shape.points = h;
  59168. var m = {
  59169. shape: {
  59170. points: v
  59171. }
  59172. };
  59173. d.current !== h && (m.shape.__points = d.next), u.stopAnimation(), Ct(u, m, f), c && (c.setShape({
  59174. // Reuse the points with polyline.
  59175. points: h,
  59176. stackedOnPoints: p
  59177. }), c.stopAnimation(), Ct(c, {
  59178. shape: {
  59179. stackedOnPoints: g
  59180. }
  59181. }, f), u.shape.points !== c.shape.points && (c.shape.points = u.shape.points));
  59182. for (var y = [], b = d.status, _ = 0; _ < b.length; _++) {
  59183. var O = b[_].cmd;
  59184. if (O === "=") {
  59185. var S = n.getItemGraphicEl(b[_].idx1);
  59186. S && y.push({
  59187. el: S,
  59188. ptIdx: _
  59189. // Index of points
  59190. });
  59191. }
  59192. }
  59193. u.animators && u.animators.length && u.animators[0].during(function() {
  59194. c && c.dirtyShape();
  59195. for (var x = u.shape.__points, C = 0; C < y.length; C++) {
  59196. var T = y[C].el, w = y[C].ptIdx * 2;
  59197. T.x = x[w], T.y = x[w + 1], T.markRedraw();
  59198. }
  59199. });
  59200. }, e.prototype.remove = function(n) {
  59201. var r = this.group, i = this._data;
  59202. this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(a, o) {
  59203. a.__temp && (r.remove(a), i.setItemGraphicEl(o, null));
  59204. }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
  59205. }, e.type = "line", e;
  59206. }(zt)
  59207. );
  59208. function X0(t, e) {
  59209. return {
  59210. seriesType: t,
  59211. plan: Op(),
  59212. reset: function(n) {
  59213. var r = n.getData(), i = n.coordinateSystem, a = n.pipelineContext, o = e || a.large;
  59214. if (i) {
  59215. var s = ce(i.dimensions, function(h) {
  59216. return r.mapDimension(h);
  59217. }).slice(0, 2), l = s.length, u = r.getCalculationInfo("stackResultDimension");
  59218. Xs(r, s[0]) && (s[0] = u), Xs(r, s[1]) && (s[1] = u);
  59219. var c = r.getStore(), f = r.getDimensionIndex(s[0]), d = r.getDimensionIndex(s[1]);
  59220. return l && {
  59221. progress: function(h, p) {
  59222. for (var v = h.end - h.start, g = o && Fo(v * l), m = [], y = [], b = h.start, _ = 0; b < h.end; b++) {
  59223. var O = void 0;
  59224. if (l === 1) {
  59225. var S = c.get(f, b);
  59226. O = i.dataToPoint(S, null, y);
  59227. } else
  59228. m[0] = c.get(f, b), m[1] = c.get(d, b), O = i.dataToPoint(m, null, y);
  59229. o ? (g[_++] = O[0], g[_++] = O[1]) : p.setItemLayout(b, O.slice());
  59230. }
  59231. o && p.setLayout("points", g);
  59232. }
  59233. };
  59234. }
  59235. }
  59236. };
  59237. }
  59238. var G3e = {
  59239. average: function(t) {
  59240. for (var e = 0, n = 0, r = 0; r < t.length; r++)
  59241. isNaN(t[r]) || (e += t[r], n++);
  59242. return n === 0 ? NaN : e / n;
  59243. },
  59244. sum: function(t) {
  59245. for (var e = 0, n = 0; n < t.length; n++)
  59246. e += t[n] || 0;
  59247. return e;
  59248. },
  59249. max: function(t) {
  59250. for (var e = -1 / 0, n = 0; n < t.length; n++)
  59251. t[n] > e && (e = t[n]);
  59252. return isFinite(e) ? e : NaN;
  59253. },
  59254. min: function(t) {
  59255. for (var e = 1 / 0, n = 0; n < t.length; n++)
  59256. t[n] < e && (e = t[n]);
  59257. return isFinite(e) ? e : NaN;
  59258. },
  59259. minmax: function(t) {
  59260. for (var e = -1 / 0, n = -1 / 0, r = 0; r < t.length; r++) {
  59261. var i = t[r], a = Math.abs(i);
  59262. a > e && (e = a, n = i);
  59263. }
  59264. return isFinite(n) ? n : NaN;
  59265. },
  59266. // TODO
  59267. // Median
  59268. nearest: function(t) {
  59269. return t[0];
  59270. }
  59271. }, j3e = function(t) {
  59272. return Math.round(t.length / 2);
  59273. };
  59274. function Hte(t) {
  59275. return {
  59276. seriesType: t,
  59277. // FIXME:TS never used, so comment it
  59278. // modifyOutputEnd: true,
  59279. reset: function(e, n, r) {
  59280. var i = e.getData(), a = e.get("sampling"), o = e.coordinateSystem, s = i.count();
  59281. if (s > 10 && o.type === "cartesian2d" && a) {
  59282. var l = o.getBaseAxis(), u = o.getOtherAxis(l), c = l.getExtent(), f = r.getDevicePixelRatio(), d = Math.abs(c[1] - c[0]) * (f || 1), h = Math.round(s / d);
  59283. if (isFinite(h) && h > 1) {
  59284. a === "lttb" && e.setData(i.lttbDownSample(i.mapDimension(u.dim), 1 / h));
  59285. var p = void 0;
  59286. Oe(a) ? p = G3e[a] : Me(a) && (p = a), p && e.setData(i.downSample(i.mapDimension(u.dim), 1 / h, p, j3e));
  59287. }
  59288. }
  59289. }
  59290. };
  59291. }
  59292. function Z3e(t) {
  59293. t.registerChartView(H3e), t.registerSeriesModel($3e), t.registerLayout(X0("line", !0)), t.registerVisual({
  59294. seriesType: "line",
  59295. reset: function(e) {
  59296. var n = e.getData(), r = e.getModel("lineStyle").getLineStyle();
  59297. r && !r.stroke && (r.stroke = n.getVisual("style").fill), n.setVisual("legendLineStyle", r);
  59298. }
  59299. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Hte("line"));
  59300. }
  59301. var Rm = (
  59302. /** @class */
  59303. function(t) {
  59304. q(e, t);
  59305. function e() {
  59306. var n = t !== null && t.apply(this, arguments) || this;
  59307. return n.type = e.type, n;
  59308. }
  59309. return e.prototype.getInitialData = function(n, r) {
  59310. return us(null, this, {
  59311. useEncodeDefaulter: !0
  59312. });
  59313. }, e.prototype.getMarkerPosition = function(n, r, i) {
  59314. var a = this.coordinateSystem;
  59315. if (a && a.clampData) {
  59316. var o = a.clampData(n), s = a.dataToPoint(o);
  59317. if (i)
  59318. k(a.getAxes(), function(d, h) {
  59319. if (d.type === "category" && r != null) {
  59320. var p = d.getTicksCoords(), v = d.getTickModel().get("alignWithLabel"), g = o[h], m = r[h] === "x1" || r[h] === "y1";
  59321. if (m && !v && (g += 1), p.length < 2)
  59322. return;
  59323. if (p.length === 2) {
  59324. s[h] = d.toGlobalCoord(d.getExtent()[m ? 1 : 0]);
  59325. return;
  59326. }
  59327. for (var y = void 0, b = void 0, _ = 1, O = 0; O < p.length; O++) {
  59328. var S = p[O].coord, x = O === p.length - 1 ? p[O - 1].tickValue + _ : p[O].tickValue;
  59329. if (x === g) {
  59330. b = S;
  59331. break;
  59332. } else if (x < g)
  59333. y = S;
  59334. else if (y != null && x > g) {
  59335. b = (S + y) / 2;
  59336. break;
  59337. }
  59338. O === 1 && (_ = x - p[0].tickValue);
  59339. }
  59340. b == null && (y ? y && (b = p[p.length - 1].coord) : b = p[0].coord), s[h] = d.toGlobalCoord(b);
  59341. }
  59342. });
  59343. else {
  59344. var l = this.getData(), u = l.getLayout("offset"), c = l.getLayout("size"), f = a.getBaseAxis().isHorizontal() ? 0 : 1;
  59345. s[f] += u + c / 2;
  59346. }
  59347. return s;
  59348. }
  59349. return [NaN, NaN];
  59350. }, e.type = "series.__base_bar__", e.defaultOption = {
  59351. // zlevel: 0,
  59352. z: 2,
  59353. coordinateSystem: "cartesian2d",
  59354. legendHoverLink: !0,
  59355. // stack: null
  59356. // Cartesian coordinate system
  59357. // xAxisIndex: 0,
  59358. // yAxisIndex: 0,
  59359. barMinHeight: 0,
  59360. barMinAngle: 0,
  59361. // cursor: null,
  59362. large: !1,
  59363. largeThreshold: 400,
  59364. progressive: 3e3,
  59365. progressiveChunkMode: "mod"
  59366. }, e;
  59367. }(Ht)
  59368. );
  59369. Ht.registerClass(Rm);
  59370. var U3e = (
  59371. /** @class */
  59372. function(t) {
  59373. q(e, t);
  59374. function e() {
  59375. var n = t !== null && t.apply(this, arguments) || this;
  59376. return n.type = e.type, n;
  59377. }
  59378. return e.prototype.getInitialData = function() {
  59379. return us(null, this, {
  59380. useEncodeDefaulter: !0,
  59381. createInvertedIndices: !!this.get("realtimeSort", !0) || null
  59382. });
  59383. }, e.prototype.getProgressive = function() {
  59384. return this.get("large") ? this.get("progressive") : !1;
  59385. }, e.prototype.getProgressiveThreshold = function() {
  59386. var n = this.get("progressiveThreshold"), r = this.get("largeThreshold");
  59387. return r > n && (n = r), n;
  59388. }, e.prototype.brushSelector = function(n, r, i) {
  59389. return i.rect(r.getItemLayout(n));
  59390. }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = Pu(Rm.defaultOption, {
  59391. // If clipped
  59392. // Only available on cartesian2d
  59393. clip: !0,
  59394. roundCap: !1,
  59395. showBackground: !1,
  59396. backgroundStyle: {
  59397. color: "rgba(180, 180, 180, 0.2)",
  59398. borderColor: null,
  59399. borderWidth: 0,
  59400. borderType: "solid",
  59401. borderRadius: 0,
  59402. shadowBlur: 0,
  59403. shadowColor: null,
  59404. shadowOffsetX: 0,
  59405. shadowOffsetY: 0,
  59406. opacity: 1
  59407. },
  59408. select: {
  59409. itemStyle: {
  59410. borderColor: "#212121"
  59411. }
  59412. },
  59413. realtimeSort: !1
  59414. }), e;
  59415. }(Rm)
  59416. ), X3e = (
  59417. /** @class */
  59418. /* @__PURE__ */ function() {
  59419. function t() {
  59420. this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  59421. }
  59422. return t;
  59423. }()
  59424. ), AO = (
  59425. /** @class */
  59426. function(t) {
  59427. q(e, t);
  59428. function e(n) {
  59429. var r = t.call(this, n) || this;
  59430. return r.type = "sausage", r;
  59431. }
  59432. return e.prototype.getDefaultShape = function() {
  59433. return new X3e();
  59434. }, e.prototype.buildPath = function(n, r) {
  59435. var i = r.cx, a = r.cy, o = Math.max(r.r0 || 0, 0), s = Math.max(r.r, 0), l = (s - o) * 0.5, u = o + l, c = r.startAngle, f = r.endAngle, d = r.clockwise, h = Math.PI * 2, p = d ? f - c < h : c - f < h;
  59436. p || (c = f - (d ? h : -h));
  59437. var v = Math.cos(c), g = Math.sin(c), m = Math.cos(f), y = Math.sin(f);
  59438. p ? (n.moveTo(v * o + i, g * o + a), n.arc(v * u + i, g * u + a, l, -Math.PI + c, c, !d)) : n.moveTo(v * s + i, g * s + a), n.arc(i, a, s, c, f, !d), n.arc(m * u + i, y * u + a, l, f - Math.PI * 2, f - Math.PI, !d), o !== 0 && n.arc(i, a, o, f, c, d);
  59439. }, e;
  59440. }(ot)
  59441. );
  59442. function Y3e(t, e) {
  59443. e = e || {};
  59444. var n = e.isRoundCap;
  59445. return function(r, i, a) {
  59446. var o = i.position;
  59447. if (!o || o instanceof Array)
  59448. return rO(r, i, a);
  59449. var s = t(o), l = i.distance != null ? i.distance : 5, u = this.shape, c = u.cx, f = u.cy, d = u.r, h = u.r0, p = (d + h) / 2, v = u.startAngle, g = u.endAngle, m = (v + g) / 2, y = n ? Math.abs(d - h) / 2 : 0, b = Math.cos, _ = Math.sin, O = c + d * b(v), S = f + d * _(v), x = "left", C = "top";
  59450. switch (s) {
  59451. case "startArc":
  59452. O = c + (h - l) * b(m), S = f + (h - l) * _(m), x = "center", C = "top";
  59453. break;
  59454. case "insideStartArc":
  59455. O = c + (h + l) * b(m), S = f + (h + l) * _(m), x = "center", C = "bottom";
  59456. break;
  59457. case "startAngle":
  59458. O = c + p * b(v) + _b(v, l + y, !1), S = f + p * _(v) + Ob(v, l + y, !1), x = "right", C = "middle";
  59459. break;
  59460. case "insideStartAngle":
  59461. O = c + p * b(v) + _b(v, -l + y, !1), S = f + p * _(v) + Ob(v, -l + y, !1), x = "left", C = "middle";
  59462. break;
  59463. case "middle":
  59464. O = c + p * b(m), S = f + p * _(m), x = "center", C = "middle";
  59465. break;
  59466. case "endArc":
  59467. O = c + (d + l) * b(m), S = f + (d + l) * _(m), x = "center", C = "bottom";
  59468. break;
  59469. case "insideEndArc":
  59470. O = c + (d - l) * b(m), S = f + (d - l) * _(m), x = "center", C = "top";
  59471. break;
  59472. case "endAngle":
  59473. O = c + p * b(g) + _b(g, l + y, !0), S = f + p * _(g) + Ob(g, l + y, !0), x = "left", C = "middle";
  59474. break;
  59475. case "insideEndAngle":
  59476. O = c + p * b(g) + _b(g, -l + y, !0), S = f + p * _(g) + Ob(g, -l + y, !0), x = "right", C = "middle";
  59477. break;
  59478. default:
  59479. return rO(r, i, a);
  59480. }
  59481. return r = r || {}, r.x = O, r.y = S, r.align = x, r.verticalAlign = C, r;
  59482. };
  59483. }
  59484. function q3e(t, e, n, r) {
  59485. if (St(r)) {
  59486. t.setTextConfig({
  59487. rotation: r
  59488. });
  59489. return;
  59490. } else if (ue(e)) {
  59491. t.setTextConfig({
  59492. rotation: 0
  59493. });
  59494. return;
  59495. }
  59496. var i = t.shape, a = i.clockwise ? i.startAngle : i.endAngle, o = i.clockwise ? i.endAngle : i.startAngle, s = (a + o) / 2, l, u = n(e);
  59497. switch (u) {
  59498. case "startArc":
  59499. case "insideStartArc":
  59500. case "middle":
  59501. case "insideEndArc":
  59502. case "endArc":
  59503. l = s;
  59504. break;
  59505. case "startAngle":
  59506. case "insideStartAngle":
  59507. l = a;
  59508. break;
  59509. case "endAngle":
  59510. case "insideEndAngle":
  59511. l = o;
  59512. break;
  59513. default:
  59514. t.setTextConfig({
  59515. rotation: 0
  59516. });
  59517. return;
  59518. }
  59519. var c = Math.PI * 1.5 - l;
  59520. u === "middle" && c > Math.PI / 2 && c < Math.PI * 1.5 && (c -= Math.PI), t.setTextConfig({
  59521. rotation: c
  59522. });
  59523. }
  59524. function _b(t, e, n) {
  59525. return e * Math.sin(t) * (n ? -1 : 1);
  59526. }
  59527. function Ob(t, e, n) {
  59528. return e * Math.cos(t) * (n ? 1 : -1);
  59529. }
  59530. function Fc(t, e, n) {
  59531. var r = t.get("borderRadius");
  59532. if (r == null)
  59533. return n ? {
  59534. cornerRadius: 0
  59535. } : null;
  59536. ue(r) || (r = [r, r, r, r]);
  59537. var i = Math.abs(e.r || 0 - e.r0 || 0);
  59538. return {
  59539. cornerRadius: ce(r, function(a) {
  59540. return oo(a, i);
  59541. })
  59542. };
  59543. }
  59544. var rP = Math.max, iP = Math.min;
  59545. function K3e(t, e) {
  59546. var n = t.getArea && t.getArea();
  59547. if (Ff(t, "cartesian2d")) {
  59548. var r = t.getBaseAxis();
  59549. if (r.type !== "category" || !r.onBand) {
  59550. var i = e.getLayout("bandWidth");
  59551. r.isHorizontal() ? (n.x -= i, n.width += i * 2) : (n.y -= i, n.height += i * 2);
  59552. }
  59553. }
  59554. return n;
  59555. }
  59556. var J3e = (
  59557. /** @class */
  59558. function(t) {
  59559. q(e, t);
  59560. function e() {
  59561. var n = t.call(this) || this;
  59562. return n.type = e.type, n._isFirstFrame = !0, n;
  59563. }
  59564. return e.prototype.render = function(n, r, i, a) {
  59565. this._model = n, this._removeOnRenderedListener(i), this._updateDrawMode(n);
  59566. var o = n.get("coordinateSystem");
  59567. o === "cartesian2d" || o === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(n, r, i) : this._renderNormal(n, r, i, a)) : process.env.NODE_ENV !== "production" && dn("Only cartesian2d and polar supported for bar.");
  59568. }, e.prototype.incrementalPrepareRender = function(n) {
  59569. this._clear(), this._updateDrawMode(n), this._updateLargeClip(n);
  59570. }, e.prototype.incrementalRender = function(n, r) {
  59571. this._progressiveEls = [], this._incrementalRenderLarge(n, r);
  59572. }, e.prototype.eachRendered = function(n) {
  59573. Tu(this._progressiveEls || this.group, n);
  59574. }, e.prototype._updateDrawMode = function(n) {
  59575. var r = n.pipelineContext.large;
  59576. (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
  59577. }, e.prototype._renderNormal = function(n, r, i, a) {
  59578. var o = this.group, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.getBaseAxis(), f;
  59579. u.type === "cartesian2d" ? f = c.isHorizontal() : u.type === "polar" && (f = c.dim === "angle");
  59580. var d = n.isAnimationEnabled() ? n : null, h = e6e(n, u);
  59581. h && this._enableRealtimeSort(h, s, i);
  59582. var p = n.get("clip", !0) || h, v = K3e(u, s);
  59583. o.removeClipPath();
  59584. var g = n.get("roundCap", !0), m = n.get("showBackground", !0), y = n.getModel("backgroundStyle"), b = y.get("borderRadius") || 0, _ = [], O = this._backgroundEls, S = a && a.isInitSort, x = a && a.type === "changeAxisOrder";
  59585. function C(P) {
  59586. var $ = Sb[u.type](s, P), A = s6e(u, f, $);
  59587. return A.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? A.setShape("r", b) : A.setShape("cornerRadius", b), _[P] = A, A;
  59588. }
  59589. s.diff(l).add(function(P) {
  59590. var $ = s.getItemModel(P), A = Sb[u.type](s, P, $);
  59591. if (m && C(P), !(!s.hasValue(P) || !FV[u.type](A))) {
  59592. var D = !1;
  59593. p && (D = NV[u.type](v, A));
  59594. var E = BV[u.type](n, s, P, A, f, d, c.model, !1, g);
  59595. h && (E.forceLabelAnimation = !0), WV(E, s, P, $, A, n, f, u.type === "polar"), S ? E.attr({
  59596. shape: A
  59597. }) : h ? zV(h, d, E, A, P, f, !1, !1) : Yt(E, {
  59598. shape: A
  59599. }, n, P), s.setItemGraphicEl(P, E), o.add(E), E.ignore = D;
  59600. }
  59601. }).update(function(P, $) {
  59602. var A = s.getItemModel(P), D = Sb[u.type](s, P, A);
  59603. if (m) {
  59604. var E = void 0;
  59605. O.length === 0 ? E = C($) : (E = O[$], E.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? E.setShape("r", b) : E.setShape("cornerRadius", b), _[P] = E);
  59606. var R = Sb[u.type](s, P), N = jte(f, R, u);
  59607. Ct(E, {
  59608. shape: N
  59609. }, d, P);
  59610. }
  59611. var V = l.getItemGraphicEl($);
  59612. if (!s.hasValue(P) || !FV[u.type](D)) {
  59613. o.remove(V);
  59614. return;
  59615. }
  59616. var z = !1;
  59617. if (p && (z = NV[u.type](v, D), z && o.remove(V)), V ? so(V) : V = BV[u.type](n, s, P, D, f, d, c.model, !!V, g), h && (V.forceLabelAnimation = !0), x) {
  59618. var W = V.getTextContent();
  59619. if (W) {
  59620. var F = mp(W);
  59621. F.prevValue != null && (F.prevValue = F.value);
  59622. }
  59623. } else
  59624. WV(V, s, P, A, D, n, f, u.type === "polar");
  59625. S ? V.attr({
  59626. shape: D
  59627. }) : h ? zV(h, d, V, D, P, f, !0, x) : Ct(V, {
  59628. shape: D
  59629. }, n, P, null), s.setItemGraphicEl(P, V), V.ignore = z, o.add(V);
  59630. }).remove(function(P) {
  59631. var $ = l.getItemGraphicEl(P);
  59632. $ && wm($, n, P);
  59633. }).execute();
  59634. var T = this._backgroundGroup || (this._backgroundGroup = new Ve());
  59635. T.removeAll();
  59636. for (var w = 0; w < _.length; ++w)
  59637. T.add(_[w]);
  59638. o.add(T), this._backgroundEls = _, this._data = s;
  59639. }, e.prototype._renderLarge = function(n, r, i) {
  59640. this._clear(), HV(n, this.group), this._updateLargeClip(n);
  59641. }, e.prototype._incrementalRenderLarge = function(n, r) {
  59642. this._removeBackground(), HV(r, this.group, this._progressiveEls, !0);
  59643. }, e.prototype._updateLargeClip = function(n) {
  59644. var r = n.get("clip", !0) && U0(n.coordinateSystem, !1, n), i = this.group;
  59645. r ? i.setClipPath(r) : i.removeClipPath();
  59646. }, e.prototype._enableRealtimeSort = function(n, r, i) {
  59647. var a = this;
  59648. if (r.count()) {
  59649. var o = n.baseAxis;
  59650. if (this._isFirstFrame)
  59651. this._dispatchInitSort(r, n, i), this._isFirstFrame = !1;
  59652. else {
  59653. var s = function(l) {
  59654. var u = r.getItemGraphicEl(l), c = u && u.shape;
  59655. return c && // The result should be consistent with the initial sort by data value.
  59656. // Do not support the case that both positive and negative exist.
  59657. Math.abs(o.isHorizontal() ? c.height : c.width) || 0;
  59658. };
  59659. this._onRendered = function() {
  59660. a._updateSortWithinSameData(r, s, o, i);
  59661. }, i.getZr().on("rendered", this._onRendered);
  59662. }
  59663. }
  59664. }, e.prototype._dataSort = function(n, r, i) {
  59665. var a = [];
  59666. return n.each(n.mapDimension(r.dim), function(o, s) {
  59667. var l = i(s);
  59668. l = l ?? NaN, a.push({
  59669. dataIndex: s,
  59670. mappedValue: l,
  59671. ordinalNumber: o
  59672. });
  59673. }), a.sort(function(o, s) {
  59674. return s.mappedValue - o.mappedValue;
  59675. }), {
  59676. ordinalNumbers: ce(a, function(o) {
  59677. return o.ordinalNumber;
  59678. })
  59679. };
  59680. }, e.prototype._isOrderChangedWithinSameData = function(n, r, i) {
  59681. for (var a = i.scale, o = n.mapDimension(i.dim), s = Number.MAX_VALUE, l = 0, u = a.getOrdinalMeta().categories.length; l < u; ++l) {
  59682. var c = n.rawIndexOf(o, a.getRawOrdinalNumber(l)), f = c < 0 ? Number.MIN_VALUE : r(n.indexOfRawIndex(c));
  59683. if (f > s)
  59684. return !0;
  59685. s = f;
  59686. }
  59687. return !1;
  59688. }, e.prototype._isOrderDifferentInView = function(n, r) {
  59689. for (var i = r.scale, a = i.getExtent(), o = Math.max(0, a[0]), s = Math.min(a[1], i.getOrdinalMeta().categories.length - 1); o <= s; ++o)
  59690. if (n.ordinalNumbers[o] !== i.getRawOrdinalNumber(o))
  59691. return !0;
  59692. }, e.prototype._updateSortWithinSameData = function(n, r, i, a) {
  59693. if (this._isOrderChangedWithinSameData(n, r, i)) {
  59694. var o = this._dataSort(n, i, r);
  59695. this._isOrderDifferentInView(o, i) && (this._removeOnRenderedListener(a), a.dispatchAction({
  59696. type: "changeAxisOrder",
  59697. componentType: i.dim + "Axis",
  59698. axisId: i.index,
  59699. sortInfo: o
  59700. }));
  59701. }
  59702. }, e.prototype._dispatchInitSort = function(n, r, i) {
  59703. var a = r.baseAxis, o = this._dataSort(n, a, function(s) {
  59704. return n.get(n.mapDimension(r.otherAxis.dim), s);
  59705. });
  59706. i.dispatchAction({
  59707. type: "changeAxisOrder",
  59708. componentType: a.dim + "Axis",
  59709. isInitSort: !0,
  59710. axisId: a.index,
  59711. sortInfo: o
  59712. });
  59713. }, e.prototype.remove = function(n, r) {
  59714. this._clear(this._model), this._removeOnRenderedListener(r);
  59715. }, e.prototype.dispose = function(n, r) {
  59716. this._removeOnRenderedListener(r);
  59717. }, e.prototype._removeOnRenderedListener = function(n) {
  59718. this._onRendered && (n.getZr().off("rendered", this._onRendered), this._onRendered = null);
  59719. }, e.prototype._clear = function(n) {
  59720. var r = this.group, i = this._data;
  59721. n && n.isAnimationEnabled() && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function(a) {
  59722. wm(a, n, Fe(a).dataIndex);
  59723. })) : r.removeAll(), this._data = null, this._isFirstFrame = !0;
  59724. }, e.prototype._removeBackground = function() {
  59725. this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
  59726. }, e.type = "bar", e;
  59727. }(zt)
  59728. ), NV = {
  59729. cartesian2d: function(t, e) {
  59730. var n = e.width < 0 ? -1 : 1, r = e.height < 0 ? -1 : 1;
  59731. n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height);
  59732. var i = t.x + t.width, a = t.y + t.height, o = rP(e.x, t.x), s = iP(e.x + e.width, i), l = rP(e.y, t.y), u = iP(e.y + e.height, a), c = s < o, f = u < l;
  59733. return e.x = c && o > i ? s : o, e.y = f && l > a ? u : l, e.width = c ? 0 : s - o, e.height = f ? 0 : u - l, n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height), c || f;
  59734. },
  59735. polar: function(t, e) {
  59736. var n = e.r0 <= e.r ? 1 : -1;
  59737. if (n < 0) {
  59738. var r = e.r;
  59739. e.r = e.r0, e.r0 = r;
  59740. }
  59741. var i = iP(e.r, t.r), a = rP(e.r0, t.r0);
  59742. e.r = i, e.r0 = a;
  59743. var o = i - a < 0;
  59744. if (n < 0) {
  59745. var r = e.r;
  59746. e.r = e.r0, e.r0 = r;
  59747. }
  59748. return o;
  59749. }
  59750. }, BV = {
  59751. cartesian2d: function(t, e, n, r, i, a, o, s, l) {
  59752. var u = new mt({
  59753. shape: le({}, r),
  59754. z2: 1
  59755. });
  59756. if (u.__dataIndex = n, u.name = "item", a) {
  59757. var c = u.shape, f = i ? "height" : "width";
  59758. c[f] = 0;
  59759. }
  59760. return u;
  59761. },
  59762. polar: function(t, e, n, r, i, a, o, s, l) {
  59763. var u = !i && l ? AO : ri, c = new u({
  59764. shape: r,
  59765. z2: 1
  59766. });
  59767. c.name = "item";
  59768. var f = Gte(i);
  59769. if (c.calculateTextPosition = Y3e(f, {
  59770. isRoundCap: u === AO
  59771. }), a) {
  59772. var d = c.shape, h = i ? "r" : "endAngle", p = {};
  59773. d[h] = i ? r.r0 : r.startAngle, p[h] = r[h], (s ? Ct : Yt)(c, {
  59774. shape: p
  59775. // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
  59776. }, a);
  59777. }
  59778. return c;
  59779. }
  59780. };
  59781. function e6e(t, e) {
  59782. var n = t.get("realtimeSort", !0), r = e.getBaseAxis();
  59783. if (process.env.NODE_ENV !== "production" && n && (r.type !== "category" && dn("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && dn("`realtimeSort` will not work because this bar series is not on cartesian2d.")), n && r.type === "category" && e.type === "cartesian2d")
  59784. return {
  59785. baseAxis: r,
  59786. otherAxis: e.getOtherAxis(r)
  59787. };
  59788. }
  59789. function zV(t, e, n, r, i, a, o, s) {
  59790. var l, u;
  59791. a ? (u = {
  59792. x: r.x,
  59793. width: r.width
  59794. }, l = {
  59795. y: r.y,
  59796. height: r.height
  59797. }) : (u = {
  59798. y: r.y,
  59799. height: r.height
  59800. }, l = {
  59801. x: r.x,
  59802. width: r.width
  59803. }), s || (o ? Ct : Yt)(n, {
  59804. shape: l
  59805. }, e, i, null);
  59806. var c = e ? t.baseAxis.model : null;
  59807. (o ? Ct : Yt)(n, {
  59808. shape: u
  59809. }, c, i);
  59810. }
  59811. function VV(t, e) {
  59812. for (var n = 0; n < e.length; n++)
  59813. if (!isFinite(t[e[n]]))
  59814. return !0;
  59815. return !1;
  59816. }
  59817. var t6e = ["x", "y", "width", "height"], n6e = ["cx", "cy", "r", "startAngle", "endAngle"], FV = {
  59818. cartesian2d: function(t) {
  59819. return !VV(t, t6e);
  59820. },
  59821. polar: function(t) {
  59822. return !VV(t, n6e);
  59823. }
  59824. }, Sb = {
  59825. // itemModel is only used to get borderWidth, which is not needed
  59826. // when calculating bar background layout.
  59827. cartesian2d: function(t, e, n) {
  59828. var r = t.getItemLayout(e), i = n ? i6e(n, r) : 0, a = r.width > 0 ? 1 : -1, o = r.height > 0 ? 1 : -1;
  59829. return {
  59830. x: r.x + a * i / 2,
  59831. y: r.y + o * i / 2,
  59832. width: r.width - a * i,
  59833. height: r.height - o * i
  59834. };
  59835. },
  59836. polar: function(t, e, n) {
  59837. var r = t.getItemLayout(e);
  59838. return {
  59839. cx: r.cx,
  59840. cy: r.cy,
  59841. r0: r.r0,
  59842. r: r.r,
  59843. startAngle: r.startAngle,
  59844. endAngle: r.endAngle,
  59845. clockwise: r.clockwise
  59846. };
  59847. }
  59848. };
  59849. function r6e(t) {
  59850. return t.startAngle != null && t.endAngle != null && t.startAngle === t.endAngle;
  59851. }
  59852. function Gte(t) {
  59853. return /* @__PURE__ */ function(e) {
  59854. var n = e ? "Arc" : "Angle";
  59855. return function(r) {
  59856. switch (r) {
  59857. case "start":
  59858. case "insideStart":
  59859. case "end":
  59860. case "insideEnd":
  59861. return r + n;
  59862. default:
  59863. return r;
  59864. }
  59865. };
  59866. }(t);
  59867. }
  59868. function WV(t, e, n, r, i, a, o, s) {
  59869. var l = e.getItemVisual(n, "style");
  59870. if (s) {
  59871. if (!a.get("roundCap")) {
  59872. var c = t.shape, f = Fc(r.getModel("itemStyle"), c, !0);
  59873. le(c, f), t.setShape(c);
  59874. }
  59875. } else {
  59876. var u = r.get(["itemStyle", "borderRadius"]) || 0;
  59877. t.setShape("r", u);
  59878. }
  59879. t.useStyle(l);
  59880. var d = r.getShallow("cursor");
  59881. d && t.attr("cursor", d);
  59882. var h = s ? o ? i.r >= i.r0 ? "endArc" : "startArc" : i.endAngle >= i.startAngle ? "endAngle" : "startAngle" : o ? i.height >= 0 ? "bottom" : "top" : i.width >= 0 ? "right" : "left", p = er(r);
  59883. Pr(t, p, {
  59884. labelFetcher: a,
  59885. labelDataIndex: n,
  59886. defaultText: Wh(a.getData(), n),
  59887. inheritColor: l.fill,
  59888. defaultOpacity: l.opacity,
  59889. defaultOutsidePosition: h
  59890. });
  59891. var v = t.getTextContent();
  59892. if (s && v) {
  59893. var g = r.get(["label", "position"]);
  59894. t.textConfig.inside = g === "middle" ? !0 : null, q3e(t, g === "outside" ? h : g, Gte(o), r.get(["label", "rotate"]));
  59895. }
  59896. dJ(v, p, a.getRawValue(n), function(y) {
  59897. return Lte(e, y);
  59898. });
  59899. var m = r.getModel(["emphasis"]);
  59900. bn(t, m.get("focus"), m.get("blurScope"), m.get("disabled")), Tr(t, r), r6e(i) && (t.style.fill = "none", t.style.stroke = "none", k(t.states, function(y) {
  59901. y.style && (y.style.fill = y.style.stroke = "none");
  59902. }));
  59903. }
  59904. function i6e(t, e) {
  59905. var n = t.get(["itemStyle", "borderColor"]);
  59906. if (!n || n === "none")
  59907. return 0;
  59908. var r = t.get(["itemStyle", "borderWidth"]) || 0, i = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width), a = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
  59909. return Math.min(r, i, a);
  59910. }
  59911. var a6e = (
  59912. /** @class */
  59913. /* @__PURE__ */ function() {
  59914. function t() {
  59915. }
  59916. return t;
  59917. }()
  59918. ), QV = (
  59919. /** @class */
  59920. function(t) {
  59921. q(e, t);
  59922. function e(n) {
  59923. var r = t.call(this, n) || this;
  59924. return r.type = "largeBar", r;
  59925. }
  59926. return e.prototype.getDefaultShape = function() {
  59927. return new a6e();
  59928. }, e.prototype.buildPath = function(n, r) {
  59929. for (var i = r.points, a = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, c = 0; c < i.length; c += 3)
  59930. l[a] = u, l[o] = i[c + 2], s[a] = i[c + a], s[o] = i[c + o], n.rect(s[0], s[1], l[0], l[1]);
  59931. }, e;
  59932. }(ot)
  59933. );
  59934. function HV(t, e, n, r) {
  59935. var i = t.getData(), a = i.getLayout("valueAxisHorizontal") ? 1 : 0, o = i.getLayout("largeDataIndices"), s = i.getLayout("size"), l = t.getModel("backgroundStyle"), u = i.getLayout("largeBackgroundPoints");
  59936. if (u) {
  59937. var c = new QV({
  59938. shape: {
  59939. points: u
  59940. },
  59941. incremental: !!r,
  59942. silent: !0,
  59943. z2: 0
  59944. });
  59945. c.baseDimIdx = a, c.largeDataIndices = o, c.barWidth = s, c.useStyle(l.getItemStyle()), e.add(c), n && n.push(c);
  59946. }
  59947. var f = new QV({
  59948. shape: {
  59949. points: i.getLayout("largePoints")
  59950. },
  59951. incremental: !!r,
  59952. ignoreCoarsePointer: !0,
  59953. z2: 1
  59954. });
  59955. f.baseDimIdx = a, f.largeDataIndices = o, f.barWidth = s, e.add(f), f.useStyle(i.getVisual("style")), Fe(f).seriesIndex = t.seriesIndex, t.get("silent") || (f.on("mousedown", GV), f.on("mousemove", GV)), n && n.push(f);
  59956. }
  59957. var GV = uw(function(t) {
  59958. var e = this, n = o6e(e, t.offsetX, t.offsetY);
  59959. Fe(e).dataIndex = n >= 0 ? n : null;
  59960. }, 30, !1);
  59961. function o6e(t, e, n) {
  59962. for (var r = t.baseDimIdx, i = 1 - r, a = t.shape.points, o = t.largeDataIndices, s = [], l = [], u = t.barWidth, c = 0, f = a.length / 3; c < f; c++) {
  59963. var d = c * 3;
  59964. if (l[r] = u, l[i] = a[d + 2], s[r] = a[d + r], s[i] = a[d + i], l[i] < 0 && (s[i] += l[i], l[i] = -l[i]), e >= s[0] && e <= s[0] + l[0] && n >= s[1] && n <= s[1] + l[1])
  59965. return o[c];
  59966. }
  59967. return -1;
  59968. }
  59969. function jte(t, e, n) {
  59970. if (Ff(n, "cartesian2d")) {
  59971. var r = e, i = n.getArea();
  59972. return {
  59973. x: t ? r.x : i.x,
  59974. y: t ? i.y : r.y,
  59975. width: t ? r.width : i.width,
  59976. height: t ? i.height : r.height
  59977. };
  59978. } else {
  59979. var i = n.getArea(), a = e;
  59980. return {
  59981. cx: i.cx,
  59982. cy: i.cy,
  59983. r0: t ? i.r0 : a.r0,
  59984. r: t ? i.r : a.r,
  59985. startAngle: t ? a.startAngle : 0,
  59986. endAngle: t ? a.endAngle : Math.PI * 2
  59987. };
  59988. }
  59989. }
  59990. function s6e(t, e, n) {
  59991. var r = t.type === "polar" ? ri : mt;
  59992. return new r({
  59993. shape: jte(e, n, t),
  59994. silent: !0,
  59995. z2: 0
  59996. });
  59997. }
  59998. function l6e(t) {
  59999. t.registerChartView(J3e), t.registerSeriesModel(U3e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(qee, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Kee("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Hte("bar")), t.registerAction({
  60000. type: "changeAxisOrder",
  60001. event: "changeAxisOrder",
  60002. update: "update"
  60003. }, function(e, n) {
  60004. var r = e.componentType || "series";
  60005. n.eachComponent({
  60006. mainType: r,
  60007. query: e
  60008. }, function(i) {
  60009. e.sortInfo && i.axis.setCategorySortInfo(e.sortInfo);
  60010. });
  60011. });
  60012. }
  60013. var jV = Math.PI * 2, xb = Math.PI / 180;
  60014. function Zte(t, e) {
  60015. return Rn(t.getBoxLayoutParams(), {
  60016. width: e.getWidth(),
  60017. height: e.getHeight()
  60018. });
  60019. }
  60020. function Ute(t, e) {
  60021. var n = Zte(t, e), r = t.get("center"), i = t.get("radius");
  60022. ue(i) || (i = [0, i]);
  60023. var a = _e(n.width, e.getWidth()), o = _e(n.height, e.getHeight()), s = Math.min(a, o), l = _e(i[0], s / 2), u = _e(i[1], s / 2), c, f, d = t.coordinateSystem;
  60024. if (d) {
  60025. var h = d.dataToPoint(r);
  60026. c = h[0] || 0, f = h[1] || 0;
  60027. } else
  60028. ue(r) || (r = [r, r]), c = _e(r[0], a) + n.x, f = _e(r[1], o) + n.y;
  60029. return {
  60030. cx: c,
  60031. cy: f,
  60032. r0: l,
  60033. r: u
  60034. };
  60035. }
  60036. function u6e(t, e, n) {
  60037. e.eachSeriesByType(t, function(r) {
  60038. var i = r.getData(), a = i.mapDimension("value"), o = Zte(r, n), s = Ute(r, n), l = s.cx, u = s.cy, c = s.r, f = s.r0, d = -r.get("startAngle") * xb, h = r.get("endAngle"), p = r.get("padAngle") * xb;
  60039. h = h === "auto" ? d - jV : -h * xb;
  60040. var v = r.get("minAngle") * xb, g = v + p, m = 0;
  60041. i.each(a, function(N) {
  60042. !isNaN(N) && m++;
  60043. });
  60044. var y = i.getSum(a), b = Math.PI / (y || m) * 2, _ = r.get("clockwise"), O = r.get("roseType"), S = r.get("stillShowZeroSum"), x = i.getDataExtent(a);
  60045. x[0] = 0;
  60046. var C = _ ? 1 : -1, T = [d, h], w = C * p / 2;
  60047. DR(T, !_), d = T[0], h = T[1];
  60048. var P = Xte(r);
  60049. P.startAngle = d, P.endAngle = h, P.clockwise = _;
  60050. var $ = Math.abs(h - d), A = $, D = 0, E = d;
  60051. if (i.setLayout({
  60052. viewRect: o,
  60053. r: c
  60054. }), i.each(a, function(N, V) {
  60055. var z;
  60056. if (isNaN(N)) {
  60057. i.setItemLayout(V, {
  60058. angle: NaN,
  60059. startAngle: NaN,
  60060. endAngle: NaN,
  60061. clockwise: _,
  60062. cx: l,
  60063. cy: u,
  60064. r0: f,
  60065. r: O ? NaN : c
  60066. });
  60067. return;
  60068. }
  60069. O !== "area" ? z = y === 0 && S ? b : N * b : z = $ / m, z < g ? (z = g, A -= g) : D += N;
  60070. var W = E + C * z, F = 0, Q = 0;
  60071. p > z ? (F = E + C * z / 2, Q = F) : (F = E + w, Q = W - w), i.setItemLayout(V, {
  60072. angle: z,
  60073. startAngle: F,
  60074. endAngle: Q,
  60075. clockwise: _,
  60076. cx: l,
  60077. cy: u,
  60078. r0: f,
  60079. r: O ? Lt(N, x, [f, c]) : c
  60080. }), E = W;
  60081. }), A < jV && m)
  60082. if (A <= 1e-3) {
  60083. var R = $ / m;
  60084. i.each(a, function(N, V) {
  60085. if (!isNaN(N)) {
  60086. var z = i.getItemLayout(V);
  60087. z.angle = R;
  60088. var W = 0, F = 0;
  60089. R < p ? (W = d + C * (V + 1 / 2) * R, F = W) : (W = d + C * V * R + w, F = d + C * (V + 1) * R - w), z.startAngle = W, z.endAngle = F;
  60090. }
  60091. });
  60092. } else
  60093. b = A / D, E = d, i.each(a, function(N, V) {
  60094. if (!isNaN(N)) {
  60095. var z = i.getItemLayout(V), W = z.angle === g ? g : N * b, F = 0, Q = 0;
  60096. W < p ? (F = E + C * W / 2, Q = F) : (F = E + w, Q = E + C * W - w), z.startAngle = F, z.endAngle = Q, E += C * W;
  60097. }
  60098. });
  60099. });
  60100. }
  60101. var Xte = bt();
  60102. function Y0(t) {
  60103. return {
  60104. seriesType: t,
  60105. reset: function(e, n) {
  60106. var r = n.findComponents({
  60107. mainType: "legend"
  60108. });
  60109. if (!(!r || !r.length)) {
  60110. var i = e.getData();
  60111. i.filterSelf(function(a) {
  60112. for (var o = i.getName(a), s = 0; s < r.length; s++)
  60113. if (!r[s].isSelected(o))
  60114. return !1;
  60115. return !0;
  60116. });
  60117. }
  60118. }
  60119. };
  60120. }
  60121. var c6e = Math.PI / 180;
  60122. function ZV(t, e, n, r, i, a, o, s, l, u) {
  60123. if (t.length < 2)
  60124. return;
  60125. function c(v) {
  60126. for (var g = v.rB, m = g * g, y = 0; y < v.list.length; y++) {
  60127. var b = v.list[y], _ = Math.abs(b.label.y - n), O = r + b.len, S = O * O, x = Math.sqrt((1 - Math.abs(_ * _ / m)) * S), C = e + (x + b.len2) * i, T = C - b.label.x, w = b.targetTextWidth - T * i;
  60128. Yte(b, w, !0), b.label.x = C;
  60129. }
  60130. }
  60131. function f(v) {
  60132. for (var g = {
  60133. list: [],
  60134. maxY: 0
  60135. }, m = {
  60136. list: [],
  60137. maxY: 0
  60138. }, y = 0; y < v.length; y++)
  60139. if (v[y].labelAlignTo === "none") {
  60140. var b = v[y], _ = b.label.y > n ? m : g, O = Math.abs(b.label.y - n);
  60141. if (O >= _.maxY) {
  60142. var S = b.label.x - e - b.len2 * i, x = r + b.len, C = Math.abs(S) < x ? Math.sqrt(O * O / (1 - S * S / x / x)) : x;
  60143. _.rB = C, _.maxY = O;
  60144. }
  60145. _.list.push(b);
  60146. }
  60147. c(g), c(m);
  60148. }
  60149. for (var d = t.length, h = 0; h < d; h++)
  60150. if (t[h].position === "outer" && t[h].labelAlignTo === "labelLine") {
  60151. var p = t[h].label.x - u;
  60152. t[h].linePoints[1][0] += p, t[h].label.x = u;
  60153. }
  60154. bte(t, l, l + o) && f(t);
  60155. }
  60156. function f6e(t, e, n, r, i, a, o, s) {
  60157. for (var l = [], u = [], c = Number.MAX_VALUE, f = -Number.MAX_VALUE, d = 0; d < t.length; d++) {
  60158. var h = t[d].label;
  60159. aP(t[d]) || (h.x < e ? (c = Math.min(c, h.x), l.push(t[d])) : (f = Math.max(f, h.x), u.push(t[d])));
  60160. }
  60161. for (var d = 0; d < t.length; d++) {
  60162. var p = t[d];
  60163. if (!aP(p) && p.linePoints) {
  60164. if (p.labelStyleWidth != null)
  60165. continue;
  60166. var h = p.label, v = p.linePoints, g = void 0;
  60167. p.labelAlignTo === "edge" ? h.x < e ? g = v[2][0] - p.labelDistance - o - p.edgeDistance : g = o + i - p.edgeDistance - v[2][0] - p.labelDistance : p.labelAlignTo === "labelLine" ? h.x < e ? g = c - o - p.bleedMargin : g = o + i - f - p.bleedMargin : h.x < e ? g = h.x - o - p.bleedMargin : g = o + i - h.x - p.bleedMargin, p.targetTextWidth = g, Yte(p, g);
  60168. }
  60169. }
  60170. ZV(u, e, n, r, 1, i, a, o, s, f), ZV(l, e, n, r, -1, i, a, o, s, c);
  60171. for (var d = 0; d < t.length; d++) {
  60172. var p = t[d];
  60173. if (!aP(p) && p.linePoints) {
  60174. var h = p.label, v = p.linePoints, m = p.labelAlignTo === "edge", y = h.style.padding, b = y ? y[1] + y[3] : 0, _ = h.style.backgroundColor ? 0 : b, O = p.rect.width + _, S = v[1][0] - v[2][0];
  60175. m ? h.x < e ? v[2][0] = o + p.edgeDistance + O + p.labelDistance : v[2][0] = o + i - p.edgeDistance - O - p.labelDistance : (h.x < e ? v[2][0] = h.x + p.labelDistance : v[2][0] = h.x - p.labelDistance, v[1][0] = v[2][0] + S), v[1][1] = v[2][1] = h.y;
  60176. }
  60177. }
  60178. }
  60179. function Yte(t, e, n) {
  60180. if (n === void 0 && (n = !1), t.labelStyleWidth == null) {
  60181. var r = t.label, i = r.style, a = t.rect, o = i.backgroundColor, s = i.padding, l = s ? s[1] + s[3] : 0, u = i.overflow, c = a.width + (o ? 0 : l);
  60182. if (e < c || n) {
  60183. var f = a.height;
  60184. if (u && u.match("break")) {
  60185. r.setStyle("backgroundColor", null), r.setStyle("width", e - l);
  60186. var d = r.getBoundingRect();
  60187. r.setStyle("width", Math.ceil(d.width)), r.setStyle("backgroundColor", o);
  60188. } else {
  60189. var h = e - l, p = e < c ? h : (
  60190. // Current available width is enough, but the text may have
  60191. // already been wrapped with a smaller available width.
  60192. n ? h > t.unconstrainedWidth ? null : h : null
  60193. );
  60194. r.setStyle("width", p);
  60195. }
  60196. var v = r.getBoundingRect();
  60197. a.width = v.width;
  60198. var g = (r.style.margin || 0) + 2.1;
  60199. a.height = v.height + g, a.y -= (a.height - f) / 2;
  60200. }
  60201. }
  60202. }
  60203. function aP(t) {
  60204. return t.position === "center";
  60205. }
  60206. function d6e(t) {
  60207. var e = t.getData(), n = [], r, i, a = !1, o = (t.get("minShowLabelAngle") || 0) * c6e, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, c = s.x, f = s.y, d = s.height;
  60208. function h(S) {
  60209. S.ignore = !0;
  60210. }
  60211. function p(S) {
  60212. if (!S.ignore)
  60213. return !0;
  60214. for (var x in S.states)
  60215. if (S.states[x].ignore === !1)
  60216. return !0;
  60217. return !1;
  60218. }
  60219. e.each(function(S) {
  60220. var x = e.getItemGraphicEl(S), C = x.shape, T = x.getTextContent(), w = x.getTextGuideLine(), P = e.getItemModel(S), $ = P.getModel("label"), A = $.get("position") || P.get(["emphasis", "label", "position"]), D = $.get("distanceToLabelLine"), E = $.get("alignTo"), R = _e($.get("edgeDistance"), u), N = $.get("bleedMargin"), V = P.getModel("labelLine"), z = V.get("length");
  60221. z = _e(z, u);
  60222. var W = V.get("length2");
  60223. if (W = _e(W, u), Math.abs(C.endAngle - C.startAngle) < o) {
  60224. k(T.states, h), T.ignore = !0, w && (k(w.states, h), w.ignore = !0);
  60225. return;
  60226. }
  60227. if (p(T)) {
  60228. var F = (C.startAngle + C.endAngle) / 2, Q = Math.cos(F), Z = Math.sin(F), ne, ee, oe, K;
  60229. r = C.cx, i = C.cy;
  60230. var ie = A === "inside" || A === "inner";
  60231. if (A === "center")
  60232. ne = C.cx, ee = C.cy, K = "center";
  60233. else {
  60234. var X = (ie ? (C.r + C.r0) / 2 * Q : C.r * Q) + r, H = (ie ? (C.r + C.r0) / 2 * Z : C.r * Z) + i;
  60235. if (ne = X + Q * 3, ee = H + Z * 3, !ie) {
  60236. var G = X + Q * (z + l - C.r), re = H + Z * (z + l - C.r), fe = G + (Q < 0 ? -1 : 1) * W, de = re;
  60237. E === "edge" ? ne = Q < 0 ? c + R : c + u - R : ne = fe + (Q < 0 ? -D : D), ee = de, oe = [[X, H], [G, re], [fe, de]];
  60238. }
  60239. K = ie ? "center" : E === "edge" ? Q > 0 ? "right" : "left" : Q > 0 ? "left" : "right";
  60240. }
  60241. var Ee = Math.PI, $e = 0, Se = $.get("rotate");
  60242. if (St(Se))
  60243. $e = Se * (Ee / 180);
  60244. else if (A === "center")
  60245. $e = 0;
  60246. else if (Se === "radial" || Se === !0) {
  60247. var be = Q < 0 ? -F + Ee : -F;
  60248. $e = be;
  60249. } else if (Se === "tangential" && A !== "outside" && A !== "outer") {
  60250. var he = Math.atan2(Q, Z);
  60251. he < 0 && (he = Ee * 2 + he);
  60252. var Te = Z > 0;
  60253. Te && (he = Ee + he), $e = he - Ee;
  60254. }
  60255. if (a = !!$e, T.x = ne, T.y = ee, T.rotation = $e, T.setStyle({
  60256. verticalAlign: "middle"
  60257. }), ie) {
  60258. T.setStyle({
  60259. align: K
  60260. });
  60261. var ct = T.states.select;
  60262. ct && (ct.x += T.x, ct.y += T.y);
  60263. } else {
  60264. var ze = T.getBoundingRect().clone();
  60265. ze.applyTransform(T.getComputedTransform());
  60266. var ut = (T.style.margin || 0) + 2.1;
  60267. ze.y -= ut / 2, ze.height += ut, n.push({
  60268. label: T,
  60269. labelLine: w,
  60270. position: A,
  60271. len: z,
  60272. len2: W,
  60273. minTurnAngle: V.get("minTurnAngle"),
  60274. maxSurfaceAngle: V.get("maxSurfaceAngle"),
  60275. surfaceNormal: new Ke(Q, Z),
  60276. linePoints: oe,
  60277. textAlign: K,
  60278. labelDistance: D,
  60279. labelAlignTo: E,
  60280. edgeDistance: R,
  60281. bleedMargin: N,
  60282. rect: ze,
  60283. unconstrainedWidth: ze.width,
  60284. labelStyleWidth: T.style.width
  60285. });
  60286. }
  60287. x.setTextConfig({
  60288. inside: ie
  60289. });
  60290. }
  60291. }), !a && t.get("avoidLabelOverlap") && f6e(n, r, i, l, u, d, c, f);
  60292. for (var v = 0; v < n.length; v++) {
  60293. var g = n[v], m = g.label, y = g.labelLine, b = isNaN(m.x) || isNaN(m.y);
  60294. if (m) {
  60295. m.setStyle({
  60296. align: g.textAlign
  60297. }), b && (k(m.states, h), m.ignore = !0);
  60298. var _ = m.states.select;
  60299. _ && (_.x += m.x, _.y += m.y);
  60300. }
  60301. if (y) {
  60302. var O = g.linePoints;
  60303. b || !O ? (k(y.states, h), y.ignore = !0) : (gte(O, g.minTurnAngle), k5e(O, g.surfaceNormal, g.maxSurfaceAngle), y.setShape({
  60304. points: O
  60305. }), m.__hostTarget.textGuideLineConfig = {
  60306. anchor: new Ke(O[0][0], O[0][1])
  60307. });
  60308. }
  60309. }
  60310. }
  60311. var h6e = (
  60312. /** @class */
  60313. function(t) {
  60314. q(e, t);
  60315. function e(n, r, i) {
  60316. var a = t.call(this) || this;
  60317. a.z2 = 2;
  60318. var o = new gt();
  60319. return a.setTextContent(o), a.updateData(n, r, i, !0), a;
  60320. }
  60321. return e.prototype.updateData = function(n, r, i, a) {
  60322. var o = this, s = n.hostModel, l = n.getItemModel(r), u = l.getModel("emphasis"), c = n.getItemLayout(r), f = le(Fc(l.getModel("itemStyle"), c, !0), c);
  60323. if (isNaN(f.startAngle)) {
  60324. o.setShape(f);
  60325. return;
  60326. }
  60327. if (a) {
  60328. o.setShape(f);
  60329. var d = s.getShallow("animationType");
  60330. s.ecModel.ssr ? (Yt(o, {
  60331. scaleX: 0,
  60332. scaleY: 0
  60333. }, s, {
  60334. dataIndex: r,
  60335. isFrom: !0
  60336. }), o.originX = f.cx, o.originY = f.cy) : d === "scale" ? (o.shape.r = c.r0, Yt(o, {
  60337. shape: {
  60338. r: c.r
  60339. }
  60340. }, s, r)) : i != null ? (o.setShape({
  60341. startAngle: i,
  60342. endAngle: i
  60343. }), Yt(o, {
  60344. shape: {
  60345. startAngle: c.startAngle,
  60346. endAngle: c.endAngle
  60347. }
  60348. }, s, r)) : (o.shape.endAngle = c.startAngle, Ct(o, {
  60349. shape: {
  60350. endAngle: c.endAngle
  60351. }
  60352. }, s, r));
  60353. } else
  60354. so(o), Ct(o, {
  60355. shape: f
  60356. }, s, r);
  60357. o.useStyle(n.getItemVisual(r, "style")), Tr(o, l);
  60358. var h = (c.startAngle + c.endAngle) / 2, p = s.get("selectedOffset"), v = Math.cos(h) * p, g = Math.sin(h) * p, m = l.getShallow("cursor");
  60359. m && o.attr("cursor", m), this._updateLabel(s, n, r), o.ensureState("emphasis").shape = le({
  60360. r: c.r + (u.get("scale") && u.get("scaleSize") || 0)
  60361. }, Fc(u.getModel("itemStyle"), c)), le(o.ensureState("select"), {
  60362. x: v,
  60363. y: g,
  60364. shape: Fc(l.getModel(["select", "itemStyle"]), c)
  60365. }), le(o.ensureState("blur"), {
  60366. shape: Fc(l.getModel(["blur", "itemStyle"]), c)
  60367. });
  60368. var y = o.getTextGuideLine(), b = o.getTextContent();
  60369. y && le(y.ensureState("select"), {
  60370. x: v,
  60371. y: g
  60372. }), le(b.ensureState("select"), {
  60373. x: v,
  60374. y: g
  60375. }), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
  60376. }, e.prototype._updateLabel = function(n, r, i) {
  60377. var a = this, o = r.getItemModel(i), s = o.getModel("labelLine"), l = r.getItemVisual(i, "style"), u = l && l.fill, c = l && l.opacity;
  60378. Pr(a, er(o), {
  60379. labelFetcher: r.hostModel,
  60380. labelDataIndex: i,
  60381. inheritColor: u,
  60382. defaultOpacity: c,
  60383. defaultText: n.getFormattedLabel(i, "normal") || r.getName(i)
  60384. });
  60385. var f = a.getTextContent();
  60386. a.setTextConfig({
  60387. // reset position, rotation
  60388. position: null,
  60389. rotation: null
  60390. }), f.attr({
  60391. z2: 10
  60392. });
  60393. var d = n.get(["label", "position"]);
  60394. if (d !== "outside" && d !== "outer")
  60395. a.removeTextGuideLine();
  60396. else {
  60397. var h = this.getTextGuideLine();
  60398. h || (h = new ai(), this.setTextGuideLine(h)), Ak(this, Ek(o), {
  60399. stroke: u,
  60400. opacity: ji(s.get(["lineStyle", "opacity"]), c, 1)
  60401. });
  60402. }
  60403. }, e;
  60404. }(ri)
  60405. ), p6e = (
  60406. /** @class */
  60407. function(t) {
  60408. q(e, t);
  60409. function e() {
  60410. var n = t !== null && t.apply(this, arguments) || this;
  60411. return n.ignoreLabelLineUpdate = !0, n;
  60412. }
  60413. return e.prototype.render = function(n, r, i, a) {
  60414. var o = n.getData(), s = this._data, l = this.group, u;
  60415. if (!s && o.count() > 0) {
  60416. for (var c = o.getItemLayout(0), f = 1; isNaN(c && c.startAngle) && f < o.count(); ++f)
  60417. c = o.getItemLayout(f);
  60418. c && (u = c.startAngle);
  60419. }
  60420. if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && n.get("showEmptyCircle")) {
  60421. var d = Xte(n), h = new ri({
  60422. shape: le(Ute(n, i), d)
  60423. });
  60424. h.useStyle(n.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, l.add(h);
  60425. }
  60426. o.diff(s).add(function(p) {
  60427. var v = new h6e(o, p, u);
  60428. o.setItemGraphicEl(p, v), l.add(v);
  60429. }).update(function(p, v) {
  60430. var g = s.getItemGraphicEl(v);
  60431. g.updateData(o, p, u), g.off("click"), l.add(g), o.setItemGraphicEl(p, g);
  60432. }).remove(function(p) {
  60433. var v = s.getItemGraphicEl(p);
  60434. wm(v, n, p);
  60435. }).execute(), d6e(n), n.get("animationTypeUpdate") !== "expansion" && (this._data = o);
  60436. }, e.prototype.dispose = function() {
  60437. }, e.prototype.containPoint = function(n, r) {
  60438. var i = r.getData(), a = i.getItemLayout(0);
  60439. if (a) {
  60440. var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
  60441. return l <= a.r && l >= a.r0;
  60442. }
  60443. }, e.type = "pie", e;
  60444. }(zt)
  60445. );
  60446. function Pp(t, e, n) {
  60447. e = ue(e) && {
  60448. coordDimensions: e
  60449. } || le({
  60450. encodeDefine: t.getEncode()
  60451. }, e);
  60452. var r = t.getSource(), i = wp(r, e).dimensions, a = new Lr(i, t);
  60453. return a.initData(r, n), a;
  60454. }
  60455. var q0 = (
  60456. /** @class */
  60457. function() {
  60458. function t(e, n) {
  60459. this._getDataWithEncodedVisual = e, this._getRawData = n;
  60460. }
  60461. return t.prototype.getAllNames = function() {
  60462. var e = this._getRawData();
  60463. return e.mapArray(e.getName);
  60464. }, t.prototype.containName = function(e) {
  60465. var n = this._getRawData();
  60466. return n.indexOfName(e) >= 0;
  60467. }, t.prototype.indexOfName = function(e) {
  60468. var n = this._getDataWithEncodedVisual();
  60469. return n.indexOfName(e);
  60470. }, t.prototype.getItemVisual = function(e, n) {
  60471. var r = this._getDataWithEncodedVisual();
  60472. return r.getItemVisual(e, n);
  60473. }, t;
  60474. }()
  60475. ), v6e = bt(), g6e = (
  60476. /** @class */
  60477. function(t) {
  60478. q(e, t);
  60479. function e() {
  60480. return t !== null && t.apply(this, arguments) || this;
  60481. }
  60482. return e.prototype.init = function(n) {
  60483. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
  60484. }, e.prototype.mergeOption = function() {
  60485. t.prototype.mergeOption.apply(this, arguments);
  60486. }, e.prototype.getInitialData = function() {
  60487. return Pp(this, {
  60488. coordDimensions: ["value"],
  60489. encodeDefaulter: Ue(nk, this)
  60490. });
  60491. }, e.prototype.getDataParams = function(n) {
  60492. var r = this.getData(), i = v6e(r), a = i.seats;
  60493. if (!a) {
  60494. var o = [];
  60495. r.each(r.mapDimension("value"), function(l) {
  60496. o.push(l);
  60497. }), a = i.seats = sK(o, r.hostModel.get("percentPrecision"));
  60498. }
  60499. var s = t.prototype.getDataParams.call(this, n);
  60500. return s.percent = a[n] || 0, s.$vars.push("percent"), s;
  60501. }, e.prototype._defaultLabelLine = function(n) {
  60502. gf(n, "labelLine", ["show"]);
  60503. var r = n.labelLine, i = n.emphasis.labelLine;
  60504. r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
  60505. }, e.type = "series.pie", e.defaultOption = {
  60506. // zlevel: 0,
  60507. z: 2,
  60508. legendHoverLink: !0,
  60509. colorBy: "data",
  60510. // 默认全局居中
  60511. center: ["50%", "50%"],
  60512. radius: [0, "75%"],
  60513. // 默认顺时针
  60514. clockwise: !0,
  60515. startAngle: 90,
  60516. endAngle: "auto",
  60517. padAngle: 0,
  60518. // 最小角度改为0
  60519. minAngle: 0,
  60520. // If the angle of a sector less than `minShowLabelAngle`,
  60521. // the label will not be displayed.
  60522. minShowLabelAngle: 0,
  60523. // 选中时扇区偏移量
  60524. selectedOffset: 10,
  60525. // 选择模式,默认关闭,可选single,multiple
  60526. // selectedMode: false,
  60527. // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)
  60528. // roseType: null,
  60529. percentPrecision: 2,
  60530. // If still show when all data zero.
  60531. stillShowZeroSum: !0,
  60532. // cursor: null,
  60533. left: 0,
  60534. top: 0,
  60535. right: 0,
  60536. bottom: 0,
  60537. width: null,
  60538. height: null,
  60539. label: {
  60540. // color: 'inherit',
  60541. // If rotate around circle
  60542. rotate: 0,
  60543. show: !0,
  60544. overflow: "truncate",
  60545. // 'outer', 'inside', 'center'
  60546. position: "outer",
  60547. // 'none', 'labelLine', 'edge'. Works only when position is 'outer'
  60548. alignTo: "none",
  60549. // Closest distance between label and chart edge.
  60550. // Works only position is 'outer' and alignTo is 'edge'.
  60551. edgeDistance: "25%",
  60552. // Works only position is 'outer' and alignTo is not 'edge'.
  60553. bleedMargin: 10,
  60554. // Distance between text and label line.
  60555. distanceToLabelLine: 5
  60556. // formatter: 标签文本格式器,同 tooltip.formatter,不支持异步回调
  60557. // 默认使用全局文本样式,详见 textStyle
  60558. // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数
  60559. },
  60560. // Enabled when label.normal.position is 'outer'
  60561. labelLine: {
  60562. show: !0,
  60563. // 引导线两段中的第一段长度
  60564. length: 15,
  60565. // 引导线两段中的第二段长度
  60566. length2: 15,
  60567. smooth: !1,
  60568. minTurnAngle: 90,
  60569. maxSurfaceAngle: 90,
  60570. lineStyle: {
  60571. // color: 各异,
  60572. width: 1,
  60573. type: "solid"
  60574. }
  60575. },
  60576. itemStyle: {
  60577. borderWidth: 1,
  60578. borderJoin: "round"
  60579. },
  60580. showEmptyCircle: !0,
  60581. emptyCircleStyle: {
  60582. color: "lightgray",
  60583. opacity: 1
  60584. },
  60585. labelLayout: {
  60586. // Hide the overlapped label.
  60587. hideOverlap: !0
  60588. },
  60589. emphasis: {
  60590. scale: !0,
  60591. scaleSize: 5
  60592. },
  60593. // If use strategy to avoid label overlapping
  60594. avoidLabelOverlap: !0,
  60595. // Animation type. Valid values: expansion, scale
  60596. animationType: "expansion",
  60597. animationDuration: 1e3,
  60598. // Animation type when update. Valid values: transition, expansion
  60599. animationTypeUpdate: "transition",
  60600. animationEasingUpdate: "cubicInOut",
  60601. animationDurationUpdate: 500,
  60602. animationEasing: "cubicInOut"
  60603. }, e;
  60604. }(Ht)
  60605. );
  60606. function m6e(t) {
  60607. return {
  60608. seriesType: t,
  60609. reset: function(e, n) {
  60610. var r = e.getData();
  60611. r.filterSelf(function(i) {
  60612. var a = r.mapDimension("value"), o = r.get(a, i);
  60613. return !(St(o) && !isNaN(o) && o < 0);
  60614. });
  60615. }
  60616. };
  60617. }
  60618. function y6e(t) {
  60619. t.registerChartView(p6e), t.registerSeriesModel(g6e), pee("pie", t.registerAction), t.registerLayout(Ue(u6e, "pie")), t.registerProcessor(Y0("pie")), t.registerProcessor(m6e("pie"));
  60620. }
  60621. var b6e = (
  60622. /** @class */
  60623. function(t) {
  60624. q(e, t);
  60625. function e() {
  60626. var n = t !== null && t.apply(this, arguments) || this;
  60627. return n.type = e.type, n.hasSymbolVisual = !0, n;
  60628. }
  60629. return e.prototype.getInitialData = function(n, r) {
  60630. return us(null, this, {
  60631. useEncodeDefaulter: !0
  60632. });
  60633. }, e.prototype.getProgressive = function() {
  60634. var n = this.option.progressive;
  60635. return n ?? (this.option.large ? 5e3 : this.get("progressive"));
  60636. }, e.prototype.getProgressiveThreshold = function() {
  60637. var n = this.option.progressiveThreshold;
  60638. return n ?? (this.option.large ? 1e4 : this.get("progressiveThreshold"));
  60639. }, e.prototype.brushSelector = function(n, r, i) {
  60640. return i.point(r.getItemLayout(n));
  60641. }, e.prototype.getZLevelKey = function() {
  60642. return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
  60643. }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  60644. coordinateSystem: "cartesian2d",
  60645. // zlevel: 0,
  60646. z: 2,
  60647. legendHoverLink: !0,
  60648. symbolSize: 10,
  60649. // symbolRotate: null, // 图形旋转控制
  60650. large: !1,
  60651. // Available when large is true
  60652. largeThreshold: 2e3,
  60653. // cursor: null,
  60654. itemStyle: {
  60655. opacity: 0.8
  60656. // color: 各异
  60657. },
  60658. emphasis: {
  60659. scale: !0
  60660. },
  60661. // If clip the overflow graphics
  60662. // Works on cartesian / polar series
  60663. clip: !0,
  60664. select: {
  60665. itemStyle: {
  60666. borderColor: "#212121"
  60667. }
  60668. },
  60669. universalTransition: {
  60670. divideShape: "clone"
  60671. }
  60672. // progressive: null
  60673. }, e;
  60674. }(Ht)
  60675. ), qte = 4, _6e = (
  60676. /** @class */
  60677. /* @__PURE__ */ function() {
  60678. function t() {
  60679. }
  60680. return t;
  60681. }()
  60682. ), O6e = (
  60683. /** @class */
  60684. function(t) {
  60685. q(e, t);
  60686. function e(n) {
  60687. var r = t.call(this, n) || this;
  60688. return r._off = 0, r.hoverDataIdx = -1, r;
  60689. }
  60690. return e.prototype.getDefaultShape = function() {
  60691. return new _6e();
  60692. }, e.prototype.reset = function() {
  60693. this.notClear = !1, this._off = 0;
  60694. }, e.prototype.buildPath = function(n, r) {
  60695. var i = r.points, a = r.size, o = this.symbolProxy, s = o.shape, l = n.getContext ? n.getContext() : n, u = l && a[0] < qte, c = this.softClipShape, f;
  60696. if (u) {
  60697. this._ctx = l;
  60698. return;
  60699. }
  60700. for (this._ctx = null, f = this._off; f < i.length; ) {
  60701. var d = i[f++], h = i[f++];
  60702. isNaN(d) || isNaN(h) || c && !c.contain(d, h) || (s.x = d - a[0] / 2, s.y = h - a[1] / 2, s.width = a[0], s.height = a[1], o.buildPath(n, s, !0));
  60703. }
  60704. this.incremental && (this._off = f, this.notClear = !0);
  60705. }, e.prototype.afterBrush = function() {
  60706. var n = this.shape, r = n.points, i = n.size, a = this._ctx, o = this.softClipShape, s;
  60707. if (a) {
  60708. for (s = this._off; s < r.length; ) {
  60709. var l = r[s++], u = r[s++];
  60710. isNaN(l) || isNaN(u) || o && !o.contain(l, u) || a.fillRect(l - i[0] / 2, u - i[1] / 2, i[0], i[1]);
  60711. }
  60712. this.incremental && (this._off = s, this.notClear = !0);
  60713. }
  60714. }, e.prototype.findDataIndex = function(n, r) {
  60715. for (var i = this.shape, a = i.points, o = i.size, s = Math.max(o[0], 4), l = Math.max(o[1], 4), u = a.length / 2 - 1; u >= 0; u--) {
  60716. var c = u * 2, f = a[c] - s / 2, d = a[c + 1] - l / 2;
  60717. if (n >= f && r >= d && n <= f + s && r <= d + l)
  60718. return u;
  60719. }
  60720. return -1;
  60721. }, e.prototype.contain = function(n, r) {
  60722. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  60723. if (n = i[0], r = i[1], a.contain(n, r)) {
  60724. var o = this.hoverDataIdx = this.findDataIndex(n, r);
  60725. return o >= 0;
  60726. }
  60727. return this.hoverDataIdx = -1, !1;
  60728. }, e.prototype.getBoundingRect = function() {
  60729. var n = this._rect;
  60730. if (!n) {
  60731. for (var r = this.shape, i = r.points, a = r.size, o = a[0], s = a[1], l = 1 / 0, u = 1 / 0, c = -1 / 0, f = -1 / 0, d = 0; d < i.length; ) {
  60732. var h = i[d++], p = i[d++];
  60733. l = Math.min(h, l), c = Math.max(h, c), u = Math.min(p, u), f = Math.max(p, f);
  60734. }
  60735. n = this._rect = new Je(l - o / 2, u - s / 2, c - l + o, f - u + s);
  60736. }
  60737. return n;
  60738. }, e;
  60739. }(ot)
  60740. ), S6e = (
  60741. /** @class */
  60742. function() {
  60743. function t() {
  60744. this.group = new Ve();
  60745. }
  60746. return t.prototype.updateData = function(e, n) {
  60747. this._clear();
  60748. var r = this._create();
  60749. r.setShape({
  60750. points: e.getLayout("points")
  60751. }), this._setCommon(r, e, n);
  60752. }, t.prototype.updateLayout = function(e) {
  60753. var n = e.getLayout("points");
  60754. this.group.eachChild(function(r) {
  60755. if (r.startIndex != null) {
  60756. var i = (r.endIndex - r.startIndex) * 2, a = r.startIndex * 4 * 2;
  60757. n = new Float32Array(n.buffer, a, i);
  60758. }
  60759. r.setShape("points", n), r.reset();
  60760. });
  60761. }, t.prototype.incrementalPrepareUpdate = function(e) {
  60762. this._clear();
  60763. }, t.prototype.incrementalUpdate = function(e, n, r) {
  60764. var i = this._newAdded[0], a = n.getLayout("points"), o = i && i.shape.points;
  60765. if (o && o.length < 2e4) {
  60766. var s = o.length, l = new Float32Array(s + a.length);
  60767. l.set(o), l.set(a, s), i.endIndex = e.end, i.setShape({
  60768. points: l
  60769. });
  60770. } else {
  60771. this._newAdded = [];
  60772. var u = this._create();
  60773. u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
  60774. points: a
  60775. }), this._setCommon(u, n, r);
  60776. }
  60777. }, t.prototype.eachRendered = function(e) {
  60778. this._newAdded[0] && e(this._newAdded[0]);
  60779. }, t.prototype._create = function() {
  60780. var e = new O6e({
  60781. cursor: "default"
  60782. });
  60783. return e.ignoreCoarsePointer = !0, this.group.add(e), this._newAdded.push(e), e;
  60784. }, t.prototype._setCommon = function(e, n, r) {
  60785. var i = n.hostModel;
  60786. r = r || {};
  60787. var a = n.getVisual("symbolSize");
  60788. e.setShape("size", a instanceof Array ? a : [a, a]), e.softClipShape = r.clipShape || null, e.symbolProxy = $n(n.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
  60789. var o = e.shape.size[0] < qte;
  60790. e.useStyle(
  60791. // Draw shadow when doing fillRect is extremely slow.
  60792. i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
  60793. );
  60794. var s = n.getVisual("style"), l = s && s.fill;
  60795. l && e.setColor(l);
  60796. var u = Fe(e);
  60797. u.seriesIndex = i.seriesIndex, e.on("mousemove", function(c) {
  60798. u.dataIndex = null;
  60799. var f = e.hoverDataIdx;
  60800. f >= 0 && (u.dataIndex = f + (e.startIndex || 0));
  60801. });
  60802. }, t.prototype.remove = function() {
  60803. this._clear();
  60804. }, t.prototype._clear = function() {
  60805. this._newAdded = [], this.group.removeAll();
  60806. }, t;
  60807. }()
  60808. ), x6e = (
  60809. /** @class */
  60810. function(t) {
  60811. q(e, t);
  60812. function e() {
  60813. var n = t !== null && t.apply(this, arguments) || this;
  60814. return n.type = e.type, n;
  60815. }
  60816. return e.prototype.render = function(n, r, i) {
  60817. var a = n.getData(), o = this._updateSymbolDraw(a, n);
  60818. o.updateData(a, {
  60819. // TODO
  60820. // If this parameter should be a shape or a bounding volume
  60821. // shape will be more general.
  60822. // But bounding volume like bounding rect will be much faster in the contain calculation
  60823. clipShape: this._getClipShape(n)
  60824. }), this._finished = !0;
  60825. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  60826. var a = n.getData(), o = this._updateSymbolDraw(a, n);
  60827. o.incrementalPrepareUpdate(a), this._finished = !1;
  60828. }, e.prototype.incrementalRender = function(n, r, i) {
  60829. this._symbolDraw.incrementalUpdate(n, r.getData(), {
  60830. clipShape: this._getClipShape(r)
  60831. }), this._finished = n.end === r.getData().count();
  60832. }, e.prototype.updateTransform = function(n, r, i) {
  60833. var a = n.getData();
  60834. if (this.group.dirty(), !this._finished || a.count() > 1e4)
  60835. return {
  60836. update: !0
  60837. };
  60838. var o = X0("").reset(n, r, i);
  60839. o.progress && o.progress({
  60840. start: 0,
  60841. end: a.count(),
  60842. count: a.count()
  60843. }, a), this._symbolDraw.updateLayout(a);
  60844. }, e.prototype.eachRendered = function(n) {
  60845. this._symbolDraw && this._symbolDraw.eachRendered(n);
  60846. }, e.prototype._getClipShape = function(n) {
  60847. if (n.get("clip", !0)) {
  60848. var r = n.coordinateSystem;
  60849. return r && r.getArea && r.getArea(0.1);
  60850. }
  60851. }, e.prototype._updateSymbolDraw = function(n, r) {
  60852. var i = this._symbolDraw, a = r.pipelineContext, o = a.large;
  60853. return (!i || o !== this._isLargeDraw) && (i && i.remove(), i = this._symbolDraw = o ? new S6e() : new Z0(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(i.group), i;
  60854. }, e.prototype.remove = function(n, r) {
  60855. this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
  60856. }, e.prototype.dispose = function() {
  60857. }, e.type = "scatter", e;
  60858. }(zt)
  60859. ), w6e = (
  60860. /** @class */
  60861. function(t) {
  60862. q(e, t);
  60863. function e() {
  60864. return t !== null && t.apply(this, arguments) || this;
  60865. }
  60866. return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
  60867. show: !1,
  60868. // zlevel: 0,
  60869. z: 0,
  60870. left: "10%",
  60871. top: 60,
  60872. right: "10%",
  60873. bottom: 70,
  60874. // If grid size contain label
  60875. containLabel: !1,
  60876. // width: {totalWidth} - left - right,
  60877. // height: {totalHeight} - top - bottom,
  60878. backgroundColor: "rgba(0,0,0,0)",
  60879. borderWidth: 1,
  60880. borderColor: "#ccc"
  60881. }, e;
  60882. }(rt)
  60883. ), uE = (
  60884. /** @class */
  60885. function(t) {
  60886. q(e, t);
  60887. function e() {
  60888. return t !== null && t.apply(this, arguments) || this;
  60889. }
  60890. return e.prototype.getCoordSysModel = function() {
  60891. return this.getReferringComponents("grid", Dn).models[0];
  60892. }, e.type = "cartesian2dAxis", e;
  60893. }(rt)
  60894. );
  60895. xn(uE, Tp);
  60896. var Kte = {
  60897. show: !0,
  60898. // zlevel: 0,
  60899. z: 0,
  60900. // Inverse the axis.
  60901. inverse: !1,
  60902. // Axis name displayed.
  60903. name: "",
  60904. // 'start' | 'middle' | 'end'
  60905. nameLocation: "end",
  60906. // By degree. By default auto rotate by nameLocation.
  60907. nameRotate: null,
  60908. nameTruncate: {
  60909. maxWidth: null,
  60910. ellipsis: "...",
  60911. placeholder: "."
  60912. },
  60913. // Use global text style by default.
  60914. nameTextStyle: {},
  60915. // The gap between axisName and axisLine.
  60916. nameGap: 15,
  60917. // Default `false` to support tooltip.
  60918. silent: !1,
  60919. // Default `false` to avoid legacy user event listener fail.
  60920. triggerEvent: !1,
  60921. tooltip: {
  60922. show: !1
  60923. },
  60924. axisPointer: {},
  60925. axisLine: {
  60926. show: !0,
  60927. onZero: !0,
  60928. onZeroAxisIndex: null,
  60929. lineStyle: {
  60930. color: "#6E7079",
  60931. width: 1,
  60932. type: "solid"
  60933. },
  60934. // The arrow at both ends the the axis.
  60935. symbol: ["none", "none"],
  60936. symbolSize: [10, 15]
  60937. },
  60938. axisTick: {
  60939. show: !0,
  60940. // Whether axisTick is inside the grid or outside the grid.
  60941. inside: !1,
  60942. // The length of axisTick.
  60943. length: 5,
  60944. lineStyle: {
  60945. width: 1
  60946. }
  60947. },
  60948. axisLabel: {
  60949. show: !0,
  60950. // Whether axisLabel is inside the grid or outside the grid.
  60951. inside: !1,
  60952. rotate: 0,
  60953. // true | false | null/undefined (auto)
  60954. showMinLabel: null,
  60955. // true | false | null/undefined (auto)
  60956. showMaxLabel: null,
  60957. margin: 8,
  60958. // formatter: null,
  60959. fontSize: 12
  60960. },
  60961. splitLine: {
  60962. show: !0,
  60963. lineStyle: {
  60964. color: ["#E0E6F1"],
  60965. width: 1,
  60966. type: "solid"
  60967. }
  60968. },
  60969. splitArea: {
  60970. show: !1,
  60971. areaStyle: {
  60972. color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
  60973. }
  60974. }
  60975. }, C6e = qe({
  60976. // The gap at both ends of the axis. For categoryAxis, boolean.
  60977. boundaryGap: !0,
  60978. // Set false to faster category collection.
  60979. deduplication: null,
  60980. // splitArea: {
  60981. // show: false
  60982. // },
  60983. splitLine: {
  60984. show: !1
  60985. },
  60986. axisTick: {
  60987. // If tick is align with label when boundaryGap is true
  60988. alignWithLabel: !1,
  60989. interval: "auto"
  60990. },
  60991. axisLabel: {
  60992. interval: "auto"
  60993. }
  60994. }, Kte), Nk = qe({
  60995. boundaryGap: [0, 0],
  60996. axisLine: {
  60997. // Not shown when other axis is categoryAxis in cartesian
  60998. show: "auto"
  60999. },
  61000. axisTick: {
  61001. // Not shown when other axis is categoryAxis in cartesian
  61002. show: "auto"
  61003. },
  61004. // TODO
  61005. // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]
  61006. splitNumber: 5,
  61007. minorTick: {
  61008. // Minor tick, not available for cateogry axis.
  61009. show: !1,
  61010. // Split number of minor ticks. The value should be in range of (0, 100)
  61011. splitNumber: 5,
  61012. // Length of minor tick
  61013. length: 3,
  61014. // Line style
  61015. lineStyle: {
  61016. // Default to be same with axisTick
  61017. }
  61018. },
  61019. minorSplitLine: {
  61020. show: !1,
  61021. lineStyle: {
  61022. color: "#F4F7FD",
  61023. width: 1
  61024. }
  61025. }
  61026. }, Kte), T6e = qe({
  61027. splitNumber: 6,
  61028. axisLabel: {
  61029. // To eliminate labels that are not nice
  61030. showMinLabel: !1,
  61031. showMaxLabel: !1,
  61032. rich: {
  61033. primary: {
  61034. fontWeight: "bold"
  61035. }
  61036. }
  61037. },
  61038. splitLine: {
  61039. show: !1
  61040. }
  61041. }, Nk), P6e = Re({
  61042. logBase: 10
  61043. }, Nk);
  61044. const Jte = {
  61045. category: C6e,
  61046. value: Nk,
  61047. time: T6e,
  61048. log: P6e
  61049. };
  61050. var $6e = {
  61051. value: 1,
  61052. category: 1,
  61053. time: 1,
  61054. log: 1
  61055. };
  61056. function Qh(t, e, n, r) {
  61057. k($6e, function(i, a) {
  61058. var o = qe(qe({}, Jte[a], !0), r, !0), s = (
  61059. /** @class */
  61060. function(l) {
  61061. q(u, l);
  61062. function u() {
  61063. var c = l !== null && l.apply(this, arguments) || this;
  61064. return c.type = e + "Axis." + a, c;
  61065. }
  61066. return u.prototype.mergeDefaultAndTheme = function(c, f) {
  61067. var d = Tm(this), h = d ? bp(c) : {}, p = f.getTheme();
  61068. qe(c, p.get(a + "Axis")), qe(c, this.getDefaultOption()), c.type = UV(c), d && cu(c, h, d);
  61069. }, u.prototype.optionUpdated = function() {
  61070. var c = this.option;
  61071. c.type === "category" && (this.__ordinalMeta = tE.createByAxisModel(this));
  61072. }, u.prototype.getCategories = function(c) {
  61073. var f = this.option;
  61074. if (f.type === "category")
  61075. return c ? f.data : this.__ordinalMeta.categories;
  61076. }, u.prototype.getOrdinalMeta = function() {
  61077. return this.__ordinalMeta;
  61078. }, u.type = e + "Axis." + a, u.defaultOption = o, u;
  61079. }(n)
  61080. );
  61081. t.registerComponentModel(s);
  61082. }), t.registerSubTypeDefaulter(e + "Axis", UV);
  61083. }
  61084. function UV(t) {
  61085. return t.type || (t.data ? "category" : "value");
  61086. }
  61087. var A6e = (
  61088. /** @class */
  61089. function() {
  61090. function t(e) {
  61091. this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
  61092. }
  61093. return t.prototype.getAxis = function(e) {
  61094. return this._axes[e];
  61095. }, t.prototype.getAxes = function() {
  61096. return ce(this._dimList, function(e) {
  61097. return this._axes[e];
  61098. }, this);
  61099. }, t.prototype.getAxesByScale = function(e) {
  61100. return e = e.toLowerCase(), Nt(this.getAxes(), function(n) {
  61101. return n.scale.type === e;
  61102. });
  61103. }, t.prototype.addAxis = function(e) {
  61104. var n = e.dim;
  61105. this._axes[n] = e, this._dimList.push(n);
  61106. }, t;
  61107. }()
  61108. ), cE = ["x", "y"];
  61109. function XV(t) {
  61110. return t.type === "interval" || t.type === "time";
  61111. }
  61112. var E6e = (
  61113. /** @class */
  61114. function(t) {
  61115. q(e, t);
  61116. function e() {
  61117. var n = t !== null && t.apply(this, arguments) || this;
  61118. return n.type = "cartesian2d", n.dimensions = cE, n;
  61119. }
  61120. return e.prototype.calcAffineTransform = function() {
  61121. this._transform = this._invTransform = null;
  61122. var n = this.getAxis("x").scale, r = this.getAxis("y").scale;
  61123. if (!(!XV(n) || !XV(r))) {
  61124. var i = n.getExtent(), a = r.getExtent(), o = this.dataToPoint([i[0], a[0]]), s = this.dataToPoint([i[1], a[1]]), l = i[1] - i[0], u = a[1] - a[0];
  61125. if (!(!l || !u)) {
  61126. var c = (s[0] - o[0]) / l, f = (s[1] - o[1]) / u, d = o[0] - i[0] * c, h = o[1] - a[0] * f, p = this._transform = [c, 0, 0, f, d, h];
  61127. this._invTransform = kf([], p);
  61128. }
  61129. }
  61130. }, e.prototype.getBaseAxis = function() {
  61131. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
  61132. }, e.prototype.containPoint = function(n) {
  61133. var r = this.getAxis("x"), i = this.getAxis("y");
  61134. return r.contain(r.toLocalCoord(n[0])) && i.contain(i.toLocalCoord(n[1]));
  61135. }, e.prototype.containData = function(n) {
  61136. return this.getAxis("x").containData(n[0]) && this.getAxis("y").containData(n[1]);
  61137. }, e.prototype.containZone = function(n, r) {
  61138. var i = this.dataToPoint(n), a = this.dataToPoint(r), o = this.getArea(), s = new Je(i[0], i[1], a[0] - i[0], a[1] - i[1]);
  61139. return o.intersect(s);
  61140. }, e.prototype.dataToPoint = function(n, r, i) {
  61141. i = i || [];
  61142. var a = n[0], o = n[1];
  61143. if (this._transform && a != null && isFinite(a) && o != null && isFinite(o))
  61144. return ar(i, n, this._transform);
  61145. var s = this.getAxis("x"), l = this.getAxis("y");
  61146. return i[0] = s.toGlobalCoord(s.dataToCoord(a, r)), i[1] = l.toGlobalCoord(l.dataToCoord(o, r)), i;
  61147. }, e.prototype.clampData = function(n, r) {
  61148. var i = this.getAxis("x").scale, a = this.getAxis("y").scale, o = i.getExtent(), s = a.getExtent(), l = i.parse(n[0]), u = a.parse(n[1]);
  61149. return r = r || [], r[0] = Math.min(Math.max(Math.min(o[0], o[1]), l), Math.max(o[0], o[1])), r[1] = Math.min(Math.max(Math.min(s[0], s[1]), u), Math.max(s[0], s[1])), r;
  61150. }, e.prototype.pointToData = function(n, r) {
  61151. var i = [];
  61152. if (this._invTransform)
  61153. return ar(i, n, this._invTransform);
  61154. var a = this.getAxis("x"), o = this.getAxis("y");
  61155. return i[0] = a.coordToData(a.toLocalCoord(n[0]), r), i[1] = o.coordToData(o.toLocalCoord(n[1]), r), i;
  61156. }, e.prototype.getOtherAxis = function(n) {
  61157. return this.getAxis(n.dim === "x" ? "y" : "x");
  61158. }, e.prototype.getArea = function(n) {
  61159. n = n || 0;
  61160. var r = this.getAxis("x").getGlobalExtent(), i = this.getAxis("y").getGlobalExtent(), a = Math.min(r[0], r[1]) - n, o = Math.min(i[0], i[1]) - n, s = Math.max(r[0], r[1]) - a + n, l = Math.max(i[0], i[1]) - o + n;
  61161. return new Je(a, o, s, l);
  61162. }, e;
  61163. }(A6e)
  61164. ), M6e = (
  61165. /** @class */
  61166. function(t) {
  61167. q(e, t);
  61168. function e(n, r, i, a, o) {
  61169. var s = t.call(this, n, r, i) || this;
  61170. return s.index = 0, s.type = a || "value", s.position = o || "bottom", s;
  61171. }
  61172. return e.prototype.isHorizontal = function() {
  61173. var n = this.position;
  61174. return n === "top" || n === "bottom";
  61175. }, e.prototype.getGlobalExtent = function(n) {
  61176. var r = this.getExtent();
  61177. return r[0] = this.toGlobalCoord(r[0]), r[1] = this.toGlobalCoord(r[1]), n && r[0] > r[1] && r.reverse(), r;
  61178. }, e.prototype.pointToData = function(n, r) {
  61179. return this.coordToData(this.toLocalCoord(n[this.dim === "x" ? 0 : 1]), r);
  61180. }, e.prototype.setCategorySortInfo = function(n) {
  61181. if (this.type !== "category")
  61182. return !1;
  61183. this.model.option.categorySortInfo = n, this.scale.setSortInfo(n);
  61184. }, e;
  61185. }(Ba)
  61186. );
  61187. function fE(t, e, n) {
  61188. n = n || {};
  61189. var r = t.coordinateSystem, i = e.axis, a = {}, o = i.getAxesOnZeroOf()[0], s = i.position, l = o ? "onZero" : s, u = i.dim, c = r.getRect(), f = [c.x, c.x + c.width, c.y, c.y + c.height], d = {
  61190. left: 0,
  61191. right: 1,
  61192. top: 0,
  61193. bottom: 1,
  61194. onZero: 2
  61195. }, h = e.get("offset") || 0, p = u === "x" ? [f[2] - h, f[3] + h] : [f[0] - h, f[1] + h];
  61196. if (o) {
  61197. var v = o.toGlobalCoord(o.dataToCoord(0));
  61198. p[d.onZero] = Math.max(Math.min(v, p[1]), p[0]);
  61199. }
  61200. a.position = [u === "y" ? p[d[l]] : f[0], u === "x" ? p[d[l]] : f[3]], a.rotation = Math.PI / 2 * (u === "x" ? 0 : 1);
  61201. var g = {
  61202. top: -1,
  61203. bottom: 1,
  61204. left: -1,
  61205. right: 1
  61206. };
  61207. a.labelDirection = a.tickDirection = a.nameDirection = g[s], a.labelOffset = o ? p[d[s]] - p[d.onZero] : 0, e.get(["axisTick", "inside"]) && (a.tickDirection = -a.tickDirection), Tn(n.labelInside, e.get(["axisLabel", "inside"])) && (a.labelDirection = -a.labelDirection);
  61208. var m = e.get(["axisLabel", "rotate"]);
  61209. return a.labelRotate = l === "top" ? -m : m, a.z2 = 1, a;
  61210. }
  61211. function YV(t) {
  61212. return t.get("coordinateSystem") === "cartesian2d";
  61213. }
  61214. function qV(t) {
  61215. var e = {
  61216. xAxisModel: null,
  61217. yAxisModel: null
  61218. };
  61219. return k(e, function(n, r) {
  61220. var i = r.replace(/Model$/, ""), a = t.getReferringComponents(i, Dn).models[0];
  61221. if (process.env.NODE_ENV !== "production" && !a)
  61222. throw new Error(i + ' "' + ji(t.get(i + "Index"), t.get(i + "Id"), 0) + '" not found');
  61223. e[r] = a;
  61224. }), e;
  61225. }
  61226. var oP = Math.log;
  61227. function ene(t, e, n) {
  61228. var r = Ys.prototype, i = r.getTicks.call(n), a = r.getTicks.call(n, !0), o = i.length - 1, s = r.getInterval.call(n), l = rte(t, e), u = l.extent, c = l.fixMin, f = l.fixMax;
  61229. if (t.type === "log") {
  61230. var d = oP(t.base);
  61231. u = [oP(u[0]) / d, oP(u[1]) / d];
  61232. }
  61233. t.setExtent(u[0], u[1]), t.calcNiceExtent({
  61234. splitNumber: o,
  61235. fixMin: c,
  61236. fixMax: f
  61237. });
  61238. var h = r.getExtent.call(t);
  61239. c && (u[0] = h[0]), f && (u[1] = h[1]);
  61240. var p = r.getInterval.call(t), v = u[0], g = u[1];
  61241. if (c && f)
  61242. p = (g - v) / o;
  61243. else if (c)
  61244. for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
  61245. p = GT(p), g = u[0] + p * o;
  61246. else if (f)
  61247. for (v = u[1] - p * o; v > u[0] && isFinite(v) && isFinite(u[0]); )
  61248. p = GT(p), v = u[1] - p * o;
  61249. else {
  61250. var m = t.getTicks().length - 1;
  61251. m > o && (p = GT(p));
  61252. var y = p * o;
  61253. g = Math.ceil(u[1] / p) * p, v = mn(g - y), v < 0 && u[0] >= 0 ? (v = 0, g = mn(y)) : g > 0 && u[1] <= 0 && (g = 0, v = -mn(y));
  61254. }
  61255. var b = (i[0].value - a[0].value) / s, _ = (i[o].value - a[o].value) / s;
  61256. if (r.setExtent.call(t, v + p * b, g + p * _), r.setInterval.call(t, p), (b || _) && r.setNiceExtent.call(t, v + p, g - p), process.env.NODE_ENV !== "production") {
  61257. var O = r.getTicks.call(t);
  61258. O[1] && (!PNe(p) || iO(O[1].value) > iO(p)) && dn(
  61259. // eslint-disable-next-line
  61260. "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
  61261. );
  61262. }
  61263. }
  61264. var I6e = (
  61265. /** @class */
  61266. function() {
  61267. function t(e, n, r) {
  61268. this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = cE, this._initCartesian(e, n, r), this.model = e;
  61269. }
  61270. return t.prototype.getRect = function() {
  61271. return this._rect;
  61272. }, t.prototype.update = function(e, n) {
  61273. var r = this._axesMap;
  61274. this._updateScale(e, this.model);
  61275. function i(o) {
  61276. var s, l = st(o), u = l.length;
  61277. if (u) {
  61278. for (var c = [], f = u - 1; f >= 0; f--) {
  61279. var d = +l[f], h = o[d], p = h.model, v = h.scale;
  61280. // Only value and log axis without interval support alignTicks.
  61281. nE(v) && p.get("alignTicks") && p.get("interval") == null ? c.push(h) : (Of(v, p), nE(v) && (s = h));
  61282. }
  61283. c.length && (s || (s = c.pop(), Of(s.scale, s.model)), k(c, function(g) {
  61284. ene(g.scale, g.model, s.scale);
  61285. }));
  61286. }
  61287. }
  61288. i(r.x), i(r.y);
  61289. var a = {};
  61290. k(r.x, function(o) {
  61291. KV(r, "y", o, a);
  61292. }), k(r.y, function(o) {
  61293. KV(r, "x", o, a);
  61294. }), this.resize(this.model, n);
  61295. }, t.prototype.resize = function(e, n, r) {
  61296. var i = e.getBoxLayoutParams(), a = !r && e.get("containLabel"), o = Rn(i, {
  61297. width: n.getWidth(),
  61298. height: n.getHeight()
  61299. });
  61300. this._rect = o;
  61301. var s = this._axesList;
  61302. l(), a && (k(s, function(u) {
  61303. if (!u.model.get(["axisLabel", "inside"])) {
  61304. var c = qNe(u);
  61305. if (c) {
  61306. var f = u.isHorizontal() ? "height" : "width", d = u.model.get(["axisLabel", "margin"]);
  61307. o[f] -= c[f] + d, u.position === "top" ? o.y += c.height + d : u.position === "left" && (o.x += c.width + d);
  61308. }
  61309. }
  61310. }), l()), k(this._coordsList, function(u) {
  61311. u.calcAffineTransform();
  61312. });
  61313. function l() {
  61314. k(s, function(u) {
  61315. var c = u.isHorizontal(), f = c ? [0, o.width] : [0, o.height], d = u.inverse ? 1 : 0;
  61316. u.setExtent(f[d], f[1 - d]), D6e(u, c ? o.x : o.y);
  61317. });
  61318. }
  61319. }, t.prototype.getAxis = function(e, n) {
  61320. var r = this._axesMap[e];
  61321. if (r != null)
  61322. return r[n || 0];
  61323. }, t.prototype.getAxes = function() {
  61324. return this._axesList.slice();
  61325. }, t.prototype.getCartesian = function(e, n) {
  61326. if (e != null && n != null) {
  61327. var r = "x" + e + "y" + n;
  61328. return this._coordsMap[r];
  61329. }
  61330. Ie(e) && (n = e.yAxisIndex, e = e.xAxisIndex);
  61331. for (var i = 0, a = this._coordsList; i < a.length; i++)
  61332. if (a[i].getAxis("x").index === e || a[i].getAxis("y").index === n)
  61333. return a[i];
  61334. }, t.prototype.getCartesians = function() {
  61335. return this._coordsList.slice();
  61336. }, t.prototype.convertToPixel = function(e, n, r) {
  61337. var i = this._findConvertTarget(n);
  61338. return i.cartesian ? i.cartesian.dataToPoint(r) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(r)) : null;
  61339. }, t.prototype.convertFromPixel = function(e, n, r) {
  61340. var i = this._findConvertTarget(n);
  61341. return i.cartesian ? i.cartesian.pointToData(r) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(r)) : null;
  61342. }, t.prototype._findConvertTarget = function(e) {
  61343. var n = e.seriesModel, r = e.xAxisModel || n && n.getReferringComponents("xAxis", Dn).models[0], i = e.yAxisModel || n && n.getReferringComponents("yAxis", Dn).models[0], a = e.gridModel, o = this._coordsList, s, l;
  61344. if (n)
  61345. s = n.coordinateSystem, et(o, s) < 0 && (s = null);
  61346. else if (r && i)
  61347. s = this.getCartesian(r.componentIndex, i.componentIndex);
  61348. else if (r)
  61349. l = this.getAxis("x", r.componentIndex);
  61350. else if (i)
  61351. l = this.getAxis("y", i.componentIndex);
  61352. else if (a) {
  61353. var u = a.coordinateSystem;
  61354. u === this && (s = this._coordsList[0]);
  61355. }
  61356. return {
  61357. cartesian: s,
  61358. axis: l
  61359. };
  61360. }, t.prototype.containPoint = function(e) {
  61361. var n = this._coordsList[0];
  61362. if (n)
  61363. return n.containPoint(e);
  61364. }, t.prototype._initCartesian = function(e, n, r) {
  61365. var i = this, a = this, o = {
  61366. left: !1,
  61367. right: !1,
  61368. top: !1,
  61369. bottom: !1
  61370. }, s = {
  61371. x: {},
  61372. y: {}
  61373. }, l = {
  61374. x: 0,
  61375. y: 0
  61376. };
  61377. if (n.eachComponent("xAxis", u("x"), this), n.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
  61378. this._axesMap = {}, this._axesList = [];
  61379. return;
  61380. }
  61381. this._axesMap = s, k(s.x, function(c, f) {
  61382. k(s.y, function(d, h) {
  61383. var p = "x" + f + "y" + h, v = new E6e(p);
  61384. v.master = i, v.model = e, i._coordsMap[p] = v, i._coordsList.push(v), v.addAxis(c), v.addAxis(d);
  61385. });
  61386. });
  61387. function u(c) {
  61388. return function(f, d) {
  61389. if (sP(f, e)) {
  61390. var h = f.get("position");
  61391. c === "x" ? h !== "top" && h !== "bottom" && (h = o.bottom ? "top" : "bottom") : h !== "left" && h !== "right" && (h = o.left ? "right" : "left"), o[h] = !0;
  61392. var p = new M6e(c, G0(f), [0, 0], f.get("type"), h), v = p.type === "category";
  61393. p.onBand = v && f.get("boundaryGap"), p.inverse = f.get("inverse"), f.axis = p, p.model = f, p.grid = a, p.index = d, a._axesList.push(p), s[c][d] = p, l[c]++;
  61394. }
  61395. };
  61396. }
  61397. }, t.prototype._updateScale = function(e, n) {
  61398. k(this._axesList, function(i) {
  61399. if (i.scale.setExtent(1 / 0, -1 / 0), i.type === "category") {
  61400. var a = i.model.get("categorySortInfo");
  61401. i.scale.setSortInfo(a);
  61402. }
  61403. }), e.eachSeries(function(i) {
  61404. if (YV(i)) {
  61405. var a = qV(i), o = a.xAxisModel, s = a.yAxisModel;
  61406. if (!sP(o, n) || !sP(s, n))
  61407. return;
  61408. var l = this.getCartesian(o.componentIndex, s.componentIndex), u = i.getData(), c = l.getAxis("x"), f = l.getAxis("y");
  61409. r(u, c), r(u, f);
  61410. }
  61411. }, this);
  61412. function r(i, a) {
  61413. k(CO(i, a.dim), function(o) {
  61414. a.scale.unionExtentFromData(i, o);
  61415. });
  61416. }
  61417. }, t.prototype.getTooltipAxes = function(e) {
  61418. var n = [], r = [];
  61419. return k(this.getCartesians(), function(i) {
  61420. var a = e != null && e !== "auto" ? i.getAxis(e) : i.getBaseAxis(), o = i.getOtherAxis(a);
  61421. et(n, a) < 0 && n.push(a), et(r, o) < 0 && r.push(o);
  61422. }), {
  61423. baseAxes: n,
  61424. otherAxes: r
  61425. };
  61426. }, t.create = function(e, n) {
  61427. var r = [];
  61428. return e.eachComponent("grid", function(i, a) {
  61429. var o = new t(i, e, n);
  61430. o.name = "grid_" + a, o.resize(i, n, !0), i.coordinateSystem = o, r.push(o);
  61431. }), e.eachSeries(function(i) {
  61432. if (YV(i)) {
  61433. var a = qV(i), o = a.xAxisModel, s = a.yAxisModel, l = o.getCoordSysModel();
  61434. if (process.env.NODE_ENV !== "production") {
  61435. if (!l)
  61436. throw new Error('Grid "' + ji(o.get("gridIndex"), o.get("gridId"), 0) + '" not found');
  61437. if (o.getCoordSysModel() !== s.getCoordSysModel())
  61438. throw new Error("xAxis and yAxis must use the same grid");
  61439. }
  61440. var u = l.coordinateSystem;
  61441. i.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
  61442. }
  61443. }), r;
  61444. }, t.dimensions = cE, t;
  61445. }()
  61446. );
  61447. function sP(t, e) {
  61448. return t.getCoordSysModel() === e;
  61449. }
  61450. function KV(t, e, n, r) {
  61451. n.getAxesOnZeroOf = function() {
  61452. return a ? [a] : [];
  61453. };
  61454. var i = t[e], a, o = n.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
  61455. if (!s)
  61456. return;
  61457. if (l != null)
  61458. JV(i[l]) && (a = i[l]);
  61459. else
  61460. for (var u in i)
  61461. if (i.hasOwnProperty(u) && JV(i[u]) && !r[c(i[u])]) {
  61462. a = i[u];
  61463. break;
  61464. }
  61465. a && (r[c(a)] = !0);
  61466. function c(f) {
  61467. return f.dim + "_" + f.index;
  61468. }
  61469. }
  61470. function JV(t) {
  61471. return t && t.type !== "category" && t.type !== "time" && YNe(t);
  61472. }
  61473. function D6e(t, e) {
  61474. var n = t.getExtent(), r = n[0] + n[1];
  61475. t.toGlobalCoord = t.dim === "x" ? function(i) {
  61476. return i + e;
  61477. } : function(i) {
  61478. return r - i + e;
  61479. }, t.toLocalCoord = t.dim === "x" ? function(i) {
  61480. return i - e;
  61481. } : function(i) {
  61482. return r - i + e;
  61483. };
  61484. }
  61485. var zl = Math.PI, Kr = (
  61486. /** @class */
  61487. function() {
  61488. function t(e, n) {
  61489. this.group = new Ve(), this.opt = n, this.axisModel = e, Re(n, {
  61490. labelOffset: 0,
  61491. nameDirection: 1,
  61492. tickDirection: 1,
  61493. labelDirection: 1,
  61494. silent: !0,
  61495. handleAutoShown: function() {
  61496. return !0;
  61497. }
  61498. });
  61499. var r = new Ve({
  61500. x: n.position[0],
  61501. y: n.position[1],
  61502. rotation: n.rotation
  61503. });
  61504. r.updateTransform(), this._transformGroup = r;
  61505. }
  61506. return t.prototype.hasBuilder = function(e) {
  61507. return !!eF[e];
  61508. }, t.prototype.add = function(e) {
  61509. eF[e](this.opt, this.axisModel, this.group, this._transformGroup);
  61510. }, t.prototype.getGroup = function() {
  61511. return this.group;
  61512. }, t.innerTextLayout = function(e, n, r) {
  61513. var i = PR(n - e), a, o;
  61514. return Lh(i) ? (o = r > 0 ? "top" : "bottom", a = "center") : Lh(i - zl) ? (o = r > 0 ? "bottom" : "top", a = "center") : (o = "middle", i > 0 && i < zl ? a = r > 0 ? "right" : "left" : a = r > 0 ? "left" : "right"), {
  61515. rotation: i,
  61516. textAlign: a,
  61517. textVerticalAlign: o
  61518. };
  61519. }, t.makeAxisEventDataBase = function(e) {
  61520. var n = {
  61521. componentType: e.mainType,
  61522. componentIndex: e.componentIndex
  61523. };
  61524. return n[e.mainType + "Index"] = e.componentIndex, n;
  61525. }, t.isLabelSilent = function(e) {
  61526. var n = e.get("tooltip");
  61527. return e.get("silent") || !(e.get("triggerEvent") || n && n.show);
  61528. }, t;
  61529. }()
  61530. ), eF = {
  61531. axisLine: function(t, e, n, r) {
  61532. var i = e.get(["axisLine", "show"]);
  61533. if (i === "auto" && t.handleAutoShown && (i = t.handleAutoShown("axisLine")), !!i) {
  61534. var a = e.axis.getExtent(), o = r.transform, s = [a[0], 0], l = [a[1], 0], u = s[0] > l[0];
  61535. o && (ar(s, s, o), ar(l, l, o));
  61536. var c = le({
  61537. lineCap: "round"
  61538. }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), f = new Un({
  61539. shape: {
  61540. x1: s[0],
  61541. y1: s[1],
  61542. x2: l[0],
  61543. y2: l[1]
  61544. },
  61545. style: c,
  61546. strokeContainThreshold: t.strokeContainThreshold || 5,
  61547. silent: !0,
  61548. z2: 1
  61549. });
  61550. zh(f.shape, f.style.lineWidth), f.anid = "line", n.add(f);
  61551. var d = e.get(["axisLine", "symbol"]);
  61552. if (d != null) {
  61553. var h = e.get(["axisLine", "symbolSize"]);
  61554. Oe(d) && (d = [d, d]), (Oe(h) || St(h)) && (h = [h, h]);
  61555. var p = Vf(e.get(["axisLine", "symbolOffset"]) || 0, h), v = h[0], g = h[1];
  61556. k([{
  61557. rotate: t.rotation + Math.PI / 2,
  61558. offset: p[0],
  61559. r: 0
  61560. }, {
  61561. rotate: t.rotation - Math.PI / 2,
  61562. offset: p[1],
  61563. r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
  61564. }], function(m, y) {
  61565. if (d[y] !== "none" && d[y] != null) {
  61566. var b = $n(d[y], -v / 2, -g / 2, v, g, c.stroke, !0), _ = m.r + m.offset, O = u ? l : s;
  61567. b.attr({
  61568. rotation: m.rotate,
  61569. x: O[0] + _ * Math.cos(t.rotation),
  61570. y: O[1] - _ * Math.sin(t.rotation),
  61571. silent: !0,
  61572. z2: 11
  61573. }), n.add(b);
  61574. }
  61575. });
  61576. }
  61577. }
  61578. },
  61579. axisTickLabel: function(t, e, n, r) {
  61580. var i = L6e(n, r, e, t), a = B6e(n, r, e, t);
  61581. if (k6e(e, a, i), N6e(n, r, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
  61582. var o = mte(ce(a, function(s) {
  61583. return {
  61584. label: s,
  61585. priority: s.z2,
  61586. defaultAttr: {
  61587. ignore: s.ignore
  61588. }
  61589. };
  61590. }));
  61591. _te(o);
  61592. }
  61593. },
  61594. axisName: function(t, e, n, r) {
  61595. var i = Tn(t.axisName, e.get("name"));
  61596. if (i) {
  61597. var a = e.get("nameLocation"), o = t.nameDirection, s = e.getModel("nameTextStyle"), l = e.get("nameGap") || 0, u = e.axis.getExtent(), c = u[0] > u[1] ? -1 : 1, f = [
  61598. a === "start" ? u[0] - c * l : a === "end" ? u[1] + c * l : (u[0] + u[1]) / 2,
  61599. // Reuse labelOffset.
  61600. nF(a) ? t.labelOffset + o * l : 0
  61601. ], d, h = e.get("nameRotate");
  61602. h != null && (h = h * zl / 180);
  61603. var p;
  61604. nF(a) ? d = Kr.innerTextLayout(
  61605. t.rotation,
  61606. h ?? t.rotation,
  61607. // Adapt to axis.
  61608. o
  61609. ) : (d = R6e(t.rotation, a, h || 0, u), p = t.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(d.rotation)), !isFinite(p) && (p = null)));
  61610. var v = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, y = Tn(t.nameTruncateMaxWidth, g.maxWidth, p), b = new gt({
  61611. x: f[0],
  61612. y: f[1],
  61613. rotation: d.rotation,
  61614. silent: Kr.isLabelSilent(e),
  61615. style: Zt(s, {
  61616. text: i,
  61617. font: v,
  61618. overflow: "truncate",
  61619. width: y,
  61620. ellipsis: m,
  61621. fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  61622. align: s.get("align") || d.textAlign,
  61623. verticalAlign: s.get("verticalAlign") || d.textVerticalAlign
  61624. }),
  61625. z2: 1
  61626. });
  61627. if (gp({
  61628. el: b,
  61629. componentModel: e,
  61630. itemName: i
  61631. }), b.__fullText = i, b.anid = "name", e.get("triggerEvent")) {
  61632. var _ = Kr.makeAxisEventDataBase(e);
  61633. _.targetType = "axisName", _.name = i, Fe(b).eventData = _;
  61634. }
  61635. r.add(b), b.updateTransform(), n.add(b), b.decomposeTransform();
  61636. }
  61637. }
  61638. };
  61639. function R6e(t, e, n, r) {
  61640. var i = PR(n - t), a, o, s = r[0] > r[1], l = e === "start" && !s || e !== "start" && s;
  61641. return Lh(i - zl / 2) ? (o = l ? "bottom" : "top", a = "center") : Lh(i - zl * 1.5) ? (o = l ? "top" : "bottom", a = "center") : (o = "middle", i < zl * 1.5 && i > zl / 2 ? a = l ? "left" : "right" : a = l ? "right" : "left"), {
  61642. rotation: i,
  61643. textAlign: a,
  61644. textVerticalAlign: o
  61645. };
  61646. }
  61647. function k6e(t, e, n) {
  61648. if (!ite(t.axis)) {
  61649. var r = t.get(["axisLabel", "showMinLabel"]), i = t.get(["axisLabel", "showMaxLabel"]);
  61650. e = e || [], n = n || [];
  61651. var a = e[0], o = e[1], s = e[e.length - 1], l = e[e.length - 2], u = n[0], c = n[1], f = n[n.length - 1], d = n[n.length - 2];
  61652. r === !1 ? (na(a), na(u)) : tF(a, o) && (r ? (na(o), na(c)) : (na(a), na(u))), i === !1 ? (na(s), na(f)) : tF(l, s) && (i ? (na(l), na(d)) : (na(s), na(f)));
  61653. }
  61654. }
  61655. function na(t) {
  61656. t && (t.ignore = !0);
  61657. }
  61658. function tF(t, e) {
  61659. var n = t && t.getBoundingRect().clone(), r = e && e.getBoundingRect().clone();
  61660. if (!(!n || !r)) {
  61661. var i = D0([]);
  61662. return Cu(i, i, -t.rotation), n.applyTransform(Uo([], i, t.getLocalTransform())), r.applyTransform(Uo([], i, e.getLocalTransform())), n.intersect(r);
  61663. }
  61664. }
  61665. function nF(t) {
  61666. return t === "middle" || t === "center";
  61667. }
  61668. function tne(t, e, n, r, i) {
  61669. for (var a = [], o = [], s = [], l = 0; l < t.length; l++) {
  61670. var u = t[l].coord;
  61671. o[0] = u, o[1] = 0, s[0] = u, s[1] = n, e && (ar(o, o, e), ar(s, s, e));
  61672. var c = new Un({
  61673. shape: {
  61674. x1: o[0],
  61675. y1: o[1],
  61676. x2: s[0],
  61677. y2: s[1]
  61678. },
  61679. style: r,
  61680. z2: 2,
  61681. autoBatch: !0,
  61682. silent: !0
  61683. });
  61684. zh(c.shape, c.style.lineWidth), c.anid = i + "_" + t[l].tickValue, a.push(c);
  61685. }
  61686. return a;
  61687. }
  61688. function L6e(t, e, n, r) {
  61689. var i = n.axis, a = n.getModel("axisTick"), o = a.get("show");
  61690. if (o === "auto" && r.handleAutoShown && (o = r.handleAutoShown("axisTick")), !(!o || i.scale.isBlank())) {
  61691. for (var s = a.getModel("lineStyle"), l = r.tickDirection * a.get("length"), u = i.getTicksCoords(), c = tne(u, e.transform, l, Re(s.getLineStyle(), {
  61692. stroke: n.get(["axisLine", "lineStyle", "color"])
  61693. }), "ticks"), f = 0; f < c.length; f++)
  61694. t.add(c[f]);
  61695. return c;
  61696. }
  61697. }
  61698. function N6e(t, e, n, r) {
  61699. var i = n.axis, a = n.getModel("minorTick");
  61700. if (!(!a.get("show") || i.scale.isBlank())) {
  61701. var o = i.getMinorTicksCoords();
  61702. if (o.length)
  61703. for (var s = a.getModel("lineStyle"), l = r * a.get("length"), u = Re(s.getLineStyle(), Re(n.getModel("axisTick").getLineStyle(), {
  61704. stroke: n.get(["axisLine", "lineStyle", "color"])
  61705. })), c = 0; c < o.length; c++)
  61706. for (var f = tne(o[c], e.transform, l, u, "minorticks_" + c), d = 0; d < f.length; d++)
  61707. t.add(f[d]);
  61708. }
  61709. }
  61710. function B6e(t, e, n, r) {
  61711. var i = n.axis, a = Tn(r.axisLabelShow, n.get(["axisLabel", "show"]));
  61712. if (!(!a || i.scale.isBlank())) {
  61713. var o = n.getModel("axisLabel"), s = o.get("margin"), l = i.getViewLabels(), u = (Tn(r.labelRotate, o.get("rotate")) || 0) * zl / 180, c = Kr.innerTextLayout(r.rotation, u, r.labelDirection), f = n.getCategories && n.getCategories(!0), d = [], h = Kr.isLabelSilent(n), p = n.get("triggerEvent");
  61714. return k(l, function(v, g) {
  61715. var m = i.scale.type === "ordinal" ? i.scale.getRawOrdinalNumber(v.tickValue) : v.tickValue, y = v.formattedLabel, b = v.rawLabel, _ = o;
  61716. if (f && f[m]) {
  61717. var O = f[m];
  61718. Ie(O) && O.textStyle && (_ = new Wt(O.textStyle, o, n.ecModel));
  61719. }
  61720. var S = _.getTextColor() || n.get(["axisLine", "lineStyle", "color"]), x = i.dataToCoord(m), C = _.getShallow("align", !0) || c.textAlign, T = We(_.getShallow("alignMinLabel", !0), C), w = We(_.getShallow("alignMaxLabel", !0), C), P = _.getShallow("verticalAlign", !0) || _.getShallow("baseline", !0) || c.textVerticalAlign, $ = We(_.getShallow("verticalAlignMinLabel", !0), P), A = We(_.getShallow("verticalAlignMaxLabel", !0), P), D = new gt({
  61721. x,
  61722. y: r.labelOffset + r.labelDirection * s,
  61723. rotation: c.rotation,
  61724. silent: h,
  61725. z2: 10 + (v.level || 0),
  61726. style: Zt(_, {
  61727. text: y,
  61728. align: g === 0 ? T : g === l.length - 1 ? w : C,
  61729. verticalAlign: g === 0 ? $ : g === l.length - 1 ? A : P,
  61730. fill: Me(S) ? S(
  61731. // (1) In category axis with data zoom, tick is not the original
  61732. // index of axis.data. So tick should not be exposed to user
  61733. // in category axis.
  61734. // (2) Compatible with previous version, which always use formatted label as
  61735. // input. But in interval scale the formatted label is like '223,445', which
  61736. // maked user replace ','. So we modify it to return original val but remain
  61737. // it as 'string' to avoid error in replacing.
  61738. i.type === "category" ? b : i.type === "value" ? m + "" : m,
  61739. g
  61740. ) : S
  61741. })
  61742. });
  61743. if (D.anid = "label_" + m, p) {
  61744. var E = Kr.makeAxisEventDataBase(n);
  61745. E.targetType = "axisLabel", E.value = b, E.tickIndex = g, i.type === "category" && (E.dataIndex = m), Fe(D).eventData = E;
  61746. }
  61747. e.add(D), D.updateTransform(), d.push(D), t.add(D), D.decomposeTransform();
  61748. }), d;
  61749. }
  61750. }
  61751. function z6e(t, e) {
  61752. var n = {
  61753. /**
  61754. * key: makeKey(axis.model)
  61755. * value: {
  61756. * axis,
  61757. * coordSys,
  61758. * axisPointerModel,
  61759. * triggerTooltip,
  61760. * triggerEmphasis,
  61761. * involveSeries,
  61762. * snap,
  61763. * seriesModels,
  61764. * seriesDataCount
  61765. * }
  61766. */
  61767. axesInfo: {},
  61768. seriesInvolved: !1,
  61769. /**
  61770. * key: makeKey(coordSys.model)
  61771. * value: Object: key makeKey(axis.model), value: axisInfo
  61772. */
  61773. coordSysAxesInfo: {},
  61774. coordSysMap: {}
  61775. };
  61776. return V6e(n, t, e), n.seriesInvolved && W6e(n, t), n;
  61777. }
  61778. function V6e(t, e, n) {
  61779. var r = e.getComponent("tooltip"), i = e.getComponent("axisPointer"), a = i.get("link", !0) || [], o = [];
  61780. k(n.getCoordinateSystems(), function(s) {
  61781. if (!s.axisPointerEnabled)
  61782. return;
  61783. var l = km(s.model), u = t.coordSysAxesInfo[l] = {};
  61784. t.coordSysMap[l] = s;
  61785. var c = s.model, f = c.getModel("tooltip", r);
  61786. if (k(s.getAxes(), Ue(v, !1, null)), s.getTooltipAxes && r && f.get("show")) {
  61787. var d = f.get("trigger") === "axis", h = f.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(f.get(["axisPointer", "axis"]));
  61788. (d || h) && k(p.baseAxes, Ue(v, h ? "cross" : !0, d)), h && k(p.otherAxes, Ue(v, "cross", !1));
  61789. }
  61790. function v(g, m, y) {
  61791. var b = y.model.getModel("axisPointer", i), _ = b.get("show");
  61792. if (!(!_ || _ === "auto" && !g && !dE(b))) {
  61793. m == null && (m = b.get("triggerTooltip")), b = g ? F6e(y, f, i, e, g, m) : b;
  61794. var O = b.get("snap"), S = b.get("triggerEmphasis"), x = km(y.model), C = m || O || y.type === "category", T = t.axesInfo[x] = {
  61795. key: x,
  61796. axis: y,
  61797. coordSys: s,
  61798. axisPointerModel: b,
  61799. triggerTooltip: m,
  61800. triggerEmphasis: S,
  61801. involveSeries: C,
  61802. snap: O,
  61803. useHandle: dE(b),
  61804. seriesModels: [],
  61805. linkGroup: null
  61806. };
  61807. u[x] = T, t.seriesInvolved = t.seriesInvolved || C;
  61808. var w = Q6e(a, y);
  61809. if (w != null) {
  61810. var P = o[w] || (o[w] = {
  61811. axesInfo: {}
  61812. });
  61813. P.axesInfo[x] = T, P.mapper = a[w].mapper, T.linkGroup = P;
  61814. }
  61815. }
  61816. }
  61817. });
  61818. }
  61819. function F6e(t, e, n, r, i, a) {
  61820. var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
  61821. k(s, function(d) {
  61822. l[d] = Le(o.get(d));
  61823. }), l.snap = t.type !== "category" && !!a, o.get("type") === "cross" && (l.type = "line");
  61824. var u = l.label || (l.label = {});
  61825. if (u.show == null && (u.show = !1), i === "cross") {
  61826. var c = o.get(["label", "show"]);
  61827. if (u.show = c ?? !0, !a) {
  61828. var f = l.lineStyle = o.get("crossStyle");
  61829. f && Re(u, f.textStyle);
  61830. }
  61831. }
  61832. return t.model.getModel("axisPointer", new Wt(l, n, r));
  61833. }
  61834. function W6e(t, e) {
  61835. e.eachSeries(function(n) {
  61836. var r = n.coordinateSystem, i = n.get(["tooltip", "trigger"], !0), a = n.get(["tooltip", "show"], !0);
  61837. !r || i === "none" || i === !1 || i === "item" || a === !1 || n.get(["axisPointer", "show"], !0) === !1 || k(t.coordSysAxesInfo[km(r.model)], function(o) {
  61838. var s = o.axis;
  61839. r.getAxis(s.dim) === s && (o.seriesModels.push(n), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += n.getData().count());
  61840. });
  61841. });
  61842. }
  61843. function Q6e(t, e) {
  61844. for (var n = e.model, r = e.dim, i = 0; i < t.length; i++) {
  61845. var a = t[i] || {};
  61846. if (lP(a[r + "AxisId"], n.id) || lP(a[r + "AxisIndex"], n.componentIndex) || lP(a[r + "AxisName"], n.name))
  61847. return i;
  61848. }
  61849. }
  61850. function lP(t, e) {
  61851. return t === "all" || ue(t) && et(t, e) >= 0 || t === e;
  61852. }
  61853. function H6e(t) {
  61854. var e = Bk(t);
  61855. if (e) {
  61856. var n = e.axisPointerModel, r = e.axis.scale, i = n.option, a = n.get("status"), o = n.get("value");
  61857. o != null && (o = r.parse(o));
  61858. var s = dE(n);
  61859. a == null && (i.status = s ? "show" : "hide");
  61860. var l = r.getExtent().slice();
  61861. l[0] > l[1] && l.reverse(), // Pick a value on axis when initializing.
  61862. (o == null || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), i.value = o, s && (i.status = e.axis.scale.isBlank() ? "hide" : "show");
  61863. }
  61864. }
  61865. function Bk(t) {
  61866. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  61867. return e && e.axesInfo[km(t)];
  61868. }
  61869. function G6e(t) {
  61870. var e = Bk(t);
  61871. return e && e.axisPointerModel;
  61872. }
  61873. function dE(t) {
  61874. return !!t.get(["handle", "show"]);
  61875. }
  61876. function km(t) {
  61877. return t.type + "||" + t.id;
  61878. }
  61879. var uP = {}, Wf = (
  61880. /** @class */
  61881. function(t) {
  61882. q(e, t);
  61883. function e() {
  61884. var n = t !== null && t.apply(this, arguments) || this;
  61885. return n.type = e.type, n;
  61886. }
  61887. return e.prototype.render = function(n, r, i, a) {
  61888. this.axisPointerClass && H6e(n), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(n, i, !0);
  61889. }, e.prototype.updateAxisPointer = function(n, r, i, a) {
  61890. this._doUpdateAxisPointerClass(n, i, !1);
  61891. }, e.prototype.remove = function(n, r) {
  61892. var i = this._axisPointer;
  61893. i && i.remove(r);
  61894. }, e.prototype.dispose = function(n, r) {
  61895. this._disposeAxisPointer(r), t.prototype.dispose.apply(this, arguments);
  61896. }, e.prototype._doUpdateAxisPointerClass = function(n, r, i) {
  61897. var a = e.getAxisPointerClass(this.axisPointerClass);
  61898. if (a) {
  61899. var o = G6e(n);
  61900. o ? (this._axisPointer || (this._axisPointer = new a())).render(n, o, r, i) : this._disposeAxisPointer(r);
  61901. }
  61902. }, e.prototype._disposeAxisPointer = function(n) {
  61903. this._axisPointer && this._axisPointer.dispose(n), this._axisPointer = null;
  61904. }, e.registerAxisPointerClass = function(n, r) {
  61905. if (process.env.NODE_ENV !== "production" && uP[n])
  61906. throw new Error("axisPointer " + n + " exists");
  61907. uP[n] = r;
  61908. }, e.getAxisPointerClass = function(n) {
  61909. return n && uP[n];
  61910. }, e.type = "axis", e;
  61911. }(Xt)
  61912. ), hE = bt();
  61913. function nne(t, e, n, r) {
  61914. var i = n.axis;
  61915. if (!i.scale.isBlank()) {
  61916. var a = n.getModel("splitArea"), o = a.getModel("areaStyle"), s = o.get("color"), l = r.coordinateSystem.getRect(), u = i.getTicksCoords({
  61917. tickModel: a,
  61918. clamp: !0
  61919. });
  61920. if (u.length) {
  61921. var c = s.length, f = hE(t).splitAreaColors, d = Pe(), h = 0;
  61922. if (f)
  61923. for (var p = 0; p < u.length; p++) {
  61924. var v = f.get(u[p].tickValue);
  61925. if (v != null) {
  61926. h = (v + (c - 1) * p) % c;
  61927. break;
  61928. }
  61929. }
  61930. var g = i.toGlobalCoord(u[0].coord), m = o.getAreaStyle();
  61931. s = ue(s) ? s : [s];
  61932. for (var p = 1; p < u.length; p++) {
  61933. var y = i.toGlobalCoord(u[p].coord), b = void 0, _ = void 0, O = void 0, S = void 0;
  61934. i.isHorizontal() ? (b = g, _ = l.y, O = y - b, S = l.height, g = b + O) : (b = l.x, _ = g, O = l.width, S = y - _, g = _ + S);
  61935. var x = u[p - 1].tickValue;
  61936. x != null && d.set(x, h), e.add(new mt({
  61937. anid: x != null ? "area_" + x : null,
  61938. shape: {
  61939. x: b,
  61940. y: _,
  61941. width: O,
  61942. height: S
  61943. },
  61944. style: Re({
  61945. fill: s[h]
  61946. }, m),
  61947. autoBatch: !0,
  61948. silent: !0
  61949. })), h = (h + 1) % c;
  61950. }
  61951. hE(t).splitAreaColors = d;
  61952. }
  61953. }
  61954. }
  61955. function rne(t) {
  61956. hE(t).splitAreaColors = null;
  61957. }
  61958. var j6e = ["axisLine", "axisTickLabel", "axisName"], Z6e = ["splitArea", "splitLine", "minorSplitLine"], ine = (
  61959. /** @class */
  61960. function(t) {
  61961. q(e, t);
  61962. function e() {
  61963. var n = t !== null && t.apply(this, arguments) || this;
  61964. return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n;
  61965. }
  61966. return e.prototype.render = function(n, r, i, a) {
  61967. this.group.removeAll();
  61968. var o = this._axisGroup;
  61969. if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
  61970. var s = n.getCoordSysModel(), l = fE(s, n), u = new Kr(n, le({
  61971. handleAutoShown: function(f) {
  61972. for (var d = s.coordinateSystem.getCartesians(), h = 0; h < d.length; h++)
  61973. if (nE(d[h].getOtherAxis(n.axis).scale))
  61974. return !0;
  61975. return !1;
  61976. }
  61977. }, l));
  61978. k(j6e, u.add, u), this._axisGroup.add(u.getGroup()), k(Z6e, function(f) {
  61979. n.get([f, "show"]) && U6e[f](this, this._axisGroup, n, s);
  61980. }, this);
  61981. var c = a && a.type === "changeAxisOrder" && a.isInitSort;
  61982. c || W0(o, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
  61983. }
  61984. }, e.prototype.remove = function() {
  61985. rne(this);
  61986. }, e.type = "cartesianAxis", e;
  61987. }(Wf)
  61988. ), U6e = {
  61989. splitLine: function(t, e, n, r) {
  61990. var i = n.axis;
  61991. if (!i.scale.isBlank()) {
  61992. var a = n.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
  61993. s = ue(s) ? s : [s];
  61994. for (var l = r.coordinateSystem.getRect(), u = i.isHorizontal(), c = 0, f = i.getTicksCoords({
  61995. tickModel: a
  61996. }), d = [], h = [], p = o.getLineStyle(), v = 0; v < f.length; v++) {
  61997. var g = i.toGlobalCoord(f[v].coord);
  61998. u ? (d[0] = g, d[1] = l.y, h[0] = g, h[1] = l.y + l.height) : (d[0] = l.x, d[1] = g, h[0] = l.x + l.width, h[1] = g);
  61999. var m = c++ % s.length, y = f[v].tickValue, b = new Un({
  62000. anid: y != null ? "line_" + f[v].tickValue : null,
  62001. autoBatch: !0,
  62002. shape: {
  62003. x1: d[0],
  62004. y1: d[1],
  62005. x2: h[0],
  62006. y2: h[1]
  62007. },
  62008. style: Re({
  62009. stroke: s[m]
  62010. }, p),
  62011. silent: !0
  62012. });
  62013. zh(b.shape, p.lineWidth), e.add(b);
  62014. }
  62015. }
  62016. },
  62017. minorSplitLine: function(t, e, n, r) {
  62018. var i = n.axis, a = n.getModel("minorSplitLine"), o = a.getModel("lineStyle"), s = r.coordinateSystem.getRect(), l = i.isHorizontal(), u = i.getMinorTicksCoords();
  62019. if (u.length)
  62020. for (var c = [], f = [], d = o.getLineStyle(), h = 0; h < u.length; h++)
  62021. for (var p = 0; p < u[h].length; p++) {
  62022. var v = i.toGlobalCoord(u[h][p].coord);
  62023. l ? (c[0] = v, c[1] = s.y, f[0] = v, f[1] = s.y + s.height) : (c[0] = s.x, c[1] = v, f[0] = s.x + s.width, f[1] = v);
  62024. var g = new Un({
  62025. anid: "minor_line_" + u[h][p].tickValue,
  62026. autoBatch: !0,
  62027. shape: {
  62028. x1: c[0],
  62029. y1: c[1],
  62030. x2: f[0],
  62031. y2: f[1]
  62032. },
  62033. style: d,
  62034. silent: !0
  62035. });
  62036. zh(g.shape, d.lineWidth), e.add(g);
  62037. }
  62038. },
  62039. splitArea: function(t, e, n, r) {
  62040. nne(t, e, n, r);
  62041. }
  62042. }, ane = (
  62043. /** @class */
  62044. function(t) {
  62045. q(e, t);
  62046. function e() {
  62047. var n = t !== null && t.apply(this, arguments) || this;
  62048. return n.type = e.type, n;
  62049. }
  62050. return e.type = "xAxis", e;
  62051. }(ine)
  62052. ), X6e = (
  62053. /** @class */
  62054. function(t) {
  62055. q(e, t);
  62056. function e() {
  62057. var n = t !== null && t.apply(this, arguments) || this;
  62058. return n.type = ane.type, n;
  62059. }
  62060. return e.type = "yAxis", e;
  62061. }(ine)
  62062. ), Y6e = (
  62063. /** @class */
  62064. function(t) {
  62065. q(e, t);
  62066. function e() {
  62067. var n = t !== null && t.apply(this, arguments) || this;
  62068. return n.type = "grid", n;
  62069. }
  62070. return e.prototype.render = function(n, r) {
  62071. this.group.removeAll(), n.get("show") && this.group.add(new mt({
  62072. shape: n.coordinateSystem.getRect(),
  62073. style: Re({
  62074. fill: n.get("backgroundColor")
  62075. }, n.getItemStyle()),
  62076. silent: !0,
  62077. z2: -1
  62078. }));
  62079. }, e.type = "grid", e;
  62080. }(Xt)
  62081. ), rF = {
  62082. // gridIndex: 0,
  62083. // gridId: '',
  62084. offset: 0
  62085. };
  62086. function one(t) {
  62087. t.registerComponentView(Y6e), t.registerComponentModel(w6e), t.registerCoordinateSystem("cartesian2d", I6e), Qh(t, "x", uE, rF), Qh(t, "y", uE, rF), t.registerComponentView(ane), t.registerComponentView(X6e), t.registerPreprocessor(function(e) {
  62088. e.xAxis && e.yAxis && !e.grid && (e.grid = {});
  62089. });
  62090. }
  62091. function q6e(t) {
  62092. at(one), t.registerSeriesModel(b6e), t.registerChartView(x6e), t.registerLayout(X0("scatter"));
  62093. }
  62094. function K6e(t) {
  62095. t.eachSeriesByType("radar", function(e) {
  62096. var n = e.getData(), r = [], i = e.coordinateSystem;
  62097. if (i) {
  62098. var a = i.getIndicatorAxes();
  62099. k(a, function(o, s) {
  62100. n.each(n.mapDimension(a[s].dim), function(l, u) {
  62101. r[u] = r[u] || [];
  62102. var c = i.dataToPoint(l, s);
  62103. r[u][s] = iF(c) ? c : aF(i);
  62104. });
  62105. }), n.each(function(o) {
  62106. var s = wq(r[o], function(l) {
  62107. return iF(l);
  62108. }) || aF(i);
  62109. r[o].push(s.slice()), n.setItemLayout(o, r[o]);
  62110. });
  62111. }
  62112. });
  62113. }
  62114. function iF(t) {
  62115. return !isNaN(t[0]) && !isNaN(t[1]);
  62116. }
  62117. function aF(t) {
  62118. return [t.cx, t.cy];
  62119. }
  62120. function J6e(t) {
  62121. var e = t.polar;
  62122. if (e) {
  62123. ue(e) || (e = [e]);
  62124. var n = [];
  62125. k(e, function(r, i) {
  62126. r.indicator ? (r.type && !r.shape && (r.shape = r.type), t.radar = t.radar || [], ue(t.radar) || (t.radar = [t.radar]), t.radar.push(r)) : n.push(r);
  62127. }), t.polar = n;
  62128. }
  62129. k(t.series, function(r) {
  62130. r && r.type === "radar" && r.polarIndex && (r.radarIndex = r.polarIndex);
  62131. });
  62132. }
  62133. var eBe = (
  62134. /** @class */
  62135. function(t) {
  62136. q(e, t);
  62137. function e() {
  62138. var n = t !== null && t.apply(this, arguments) || this;
  62139. return n.type = e.type, n;
  62140. }
  62141. return e.prototype.render = function(n, r, i) {
  62142. var a = n.coordinateSystem, o = this.group, s = n.getData(), l = this._data;
  62143. function u(d, h) {
  62144. var p = d.getItemVisual(h, "symbol") || "circle";
  62145. if (p !== "none") {
  62146. var v = xp(d.getItemVisual(h, "symbolSize")), g = $n(p, -1, -1, 2, 2), m = d.getItemVisual(h, "symbolRotate") || 0;
  62147. return g.attr({
  62148. style: {
  62149. strokeNoScale: !0
  62150. },
  62151. z2: 100,
  62152. scaleX: v[0] / 2,
  62153. scaleY: v[1] / 2,
  62154. rotation: m * Math.PI / 180 || 0
  62155. }), g;
  62156. }
  62157. }
  62158. function c(d, h, p, v, g, m) {
  62159. p.removeAll();
  62160. for (var y = 0; y < h.length - 1; y++) {
  62161. var b = u(v, g);
  62162. b && (b.__dimIdx = y, d[y] ? (b.setPosition(d[y]), Lf[m ? "initProps" : "updateProps"](b, {
  62163. x: h[y][0],
  62164. y: h[y][1]
  62165. }, n, g)) : b.setPosition(h[y]), p.add(b));
  62166. }
  62167. }
  62168. function f(d) {
  62169. return ce(d, function(h) {
  62170. return [a.cx, a.cy];
  62171. });
  62172. }
  62173. s.diff(l).add(function(d) {
  62174. var h = s.getItemLayout(d);
  62175. if (h) {
  62176. var p = new ii(), v = new ai(), g = {
  62177. shape: {
  62178. points: h
  62179. }
  62180. };
  62181. p.shape.points = f(h), v.shape.points = f(h), Yt(p, g, n, d), Yt(v, g, n, d);
  62182. var m = new Ve(), y = new Ve();
  62183. m.add(v), m.add(p), m.add(y), c(v.shape.points, h, y, s, d, !0), s.setItemGraphicEl(d, m);
  62184. }
  62185. }).update(function(d, h) {
  62186. var p = l.getItemGraphicEl(h), v = p.childAt(0), g = p.childAt(1), m = p.childAt(2), y = {
  62187. shape: {
  62188. points: s.getItemLayout(d)
  62189. }
  62190. };
  62191. y.shape.points && (c(v.shape.points, y.shape.points, m, s, d, !1), so(g), so(v), Ct(v, y, n), Ct(g, y, n), s.setItemGraphicEl(d, p));
  62192. }).remove(function(d) {
  62193. o.remove(l.getItemGraphicEl(d));
  62194. }).execute(), s.eachItemGraphicEl(function(d, h) {
  62195. var p = s.getItemModel(h), v = d.childAt(0), g = d.childAt(1), m = d.childAt(2), y = s.getItemVisual(h, "style"), b = y.fill;
  62196. o.add(d), v.useStyle(Re(p.getModel("lineStyle").getLineStyle(), {
  62197. fill: "none",
  62198. stroke: b
  62199. })), Tr(v, p, "lineStyle"), Tr(g, p, "areaStyle");
  62200. var _ = p.getModel("areaStyle"), O = _.isEmpty() && _.parentModel.isEmpty();
  62201. g.ignore = O, k(["emphasis", "select", "blur"], function(C) {
  62202. var T = p.getModel([C, "areaStyle"]), w = T.isEmpty() && T.parentModel.isEmpty();
  62203. g.ensureState(C).ignore = w && O;
  62204. }), g.useStyle(Re(_.getAreaStyle(), {
  62205. fill: b,
  62206. opacity: 0.7,
  62207. decal: y.decal
  62208. }));
  62209. var S = p.getModel("emphasis"), x = S.getModel("itemStyle").getItemStyle();
  62210. m.eachChild(function(C) {
  62211. if (C instanceof lr) {
  62212. var T = C.style;
  62213. C.useStyle(le({
  62214. // TODO other properties like x, y ?
  62215. image: T.image,
  62216. x: T.x,
  62217. y: T.y,
  62218. width: T.width,
  62219. height: T.height
  62220. }, y));
  62221. } else
  62222. C.useStyle(y), C.setColor(b), C.style.strokeNoScale = !0;
  62223. var w = C.ensureState("emphasis");
  62224. w.style = Le(x);
  62225. var P = s.getStore().get(s.getDimensionIndex(C.__dimIdx), h);
  62226. (P == null || isNaN(P)) && (P = ""), Pr(C, er(p), {
  62227. labelFetcher: s.hostModel,
  62228. labelDataIndex: h,
  62229. labelDimIndex: C.__dimIdx,
  62230. defaultText: P,
  62231. inheritColor: b,
  62232. defaultOpacity: y.opacity
  62233. });
  62234. }), bn(d, S.get("focus"), S.get("blurScope"), S.get("disabled"));
  62235. }), this._data = s;
  62236. }, e.prototype.remove = function() {
  62237. this.group.removeAll(), this._data = null;
  62238. }, e.type = "radar", e;
  62239. }(zt)
  62240. ), tBe = (
  62241. /** @class */
  62242. function(t) {
  62243. q(e, t);
  62244. function e() {
  62245. var n = t !== null && t.apply(this, arguments) || this;
  62246. return n.type = e.type, n.hasSymbolVisual = !0, n;
  62247. }
  62248. return e.prototype.init = function(n) {
  62249. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this));
  62250. }, e.prototype.getInitialData = function(n, r) {
  62251. return Pp(this, {
  62252. generateCoord: "indicator_",
  62253. generateCoordCount: 1 / 0
  62254. });
  62255. }, e.prototype.formatTooltip = function(n, r, i) {
  62256. var a = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(n), u = l === "" ? this.name : l, c = nee(this, n);
  62257. return tr("section", {
  62258. header: u,
  62259. sortBlocks: !0,
  62260. blocks: ce(s, function(f) {
  62261. var d = a.get(a.mapDimension(f.dim), n);
  62262. return tr("nameValue", {
  62263. markerType: "subItem",
  62264. markerColor: c,
  62265. name: f.name,
  62266. value: d,
  62267. sortParam: d
  62268. });
  62269. })
  62270. });
  62271. }, e.prototype.getTooltipPosition = function(n) {
  62272. if (n != null) {
  62273. for (var r = this.getData(), i = this.coordinateSystem, a = r.getValues(ce(i.dimensions, function(u) {
  62274. return r.mapDimension(u);
  62275. }), n), o = 0, s = a.length; o < s; o++)
  62276. if (!isNaN(a[o])) {
  62277. var l = i.getIndicatorAxes();
  62278. return i.coordToPoint(l[o].dataToCoord(a[o]), o);
  62279. }
  62280. }
  62281. }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
  62282. // zlevel: 0,
  62283. z: 2,
  62284. colorBy: "data",
  62285. coordinateSystem: "radar",
  62286. legendHoverLink: !0,
  62287. radarIndex: 0,
  62288. lineStyle: {
  62289. width: 2,
  62290. type: "solid",
  62291. join: "round"
  62292. },
  62293. label: {
  62294. position: "top"
  62295. },
  62296. // areaStyle: {
  62297. // },
  62298. // itemStyle: {}
  62299. symbolSize: 8
  62300. // symbolRotate: null
  62301. }, e;
  62302. }(Ht)
  62303. ), gv = Jte.value;
  62304. function wb(t, e) {
  62305. return Re({
  62306. show: e
  62307. }, t);
  62308. }
  62309. var nBe = (
  62310. /** @class */
  62311. function(t) {
  62312. q(e, t);
  62313. function e() {
  62314. var n = t !== null && t.apply(this, arguments) || this;
  62315. return n.type = e.type, n;
  62316. }
  62317. return e.prototype.optionUpdated = function() {
  62318. var n = this.get("boundaryGap"), r = this.get("splitNumber"), i = this.get("scale"), a = this.get("axisLine"), o = this.get("axisTick"), s = this.get("axisLabel"), l = this.get("axisName"), u = this.get(["axisName", "show"]), c = this.get(["axisName", "formatter"]), f = this.get("axisNameGap"), d = this.get("triggerEvent"), h = ce(this.get("indicator") || [], function(p) {
  62319. p.max != null && p.max > 0 && !p.min ? p.min = 0 : p.min != null && p.min < 0 && !p.max && (p.max = 0);
  62320. var v = l;
  62321. p.color != null && (v = Re({
  62322. color: p.color
  62323. }, l));
  62324. var g = qe(Le(p), {
  62325. boundaryGap: n,
  62326. splitNumber: r,
  62327. scale: i,
  62328. axisLine: a,
  62329. axisTick: o,
  62330. // axisType: axisType,
  62331. axisLabel: s,
  62332. // Compatible with 2 and use text
  62333. name: p.text,
  62334. showName: u,
  62335. nameLocation: "end",
  62336. nameGap: f,
  62337. // min: 0,
  62338. nameTextStyle: v,
  62339. triggerEvent: d
  62340. }, !1);
  62341. if (Oe(c)) {
  62342. var m = g.name;
  62343. g.name = c.replace("{value}", m ?? "");
  62344. } else Me(c) && (g.name = c(g.name, g));
  62345. var y = new Wt(g, null, this.ecModel);
  62346. return xn(y, Tp.prototype), y.mainType = "radar", y.componentIndex = this.componentIndex, y;
  62347. }, this);
  62348. this._indicatorModels = h;
  62349. }, e.prototype.getIndicatorModels = function() {
  62350. return this._indicatorModels;
  62351. }, e.type = "radar", e.defaultOption = {
  62352. // zlevel: 0,
  62353. z: 0,
  62354. center: ["50%", "50%"],
  62355. radius: "75%",
  62356. startAngle: 90,
  62357. axisName: {
  62358. show: !0
  62359. // formatter: null
  62360. // textStyle: {}
  62361. },
  62362. boundaryGap: [0, 0],
  62363. splitNumber: 5,
  62364. axisNameGap: 15,
  62365. scale: !1,
  62366. // Polygon or circle
  62367. shape: "polygon",
  62368. axisLine: qe({
  62369. lineStyle: {
  62370. color: "#bbb"
  62371. }
  62372. }, gv.axisLine),
  62373. axisLabel: wb(gv.axisLabel, !1),
  62374. axisTick: wb(gv.axisTick, !1),
  62375. // axisType: 'value',
  62376. splitLine: wb(gv.splitLine, !0),
  62377. splitArea: wb(gv.splitArea, !0),
  62378. // {text, min, max}
  62379. indicator: []
  62380. }, e;
  62381. }(rt)
  62382. ), rBe = ["axisLine", "axisTickLabel", "axisName"], iBe = (
  62383. /** @class */
  62384. function(t) {
  62385. q(e, t);
  62386. function e() {
  62387. var n = t !== null && t.apply(this, arguments) || this;
  62388. return n.type = e.type, n;
  62389. }
  62390. return e.prototype.render = function(n, r, i) {
  62391. var a = this.group;
  62392. a.removeAll(), this._buildAxes(n), this._buildSplitLineAndArea(n);
  62393. }, e.prototype._buildAxes = function(n) {
  62394. var r = n.coordinateSystem, i = r.getIndicatorAxes(), a = ce(i, function(o) {
  62395. var s = o.model.get("showName") ? o.name : "", l = new Kr(o.model, {
  62396. axisName: s,
  62397. position: [r.cx, r.cy],
  62398. rotation: o.angle,
  62399. labelDirection: -1,
  62400. tickDirection: -1,
  62401. nameDirection: 1
  62402. });
  62403. return l;
  62404. });
  62405. k(a, function(o) {
  62406. k(rBe, o.add, o), this.group.add(o.getGroup());
  62407. }, this);
  62408. }, e.prototype._buildSplitLineAndArea = function(n) {
  62409. var r = n.coordinateSystem, i = r.getIndicatorAxes();
  62410. if (!i.length)
  62411. return;
  62412. var a = n.get("shape"), o = n.getModel("splitLine"), s = n.getModel("splitArea"), l = o.getModel("lineStyle"), u = s.getModel("areaStyle"), c = o.get("show"), f = s.get("show"), d = l.get("color"), h = u.get("color"), p = ue(d) ? d : [d], v = ue(h) ? h : [h], g = [], m = [];
  62413. function y(E, R, N) {
  62414. var V = N % R.length;
  62415. return E[V] = E[V] || [], V;
  62416. }
  62417. if (a === "circle")
  62418. for (var b = i[0].getTicksCoords(), _ = r.cx, O = r.cy, S = 0; S < b.length; S++) {
  62419. if (c) {
  62420. var x = y(g, p, S);
  62421. g[x].push(new ll({
  62422. shape: {
  62423. cx: _,
  62424. cy: O,
  62425. r: b[S].coord
  62426. }
  62427. }));
  62428. }
  62429. if (f && S < b.length - 1) {
  62430. var x = y(m, v, S);
  62431. m[x].push(new z0({
  62432. shape: {
  62433. cx: _,
  62434. cy: O,
  62435. r0: b[S].coord,
  62436. r: b[S + 1].coord
  62437. }
  62438. }));
  62439. }
  62440. }
  62441. else
  62442. for (var C, T = ce(i, function(E, R) {
  62443. var N = E.getTicksCoords();
  62444. return C = C == null ? N.length - 1 : Math.min(N.length - 1, C), ce(N, function(V) {
  62445. return r.coordToPoint(V.coord, R);
  62446. });
  62447. }), w = [], S = 0; S <= C; S++) {
  62448. for (var P = [], $ = 0; $ < i.length; $++)
  62449. P.push(T[$][S]);
  62450. if (P[0] ? P.push(P[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + S), c) {
  62451. var x = y(g, p, S);
  62452. g[x].push(new ai({
  62453. shape: {
  62454. points: P
  62455. }
  62456. }));
  62457. }
  62458. if (f && w) {
  62459. var x = y(m, v, S - 1);
  62460. m[x].push(new ii({
  62461. shape: {
  62462. points: P.concat(w)
  62463. }
  62464. }));
  62465. }
  62466. w = P.slice().reverse();
  62467. }
  62468. var A = l.getLineStyle(), D = u.getAreaStyle();
  62469. k(m, function(E, R) {
  62470. this.group.add(Li(E, {
  62471. style: Re({
  62472. stroke: "none",
  62473. fill: v[R % v.length]
  62474. }, D),
  62475. silent: !0
  62476. }));
  62477. }, this), k(g, function(E, R) {
  62478. this.group.add(Li(E, {
  62479. style: Re({
  62480. fill: "none",
  62481. stroke: p[R % p.length]
  62482. }, A),
  62483. silent: !0
  62484. }));
  62485. }, this);
  62486. }, e.type = "radar", e;
  62487. }(Xt)
  62488. ), aBe = (
  62489. /** @class */
  62490. function(t) {
  62491. q(e, t);
  62492. function e(n, r, i) {
  62493. var a = t.call(this, n, r, i) || this;
  62494. return a.type = "value", a.angle = 0, a.name = "", a;
  62495. }
  62496. return e;
  62497. }(Ba)
  62498. ), oBe = (
  62499. /** @class */
  62500. function() {
  62501. function t(e, n, r) {
  62502. this.dimensions = [], this._model = e, this._indicatorAxes = ce(e.getIndicatorModels(), function(i, a) {
  62503. var o = "indicator_" + a, s = new aBe(
  62504. o,
  62505. new Ys()
  62506. // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()
  62507. );
  62508. return s.name = i.get("name"), s.model = i, i.axis = s, this.dimensions.push(o), s;
  62509. }, this), this.resize(e, r);
  62510. }
  62511. return t.prototype.getIndicatorAxes = function() {
  62512. return this._indicatorAxes;
  62513. }, t.prototype.dataToPoint = function(e, n) {
  62514. var r = this._indicatorAxes[n];
  62515. return this.coordToPoint(r.dataToCoord(e), n);
  62516. }, t.prototype.coordToPoint = function(e, n) {
  62517. var r = this._indicatorAxes[n], i = r.angle, a = this.cx + e * Math.cos(i), o = this.cy - e * Math.sin(i);
  62518. return [a, o];
  62519. }, t.prototype.pointToData = function(e) {
  62520. var n = e[0] - this.cx, r = e[1] - this.cy, i = Math.sqrt(n * n + r * r);
  62521. n /= i, r /= i;
  62522. for (var a = Math.atan2(-r, n), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
  62523. var c = this._indicatorAxes[u], f = Math.abs(a - c.angle);
  62524. f < o && (s = c, l = u, o = f);
  62525. }
  62526. return [l, +(s && s.coordToData(i))];
  62527. }, t.prototype.resize = function(e, n) {
  62528. var r = e.get("center"), i = n.getWidth(), a = n.getHeight(), o = Math.min(i, a) / 2;
  62529. this.cx = _e(r[0], i), this.cy = _e(r[1], a), this.startAngle = e.get("startAngle") * Math.PI / 180;
  62530. var s = e.get("radius");
  62531. (Oe(s) || St(s)) && (s = [0, s]), this.r0 = _e(s[0], o), this.r = _e(s[1], o), k(this._indicatorAxes, function(l, u) {
  62532. l.setExtent(this.r0, this.r);
  62533. var c = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
  62534. c = Math.atan2(Math.sin(c), Math.cos(c)), l.angle = c;
  62535. }, this);
  62536. }, t.prototype.update = function(e, n) {
  62537. var r = this._indicatorAxes, i = this._model;
  62538. k(r, function(s) {
  62539. s.scale.setExtent(1 / 0, -1 / 0);
  62540. }), e.eachSeriesByType("radar", function(s, l) {
  62541. if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== i)) {
  62542. var u = s.getData();
  62543. k(r, function(c) {
  62544. c.scale.unionExtentFromData(u, u.mapDimension(c.dim));
  62545. });
  62546. }
  62547. }, this);
  62548. var a = i.get("splitNumber"), o = new Ys();
  62549. o.setExtent(0, a), o.setInterval(1), k(r, function(s, l) {
  62550. ene(s.scale, s.model, o);
  62551. });
  62552. }, t.prototype.convertToPixel = function(e, n, r) {
  62553. return console.warn("Not implemented."), null;
  62554. }, t.prototype.convertFromPixel = function(e, n, r) {
  62555. return console.warn("Not implemented."), null;
  62556. }, t.prototype.containPoint = function(e) {
  62557. return console.warn("Not implemented."), !1;
  62558. }, t.create = function(e, n) {
  62559. var r = [];
  62560. return e.eachComponent("radar", function(i) {
  62561. var a = new t(i, e, n);
  62562. r.push(a), i.coordinateSystem = a;
  62563. }), e.eachSeriesByType("radar", function(i) {
  62564. i.get("coordinateSystem") === "radar" && (i.coordinateSystem = r[i.get("radarIndex") || 0]);
  62565. }), r;
  62566. }, t.dimensions = [], t;
  62567. }()
  62568. );
  62569. function sBe(t) {
  62570. t.registerCoordinateSystem("radar", oBe), t.registerComponentModel(nBe), t.registerComponentView(iBe), t.registerVisual({
  62571. seriesType: "radar",
  62572. reset: function(e) {
  62573. var n = e.getData();
  62574. n.each(function(r) {
  62575. n.setItemVisual(r, "legendIcon", "roundRect");
  62576. }), n.setVisual("legendIcon", "roundRect");
  62577. }
  62578. });
  62579. }
  62580. function lBe(t) {
  62581. at(sBe), t.registerChartView(eBe), t.registerSeriesModel(tBe), t.registerLayout(K6e), t.registerProcessor(Y0("radar")), t.registerPreprocessor(J6e);
  62582. }
  62583. var oF = "\0_ec_interaction_mutex";
  62584. function uBe(t, e, n) {
  62585. var r = zk(t);
  62586. r[e] = n;
  62587. }
  62588. function cBe(t, e, n) {
  62589. var r = zk(t), i = r[e];
  62590. i === n && (r[e] = null);
  62591. }
  62592. function sF(t, e) {
  62593. return !!zk(t)[e];
  62594. }
  62595. function zk(t) {
  62596. return t[oF] || (t[oF] = {});
  62597. }
  62598. vo({
  62599. type: "takeGlobalCursor",
  62600. event: "globalCursorTaken",
  62601. update: "update"
  62602. }, On);
  62603. var K0 = (
  62604. /** @class */
  62605. function(t) {
  62606. q(e, t);
  62607. function e(n) {
  62608. var r = t.call(this) || this;
  62609. r._zr = n;
  62610. var i = xe(r._mousedownHandler, r), a = xe(r._mousemoveHandler, r), o = xe(r._mouseupHandler, r), s = xe(r._mousewheelHandler, r), l = xe(r._pinchHandler, r);
  62611. return r.enable = function(u, c) {
  62612. this.disable(), this._opt = Re(Le(c) || {}, {
  62613. zoomOnMouseWheel: !0,
  62614. moveOnMouseMove: !0,
  62615. // By default, wheel do not trigger move.
  62616. moveOnMouseWheel: !1,
  62617. preventDefaultMouseMove: !0
  62618. }), u == null && (u = !0), (u === !0 || u === "move" || u === "pan") && (n.on("mousedown", i), n.on("mousemove", a), n.on("mouseup", o)), (u === !0 || u === "scale" || u === "zoom") && (n.on("mousewheel", s), n.on("pinch", l));
  62619. }, r.disable = function() {
  62620. n.off("mousedown", i), n.off("mousemove", a), n.off("mouseup", o), n.off("mousewheel", s), n.off("pinch", l);
  62621. }, r;
  62622. }
  62623. return e.prototype.isDragging = function() {
  62624. return this._dragging;
  62625. }, e.prototype.isPinching = function() {
  62626. return this._pinching;
  62627. }, e.prototype.setPointerChecker = function(n) {
  62628. this.pointerChecker = n;
  62629. }, e.prototype.dispose = function() {
  62630. this.disable();
  62631. }, e.prototype._mousedownHandler = function(n) {
  62632. if (!k6(n)) {
  62633. for (var r = n.target; r; ) {
  62634. if (r.draggable)
  62635. return;
  62636. r = r.__hostTarget || r.parent;
  62637. }
  62638. var i = n.offsetX, a = n.offsetY;
  62639. this.pointerChecker && this.pointerChecker(n, i, a) && (this._x = i, this._y = a, this._dragging = !0);
  62640. }
  62641. }, e.prototype._mousemoveHandler = function(n) {
  62642. if (!(!this._dragging || !Z_("moveOnMouseMove", n, this._opt) || n.gestureEvent === "pinch" || sF(this._zr, "globalPan"))) {
  62643. var r = n.offsetX, i = n.offsetY, a = this._x, o = this._y, s = r - a, l = i - o;
  62644. this._x = r, this._y = i, this._opt.preventDefaultMouseMove && Gs(n.event), sne(this, "pan", "moveOnMouseMove", n, {
  62645. dx: s,
  62646. dy: l,
  62647. oldX: a,
  62648. oldY: o,
  62649. newX: r,
  62650. newY: i,
  62651. isAvailableBehavior: null
  62652. });
  62653. }
  62654. }, e.prototype._mouseupHandler = function(n) {
  62655. k6(n) || (this._dragging = !1);
  62656. }, e.prototype._mousewheelHandler = function(n) {
  62657. var r = Z_("zoomOnMouseWheel", n, this._opt), i = Z_("moveOnMouseWheel", n, this._opt), a = n.wheelDelta, o = Math.abs(a), s = n.offsetX, l = n.offsetY;
  62658. if (!(a === 0 || !r && !i)) {
  62659. if (r) {
  62660. var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, c = a > 0 ? u : 1 / u;
  62661. cP(this, "zoom", "zoomOnMouseWheel", n, {
  62662. scale: c,
  62663. originX: s,
  62664. originY: l,
  62665. isAvailableBehavior: null
  62666. });
  62667. }
  62668. if (i) {
  62669. var f = Math.abs(a), d = (a > 0 ? 1 : -1) * (f > 3 ? 0.4 : f > 1 ? 0.15 : 0.05);
  62670. cP(this, "scrollMove", "moveOnMouseWheel", n, {
  62671. scrollDelta: d,
  62672. originX: s,
  62673. originY: l,
  62674. isAvailableBehavior: null
  62675. });
  62676. }
  62677. }
  62678. }, e.prototype._pinchHandler = function(n) {
  62679. if (!sF(this._zr, "globalPan")) {
  62680. var r = n.pinchScale > 1 ? 1.1 : 1 / 1.1;
  62681. cP(this, "zoom", null, n, {
  62682. scale: r,
  62683. originX: n.pinchX,
  62684. originY: n.pinchY,
  62685. isAvailableBehavior: null
  62686. });
  62687. }
  62688. }, e;
  62689. }(Ra)
  62690. );
  62691. function cP(t, e, n, r, i) {
  62692. t.pointerChecker && t.pointerChecker(r, i.originX, i.originY) && (Gs(r.event), sne(t, e, n, r, i));
  62693. }
  62694. function sne(t, e, n, r, i) {
  62695. i.isAvailableBehavior = xe(Z_, null, n, r), t.trigger(e, i);
  62696. }
  62697. function Z_(t, e, n) {
  62698. var r = n[t];
  62699. return !t || r && (!Oe(r) || e.event[r + "Key"]);
  62700. }
  62701. function Vk(t, e, n) {
  62702. var r = t.target;
  62703. r.x += e, r.y += n, r.dirty();
  62704. }
  62705. function Fk(t, e, n, r) {
  62706. var i = t.target, a = t.zoomLimit, o = t.zoom = t.zoom || 1;
  62707. if (o *= e, a) {
  62708. var s = a.min || 0, l = a.max || 1 / 0;
  62709. o = Math.max(Math.min(l, o), s);
  62710. }
  62711. var u = o / t.zoom;
  62712. t.zoom = o, i.x -= (n - i.x) * (u - 1), i.y -= (r - i.y) * (u - 1), i.scaleX *= u, i.scaleY *= u, i.dirty();
  62713. }
  62714. var fBe = {
  62715. axisPointer: 1,
  62716. tooltip: 1,
  62717. brush: 1
  62718. };
  62719. function mw(t, e, n) {
  62720. var r = e.getComponentByElement(t.topTarget), i = r && r.coordinateSystem;
  62721. return r && r !== n && !fBe.hasOwnProperty(r.mainType) && i && i.model !== n;
  62722. }
  62723. function lne(t) {
  62724. if (Oe(t)) {
  62725. var e = new DOMParser();
  62726. t = e.parseFromString(t, "text/xml");
  62727. }
  62728. var n = t;
  62729. for (n.nodeType === 9 && (n = n.firstChild); n.nodeName.toLowerCase() !== "svg" || n.nodeType !== 1; )
  62730. n = n.nextSibling;
  62731. return n;
  62732. }
  62733. var fP, EO = {
  62734. fill: "fill",
  62735. stroke: "stroke",
  62736. "stroke-width": "lineWidth",
  62737. opacity: "opacity",
  62738. "fill-opacity": "fillOpacity",
  62739. "stroke-opacity": "strokeOpacity",
  62740. "stroke-dasharray": "lineDash",
  62741. "stroke-dashoffset": "lineDashOffset",
  62742. "stroke-linecap": "lineCap",
  62743. "stroke-linejoin": "lineJoin",
  62744. "stroke-miterlimit": "miterLimit",
  62745. "font-family": "fontFamily",
  62746. "font-size": "fontSize",
  62747. "font-style": "fontStyle",
  62748. "font-weight": "fontWeight",
  62749. "text-anchor": "textAlign",
  62750. visibility: "visibility",
  62751. display: "display"
  62752. }, lF = st(EO), MO = {
  62753. "alignment-baseline": "textBaseline",
  62754. "stop-color": "stopColor"
  62755. }, uF = st(MO), dBe = function() {
  62756. function t() {
  62757. this._defs = {}, this._root = null;
  62758. }
  62759. return t.prototype.parse = function(e, n) {
  62760. n = n || {};
  62761. var r = lne(e);
  62762. if (process.env.NODE_ENV !== "production" && !r)
  62763. throw new Error("Illegal svg");
  62764. this._defsUsePending = [];
  62765. var i = new Ve();
  62766. this._root = i;
  62767. var a = [], o = r.getAttribute("viewBox") || "", s = parseFloat(r.getAttribute("width") || n.width), l = parseFloat(r.getAttribute("height") || n.height);
  62768. isNaN(s) && (s = null), isNaN(l) && (l = null), $i(r, i, null, !0, !1);
  62769. for (var u = r.firstChild; u; )
  62770. this._parseNode(u, i, a, null, !1, !1), u = u.nextSibling;
  62771. vBe(this._defs, this._defsUsePending), this._defsUsePending = [];
  62772. var c, f;
  62773. if (o) {
  62774. var d = yw(o);
  62775. d.length >= 4 && (c = {
  62776. x: parseFloat(d[0] || 0),
  62777. y: parseFloat(d[1] || 0),
  62778. width: parseFloat(d[2]),
  62779. height: parseFloat(d[3])
  62780. });
  62781. }
  62782. if (c && s != null && l != null && (f = cne(c, { x: 0, y: 0, width: s, height: l }), !n.ignoreViewBox)) {
  62783. var h = i;
  62784. i = new Ve(), i.add(h), h.scaleX = h.scaleY = f.scale, h.x = f.x, h.y = f.y;
  62785. }
  62786. return !n.ignoreRootClip && s != null && l != null && i.setClipPath(new mt({
  62787. shape: { x: 0, y: 0, width: s, height: l }
  62788. })), {
  62789. root: i,
  62790. width: s,
  62791. height: l,
  62792. viewBoxRect: c,
  62793. viewBoxTransform: f,
  62794. named: a
  62795. };
  62796. }, t.prototype._parseNode = function(e, n, r, i, a, o) {
  62797. var s = e.nodeName.toLowerCase(), l, u = i;
  62798. if (s === "defs" && (a = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
  62799. l = n;
  62800. else {
  62801. if (!a) {
  62802. var c = fP[s];
  62803. if (c && Ce(fP, s)) {
  62804. l = c.call(this, e, n);
  62805. var f = e.getAttribute("name");
  62806. if (f) {
  62807. var d = {
  62808. name: f,
  62809. namedFrom: null,
  62810. svgNodeTagLower: s,
  62811. el: l
  62812. };
  62813. r.push(d), s === "g" && (u = d);
  62814. } else i && r.push({
  62815. name: i.name,
  62816. namedFrom: i,
  62817. svgNodeTagLower: s,
  62818. el: l
  62819. });
  62820. n.add(l);
  62821. }
  62822. }
  62823. var h = cF[s];
  62824. if (h && Ce(cF, s)) {
  62825. var p = h.call(this, e), v = e.getAttribute("id");
  62826. v && (this._defs[v] = p);
  62827. }
  62828. }
  62829. if (l && l.isGroup)
  62830. for (var g = e.firstChild; g; )
  62831. g.nodeType === 1 ? this._parseNode(g, l, r, u, a, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
  62832. }, t.prototype._parseText = function(e, n) {
  62833. var r = new Bh({
  62834. style: {
  62835. text: e.textContent
  62836. },
  62837. silent: !0,
  62838. x: this._textX || 0,
  62839. y: this._textY || 0
  62840. });
  62841. ra(n, r), $i(e, r, this._defsUsePending, !1, !1), hBe(r, n);
  62842. var i = r.style, a = i.fontSize;
  62843. a && a < 9 && (i.fontSize = 9, r.scaleX *= a / 9, r.scaleY *= a / 9);
  62844. var o = (i.fontSize || i.fontFamily) && [
  62845. i.fontStyle,
  62846. i.fontWeight,
  62847. (i.fontSize || 12) + "px",
  62848. i.fontFamily || "sans-serif"
  62849. ].join(" ");
  62850. i.font = o;
  62851. var s = r.getBoundingRect();
  62852. return this._textX += s.width, n.add(r), r;
  62853. }, t.internalField = function() {
  62854. fP = {
  62855. g: function(e, n) {
  62856. var r = new Ve();
  62857. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r;
  62858. },
  62859. rect: function(e, n) {
  62860. var r = new mt();
  62861. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62862. x: parseFloat(e.getAttribute("x") || "0"),
  62863. y: parseFloat(e.getAttribute("y") || "0"),
  62864. width: parseFloat(e.getAttribute("width") || "0"),
  62865. height: parseFloat(e.getAttribute("height") || "0")
  62866. }), r.silent = !0, r;
  62867. },
  62868. circle: function(e, n) {
  62869. var r = new ll();
  62870. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62871. cx: parseFloat(e.getAttribute("cx") || "0"),
  62872. cy: parseFloat(e.getAttribute("cy") || "0"),
  62873. r: parseFloat(e.getAttribute("r") || "0")
  62874. }), r.silent = !0, r;
  62875. },
  62876. line: function(e, n) {
  62877. var r = new Un();
  62878. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62879. x1: parseFloat(e.getAttribute("x1") || "0"),
  62880. y1: parseFloat(e.getAttribute("y1") || "0"),
  62881. x2: parseFloat(e.getAttribute("x2") || "0"),
  62882. y2: parseFloat(e.getAttribute("y2") || "0")
  62883. }), r.silent = !0, r;
  62884. },
  62885. ellipse: function(e, n) {
  62886. var r = new Xx();
  62887. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
  62888. cx: parseFloat(e.getAttribute("cx") || "0"),
  62889. cy: parseFloat(e.getAttribute("cy") || "0"),
  62890. rx: parseFloat(e.getAttribute("rx") || "0"),
  62891. ry: parseFloat(e.getAttribute("ry") || "0")
  62892. }), r.silent = !0, r;
  62893. },
  62894. polygon: function(e, n) {
  62895. var r = e.getAttribute("points"), i;
  62896. r && (i = hF(r));
  62897. var a = new ii({
  62898. shape: {
  62899. points: i || []
  62900. },
  62901. silent: !0
  62902. });
  62903. return ra(n, a), $i(e, a, this._defsUsePending, !1, !1), a;
  62904. },
  62905. polyline: function(e, n) {
  62906. var r = e.getAttribute("points"), i;
  62907. r && (i = hF(r));
  62908. var a = new ai({
  62909. shape: {
  62910. points: i || []
  62911. },
  62912. silent: !0
  62913. });
  62914. return ra(n, a), $i(e, a, this._defsUsePending, !1, !1), a;
  62915. },
  62916. image: function(e, n) {
  62917. var r = new lr();
  62918. return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setStyle({
  62919. image: e.getAttribute("xlink:href") || e.getAttribute("href"),
  62920. x: +e.getAttribute("x"),
  62921. y: +e.getAttribute("y"),
  62922. width: +e.getAttribute("width"),
  62923. height: +e.getAttribute("height")
  62924. }), r.silent = !0, r;
  62925. },
  62926. text: function(e, n) {
  62927. var r = e.getAttribute("x") || "0", i = e.getAttribute("y") || "0", a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
  62928. this._textX = parseFloat(r) + parseFloat(a), this._textY = parseFloat(i) + parseFloat(o);
  62929. var s = new Ve();
  62930. return ra(n, s), $i(e, s, this._defsUsePending, !1, !0), s;
  62931. },
  62932. tspan: function(e, n) {
  62933. var r = e.getAttribute("x"), i = e.getAttribute("y");
  62934. r != null && (this._textX = parseFloat(r)), i != null && (this._textY = parseFloat(i));
  62935. var a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new Ve();
  62936. return ra(n, s), $i(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(a), this._textY += parseFloat(o), s;
  62937. },
  62938. path: function(e, n) {
  62939. var r = e.getAttribute("d") || "", i = GK(r);
  62940. return ra(n, i), $i(e, i, this._defsUsePending, !1, !1), i.silent = !0, i;
  62941. }
  62942. };
  62943. }(), t;
  62944. }(), cF = {
  62945. lineargradient: function(t) {
  62946. var e = parseInt(t.getAttribute("x1") || "0", 10), n = parseInt(t.getAttribute("y1") || "0", 10), r = parseInt(t.getAttribute("x2") || "10", 10), i = parseInt(t.getAttribute("y2") || "0", 10), a = new hp(e, n, r, i);
  62947. return fF(t, a), dF(t, a), a;
  62948. },
  62949. radialgradient: function(t) {
  62950. var e = parseInt(t.getAttribute("cx") || "0", 10), n = parseInt(t.getAttribute("cy") || "0", 10), r = parseInt(t.getAttribute("r") || "0", 10), i = new VR(e, n, r);
  62951. return fF(t, i), dF(t, i), i;
  62952. }
  62953. };
  62954. function fF(t, e) {
  62955. var n = t.getAttribute("gradientUnits");
  62956. n === "userSpaceOnUse" && (e.global = !0);
  62957. }
  62958. function dF(t, e) {
  62959. for (var n = t.firstChild; n; ) {
  62960. if (n.nodeType === 1 && n.nodeName.toLocaleLowerCase() === "stop") {
  62961. var r = n.getAttribute("offset"), i = void 0;
  62962. r && r.indexOf("%") > 0 ? i = parseInt(r, 10) / 100 : r ? i = parseFloat(r) : i = 0;
  62963. var a = {};
  62964. une(n, a, a);
  62965. var o = a.stopColor || n.getAttribute("stop-color") || "#000000";
  62966. e.colorStops.push({
  62967. offset: i,
  62968. color: o
  62969. });
  62970. }
  62971. n = n.nextSibling;
  62972. }
  62973. }
  62974. function ra(t, e) {
  62975. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), Re(e.__inheritedStyle, t.__inheritedStyle));
  62976. }
  62977. function hF(t) {
  62978. for (var e = yw(t), n = [], r = 0; r < e.length; r += 2) {
  62979. var i = parseFloat(e[r]), a = parseFloat(e[r + 1]);
  62980. n.push([i, a]);
  62981. }
  62982. return n;
  62983. }
  62984. function $i(t, e, n, r, i) {
  62985. var a = e, o = a.__inheritedStyle = a.__inheritedStyle || {}, s = {};
  62986. t.nodeType === 1 && (yBe(t, e), une(t, o, s), r || bBe(t, o, s)), a.style = a.style || {}, o.fill != null && (a.style.fill = pF(a, "fill", o.fill, n)), o.stroke != null && (a.style.stroke = pF(a, "stroke", o.stroke, n)), k([
  62987. "lineWidth",
  62988. "opacity",
  62989. "fillOpacity",
  62990. "strokeOpacity",
  62991. "miterLimit",
  62992. "fontSize"
  62993. ], function(l) {
  62994. o[l] != null && (a.style[l] = parseFloat(o[l]));
  62995. }), k([
  62996. "lineDashOffset",
  62997. "lineCap",
  62998. "lineJoin",
  62999. "fontWeight",
  63000. "fontFamily",
  63001. "fontStyle",
  63002. "textAlign"
  63003. ], function(l) {
  63004. o[l] != null && (a.style[l] = o[l]);
  63005. }), i && (a.__selfStyle = s), o.lineDash && (a.style.lineDash = ce(yw(o.lineDash), function(l) {
  63006. return parseFloat(l);
  63007. })), (o.visibility === "hidden" || o.visibility === "collapse") && (a.invisible = !0), o.display === "none" && (a.ignore = !0);
  63008. }
  63009. function hBe(t, e) {
  63010. var n = e.__selfStyle;
  63011. if (n) {
  63012. var r = n.textBaseline, i = r;
  63013. !r || r === "auto" || r === "baseline" ? i = "alphabetic" : r === "before-edge" || r === "text-before-edge" ? i = "top" : r === "after-edge" || r === "text-after-edge" ? i = "bottom" : (r === "central" || r === "mathematical") && (i = "middle"), t.style.textBaseline = i;
  63014. }
  63015. var a = e.__inheritedStyle;
  63016. if (a) {
  63017. var o = a.textAlign, s = o;
  63018. o && (o === "middle" && (s = "center"), t.style.textAlign = s);
  63019. }
  63020. }
  63021. var pBe = /^url\(\s*#(.*?)\)/;
  63022. function pF(t, e, n, r) {
  63023. var i = n && n.match(pBe);
  63024. if (i) {
  63025. var a = ma(i[1]);
  63026. r.push([t, e, a]);
  63027. return;
  63028. }
  63029. return n === "none" && (n = null), n;
  63030. }
  63031. function vBe(t, e) {
  63032. for (var n = 0; n < e.length; n++) {
  63033. var r = e[n];
  63034. r[0].style[r[1]] = t[r[2]];
  63035. }
  63036. }
  63037. var gBe = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
  63038. function yw(t) {
  63039. return t.match(gBe) || [];
  63040. }
  63041. var mBe = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, dP = Math.PI / 180;
  63042. function yBe(t, e) {
  63043. var n = t.getAttribute("transform");
  63044. if (n) {
  63045. n = n.replace(/,/g, " ");
  63046. var r = [], i = null;
  63047. n.replace(mBe, function(f, d, h) {
  63048. return r.push(d, h), "";
  63049. });
  63050. for (var a = r.length - 1; a > 0; a -= 2) {
  63051. var o = r[a], s = r[a - 1], l = yw(o);
  63052. switch (i = i || Si(), s) {
  63053. case "translate":
  63054. ao(i, i, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
  63055. break;
  63056. case "scale":
  63057. Nx(i, i, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
  63058. break;
  63059. case "rotate":
  63060. Cu(i, i, -parseFloat(l[0]) * dP, [
  63061. parseFloat(l[1] || "0"),
  63062. parseFloat(l[2] || "0")
  63063. ]);
  63064. break;
  63065. case "skewX":
  63066. var u = Math.tan(parseFloat(l[0]) * dP);
  63067. Uo(i, [1, 0, u, 1, 0, 0], i);
  63068. break;
  63069. case "skewY":
  63070. var c = Math.tan(parseFloat(l[0]) * dP);
  63071. Uo(i, [1, c, 0, 1, 0, 0], i);
  63072. break;
  63073. case "matrix":
  63074. i[0] = parseFloat(l[0]), i[1] = parseFloat(l[1]), i[2] = parseFloat(l[2]), i[3] = parseFloat(l[3]), i[4] = parseFloat(l[4]), i[5] = parseFloat(l[5]);
  63075. break;
  63076. }
  63077. }
  63078. e.setLocalTransform(i);
  63079. }
  63080. }
  63081. var vF = /([^\s:;]+)\s*:\s*([^:;]+)/g;
  63082. function une(t, e, n) {
  63083. var r = t.getAttribute("style");
  63084. if (r) {
  63085. vF.lastIndex = 0;
  63086. for (var i; (i = vF.exec(r)) != null; ) {
  63087. var a = i[1], o = Ce(EO, a) ? EO[a] : null;
  63088. o && (e[o] = i[2]);
  63089. var s = Ce(MO, a) ? MO[a] : null;
  63090. s && (n[s] = i[2]);
  63091. }
  63092. }
  63093. }
  63094. function bBe(t, e, n) {
  63095. for (var r = 0; r < lF.length; r++) {
  63096. var i = lF[r], a = t.getAttribute(i);
  63097. a != null && (e[EO[i]] = a);
  63098. }
  63099. for (var r = 0; r < uF.length; r++) {
  63100. var i = uF[r], a = t.getAttribute(i);
  63101. a != null && (n[MO[i]] = a);
  63102. }
  63103. }
  63104. function cne(t, e) {
  63105. var n = e.width / t.width, r = e.height / t.height, i = Math.min(n, r);
  63106. return {
  63107. scale: i,
  63108. x: -(t.x + t.width / 2) * i + (e.x + e.width / 2),
  63109. y: -(t.y + t.height / 2) * i + (e.y + e.height / 2)
  63110. };
  63111. }
  63112. function _Be(t, e) {
  63113. var n = new dBe();
  63114. return n.parse(t, e);
  63115. }
  63116. var OBe = Pe([
  63117. "rect",
  63118. "circle",
  63119. "line",
  63120. "ellipse",
  63121. "polygon",
  63122. "polyline",
  63123. "path",
  63124. // <text> <tspan> are also enabled because some SVG might paint text itself,
  63125. // but still need to trigger events or tooltip.
  63126. "text",
  63127. "tspan",
  63128. // <g> is also enabled because this case: if multiple tags share one name
  63129. // and need label displayed, every tags will display the name, which is not
  63130. // expected. So we can put them into a <g name="xxx">. Thereby only one label
  63131. // displayed and located based on the bounding rect of the <g>.
  63132. "g"
  63133. ]), SBe = (
  63134. /** @class */
  63135. function() {
  63136. function t(e, n) {
  63137. this.type = "geoSVG", this._usedGraphicMap = Pe(), this._freedGraphics = [], this._mapName = e, this._parsedXML = lne(n);
  63138. }
  63139. return t.prototype.load = function() {
  63140. var e = this._firstGraphic;
  63141. if (!e) {
  63142. e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone();
  63143. var n = wBe(e.named), r = n.regions, i = n.regionsMap;
  63144. this._regions = r, this._regionsMap = i;
  63145. }
  63146. return {
  63147. boundingRect: this._boundingRect,
  63148. regions: this._regions,
  63149. regionsMap: this._regionsMap
  63150. };
  63151. }, t.prototype._buildGraphic = function(e) {
  63152. var n, r;
  63153. try {
  63154. n = e && _Be(e, {
  63155. ignoreViewBox: !0,
  63156. ignoreRootClip: !0
  63157. }) || {}, r = n.root, ke(r != null);
  63158. } catch (g) {
  63159. throw new Error(`Invalid svg format
  63160. ` + g.message);
  63161. }
  63162. var i = new Ve();
  63163. i.add(r), i.isGeoSVGGraphicRoot = !0;
  63164. var a = n.width, o = n.height, s = n.viewBoxRect, l = this._boundingRect;
  63165. if (!l) {
  63166. var u = void 0, c = void 0, f = void 0, d = void 0;
  63167. if (a != null ? (u = 0, f = a) : s && (u = s.x, f = s.width), o != null ? (c = 0, d = o) : s && (c = s.y, d = s.height), u == null || c == null) {
  63168. var h = r.getBoundingRect();
  63169. u == null && (u = h.x, f = h.width), c == null && (c = h.y, d = h.height);
  63170. }
  63171. l = this._boundingRect = new Je(u, c, f, d);
  63172. }
  63173. if (s) {
  63174. var p = cne(s, l);
  63175. r.scaleX = r.scaleY = p.scale, r.x = p.x, r.y = p.y;
  63176. }
  63177. i.setClipPath(new mt({
  63178. shape: l.plain()
  63179. }));
  63180. var v = [];
  63181. return k(n.named, function(g) {
  63182. OBe.get(g.svgNodeTagLower) != null && (v.push(g), xBe(g.el));
  63183. }), {
  63184. root: i,
  63185. boundingRect: l,
  63186. named: v
  63187. };
  63188. }, t.prototype.useGraphic = function(e) {
  63189. var n = this._usedGraphicMap, r = n.get(e);
  63190. return r || (r = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), n.set(e, r), r);
  63191. }, t.prototype.freeGraphic = function(e) {
  63192. var n = this._usedGraphicMap, r = n.get(e);
  63193. r && (n.removeKey(e), this._freedGraphics.push(r));
  63194. }, t;
  63195. }()
  63196. );
  63197. function xBe(t) {
  63198. t.silent = !1, t.isGroup && t.traverse(function(e) {
  63199. e.silent = !1;
  63200. });
  63201. }
  63202. function wBe(t) {
  63203. var e = [], n = Pe();
  63204. return k(t, function(r) {
  63205. if (r.namedFrom == null) {
  63206. var i = new u5e(r.name, r.el);
  63207. e.push(i), n.set(r.name, i);
  63208. }
  63209. }), {
  63210. regions: e,
  63211. regionsMap: n
  63212. };
  63213. }
  63214. var pE = [126, 25], gF = "南海诸岛", hc = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];
  63215. for (var lc = 0; lc < hc.length; lc++)
  63216. for (var hd = 0; hd < hc[lc].length; hd++)
  63217. hc[lc][hd][0] /= 10.5, hc[lc][hd][1] /= -10.5 / 0.75, hc[lc][hd][0] += pE[0], hc[lc][hd][1] += pE[1];
  63218. function CBe(t, e) {
  63219. if (t === "china") {
  63220. for (var n = 0; n < e.length; n++)
  63221. if (e[n].name === gF)
  63222. return;
  63223. e.push(new ote(gF, ce(hc, function(r) {
  63224. return {
  63225. type: "polygon",
  63226. exterior: r
  63227. };
  63228. }), pE));
  63229. }
  63230. }
  63231. var TBe = {
  63232. 南海诸岛: [32, 80],
  63233. // 全国
  63234. 广东: [0, -10],
  63235. 香港: [10, 5],
  63236. 澳门: [-10, 10],
  63237. // '北京': [-10, 0],
  63238. 天津: [5, 5]
  63239. };
  63240. function PBe(t, e) {
  63241. if (t === "china") {
  63242. var n = TBe[e.name];
  63243. if (n) {
  63244. var r = e.getCenter();
  63245. r[0] += n[0] / 10.5, r[1] += -n[1] / (10.5 / 0.75), e.setCenter(r);
  63246. }
  63247. }
  63248. }
  63249. var $Be = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
  63250. function ABe(t, e) {
  63251. t === "china" && e.name === "台湾" && e.geometries.push({
  63252. type: "polygon",
  63253. exterior: $Be[0]
  63254. });
  63255. }
  63256. var EBe = "name", MBe = (
  63257. /** @class */
  63258. function() {
  63259. function t(e, n, r) {
  63260. this.type = "geoJSON", this._parsedMap = Pe(), this._mapName = e, this._specialAreas = r, this._geoJSON = DBe(n);
  63261. }
  63262. return t.prototype.load = function(e, n) {
  63263. n = n || EBe;
  63264. var r = this._parsedMap.get(n);
  63265. if (!r) {
  63266. var i = this._parseToRegions(n);
  63267. r = this._parsedMap.set(n, {
  63268. regions: i,
  63269. boundingRect: IBe(i)
  63270. });
  63271. }
  63272. var a = Pe(), o = [];
  63273. return k(r.regions, function(s) {
  63274. var l = s.name;
  63275. e && Ce(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), a.set(l, s);
  63276. }), {
  63277. regions: o,
  63278. boundingRect: r.boundingRect || new Je(0, 0, 0, 0),
  63279. regionsMap: a
  63280. };
  63281. }, t.prototype._parseToRegions = function(e) {
  63282. var n = this._mapName, r = this._geoJSON, i;
  63283. try {
  63284. i = r ? iE(r, e) : [];
  63285. } catch (a) {
  63286. throw new Error(`Invalid geoJson format
  63287. ` + a.message);
  63288. }
  63289. return CBe(n, i), k(i, function(a) {
  63290. var o = a.name;
  63291. PBe(n, a), ABe(n, a);
  63292. var s = this._specialAreas && this._specialAreas[o];
  63293. s && a.transformTo(s.left, s.top, s.width, s.height);
  63294. }, this), i;
  63295. }, t.prototype.getMapForUser = function() {
  63296. return {
  63297. // For backward compatibility, use geoJson
  63298. // PENDING: it has been returning them without clone.
  63299. // do we need to avoid outsite modification?
  63300. geoJson: this._geoJSON,
  63301. geoJSON: this._geoJSON,
  63302. specialAreas: this._specialAreas
  63303. };
  63304. }, t;
  63305. }()
  63306. );
  63307. function IBe(t) {
  63308. for (var e, n = 0; n < t.length; n++) {
  63309. var r = t[n].getBoundingRect();
  63310. e = e || r.clone(), e.union(r);
  63311. }
  63312. return e;
  63313. }
  63314. function DBe(t) {
  63315. return Oe(t) ? typeof JSON < "u" && JSON.parse ? JSON.parse(t) : new Function("return (" + t + ");")() : t;
  63316. }
  63317. var mv = Pe();
  63318. const qs = {
  63319. /**
  63320. * Compatible with previous `echarts.registerMap`.
  63321. *
  63322. * @usage
  63323. * ```js
  63324. *
  63325. * echarts.registerMap('USA', geoJson, specialAreas);
  63326. *
  63327. * echarts.registerMap('USA', {
  63328. * geoJson: geoJson,
  63329. * specialAreas: {...}
  63330. * });
  63331. * echarts.registerMap('USA', {
  63332. * geoJSON: geoJson,
  63333. * specialAreas: {...}
  63334. * });
  63335. *
  63336. * echarts.registerMap('airport', {
  63337. * svg: svg
  63338. * }
  63339. * ```
  63340. *
  63341. * Note:
  63342. * Do not support that register multiple geoJSON or SVG
  63343. * one map name. Because different geoJSON and SVG have
  63344. * different unit. It's not easy to make sure how those
  63345. * units are mapping/normalize.
  63346. * If intending to use multiple geoJSON or SVG, we can
  63347. * use multiple geo coordinate system.
  63348. */
  63349. registerMap: function(t, e, n) {
  63350. if (e.svg) {
  63351. var r = new SBe(t, e.svg);
  63352. mv.set(t, r);
  63353. } else {
  63354. var i = e.geoJson || e.geoJSON;
  63355. i && !e.features ? n = e.specialAreas : i = e;
  63356. var r = new MBe(t, i, n);
  63357. mv.set(t, r);
  63358. }
  63359. },
  63360. getGeoResource: function(t) {
  63361. return mv.get(t);
  63362. },
  63363. /**
  63364. * Only for exporting to users.
  63365. * **MUST NOT** used internally.
  63366. */
  63367. getMapForUser: function(t) {
  63368. var e = mv.get(t);
  63369. return e && e.type === "geoJSON" && e.getMapForUser();
  63370. },
  63371. load: function(t, e, n) {
  63372. var r = mv.get(t);
  63373. if (!r) {
  63374. process.env.NODE_ENV !== "production" && console.error("Map " + t + " not exists. The GeoJSON of the map must be provided.");
  63375. return;
  63376. }
  63377. return r.load(e, n);
  63378. }
  63379. };
  63380. var Wk = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], RBe = Pe(Wk), kBe = Pe(Wk.concat(["g"])), LBe = Pe(Wk.concat(["g"])), fne = bt();
  63381. function Cb(t) {
  63382. var e = t.getItemStyle(), n = t.get("areaColor");
  63383. return n != null && (e.fill = n), e;
  63384. }
  63385. function mF(t) {
  63386. var e = t.style;
  63387. e && (e.stroke = e.stroke || e.fill, e.fill = null);
  63388. }
  63389. var dne = (
  63390. /** @class */
  63391. function() {
  63392. function t(e) {
  63393. var n = new Ve();
  63394. this.uid = yp("ec_map_draw"), this._controller = new K0(e.getZr()), this._controllerHost = {
  63395. target: n
  63396. }, this.group = n, n.add(this._regionsGroup = new Ve()), n.add(this._svgGroup = new Ve());
  63397. }
  63398. return t.prototype.draw = function(e, n, r, i, a) {
  63399. var o = e.mainType === "geo", s = e.getData && e.getData();
  63400. o && n.eachComponent({
  63401. mainType: "series",
  63402. subType: "map"
  63403. }, function(m) {
  63404. !s && m.getHostGeoModel() === e && (s = m.getData());
  63405. });
  63406. var l = e.coordinateSystem, u = this._regionsGroup, c = this.group, f = l.getTransformInfo(), d = f.raw, h = f.roam, p = !u.childAt(0) || a;
  63407. p ? (c.x = h.x, c.y = h.y, c.scaleX = h.scaleX, c.scaleY = h.scaleY, c.dirty()) : Ct(c, h, e);
  63408. var v = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
  63409. api: r,
  63410. geo: l,
  63411. mapOrGeoModel: e,
  63412. data: s,
  63413. isVisualEncodedByVisualMap: v,
  63414. isGeo: o,
  63415. transformInfoRaw: d
  63416. };
  63417. l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, n, r), this._updateMapSelectHandler(e, u, r, i);
  63418. }, t.prototype._buildGeoJSON = function(e) {
  63419. var n = this._regionsGroupByName = Pe(), r = Pe(), i = this._regionsGroup, a = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, l = e.geo.projection, u = l && l.stream;
  63420. function c(h, p) {
  63421. return p && (h = p(h)), h && [h[0] * a.scaleX + a.x, h[1] * a.scaleY + a.y];
  63422. }
  63423. function f(h) {
  63424. for (var p = [], v = !u && l && l.project, g = 0; g < h.length; ++g) {
  63425. var m = c(h[g], v);
  63426. m && p.push(m);
  63427. }
  63428. return p;
  63429. }
  63430. function d(h) {
  63431. return {
  63432. shape: {
  63433. points: f(h)
  63434. }
  63435. };
  63436. }
  63437. i.removeAll(), k(e.geo.regions, function(h) {
  63438. var p = h.name, v = n.get(p), g = r.get(p) || {}, m = g.dataIdx, y = g.regionModel;
  63439. v || (v = n.set(p, new Ve()), i.add(v), m = s ? s.indexOfName(p) : null, y = e.isGeo ? o.getRegionModel(p) : s ? s.getItemModel(m) : null, r.set(p, {
  63440. dataIdx: m,
  63441. regionModel: y
  63442. }));
  63443. var b = [], _ = [];
  63444. k(h.geometries, function(x) {
  63445. if (x.type === "polygon") {
  63446. var C = [x.exterior].concat(x.interiors || []);
  63447. u && (C = xF(C, u)), k(C, function(w) {
  63448. b.push(new ii(d(w)));
  63449. });
  63450. } else {
  63451. var T = x.points;
  63452. u && (T = xF(T, u, !0)), k(T, function(w) {
  63453. _.push(new ai(d(w)));
  63454. });
  63455. }
  63456. });
  63457. var O = c(h.getCenter(), l && l.project);
  63458. function S(x, C) {
  63459. if (x.length) {
  63460. var T = new qx({
  63461. culling: !0,
  63462. segmentIgnoreThreshold: 1,
  63463. shape: {
  63464. paths: x
  63465. }
  63466. });
  63467. v.add(T), yF(e, T, m, y), bF(e, T, p, y, o, m, O), C && (mF(T), k(T.states, mF));
  63468. }
  63469. }
  63470. S(b), S(_, !0);
  63471. }), n.each(function(h, p) {
  63472. var v = r.get(p), g = v.dataIdx, m = v.regionModel;
  63473. _F(e, h, p, m, o, g), OF(e, h, p, m, o), SF(e, h, p, m, o);
  63474. }, this);
  63475. }, t.prototype._buildSVG = function(e) {
  63476. var n = e.geo.map, r = e.transformInfoRaw;
  63477. this._svgGroup.x = r.x, this._svgGroup.y = r.y, this._svgGroup.scaleX = r.scaleX, this._svgGroup.scaleY = r.scaleY, this._svgResourceChanged(n) && (this._freeSVG(), this._useSVG(n));
  63478. var i = this._svgDispatcherMap = Pe(), a = !1;
  63479. k(this._svgGraphicRecord.named, function(o) {
  63480. var s = o.name, l = e.mapOrGeoModel, u = e.data, c = o.svgNodeTagLower, f = o.el, d = u ? u.indexOfName(s) : null, h = l.getRegionModel(s);
  63481. if (RBe.get(c) != null && f instanceof Ma && yF(e, f, d, h), f instanceof Ma && (f.culling = !0), f.z2EmphasisLift = 0, !o.namedFrom && (LBe.get(c) != null && bF(e, f, s, h, l, d, null), _F(e, f, s, h, l, d), OF(e, f, s, h, l), kBe.get(c) != null)) {
  63482. var p = SF(e, f, s, h, l);
  63483. p === "self" && (a = !0);
  63484. var v = i.get(s) || i.set(s, []);
  63485. v.push(f);
  63486. }
  63487. }, this), this._enableBlurEntireSVG(a, e);
  63488. }, t.prototype._enableBlurEntireSVG = function(e, n) {
  63489. if (e && n.isGeo) {
  63490. var r = n.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), i = r.opacity;
  63491. this._svgGraphicRecord.root.traverse(function(a) {
  63492. if (!a.isGroup) {
  63493. bf(a);
  63494. var o = a.ensureState("blur").style || {};
  63495. o.opacity == null && i != null && (o.opacity = i), a.ensureState("emphasis");
  63496. }
  63497. });
  63498. }
  63499. }, t.prototype.remove = function() {
  63500. this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
  63501. }, t.prototype.findHighDownDispatchers = function(e, n) {
  63502. if (e == null)
  63503. return [];
  63504. var r = n.coordinateSystem;
  63505. if (r.resourceType === "geoJSON") {
  63506. var i = this._regionsGroupByName;
  63507. if (i) {
  63508. var a = i.get(e);
  63509. return a ? [a] : [];
  63510. }
  63511. } else if (r.resourceType === "geoSVG")
  63512. return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
  63513. }, t.prototype._svgResourceChanged = function(e) {
  63514. return this._svgMapName !== e;
  63515. }, t.prototype._useSVG = function(e) {
  63516. var n = qs.getGeoResource(e);
  63517. if (n && n.type === "geoSVG") {
  63518. var r = n.useGraphic(this.uid);
  63519. this._svgGroup.add(r.root), this._svgGraphicRecord = r, this._svgMapName = e;
  63520. }
  63521. }, t.prototype._freeSVG = function() {
  63522. var e = this._svgMapName;
  63523. if (e != null) {
  63524. var n = qs.getGeoResource(e);
  63525. n && n.type === "geoSVG" && n.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
  63526. }
  63527. }, t.prototype._updateController = function(e, n, r) {
  63528. var i = e.coordinateSystem, a = this._controller, o = this._controllerHost;
  63529. o.zoomLimit = e.get("scaleLimit"), o.zoom = i.getZoom(), a.enable(e.get("roam") || !1);
  63530. var s = e.mainType;
  63531. function l() {
  63532. var u = {
  63533. type: "geoRoam",
  63534. componentType: s
  63535. };
  63536. return u[s + "Id"] = e.id, u;
  63537. }
  63538. a.off("pan").on("pan", function(u) {
  63539. this._mouseDownFlag = !1, Vk(o, u.dx, u.dy), r.dispatchAction(le(l(), {
  63540. dx: u.dx,
  63541. dy: u.dy,
  63542. animation: {
  63543. duration: 0
  63544. }
  63545. }));
  63546. }, this), a.off("zoom").on("zoom", function(u) {
  63547. this._mouseDownFlag = !1, Fk(o, u.scale, u.originX, u.originY), r.dispatchAction(le(l(), {
  63548. totalZoom: o.zoom,
  63549. zoom: u.scale,
  63550. originX: u.originX,
  63551. originY: u.originY,
  63552. animation: {
  63553. duration: 0
  63554. }
  63555. }));
  63556. }, this), a.setPointerChecker(function(u, c, f) {
  63557. return i.containPoint([c, f]) && !mw(u, r, e);
  63558. });
  63559. }, t.prototype.resetForLabelLayout = function() {
  63560. this.group.traverse(function(e) {
  63561. var n = e.getTextContent();
  63562. n && (n.ignore = fne(n).ignore);
  63563. });
  63564. }, t.prototype._updateMapSelectHandler = function(e, n, r, i) {
  63565. var a = this;
  63566. n.off("mousedown"), n.off("click"), e.get("selectedMode") && (n.on("mousedown", function() {
  63567. a._mouseDownFlag = !0;
  63568. }), n.on("click", function(o) {
  63569. a._mouseDownFlag && (a._mouseDownFlag = !1);
  63570. }));
  63571. }, t;
  63572. }()
  63573. );
  63574. function yF(t, e, n, r) {
  63575. var i = r.getModel("itemStyle"), a = r.getModel(["emphasis", "itemStyle"]), o = r.getModel(["blur", "itemStyle"]), s = r.getModel(["select", "itemStyle"]), l = Cb(i), u = Cb(a), c = Cb(s), f = Cb(o), d = t.data;
  63576. if (d) {
  63577. var h = d.getItemVisual(n, "style"), p = d.getItemVisual(n, "decal");
  63578. t.isVisualEncodedByVisualMap && h.fill && (l.fill = h.fill), p && (l.decal = Fh(p, t.api));
  63579. }
  63580. e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = c, e.ensureState("blur").style = f, bf(e);
  63581. }
  63582. function bF(t, e, n, r, i, a, o) {
  63583. var s = t.data, l = t.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), a)), c = s && s.getItemLayout(a);
  63584. if (l || u || c && c.showLabel) {
  63585. var f = l ? n : a, d = void 0;
  63586. (!s || a >= 0) && (d = i);
  63587. var h = o ? {
  63588. normal: {
  63589. align: "center",
  63590. verticalAlign: "middle"
  63591. }
  63592. } : null;
  63593. Pr(e, er(r), {
  63594. labelFetcher: d,
  63595. labelDataIndex: f,
  63596. defaultText: n
  63597. }, h);
  63598. var p = e.getTextContent();
  63599. if (p && (fne(p).ignore = p.ignore, e.textConfig && o)) {
  63600. var v = e.getBoundingRect().clone();
  63601. e.textConfig.layoutRect = v, e.textConfig.position = [(o[0] - v.x) / v.width * 100 + "%", (o[1] - v.y) / v.height * 100 + "%"];
  63602. }
  63603. e.disableLabelAnimation = !0;
  63604. } else
  63605. e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
  63606. }
  63607. function _F(t, e, n, r, i, a) {
  63608. t.data ? t.data.setItemGraphicEl(a, e) : Fe(e).eventData = {
  63609. componentType: "geo",
  63610. componentIndex: i.componentIndex,
  63611. geoIndex: i.componentIndex,
  63612. name: n,
  63613. region: r && r.option || {}
  63614. };
  63615. }
  63616. function OF(t, e, n, r, i) {
  63617. t.data || gp({
  63618. el: e,
  63619. componentModel: i,
  63620. itemName: n,
  63621. // @ts-ignore FIXME:TS fix the "compatible with each other"?
  63622. itemTooltipOption: r.get("tooltip")
  63623. });
  63624. }
  63625. function SF(t, e, n, r, i) {
  63626. e.highDownSilentOnTouch = !!i.get("selectedMode");
  63627. var a = r.getModel("emphasis"), o = a.get("focus");
  63628. return bn(e, o, a.get("blurScope"), a.get("disabled")), t.isGeo && fke(e, i, n), o;
  63629. }
  63630. function xF(t, e, n) {
  63631. var r = [], i;
  63632. function a() {
  63633. i = [];
  63634. }
  63635. function o() {
  63636. i.length && (r.push(i), i = []);
  63637. }
  63638. var s = e({
  63639. polygonStart: a,
  63640. polygonEnd: o,
  63641. lineStart: a,
  63642. lineEnd: o,
  63643. point: function(l, u) {
  63644. isFinite(l) && isFinite(u) && i.push([l, u]);
  63645. },
  63646. sphere: function() {
  63647. }
  63648. });
  63649. return !n && s.polygonStart(), k(t, function(l) {
  63650. s.lineStart();
  63651. for (var u = 0; u < l.length; u++)
  63652. s.point(l[u][0], l[u][1]);
  63653. s.lineEnd();
  63654. }), !n && s.polygonEnd(), r;
  63655. }
  63656. var NBe = (
  63657. /** @class */
  63658. function(t) {
  63659. q(e, t);
  63660. function e() {
  63661. var n = t !== null && t.apply(this, arguments) || this;
  63662. return n.type = e.type, n;
  63663. }
  63664. return e.prototype.render = function(n, r, i, a) {
  63665. if (!(a && a.type === "mapToggleSelect" && a.from === this.uid)) {
  63666. var o = this.group;
  63667. if (o.removeAll(), !n.getHostGeoModel()) {
  63668. if (this._mapDraw && a && a.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), a && a.type === "geoRoam" && a.componentType === "series" && a.seriesId === n.id) {
  63669. var s = this._mapDraw;
  63670. s && o.add(s.group);
  63671. } else if (n.needsDrawMap) {
  63672. var s = this._mapDraw || new dne(i);
  63673. o.add(s.group), s.draw(n, r, i, this, a), this._mapDraw = s;
  63674. } else
  63675. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  63676. n.get("showLegendSymbol") && r.getComponent("legend") && this._renderSymbols(n, r, i);
  63677. }
  63678. }
  63679. }, e.prototype.remove = function() {
  63680. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
  63681. }, e.prototype.dispose = function() {
  63682. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  63683. }, e.prototype._renderSymbols = function(n, r, i) {
  63684. var a = n.originalData, o = this.group;
  63685. a.each(a.mapDimension("value"), function(s, l) {
  63686. if (!isNaN(s)) {
  63687. var u = a.getItemLayout(l);
  63688. if (!(!u || !u.point)) {
  63689. var c = u.point, f = u.offset, d = new ll({
  63690. style: {
  63691. // Because the special of map draw.
  63692. // Which needs statistic of multiple series and draw on one map.
  63693. // And each series also need a symbol with legend color
  63694. //
  63695. // Layout and visual are put one the different data
  63696. // TODO
  63697. fill: n.getData().getVisual("style").fill
  63698. },
  63699. shape: {
  63700. cx: c[0] + f * 9,
  63701. cy: c[1],
  63702. r: 3
  63703. },
  63704. silent: !0,
  63705. // Do not overlap the first series, on which labels are displayed.
  63706. z2: 8 + (f ? 0 : dp + 1)
  63707. });
  63708. if (!f) {
  63709. var h = n.mainSeries.getData(), p = a.getName(l), v = h.indexOfName(p), g = a.getItemModel(l), m = g.getModel("label"), y = h.getItemGraphicEl(v);
  63710. Pr(d, er(g), {
  63711. labelFetcher: {
  63712. getFormattedLabel: function(b, _) {
  63713. return n.getFormattedLabel(v, _);
  63714. }
  63715. },
  63716. defaultText: p
  63717. }), d.disableLabelAnimation = !0, m.get("position") || d.setTextConfig({
  63718. position: "bottom"
  63719. }), y.onHoverStateChange = function(b) {
  63720. oO(d, b);
  63721. };
  63722. }
  63723. o.add(d);
  63724. }
  63725. }
  63726. });
  63727. }, e.type = "map", e;
  63728. }(zt)
  63729. ), BBe = (
  63730. /** @class */
  63731. function(t) {
  63732. q(e, t);
  63733. function e() {
  63734. var n = t !== null && t.apply(this, arguments) || this;
  63735. return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function(r) {
  63736. if (r != null) {
  63737. var i = this.getData().getName(r), a = this.coordinateSystem, o = a.getRegion(i);
  63738. return o && a.dataToPoint(o.getCenter());
  63739. }
  63740. }, n;
  63741. }
  63742. return e.prototype.getInitialData = function(n) {
  63743. for (var r = Pp(this, {
  63744. coordDimensions: ["value"],
  63745. encodeDefaulter: Ue(nk, this)
  63746. }), i = Pe(), a = [], o = 0, s = r.count(); o < s; o++) {
  63747. var l = r.getName(o);
  63748. i.set(l, !0);
  63749. }
  63750. var u = qs.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
  63751. return k(u.regions, function(c) {
  63752. var f = c.name;
  63753. i.get(f) || a.push(f);
  63754. }), r.appendValues([], a), r;
  63755. }, e.prototype.getHostGeoModel = function() {
  63756. var n = this.option.geoIndex;
  63757. return n != null ? this.ecModel.getComponent("geo", n) : null;
  63758. }, e.prototype.getMapType = function() {
  63759. return (this.getHostGeoModel() || this).option.map;
  63760. }, e.prototype.getRawValue = function(n) {
  63761. var r = this.getData();
  63762. return r.get(r.mapDimension("value"), n);
  63763. }, e.prototype.getRegionModel = function(n) {
  63764. var r = this.getData();
  63765. return r.getItemModel(r.indexOfName(n));
  63766. }, e.prototype.formatTooltip = function(n, r, i) {
  63767. for (var a = this.getData(), o = this.getRawValue(n), s = a.getName(n), l = this.seriesGroup, u = [], c = 0; c < l.length; c++) {
  63768. var f = l[c].originalData.indexOfName(s), d = a.mapDimension("value");
  63769. isNaN(l[c].originalData.get(d, f)) || u.push(l[c].name);
  63770. }
  63771. return tr("section", {
  63772. header: u.join(", "),
  63773. noHeader: !u.length,
  63774. blocks: [tr("nameValue", {
  63775. name: s,
  63776. value: o
  63777. })]
  63778. });
  63779. }, e.prototype.setZoom = function(n) {
  63780. this.option.zoom = n;
  63781. }, e.prototype.setCenter = function(n) {
  63782. this.option.center = n;
  63783. }, e.prototype.getLegendIcon = function(n) {
  63784. var r = n.icon || "roundRect", i = $n(r, 0, 0, n.itemWidth, n.itemHeight, n.itemStyle.fill);
  63785. return i.setStyle(n.itemStyle), i.style.stroke = "none", r.indexOf("empty") > -1 && (i.style.stroke = i.style.fill, i.style.fill = "#fff", i.style.lineWidth = 2), i;
  63786. }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
  63787. // 一级层叠
  63788. // zlevel: 0,
  63789. // 二级层叠
  63790. z: 2,
  63791. coordinateSystem: "geo",
  63792. // map should be explicitly specified since ec3.
  63793. map: "",
  63794. // If `geoIndex` is not specified, a exclusive geo will be
  63795. // created. Otherwise use the specified geo component, and
  63796. // `map` and `mapType` are ignored.
  63797. // geoIndex: 0,
  63798. // 'center' | 'left' | 'right' | 'x%' | {number}
  63799. left: "center",
  63800. // 'center' | 'top' | 'bottom' | 'x%' | {number}
  63801. top: "center",
  63802. // right
  63803. // bottom
  63804. // width:
  63805. // height
  63806. // Aspect is width / height. Inited to be geoJson bbox aspect
  63807. // This parameter is used for scale this aspect
  63808. // Default value:
  63809. // for geoSVG source: 1,
  63810. // for geoJSON source: 0.75.
  63811. aspectScale: null,
  63812. // Layout with center and size
  63813. // If you want to put map in a fixed size box with right aspect ratio
  63814. // This two properties may be more convenient.
  63815. // layoutCenter: [50%, 50%]
  63816. // layoutSize: 100
  63817. showLegendSymbol: !0,
  63818. // Define left-top, right-bottom coords to control view
  63819. // For example, [ [180, 90], [-180, -90] ],
  63820. // higher priority than center and zoom
  63821. boundingCoords: null,
  63822. // Default on center of map
  63823. center: null,
  63824. zoom: 1,
  63825. scaleLimit: null,
  63826. selectedMode: !0,
  63827. label: {
  63828. show: !1,
  63829. color: "#000"
  63830. },
  63831. // scaleLimit: null,
  63832. itemStyle: {
  63833. borderWidth: 0.5,
  63834. borderColor: "#444",
  63835. areaColor: "#eee"
  63836. },
  63837. emphasis: {
  63838. label: {
  63839. show: !0,
  63840. color: "rgb(100,0,0)"
  63841. },
  63842. itemStyle: {
  63843. areaColor: "rgba(255,215,0,0.8)"
  63844. }
  63845. },
  63846. select: {
  63847. label: {
  63848. show: !0,
  63849. color: "rgb(100,0,0)"
  63850. },
  63851. itemStyle: {
  63852. color: "rgba(255,215,0,0.8)"
  63853. }
  63854. },
  63855. nameProperty: "name"
  63856. }, e;
  63857. }(Ht)
  63858. );
  63859. function zBe(t, e) {
  63860. var n = {};
  63861. return k(t, function(r) {
  63862. r.each(r.mapDimension("value"), function(i, a) {
  63863. var o = "ec-" + r.getName(a);
  63864. n[o] = n[o] || [], isNaN(i) || n[o].push(i);
  63865. });
  63866. }), t[0].map(t[0].mapDimension("value"), function(r, i) {
  63867. for (var a = "ec-" + t[0].getName(i), o = 0, s = 1 / 0, l = -1 / 0, u = n[a].length, c = 0; c < u; c++)
  63868. s = Math.min(s, n[a][c]), l = Math.max(l, n[a][c]), o += n[a][c];
  63869. var f;
  63870. return e === "min" ? f = s : e === "max" ? f = l : e === "average" ? f = o / u : f = o, u === 0 ? NaN : f;
  63871. });
  63872. }
  63873. function VBe(t) {
  63874. var e = {};
  63875. t.eachSeriesByType("map", function(n) {
  63876. var r = n.getHostGeoModel(), i = r ? "o" + r.id : "i" + n.getMapType();
  63877. (e[i] = e[i] || []).push(n);
  63878. }), k(e, function(n, r) {
  63879. for (var i = zBe(ce(n, function(o) {
  63880. return o.getData();
  63881. }), n[0].get("mapValueCalculation")), a = 0; a < n.length; a++)
  63882. n[a].originalData = n[a].getData();
  63883. for (var a = 0; a < n.length; a++)
  63884. n[a].seriesGroup = n, n[a].needsDrawMap = a === 0 && !n[a].getHostGeoModel(), n[a].setData(i.cloneShallow()), n[a].mainSeries = n[0];
  63885. });
  63886. }
  63887. function FBe(t) {
  63888. var e = {};
  63889. t.eachSeriesByType("map", function(n) {
  63890. var r = n.getMapType();
  63891. if (!(n.getHostGeoModel() || e[r])) {
  63892. var i = {};
  63893. k(n.seriesGroup, function(o) {
  63894. var s = o.coordinateSystem, l = o.originalData;
  63895. o.get("showLegendSymbol") && t.getComponent("legend") && l.each(l.mapDimension("value"), function(u, c) {
  63896. var f = l.getName(c), d = s.getRegion(f);
  63897. if (!(!d || isNaN(u))) {
  63898. var h = i[f] || 0, p = s.dataToPoint(d.getCenter());
  63899. i[f] = h + 1, l.setItemLayout(c, {
  63900. point: p,
  63901. offset: h
  63902. });
  63903. }
  63904. });
  63905. });
  63906. var a = n.getData();
  63907. a.each(function(o) {
  63908. var s = a.getName(o), l = a.getItemLayout(o) || {};
  63909. l.showLabel = !i[s], a.setItemLayout(o, l);
  63910. }), e[r] = !0;
  63911. }
  63912. });
  63913. }
  63914. var wF = ar, J0 = (
  63915. /** @class */
  63916. function(t) {
  63917. q(e, t);
  63918. function e(n) {
  63919. var r = t.call(this) || this;
  63920. return r.type = "view", r.dimensions = ["x", "y"], r._roamTransformable = new As(), r._rawTransformable = new As(), r.name = n, r;
  63921. }
  63922. return e.prototype.setBoundingRect = function(n, r, i, a) {
  63923. return this._rect = new Je(n, r, i, a), this._rect;
  63924. }, e.prototype.getBoundingRect = function() {
  63925. return this._rect;
  63926. }, e.prototype.setViewRect = function(n, r, i, a) {
  63927. this._transformTo(n, r, i, a), this._viewRect = new Je(n, r, i, a);
  63928. }, e.prototype._transformTo = function(n, r, i, a) {
  63929. var o = this.getBoundingRect(), s = this._rawTransformable;
  63930. s.transform = o.calculateTransform(new Je(n, r, i, a));
  63931. var l = s.parent;
  63932. s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
  63933. }, e.prototype.setCenter = function(n, r) {
  63934. n && (this._center = [_e(n[0], r.getWidth()), _e(n[1], r.getHeight())], this._updateCenterAndZoom());
  63935. }, e.prototype.setZoom = function(n) {
  63936. n = n || 1;
  63937. var r = this.zoomLimit;
  63938. r && (r.max != null && (n = Math.min(r.max, n)), r.min != null && (n = Math.max(r.min, n))), this._zoom = n, this._updateCenterAndZoom();
  63939. }, e.prototype.getDefaultCenter = function() {
  63940. var n = this.getBoundingRect(), r = n.x + n.width / 2, i = n.y + n.height / 2;
  63941. return [r, i];
  63942. }, e.prototype.getCenter = function() {
  63943. return this._center || this.getDefaultCenter();
  63944. }, e.prototype.getZoom = function() {
  63945. return this._zoom || 1;
  63946. }, e.prototype.getRoamTransform = function() {
  63947. return this._roamTransformable.getLocalTransform();
  63948. }, e.prototype._updateCenterAndZoom = function() {
  63949. var n = this._rawTransformable.getLocalTransform(), r = this._roamTransformable, i = this.getDefaultCenter(), a = this.getCenter(), o = this.getZoom();
  63950. a = ar([], a, n), i = ar([], i, n), r.originX = a[0], r.originY = a[1], r.x = i[0] - a[0], r.y = i[1] - a[1], r.scaleX = r.scaleY = o, this._updateTransform();
  63951. }, e.prototype._updateTransform = function() {
  63952. var n = this._roamTransformable, r = this._rawTransformable;
  63953. r.parent = n, n.updateTransform(), r.updateTransform(), Lx(this.transform || (this.transform = []), r.transform || Si()), this._rawTransform = r.getLocalTransform(), this.invTransform = this.invTransform || [], kf(this.invTransform, this.transform), this.decomposeTransform();
  63954. }, e.prototype.getTransformInfo = function() {
  63955. var n = this._rawTransformable, r = this._roamTransformable, i = new As();
  63956. return i.transform = r.transform, i.decomposeTransform(), {
  63957. roam: {
  63958. x: i.x,
  63959. y: i.y,
  63960. scaleX: i.scaleX,
  63961. scaleY: i.scaleY
  63962. },
  63963. raw: {
  63964. x: n.x,
  63965. y: n.y,
  63966. scaleX: n.scaleX,
  63967. scaleY: n.scaleY
  63968. }
  63969. };
  63970. }, e.prototype.getViewRect = function() {
  63971. return this._viewRect;
  63972. }, e.prototype.getViewRectAfterRoam = function() {
  63973. var n = this.getBoundingRect().clone();
  63974. return n.applyTransform(this.transform), n;
  63975. }, e.prototype.dataToPoint = function(n, r, i) {
  63976. var a = r ? this._rawTransform : this.transform;
  63977. return i = i || [], a ? wF(i, n, a) : Mr(i, n);
  63978. }, e.prototype.pointToData = function(n) {
  63979. var r = this.invTransform;
  63980. return r ? wF([], n, r) : [n[0], n[1]];
  63981. }, e.prototype.convertToPixel = function(n, r, i) {
  63982. var a = CF(r);
  63983. return a === this ? a.dataToPoint(i) : null;
  63984. }, e.prototype.convertFromPixel = function(n, r, i) {
  63985. var a = CF(r);
  63986. return a === this ? a.pointToData(i) : null;
  63987. }, e.prototype.containPoint = function(n) {
  63988. return this.getViewRectAfterRoam().contain(n[0], n[1]);
  63989. }, e.dimensions = ["x", "y"], e;
  63990. }(As)
  63991. );
  63992. function CF(t) {
  63993. var e = t.seriesModel;
  63994. return e ? e.coordinateSystem : null;
  63995. }
  63996. var WBe = {
  63997. geoJSON: {
  63998. aspectScale: 0.75,
  63999. invertLongitute: !0
  64000. },
  64001. geoSVG: {
  64002. aspectScale: 1,
  64003. invertLongitute: !1
  64004. }
  64005. }, hne = ["lng", "lat"], pne = (
  64006. /** @class */
  64007. function(t) {
  64008. q(e, t);
  64009. function e(n, r, i) {
  64010. var a = t.call(this, n) || this;
  64011. a.dimensions = hne, a.type = "geo", a._nameCoordMap = Pe(), a.map = r;
  64012. var o = i.projection, s = qs.load(r, i.nameMap, i.nameProperty), l = qs.getGeoResource(r), u = a.resourceType = l ? l.type : null, c = a.regions = s.regions, f = WBe[l.type];
  64013. a._regionsMap = s.regionsMap, a.regions = s.regions, process.env.NODE_ENV !== "production" && o && (u === "geoSVG" && (process.env.NODE_ENV !== "production" && dn("Map " + r + " with SVG source can't use projection. Only GeoJSON source supports projection."), o = null), o.project && o.unproject || (process.env.NODE_ENV !== "production" && dn("project and unproject must be both provided in the projeciton."), o = null)), a.projection = o;
  64014. var d;
  64015. if (o)
  64016. for (var h = 0; h < c.length; h++) {
  64017. var p = c[h].getBoundingRect(o);
  64018. d = d || p.clone(), d.union(p);
  64019. }
  64020. else
  64021. d = s.boundingRect;
  64022. return a.setBoundingRect(d.x, d.y, d.width, d.height), a.aspectScale = o ? 1 : We(i.aspectScale, f.aspectScale), a._invertLongitute = o ? !1 : f.invertLongitute, a;
  64023. }
  64024. return e.prototype._transformTo = function(n, r, i, a) {
  64025. var o = this.getBoundingRect(), s = this._invertLongitute;
  64026. o = o.clone(), s && (o.y = -o.y - o.height);
  64027. var l = this._rawTransformable;
  64028. l.transform = o.calculateTransform(new Je(n, r, i, a));
  64029. var u = l.parent;
  64030. l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
  64031. }, e.prototype.getRegion = function(n) {
  64032. return this._regionsMap.get(n);
  64033. }, e.prototype.getRegionByCoord = function(n) {
  64034. for (var r = this.regions, i = 0; i < r.length; i++) {
  64035. var a = r[i];
  64036. if (a.type === "geoJSON" && a.contain(n))
  64037. return r[i];
  64038. }
  64039. }, e.prototype.addGeoCoord = function(n, r) {
  64040. this._nameCoordMap.set(n, r);
  64041. }, e.prototype.getGeoCoord = function(n) {
  64042. var r = this._regionsMap.get(n);
  64043. return this._nameCoordMap.get(n) || r && r.getCenter();
  64044. }, e.prototype.dataToPoint = function(n, r, i) {
  64045. if (Oe(n) && (n = this.getGeoCoord(n)), n) {
  64046. var a = this.projection;
  64047. return a && (n = a.project(n)), n && this.projectedToPoint(n, r, i);
  64048. }
  64049. }, e.prototype.pointToData = function(n) {
  64050. var r = this.projection;
  64051. return r && (n = r.unproject(n)), n && this.pointToProjected(n);
  64052. }, e.prototype.pointToProjected = function(n) {
  64053. return t.prototype.pointToData.call(this, n);
  64054. }, e.prototype.projectedToPoint = function(n, r, i) {
  64055. return t.prototype.dataToPoint.call(this, n, r, i);
  64056. }, e.prototype.convertToPixel = function(n, r, i) {
  64057. var a = TF(r);
  64058. return a === this ? a.dataToPoint(i) : null;
  64059. }, e.prototype.convertFromPixel = function(n, r, i) {
  64060. var a = TF(r);
  64061. return a === this ? a.pointToData(i) : null;
  64062. }, e;
  64063. }(J0)
  64064. );
  64065. xn(pne, J0);
  64066. function TF(t) {
  64067. var e = t.geoModel, n = t.seriesModel;
  64068. return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Dn).models[0] || {}).coordinateSystem : null;
  64069. }
  64070. const PF = pne;
  64071. function $F(t, e) {
  64072. var n = t.get("boundingCoords");
  64073. if (n != null) {
  64074. var r = n[0], i = n[1];
  64075. if (!(isFinite(r[0]) && isFinite(r[1]) && isFinite(i[0]) && isFinite(i[1])))
  64076. process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords");
  64077. else {
  64078. var a = this.projection;
  64079. if (a) {
  64080. var o = r[0], s = r[1], l = i[0], u = i[1];
  64081. r = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0];
  64082. var c = function(S, x, C, T) {
  64083. for (var w = C - S, P = T - x, $ = 0; $ <= 100; $++) {
  64084. var A = $ / 100, D = a.project([S + w * A, x + P * A]);
  64085. Ps(r, r, D), $s(i, i, D);
  64086. }
  64087. };
  64088. c(o, s, l, s), c(l, s, l, u), c(l, u, o, u), c(o, u, l, s);
  64089. }
  64090. this.setBoundingRect(r[0], r[1], i[0] - r[0], i[1] - r[1]);
  64091. }
  64092. }
  64093. var f = this.getBoundingRect(), d = t.get("layoutCenter"), h = t.get("layoutSize"), p = e.getWidth(), v = e.getHeight(), g = f.width / f.height * this.aspectScale, m = !1, y, b;
  64094. d && h && (y = [_e(d[0], p), _e(d[1], v)], b = _e(h, Math.min(p, v)), !isNaN(y[0]) && !isNaN(y[1]) && !isNaN(b) ? m = !0 : process.env.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));
  64095. var _;
  64096. if (m)
  64097. _ = {}, g > 1 ? (_.width = b, _.height = b / g) : (_.height = b, _.width = b * g), _.y = y[1] - _.height / 2, _.x = y[0] - _.width / 2;
  64098. else {
  64099. var O = t.getBoxLayoutParams();
  64100. O.aspect = g, _ = Rn(O, {
  64101. width: p,
  64102. height: v
  64103. });
  64104. }
  64105. this.setViewRect(_.x, _.y, _.width, _.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"));
  64106. }
  64107. function QBe(t, e) {
  64108. k(e.get("geoCoord"), function(n, r) {
  64109. t.addGeoCoord(r, n);
  64110. });
  64111. }
  64112. var HBe = (
  64113. /** @class */
  64114. function() {
  64115. function t() {
  64116. this.dimensions = hne;
  64117. }
  64118. return t.prototype.create = function(e, n) {
  64119. var r = [];
  64120. function i(o) {
  64121. return {
  64122. nameProperty: o.get("nameProperty"),
  64123. aspectScale: o.get("aspectScale"),
  64124. projection: o.get("projection")
  64125. };
  64126. }
  64127. e.eachComponent("geo", function(o, s) {
  64128. var l = o.get("map"), u = new PF(l + s, l, le({
  64129. nameMap: o.get("nameMap")
  64130. }, i(o)));
  64131. u.zoomLimit = o.get("scaleLimit"), r.push(u), o.coordinateSystem = u, u.model = o, u.resize = $F, u.resize(o, n);
  64132. }), e.eachSeries(function(o) {
  64133. var s = o.get("coordinateSystem");
  64134. if (s === "geo") {
  64135. var l = o.get("geoIndex") || 0;
  64136. o.coordinateSystem = r[l];
  64137. }
  64138. });
  64139. var a = {};
  64140. return e.eachSeriesByType("map", function(o) {
  64141. if (!o.getHostGeoModel()) {
  64142. var s = o.getMapType();
  64143. a[s] = a[s] || [], a[s].push(o);
  64144. }
  64145. }), k(a, function(o, s) {
  64146. var l = ce(o, function(c) {
  64147. return c.get("nameMap");
  64148. }), u = new PF(s, s, le({
  64149. nameMap: Dx(l)
  64150. }, i(o[0])));
  64151. u.zoomLimit = Tn.apply(null, ce(o, function(c) {
  64152. return c.get("scaleLimit");
  64153. })), r.push(u), u.resize = $F, u.resize(o[0], n), k(o, function(c) {
  64154. c.coordinateSystem = u, QBe(u, c);
  64155. });
  64156. }), r;
  64157. }, t.prototype.getFilledRegions = function(e, n, r, i) {
  64158. for (var a = (e || []).slice(), o = Pe(), s = 0; s < a.length; s++)
  64159. o.set(a[s].name, a[s]);
  64160. var l = qs.load(n, r, i);
  64161. return k(l.regions, function(u) {
  64162. var c = u.name;
  64163. !o.get(c) && a.push({
  64164. name: c
  64165. });
  64166. }), a;
  64167. }, t;
  64168. }()
  64169. ), vne = new HBe(), GBe = (
  64170. /** @class */
  64171. function(t) {
  64172. q(e, t);
  64173. function e() {
  64174. var n = t !== null && t.apply(this, arguments) || this;
  64175. return n.type = e.type, n;
  64176. }
  64177. return e.prototype.init = function(n, r, i) {
  64178. var a = qs.getGeoResource(n.map);
  64179. if (a && a.type === "geoJSON") {
  64180. var o = n.itemStyle = n.itemStyle || {};
  64181. "color" in o || (o.color = "#eee");
  64182. }
  64183. this.mergeDefaultAndTheme(n, i), gf(n, "label", ["show"]);
  64184. }, e.prototype.optionUpdated = function() {
  64185. var n = this, r = this.option;
  64186. r.regions = vne.getFilledRegions(r.regions, r.map, r.nameMap, r.nameProperty);
  64187. var i = {};
  64188. this._optionModelMap = Aa(r.regions || [], function(a, o) {
  64189. var s = o.name;
  64190. return s && (a.set(s, new Wt(o, n, n.ecModel)), o.selected && (i[s] = !0)), a;
  64191. }, Pe()), r.selectedMap || (r.selectedMap = i);
  64192. }, e.prototype.getRegionModel = function(n) {
  64193. return this._optionModelMap.get(n) || new Wt(null, this, this.ecModel);
  64194. }, e.prototype.getFormattedLabel = function(n, r) {
  64195. var i = this.getRegionModel(n), a = r === "normal" ? i.get(["label", "formatter"]) : i.get(["emphasis", "label", "formatter"]), o = {
  64196. name: n
  64197. };
  64198. if (Me(a))
  64199. return o.status = r, a(o);
  64200. if (Oe(a))
  64201. return a.replace("{a}", n ?? "");
  64202. }, e.prototype.setZoom = function(n) {
  64203. this.option.zoom = n;
  64204. }, e.prototype.setCenter = function(n) {
  64205. this.option.center = n;
  64206. }, e.prototype.select = function(n) {
  64207. var r = this.option, i = r.selectedMode;
  64208. if (i) {
  64209. i !== "multiple" && (r.selectedMap = null);
  64210. var a = r.selectedMap || (r.selectedMap = {});
  64211. a[n] = !0;
  64212. }
  64213. }, e.prototype.unSelect = function(n) {
  64214. var r = this.option.selectedMap;
  64215. r && (r[n] = !1);
  64216. }, e.prototype.toggleSelected = function(n) {
  64217. this[this.isSelected(n) ? "unSelect" : "select"](n);
  64218. }, e.prototype.isSelected = function(n) {
  64219. var r = this.option.selectedMap;
  64220. return !!(r && r[n]);
  64221. }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
  64222. // zlevel: 0,
  64223. z: 0,
  64224. show: !0,
  64225. left: "center",
  64226. top: "center",
  64227. // Default value:
  64228. // for geoSVG source: 1,
  64229. // for geoJSON source: 0.75.
  64230. aspectScale: null,
  64231. // /// Layout with center and size
  64232. // If you want to put map in a fixed size box with right aspect ratio
  64233. // This two properties may be more convenient
  64234. // layoutCenter: [50%, 50%]
  64235. // layoutSize: 100
  64236. silent: !1,
  64237. // Map type
  64238. map: "",
  64239. // Define left-top, right-bottom coords to control view
  64240. // For example, [ [180, 90], [-180, -90] ]
  64241. boundingCoords: null,
  64242. // Default on center of map
  64243. center: null,
  64244. zoom: 1,
  64245. scaleLimit: null,
  64246. // selectedMode: false
  64247. label: {
  64248. show: !1,
  64249. color: "#000"
  64250. },
  64251. itemStyle: {
  64252. borderWidth: 0.5,
  64253. borderColor: "#444"
  64254. // Default color:
  64255. // + geoJSON: #eee
  64256. // + geoSVG: null (use SVG original `fill`)
  64257. // color: '#eee'
  64258. },
  64259. emphasis: {
  64260. label: {
  64261. show: !0,
  64262. color: "rgb(100,0,0)"
  64263. },
  64264. itemStyle: {
  64265. color: "rgba(255,215,0,0.8)"
  64266. }
  64267. },
  64268. select: {
  64269. label: {
  64270. show: !0,
  64271. color: "rgb(100,0,0)"
  64272. },
  64273. itemStyle: {
  64274. color: "rgba(255,215,0,0.8)"
  64275. }
  64276. },
  64277. regions: []
  64278. // tooltip: {
  64279. // show: false
  64280. // }
  64281. }, e;
  64282. }(rt)
  64283. );
  64284. function AF(t, e) {
  64285. return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e);
  64286. }
  64287. function Qk(t, e, n, r) {
  64288. var i = t.getZoom(), a = t.getCenter(), o = e.zoom, s = t.projectedToPoint ? t.projectedToPoint(a) : t.dataToPoint(a);
  64289. if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(AF(t, s), r)), o != null) {
  64290. if (n) {
  64291. var l = n.min || 0, u = n.max || 1 / 0;
  64292. o = Math.max(Math.min(i * o, u), l) / i;
  64293. }
  64294. t.scaleX *= o, t.scaleY *= o;
  64295. var c = (e.originX - t.x) * (o - 1), f = (e.originY - t.y) * (o - 1);
  64296. t.x -= c, t.y -= f, t.updateTransform(), t.setCenter(AF(t, s), r), t.setZoom(o * i);
  64297. }
  64298. return {
  64299. center: t.getCenter(),
  64300. zoom: t.getZoom()
  64301. };
  64302. }
  64303. var jBe = (
  64304. /** @class */
  64305. function(t) {
  64306. q(e, t);
  64307. function e() {
  64308. var n = t !== null && t.apply(this, arguments) || this;
  64309. return n.type = e.type, n.focusBlurEnabled = !0, n;
  64310. }
  64311. return e.prototype.init = function(n, r) {
  64312. this._api = r;
  64313. }, e.prototype.render = function(n, r, i, a) {
  64314. if (this._model = n, !n.get("show")) {
  64315. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  64316. return;
  64317. }
  64318. this._mapDraw || (this._mapDraw = new dne(i));
  64319. var o = this._mapDraw;
  64320. o.draw(n, r, i, this, a), o.group.on("click", this._handleRegionClick, this), o.group.silent = n.get("silent"), this.group.add(o.group), this.updateSelectStatus(n, r, i);
  64321. }, e.prototype._handleRegionClick = function(n) {
  64322. var r;
  64323. Bc(n.target, function(i) {
  64324. return (r = Fe(i).eventData) != null;
  64325. }, !0), r && this._api.dispatchAction({
  64326. type: "geoToggleSelect",
  64327. geoId: this._model.id,
  64328. name: r.name
  64329. });
  64330. }, e.prototype.updateSelectStatus = function(n, r, i) {
  64331. var a = this;
  64332. this._mapDraw.group.traverse(function(o) {
  64333. var s = Fe(o).eventData;
  64334. if (s)
  64335. return a._model.isSelected(s.name) ? i.enterSelect(o) : i.leaveSelect(o), !0;
  64336. });
  64337. }, e.prototype.findHighDownDispatchers = function(n) {
  64338. return this._mapDraw && this._mapDraw.findHighDownDispatchers(n, this._model);
  64339. }, e.prototype.dispose = function() {
  64340. this._mapDraw && this._mapDraw.remove();
  64341. }, e.type = "geo", e;
  64342. }(Xt)
  64343. );
  64344. function ZBe(t, e, n) {
  64345. qs.registerMap(t, e, n);
  64346. }
  64347. function gne(t) {
  64348. t.registerCoordinateSystem("geo", vne), t.registerComponentModel(GBe), t.registerComponentView(jBe), t.registerImpl("registerMap", ZBe), t.registerImpl("getMap", function(n) {
  64349. return qs.getMapForUser(n);
  64350. });
  64351. function e(n, r) {
  64352. r.update = "geo:updateSelectStatus", t.registerAction(r, function(i, a) {
  64353. var o = {}, s = [];
  64354. return a.eachComponent({
  64355. mainType: "geo",
  64356. query: i
  64357. }, function(l) {
  64358. l[n](i.name);
  64359. var u = l.coordinateSystem;
  64360. k(u.regions, function(f) {
  64361. o[f.name] = l.isSelected(f.name) || !1;
  64362. });
  64363. var c = [];
  64364. k(o, function(f, d) {
  64365. o[d] && c.push(d);
  64366. }), s.push({
  64367. geoIndex: l.componentIndex,
  64368. // Use singular, the same naming convention as the event `selectchanged`.
  64369. name: c
  64370. });
  64371. }), {
  64372. selected: o,
  64373. allSelected: s,
  64374. name: i.name
  64375. };
  64376. });
  64377. }
  64378. e("toggleSelected", {
  64379. type: "geoToggleSelect",
  64380. event: "geoselectchanged"
  64381. }), e("select", {
  64382. type: "geoSelect",
  64383. event: "geoselected"
  64384. }), e("unSelect", {
  64385. type: "geoUnSelect",
  64386. event: "geounselected"
  64387. }), t.registerAction({
  64388. type: "geoRoam",
  64389. event: "geoRoam",
  64390. update: "updateTransform"
  64391. }, function(n, r, i) {
  64392. var a = n.componentType || "series";
  64393. r.eachComponent({
  64394. mainType: a,
  64395. query: n
  64396. }, function(o) {
  64397. var s = o.coordinateSystem;
  64398. if (s.type === "geo") {
  64399. var l = Qk(s, n, o.get("scaleLimit"), i);
  64400. o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), a === "series" && k(o.seriesGroup, function(u) {
  64401. u.setCenter(l.center), u.setZoom(l.zoom);
  64402. });
  64403. }
  64404. });
  64405. });
  64406. }
  64407. function UBe(t) {
  64408. at(gne), t.registerChartView(NBe), t.registerSeriesModel(BBe), t.registerLayout(FBe), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, VBe), pee("map", t.registerAction);
  64409. }
  64410. function XBe(t) {
  64411. var e = t;
  64412. e.hierNode = {
  64413. defaultAncestor: null,
  64414. ancestor: e,
  64415. prelim: 0,
  64416. modifier: 0,
  64417. change: 0,
  64418. shift: 0,
  64419. i: 0,
  64420. thread: null
  64421. };
  64422. for (var n = [e], r, i; r = n.pop(); )
  64423. if (i = r.children, r.isExpand && i.length)
  64424. for (var a = i.length, o = a - 1; o >= 0; o--) {
  64425. var s = i[o];
  64426. s.hierNode = {
  64427. defaultAncestor: null,
  64428. ancestor: s,
  64429. prelim: 0,
  64430. modifier: 0,
  64431. change: 0,
  64432. shift: 0,
  64433. i: o,
  64434. thread: null
  64435. }, n.push(s);
  64436. }
  64437. }
  64438. function YBe(t, e) {
  64439. var n = t.isExpand ? t.children : [], r = t.parentNode.children, i = t.hierNode.i ? r[t.hierNode.i - 1] : null;
  64440. if (n.length) {
  64441. JBe(t);
  64442. var a = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
  64443. i ? (t.hierNode.prelim = i.hierNode.prelim + e(t, i), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a;
  64444. } else i && (t.hierNode.prelim = i.hierNode.prelim + e(t, i));
  64445. t.parentNode.hierNode.defaultAncestor = eze(t, i, t.parentNode.hierNode.defaultAncestor || r[0], e);
  64446. }
  64447. function qBe(t) {
  64448. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  64449. t.setLayout({
  64450. x: e
  64451. }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier;
  64452. }
  64453. function EF(t) {
  64454. return arguments.length ? t : rze;
  64455. }
  64456. function Xv(t, e) {
  64457. return t -= Math.PI / 2, {
  64458. x: e * Math.cos(t),
  64459. y: e * Math.sin(t)
  64460. };
  64461. }
  64462. function KBe(t, e) {
  64463. return Rn(t.getBoxLayoutParams(), {
  64464. width: e.getWidth(),
  64465. height: e.getHeight()
  64466. });
  64467. }
  64468. function JBe(t) {
  64469. for (var e = t.children, n = e.length, r = 0, i = 0; --n >= 0; ) {
  64470. var a = e[n];
  64471. a.hierNode.prelim += r, a.hierNode.modifier += r, i += a.hierNode.change, r += a.hierNode.shift + i;
  64472. }
  64473. }
  64474. function eze(t, e, n, r) {
  64475. if (e) {
  64476. for (var i = t, a = t, o = a.parentNode.children[0], s = e, l = i.hierNode.modifier, u = a.hierNode.modifier, c = o.hierNode.modifier, f = s.hierNode.modifier; s = hP(s), a = pP(a), s && a; ) {
  64477. i = hP(i), o = pP(o), i.hierNode.ancestor = t;
  64478. var d = s.hierNode.prelim + f - a.hierNode.prelim - u + r(s, a);
  64479. d > 0 && (nze(tze(s, t, n), t, d), u += d, l += d), f += s.hierNode.modifier, u += a.hierNode.modifier, l += i.hierNode.modifier, c += o.hierNode.modifier;
  64480. }
  64481. s && !hP(i) && (i.hierNode.thread = s, i.hierNode.modifier += f - l), a && !pP(o) && (o.hierNode.thread = a, o.hierNode.modifier += u - c, n = t);
  64482. }
  64483. return n;
  64484. }
  64485. function hP(t) {
  64486. var e = t.children;
  64487. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread;
  64488. }
  64489. function pP(t) {
  64490. var e = t.children;
  64491. return e.length && t.isExpand ? e[0] : t.hierNode.thread;
  64492. }
  64493. function tze(t, e, n) {
  64494. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n;
  64495. }
  64496. function nze(t, e, n) {
  64497. var r = n / (e.hierNode.i - t.hierNode.i);
  64498. e.hierNode.change -= r, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += r;
  64499. }
  64500. function rze(t, e) {
  64501. return t.parentNode === e.parentNode ? 1 : 2;
  64502. }
  64503. var ize = (
  64504. /** @class */
  64505. /* @__PURE__ */ function() {
  64506. function t() {
  64507. this.parentPoint = [], this.childPoints = [];
  64508. }
  64509. return t;
  64510. }()
  64511. ), aze = (
  64512. /** @class */
  64513. function(t) {
  64514. q(e, t);
  64515. function e(n) {
  64516. return t.call(this, n) || this;
  64517. }
  64518. return e.prototype.getDefaultStyle = function() {
  64519. return {
  64520. stroke: "#000",
  64521. fill: null
  64522. };
  64523. }, e.prototype.getDefaultShape = function() {
  64524. return new ize();
  64525. }, e.prototype.buildPath = function(n, r) {
  64526. var i = r.childPoints, a = i.length, o = r.parentPoint, s = i[0], l = i[a - 1];
  64527. if (a === 1) {
  64528. n.moveTo(o[0], o[1]), n.lineTo(s[0], s[1]);
  64529. return;
  64530. }
  64531. var u = r.orient, c = u === "TB" || u === "BT" ? 0 : 1, f = 1 - c, d = _e(r.forkPosition, 1), h = [];
  64532. h[c] = o[c], h[f] = o[f] + (l[f] - o[f]) * d, n.moveTo(o[0], o[1]), n.lineTo(h[0], h[1]), n.moveTo(s[0], s[1]), h[c] = s[c], n.lineTo(h[0], h[1]), h[c] = l[c], n.lineTo(h[0], h[1]), n.lineTo(l[0], l[1]);
  64533. for (var p = 1; p < a - 1; p++) {
  64534. var v = i[p];
  64535. n.moveTo(v[0], v[1]), h[c] = v[c], n.lineTo(h[0], h[1]);
  64536. }
  64537. }, e;
  64538. }(ot)
  64539. ), oze = (
  64540. /** @class */
  64541. function(t) {
  64542. q(e, t);
  64543. function e() {
  64544. var n = t !== null && t.apply(this, arguments) || this;
  64545. return n.type = e.type, n._mainGroup = new Ve(), n;
  64546. }
  64547. return e.prototype.init = function(n, r) {
  64548. this._controller = new K0(r.getZr()), this._controllerHost = {
  64549. target: this.group
  64550. }, this.group.add(this._mainGroup);
  64551. }, e.prototype.render = function(n, r, i) {
  64552. var a = n.getData(), o = n.layoutInfo, s = this._mainGroup, l = n.get("layout");
  64553. l === "radial" ? (s.x = o.x + o.width / 2, s.y = o.y + o.height / 2) : (s.x = o.x, s.y = o.y), this._updateViewCoordSys(n, i), this._updateController(n, r, i);
  64554. var u = this._data;
  64555. a.diff(u).add(function(c) {
  64556. MF(a, c) && IF(a, c, null, s, n);
  64557. }).update(function(c, f) {
  64558. var d = u.getItemGraphicEl(f);
  64559. if (!MF(a, c)) {
  64560. d && RF(u, f, d, s, n);
  64561. return;
  64562. }
  64563. IF(a, c, d, s, n);
  64564. }).remove(function(c) {
  64565. var f = u.getItemGraphicEl(c);
  64566. f && RF(u, c, f, s, n);
  64567. }).execute(), this._nodeScaleRatio = n.get("nodeScaleRatio"), this._updateNodeAndLinkScale(n), n.get("expandAndCollapse") === !0 && a.eachItemGraphicEl(function(c, f) {
  64568. c.off("click").on("click", function() {
  64569. i.dispatchAction({
  64570. type: "treeExpandAndCollapse",
  64571. seriesId: n.id,
  64572. dataIndex: f
  64573. });
  64574. });
  64575. }), this._data = a;
  64576. }, e.prototype._updateViewCoordSys = function(n, r) {
  64577. var i = n.getData(), a = [];
  64578. i.each(function(f) {
  64579. var d = i.getItemLayout(f);
  64580. d && !isNaN(d.x) && !isNaN(d.y) && a.push([+d.x, +d.y]);
  64581. });
  64582. var o = [], s = [];
  64583. jx(a, o, s);
  64584. var l = this._min, u = this._max;
  64585. s[0] - o[0] === 0 && (o[0] = l ? l[0] : o[0] - 1, s[0] = u ? u[0] : s[0] + 1), s[1] - o[1] === 0 && (o[1] = l ? l[1] : o[1] - 1, s[1] = u ? u[1] : s[1] + 1);
  64586. var c = n.coordinateSystem = new J0();
  64587. c.zoomLimit = n.get("scaleLimit"), c.setBoundingRect(o[0], o[1], s[0] - o[0], s[1] - o[1]), c.setCenter(n.get("center"), r), c.setZoom(n.get("zoom")), this.group.attr({
  64588. x: c.x,
  64589. y: c.y,
  64590. scaleX: c.scaleX,
  64591. scaleY: c.scaleY
  64592. }), this._min = o, this._max = s;
  64593. }, e.prototype._updateController = function(n, r, i) {
  64594. var a = this, o = this._controller, s = this._controllerHost, l = this.group;
  64595. o.setPointerChecker(function(u, c, f) {
  64596. var d = l.getBoundingRect();
  64597. return d.applyTransform(l.transform), d.contain(c, f) && !mw(u, i, n);
  64598. }), o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
  64599. Vk(s, u.dx, u.dy), i.dispatchAction({
  64600. seriesId: n.id,
  64601. type: "treeRoam",
  64602. dx: u.dx,
  64603. dy: u.dy
  64604. });
  64605. }).on("zoom", function(u) {
  64606. Fk(s, u.scale, u.originX, u.originY), i.dispatchAction({
  64607. seriesId: n.id,
  64608. type: "treeRoam",
  64609. zoom: u.scale,
  64610. originX: u.originX,
  64611. originY: u.originY
  64612. }), a._updateNodeAndLinkScale(n), i.updateLabelLayout();
  64613. });
  64614. }, e.prototype._updateNodeAndLinkScale = function(n) {
  64615. var r = n.getData(), i = this._getNodeGlobalScale(n);
  64616. r.eachItemGraphicEl(function(a, o) {
  64617. a.setSymbolScale(i);
  64618. });
  64619. }, e.prototype._getNodeGlobalScale = function(n) {
  64620. var r = n.coordinateSystem;
  64621. if (r.type !== "view")
  64622. return 1;
  64623. var i = this._nodeScaleRatio, a = r.scaleX || 1, o = r.getZoom(), s = (o - 1) * i + 1;
  64624. return s / a;
  64625. }, e.prototype.dispose = function() {
  64626. this._controller && this._controller.dispose(), this._controllerHost = null;
  64627. }, e.prototype.remove = function() {
  64628. this._mainGroup.removeAll(), this._data = null;
  64629. }, e.type = "tree", e;
  64630. }(zt)
  64631. );
  64632. function MF(t, e) {
  64633. var n = t.getItemLayout(e);
  64634. return n && !isNaN(n.x) && !isNaN(n.y);
  64635. }
  64636. function IF(t, e, n, r, i) {
  64637. var a = !n, o = t.tree.getNodeByDataIndex(e), s = o.getModel(), l = o.getVisual("style").fill, u = o.isExpand === !1 && o.children.length !== 0 ? l : "#fff", c = t.tree.root, f = o.parentNode === c ? o : o.parentNode || o, d = t.getItemGraphicEl(f.dataIndex), h = f.getLayout(), p = d ? {
  64638. x: d.__oldX,
  64639. y: d.__oldY,
  64640. rawX: d.__radialOldRawX,
  64641. rawY: d.__radialOldRawY
  64642. } : h, v = o.getLayout();
  64643. a ? (n = new j0(t, e, null, {
  64644. symbolInnerColor: u,
  64645. useNameLabel: !0
  64646. }), n.x = p.x, n.y = p.y) : n.updateData(t, e, null, {
  64647. symbolInnerColor: u,
  64648. useNameLabel: !0
  64649. }), n.__radialOldRawX = n.__radialRawX, n.__radialOldRawY = n.__radialRawY, n.__radialRawX = v.rawX, n.__radialRawY = v.rawY, r.add(n), t.setItemGraphicEl(e, n), n.__oldX = n.x, n.__oldY = n.y, Ct(n, {
  64650. x: v.x,
  64651. y: v.y
  64652. }, i);
  64653. var g = n.getSymbolPath();
  64654. if (i.get("layout") === "radial") {
  64655. var m = c.children[0], y = m.getLayout(), b = m.children.length, _ = void 0, O = void 0;
  64656. if (v.x === y.x && o.isExpand === !0 && m.children.length) {
  64657. var S = {
  64658. x: (m.children[0].getLayout().x + m.children[b - 1].getLayout().x) / 2,
  64659. y: (m.children[0].getLayout().y + m.children[b - 1].getLayout().y) / 2
  64660. };
  64661. _ = Math.atan2(S.y - y.y, S.x - y.x), _ < 0 && (_ = Math.PI * 2 + _), O = S.x < y.x, O && (_ = _ - Math.PI);
  64662. } else
  64663. _ = Math.atan2(v.y - y.y, v.x - y.x), _ < 0 && (_ = Math.PI * 2 + _), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (O = v.x < y.x, O && (_ = _ - Math.PI)) : (O = v.x > y.x, O || (_ = _ - Math.PI));
  64664. var x = O ? "left" : "right", C = s.getModel("label"), T = C.get("rotate"), w = T * (Math.PI / 180), P = g.getTextContent();
  64665. P && (g.setTextConfig({
  64666. position: C.get("position") || x,
  64667. rotation: T == null ? -_ : w,
  64668. origin: "center"
  64669. }), P.setStyle("verticalAlign", "middle"));
  64670. }
  64671. var $ = s.get(["emphasis", "focus"]), A = $ === "relative" ? gm(o.getAncestorsIndices(), o.getDescendantIndices()) : $ === "ancestor" ? o.getAncestorsIndices() : $ === "descendant" ? o.getDescendantIndices() : null;
  64672. A && (Fe(n).focus = A), sze(i, o, c, n, p, h, v, r), n.__edge && (n.onHoverStateChange = function(D) {
  64673. if (D !== "blur") {
  64674. var E = o.parentNode && t.getItemGraphicEl(o.parentNode.dataIndex);
  64675. E && E.hoverState === B0 || oO(n.__edge, D);
  64676. }
  64677. });
  64678. }
  64679. function sze(t, e, n, r, i, a, o, s) {
  64680. var l = e.getModel(), u = t.get("edgeShape"), c = t.get("layout"), f = t.getOrient(), d = t.get(["lineStyle", "curveness"]), h = t.get("edgeForkPosition"), p = l.getModel("lineStyle").getLineStyle(), v = r.__edge;
  64681. if (u === "curve")
  64682. e.parentNode && e.parentNode !== n && (v || (v = r.__edge = new V0({
  64683. shape: vE(c, f, d, i, i)
  64684. })), Ct(v, {
  64685. shape: vE(c, f, d, a, o)
  64686. }, t));
  64687. else if (u === "polyline") {
  64688. if (c === "orthogonal") {
  64689. if (e !== n && e.children && e.children.length !== 0 && e.isExpand === !0) {
  64690. for (var g = e.children, m = [], y = 0; y < g.length; y++) {
  64691. var b = g[y].getLayout();
  64692. m.push([b.x, b.y]);
  64693. }
  64694. v || (v = r.__edge = new aze({
  64695. shape: {
  64696. parentPoint: [o.x, o.y],
  64697. childPoints: [[o.x, o.y]],
  64698. orient: f,
  64699. forkPosition: h
  64700. }
  64701. })), Ct(v, {
  64702. shape: {
  64703. parentPoint: [o.x, o.y],
  64704. childPoints: m
  64705. }
  64706. }, t);
  64707. }
  64708. } else if (process.env.NODE_ENV !== "production")
  64709. throw new Error("The polyline edgeShape can only be used in orthogonal layout");
  64710. }
  64711. v && !(u === "polyline" && !e.isExpand) && (v.useStyle(Re({
  64712. strokeNoScale: !0,
  64713. fill: null
  64714. }, p)), Tr(v, l, "lineStyle"), bf(v), s.add(v));
  64715. }
  64716. function DF(t, e, n, r, i) {
  64717. var a = e.tree.root, o = mne(a, t), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(t.dataIndex);
  64718. if (u) {
  64719. var c = e.getItemGraphicEl(s.dataIndex), f = c.__edge, d = u.__edge || (s.isExpand === !1 || s.children.length === 1 ? f : void 0), h = r.get("edgeShape"), p = r.get("layout"), v = r.get("orient"), g = r.get(["lineStyle", "curveness"]);
  64720. d && (h === "curve" ? uu(d, {
  64721. shape: vE(p, v, g, l, l),
  64722. style: {
  64723. opacity: 0
  64724. }
  64725. }, r, {
  64726. cb: function() {
  64727. n.remove(d);
  64728. },
  64729. removeOpt: i
  64730. }) : h === "polyline" && r.get("layout") === "orthogonal" && uu(d, {
  64731. shape: {
  64732. parentPoint: [l.x, l.y],
  64733. childPoints: [[l.x, l.y]]
  64734. },
  64735. style: {
  64736. opacity: 0
  64737. }
  64738. }, r, {
  64739. cb: function() {
  64740. n.remove(d);
  64741. },
  64742. removeOpt: i
  64743. }));
  64744. }
  64745. }
  64746. function mne(t, e) {
  64747. for (var n = e.parentNode === t ? e : e.parentNode || e, r; r = n.getLayout(), r == null; )
  64748. n = n.parentNode === t ? n : n.parentNode || n;
  64749. return {
  64750. source: n,
  64751. sourceLayout: r
  64752. };
  64753. }
  64754. function RF(t, e, n, r, i) {
  64755. var a = t.tree.getNodeByDataIndex(e), o = t.tree.root, s = mne(o, a).sourceLayout, l = {
  64756. duration: i.get("animationDurationUpdate"),
  64757. easing: i.get("animationEasingUpdate")
  64758. };
  64759. uu(n, {
  64760. x: s.x + 1,
  64761. y: s.y + 1
  64762. }, i, {
  64763. cb: function() {
  64764. r.remove(n), t.setItemGraphicEl(e, null);
  64765. },
  64766. removeOpt: l
  64767. }), n.fadeOut(null, t.hostModel, {
  64768. fadeLabel: !0,
  64769. animation: l
  64770. }), a.children.forEach(function(u) {
  64771. DF(u, t, r, i, l);
  64772. }), DF(a, t, r, i, l);
  64773. }
  64774. function vE(t, e, n, r, i) {
  64775. var a, o, s, l, u, c, f, d;
  64776. if (t === "radial") {
  64777. u = r.rawX, f = r.rawY, c = i.rawX, d = i.rawY;
  64778. var h = Xv(u, f), p = Xv(u, f + (d - f) * n), v = Xv(c, d + (f - d) * n), g = Xv(c, d);
  64779. return {
  64780. x1: h.x || 0,
  64781. y1: h.y || 0,
  64782. x2: g.x || 0,
  64783. y2: g.y || 0,
  64784. cpx1: p.x || 0,
  64785. cpy1: p.y || 0,
  64786. cpx2: v.x || 0,
  64787. cpy2: v.y || 0
  64788. };
  64789. } else
  64790. u = r.x, f = r.y, c = i.x, d = i.y, (e === "LR" || e === "RL") && (a = u + (c - u) * n, o = f, s = c + (u - c) * n, l = d), (e === "TB" || e === "BT") && (a = u, o = f + (d - f) * n, s = c, l = d + (f - d) * n);
  64791. return {
  64792. x1: u,
  64793. y1: f,
  64794. x2: c,
  64795. y2: d,
  64796. cpx1: a,
  64797. cpy1: o,
  64798. cpx2: s,
  64799. cpy2: l
  64800. };
  64801. }
  64802. var Sa = bt();
  64803. function yne(t) {
  64804. var e = t.mainData, n = t.datas;
  64805. n || (n = {
  64806. main: e
  64807. }, t.datasAttr = {
  64808. main: "data"
  64809. }), t.datas = t.mainData = null, bne(e, n, t), k(n, function(r) {
  64810. k(e.TRANSFERABLE_METHODS, function(i) {
  64811. r.wrapMethod(i, Ue(lze, t));
  64812. });
  64813. }), e.wrapMethod("cloneShallow", Ue(cze, t)), k(e.CHANGABLE_METHODS, function(r) {
  64814. e.wrapMethod(r, Ue(uze, t));
  64815. }), ke(n[e.dataType] === e);
  64816. }
  64817. function lze(t, e) {
  64818. if (hze(this)) {
  64819. var n = le({}, Sa(this).datas);
  64820. n[this.dataType] = e, bne(e, n, t);
  64821. } else
  64822. Hk(e, this.dataType, Sa(this).mainData, t);
  64823. return e;
  64824. }
  64825. function uze(t, e) {
  64826. return t.struct && t.struct.update(), e;
  64827. }
  64828. function cze(t, e) {
  64829. return k(Sa(e).datas, function(n, r) {
  64830. n !== e && Hk(n.cloneShallow(), r, e, t);
  64831. }), e;
  64832. }
  64833. function fze(t) {
  64834. var e = Sa(this).mainData;
  64835. return t == null || e == null ? e : Sa(e).datas[t];
  64836. }
  64837. function dze() {
  64838. var t = Sa(this).mainData;
  64839. return t == null ? [{
  64840. data: t
  64841. }] : ce(st(Sa(t).datas), function(e) {
  64842. return {
  64843. type: e,
  64844. data: Sa(t).datas[e]
  64845. };
  64846. });
  64847. }
  64848. function hze(t) {
  64849. return Sa(t).mainData === t;
  64850. }
  64851. function bne(t, e, n) {
  64852. Sa(t).datas = {}, k(e, function(r, i) {
  64853. Hk(r, i, t, n);
  64854. });
  64855. }
  64856. function Hk(t, e, n, r) {
  64857. Sa(n).datas[e] = t, Sa(t).mainData = n, t.dataType = e, r.struct && (t[r.structAttr] = r.struct, r.struct[r.datasAttr[e]] = t), t.getLinkedData = fze, t.getLinkedDataAll = dze;
  64858. }
  64859. var pze = (
  64860. /** @class */
  64861. function() {
  64862. function t(e, n) {
  64863. this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = n;
  64864. }
  64865. return t.prototype.isRemoved = function() {
  64866. return this.dataIndex < 0;
  64867. }, t.prototype.eachNode = function(e, n, r) {
  64868. Me(e) && (r = n, n = e, e = null), e = e || {}, Oe(e) && (e = {
  64869. order: e
  64870. });
  64871. var i = e.order || "preorder", a = this[e.attr || "children"], o;
  64872. i === "preorder" && (o = n.call(r, this));
  64873. for (var s = 0; !o && s < a.length; s++)
  64874. a[s].eachNode(e, n, r);
  64875. i === "postorder" && n.call(r, this);
  64876. }, t.prototype.updateDepthAndHeight = function(e) {
  64877. var n = 0;
  64878. this.depth = e;
  64879. for (var r = 0; r < this.children.length; r++) {
  64880. var i = this.children[r];
  64881. i.updateDepthAndHeight(e + 1), i.height > n && (n = i.height);
  64882. }
  64883. this.height = n + 1;
  64884. }, t.prototype.getNodeById = function(e) {
  64885. if (this.getId() === e)
  64886. return this;
  64887. for (var n = 0, r = this.children, i = r.length; n < i; n++) {
  64888. var a = r[n].getNodeById(e);
  64889. if (a)
  64890. return a;
  64891. }
  64892. }, t.prototype.contains = function(e) {
  64893. if (e === this)
  64894. return !0;
  64895. for (var n = 0, r = this.children, i = r.length; n < i; n++) {
  64896. var a = r[n].contains(e);
  64897. if (a)
  64898. return a;
  64899. }
  64900. }, t.prototype.getAncestors = function(e) {
  64901. for (var n = [], r = e ? this : this.parentNode; r; )
  64902. n.push(r), r = r.parentNode;
  64903. return n.reverse(), n;
  64904. }, t.prototype.getAncestorsIndices = function() {
  64905. for (var e = [], n = this; n; )
  64906. e.push(n.dataIndex), n = n.parentNode;
  64907. return e.reverse(), e;
  64908. }, t.prototype.getDescendantIndices = function() {
  64909. var e = [];
  64910. return this.eachNode(function(n) {
  64911. e.push(n.dataIndex);
  64912. }), e;
  64913. }, t.prototype.getValue = function(e) {
  64914. var n = this.hostTree.data;
  64915. return n.getStore().get(n.getDimensionIndex(e || "value"), this.dataIndex);
  64916. }, t.prototype.setLayout = function(e, n) {
  64917. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, n);
  64918. }, t.prototype.getLayout = function() {
  64919. return this.hostTree.data.getItemLayout(this.dataIndex);
  64920. }, t.prototype.getModel = function(e) {
  64921. if (!(this.dataIndex < 0)) {
  64922. var n = this.hostTree, r = n.data.getItemModel(this.dataIndex);
  64923. return r.getModel(e);
  64924. }
  64925. }, t.prototype.getLevelModel = function() {
  64926. return (this.hostTree.levelModels || [])[this.depth];
  64927. }, t.prototype.setVisual = function(e, n) {
  64928. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, n);
  64929. }, t.prototype.getVisual = function(e) {
  64930. return this.hostTree.data.getItemVisual(this.dataIndex, e);
  64931. }, t.prototype.getRawIndex = function() {
  64932. return this.hostTree.data.getRawIndex(this.dataIndex);
  64933. }, t.prototype.getId = function() {
  64934. return this.hostTree.data.getId(this.dataIndex);
  64935. }, t.prototype.getChildIndex = function() {
  64936. if (this.parentNode) {
  64937. for (var e = this.parentNode.children, n = 0; n < e.length; ++n)
  64938. if (e[n] === this)
  64939. return n;
  64940. return -1;
  64941. }
  64942. return -1;
  64943. }, t.prototype.isAncestorOf = function(e) {
  64944. for (var n = e.parentNode; n; ) {
  64945. if (n === this)
  64946. return !0;
  64947. n = n.parentNode;
  64948. }
  64949. return !1;
  64950. }, t.prototype.isDescendantOf = function(e) {
  64951. return e !== this && e.isAncestorOf(this);
  64952. }, t;
  64953. }()
  64954. ), Gk = (
  64955. /** @class */
  64956. function() {
  64957. function t(e) {
  64958. this.type = "tree", this._nodes = [], this.hostModel = e;
  64959. }
  64960. return t.prototype.eachNode = function(e, n, r) {
  64961. this.root.eachNode(e, n, r);
  64962. }, t.prototype.getNodeByDataIndex = function(e) {
  64963. var n = this.data.getRawIndex(e);
  64964. return this._nodes[n];
  64965. }, t.prototype.getNodeById = function(e) {
  64966. return this.root.getNodeById(e);
  64967. }, t.prototype.update = function() {
  64968. for (var e = this.data, n = this._nodes, r = 0, i = n.length; r < i; r++)
  64969. n[r].dataIndex = -1;
  64970. for (var r = 0, i = e.count(); r < i; r++)
  64971. n[e.getRawIndex(r)].dataIndex = r;
  64972. }, t.prototype.clearLayouts = function() {
  64973. this.data.clearItemLayouts();
  64974. }, t.createTree = function(e, n, r) {
  64975. var i = new t(n), a = [], o = 1;
  64976. s(e);
  64977. function s(c, f) {
  64978. var d = c.value;
  64979. o = Math.max(o, ue(d) ? d.length : 1), a.push(c);
  64980. var h = new pze(Vn(c.name, ""), i);
  64981. f ? vze(h, f) : i.root = h, i._nodes.push(h);
  64982. var p = c.children;
  64983. if (p)
  64984. for (var v = 0; v < p.length; v++)
  64985. s(p[v], h);
  64986. }
  64987. i.root.updateDepthAndHeight(0);
  64988. var l = wp(a, {
  64989. coordDimensions: ["value"],
  64990. dimensionsCount: o
  64991. }).dimensions, u = new Lr(l, n);
  64992. return u.initData(a), r && r(u), yne({
  64993. mainData: u,
  64994. struct: i,
  64995. structAttr: "tree"
  64996. }), i.update(), i;
  64997. }, t;
  64998. }()
  64999. );
  65000. function vze(t, e) {
  65001. var n = e.children;
  65002. t.parentNode !== e && (n.push(t), t.parentNode = e);
  65003. }
  65004. function Lm(t, e, n) {
  65005. if (t && et(e, t.type) >= 0) {
  65006. var r = n.getData().tree.root, i = t.targetNode;
  65007. if (Oe(i) && (i = r.getNodeById(i)), i && r.contains(i))
  65008. return {
  65009. node: i
  65010. };
  65011. var a = t.targetNodeId;
  65012. if (a != null && (i = r.getNodeById(a)))
  65013. return {
  65014. node: i
  65015. };
  65016. }
  65017. }
  65018. function _ne(t) {
  65019. for (var e = []; t; )
  65020. t = t.parentNode, t && e.push(t);
  65021. return e.reverse();
  65022. }
  65023. function jk(t, e) {
  65024. var n = _ne(t);
  65025. return et(n, e) >= 0;
  65026. }
  65027. function bw(t, e) {
  65028. for (var n = []; t; ) {
  65029. var r = t.dataIndex;
  65030. n.push({
  65031. name: t.name,
  65032. dataIndex: r,
  65033. value: e.getRawValue(r)
  65034. }), t = t.parentNode;
  65035. }
  65036. return n.reverse(), n;
  65037. }
  65038. var gze = (
  65039. /** @class */
  65040. function(t) {
  65041. q(e, t);
  65042. function e() {
  65043. var n = t !== null && t.apply(this, arguments) || this;
  65044. return n.hasSymbolVisual = !0, n.ignoreStyleOnData = !0, n;
  65045. }
  65046. return e.prototype.getInitialData = function(n) {
  65047. var r = {
  65048. name: n.name,
  65049. children: n.data
  65050. }, i = n.leaves || {}, a = new Wt(i, this, this.ecModel), o = Gk.createTree(r, this, s);
  65051. function s(f) {
  65052. f.wrapMethod("getItemModel", function(d, h) {
  65053. var p = o.getNodeByDataIndex(h);
  65054. return p && p.children.length && p.isExpand || (d.parentModel = a), d;
  65055. });
  65056. }
  65057. var l = 0;
  65058. o.eachNode("preorder", function(f) {
  65059. f.depth > l && (l = f.depth);
  65060. });
  65061. var u = n.expandAndCollapse, c = u && n.initialTreeDepth >= 0 ? n.initialTreeDepth : l;
  65062. return o.root.eachNode("preorder", function(f) {
  65063. var d = f.hostTree.data.getRawDataItem(f.dataIndex);
  65064. f.isExpand = d && d.collapsed != null ? !d.collapsed : f.depth <= c;
  65065. }), o.data;
  65066. }, e.prototype.getOrient = function() {
  65067. var n = this.get("orient");
  65068. return n === "horizontal" ? n = "LR" : n === "vertical" && (n = "TB"), n;
  65069. }, e.prototype.setZoom = function(n) {
  65070. this.option.zoom = n;
  65071. }, e.prototype.setCenter = function(n) {
  65072. this.option.center = n;
  65073. }, e.prototype.formatTooltip = function(n, r, i) {
  65074. for (var a = this.getData().tree, o = a.root.children[0], s = a.getNodeByDataIndex(n), l = s.getValue(), u = s.name; s && s !== o; )
  65075. u = s.parentNode.name + "." + u, s = s.parentNode;
  65076. return tr("nameValue", {
  65077. name: u,
  65078. value: l,
  65079. noValue: isNaN(l) || l == null
  65080. });
  65081. }, e.prototype.getDataParams = function(n) {
  65082. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  65083. return r.treeAncestors = bw(i, this), r.collapsed = !i.isExpand, r;
  65084. }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
  65085. // zlevel: 0,
  65086. z: 2,
  65087. coordinateSystem: "view",
  65088. // the position of the whole view
  65089. left: "12%",
  65090. top: "12%",
  65091. right: "12%",
  65092. bottom: "12%",
  65093. // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'
  65094. layout: "orthogonal",
  65095. // value can be 'polyline'
  65096. edgeShape: "curve",
  65097. edgeForkPosition: "50%",
  65098. // true | false | 'move' | 'scale', see module:component/helper/RoamController.
  65099. roam: !1,
  65100. // Symbol size scale ratio in roam
  65101. nodeScaleRatio: 0.4,
  65102. // Default on center of graph
  65103. center: null,
  65104. zoom: 1,
  65105. orient: "LR",
  65106. symbol: "emptyCircle",
  65107. symbolSize: 7,
  65108. expandAndCollapse: !0,
  65109. initialTreeDepth: 2,
  65110. lineStyle: {
  65111. color: "#ccc",
  65112. width: 1.5,
  65113. curveness: 0.5
  65114. },
  65115. itemStyle: {
  65116. color: "lightsteelblue",
  65117. // borderColor: '#c23531',
  65118. borderWidth: 1.5
  65119. },
  65120. label: {
  65121. show: !0
  65122. },
  65123. animationEasing: "linear",
  65124. animationDuration: 700,
  65125. animationDurationUpdate: 500
  65126. }, e;
  65127. }(Ht)
  65128. );
  65129. function mze(t, e, n) {
  65130. for (var r = [t], i = [], a; a = r.pop(); )
  65131. if (i.push(a), a.isExpand) {
  65132. var o = a.children;
  65133. if (o.length)
  65134. for (var s = 0; s < o.length; s++)
  65135. r.push(o[s]);
  65136. }
  65137. for (; a = i.pop(); )
  65138. e(a, n);
  65139. }
  65140. function yv(t, e) {
  65141. for (var n = [t], r; r = n.pop(); )
  65142. if (e(r), r.isExpand) {
  65143. var i = r.children;
  65144. if (i.length)
  65145. for (var a = i.length - 1; a >= 0; a--)
  65146. n.push(i[a]);
  65147. }
  65148. }
  65149. function yze(t, e) {
  65150. t.eachSeriesByType("tree", function(n) {
  65151. bze(n, e);
  65152. });
  65153. }
  65154. function bze(t, e) {
  65155. var n = KBe(t, e);
  65156. t.layoutInfo = n;
  65157. var r = t.get("layout"), i = 0, a = 0, o = null;
  65158. r === "radial" ? (i = 2 * Math.PI, a = Math.min(n.height, n.width) / 2, o = EF(function(b, _) {
  65159. return (b.parentNode === _.parentNode ? 1 : 2) / b.depth;
  65160. })) : (i = n.width, a = n.height, o = EF());
  65161. var s = t.getData().tree.root, l = s.children[0];
  65162. if (l) {
  65163. XBe(s), mze(l, YBe, o), s.hierNode.modifier = -l.hierNode.prelim, yv(l, qBe);
  65164. var u = l, c = l, f = l;
  65165. yv(l, function(b) {
  65166. var _ = b.getLayout().x;
  65167. _ < u.getLayout().x && (u = b), _ > c.getLayout().x && (c = b), b.depth > f.depth && (f = b);
  65168. });
  65169. var d = u === c ? 1 : o(u, c) / 2, h = d - u.getLayout().x, p = 0, v = 0, g = 0, m = 0;
  65170. if (r === "radial")
  65171. p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), yv(l, function(b) {
  65172. g = (b.getLayout().x + h) * p, m = (b.depth - 1) * v;
  65173. var _ = Xv(g, m);
  65174. b.setLayout({
  65175. x: _.x,
  65176. y: _.y,
  65177. rawX: g,
  65178. rawY: m
  65179. }, !0);
  65180. });
  65181. else {
  65182. var y = t.getOrient();
  65183. y === "RL" || y === "LR" ? (v = a / (c.getLayout().x + d + h), p = i / (f.depth - 1 || 1), yv(l, function(b) {
  65184. m = (b.getLayout().x + h) * v, g = y === "LR" ? (b.depth - 1) * p : i - (b.depth - 1) * p, b.setLayout({
  65185. x: g,
  65186. y: m
  65187. }, !0);
  65188. })) : (y === "TB" || y === "BT") && (p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), yv(l, function(b) {
  65189. g = (b.getLayout().x + h) * p, m = y === "TB" ? (b.depth - 1) * v : a - (b.depth - 1) * v, b.setLayout({
  65190. x: g,
  65191. y: m
  65192. }, !0);
  65193. }));
  65194. }
  65195. }
  65196. }
  65197. function _ze(t) {
  65198. t.eachSeriesByType("tree", function(e) {
  65199. var n = e.getData(), r = n.tree;
  65200. r.eachNode(function(i) {
  65201. var a = i.getModel(), o = a.getModel("itemStyle").getItemStyle(), s = n.ensureUniqueItemVisual(i.dataIndex, "style");
  65202. le(s, o);
  65203. });
  65204. });
  65205. }
  65206. function Oze(t) {
  65207. t.registerAction({
  65208. type: "treeExpandAndCollapse",
  65209. event: "treeExpandAndCollapse",
  65210. update: "update"
  65211. }, function(e, n) {
  65212. n.eachComponent({
  65213. mainType: "series",
  65214. subType: "tree",
  65215. query: e
  65216. }, function(r) {
  65217. var i = e.dataIndex, a = r.getData().tree, o = a.getNodeByDataIndex(i);
  65218. o.isExpand = !o.isExpand;
  65219. });
  65220. }), t.registerAction({
  65221. type: "treeRoam",
  65222. event: "treeRoam",
  65223. // Here we set 'none' instead of 'update', because roam action
  65224. // just need to update the transform matrix without having to recalculate
  65225. // the layout. So don't need to go through the whole update process, such
  65226. // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
  65227. update: "none"
  65228. }, function(e, n, r) {
  65229. n.eachComponent({
  65230. mainType: "series",
  65231. subType: "tree",
  65232. query: e
  65233. }, function(i) {
  65234. var a = i.coordinateSystem, o = Qk(a, e, void 0, r);
  65235. i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
  65236. });
  65237. });
  65238. }
  65239. function Sze(t) {
  65240. t.registerChartView(oze), t.registerSeriesModel(gze), t.registerLayout(yze), t.registerVisual(_ze), Oze(t);
  65241. }
  65242. var kF = ["treemapZoomToNode", "treemapRender", "treemapMove"];
  65243. function xze(t) {
  65244. for (var e = 0; e < kF.length; e++)
  65245. t.registerAction({
  65246. type: kF[e],
  65247. update: "updateView"
  65248. }, On);
  65249. t.registerAction({
  65250. type: "treemapRootToNode",
  65251. update: "updateView"
  65252. }, function(n, r) {
  65253. r.eachComponent({
  65254. mainType: "series",
  65255. subType: "treemap",
  65256. query: n
  65257. }, i);
  65258. function i(a, o) {
  65259. var s = ["treemapZoomToNode", "treemapRootToNode"], l = Lm(n, s, a);
  65260. if (l) {
  65261. var u = a.getViewRoot();
  65262. u && (n.direction = jk(u, l.node) ? "rollUp" : "drillDown"), a.resetViewRoot(l.node);
  65263. }
  65264. }
  65265. });
  65266. }
  65267. function One(t) {
  65268. var e = t.getData(), n = e.tree, r = {};
  65269. n.eachNode(function(i) {
  65270. for (var a = i; a && a.depth > 1; )
  65271. a = a.parentNode;
  65272. var o = QA(t.ecModel, a.name || a.dataIndex + "", r);
  65273. i.setVisual("decal", o);
  65274. });
  65275. }
  65276. var wze = (
  65277. /** @class */
  65278. function(t) {
  65279. q(e, t);
  65280. function e() {
  65281. var n = t !== null && t.apply(this, arguments) || this;
  65282. return n.type = e.type, n.preventUsingHoverLayer = !0, n;
  65283. }
  65284. return e.prototype.getInitialData = function(n, r) {
  65285. var i = {
  65286. name: n.name,
  65287. children: n.data
  65288. };
  65289. Sne(i);
  65290. var a = n.levels || [], o = this.designatedVisualItemStyle = {}, s = new Wt({
  65291. itemStyle: o
  65292. }, this, r);
  65293. a = n.levels = Cze(a, r);
  65294. var l = ce(a || [], function(f) {
  65295. return new Wt(f, s, r);
  65296. }, this), u = Gk.createTree(i, this, c);
  65297. function c(f) {
  65298. f.wrapMethod("getItemModel", function(d, h) {
  65299. var p = u.getNodeByDataIndex(h), v = p ? l[p.depth] : null;
  65300. return d.parentModel = v || s, d;
  65301. });
  65302. }
  65303. return u.data;
  65304. }, e.prototype.optionUpdated = function() {
  65305. this.resetViewRoot();
  65306. }, e.prototype.formatTooltip = function(n, r, i) {
  65307. var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
  65308. return tr("nameValue", {
  65309. name: s,
  65310. value: o
  65311. });
  65312. }, e.prototype.getDataParams = function(n) {
  65313. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  65314. return r.treeAncestors = bw(i, this), r.treePathInfo = r.treeAncestors, r;
  65315. }, e.prototype.setLayoutInfo = function(n) {
  65316. this.layoutInfo = this.layoutInfo || {}, le(this.layoutInfo, n);
  65317. }, e.prototype.mapIdToIndex = function(n) {
  65318. var r = this._idIndexMap;
  65319. r || (r = this._idIndexMap = Pe(), this._idIndexMapCount = 0);
  65320. var i = r.get(n);
  65321. return i == null && r.set(n, i = this._idIndexMapCount++), i;
  65322. }, e.prototype.getViewRoot = function() {
  65323. return this._viewRoot;
  65324. }, e.prototype.resetViewRoot = function(n) {
  65325. n ? this._viewRoot = n : n = this._viewRoot;
  65326. var r = this.getRawData().tree.root;
  65327. (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
  65328. }, e.prototype.enableAriaDecal = function() {
  65329. One(this);
  65330. }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
  65331. // Disable progressive rendering
  65332. progressive: 0,
  65333. // size: ['80%', '80%'], // deprecated, compatible with ec2.
  65334. left: "center",
  65335. top: "middle",
  65336. width: "80%",
  65337. height: "80%",
  65338. sort: !0,
  65339. clipWindow: "origin",
  65340. squareRatio: 0.5 * (1 + Math.sqrt(5)),
  65341. leafDepth: null,
  65342. drillDownIcon: "▶",
  65343. // to align specialized icon. ▷▶❒❐▼✚
  65344. zoomToNodeRatio: 0.32 * 0.32,
  65345. scaleLimit: null,
  65346. roam: !0,
  65347. nodeClick: "zoomToNode",
  65348. animation: !0,
  65349. animationDurationUpdate: 900,
  65350. animationEasing: "quinticInOut",
  65351. breadcrumb: {
  65352. show: !0,
  65353. height: 22,
  65354. left: "center",
  65355. top: "bottom",
  65356. // right
  65357. // bottom
  65358. emptyItemWidth: 25,
  65359. itemStyle: {
  65360. color: "rgba(0,0,0,0.7)",
  65361. textStyle: {
  65362. color: "#fff"
  65363. }
  65364. },
  65365. emphasis: {
  65366. itemStyle: {
  65367. color: "rgba(0,0,0,0.9)"
  65368. // '#5793f3',
  65369. }
  65370. }
  65371. },
  65372. label: {
  65373. show: !0,
  65374. // Do not use textDistance, for ellipsis rect just the same as treemap node rect.
  65375. distance: 0,
  65376. padding: 5,
  65377. position: "inside",
  65378. // formatter: null,
  65379. color: "#fff",
  65380. overflow: "truncate"
  65381. // align
  65382. // verticalAlign
  65383. },
  65384. upperLabel: {
  65385. show: !1,
  65386. position: [0, "50%"],
  65387. height: 20,
  65388. // formatter: null,
  65389. // color: '#fff',
  65390. overflow: "truncate",
  65391. // align: null,
  65392. verticalAlign: "middle"
  65393. },
  65394. itemStyle: {
  65395. color: null,
  65396. colorAlpha: null,
  65397. colorSaturation: null,
  65398. borderWidth: 0,
  65399. gapWidth: 0,
  65400. borderColor: "#fff",
  65401. borderColorSaturation: null
  65402. // If specified, borderColor will be ineffective, and the
  65403. // border color is evaluated by color of current node and
  65404. // borderColorSaturation.
  65405. },
  65406. emphasis: {
  65407. upperLabel: {
  65408. show: !0,
  65409. position: [0, "50%"],
  65410. overflow: "truncate",
  65411. verticalAlign: "middle"
  65412. }
  65413. },
  65414. visualDimension: 0,
  65415. visualMin: null,
  65416. visualMax: null,
  65417. color: [],
  65418. // level[n].color (if necessary).
  65419. // + Specify color list of each level. level[0].color would be global
  65420. // color list if not specified. (see method `setDefault`).
  65421. // + But set as a empty array to forbid fetch color from global palette
  65422. // when using nodeModel.get('color'), otherwise nodes on deep level
  65423. // will always has color palette set and are not able to inherit color
  65424. // from parent node.
  65425. // + TreemapSeries.color can not be set as 'none', otherwise effect
  65426. // legend color fetching (see seriesColor.js).
  65427. colorAlpha: null,
  65428. colorSaturation: null,
  65429. colorMappingBy: "index",
  65430. visibleMin: 10,
  65431. // be rendered. Only works when sort is 'asc' or 'desc'.
  65432. childrenVisibleMin: null,
  65433. // grandchildren will not show.
  65434. // Why grandchildren? If not grandchildren but children,
  65435. // some siblings show children and some not,
  65436. // the appearance may be mess and not consistent,
  65437. levels: []
  65438. // Each item: {
  65439. // visibleMin, itemStyle, visualDimension, label
  65440. // }
  65441. }, e;
  65442. }(Ht)
  65443. );
  65444. function Sne(t) {
  65445. var e = 0;
  65446. k(t.children, function(r) {
  65447. Sne(r);
  65448. var i = r.value;
  65449. ue(i) && (i = i[0]), e += i;
  65450. });
  65451. var n = t.value;
  65452. ue(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), ue(t.value) ? t.value[0] = n : t.value = n;
  65453. }
  65454. function Cze(t, e) {
  65455. var n = Qt(e.get("color")), r = Qt(e.get(["aria", "decal", "decals"]));
  65456. if (n) {
  65457. t = t || [];
  65458. var i, a;
  65459. k(t, function(s) {
  65460. var l = new Wt(s), u = l.get("color"), c = l.get("decal");
  65461. (l.get(["itemStyle", "color"]) || u && u !== "none") && (i = !0), (l.get(["itemStyle", "decal"]) || c && c !== "none") && (a = !0);
  65462. });
  65463. var o = t[0] || (t[0] = {});
  65464. return i || (o.color = n.slice()), !a && r && (o.decal = r.slice()), t;
  65465. }
  65466. }
  65467. var Tze = 8, LF = 8, vP = 5, Pze = (
  65468. /** @class */
  65469. function() {
  65470. function t(e) {
  65471. this.group = new Ve(), e.add(this.group);
  65472. }
  65473. return t.prototype.render = function(e, n, r, i) {
  65474. var a = e.getModel("breadcrumb"), o = this.group;
  65475. if (o.removeAll(), !(!a.get("show") || !r)) {
  65476. var s = a.getModel("itemStyle"), l = a.getModel("emphasis"), u = s.getModel("textStyle"), c = l.getModel(["itemStyle", "textStyle"]), f = {
  65477. pos: {
  65478. left: a.get("left"),
  65479. right: a.get("right"),
  65480. top: a.get("top"),
  65481. bottom: a.get("bottom")
  65482. },
  65483. box: {
  65484. width: n.getWidth(),
  65485. height: n.getHeight()
  65486. },
  65487. emptyItemWidth: a.get("emptyItemWidth"),
  65488. totalWidth: 0,
  65489. renderList: []
  65490. };
  65491. this._prepare(r, f, u), this._renderContent(e, f, s, l, u, c, i), aw(o, f.pos, f.box);
  65492. }
  65493. }, t.prototype._prepare = function(e, n, r) {
  65494. for (var i = e; i; i = i.parentNode) {
  65495. var a = Vn(i.getModel().get("name"), ""), o = r.getTextRect(a), s = Math.max(o.width + Tze * 2, n.emptyItemWidth);
  65496. n.totalWidth += s + LF, n.renderList.push({
  65497. node: i,
  65498. text: a,
  65499. width: s
  65500. });
  65501. }
  65502. }, t.prototype._renderContent = function(e, n, r, i, a, o, s) {
  65503. for (var l = 0, u = n.emptyItemWidth, c = e.get(["breadcrumb", "height"]), f = gLe(n.pos, n.box), d = n.totalWidth, h = n.renderList, p = i.getModel("itemStyle").getItemStyle(), v = h.length - 1; v >= 0; v--) {
  65504. var g = h[v], m = g.node, y = g.width, b = g.text;
  65505. d > f.width && (d -= y - u, y = u, b = null);
  65506. var _ = new ii({
  65507. shape: {
  65508. points: $ze(l, 0, y, c, v === h.length - 1, v === 0)
  65509. },
  65510. style: Re(r.getItemStyle(), {
  65511. lineJoin: "bevel"
  65512. }),
  65513. textContent: new gt({
  65514. style: Zt(a, {
  65515. text: b
  65516. })
  65517. }),
  65518. textConfig: {
  65519. position: "inside"
  65520. },
  65521. z2: dp * 1e4,
  65522. onclick: Ue(s, m)
  65523. });
  65524. _.disableLabelAnimation = !0, _.getTextContent().ensureState("emphasis").style = Zt(o, {
  65525. text: b
  65526. }), _.ensureState("emphasis").style = p, bn(_, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(_), Aze(_, e, m), l += y + LF;
  65527. }
  65528. }, t.prototype.remove = function() {
  65529. this.group.removeAll();
  65530. }, t;
  65531. }()
  65532. );
  65533. function $ze(t, e, n, r, i, a) {
  65534. var o = [[i ? t : t - vP, e], [t + n, e], [t + n, e + r], [i ? t : t - vP, e + r]];
  65535. return !a && o.splice(2, 0, [t + n + vP, e + r / 2]), !i && o.push([t, e + r / 2]), o;
  65536. }
  65537. function Aze(t, e, n) {
  65538. Fe(t).eventData = {
  65539. componentType: "series",
  65540. componentSubType: "treemap",
  65541. componentIndex: e.componentIndex,
  65542. seriesIndex: e.seriesIndex,
  65543. seriesName: e.name,
  65544. seriesType: "treemap",
  65545. selfType: "breadcrumb",
  65546. nodeData: {
  65547. dataIndex: n && n.dataIndex,
  65548. name: n && n.name
  65549. },
  65550. treePathInfo: n && bw(n, e)
  65551. };
  65552. }
  65553. var Eze = (
  65554. /** @class */
  65555. function() {
  65556. function t() {
  65557. this._storage = [], this._elExistsMap = {};
  65558. }
  65559. return t.prototype.add = function(e, n, r, i, a) {
  65560. return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
  65561. el: e,
  65562. target: n,
  65563. duration: r,
  65564. delay: i,
  65565. easing: a
  65566. }), !0);
  65567. }, t.prototype.finished = function(e) {
  65568. return this._finishedCallback = e, this;
  65569. }, t.prototype.start = function() {
  65570. for (var e = this, n = this._storage.length, r = function() {
  65571. n--, n <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
  65572. }, i = 0, a = this._storage.length; i < a; i++) {
  65573. var o = this._storage[i];
  65574. o.el.animateTo(o.target, {
  65575. duration: o.duration,
  65576. delay: o.delay,
  65577. easing: o.easing,
  65578. setToFinal: !0,
  65579. done: r,
  65580. aborted: r
  65581. });
  65582. }
  65583. return this;
  65584. }, t;
  65585. }()
  65586. );
  65587. function Mze() {
  65588. return new Eze();
  65589. }
  65590. var gE = Ve, NF = mt, BF = 3, zF = "label", VF = "upperLabel", Ize = dp * 10, Dze = dp * 2, Rze = dp * 3, pc = yf([
  65591. ["fill", "color"],
  65592. // `borderColor` and `borderWidth` has been occupied,
  65593. // so use `stroke` to indicate the stroke of the rect.
  65594. ["stroke", "strokeColor"],
  65595. ["lineWidth", "strokeWidth"],
  65596. ["shadowBlur"],
  65597. ["shadowOffsetX"],
  65598. ["shadowOffsetY"],
  65599. ["shadowColor"]
  65600. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  65601. // So do not transfer decal directly.
  65602. ]), FF = function(t) {
  65603. var e = pc(t);
  65604. return e.stroke = e.fill = e.lineWidth = null, e;
  65605. }, IO = bt(), kze = (
  65606. /** @class */
  65607. function(t) {
  65608. q(e, t);
  65609. function e() {
  65610. var n = t !== null && t.apply(this, arguments) || this;
  65611. return n.type = e.type, n._state = "ready", n._storage = bv(), n;
  65612. }
  65613. return e.prototype.render = function(n, r, i, a) {
  65614. var o = r.findComponents({
  65615. mainType: "series",
  65616. subType: "treemap",
  65617. query: a
  65618. });
  65619. if (!(et(o, n) < 0)) {
  65620. this.seriesModel = n, this.api = i, this.ecModel = r;
  65621. var s = ["treemapZoomToNode", "treemapRootToNode"], l = Lm(a, s, n), u = a && a.type, c = n.layoutInfo, f = !this._oldTree, d = this._storage, h = u === "treemapRootToNode" && l && d ? {
  65622. rootNodeGroup: d.nodeGroup[l.node.getRawIndex()],
  65623. direction: a.direction
  65624. } : null, p = this._giveContainerGroup(c), v = n.get("animation"), g = this._doRender(p, n, h);
  65625. v && !f && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, n, h) : g.renderFinally(), this._resetController(i), this._renderBreadcrumb(n, i, l);
  65626. }
  65627. }, e.prototype._giveContainerGroup = function(n) {
  65628. var r = this._containerGroup;
  65629. return r || (r = this._containerGroup = new gE(), this._initEvents(r), this.group.add(r)), r.x = n.x, r.y = n.y, r;
  65630. }, e.prototype._doRender = function(n, r, i) {
  65631. var a = r.getData().tree, o = this._oldTree, s = bv(), l = bv(), u = this._storage, c = [];
  65632. function f(y, b, _, O) {
  65633. return Lze(r, l, u, i, s, c, y, b, _, O);
  65634. }
  65635. v(a.root ? [a.root] : [], o && o.root ? [o.root] : [], n, a === o || !o, 0);
  65636. var d = g(u);
  65637. if (this._oldTree = a, this._storage = l, this._controllerHost) {
  65638. var h = this.seriesModel.layoutInfo, p = a.root.getLayout();
  65639. p.width === h.width && p.height === h.height && (this._controllerHost.zoom = 1);
  65640. }
  65641. return {
  65642. lastsForAnimation: s,
  65643. willDeleteEls: d,
  65644. renderFinally: m
  65645. };
  65646. function v(y, b, _, O, S) {
  65647. O ? (b = y, k(y, function(T, w) {
  65648. !T.isRemoved() && C(w, w);
  65649. })) : new Us(b, y, x, x).add(C).update(C).remove(Ue(C, null)).execute();
  65650. function x(T) {
  65651. return T.getId();
  65652. }
  65653. function C(T, w) {
  65654. var P = T != null ? y[T] : null, $ = w != null ? b[w] : null, A = f(P, $, _, S);
  65655. A && v(P && P.viewChildren || [], $ && $.viewChildren || [], A, O, S + 1);
  65656. }
  65657. }
  65658. function g(y) {
  65659. var b = bv();
  65660. return y && k(y, function(_, O) {
  65661. var S = b[O];
  65662. k(_, function(x) {
  65663. x && (S.push(x), IO(x).willDelete = !0);
  65664. });
  65665. }), b;
  65666. }
  65667. function m() {
  65668. k(d, function(y) {
  65669. k(y, function(b) {
  65670. b.parent && b.parent.remove(b);
  65671. });
  65672. }), k(c, function(y) {
  65673. y.invisible = !0, y.dirty();
  65674. });
  65675. }
  65676. }, e.prototype._doAnimation = function(n, r, i, a) {
  65677. var o = i.get("animationDurationUpdate"), s = i.get("animationEasing"), l = (Me(o) ? 0 : o) || 0, u = (Me(s) ? null : s) || "cubicOut", c = Mze();
  65678. k(r.willDeleteEls, function(f, d) {
  65679. k(f, function(h, p) {
  65680. if (!h.invisible) {
  65681. var v = h.parent, g, m = IO(v);
  65682. if (a && a.direction === "drillDown")
  65683. g = v === a.rootNodeGroup ? {
  65684. shape: {
  65685. x: 0,
  65686. y: 0,
  65687. width: m.nodeWidth,
  65688. height: m.nodeHeight
  65689. },
  65690. style: {
  65691. opacity: 0
  65692. }
  65693. } : {
  65694. style: {
  65695. opacity: 0
  65696. }
  65697. };
  65698. else {
  65699. var y = 0, b = 0;
  65700. m.willDelete || (y = m.nodeWidth / 2, b = m.nodeHeight / 2), g = d === "nodeGroup" ? {
  65701. x: y,
  65702. y: b,
  65703. style: {
  65704. opacity: 0
  65705. }
  65706. } : {
  65707. shape: {
  65708. x: y,
  65709. y: b,
  65710. width: 0,
  65711. height: 0
  65712. },
  65713. style: {
  65714. opacity: 0
  65715. }
  65716. };
  65717. }
  65718. g && c.add(h, g, l, 0, u);
  65719. }
  65720. });
  65721. }), k(this._storage, function(f, d) {
  65722. k(f, function(h, p) {
  65723. var v = r.lastsForAnimation[d][p], g = {};
  65724. v && (h instanceof Ve ? v.oldX != null && (g.x = h.x, g.y = h.y, h.x = v.oldX, h.y = v.oldY) : (v.oldShape && (g.shape = le({}, h.shape), h.setShape(v.oldShape)), v.fadein ? (h.setStyle("opacity", 0), g.style = {
  65725. opacity: 1
  65726. }) : h.style.opacity !== 1 && (g.style = {
  65727. opacity: 1
  65728. })), c.add(h, g, l, 0, u));
  65729. });
  65730. }, this), this._state = "animating", c.finished(xe(function() {
  65731. this._state = "ready", r.renderFinally();
  65732. }, this)).start();
  65733. }, e.prototype._resetController = function(n) {
  65734. var r = this._controller, i = this._controllerHost;
  65735. i || (this._controllerHost = {
  65736. target: this.group
  65737. }, i = this._controllerHost), r || (r = this._controller = new K0(n.getZr()), r.enable(this.seriesModel.get("roam")), i.zoomLimit = this.seriesModel.get("scaleLimit"), i.zoom = this.seriesModel.get("zoom"), r.on("pan", xe(this._onPan, this)), r.on("zoom", xe(this._onZoom, this)));
  65738. var a = new Je(0, 0, n.getWidth(), n.getHeight());
  65739. r.setPointerChecker(function(o, s, l) {
  65740. return a.contain(s, l);
  65741. });
  65742. }, e.prototype._clearController = function() {
  65743. var n = this._controller;
  65744. this._controllerHost = null, n && (n.dispose(), n = null);
  65745. }, e.prototype._onPan = function(n) {
  65746. if (this._state !== "animating" && (Math.abs(n.dx) > BF || Math.abs(n.dy) > BF)) {
  65747. var r = this.seriesModel.getData().tree.root;
  65748. if (!r)
  65749. return;
  65750. var i = r.getLayout();
  65751. if (!i)
  65752. return;
  65753. this.api.dispatchAction({
  65754. type: "treemapMove",
  65755. from: this.uid,
  65756. seriesId: this.seriesModel.id,
  65757. rootRect: {
  65758. x: i.x + n.dx,
  65759. y: i.y + n.dy,
  65760. width: i.width,
  65761. height: i.height
  65762. }
  65763. });
  65764. }
  65765. }, e.prototype._onZoom = function(n) {
  65766. var r = n.originX, i = n.originY, a = n.scale;
  65767. if (this._state !== "animating") {
  65768. var o = this.seriesModel.getData().tree.root;
  65769. if (!o)
  65770. return;
  65771. var s = o.getLayout();
  65772. if (!s)
  65773. return;
  65774. var l = new Je(s.x, s.y, s.width, s.height), u = null, c = this._controllerHost;
  65775. u = c.zoomLimit;
  65776. var f = c.zoom = c.zoom || 1;
  65777. if (f *= a, u) {
  65778. var d = u.min || 0, h = u.max || 1 / 0;
  65779. f = Math.max(Math.min(h, f), d);
  65780. }
  65781. var p = f / c.zoom;
  65782. c.zoom = f;
  65783. var v = this.seriesModel.layoutInfo;
  65784. r -= v.x, i -= v.y;
  65785. var g = Si();
  65786. ao(g, g, [-r, -i]), Nx(g, g, [p, p]), ao(g, g, [r, i]), l.applyTransform(g), this.api.dispatchAction({
  65787. type: "treemapRender",
  65788. from: this.uid,
  65789. seriesId: this.seriesModel.id,
  65790. rootRect: {
  65791. x: l.x,
  65792. y: l.y,
  65793. width: l.width,
  65794. height: l.height
  65795. }
  65796. });
  65797. }
  65798. }, e.prototype._initEvents = function(n) {
  65799. var r = this;
  65800. n.on("click", function(i) {
  65801. if (r._state === "ready") {
  65802. var a = r.seriesModel.get("nodeClick", !0);
  65803. if (a) {
  65804. var o = r.findTarget(i.offsetX, i.offsetY);
  65805. if (o) {
  65806. var s = o.node;
  65807. if (s.getLayout().isLeafRoot)
  65808. r._rootToNode(o);
  65809. else if (a === "zoomToNode")
  65810. r._zoomToNode(o);
  65811. else if (a === "link") {
  65812. var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), c = l.get("target", !0) || "blank";
  65813. u && dO(u, c);
  65814. }
  65815. }
  65816. }
  65817. }
  65818. }, this);
  65819. }, e.prototype._renderBreadcrumb = function(n, r, i) {
  65820. var a = this;
  65821. i || (i = n.get("leafDepth", !0) != null ? {
  65822. node: n.getViewRoot()
  65823. } : this.findTarget(r.getWidth() / 2, r.getHeight() / 2), i || (i = {
  65824. node: n.getData().tree.root
  65825. })), (this._breadcrumb || (this._breadcrumb = new Pze(this.group))).render(n, r, i.node, function(o) {
  65826. a._state !== "animating" && (jk(n.getViewRoot(), o) ? a._rootToNode({
  65827. node: o
  65828. }) : a._zoomToNode({
  65829. node: o
  65830. }));
  65831. });
  65832. }, e.prototype.remove = function() {
  65833. this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = bv(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
  65834. }, e.prototype.dispose = function() {
  65835. this._clearController();
  65836. }, e.prototype._zoomToNode = function(n) {
  65837. this.api.dispatchAction({
  65838. type: "treemapZoomToNode",
  65839. from: this.uid,
  65840. seriesId: this.seriesModel.id,
  65841. targetNode: n.node
  65842. });
  65843. }, e.prototype._rootToNode = function(n) {
  65844. this.api.dispatchAction({
  65845. type: "treemapRootToNode",
  65846. from: this.uid,
  65847. seriesId: this.seriesModel.id,
  65848. targetNode: n.node
  65849. });
  65850. }, e.prototype.findTarget = function(n, r) {
  65851. var i, a = this.seriesModel.getViewRoot();
  65852. return a.eachNode({
  65853. attr: "viewChildren",
  65854. order: "preorder"
  65855. }, function(o) {
  65856. var s = this._storage.background[o.getRawIndex()];
  65857. if (s) {
  65858. var l = s.transformCoordToLocal(n, r), u = s.shape;
  65859. if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
  65860. i = {
  65861. node: o,
  65862. offsetX: l[0],
  65863. offsetY: l[1]
  65864. };
  65865. else
  65866. return !1;
  65867. }
  65868. }, this), i;
  65869. }, e.type = "treemap", e;
  65870. }(zt)
  65871. );
  65872. function bv() {
  65873. return {
  65874. nodeGroup: [],
  65875. background: [],
  65876. content: []
  65877. };
  65878. }
  65879. function Lze(t, e, n, r, i, a, o, s, l, u) {
  65880. if (!o)
  65881. return;
  65882. var c = o.getLayout(), f = t.getData(), d = o.getModel();
  65883. if (f.setItemGraphicEl(o.dataIndex, null), !c || !c.isInView)
  65884. return;
  65885. var h = c.width, p = c.height, v = c.borderWidth, g = c.invisible, m = o.getRawIndex(), y = s && s.getRawIndex(), b = o.viewChildren, _ = c.upperHeight, O = b && b.length, S = d.getModel("itemStyle"), x = d.getModel(["emphasis", "itemStyle"]), C = d.getModel(["blur", "itemStyle"]), T = d.getModel(["select", "itemStyle"]), w = S.get("borderRadius") || 0, P = ne("nodeGroup", gE);
  65886. if (!P)
  65887. return;
  65888. if (l.add(P), P.x = c.x || 0, P.y = c.y || 0, P.markRedraw(), IO(P).nodeWidth = h, IO(P).nodeHeight = p, c.isAboveViewRoot)
  65889. return P;
  65890. var $ = ne("background", NF, u, Dze);
  65891. $ && z(P, $, O && c.upperLabelHeight);
  65892. var A = d.getModel("emphasis"), D = A.get("focus"), E = A.get("blurScope"), R = A.get("disabled"), N = D === "ancestor" ? o.getAncestorsIndices() : D === "descendant" ? o.getDescendantIndices() : D;
  65893. if (O)
  65894. lu(P) && Lc(P, !1), $ && (Lc($, !R), f.setItemGraphicEl(o.dataIndex, $), RA($, N, E));
  65895. else {
  65896. var V = ne("content", NF, u, Rze);
  65897. V && W(P, V), $.disableMorphing = !0, $ && lu($) && Lc($, !1), Lc(P, !R), f.setItemGraphicEl(o.dataIndex, P), RA(P, N, E);
  65898. }
  65899. return P;
  65900. function z(K, ie, X) {
  65901. var H = Fe(ie);
  65902. if (H.dataIndex = o.dataIndex, H.seriesIndex = t.seriesIndex, ie.setShape({
  65903. x: 0,
  65904. y: 0,
  65905. width: h,
  65906. height: p,
  65907. r: w
  65908. }), g)
  65909. F(ie);
  65910. else {
  65911. ie.invisible = !1;
  65912. var G = o.getVisual("style"), re = G.stroke, fe = FF(S);
  65913. fe.fill = re;
  65914. var de = pc(x);
  65915. de.fill = x.get("borderColor");
  65916. var Ee = pc(C);
  65917. Ee.fill = C.get("borderColor");
  65918. var $e = pc(T);
  65919. if ($e.fill = T.get("borderColor"), X) {
  65920. var Se = h - 2 * v;
  65921. Q(
  65922. // PENDING: convert ZRColor to ColorString for text.
  65923. ie,
  65924. re,
  65925. G.opacity,
  65926. {
  65927. x: v,
  65928. y: 0,
  65929. width: Se,
  65930. height: _
  65931. }
  65932. );
  65933. } else
  65934. ie.removeTextContent();
  65935. ie.setStyle(fe), ie.ensureState("emphasis").style = de, ie.ensureState("blur").style = Ee, ie.ensureState("select").style = $e, bf(ie);
  65936. }
  65937. K.add(ie);
  65938. }
  65939. function W(K, ie) {
  65940. var X = Fe(ie);
  65941. X.dataIndex = o.dataIndex, X.seriesIndex = t.seriesIndex;
  65942. var H = Math.max(h - 2 * v, 0), G = Math.max(p - 2 * v, 0);
  65943. if (ie.culling = !0, ie.setShape({
  65944. x: v,
  65945. y: v,
  65946. width: H,
  65947. height: G,
  65948. r: w
  65949. }), g)
  65950. F(ie);
  65951. else {
  65952. ie.invisible = !1;
  65953. var re = o.getVisual("style"), fe = re.fill, de = FF(S);
  65954. de.fill = fe, de.decal = re.decal;
  65955. var Ee = pc(x), $e = pc(C), Se = pc(T);
  65956. Q(ie, fe, re.opacity, null), ie.setStyle(de), ie.ensureState("emphasis").style = Ee, ie.ensureState("blur").style = $e, ie.ensureState("select").style = Se, bf(ie);
  65957. }
  65958. K.add(ie);
  65959. }
  65960. function F(K) {
  65961. !K.invisible && a.push(K);
  65962. }
  65963. function Q(K, ie, X, H) {
  65964. var G = d.getModel(H ? VF : zF), re = Vn(d.get("name"), null), fe = G.getShallow("show");
  65965. Pr(K, er(d, H ? VF : zF), {
  65966. defaultText: fe ? re : null,
  65967. inheritColor: ie,
  65968. defaultOpacity: X,
  65969. labelFetcher: t,
  65970. labelDataIndex: o.dataIndex
  65971. });
  65972. var de = K.getTextContent();
  65973. if (de) {
  65974. var Ee = de.style, $e = kx(Ee.padding || 0);
  65975. H && (K.setTextConfig({
  65976. layoutRect: H
  65977. }), de.disableLabelLayout = !0), de.beforeUpdate = function() {
  65978. var be = Math.max((H ? H.width : K.shape.width) - $e[1] - $e[3], 0), he = Math.max((H ? H.height : K.shape.height) - $e[0] - $e[2], 0);
  65979. (Ee.width !== be || Ee.height !== he) && de.setStyle({
  65980. width: be,
  65981. height: he
  65982. });
  65983. }, Ee.truncateMinChar = 2, Ee.lineOverflow = "truncate", Z(Ee, H, c);
  65984. var Se = de.getState("emphasis");
  65985. Z(Se ? Se.style : null, H, c);
  65986. }
  65987. }
  65988. function Z(K, ie, X) {
  65989. var H = K ? K.text : null;
  65990. if (!ie && X.isLeafRoot && H != null) {
  65991. var G = t.get("drillDownIcon", !0);
  65992. K.text = G ? G + " " + H : H;
  65993. }
  65994. }
  65995. function ne(K, ie, X, H) {
  65996. var G = y != null && n[K][y], re = i[K];
  65997. return G ? (n[K][y] = null, ee(re, G)) : g || (G = new ie(), G instanceof Ma && (G.z2 = Nze(X, H)), oe(re, G)), e[K][m] = G;
  65998. }
  65999. function ee(K, ie) {
  66000. var X = K[m] = {};
  66001. ie instanceof gE ? (X.oldX = ie.x, X.oldY = ie.y) : X.oldShape = le({}, ie.shape);
  66002. }
  66003. function oe(K, ie) {
  66004. var X = K[m] = {}, H = o.parentNode, G = ie instanceof Ve;
  66005. if (H && (!r || r.direction === "drillDown")) {
  66006. var re = 0, fe = 0, de = i.background[H.getRawIndex()];
  66007. !r && de && de.oldShape && (re = de.oldShape.width, fe = de.oldShape.height), G ? (X.oldX = 0, X.oldY = fe) : X.oldShape = {
  66008. x: re,
  66009. y: fe,
  66010. width: 0,
  66011. height: 0
  66012. };
  66013. }
  66014. X.fadein = !G;
  66015. }
  66016. }
  66017. function Nze(t, e) {
  66018. return t * Ize + e;
  66019. }
  66020. var Nm = k, Bze = Ie, DO = -1, qn = (
  66021. /** @class */
  66022. function() {
  66023. function t(e) {
  66024. var n = e.mappingMethod, r = e.type, i = this.option = Le(e);
  66025. this.type = r, this.mappingMethod = n, this._normalizeData = Fze[n];
  66026. var a = t.visualHandlers[r];
  66027. this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._normalizedToVisual = a._normalizedToVisual[n], n === "piecewise" ? (gP(i), zze(i)) : n === "category" ? i.categories ? Vze(i) : gP(i, !0) : (ke(n !== "linear" || i.dataExtent), gP(i));
  66028. }
  66029. return t.prototype.mapValueToVisual = function(e) {
  66030. var n = this._normalizeData(e);
  66031. return this._normalizedToVisual(n, e);
  66032. }, t.prototype.getNormalizer = function() {
  66033. return xe(this._normalizeData, this);
  66034. }, t.listVisualTypes = function() {
  66035. return st(t.visualHandlers);
  66036. }, t.isValidType = function(e) {
  66037. return t.visualHandlers.hasOwnProperty(e);
  66038. }, t.eachVisual = function(e, n, r) {
  66039. Ie(e) ? k(e, n, r) : n.call(r, e);
  66040. }, t.mapVisual = function(e, n, r) {
  66041. var i, a = ue(e) ? [] : Ie(e) ? {} : (i = !0, null);
  66042. return t.eachVisual(e, function(o, s) {
  66043. var l = n.call(r, o, s);
  66044. i ? a = l : a[s] = l;
  66045. }), a;
  66046. }, t.retrieveVisuals = function(e) {
  66047. var n = {}, r;
  66048. return e && Nm(t.visualHandlers, function(i, a) {
  66049. e.hasOwnProperty(a) && (n[a] = e[a], r = !0);
  66050. }), r ? n : null;
  66051. }, t.prepareVisualTypes = function(e) {
  66052. if (ue(e))
  66053. e = e.slice();
  66054. else if (Bze(e)) {
  66055. var n = [];
  66056. Nm(e, function(r, i) {
  66057. n.push(i);
  66058. }), e = n;
  66059. } else
  66060. return [];
  66061. return e.sort(function(r, i) {
  66062. return i === "color" && r !== "color" && r.indexOf("color") === 0 ? 1 : -1;
  66063. }), e;
  66064. }, t.dependsOn = function(e, n) {
  66065. return n === "color" ? !!(e && e.indexOf(n) === 0) : e === n;
  66066. }, t.findPieceIndex = function(e, n, r) {
  66067. for (var i, a = 1 / 0, o = 0, s = n.length; o < s; o++) {
  66068. var l = n[o].value;
  66069. if (l != null) {
  66070. if (l === e || Oe(l) && l === e + "")
  66071. return o;
  66072. r && d(l, o);
  66073. }
  66074. }
  66075. for (var o = 0, s = n.length; o < s; o++) {
  66076. var u = n[o], c = u.interval, f = u.close;
  66077. if (c) {
  66078. if (c[0] === -1 / 0) {
  66079. if (Pb(f[1], e, c[1]))
  66080. return o;
  66081. } else if (c[1] === 1 / 0) {
  66082. if (Pb(f[0], c[0], e))
  66083. return o;
  66084. } else if (Pb(f[0], c[0], e) && Pb(f[1], e, c[1]))
  66085. return o;
  66086. r && d(c[0], o), r && d(c[1], o);
  66087. }
  66088. }
  66089. if (r)
  66090. return e === 1 / 0 ? n.length - 1 : e === -1 / 0 ? 0 : i;
  66091. function d(h, p) {
  66092. var v = Math.abs(h - e);
  66093. v < a && (a = v, i = p);
  66094. }
  66095. }, t.visualHandlers = {
  66096. color: {
  66097. applyVisual: _v("color"),
  66098. getColorMapper: function() {
  66099. var e = this.option;
  66100. return xe(e.mappingMethod === "category" ? function(n, r) {
  66101. return !r && (n = this._normalizeData(n)), Yv.call(this, n);
  66102. } : function(n, r, i) {
  66103. var a = !!i;
  66104. return !r && (n = this._normalizeData(n)), i = Cg(n, e.parsedVisual, i), a ? i : eo(i, "rgba");
  66105. }, this);
  66106. },
  66107. _normalizedToVisual: {
  66108. linear: function(e) {
  66109. return eo(Cg(e, this.option.parsedVisual), "rgba");
  66110. },
  66111. category: Yv,
  66112. piecewise: function(e, n) {
  66113. var r = yE.call(this, n);
  66114. return r == null && (r = eo(Cg(e, this.option.parsedVisual), "rgba")), r;
  66115. },
  66116. fixed: vc
  66117. }
  66118. },
  66119. colorHue: Tb(function(e, n) {
  66120. return eh(e, n);
  66121. }),
  66122. colorSaturation: Tb(function(e, n) {
  66123. return eh(e, null, n);
  66124. }),
  66125. colorLightness: Tb(function(e, n) {
  66126. return eh(e, null, null, n);
  66127. }),
  66128. colorAlpha: Tb(function(e, n) {
  66129. return _m(e, n);
  66130. }),
  66131. decal: {
  66132. applyVisual: _v("decal"),
  66133. _normalizedToVisual: {
  66134. linear: null,
  66135. category: Yv,
  66136. piecewise: null,
  66137. fixed: null
  66138. }
  66139. },
  66140. opacity: {
  66141. applyVisual: _v("opacity"),
  66142. _normalizedToVisual: mE([0, 1])
  66143. },
  66144. liftZ: {
  66145. applyVisual: _v("liftZ"),
  66146. _normalizedToVisual: {
  66147. linear: vc,
  66148. category: vc,
  66149. piecewise: vc,
  66150. fixed: vc
  66151. }
  66152. },
  66153. symbol: {
  66154. applyVisual: function(e, n, r) {
  66155. var i = this.mapValueToVisual(e);
  66156. r("symbol", i);
  66157. },
  66158. _normalizedToVisual: {
  66159. linear: WF,
  66160. category: Yv,
  66161. piecewise: function(e, n) {
  66162. var r = yE.call(this, n);
  66163. return r == null && (r = WF.call(this, e)), r;
  66164. },
  66165. fixed: vc
  66166. }
  66167. },
  66168. symbolSize: {
  66169. applyVisual: _v("symbolSize"),
  66170. _normalizedToVisual: mE([0, 1])
  66171. }
  66172. }, t;
  66173. }()
  66174. );
  66175. function zze(t) {
  66176. var e = t.pieceList;
  66177. t.hasSpecialVisual = !1, k(e, function(n, r) {
  66178. n.originIndex = r, n.visual != null && (t.hasSpecialVisual = !0);
  66179. });
  66180. }
  66181. function Vze(t) {
  66182. var e = t.categories, n = t.categoryMap = {}, r = t.visual;
  66183. if (Nm(e, function(o, s) {
  66184. n[o] = s;
  66185. }), !ue(r)) {
  66186. var i = [];
  66187. Ie(r) ? Nm(r, function(o, s) {
  66188. var l = n[s];
  66189. i[l ?? DO] = o;
  66190. }) : i[DO] = r, r = xne(t, i);
  66191. }
  66192. for (var a = e.length - 1; a >= 0; a--)
  66193. r[a] == null && (delete n[e[a]], e.pop());
  66194. }
  66195. function gP(t, e) {
  66196. var n = t.visual, r = [];
  66197. Ie(n) ? Nm(n, function(a) {
  66198. r.push(a);
  66199. }) : n != null && r.push(n);
  66200. var i = {
  66201. color: 1,
  66202. symbol: 1
  66203. };
  66204. !e && r.length === 1 && !i.hasOwnProperty(t.type) && (r[1] = r[0]), xne(t, r);
  66205. }
  66206. function Tb(t) {
  66207. return {
  66208. applyVisual: function(e, n, r) {
  66209. var i = this.mapValueToVisual(e);
  66210. r("color", t(n("color"), i));
  66211. },
  66212. _normalizedToVisual: mE([0, 1])
  66213. };
  66214. }
  66215. function WF(t) {
  66216. var e = this.option.visual;
  66217. return e[Math.round(Lt(t, [0, 1], [0, e.length - 1], !0))] || {};
  66218. }
  66219. function _v(t) {
  66220. return function(e, n, r) {
  66221. r(t, this.mapValueToVisual(e));
  66222. };
  66223. }
  66224. function Yv(t) {
  66225. var e = this.option.visual;
  66226. return e[this.option.loop && t !== DO ? t % e.length : t];
  66227. }
  66228. function vc() {
  66229. return this.option.visual[0];
  66230. }
  66231. function mE(t) {
  66232. return {
  66233. linear: function(e) {
  66234. return Lt(e, t, this.option.visual, !0);
  66235. },
  66236. category: Yv,
  66237. piecewise: function(e, n) {
  66238. var r = yE.call(this, n);
  66239. return r == null && (r = Lt(e, t, this.option.visual, !0)), r;
  66240. },
  66241. fixed: vc
  66242. };
  66243. }
  66244. function yE(t) {
  66245. var e = this.option, n = e.pieceList;
  66246. if (e.hasSpecialVisual) {
  66247. var r = qn.findPieceIndex(t, n), i = n[r];
  66248. if (i && i.visual)
  66249. return i.visual[this.type];
  66250. }
  66251. }
  66252. function xne(t, e) {
  66253. return t.visual = e, t.type === "color" && (t.parsedVisual = ce(e, function(n) {
  66254. var r = qr(n);
  66255. return !r && process.env.NODE_ENV !== "production" && dn("'" + n + "' is an illegal color, fallback to '#000000'", !0), r || [0, 0, 0, 1];
  66256. })), e;
  66257. }
  66258. var Fze = {
  66259. linear: function(t) {
  66260. return Lt(t, this.option.dataExtent, [0, 1], !0);
  66261. },
  66262. piecewise: function(t) {
  66263. var e = this.option.pieceList, n = qn.findPieceIndex(t, e, !0);
  66264. if (n != null)
  66265. return Lt(n, [0, e.length - 1], [0, 1], !0);
  66266. },
  66267. category: function(t) {
  66268. var e = this.option.categories ? this.option.categoryMap[t] : t;
  66269. return e ?? DO;
  66270. },
  66271. fixed: On
  66272. };
  66273. function Pb(t, e, n) {
  66274. return t ? e <= n : e < n;
  66275. }
  66276. var Wze = "itemStyle", wne = bt();
  66277. const Qze = {
  66278. seriesType: "treemap",
  66279. reset: function(t) {
  66280. var e = t.getData().tree, n = e.root;
  66281. n.isRemoved() || Cne(
  66282. n,
  66283. // Visual should calculate from tree root but not view root.
  66284. {},
  66285. t.getViewRoot().getAncestors(),
  66286. t
  66287. );
  66288. }
  66289. };
  66290. function Cne(t, e, n, r) {
  66291. var i = t.getModel(), a = t.getLayout(), o = t.hostTree.data;
  66292. if (!(!a || a.invisible || !a.isInView)) {
  66293. var s = i.getModel(Wze), l = Hze(s, e, r), u = o.ensureUniqueItemVisual(t.dataIndex, "style"), c = s.get("borderColor"), f = s.get("borderColorSaturation"), d;
  66294. f != null && (d = QF(l), c = Gze(f, d)), u.stroke = c;
  66295. var h = t.viewChildren;
  66296. if (!h || !h.length)
  66297. d = QF(l), u.fill = d;
  66298. else {
  66299. var p = jze(t, i, a, s, l, h);
  66300. k(h, function(v, g) {
  66301. if (v.depth >= n.length || v === n[v.depth]) {
  66302. var m = Zze(i, l, v, g, p, r);
  66303. Cne(v, m, n, r);
  66304. }
  66305. });
  66306. }
  66307. }
  66308. }
  66309. function Hze(t, e, n) {
  66310. var r = le({}, e), i = n.designatedVisualItemStyle;
  66311. return k(["color", "colorAlpha", "colorSaturation"], function(a) {
  66312. i[a] = e[a];
  66313. var o = t.get(a);
  66314. i[a] = null, o != null && (r[a] = o);
  66315. }), r;
  66316. }
  66317. function QF(t) {
  66318. var e = mP(t, "color");
  66319. if (e) {
  66320. var n = mP(t, "colorAlpha"), r = mP(t, "colorSaturation");
  66321. return r && (e = eh(e, null, null, r)), n && (e = _m(e, n)), e;
  66322. }
  66323. }
  66324. function Gze(t, e) {
  66325. return e != null ? eh(e, null, null, t) : null;
  66326. }
  66327. function mP(t, e) {
  66328. var n = t[e];
  66329. if (n != null && n !== "none")
  66330. return n;
  66331. }
  66332. function jze(t, e, n, r, i, a) {
  66333. if (!(!a || !a.length)) {
  66334. var o = yP(e, "color") || i.color != null && i.color !== "none" && (yP(e, "colorAlpha") || yP(e, "colorSaturation"));
  66335. if (o) {
  66336. var s = e.get("visualMin"), l = e.get("visualMax"), u = n.dataExtent.slice();
  66337. s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
  66338. var c = e.get("colorMappingBy"), f = {
  66339. type: o.name,
  66340. dataExtent: u,
  66341. visual: o.range
  66342. };
  66343. f.type === "color" && (c === "index" || c === "id") ? (f.mappingMethod = "category", f.loop = !0) : f.mappingMethod = "linear";
  66344. var d = new qn(f);
  66345. return wne(d).drColorMappingBy = c, d;
  66346. }
  66347. }
  66348. }
  66349. function yP(t, e) {
  66350. var n = t.get(e);
  66351. return ue(n) && n.length ? {
  66352. name: e,
  66353. range: n
  66354. } : null;
  66355. }
  66356. function Zze(t, e, n, r, i, a) {
  66357. var o = le({}, e);
  66358. if (i) {
  66359. var s = i.type, l = s === "color" && wne(i).drColorMappingBy, u = l === "index" ? r : l === "id" ? a.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
  66360. o[s] = i.mapValueToVisual(u);
  66361. }
  66362. return o;
  66363. }
  66364. var Bm = Math.max, RO = Math.min, HF = Tn, Zk = k, Tne = ["itemStyle", "borderWidth"], Uze = ["itemStyle", "gapWidth"], Xze = ["upperLabel", "show"], Yze = ["upperLabel", "height"];
  66365. const qze = {
  66366. seriesType: "treemap",
  66367. reset: function(t, e, n, r) {
  66368. var i = n.getWidth(), a = n.getHeight(), o = t.option, s = Rn(t.getBoxLayoutParams(), {
  66369. width: n.getWidth(),
  66370. height: n.getHeight()
  66371. }), l = o.size || [], u = _e(HF(s.width, l[0]), i), c = _e(HF(s.height, l[1]), a), f = r && r.type, d = ["treemapZoomToNode", "treemapRootToNode"], h = Lm(r, d, t), p = f === "treemapRender" || f === "treemapMove" ? r.rootRect : null, v = t.getViewRoot(), g = _ne(v);
  66372. if (f !== "treemapMove") {
  66373. var m = f === "treemapZoomToNode" ? rVe(t, h, v, u, c) : p ? [p.width, p.height] : [u, c], y = o.sort;
  66374. y && y !== "asc" && y !== "desc" && (y = "desc");
  66375. var b = {
  66376. squareRatio: o.squareRatio,
  66377. sort: y,
  66378. leafDepth: o.leafDepth
  66379. };
  66380. v.hostTree.clearLayouts();
  66381. var _ = {
  66382. x: 0,
  66383. y: 0,
  66384. width: m[0],
  66385. height: m[1],
  66386. area: m[0] * m[1]
  66387. };
  66388. v.setLayout(_), Pne(v, b, !1, 0), _ = v.getLayout(), Zk(g, function(S, x) {
  66389. var C = (g[x + 1] || v).getValue();
  66390. S.setLayout(le({
  66391. dataExtent: [C, C],
  66392. borderWidth: 0,
  66393. upperHeight: 0
  66394. }, _));
  66395. });
  66396. }
  66397. var O = t.getData().tree.root;
  66398. O.setLayout(iVe(s, p, h), !0), t.setLayoutInfo(s), $ne(
  66399. O,
  66400. // Transform to base element coordinate system.
  66401. new Je(-s.x, -s.y, i, a),
  66402. g,
  66403. v,
  66404. 0
  66405. );
  66406. }
  66407. };
  66408. function Pne(t, e, n, r) {
  66409. var i, a;
  66410. if (!t.isRemoved()) {
  66411. var o = t.getLayout();
  66412. i = o.width, a = o.height;
  66413. var s = t.getModel(), l = s.get(Tne), u = s.get(Uze) / 2, c = Ane(s), f = Math.max(l, c), d = l - u, h = f - u;
  66414. t.setLayout({
  66415. borderWidth: l,
  66416. upperHeight: f,
  66417. upperLabelHeight: c
  66418. }, !0), i = Bm(i - 2 * d, 0), a = Bm(a - d - h, 0);
  66419. var p = i * a, v = Kze(t, s, p, e, n, r);
  66420. if (v.length) {
  66421. var g = {
  66422. x: d,
  66423. y: h,
  66424. width: i,
  66425. height: a
  66426. }, m = RO(i, a), y = 1 / 0, b = [];
  66427. b.area = 0;
  66428. for (var _ = 0, O = v.length; _ < O; ) {
  66429. var S = v[_];
  66430. b.push(S), b.area += S.getLayout().area;
  66431. var x = nVe(b, m, e.squareRatio);
  66432. x <= y ? (_++, y = x) : (b.area -= b.pop().getLayout().area, GF(b, m, g, u, !1), m = RO(g.width, g.height), b.length = b.area = 0, y = 1 / 0);
  66433. }
  66434. if (b.length && GF(b, m, g, u, !0), !n) {
  66435. var C = s.get("childrenVisibleMin");
  66436. C != null && p < C && (n = !0);
  66437. }
  66438. for (var _ = 0, O = v.length; _ < O; _++)
  66439. Pne(v[_], e, n, r + 1);
  66440. }
  66441. }
  66442. }
  66443. function Kze(t, e, n, r, i, a) {
  66444. var o = t.children || [], s = r.sort;
  66445. s !== "asc" && s !== "desc" && (s = null);
  66446. var l = r.leafDepth != null && r.leafDepth <= a;
  66447. if (i && !l)
  66448. return t.viewChildren = [];
  66449. o = Nt(o, function(h) {
  66450. return !h.isRemoved();
  66451. }), eVe(o, s);
  66452. var u = tVe(e, o, s);
  66453. if (u.sum === 0)
  66454. return t.viewChildren = [];
  66455. if (u.sum = Jze(e, n, u.sum, s, o), u.sum === 0)
  66456. return t.viewChildren = [];
  66457. for (var c = 0, f = o.length; c < f; c++) {
  66458. var d = o[c].getValue() / u.sum * n;
  66459. o[c].setLayout({
  66460. area: d
  66461. });
  66462. }
  66463. return l && (o.length && t.setLayout({
  66464. isLeafRoot: !0
  66465. }, !0), o.length = 0), t.viewChildren = o, t.setLayout({
  66466. dataExtent: u.dataExtent
  66467. }, !0), o;
  66468. }
  66469. function Jze(t, e, n, r, i) {
  66470. if (!r)
  66471. return n;
  66472. for (var a = t.get("visibleMin"), o = i.length, s = o, l = o - 1; l >= 0; l--) {
  66473. var u = i[r === "asc" ? o - l - 1 : l].getValue();
  66474. u / n * e < a && (s = l, n -= u);
  66475. }
  66476. return r === "asc" ? i.splice(0, o - s) : i.splice(s, o - s), n;
  66477. }
  66478. function eVe(t, e) {
  66479. return e && t.sort(function(n, r) {
  66480. var i = e === "asc" ? n.getValue() - r.getValue() : r.getValue() - n.getValue();
  66481. return i === 0 ? e === "asc" ? n.dataIndex - r.dataIndex : r.dataIndex - n.dataIndex : i;
  66482. }), t;
  66483. }
  66484. function tVe(t, e, n) {
  66485. for (var r = 0, i = 0, a = e.length; i < a; i++)
  66486. r += e[i].getValue();
  66487. var o = t.get("visualDimension"), s;
  66488. return !e || !e.length ? s = [NaN, NaN] : o === "value" && n ? (s = [e[e.length - 1].getValue(), e[0].getValue()], n === "asc" && s.reverse()) : (s = [1 / 0, -1 / 0], Zk(e, function(l) {
  66489. var u = l.getValue(o);
  66490. u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
  66491. })), {
  66492. sum: r,
  66493. dataExtent: s
  66494. };
  66495. }
  66496. function nVe(t, e, n) {
  66497. for (var r = 0, i = 1 / 0, a = 0, o = void 0, s = t.length; a < s; a++)
  66498. o = t[a].getLayout().area, o && (o < i && (i = o), o > r && (r = o));
  66499. var l = t.area * t.area, u = e * e * n;
  66500. return l ? Bm(u * r / l, l / (u * i)) : 1 / 0;
  66501. }
  66502. function GF(t, e, n, r, i) {
  66503. var a = e === n.width ? 0 : 1, o = 1 - a, s = ["x", "y"], l = ["width", "height"], u = n[s[a]], c = e ? t.area / e : 0;
  66504. (i || c > n[l[o]]) && (c = n[l[o]]);
  66505. for (var f = 0, d = t.length; f < d; f++) {
  66506. var h = t[f], p = {}, v = c ? h.getLayout().area / c : 0, g = p[l[o]] = Bm(c - 2 * r, 0), m = n[s[a]] + n[l[a]] - u, y = f === d - 1 || m < v ? m : v, b = p[l[a]] = Bm(y - 2 * r, 0);
  66507. p[s[o]] = n[s[o]] + RO(r, g / 2), p[s[a]] = u + RO(r, b / 2), u += y, h.setLayout(p, !0);
  66508. }
  66509. n[s[o]] += c, n[l[o]] -= c;
  66510. }
  66511. function rVe(t, e, n, r, i) {
  66512. var a = (e || {}).node, o = [r, i];
  66513. if (!a || a === n)
  66514. return o;
  66515. for (var s, l = r * i, u = l * t.option.zoomToNodeRatio; s = a.parentNode; ) {
  66516. for (var c = 0, f = s.children, d = 0, h = f.length; d < h; d++)
  66517. c += f[d].getValue();
  66518. var p = a.getValue();
  66519. if (p === 0)
  66520. return o;
  66521. u *= c / p;
  66522. var v = s.getModel(), g = v.get(Tne), m = Math.max(g, Ane(v));
  66523. u += 4 * g * g + (3 * g + m) * Math.pow(u, 0.5), u > CA && (u = CA), a = s;
  66524. }
  66525. u < l && (u = l);
  66526. var y = Math.pow(u / l, 0.5);
  66527. return [r * y, i * y];
  66528. }
  66529. function iVe(t, e, n) {
  66530. if (e)
  66531. return {
  66532. x: e.x,
  66533. y: e.y
  66534. };
  66535. var r = {
  66536. x: 0,
  66537. y: 0
  66538. };
  66539. if (!n)
  66540. return r;
  66541. var i = n.node, a = i.getLayout();
  66542. if (!a)
  66543. return r;
  66544. for (var o = [a.width / 2, a.height / 2], s = i; s; ) {
  66545. var l = s.getLayout();
  66546. o[0] += l.x, o[1] += l.y, s = s.parentNode;
  66547. }
  66548. return {
  66549. x: t.width / 2 - o[0],
  66550. y: t.height / 2 - o[1]
  66551. };
  66552. }
  66553. function $ne(t, e, n, r, i) {
  66554. var a = t.getLayout(), o = n[i], s = o && o === t;
  66555. if (!(o && !s || i === n.length && t !== r)) {
  66556. t.setLayout({
  66557. // isInView means: viewRoot sub tree + viewAbovePath
  66558. isInView: !0,
  66559. // invisible only means: outside view clip so that the node can not
  66560. // see but still layout for animation preparation but not render.
  66561. invisible: !s && !e.intersect(a),
  66562. isAboveViewRoot: s
  66563. }, !0);
  66564. var l = new Je(e.x - a.x, e.y - a.y, e.width, e.height);
  66565. Zk(t.viewChildren || [], function(u) {
  66566. $ne(u, l, n, r, i + 1);
  66567. });
  66568. }
  66569. }
  66570. function Ane(t) {
  66571. return t.get(Xze) ? t.get(Yze) : 0;
  66572. }
  66573. function aVe(t) {
  66574. t.registerSeriesModel(wze), t.registerChartView(kze), t.registerVisual(Qze), t.registerLayout(qze), xze(t);
  66575. }
  66576. function oVe(t) {
  66577. var e = t.findComponents({
  66578. mainType: "legend"
  66579. });
  66580. !e || !e.length || t.eachSeriesByType("graph", function(n) {
  66581. var r = n.getCategoriesData(), i = n.getGraph(), a = i.data, o = r.mapArray(r.getName);
  66582. a.filterSelf(function(s) {
  66583. var l = a.getItemModel(s), u = l.getShallow("category");
  66584. if (u != null) {
  66585. St(u) && (u = o[u]);
  66586. for (var c = 0; c < e.length; c++)
  66587. if (!e[c].isSelected(u))
  66588. return !1;
  66589. }
  66590. return !0;
  66591. });
  66592. });
  66593. }
  66594. function sVe(t) {
  66595. var e = {};
  66596. t.eachSeriesByType("graph", function(n) {
  66597. var r = n.getCategoriesData(), i = n.getData(), a = {};
  66598. r.each(function(o) {
  66599. var s = r.getName(o);
  66600. a["ec-" + s] = o;
  66601. var l = r.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
  66602. u.fill || (u.fill = n.getColorFromPalette(s, e)), r.setItemVisual(o, "style", u);
  66603. for (var c = ["symbol", "symbolSize", "symbolKeepAspect"], f = 0; f < c.length; f++) {
  66604. var d = l.getShallow(c[f], !0);
  66605. d != null && r.setItemVisual(o, c[f], d);
  66606. }
  66607. }), r.count() && i.each(function(o) {
  66608. var s = i.getItemModel(o), l = s.getShallow("category");
  66609. if (l != null) {
  66610. Oe(l) && (l = a["ec-" + l]);
  66611. var u = r.getItemVisual(l, "style"), c = i.ensureUniqueItemVisual(o, "style");
  66612. le(c, u);
  66613. for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < f.length; d++)
  66614. i.setItemVisual(o, f[d], r.getItemVisual(l, f[d]));
  66615. }
  66616. });
  66617. });
  66618. }
  66619. function $b(t) {
  66620. return t instanceof Array || (t = [t, t]), t;
  66621. }
  66622. function lVe(t) {
  66623. t.eachSeriesByType("graph", function(e) {
  66624. var n = e.getGraph(), r = e.getEdgeData(), i = $b(e.get("edgeSymbol")), a = $b(e.get("edgeSymbolSize"));
  66625. r.setVisual("fromSymbol", i && i[0]), r.setVisual("toSymbol", i && i[1]), r.setVisual("fromSymbolSize", a && a[0]), r.setVisual("toSymbolSize", a && a[1]), r.setVisual("style", e.getModel("lineStyle").getLineStyle()), r.each(function(o) {
  66626. var s = r.getItemModel(o), l = n.getEdgeByIndex(o), u = $b(s.getShallow("symbol", !0)), c = $b(s.getShallow("symbolSize", !0)), f = s.getModel("lineStyle").getLineStyle(), d = r.ensureUniqueItemVisual(o, "style");
  66627. switch (le(d, f), d.stroke) {
  66628. case "source": {
  66629. var h = l.node1.getVisual("style");
  66630. d.stroke = h && h.fill;
  66631. break;
  66632. }
  66633. case "target": {
  66634. var h = l.node2.getVisual("style");
  66635. d.stroke = h && h.fill;
  66636. break;
  66637. }
  66638. }
  66639. u[0] && l.setVisual("fromSymbol", u[0]), u[1] && l.setVisual("toSymbol", u[1]), c[0] && l.setVisual("fromSymbolSize", c[0]), c[1] && l.setVisual("toSymbolSize", c[1]);
  66640. });
  66641. });
  66642. }
  66643. var bE = "-->", _w = function(t) {
  66644. return t.get("autoCurveness") || null;
  66645. }, Ene = function(t, e) {
  66646. var n = _w(t), r = 20, i = [];
  66647. if (St(n))
  66648. r = n;
  66649. else if (ue(n)) {
  66650. t.__curvenessList = n;
  66651. return;
  66652. }
  66653. e > r && (r = e);
  66654. var a = r % 2 ? r + 2 : r + 3;
  66655. i = [];
  66656. for (var o = 0; o < a; o++)
  66657. i.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
  66658. t.__curvenessList = i;
  66659. }, zm = function(t, e, n) {
  66660. var r = [t.id, t.dataIndex].join("."), i = [e.id, e.dataIndex].join(".");
  66661. return [n.uid, r, i].join(bE);
  66662. }, Mne = function(t) {
  66663. var e = t.split(bE);
  66664. return [e[0], e[2], e[1]].join(bE);
  66665. }, uVe = function(t, e) {
  66666. var n = zm(t.node1, t.node2, e);
  66667. return e.__edgeMap[n];
  66668. }, cVe = function(t, e) {
  66669. var n = _E(zm(t.node1, t.node2, e), e), r = _E(zm(t.node2, t.node1, e), e);
  66670. return n + r;
  66671. }, _E = function(t, e) {
  66672. var n = e.__edgeMap;
  66673. return n[t] ? n[t].length : 0;
  66674. };
  66675. function fVe(t) {
  66676. _w(t) && (t.__curvenessList = [], t.__edgeMap = {}, Ene(t));
  66677. }
  66678. function dVe(t, e, n, r) {
  66679. if (_w(n)) {
  66680. var i = zm(t, e, n), a = n.__edgeMap, o = a[Mne(i)];
  66681. a[i] && !o ? a[i].isForward = !0 : o && a[i] && (o.isForward = !0, a[i].isForward = !1), a[i] = a[i] || [], a[i].push(r);
  66682. }
  66683. }
  66684. function Uk(t, e, n, r) {
  66685. var i = _w(e), a = ue(i);
  66686. if (!i)
  66687. return null;
  66688. var o = uVe(t, e);
  66689. if (!o)
  66690. return null;
  66691. for (var s = -1, l = 0; l < o.length; l++)
  66692. if (o[l] === n) {
  66693. s = l;
  66694. break;
  66695. }
  66696. var u = cVe(t, e);
  66697. Ene(e, u), t.lineStyle = t.lineStyle || {};
  66698. var c = zm(t.node1, t.node2, e), f = e.__curvenessList, d = a || u % 2 ? 0 : 1;
  66699. if (o.isForward)
  66700. return f[d + s];
  66701. var h = Mne(c), p = _E(h, e), v = f[s + p + d];
  66702. return r ? a ? i && i[0] === 0 ? (p + d) % 2 ? v : -v : ((p % 2 ? 0 : 1) + d) % 2 ? v : -v : (p + d) % 2 ? v : -v : f[s + p + d];
  66703. }
  66704. function Ine(t) {
  66705. var e = t.coordinateSystem;
  66706. if (!(e && e.type !== "view")) {
  66707. var n = t.getGraph();
  66708. n.eachNode(function(r) {
  66709. var i = r.getModel();
  66710. r.setLayout([+i.get("x"), +i.get("y")]);
  66711. }), Xk(n, t);
  66712. }
  66713. }
  66714. function Xk(t, e) {
  66715. t.eachEdge(function(n, r) {
  66716. var i = ji(n.getModel().get(["lineStyle", "curveness"]), -Uk(n, e, r, !0), 0), a = Zo(n.node1.getLayout()), o = Zo(n.node2.getLayout()), s = [a, o];
  66717. +i && s.push([(a[0] + o[0]) / 2 - (a[1] - o[1]) * i, (a[1] + o[1]) / 2 - (o[0] - a[0]) * i]), n.setLayout(s);
  66718. });
  66719. }
  66720. function hVe(t, e) {
  66721. t.eachSeriesByType("graph", function(n) {
  66722. var r = n.get("layout"), i = n.coordinateSystem;
  66723. if (i && i.type !== "view") {
  66724. var a = n.getData(), o = [];
  66725. k(i.dimensions, function(d) {
  66726. o = o.concat(a.mapDimensionsAll(d));
  66727. });
  66728. for (var s = 0; s < a.count(); s++) {
  66729. for (var l = [], u = !1, c = 0; c < o.length; c++) {
  66730. var f = a.get(o[c], s);
  66731. isNaN(f) || (u = !0), l.push(f);
  66732. }
  66733. u ? a.setItemLayout(s, i.dataToPoint(l)) : a.setItemLayout(s, [NaN, NaN]);
  66734. }
  66735. Xk(a.graph, n);
  66736. } else (!r || r === "none") && Ine(n);
  66737. });
  66738. }
  66739. function qv(t) {
  66740. var e = t.coordinateSystem;
  66741. if (e.type !== "view")
  66742. return 1;
  66743. var n = t.option.nodeScaleRatio, r = e.scaleX, i = e.getZoom(), a = (i - 1) * n + 1;
  66744. return a / r;
  66745. }
  66746. function Kv(t) {
  66747. var e = t.getVisual("symbolSize");
  66748. return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
  66749. }
  66750. var jF = Math.PI, bP = [];
  66751. function Yk(t, e, n, r) {
  66752. var i = t.coordinateSystem;
  66753. if (!(i && i.type !== "view")) {
  66754. var a = i.getBoundingRect(), o = t.getData(), s = o.graph, l = a.width / 2 + a.x, u = a.height / 2 + a.y, c = Math.min(a.width, a.height) / 2, f = o.count();
  66755. if (o.setLayout({
  66756. cx: l,
  66757. cy: u
  66758. }), !!f) {
  66759. if (n) {
  66760. var d = i.pointToData(r), h = d[0], p = d[1], v = [h - l, p - u];
  66761. Rf(v, v), Sg(v, v, c), n.setLayout([l + v[0], u + v[1]], !0);
  66762. var g = t.get(["circular", "rotateLabel"]);
  66763. Dne(n, g, l, u);
  66764. }
  66765. pVe[e](t, s, o, c, l, u, f), s.eachEdge(function(m, y) {
  66766. var b = ji(m.getModel().get(["lineStyle", "curveness"]), Uk(m, t, y), 0), _ = Zo(m.node1.getLayout()), O = Zo(m.node2.getLayout()), S, x = (_[0] + O[0]) / 2, C = (_[1] + O[1]) / 2;
  66767. +b && (b *= 3, S = [l * b + x * (1 - b), u * b + C * (1 - b)]), m.setLayout([_, O, S]);
  66768. });
  66769. }
  66770. }
  66771. }
  66772. var pVe = {
  66773. value: function(t, e, n, r, i, a, o) {
  66774. var s = 0, l = n.getSum("value"), u = Math.PI * 2 / (l || o);
  66775. e.eachNode(function(c) {
  66776. var f = c.getValue("value"), d = u * (l ? f : 1) / 2;
  66777. s += d, c.setLayout([r * Math.cos(s) + i, r * Math.sin(s) + a]), s += d;
  66778. });
  66779. },
  66780. symbolSize: function(t, e, n, r, i, a, o) {
  66781. var s = 0;
  66782. bP.length = o;
  66783. var l = qv(t);
  66784. e.eachNode(function(f) {
  66785. var d = Kv(f);
  66786. isNaN(d) && (d = 2), d < 0 && (d = 0), d *= l;
  66787. var h = Math.asin(d / 2 / r);
  66788. isNaN(h) && (h = jF / 2), bP[f.dataIndex] = h, s += h * 2;
  66789. });
  66790. var u = (2 * jF - s) / o / 2, c = 0;
  66791. e.eachNode(function(f) {
  66792. var d = u + bP[f.dataIndex];
  66793. c += d, (!f.getLayout() || !f.getLayout().fixed) && f.setLayout([r * Math.cos(c) + i, r * Math.sin(c) + a]), c += d;
  66794. });
  66795. }
  66796. };
  66797. function Dne(t, e, n, r) {
  66798. var i = t.getGraphicEl();
  66799. if (i) {
  66800. var a = t.getModel(), o = a.get(["label", "rotate"]) || 0, s = i.getSymbolPath();
  66801. if (e) {
  66802. var l = t.getLayout(), u = Math.atan2(l[1] - r, l[0] - n);
  66803. u < 0 && (u = Math.PI * 2 + u);
  66804. var c = l[0] < n;
  66805. c && (u = u - Math.PI);
  66806. var f = c ? "left" : "right";
  66807. s.setTextConfig({
  66808. rotation: -u,
  66809. position: f,
  66810. origin: "center"
  66811. });
  66812. var d = s.ensureState("emphasis");
  66813. le(d.textConfig || (d.textConfig = {}), {
  66814. position: f
  66815. });
  66816. } else
  66817. s.setTextConfig({
  66818. rotation: o *= Math.PI / 180
  66819. });
  66820. }
  66821. }
  66822. function vVe(t) {
  66823. t.eachSeriesByType("graph", function(e) {
  66824. e.get("layout") === "circular" && Yk(e, "symbolSize");
  66825. });
  66826. }
  66827. var pd = U1;
  66828. function gVe(t, e, n) {
  66829. for (var r = t, i = e, a = n.rect, o = a.width, s = a.height, l = [a.x + o / 2, a.y + s / 2], u = n.gravity == null ? 0.1 : n.gravity, c = 0; c < r.length; c++) {
  66830. var f = r[c];
  66831. f.p || (f.p = wu(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), f.pp = Zo(f.p), f.edges = null;
  66832. }
  66833. var d = n.friction == null ? 0.6 : n.friction, h = d, p, v;
  66834. return {
  66835. warmUp: function() {
  66836. h = d * 0.8;
  66837. },
  66838. setFixed: function(g) {
  66839. r[g].fixed = !0;
  66840. },
  66841. setUnfixed: function(g) {
  66842. r[g].fixed = !1;
  66843. },
  66844. /**
  66845. * Before step hook
  66846. */
  66847. beforeStep: function(g) {
  66848. p = g;
  66849. },
  66850. /**
  66851. * After step hook
  66852. */
  66853. afterStep: function(g) {
  66854. v = g;
  66855. },
  66856. /**
  66857. * Some formulas were originally copied from "d3.js"
  66858. * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
  66859. * with some modifications made for this project.
  66860. * See the license statement at the head of this file.
  66861. */
  66862. step: function(g) {
  66863. p && p(r, i);
  66864. for (var m = [], y = r.length, b = 0; b < i.length; b++) {
  66865. var _ = i[b];
  66866. if (!_.ignoreForceLayout) {
  66867. var O = _.n1, S = _.n2;
  66868. kl(m, S.p, O.p);
  66869. var x = mm(m) - _.d, C = S.w / (O.w + S.w);
  66870. isNaN(C) && (C = 0), Rf(m, m), !O.fixed && pd(O.p, O.p, m, C * x * h), !S.fixed && pd(S.p, S.p, m, -(1 - C) * x * h);
  66871. }
  66872. }
  66873. for (var b = 0; b < y; b++) {
  66874. var T = r[b];
  66875. T.fixed || (kl(m, l, T.p), pd(T.p, T.p, m, u * h));
  66876. }
  66877. for (var b = 0; b < y; b++)
  66878. for (var O = r[b], w = b + 1; w < y; w++) {
  66879. var S = r[w];
  66880. kl(m, S.p, O.p);
  66881. var x = mm(m);
  66882. x === 0 && (Aq(m, Math.random() - 0.5, Math.random() - 0.5), x = 1);
  66883. var P = (O.rep + S.rep) / x / x;
  66884. !O.fixed && pd(O.pp, O.pp, m, P), !S.fixed && pd(S.pp, S.pp, m, -P);
  66885. }
  66886. for (var $ = [], b = 0; b < y; b++) {
  66887. var T = r[b];
  66888. T.fixed || (kl($, T.p, T.pp), pd(T.p, T.p, $, h), Mr(T.pp, T.p));
  66889. }
  66890. h = h * 0.992;
  66891. var A = h < 0.01;
  66892. v && v(r, i, A), g && g(A);
  66893. }
  66894. };
  66895. }
  66896. function mVe(t) {
  66897. t.eachSeriesByType("graph", function(e) {
  66898. var n = e.coordinateSystem;
  66899. if (!(n && n.type !== "view"))
  66900. if (e.get("layout") === "force") {
  66901. var r = e.preservedPoints || {}, i = e.getGraph(), a = i.data, o = i.edgeData, s = e.getModel("force"), l = s.get("initLayout");
  66902. e.preservedPoints ? a.each(function(b) {
  66903. var _ = a.getId(b);
  66904. a.setItemLayout(b, r[_] || [NaN, NaN]);
  66905. }) : !l || l === "none" ? Ine(e) : l === "circular" && Yk(e, "value");
  66906. var u = a.getDataExtent("value"), c = o.getDataExtent("value"), f = s.get("repulsion"), d = s.get("edgeLength"), h = ue(f) ? f : [f, f], p = ue(d) ? d : [d, d];
  66907. p = [p[1], p[0]];
  66908. var v = a.mapArray("value", function(b, _) {
  66909. var O = a.getItemLayout(_), S = Lt(b, u, h);
  66910. return isNaN(S) && (S = (h[0] + h[1]) / 2), {
  66911. w: S,
  66912. rep: S,
  66913. fixed: a.getItemModel(_).get("fixed"),
  66914. p: !O || isNaN(O[0]) || isNaN(O[1]) ? null : O
  66915. };
  66916. }), g = o.mapArray("value", function(b, _) {
  66917. var O = i.getEdgeByIndex(_), S = Lt(b, c, p);
  66918. isNaN(S) && (S = (p[0] + p[1]) / 2);
  66919. var x = O.getModel(), C = ji(O.getModel().get(["lineStyle", "curveness"]), -Uk(O, e, _, !0), 0);
  66920. return {
  66921. n1: v[O.node1.dataIndex],
  66922. n2: v[O.node2.dataIndex],
  66923. d: S,
  66924. curveness: C,
  66925. ignoreForceLayout: x.get("ignoreForceLayout")
  66926. };
  66927. }), m = n.getBoundingRect(), y = gVe(v, g, {
  66928. rect: m,
  66929. gravity: s.get("gravity"),
  66930. friction: s.get("friction")
  66931. });
  66932. y.beforeStep(function(b, _) {
  66933. for (var O = 0, S = b.length; O < S; O++)
  66934. b[O].fixed && Mr(b[O].p, i.getNodeByIndex(O).getLayout());
  66935. }), y.afterStep(function(b, _, O) {
  66936. for (var S = 0, x = b.length; S < x; S++)
  66937. b[S].fixed || i.getNodeByIndex(S).setLayout(b[S].p), r[a.getId(S)] = b[S].p;
  66938. for (var S = 0, x = _.length; S < x; S++) {
  66939. var C = _[S], T = i.getEdgeByIndex(S), w = C.n1.p, P = C.n2.p, $ = T.getLayout();
  66940. $ = $ ? $.slice() : [], $[0] = $[0] || [], $[1] = $[1] || [], Mr($[0], w), Mr($[1], P), +C.curveness && ($[2] = [(w[0] + P[0]) / 2 - (w[1] - P[1]) * C.curveness, (w[1] + P[1]) / 2 - (P[0] - w[0]) * C.curveness]), T.setLayout($);
  66941. }
  66942. }), e.forceLayout = y, e.preservedPoints = r, y.step();
  66943. } else
  66944. e.forceLayout = null;
  66945. });
  66946. }
  66947. function yVe(t, e, n) {
  66948. var r = le(t.getBoxLayoutParams(), {
  66949. aspect: n
  66950. });
  66951. return Rn(r, {
  66952. width: e.getWidth(),
  66953. height: e.getHeight()
  66954. });
  66955. }
  66956. function bVe(t, e) {
  66957. var n = [];
  66958. return t.eachSeriesByType("graph", function(r) {
  66959. var i = r.get("coordinateSystem");
  66960. if (!i || i === "view") {
  66961. var a = r.getData(), o = a.mapArray(function(g) {
  66962. var m = a.getItemModel(g);
  66963. return [+m.get("x"), +m.get("y")];
  66964. }), s = [], l = [];
  66965. jx(o, s, l), l[0] - s[0] === 0 && (l[0] += 1, s[0] -= 1), l[1] - s[1] === 0 && (l[1] += 1, s[1] -= 1);
  66966. var u = (l[0] - s[0]) / (l[1] - s[1]), c = yVe(r, e, u);
  66967. isNaN(u) && (s = [c.x, c.y], l = [c.x + c.width, c.y + c.height]);
  66968. var f = l[0] - s[0], d = l[1] - s[1], h = c.width, p = c.height, v = r.coordinateSystem = new J0();
  66969. v.zoomLimit = r.get("scaleLimit"), v.setBoundingRect(s[0], s[1], f, d), v.setViewRect(c.x, c.y, h, p), v.setCenter(r.get("center"), e), v.setZoom(r.get("zoom")), n.push(v);
  66970. }
  66971. }), n;
  66972. }
  66973. var ZF = Un.prototype, _P = V0.prototype, Rne = (
  66974. /** @class */
  66975. /* @__PURE__ */ function() {
  66976. function t() {
  66977. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  66978. }
  66979. return t;
  66980. }()
  66981. );
  66982. (function(t) {
  66983. q(e, t);
  66984. function e() {
  66985. return t !== null && t.apply(this, arguments) || this;
  66986. }
  66987. return e;
  66988. })(Rne);
  66989. function OP(t) {
  66990. return isNaN(+t.cpx1) || isNaN(+t.cpy1);
  66991. }
  66992. var _Ve = (
  66993. /** @class */
  66994. function(t) {
  66995. q(e, t);
  66996. function e(n) {
  66997. var r = t.call(this, n) || this;
  66998. return r.type = "ec-line", r;
  66999. }
  67000. return e.prototype.getDefaultStyle = function() {
  67001. return {
  67002. stroke: "#000",
  67003. fill: null
  67004. };
  67005. }, e.prototype.getDefaultShape = function() {
  67006. return new Rne();
  67007. }, e.prototype.buildPath = function(n, r) {
  67008. OP(r) ? ZF.buildPath.call(this, n, r) : _P.buildPath.call(this, n, r);
  67009. }, e.prototype.pointAt = function(n) {
  67010. return OP(this.shape) ? ZF.pointAt.call(this, n) : _P.pointAt.call(this, n);
  67011. }, e.prototype.tangentAt = function(n) {
  67012. var r = this.shape, i = OP(r) ? [r.x2 - r.x1, r.y2 - r.y1] : _P.tangentAt.call(this, n);
  67013. return Rf(i, i);
  67014. }, e;
  67015. }(ot)
  67016. ), SP = ["fromSymbol", "toSymbol"];
  67017. function UF(t) {
  67018. return "_" + t + "Type";
  67019. }
  67020. function XF(t, e, n) {
  67021. var r = e.getItemVisual(n, t);
  67022. if (!r || r === "none")
  67023. return r;
  67024. var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = xp(i), u = Vf(o || 0, l);
  67025. return r + l + u + (a || "") + (s || "");
  67026. }
  67027. function YF(t, e, n) {
  67028. var r = e.getItemVisual(n, t);
  67029. if (!(!r || r === "none")) {
  67030. var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = xp(i), u = Vf(o || 0, l), c = $n(r, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
  67031. return c.__specifiedRotation = a == null || isNaN(a) ? void 0 : +a * Math.PI / 180 || 0, c.name = t, c;
  67032. }
  67033. }
  67034. function OVe(t) {
  67035. var e = new _Ve({
  67036. name: "line",
  67037. subPixelOptimize: !0
  67038. });
  67039. return OE(e.shape, t), e;
  67040. }
  67041. function OE(t, e) {
  67042. t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  67043. var n = e[2];
  67044. n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN);
  67045. }
  67046. var qk = (
  67047. /** @class */
  67048. function(t) {
  67049. q(e, t);
  67050. function e(n, r, i) {
  67051. var a = t.call(this) || this;
  67052. return a._createLine(n, r, i), a;
  67053. }
  67054. return e.prototype._createLine = function(n, r, i) {
  67055. var a = n.hostModel, o = n.getItemLayout(r), s = OVe(o);
  67056. s.shape.percent = 0, Yt(s, {
  67057. shape: {
  67058. percent: 1
  67059. }
  67060. }, a, r), this.add(s), k(SP, function(l) {
  67061. var u = YF(l, n, r);
  67062. this.add(u), this[UF(l)] = XF(l, n, r);
  67063. }, this), this._updateCommonStl(n, r, i);
  67064. }, e.prototype.updateData = function(n, r, i) {
  67065. var a = n.hostModel, o = this.childOfName("line"), s = n.getItemLayout(r), l = {
  67066. shape: {}
  67067. };
  67068. OE(l.shape, s), Ct(o, l, a, r), k(SP, function(u) {
  67069. var c = XF(u, n, r), f = UF(u);
  67070. if (this[f] !== c) {
  67071. this.remove(this.childOfName(u));
  67072. var d = YF(u, n, r);
  67073. this.add(d);
  67074. }
  67075. this[f] = c;
  67076. }, this), this._updateCommonStl(n, r, i);
  67077. }, e.prototype.getLinePath = function() {
  67078. return this.childAt(0);
  67079. }, e.prototype._updateCommonStl = function(n, r, i) {
  67080. var a = n.hostModel, o = this.childOfName("line"), s = i && i.emphasisLineStyle, l = i && i.blurLineStyle, u = i && i.selectLineStyle, c = i && i.labelStatesModels, f = i && i.emphasisDisabled, d = i && i.focus, h = i && i.blurScope;
  67081. if (!i || n.hasItemOption) {
  67082. var p = n.getItemModel(r), v = p.getModel("emphasis");
  67083. s = v.getModel("lineStyle").getLineStyle(), l = p.getModel(["blur", "lineStyle"]).getLineStyle(), u = p.getModel(["select", "lineStyle"]).getLineStyle(), f = v.get("disabled"), d = v.get("focus"), h = v.get("blurScope"), c = er(p);
  67084. }
  67085. var g = n.getItemVisual(r, "style"), m = g.stroke;
  67086. o.useStyle(g), o.style.fill = null, o.style.strokeNoScale = !0, o.ensureState("emphasis").style = s, o.ensureState("blur").style = l, o.ensureState("select").style = u, k(SP, function(S) {
  67087. var x = this.childOfName(S);
  67088. if (x) {
  67089. x.setColor(m), x.style.opacity = g.opacity;
  67090. for (var C = 0; C < ni.length; C++) {
  67091. var T = ni[C], w = o.getState(T);
  67092. if (w) {
  67093. var P = w.style || {}, $ = x.ensureState(T), A = $.style || ($.style = {});
  67094. P.stroke != null && (A[x.__isEmptyBrush ? "stroke" : "fill"] = P.stroke), P.opacity != null && (A.opacity = P.opacity);
  67095. }
  67096. }
  67097. x.markRedraw();
  67098. }
  67099. }, this);
  67100. var y = a.getRawValue(r);
  67101. Pr(this, c, {
  67102. labelDataIndex: r,
  67103. labelFetcher: {
  67104. getFormattedLabel: function(S, x) {
  67105. return a.getFormattedLabel(S, x, n.dataType);
  67106. }
  67107. },
  67108. inheritColor: m || "#000",
  67109. defaultOpacity: g.opacity,
  67110. defaultText: (y == null ? n.getName(r) : isFinite(y) ? mn(y) : y) + ""
  67111. });
  67112. var b = this.getTextContent();
  67113. if (b) {
  67114. var _ = c.normal;
  67115. b.__align = b.style.align, b.__verticalAlign = b.style.verticalAlign, b.__position = _.get("position") || "middle";
  67116. var O = _.get("distance");
  67117. ue(O) || (O = [O, O]), b.__labelDistance = O;
  67118. }
  67119. this.setTextConfig({
  67120. position: null,
  67121. local: !0,
  67122. inside: !1
  67123. // Can't be inside for stroke element.
  67124. }), bn(this, d, h, f);
  67125. }, e.prototype.highlight = function() {
  67126. js(this);
  67127. }, e.prototype.downplay = function() {
  67128. Zs(this);
  67129. }, e.prototype.updateLayout = function(n, r) {
  67130. this.setLinePoints(n.getItemLayout(r));
  67131. }, e.prototype.setLinePoints = function(n) {
  67132. var r = this.childOfName("line");
  67133. OE(r.shape, n), r.dirty();
  67134. }, e.prototype.beforeUpdate = function() {
  67135. var n = this, r = n.childOfName("fromSymbol"), i = n.childOfName("toSymbol"), a = n.getTextContent();
  67136. if (!r && !i && (!a || a.ignore))
  67137. return;
  67138. for (var o = 1, s = this.parent; s; )
  67139. s.scaleX && (o /= s.scaleX), s = s.parent;
  67140. var l = n.childOfName("line");
  67141. if (!this.__dirty && !l.__dirty)
  67142. return;
  67143. var u = l.shape.percent, c = l.pointAt(0), f = l.pointAt(u), d = kl([], f, c);
  67144. Rf(d, d);
  67145. function h(w, P) {
  67146. var $ = w.__specifiedRotation;
  67147. if ($ == null) {
  67148. var A = l.tangentAt(P);
  67149. w.attr("rotation", (P === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(A[1], A[0]));
  67150. } else
  67151. w.attr("rotation", $);
  67152. }
  67153. if (r && (r.setPosition(c), h(r, 0), r.scaleX = r.scaleY = o * u, r.markRedraw()), i && (i.setPosition(f), h(i, 1), i.scaleX = i.scaleY = o * u, i.markRedraw()), a && !a.ignore) {
  67154. a.x = a.y = 0, a.originX = a.originY = 0;
  67155. var p = void 0, v = void 0, g = a.__labelDistance, m = g[0] * o, y = g[1] * o, b = u / 2, _ = l.tangentAt(b), O = [_[1], -_[0]], S = l.pointAt(b);
  67156. O[1] > 0 && (O[0] = -O[0], O[1] = -O[1]);
  67157. var x = _[0] < 0 ? -1 : 1;
  67158. if (a.__position !== "start" && a.__position !== "end") {
  67159. var C = -Math.atan2(_[1], _[0]);
  67160. f[0] < c[0] && (C = Math.PI + C), a.rotation = C;
  67161. }
  67162. var T = void 0;
  67163. switch (a.__position) {
  67164. case "insideStartTop":
  67165. case "insideMiddleTop":
  67166. case "insideEndTop":
  67167. case "middle":
  67168. T = -y, v = "bottom";
  67169. break;
  67170. case "insideStartBottom":
  67171. case "insideMiddleBottom":
  67172. case "insideEndBottom":
  67173. T = y, v = "top";
  67174. break;
  67175. default:
  67176. T = 0, v = "middle";
  67177. }
  67178. switch (a.__position) {
  67179. case "end":
  67180. a.x = d[0] * m + f[0], a.y = d[1] * y + f[1], p = d[0] > 0.8 ? "left" : d[0] < -0.8 ? "right" : "center", v = d[1] > 0.8 ? "top" : d[1] < -0.8 ? "bottom" : "middle";
  67181. break;
  67182. case "start":
  67183. a.x = -d[0] * m + c[0], a.y = -d[1] * y + c[1], p = d[0] > 0.8 ? "right" : d[0] < -0.8 ? "left" : "center", v = d[1] > 0.8 ? "bottom" : d[1] < -0.8 ? "top" : "middle";
  67184. break;
  67185. case "insideStartTop":
  67186. case "insideStart":
  67187. case "insideStartBottom":
  67188. a.x = m * x + c[0], a.y = c[1] + T, p = _[0] < 0 ? "right" : "left", a.originX = -m * x, a.originY = -T;
  67189. break;
  67190. case "insideMiddleTop":
  67191. case "insideMiddle":
  67192. case "insideMiddleBottom":
  67193. case "middle":
  67194. a.x = S[0], a.y = S[1] + T, p = "center", a.originY = -T;
  67195. break;
  67196. case "insideEndTop":
  67197. case "insideEnd":
  67198. case "insideEndBottom":
  67199. a.x = -m * x + f[0], a.y = f[1] + T, p = _[0] >= 0 ? "right" : "left", a.originX = m * x, a.originY = -T;
  67200. break;
  67201. }
  67202. a.scaleX = a.scaleY = o, a.setStyle({
  67203. // Use the user specified text align and baseline first
  67204. verticalAlign: a.__verticalAlign || v,
  67205. align: a.__align || p
  67206. });
  67207. }
  67208. }, e;
  67209. }(Ve)
  67210. ), Kk = (
  67211. /** @class */
  67212. function() {
  67213. function t(e) {
  67214. this.group = new Ve(), this._LineCtor = e || qk;
  67215. }
  67216. return t.prototype.updateData = function(e) {
  67217. var n = this;
  67218. this._progressiveEls = null;
  67219. var r = this, i = r.group, a = r._lineData;
  67220. r._lineData = e, a || i.removeAll();
  67221. var o = qF(e);
  67222. e.diff(a).add(function(s) {
  67223. n._doAdd(e, s, o);
  67224. }).update(function(s, l) {
  67225. n._doUpdate(a, e, l, s, o);
  67226. }).remove(function(s) {
  67227. i.remove(a.getItemGraphicEl(s));
  67228. }).execute();
  67229. }, t.prototype.updateLayout = function() {
  67230. var e = this._lineData;
  67231. e && e.eachItemGraphicEl(function(n, r) {
  67232. n.updateLayout(e, r);
  67233. }, this);
  67234. }, t.prototype.incrementalPrepareUpdate = function(e) {
  67235. this._seriesScope = qF(e), this._lineData = null, this.group.removeAll();
  67236. }, t.prototype.incrementalUpdate = function(e, n) {
  67237. this._progressiveEls = [];
  67238. function r(s) {
  67239. !s.isGroup && !SVe(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
  67240. }
  67241. for (var i = e.start; i < e.end; i++) {
  67242. var a = n.getItemLayout(i);
  67243. if (xP(a)) {
  67244. var o = new this._LineCtor(n, i, this._seriesScope);
  67245. o.traverse(r), this.group.add(o), n.setItemGraphicEl(i, o), this._progressiveEls.push(o);
  67246. }
  67247. }
  67248. }, t.prototype.remove = function() {
  67249. this.group.removeAll();
  67250. }, t.prototype.eachRendered = function(e) {
  67251. Tu(this._progressiveEls || this.group, e);
  67252. }, t.prototype._doAdd = function(e, n, r) {
  67253. var i = e.getItemLayout(n);
  67254. if (xP(i)) {
  67255. var a = new this._LineCtor(e, n, r);
  67256. e.setItemGraphicEl(n, a), this.group.add(a);
  67257. }
  67258. }, t.prototype._doUpdate = function(e, n, r, i, a) {
  67259. var o = e.getItemGraphicEl(r);
  67260. if (!xP(n.getItemLayout(i))) {
  67261. this.group.remove(o);
  67262. return;
  67263. }
  67264. o ? o.updateData(n, i, a) : o = new this._LineCtor(n, i, a), n.setItemGraphicEl(i, o), this.group.add(o);
  67265. }, t;
  67266. }()
  67267. );
  67268. function SVe(t) {
  67269. return t.animators && t.animators.length > 0;
  67270. }
  67271. function qF(t) {
  67272. var e = t.hostModel, n = e.getModel("emphasis");
  67273. return {
  67274. lineStyle: e.getModel("lineStyle").getLineStyle(),
  67275. emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
  67276. blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
  67277. selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
  67278. emphasisDisabled: n.get("disabled"),
  67279. blurScope: n.get("blurScope"),
  67280. focus: n.get("focus"),
  67281. labelStatesModels: er(e)
  67282. };
  67283. }
  67284. function KF(t) {
  67285. return isNaN(t[0]) || isNaN(t[1]);
  67286. }
  67287. function xP(t) {
  67288. return t && !KF(t[0]) && !KF(t[1]);
  67289. }
  67290. var wP = [], CP = [], TP = [], vd = ir, PP = Ul, JF = Math.abs;
  67291. function eW(t, e, n) {
  67292. for (var r = t[0], i = t[1], a = t[2], o = 1 / 0, s, l = n * n, u = 0.1, c = 0.1; c <= 0.9; c += 0.1) {
  67293. wP[0] = vd(r[0], i[0], a[0], c), wP[1] = vd(r[1], i[1], a[1], c);
  67294. var f = JF(PP(wP, e) - l);
  67295. f < o && (o = f, s = c);
  67296. }
  67297. for (var d = 0; d < 32; d++) {
  67298. var h = s + u;
  67299. CP[0] = vd(r[0], i[0], a[0], s), CP[1] = vd(r[1], i[1], a[1], s), TP[0] = vd(r[0], i[0], a[0], h), TP[1] = vd(r[1], i[1], a[1], h);
  67300. var f = PP(CP, e) - l;
  67301. if (JF(f) < 0.01)
  67302. break;
  67303. var p = PP(TP, e) - l;
  67304. u /= 2, f < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
  67305. }
  67306. return s;
  67307. }
  67308. function $P(t, e) {
  67309. var n = [], r = ym, i = [[], [], []], a = [[], []], o = [];
  67310. e /= 2, t.eachEdge(function(s, l) {
  67311. var u = s.getLayout(), c = s.getVisual("fromSymbol"), f = s.getVisual("toSymbol");
  67312. u.__original || (u.__original = [Zo(u[0]), Zo(u[1])], u[2] && u.__original.push(Zo(u[2])));
  67313. var d = u.__original;
  67314. if (u[2] != null) {
  67315. if (Mr(i[0], d[0]), Mr(i[1], d[2]), Mr(i[2], d[1]), c && c !== "none") {
  67316. var h = Kv(s.node1), p = eW(i, d[0], h * e);
  67317. r(i[0][0], i[1][0], i[2][0], p, n), i[0][0] = n[3], i[1][0] = n[4], r(i[0][1], i[1][1], i[2][1], p, n), i[0][1] = n[3], i[1][1] = n[4];
  67318. }
  67319. if (f && f !== "none") {
  67320. var h = Kv(s.node2), p = eW(i, d[1], h * e);
  67321. r(i[0][0], i[1][0], i[2][0], p, n), i[1][0] = n[1], i[2][0] = n[2], r(i[0][1], i[1][1], i[2][1], p, n), i[1][1] = n[1], i[2][1] = n[2];
  67322. }
  67323. Mr(u[0], i[0]), Mr(u[1], i[2]), Mr(u[2], i[1]);
  67324. } else {
  67325. if (Mr(a[0], d[0]), Mr(a[1], d[1]), kl(o, a[1], a[0]), Rf(o, o), c && c !== "none") {
  67326. var h = Kv(s.node1);
  67327. U1(a[0], a[0], o, h * e);
  67328. }
  67329. if (f && f !== "none") {
  67330. var h = Kv(s.node2);
  67331. U1(a[1], a[1], o, -h * e);
  67332. }
  67333. Mr(u[0], a[0]), Mr(u[1], a[1]);
  67334. }
  67335. });
  67336. }
  67337. function tW(t) {
  67338. return t.type === "view";
  67339. }
  67340. var xVe = (
  67341. /** @class */
  67342. function(t) {
  67343. q(e, t);
  67344. function e() {
  67345. var n = t !== null && t.apply(this, arguments) || this;
  67346. return n.type = e.type, n;
  67347. }
  67348. return e.prototype.init = function(n, r) {
  67349. var i = new Z0(), a = new Kk(), o = this.group;
  67350. this._controller = new K0(r.getZr()), this._controllerHost = {
  67351. target: o
  67352. }, o.add(i.group), o.add(a.group), this._symbolDraw = i, this._lineDraw = a, this._firstRender = !0;
  67353. }, e.prototype.render = function(n, r, i) {
  67354. var a = this, o = n.coordinateSystem;
  67355. this._model = n;
  67356. var s = this._symbolDraw, l = this._lineDraw, u = this.group;
  67357. if (tW(o)) {
  67358. var c = {
  67359. x: o.x,
  67360. y: o.y,
  67361. scaleX: o.scaleX,
  67362. scaleY: o.scaleY
  67363. };
  67364. this._firstRender ? u.attr(c) : Ct(u, c, n);
  67365. }
  67366. $P(n.getGraph(), qv(n));
  67367. var f = n.getData();
  67368. s.updateData(f);
  67369. var d = n.getEdgeData();
  67370. l.updateData(d), this._updateNodeAndLinkScale(), this._updateController(n, r, i), clearTimeout(this._layoutTimeout);
  67371. var h = n.forceLayout, p = n.get(["force", "layoutAnimation"]);
  67372. h && this._startForceLayoutIteration(h, p);
  67373. var v = n.get("layout");
  67374. f.graph.eachNode(function(b) {
  67375. var _ = b.dataIndex, O = b.getGraphicEl(), S = b.getModel();
  67376. if (O) {
  67377. O.off("drag").off("dragend");
  67378. var x = S.get("draggable");
  67379. x && O.on("drag", function(T) {
  67380. switch (v) {
  67381. case "force":
  67382. h.warmUp(), !a._layouting && a._startForceLayoutIteration(h, p), h.setFixed(_), f.setItemLayout(_, [O.x, O.y]);
  67383. break;
  67384. case "circular":
  67385. f.setItemLayout(_, [O.x, O.y]), b.setLayout({
  67386. fixed: !0
  67387. }, !0), Yk(n, "symbolSize", b, [T.offsetX, T.offsetY]), a.updateLayout(n);
  67388. break;
  67389. case "none":
  67390. default:
  67391. f.setItemLayout(_, [O.x, O.y]), Xk(n.getGraph(), n), a.updateLayout(n);
  67392. break;
  67393. }
  67394. }).on("dragend", function() {
  67395. h && h.setUnfixed(_);
  67396. }), O.setDraggable(x, !!S.get("cursor"));
  67397. var C = S.get(["emphasis", "focus"]);
  67398. C === "adjacency" && (Fe(O).focus = b.getAdjacentDataIndices());
  67399. }
  67400. }), f.graph.eachEdge(function(b) {
  67401. var _ = b.getGraphicEl(), O = b.getModel().get(["emphasis", "focus"]);
  67402. _ && O === "adjacency" && (Fe(_).focus = {
  67403. edge: [b.dataIndex],
  67404. node: [b.node1.dataIndex, b.node2.dataIndex]
  67405. });
  67406. });
  67407. var g = n.get("layout") === "circular" && n.get(["circular", "rotateLabel"]), m = f.getLayout("cx"), y = f.getLayout("cy");
  67408. f.graph.eachNode(function(b) {
  67409. Dne(b, g, m, y);
  67410. }), this._firstRender = !1;
  67411. }, e.prototype.dispose = function() {
  67412. this.remove(), this._controller && this._controller.dispose(), this._controllerHost = null;
  67413. }, e.prototype._startForceLayoutIteration = function(n, r) {
  67414. var i = this;
  67415. (function a() {
  67416. n.step(function(o) {
  67417. i.updateLayout(i._model), (i._layouting = !o) && (r ? i._layoutTimeout = setTimeout(a, 16) : a());
  67418. });
  67419. })();
  67420. }, e.prototype._updateController = function(n, r, i) {
  67421. var a = this, o = this._controller, s = this._controllerHost, l = this.group;
  67422. if (o.setPointerChecker(function(u, c, f) {
  67423. var d = l.getBoundingRect();
  67424. return d.applyTransform(l.transform), d.contain(c, f) && !mw(u, i, n);
  67425. }), !tW(n.coordinateSystem)) {
  67426. o.disable();
  67427. return;
  67428. }
  67429. o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
  67430. Vk(s, u.dx, u.dy), i.dispatchAction({
  67431. seriesId: n.id,
  67432. type: "graphRoam",
  67433. dx: u.dx,
  67434. dy: u.dy
  67435. });
  67436. }).on("zoom", function(u) {
  67437. Fk(s, u.scale, u.originX, u.originY), i.dispatchAction({
  67438. seriesId: n.id,
  67439. type: "graphRoam",
  67440. zoom: u.scale,
  67441. originX: u.originX,
  67442. originY: u.originY
  67443. }), a._updateNodeAndLinkScale(), $P(n.getGraph(), qv(n)), a._lineDraw.updateLayout(), i.updateLabelLayout();
  67444. });
  67445. }, e.prototype._updateNodeAndLinkScale = function() {
  67446. var n = this._model, r = n.getData(), i = qv(n);
  67447. r.eachItemGraphicEl(function(a, o) {
  67448. a && a.setSymbolScale(i);
  67449. });
  67450. }, e.prototype.updateLayout = function(n) {
  67451. $P(n.getGraph(), qv(n)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
  67452. }, e.prototype.remove = function() {
  67453. clearTimeout(this._layoutTimeout), this._layouting = !1, this._layoutTimeout = null, this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
  67454. }, e.type = "graph", e;
  67455. }(zt)
  67456. );
  67457. function gd(t) {
  67458. return "_EC_" + t;
  67459. }
  67460. var wVe = (
  67461. /** @class */
  67462. function() {
  67463. function t(e) {
  67464. this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
  67465. }
  67466. return t.prototype.isDirected = function() {
  67467. return this._directed;
  67468. }, t.prototype.addNode = function(e, n) {
  67469. e = e == null ? "" + n : "" + e;
  67470. var r = this._nodesMap;
  67471. if (r[gd(e)]) {
  67472. process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
  67473. return;
  67474. }
  67475. var i = new gc(e, n);
  67476. return i.hostGraph = this, this.nodes.push(i), r[gd(e)] = i, i;
  67477. }, t.prototype.getNodeByIndex = function(e) {
  67478. var n = this.data.getRawIndex(e);
  67479. return this.nodes[n];
  67480. }, t.prototype.getNodeById = function(e) {
  67481. return this._nodesMap[gd(e)];
  67482. }, t.prototype.addEdge = function(e, n, r) {
  67483. var i = this._nodesMap, a = this._edgesMap;
  67484. if (St(e) && (e = this.nodes[e]), St(n) && (n = this.nodes[n]), e instanceof gc || (e = i[gd(e)]), n instanceof gc || (n = i[gd(n)]), !(!e || !n)) {
  67485. var o = e.id + "-" + n.id, s = new kne(e, n, r);
  67486. return s.hostGraph = this, this._directed && (e.outEdges.push(s), n.inEdges.push(s)), e.edges.push(s), e !== n && n.edges.push(s), this.edges.push(s), a[o] = s, s;
  67487. }
  67488. }, t.prototype.getEdgeByIndex = function(e) {
  67489. var n = this.edgeData.getRawIndex(e);
  67490. return this.edges[n];
  67491. }, t.prototype.getEdge = function(e, n) {
  67492. e instanceof gc && (e = e.id), n instanceof gc && (n = n.id);
  67493. var r = this._edgesMap;
  67494. return this._directed ? r[e + "-" + n] : r[e + "-" + n] || r[n + "-" + e];
  67495. }, t.prototype.eachNode = function(e, n) {
  67496. for (var r = this.nodes, i = r.length, a = 0; a < i; a++)
  67497. r[a].dataIndex >= 0 && e.call(n, r[a], a);
  67498. }, t.prototype.eachEdge = function(e, n) {
  67499. for (var r = this.edges, i = r.length, a = 0; a < i; a++)
  67500. r[a].dataIndex >= 0 && r[a].node1.dataIndex >= 0 && r[a].node2.dataIndex >= 0 && e.call(n, r[a], a);
  67501. }, t.prototype.breadthFirstTraverse = function(e, n, r, i) {
  67502. if (n instanceof gc || (n = this._nodesMap[gd(n)]), !!n) {
  67503. for (var a = r === "out" ? "outEdges" : r === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
  67504. this.nodes[o].__visited = !1;
  67505. if (!e.call(i, n, null))
  67506. for (var s = [n]; s.length; )
  67507. for (var l = s.shift(), u = l[a], o = 0; o < u.length; o++) {
  67508. var c = u[o], f = c.node1 === l ? c.node2 : c.node1;
  67509. if (!f.__visited) {
  67510. if (e.call(i, f, l))
  67511. return;
  67512. s.push(f), f.__visited = !0;
  67513. }
  67514. }
  67515. }
  67516. }, t.prototype.update = function() {
  67517. for (var e = this.data, n = this.edgeData, r = this.nodes, i = this.edges, a = 0, o = r.length; a < o; a++)
  67518. r[a].dataIndex = -1;
  67519. for (var a = 0, o = e.count(); a < o; a++)
  67520. r[e.getRawIndex(a)].dataIndex = a;
  67521. n.filterSelf(function(s) {
  67522. var l = i[n.getRawIndex(s)];
  67523. return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
  67524. });
  67525. for (var a = 0, o = i.length; a < o; a++)
  67526. i[a].dataIndex = -1;
  67527. for (var a = 0, o = n.count(); a < o; a++)
  67528. i[n.getRawIndex(a)].dataIndex = a;
  67529. }, t.prototype.clone = function() {
  67530. for (var e = new t(this._directed), n = this.nodes, r = this.edges, i = 0; i < n.length; i++)
  67531. e.addNode(n[i].id, n[i].dataIndex);
  67532. for (var i = 0; i < r.length; i++) {
  67533. var a = r[i];
  67534. e.addEdge(a.node1.id, a.node2.id, a.dataIndex);
  67535. }
  67536. return e;
  67537. }, t;
  67538. }()
  67539. ), gc = (
  67540. /** @class */
  67541. function() {
  67542. function t(e, n) {
  67543. this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e ?? "", this.dataIndex = n ?? -1;
  67544. }
  67545. return t.prototype.degree = function() {
  67546. return this.edges.length;
  67547. }, t.prototype.inDegree = function() {
  67548. return this.inEdges.length;
  67549. }, t.prototype.outDegree = function() {
  67550. return this.outEdges.length;
  67551. }, t.prototype.getModel = function(e) {
  67552. if (!(this.dataIndex < 0)) {
  67553. var n = this.hostGraph, r = n.data.getItemModel(this.dataIndex);
  67554. return r.getModel(e);
  67555. }
  67556. }, t.prototype.getAdjacentDataIndices = function() {
  67557. for (var e = {
  67558. edge: [],
  67559. node: []
  67560. }, n = 0; n < this.edges.length; n++) {
  67561. var r = this.edges[n];
  67562. r.dataIndex < 0 || (e.edge.push(r.dataIndex), e.node.push(r.node1.dataIndex, r.node2.dataIndex));
  67563. }
  67564. return e;
  67565. }, t.prototype.getTrajectoryDataIndices = function() {
  67566. for (var e = Pe(), n = Pe(), r = 0; r < this.edges.length; r++) {
  67567. var i = this.edges[r];
  67568. if (!(i.dataIndex < 0)) {
  67569. e.set(i.dataIndex, !0);
  67570. for (var a = [i.node1], o = [i.node2], s = 0; s < a.length; ) {
  67571. var l = a[s];
  67572. s++, n.set(l.dataIndex, !0);
  67573. for (var u = 0; u < l.inEdges.length; u++)
  67574. e.set(l.inEdges[u].dataIndex, !0), a.push(l.inEdges[u].node1);
  67575. }
  67576. for (s = 0; s < o.length; ) {
  67577. var c = o[s];
  67578. s++, n.set(c.dataIndex, !0);
  67579. for (var u = 0; u < c.outEdges.length; u++)
  67580. e.set(c.outEdges[u].dataIndex, !0), o.push(c.outEdges[u].node2);
  67581. }
  67582. }
  67583. }
  67584. return {
  67585. edge: e.keys(),
  67586. node: n.keys()
  67587. };
  67588. }, t;
  67589. }()
  67590. ), kne = (
  67591. /** @class */
  67592. function() {
  67593. function t(e, n, r) {
  67594. this.dataIndex = -1, this.node1 = e, this.node2 = n, this.dataIndex = r ?? -1;
  67595. }
  67596. return t.prototype.getModel = function(e) {
  67597. if (!(this.dataIndex < 0)) {
  67598. var n = this.hostGraph, r = n.edgeData.getItemModel(this.dataIndex);
  67599. return r.getModel(e);
  67600. }
  67601. }, t.prototype.getAdjacentDataIndices = function() {
  67602. return {
  67603. edge: [this.dataIndex],
  67604. node: [this.node1.dataIndex, this.node2.dataIndex]
  67605. };
  67606. }, t.prototype.getTrajectoryDataIndices = function() {
  67607. var e = Pe(), n = Pe();
  67608. e.set(this.dataIndex, !0);
  67609. for (var r = [this.node1], i = [this.node2], a = 0; a < r.length; ) {
  67610. var o = r[a];
  67611. a++, n.set(o.dataIndex, !0);
  67612. for (var s = 0; s < o.inEdges.length; s++)
  67613. e.set(o.inEdges[s].dataIndex, !0), r.push(o.inEdges[s].node1);
  67614. }
  67615. for (a = 0; a < i.length; ) {
  67616. var l = i[a];
  67617. a++, n.set(l.dataIndex, !0);
  67618. for (var s = 0; s < l.outEdges.length; s++)
  67619. e.set(l.outEdges[s].dataIndex, !0), i.push(l.outEdges[s].node2);
  67620. }
  67621. return {
  67622. edge: e.keys(),
  67623. node: n.keys()
  67624. };
  67625. }, t;
  67626. }()
  67627. );
  67628. function Lne(t, e) {
  67629. return {
  67630. /**
  67631. * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
  67632. */
  67633. getValue: function(n) {
  67634. var r = this[t][e];
  67635. return r.getStore().get(r.getDimensionIndex(n || "value"), this.dataIndex);
  67636. },
  67637. // TODO: TYPE stricter type.
  67638. setVisual: function(n, r) {
  67639. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, r);
  67640. },
  67641. getVisual: function(n) {
  67642. return this[t][e].getItemVisual(this.dataIndex, n);
  67643. },
  67644. setLayout: function(n, r) {
  67645. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, r);
  67646. },
  67647. getLayout: function() {
  67648. return this[t][e].getItemLayout(this.dataIndex);
  67649. },
  67650. getGraphicEl: function() {
  67651. return this[t][e].getItemGraphicEl(this.dataIndex);
  67652. },
  67653. getRawIndex: function() {
  67654. return this[t][e].getRawIndex(this.dataIndex);
  67655. }
  67656. };
  67657. }
  67658. xn(gc, Lne("hostGraph", "data"));
  67659. xn(kne, Lne("hostGraph", "edgeData"));
  67660. function Nne(t, e, n, r, i) {
  67661. for (var a = new wVe(r), o = 0; o < t.length; o++)
  67662. a.addNode(Tn(
  67663. // Id, name, dataIndex
  67664. t[o].id,
  67665. t[o].name,
  67666. o
  67667. ), o);
  67668. for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
  67669. var c = e[o], f = c.source, d = c.target;
  67670. a.addEdge(f, d, u) && (l.push(c), s.push(Tn(Vn(c.id, null), f + " > " + d)), u++);
  67671. }
  67672. var h = n.get("coordinateSystem"), p;
  67673. if (h === "cartesian2d" || h === "polar")
  67674. p = us(t, n);
  67675. else {
  67676. var v = zf.get(h), g = v ? v.dimensions || [] : [];
  67677. et(g, "value") < 0 && g.concat(["value"]);
  67678. var m = wp(t, {
  67679. coordDimensions: g,
  67680. encodeDefine: n.getEncode()
  67681. }).dimensions;
  67682. p = new Lr(m, n), p.initData(t);
  67683. }
  67684. var y = new Lr(["value"], n);
  67685. return y.initData(l, s), i && i(p, y), yne({
  67686. mainData: p,
  67687. struct: a,
  67688. structAttr: "graph",
  67689. datas: {
  67690. node: p,
  67691. edge: y
  67692. },
  67693. datasAttr: {
  67694. node: "data",
  67695. edge: "edgeData"
  67696. }
  67697. }), a.update(), a;
  67698. }
  67699. var CVe = (
  67700. /** @class */
  67701. function(t) {
  67702. q(e, t);
  67703. function e() {
  67704. var n = t !== null && t.apply(this, arguments) || this;
  67705. return n.type = e.type, n.hasSymbolVisual = !0, n;
  67706. }
  67707. return e.prototype.init = function(n) {
  67708. t.prototype.init.apply(this, arguments);
  67709. var r = this;
  67710. function i() {
  67711. return r._categoriesData;
  67712. }
  67713. this.legendVisualProvider = new q0(i, i), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
  67714. }, e.prototype.mergeOption = function(n) {
  67715. t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
  67716. }, e.prototype.mergeDefaultAndTheme = function(n) {
  67717. t.prototype.mergeDefaultAndTheme.apply(this, arguments), gf(n, "edgeLabel", ["show"]);
  67718. }, e.prototype.getInitialData = function(n, r) {
  67719. var i = n.edges || n.links || [], a = n.data || n.nodes || [], o = this;
  67720. if (a && i) {
  67721. fVe(this);
  67722. var s = Nne(a, i, this, !0, l);
  67723. return k(s.edges, function(u) {
  67724. dVe(u.node1, u.node2, this, u.dataIndex);
  67725. }, this), s.data;
  67726. }
  67727. function l(u, c) {
  67728. u.wrapMethod("getItemModel", function(p) {
  67729. var v = o._categoriesModels, g = p.getShallow("category"), m = v[g];
  67730. return m && (m.parentModel = p.parentModel, p.parentModel = m), p;
  67731. });
  67732. var f = Wt.prototype.getModel;
  67733. function d(p, v) {
  67734. var g = f.call(this, p, v);
  67735. return g.resolveParentPath = h, g;
  67736. }
  67737. c.wrapMethod("getItemModel", function(p) {
  67738. return p.resolveParentPath = h, p.getModel = d, p;
  67739. });
  67740. function h(p) {
  67741. if (p && (p[0] === "label" || p[1] === "label")) {
  67742. var v = p.slice();
  67743. return p[0] === "label" ? v[0] = "edgeLabel" : p[1] === "label" && (v[1] = "edgeLabel"), v;
  67744. }
  67745. return p;
  67746. }
  67747. }
  67748. }, e.prototype.getGraph = function() {
  67749. return this.getData().graph;
  67750. }, e.prototype.getEdgeData = function() {
  67751. return this.getGraph().edgeData;
  67752. }, e.prototype.getCategoriesData = function() {
  67753. return this._categoriesData;
  67754. }, e.prototype.formatTooltip = function(n, r, i) {
  67755. if (i === "edge") {
  67756. var a = this.getData(), o = this.getDataParams(n, i), s = a.graph.getEdgeByIndex(n), l = a.getName(s.node1.dataIndex), u = a.getName(s.node2.dataIndex), c = [];
  67757. return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
  67758. name: c.join(" > "),
  67759. value: o.value,
  67760. noValue: o.value == null
  67761. });
  67762. }
  67763. var f = iee({
  67764. series: this,
  67765. dataIndex: n,
  67766. multipleSeries: r
  67767. });
  67768. return f;
  67769. }, e.prototype._updateCategoriesData = function() {
  67770. var n = ce(this.option.categories || [], function(i) {
  67771. return i.value != null ? i : le({
  67772. value: 0
  67773. }, i);
  67774. }), r = new Lr(["value"], this);
  67775. r.initData(n), this._categoriesData = r, this._categoriesModels = r.mapArray(function(i) {
  67776. return r.getItemModel(i);
  67777. });
  67778. }, e.prototype.setZoom = function(n) {
  67779. this.option.zoom = n;
  67780. }, e.prototype.setCenter = function(n) {
  67781. this.option.center = n;
  67782. }, e.prototype.isAnimationEnabled = function() {
  67783. return t.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"]));
  67784. }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  67785. // zlevel: 0,
  67786. z: 2,
  67787. coordinateSystem: "view",
  67788. // Default option for all coordinate systems
  67789. // xAxisIndex: 0,
  67790. // yAxisIndex: 0,
  67791. // polarIndex: 0,
  67792. // geoIndex: 0,
  67793. legendHoverLink: !0,
  67794. layout: null,
  67795. // Configuration of circular layout
  67796. circular: {
  67797. rotateLabel: !1
  67798. },
  67799. // Configuration of force directed layout
  67800. force: {
  67801. initLayout: null,
  67802. // Node repulsion. Can be an array to represent range.
  67803. repulsion: [0, 50],
  67804. gravity: 0.1,
  67805. // Initial friction
  67806. friction: 0.6,
  67807. // Edge length. Can be an array to represent range.
  67808. edgeLength: 30,
  67809. layoutAnimation: !0
  67810. },
  67811. left: "center",
  67812. top: "center",
  67813. // right: null,
  67814. // bottom: null,
  67815. // width: '80%',
  67816. // height: '80%',
  67817. symbol: "circle",
  67818. symbolSize: 10,
  67819. edgeSymbol: ["none", "none"],
  67820. edgeSymbolSize: 10,
  67821. edgeLabel: {
  67822. position: "middle",
  67823. distance: 5
  67824. },
  67825. draggable: !1,
  67826. roam: !1,
  67827. // Default on center of graph
  67828. center: null,
  67829. zoom: 1,
  67830. // Symbol size scale ratio in roam
  67831. nodeScaleRatio: 0.6,
  67832. // cursor: null,
  67833. // categories: [],
  67834. // data: []
  67835. // Or
  67836. // nodes: []
  67837. //
  67838. // links: []
  67839. // Or
  67840. // edges: []
  67841. label: {
  67842. show: !1,
  67843. formatter: "{b}"
  67844. },
  67845. itemStyle: {},
  67846. lineStyle: {
  67847. color: "#aaa",
  67848. width: 1,
  67849. opacity: 0.5
  67850. },
  67851. emphasis: {
  67852. scale: !0,
  67853. label: {
  67854. show: !0
  67855. }
  67856. },
  67857. select: {
  67858. itemStyle: {
  67859. borderColor: "#212121"
  67860. }
  67861. }
  67862. }, e;
  67863. }(Ht)
  67864. ), TVe = {
  67865. type: "graphRoam",
  67866. event: "graphRoam",
  67867. update: "none"
  67868. };
  67869. function PVe(t) {
  67870. t.registerChartView(xVe), t.registerSeriesModel(CVe), t.registerProcessor(oVe), t.registerVisual(sVe), t.registerVisual(lVe), t.registerLayout(hVe), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, vVe), t.registerLayout(mVe), t.registerCoordinateSystem("graphView", {
  67871. dimensions: J0.dimensions,
  67872. create: bVe
  67873. }), t.registerAction({
  67874. type: "focusNodeAdjacency",
  67875. event: "focusNodeAdjacency",
  67876. update: "series:focusNodeAdjacency"
  67877. }, On), t.registerAction({
  67878. type: "unfocusNodeAdjacency",
  67879. event: "unfocusNodeAdjacency",
  67880. update: "series:unfocusNodeAdjacency"
  67881. }, On), t.registerAction(TVe, function(e, n, r) {
  67882. n.eachComponent({
  67883. mainType: "series",
  67884. query: e
  67885. }, function(i) {
  67886. var a = i.coordinateSystem, o = Qk(a, e, void 0, r);
  67887. i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
  67888. });
  67889. });
  67890. }
  67891. var $Ve = (
  67892. /** @class */
  67893. /* @__PURE__ */ function() {
  67894. function t() {
  67895. this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
  67896. }
  67897. return t;
  67898. }()
  67899. ), AVe = (
  67900. /** @class */
  67901. function(t) {
  67902. q(e, t);
  67903. function e(n) {
  67904. var r = t.call(this, n) || this;
  67905. return r.type = "pointer", r;
  67906. }
  67907. return e.prototype.getDefaultShape = function() {
  67908. return new $Ve();
  67909. }, e.prototype.buildPath = function(n, r) {
  67910. var i = Math.cos, a = Math.sin, o = r.r, s = r.width, l = r.angle, u = r.x - i(l) * s * (s >= o / 3 ? 1 : 2), c = r.y - a(l) * s * (s >= o / 3 ? 1 : 2);
  67911. l = r.angle - Math.PI / 2, n.moveTo(u, c), n.lineTo(r.x + i(l) * s, r.y + a(l) * s), n.lineTo(r.x + i(r.angle) * o, r.y + a(r.angle) * o), n.lineTo(r.x - i(l) * s, r.y - a(l) * s), n.lineTo(u, c);
  67912. }, e;
  67913. }(ot)
  67914. );
  67915. function EVe(t, e) {
  67916. var n = t.get("center"), r = e.getWidth(), i = e.getHeight(), a = Math.min(r, i), o = _e(n[0], e.getWidth()), s = _e(n[1], e.getHeight()), l = _e(t.get("radius"), a / 2);
  67917. return {
  67918. cx: o,
  67919. cy: s,
  67920. r: l
  67921. };
  67922. }
  67923. function Ab(t, e) {
  67924. var n = t == null ? "" : t + "";
  67925. return e && (Oe(e) ? n = e.replace("{value}", n) : Me(e) && (n = e(t))), n;
  67926. }
  67927. var MVe = (
  67928. /** @class */
  67929. function(t) {
  67930. q(e, t);
  67931. function e() {
  67932. var n = t !== null && t.apply(this, arguments) || this;
  67933. return n.type = e.type, n;
  67934. }
  67935. return e.prototype.render = function(n, r, i) {
  67936. this.group.removeAll();
  67937. var a = n.get(["axisLine", "lineStyle", "color"]), o = EVe(n, i);
  67938. this._renderMain(n, r, i, a, o), this._data = n.getData();
  67939. }, e.prototype.dispose = function() {
  67940. }, e.prototype._renderMain = function(n, r, i, a, o) {
  67941. var s = this.group, l = n.get("clockwise"), u = -n.get("startAngle") / 180 * Math.PI, c = -n.get("endAngle") / 180 * Math.PI, f = n.getModel("axisLine"), d = f.get("roundCap"), h = d ? AO : ri, p = f.get("show"), v = f.getModel("lineStyle"), g = v.get("width"), m = [u, c];
  67942. DR(m, !l), u = m[0], c = m[1];
  67943. for (var y = c - u, b = u, _ = [], O = 0; p && O < a.length; O++) {
  67944. var S = Math.min(Math.max(a[O][0], 0), 1);
  67945. c = u + y * S;
  67946. var x = new h({
  67947. shape: {
  67948. startAngle: b,
  67949. endAngle: c,
  67950. cx: o.cx,
  67951. cy: o.cy,
  67952. clockwise: l,
  67953. r0: o.r - g,
  67954. r: o.r
  67955. },
  67956. silent: !0
  67957. });
  67958. x.setStyle({
  67959. fill: a[O][1]
  67960. }), x.setStyle(v.getLineStyle(
  67961. // Because we use sector to simulate arc
  67962. // so the properties for stroking are useless
  67963. ["color", "width"]
  67964. )), _.push(x), b = c;
  67965. }
  67966. _.reverse(), k(_, function(T) {
  67967. return s.add(T);
  67968. });
  67969. var C = function(T) {
  67970. if (T <= 0)
  67971. return a[0][1];
  67972. var w;
  67973. for (w = 0; w < a.length; w++)
  67974. if (a[w][0] >= T && (w === 0 ? 0 : a[w - 1][0]) < T)
  67975. return a[w][1];
  67976. return a[w - 1][1];
  67977. };
  67978. this._renderTicks(n, r, i, C, o, u, c, l, g), this._renderTitleAndDetail(n, r, i, C, o), this._renderAnchor(n, o), this._renderPointer(n, r, i, C, o, u, c, l, g);
  67979. }, e.prototype._renderTicks = function(n, r, i, a, o, s, l, u, c) {
  67980. for (var f = this.group, d = o.cx, h = o.cy, p = o.r, v = +n.get("min"), g = +n.get("max"), m = n.getModel("splitLine"), y = n.getModel("axisTick"), b = n.getModel("axisLabel"), _ = n.get("splitNumber"), O = y.get("splitNumber"), S = _e(m.get("length"), p), x = _e(y.get("length"), p), C = s, T = (l - s) / _, w = T / O, P = m.getModel("lineStyle").getLineStyle(), $ = y.getModel("lineStyle").getLineStyle(), A = m.get("distance"), D, E, R = 0; R <= _; R++) {
  67981. if (D = Math.cos(C), E = Math.sin(C), m.get("show")) {
  67982. var N = A ? A + c : c, V = new Un({
  67983. shape: {
  67984. x1: D * (p - N) + d,
  67985. y1: E * (p - N) + h,
  67986. x2: D * (p - S - N) + d,
  67987. y2: E * (p - S - N) + h
  67988. },
  67989. style: P,
  67990. silent: !0
  67991. });
  67992. P.stroke === "auto" && V.setStyle({
  67993. stroke: a(R / _)
  67994. }), f.add(V);
  67995. }
  67996. if (b.get("show")) {
  67997. var N = b.get("distance") + A, z = Ab(mn(R / _ * (g - v) + v), b.get("formatter")), W = a(R / _), F = D * (p - S - N) + d, Q = E * (p - S - N) + h, Z = b.get("rotate"), ne = 0;
  67998. Z === "radial" ? (ne = -C + 2 * Math.PI, ne > Math.PI / 2 && (ne += Math.PI)) : Z === "tangential" ? ne = -C - Math.PI / 2 : St(Z) && (ne = Z * Math.PI / 180), ne === 0 ? f.add(new gt({
  67999. style: Zt(b, {
  68000. text: z,
  68001. x: F,
  68002. y: Q,
  68003. verticalAlign: E < -0.8 ? "top" : E > 0.8 ? "bottom" : "middle",
  68004. align: D < -0.4 ? "left" : D > 0.4 ? "right" : "center"
  68005. }, {
  68006. inheritColor: W
  68007. }),
  68008. silent: !0
  68009. })) : f.add(new gt({
  68010. style: Zt(b, {
  68011. text: z,
  68012. x: F,
  68013. y: Q,
  68014. verticalAlign: "middle",
  68015. align: "center"
  68016. }, {
  68017. inheritColor: W
  68018. }),
  68019. silent: !0,
  68020. originX: F,
  68021. originY: Q,
  68022. rotation: ne
  68023. }));
  68024. }
  68025. if (y.get("show") && R !== _) {
  68026. var N = y.get("distance");
  68027. N = N ? N + c : c;
  68028. for (var ee = 0; ee <= O; ee++) {
  68029. D = Math.cos(C), E = Math.sin(C);
  68030. var oe = new Un({
  68031. shape: {
  68032. x1: D * (p - N) + d,
  68033. y1: E * (p - N) + h,
  68034. x2: D * (p - x - N) + d,
  68035. y2: E * (p - x - N) + h
  68036. },
  68037. silent: !0,
  68038. style: $
  68039. });
  68040. $.stroke === "auto" && oe.setStyle({
  68041. stroke: a((R + ee / O) / _)
  68042. }), f.add(oe), C += w;
  68043. }
  68044. C -= w;
  68045. } else
  68046. C += T;
  68047. }
  68048. }, e.prototype._renderPointer = function(n, r, i, a, o, s, l, u, c) {
  68049. var f = this.group, d = this._data, h = this._progressEls, p = [], v = n.get(["pointer", "show"]), g = n.getModel("progress"), m = g.get("show"), y = n.getData(), b = y.mapDimension("value"), _ = +n.get("min"), O = +n.get("max"), S = [_, O], x = [s, l];
  68050. function C(w, P) {
  68051. var $ = y.getItemModel(w), A = $.getModel("pointer"), D = _e(A.get("width"), o.r), E = _e(A.get("length"), o.r), R = n.get(["pointer", "icon"]), N = A.get("offsetCenter"), V = _e(N[0], o.r), z = _e(N[1], o.r), W = A.get("keepAspect"), F;
  68052. return R ? F = $n(R, V - D / 2, z - E, D, E, null, W) : F = new AVe({
  68053. shape: {
  68054. angle: -Math.PI / 2,
  68055. width: D,
  68056. r: E,
  68057. x: V,
  68058. y: z
  68059. }
  68060. }), F.rotation = -(P + Math.PI / 2), F.x = o.cx, F.y = o.cy, F;
  68061. }
  68062. function T(w, P) {
  68063. var $ = g.get("roundCap"), A = $ ? AO : ri, D = g.get("overlap"), E = D ? g.get("width") : c / y.count(), R = D ? o.r - E : o.r - (w + 1) * E, N = D ? o.r : o.r - w * E, V = new A({
  68064. shape: {
  68065. startAngle: s,
  68066. endAngle: P,
  68067. cx: o.cx,
  68068. cy: o.cy,
  68069. clockwise: u,
  68070. r0: R,
  68071. r: N
  68072. }
  68073. });
  68074. return D && (V.z2 = O - y.get(b, w) % O), V;
  68075. }
  68076. (m || v) && (y.diff(d).add(function(w) {
  68077. var P = y.get(b, w);
  68078. if (v) {
  68079. var $ = C(w, s);
  68080. Yt($, {
  68081. rotation: -((isNaN(+P) ? x[0] : Lt(P, S, x, !0)) + Math.PI / 2)
  68082. }, n), f.add($), y.setItemGraphicEl(w, $);
  68083. }
  68084. if (m) {
  68085. var A = T(w, s), D = g.get("clip");
  68086. Yt(A, {
  68087. shape: {
  68088. endAngle: Lt(P, S, x, D)
  68089. }
  68090. }, n), f.add(A), MA(n.seriesIndex, y.dataType, w, A), p[w] = A;
  68091. }
  68092. }).update(function(w, P) {
  68093. var $ = y.get(b, w);
  68094. if (v) {
  68095. var A = d.getItemGraphicEl(P), D = A ? A.rotation : s, E = C(w, D);
  68096. E.rotation = D, Ct(E, {
  68097. rotation: -((isNaN(+$) ? x[0] : Lt($, S, x, !0)) + Math.PI / 2)
  68098. }, n), f.add(E), y.setItemGraphicEl(w, E);
  68099. }
  68100. if (m) {
  68101. var R = h[P], N = R ? R.shape.endAngle : s, V = T(w, N), z = g.get("clip");
  68102. Ct(V, {
  68103. shape: {
  68104. endAngle: Lt($, S, x, z)
  68105. }
  68106. }, n), f.add(V), MA(n.seriesIndex, y.dataType, w, V), p[w] = V;
  68107. }
  68108. }).execute(), y.each(function(w) {
  68109. var P = y.getItemModel(w), $ = P.getModel("emphasis"), A = $.get("focus"), D = $.get("blurScope"), E = $.get("disabled");
  68110. if (v) {
  68111. var R = y.getItemGraphicEl(w), N = y.getItemVisual(w, "style"), V = N.fill;
  68112. if (R instanceof lr) {
  68113. var z = R.style;
  68114. R.useStyle(le({
  68115. image: z.image,
  68116. x: z.x,
  68117. y: z.y,
  68118. width: z.width,
  68119. height: z.height
  68120. }, N));
  68121. } else
  68122. R.useStyle(N), R.type !== "pointer" && R.setColor(V);
  68123. R.setStyle(P.getModel(["pointer", "itemStyle"]).getItemStyle()), R.style.fill === "auto" && R.setStyle("fill", a(Lt(y.get(b, w), S, [0, 1], !0))), R.z2EmphasisLift = 0, Tr(R, P), bn(R, A, D, E);
  68124. }
  68125. if (m) {
  68126. var W = p[w];
  68127. W.useStyle(y.getItemVisual(w, "style")), W.setStyle(P.getModel(["progress", "itemStyle"]).getItemStyle()), W.z2EmphasisLift = 0, Tr(W, P), bn(W, A, D, E);
  68128. }
  68129. }), this._progressEls = p);
  68130. }, e.prototype._renderAnchor = function(n, r) {
  68131. var i = n.getModel("anchor"), a = i.get("show");
  68132. if (a) {
  68133. var o = i.get("size"), s = i.get("icon"), l = i.get("offsetCenter"), u = i.get("keepAspect"), c = $n(s, r.cx - o / 2 + _e(l[0], r.r), r.cy - o / 2 + _e(l[1], r.r), o, o, null, u);
  68134. c.z2 = i.get("showAbove") ? 1 : 0, c.setStyle(i.getModel("itemStyle").getItemStyle()), this.group.add(c);
  68135. }
  68136. }, e.prototype._renderTitleAndDetail = function(n, r, i, a, o) {
  68137. var s = this, l = n.getData(), u = l.mapDimension("value"), c = +n.get("min"), f = +n.get("max"), d = new Ve(), h = [], p = [], v = n.isAnimationEnabled(), g = n.get(["pointer", "showAbove"]);
  68138. l.diff(this._data).add(function(m) {
  68139. h[m] = new gt({
  68140. silent: !0
  68141. }), p[m] = new gt({
  68142. silent: !0
  68143. });
  68144. }).update(function(m, y) {
  68145. h[m] = s._titleEls[y], p[m] = s._detailEls[y];
  68146. }).execute(), l.each(function(m) {
  68147. var y = l.getItemModel(m), b = l.get(u, m), _ = new Ve(), O = a(Lt(b, [c, f], [0, 1], !0)), S = y.getModel("title");
  68148. if (S.get("show")) {
  68149. var x = S.get("offsetCenter"), C = o.cx + _e(x[0], o.r), T = o.cy + _e(x[1], o.r), w = h[m];
  68150. w.attr({
  68151. z2: g ? 0 : 2,
  68152. style: Zt(S, {
  68153. x: C,
  68154. y: T,
  68155. text: l.getName(m),
  68156. align: "center",
  68157. verticalAlign: "middle"
  68158. }, {
  68159. inheritColor: O
  68160. })
  68161. }), _.add(w);
  68162. }
  68163. var P = y.getModel("detail");
  68164. if (P.get("show")) {
  68165. var $ = P.get("offsetCenter"), A = o.cx + _e($[0], o.r), D = o.cy + _e($[1], o.r), E = _e(P.get("width"), o.r), R = _e(P.get("height"), o.r), N = n.get(["progress", "show"]) ? l.getItemVisual(m, "style").fill : O, w = p[m], V = P.get("formatter");
  68166. w.attr({
  68167. z2: g ? 0 : 2,
  68168. style: Zt(P, {
  68169. x: A,
  68170. y: D,
  68171. text: Ab(b, V),
  68172. width: isNaN(E) ? null : E,
  68173. height: isNaN(R) ? null : R,
  68174. align: "center",
  68175. verticalAlign: "middle"
  68176. }, {
  68177. inheritColor: N
  68178. })
  68179. }), dJ(w, {
  68180. normal: P
  68181. }, b, function(W) {
  68182. return Ab(W, V);
  68183. }), v && hJ(w, m, l, n, {
  68184. getFormattedLabel: function(W, F, Q, Z, ne, ee) {
  68185. return Ab(ee ? ee.interpolatedValue : b, V);
  68186. }
  68187. }), _.add(w);
  68188. }
  68189. d.add(_);
  68190. }), this.group.add(d), this._titleEls = h, this._detailEls = p;
  68191. }, e.type = "gauge", e;
  68192. }(zt)
  68193. ), IVe = (
  68194. /** @class */
  68195. function(t) {
  68196. q(e, t);
  68197. function e() {
  68198. var n = t !== null && t.apply(this, arguments) || this;
  68199. return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n;
  68200. }
  68201. return e.prototype.getInitialData = function(n, r) {
  68202. return Pp(this, ["value"]);
  68203. }, e.type = "series.gauge", e.defaultOption = {
  68204. // zlevel: 0,
  68205. z: 2,
  68206. colorBy: "data",
  68207. // 默认全局居中
  68208. center: ["50%", "50%"],
  68209. legendHoverLink: !0,
  68210. radius: "75%",
  68211. startAngle: 225,
  68212. endAngle: -45,
  68213. clockwise: !0,
  68214. // 最小值
  68215. min: 0,
  68216. // 最大值
  68217. max: 100,
  68218. // 分割段数,默认为10
  68219. splitNumber: 10,
  68220. // 坐标轴线
  68221. axisLine: {
  68222. // 默认显示,属性show控制显示与否
  68223. show: !0,
  68224. roundCap: !1,
  68225. lineStyle: {
  68226. color: [[1, "#E6EBF8"]],
  68227. width: 10
  68228. }
  68229. },
  68230. // 坐标轴线
  68231. progress: {
  68232. // 默认显示,属性show控制显示与否
  68233. show: !1,
  68234. overlap: !0,
  68235. width: 10,
  68236. roundCap: !1,
  68237. clip: !0
  68238. },
  68239. // 分隔线
  68240. splitLine: {
  68241. // 默认显示,属性show控制显示与否
  68242. show: !0,
  68243. // 属性length控制线长
  68244. length: 10,
  68245. distance: 10,
  68246. // 属性lineStyle(详见lineStyle)控制线条样式
  68247. lineStyle: {
  68248. color: "#63677A",
  68249. width: 3,
  68250. type: "solid"
  68251. }
  68252. },
  68253. // 坐标轴小标记
  68254. axisTick: {
  68255. // 属性show控制显示与否,默认不显示
  68256. show: !0,
  68257. // 每份split细分多少段
  68258. splitNumber: 5,
  68259. // 属性length控制线长
  68260. length: 6,
  68261. distance: 10,
  68262. // 属性lineStyle控制线条样式
  68263. lineStyle: {
  68264. color: "#63677A",
  68265. width: 1,
  68266. type: "solid"
  68267. }
  68268. },
  68269. axisLabel: {
  68270. show: !0,
  68271. distance: 15,
  68272. // formatter: null,
  68273. color: "#464646",
  68274. fontSize: 12,
  68275. rotate: 0
  68276. },
  68277. pointer: {
  68278. icon: null,
  68279. offsetCenter: [0, 0],
  68280. show: !0,
  68281. showAbove: !0,
  68282. length: "60%",
  68283. width: 6,
  68284. keepAspect: !1
  68285. },
  68286. anchor: {
  68287. show: !1,
  68288. showAbove: !1,
  68289. size: 6,
  68290. icon: "circle",
  68291. offsetCenter: [0, 0],
  68292. keepAspect: !1,
  68293. itemStyle: {
  68294. color: "#fff",
  68295. borderWidth: 0,
  68296. borderColor: "#5470c6"
  68297. }
  68298. },
  68299. title: {
  68300. show: !0,
  68301. // x, y,单位px
  68302. offsetCenter: [0, "20%"],
  68303. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  68304. color: "#464646",
  68305. fontSize: 16,
  68306. valueAnimation: !1
  68307. },
  68308. detail: {
  68309. show: !0,
  68310. backgroundColor: "rgba(0,0,0,0)",
  68311. borderWidth: 0,
  68312. borderColor: "#ccc",
  68313. width: 100,
  68314. height: null,
  68315. padding: [5, 10],
  68316. // x, y,单位px
  68317. offsetCenter: [0, "40%"],
  68318. // formatter: null,
  68319. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  68320. color: "#464646",
  68321. fontSize: 30,
  68322. fontWeight: "bold",
  68323. lineHeight: 30,
  68324. valueAnimation: !1
  68325. }
  68326. }, e;
  68327. }(Ht)
  68328. );
  68329. function DVe(t) {
  68330. t.registerChartView(MVe), t.registerSeriesModel(IVe);
  68331. }
  68332. var RVe = ["itemStyle", "opacity"], kVe = (
  68333. /** @class */
  68334. function(t) {
  68335. q(e, t);
  68336. function e(n, r) {
  68337. var i = t.call(this) || this, a = i, o = new ai(), s = new gt();
  68338. return a.setTextContent(s), i.setTextGuideLine(o), i.updateData(n, r, !0), i;
  68339. }
  68340. return e.prototype.updateData = function(n, r, i) {
  68341. var a = this, o = n.hostModel, s = n.getItemModel(r), l = n.getItemLayout(r), u = s.getModel("emphasis"), c = s.get(RVe);
  68342. c = c ?? 1, i || so(a), a.useStyle(n.getItemVisual(r, "style")), a.style.lineJoin = "round", i ? (a.setShape({
  68343. points: l.points
  68344. }), a.style.opacity = 0, Yt(a, {
  68345. style: {
  68346. opacity: c
  68347. }
  68348. }, o, r)) : Ct(a, {
  68349. style: {
  68350. opacity: c
  68351. },
  68352. shape: {
  68353. points: l.points
  68354. }
  68355. }, o, r), Tr(a, s), this._updateLabel(n, r), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
  68356. }, e.prototype._updateLabel = function(n, r) {
  68357. var i = this, a = this.getTextGuideLine(), o = i.getTextContent(), s = n.hostModel, l = n.getItemModel(r), u = n.getItemLayout(r), c = u.label, f = n.getItemVisual(r, "style"), d = f.fill;
  68358. Pr(
  68359. // position will not be used in setLabelStyle
  68360. o,
  68361. er(l),
  68362. {
  68363. labelFetcher: n.hostModel,
  68364. labelDataIndex: r,
  68365. defaultOpacity: f.opacity,
  68366. defaultText: n.getName(r)
  68367. },
  68368. {
  68369. normal: {
  68370. align: c.textAlign,
  68371. verticalAlign: c.verticalAlign
  68372. }
  68373. }
  68374. ), i.setTextConfig({
  68375. local: !0,
  68376. inside: !!c.inside,
  68377. insideStroke: d,
  68378. // insideFill: 'auto',
  68379. outsideFill: d
  68380. });
  68381. var h = c.linePoints;
  68382. a.setShape({
  68383. points: h
  68384. }), i.textGuideLineConfig = {
  68385. anchor: h ? new Ke(h[0][0], h[0][1]) : null
  68386. }, Ct(o, {
  68387. style: {
  68388. x: c.x,
  68389. y: c.y
  68390. }
  68391. }, s, r), o.attr({
  68392. rotation: c.rotation,
  68393. originX: c.x,
  68394. originY: c.y,
  68395. z2: 10
  68396. }), Ak(i, Ek(l), {
  68397. // Default use item visual color
  68398. stroke: d
  68399. });
  68400. }, e;
  68401. }(ii)
  68402. ), LVe = (
  68403. /** @class */
  68404. function(t) {
  68405. q(e, t);
  68406. function e() {
  68407. var n = t !== null && t.apply(this, arguments) || this;
  68408. return n.type = e.type, n.ignoreLabelLineUpdate = !0, n;
  68409. }
  68410. return e.prototype.render = function(n, r, i) {
  68411. var a = n.getData(), o = this._data, s = this.group;
  68412. a.diff(o).add(function(l) {
  68413. var u = new kVe(a, l);
  68414. a.setItemGraphicEl(l, u), s.add(u);
  68415. }).update(function(l, u) {
  68416. var c = o.getItemGraphicEl(u);
  68417. c.updateData(a, l), s.add(c), a.setItemGraphicEl(l, c);
  68418. }).remove(function(l) {
  68419. var u = o.getItemGraphicEl(l);
  68420. wm(u, n, l);
  68421. }).execute(), this._data = a;
  68422. }, e.prototype.remove = function() {
  68423. this.group.removeAll(), this._data = null;
  68424. }, e.prototype.dispose = function() {
  68425. }, e.type = "funnel", e;
  68426. }(zt)
  68427. ), NVe = (
  68428. /** @class */
  68429. function(t) {
  68430. q(e, t);
  68431. function e() {
  68432. var n = t !== null && t.apply(this, arguments) || this;
  68433. return n.type = e.type, n;
  68434. }
  68435. return e.prototype.init = function(n) {
  68436. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
  68437. }, e.prototype.getInitialData = function(n, r) {
  68438. return Pp(this, {
  68439. coordDimensions: ["value"],
  68440. encodeDefaulter: Ue(nk, this)
  68441. });
  68442. }, e.prototype._defaultLabelLine = function(n) {
  68443. gf(n, "labelLine", ["show"]);
  68444. var r = n.labelLine, i = n.emphasis.labelLine;
  68445. r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
  68446. }, e.prototype.getDataParams = function(n) {
  68447. var r = this.getData(), i = t.prototype.getDataParams.call(this, n), a = r.mapDimension("value"), o = r.getSum(a);
  68448. return i.percent = o ? +(r.get(a, n) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i;
  68449. }, e.type = "series.funnel", e.defaultOption = {
  68450. // zlevel: 0, // 一级层叠
  68451. z: 2,
  68452. legendHoverLink: !0,
  68453. colorBy: "data",
  68454. left: 80,
  68455. top: 60,
  68456. right: 80,
  68457. bottom: 60,
  68458. // width: {totalWidth} - left - right,
  68459. // height: {totalHeight} - top - bottom,
  68460. // 默认取数据最小最大值
  68461. // min: 0,
  68462. // max: 100,
  68463. minSize: "0%",
  68464. maxSize: "100%",
  68465. sort: "descending",
  68466. orient: "vertical",
  68467. gap: 0,
  68468. funnelAlign: "center",
  68469. label: {
  68470. show: !0,
  68471. position: "outer"
  68472. // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
  68473. },
  68474. labelLine: {
  68475. show: !0,
  68476. length: 20,
  68477. lineStyle: {
  68478. // color: 各异,
  68479. width: 1
  68480. }
  68481. },
  68482. itemStyle: {
  68483. // color: 各异,
  68484. borderColor: "#fff",
  68485. borderWidth: 1
  68486. },
  68487. emphasis: {
  68488. label: {
  68489. show: !0
  68490. }
  68491. },
  68492. select: {
  68493. itemStyle: {
  68494. borderColor: "#212121"
  68495. }
  68496. }
  68497. }, e;
  68498. }(Ht)
  68499. );
  68500. function BVe(t, e) {
  68501. return Rn(t.getBoxLayoutParams(), {
  68502. width: e.getWidth(),
  68503. height: e.getHeight()
  68504. });
  68505. }
  68506. function zVe(t, e) {
  68507. for (var n = t.mapDimension("value"), r = t.mapArray(n, function(l) {
  68508. return l;
  68509. }), i = [], a = e === "ascending", o = 0, s = t.count(); o < s; o++)
  68510. i[o] = o;
  68511. return Me(e) ? i.sort(e) : e !== "none" && i.sort(function(l, u) {
  68512. return a ? r[l] - r[u] : r[u] - r[l];
  68513. }), i;
  68514. }
  68515. function VVe(t) {
  68516. var e = t.hostModel, n = e.get("orient");
  68517. t.each(function(r) {
  68518. var i = t.getItemModel(r), a = i.getModel("label"), o = a.get("position"), s = i.getModel("labelLine"), l = t.getItemLayout(r), u = l.points, c = o === "inner" || o === "inside" || o === "center" || o === "insideLeft" || o === "insideRight", f, d, h, p;
  68519. if (c)
  68520. o === "insideLeft" ? (d = (u[0][0] + u[3][0]) / 2 + 5, h = (u[0][1] + u[3][1]) / 2, f = "left") : o === "insideRight" ? (d = (u[1][0] + u[2][0]) / 2 - 5, h = (u[1][1] + u[2][1]) / 2, f = "right") : (d = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, h = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4, f = "center"), p = [[d, h], [d, h]];
  68521. else {
  68522. var v = void 0, g = void 0, m = void 0, y = void 0, b = s.get("length");
  68523. process.env.NODE_ENV !== "production" && (n === "vertical" && ["top", "bottom"].indexOf(o) > -1 && (o = "left", console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")), n === "horizontal" && ["left", "right"].indexOf(o) > -1 && (o = "bottom", console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))), o === "left" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, m = v - b, d = m - 5, f = "right") : o === "right" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, m = v + b, d = m + 5, f = "left") : o === "top" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, y = g - b, h = y - 5, f = "center") : o === "bottom" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, y = g + b, h = y + 5, f = "center") : o === "rightTop" ? (v = n === "horizontal" ? u[3][0] : u[1][0], g = n === "horizontal" ? u[3][1] : u[1][1], n === "horizontal" ? (y = g - b, h = y - 5, f = "center") : (m = v + b, d = m + 5, f = "top")) : o === "rightBottom" ? (v = u[2][0], g = u[2][1], n === "horizontal" ? (y = g + b, h = y + 5, f = "center") : (m = v + b, d = m + 5, f = "bottom")) : o === "leftTop" ? (v = u[0][0], g = n === "horizontal" ? u[0][1] : u[1][1], n === "horizontal" ? (y = g - b, h = y - 5, f = "center") : (m = v - b, d = m - 5, f = "right")) : o === "leftBottom" ? (v = n === "horizontal" ? u[1][0] : u[3][0], g = n === "horizontal" ? u[1][1] : u[2][1], n === "horizontal" ? (y = g + b, h = y + 5, f = "center") : (m = v - b, d = m - 5, f = "right")) : (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, n === "horizontal" ? (y = g + b, h = y + 5, f = "center") : (m = v + b, d = m + 5, f = "left")), n === "horizontal" ? (m = v, d = m) : (y = g, h = y), p = [[v, g], [m, y]];
  68524. }
  68525. l.label = {
  68526. linePoints: p,
  68527. x: d,
  68528. y: h,
  68529. verticalAlign: "middle",
  68530. textAlign: f,
  68531. inside: c
  68532. };
  68533. });
  68534. }
  68535. function FVe(t, e) {
  68536. t.eachSeriesByType("funnel", function(n) {
  68537. var r = n.getData(), i = r.mapDimension("value"), a = n.get("sort"), o = BVe(n, e), s = n.get("orient"), l = o.width, u = o.height, c = zVe(r, a), f = o.x, d = o.y, h = s === "horizontal" ? [_e(n.get("minSize"), u), _e(n.get("maxSize"), u)] : [_e(n.get("minSize"), l), _e(n.get("maxSize"), l)], p = r.getDataExtent(i), v = n.get("min"), g = n.get("max");
  68538. v == null && (v = Math.min(p[0], 0)), g == null && (g = p[1]);
  68539. var m = n.get("funnelAlign"), y = n.get("gap"), b = s === "horizontal" ? l : u, _ = (b - y * (r.count() - 1)) / r.count(), O = function(D, E) {
  68540. if (s === "horizontal") {
  68541. var R = r.get(i, D) || 0, N = Lt(R, [v, g], h, !0), V = void 0;
  68542. switch (m) {
  68543. case "top":
  68544. V = d;
  68545. break;
  68546. case "center":
  68547. V = d + (u - N) / 2;
  68548. break;
  68549. case "bottom":
  68550. V = d + (u - N);
  68551. break;
  68552. }
  68553. return [[E, V], [E, V + N]];
  68554. }
  68555. var z = r.get(i, D) || 0, W = Lt(z, [v, g], h, !0), F;
  68556. switch (m) {
  68557. case "left":
  68558. F = f;
  68559. break;
  68560. case "center":
  68561. F = f + (l - W) / 2;
  68562. break;
  68563. case "right":
  68564. F = f + l - W;
  68565. break;
  68566. }
  68567. return [[F, E], [F + W, E]];
  68568. };
  68569. a === "ascending" && (_ = -_, y = -y, s === "horizontal" ? f += l : d += u, c = c.reverse());
  68570. for (var S = 0; S < c.length; S++) {
  68571. var x = c[S], C = c[S + 1], T = r.getItemModel(x);
  68572. if (s === "horizontal") {
  68573. var w = T.get(["itemStyle", "width"]);
  68574. w == null ? w = _ : (w = _e(w, l), a === "ascending" && (w = -w));
  68575. var P = O(x, f), $ = O(C, f + w);
  68576. f += w + y, r.setItemLayout(x, {
  68577. points: P.concat($.slice().reverse())
  68578. });
  68579. } else {
  68580. var A = T.get(["itemStyle", "height"]);
  68581. A == null ? A = _ : (A = _e(A, u), a === "ascending" && (A = -A));
  68582. var P = O(x, d), $ = O(C, d + A);
  68583. d += A + y, r.setItemLayout(x, {
  68584. points: P.concat($.slice().reverse())
  68585. });
  68586. }
  68587. }
  68588. VVe(r);
  68589. });
  68590. }
  68591. function WVe(t) {
  68592. t.registerChartView(LVe), t.registerSeriesModel(NVe), t.registerLayout(FVe), t.registerProcessor(Y0("funnel"));
  68593. }
  68594. var QVe = 0.3, HVe = (
  68595. /** @class */
  68596. function(t) {
  68597. q(e, t);
  68598. function e() {
  68599. var n = t !== null && t.apply(this, arguments) || this;
  68600. return n.type = e.type, n._dataGroup = new Ve(), n._initialized = !1, n;
  68601. }
  68602. return e.prototype.init = function() {
  68603. this.group.add(this._dataGroup);
  68604. }, e.prototype.render = function(n, r, i, a) {
  68605. this._progressiveEls = null;
  68606. var o = this._dataGroup, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.dimensions, f = rW(n);
  68607. s.diff(l).add(d).update(h).remove(p).execute();
  68608. function d(g) {
  68609. var m = nW(s, o, g, c, u);
  68610. AP(m, s, g, f);
  68611. }
  68612. function h(g, m) {
  68613. var y = l.getItemGraphicEl(m), b = Bne(s, g, c, u);
  68614. s.setItemGraphicEl(g, y), Ct(y, {
  68615. shape: {
  68616. points: b
  68617. }
  68618. }, n, g), so(y), AP(y, s, g, f);
  68619. }
  68620. function p(g) {
  68621. var m = l.getItemGraphicEl(g);
  68622. o.remove(m);
  68623. }
  68624. if (!this._initialized) {
  68625. this._initialized = !0;
  68626. var v = GVe(u, n, function() {
  68627. setTimeout(function() {
  68628. o.removeClipPath();
  68629. });
  68630. });
  68631. o.setClipPath(v);
  68632. }
  68633. this._data = s;
  68634. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  68635. this._initialized = !0, this._data = null, this._dataGroup.removeAll();
  68636. }, e.prototype.incrementalRender = function(n, r, i) {
  68637. for (var a = r.getData(), o = r.coordinateSystem, s = o.dimensions, l = rW(r), u = this._progressiveEls = [], c = n.start; c < n.end; c++) {
  68638. var f = nW(a, this._dataGroup, c, s, o);
  68639. f.incremental = !0, AP(f, a, c, l), u.push(f);
  68640. }
  68641. }, e.prototype.remove = function() {
  68642. this._dataGroup && this._dataGroup.removeAll(), this._data = null;
  68643. }, e.type = "parallel", e;
  68644. }(zt)
  68645. );
  68646. function GVe(t, e, n) {
  68647. var r = t.model, i = t.getRect(), a = new mt({
  68648. shape: {
  68649. x: i.x,
  68650. y: i.y,
  68651. width: i.width,
  68652. height: i.height
  68653. }
  68654. }), o = r.get("layout") === "horizontal" ? "width" : "height";
  68655. return a.setShape(o, 0), Yt(a, {
  68656. shape: {
  68657. width: i.width,
  68658. height: i.height
  68659. }
  68660. }, e, n), a;
  68661. }
  68662. function Bne(t, e, n, r) {
  68663. for (var i = [], a = 0; a < n.length; a++) {
  68664. var o = n[a], s = t.get(t.mapDimension(o), e);
  68665. jVe(s, r.getAxis(o).type) || i.push(r.dataToPoint(s, o));
  68666. }
  68667. return i;
  68668. }
  68669. function nW(t, e, n, r, i) {
  68670. var a = Bne(t, n, r, i), o = new ai({
  68671. shape: {
  68672. points: a
  68673. },
  68674. // silent: true,
  68675. z2: 10
  68676. });
  68677. return e.add(o), t.setItemGraphicEl(n, o), o;
  68678. }
  68679. function rW(t) {
  68680. var e = t.get("smooth", !0);
  68681. return e === !0 && (e = QVe), e = is(e), ou(e) && (e = 0), {
  68682. smooth: e
  68683. };
  68684. }
  68685. function AP(t, e, n, r) {
  68686. t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", r.smooth);
  68687. var i = e.getItemModel(n), a = i.getModel("emphasis");
  68688. Tr(t, i, "lineStyle"), bn(t, a.get("focus"), a.get("blurScope"), a.get("disabled"));
  68689. }
  68690. function jVe(t, e) {
  68691. return e === "category" ? t == null : t == null || isNaN(t);
  68692. }
  68693. var ZVe = (
  68694. /** @class */
  68695. function(t) {
  68696. q(e, t);
  68697. function e() {
  68698. var n = t !== null && t.apply(this, arguments) || this;
  68699. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
  68700. }
  68701. return e.prototype.getInitialData = function(n, r) {
  68702. return us(null, this, {
  68703. useEncodeDefaulter: xe(UVe, null, this)
  68704. });
  68705. }, e.prototype.getRawIndicesByActiveState = function(n) {
  68706. var r = this.coordinateSystem, i = this.getData(), a = [];
  68707. return r.eachActiveState(i, function(o, s) {
  68708. n === o && a.push(i.getRawIndex(s));
  68709. }), a;
  68710. }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
  68711. // zlevel: 0,
  68712. z: 2,
  68713. coordinateSystem: "parallel",
  68714. parallelIndex: 0,
  68715. label: {
  68716. show: !1
  68717. },
  68718. inactiveOpacity: 0.05,
  68719. activeOpacity: 1,
  68720. lineStyle: {
  68721. width: 1,
  68722. opacity: 0.45,
  68723. type: "solid"
  68724. },
  68725. emphasis: {
  68726. label: {
  68727. show: !1
  68728. }
  68729. },
  68730. progressive: 500,
  68731. smooth: !1,
  68732. animationEasing: "linear"
  68733. }, e;
  68734. }(Ht)
  68735. );
  68736. function UVe(t) {
  68737. var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  68738. if (e) {
  68739. var n = {};
  68740. return k(e.dimensions, function(r) {
  68741. var i = XVe(r);
  68742. n[r] = i;
  68743. }), n;
  68744. }
  68745. }
  68746. function XVe(t) {
  68747. return +t.replace("dim", "");
  68748. }
  68749. var YVe = ["lineStyle", "opacity"], qVe = {
  68750. seriesType: "parallel",
  68751. reset: function(t, e) {
  68752. var n = t.coordinateSystem, r = {
  68753. normal: t.get(["lineStyle", "opacity"]),
  68754. active: t.get("activeOpacity"),
  68755. inactive: t.get("inactiveOpacity")
  68756. };
  68757. return {
  68758. progress: function(i, a) {
  68759. n.eachActiveState(a, function(o, s) {
  68760. var l = r[o];
  68761. if (o === "normal" && a.hasItemOption) {
  68762. var u = a.getItemModel(s).get(YVe, !0);
  68763. u != null && (l = u);
  68764. }
  68765. var c = a.ensureUniqueItemVisual(s, "style");
  68766. c.opacity = l;
  68767. }, i.start, i.end);
  68768. }
  68769. };
  68770. }
  68771. };
  68772. function KVe(t) {
  68773. JVe(t), eFe(t);
  68774. }
  68775. function JVe(t) {
  68776. if (!t.parallel) {
  68777. var e = !1;
  68778. k(t.series, function(n) {
  68779. n && n.type === "parallel" && (e = !0);
  68780. }), e && (t.parallel = [{}]);
  68781. }
  68782. }
  68783. function eFe(t) {
  68784. var e = Qt(t.parallelAxis);
  68785. k(e, function(n) {
  68786. if (Ie(n)) {
  68787. var r = n.parallelIndex || 0, i = Qt(t.parallel)[r];
  68788. i && i.parallelAxisDefault && qe(n, i.parallelAxisDefault, !1);
  68789. }
  68790. });
  68791. }
  68792. var tFe = 5, nFe = (
  68793. /** @class */
  68794. function(t) {
  68795. q(e, t);
  68796. function e() {
  68797. var n = t !== null && t.apply(this, arguments) || this;
  68798. return n.type = e.type, n;
  68799. }
  68800. return e.prototype.render = function(n, r, i) {
  68801. this._model = n, this._api = i, this._handlers || (this._handlers = {}, k(rFe, function(a, o) {
  68802. i.getZr().on(o, this._handlers[o] = xe(a, this));
  68803. }, this)), Sp(this, "_throttledDispatchExpand", n.get("axisExpandRate"), "fixRate");
  68804. }, e.prototype.dispose = function(n, r) {
  68805. $m(this, "_throttledDispatchExpand"), k(this._handlers, function(i, a) {
  68806. r.getZr().off(a, i);
  68807. }), this._handlers = null;
  68808. }, e.prototype._throttledDispatchExpand = function(n) {
  68809. this._dispatchExpand(n);
  68810. }, e.prototype._dispatchExpand = function(n) {
  68811. n && this._api.dispatchAction(le({
  68812. type: "parallelAxisExpand"
  68813. }, n));
  68814. }, e.type = "parallel", e;
  68815. }(Xt)
  68816. ), rFe = {
  68817. mousedown: function(t) {
  68818. EP(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]);
  68819. },
  68820. mouseup: function(t) {
  68821. var e = this._mouseDownPoint;
  68822. if (EP(this, "click") && e) {
  68823. var n = [t.offsetX, t.offsetY], r = Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2);
  68824. if (r > tFe)
  68825. return;
  68826. var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  68827. i.behavior !== "none" && this._dispatchExpand({
  68828. axisExpandWindow: i.axisExpandWindow
  68829. });
  68830. }
  68831. this._mouseDownPoint = null;
  68832. },
  68833. mousemove: function(t) {
  68834. if (!(this._mouseDownPoint || !EP(this, "mousemove"))) {
  68835. var e = this._model, n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]), r = n.behavior;
  68836. r === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(r === "none" ? null : {
  68837. axisExpandWindow: n.axisExpandWindow,
  68838. // Jumping uses animation, and sliding suppresses animation.
  68839. animation: r === "jump" ? null : {
  68840. duration: 0
  68841. // Disable animation.
  68842. }
  68843. });
  68844. }
  68845. }
  68846. };
  68847. function EP(t, e) {
  68848. var n = t._model;
  68849. return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e;
  68850. }
  68851. var iFe = (
  68852. /** @class */
  68853. function(t) {
  68854. q(e, t);
  68855. function e() {
  68856. var n = t !== null && t.apply(this, arguments) || this;
  68857. return n.type = e.type, n;
  68858. }
  68859. return e.prototype.init = function() {
  68860. t.prototype.init.apply(this, arguments), this.mergeOption({});
  68861. }, e.prototype.mergeOption = function(n) {
  68862. var r = this.option;
  68863. n && qe(r, n, !0), this._initDimensions();
  68864. }, e.prototype.contains = function(n, r) {
  68865. var i = n.get("parallelIndex");
  68866. return i != null && r.getComponent("parallel", i) === this;
  68867. }, e.prototype.setAxisExpand = function(n) {
  68868. k(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(r) {
  68869. n.hasOwnProperty(r) && (this.option[r] = n[r]);
  68870. }, this);
  68871. }, e.prototype._initDimensions = function() {
  68872. var n = this.dimensions = [], r = this.parallelAxisIndex = [], i = Nt(this.ecModel.queryComponents({
  68873. mainType: "parallelAxis"
  68874. }), function(a) {
  68875. return (a.get("parallelIndex") || 0) === this.componentIndex;
  68876. }, this);
  68877. k(i, function(a) {
  68878. n.push("dim" + a.get("dim")), r.push(a.componentIndex);
  68879. });
  68880. }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
  68881. // zlevel: 0,
  68882. z: 0,
  68883. left: 80,
  68884. top: 60,
  68885. right: 80,
  68886. bottom: 60,
  68887. // width: {totalWidth} - left - right,
  68888. // height: {totalHeight} - top - bottom,
  68889. layout: "horizontal",
  68890. // FIXME
  68891. // naming?
  68892. axisExpandable: !1,
  68893. axisExpandCenter: null,
  68894. axisExpandCount: 0,
  68895. axisExpandWidth: 50,
  68896. axisExpandRate: 17,
  68897. axisExpandDebounce: 50,
  68898. // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.
  68899. // Do not doc to user until necessary.
  68900. axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],
  68901. axisExpandTriggerOn: "click",
  68902. parallelAxisDefault: null
  68903. }, e;
  68904. }(rt)
  68905. ), aFe = (
  68906. /** @class */
  68907. function(t) {
  68908. q(e, t);
  68909. function e(n, r, i, a, o) {
  68910. var s = t.call(this, n, r, i) || this;
  68911. return s.type = a || "value", s.axisIndex = o, s;
  68912. }
  68913. return e.prototype.isHorizontal = function() {
  68914. return this.coordinateSystem.getModel().get("layout") !== "horizontal";
  68915. }, e;
  68916. }(Ba)
  68917. );
  68918. function Qf(t, e, n, r, i, a) {
  68919. t = t || 0;
  68920. var o = n[1] - n[0];
  68921. if (i != null && (i = md(i, [0, o])), a != null && (a = Math.max(a, i ?? 0)), r === "all") {
  68922. var s = Math.abs(e[1] - e[0]);
  68923. s = md(s, [0, o]), i = a = md(s, [i, a]), r = 0;
  68924. }
  68925. e[0] = md(e[0], n), e[1] = md(e[1], n);
  68926. var l = MP(e, r);
  68927. e[r] += t;
  68928. var u = i || 0, c = n.slice();
  68929. l.sign < 0 ? c[0] += u : c[1] -= u, e[r] = md(e[r], c);
  68930. var f;
  68931. return f = MP(e, r), i != null && (f.sign !== l.sign || f.span < i) && (e[1 - r] = e[r] + l.sign * i), f = MP(e, r), a != null && f.span > a && (e[1 - r] = e[r] + f.sign * a), e;
  68932. }
  68933. function MP(t, e) {
  68934. var n = t[e] - t[1 - e];
  68935. return {
  68936. span: Math.abs(n),
  68937. sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  68938. };
  68939. }
  68940. function md(t, e) {
  68941. return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, t));
  68942. }
  68943. var IP = k, zne = Math.min, Vne = Math.max, iW = Math.floor, oFe = Math.ceil, aW = mn, sFe = Math.PI, lFe = (
  68944. /** @class */
  68945. function() {
  68946. function t(e, n, r) {
  68947. this.type = "parallel", this._axesMap = Pe(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, n, r);
  68948. }
  68949. return t.prototype._init = function(e, n, r) {
  68950. var i = e.dimensions, a = e.parallelAxisIndex;
  68951. IP(i, function(o, s) {
  68952. var l = a[s], u = n.getComponent("parallelAxis", l), c = this._axesMap.set(o, new aFe(o, G0(u), [0, 0], u.get("type"), l)), f = c.type === "category";
  68953. c.onBand = f && u.get("boundaryGap"), c.inverse = u.get("inverse"), u.axis = c, c.model = u, c.coordinateSystem = u.coordinateSystem = this;
  68954. }, this);
  68955. }, t.prototype.update = function(e, n) {
  68956. this._updateAxesFromSeries(this._model, e);
  68957. }, t.prototype.containPoint = function(e) {
  68958. var n = this._makeLayoutInfo(), r = n.axisBase, i = n.layoutBase, a = n.pixelDimIndex, o = e[1 - a], s = e[a];
  68959. return o >= r && o <= r + n.axisLength && s >= i && s <= i + n.layoutLength;
  68960. }, t.prototype.getModel = function() {
  68961. return this._model;
  68962. }, t.prototype._updateAxesFromSeries = function(e, n) {
  68963. n.eachSeries(function(r) {
  68964. if (e.contains(r, n)) {
  68965. var i = r.getData();
  68966. IP(this.dimensions, function(a) {
  68967. var o = this._axesMap.get(a);
  68968. o.scale.unionExtentFromData(i, i.mapDimension(a)), Of(o.scale, o.model);
  68969. }, this);
  68970. }
  68971. }, this);
  68972. }, t.prototype.resize = function(e, n) {
  68973. this._rect = Rn(e.getBoxLayoutParams(), {
  68974. width: n.getWidth(),
  68975. height: n.getHeight()
  68976. }), this._layoutAxes();
  68977. }, t.prototype.getRect = function() {
  68978. return this._rect;
  68979. }, t.prototype._makeLayoutInfo = function() {
  68980. var e = this._model, n = this._rect, r = ["x", "y"], i = ["width", "height"], a = e.get("layout"), o = a === "horizontal" ? 0 : 1, s = n[i[o]], l = [0, s], u = this.dimensions.length, c = Eb(e.get("axisExpandWidth"), l), f = Eb(e.get("axisExpandCount") || 0, [0, u]), d = e.get("axisExpandable") && u > 3 && u > f && f > 1 && c > 0 && s > 0, h = e.get("axisExpandWindow"), p;
  68981. if (h)
  68982. p = Eb(h[1] - h[0], l), h[1] = h[0] + p;
  68983. else {
  68984. p = Eb(c * (f - 1), l);
  68985. var v = e.get("axisExpandCenter") || iW(u / 2);
  68986. h = [c * v - p / 2], h[1] = h[0] + p;
  68987. }
  68988. var g = (s - p) / (u - f);
  68989. g < 3 && (g = 0);
  68990. var m = [iW(aW(h[0] / c, 1)) + 1, oFe(aW(h[1] / c, 1)) - 1], y = g / c * h[0];
  68991. return {
  68992. layout: a,
  68993. pixelDimIndex: o,
  68994. layoutBase: n[r[o]],
  68995. layoutLength: s,
  68996. axisBase: n[r[1 - o]],
  68997. axisLength: n[i[1 - o]],
  68998. axisExpandable: d,
  68999. axisExpandWidth: c,
  69000. axisCollapseWidth: g,
  69001. axisExpandWindow: h,
  69002. axisCount: u,
  69003. winInnerIndices: m,
  69004. axisExpandWindow0Pos: y
  69005. };
  69006. }, t.prototype._layoutAxes = function() {
  69007. var e = this._rect, n = this._axesMap, r = this.dimensions, i = this._makeLayoutInfo(), a = i.layout;
  69008. n.each(function(o) {
  69009. var s = [0, i.axisLength], l = o.inverse ? 1 : 0;
  69010. o.setExtent(s[l], s[1 - l]);
  69011. }), IP(r, function(o, s) {
  69012. var l = (i.axisExpandable ? cFe : uFe)(s, i), u = {
  69013. horizontal: {
  69014. x: l.position,
  69015. y: i.axisLength
  69016. },
  69017. vertical: {
  69018. x: 0,
  69019. y: l.position
  69020. }
  69021. }, c = {
  69022. horizontal: sFe / 2,
  69023. vertical: 0
  69024. }, f = [u[a].x + e.x, u[a].y + e.y], d = c[a], h = Si();
  69025. Cu(h, h, d), ao(h, h, f), this._axesLayout[o] = {
  69026. position: f,
  69027. rotation: d,
  69028. transform: h,
  69029. axisNameAvailableWidth: l.axisNameAvailableWidth,
  69030. axisLabelShow: l.axisLabelShow,
  69031. nameTruncateMaxWidth: l.nameTruncateMaxWidth,
  69032. tickDirection: 1,
  69033. labelDirection: 1
  69034. };
  69035. }, this);
  69036. }, t.prototype.getAxis = function(e) {
  69037. return this._axesMap.get(e);
  69038. }, t.prototype.dataToPoint = function(e, n) {
  69039. return this.axisCoordToPoint(this._axesMap.get(n).dataToCoord(e), n);
  69040. }, t.prototype.eachActiveState = function(e, n, r, i) {
  69041. r == null && (r = 0), i == null && (i = e.count());
  69042. var a = this._axesMap, o = this.dimensions, s = [], l = [];
  69043. k(o, function(g) {
  69044. s.push(e.mapDimension(g)), l.push(a.get(g).model);
  69045. });
  69046. for (var u = this.hasAxisBrushed(), c = r; c < i; c++) {
  69047. var f = void 0;
  69048. if (!u)
  69049. f = "normal";
  69050. else {
  69051. f = "active";
  69052. for (var d = e.getValues(s, c), h = 0, p = o.length; h < p; h++) {
  69053. var v = l[h].getActiveState(d[h]);
  69054. if (v === "inactive") {
  69055. f = "inactive";
  69056. break;
  69057. }
  69058. }
  69059. }
  69060. n(f, c);
  69061. }
  69062. }, t.prototype.hasAxisBrushed = function() {
  69063. for (var e = this.dimensions, n = this._axesMap, r = !1, i = 0, a = e.length; i < a; i++)
  69064. n.get(e[i]).model.getActiveState() !== "normal" && (r = !0);
  69065. return r;
  69066. }, t.prototype.axisCoordToPoint = function(e, n) {
  69067. var r = this._axesLayout[n];
  69068. return to([e, 0], r.transform);
  69069. }, t.prototype.getAxisLayout = function(e) {
  69070. return Le(this._axesLayout[e]);
  69071. }, t.prototype.getSlidedAxisExpandWindow = function(e) {
  69072. var n = this._makeLayoutInfo(), r = n.pixelDimIndex, i = n.axisExpandWindow.slice(), a = i[1] - i[0], o = [0, n.axisExpandWidth * (n.axisCount - 1)];
  69073. if (!this.containPoint(e))
  69074. return {
  69075. behavior: "none",
  69076. axisExpandWindow: i
  69077. };
  69078. var s = e[r] - n.layoutBase - n.axisExpandWindow0Pos, l, u = "slide", c = n.axisCollapseWidth, f = this._model.get("axisExpandSlideTriggerArea"), d = f[0] != null;
  69079. if (c)
  69080. d && c && s < a * f[0] ? (u = "jump", l = s - a * f[2]) : d && c && s > a * (1 - f[0]) ? (u = "jump", l = s - a * (1 - f[2])) : (l = s - a * f[1]) >= 0 && (l = s - a * (1 - f[1])) <= 0 && (l = 0), l *= n.axisExpandWidth / c, l ? Qf(l, i, o, "all") : u = "none";
  69081. else {
  69082. var h = i[1] - i[0], p = o[1] * s / h;
  69083. i = [Vne(0, p - h / 2)], i[1] = zne(o[1], i[0] + h), i[0] = i[1] - h;
  69084. }
  69085. return {
  69086. axisExpandWindow: i,
  69087. behavior: u
  69088. };
  69089. }, t;
  69090. }()
  69091. );
  69092. function Eb(t, e) {
  69093. return zne(Vne(t, e[0]), e[1]);
  69094. }
  69095. function uFe(t, e) {
  69096. var n = e.layoutLength / (e.axisCount - 1);
  69097. return {
  69098. position: n * t,
  69099. axisNameAvailableWidth: n,
  69100. axisLabelShow: !0
  69101. };
  69102. }
  69103. function cFe(t, e) {
  69104. var n = e.layoutLength, r = e.axisExpandWidth, i = e.axisCount, a = e.axisCollapseWidth, o = e.winInnerIndices, s, l = a, u = !1, c;
  69105. return t < o[0] ? (s = t * a, c = a) : t <= o[1] ? (s = e.axisExpandWindow0Pos + t * r - e.axisExpandWindow[0], l = r, u = !0) : (s = n - (i - 1 - t) * a, c = a), {
  69106. position: s,
  69107. axisNameAvailableWidth: l,
  69108. axisLabelShow: u,
  69109. nameTruncateMaxWidth: c
  69110. };
  69111. }
  69112. function fFe(t, e) {
  69113. var n = [];
  69114. return t.eachComponent("parallel", function(r, i) {
  69115. var a = new lFe(r, t, e);
  69116. a.name = "parallel_" + i, a.resize(r, e), r.coordinateSystem = a, a.model = r, n.push(a);
  69117. }), t.eachSeries(function(r) {
  69118. if (r.get("coordinateSystem") === "parallel") {
  69119. var i = r.getReferringComponents("parallel", Dn).models[0];
  69120. r.coordinateSystem = i.coordinateSystem;
  69121. }
  69122. }), n;
  69123. }
  69124. var dFe = {
  69125. create: fFe
  69126. }, SE = (
  69127. /** @class */
  69128. function(t) {
  69129. q(e, t);
  69130. function e() {
  69131. var n = t !== null && t.apply(this, arguments) || this;
  69132. return n.type = e.type, n.activeIntervals = [], n;
  69133. }
  69134. return e.prototype.getAreaSelectStyle = function() {
  69135. return yf([
  69136. ["fill", "color"],
  69137. ["lineWidth", "borderWidth"],
  69138. ["stroke", "borderColor"],
  69139. ["width", "width"],
  69140. ["opacity", "opacity"]
  69141. // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  69142. // So do not transfer decal directly.
  69143. ])(this.getModel("areaSelectStyle"));
  69144. }, e.prototype.setActiveIntervals = function(n) {
  69145. var r = this.activeIntervals = Le(n);
  69146. if (r)
  69147. for (var i = r.length - 1; i >= 0; i--)
  69148. Vi(r[i]);
  69149. }, e.prototype.getActiveState = function(n) {
  69150. var r = this.activeIntervals;
  69151. if (!r.length)
  69152. return "normal";
  69153. if (n == null || isNaN(+n))
  69154. return "inactive";
  69155. if (r.length === 1) {
  69156. var i = r[0];
  69157. if (i[0] <= n && n <= i[1])
  69158. return "active";
  69159. } else
  69160. for (var a = 0, o = r.length; a < o; a++)
  69161. if (r[a][0] <= n && n <= r[a][1])
  69162. return "active";
  69163. return "inactive";
  69164. }, e;
  69165. }(rt)
  69166. );
  69167. xn(SE, Tp);
  69168. var Sf = !0, Vm = Math.min, Hh = Math.max, hFe = Math.pow, pFe = 1e4, vFe = 6, gFe = 6, oW = "globalPan", mFe = {
  69169. w: [0, 0],
  69170. e: [0, 1],
  69171. n: [1, 0],
  69172. s: [1, 1]
  69173. }, yFe = {
  69174. w: "ew",
  69175. e: "ew",
  69176. n: "ns",
  69177. s: "ns",
  69178. ne: "nesw",
  69179. sw: "nesw",
  69180. nw: "nwse",
  69181. se: "nwse"
  69182. }, sW = {
  69183. brushStyle: {
  69184. lineWidth: 2,
  69185. stroke: "rgba(210,219,238,0.3)",
  69186. fill: "#D2DBEE"
  69187. },
  69188. transformable: !0,
  69189. brushMode: "single",
  69190. removeOnClick: !1
  69191. }, bFe = 0, Jk = (
  69192. /** @class */
  69193. function(t) {
  69194. q(e, t);
  69195. function e(n) {
  69196. var r = t.call(this) || this;
  69197. return r._track = [], r._covers = [], r._handlers = {}, process.env.NODE_ENV !== "production" && ke(n), r._zr = n, r.group = new Ve(), r._uid = "brushController_" + bFe++, k(TFe, function(i, a) {
  69198. this._handlers[a] = xe(i, this);
  69199. }, r), r;
  69200. }
  69201. return e.prototype.enableBrush = function(n) {
  69202. return process.env.NODE_ENV !== "production" && ke(this._mounted), this._brushType && this._doDisableBrush(), n.brushType && this._doEnableBrush(n), this;
  69203. }, e.prototype._doEnableBrush = function(n) {
  69204. var r = this._zr;
  69205. this._enableGlobalPan || uBe(r, oW, this._uid), k(this._handlers, function(i, a) {
  69206. r.on(a, i);
  69207. }), this._brushType = n.brushType, this._brushOption = qe(Le(sW), n, !0);
  69208. }, e.prototype._doDisableBrush = function() {
  69209. var n = this._zr;
  69210. cBe(n, oW, this._uid), k(this._handlers, function(r, i) {
  69211. n.off(i, r);
  69212. }), this._brushType = this._brushOption = null;
  69213. }, e.prototype.setPanels = function(n) {
  69214. if (n && n.length) {
  69215. var r = this._panels = {};
  69216. k(n, function(i) {
  69217. r[i.panelId] = Le(i);
  69218. });
  69219. } else
  69220. this._panels = null;
  69221. return this;
  69222. }, e.prototype.mount = function(n) {
  69223. n = n || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = n.enableGlobalPan;
  69224. var r = this.group;
  69225. return this._zr.add(r), r.attr({
  69226. x: n.x || 0,
  69227. y: n.y || 0,
  69228. rotation: n.rotation || 0,
  69229. scaleX: n.scaleX || 1,
  69230. scaleY: n.scaleY || 1
  69231. }), this._transform = r.getLocalTransform(), this;
  69232. }, e.prototype.updateCovers = function(n) {
  69233. process.env.NODE_ENV !== "production" && ke(this._mounted), n = ce(n, function(d) {
  69234. return qe(Le(sW), d, !0);
  69235. });
  69236. var r = "\0-brush-index-", i = this._covers, a = this._covers = [], o = this, s = this._creatingCover;
  69237. return new Us(i, n, u, l).add(c).update(c).remove(f).execute(), this;
  69238. function l(d, h) {
  69239. return (d.id != null ? d.id : r + h) + "-" + d.brushType;
  69240. }
  69241. function u(d, h) {
  69242. return l(d.__brushOption, h);
  69243. }
  69244. function c(d, h) {
  69245. var p = n[d];
  69246. if (h != null && i[h] === s)
  69247. a[d] = i[h];
  69248. else {
  69249. var v = a[d] = h != null ? (i[h].__brushOption = p, i[h]) : Wne(o, Fne(o, p));
  69250. eL(o, v);
  69251. }
  69252. }
  69253. function f(d) {
  69254. i[d] !== s && o.group.remove(i[d]);
  69255. }
  69256. }, e.prototype.unmount = function() {
  69257. if (!(process.env.NODE_ENV !== "production" && !this._mounted))
  69258. return this.enableBrush(!1), xE(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this;
  69259. }, e.prototype.dispose = function() {
  69260. this.unmount(), this.off();
  69261. }, e;
  69262. }(Ra)
  69263. );
  69264. function Fne(t, e) {
  69265. var n = Ow[e.brushType].createCover(t, e);
  69266. return n.__brushOption = e, Hne(n, e), t.group.add(n), n;
  69267. }
  69268. function Wne(t, e) {
  69269. var n = tL(e);
  69270. return n.endCreating && (n.endCreating(t, e), Hne(e, e.__brushOption)), e;
  69271. }
  69272. function Qne(t, e) {
  69273. var n = e.__brushOption;
  69274. tL(e).updateCoverShape(t, e, n.range, n);
  69275. }
  69276. function Hne(t, e) {
  69277. var n = e.z;
  69278. n == null && (n = pFe), t.traverse(function(r) {
  69279. r.z = n, r.z2 = n;
  69280. });
  69281. }
  69282. function eL(t, e) {
  69283. tL(e).updateCommon(t, e), Qne(t, e);
  69284. }
  69285. function tL(t) {
  69286. return Ow[t.__brushOption.brushType];
  69287. }
  69288. function nL(t, e, n) {
  69289. var r = t._panels;
  69290. if (!r)
  69291. return Sf;
  69292. var i, a = t._transform;
  69293. return k(r, function(o) {
  69294. o.isTargetByCursor(e, n, a) && (i = o);
  69295. }), i;
  69296. }
  69297. function Gne(t, e) {
  69298. var n = t._panels;
  69299. if (!n)
  69300. return Sf;
  69301. var r = e.__brushOption.panelId;
  69302. return r != null ? n[r] : Sf;
  69303. }
  69304. function xE(t) {
  69305. var e = t._covers, n = e.length;
  69306. return k(e, function(r) {
  69307. t.group.remove(r);
  69308. }, t), e.length = 0, !!n;
  69309. }
  69310. function xf(t, e) {
  69311. var n = ce(t._covers, function(r) {
  69312. var i = r.__brushOption, a = Le(i.range);
  69313. return {
  69314. brushType: i.brushType,
  69315. panelId: i.panelId,
  69316. range: a
  69317. };
  69318. });
  69319. t.trigger("brush", {
  69320. areas: n,
  69321. isEnd: !!e.isEnd,
  69322. removeOnClick: !!e.removeOnClick
  69323. });
  69324. }
  69325. function _Fe(t) {
  69326. var e = t._track;
  69327. if (!e.length)
  69328. return !1;
  69329. var n = e[e.length - 1], r = e[0], i = n[0] - r[0], a = n[1] - r[1], o = hFe(i * i + a * a, 0.5);
  69330. return o > vFe;
  69331. }
  69332. function jne(t) {
  69333. var e = t.length - 1;
  69334. return e < 0 && (e = 0), [t[0], t[e]];
  69335. }
  69336. function Zne(t, e, n, r) {
  69337. var i = new Ve();
  69338. return i.add(new mt({
  69339. name: "main",
  69340. style: rL(n),
  69341. silent: !0,
  69342. draggable: !0,
  69343. cursor: "move",
  69344. drift: Ue(lW, t, e, i, ["n", "s", "w", "e"]),
  69345. ondragend: Ue(xf, e, {
  69346. isEnd: !0
  69347. })
  69348. })), k(r, function(a) {
  69349. i.add(new mt({
  69350. name: a.join(""),
  69351. style: {
  69352. opacity: 0
  69353. },
  69354. draggable: !0,
  69355. silent: !0,
  69356. invisible: !0,
  69357. drift: Ue(lW, t, e, i, a),
  69358. ondragend: Ue(xf, e, {
  69359. isEnd: !0
  69360. })
  69361. }));
  69362. }), i;
  69363. }
  69364. function Une(t, e, n, r) {
  69365. var i = r.brushStyle.lineWidth || 0, a = Hh(i, gFe), o = n[0][0], s = n[1][0], l = o - i / 2, u = s - i / 2, c = n[0][1], f = n[1][1], d = c - a + i / 2, h = f - a + i / 2, p = c - o, v = f - s, g = p + i, m = v + i;
  69366. ys(t, e, "main", o, s, p, v), r.transformable && (ys(t, e, "w", l, u, a, m), ys(t, e, "e", d, u, a, m), ys(t, e, "n", l, u, g, a), ys(t, e, "s", l, h, g, a), ys(t, e, "nw", l, u, a, a), ys(t, e, "ne", d, u, a, a), ys(t, e, "sw", l, h, a, a), ys(t, e, "se", d, h, a, a));
  69367. }
  69368. function wE(t, e) {
  69369. var n = e.__brushOption, r = n.transformable, i = e.childAt(0);
  69370. i.useStyle(rL(n)), i.attr({
  69371. silent: !r,
  69372. cursor: r ? "move" : "default"
  69373. }), k([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(a) {
  69374. var o = e.childOfName(a.join("")), s = a.length === 1 ? CE(t, a[0]) : SFe(t, a);
  69375. o && o.attr({
  69376. silent: !r,
  69377. invisible: !r,
  69378. cursor: r ? yFe[s] + "-resize" : null
  69379. });
  69380. });
  69381. }
  69382. function ys(t, e, n, r, i, a, o) {
  69383. var s = e.childOfName(n);
  69384. s && s.setShape(wFe(iL(t, e, [[r, i], [r + a, i + o]])));
  69385. }
  69386. function rL(t) {
  69387. return Re({
  69388. strokeNoScale: !0
  69389. }, t.brushStyle);
  69390. }
  69391. function Xne(t, e, n, r) {
  69392. var i = [Vm(t, n), Vm(e, r)], a = [Hh(t, n), Hh(e, r)];
  69393. return [
  69394. [i[0], a[0]],
  69395. [i[1], a[1]]
  69396. // y range
  69397. ];
  69398. }
  69399. function OFe(t) {
  69400. return ql(t.group);
  69401. }
  69402. function CE(t, e) {
  69403. var n = {
  69404. w: "left",
  69405. e: "right",
  69406. n: "top",
  69407. s: "bottom"
  69408. }, r = {
  69409. left: "w",
  69410. right: "e",
  69411. top: "n",
  69412. bottom: "s"
  69413. }, i = Jx(n[e], OFe(t));
  69414. return r[i];
  69415. }
  69416. function SFe(t, e) {
  69417. var n = [CE(t, e[0]), CE(t, e[1])];
  69418. return (n[0] === "e" || n[0] === "w") && n.reverse(), n.join("");
  69419. }
  69420. function lW(t, e, n, r, i, a) {
  69421. var o = n.__brushOption, s = t.toRectRange(o.range), l = Yne(e, i, a);
  69422. k(r, function(u) {
  69423. var c = mFe[u];
  69424. s[c[0]][c[1]] += l[c[0]];
  69425. }), o.range = t.fromRectRange(Xne(s[0][0], s[1][0], s[0][1], s[1][1])), eL(e, n), xf(e, {
  69426. isEnd: !1
  69427. });
  69428. }
  69429. function xFe(t, e, n, r) {
  69430. var i = e.__brushOption.range, a = Yne(t, n, r);
  69431. k(i, function(o) {
  69432. o[0] += a[0], o[1] += a[1];
  69433. }), eL(t, e), xf(t, {
  69434. isEnd: !1
  69435. });
  69436. }
  69437. function Yne(t, e, n) {
  69438. var r = t.group, i = r.transformCoordToLocal(e, n), a = r.transformCoordToLocal(0, 0);
  69439. return [i[0] - a[0], i[1] - a[1]];
  69440. }
  69441. function iL(t, e, n) {
  69442. var r = Gne(t, e);
  69443. return r && r !== Sf ? r.clipPath(n, t._transform) : Le(n);
  69444. }
  69445. function wFe(t) {
  69446. var e = Vm(t[0][0], t[1][0]), n = Vm(t[0][1], t[1][1]), r = Hh(t[0][0], t[1][0]), i = Hh(t[0][1], t[1][1]);
  69447. return {
  69448. x: e,
  69449. y: n,
  69450. width: r - e,
  69451. height: i - n
  69452. };
  69453. }
  69454. function CFe(t, e, n) {
  69455. if (
  69456. // Check active
  69457. !(!t._brushType || PFe(t, e.offsetX, e.offsetY))
  69458. ) {
  69459. var r = t._zr, i = t._covers, a = nL(t, e, n);
  69460. if (!t._dragging)
  69461. for (var o = 0; o < i.length; o++) {
  69462. var s = i[o].__brushOption;
  69463. if (a && (a === Sf || s.panelId === a.panelId) && Ow[s.brushType].contain(i[o], n[0], n[1]))
  69464. return;
  69465. }
  69466. a && r.setCursorStyle("crosshair");
  69467. }
  69468. }
  69469. function TE(t) {
  69470. var e = t.event;
  69471. e.preventDefault && e.preventDefault();
  69472. }
  69473. function PE(t, e, n) {
  69474. return t.childOfName("main").contain(e, n);
  69475. }
  69476. function qne(t, e, n, r) {
  69477. var i = t._creatingCover, a = t._creatingPanel, o = t._brushOption, s;
  69478. if (t._track.push(n.slice()), _Fe(t) || i) {
  69479. if (a && !i) {
  69480. o.brushMode === "single" && xE(t);
  69481. var l = Le(o);
  69482. l.brushType = uW(l.brushType, a), l.panelId = a === Sf ? null : a.panelId, i = t._creatingCover = Fne(t, l), t._covers.push(i);
  69483. }
  69484. if (i) {
  69485. var u = Ow[uW(t._brushType, a)], c = i.__brushOption;
  69486. c.range = u.getCreatingRange(iL(t, i, t._track)), r && (Wne(t, i), u.updateCommon(t, i)), Qne(t, i), s = {
  69487. isEnd: r
  69488. };
  69489. }
  69490. } else r && o.brushMode === "single" && o.removeOnClick && nL(t, e, n) && xE(t) && (s = {
  69491. isEnd: r,
  69492. removeOnClick: !0
  69493. });
  69494. return s;
  69495. }
  69496. function uW(t, e) {
  69497. return t === "auto" ? (process.env.NODE_ENV !== "production" && ke(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : t;
  69498. }
  69499. var TFe = {
  69500. mousedown: function(t) {
  69501. if (this._dragging)
  69502. cW(this, t);
  69503. else if (!t.target || !t.target.draggable) {
  69504. TE(t);
  69505. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  69506. this._creatingCover = null;
  69507. var n = this._creatingPanel = nL(this, t, e);
  69508. n && (this._dragging = !0, this._track = [e.slice()]);
  69509. }
  69510. },
  69511. mousemove: function(t) {
  69512. var e = t.offsetX, n = t.offsetY, r = this.group.transformCoordToLocal(e, n);
  69513. if (CFe(this, t, r), this._dragging) {
  69514. TE(t);
  69515. var i = qne(this, t, r, !1);
  69516. i && xf(this, i);
  69517. }
  69518. },
  69519. mouseup: function(t) {
  69520. cW(this, t);
  69521. }
  69522. };
  69523. function cW(t, e) {
  69524. if (t._dragging) {
  69525. TE(e);
  69526. var n = e.offsetX, r = e.offsetY, i = t.group.transformCoordToLocal(n, r), a = qne(t, e, i, !0);
  69527. t._dragging = !1, t._track = [], t._creatingCover = null, a && xf(t, a);
  69528. }
  69529. }
  69530. function PFe(t, e, n) {
  69531. var r = t._zr;
  69532. return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
  69533. }
  69534. var Ow = {
  69535. lineX: fW(0),
  69536. lineY: fW(1),
  69537. rect: {
  69538. createCover: function(t, e) {
  69539. function n(r) {
  69540. return r;
  69541. }
  69542. return Zne({
  69543. toRectRange: n,
  69544. fromRectRange: n
  69545. }, t, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
  69546. },
  69547. getCreatingRange: function(t) {
  69548. var e = jne(t);
  69549. return Xne(e[1][0], e[1][1], e[0][0], e[0][1]);
  69550. },
  69551. updateCoverShape: function(t, e, n, r) {
  69552. Une(t, e, n, r);
  69553. },
  69554. updateCommon: wE,
  69555. contain: PE
  69556. },
  69557. polygon: {
  69558. createCover: function(t, e) {
  69559. var n = new Ve();
  69560. return n.add(new ai({
  69561. name: "main",
  69562. style: rL(e),
  69563. silent: !0
  69564. })), n;
  69565. },
  69566. getCreatingRange: function(t) {
  69567. return t;
  69568. },
  69569. endCreating: function(t, e) {
  69570. e.remove(e.childAt(0)), e.add(new ii({
  69571. name: "main",
  69572. draggable: !0,
  69573. drift: Ue(xFe, t, e),
  69574. ondragend: Ue(xf, t, {
  69575. isEnd: !0
  69576. })
  69577. }));
  69578. },
  69579. updateCoverShape: function(t, e, n, r) {
  69580. e.childAt(0).setShape({
  69581. points: iL(t, e, n)
  69582. });
  69583. },
  69584. updateCommon: wE,
  69585. contain: PE
  69586. }
  69587. };
  69588. function fW(t) {
  69589. return {
  69590. createCover: function(e, n) {
  69591. return Zne({
  69592. toRectRange: function(r) {
  69593. var i = [r, [0, 100]];
  69594. return t && i.reverse(), i;
  69595. },
  69596. fromRectRange: function(r) {
  69597. return r[t];
  69598. }
  69599. }, e, n, [[["w"], ["e"]], [["n"], ["s"]]][t]);
  69600. },
  69601. getCreatingRange: function(e) {
  69602. var n = jne(e), r = Vm(n[0][t], n[1][t]), i = Hh(n[0][t], n[1][t]);
  69603. return [r, i];
  69604. },
  69605. updateCoverShape: function(e, n, r, i) {
  69606. var a, o = Gne(e, n);
  69607. if (o !== Sf && o.getLinearBrushOtherExtent)
  69608. a = o.getLinearBrushOtherExtent(t);
  69609. else {
  69610. var s = e._zr;
  69611. a = [0, [s.getWidth(), s.getHeight()][1 - t]];
  69612. }
  69613. var l = [r, a];
  69614. t && l.reverse(), Une(e, n, l, i);
  69615. },
  69616. updateCommon: wE,
  69617. contain: PE
  69618. };
  69619. }
  69620. function Kne(t) {
  69621. return t = aL(t), function(e) {
  69622. return HR(e, t);
  69623. };
  69624. }
  69625. function Jne(t, e) {
  69626. return t = aL(t), function(n) {
  69627. var r = e ?? n, i = r ? t.width : t.height, a = r ? t.x : t.y;
  69628. return [a, a + (i || 0)];
  69629. };
  69630. }
  69631. function ere(t, e, n) {
  69632. var r = aL(t);
  69633. return function(i, a) {
  69634. return r.contain(a[0], a[1]) && !mw(i, e, n);
  69635. };
  69636. }
  69637. function aL(t) {
  69638. return Je.create(t);
  69639. }
  69640. var $Fe = ["axisLine", "axisTickLabel", "axisName"], AFe = (
  69641. /** @class */
  69642. function(t) {
  69643. q(e, t);
  69644. function e() {
  69645. var n = t !== null && t.apply(this, arguments) || this;
  69646. return n.type = e.type, n;
  69647. }
  69648. return e.prototype.init = function(n, r) {
  69649. t.prototype.init.apply(this, arguments), (this._brushController = new Jk(r.getZr())).on("brush", xe(this._onBrush, this));
  69650. }, e.prototype.render = function(n, r, i, a) {
  69651. if (!EFe(n, r, a)) {
  69652. this.axisModel = n, this.api = i, this.group.removeAll();
  69653. var o = this._axisGroup;
  69654. if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
  69655. var s = IFe(n, r), l = s.coordinateSystem, u = n.getAreaSelectStyle(), c = u.width, f = n.axis.dim, d = l.getAxisLayout(f), h = le({
  69656. strokeContainThreshold: c
  69657. }, d), p = new Kr(n, h);
  69658. k($Fe, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(h, u, n, s, c, i), W0(o, this._axisGroup, n);
  69659. }
  69660. }
  69661. }, e.prototype._refreshBrushController = function(n, r, i, a, o, s) {
  69662. var l = i.axis.getExtent(), u = l[1] - l[0], c = Math.min(30, Math.abs(u) * 0.1), f = Je.create({
  69663. x: l[0],
  69664. y: -o / 2,
  69665. width: u,
  69666. height: o
  69667. });
  69668. f.x -= c, f.width += 2 * c, this._brushController.mount({
  69669. enableGlobalPan: !0,
  69670. rotation: n.rotation,
  69671. x: n.position[0],
  69672. y: n.position[1]
  69673. }).setPanels([{
  69674. panelId: "pl",
  69675. clipPath: Kne(f),
  69676. isTargetByCursor: ere(f, s, a),
  69677. getLinearBrushOtherExtent: Jne(f, 0)
  69678. }]).enableBrush({
  69679. brushType: "lineX",
  69680. brushStyle: r,
  69681. removeOnClick: !0
  69682. }).updateCovers(MFe(i));
  69683. }, e.prototype._onBrush = function(n) {
  69684. var r = n.areas, i = this.axisModel, a = i.axis, o = ce(r, function(s) {
  69685. return [a.coordToData(s.range[0], !0), a.coordToData(s.range[1], !0)];
  69686. });
  69687. (!i.option.realtime === n.isEnd || n.removeOnClick) && this.api.dispatchAction({
  69688. type: "axisAreaSelect",
  69689. parallelAxisId: i.id,
  69690. intervals: o
  69691. });
  69692. }, e.prototype.dispose = function() {
  69693. this._brushController.dispose();
  69694. }, e.type = "parallelAxis", e;
  69695. }(Xt)
  69696. );
  69697. function EFe(t, e, n) {
  69698. return n && n.type === "axisAreaSelect" && e.findComponents({
  69699. mainType: "parallelAxis",
  69700. query: n
  69701. })[0] === t;
  69702. }
  69703. function MFe(t) {
  69704. var e = t.axis;
  69705. return ce(t.activeIntervals, function(n) {
  69706. return {
  69707. brushType: "lineX",
  69708. panelId: "pl",
  69709. range: [e.dataToCoord(n[0], !0), e.dataToCoord(n[1], !0)]
  69710. };
  69711. });
  69712. }
  69713. function IFe(t, e) {
  69714. return e.getComponent("parallel", t.get("parallelIndex"));
  69715. }
  69716. var DFe = {
  69717. type: "axisAreaSelect",
  69718. event: "axisAreaSelected"
  69719. // update: 'updateVisual'
  69720. };
  69721. function RFe(t) {
  69722. t.registerAction(DFe, function(e, n) {
  69723. n.eachComponent({
  69724. mainType: "parallelAxis",
  69725. query: e
  69726. }, function(r) {
  69727. r.axis.model.setActiveIntervals(e.intervals);
  69728. });
  69729. }), t.registerAction("parallelAxisExpand", function(e, n) {
  69730. n.eachComponent({
  69731. mainType: "parallel",
  69732. query: e
  69733. }, function(r) {
  69734. r.setAxisExpand(e);
  69735. });
  69736. });
  69737. }
  69738. var kFe = {
  69739. type: "value",
  69740. areaSelectStyle: {
  69741. width: 20,
  69742. borderWidth: 1,
  69743. borderColor: "rgba(160,197,232)",
  69744. color: "rgba(160,197,232)",
  69745. opacity: 0.3
  69746. },
  69747. realtime: !0,
  69748. z: 10
  69749. };
  69750. function tre(t) {
  69751. t.registerComponentView(nFe), t.registerComponentModel(iFe), t.registerCoordinateSystem("parallel", dFe), t.registerPreprocessor(KVe), t.registerComponentModel(SE), t.registerComponentView(AFe), Qh(t, "parallel", SE, kFe), RFe(t);
  69752. }
  69753. function LFe(t) {
  69754. at(tre), t.registerChartView(HVe), t.registerSeriesModel(ZVe), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, qVe);
  69755. }
  69756. var NFe = (
  69757. /** @class */
  69758. /* @__PURE__ */ function() {
  69759. function t() {
  69760. this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.cpx2 = 0, this.cpy2 = 0, this.extent = 0;
  69761. }
  69762. return t;
  69763. }()
  69764. ), BFe = (
  69765. /** @class */
  69766. function(t) {
  69767. q(e, t);
  69768. function e(n) {
  69769. return t.call(this, n) || this;
  69770. }
  69771. return e.prototype.getDefaultShape = function() {
  69772. return new NFe();
  69773. }, e.prototype.buildPath = function(n, r) {
  69774. var i = r.extent;
  69775. n.moveTo(r.x1, r.y1), n.bezierCurveTo(r.cpx1, r.cpy1, r.cpx2, r.cpy2, r.x2, r.y2), r.orient === "vertical" ? (n.lineTo(r.x2 + i, r.y2), n.bezierCurveTo(r.cpx2 + i, r.cpy2, r.cpx1 + i, r.cpy1, r.x1 + i, r.y1)) : (n.lineTo(r.x2, r.y2 + i), n.bezierCurveTo(r.cpx2, r.cpy2 + i, r.cpx1, r.cpy1 + i, r.x1, r.y1 + i)), n.closePath();
  69776. }, e.prototype.highlight = function() {
  69777. js(this);
  69778. }, e.prototype.downplay = function() {
  69779. Zs(this);
  69780. }, e;
  69781. }(ot)
  69782. ), zFe = (
  69783. /** @class */
  69784. function(t) {
  69785. q(e, t);
  69786. function e() {
  69787. var n = t !== null && t.apply(this, arguments) || this;
  69788. return n.type = e.type, n._focusAdjacencyDisabled = !1, n;
  69789. }
  69790. return e.prototype.render = function(n, r, i) {
  69791. var a = this, o = n.getGraph(), s = this.group, l = n.layoutInfo, u = l.width, c = l.height, f = n.getData(), d = n.getData("edge"), h = n.get("orient");
  69792. this._model = n, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
  69793. var v = new BFe(), g = Fe(v);
  69794. g.dataIndex = p.dataIndex, g.seriesIndex = n.seriesIndex, g.dataType = "edge";
  69795. var m = p.getModel(), y = m.getModel("lineStyle"), b = y.get("curveness"), _ = p.node1.getLayout(), O = p.node1.getModel(), S = O.get("localX"), x = O.get("localY"), C = p.node2.getLayout(), T = p.node2.getModel(), w = T.get("localX"), P = T.get("localY"), $ = p.getLayout(), A, D, E, R, N, V, z, W;
  69796. v.shape.extent = Math.max(1, $.dy), v.shape.orient = h, h === "vertical" ? (A = (S != null ? S * u : _.x) + $.sy, D = (x != null ? x * c : _.y) + _.dy, E = (w != null ? w * u : C.x) + $.ty, R = P != null ? P * c : C.y, N = A, V = D * (1 - b) + R * b, z = E, W = D * b + R * (1 - b)) : (A = (S != null ? S * u : _.x) + _.dx, D = (x != null ? x * c : _.y) + $.sy, E = w != null ? w * u : C.x, R = (P != null ? P * c : C.y) + $.ty, N = A * (1 - b) + E * b, V = D, z = A * b + E * (1 - b), W = R), v.setShape({
  69797. x1: A,
  69798. y1: D,
  69799. x2: E,
  69800. y2: R,
  69801. cpx1: N,
  69802. cpy1: V,
  69803. cpx2: z,
  69804. cpy2: W
  69805. }), v.useStyle(y.getItemStyle()), dW(v.style, h, p);
  69806. var F = "" + m.get("value"), Q = er(m, "edgeLabel");
  69807. Pr(v, Q, {
  69808. labelFetcher: {
  69809. getFormattedLabel: function(ee, oe, K, ie, X, H) {
  69810. return n.getFormattedLabel(
  69811. ee,
  69812. oe,
  69813. "edge",
  69814. ie,
  69815. // ensure edgeLabel formatter is provided
  69816. // to prevent the inheritance from `label.formatter` of the series
  69817. ji(X, Q.normal && Q.normal.get("formatter"), F),
  69818. H
  69819. );
  69820. }
  69821. },
  69822. labelDataIndex: p.dataIndex,
  69823. defaultText: F
  69824. }), v.setTextConfig({
  69825. position: "inside"
  69826. });
  69827. var Z = m.getModel("emphasis");
  69828. Tr(v, m, "lineStyle", function(ee) {
  69829. var oe = ee.getItemStyle();
  69830. return dW(oe, h, p), oe;
  69831. }), s.add(v), d.setItemGraphicEl(p.dataIndex, v);
  69832. var ne = Z.get("focus");
  69833. bn(v, ne === "adjacency" ? p.getAdjacentDataIndices() : ne === "trajectory" ? p.getTrajectoryDataIndices() : ne, Z.get("blurScope"), Z.get("disabled"));
  69834. }), o.eachNode(function(p) {
  69835. var v = p.getLayout(), g = p.getModel(), m = g.get("localX"), y = g.get("localY"), b = g.getModel("emphasis"), _ = g.get(["itemStyle", "borderRadius"]) || 0, O = new mt({
  69836. shape: {
  69837. x: m != null ? m * u : v.x,
  69838. y: y != null ? y * c : v.y,
  69839. width: v.dx,
  69840. height: v.dy,
  69841. r: _
  69842. },
  69843. style: g.getModel("itemStyle").getItemStyle(),
  69844. z2: 10
  69845. });
  69846. Pr(O, er(g), {
  69847. labelFetcher: {
  69848. getFormattedLabel: function(x, C) {
  69849. return n.getFormattedLabel(x, C, "node");
  69850. }
  69851. },
  69852. labelDataIndex: p.dataIndex,
  69853. defaultText: p.id
  69854. }), O.disableLabelAnimation = !0, O.setStyle("fill", p.getVisual("color")), O.setStyle("decal", p.getVisual("style").decal), Tr(O, g), s.add(O), f.setItemGraphicEl(p.dataIndex, O), Fe(O).dataType = "node";
  69855. var S = b.get("focus");
  69856. bn(O, S === "adjacency" ? p.getAdjacentDataIndices() : S === "trajectory" ? p.getTrajectoryDataIndices() : S, b.get("blurScope"), b.get("disabled"));
  69857. }), f.eachItemGraphicEl(function(p, v) {
  69858. var g = f.getItemModel(v);
  69859. g.get("draggable") && (p.drift = function(m, y) {
  69860. a._focusAdjacencyDisabled = !0, this.shape.x += m, this.shape.y += y, this.dirty(), i.dispatchAction({
  69861. type: "dragNode",
  69862. seriesId: n.id,
  69863. dataIndex: f.getRawIndex(v),
  69864. localX: this.shape.x / u,
  69865. localY: this.shape.y / c
  69866. });
  69867. }, p.ondragend = function() {
  69868. a._focusAdjacencyDisabled = !1;
  69869. }, p.draggable = !0, p.cursor = "move");
  69870. }), !this._data && n.isAnimationEnabled() && s.setClipPath(VFe(s.getBoundingRect(), n, function() {
  69871. s.removeClipPath();
  69872. })), this._data = n.getData();
  69873. }, e.prototype.dispose = function() {
  69874. }, e.type = "sankey", e;
  69875. }(zt)
  69876. );
  69877. function dW(t, e, n) {
  69878. switch (t.fill) {
  69879. case "source":
  69880. t.fill = n.node1.getVisual("color"), t.decal = n.node1.getVisual("style").decal;
  69881. break;
  69882. case "target":
  69883. t.fill = n.node2.getVisual("color"), t.decal = n.node2.getVisual("style").decal;
  69884. break;
  69885. case "gradient":
  69886. var r = n.node1.getVisual("color"), i = n.node2.getVisual("color");
  69887. Oe(r) && Oe(i) && (t.fill = new hp(0, 0, +(e === "horizontal"), +(e === "vertical"), [{
  69888. color: r,
  69889. offset: 0
  69890. }, {
  69891. color: i,
  69892. offset: 1
  69893. }]));
  69894. }
  69895. }
  69896. function VFe(t, e, n) {
  69897. var r = new mt({
  69898. shape: {
  69899. x: t.x - 10,
  69900. y: t.y - 10,
  69901. width: 0,
  69902. height: t.height + 20
  69903. }
  69904. });
  69905. return Yt(r, {
  69906. shape: {
  69907. width: t.width + 20
  69908. }
  69909. }, e, n), r;
  69910. }
  69911. var FFe = (
  69912. /** @class */
  69913. function(t) {
  69914. q(e, t);
  69915. function e() {
  69916. var n = t !== null && t.apply(this, arguments) || this;
  69917. return n.type = e.type, n;
  69918. }
  69919. return e.prototype.getInitialData = function(n, r) {
  69920. var i = n.edges || n.links, a = n.data || n.nodes, o = n.levels;
  69921. this.levelModels = [];
  69922. for (var s = this.levelModels, l = 0; l < o.length; l++)
  69923. if (o[l].depth != null && o[l].depth >= 0)
  69924. s[o[l].depth] = new Wt(o[l], this, r);
  69925. else if (process.env.NODE_ENV !== "production")
  69926. throw new Error("levels[i].depth is mandatory and should be natural number");
  69927. if (a && i) {
  69928. var u = Nne(a, i, this, !0, c);
  69929. return u.data;
  69930. }
  69931. function c(f, d) {
  69932. f.wrapMethod("getItemModel", function(h, p) {
  69933. var v = h.parentModel, g = v.getData().getItemLayout(p);
  69934. if (g) {
  69935. var m = g.depth, y = v.levelModels[m];
  69936. y && (h.parentModel = y);
  69937. }
  69938. return h;
  69939. }), d.wrapMethod("getItemModel", function(h, p) {
  69940. var v = h.parentModel, g = v.getGraph().getEdgeByIndex(p), m = g.node1.getLayout();
  69941. if (m) {
  69942. var y = m.depth, b = v.levelModels[y];
  69943. b && (h.parentModel = b);
  69944. }
  69945. return h;
  69946. });
  69947. }
  69948. }, e.prototype.setNodePosition = function(n, r) {
  69949. var i = this.option.data || this.option.nodes, a = i[n];
  69950. a.localX = r[0], a.localY = r[1];
  69951. }, e.prototype.getGraph = function() {
  69952. return this.getData().graph;
  69953. }, e.prototype.getEdgeData = function() {
  69954. return this.getGraph().edgeData;
  69955. }, e.prototype.formatTooltip = function(n, r, i) {
  69956. function a(h) {
  69957. return isNaN(h) || h == null;
  69958. }
  69959. if (i === "edge") {
  69960. var o = this.getDataParams(n, i), s = o.data, l = o.value, u = s.source + " -- " + s.target;
  69961. return tr("nameValue", {
  69962. name: u,
  69963. value: l,
  69964. noValue: a(l)
  69965. });
  69966. } else {
  69967. var c = this.getGraph().getNodeByIndex(n), f = c.getLayout().value, d = this.getDataParams(n, i).data.name;
  69968. return tr("nameValue", {
  69969. name: d != null ? d + "" : null,
  69970. value: f,
  69971. noValue: a(f)
  69972. });
  69973. }
  69974. }, e.prototype.optionUpdated = function() {
  69975. }, e.prototype.getDataParams = function(n, r) {
  69976. var i = t.prototype.getDataParams.call(this, n, r);
  69977. if (i.value == null && r === "node") {
  69978. var a = this.getGraph().getNodeByIndex(n), o = a.getLayout().value;
  69979. i.value = o;
  69980. }
  69981. return i;
  69982. }, e.type = "series.sankey", e.defaultOption = {
  69983. // zlevel: 0,
  69984. z: 2,
  69985. coordinateSystem: "view",
  69986. left: "5%",
  69987. top: "5%",
  69988. right: "20%",
  69989. bottom: "5%",
  69990. orient: "horizontal",
  69991. nodeWidth: 20,
  69992. nodeGap: 8,
  69993. draggable: !0,
  69994. layoutIterations: 32,
  69995. label: {
  69996. show: !0,
  69997. position: "right",
  69998. fontSize: 12
  69999. },
  70000. edgeLabel: {
  70001. show: !1,
  70002. fontSize: 12
  70003. },
  70004. levels: [],
  70005. nodeAlign: "justify",
  70006. lineStyle: {
  70007. color: "#314656",
  70008. opacity: 0.2,
  70009. curveness: 0.5
  70010. },
  70011. emphasis: {
  70012. label: {
  70013. show: !0
  70014. },
  70015. lineStyle: {
  70016. opacity: 0.5
  70017. }
  70018. },
  70019. select: {
  70020. itemStyle: {
  70021. borderColor: "#212121"
  70022. }
  70023. },
  70024. animationEasing: "linear",
  70025. animationDuration: 1e3
  70026. }, e;
  70027. }(Ht)
  70028. );
  70029. function WFe(t, e) {
  70030. t.eachSeriesByType("sankey", function(n) {
  70031. var r = n.get("nodeWidth"), i = n.get("nodeGap"), a = QFe(n, e);
  70032. n.layoutInfo = a;
  70033. var o = a.width, s = a.height, l = n.getGraph(), u = l.nodes, c = l.edges;
  70034. GFe(u);
  70035. var f = Nt(u, function(v) {
  70036. return v.getLayout().value === 0;
  70037. }), d = f.length !== 0 ? 0 : n.get("layoutIterations"), h = n.get("orient"), p = n.get("nodeAlign");
  70038. HFe(u, c, r, i, o, s, d, h, p);
  70039. });
  70040. }
  70041. function QFe(t, e) {
  70042. return Rn(t.getBoxLayoutParams(), {
  70043. width: e.getWidth(),
  70044. height: e.getHeight()
  70045. });
  70046. }
  70047. function HFe(t, e, n, r, i, a, o, s, l) {
  70048. jFe(t, e, n, i, a, s, l), YFe(t, e, a, i, r, o, s), aWe(t, s);
  70049. }
  70050. function GFe(t) {
  70051. k(t, function(e) {
  70052. var n = Jl(e.outEdges, kO), r = Jl(e.inEdges, kO), i = e.getValue() || 0, a = Math.max(n, r, i);
  70053. e.setLayout({
  70054. value: a
  70055. }, !0);
  70056. });
  70057. }
  70058. function jFe(t, e, n, r, i, a, o) {
  70059. for (var s = [], l = [], u = [], c = [], f = 0, d = 0; d < e.length; d++)
  70060. s[d] = 1;
  70061. for (var d = 0; d < t.length; d++)
  70062. l[d] = t[d].inEdges.length, l[d] === 0 && u.push(t[d]);
  70063. for (var h = -1; u.length; ) {
  70064. for (var p = 0; p < u.length; p++) {
  70065. var v = u[p], g = v.hostGraph.data.getRawDataItem(v.dataIndex), m = g.depth != null && g.depth >= 0;
  70066. m && g.depth > h && (h = g.depth), v.setLayout({
  70067. depth: m ? g.depth : f
  70068. }, !0), a === "vertical" ? v.setLayout({
  70069. dy: n
  70070. }, !0) : v.setLayout({
  70071. dx: n
  70072. }, !0);
  70073. for (var y = 0; y < v.outEdges.length; y++) {
  70074. var b = v.outEdges[y], _ = e.indexOf(b);
  70075. s[_] = 0;
  70076. var O = b.node2, S = t.indexOf(O);
  70077. --l[S] === 0 && c.indexOf(O) < 0 && c.push(O);
  70078. }
  70079. }
  70080. ++f, u = c, c = [];
  70081. }
  70082. for (var d = 0; d < s.length; d++)
  70083. if (s[d] === 1)
  70084. throw new Error("Sankey is a DAG, the original data has cycle!");
  70085. var x = h > f - 1 ? h : f - 1;
  70086. o && o !== "left" && ZFe(t, o, a, x);
  70087. var C = a === "vertical" ? (i - n) / x : (r - n) / x;
  70088. XFe(t, C, a);
  70089. }
  70090. function nre(t) {
  70091. var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  70092. return e.depth != null && e.depth >= 0;
  70093. }
  70094. function ZFe(t, e, n, r) {
  70095. if (e === "right") {
  70096. for (var i = [], a = t, o = 0; a.length; ) {
  70097. for (var s = 0; s < a.length; s++) {
  70098. var l = a[s];
  70099. l.setLayout({
  70100. skNodeHeight: o
  70101. }, !0);
  70102. for (var u = 0; u < l.inEdges.length; u++) {
  70103. var c = l.inEdges[u];
  70104. i.indexOf(c.node1) < 0 && i.push(c.node1);
  70105. }
  70106. }
  70107. a = i, i = [], ++o;
  70108. }
  70109. k(t, function(f) {
  70110. nre(f) || f.setLayout({
  70111. depth: Math.max(0, r - f.getLayout().skNodeHeight)
  70112. }, !0);
  70113. });
  70114. } else e === "justify" && UFe(t, r);
  70115. }
  70116. function UFe(t, e) {
  70117. k(t, function(n) {
  70118. !nre(n) && !n.outEdges.length && n.setLayout({
  70119. depth: e
  70120. }, !0);
  70121. });
  70122. }
  70123. function XFe(t, e, n) {
  70124. k(t, function(r) {
  70125. var i = r.getLayout().depth * e;
  70126. n === "vertical" ? r.setLayout({
  70127. y: i
  70128. }, !0) : r.setLayout({
  70129. x: i
  70130. }, !0);
  70131. });
  70132. }
  70133. function YFe(t, e, n, r, i, a, o) {
  70134. var s = qFe(t, o);
  70135. KFe(s, e, n, r, i, o), DP(s, i, n, r, o);
  70136. for (var l = 1; a > 0; a--)
  70137. l *= 0.99, JFe(s, l, o), DP(s, i, n, r, o), iWe(s, l, o), DP(s, i, n, r, o);
  70138. }
  70139. function qFe(t, e) {
  70140. var n = [], r = e === "vertical" ? "y" : "x", i = PA(t, function(a) {
  70141. return a.getLayout()[r];
  70142. });
  70143. return i.keys.sort(function(a, o) {
  70144. return a - o;
  70145. }), k(i.keys, function(a) {
  70146. n.push(i.buckets.get(a));
  70147. }), n;
  70148. }
  70149. function KFe(t, e, n, r, i, a) {
  70150. var o = 1 / 0;
  70151. k(t, function(s) {
  70152. var l = s.length, u = 0;
  70153. k(s, function(f) {
  70154. u += f.getLayout().value;
  70155. });
  70156. var c = a === "vertical" ? (r - (l - 1) * i) / u : (n - (l - 1) * i) / u;
  70157. c < o && (o = c);
  70158. }), k(t, function(s) {
  70159. k(s, function(l, u) {
  70160. var c = l.getLayout().value * o;
  70161. a === "vertical" ? (l.setLayout({
  70162. x: u
  70163. }, !0), l.setLayout({
  70164. dx: c
  70165. }, !0)) : (l.setLayout({
  70166. y: u
  70167. }, !0), l.setLayout({
  70168. dy: c
  70169. }, !0));
  70170. });
  70171. }), k(e, function(s) {
  70172. var l = +s.getValue() * o;
  70173. s.setLayout({
  70174. dy: l
  70175. }, !0);
  70176. });
  70177. }
  70178. function DP(t, e, n, r, i) {
  70179. var a = i === "vertical" ? "x" : "y";
  70180. k(t, function(o) {
  70181. o.sort(function(v, g) {
  70182. return v.getLayout()[a] - g.getLayout()[a];
  70183. });
  70184. for (var s, l, u, c = 0, f = o.length, d = i === "vertical" ? "dx" : "dy", h = 0; h < f; h++)
  70185. l = o[h], u = c - l.getLayout()[a], u > 0 && (s = l.getLayout()[a] + u, i === "vertical" ? l.setLayout({
  70186. x: s
  70187. }, !0) : l.setLayout({
  70188. y: s
  70189. }, !0)), c = l.getLayout()[a] + l.getLayout()[d] + e;
  70190. var p = i === "vertical" ? r : n;
  70191. if (u = c - e - p, u > 0) {
  70192. s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
  70193. x: s
  70194. }, !0) : l.setLayout({
  70195. y: s
  70196. }, !0), c = s;
  70197. for (var h = f - 2; h >= 0; --h)
  70198. l = o[h], u = l.getLayout()[a] + l.getLayout()[d] + e - c, u > 0 && (s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
  70199. x: s
  70200. }, !0) : l.setLayout({
  70201. y: s
  70202. }, !0)), c = l.getLayout()[a];
  70203. }
  70204. });
  70205. }
  70206. function JFe(t, e, n) {
  70207. k(t.slice().reverse(), function(r) {
  70208. k(r, function(i) {
  70209. if (i.outEdges.length) {
  70210. var a = Jl(i.outEdges, eWe, n) / Jl(i.outEdges, kO);
  70211. if (isNaN(a)) {
  70212. var o = i.outEdges.length;
  70213. a = o ? Jl(i.outEdges, tWe, n) / o : 0;
  70214. }
  70215. if (n === "vertical") {
  70216. var s = i.getLayout().x + (a - fu(i, n)) * e;
  70217. i.setLayout({
  70218. x: s
  70219. }, !0);
  70220. } else {
  70221. var l = i.getLayout().y + (a - fu(i, n)) * e;
  70222. i.setLayout({
  70223. y: l
  70224. }, !0);
  70225. }
  70226. }
  70227. });
  70228. });
  70229. }
  70230. function eWe(t, e) {
  70231. return fu(t.node2, e) * t.getValue();
  70232. }
  70233. function tWe(t, e) {
  70234. return fu(t.node2, e);
  70235. }
  70236. function nWe(t, e) {
  70237. return fu(t.node1, e) * t.getValue();
  70238. }
  70239. function rWe(t, e) {
  70240. return fu(t.node1, e);
  70241. }
  70242. function fu(t, e) {
  70243. return e === "vertical" ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2;
  70244. }
  70245. function kO(t) {
  70246. return t.getValue();
  70247. }
  70248. function Jl(t, e, n) {
  70249. for (var r = 0, i = t.length, a = -1; ++a < i; ) {
  70250. var o = +e(t[a], n);
  70251. isNaN(o) || (r += o);
  70252. }
  70253. return r;
  70254. }
  70255. function iWe(t, e, n) {
  70256. k(t, function(r) {
  70257. k(r, function(i) {
  70258. if (i.inEdges.length) {
  70259. var a = Jl(i.inEdges, nWe, n) / Jl(i.inEdges, kO);
  70260. if (isNaN(a)) {
  70261. var o = i.inEdges.length;
  70262. a = o ? Jl(i.inEdges, rWe, n) / o : 0;
  70263. }
  70264. if (n === "vertical") {
  70265. var s = i.getLayout().x + (a - fu(i, n)) * e;
  70266. i.setLayout({
  70267. x: s
  70268. }, !0);
  70269. } else {
  70270. var l = i.getLayout().y + (a - fu(i, n)) * e;
  70271. i.setLayout({
  70272. y: l
  70273. }, !0);
  70274. }
  70275. }
  70276. });
  70277. });
  70278. }
  70279. function aWe(t, e) {
  70280. var n = e === "vertical" ? "x" : "y";
  70281. k(t, function(r) {
  70282. r.outEdges.sort(function(i, a) {
  70283. return i.node2.getLayout()[n] - a.node2.getLayout()[n];
  70284. }), r.inEdges.sort(function(i, a) {
  70285. return i.node1.getLayout()[n] - a.node1.getLayout()[n];
  70286. });
  70287. }), k(t, function(r) {
  70288. var i = 0, a = 0;
  70289. k(r.outEdges, function(o) {
  70290. o.setLayout({
  70291. sy: i
  70292. }, !0), i += o.getLayout().dy;
  70293. }), k(r.inEdges, function(o) {
  70294. o.setLayout({
  70295. ty: a
  70296. }, !0), a += o.getLayout().dy;
  70297. });
  70298. });
  70299. }
  70300. function oWe(t) {
  70301. t.eachSeriesByType("sankey", function(e) {
  70302. var n = e.getGraph(), r = n.nodes, i = n.edges;
  70303. if (r.length) {
  70304. var a = 1 / 0, o = -1 / 0;
  70305. k(r, function(s) {
  70306. var l = s.getLayout().value;
  70307. l < a && (a = l), l > o && (o = l);
  70308. }), k(r, function(s) {
  70309. var l = new qn({
  70310. type: "color",
  70311. mappingMethod: "linear",
  70312. dataExtent: [a, o],
  70313. visual: e.get("color")
  70314. }), u = l.mapValueToVisual(s.getLayout().value), c = s.getModel().get(["itemStyle", "color"]);
  70315. c != null ? (s.setVisual("color", c), s.setVisual("style", {
  70316. fill: c
  70317. })) : (s.setVisual("color", u), s.setVisual("style", {
  70318. fill: u
  70319. }));
  70320. });
  70321. }
  70322. i.length && k(i, function(s) {
  70323. var l = s.getModel().get("lineStyle");
  70324. s.setVisual("style", l);
  70325. });
  70326. });
  70327. }
  70328. function sWe(t) {
  70329. t.registerChartView(zFe), t.registerSeriesModel(FFe), t.registerLayout(WFe), t.registerVisual(oWe), t.registerAction({
  70330. type: "dragNode",
  70331. event: "dragnode",
  70332. // here can only use 'update' now, other value is not support in echarts.
  70333. update: "update"
  70334. }, function(e, n) {
  70335. n.eachComponent({
  70336. mainType: "series",
  70337. subType: "sankey",
  70338. query: e
  70339. }, function(r) {
  70340. r.setNodePosition(e.dataIndex, [e.localX, e.localY]);
  70341. });
  70342. });
  70343. }
  70344. var rre = (
  70345. /** @class */
  70346. function() {
  70347. function t() {
  70348. }
  70349. return t.prototype.getInitialData = function(e, n) {
  70350. var r, i = n.getComponent("xAxis", this.get("xAxisIndex")), a = n.getComponent("yAxis", this.get("yAxisIndex")), o = i.get("type"), s = a.get("type"), l;
  70351. o === "category" ? (e.layout = "horizontal", r = i.getOrdinalMeta(), l = !0) : s === "category" ? (e.layout = "vertical", r = a.getOrdinalMeta(), l = !0) : e.layout = e.layout || "horizontal";
  70352. var u = ["x", "y"], c = e.layout === "horizontal" ? 0 : 1, f = this._baseAxisDim = u[c], d = u[1 - c], h = [i, a], p = h[c].get("type"), v = h[1 - c].get("type"), g = e.data;
  70353. if (g && l) {
  70354. var m = [];
  70355. k(g, function(_, O) {
  70356. var S;
  70357. ue(_) ? (S = _.slice(), _.unshift(O)) : ue(_.value) ? (S = le({}, _), S.value = S.value.slice(), _.value.unshift(O)) : S = _, m.push(S);
  70358. }), e.data = m;
  70359. }
  70360. var y = this.defaultValueDimensions, b = [{
  70361. name: f,
  70362. type: wO(p),
  70363. ordinalMeta: r,
  70364. otherDims: {
  70365. tooltip: !1,
  70366. itemName: 0
  70367. },
  70368. dimsDef: ["base"]
  70369. }, {
  70370. name: d,
  70371. type: wO(v),
  70372. dimsDef: y.slice()
  70373. }];
  70374. return Pp(this, {
  70375. coordDimensions: b,
  70376. dimensionsCount: y.length + 1,
  70377. encodeDefaulter: Ue(MJ, b, this)
  70378. });
  70379. }, t.prototype.getBaseAxis = function() {
  70380. var e = this._baseAxisDim;
  70381. return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
  70382. }, t;
  70383. }()
  70384. ), ire = (
  70385. /** @class */
  70386. function(t) {
  70387. q(e, t);
  70388. function e() {
  70389. var n = t !== null && t.apply(this, arguments) || this;
  70390. return n.type = e.type, n.defaultValueDimensions = [{
  70391. name: "min",
  70392. defaultTooltip: !0
  70393. }, {
  70394. name: "Q1",
  70395. defaultTooltip: !0
  70396. }, {
  70397. name: "median",
  70398. defaultTooltip: !0
  70399. }, {
  70400. name: "Q3",
  70401. defaultTooltip: !0
  70402. }, {
  70403. name: "max",
  70404. defaultTooltip: !0
  70405. }], n.visualDrawType = "stroke", n;
  70406. }
  70407. return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  70408. // zlevel: 0,
  70409. z: 2,
  70410. coordinateSystem: "cartesian2d",
  70411. legendHoverLink: !0,
  70412. layout: null,
  70413. boxWidth: [7, 50],
  70414. itemStyle: {
  70415. color: "#fff",
  70416. borderWidth: 1
  70417. },
  70418. emphasis: {
  70419. scale: !0,
  70420. itemStyle: {
  70421. borderWidth: 2,
  70422. shadowBlur: 5,
  70423. shadowOffsetX: 1,
  70424. shadowOffsetY: 1,
  70425. shadowColor: "rgba(0,0,0,0.2)"
  70426. }
  70427. },
  70428. animationDuration: 800
  70429. }, e;
  70430. }(Ht)
  70431. );
  70432. xn(ire, rre, !0);
  70433. var lWe = (
  70434. /** @class */
  70435. function(t) {
  70436. q(e, t);
  70437. function e() {
  70438. var n = t !== null && t.apply(this, arguments) || this;
  70439. return n.type = e.type, n;
  70440. }
  70441. return e.prototype.render = function(n, r, i) {
  70442. var a = n.getData(), o = this.group, s = this._data;
  70443. this._data || o.removeAll();
  70444. var l = n.get("layout") === "horizontal" ? 1 : 0;
  70445. a.diff(s).add(function(u) {
  70446. if (a.hasValue(u)) {
  70447. var c = a.getItemLayout(u), f = hW(c, a, u, l, !0);
  70448. a.setItemGraphicEl(u, f), o.add(f);
  70449. }
  70450. }).update(function(u, c) {
  70451. var f = s.getItemGraphicEl(c);
  70452. if (!a.hasValue(u)) {
  70453. o.remove(f);
  70454. return;
  70455. }
  70456. var d = a.getItemLayout(u);
  70457. f ? (so(f), are(d, f, a, u)) : f = hW(d, a, u, l), o.add(f), a.setItemGraphicEl(u, f);
  70458. }).remove(function(u) {
  70459. var c = s.getItemGraphicEl(u);
  70460. c && o.remove(c);
  70461. }).execute(), this._data = a;
  70462. }, e.prototype.remove = function(n) {
  70463. var r = this.group, i = this._data;
  70464. this._data = null, i && i.eachItemGraphicEl(function(a) {
  70465. a && r.remove(a);
  70466. });
  70467. }, e.type = "boxplot", e;
  70468. }(zt)
  70469. ), uWe = (
  70470. /** @class */
  70471. /* @__PURE__ */ function() {
  70472. function t() {
  70473. }
  70474. return t;
  70475. }()
  70476. ), cWe = (
  70477. /** @class */
  70478. function(t) {
  70479. q(e, t);
  70480. function e(n) {
  70481. var r = t.call(this, n) || this;
  70482. return r.type = "boxplotBoxPath", r;
  70483. }
  70484. return e.prototype.getDefaultShape = function() {
  70485. return new uWe();
  70486. }, e.prototype.buildPath = function(n, r) {
  70487. var i = r.points, a = 0;
  70488. for (n.moveTo(i[a][0], i[a][1]), a++; a < 4; a++)
  70489. n.lineTo(i[a][0], i[a][1]);
  70490. for (n.closePath(); a < i.length; a++)
  70491. n.moveTo(i[a][0], i[a][1]), a++, n.lineTo(i[a][0], i[a][1]);
  70492. }, e;
  70493. }(ot)
  70494. );
  70495. function hW(t, e, n, r, i) {
  70496. var a = t.ends, o = new cWe({
  70497. shape: {
  70498. points: i ? fWe(a, r, t) : a
  70499. }
  70500. });
  70501. return are(t, o, e, n, i), o;
  70502. }
  70503. function are(t, e, n, r, i) {
  70504. var a = n.hostModel, o = Lf[i ? "initProps" : "updateProps"];
  70505. o(e, {
  70506. shape: {
  70507. points: t.ends
  70508. }
  70509. }, a, r), e.useStyle(n.getItemVisual(r, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  70510. var s = n.getItemModel(r), l = s.getModel("emphasis");
  70511. Tr(e, s), bn(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
  70512. }
  70513. function fWe(t, e, n) {
  70514. return ce(t, function(r) {
  70515. return r = r.slice(), r[e] = n.initBaseline, r;
  70516. });
  70517. }
  70518. var Lg = k;
  70519. function dWe(t) {
  70520. var e = hWe(t);
  70521. Lg(e, function(n) {
  70522. var r = n.seriesModels;
  70523. r.length && (pWe(n), Lg(r, function(i, a) {
  70524. vWe(i, n.boxOffsetList[a], n.boxWidthList[a]);
  70525. }));
  70526. });
  70527. }
  70528. function hWe(t) {
  70529. var e = [], n = [];
  70530. return t.eachSeriesByType("boxplot", function(r) {
  70531. var i = r.getBaseAxis(), a = et(n, i);
  70532. a < 0 && (a = n.length, n[a] = i, e[a] = {
  70533. axis: i,
  70534. seriesModels: []
  70535. }), e[a].seriesModels.push(r);
  70536. }), e;
  70537. }
  70538. function pWe(t) {
  70539. var e = t.axis, n = t.seriesModels, r = n.length, i = t.boxWidthList = [], a = t.boxOffsetList = [], o = [], s;
  70540. if (e.type === "category")
  70541. s = e.getBandWidth();
  70542. else {
  70543. var l = 0;
  70544. Lg(n, function(p) {
  70545. l = Math.max(l, p.getData().count());
  70546. });
  70547. var u = e.getExtent();
  70548. s = Math.abs(u[1] - u[0]) / l;
  70549. }
  70550. Lg(n, function(p) {
  70551. var v = p.get("boxWidth");
  70552. ue(v) || (v = [v, v]), o.push([_e(v[0], s) || 0, _e(v[1], s) || 0]);
  70553. });
  70554. var c = s * 0.8 - 2, f = c / r * 0.3, d = (c - f * (r - 1)) / r, h = d / 2 - c / 2;
  70555. Lg(n, function(p, v) {
  70556. a.push(h), h += f + d, i.push(Math.min(Math.max(d, o[v][0]), o[v][1]));
  70557. });
  70558. }
  70559. function vWe(t, e, n) {
  70560. var r = t.coordinateSystem, i = t.getData(), a = n / 2, o = t.get("layout") === "horizontal" ? 0 : 1, s = 1 - o, l = ["x", "y"], u = i.mapDimension(l[o]), c = i.mapDimensionsAll(l[s]);
  70561. if (u == null || c.length < 5)
  70562. return;
  70563. for (var f = 0; f < i.count(); f++) {
  70564. var d = i.get(u, f), h = b(d, c[2], f), p = b(d, c[0], f), v = b(d, c[1], f), g = b(d, c[3], f), m = b(d, c[4], f), y = [];
  70565. _(y, v, !1), _(y, g, !0), y.push(p, v, m, g), O(y, p), O(y, m), O(y, h), i.setItemLayout(f, {
  70566. initBaseline: h[s],
  70567. ends: y
  70568. });
  70569. }
  70570. function b(S, x, C) {
  70571. var T = i.get(x, C), w = [];
  70572. w[o] = S, w[s] = T;
  70573. var P;
  70574. return isNaN(S) || isNaN(T) ? P = [NaN, NaN] : (P = r.dataToPoint(w), P[o] += e), P;
  70575. }
  70576. function _(S, x, C) {
  70577. var T = x.slice(), w = x.slice();
  70578. T[o] += a, w[o] -= a, C ? S.push(T, w) : S.push(w, T);
  70579. }
  70580. function O(S, x) {
  70581. var C = x.slice(), T = x.slice();
  70582. C[o] -= a, T[o] += a, S.push(C, T);
  70583. }
  70584. }
  70585. function gWe(t, e) {
  70586. e = e || {};
  70587. for (var n = [], r = [], i = e.boundIQR, a = i === "none" || i === 0, o = 0; o < t.length; o++) {
  70588. var s = Vi(t[o].slice()), l = z_(s, 0.25), u = z_(s, 0.5), c = z_(s, 0.75), f = s[0], d = s[s.length - 1], h = (i ?? 1.5) * (c - l), p = a ? f : Math.max(f, l - h), v = a ? d : Math.min(d, c + h), g = e.itemNameFormatter, m = Me(g) ? g({
  70589. value: o
  70590. }) : Oe(g) ? g.replace("{value}", o + "") : o + "";
  70591. n.push([m, p, l, u, c, v]);
  70592. for (var y = 0; y < s.length; y++) {
  70593. var b = s[y];
  70594. if (b < p || b > v) {
  70595. var _ = [m, b];
  70596. r.push(_);
  70597. }
  70598. }
  70599. }
  70600. return {
  70601. boxData: n,
  70602. outliers: r
  70603. };
  70604. }
  70605. var mWe = {
  70606. type: "echarts:boxplot",
  70607. transform: function(e) {
  70608. var n = e.upstream;
  70609. if (n.sourceFormat !== Br) {
  70610. var r = "";
  70611. process.env.NODE_ENV !== "production" && (r = ti("source data is not applicable for this boxplot transform. Expect number[][].")), Et(r);
  70612. }
  70613. var i = gWe(n.getRawData(), e.config);
  70614. return [{
  70615. dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
  70616. data: i.boxData
  70617. }, {
  70618. data: i.outliers
  70619. }];
  70620. }
  70621. };
  70622. function yWe(t) {
  70623. t.registerSeriesModel(ire), t.registerChartView(lWe), t.registerLayout(dWe), t.registerTransform(mWe);
  70624. }
  70625. var bWe = ["color", "borderColor"], _We = (
  70626. /** @class */
  70627. function(t) {
  70628. q(e, t);
  70629. function e() {
  70630. var n = t !== null && t.apply(this, arguments) || this;
  70631. return n.type = e.type, n;
  70632. }
  70633. return e.prototype.render = function(n, r, i) {
  70634. this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(n), this._isLargeDraw ? this._renderLarge(n) : this._renderNormal(n);
  70635. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  70636. this._clear(), this._updateDrawMode(n);
  70637. }, e.prototype.incrementalRender = function(n, r, i, a) {
  70638. this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(n, r) : this._incrementalRenderNormal(n, r);
  70639. }, e.prototype.eachRendered = function(n) {
  70640. Tu(this._progressiveEls || this.group, n);
  70641. }, e.prototype._updateDrawMode = function(n) {
  70642. var r = n.pipelineContext.large;
  70643. (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
  70644. }, e.prototype._renderNormal = function(n) {
  70645. var r = n.getData(), i = this._data, a = this.group, o = r.getLayout("isSimpleBox"), s = n.get("clip", !0), l = n.coordinateSystem, u = l.getArea && l.getArea();
  70646. this._data || a.removeAll(), r.diff(i).add(function(c) {
  70647. if (r.hasValue(c)) {
  70648. var f = r.getItemLayout(c);
  70649. if (s && pW(u, f))
  70650. return;
  70651. var d = RP(f, c, !0);
  70652. Yt(d, {
  70653. shape: {
  70654. points: f.ends
  70655. }
  70656. }, n, c), kP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
  70657. }
  70658. }).update(function(c, f) {
  70659. var d = i.getItemGraphicEl(f);
  70660. if (!r.hasValue(c)) {
  70661. a.remove(d);
  70662. return;
  70663. }
  70664. var h = r.getItemLayout(c);
  70665. if (s && pW(u, h)) {
  70666. a.remove(d);
  70667. return;
  70668. }
  70669. d ? (Ct(d, {
  70670. shape: {
  70671. points: h.ends
  70672. }
  70673. }, n, c), so(d)) : d = RP(h), kP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
  70674. }).remove(function(c) {
  70675. var f = i.getItemGraphicEl(c);
  70676. f && a.remove(f);
  70677. }).execute(), this._data = r;
  70678. }, e.prototype._renderLarge = function(n) {
  70679. this._clear(), vW(n, this.group);
  70680. var r = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
  70681. r ? this.group.setClipPath(r) : this.group.removeClipPath();
  70682. }, e.prototype._incrementalRenderNormal = function(n, r) {
  70683. for (var i = r.getData(), a = i.getLayout("isSimpleBox"), o; (o = n.next()) != null; ) {
  70684. var s = i.getItemLayout(o), l = RP(s);
  70685. kP(l, i, o, a), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
  70686. }
  70687. }, e.prototype._incrementalRenderLarge = function(n, r) {
  70688. vW(r, this.group, this._progressiveEls, !0);
  70689. }, e.prototype.remove = function(n) {
  70690. this._clear();
  70691. }, e.prototype._clear = function() {
  70692. this.group.removeAll(), this._data = null;
  70693. }, e.type = "candlestick", e;
  70694. }(zt)
  70695. ), OWe = (
  70696. /** @class */
  70697. /* @__PURE__ */ function() {
  70698. function t() {
  70699. }
  70700. return t;
  70701. }()
  70702. ), SWe = (
  70703. /** @class */
  70704. function(t) {
  70705. q(e, t);
  70706. function e(n) {
  70707. var r = t.call(this, n) || this;
  70708. return r.type = "normalCandlestickBox", r;
  70709. }
  70710. return e.prototype.getDefaultShape = function() {
  70711. return new OWe();
  70712. }, e.prototype.buildPath = function(n, r) {
  70713. var i = r.points;
  70714. this.__simpleBox ? (n.moveTo(i[4][0], i[4][1]), n.lineTo(i[6][0], i[6][1])) : (n.moveTo(i[0][0], i[0][1]), n.lineTo(i[1][0], i[1][1]), n.lineTo(i[2][0], i[2][1]), n.lineTo(i[3][0], i[3][1]), n.closePath(), n.moveTo(i[4][0], i[4][1]), n.lineTo(i[5][0], i[5][1]), n.moveTo(i[6][0], i[6][1]), n.lineTo(i[7][0], i[7][1]));
  70715. }, e;
  70716. }(ot)
  70717. );
  70718. function RP(t, e, n) {
  70719. var r = t.ends;
  70720. return new SWe({
  70721. shape: {
  70722. points: n ? xWe(r, t) : r
  70723. },
  70724. z2: 100
  70725. });
  70726. }
  70727. function pW(t, e) {
  70728. for (var n = !0, r = 0; r < e.ends.length; r++)
  70729. if (t.contain(e.ends[r][0], e.ends[r][1])) {
  70730. n = !1;
  70731. break;
  70732. }
  70733. return n;
  70734. }
  70735. function kP(t, e, n, r) {
  70736. var i = e.getItemModel(n);
  70737. t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = r, Tr(t, i);
  70738. }
  70739. function xWe(t, e) {
  70740. return ce(t, function(n) {
  70741. return n = n.slice(), n[1] = e.initBaseline, n;
  70742. });
  70743. }
  70744. var wWe = (
  70745. /** @class */
  70746. /* @__PURE__ */ function() {
  70747. function t() {
  70748. }
  70749. return t;
  70750. }()
  70751. ), LP = (
  70752. /** @class */
  70753. function(t) {
  70754. q(e, t);
  70755. function e(n) {
  70756. var r = t.call(this, n) || this;
  70757. return r.type = "largeCandlestickBox", r;
  70758. }
  70759. return e.prototype.getDefaultShape = function() {
  70760. return new wWe();
  70761. }, e.prototype.buildPath = function(n, r) {
  70762. for (var i = r.points, a = 0; a < i.length; )
  70763. if (this.__sign === i[a++]) {
  70764. var o = i[a++];
  70765. n.moveTo(o, i[a++]), n.lineTo(o, i[a++]);
  70766. } else
  70767. a += 3;
  70768. }, e;
  70769. }(ot)
  70770. );
  70771. function vW(t, e, n, r) {
  70772. var i = t.getData(), a = i.getLayout("largePoints"), o = new LP({
  70773. shape: {
  70774. points: a
  70775. },
  70776. __sign: 1,
  70777. ignoreCoarsePointer: !0
  70778. });
  70779. e.add(o);
  70780. var s = new LP({
  70781. shape: {
  70782. points: a
  70783. },
  70784. __sign: -1,
  70785. ignoreCoarsePointer: !0
  70786. });
  70787. e.add(s);
  70788. var l = new LP({
  70789. shape: {
  70790. points: a
  70791. },
  70792. __sign: 0,
  70793. ignoreCoarsePointer: !0
  70794. });
  70795. e.add(l), NP(1, o, t), NP(-1, s, t), NP(0, l, t), r && (o.incremental = !0, s.incremental = !0), n && n.push(o, s);
  70796. }
  70797. function NP(t, e, n, r) {
  70798. var i = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
  70799. t === 0 && (i = n.get(["itemStyle", "borderColorDoji"]));
  70800. var a = n.getModel("itemStyle").getItemStyle(bWe);
  70801. e.useStyle(a), e.style.fill = null, e.style.stroke = i;
  70802. }
  70803. var ore = (
  70804. /** @class */
  70805. function(t) {
  70806. q(e, t);
  70807. function e() {
  70808. var n = t !== null && t.apply(this, arguments) || this;
  70809. return n.type = e.type, n.defaultValueDimensions = [{
  70810. name: "open",
  70811. defaultTooltip: !0
  70812. }, {
  70813. name: "close",
  70814. defaultTooltip: !0
  70815. }, {
  70816. name: "lowest",
  70817. defaultTooltip: !0
  70818. }, {
  70819. name: "highest",
  70820. defaultTooltip: !0
  70821. }], n;
  70822. }
  70823. return e.prototype.getShadowDim = function() {
  70824. return "open";
  70825. }, e.prototype.brushSelector = function(n, r, i) {
  70826. var a = r.getItemLayout(n);
  70827. return a && i.rect(a.brushRect);
  70828. }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
  70829. // zlevel: 0,
  70830. z: 2,
  70831. coordinateSystem: "cartesian2d",
  70832. legendHoverLink: !0,
  70833. // xAxisIndex: 0,
  70834. // yAxisIndex: 0,
  70835. layout: null,
  70836. clip: !0,
  70837. itemStyle: {
  70838. color: "#eb5454",
  70839. color0: "#47b262",
  70840. borderColor: "#eb5454",
  70841. borderColor0: "#47b262",
  70842. borderColorDoji: null,
  70843. // borderColor: '#d24040',
  70844. // borderColor0: '#398f4f',
  70845. borderWidth: 1
  70846. },
  70847. emphasis: {
  70848. scale: !0,
  70849. itemStyle: {
  70850. borderWidth: 2
  70851. }
  70852. },
  70853. barMaxWidth: null,
  70854. barMinWidth: null,
  70855. barWidth: null,
  70856. large: !0,
  70857. largeThreshold: 600,
  70858. progressive: 3e3,
  70859. progressiveThreshold: 1e4,
  70860. progressiveChunkMode: "mod",
  70861. animationEasing: "linear",
  70862. animationDuration: 300
  70863. }, e;
  70864. }(Ht)
  70865. );
  70866. xn(ore, rre, !0);
  70867. function CWe(t) {
  70868. !t || !ue(t.series) || k(t.series, function(e) {
  70869. Ie(e) && e.type === "k" && (e.type = "candlestick");
  70870. });
  70871. }
  70872. var TWe = ["itemStyle", "borderColor"], PWe = ["itemStyle", "borderColor0"], $We = ["itemStyle", "borderColorDoji"], AWe = ["itemStyle", "color"], EWe = ["itemStyle", "color0"], MWe = {
  70873. seriesType: "candlestick",
  70874. plan: Op(),
  70875. // For legend.
  70876. performRawSeries: !0,
  70877. reset: function(t, e) {
  70878. function n(a, o) {
  70879. return o.get(a > 0 ? AWe : EWe);
  70880. }
  70881. function r(a, o) {
  70882. return o.get(a === 0 ? $We : a > 0 ? TWe : PWe);
  70883. }
  70884. if (!e.isSeriesFiltered(t)) {
  70885. var i = t.pipelineContext.large;
  70886. return !i && {
  70887. progress: function(a, o) {
  70888. for (var s; (s = a.next()) != null; ) {
  70889. var l = o.getItemModel(s), u = o.getItemLayout(s).sign, c = l.getItemStyle();
  70890. c.fill = n(u, l), c.stroke = r(u, l) || c.fill;
  70891. var f = o.ensureUniqueItemVisual(s, "style");
  70892. le(f, c);
  70893. }
  70894. }
  70895. };
  70896. }
  70897. }
  70898. }, IWe = {
  70899. seriesType: "candlestick",
  70900. plan: Op(),
  70901. reset: function(t) {
  70902. var e = t.coordinateSystem, n = t.getData(), r = DWe(t, n), i = 0, a = 1, o = ["x", "y"], s = n.getDimensionIndex(n.mapDimension(o[i])), l = ce(n.mapDimensionsAll(o[a]), n.getDimensionIndex, n), u = l[0], c = l[1], f = l[2], d = l[3];
  70903. if (n.setLayout({
  70904. candleWidth: r,
  70905. // The value is experimented visually.
  70906. isSimpleBox: r <= 1.3
  70907. }), s < 0 || l.length < 4)
  70908. return;
  70909. return {
  70910. progress: t.pipelineContext.large ? p : h
  70911. };
  70912. function h(v, g) {
  70913. for (var m, y = g.getStore(); (m = v.next()) != null; ) {
  70914. var b = y.get(s, m), _ = y.get(u, m), O = y.get(c, m), S = y.get(f, m), x = y.get(d, m), C = Math.min(_, O), T = Math.max(_, O), w = N(C, b), P = N(T, b), $ = N(S, b), A = N(x, b), D = [];
  70915. V(D, P, 0), V(D, w, 1), D.push(W(A), W(P), W($), W(w));
  70916. var E = g.getItemModel(m), R = !!E.get(["itemStyle", "borderColorDoji"]);
  70917. g.setItemLayout(m, {
  70918. sign: gW(y, m, _, O, c, R),
  70919. initBaseline: _ > O ? P[a] : w[a],
  70920. ends: D,
  70921. brushRect: z(S, x, b)
  70922. });
  70923. }
  70924. function N(F, Q) {
  70925. var Z = [];
  70926. return Z[i] = Q, Z[a] = F, isNaN(Q) || isNaN(F) ? [NaN, NaN] : e.dataToPoint(Z);
  70927. }
  70928. function V(F, Q, Z) {
  70929. var ne = Q.slice(), ee = Q.slice();
  70930. ne[i] = W_(ne[i] + r / 2, 1, !1), ee[i] = W_(ee[i] - r / 2, 1, !0), Z ? F.push(ne, ee) : F.push(ee, ne);
  70931. }
  70932. function z(F, Q, Z) {
  70933. var ne = N(F, Z), ee = N(Q, Z);
  70934. return ne[i] -= r / 2, ee[i] -= r / 2, {
  70935. x: ne[0],
  70936. y: ne[1],
  70937. width: r,
  70938. height: ee[1] - ne[1]
  70939. };
  70940. }
  70941. function W(F) {
  70942. return F[i] = W_(F[i], 1), F;
  70943. }
  70944. }
  70945. function p(v, g) {
  70946. for (var m = Fo(v.count * 4), y = 0, b, _ = [], O = [], S, x = g.getStore(), C = !!t.get(["itemStyle", "borderColorDoji"]); (S = v.next()) != null; ) {
  70947. var T = x.get(s, S), w = x.get(u, S), P = x.get(c, S), $ = x.get(f, S), A = x.get(d, S);
  70948. if (isNaN(T) || isNaN($) || isNaN(A)) {
  70949. m[y++] = NaN, y += 3;
  70950. continue;
  70951. }
  70952. m[y++] = gW(x, S, w, P, c, C), _[i] = T, _[a] = $, b = e.dataToPoint(_, null, O), m[y++] = b ? b[0] : NaN, m[y++] = b ? b[1] : NaN, _[a] = A, b = e.dataToPoint(_, null, O), m[y++] = b ? b[1] : NaN;
  70953. }
  70954. g.setLayout("largePoints", m);
  70955. }
  70956. }
  70957. };
  70958. function gW(t, e, n, r, i, a) {
  70959. var o;
  70960. return n > r ? o = -1 : n < r ? o = 1 : o = a ? 0 : e > 0 ? t.get(i, e - 1) <= r ? 1 : -1 : 1, o;
  70961. }
  70962. function DWe(t, e) {
  70963. var n = t.getBaseAxis(), r, i = n.type === "category" ? n.getBandWidth() : (r = n.getExtent(), Math.abs(r[1] - r[0]) / e.count()), a = _e(We(t.get("barMaxWidth"), i), i), o = _e(We(t.get("barMinWidth"), 1), i), s = t.get("barWidth");
  70964. return s != null ? _e(s, i) : Math.max(Math.min(i / 2, a), o);
  70965. }
  70966. function RWe(t) {
  70967. t.registerChartView(_We), t.registerSeriesModel(ore), t.registerPreprocessor(CWe), t.registerVisual(MWe), t.registerLayout(IWe);
  70968. }
  70969. function mW(t, e) {
  70970. var n = e.rippleEffectColor || e.color;
  70971. t.eachChild(function(r) {
  70972. r.attr({
  70973. z: e.z,
  70974. zlevel: e.zlevel,
  70975. style: {
  70976. stroke: e.brushType === "stroke" ? n : null,
  70977. fill: e.brushType === "fill" ? n : null
  70978. }
  70979. });
  70980. });
  70981. }
  70982. var kWe = (
  70983. /** @class */
  70984. function(t) {
  70985. q(e, t);
  70986. function e(n, r) {
  70987. var i = t.call(this) || this, a = new j0(n, r), o = new Ve();
  70988. return i.add(a), i.add(o), i.updateData(n, r), i;
  70989. }
  70990. return e.prototype.stopEffectAnimation = function() {
  70991. this.childAt(1).removeAll();
  70992. }, e.prototype.startEffectAnimation = function(n) {
  70993. for (var r = n.symbolType, i = n.color, a = n.rippleNumber, o = this.childAt(1), s = 0; s < a; s++) {
  70994. var l = $n(r, -1, -1, 2, 2, i);
  70995. l.attr({
  70996. style: {
  70997. strokeNoScale: !0
  70998. },
  70999. z2: 99,
  71000. silent: !0,
  71001. scaleX: 0.5,
  71002. scaleY: 0.5
  71003. });
  71004. var u = -s / a * n.period + n.effectOffset;
  71005. l.animate("", !0).when(n.period, {
  71006. scaleX: n.rippleScale / 2,
  71007. scaleY: n.rippleScale / 2
  71008. }).delay(u).start(), l.animateStyle(!0).when(n.period, {
  71009. opacity: 0
  71010. }).delay(u).start(), o.add(l);
  71011. }
  71012. mW(o, n);
  71013. }, e.prototype.updateEffectAnimation = function(n) {
  71014. for (var r = this._effectCfg, i = this.childAt(1), a = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < a.length; o++) {
  71015. var s = a[o];
  71016. if (r[s] !== n[s]) {
  71017. this.stopEffectAnimation(), this.startEffectAnimation(n);
  71018. return;
  71019. }
  71020. }
  71021. mW(i, n);
  71022. }, e.prototype.highlight = function() {
  71023. js(this);
  71024. }, e.prototype.downplay = function() {
  71025. Zs(this);
  71026. }, e.prototype.getSymbolType = function() {
  71027. var n = this.childAt(0);
  71028. return n && n.getSymbolType();
  71029. }, e.prototype.updateData = function(n, r) {
  71030. var i = this, a = n.hostModel;
  71031. this.childAt(0).updateData(n, r);
  71032. var o = this.childAt(1), s = n.getItemModel(r), l = n.getItemVisual(r, "symbol"), u = xp(n.getItemVisual(r, "symbolSize")), c = n.getItemVisual(r, "style"), f = c && c.fill, d = s.getModel("emphasis");
  71033. o.setScale(u), o.traverse(function(g) {
  71034. g.setStyle("fill", f);
  71035. });
  71036. var h = Vf(n.getItemVisual(r, "symbolOffset"), u);
  71037. h && (o.x = h[0], o.y = h[1]);
  71038. var p = n.getItemVisual(r, "symbolRotate");
  71039. o.rotation = (p || 0) * Math.PI / 180 || 0;
  71040. var v = {};
  71041. v.showEffectOn = a.get("showEffectOn"), v.rippleScale = s.get(["rippleEffect", "scale"]), v.brushType = s.get(["rippleEffect", "brushType"]), v.period = s.get(["rippleEffect", "period"]) * 1e3, v.effectOffset = r / n.count(), v.z = a.getShallow("z") || 0, v.zlevel = a.getShallow("zlevel") || 0, v.symbolType = l, v.color = f, v.rippleEffectColor = s.get(["rippleEffect", "color"]), v.rippleNumber = s.get(["rippleEffect", "number"]), v.showEffectOn === "render" ? (this._effectCfg ? this.updateEffectAnimation(v) : this.startEffectAnimation(v), this._effectCfg = v) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function(g) {
  71042. g === "emphasis" ? v.showEffectOn !== "render" && i.startEffectAnimation(v) : g === "normal" && v.showEffectOn !== "render" && i.stopEffectAnimation();
  71043. }), this._effectCfg = v, bn(this, d.get("focus"), d.get("blurScope"), d.get("disabled"));
  71044. }, e.prototype.fadeOut = function(n) {
  71045. n && n();
  71046. }, e;
  71047. }(Ve)
  71048. ), LWe = (
  71049. /** @class */
  71050. function(t) {
  71051. q(e, t);
  71052. function e() {
  71053. var n = t !== null && t.apply(this, arguments) || this;
  71054. return n.type = e.type, n;
  71055. }
  71056. return e.prototype.init = function() {
  71057. this._symbolDraw = new Z0(kWe);
  71058. }, e.prototype.render = function(n, r, i) {
  71059. var a = n.getData(), o = this._symbolDraw;
  71060. o.updateData(a, {
  71061. clipShape: this._getClipShape(n)
  71062. }), this.group.add(o.group);
  71063. }, e.prototype._getClipShape = function(n) {
  71064. var r = n.coordinateSystem, i = r && r.getArea && r.getArea();
  71065. return n.get("clip", !0) ? i : null;
  71066. }, e.prototype.updateTransform = function(n, r, i) {
  71067. var a = n.getData();
  71068. this.group.dirty();
  71069. var o = X0("").reset(n, r, i);
  71070. o.progress && o.progress({
  71071. start: 0,
  71072. end: a.count(),
  71073. count: a.count()
  71074. }, a), this._symbolDraw.updateLayout();
  71075. }, e.prototype._updateGroupTransform = function(n) {
  71076. var r = n.coordinateSystem;
  71077. r && r.getRoamTransform && (this.group.transform = Iq(r.getRoamTransform()), this.group.decomposeTransform());
  71078. }, e.prototype.remove = function(n, r) {
  71079. this._symbolDraw && this._symbolDraw.remove(!0);
  71080. }, e.type = "effectScatter", e;
  71081. }(zt)
  71082. ), NWe = (
  71083. /** @class */
  71084. function(t) {
  71085. q(e, t);
  71086. function e() {
  71087. var n = t !== null && t.apply(this, arguments) || this;
  71088. return n.type = e.type, n.hasSymbolVisual = !0, n;
  71089. }
  71090. return e.prototype.getInitialData = function(n, r) {
  71091. return us(null, this, {
  71092. useEncodeDefaulter: !0
  71093. });
  71094. }, e.prototype.brushSelector = function(n, r, i) {
  71095. return i.point(r.getItemLayout(n));
  71096. }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
  71097. coordinateSystem: "cartesian2d",
  71098. // zlevel: 0,
  71099. z: 2,
  71100. legendHoverLink: !0,
  71101. effectType: "ripple",
  71102. progressive: 0,
  71103. // When to show the effect, option: 'render'|'emphasis'
  71104. showEffectOn: "render",
  71105. clip: !0,
  71106. // Ripple effect config
  71107. rippleEffect: {
  71108. period: 4,
  71109. // Scale of ripple
  71110. scale: 2.5,
  71111. // Brush type can be fill or stroke
  71112. brushType: "fill",
  71113. // Ripple number
  71114. number: 3
  71115. },
  71116. universalTransition: {
  71117. divideShape: "clone"
  71118. },
  71119. // Cartesian coordinate system
  71120. // xAxisIndex: 0,
  71121. // yAxisIndex: 0,
  71122. // Polar coordinate system
  71123. // polarIndex: 0,
  71124. // Geo coordinate system
  71125. // geoIndex: 0,
  71126. // symbol: null, // 图形类型
  71127. symbolSize: 10
  71128. // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
  71129. // symbolRotate: null, // 图形旋转控制
  71130. // itemStyle: {
  71131. // opacity: 1
  71132. // }
  71133. }, e;
  71134. }(Ht)
  71135. );
  71136. function BWe(t) {
  71137. t.registerChartView(LWe), t.registerSeriesModel(NWe), t.registerLayout(X0("effectScatter"));
  71138. }
  71139. var sre = (
  71140. /** @class */
  71141. function(t) {
  71142. q(e, t);
  71143. function e(n, r, i) {
  71144. var a = t.call(this) || this;
  71145. return a.add(a.createLine(n, r, i)), a._updateEffectSymbol(n, r), a;
  71146. }
  71147. return e.prototype.createLine = function(n, r, i) {
  71148. return new qk(n, r, i);
  71149. }, e.prototype._updateEffectSymbol = function(n, r) {
  71150. var i = n.getItemModel(r), a = i.getModel("effect"), o = a.get("symbolSize"), s = a.get("symbol");
  71151. ue(o) || (o = [o, o]);
  71152. var l = n.getItemVisual(r, "style"), u = a.get("color") || l && l.stroke, c = this.childAt(1);
  71153. this._symbolType !== s && (this.remove(c), c = $n(s, -0.5, -0.5, 1, 1, u), c.z2 = 100, c.culling = !0, this.add(c)), c && (c.setStyle("shadowColor", u), c.setStyle(a.getItemStyle(["color"])), c.scaleX = o[0], c.scaleY = o[1], c.setColor(u), this._symbolType = s, this._symbolScale = o, this._updateEffectAnimation(n, a, r));
  71154. }, e.prototype._updateEffectAnimation = function(n, r, i) {
  71155. var a = this.childAt(1);
  71156. if (a) {
  71157. var o = n.getItemLayout(i), s = r.get("period") * 1e3, l = r.get("loop"), u = r.get("roundTrip"), c = r.get("constantSpeed"), f = Tn(r.get("delay"), function(h) {
  71158. return h / n.count() * s / 3;
  71159. });
  71160. if (a.ignore = !0, this._updateAnimationPoints(a, o), c > 0 && (s = this._getLineLength(a) / c * 1e3), s !== this._period || l !== this._loop || u !== this._roundTrip) {
  71161. a.stopAnimation();
  71162. var d = void 0;
  71163. Me(f) ? d = f(i) : d = f, a.__t > 0 && (d = -s * a.__t), this._animateSymbol(a, s, d, l, u);
  71164. }
  71165. this._period = s, this._loop = l, this._roundTrip = u;
  71166. }
  71167. }, e.prototype._animateSymbol = function(n, r, i, a, o) {
  71168. if (r > 0) {
  71169. n.__t = 0;
  71170. var s = this, l = n.animate("", a).when(o ? r * 2 : r, {
  71171. __t: o ? 2 : 1
  71172. }).delay(i).during(function() {
  71173. s._updateSymbolPosition(n);
  71174. });
  71175. a || l.done(function() {
  71176. s.remove(n);
  71177. }), l.start();
  71178. }
  71179. }, e.prototype._getLineLength = function(n) {
  71180. return Ts(n.__p1, n.__cp1) + Ts(n.__cp1, n.__p2);
  71181. }, e.prototype._updateAnimationPoints = function(n, r) {
  71182. n.__p1 = r[0], n.__p2 = r[1], n.__cp1 = r[2] || [(r[0][0] + r[1][0]) / 2, (r[0][1] + r[1][1]) / 2];
  71183. }, e.prototype.updateData = function(n, r, i) {
  71184. this.childAt(0).updateData(n, r, i), this._updateEffectSymbol(n, r);
  71185. }, e.prototype._updateSymbolPosition = function(n) {
  71186. var r = n.__p1, i = n.__p2, a = n.__cp1, o = n.__t < 1 ? n.__t : 2 - n.__t, s = [n.x, n.y], l = s.slice(), u = ir, c = fA;
  71187. s[0] = u(r[0], a[0], i[0], o), s[1] = u(r[1], a[1], i[1], o);
  71188. var f = n.__t < 1 ? c(r[0], a[0], i[0], o) : c(i[0], a[0], r[0], 1 - o), d = n.__t < 1 ? c(r[1], a[1], i[1], o) : c(i[1], a[1], r[1], 1 - o);
  71189. n.rotation = -Math.atan2(d, f) - Math.PI / 2, (this._symbolType === "line" || this._symbolType === "rect" || this._symbolType === "roundRect") && (n.__lastT !== void 0 && n.__lastT < n.__t ? (n.scaleY = Ts(l, s) * 1.05, o === 1 && (s[0] = l[0] + (s[0] - l[0]) / 2, s[1] = l[1] + (s[1] - l[1]) / 2)) : n.__lastT === 1 ? n.scaleY = 2 * Ts(r, s) : n.scaleY = this._symbolScale[1]), n.__lastT = n.__t, n.ignore = !1, n.x = s[0], n.y = s[1];
  71190. }, e.prototype.updateLayout = function(n, r) {
  71191. this.childAt(0).updateLayout(n, r);
  71192. var i = n.getItemModel(r).getModel("effect");
  71193. this._updateEffectAnimation(n, i, r);
  71194. }, e;
  71195. }(Ve)
  71196. ), lre = (
  71197. /** @class */
  71198. function(t) {
  71199. q(e, t);
  71200. function e(n, r, i) {
  71201. var a = t.call(this) || this;
  71202. return a._createPolyline(n, r, i), a;
  71203. }
  71204. return e.prototype._createPolyline = function(n, r, i) {
  71205. var a = n.getItemLayout(r), o = new ai({
  71206. shape: {
  71207. points: a
  71208. }
  71209. });
  71210. this.add(o), this._updateCommonStl(n, r, i);
  71211. }, e.prototype.updateData = function(n, r, i) {
  71212. var a = n.hostModel, o = this.childAt(0), s = {
  71213. shape: {
  71214. points: n.getItemLayout(r)
  71215. }
  71216. };
  71217. Ct(o, s, a, r), this._updateCommonStl(n, r, i);
  71218. }, e.prototype._updateCommonStl = function(n, r, i) {
  71219. var a = this.childAt(0), o = n.getItemModel(r), s = i && i.emphasisLineStyle, l = i && i.focus, u = i && i.blurScope, c = i && i.emphasisDisabled;
  71220. if (!i || n.hasItemOption) {
  71221. var f = o.getModel("emphasis");
  71222. s = f.getModel("lineStyle").getLineStyle(), c = f.get("disabled"), l = f.get("focus"), u = f.get("blurScope");
  71223. }
  71224. a.useStyle(n.getItemVisual(r, "style")), a.style.fill = null, a.style.strokeNoScale = !0;
  71225. var d = a.ensureState("emphasis");
  71226. d.style = s, bn(this, l, u, c);
  71227. }, e.prototype.updateLayout = function(n, r) {
  71228. var i = this.childAt(0);
  71229. i.setShape("points", n.getItemLayout(r));
  71230. }, e;
  71231. }(Ve)
  71232. ), zWe = (
  71233. /** @class */
  71234. function(t) {
  71235. q(e, t);
  71236. function e() {
  71237. var n = t !== null && t.apply(this, arguments) || this;
  71238. return n._lastFrame = 0, n._lastFramePercent = 0, n;
  71239. }
  71240. return e.prototype.createLine = function(n, r, i) {
  71241. return new lre(n, r, i);
  71242. }, e.prototype._updateAnimationPoints = function(n, r) {
  71243. this._points = r;
  71244. for (var i = [0], a = 0, o = 1; o < r.length; o++) {
  71245. var s = r[o - 1], l = r[o];
  71246. a += Ts(s, l), i.push(a);
  71247. }
  71248. if (a === 0) {
  71249. this._length = 0;
  71250. return;
  71251. }
  71252. for (var o = 0; o < i.length; o++)
  71253. i[o] /= a;
  71254. this._offsets = i, this._length = a;
  71255. }, e.prototype._getLineLength = function() {
  71256. return this._length;
  71257. }, e.prototype._updateSymbolPosition = function(n) {
  71258. var r = n.__t < 1 ? n.__t : 2 - n.__t, i = this._points, a = this._offsets, o = i.length;
  71259. if (a) {
  71260. var s = this._lastFrame, l;
  71261. if (r < this._lastFramePercent) {
  71262. var u = Math.min(s + 1, o - 1);
  71263. for (l = u; l >= 0 && !(a[l] <= r); l--)
  71264. ;
  71265. l = Math.min(l, o - 2);
  71266. } else {
  71267. for (l = s; l < o && !(a[l] > r); l++)
  71268. ;
  71269. l = Math.min(l - 1, o - 2);
  71270. }
  71271. var c = (r - a[l]) / (a[l + 1] - a[l]), f = i[l], d = i[l + 1];
  71272. n.x = f[0] * (1 - c) + c * d[0], n.y = f[1] * (1 - c) + c * d[1];
  71273. var h = n.__t < 1 ? d[0] - f[0] : f[0] - d[0], p = n.__t < 1 ? d[1] - f[1] : f[1] - d[1];
  71274. n.rotation = -Math.atan2(p, h) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = r, n.ignore = !1;
  71275. }
  71276. }, e;
  71277. }(sre)
  71278. ), VWe = (
  71279. /** @class */
  71280. /* @__PURE__ */ function() {
  71281. function t() {
  71282. this.polyline = !1, this.curveness = 0, this.segs = [];
  71283. }
  71284. return t;
  71285. }()
  71286. ), FWe = (
  71287. /** @class */
  71288. function(t) {
  71289. q(e, t);
  71290. function e(n) {
  71291. var r = t.call(this, n) || this;
  71292. return r._off = 0, r.hoverDataIdx = -1, r;
  71293. }
  71294. return e.prototype.reset = function() {
  71295. this.notClear = !1, this._off = 0;
  71296. }, e.prototype.getDefaultStyle = function() {
  71297. return {
  71298. stroke: "#000",
  71299. fill: null
  71300. };
  71301. }, e.prototype.getDefaultShape = function() {
  71302. return new VWe();
  71303. }, e.prototype.buildPath = function(n, r) {
  71304. var i = r.segs, a = r.curveness, o;
  71305. if (r.polyline)
  71306. for (o = this._off; o < i.length; ) {
  71307. var s = i[o++];
  71308. if (s > 0) {
  71309. n.moveTo(i[o++], i[o++]);
  71310. for (var l = 1; l < s; l++)
  71311. n.lineTo(i[o++], i[o++]);
  71312. }
  71313. }
  71314. else
  71315. for (o = this._off; o < i.length; ) {
  71316. var u = i[o++], c = i[o++], f = i[o++], d = i[o++];
  71317. if (n.moveTo(u, c), a > 0) {
  71318. var h = (u + f) / 2 - (c - d) * a, p = (c + d) / 2 - (f - u) * a;
  71319. n.quadraticCurveTo(h, p, f, d);
  71320. } else
  71321. n.lineTo(f, d);
  71322. }
  71323. this.incremental && (this._off = o, this.notClear = !0);
  71324. }, e.prototype.findDataIndex = function(n, r) {
  71325. var i = this.shape, a = i.segs, o = i.curveness, s = this.style.lineWidth;
  71326. if (i.polyline)
  71327. for (var l = 0, u = 0; u < a.length; ) {
  71328. var c = a[u++];
  71329. if (c > 0)
  71330. for (var f = a[u++], d = a[u++], h = 1; h < c; h++) {
  71331. var p = a[u++], v = a[u++];
  71332. if (wl(f, d, p, v, s, n, r))
  71333. return l;
  71334. }
  71335. l++;
  71336. }
  71337. else
  71338. for (var l = 0, u = 0; u < a.length; ) {
  71339. var f = a[u++], d = a[u++], p = a[u++], v = a[u++];
  71340. if (o > 0) {
  71341. var g = (f + p) / 2 - (d - v) * o, m = (d + v) / 2 - (p - f) * o;
  71342. if (xK(f, d, g, m, p, v, s, n, r))
  71343. return l;
  71344. } else if (wl(f, d, p, v, s, n, r))
  71345. return l;
  71346. l++;
  71347. }
  71348. return -1;
  71349. }, e.prototype.contain = function(n, r) {
  71350. var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
  71351. if (n = i[0], r = i[1], a.contain(n, r)) {
  71352. var o = this.hoverDataIdx = this.findDataIndex(n, r);
  71353. return o >= 0;
  71354. }
  71355. return this.hoverDataIdx = -1, !1;
  71356. }, e.prototype.getBoundingRect = function() {
  71357. var n = this._rect;
  71358. if (!n) {
  71359. for (var r = this.shape, i = r.segs, a = 1 / 0, o = 1 / 0, s = -1 / 0, l = -1 / 0, u = 0; u < i.length; ) {
  71360. var c = i[u++], f = i[u++];
  71361. a = Math.min(c, a), s = Math.max(c, s), o = Math.min(f, o), l = Math.max(f, l);
  71362. }
  71363. n = this._rect = new Je(a, o, s, l);
  71364. }
  71365. return n;
  71366. }, e;
  71367. }(ot)
  71368. ), WWe = (
  71369. /** @class */
  71370. function() {
  71371. function t() {
  71372. this.group = new Ve();
  71373. }
  71374. return t.prototype.updateData = function(e) {
  71375. this._clear();
  71376. var n = this._create();
  71377. n.setShape({
  71378. segs: e.getLayout("linesPoints")
  71379. }), this._setCommon(n, e);
  71380. }, t.prototype.incrementalPrepareUpdate = function(e) {
  71381. this.group.removeAll(), this._clear();
  71382. }, t.prototype.incrementalUpdate = function(e, n) {
  71383. var r = this._newAdded[0], i = n.getLayout("linesPoints"), a = r && r.shape.segs;
  71384. if (a && a.length < 2e4) {
  71385. var o = a.length, s = new Float32Array(o + i.length);
  71386. s.set(a), s.set(i, o), r.setShape({
  71387. segs: s
  71388. });
  71389. } else {
  71390. this._newAdded = [];
  71391. var l = this._create();
  71392. l.incremental = !0, l.setShape({
  71393. segs: i
  71394. }), this._setCommon(l, n), l.__startIndex = e.start;
  71395. }
  71396. }, t.prototype.remove = function() {
  71397. this._clear();
  71398. }, t.prototype.eachRendered = function(e) {
  71399. this._newAdded[0] && e(this._newAdded[0]);
  71400. }, t.prototype._create = function() {
  71401. var e = new FWe({
  71402. cursor: "default",
  71403. ignoreCoarsePointer: !0
  71404. });
  71405. return this._newAdded.push(e), this.group.add(e), e;
  71406. }, t.prototype._setCommon = function(e, n, r) {
  71407. var i = n.hostModel;
  71408. e.setShape({
  71409. polyline: i.get("polyline"),
  71410. curveness: i.get(["lineStyle", "curveness"])
  71411. }), e.useStyle(i.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
  71412. var a = n.getVisual("style");
  71413. a && a.stroke && e.setStyle("stroke", a.stroke), e.setStyle("fill", null);
  71414. var o = Fe(e);
  71415. o.seriesIndex = i.seriesIndex, e.on("mousemove", function(s) {
  71416. o.dataIndex = null;
  71417. var l = e.hoverDataIdx;
  71418. l > 0 && (o.dataIndex = l + e.__startIndex);
  71419. });
  71420. }, t.prototype._clear = function() {
  71421. this._newAdded = [], this.group.removeAll();
  71422. }, t;
  71423. }()
  71424. ), ure = {
  71425. seriesType: "lines",
  71426. plan: Op(),
  71427. reset: function(t) {
  71428. var e = t.coordinateSystem;
  71429. if (!e) {
  71430. process.env.NODE_ENV !== "production" && Cr("The lines series must have a coordinate system.");
  71431. return;
  71432. }
  71433. var n = t.get("polyline"), r = t.pipelineContext.large;
  71434. return {
  71435. progress: function(i, a) {
  71436. var o = [];
  71437. if (r) {
  71438. var s = void 0, l = i.end - i.start;
  71439. if (n) {
  71440. for (var u = 0, c = i.start; c < i.end; c++)
  71441. u += t.getLineCoordsCount(c);
  71442. s = new Float32Array(l + u * 2);
  71443. } else
  71444. s = new Float32Array(l * 4);
  71445. for (var f = 0, d = [], c = i.start; c < i.end; c++) {
  71446. var h = t.getLineCoords(c, o);
  71447. n && (s[f++] = h);
  71448. for (var p = 0; p < h; p++)
  71449. d = e.dataToPoint(o[p], !1, d), s[f++] = d[0], s[f++] = d[1];
  71450. }
  71451. a.setLayout("linesPoints", s);
  71452. } else
  71453. for (var c = i.start; c < i.end; c++) {
  71454. var v = a.getItemModel(c), h = t.getLineCoords(c, o), g = [];
  71455. if (n)
  71456. for (var m = 0; m < h; m++)
  71457. g.push(e.dataToPoint(o[m]));
  71458. else {
  71459. g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
  71460. var y = v.get(["lineStyle", "curveness"]);
  71461. +y && (g[2] = [(g[0][0] + g[1][0]) / 2 - (g[0][1] - g[1][1]) * y, (g[0][1] + g[1][1]) / 2 - (g[1][0] - g[0][0]) * y]);
  71462. }
  71463. a.setItemLayout(c, g);
  71464. }
  71465. }
  71466. };
  71467. }
  71468. }, QWe = (
  71469. /** @class */
  71470. function(t) {
  71471. q(e, t);
  71472. function e() {
  71473. var n = t !== null && t.apply(this, arguments) || this;
  71474. return n.type = e.type, n;
  71475. }
  71476. return e.prototype.render = function(n, r, i) {
  71477. var a = n.getData(), o = this._updateLineDraw(a, n), s = n.get("zlevel"), l = n.get(["effect", "trailLength"]), u = i.getZr(), c = u.painter.getType() === "svg";
  71478. c || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !c && u.configLayer(this._lastZlevel, {
  71479. motionBlur: !1
  71480. }), this._showEffect(n) && l > 0 && (c ? process.env.NODE_ENV !== "production" && console.warn("SVG render mode doesn't support lines with trail effect") : u.configLayer(s, {
  71481. motionBlur: !0,
  71482. lastFrameAlpha: Math.max(Math.min(l / 10 + 0.9, 1), 0)
  71483. })), o.updateData(a);
  71484. var f = n.get("clip", !0) && U0(n.coordinateSystem, !1, n);
  71485. f ? this.group.setClipPath(f) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
  71486. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  71487. var a = n.getData(), o = this._updateLineDraw(a, n);
  71488. o.incrementalPrepareUpdate(a), this._clearLayer(i), this._finished = !1;
  71489. }, e.prototype.incrementalRender = function(n, r, i) {
  71490. this._lineDraw.incrementalUpdate(n, r.getData()), this._finished = n.end === r.getData().count();
  71491. }, e.prototype.eachRendered = function(n) {
  71492. this._lineDraw && this._lineDraw.eachRendered(n);
  71493. }, e.prototype.updateTransform = function(n, r, i) {
  71494. var a = n.getData(), o = n.pipelineContext;
  71495. if (!this._finished || o.large || o.progressiveRender)
  71496. return {
  71497. update: !0
  71498. };
  71499. var s = ure.reset(n, r, i);
  71500. s.progress && s.progress({
  71501. start: 0,
  71502. end: a.count(),
  71503. count: a.count()
  71504. }, a), this._lineDraw.updateLayout(), this._clearLayer(i);
  71505. }, e.prototype._updateLineDraw = function(n, r) {
  71506. var i = this._lineDraw, a = this._showEffect(r), o = !!r.get("polyline"), s = r.pipelineContext, l = s.large;
  71507. return process.env.NODE_ENV !== "production" && a && l && console.warn("Large lines not support effect"), (!i || a !== this._hasEffet || o !== this._isPolyline || l !== this._isLargeDraw) && (i && i.remove(), i = this._lineDraw = l ? new WWe() : new Kk(o ? a ? zWe : lre : a ? sre : qk), this._hasEffet = a, this._isPolyline = o, this._isLargeDraw = l), this.group.add(i.group), i;
  71508. }, e.prototype._showEffect = function(n) {
  71509. return !!n.get(["effect", "show"]);
  71510. }, e.prototype._clearLayer = function(n) {
  71511. var r = n.getZr(), i = r.painter.getType() === "svg";
  71512. !i && this._lastZlevel != null && r.painter.getLayer(this._lastZlevel).clear(!0);
  71513. }, e.prototype.remove = function(n, r) {
  71514. this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(r);
  71515. }, e.prototype.dispose = function(n, r) {
  71516. this.remove(n, r);
  71517. }, e.type = "lines", e;
  71518. }(zt)
  71519. ), HWe = typeof Uint32Array > "u" ? Array : Uint32Array, GWe = typeof Float64Array > "u" ? Array : Float64Array;
  71520. function yW(t) {
  71521. var e = t.data;
  71522. e && e[0] && e[0][0] && e[0][0].coord && (process.env.NODE_ENV !== "production" && console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"), t.data = ce(e, function(n) {
  71523. var r = [n[0].coord, n[1].coord], i = {
  71524. coords: r
  71525. };
  71526. return n[0].name && (i.fromName = n[0].name), n[1].name && (i.toName = n[1].name), Dx([i, n[0], n[1]]);
  71527. }));
  71528. }
  71529. var jWe = (
  71530. /** @class */
  71531. function(t) {
  71532. q(e, t);
  71533. function e() {
  71534. var n = t !== null && t.apply(this, arguments) || this;
  71535. return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
  71536. }
  71537. return e.prototype.init = function(n) {
  71538. n.data = n.data || [], yW(n);
  71539. var r = this._processFlatCoordsArray(n.data);
  71540. this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count)), t.prototype.init.apply(this, arguments);
  71541. }, e.prototype.mergeOption = function(n) {
  71542. if (yW(n), n.data) {
  71543. var r = this._processFlatCoordsArray(n.data);
  71544. this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count));
  71545. }
  71546. t.prototype.mergeOption.apply(this, arguments);
  71547. }, e.prototype.appendData = function(n) {
  71548. var r = this._processFlatCoordsArray(n.data);
  71549. r.flatCoords && (this._flatCoords ? (this._flatCoords = gm(this._flatCoords, r.flatCoords), this._flatCoordsOffset = gm(this._flatCoordsOffset, r.flatCoordsOffset)) : (this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset), n.data = new Float32Array(r.count)), this.getRawData().appendData(n.data);
  71550. }, e.prototype._getCoordsFromItemModel = function(n) {
  71551. var r = this.getData().getItemModel(n), i = r.option instanceof Array ? r.option : r.getShallow("coords");
  71552. if (process.env.NODE_ENV !== "production" && !(i instanceof Array && i.length > 0 && i[0] instanceof Array))
  71553. throw new Error("Invalid coords " + JSON.stringify(i) + ". Lines must have 2d coords array in data item.");
  71554. return i;
  71555. }, e.prototype.getLineCoordsCount = function(n) {
  71556. return this._flatCoordsOffset ? this._flatCoordsOffset[n * 2 + 1] : this._getCoordsFromItemModel(n).length;
  71557. }, e.prototype.getLineCoords = function(n, r) {
  71558. if (this._flatCoordsOffset) {
  71559. for (var i = this._flatCoordsOffset[n * 2], a = this._flatCoordsOffset[n * 2 + 1], o = 0; o < a; o++)
  71560. r[o] = r[o] || [], r[o][0] = this._flatCoords[i + o * 2], r[o][1] = this._flatCoords[i + o * 2 + 1];
  71561. return a;
  71562. } else {
  71563. for (var s = this._getCoordsFromItemModel(n), o = 0; o < s.length; o++)
  71564. r[o] = r[o] || [], r[o][0] = s[o][0], r[o][1] = s[o][1];
  71565. return s.length;
  71566. }
  71567. }, e.prototype._processFlatCoordsArray = function(n) {
  71568. var r = 0;
  71569. if (this._flatCoords && (r = this._flatCoords.length), St(n[0])) {
  71570. for (var i = n.length, a = new HWe(i), o = new GWe(i), s = 0, l = 0, u = 0, c = 0; c < i; ) {
  71571. u++;
  71572. var f = n[c++];
  71573. a[l++] = s + r, a[l++] = f;
  71574. for (var d = 0; d < f; d++) {
  71575. var h = n[c++], p = n[c++];
  71576. if (o[s++] = h, o[s++] = p, c > i && process.env.NODE_ENV !== "production")
  71577. throw new Error("Invalid data format.");
  71578. }
  71579. }
  71580. return {
  71581. flatCoordsOffset: new Uint32Array(a.buffer, 0, l),
  71582. flatCoords: o,
  71583. count: u
  71584. };
  71585. }
  71586. return {
  71587. flatCoordsOffset: null,
  71588. flatCoords: null,
  71589. count: n.length
  71590. };
  71591. }, e.prototype.getInitialData = function(n, r) {
  71592. if (process.env.NODE_ENV !== "production") {
  71593. var i = zf.get(n.coordinateSystem);
  71594. if (!i)
  71595. throw new Error("Unknown coordinate system " + n.coordinateSystem);
  71596. }
  71597. var a = new Lr(["value"], this);
  71598. return a.hasItemOption = !1, a.initData(n.data, [], function(o, s, l, u) {
  71599. if (o instanceof Array)
  71600. return NaN;
  71601. a.hasItemOption = !0;
  71602. var c = o.value;
  71603. if (c != null)
  71604. return c instanceof Array ? c[u] : c;
  71605. }), a;
  71606. }, e.prototype.formatTooltip = function(n, r, i) {
  71607. var a = this.getData(), o = a.getItemModel(n), s = o.get("name");
  71608. if (s)
  71609. return s;
  71610. var l = o.get("fromName"), u = o.get("toName"), c = [];
  71611. return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
  71612. name: c.join(" > ")
  71613. });
  71614. }, e.prototype.preventIncremental = function() {
  71615. return !!this.get(["effect", "show"]);
  71616. }, e.prototype.getProgressive = function() {
  71617. var n = this.option.progressive;
  71618. return n ?? (this.option.large ? 1e4 : this.get("progressive"));
  71619. }, e.prototype.getProgressiveThreshold = function() {
  71620. var n = this.option.progressiveThreshold;
  71621. return n ?? (this.option.large ? 2e4 : this.get("progressiveThreshold"));
  71622. }, e.prototype.getZLevelKey = function() {
  71623. var n = this.getModel("effect"), r = n.get("trailLength");
  71624. return this.getData().count() > this.getProgressiveThreshold() ? this.id : n.get("show") && r > 0 ? r + "" : "";
  71625. }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
  71626. coordinateSystem: "geo",
  71627. // zlevel: 0,
  71628. z: 2,
  71629. legendHoverLink: !0,
  71630. // Cartesian coordinate system
  71631. xAxisIndex: 0,
  71632. yAxisIndex: 0,
  71633. symbol: ["none", "none"],
  71634. symbolSize: [10, 10],
  71635. // Geo coordinate system
  71636. geoIndex: 0,
  71637. effect: {
  71638. show: !1,
  71639. period: 4,
  71640. constantSpeed: 0,
  71641. symbol: "circle",
  71642. symbolSize: 3,
  71643. loop: !0,
  71644. trailLength: 0.2
  71645. },
  71646. large: !1,
  71647. // Available when large is true
  71648. largeThreshold: 2e3,
  71649. polyline: !1,
  71650. clip: !0,
  71651. label: {
  71652. show: !1,
  71653. position: "end"
  71654. // distance: 5,
  71655. // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调
  71656. },
  71657. lineStyle: {
  71658. opacity: 0.5
  71659. }
  71660. }, e;
  71661. }(Ht)
  71662. );
  71663. function Mb(t) {
  71664. return t instanceof Array || (t = [t, t]), t;
  71665. }
  71666. var ZWe = {
  71667. seriesType: "lines",
  71668. reset: function(t) {
  71669. var e = Mb(t.get("symbol")), n = Mb(t.get("symbolSize")), r = t.getData();
  71670. r.setVisual("fromSymbol", e && e[0]), r.setVisual("toSymbol", e && e[1]), r.setVisual("fromSymbolSize", n && n[0]), r.setVisual("toSymbolSize", n && n[1]);
  71671. function i(a, o) {
  71672. var s = a.getItemModel(o), l = Mb(s.getShallow("symbol", !0)), u = Mb(s.getShallow("symbolSize", !0));
  71673. l[0] && a.setItemVisual(o, "fromSymbol", l[0]), l[1] && a.setItemVisual(o, "toSymbol", l[1]), u[0] && a.setItemVisual(o, "fromSymbolSize", u[0]), u[1] && a.setItemVisual(o, "toSymbolSize", u[1]);
  71674. }
  71675. return {
  71676. dataEach: r.hasItemOption ? i : null
  71677. };
  71678. }
  71679. };
  71680. function UWe(t) {
  71681. t.registerChartView(QWe), t.registerSeriesModel(jWe), t.registerLayout(ure), t.registerVisual(ZWe);
  71682. }
  71683. var XWe = 256, YWe = (
  71684. /** @class */
  71685. function() {
  71686. function t() {
  71687. this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
  71688. inRange: null,
  71689. outOfRange: null
  71690. };
  71691. var e = io.createCanvas();
  71692. this.canvas = e;
  71693. }
  71694. return t.prototype.update = function(e, n, r, i, a, o) {
  71695. var s = this._getBrush(), l = this._getGradient(a, "inRange"), u = this._getGradient(a, "outOfRange"), c = this.pointSize + this.blurSize, f = this.canvas, d = f.getContext("2d"), h = e.length;
  71696. f.width = n, f.height = r;
  71697. for (var p = 0; p < h; ++p) {
  71698. var v = e[p], g = v[0], m = v[1], y = v[2], b = i(y);
  71699. d.globalAlpha = b, d.drawImage(s, g - c, m - c);
  71700. }
  71701. if (!f.width || !f.height)
  71702. return f;
  71703. for (var _ = d.getImageData(0, 0, f.width, f.height), O = _.data, S = 0, x = O.length, C = this.minOpacity, T = this.maxOpacity, w = T - C; S < x; ) {
  71704. var b = O[S + 3] / 256, P = Math.floor(b * (XWe - 1)) * 4;
  71705. if (b > 0) {
  71706. var $ = o(b) ? l : u;
  71707. b > 0 && (b = b * w + C), O[S++] = $[P], O[S++] = $[P + 1], O[S++] = $[P + 2], O[S++] = $[P + 3] * b * 256;
  71708. } else
  71709. S += 4;
  71710. }
  71711. return d.putImageData(_, 0, 0), f;
  71712. }, t.prototype._getBrush = function() {
  71713. var e = this._brushCanvas || (this._brushCanvas = io.createCanvas()), n = this.pointSize + this.blurSize, r = n * 2;
  71714. e.width = r, e.height = r;
  71715. var i = e.getContext("2d");
  71716. return i.clearRect(0, 0, r, r), i.shadowOffsetX = r, i.shadowBlur = this.blurSize, i.shadowColor = "#000", i.beginPath(), i.arc(-n, n, this.pointSize, 0, Math.PI * 2, !0), i.closePath(), i.fill(), e;
  71717. }, t.prototype._getGradient = function(e, n) {
  71718. for (var r = this._gradientPixels, i = r[n] || (r[n] = new Uint8ClampedArray(256 * 4)), a = [0, 0, 0, 0], o = 0, s = 0; s < 256; s++)
  71719. e[n](s / 255, !0, a), i[o++] = a[0], i[o++] = a[1], i[o++] = a[2], i[o++] = a[3];
  71720. return i;
  71721. }, t;
  71722. }()
  71723. );
  71724. function qWe(t, e, n) {
  71725. var r = t[1] - t[0];
  71726. e = ce(e, function(o) {
  71727. return {
  71728. interval: [(o.interval[0] - t[0]) / r, (o.interval[1] - t[0]) / r]
  71729. };
  71730. });
  71731. var i = e.length, a = 0;
  71732. return function(o) {
  71733. var s;
  71734. for (s = a; s < i; s++) {
  71735. var l = e[s].interval;
  71736. if (l[0] <= o && o <= l[1]) {
  71737. a = s;
  71738. break;
  71739. }
  71740. }
  71741. if (s === i)
  71742. for (s = a - 1; s >= 0; s--) {
  71743. var l = e[s].interval;
  71744. if (l[0] <= o && o <= l[1]) {
  71745. a = s;
  71746. break;
  71747. }
  71748. }
  71749. return s >= 0 && s < i && n[s];
  71750. };
  71751. }
  71752. function KWe(t, e) {
  71753. var n = t[1] - t[0];
  71754. return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n], function(r) {
  71755. return r >= e[0] && r <= e[1];
  71756. };
  71757. }
  71758. function bW(t) {
  71759. var e = t.dimensions;
  71760. return e[0] === "lng" && e[1] === "lat";
  71761. }
  71762. var JWe = (
  71763. /** @class */
  71764. function(t) {
  71765. q(e, t);
  71766. function e() {
  71767. var n = t !== null && t.apply(this, arguments) || this;
  71768. return n.type = e.type, n;
  71769. }
  71770. return e.prototype.render = function(n, r, i) {
  71771. var a;
  71772. if (r.eachComponent("visualMap", function(s) {
  71773. s.eachTargetSeries(function(l) {
  71774. l === n && (a = s);
  71775. });
  71776. }), process.env.NODE_ENV !== "production" && !a)
  71777. throw new Error("Heatmap must use with visualMap");
  71778. this._progressiveEls = null, this.group.removeAll();
  71779. var o = n.coordinateSystem;
  71780. o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(n, i, 0, n.getData().count()) : bW(o) && this._renderOnGeo(o, n, a, i);
  71781. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  71782. this.group.removeAll();
  71783. }, e.prototype.incrementalRender = function(n, r, i, a) {
  71784. var o = r.coordinateSystem;
  71785. o && (bW(o) ? this.render(r, i, a) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(r, a, n.start, n.end, !0)));
  71786. }, e.prototype.eachRendered = function(n) {
  71787. Tu(this._progressiveEls || this.group, n);
  71788. }, e.prototype._renderOnCartesianAndCalendar = function(n, r, i, a, o) {
  71789. var s = n.coordinateSystem, l = Ff(s, "cartesian2d"), u, c, f, d;
  71790. if (l) {
  71791. var h = s.getAxis("x"), p = s.getAxis("y");
  71792. if (process.env.NODE_ENV !== "production") {
  71793. if (!(h.type === "category" && p.type === "category"))
  71794. throw new Error("Heatmap on cartesian must have two category axes");
  71795. if (!(h.onBand && p.onBand))
  71796. throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
  71797. }
  71798. u = h.getBandWidth() + 0.5, c = p.getBandWidth() + 0.5, f = h.scale.getExtent(), d = p.scale.getExtent();
  71799. }
  71800. for (var v = this.group, g = n.getData(), m = n.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = n.getModel(["blur", "itemStyle"]).getItemStyle(), b = n.getModel(["select", "itemStyle"]).getItemStyle(), _ = n.get(["itemStyle", "borderRadius"]), O = er(n), S = n.getModel("emphasis"), x = S.get("focus"), C = S.get("blurScope"), T = S.get("disabled"), w = l ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], P = i; P < a; P++) {
  71801. var $ = void 0, A = g.getItemVisual(P, "style");
  71802. if (l) {
  71803. var D = g.get(w[0], P), E = g.get(w[1], P);
  71804. if (isNaN(g.get(w[2], P)) || isNaN(D) || isNaN(E) || D < f[0] || D > f[1] || E < d[0] || E > d[1])
  71805. continue;
  71806. var R = s.dataToPoint([D, E]);
  71807. $ = new mt({
  71808. shape: {
  71809. x: R[0] - u / 2,
  71810. y: R[1] - c / 2,
  71811. width: u,
  71812. height: c
  71813. },
  71814. style: A
  71815. });
  71816. } else {
  71817. if (isNaN(g.get(w[1], P)))
  71818. continue;
  71819. $ = new mt({
  71820. z2: 1,
  71821. shape: s.dataToRect([g.get(w[0], P)]).contentShape,
  71822. style: A
  71823. });
  71824. }
  71825. if (g.hasItemOption) {
  71826. var N = g.getItemModel(P), V = N.getModel("emphasis");
  71827. m = V.getModel("itemStyle").getItemStyle(), y = N.getModel(["blur", "itemStyle"]).getItemStyle(), b = N.getModel(["select", "itemStyle"]).getItemStyle(), _ = N.get(["itemStyle", "borderRadius"]), x = V.get("focus"), C = V.get("blurScope"), T = V.get("disabled"), O = er(N);
  71828. }
  71829. $.shape.r = _;
  71830. var z = n.getRawValue(P), W = "-";
  71831. z && z[2] != null && (W = z[2] + ""), Pr($, O, {
  71832. labelFetcher: n,
  71833. labelDataIndex: P,
  71834. defaultOpacity: A.opacity,
  71835. defaultText: W
  71836. }), $.ensureState("emphasis").style = m, $.ensureState("blur").style = y, $.ensureState("select").style = b, bn($, x, C, T), $.incremental = o, o && ($.states.emphasis.hoverLayer = !0), v.add($), g.setItemGraphicEl(P, $), this._progressiveEls && this._progressiveEls.push($);
  71837. }
  71838. }, e.prototype._renderOnGeo = function(n, r, i, a) {
  71839. var o = i.targetVisuals.inRange, s = i.targetVisuals.outOfRange, l = r.getData(), u = this._hmLayer || this._hmLayer || new YWe();
  71840. u.blurSize = r.get("blurSize"), u.pointSize = r.get("pointSize"), u.minOpacity = r.get("minOpacity"), u.maxOpacity = r.get("maxOpacity");
  71841. var c = n.getViewRect().clone(), f = n.getRoamTransform();
  71842. c.applyTransform(f);
  71843. var d = Math.max(c.x, 0), h = Math.max(c.y, 0), p = Math.min(c.width + c.x, a.getWidth()), v = Math.min(c.height + c.y, a.getHeight()), g = p - d, m = v - h, y = [l.mapDimension("lng"), l.mapDimension("lat"), l.mapDimension("value")], b = l.mapArray(y, function(x, C, T) {
  71844. var w = n.dataToPoint([x, C]);
  71845. return w[0] -= d, w[1] -= h, w.push(T), w;
  71846. }), _ = i.getExtent(), O = i.type === "visualMap.continuous" ? KWe(_, i.option.range) : qWe(_, i.getPieceList(), i.option.selected);
  71847. u.update(b, g, m, o.color.getNormalizer(), {
  71848. inRange: o.color.getColorMapper(),
  71849. outOfRange: s.color.getColorMapper()
  71850. }, O);
  71851. var S = new lr({
  71852. style: {
  71853. width: g,
  71854. height: m,
  71855. x: d,
  71856. y: h,
  71857. image: u.canvas
  71858. },
  71859. silent: !0
  71860. });
  71861. this.group.add(S);
  71862. }, e.type = "heatmap", e;
  71863. }(zt)
  71864. ), e7e = (
  71865. /** @class */
  71866. function(t) {
  71867. q(e, t);
  71868. function e() {
  71869. var n = t !== null && t.apply(this, arguments) || this;
  71870. return n.type = e.type, n;
  71871. }
  71872. return e.prototype.getInitialData = function(n, r) {
  71873. return us(null, this, {
  71874. generateCoord: "value"
  71875. });
  71876. }, e.prototype.preventIncremental = function() {
  71877. var n = zf.get(this.get("coordinateSystem"));
  71878. if (n && n.dimensions)
  71879. return n.dimensions[0] === "lng" && n.dimensions[1] === "lat";
  71880. }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
  71881. coordinateSystem: "cartesian2d",
  71882. // zlevel: 0,
  71883. z: 2,
  71884. // Cartesian coordinate system
  71885. // xAxisIndex: 0,
  71886. // yAxisIndex: 0,
  71887. // Geo coordinate system
  71888. geoIndex: 0,
  71889. blurSize: 30,
  71890. pointSize: 20,
  71891. maxOpacity: 1,
  71892. minOpacity: 0,
  71893. select: {
  71894. itemStyle: {
  71895. borderColor: "#212121"
  71896. }
  71897. }
  71898. }, e;
  71899. }(Ht)
  71900. );
  71901. function t7e(t) {
  71902. t.registerChartView(JWe), t.registerSeriesModel(e7e);
  71903. }
  71904. var n7e = ["itemStyle", "borderWidth"], _W = [{
  71905. xy: "x",
  71906. wh: "width",
  71907. index: 0,
  71908. posDesc: ["left", "right"]
  71909. }, {
  71910. xy: "y",
  71911. wh: "height",
  71912. index: 1,
  71913. posDesc: ["top", "bottom"]
  71914. }], BP = new ll(), r7e = (
  71915. /** @class */
  71916. function(t) {
  71917. q(e, t);
  71918. function e() {
  71919. var n = t !== null && t.apply(this, arguments) || this;
  71920. return n.type = e.type, n;
  71921. }
  71922. return e.prototype.render = function(n, r, i) {
  71923. var a = this.group, o = n.getData(), s = this._data, l = n.coordinateSystem, u = l.getBaseAxis(), c = u.isHorizontal(), f = l.master.getRect(), d = {
  71924. ecSize: {
  71925. width: i.getWidth(),
  71926. height: i.getHeight()
  71927. },
  71928. seriesModel: n,
  71929. coordSys: l,
  71930. coordSysExtent: [[f.x, f.x + f.width], [f.y, f.y + f.height]],
  71931. isHorizontal: c,
  71932. valueDim: _W[+c],
  71933. categoryDim: _W[1 - +c]
  71934. };
  71935. o.diff(s).add(function(p) {
  71936. if (o.hasValue(p)) {
  71937. var v = SW(o, p), g = OW(o, p, v, d), m = xW(o, d, g);
  71938. o.setItemGraphicEl(p, m), a.add(m), CW(m, d, g);
  71939. }
  71940. }).update(function(p, v) {
  71941. var g = s.getItemGraphicEl(v);
  71942. if (!o.hasValue(p)) {
  71943. a.remove(g);
  71944. return;
  71945. }
  71946. var m = SW(o, p), y = OW(o, p, m, d), b = vre(o, y);
  71947. g && b !== g.__pictorialShapeStr && (a.remove(g), o.setItemGraphicEl(p, null), g = null), g ? c7e(g, d, y) : g = xW(o, d, y, !0), o.setItemGraphicEl(p, g), g.__pictorialSymbolMeta = y, a.add(g), CW(g, d, y);
  71948. }).remove(function(p) {
  71949. var v = s.getItemGraphicEl(p);
  71950. v && wW(s, p, v.__pictorialSymbolMeta.animationModel, v);
  71951. }).execute();
  71952. var h = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
  71953. return h ? a.setClipPath(h) : a.removeClipPath(), this._data = o, this.group;
  71954. }, e.prototype.remove = function(n, r) {
  71955. var i = this.group, a = this._data;
  71956. n.get("animation") ? a && a.eachItemGraphicEl(function(o) {
  71957. wW(a, Fe(o).dataIndex, n, o);
  71958. }) : i.removeAll();
  71959. }, e.type = "pictorialBar", e;
  71960. }(zt)
  71961. );
  71962. function OW(t, e, n, r) {
  71963. var i = t.getItemLayout(e), a = n.get("symbolRepeat"), o = n.get("symbolClip"), s = n.get("symbolPosition") || "start", l = n.get("symbolRotate"), u = (l || 0) * Math.PI / 180 || 0, c = n.get("symbolPatternSize") || 2, f = n.isAnimationEnabled(), d = {
  71964. dataIndex: e,
  71965. layout: i,
  71966. itemModel: n,
  71967. symbolType: t.getItemVisual(e, "symbol") || "circle",
  71968. style: t.getItemVisual(e, "style"),
  71969. symbolClip: o,
  71970. symbolRepeat: a,
  71971. symbolRepeatDirection: n.get("symbolRepeatDirection"),
  71972. symbolPatternSize: c,
  71973. rotation: u,
  71974. animationModel: f ? n : null,
  71975. hoverScale: f && n.get(["emphasis", "scale"]),
  71976. z2: n.getShallow("z", !0) || 0
  71977. };
  71978. i7e(n, a, i, r, d), a7e(t, e, i, a, o, d.boundingLength, d.pxSign, c, r, d), o7e(n, d.symbolScale, u, r, d);
  71979. var h = d.symbolSize, p = Vf(n.get("symbolOffset"), h);
  71980. return s7e(n, h, i, a, o, p, s, d.valueLineWidth, d.boundingLength, d.repeatCutLength, r, d), d;
  71981. }
  71982. function i7e(t, e, n, r, i) {
  71983. var a = r.valueDim, o = t.get("symbolBoundingData"), s = r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()), l = s.toGlobalCoord(s.dataToCoord(0)), u = 1 - +(n[a.wh] <= 0), c;
  71984. if (ue(o)) {
  71985. var f = [zP(s, o[0]) - l, zP(s, o[1]) - l];
  71986. f[1] < f[0] && f.reverse(), c = f[u];
  71987. } else o != null ? c = zP(s, o) - l : e ? c = r.coordSysExtent[a.index][u] - l : c = n[a.wh];
  71988. i.boundingLength = c, e && (i.repeatCutLength = n[a.wh]), i.pxSign = c > 0 ? 1 : -1;
  71989. }
  71990. function zP(t, e) {
  71991. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)));
  71992. }
  71993. function a7e(t, e, n, r, i, a, o, s, l, u) {
  71994. var c = l.valueDim, f = l.categoryDim, d = Math.abs(n[f.wh]), h = t.getItemVisual(e, "symbolSize"), p;
  71995. ue(h) ? p = h.slice() : h == null ? p = ["100%", "100%"] : p = [h, h], p[f.index] = _e(p[f.index], d), p[c.index] = _e(p[c.index], r ? d : Math.abs(a)), u.symbolSize = p;
  71996. var v = u.symbolScale = [p[0] / s, p[1] / s];
  71997. v[c.index] *= (l.isHorizontal ? -1 : 1) * o;
  71998. }
  71999. function o7e(t, e, n, r, i) {
  72000. var a = t.get(n7e) || 0;
  72001. a && (BP.attr({
  72002. scaleX: e[0],
  72003. scaleY: e[1],
  72004. rotation: n
  72005. }), BP.updateTransform(), a /= BP.getLineScale(), a *= e[r.valueDim.index]), i.valueLineWidth = a || 0;
  72006. }
  72007. function s7e(t, e, n, r, i, a, o, s, l, u, c, f) {
  72008. var d = c.categoryDim, h = c.valueDim, p = f.pxSign, v = Math.max(e[h.index] + s, 0), g = v;
  72009. if (r) {
  72010. var m = Math.abs(l), y = Tn(t.get("symbolMargin"), "15%") + "", b = !1;
  72011. y.lastIndexOf("!") === y.length - 1 && (b = !0, y = y.slice(0, y.length - 1));
  72012. var _ = _e(y, e[h.index]), O = Math.max(v + _ * 2, 0), S = b ? 0 : _ * 2, x = Fx(r), C = x ? r : TW((m + S) / O), T = m - C * v;
  72013. _ = T / 2 / (b ? C : Math.max(C - 1, 1)), O = v + _ * 2, S = b ? 0 : _ * 2, !x && r !== "fixed" && (C = u ? TW((Math.abs(u) + S) / O) : 0), g = C * O - S, f.repeatTimes = C, f.symbolMargin = _;
  72014. }
  72015. var w = p * (g / 2), P = f.pathPosition = [];
  72016. P[d.index] = n[d.wh] / 2, P[h.index] = o === "start" ? w : o === "end" ? l - w : l / 2, a && (P[0] += a[0], P[1] += a[1]);
  72017. var $ = f.bundlePosition = [];
  72018. $[d.index] = n[d.xy], $[h.index] = n[h.xy];
  72019. var A = f.barRectShape = le({}, n);
  72020. A[h.wh] = p * Math.max(Math.abs(n[h.wh]), Math.abs(P[h.index] + w)), A[d.wh] = n[d.wh];
  72021. var D = f.clipShape = {};
  72022. D[d.xy] = -n[d.xy], D[d.wh] = c.ecSize[d.wh], D[h.xy] = 0, D[h.wh] = n[h.wh];
  72023. }
  72024. function cre(t) {
  72025. var e = t.symbolPatternSize, n = $n(
  72026. // Consider texture img, make a big size.
  72027. t.symbolType,
  72028. -e / 2,
  72029. -e / 2,
  72030. e,
  72031. e
  72032. );
  72033. return n.attr({
  72034. culling: !0
  72035. }), n.type !== "image" && n.setStyle({
  72036. strokeNoScale: !0
  72037. }), n;
  72038. }
  72039. function fre(t, e, n, r) {
  72040. var i = t.__pictorialBundle, a = n.symbolSize, o = n.valueLineWidth, s = n.pathPosition, l = e.valueDim, u = n.repeatTimes || 0, c = 0, f = a[e.valueDim.index] + o + n.symbolMargin * 2;
  72041. for (oL(t, function(v) {
  72042. v.__pictorialAnimationIndex = c, v.__pictorialRepeatTimes = u, c < u ? ah(v, null, p(c), n, r) : ah(v, null, {
  72043. scaleX: 0,
  72044. scaleY: 0
  72045. }, n, r, function() {
  72046. i.remove(v);
  72047. }), c++;
  72048. }); c < u; c++) {
  72049. var d = cre(n);
  72050. d.__pictorialAnimationIndex = c, d.__pictorialRepeatTimes = u, i.add(d);
  72051. var h = p(c);
  72052. ah(d, {
  72053. x: h.x,
  72054. y: h.y,
  72055. scaleX: 0,
  72056. scaleY: 0
  72057. }, {
  72058. scaleX: h.scaleX,
  72059. scaleY: h.scaleY,
  72060. rotation: h.rotation
  72061. }, n, r);
  72062. }
  72063. function p(v) {
  72064. var g = s.slice(), m = n.pxSign, y = v;
  72065. return (n.symbolRepeatDirection === "start" ? m > 0 : m < 0) && (y = u - 1 - v), g[l.index] = f * (y - u / 2 + 0.5) + s[l.index], {
  72066. x: g[0],
  72067. y: g[1],
  72068. scaleX: n.symbolScale[0],
  72069. scaleY: n.symbolScale[1],
  72070. rotation: n.rotation
  72071. };
  72072. }
  72073. }
  72074. function dre(t, e, n, r) {
  72075. var i = t.__pictorialBundle, a = t.__pictorialMainPath;
  72076. a ? ah(a, null, {
  72077. x: n.pathPosition[0],
  72078. y: n.pathPosition[1],
  72079. scaleX: n.symbolScale[0],
  72080. scaleY: n.symbolScale[1],
  72081. rotation: n.rotation
  72082. }, n, r) : (a = t.__pictorialMainPath = cre(n), i.add(a), ah(a, {
  72083. x: n.pathPosition[0],
  72084. y: n.pathPosition[1],
  72085. scaleX: 0,
  72086. scaleY: 0,
  72087. rotation: n.rotation
  72088. }, {
  72089. scaleX: n.symbolScale[0],
  72090. scaleY: n.symbolScale[1]
  72091. }, n, r));
  72092. }
  72093. function hre(t, e, n) {
  72094. var r = le({}, e.barRectShape), i = t.__pictorialBarRect;
  72095. i ? ah(i, null, {
  72096. shape: r
  72097. }, e, n) : (i = t.__pictorialBarRect = new mt({
  72098. z2: 2,
  72099. shape: r,
  72100. silent: !0,
  72101. style: {
  72102. stroke: "transparent",
  72103. fill: "transparent",
  72104. lineWidth: 0
  72105. }
  72106. }), i.disableMorphing = !0, t.add(i));
  72107. }
  72108. function pre(t, e, n, r) {
  72109. if (n.symbolClip) {
  72110. var i = t.__pictorialClipPath, a = le({}, n.clipShape), o = e.valueDim, s = n.animationModel, l = n.dataIndex;
  72111. if (i)
  72112. Ct(i, {
  72113. shape: a
  72114. }, s, l);
  72115. else {
  72116. a[o.wh] = 0, i = new mt({
  72117. shape: a
  72118. }), t.__pictorialBundle.setClipPath(i), t.__pictorialClipPath = i;
  72119. var u = {};
  72120. u[o.wh] = n.clipShape[o.wh], Lf[r ? "updateProps" : "initProps"](i, {
  72121. shape: u
  72122. }, s, l);
  72123. }
  72124. }
  72125. }
  72126. function SW(t, e) {
  72127. var n = t.getItemModel(e);
  72128. return n.getAnimationDelayParams = l7e, n.isAnimationEnabled = u7e, n;
  72129. }
  72130. function l7e(t) {
  72131. return {
  72132. index: t.__pictorialAnimationIndex,
  72133. count: t.__pictorialRepeatTimes
  72134. };
  72135. }
  72136. function u7e() {
  72137. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
  72138. }
  72139. function xW(t, e, n, r) {
  72140. var i = new Ve(), a = new Ve();
  72141. return i.add(a), i.__pictorialBundle = a, a.x = n.bundlePosition[0], a.y = n.bundlePosition[1], n.symbolRepeat ? fre(i, e, n) : dre(i, e, n), hre(i, n, r), pre(i, e, n, r), i.__pictorialShapeStr = vre(t, n), i.__pictorialSymbolMeta = n, i;
  72142. }
  72143. function c7e(t, e, n) {
  72144. var r = n.animationModel, i = n.dataIndex, a = t.__pictorialBundle;
  72145. Ct(a, {
  72146. x: n.bundlePosition[0],
  72147. y: n.bundlePosition[1]
  72148. }, r, i), n.symbolRepeat ? fre(t, e, n, !0) : dre(t, e, n, !0), hre(t, n, !0), pre(t, e, n, !0);
  72149. }
  72150. function wW(t, e, n, r) {
  72151. var i = r.__pictorialBarRect;
  72152. i && i.removeTextContent();
  72153. var a = [];
  72154. oL(r, function(o) {
  72155. a.push(o);
  72156. }), r.__pictorialMainPath && a.push(r.__pictorialMainPath), r.__pictorialClipPath && (n = null), k(a, function(o) {
  72157. uu(o, {
  72158. scaleX: 0,
  72159. scaleY: 0
  72160. }, n, e, function() {
  72161. r.parent && r.parent.remove(r);
  72162. });
  72163. }), t.setItemGraphicEl(e, null);
  72164. }
  72165. function vre(t, e) {
  72166. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
  72167. }
  72168. function oL(t, e, n) {
  72169. k(t.__pictorialBundle.children(), function(r) {
  72170. r !== t.__pictorialBarRect && e.call(n, r);
  72171. });
  72172. }
  72173. function ah(t, e, n, r, i, a) {
  72174. e && t.attr(e), r.symbolClip && !i ? n && t.attr(n) : n && Lf[i ? "updateProps" : "initProps"](t, n, r.animationModel, r.dataIndex, a);
  72175. }
  72176. function CW(t, e, n) {
  72177. var r = n.dataIndex, i = n.itemModel, a = i.getModel("emphasis"), o = a.getModel("itemStyle").getItemStyle(), s = i.getModel(["blur", "itemStyle"]).getItemStyle(), l = i.getModel(["select", "itemStyle"]).getItemStyle(), u = i.getShallow("cursor"), c = a.get("focus"), f = a.get("blurScope"), d = a.get("scale");
  72178. oL(t, function(v) {
  72179. if (v instanceof lr) {
  72180. var g = v.style;
  72181. v.useStyle(le({
  72182. // TODO other properties like dx, dy ?
  72183. image: g.image,
  72184. x: g.x,
  72185. y: g.y,
  72186. width: g.width,
  72187. height: g.height
  72188. }, n.style));
  72189. } else
  72190. v.useStyle(n.style);
  72191. var m = v.ensureState("emphasis");
  72192. m.style = o, d && (m.scaleX = v.scaleX * 1.1, m.scaleY = v.scaleY * 1.1), v.ensureState("blur").style = s, v.ensureState("select").style = l, u && (v.cursor = u), v.z2 = n.z2;
  72193. });
  72194. var h = e.valueDim.posDesc[+(n.boundingLength > 0)], p = t.__pictorialBarRect;
  72195. p.ignoreClip = !0, Pr(p, er(i), {
  72196. labelFetcher: e.seriesModel,
  72197. labelDataIndex: r,
  72198. defaultText: Wh(e.seriesModel.getData(), r),
  72199. inheritColor: n.style.fill,
  72200. defaultOpacity: n.style.opacity,
  72201. defaultOutsidePosition: h
  72202. }), bn(t, c, f, a.get("disabled"));
  72203. }
  72204. function TW(t) {
  72205. var e = Math.round(t);
  72206. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t);
  72207. }
  72208. var f7e = (
  72209. /** @class */
  72210. function(t) {
  72211. q(e, t);
  72212. function e() {
  72213. var n = t !== null && t.apply(this, arguments) || this;
  72214. return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n;
  72215. }
  72216. return e.prototype.getInitialData = function(n) {
  72217. return n.stack = null, t.prototype.getInitialData.apply(this, arguments);
  72218. }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = Pu(Rm.defaultOption, {
  72219. symbol: "circle",
  72220. symbolSize: null,
  72221. symbolRotate: null,
  72222. symbolPosition: null,
  72223. symbolOffset: null,
  72224. symbolMargin: null,
  72225. symbolRepeat: !1,
  72226. symbolRepeatDirection: "end",
  72227. symbolClip: !1,
  72228. symbolBoundingData: null,
  72229. symbolPatternSize: 400,
  72230. barGap: "-100%",
  72231. // Pictorial bar do not clip by default because in many cases
  72232. // xAxis and yAxis are not displayed and it's expected not to clip
  72233. clip: !1,
  72234. // z can be set in data item, which is z2 actually.
  72235. // Disable progressive
  72236. progressive: 0,
  72237. emphasis: {
  72238. // By default pictorialBar do not hover scale. Hover scale is not suitable
  72239. // for the case that both has foreground and background.
  72240. scale: !1
  72241. },
  72242. select: {
  72243. itemStyle: {
  72244. borderColor: "#212121"
  72245. }
  72246. }
  72247. }), e;
  72248. }(Rm)
  72249. );
  72250. function d7e(t) {
  72251. t.registerChartView(r7e), t.registerSeriesModel(f7e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(qee, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Kee("pictorialBar"));
  72252. }
  72253. var h7e = (
  72254. /** @class */
  72255. function(t) {
  72256. q(e, t);
  72257. function e() {
  72258. var n = t !== null && t.apply(this, arguments) || this;
  72259. return n.type = e.type, n._layers = [], n;
  72260. }
  72261. return e.prototype.render = function(n, r, i) {
  72262. var a = n.getData(), o = this, s = this.group, l = n.getLayerSeries(), u = a.getLayout("layoutInfo"), c = u.rect, f = u.boundaryGap;
  72263. s.x = 0, s.y = c.y + f[0];
  72264. function d(g) {
  72265. return g.name;
  72266. }
  72267. var h = new Us(this._layersSeries || [], l, d, d), p = [];
  72268. h.add(xe(v, this, "add")).update(xe(v, this, "update")).remove(xe(v, this, "remove")).execute();
  72269. function v(g, m, y) {
  72270. var b = o._layers;
  72271. if (g === "remove") {
  72272. s.remove(b[m]);
  72273. return;
  72274. }
  72275. for (var _ = [], O = [], S, x = l[m].indices, C = 0; C < x.length; C++) {
  72276. var T = a.getItemLayout(x[C]), w = T.x, P = T.y0, $ = T.y;
  72277. _.push(w, P), O.push(w, P + $), S = a.getItemVisual(x[C], "style");
  72278. }
  72279. var A, D = a.getItemLayout(x[0]), E = n.getModel("label"), R = E.get("margin"), N = n.getModel("emphasis");
  72280. if (g === "add") {
  72281. var V = p[m] = new Ve();
  72282. A = new Vte({
  72283. shape: {
  72284. points: _,
  72285. stackedOnPoints: O,
  72286. smooth: 0.4,
  72287. stackedOnSmooth: 0.4,
  72288. smoothConstraint: !1
  72289. },
  72290. z2: 0
  72291. }), V.add(A), s.add(V), n.isAnimationEnabled() && A.setClipPath(p7e(A.getBoundingRect(), n, function() {
  72292. A.removeClipPath();
  72293. }));
  72294. } else {
  72295. var V = b[y];
  72296. A = V.childAt(0), s.add(V), p[m] = V, Ct(A, {
  72297. shape: {
  72298. points: _,
  72299. stackedOnPoints: O
  72300. }
  72301. }, n), so(A);
  72302. }
  72303. Pr(A, er(n), {
  72304. labelDataIndex: x[C - 1],
  72305. defaultText: a.getName(x[C - 1]),
  72306. inheritColor: S.fill
  72307. }, {
  72308. normal: {
  72309. verticalAlign: "middle"
  72310. // align: 'right'
  72311. }
  72312. }), A.setTextConfig({
  72313. position: null,
  72314. local: !0
  72315. });
  72316. var z = A.getTextContent();
  72317. z && (z.x = D.x - R, z.y = D.y0 + D.y / 2), A.useStyle(S), a.setItemGraphicEl(m, A), Tr(A, n), bn(A, N.get("focus"), N.get("blurScope"), N.get("disabled"));
  72318. }
  72319. this._layersSeries = l, this._layers = p;
  72320. }, e.type = "themeRiver", e;
  72321. }(zt)
  72322. );
  72323. function p7e(t, e, n) {
  72324. var r = new mt({
  72325. shape: {
  72326. x: t.x - 10,
  72327. y: t.y - 10,
  72328. width: 0,
  72329. height: t.height + 20
  72330. }
  72331. });
  72332. return Yt(r, {
  72333. shape: {
  72334. x: t.x - 50,
  72335. width: t.width + 100,
  72336. height: t.height + 20
  72337. }
  72338. }, e, n), r;
  72339. }
  72340. var VP = 2, v7e = (
  72341. /** @class */
  72342. function(t) {
  72343. q(e, t);
  72344. function e() {
  72345. var n = t !== null && t.apply(this, arguments) || this;
  72346. return n.type = e.type, n;
  72347. }
  72348. return e.prototype.init = function(n) {
  72349. t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this));
  72350. }, e.prototype.fixData = function(n) {
  72351. var r = n.length, i = {}, a = PA(n, function(d) {
  72352. return i.hasOwnProperty(d[0] + "") || (i[d[0] + ""] = -1), d[2];
  72353. }), o = [];
  72354. a.buckets.each(function(d, h) {
  72355. o.push({
  72356. name: h,
  72357. dataList: d
  72358. });
  72359. });
  72360. for (var s = o.length, l = 0; l < s; ++l) {
  72361. for (var u = o[l].name, c = 0; c < o[l].dataList.length; ++c) {
  72362. var f = o[l].dataList[c][0] + "";
  72363. i[f] = l;
  72364. }
  72365. for (var f in i)
  72366. i.hasOwnProperty(f) && i[f] !== l && (i[f] = l, n[r] = [f, 0, u], r++);
  72367. }
  72368. return n;
  72369. }, e.prototype.getInitialData = function(n, r) {
  72370. for (var i = this.getReferringComponents("singleAxis", Dn).models[0], a = i.get("type"), o = Nt(n.data, function(p) {
  72371. return p[2] !== void 0;
  72372. }), s = this.fixData(o || []), l = [], u = this.nameMap = Pe(), c = 0, f = 0; f < s.length; ++f)
  72373. l.push(s[f][VP]), u.get(s[f][VP]) || (u.set(s[f][VP], c), c++);
  72374. var d = wp(s, {
  72375. coordDimensions: ["single"],
  72376. dimensionsDefine: [{
  72377. name: "time",
  72378. type: wO(a)
  72379. }, {
  72380. name: "value",
  72381. type: "float"
  72382. }, {
  72383. name: "name",
  72384. type: "ordinal"
  72385. }],
  72386. encodeDefine: {
  72387. single: 0,
  72388. value: 1,
  72389. itemName: 2
  72390. }
  72391. }).dimensions, h = new Lr(d, this);
  72392. return h.initData(s), h;
  72393. }, e.prototype.getLayerSeries = function() {
  72394. for (var n = this.getData(), r = n.count(), i = [], a = 0; a < r; ++a)
  72395. i[a] = a;
  72396. var o = n.mapDimension("single"), s = PA(i, function(u) {
  72397. return n.get("name", u);
  72398. }), l = [];
  72399. return s.buckets.each(function(u, c) {
  72400. u.sort(function(f, d) {
  72401. return n.get(o, f) - n.get(o, d);
  72402. }), l.push({
  72403. name: c,
  72404. indices: u
  72405. });
  72406. }), l;
  72407. }, e.prototype.getAxisTooltipData = function(n, r, i) {
  72408. ue(n) || (n = n ? [n] : []);
  72409. for (var a = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, c = 0; c < l; ++c) {
  72410. for (var f = Number.MAX_VALUE, d = -1, h = o[c].indices.length, p = 0; p < h; ++p) {
  72411. var v = a.get(n[0], o[c].indices[p]), g = Math.abs(v - r);
  72412. g <= f && (u = v, f = g, d = o[c].indices[p]);
  72413. }
  72414. s.push(d);
  72415. }
  72416. return {
  72417. dataIndices: s,
  72418. nestestValue: u
  72419. };
  72420. }, e.prototype.formatTooltip = function(n, r, i) {
  72421. var a = this.getData(), o = a.getName(n), s = a.get(a.mapDimension("value"), n);
  72422. return tr("nameValue", {
  72423. name: o,
  72424. value: s
  72425. });
  72426. }, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
  72427. // zlevel: 0,
  72428. z: 2,
  72429. colorBy: "data",
  72430. coordinateSystem: "singleAxis",
  72431. // gap in axis's orthogonal orientation
  72432. boundaryGap: ["10%", "10%"],
  72433. // legendHoverLink: true,
  72434. singleAxisIndex: 0,
  72435. animationEasing: "linear",
  72436. label: {
  72437. margin: 4,
  72438. show: !0,
  72439. position: "left",
  72440. fontSize: 11
  72441. },
  72442. emphasis: {
  72443. label: {
  72444. show: !0
  72445. }
  72446. }
  72447. }, e;
  72448. }(Ht)
  72449. );
  72450. function g7e(t, e) {
  72451. t.eachSeriesByType("themeRiver", function(n) {
  72452. var r = n.getData(), i = n.coordinateSystem, a = {}, o = i.getRect();
  72453. a.rect = o;
  72454. var s = n.get("boundaryGap"), l = i.getAxis();
  72455. if (a.boundaryGap = s, l.orient === "horizontal") {
  72456. s[0] = _e(s[0], o.height), s[1] = _e(s[1], o.height);
  72457. var u = o.height - s[0] - s[1];
  72458. PW(r, n, u);
  72459. } else {
  72460. s[0] = _e(s[0], o.width), s[1] = _e(s[1], o.width);
  72461. var c = o.width - s[0] - s[1];
  72462. PW(r, n, c);
  72463. }
  72464. r.setLayout("layoutInfo", a);
  72465. });
  72466. }
  72467. function PW(t, e, n) {
  72468. if (t.count())
  72469. for (var r = e.coordinateSystem, i = e.getLayerSeries(), a = t.mapDimension("single"), o = t.mapDimension("value"), s = ce(i, function(g) {
  72470. return ce(g.indices, function(m) {
  72471. var y = r.dataToPoint(t.get(a, m));
  72472. return y[1] = t.get(o, m), y;
  72473. });
  72474. }), l = m7e(s), u = l.y0, c = n / l.max, f = i.length, d = i[0].indices.length, h, p = 0; p < d; ++p) {
  72475. h = u[p] * c, t.setItemLayout(i[0].indices[p], {
  72476. layerIndex: 0,
  72477. x: s[0][p][0],
  72478. y0: h,
  72479. y: s[0][p][1] * c
  72480. });
  72481. for (var v = 1; v < f; ++v)
  72482. h += s[v - 1][p][1] * c, t.setItemLayout(i[v].indices[p], {
  72483. layerIndex: v,
  72484. x: s[v][p][0],
  72485. y0: h,
  72486. y: s[v][p][1] * c
  72487. });
  72488. }
  72489. }
  72490. function m7e(t) {
  72491. for (var e = t.length, n = t[0].length, r = [], i = [], a = 0, o = 0; o < n; ++o) {
  72492. for (var s = 0, l = 0; l < e; ++l)
  72493. s += t[l][o][1];
  72494. s > a && (a = s), r.push(s);
  72495. }
  72496. for (var u = 0; u < n; ++u)
  72497. i[u] = (a - r[u]) / 2;
  72498. a = 0;
  72499. for (var c = 0; c < n; ++c) {
  72500. var f = r[c] + i[c];
  72501. f > a && (a = f);
  72502. }
  72503. return {
  72504. y0: i,
  72505. max: a
  72506. };
  72507. }
  72508. function y7e(t) {
  72509. t.registerChartView(h7e), t.registerSeriesModel(v7e), t.registerLayout(g7e), t.registerProcessor(Y0("themeRiver"));
  72510. }
  72511. var b7e = 2, _7e = 4, $W = (
  72512. /** @class */
  72513. function(t) {
  72514. q(e, t);
  72515. function e(n, r, i, a) {
  72516. var o = t.call(this) || this;
  72517. o.z2 = b7e, o.textConfig = {
  72518. inside: !0
  72519. }, Fe(o).seriesIndex = r.seriesIndex;
  72520. var s = new gt({
  72521. z2: _7e,
  72522. silent: n.getModel().get(["label", "silent"])
  72523. });
  72524. return o.setTextContent(s), o.updateData(!0, n, r, i, a), o;
  72525. }
  72526. return e.prototype.updateData = function(n, r, i, a, o) {
  72527. this.node = r, r.piece = this, i = i || this._seriesModel, a = a || this._ecModel;
  72528. var s = this;
  72529. Fe(s).dataIndex = r.dataIndex;
  72530. var l = r.getModel(), u = l.getModel("emphasis"), c = r.getLayout(), f = le({}, c);
  72531. f.label = null;
  72532. var d = r.getVisual("style");
  72533. d.lineJoin = "bevel";
  72534. var h = r.getVisual("decal");
  72535. h && (d.decal = Fh(h, o));
  72536. var p = Fc(l.getModel("itemStyle"), f, !0);
  72537. le(f, p), k(ni, function(y) {
  72538. var b = s.ensureState(y), _ = l.getModel([y, "itemStyle"]);
  72539. b.style = _.getItemStyle();
  72540. var O = Fc(_, f);
  72541. O && (b.shape = O);
  72542. }), n ? (s.setShape(f), s.shape.r = c.r0, Yt(s, {
  72543. shape: {
  72544. r: c.r
  72545. }
  72546. }, i, r.dataIndex)) : (Ct(s, {
  72547. shape: f
  72548. }, i), so(s)), s.useStyle(d), this._updateLabel(i);
  72549. var v = l.getShallow("cursor");
  72550. v && s.attr("cursor", v), this._seriesModel = i || this._seriesModel, this._ecModel = a || this._ecModel;
  72551. var g = u.get("focus"), m = g === "ancestor" ? r.getAncestorsIndices() : g === "descendant" ? r.getDescendantIndices() : g;
  72552. bn(this, m, u.get("blurScope"), u.get("disabled"));
  72553. }, e.prototype._updateLabel = function(n) {
  72554. var r = this, i = this.node.getModel(), a = i.getModel("label"), o = this.node.getLayout(), s = o.endAngle - o.startAngle, l = (o.startAngle + o.endAngle) / 2, u = Math.cos(l), c = Math.sin(l), f = this, d = f.getTextContent(), h = this.node.dataIndex, p = a.get("minAngle") / 180 * Math.PI, v = a.get("show") && !(p != null && Math.abs(s) < p);
  72555. d.ignore = !v, k(xm, function(m) {
  72556. var y = m === "normal" ? i.getModel("label") : i.getModel([m, "label"]), b = m === "normal", _ = b ? d : d.ensureState(m), O = n.getFormattedLabel(h, m);
  72557. b && (O = O || r.node.name), _.style = Zt(y, {}, null, m !== "normal", !0), O && (_.style.text = O);
  72558. var S = y.get("show");
  72559. S != null && !b && (_.ignore = !S);
  72560. var x = g(y, "position"), C = b ? f : f.states[m], T = C.style.fill;
  72561. C.textConfig = {
  72562. outsideFill: y.get("color") === "inherit" ? T : null,
  72563. inside: x !== "outside"
  72564. };
  72565. var w, P = g(y, "distance") || 0, $ = g(y, "align"), A = g(y, "rotate"), D = Math.PI * 0.5, E = Math.PI * 1.5, R = Fi(A === "tangential" ? Math.PI / 2 - l : l), N = R > D && !Lh(R - D) && R < E;
  72566. x === "outside" ? (w = o.r + P, $ = N ? "right" : "left") : !$ || $ === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? w = 0 : w = (o.r + o.r0) / 2, $ = "center") : $ === "left" ? (w = o.r0 + P, $ = N ? "right" : "left") : $ === "right" && (w = o.r - P, $ = N ? "left" : "right"), _.style.align = $, _.style.verticalAlign = g(y, "verticalAlign") || "middle", _.x = w * u + o.cx, _.y = w * c + o.cy;
  72567. var V = 0;
  72568. A === "radial" ? V = Fi(-l) + (N ? Math.PI : 0) : A === "tangential" ? V = Fi(Math.PI / 2 - l) + (N ? Math.PI : 0) : St(A) && (V = A * Math.PI / 180), _.rotation = Fi(V);
  72569. });
  72570. function g(m, y) {
  72571. var b = m.get(y);
  72572. return b ?? a.get(y);
  72573. }
  72574. d.dirtyStyle();
  72575. }, e;
  72576. }(ri)
  72577. ), $E = "sunburstRootToNode", AW = "sunburstHighlight", O7e = "sunburstUnhighlight";
  72578. function S7e(t) {
  72579. t.registerAction({
  72580. type: $E,
  72581. update: "updateView"
  72582. }, function(e, n) {
  72583. n.eachComponent({
  72584. mainType: "series",
  72585. subType: "sunburst",
  72586. query: e
  72587. }, r);
  72588. function r(i, a) {
  72589. var o = Lm(e, [$E], i);
  72590. if (o) {
  72591. var s = i.getViewRoot();
  72592. s && (e.direction = jk(s, o.node) ? "rollUp" : "drillDown"), i.resetViewRoot(o.node);
  72593. }
  72594. }
  72595. }), t.registerAction({
  72596. type: AW,
  72597. update: "none"
  72598. }, function(e, n, r) {
  72599. e = le({}, e), n.eachComponent({
  72600. mainType: "series",
  72601. subType: "sunburst",
  72602. query: e
  72603. }, i);
  72604. function i(a) {
  72605. var o = Lm(e, [AW], a);
  72606. o && (e.dataIndex = o.node.dataIndex);
  72607. }
  72608. process.env.NODE_ENV !== "production" && Cn("sunburstHighlight", "highlight"), r.dispatchAction(le(e, {
  72609. type: "highlight"
  72610. }));
  72611. }), t.registerAction({
  72612. type: O7e,
  72613. update: "updateView"
  72614. }, function(e, n, r) {
  72615. e = le({}, e), process.env.NODE_ENV !== "production" && Cn("sunburstUnhighlight", "downplay"), r.dispatchAction(le(e, {
  72616. type: "downplay"
  72617. }));
  72618. });
  72619. }
  72620. var x7e = (
  72621. /** @class */
  72622. function(t) {
  72623. q(e, t);
  72624. function e() {
  72625. var n = t !== null && t.apply(this, arguments) || this;
  72626. return n.type = e.type, n;
  72627. }
  72628. return e.prototype.render = function(n, r, i, a) {
  72629. var o = this;
  72630. this.seriesModel = n, this.api = i, this.ecModel = r;
  72631. var s = n.getData(), l = s.tree.root, u = n.getViewRoot(), c = this.group, f = n.get("renderLabelForZeroData"), d = [];
  72632. u.eachNode(function(y) {
  72633. d.push(y);
  72634. });
  72635. var h = this._oldChildren || [];
  72636. p(d, h), m(l, u), this._initEvents(), this._oldChildren = d;
  72637. function p(y, b) {
  72638. if (y.length === 0 && b.length === 0)
  72639. return;
  72640. new Us(b, y, _, _).add(O).update(O).remove(Ue(O, null)).execute();
  72641. function _(S) {
  72642. return S.getId();
  72643. }
  72644. function O(S, x) {
  72645. var C = S == null ? null : y[S], T = x == null ? null : b[x];
  72646. v(C, T);
  72647. }
  72648. }
  72649. function v(y, b) {
  72650. if (!f && y && !y.getValue() && (y = null), y !== l && b !== l) {
  72651. if (b && b.piece)
  72652. y ? (b.piece.updateData(!1, y, n, r, i), s.setItemGraphicEl(y.dataIndex, b.piece)) : g(b);
  72653. else if (y) {
  72654. var _ = new $W(y, n, r, i);
  72655. c.add(_), s.setItemGraphicEl(y.dataIndex, _);
  72656. }
  72657. }
  72658. }
  72659. function g(y) {
  72660. y && y.piece && (c.remove(y.piece), y.piece = null);
  72661. }
  72662. function m(y, b) {
  72663. b.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, y, n, r, i) : (o.virtualPiece = new $W(y, n, r, i), c.add(o.virtualPiece)), b.piece.off("click"), o.virtualPiece.on("click", function(_) {
  72664. o._rootToNode(b.parentNode);
  72665. })) : o.virtualPiece && (c.remove(o.virtualPiece), o.virtualPiece = null);
  72666. }
  72667. }, e.prototype._initEvents = function() {
  72668. var n = this;
  72669. this.group.off("click"), this.group.on("click", function(r) {
  72670. var i = !1, a = n.seriesModel.getViewRoot();
  72671. a.eachNode(function(o) {
  72672. if (!i && o.piece && o.piece === r.target) {
  72673. var s = o.getModel().get("nodeClick");
  72674. if (s === "rootToNode")
  72675. n._rootToNode(o);
  72676. else if (s === "link") {
  72677. var l = o.getModel(), u = l.get("link");
  72678. if (u) {
  72679. var c = l.get("target", !0) || "_blank";
  72680. dO(u, c);
  72681. }
  72682. }
  72683. i = !0;
  72684. }
  72685. });
  72686. });
  72687. }, e.prototype._rootToNode = function(n) {
  72688. n !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
  72689. type: $E,
  72690. from: this.uid,
  72691. seriesId: this.seriesModel.id,
  72692. targetNode: n
  72693. });
  72694. }, e.prototype.containPoint = function(n, r) {
  72695. var i = r.getData(), a = i.getItemLayout(0);
  72696. if (a) {
  72697. var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
  72698. return l <= a.r && l >= a.r0;
  72699. }
  72700. }, e.type = "sunburst", e;
  72701. }(zt)
  72702. ), w7e = (
  72703. /** @class */
  72704. function(t) {
  72705. q(e, t);
  72706. function e() {
  72707. var n = t !== null && t.apply(this, arguments) || this;
  72708. return n.type = e.type, n.ignoreStyleOnData = !0, n;
  72709. }
  72710. return e.prototype.getInitialData = function(n, r) {
  72711. var i = {
  72712. name: n.name,
  72713. children: n.data
  72714. };
  72715. gre(i);
  72716. var a = this._levelModels = ce(n.levels || [], function(l) {
  72717. return new Wt(l, this, r);
  72718. }, this), o = Gk.createTree(i, this, s);
  72719. function s(l) {
  72720. l.wrapMethod("getItemModel", function(u, c) {
  72721. var f = o.getNodeByDataIndex(c), d = a[f.depth];
  72722. return d && (u.parentModel = d), u;
  72723. });
  72724. }
  72725. return o.data;
  72726. }, e.prototype.optionUpdated = function() {
  72727. this.resetViewRoot();
  72728. }, e.prototype.getDataParams = function(n) {
  72729. var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
  72730. return r.treePathInfo = bw(i, this), r;
  72731. }, e.prototype.getLevelModel = function(n) {
  72732. return this._levelModels && this._levelModels[n.depth];
  72733. }, e.prototype.getViewRoot = function() {
  72734. return this._viewRoot;
  72735. }, e.prototype.resetViewRoot = function(n) {
  72736. n ? this._viewRoot = n : n = this._viewRoot;
  72737. var r = this.getRawData().tree.root;
  72738. (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
  72739. }, e.prototype.enableAriaDecal = function() {
  72740. One(this);
  72741. }, e.type = "series.sunburst", e.defaultOption = {
  72742. // zlevel: 0,
  72743. z: 2,
  72744. // 默认全局居中
  72745. center: ["50%", "50%"],
  72746. radius: [0, "75%"],
  72747. // 默认顺时针
  72748. clockwise: !0,
  72749. startAngle: 90,
  72750. // 最小角度改为0
  72751. minAngle: 0,
  72752. // If still show when all data zero.
  72753. stillShowZeroSum: !0,
  72754. // 'rootToNode', 'link', or false
  72755. nodeClick: "rootToNode",
  72756. renderLabelForZeroData: !1,
  72757. label: {
  72758. // could be: 'radial', 'tangential', or 'none'
  72759. rotate: "radial",
  72760. show: !0,
  72761. opacity: 1,
  72762. // 'left' is for inner side of inside, and 'right' is for outer
  72763. // side for inside
  72764. align: "center",
  72765. position: "inside",
  72766. distance: 5,
  72767. silent: !0
  72768. },
  72769. itemStyle: {
  72770. borderWidth: 1,
  72771. borderColor: "white",
  72772. borderType: "solid",
  72773. shadowBlur: 0,
  72774. shadowColor: "rgba(0, 0, 0, 0.2)",
  72775. shadowOffsetX: 0,
  72776. shadowOffsetY: 0,
  72777. opacity: 1
  72778. },
  72779. emphasis: {
  72780. focus: "descendant"
  72781. },
  72782. blur: {
  72783. itemStyle: {
  72784. opacity: 0.2
  72785. },
  72786. label: {
  72787. opacity: 0.1
  72788. }
  72789. },
  72790. // Animation type can be expansion, scale.
  72791. animationType: "expansion",
  72792. animationDuration: 1e3,
  72793. animationDurationUpdate: 500,
  72794. data: [],
  72795. /**
  72796. * Sort order.
  72797. *
  72798. * Valid values: 'desc', 'asc', null, or callback function.
  72799. * 'desc' and 'asc' for descend and ascendant order;
  72800. * null for not sorting;
  72801. * example of callback function:
  72802. * function(nodeA, nodeB) {
  72803. * return nodeA.getValue() - nodeB.getValue();
  72804. * }
  72805. */
  72806. sort: "desc"
  72807. }, e;
  72808. }(Ht)
  72809. );
  72810. function gre(t) {
  72811. var e = 0;
  72812. k(t.children, function(r) {
  72813. gre(r);
  72814. var i = r.value;
  72815. ue(i) && (i = i[0]), e += i;
  72816. });
  72817. var n = t.value;
  72818. ue(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), ue(t.value) ? t.value[0] = n : t.value = n;
  72819. }
  72820. var EW = Math.PI / 180;
  72821. function C7e(t, e, n) {
  72822. e.eachSeriesByType(t, function(r) {
  72823. var i = r.get("center"), a = r.get("radius");
  72824. ue(a) || (a = [0, a]), ue(i) || (i = [i, i]);
  72825. var o = n.getWidth(), s = n.getHeight(), l = Math.min(o, s), u = _e(i[0], o), c = _e(i[1], s), f = _e(a[0], l / 2), d = _e(a[1], l / 2), h = -r.get("startAngle") * EW, p = r.get("minAngle") * EW, v = r.getData().tree.root, g = r.getViewRoot(), m = g.depth, y = r.get("sort");
  72826. y != null && mre(g, y);
  72827. var b = 0;
  72828. k(g.children, function(R) {
  72829. !isNaN(R.getValue()) && b++;
  72830. });
  72831. var _ = g.getValue(), O = Math.PI / (_ || b) * 2, S = g.depth > 0, x = g.height - (S ? -1 : 1), C = (d - f) / (x || 1), T = r.get("clockwise"), w = r.get("stillShowZeroSum"), P = T ? 1 : -1, $ = function(R, N) {
  72832. if (R) {
  72833. var V = N;
  72834. if (R !== v) {
  72835. var z = R.getValue(), W = _ === 0 && w ? O : z * O;
  72836. W < p && (W = p), V = N + P * W;
  72837. var F = R.depth - m - (S ? -1 : 1), Q = f + C * F, Z = f + C * (F + 1), ne = r.getLevelModel(R);
  72838. if (ne) {
  72839. var ee = ne.get("r0", !0), oe = ne.get("r", !0), K = ne.get("radius", !0);
  72840. K != null && (ee = K[0], oe = K[1]), ee != null && (Q = _e(ee, l / 2)), oe != null && (Z = _e(oe, l / 2));
  72841. }
  72842. R.setLayout({
  72843. angle: W,
  72844. startAngle: N,
  72845. endAngle: V,
  72846. clockwise: T,
  72847. cx: u,
  72848. cy: c,
  72849. r0: Q,
  72850. r: Z
  72851. });
  72852. }
  72853. if (R.children && R.children.length) {
  72854. var ie = 0;
  72855. k(R.children, function(X) {
  72856. ie += $(X, N + ie);
  72857. });
  72858. }
  72859. return V - N;
  72860. }
  72861. };
  72862. if (S) {
  72863. var A = f, D = f + C, E = Math.PI * 2;
  72864. v.setLayout({
  72865. angle: E,
  72866. startAngle: h,
  72867. endAngle: h + E,
  72868. clockwise: T,
  72869. cx: u,
  72870. cy: c,
  72871. r0: A,
  72872. r: D
  72873. });
  72874. }
  72875. $(g, h);
  72876. });
  72877. }
  72878. function mre(t, e) {
  72879. var n = t.children || [];
  72880. t.children = T7e(n, e), n.length && k(t.children, function(r) {
  72881. mre(r, e);
  72882. });
  72883. }
  72884. function T7e(t, e) {
  72885. if (Me(e)) {
  72886. var n = ce(t, function(i, a) {
  72887. var o = i.getValue();
  72888. return {
  72889. params: {
  72890. depth: i.depth,
  72891. height: i.height,
  72892. dataIndex: i.dataIndex,
  72893. getValue: function() {
  72894. return o;
  72895. }
  72896. },
  72897. index: a
  72898. };
  72899. });
  72900. return n.sort(function(i, a) {
  72901. return e(i.params, a.params);
  72902. }), ce(n, function(i) {
  72903. return t[i.index];
  72904. });
  72905. } else {
  72906. var r = e === "asc";
  72907. return t.sort(function(i, a) {
  72908. var o = (i.getValue() - a.getValue()) * (r ? 1 : -1);
  72909. return o === 0 ? (i.dataIndex - a.dataIndex) * (r ? -1 : 1) : o;
  72910. });
  72911. }
  72912. }
  72913. function P7e(t) {
  72914. var e = {};
  72915. function n(r, i, a) {
  72916. for (var o = r; o && o.depth > 1; )
  72917. o = o.parentNode;
  72918. var s = i.getColorFromPalette(o.name || o.dataIndex + "", e);
  72919. return r.depth > 1 && Oe(s) && (s = J1(s, (r.depth - 1) / (a - 1) * 0.5)), s;
  72920. }
  72921. t.eachSeriesByType("sunburst", function(r) {
  72922. var i = r.getData(), a = i.tree;
  72923. a.eachNode(function(o) {
  72924. var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
  72925. l.fill || (l.fill = n(o, r, a.root.height));
  72926. var u = i.ensureUniqueItemVisual(o.dataIndex, "style");
  72927. le(u, l);
  72928. });
  72929. });
  72930. }
  72931. function $7e(t) {
  72932. t.registerChartView(x7e), t.registerSeriesModel(w7e), t.registerLayout(Ue(C7e, "sunburst")), t.registerProcessor(Ue(Y0, "sunburst")), t.registerVisual(P7e), S7e(t);
  72933. }
  72934. var MW = {
  72935. color: "fill",
  72936. borderColor: "stroke"
  72937. }, A7e = {
  72938. symbol: 1,
  72939. symbolSize: 1,
  72940. symbolKeepAspect: 1,
  72941. legendIcon: 1,
  72942. visualMeta: 1,
  72943. liftZ: 1,
  72944. decal: 1
  72945. }, Rs = bt(), E7e = (
  72946. /** @class */
  72947. function(t) {
  72948. q(e, t);
  72949. function e() {
  72950. var n = t !== null && t.apply(this, arguments) || this;
  72951. return n.type = e.type, n;
  72952. }
  72953. return e.prototype.optionUpdated = function() {
  72954. this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
  72955. }, e.prototype.getInitialData = function(n, r) {
  72956. return us(null, this);
  72957. }, e.prototype.getDataParams = function(n, r, i) {
  72958. var a = t.prototype.getDataParams.call(this, n, r);
  72959. return i && (a.info = Rs(i).info), a;
  72960. }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
  72961. coordinateSystem: "cartesian2d",
  72962. // zlevel: 0,
  72963. z: 2,
  72964. legendHoverLink: !0,
  72965. // Custom series will not clip by default.
  72966. // Some case will use custom series to draw label
  72967. // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight
  72968. clip: !1
  72969. // Cartesian coordinate system
  72970. // xAxisIndex: 0,
  72971. // yAxisIndex: 0,
  72972. // Polar coordinate system
  72973. // polarIndex: 0,
  72974. // Geo coordinate system
  72975. // geoIndex: 0,
  72976. }, e;
  72977. }(Ht)
  72978. );
  72979. function M7e(t, e) {
  72980. return e = e || [0, 0], ce(["x", "y"], function(n, r) {
  72981. var i = this.getAxis(n), a = e[r], o = t[r] / 2;
  72982. return i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(a - o) - i.dataToCoord(a + o));
  72983. }, this);
  72984. }
  72985. function I7e(t) {
  72986. var e = t.master.getRect();
  72987. return {
  72988. coordSys: {
  72989. // The name exposed to user is always 'cartesian2d' but not 'grid'.
  72990. type: "cartesian2d",
  72991. x: e.x,
  72992. y: e.y,
  72993. width: e.width,
  72994. height: e.height
  72995. },
  72996. api: {
  72997. coord: function(n) {
  72998. return t.dataToPoint(n);
  72999. },
  73000. size: xe(M7e, t)
  73001. }
  73002. };
  73003. }
  73004. function D7e(t, e) {
  73005. return e = e || [0, 0], ce([0, 1], function(n) {
  73006. var r = e[n], i = t[n] / 2, a = [], o = [];
  73007. return a[n] = r - i, o[n] = r + i, a[1 - n] = o[1 - n] = e[1 - n], Math.abs(this.dataToPoint(a)[n] - this.dataToPoint(o)[n]);
  73008. }, this);
  73009. }
  73010. function R7e(t) {
  73011. var e = t.getBoundingRect();
  73012. return {
  73013. coordSys: {
  73014. type: "geo",
  73015. x: e.x,
  73016. y: e.y,
  73017. width: e.width,
  73018. height: e.height,
  73019. zoom: t.getZoom()
  73020. },
  73021. api: {
  73022. coord: function(n) {
  73023. return t.dataToPoint(n);
  73024. },
  73025. size: xe(D7e, t)
  73026. }
  73027. };
  73028. }
  73029. function k7e(t, e) {
  73030. var n = this.getAxis(), r = e instanceof Array ? e[0] : e, i = (t instanceof Array ? t[0] : t) / 2;
  73031. return n.type === "category" ? n.getBandWidth() : Math.abs(n.dataToCoord(r - i) - n.dataToCoord(r + i));
  73032. }
  73033. function L7e(t) {
  73034. var e = t.getRect();
  73035. return {
  73036. coordSys: {
  73037. type: "singleAxis",
  73038. x: e.x,
  73039. y: e.y,
  73040. width: e.width,
  73041. height: e.height
  73042. },
  73043. api: {
  73044. coord: function(n) {
  73045. return t.dataToPoint(n);
  73046. },
  73047. size: xe(k7e, t)
  73048. }
  73049. };
  73050. }
  73051. function N7e(t, e) {
  73052. return e = e || [0, 0], ce(["Radius", "Angle"], function(n, r) {
  73053. var i = "get" + n + "Axis", a = this[i](), o = e[r], s = t[r] / 2, l = a.type === "category" ? a.getBandWidth() : Math.abs(a.dataToCoord(o - s) - a.dataToCoord(o + s));
  73054. return n === "Angle" && (l = l * Math.PI / 180), l;
  73055. }, this);
  73056. }
  73057. function B7e(t) {
  73058. var e = t.getRadiusAxis(), n = t.getAngleAxis(), r = e.getExtent();
  73059. return r[0] > r[1] && r.reverse(), {
  73060. coordSys: {
  73061. type: "polar",
  73062. cx: t.cx,
  73063. cy: t.cy,
  73064. r: r[1],
  73065. r0: r[0]
  73066. },
  73067. api: {
  73068. coord: function(i) {
  73069. var a = e.dataToRadius(i[0]), o = n.dataToAngle(i[1]), s = t.coordToPoint([a, o]);
  73070. return s.push(a, o * Math.PI / 180), s;
  73071. },
  73072. size: xe(N7e, t)
  73073. }
  73074. };
  73075. }
  73076. function z7e(t) {
  73077. var e = t.getRect(), n = t.getRangeInfo();
  73078. return {
  73079. coordSys: {
  73080. type: "calendar",
  73081. x: e.x,
  73082. y: e.y,
  73083. width: e.width,
  73084. height: e.height,
  73085. cellWidth: t.getCellWidth(),
  73086. cellHeight: t.getCellHeight(),
  73087. rangeInfo: {
  73088. start: n.start,
  73089. end: n.end,
  73090. weeks: n.weeks,
  73091. dayCount: n.allDay
  73092. }
  73093. },
  73094. api: {
  73095. coord: function(r, i) {
  73096. return t.dataToPoint(r, i);
  73097. }
  73098. }
  73099. };
  73100. }
  73101. var IW = {};
  73102. function yre(t, e, n, r) {
  73103. return t && (t.legacy || t.legacy !== !1 && !n && !r && e !== "tspan" && (e === "text" || Ce(t, "text")));
  73104. }
  73105. function bre(t, e, n) {
  73106. var r = t, i, a, o;
  73107. if (e === "text")
  73108. o = r;
  73109. else {
  73110. o = {}, Ce(r, "text") && (o.text = r.text), Ce(r, "rich") && (o.rich = r.rich), Ce(r, "textFill") && (o.fill = r.textFill), Ce(r, "textStroke") && (o.stroke = r.textStroke), Ce(r, "fontFamily") && (o.fontFamily = r.fontFamily), Ce(r, "fontSize") && (o.fontSize = r.fontSize), Ce(r, "fontStyle") && (o.fontStyle = r.fontStyle), Ce(r, "fontWeight") && (o.fontWeight = r.fontWeight), a = {
  73111. type: "text",
  73112. style: o,
  73113. // ec4 does not support rectText trigger.
  73114. // And when text position is different in normal and emphasis
  73115. // => hover text trigger emphasis;
  73116. // => text position changed, leave mouse pointer immediately;
  73117. // That might cause incorrect state.
  73118. silent: !0
  73119. }, i = {};
  73120. var s = Ce(r, "textPosition");
  73121. n ? i.position = s ? r.textPosition : "inside" : s && (i.position = r.textPosition), Ce(r, "textPosition") && (i.position = r.textPosition), Ce(r, "textOffset") && (i.offset = r.textOffset), Ce(r, "textRotation") && (i.rotation = r.textRotation), Ce(r, "textDistance") && (i.distance = r.textDistance);
  73122. }
  73123. return DW(o, t), k(o.rich, function(l) {
  73124. DW(l, l);
  73125. }), {
  73126. textConfig: i,
  73127. textContent: a
  73128. };
  73129. }
  73130. function DW(t, e) {
  73131. e && (e.font = e.textFont || e.font, Ce(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth), Ce(e, "textAlign") && (t.align = e.textAlign), Ce(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign), Ce(e, "textLineHeight") && (t.lineHeight = e.textLineHeight), Ce(e, "textWidth") && (t.width = e.textWidth), Ce(e, "textHeight") && (t.height = e.textHeight), Ce(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor), Ce(e, "textPadding") && (t.padding = e.textPadding), Ce(e, "textBorderColor") && (t.borderColor = e.textBorderColor), Ce(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth), Ce(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius), Ce(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor), Ce(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur), Ce(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX), Ce(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY));
  73132. }
  73133. function RW(t, e, n) {
  73134. var r = t;
  73135. r.textPosition = r.textPosition || n.position || "inside", n.offset != null && (r.textOffset = n.offset), n.rotation != null && (r.textRotation = n.rotation), n.distance != null && (r.textDistance = n.distance);
  73136. var i = r.textPosition.indexOf("inside") >= 0, a = t.fill || "#000";
  73137. kW(r, e);
  73138. var o = r.textFill == null;
  73139. return i ? o && (r.textFill = n.insideFill || "#fff", !r.textStroke && n.insideStroke && (r.textStroke = n.insideStroke), !r.textStroke && (r.textStroke = a), r.textStrokeWidth == null && (r.textStrokeWidth = 2)) : (o && (r.textFill = t.fill || n.outsideFill || "#000"), !r.textStroke && n.outsideStroke && (r.textStroke = n.outsideStroke)), r.text = e.text, r.rich = e.rich, k(e.rich, function(s) {
  73140. kW(s, s);
  73141. }), r;
  73142. }
  73143. function kW(t, e) {
  73144. e && (Ce(e, "fill") && (t.textFill = e.fill), Ce(e, "stroke") && (t.textStroke = e.fill), Ce(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth), Ce(e, "font") && (t.font = e.font), Ce(e, "fontStyle") && (t.fontStyle = e.fontStyle), Ce(e, "fontWeight") && (t.fontWeight = e.fontWeight), Ce(e, "fontSize") && (t.fontSize = e.fontSize), Ce(e, "fontFamily") && (t.fontFamily = e.fontFamily), Ce(e, "align") && (t.textAlign = e.align), Ce(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign), Ce(e, "lineHeight") && (t.textLineHeight = e.lineHeight), Ce(e, "width") && (t.textWidth = e.width), Ce(e, "height") && (t.textHeight = e.height), Ce(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor), Ce(e, "padding") && (t.textPadding = e.padding), Ce(e, "borderColor") && (t.textBorderColor = e.borderColor), Ce(e, "borderWidth") && (t.textBorderWidth = e.borderWidth), Ce(e, "borderRadius") && (t.textBorderRadius = e.borderRadius), Ce(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor), Ce(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur), Ce(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX), Ce(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY), Ce(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor), Ce(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur), Ce(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX), Ce(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY));
  73145. }
  73146. function LW(t, e) {
  73147. if (process.env.NODE_ENV !== "production") {
  73148. var n = t + "^_^" + e;
  73149. IW[n] || (console.warn('[ECharts] DEPRECATED: "' + t + '" has been deprecated. ' + e), IW[n] = !0);
  73150. }
  73151. }
  73152. var _re = {
  73153. position: ["x", "y"],
  73154. scale: ["scaleX", "scaleY"],
  73155. origin: ["originX", "originY"]
  73156. }, NW = st(_re), LO = Aa(rs, function(t, e) {
  73157. return t[e] = 1, t;
  73158. }, {}), BW = rs.join(", "), NO = ["", "style", "shape", "extra"], Gh = bt();
  73159. function sL(t, e, n, r, i) {
  73160. var a = t + "Animation", o = pp(t, r, i) || {}, s = Gh(e).userDuring;
  73161. return o.duration > 0 && (o.during = s ? xe(H7e, {
  73162. el: e,
  73163. userDuring: s
  73164. }) : null, o.setToFinal = !0, o.scope = t), le(o, n[a]), o;
  73165. }
  73166. function U_(t, e, n, r) {
  73167. r = r || {};
  73168. var i = r.dataIndex, a = r.isInit, o = r.clearStyle, s = n.isAnimationEnabled(), l = Gh(t), u = e.style;
  73169. l.userDuring = e.during;
  73170. var c = {}, f = {};
  73171. if (j7e(t, e, f), VW("shape", e, f), VW("extra", e, f), !a && s && (G7e(t, e, c), zW("shape", t, e, c), zW("extra", t, e, c), Z7e(t, e, u, c)), f.style = u, V7e(t, f, o), W7e(t, e), s)
  73172. if (a) {
  73173. var d = {};
  73174. k(NO, function(p) {
  73175. var v = p ? e[p] : e;
  73176. v && v.enterFrom && (p && (d[p] = d[p] || {}), le(p ? d[p] : d, v.enterFrom));
  73177. });
  73178. var h = sL("enter", t, e, n, i);
  73179. h.duration > 0 && t.animateFrom(d, h);
  73180. } else
  73181. F7e(t, e, i || 0, n, c);
  73182. Ore(t, e), u ? t.dirty() : t.markRedraw();
  73183. }
  73184. function Ore(t, e) {
  73185. for (var n = Gh(t).leaveToProps, r = 0; r < NO.length; r++) {
  73186. var i = NO[r], a = i ? e[i] : e;
  73187. a && a.leaveTo && (n || (n = Gh(t).leaveToProps = {}), i && (n[i] = n[i] || {}), le(i ? n[i] : n, a.leaveTo));
  73188. }
  73189. }
  73190. function Sw(t, e, n, r) {
  73191. if (t) {
  73192. var i = t.parent, a = Gh(t).leaveToProps;
  73193. if (a) {
  73194. var o = sL("update", t, e, n, 0);
  73195. o.done = function() {
  73196. i.remove(t);
  73197. }, t.animateTo(a, o);
  73198. } else
  73199. i.remove(t);
  73200. }
  73201. }
  73202. function rf(t) {
  73203. return t === "all";
  73204. }
  73205. function V7e(t, e, n) {
  73206. var r = e.style;
  73207. if (!t.isGroup && r) {
  73208. if (n) {
  73209. t.useStyle({});
  73210. for (var i = t.animators, a = 0; a < i.length; a++) {
  73211. var o = i[a];
  73212. o.targetName === "style" && o.changeTarget(t.style);
  73213. }
  73214. }
  73215. t.setStyle(r);
  73216. }
  73217. e && (e.style = null, e && t.attr(e), e.style = r);
  73218. }
  73219. function F7e(t, e, n, r, i) {
  73220. if (i) {
  73221. var a = sL("update", t, e, r, n);
  73222. a.duration > 0 && t.animateFrom(i, a);
  73223. }
  73224. }
  73225. function W7e(t, e) {
  73226. Ce(e, "silent") && (t.silent = e.silent), Ce(e, "ignore") && (t.ignore = e.ignore), t instanceof Ma && Ce(e, "invisible") && (t.invisible = e.invisible), t instanceof ot && Ce(e, "autoBatch") && (t.autoBatch = e.autoBatch);
  73227. }
  73228. var $o = {}, Q7e = {
  73229. // Usually other props do not need to be changed in animation during.
  73230. setTransform: function(t, e) {
  73231. return process.env.NODE_ENV !== "production" && ke(Ce(LO, t), "Only " + BW + " available in `setTransform`."), $o.el[t] = e, this;
  73232. },
  73233. getTransform: function(t) {
  73234. return process.env.NODE_ENV !== "production" && ke(Ce(LO, t), "Only " + BW + " available in `getTransform`."), $o.el[t];
  73235. },
  73236. setShape: function(t, e) {
  73237. process.env.NODE_ENV !== "production" && yd(t);
  73238. var n = $o.el, r = n.shape || (n.shape = {});
  73239. return r[t] = e, n.dirtyShape && n.dirtyShape(), this;
  73240. },
  73241. getShape: function(t) {
  73242. process.env.NODE_ENV !== "production" && yd(t);
  73243. var e = $o.el.shape;
  73244. if (e)
  73245. return e[t];
  73246. },
  73247. setStyle: function(t, e) {
  73248. process.env.NODE_ENV !== "production" && yd(t);
  73249. var n = $o.el, r = n.style;
  73250. return r && (process.env.NODE_ENV !== "production" && ou(e) && dn("style." + t + " must not be assigned with NaN."), r[t] = e, n.dirtyStyle && n.dirtyStyle()), this;
  73251. },
  73252. getStyle: function(t) {
  73253. process.env.NODE_ENV !== "production" && yd(t);
  73254. var e = $o.el.style;
  73255. if (e)
  73256. return e[t];
  73257. },
  73258. setExtra: function(t, e) {
  73259. process.env.NODE_ENV !== "production" && yd(t);
  73260. var n = $o.el.extra || ($o.el.extra = {});
  73261. return n[t] = e, this;
  73262. },
  73263. getExtra: function(t) {
  73264. process.env.NODE_ENV !== "production" && yd(t);
  73265. var e = $o.el.extra;
  73266. if (e)
  73267. return e[t];
  73268. }
  73269. };
  73270. function yd(t) {
  73271. if (process.env.NODE_ENV !== "production" && (t === "transition" || t === "enterFrom" || t === "leaveTo"))
  73272. throw new Error('key must not be "' + t + '"');
  73273. }
  73274. function H7e() {
  73275. var t = this, e = t.el;
  73276. if (e) {
  73277. var n = Gh(e).userDuring, r = t.userDuring;
  73278. if (n !== r) {
  73279. t.el = t.userDuring = null;
  73280. return;
  73281. }
  73282. $o.el = e, r(Q7e);
  73283. }
  73284. }
  73285. function zW(t, e, n, r) {
  73286. var i = n[t];
  73287. if (i) {
  73288. var a = e[t], o;
  73289. if (a) {
  73290. var s = n.transition, l = i.transition;
  73291. if (l)
  73292. if (!o && (o = r[t] = {}), rf(l))
  73293. le(o, a);
  73294. else
  73295. for (var u = Qt(l), c = 0; c < u.length; c++) {
  73296. var f = u[c], d = a[f];
  73297. o[f] = d;
  73298. }
  73299. else if (rf(s) || et(s, t) >= 0) {
  73300. !o && (o = r[t] = {});
  73301. for (var h = st(a), c = 0; c < h.length; c++) {
  73302. var f = h[c], d = a[f];
  73303. U7e(i[f], d) && (o[f] = d);
  73304. }
  73305. }
  73306. }
  73307. }
  73308. }
  73309. function VW(t, e, n) {
  73310. var r = e[t];
  73311. if (r)
  73312. for (var i = n[t] = {}, a = st(r), o = 0; o < a.length; o++) {
  73313. var s = a[o];
  73314. i[s] = Tg(r[s]);
  73315. }
  73316. }
  73317. function G7e(t, e, n) {
  73318. for (var r = e.transition, i = rf(r) ? rs : Qt(r || []), a = 0; a < i.length; a++) {
  73319. var o = i[a];
  73320. if (!(o === "style" || o === "shape" || o === "extra")) {
  73321. var s = t[o];
  73322. process.env.NODE_ENV !== "production" && Sre(o, "el.transition"), n[o] = s;
  73323. }
  73324. }
  73325. }
  73326. function j7e(t, e, n) {
  73327. for (var r = 0; r < NW.length; r++) {
  73328. var i = NW[r], a = _re[i], o = e[i];
  73329. o && (n[a[0]] = o[0], n[a[1]] = o[1]);
  73330. }
  73331. for (var r = 0; r < rs.length; r++) {
  73332. var s = rs[r];
  73333. e[s] != null && (n[s] = e[s]);
  73334. }
  73335. }
  73336. function Z7e(t, e, n, r) {
  73337. if (n) {
  73338. var i = t.style, a;
  73339. if (i) {
  73340. var o = n.transition, s = e.transition;
  73341. if (o && !rf(o)) {
  73342. var l = Qt(o);
  73343. !a && (a = r.style = {});
  73344. for (var u = 0; u < l.length; u++) {
  73345. var c = l[u], f = i[c];
  73346. a[c] = f;
  73347. }
  73348. } else if (t.getAnimationStyleProps && (rf(s) || rf(o) || et(s, "style") >= 0)) {
  73349. var d = t.getAnimationStyleProps(), h = d ? d.style : null;
  73350. if (h) {
  73351. !a && (a = r.style = {});
  73352. for (var p = st(n), u = 0; u < p.length; u++) {
  73353. var c = p[u];
  73354. if (h[c]) {
  73355. var f = i[c];
  73356. a[c] = f;
  73357. }
  73358. }
  73359. }
  73360. }
  73361. }
  73362. }
  73363. }
  73364. function U7e(t, e) {
  73365. return wr(t) ? t !== e : t != null && isFinite(t);
  73366. }
  73367. var Sre;
  73368. process.env.NODE_ENV !== "production" && (Sre = function(t, e) {
  73369. Ce(LO, t) || dn("Prop `" + t + "` is not a permitted in `" + e + "`. Only `" + st(LO).join("`, `") + "` are permitted.");
  73370. });
  73371. var xre = bt(), X7e = ["percent", "easing", "shape", "style", "extra"];
  73372. function wre(t) {
  73373. t.stopAnimation("keyframe"), t.attr(xre(t));
  73374. }
  73375. function BO(t, e, n) {
  73376. if (!(!n.isAnimationEnabled() || !e)) {
  73377. if (ue(e)) {
  73378. k(e, function(s) {
  73379. BO(t, s, n);
  73380. });
  73381. return;
  73382. }
  73383. var r = e.keyframes, i = e.duration;
  73384. if (n && i == null) {
  73385. var a = pp("enter", n, 0);
  73386. i = a && a.duration;
  73387. }
  73388. if (!(!r || !i)) {
  73389. var o = xre(t);
  73390. k(NO, function(s) {
  73391. if (!(s && !t[s])) {
  73392. var l, u = !1;
  73393. r.sort(function(c, f) {
  73394. return c.percent - f.percent;
  73395. }), k(r, function(c) {
  73396. var f = t.animators, d = s ? c[s] : c;
  73397. if (process.env.NODE_ENV !== "production" && c.percent >= 1 && (u = !0), !!d) {
  73398. var h = st(d);
  73399. if (s || (h = Nt(h, function(g) {
  73400. return et(X7e, g) < 0;
  73401. })), !!h.length) {
  73402. l || (l = t.animate(s, e.loop, !0), l.scope = "keyframe");
  73403. for (var p = 0; p < f.length; p++)
  73404. f[p] !== l && f[p].targetName === l.targetName && f[p].stopTracks(h);
  73405. s && (o[s] = o[s] || {});
  73406. var v = s ? o[s] : o;
  73407. k(h, function(g) {
  73408. v[g] = ((s ? t[s] : t) || {})[g];
  73409. }), l.whenWithKeys(i * c.percent, d, h, c.easing);
  73410. }
  73411. }
  73412. }), l && (process.env.NODE_ENV !== "production" && (u || dn("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), l.delay(e.delay || 0).duration(i).start(e.easing));
  73413. }
  73414. });
  73415. }
  73416. }
  73417. }
  73418. var ks = "emphasis", Vl = "normal", lL = "blur", uL = "select", du = [Vl, ks, lL, uL], FP = {
  73419. normal: ["itemStyle"],
  73420. emphasis: [ks, "itemStyle"],
  73421. blur: [lL, "itemStyle"],
  73422. select: [uL, "itemStyle"]
  73423. }, WP = {
  73424. normal: ["label"],
  73425. emphasis: [ks, "label"],
  73426. blur: [lL, "label"],
  73427. select: [uL, "label"]
  73428. }, Y7e = ["x", "y"], q7e = "e\0\0", ia = {
  73429. normal: {},
  73430. emphasis: {},
  73431. blur: {},
  73432. select: {}
  73433. }, FW = {
  73434. cartesian2d: I7e,
  73435. geo: R7e,
  73436. single: L7e,
  73437. polar: B7e,
  73438. calendar: z7e
  73439. };
  73440. function zO(t) {
  73441. return t instanceof ot;
  73442. }
  73443. function AE(t) {
  73444. return t instanceof Ma;
  73445. }
  73446. function K7e(t, e) {
  73447. e.copyTransform(t), AE(e) && AE(t) && (e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel, e.invisible = t.invisible, e.ignore = t.ignore, zO(e) && zO(t) && e.setShape(t.shape));
  73448. }
  73449. var J7e = (
  73450. /** @class */
  73451. function(t) {
  73452. q(e, t);
  73453. function e() {
  73454. var n = t !== null && t.apply(this, arguments) || this;
  73455. return n.type = e.type, n;
  73456. }
  73457. return e.prototype.render = function(n, r, i, a) {
  73458. this._progressiveEls = null;
  73459. var o = this._data, s = n.getData(), l = this.group, u = WW(n, s, r, i);
  73460. o || l.removeAll(), s.diff(o).add(function(f) {
  73461. QP(i, null, f, u(f, a), n, l, s);
  73462. }).remove(function(f) {
  73463. var d = o.getItemGraphicEl(f);
  73464. d && Sw(d, Rs(d).option, n);
  73465. }).update(function(f, d) {
  73466. var h = o.getItemGraphicEl(d);
  73467. QP(i, h, f, u(f, a), n, l, s);
  73468. }).execute();
  73469. var c = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
  73470. c ? l.setClipPath(c) : l.removeClipPath(), this._data = s;
  73471. }, e.prototype.incrementalPrepareRender = function(n, r, i) {
  73472. this.group.removeAll(), this._data = null;
  73473. }, e.prototype.incrementalRender = function(n, r, i, a, o) {
  73474. var s = r.getData(), l = WW(r, s, i, a), u = this._progressiveEls = [];
  73475. function c(h) {
  73476. h.isGroup || (h.incremental = !0, h.ensureState("emphasis").hoverLayer = !0);
  73477. }
  73478. for (var f = n.start; f < n.end; f++) {
  73479. var d = QP(null, null, f, l(f, o), r, this.group, s);
  73480. d && (d.traverse(c), u.push(d));
  73481. }
  73482. }, e.prototype.eachRendered = function(n) {
  73483. Tu(this._progressiveEls || this.group, n);
  73484. }, e.prototype.filterForExposedEvent = function(n, r, i, a) {
  73485. var o = r.element;
  73486. if (o == null || i.name === o)
  73487. return !0;
  73488. for (; (i = i.__hostTarget || i.parent) && i !== this.group; )
  73489. if (i.name === o)
  73490. return !0;
  73491. return !1;
  73492. }, e.type = "custom", e;
  73493. }(zt)
  73494. );
  73495. function cL(t) {
  73496. var e = t.type, n;
  73497. if (e === "path") {
  73498. var r = t.shape, i = r.width != null && r.height != null ? {
  73499. x: r.x || 0,
  73500. y: r.y || 0,
  73501. width: r.width,
  73502. height: r.height
  73503. } : null, a = Pre(r);
  73504. n = F0(a, null, i, r.layout || "center"), Rs(n).customPathData = a;
  73505. } else if (e === "image")
  73506. n = new lr({}), Rs(n).customImagePath = t.style.image;
  73507. else if (e === "text")
  73508. n = new gt({});
  73509. else if (e === "group")
  73510. n = new Ve();
  73511. else {
  73512. if (e === "compoundPath")
  73513. throw new Error('"compoundPath" is not supported yet.');
  73514. var o = Kx(e);
  73515. if (!o) {
  73516. var s = "";
  73517. process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), Et(s);
  73518. }
  73519. n = new o();
  73520. }
  73521. return Rs(n).customGraphicType = e, n.name = t.name, n.z2EmphasisLift = 1, n.z2SelectLift = 1, n;
  73522. }
  73523. function fL(t, e, n, r, i, a, o) {
  73524. wre(e);
  73525. var s = i && i.normal.cfg;
  73526. s && e.setTextConfig(s), r && r.transition == null && (r.transition = Y7e);
  73527. var l = r && r.style;
  73528. if (l) {
  73529. if (e.type === "text") {
  73530. var u = l;
  73531. Ce(u, "textFill") && (u.fill = u.textFill), Ce(u, "textStroke") && (u.stroke = u.textStroke);
  73532. }
  73533. var c = void 0, f = zO(e) ? l.decal : null;
  73534. t && f && (f.dirty = !0, c = Fh(f, t)), l.__decalPattern = c;
  73535. }
  73536. if (AE(e) && l) {
  73537. var c = l.__decalPattern;
  73538. c && (l.decal = c);
  73539. }
  73540. U_(e, r, a, {
  73541. dataIndex: n,
  73542. isInit: o,
  73543. clearStyle: !0
  73544. }), BO(e, r.keyframeAnimation, a);
  73545. }
  73546. function Cre(t, e, n, r, i) {
  73547. var a = e.isGroup ? null : e, o = i && i[t].cfg;
  73548. if (a) {
  73549. var s = a.ensureState(t);
  73550. if (r === !1) {
  73551. var l = a.getState(t);
  73552. l && (l.style = null);
  73553. } else
  73554. s.style = r || null;
  73555. o && (s.textConfig = o), bf(a);
  73556. }
  73557. }
  73558. function eQe(t, e, n) {
  73559. if (!t.isGroup) {
  73560. var r = t, i = n.currentZ, a = n.currentZLevel;
  73561. r.z = i, r.zlevel = a;
  73562. var o = e.z2;
  73563. o != null && (r.z2 = o || 0);
  73564. for (var s = 0; s < du.length; s++)
  73565. tQe(r, e, du[s]);
  73566. }
  73567. }
  73568. function tQe(t, e, n) {
  73569. var r = n === Vl, i = r ? e : VO(e, n), a = i ? i.z2 : null, o;
  73570. a != null && (o = r ? t : t.ensureState(n), o.z2 = a || 0);
  73571. }
  73572. function WW(t, e, n, r) {
  73573. var i = t.get("renderItem"), a = t.coordinateSystem, o = {};
  73574. a && (process.env.NODE_ENV !== "production" && (ke(i, "series.render is required."), ke(a.prepareCustoms || FW[a.type], "This coordSys does not support custom series.")), o = a.prepareCustoms ? a.prepareCustoms(a) : FW[a.type](a));
  73575. for (var s = Re({
  73576. getWidth: r.getWidth,
  73577. getHeight: r.getHeight,
  73578. getZr: r.getZr,
  73579. getDevicePixelRatio: r.getDevicePixelRatio,
  73580. value: _,
  73581. style: S,
  73582. ordinalRawValue: O,
  73583. styleEmphasis: x,
  73584. visual: w,
  73585. barLayout: P,
  73586. currentSeriesIndices: $,
  73587. font: A
  73588. }, o.api || {}), l = {
  73589. // The life cycle of context: current round of rendering.
  73590. // The global life cycle is probably not necessary, because
  73591. // user can store global status by themselves.
  73592. context: {},
  73593. seriesId: t.id,
  73594. seriesName: t.name,
  73595. seriesIndex: t.seriesIndex,
  73596. coordSys: o.coordSys,
  73597. dataInsideLength: e.count(),
  73598. encode: nQe(t.getData())
  73599. }, u, c, f = {}, d = {}, h = {}, p = {}, v = 0; v < du.length; v++) {
  73600. var g = du[v];
  73601. h[g] = t.getModel(FP[g]), p[g] = t.getModel(WP[g]);
  73602. }
  73603. function m(D) {
  73604. return D === u ? c || (c = e.getItemModel(D)) : e.getItemModel(D);
  73605. }
  73606. function y(D, E) {
  73607. return e.hasItemOption ? D === u ? f[E] || (f[E] = m(D).getModel(FP[E])) : m(D).getModel(FP[E]) : h[E];
  73608. }
  73609. function b(D, E) {
  73610. return e.hasItemOption ? D === u ? d[E] || (d[E] = m(D).getModel(WP[E])) : m(D).getModel(WP[E]) : p[E];
  73611. }
  73612. return function(D, E) {
  73613. return u = D, c = null, f = {}, d = {}, i && i(Re({
  73614. dataIndexInside: D,
  73615. dataIndex: e.getRawIndex(D),
  73616. // Can be used for optimization when zoom or roam.
  73617. actionType: E ? E.type : null
  73618. }, l), s);
  73619. };
  73620. function _(D, E) {
  73621. return E == null && (E = u), e.getStore().get(e.getDimensionIndex(D || 0), E);
  73622. }
  73623. function O(D, E) {
  73624. E == null && (E = u), D = D || 0;
  73625. var R = e.getDimensionInfo(D);
  73626. if (!R) {
  73627. var N = e.getDimensionIndex(D);
  73628. return N >= 0 ? e.getStore().get(N, E) : void 0;
  73629. }
  73630. var V = e.get(R.name, E), z = R && R.ordinalMeta;
  73631. return z ? z.categories[V] : V;
  73632. }
  73633. function S(D, E) {
  73634. process.env.NODE_ENV !== "production" && LW("api.style", "Please write literal style directly instead."), E == null && (E = u);
  73635. var R = e.getItemVisual(E, "style"), N = R && R.fill, V = R && R.opacity, z = y(E, Vl).getItemStyle();
  73636. N != null && (z.fill = N), V != null && (z.opacity = V);
  73637. var W = {
  73638. inheritColor: Oe(N) ? N : "#000"
  73639. }, F = b(E, Vl), Q = Zt(F, null, W, !1, !0);
  73640. Q.text = F.getShallow("show") ? We(t.getFormattedLabel(E, Vl), Wh(e, E)) : null;
  73641. var Z = cO(F, W, !1);
  73642. return T(D, z), z = RW(z, Q, Z), D && C(z, D), z.legacy = !0, z;
  73643. }
  73644. function x(D, E) {
  73645. process.env.NODE_ENV !== "production" && LW("api.styleEmphasis", "Please write literal style directly instead."), E == null && (E = u);
  73646. var R = y(E, ks).getItemStyle(), N = b(E, ks), V = Zt(N, null, null, !0, !0);
  73647. V.text = N.getShallow("show") ? ji(t.getFormattedLabel(E, ks), t.getFormattedLabel(E, Vl), Wh(e, E)) : null;
  73648. var z = cO(N, null, !0);
  73649. return T(D, R), R = RW(R, V, z), D && C(R, D), R.legacy = !0, R;
  73650. }
  73651. function C(D, E) {
  73652. for (var R in E)
  73653. Ce(E, R) && (D[R] = E[R]);
  73654. }
  73655. function T(D, E) {
  73656. D && (D.textFill && (E.textFill = D.textFill), D.textPosition && (E.textPosition = D.textPosition));
  73657. }
  73658. function w(D, E) {
  73659. if (E == null && (E = u), Ce(MW, D)) {
  73660. var R = e.getItemVisual(E, "style");
  73661. return R ? R[MW[D]] : null;
  73662. }
  73663. if (Ce(A7e, D))
  73664. return e.getItemVisual(E, D);
  73665. }
  73666. function P(D) {
  73667. if (a.type === "cartesian2d") {
  73668. var E = a.getBaseAxis();
  73669. return MNe(Re({
  73670. axis: E
  73671. }, D));
  73672. }
  73673. }
  73674. function $() {
  73675. return n.getCurrentSeriesIndices();
  73676. }
  73677. function A(D) {
  73678. return GR(D, n);
  73679. }
  73680. }
  73681. function nQe(t) {
  73682. var e = {};
  73683. return k(t.dimensions, function(n) {
  73684. var r = t.getDimensionInfo(n);
  73685. if (!r.isExtraCoord) {
  73686. var i = r.coordDim, a = e[i] = e[i] || [];
  73687. a[r.coordDimIndex] = t.getDimensionIndex(n);
  73688. }
  73689. }), e;
  73690. }
  73691. function QP(t, e, n, r, i, a, o) {
  73692. if (!r) {
  73693. a.remove(e);
  73694. return;
  73695. }
  73696. var s = dL(t, e, n, r, i, a);
  73697. return s && o.setItemGraphicEl(n, s), s && bn(s, r.focus, r.blurScope, r.emphasisDisabled), s;
  73698. }
  73699. function dL(t, e, n, r, i, a) {
  73700. process.env.NODE_ENV !== "production" && ke(r, "should not have an null/undefined element setting");
  73701. var o = -1, s = e;
  73702. e && Tre(e, r, i) && (o = et(a.childrenRef(), e), e = null);
  73703. var l = !e, u = e;
  73704. u ? u.clearStates() : (u = cL(r), s && K7e(s, u)), r.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), ia.normal.cfg = ia.normal.conOpt = ia.emphasis.cfg = ia.emphasis.conOpt = ia.blur.cfg = ia.blur.conOpt = ia.select.cfg = ia.select.conOpt = null, ia.isLegacy = !1, iQe(u, n, r, i, l, ia), rQe(u, n, r, i, l), fL(t, u, n, r, ia, i, l), Ce(r, "info") && (Rs(u).info = r.info);
  73705. for (var c = 0; c < du.length; c++) {
  73706. var f = du[c];
  73707. if (f !== Vl) {
  73708. var d = VO(r, f), h = hL(r, d, f);
  73709. Cre(f, u, d, h, ia);
  73710. }
  73711. }
  73712. return eQe(u, r, i), r.type === "group" && aQe(t, u, n, r, i), o >= 0 ? a.replaceAt(u, o) : a.add(u), u;
  73713. }
  73714. function Tre(t, e, n) {
  73715. var r = Rs(t), i = e.type, a = e.shape, o = e.style;
  73716. return (
  73717. // Always create new if universal transition is enabled.
  73718. // Because we do transition after render. It needs to know what old element is. Replacement will loose it.
  73719. n.isUniversalTransitionEnabled() || i != null && i !== r.customGraphicType || i === "path" && uQe(a) && Pre(a) !== r.customPathData || i === "image" && Ce(o, "image") && o.image !== r.customImagePath
  73720. );
  73721. }
  73722. function rQe(t, e, n, r, i) {
  73723. var a = n.clipPath;
  73724. if (a === !1)
  73725. t && t.getClipPath() && t.removeClipPath();
  73726. else if (a) {
  73727. var o = t.getClipPath();
  73728. o && Tre(o, a, r) && (o = null), o || (o = cL(a), process.env.NODE_ENV !== "production" && ke(zO(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), t.setClipPath(o)), fL(null, o, e, a, null, r, i);
  73729. }
  73730. }
  73731. function iQe(t, e, n, r, i, a) {
  73732. if (!t.isGroup) {
  73733. QW(n, null, a), QW(n, ks, a);
  73734. var o = a.normal.conOpt, s = a.emphasis.conOpt, l = a.blur.conOpt, u = a.select.conOpt;
  73735. if (o != null || s != null || u != null || l != null) {
  73736. var c = t.getTextContent();
  73737. if (o === !1)
  73738. c && t.removeTextContent();
  73739. else {
  73740. o = a.normal.conOpt = o || {
  73741. type: "text"
  73742. }, c ? c.clearStates() : (c = cL(o), t.setTextContent(c)), fL(null, c, e, o, null, r, i);
  73743. for (var f = o && o.style, d = 0; d < du.length; d++) {
  73744. var h = du[d];
  73745. if (h !== Vl) {
  73746. var p = a[h].conOpt;
  73747. Cre(h, c, p, hL(o, p, h), null);
  73748. }
  73749. }
  73750. f ? c.dirty() : c.markRedraw();
  73751. }
  73752. }
  73753. }
  73754. }
  73755. function QW(t, e, n) {
  73756. var r = e ? VO(t, e) : t, i = e ? hL(t, r, ks) : t.style, a = t.type, o = r ? r.textConfig : null, s = t.textContent, l = s ? e ? VO(s, e) : s : null;
  73757. if (i && // Because emphasis style has little info to detect legacy,
  73758. // if normal is legacy, emphasis is trade as legacy.
  73759. (n.isLegacy || yre(i, a, !!o, !!l))) {
  73760. n.isLegacy = !0;
  73761. var u = bre(i, a, !e);
  73762. !o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
  73763. }
  73764. if (!e && l) {
  73765. var c = l;
  73766. !c.type && (c.type = "text"), process.env.NODE_ENV !== "production" && ke(c.type === "text", 'textContent.type must be "text"');
  73767. }
  73768. var f = e ? n[e] : n.normal;
  73769. f.cfg = o, f.conOpt = l;
  73770. }
  73771. function VO(t, e) {
  73772. return e ? t ? t[e] : null : t;
  73773. }
  73774. function hL(t, e, n) {
  73775. var r = e && e.style;
  73776. return r == null && n === ks && t && (r = t.styleEmphasis), r;
  73777. }
  73778. function aQe(t, e, n, r, i) {
  73779. var a = r.children, o = a ? a.length : 0, s = r.$mergeChildren, l = s === "byName" || r.diffChildrenByName, u = s === !1;
  73780. if (!(!o && !l && !u)) {
  73781. if (l) {
  73782. sQe({
  73783. api: t,
  73784. oldChildren: e.children() || [],
  73785. newChildren: a || [],
  73786. dataIndex: n,
  73787. seriesModel: i,
  73788. group: e
  73789. });
  73790. return;
  73791. }
  73792. u && e.removeAll();
  73793. for (var c = 0; c < o; c++) {
  73794. var f = a[c], d = e.childAt(c);
  73795. f ? (f.ignore == null && (f.ignore = !1), dL(t, d, n, f, i, e)) : (process.env.NODE_ENV !== "production" && ke(d, "renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."), d.ignore = !0);
  73796. }
  73797. for (var h = e.childCount() - 1; h >= c; h--) {
  73798. var p = e.childAt(h);
  73799. oQe(e, p, i);
  73800. }
  73801. }
  73802. }
  73803. function oQe(t, e, n) {
  73804. e && Sw(e, Rs(t).option, n);
  73805. }
  73806. function sQe(t) {
  73807. new Us(t.oldChildren, t.newChildren, HW, HW, t).add(GW).update(GW).remove(lQe).execute();
  73808. }
  73809. function HW(t, e) {
  73810. var n = t && t.name;
  73811. return n ?? q7e + e;
  73812. }
  73813. function GW(t, e) {
  73814. var n = this.context, r = t != null ? n.newChildren[t] : null, i = e != null ? n.oldChildren[e] : null;
  73815. dL(n.api, i, n.dataIndex, r, n.seriesModel, n.group);
  73816. }
  73817. function lQe(t) {
  73818. var e = this.context, n = e.oldChildren[t];
  73819. n && Sw(n, Rs(n).option, e.seriesModel);
  73820. }
  73821. function Pre(t) {
  73822. return t && (t.pathData || t.d);
  73823. }
  73824. function uQe(t) {
  73825. return t && (Ce(t, "pathData") || Ce(t, "d"));
  73826. }
  73827. function cQe(t) {
  73828. t.registerChartView(J7e), t.registerSeriesModel(E7e);
  73829. }
  73830. var wc = bt(), jW = Le, HP = xe, pL = (
  73831. /** @class */
  73832. function() {
  73833. function t() {
  73834. this._dragging = !1, this.animationThreshold = 15;
  73835. }
  73836. return t.prototype.render = function(e, n, r, i) {
  73837. var a = n.get("value"), o = n.get("status");
  73838. if (this._axisModel = e, this._axisPointerModel = n, this._api = r, !(!i && this._lastValue === a && this._lastStatus === o)) {
  73839. this._lastValue = a, this._lastStatus = o;
  73840. var s = this._group, l = this._handle;
  73841. if (!o || o === "hide") {
  73842. s && s.hide(), l && l.hide();
  73843. return;
  73844. }
  73845. s && s.show(), l && l.show();
  73846. var u = {};
  73847. this.makeElOption(u, a, e, n, r);
  73848. var c = u.graphicKey;
  73849. c !== this._lastGraphicKey && this.clear(r), this._lastGraphicKey = c;
  73850. var f = this._moveAnimation = this.determineAnimation(e, n);
  73851. if (!s)
  73852. s = this._group = new Ve(), this.createPointerEl(s, u, e, n), this.createLabelEl(s, u, e, n), r.getZr().add(s);
  73853. else {
  73854. var d = Ue(ZW, n, f);
  73855. this.updatePointerEl(s, u, d), this.updateLabelEl(s, u, d, n);
  73856. }
  73857. XW(s, n, !0), this._renderHandle(a);
  73858. }
  73859. }, t.prototype.remove = function(e) {
  73860. this.clear(e);
  73861. }, t.prototype.dispose = function(e) {
  73862. this.clear(e);
  73863. }, t.prototype.determineAnimation = function(e, n) {
  73864. var r = n.get("animation"), i = e.axis, a = i.type === "category", o = n.get("snap");
  73865. if (!o && !a)
  73866. return !1;
  73867. if (r === "auto" || r == null) {
  73868. var s = this.animationThreshold;
  73869. if (a && i.getBandWidth() > s)
  73870. return !0;
  73871. if (o) {
  73872. var l = Bk(e).seriesDataCount, u = i.getExtent();
  73873. return Math.abs(u[0] - u[1]) / l > s;
  73874. }
  73875. return !1;
  73876. }
  73877. return r === !0;
  73878. }, t.prototype.makeElOption = function(e, n, r, i, a) {
  73879. }, t.prototype.createPointerEl = function(e, n, r, i) {
  73880. var a = n.pointer;
  73881. if (a) {
  73882. var o = wc(e).pointerEl = new Lf[a.type](jW(n.pointer));
  73883. e.add(o);
  73884. }
  73885. }, t.prototype.createLabelEl = function(e, n, r, i) {
  73886. if (n.label) {
  73887. var a = wc(e).labelEl = new gt(jW(n.label));
  73888. e.add(a), UW(a, i);
  73889. }
  73890. }, t.prototype.updatePointerEl = function(e, n, r) {
  73891. var i = wc(e).pointerEl;
  73892. i && n.pointer && (i.setStyle(n.pointer.style), r(i, {
  73893. shape: n.pointer.shape
  73894. }));
  73895. }, t.prototype.updateLabelEl = function(e, n, r, i) {
  73896. var a = wc(e).labelEl;
  73897. a && (a.setStyle(n.label.style), r(a, {
  73898. // Consider text length change in vertical axis, animation should
  73899. // be used on shape, otherwise the effect will be weird.
  73900. // TODOTODO
  73901. // shape: elOption.label.shape,
  73902. x: n.label.x,
  73903. y: n.label.y
  73904. }), UW(a, i));
  73905. }, t.prototype._renderHandle = function(e) {
  73906. if (!(this._dragging || !this.updateHandleTransform)) {
  73907. var n = this._axisPointerModel, r = this._api.getZr(), i = this._handle, a = n.getModel("handle"), o = n.get("status");
  73908. if (!a.get("show") || !o || o === "hide") {
  73909. i && r.remove(i), this._handle = null;
  73910. return;
  73911. }
  73912. var s;
  73913. this._handle || (s = !0, i = this._handle = vp(a.get("icon"), {
  73914. cursor: "move",
  73915. draggable: !0,
  73916. onmousemove: function(u) {
  73917. Gs(u.event);
  73918. },
  73919. onmousedown: HP(this._onHandleDragMove, this, 0, 0),
  73920. drift: HP(this._onHandleDragMove, this),
  73921. ondragend: HP(this._onHandleDragEnd, this)
  73922. }), r.add(i)), XW(i, n, !1), i.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
  73923. var l = a.get("size");
  73924. ue(l) || (l = [l, l]), i.scaleX = l[0] / 2, i.scaleY = l[1] / 2, Sp(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
  73925. }
  73926. }, t.prototype._moveHandleToValue = function(e, n) {
  73927. ZW(this._axisPointerModel, !n && this._moveAnimation, this._handle, GP(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
  73928. }, t.prototype._onHandleDragMove = function(e, n) {
  73929. var r = this._handle;
  73930. if (r) {
  73931. this._dragging = !0;
  73932. var i = this.updateHandleTransform(GP(r), [e, n], this._axisModel, this._axisPointerModel);
  73933. this._payloadInfo = i, r.stopAnimation(), r.attr(GP(i)), wc(r).lastProp = null, this._doDispatchAxisPointer();
  73934. }
  73935. }, t.prototype._doDispatchAxisPointer = function() {
  73936. var e = this._handle;
  73937. if (e) {
  73938. var n = this._payloadInfo, r = this._axisModel;
  73939. this._api.dispatchAction({
  73940. type: "updateAxisPointer",
  73941. x: n.cursorPoint[0],
  73942. y: n.cursorPoint[1],
  73943. tooltipOption: n.tooltipOption,
  73944. axesInfo: [{
  73945. axisDim: r.axis.dim,
  73946. axisIndex: r.componentIndex
  73947. }]
  73948. });
  73949. }
  73950. }, t.prototype._onHandleDragEnd = function() {
  73951. this._dragging = !1;
  73952. var e = this._handle;
  73953. if (e) {
  73954. var n = this._axisPointerModel.get("value");
  73955. this._moveHandleToValue(n), this._api.dispatchAction({
  73956. type: "hideTip"
  73957. });
  73958. }
  73959. }, t.prototype.clear = function(e) {
  73960. this._lastValue = null, this._lastStatus = null;
  73961. var n = e.getZr(), r = this._group, i = this._handle;
  73962. n && r && (this._lastGraphicKey = null, r && n.remove(r), i && n.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), $m(this, "_doDispatchAxisPointer");
  73963. }, t.prototype.doClear = function() {
  73964. }, t.prototype.buildLabel = function(e, n, r) {
  73965. return r = r || 0, {
  73966. x: e[r],
  73967. y: e[1 - r],
  73968. width: n[r],
  73969. height: n[1 - r]
  73970. };
  73971. }, t;
  73972. }()
  73973. );
  73974. function ZW(t, e, n, r) {
  73975. $re(wc(n).lastProp, r) || (wc(n).lastProp = r, e ? Ct(n, r, t) : (n.stopAnimation(), n.attr(r)));
  73976. }
  73977. function $re(t, e) {
  73978. if (Ie(t) && Ie(e)) {
  73979. var n = !0;
  73980. return k(e, function(r, i) {
  73981. n = n && $re(t[i], r);
  73982. }), !!n;
  73983. } else
  73984. return t === e;
  73985. }
  73986. function UW(t, e) {
  73987. t[e.get(["label", "show"]) ? "show" : "hide"]();
  73988. }
  73989. function GP(t) {
  73990. return {
  73991. x: t.x || 0,
  73992. y: t.y || 0,
  73993. rotation: t.rotation || 0
  73994. };
  73995. }
  73996. function XW(t, e, n) {
  73997. var r = e.get("z"), i = e.get("zlevel");
  73998. t && t.traverse(function(a) {
  73999. a.type !== "group" && (r != null && (a.z = r), i != null && (a.zlevel = i), a.silent = n);
  74000. });
  74001. }
  74002. function vL(t) {
  74003. var e = t.get("type"), n = t.getModel(e + "Style"), r;
  74004. return e === "line" ? (r = n.getLineStyle(), r.fill = null) : e === "shadow" && (r = n.getAreaStyle(), r.stroke = null), r;
  74005. }
  74006. function Are(t, e, n, r, i) {
  74007. var a = n.get("value"), o = Ere(a, e.axis, e.ecModel, n.get("seriesDataIndices"), {
  74008. precision: n.get(["label", "precision"]),
  74009. formatter: n.get(["label", "formatter"])
  74010. }), s = n.getModel("label"), l = Bf(s.get("padding") || 0), u = s.getFont(), c = k0(o, u), f = i.position, d = c.width + l[1] + l[3], h = c.height + l[0] + l[2], p = i.align;
  74011. p === "right" && (f[0] -= d), p === "center" && (f[0] -= d / 2);
  74012. var v = i.verticalAlign;
  74013. v === "bottom" && (f[1] -= h), v === "middle" && (f[1] -= h / 2), fQe(f, d, h, r);
  74014. var g = s.get("backgroundColor");
  74015. (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
  74016. // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
  74017. x: f[0],
  74018. y: f[1],
  74019. style: Zt(s, {
  74020. text: o,
  74021. font: u,
  74022. fill: s.getTextColor(),
  74023. padding: l,
  74024. backgroundColor: g
  74025. }),
  74026. // Label should be over axisPointer.
  74027. z2: 10
  74028. };
  74029. }
  74030. function fQe(t, e, n, r) {
  74031. var i = r.getWidth(), a = r.getHeight();
  74032. t[0] = Math.min(t[0] + e, i) - e, t[1] = Math.min(t[1] + n, a) - n, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0);
  74033. }
  74034. function Ere(t, e, n, r, i) {
  74035. t = e.scale.parse(t);
  74036. var a = e.scale.getLabel({
  74037. value: t
  74038. }, {
  74039. // If `precision` is set, width can be fixed (like '12.00500'), which
  74040. // helps to debounce when when moving label.
  74041. precision: i.precision
  74042. }), o = i.formatter;
  74043. if (o) {
  74044. var s = {
  74045. value: Pk(e, {
  74046. value: t
  74047. }),
  74048. axisDimension: e.dim,
  74049. axisIndex: e.index,
  74050. seriesData: []
  74051. };
  74052. k(r, function(l) {
  74053. var u = n.getSeriesByIndex(l.seriesIndex), c = l.dataIndexInside, f = u && u.getDataParams(c);
  74054. f && s.seriesData.push(f);
  74055. }), Oe(o) ? a = o.replace("{value}", a) : Me(o) && (a = o(s));
  74056. }
  74057. return a;
  74058. }
  74059. function gL(t, e, n) {
  74060. var r = Si();
  74061. return Cu(r, r, n.rotation), ao(r, r, n.position), to([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], r);
  74062. }
  74063. function Mre(t, e, n, r, i, a) {
  74064. var o = Kr.innerTextLayout(n.rotation, 0, n.labelDirection);
  74065. n.labelMargin = i.get(["label", "margin"]), Are(e, r, i, a, {
  74066. position: gL(r.axis, t, n),
  74067. align: o.textAlign,
  74068. verticalAlign: o.textVerticalAlign
  74069. });
  74070. }
  74071. function mL(t, e, n) {
  74072. return n = n || 0, {
  74073. x1: t[n],
  74074. y1: t[1 - n],
  74075. x2: e[n],
  74076. y2: e[1 - n]
  74077. };
  74078. }
  74079. function Ire(t, e, n) {
  74080. return n = n || 0, {
  74081. x: t[n],
  74082. y: t[1 - n],
  74083. width: e[n],
  74084. height: e[1 - n]
  74085. };
  74086. }
  74087. function YW(t, e, n, r, i, a) {
  74088. return {
  74089. cx: t,
  74090. cy: e,
  74091. r0: n,
  74092. r,
  74093. startAngle: i,
  74094. endAngle: a,
  74095. clockwise: !0
  74096. };
  74097. }
  74098. var dQe = (
  74099. /** @class */
  74100. function(t) {
  74101. q(e, t);
  74102. function e() {
  74103. return t !== null && t.apply(this, arguments) || this;
  74104. }
  74105. return e.prototype.makeElOption = function(n, r, i, a, o) {
  74106. var s = i.axis, l = s.grid, u = a.get("type"), c = qW(l, s).getOtherAxis(s).getGlobalExtent(), f = s.toGlobalCoord(s.dataToCoord(r, !0));
  74107. if (u && u !== "none") {
  74108. var d = vL(a), h = hQe[u](s, f, c);
  74109. h.style = d, n.graphicKey = h.type, n.pointer = h;
  74110. }
  74111. var p = fE(l.model, i);
  74112. Mre(
  74113. // @ts-ignore
  74114. r,
  74115. n,
  74116. p,
  74117. i,
  74118. a,
  74119. o
  74120. );
  74121. }, e.prototype.getHandleTransform = function(n, r, i) {
  74122. var a = fE(r.axis.grid.model, r, {
  74123. labelInside: !1
  74124. });
  74125. a.labelMargin = i.get(["handle", "margin"]);
  74126. var o = gL(r.axis, n, a);
  74127. return {
  74128. x: o[0],
  74129. y: o[1],
  74130. rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
  74131. };
  74132. }, e.prototype.updateHandleTransform = function(n, r, i, a) {
  74133. var o = i.axis, s = o.grid, l = o.getGlobalExtent(!0), u = qW(s, o).getOtherAxis(o).getGlobalExtent(), c = o.dim === "x" ? 0 : 1, f = [n.x, n.y];
  74134. f[c] += r[c], f[c] = Math.min(l[1], f[c]), f[c] = Math.max(l[0], f[c]);
  74135. var d = (u[1] + u[0]) / 2, h = [d, d];
  74136. h[c] = f[c];
  74137. var p = [{
  74138. verticalAlign: "middle"
  74139. }, {
  74140. align: "center"
  74141. }];
  74142. return {
  74143. x: f[0],
  74144. y: f[1],
  74145. rotation: n.rotation,
  74146. cursorPoint: h,
  74147. tooltipOption: p[c]
  74148. };
  74149. }, e;
  74150. }(pL)
  74151. );
  74152. function qW(t, e) {
  74153. var n = {};
  74154. return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n);
  74155. }
  74156. var hQe = {
  74157. line: function(t, e, n) {
  74158. var r = mL([e, n[0]], [e, n[1]], KW(t));
  74159. return {
  74160. type: "Line",
  74161. subPixelOptimize: !0,
  74162. shape: r
  74163. };
  74164. },
  74165. shadow: function(t, e, n) {
  74166. var r = Math.max(1, t.getBandWidth()), i = n[1] - n[0];
  74167. return {
  74168. type: "Rect",
  74169. shape: Ire([e - r / 2, n[0]], [r, i], KW(t))
  74170. };
  74171. }
  74172. };
  74173. function KW(t) {
  74174. return t.dim === "x" ? 0 : 1;
  74175. }
  74176. var pQe = (
  74177. /** @class */
  74178. function(t) {
  74179. q(e, t);
  74180. function e() {
  74181. var n = t !== null && t.apply(this, arguments) || this;
  74182. return n.type = e.type, n;
  74183. }
  74184. return e.type = "axisPointer", e.defaultOption = {
  74185. // 'auto' means that show when triggered by tooltip or handle.
  74186. show: "auto",
  74187. // zlevel: 0,
  74188. z: 50,
  74189. type: "line",
  74190. // axispointer triggered by tootip determine snap automatically,
  74191. // see `modelHelper`.
  74192. snap: !1,
  74193. triggerTooltip: !0,
  74194. triggerEmphasis: !0,
  74195. value: null,
  74196. status: null,
  74197. link: [],
  74198. // Do not set 'auto' here, otherwise global animation: false
  74199. // will not effect at this axispointer.
  74200. animation: null,
  74201. animationDurationUpdate: 200,
  74202. lineStyle: {
  74203. color: "#B9BEC9",
  74204. width: 1,
  74205. type: "dashed"
  74206. },
  74207. shadowStyle: {
  74208. color: "rgba(210,219,238,0.2)"
  74209. },
  74210. label: {
  74211. show: !0,
  74212. formatter: null,
  74213. precision: "auto",
  74214. margin: 3,
  74215. color: "#fff",
  74216. padding: [5, 7, 5, 7],
  74217. backgroundColor: "auto",
  74218. borderColor: null,
  74219. borderWidth: 0,
  74220. borderRadius: 3
  74221. },
  74222. handle: {
  74223. show: !1,
  74224. // eslint-disable-next-line
  74225. icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
  74226. size: 45,
  74227. // handle margin is from symbol center to axis, which is stable when circular move.
  74228. margin: 50,
  74229. // color: '#1b8bbd'
  74230. // color: '#2f4554'
  74231. color: "#333",
  74232. shadowBlur: 3,
  74233. shadowColor: "#aaa",
  74234. shadowOffsetX: 0,
  74235. shadowOffsetY: 2,
  74236. // For mobile performance
  74237. throttle: 40
  74238. }
  74239. }, e;
  74240. }(rt)
  74241. ), Es = bt(), vQe = k;
  74242. function Dre(t, e, n) {
  74243. if (!vt.node) {
  74244. var r = e.getZr();
  74245. Es(r).records || (Es(r).records = {}), gQe(r, e);
  74246. var i = Es(r).records[t] || (Es(r).records[t] = {});
  74247. i.handler = n;
  74248. }
  74249. }
  74250. function gQe(t, e) {
  74251. if (Es(t).initialized)
  74252. return;
  74253. Es(t).initialized = !0, n("click", Ue(JW, "click")), n("mousemove", Ue(JW, "mousemove")), n("globalout", yQe);
  74254. function n(r, i) {
  74255. t.on(r, function(a) {
  74256. var o = bQe(e);
  74257. vQe(Es(t).records, function(s) {
  74258. s && i(s, a, o.dispatchAction);
  74259. }), mQe(o.pendings, e);
  74260. });
  74261. }
  74262. }
  74263. function mQe(t, e) {
  74264. var n = t.showTip.length, r = t.hideTip.length, i;
  74265. n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
  74266. }
  74267. function yQe(t, e, n) {
  74268. t.handler("leave", null, n);
  74269. }
  74270. function JW(t, e, n, r) {
  74271. e.handler(t, n, r);
  74272. }
  74273. function bQe(t) {
  74274. var e = {
  74275. showTip: [],
  74276. hideTip: []
  74277. }, n = function(r) {
  74278. var i = e[r.type];
  74279. i ? i.push(r) : (r.dispatchAction = n, t.dispatchAction(r));
  74280. };
  74281. return {
  74282. dispatchAction: n,
  74283. pendings: e
  74284. };
  74285. }
  74286. function EE(t, e) {
  74287. if (!vt.node) {
  74288. var n = e.getZr(), r = (Es(n).records || {})[t];
  74289. r && (Es(n).records[t] = null);
  74290. }
  74291. }
  74292. var _Qe = (
  74293. /** @class */
  74294. function(t) {
  74295. q(e, t);
  74296. function e() {
  74297. var n = t !== null && t.apply(this, arguments) || this;
  74298. return n.type = e.type, n;
  74299. }
  74300. return e.prototype.render = function(n, r, i) {
  74301. var a = r.getComponent("tooltip"), o = n.get("triggerOn") || a && a.get("triggerOn") || "mousemove|click";
  74302. Dre("axisPointer", i, function(s, l, u) {
  74303. o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && u({
  74304. type: "updateAxisPointer",
  74305. currTrigger: s,
  74306. x: l && l.offsetX,
  74307. y: l && l.offsetY
  74308. });
  74309. });
  74310. }, e.prototype.remove = function(n, r) {
  74311. EE("axisPointer", r);
  74312. }, e.prototype.dispose = function(n, r) {
  74313. EE("axisPointer", r);
  74314. }, e.type = "axisPointer", e;
  74315. }(Xt)
  74316. );
  74317. function Rre(t, e) {
  74318. var n = [], r = t.seriesIndex, i;
  74319. if (r == null || !(i = e.getSeriesByIndex(r)))
  74320. return {
  74321. point: []
  74322. };
  74323. var a = i.getData(), o = mf(a, t);
  74324. if (o == null || o < 0 || ue(o))
  74325. return {
  74326. point: []
  74327. };
  74328. var s = a.getItemGraphicEl(o), l = i.coordinateSystem;
  74329. if (i.getTooltipPosition)
  74330. n = i.getTooltipPosition(o) || [];
  74331. else if (l && l.dataToPoint)
  74332. if (t.isStacked) {
  74333. var u = l.getBaseAxis(), c = l.getOtherAxis(u), f = c.dim, d = u.dim, h = f === "x" || f === "radius" ? 1 : 0, p = a.mapDimension(d), v = [];
  74334. v[h] = a.get(p, o), v[1 - h] = a.get(a.getCalculationInfo("stackResultDimension"), o), n = l.dataToPoint(v) || [];
  74335. } else
  74336. n = l.dataToPoint(a.getValues(ce(l.dimensions, function(m) {
  74337. return a.mapDimension(m);
  74338. }), o)) || [];
  74339. else if (s) {
  74340. var g = s.getBoundingRect().clone();
  74341. g.applyTransform(s.transform), n = [g.x + g.width / 2, g.y + g.height / 2];
  74342. }
  74343. return {
  74344. point: n,
  74345. el: s
  74346. };
  74347. }
  74348. var e7 = bt();
  74349. function OQe(t, e, n) {
  74350. var r = t.currTrigger, i = [t.x, t.y], a = t, o = t.dispatchAction || xe(n.dispatchAction, n), s = e.getComponent("axisPointer").coordSysAxesInfo;
  74351. if (s) {
  74352. X_(i) && (i = Rre({
  74353. seriesIndex: a.seriesIndex,
  74354. // Do not use dataIndexInside from other ec instance.
  74355. // FIXME: auto detect it?
  74356. dataIndex: a.dataIndex
  74357. }, e).point);
  74358. var l = X_(i), u = a.axesInfo, c = s.axesInfo, f = r === "leave" || X_(i), d = {}, h = {}, p = {
  74359. list: [],
  74360. map: {}
  74361. }, v = {
  74362. showPointer: Ue(xQe, h),
  74363. showTooltip: Ue(wQe, p)
  74364. };
  74365. k(s.coordSysMap, function(m, y) {
  74366. var b = l || m.containPoint(i);
  74367. k(s.coordSysAxesInfo[y], function(_, O) {
  74368. var S = _.axis, x = $Qe(u, _);
  74369. if (!f && b && (!u || x)) {
  74370. var C = x && x.value;
  74371. C == null && !l && (C = S.pointToData(i)), C != null && t7(_, C, v, !1, d);
  74372. }
  74373. });
  74374. });
  74375. var g = {};
  74376. return k(c, function(m, y) {
  74377. var b = m.linkGroup;
  74378. b && !h[y] && k(b.axesInfo, function(_, O) {
  74379. var S = h[O];
  74380. if (_ !== m && S) {
  74381. var x = S.value;
  74382. b.mapper && (x = m.axis.scale.parse(b.mapper(x, n7(_), n7(m)))), g[m.key] = x;
  74383. }
  74384. });
  74385. }), k(g, function(m, y) {
  74386. t7(c[y], m, v, !0, d);
  74387. }), CQe(h, c, d), TQe(p, i, t, o), PQe(c, o, n), d;
  74388. }
  74389. }
  74390. function t7(t, e, n, r, i) {
  74391. var a = t.axis;
  74392. if (!(a.scale.isBlank() || !a.containData(e))) {
  74393. if (!t.involveSeries) {
  74394. n.showPointer(t, e);
  74395. return;
  74396. }
  74397. var o = SQe(e, t), s = o.payloadBatch, l = o.snapToValue;
  74398. s[0] && i.seriesIndex == null && le(i, s[0]), !r && t.snap && a.containData(l) && l != null && (e = l), n.showPointer(t, e, s), n.showTooltip(t, o, l);
  74399. }
  74400. }
  74401. function SQe(t, e) {
  74402. var n = e.axis, r = n.dim, i = t, a = [], o = Number.MAX_VALUE, s = -1;
  74403. return k(e.seriesModels, function(l, u) {
  74404. var c = l.getData().mapDimensionsAll(r), f, d;
  74405. if (l.getAxisTooltipData) {
  74406. var h = l.getAxisTooltipData(c, t, n);
  74407. d = h.dataIndices, f = h.nestestValue;
  74408. } else {
  74409. if (d = l.getData().indicesOfNearest(
  74410. c[0],
  74411. t,
  74412. // Add a threshold to avoid find the wrong dataIndex
  74413. // when data length is not same.
  74414. // false,
  74415. n.type === "category" ? 0.5 : null
  74416. ), !d.length)
  74417. return;
  74418. f = l.getData().get(c[0], d[0]);
  74419. }
  74420. if (!(f == null || !isFinite(f))) {
  74421. var p = t - f, v = Math.abs(p);
  74422. v <= o && ((v < o || p >= 0 && s < 0) && (o = v, s = p, i = f, a.length = 0), k(d, function(g) {
  74423. a.push({
  74424. seriesIndex: l.seriesIndex,
  74425. dataIndexInside: g,
  74426. dataIndex: l.getData().getRawIndex(g)
  74427. });
  74428. }));
  74429. }
  74430. }), {
  74431. payloadBatch: a,
  74432. snapToValue: i
  74433. };
  74434. }
  74435. function xQe(t, e, n, r) {
  74436. t[e.key] = {
  74437. value: n,
  74438. payloadBatch: r
  74439. };
  74440. }
  74441. function wQe(t, e, n, r) {
  74442. var i = n.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel;
  74443. if (!(!e.triggerTooltip || !i.length)) {
  74444. var l = e.coordSys.model, u = km(l), c = t.map[u];
  74445. c || (c = t.map[u] = {
  74446. coordSysId: l.id,
  74447. coordSysIndex: l.componentIndex,
  74448. coordSysType: l.type,
  74449. coordSysMainType: l.mainType,
  74450. dataByAxis: []
  74451. }, t.list.push(c)), c.dataByAxis.push({
  74452. axisDim: a.dim,
  74453. axisIndex: o.componentIndex,
  74454. axisType: o.type,
  74455. axisId: o.id,
  74456. value: r,
  74457. // Caustion: viewHelper.getValueLabel is actually on "view stage", which
  74458. // depends that all models have been updated. So it should not be performed
  74459. // here. Considering axisPointerModel used here is volatile, which is hard
  74460. // to be retrieve in TooltipView, we prepare parameters here.
  74461. valueLabelOpt: {
  74462. precision: s.get(["label", "precision"]),
  74463. formatter: s.get(["label", "formatter"])
  74464. },
  74465. seriesDataIndices: i.slice()
  74466. });
  74467. }
  74468. }
  74469. function CQe(t, e, n) {
  74470. var r = n.axesInfo = [];
  74471. k(e, function(i, a) {
  74472. var o = i.axisPointerModel.option, s = t[a];
  74473. s ? (!i.useHandle && (o.status = "show"), o.value = s.value, o.seriesDataIndices = (s.payloadBatch || []).slice()) : !i.useHandle && (o.status = "hide"), o.status === "show" && r.push({
  74474. axisDim: i.axis.dim,
  74475. axisIndex: i.axis.model.componentIndex,
  74476. value: o.value
  74477. });
  74478. });
  74479. }
  74480. function TQe(t, e, n, r) {
  74481. if (X_(e) || !t.list.length) {
  74482. r({
  74483. type: "hideTip"
  74484. });
  74485. return;
  74486. }
  74487. var i = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  74488. r({
  74489. type: "showTip",
  74490. escapeConnect: !0,
  74491. x: e[0],
  74492. y: e[1],
  74493. tooltipOption: n.tooltipOption,
  74494. position: n.position,
  74495. dataIndexInside: i.dataIndexInside,
  74496. dataIndex: i.dataIndex,
  74497. seriesIndex: i.seriesIndex,
  74498. dataByCoordSys: t.list
  74499. });
  74500. }
  74501. function PQe(t, e, n) {
  74502. var r = n.getZr(), i = "axisPointerLastHighlights", a = e7(r)[i] || {}, o = e7(r)[i] = {};
  74503. k(t, function(u, c) {
  74504. var f = u.axisPointerModel.option;
  74505. f.status === "show" && u.triggerEmphasis && k(f.seriesDataIndices, function(d) {
  74506. var h = d.seriesIndex + " | " + d.dataIndex;
  74507. o[h] = d;
  74508. });
  74509. });
  74510. var s = [], l = [];
  74511. k(a, function(u, c) {
  74512. !o[c] && l.push(u);
  74513. }), k(o, function(u, c) {
  74514. !a[c] && s.push(u);
  74515. }), l.length && n.dispatchAction({
  74516. type: "downplay",
  74517. escapeConnect: !0,
  74518. // Not blur others when highlight in axisPointer.
  74519. notBlur: !0,
  74520. batch: l
  74521. }), s.length && n.dispatchAction({
  74522. type: "highlight",
  74523. escapeConnect: !0,
  74524. // Not blur others when highlight in axisPointer.
  74525. notBlur: !0,
  74526. batch: s
  74527. });
  74528. }
  74529. function $Qe(t, e) {
  74530. for (var n = 0; n < (t || []).length; n++) {
  74531. var r = t[n];
  74532. if (e.axis.dim === r.axisDim && e.axis.model.componentIndex === r.axisIndex)
  74533. return r;
  74534. }
  74535. }
  74536. function n7(t) {
  74537. var e = t.axis.model, n = {}, r = n.axisDim = t.axis.dim;
  74538. return n.axisIndex = n[r + "AxisIndex"] = e.componentIndex, n.axisName = n[r + "AxisName"] = e.name, n.axisId = n[r + "AxisId"] = e.id, n;
  74539. }
  74540. function X_(t) {
  74541. return !t || t[0] == null || isNaN(t[0]) || t[1] == null || isNaN(t[1]);
  74542. }
  74543. function ey(t) {
  74544. Wf.registerAxisPointerClass("CartesianAxisPointer", dQe), t.registerComponentModel(pQe), t.registerComponentView(_Qe), t.registerPreprocessor(function(e) {
  74545. if (e) {
  74546. (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
  74547. var n = e.axisPointer.link;
  74548. n && !ue(n) && (e.axisPointer.link = [n]);
  74549. }
  74550. }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, function(e, n) {
  74551. e.getComponent("axisPointer").coordSysAxesInfo = z6e(e, n);
  74552. }), t.registerAction({
  74553. type: "updateAxisPointer",
  74554. event: "updateAxisPointer",
  74555. update: ":updateAxisPointer"
  74556. }, OQe);
  74557. }
  74558. function AQe(t) {
  74559. at(one), at(ey);
  74560. }
  74561. var EQe = (
  74562. /** @class */
  74563. function(t) {
  74564. q(e, t);
  74565. function e() {
  74566. return t !== null && t.apply(this, arguments) || this;
  74567. }
  74568. return e.prototype.makeElOption = function(n, r, i, a, o) {
  74569. var s = i.axis;
  74570. s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
  74571. var l = s.polar, u = l.getOtherAxis(s), c = u.getExtent(), f = s.dataToCoord(r), d = a.get("type");
  74572. if (d && d !== "none") {
  74573. var h = vL(a), p = IQe[d](s, l, f, c);
  74574. p.style = h, n.graphicKey = p.type, n.pointer = p;
  74575. }
  74576. var v = a.get(["label", "margin"]), g = MQe(r, i, a, l, v);
  74577. Are(n, i, a, o, g);
  74578. }, e;
  74579. }(pL)
  74580. );
  74581. function MQe(t, e, n, r, i) {
  74582. var a = e.axis, o = a.dataToCoord(t), s = r.getAngleAxis().getExtent()[0];
  74583. s = s / 180 * Math.PI;
  74584. var l = r.getRadiusAxis().getExtent(), u, c, f;
  74585. if (a.dim === "radius") {
  74586. var d = Si();
  74587. Cu(d, d, s), ao(d, d, [r.cx, r.cy]), u = to([o, -i], d);
  74588. var h = e.getModel("axisLabel").get("rotate") || 0, p = Kr.innerTextLayout(s, h * Math.PI / 180, -1);
  74589. c = p.textAlign, f = p.textVerticalAlign;
  74590. } else {
  74591. var v = l[1];
  74592. u = r.coordToPoint([v + i, o]);
  74593. var g = r.cx, m = r.cy;
  74594. c = Math.abs(u[0] - g) / v < 0.3 ? "center" : u[0] > g ? "left" : "right", f = Math.abs(u[1] - m) / v < 0.3 ? "middle" : u[1] > m ? "top" : "bottom";
  74595. }
  74596. return {
  74597. position: u,
  74598. align: c,
  74599. verticalAlign: f
  74600. };
  74601. }
  74602. var IQe = {
  74603. line: function(t, e, n, r) {
  74604. return t.dim === "angle" ? {
  74605. type: "Line",
  74606. shape: mL(e.coordToPoint([r[0], n]), e.coordToPoint([r[1], n]))
  74607. } : {
  74608. type: "Circle",
  74609. shape: {
  74610. cx: e.cx,
  74611. cy: e.cy,
  74612. r: n
  74613. }
  74614. };
  74615. },
  74616. shadow: function(t, e, n, r) {
  74617. var i = Math.max(1, t.getBandWidth()), a = Math.PI / 180;
  74618. return t.dim === "angle" ? {
  74619. type: "Sector",
  74620. shape: YW(
  74621. e.cx,
  74622. e.cy,
  74623. r[0],
  74624. r[1],
  74625. // In ECharts y is negative if angle is positive
  74626. (-n - i / 2) * a,
  74627. (-n + i / 2) * a
  74628. )
  74629. } : {
  74630. type: "Sector",
  74631. shape: YW(e.cx, e.cy, n - i / 2, n + i / 2, 0, Math.PI * 2)
  74632. };
  74633. }
  74634. }, DQe = (
  74635. /** @class */
  74636. function(t) {
  74637. q(e, t);
  74638. function e() {
  74639. var n = t !== null && t.apply(this, arguments) || this;
  74640. return n.type = e.type, n;
  74641. }
  74642. return e.prototype.findAxisModel = function(n) {
  74643. var r, i = this.ecModel;
  74644. return i.eachComponent(n, function(a) {
  74645. a.getCoordSysModel() === this && (r = a);
  74646. }, this), r;
  74647. }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
  74648. // zlevel: 0,
  74649. z: 0,
  74650. center: ["50%", "50%"],
  74651. radius: "80%"
  74652. }, e;
  74653. }(rt)
  74654. ), yL = (
  74655. /** @class */
  74656. function(t) {
  74657. q(e, t);
  74658. function e() {
  74659. return t !== null && t.apply(this, arguments) || this;
  74660. }
  74661. return e.prototype.getCoordSysModel = function() {
  74662. return this.getReferringComponents("polar", Dn).models[0];
  74663. }, e.type = "polarAxis", e;
  74664. }(rt)
  74665. );
  74666. xn(yL, Tp);
  74667. var RQe = (
  74668. /** @class */
  74669. function(t) {
  74670. q(e, t);
  74671. function e() {
  74672. var n = t !== null && t.apply(this, arguments) || this;
  74673. return n.type = e.type, n;
  74674. }
  74675. return e.type = "angleAxis", e;
  74676. }(yL)
  74677. ), kQe = (
  74678. /** @class */
  74679. function(t) {
  74680. q(e, t);
  74681. function e() {
  74682. var n = t !== null && t.apply(this, arguments) || this;
  74683. return n.type = e.type, n;
  74684. }
  74685. return e.type = "radiusAxis", e;
  74686. }(yL)
  74687. ), bL = (
  74688. /** @class */
  74689. function(t) {
  74690. q(e, t);
  74691. function e(n, r) {
  74692. return t.call(this, "radius", n, r) || this;
  74693. }
  74694. return e.prototype.pointToData = function(n, r) {
  74695. return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
  74696. }, e;
  74697. }(Ba)
  74698. );
  74699. bL.prototype.dataToRadius = Ba.prototype.dataToCoord;
  74700. bL.prototype.radiusToData = Ba.prototype.coordToData;
  74701. var LQe = bt(), _L = (
  74702. /** @class */
  74703. function(t) {
  74704. q(e, t);
  74705. function e(n, r) {
  74706. return t.call(this, "angle", n, r || [0, 360]) || this;
  74707. }
  74708. return e.prototype.pointToData = function(n, r) {
  74709. return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
  74710. }, e.prototype.calculateCategoryInterval = function() {
  74711. var n = this, r = n.getLabelModel(), i = n.scale, a = i.getExtent(), o = i.count();
  74712. if (a[1] - a[0] < 1)
  74713. return 0;
  74714. var s = a[0], l = n.dataToCoord(s + 1) - n.dataToCoord(s), u = Math.abs(l), c = k0(s == null ? "" : s + "", r.getFont(), "center", "top"), f = Math.max(c.height, 7), d = f / u;
  74715. isNaN(d) && (d = 1 / 0);
  74716. var h = Math.max(0, Math.floor(d)), p = LQe(n.model), v = p.lastAutoInterval, g = p.lastTickCount;
  74717. return v != null && g != null && Math.abs(v - h) <= 1 && Math.abs(g - o) <= 1 && v > h ? h = v : (p.lastTickCount = o, p.lastAutoInterval = h), h;
  74718. }, e;
  74719. }(Ba)
  74720. );
  74721. _L.prototype.dataToAngle = Ba.prototype.dataToCoord;
  74722. _L.prototype.angleToData = Ba.prototype.coordToData;
  74723. var kre = ["radius", "angle"], NQe = (
  74724. /** @class */
  74725. function() {
  74726. function t(e) {
  74727. this.dimensions = kre, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new bL(), this._angleAxis = new _L(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
  74728. }
  74729. return t.prototype.containPoint = function(e) {
  74730. var n = this.pointToCoord(e);
  74731. return this._radiusAxis.contain(n[0]) && this._angleAxis.contain(n[1]);
  74732. }, t.prototype.containData = function(e) {
  74733. return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
  74734. }, t.prototype.getAxis = function(e) {
  74735. var n = "_" + e + "Axis";
  74736. return this[n];
  74737. }, t.prototype.getAxes = function() {
  74738. return [this._radiusAxis, this._angleAxis];
  74739. }, t.prototype.getAxesByScale = function(e) {
  74740. var n = [], r = this._angleAxis, i = this._radiusAxis;
  74741. return r.scale.type === e && n.push(r), i.scale.type === e && n.push(i), n;
  74742. }, t.prototype.getAngleAxis = function() {
  74743. return this._angleAxis;
  74744. }, t.prototype.getRadiusAxis = function() {
  74745. return this._radiusAxis;
  74746. }, t.prototype.getOtherAxis = function(e) {
  74747. var n = this._angleAxis;
  74748. return e === n ? this._radiusAxis : n;
  74749. }, t.prototype.getBaseAxis = function() {
  74750. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
  74751. }, t.prototype.getTooltipAxes = function(e) {
  74752. var n = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
  74753. return {
  74754. baseAxes: [n],
  74755. otherAxes: [this.getOtherAxis(n)]
  74756. };
  74757. }, t.prototype.dataToPoint = function(e, n) {
  74758. return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], n), this._angleAxis.dataToAngle(e[1], n)]);
  74759. }, t.prototype.pointToData = function(e, n) {
  74760. var r = this.pointToCoord(e);
  74761. return [this._radiusAxis.radiusToData(r[0], n), this._angleAxis.angleToData(r[1], n)];
  74762. }, t.prototype.pointToCoord = function(e) {
  74763. var n = e[0] - this.cx, r = e[1] - this.cy, i = this.getAngleAxis(), a = i.getExtent(), o = Math.min(a[0], a[1]), s = Math.max(a[0], a[1]);
  74764. i.inverse ? o = s - 360 : s = o + 360;
  74765. var l = Math.sqrt(n * n + r * r);
  74766. n /= l, r /= l;
  74767. for (var u = Math.atan2(-r, n) / Math.PI * 180, c = u < o ? 1 : -1; u < o || u > s; )
  74768. u += c * 360;
  74769. return [l, u];
  74770. }, t.prototype.coordToPoint = function(e) {
  74771. var n = e[0], r = e[1] / 180 * Math.PI, i = Math.cos(r) * n + this.cx, a = -Math.sin(r) * n + this.cy;
  74772. return [i, a];
  74773. }, t.prototype.getArea = function() {
  74774. var e = this.getAngleAxis(), n = this.getRadiusAxis(), r = n.getExtent().slice();
  74775. r[0] > r[1] && r.reverse();
  74776. var i = e.getExtent(), a = Math.PI / 180;
  74777. return {
  74778. cx: this.cx,
  74779. cy: this.cy,
  74780. r0: r[0],
  74781. r: r[1],
  74782. startAngle: -i[0] * a,
  74783. endAngle: -i[1] * a,
  74784. clockwise: e.inverse,
  74785. contain: function(o, s) {
  74786. var l = o - this.cx, u = s - this.cy, c = l * l + u * u - 1e-4, f = this.r, d = this.r0;
  74787. return c <= f * f && c >= d * d;
  74788. }
  74789. };
  74790. }, t.prototype.convertToPixel = function(e, n, r) {
  74791. var i = r7(n);
  74792. return i === this ? this.dataToPoint(r) : null;
  74793. }, t.prototype.convertFromPixel = function(e, n, r) {
  74794. var i = r7(n);
  74795. return i === this ? this.pointToData(r) : null;
  74796. }, t;
  74797. }()
  74798. );
  74799. function r7(t) {
  74800. var e = t.seriesModel, n = t.polarModel;
  74801. return n && n.coordinateSystem || e && e.coordinateSystem;
  74802. }
  74803. const BQe = NQe;
  74804. function zQe(t, e, n) {
  74805. var r = e.get("center"), i = n.getWidth(), a = n.getHeight();
  74806. t.cx = _e(r[0], i), t.cy = _e(r[1], a);
  74807. var o = t.getRadiusAxis(), s = Math.min(i, a) / 2, l = e.get("radius");
  74808. l == null ? l = [0, "100%"] : ue(l) || (l = [0, l]);
  74809. var u = [_e(l[0], s), _e(l[1], s)];
  74810. o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
  74811. }
  74812. function VQe(t, e) {
  74813. var n = this, r = n.getAngleAxis(), i = n.getRadiusAxis();
  74814. if (r.scale.setExtent(1 / 0, -1 / 0), i.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function(s) {
  74815. if (s.coordinateSystem === n) {
  74816. var l = s.getData();
  74817. k(CO(l, "radius"), function(u) {
  74818. i.scale.unionExtentFromData(l, u);
  74819. }), k(CO(l, "angle"), function(u) {
  74820. r.scale.unionExtentFromData(l, u);
  74821. });
  74822. }
  74823. }), Of(r.scale, r.model), Of(i.scale, i.model), r.type === "category" && !r.onBand) {
  74824. var a = r.getExtent(), o = 360 / r.scale.count();
  74825. r.inverse ? a[1] += o : a[1] -= o, r.setExtent(a[0], a[1]);
  74826. }
  74827. }
  74828. function FQe(t) {
  74829. return t.mainType === "angleAxis";
  74830. }
  74831. function i7(t, e) {
  74832. var n;
  74833. if (t.type = e.get("type"), t.scale = G0(e), t.onBand = e.get("boundaryGap") && t.type === "category", t.inverse = e.get("inverse"), FQe(e)) {
  74834. t.inverse = t.inverse !== e.get("clockwise");
  74835. var r = e.get("startAngle"), i = (n = e.get("endAngle")) !== null && n !== void 0 ? n : r + (t.inverse ? -360 : 360);
  74836. t.setExtent(r, i);
  74837. }
  74838. e.axis = t, t.model = e;
  74839. }
  74840. var WQe = {
  74841. dimensions: kre,
  74842. create: function(t, e) {
  74843. var n = [];
  74844. return t.eachComponent("polar", function(r, i) {
  74845. var a = new BQe(i + "");
  74846. a.update = VQe;
  74847. var o = a.getRadiusAxis(), s = a.getAngleAxis(), l = r.findAxisModel("radiusAxis"), u = r.findAxisModel("angleAxis");
  74848. i7(o, l), i7(s, u), zQe(a, r, e), n.push(a), r.coordinateSystem = a, a.model = r;
  74849. }), t.eachSeries(function(r) {
  74850. if (r.get("coordinateSystem") === "polar") {
  74851. var i = r.getReferringComponents("polar", Dn).models[0];
  74852. if (process.env.NODE_ENV !== "production" && !i)
  74853. throw new Error('Polar "' + Tn(r.get("polarIndex"), r.get("polarId"), 0) + '" not found');
  74854. r.coordinateSystem = i.coordinateSystem;
  74855. }
  74856. }), n;
  74857. }
  74858. }, QQe = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
  74859. function Ib(t, e, n) {
  74860. e[1] > e[0] && (e = e.slice().reverse());
  74861. var r = t.coordToPoint([e[0], n]), i = t.coordToPoint([e[1], n]);
  74862. return {
  74863. x1: r[0],
  74864. y1: r[1],
  74865. x2: i[0],
  74866. y2: i[1]
  74867. };
  74868. }
  74869. function Db(t) {
  74870. var e = t.getRadiusAxis();
  74871. return e.inverse ? 0 : 1;
  74872. }
  74873. function a7(t) {
  74874. var e = t[0], n = t[t.length - 1];
  74875. e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop();
  74876. }
  74877. var HQe = (
  74878. /** @class */
  74879. function(t) {
  74880. q(e, t);
  74881. function e() {
  74882. var n = t !== null && t.apply(this, arguments) || this;
  74883. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
  74884. }
  74885. return e.prototype.render = function(n, r) {
  74886. if (this.group.removeAll(), !!n.get("show")) {
  74887. var i = n.axis, a = i.polar, o = a.getRadiusAxis().getExtent(), s = i.getTicksCoords(), l = i.getMinorTicksCoords(), u = ce(i.getViewLabels(), function(c) {
  74888. c = Le(c);
  74889. var f = i.scale, d = f.type === "ordinal" ? f.getRawOrdinalNumber(c.tickValue) : c.tickValue;
  74890. return c.coord = i.dataToCoord(d), c;
  74891. });
  74892. a7(u), a7(s), k(QQe, function(c) {
  74893. n.get([c, "show"]) && (!i.scale.isBlank() || c === "axisLine") && GQe[c](this.group, n, a, s, l, o, u);
  74894. }, this);
  74895. }
  74896. }, e.type = "angleAxis", e;
  74897. }(Wf)
  74898. ), GQe = {
  74899. axisLine: function(t, e, n, r, i, a) {
  74900. var o = e.getModel(["axisLine", "lineStyle"]), s = n.getAngleAxis(), l = Math.PI / 180, u = s.getExtent(), c = Db(n), f = c ? 0 : 1, d, h = Math.abs(u[1] - u[0]) === 360 ? "Circle" : "Arc";
  74901. a[f] === 0 ? d = new Lf[h]({
  74902. shape: {
  74903. cx: n.cx,
  74904. cy: n.cy,
  74905. r: a[c],
  74906. startAngle: -u[0] * l,
  74907. endAngle: -u[1] * l,
  74908. clockwise: s.inverse
  74909. },
  74910. style: o.getLineStyle(),
  74911. z2: 1,
  74912. silent: !0
  74913. }) : d = new z0({
  74914. shape: {
  74915. cx: n.cx,
  74916. cy: n.cy,
  74917. r: a[c],
  74918. r0: a[f]
  74919. },
  74920. style: o.getLineStyle(),
  74921. z2: 1,
  74922. silent: !0
  74923. }), d.style.fill = null, t.add(d);
  74924. },
  74925. axisTick: function(t, e, n, r, i, a) {
  74926. var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = a[Db(n)], u = ce(r, function(c) {
  74927. return new Un({
  74928. shape: Ib(n, [l, l + s], c.coord)
  74929. });
  74930. });
  74931. t.add(Li(u, {
  74932. style: Re(o.getModel("lineStyle").getLineStyle(), {
  74933. stroke: e.get(["axisLine", "lineStyle", "color"])
  74934. })
  74935. }));
  74936. },
  74937. minorTick: function(t, e, n, r, i, a) {
  74938. if (i.length) {
  74939. for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = a[Db(n)], c = [], f = 0; f < i.length; f++)
  74940. for (var d = 0; d < i[f].length; d++)
  74941. c.push(new Un({
  74942. shape: Ib(n, [u, u + l], i[f][d].coord)
  74943. }));
  74944. t.add(Li(c, {
  74945. style: Re(s.getModel("lineStyle").getLineStyle(), Re(o.getLineStyle(), {
  74946. stroke: e.get(["axisLine", "lineStyle", "color"])
  74947. }))
  74948. }));
  74949. }
  74950. },
  74951. axisLabel: function(t, e, n, r, i, a, o) {
  74952. var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), c = e.get("triggerEvent");
  74953. k(o, function(f, d) {
  74954. var h = l, p = f.tickValue, v = a[Db(n)], g = n.coordToPoint([v + u, f.coord]), m = n.cx, y = n.cy, b = Math.abs(g[0] - m) / v < 0.3 ? "center" : g[0] > m ? "left" : "right", _ = Math.abs(g[1] - y) / v < 0.3 ? "middle" : g[1] > y ? "top" : "bottom";
  74955. if (s && s[p]) {
  74956. var O = s[p];
  74957. Ie(O) && O.textStyle && (h = new Wt(O.textStyle, l, l.ecModel));
  74958. }
  74959. var S = new gt({
  74960. silent: Kr.isLabelSilent(e),
  74961. style: Zt(h, {
  74962. x: g[0],
  74963. y: g[1],
  74964. fill: h.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
  74965. text: f.formattedLabel,
  74966. align: b,
  74967. verticalAlign: _
  74968. })
  74969. });
  74970. if (t.add(S), c) {
  74971. var x = Kr.makeAxisEventDataBase(e);
  74972. x.targetType = "axisLabel", x.value = f.rawLabel, Fe(S).eventData = x;
  74973. }
  74974. }, this);
  74975. },
  74976. splitLine: function(t, e, n, r, i, a) {
  74977. var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
  74978. l = l instanceof Array ? l : [l];
  74979. for (var c = [], f = 0; f < r.length; f++) {
  74980. var d = u++ % l.length;
  74981. c[d] = c[d] || [], c[d].push(new Un({
  74982. shape: Ib(n, a, r[f].coord)
  74983. }));
  74984. }
  74985. for (var f = 0; f < c.length; f++)
  74986. t.add(Li(c[f], {
  74987. style: Re({
  74988. stroke: l[f % l.length]
  74989. }, s.getLineStyle()),
  74990. silent: !0,
  74991. z: e.get("z")
  74992. }));
  74993. },
  74994. minorSplitLine: function(t, e, n, r, i, a) {
  74995. if (i.length) {
  74996. for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < i.length; u++)
  74997. for (var c = 0; c < i[u].length; c++)
  74998. l.push(new Un({
  74999. shape: Ib(n, a, i[u][c].coord)
  75000. }));
  75001. t.add(Li(l, {
  75002. style: s.getLineStyle(),
  75003. silent: !0,
  75004. z: e.get("z")
  75005. }));
  75006. }
  75007. },
  75008. splitArea: function(t, e, n, r, i, a) {
  75009. if (r.length) {
  75010. var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
  75011. l = l instanceof Array ? l : [l];
  75012. for (var c = [], f = Math.PI / 180, d = -r[0].coord * f, h = Math.min(a[0], a[1]), p = Math.max(a[0], a[1]), v = e.get("clockwise"), g = 1, m = r.length; g <= m; g++) {
  75013. var y = g === m ? r[0].coord : r[g].coord, b = u++ % l.length;
  75014. c[b] = c[b] || [], c[b].push(new ri({
  75015. shape: {
  75016. cx: n.cx,
  75017. cy: n.cy,
  75018. r0: h,
  75019. r: p,
  75020. startAngle: d,
  75021. endAngle: -y * f,
  75022. clockwise: v
  75023. },
  75024. silent: !0
  75025. })), d = -y * f;
  75026. }
  75027. for (var g = 0; g < c.length; g++)
  75028. t.add(Li(c[g], {
  75029. style: Re({
  75030. fill: l[g % l.length]
  75031. }, s.getAreaStyle()),
  75032. silent: !0
  75033. }));
  75034. }
  75035. }
  75036. }, jQe = ["axisLine", "axisTickLabel", "axisName"], ZQe = ["splitLine", "splitArea", "minorSplitLine"], UQe = (
  75037. /** @class */
  75038. function(t) {
  75039. q(e, t);
  75040. function e() {
  75041. var n = t !== null && t.apply(this, arguments) || this;
  75042. return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
  75043. }
  75044. return e.prototype.render = function(n, r) {
  75045. if (this.group.removeAll(), !!n.get("show")) {
  75046. var i = this._axisGroup, a = this._axisGroup = new Ve();
  75047. this.group.add(a);
  75048. var o = n.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), c = o.getMinorTicksCoords(), f = l.getExtent()[0], d = o.getExtent(), h = YQe(s, n, f), p = new Kr(n, h);
  75049. k(jQe, p.add, p), a.add(p.getGroup()), W0(i, a, n), k(ZQe, function(v) {
  75050. n.get([v, "show"]) && !o.scale.isBlank() && XQe[v](this.group, n, s, f, d, u, c);
  75051. }, this);
  75052. }
  75053. }, e.type = "radiusAxis", e;
  75054. }(Wf)
  75055. ), XQe = {
  75056. splitLine: function(t, e, n, r, i, a) {
  75057. var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0, c = n.getAngleAxis(), f = Math.PI / 180, d = c.getExtent(), h = Math.abs(d[1] - d[0]) === 360 ? "Circle" : "Arc";
  75058. l = l instanceof Array ? l : [l];
  75059. for (var p = [], v = 0; v < a.length; v++) {
  75060. var g = u++ % l.length;
  75061. p[g] = p[g] || [], p[g].push(new Lf[h]({
  75062. shape: {
  75063. cx: n.cx,
  75064. cy: n.cy,
  75065. // ensure circle radius >= 0
  75066. r: Math.max(a[v].coord, 0),
  75067. startAngle: -d[0] * f,
  75068. endAngle: -d[1] * f,
  75069. clockwise: c.inverse
  75070. }
  75071. }));
  75072. }
  75073. for (var v = 0; v < p.length; v++)
  75074. t.add(Li(p[v], {
  75075. style: Re({
  75076. stroke: l[v % l.length],
  75077. fill: null
  75078. }, s.getLineStyle()),
  75079. silent: !0
  75080. }));
  75081. },
  75082. minorSplitLine: function(t, e, n, r, i, a, o) {
  75083. if (o.length) {
  75084. for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], c = 0; c < o.length; c++)
  75085. for (var f = 0; f < o[c].length; f++)
  75086. u.push(new ll({
  75087. shape: {
  75088. cx: n.cx,
  75089. cy: n.cy,
  75090. r: o[c][f].coord
  75091. }
  75092. }));
  75093. t.add(Li(u, {
  75094. style: Re({
  75095. fill: null
  75096. }, l.getLineStyle()),
  75097. silent: !0
  75098. }));
  75099. }
  75100. },
  75101. splitArea: function(t, e, n, r, i, a) {
  75102. if (a.length) {
  75103. var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
  75104. l = l instanceof Array ? l : [l];
  75105. for (var c = [], f = a[0].coord, d = 1; d < a.length; d++) {
  75106. var h = u++ % l.length;
  75107. c[h] = c[h] || [], c[h].push(new ri({
  75108. shape: {
  75109. cx: n.cx,
  75110. cy: n.cy,
  75111. r0: f,
  75112. r: a[d].coord,
  75113. startAngle: 0,
  75114. endAngle: Math.PI * 2
  75115. },
  75116. silent: !0
  75117. })), f = a[d].coord;
  75118. }
  75119. for (var d = 0; d < c.length; d++)
  75120. t.add(Li(c[d], {
  75121. style: Re({
  75122. fill: l[d % l.length]
  75123. }, s.getAreaStyle()),
  75124. silent: !0
  75125. }));
  75126. }
  75127. }
  75128. };
  75129. function YQe(t, e, n) {
  75130. return {
  75131. position: [t.cx, t.cy],
  75132. rotation: n / 180 * Math.PI,
  75133. labelDirection: -1,
  75134. tickDirection: -1,
  75135. nameDirection: 1,
  75136. labelRotate: e.getModel("axisLabel").get("rotate"),
  75137. // Over splitLine and splitArea
  75138. z2: 1
  75139. };
  75140. }
  75141. function Lre(t) {
  75142. return t.get("stack") || "__ec_stack_" + t.seriesIndex;
  75143. }
  75144. function Nre(t, e) {
  75145. return e.dim + t.model.componentIndex;
  75146. }
  75147. function qQe(t, e, n) {
  75148. var r = {}, i = KQe(Nt(e.getSeriesByType(t), function(a) {
  75149. return !e.isSeriesFiltered(a) && a.coordinateSystem && a.coordinateSystem.type === "polar";
  75150. }));
  75151. e.eachSeriesByType(t, function(a) {
  75152. if (a.coordinateSystem.type === "polar") {
  75153. var o = a.getData(), s = a.coordinateSystem, l = s.getBaseAxis(), u = Nre(s, l), c = Lre(a), f = i[u][c], d = f.offset, h = f.width, p = s.getOtherAxis(l), v = a.coordinateSystem.cx, g = a.coordinateSystem.cy, m = a.get("barMinHeight") || 0, y = a.get("barMinAngle") || 0;
  75154. r[c] = r[c] || [];
  75155. for (var b = o.mapDimension(p.dim), _ = o.mapDimension(l.dim), O = Xs(
  75156. o,
  75157. b
  75158. /* , baseDim */
  75159. ), S = l.dim !== "radius" || !a.get("roundCap", !0), x = p.model, C = x.get("startValue"), T = p.dataToCoord(C || 0), w = 0, P = o.count(); w < P; w++) {
  75160. var $ = o.get(b, w), A = o.get(_, w), D = $ >= 0 ? "p" : "n", E = T;
  75161. O && (r[c][A] || (r[c][A] = {
  75162. p: T,
  75163. n: T
  75164. // Negative stack
  75165. }), E = r[c][A][D]);
  75166. var R = void 0, N = void 0, V = void 0, z = void 0;
  75167. if (p.dim === "radius") {
  75168. var W = p.dataToCoord($) - T, F = l.dataToCoord(A);
  75169. Math.abs(W) < m && (W = (W < 0 ? -1 : 1) * m), R = E, N = E + W, V = F - d, z = V - h, O && (r[c][A][D] = N);
  75170. } else {
  75171. var Q = p.dataToCoord($, S) - T, Z = l.dataToCoord(A);
  75172. Math.abs(Q) < y && (Q = (Q < 0 ? -1 : 1) * y), R = Z + d, N = R + h, V = E, z = E + Q, O && (r[c][A][D] = z);
  75173. }
  75174. o.setItemLayout(w, {
  75175. cx: v,
  75176. cy: g,
  75177. r0: R,
  75178. r: N,
  75179. // Consider that positive angle is anti-clockwise,
  75180. // while positive radian of sector is clockwise
  75181. startAngle: -V * Math.PI / 180,
  75182. endAngle: -z * Math.PI / 180,
  75183. /**
  75184. * Keep the same logic with bar in catesion: use end value to
  75185. * control direction. Notice that if clockwise is true (by
  75186. * default), the sector will always draw clockwisely, no matter
  75187. * whether endAngle is greater or less than startAngle.
  75188. */
  75189. clockwise: V >= z
  75190. });
  75191. }
  75192. }
  75193. });
  75194. }
  75195. function KQe(t) {
  75196. var e = {};
  75197. k(t, function(r, i) {
  75198. var a = r.getData(), o = r.coordinateSystem, s = o.getBaseAxis(), l = Nre(o, s), u = s.getExtent(), c = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / a.count(), f = e[l] || {
  75199. bandWidth: c,
  75200. remainedWidth: c,
  75201. autoWidthCount: 0,
  75202. categoryGap: "20%",
  75203. gap: "30%",
  75204. stacks: {}
  75205. }, d = f.stacks;
  75206. e[l] = f;
  75207. var h = Lre(r);
  75208. d[h] || f.autoWidthCount++, d[h] = d[h] || {
  75209. width: 0,
  75210. maxWidth: 0
  75211. };
  75212. var p = _e(r.get("barWidth"), c), v = _e(r.get("barMaxWidth"), c), g = r.get("barGap"), m = r.get("barCategoryGap");
  75213. p && !d[h].width && (p = Math.min(f.remainedWidth, p), d[h].width = p, f.remainedWidth -= p), v && (d[h].maxWidth = v), g != null && (f.gap = g), m != null && (f.categoryGap = m);
  75214. });
  75215. var n = {};
  75216. return k(e, function(r, i) {
  75217. n[i] = {};
  75218. var a = r.stacks, o = r.bandWidth, s = _e(r.categoryGap, o), l = _e(r.gap, 1), u = r.remainedWidth, c = r.autoWidthCount, f = (u - s) / (c + (c - 1) * l);
  75219. f = Math.max(f, 0), k(a, function(v, g) {
  75220. var m = v.maxWidth;
  75221. m && m < f && (m = Math.min(m, u), v.width && (m = Math.min(m, v.width)), u -= m, v.width = m, c--);
  75222. }), f = (u - s) / (c + (c - 1) * l), f = Math.max(f, 0);
  75223. var d = 0, h;
  75224. k(a, function(v, g) {
  75225. v.width || (v.width = f), h = v, d += v.width * (1 + l);
  75226. }), h && (d -= h.width * l);
  75227. var p = -d / 2;
  75228. k(a, function(v, g) {
  75229. n[i][g] = n[i][g] || {
  75230. offset: p,
  75231. width: v.width
  75232. }, p += v.width * (1 + l);
  75233. });
  75234. }), n;
  75235. }
  75236. var JQe = {
  75237. startAngle: 90,
  75238. clockwise: !0,
  75239. splitNumber: 12,
  75240. axisLabel: {
  75241. rotate: 0
  75242. }
  75243. }, eHe = {
  75244. splitNumber: 5
  75245. }, tHe = (
  75246. /** @class */
  75247. function(t) {
  75248. q(e, t);
  75249. function e() {
  75250. var n = t !== null && t.apply(this, arguments) || this;
  75251. return n.type = e.type, n;
  75252. }
  75253. return e.type = "polar", e;
  75254. }(Xt)
  75255. );
  75256. function nHe(t) {
  75257. at(ey), Wf.registerAxisPointerClass("PolarAxisPointer", EQe), t.registerCoordinateSystem("polar", WQe), t.registerComponentModel(DQe), t.registerComponentView(tHe), Qh(t, "angle", RQe, JQe), Qh(t, "radius", kQe, eHe), t.registerComponentView(HQe), t.registerComponentView(UQe), t.registerLayout(Ue(qQe, "bar"));
  75258. }
  75259. function ME(t, e) {
  75260. e = e || {};
  75261. var n = t.coordinateSystem, r = t.axis, i = {}, a = r.position, o = r.orient, s = n.getRect(), l = [s.x, s.x + s.width, s.y, s.y + s.height], u = {
  75262. horizontal: {
  75263. top: l[2],
  75264. bottom: l[3]
  75265. },
  75266. vertical: {
  75267. left: l[0],
  75268. right: l[1]
  75269. }
  75270. };
  75271. i.position = [o === "vertical" ? u.vertical[a] : l[0], o === "horizontal" ? u.horizontal[a] : l[3]];
  75272. var c = {
  75273. horizontal: 0,
  75274. vertical: 1
  75275. };
  75276. i.rotation = Math.PI / 2 * c[o];
  75277. var f = {
  75278. top: -1,
  75279. bottom: 1,
  75280. right: 1,
  75281. left: -1
  75282. };
  75283. i.labelDirection = i.tickDirection = i.nameDirection = f[a], t.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), Tn(e.labelInside, t.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection);
  75284. var d = e.rotate;
  75285. return d == null && (d = t.get(["axisLabel", "rotate"])), i.labelRotation = a === "top" ? -d : d, i.z2 = 1, i;
  75286. }
  75287. var rHe = ["axisLine", "axisTickLabel", "axisName"], iHe = ["splitArea", "splitLine"], aHe = (
  75288. /** @class */
  75289. function(t) {
  75290. q(e, t);
  75291. function e() {
  75292. var n = t !== null && t.apply(this, arguments) || this;
  75293. return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n;
  75294. }
  75295. return e.prototype.render = function(n, r, i, a) {
  75296. var o = this.group;
  75297. o.removeAll();
  75298. var s = this._axisGroup;
  75299. this._axisGroup = new Ve();
  75300. var l = ME(n), u = new Kr(n, l);
  75301. k(rHe, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), k(iHe, function(c) {
  75302. n.get([c, "show"]) && oHe[c](this, this.group, this._axisGroup, n);
  75303. }, this), W0(s, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
  75304. }, e.prototype.remove = function() {
  75305. rne(this);
  75306. }, e.type = "singleAxis", e;
  75307. }(Wf)
  75308. ), oHe = {
  75309. splitLine: function(t, e, n, r) {
  75310. var i = r.axis;
  75311. if (!i.scale.isBlank()) {
  75312. var a = r.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
  75313. s = s instanceof Array ? s : [s];
  75314. for (var l = o.get("width"), u = r.coordinateSystem.getRect(), c = i.isHorizontal(), f = [], d = 0, h = i.getTicksCoords({
  75315. tickModel: a
  75316. }), p = [], v = [], g = 0; g < h.length; ++g) {
  75317. var m = i.toGlobalCoord(h[g].coord);
  75318. c ? (p[0] = m, p[1] = u.y, v[0] = m, v[1] = u.y + u.height) : (p[0] = u.x, p[1] = m, v[0] = u.x + u.width, v[1] = m);
  75319. var y = new Un({
  75320. shape: {
  75321. x1: p[0],
  75322. y1: p[1],
  75323. x2: v[0],
  75324. y2: v[1]
  75325. },
  75326. silent: !0
  75327. });
  75328. zh(y.shape, l);
  75329. var b = d++ % s.length;
  75330. f[b] = f[b] || [], f[b].push(y);
  75331. }
  75332. for (var _ = o.getLineStyle(["color"]), g = 0; g < f.length; ++g)
  75333. e.add(Li(f[g], {
  75334. style: Re({
  75335. stroke: s[g % s.length]
  75336. }, _),
  75337. silent: !0
  75338. }));
  75339. }
  75340. },
  75341. splitArea: function(t, e, n, r) {
  75342. nne(t, n, r, r);
  75343. }
  75344. }, Y_ = (
  75345. /** @class */
  75346. function(t) {
  75347. q(e, t);
  75348. function e() {
  75349. var n = t !== null && t.apply(this, arguments) || this;
  75350. return n.type = e.type, n;
  75351. }
  75352. return e.prototype.getCoordSysModel = function() {
  75353. return this;
  75354. }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
  75355. left: "5%",
  75356. top: "5%",
  75357. right: "5%",
  75358. bottom: "5%",
  75359. type: "value",
  75360. position: "bottom",
  75361. orient: "horizontal",
  75362. axisLine: {
  75363. show: !0,
  75364. lineStyle: {
  75365. width: 1,
  75366. type: "solid"
  75367. }
  75368. },
  75369. // Single coordinate system and single axis is the,
  75370. // which is used as the parent tooltip model.
  75371. // same model, so we set default tooltip show as true.
  75372. tooltip: {
  75373. show: !0
  75374. },
  75375. axisTick: {
  75376. show: !0,
  75377. length: 6,
  75378. lineStyle: {
  75379. width: 1
  75380. }
  75381. },
  75382. axisLabel: {
  75383. show: !0,
  75384. interval: "auto"
  75385. },
  75386. splitLine: {
  75387. show: !0,
  75388. lineStyle: {
  75389. type: "dashed",
  75390. opacity: 0.2
  75391. }
  75392. }
  75393. }, e;
  75394. }(rt)
  75395. );
  75396. xn(Y_, Tp.prototype);
  75397. var sHe = (
  75398. /** @class */
  75399. function(t) {
  75400. q(e, t);
  75401. function e(n, r, i, a, o) {
  75402. var s = t.call(this, n, r, i) || this;
  75403. return s.type = a || "value", s.position = o || "bottom", s;
  75404. }
  75405. return e.prototype.isHorizontal = function() {
  75406. var n = this.position;
  75407. return n === "top" || n === "bottom";
  75408. }, e.prototype.pointToData = function(n, r) {
  75409. return this.coordinateSystem.pointToData(n)[0];
  75410. }, e;
  75411. }(Ba)
  75412. ), Bre = ["single"], lHe = (
  75413. /** @class */
  75414. function() {
  75415. function t(e, n, r) {
  75416. this.type = "single", this.dimension = "single", this.dimensions = Bre, this.axisPointerEnabled = !0, this.model = e, this._init(e, n, r);
  75417. }
  75418. return t.prototype._init = function(e, n, r) {
  75419. var i = this.dimension, a = new sHe(i, G0(e), [0, 0], e.get("type"), e.get("position")), o = a.type === "category";
  75420. a.onBand = o && e.get("boundaryGap"), a.inverse = e.get("inverse"), a.orient = e.get("orient"), e.axis = a, a.model = e, a.coordinateSystem = this, this._axis = a;
  75421. }, t.prototype.update = function(e, n) {
  75422. e.eachSeries(function(r) {
  75423. if (r.coordinateSystem === this) {
  75424. var i = r.getData();
  75425. k(i.mapDimensionsAll(this.dimension), function(a) {
  75426. this._axis.scale.unionExtentFromData(i, a);
  75427. }, this), Of(this._axis.scale, this._axis.model);
  75428. }
  75429. }, this);
  75430. }, t.prototype.resize = function(e, n) {
  75431. this._rect = Rn({
  75432. left: e.get("left"),
  75433. top: e.get("top"),
  75434. right: e.get("right"),
  75435. bottom: e.get("bottom"),
  75436. width: e.get("width"),
  75437. height: e.get("height")
  75438. }, {
  75439. width: n.getWidth(),
  75440. height: n.getHeight()
  75441. }), this._adjustAxis();
  75442. }, t.prototype.getRect = function() {
  75443. return this._rect;
  75444. }, t.prototype._adjustAxis = function() {
  75445. var e = this._rect, n = this._axis, r = n.isHorizontal(), i = r ? [0, e.width] : [0, e.height], a = n.inverse ? 1 : 0;
  75446. n.setExtent(i[a], i[1 - a]), this._updateAxisTransform(n, r ? e.x : e.y);
  75447. }, t.prototype._updateAxisTransform = function(e, n) {
  75448. var r = e.getExtent(), i = r[0] + r[1], a = e.isHorizontal();
  75449. e.toGlobalCoord = a ? function(o) {
  75450. return o + n;
  75451. } : function(o) {
  75452. return i - o + n;
  75453. }, e.toLocalCoord = a ? function(o) {
  75454. return o - n;
  75455. } : function(o) {
  75456. return i - o + n;
  75457. };
  75458. }, t.prototype.getAxis = function() {
  75459. return this._axis;
  75460. }, t.prototype.getBaseAxis = function() {
  75461. return this._axis;
  75462. }, t.prototype.getAxes = function() {
  75463. return [this._axis];
  75464. }, t.prototype.getTooltipAxes = function() {
  75465. return {
  75466. baseAxes: [this.getAxis()],
  75467. // Empty otherAxes
  75468. otherAxes: []
  75469. };
  75470. }, t.prototype.containPoint = function(e) {
  75471. var n = this.getRect(), r = this.getAxis(), i = r.orient;
  75472. return i === "horizontal" ? r.contain(r.toLocalCoord(e[0])) && e[1] >= n.y && e[1] <= n.y + n.height : r.contain(r.toLocalCoord(e[1])) && e[0] >= n.y && e[0] <= n.y + n.height;
  75473. }, t.prototype.pointToData = function(e) {
  75474. var n = this.getAxis();
  75475. return [n.coordToData(n.toLocalCoord(e[n.orient === "horizontal" ? 0 : 1]))];
  75476. }, t.prototype.dataToPoint = function(e) {
  75477. var n = this.getAxis(), r = this.getRect(), i = [], a = n.orient === "horizontal" ? 0 : 1;
  75478. return e instanceof Array && (e = e[0]), i[a] = n.toGlobalCoord(n.dataToCoord(+e)), i[1 - a] = a === 0 ? r.y + r.height / 2 : r.x + r.width / 2, i;
  75479. }, t.prototype.convertToPixel = function(e, n, r) {
  75480. var i = o7(n);
  75481. return i === this ? this.dataToPoint(r) : null;
  75482. }, t.prototype.convertFromPixel = function(e, n, r) {
  75483. var i = o7(n);
  75484. return i === this ? this.pointToData(r) : null;
  75485. }, t;
  75486. }()
  75487. );
  75488. function o7(t) {
  75489. var e = t.seriesModel, n = t.singleAxisModel;
  75490. return n && n.coordinateSystem || e && e.coordinateSystem;
  75491. }
  75492. function uHe(t, e) {
  75493. var n = [];
  75494. return t.eachComponent("singleAxis", function(r, i) {
  75495. var a = new lHe(r, t, e);
  75496. a.name = "single_" + i, a.resize(r, e), r.coordinateSystem = a, n.push(a);
  75497. }), t.eachSeries(function(r) {
  75498. if (r.get("coordinateSystem") === "singleAxis") {
  75499. var i = r.getReferringComponents("singleAxis", Dn).models[0];
  75500. r.coordinateSystem = i && i.coordinateSystem;
  75501. }
  75502. }), n;
  75503. }
  75504. var cHe = {
  75505. create: uHe,
  75506. dimensions: Bre
  75507. }, s7 = ["x", "y"], fHe = ["width", "height"], dHe = (
  75508. /** @class */
  75509. function(t) {
  75510. q(e, t);
  75511. function e() {
  75512. return t !== null && t.apply(this, arguments) || this;
  75513. }
  75514. return e.prototype.makeElOption = function(n, r, i, a, o) {
  75515. var s = i.axis, l = s.coordinateSystem, u = jP(l, 1 - FO(s)), c = l.dataToPoint(r)[0], f = a.get("type");
  75516. if (f && f !== "none") {
  75517. var d = vL(a), h = hHe[f](s, c, u);
  75518. h.style = d, n.graphicKey = h.type, n.pointer = h;
  75519. }
  75520. var p = ME(i);
  75521. Mre(
  75522. // @ts-ignore
  75523. r,
  75524. n,
  75525. p,
  75526. i,
  75527. a,
  75528. o
  75529. );
  75530. }, e.prototype.getHandleTransform = function(n, r, i) {
  75531. var a = ME(r, {
  75532. labelInside: !1
  75533. });
  75534. a.labelMargin = i.get(["handle", "margin"]);
  75535. var o = gL(r.axis, n, a);
  75536. return {
  75537. x: o[0],
  75538. y: o[1],
  75539. rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
  75540. };
  75541. }, e.prototype.updateHandleTransform = function(n, r, i, a) {
  75542. var o = i.axis, s = o.coordinateSystem, l = FO(o), u = jP(s, l), c = [n.x, n.y];
  75543. c[l] += r[l], c[l] = Math.min(u[1], c[l]), c[l] = Math.max(u[0], c[l]);
  75544. var f = jP(s, 1 - l), d = (f[1] + f[0]) / 2, h = [d, d];
  75545. return h[l] = c[l], {
  75546. x: c[0],
  75547. y: c[1],
  75548. rotation: n.rotation,
  75549. cursorPoint: h,
  75550. tooltipOption: {
  75551. verticalAlign: "middle"
  75552. }
  75553. };
  75554. }, e;
  75555. }(pL)
  75556. ), hHe = {
  75557. line: function(t, e, n) {
  75558. var r = mL([e, n[0]], [e, n[1]], FO(t));
  75559. return {
  75560. type: "Line",
  75561. subPixelOptimize: !0,
  75562. shape: r
  75563. };
  75564. },
  75565. shadow: function(t, e, n) {
  75566. var r = t.getBandWidth(), i = n[1] - n[0];
  75567. return {
  75568. type: "Rect",
  75569. shape: Ire([e - r / 2, n[0]], [r, i], FO(t))
  75570. };
  75571. }
  75572. };
  75573. function FO(t) {
  75574. return t.isHorizontal() ? 0 : 1;
  75575. }
  75576. function jP(t, e) {
  75577. var n = t.getRect();
  75578. return [n[s7[e]], n[s7[e]] + n[fHe[e]]];
  75579. }
  75580. var pHe = (
  75581. /** @class */
  75582. function(t) {
  75583. q(e, t);
  75584. function e() {
  75585. var n = t !== null && t.apply(this, arguments) || this;
  75586. return n.type = e.type, n;
  75587. }
  75588. return e.type = "single", e;
  75589. }(Xt)
  75590. );
  75591. function vHe(t) {
  75592. at(ey), Wf.registerAxisPointerClass("SingleAxisPointer", dHe), t.registerComponentView(pHe), t.registerComponentView(aHe), t.registerComponentModel(Y_), Qh(t, "single", Y_, Y_.defaultOption), t.registerCoordinateSystem("single", cHe);
  75593. }
  75594. var gHe = (
  75595. /** @class */
  75596. function(t) {
  75597. q(e, t);
  75598. function e() {
  75599. var n = t !== null && t.apply(this, arguments) || this;
  75600. return n.type = e.type, n;
  75601. }
  75602. return e.prototype.init = function(n, r, i) {
  75603. var a = bp(n);
  75604. t.prototype.init.apply(this, arguments), l7(n, a);
  75605. }, e.prototype.mergeOption = function(n) {
  75606. t.prototype.mergeOption.apply(this, arguments), l7(this.option, n);
  75607. }, e.prototype.getCellSize = function() {
  75608. return this.option.cellSize;
  75609. }, e.type = "calendar", e.defaultOption = {
  75610. // zlevel: 0,
  75611. z: 2,
  75612. left: 80,
  75613. top: 60,
  75614. cellSize: 20,
  75615. // horizontal vertical
  75616. orient: "horizontal",
  75617. // month separate line style
  75618. splitLine: {
  75619. show: !0,
  75620. lineStyle: {
  75621. color: "#000",
  75622. width: 1,
  75623. type: "solid"
  75624. }
  75625. },
  75626. // rect style temporarily unused emphasis
  75627. itemStyle: {
  75628. color: "#fff",
  75629. borderWidth: 1,
  75630. borderColor: "#ccc"
  75631. },
  75632. // week text style
  75633. dayLabel: {
  75634. show: !0,
  75635. firstDay: 0,
  75636. // start end
  75637. position: "start",
  75638. margin: "50%",
  75639. color: "#000"
  75640. },
  75641. // month text style
  75642. monthLabel: {
  75643. show: !0,
  75644. // start end
  75645. position: "start",
  75646. margin: 5,
  75647. // center or left
  75648. align: "center",
  75649. formatter: null,
  75650. color: "#000"
  75651. },
  75652. // year text style
  75653. yearLabel: {
  75654. show: !0,
  75655. // top bottom left right
  75656. position: null,
  75657. margin: 30,
  75658. formatter: null,
  75659. color: "#ccc",
  75660. fontFamily: "sans-serif",
  75661. fontWeight: "bolder",
  75662. fontSize: 20
  75663. }
  75664. }, e;
  75665. }(rt)
  75666. );
  75667. function l7(t, e) {
  75668. var n = t.cellSize, r;
  75669. ue(n) ? r = n : r = t.cellSize = [n, n], r.length === 1 && (r[1] = r[0]);
  75670. var i = ce([0, 1], function(a) {
  75671. return mLe(e, a) && (r[a] = "auto"), r[a] != null && r[a] !== "auto";
  75672. });
  75673. cu(t, e, {
  75674. type: "box",
  75675. ignoreSize: i
  75676. });
  75677. }
  75678. var mHe = (
  75679. /** @class */
  75680. function(t) {
  75681. q(e, t);
  75682. function e() {
  75683. var n = t !== null && t.apply(this, arguments) || this;
  75684. return n.type = e.type, n;
  75685. }
  75686. return e.prototype.render = function(n, r, i) {
  75687. var a = this.group;
  75688. a.removeAll();
  75689. var o = n.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = r.getLocaleModel();
  75690. this._renderDayRect(n, s, a), this._renderLines(n, s, l, a), this._renderYearText(n, s, l, a), this._renderMonthText(n, u, l, a), this._renderWeekText(n, u, s, l, a);
  75691. }, e.prototype._renderDayRect = function(n, r, i) {
  75692. for (var a = n.coordinateSystem, o = n.getModel("itemStyle").getItemStyle(), s = a.getCellWidth(), l = a.getCellHeight(), u = r.start.time; u <= r.end.time; u = a.getNextNDay(u, 1).time) {
  75693. var c = a.dataToRect([u], !1).tl, f = new mt({
  75694. shape: {
  75695. x: c[0],
  75696. y: c[1],
  75697. width: s,
  75698. height: l
  75699. },
  75700. cursor: "default",
  75701. style: o
  75702. });
  75703. i.add(f);
  75704. }
  75705. }, e.prototype._renderLines = function(n, r, i, a) {
  75706. var o = this, s = n.coordinateSystem, l = n.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = n.get(["splitLine", "show"]), c = l.lineWidth;
  75707. this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
  75708. for (var f = r.start, d = 0; f.time <= r.end.time; d++) {
  75709. p(f.formatedDate), d === 0 && (f = s.getDateInfo(r.start.y + "-" + r.start.m));
  75710. var h = f.date;
  75711. h.setMonth(h.getMonth() + 1), f = s.getDateInfo(h);
  75712. }
  75713. p(s.getNextNDay(r.end.time, 1).formatedDate);
  75714. function p(v) {
  75715. o._firstDayOfMonth.push(s.getDateInfo(v)), o._firstDayPoints.push(s.dataToRect([v], !1).tl);
  75716. var g = o._getLinePointsOfOneWeek(n, v, i);
  75717. o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, a);
  75718. }
  75719. u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, c, i), l, a), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, c, i), l, a);
  75720. }, e.prototype._getEdgesPoints = function(n, r, i) {
  75721. var a = [n[0].slice(), n[n.length - 1].slice()], o = i === "horizontal" ? 0 : 1;
  75722. return a[0][o] = a[0][o] - r / 2, a[1][o] = a[1][o] + r / 2, a;
  75723. }, e.prototype._drawSplitline = function(n, r, i) {
  75724. var a = new ai({
  75725. z2: 20,
  75726. shape: {
  75727. points: n
  75728. },
  75729. style: r
  75730. });
  75731. i.add(a);
  75732. }, e.prototype._getLinePointsOfOneWeek = function(n, r, i) {
  75733. for (var a = n.coordinateSystem, o = a.getDateInfo(r), s = [], l = 0; l < 7; l++) {
  75734. var u = a.getNextNDay(o.time, l), c = a.dataToRect([u.time], !1);
  75735. s[2 * u.day] = c.tl, s[2 * u.day + 1] = c[i === "horizontal" ? "bl" : "tr"];
  75736. }
  75737. return s;
  75738. }, e.prototype._formatterLabel = function(n, r) {
  75739. return Oe(n) && n ? hLe(n, r) : Me(n) ? n(r) : r.nameMap;
  75740. }, e.prototype._yearTextPositionControl = function(n, r, i, a, o) {
  75741. var s = r[0], l = r[1], u = ["center", "bottom"];
  75742. a === "bottom" ? (l += o, u = ["center", "top"]) : a === "left" ? s -= o : a === "right" ? (s += o, u = ["center", "top"]) : l -= o;
  75743. var c = 0;
  75744. return (a === "left" || a === "right") && (c = Math.PI / 2), {
  75745. rotation: c,
  75746. x: s,
  75747. y: l,
  75748. style: {
  75749. align: u[0],
  75750. verticalAlign: u[1]
  75751. }
  75752. };
  75753. }, e.prototype._renderYearText = function(n, r, i, a) {
  75754. var o = n.getModel("yearLabel");
  75755. if (o.get("show")) {
  75756. var s = o.get("margin"), l = o.get("position");
  75757. l || (l = i !== "horizontal" ? "top" : "left");
  75758. var u = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], c = (u[0][0] + u[1][0]) / 2, f = (u[0][1] + u[1][1]) / 2, d = i === "horizontal" ? 0 : 1, h = {
  75759. top: [c, u[d][1]],
  75760. bottom: [c, u[1 - d][1]],
  75761. left: [u[1 - d][0], f],
  75762. right: [u[d][0], f]
  75763. }, p = r.start.y;
  75764. +r.end.y > +r.start.y && (p = p + "-" + r.end.y);
  75765. var v = o.get("formatter"), g = {
  75766. start: r.start.y,
  75767. end: r.end.y,
  75768. nameMap: p
  75769. }, m = this._formatterLabel(v, g), y = new gt({
  75770. z2: 30,
  75771. style: Zt(o, {
  75772. text: m
  75773. })
  75774. });
  75775. y.attr(this._yearTextPositionControl(y, h[l], i, l, s)), a.add(y);
  75776. }
  75777. }, e.prototype._monthTextPositionControl = function(n, r, i, a, o) {
  75778. var s = "left", l = "top", u = n[0], c = n[1];
  75779. return i === "horizontal" ? (c = c + o, r && (s = "center"), a === "start" && (l = "bottom")) : (u = u + o, r && (l = "middle"), a === "start" && (s = "right")), {
  75780. x: u,
  75781. y: c,
  75782. align: s,
  75783. verticalAlign: l
  75784. };
  75785. }, e.prototype._renderMonthText = function(n, r, i, a) {
  75786. var o = n.getModel("monthLabel");
  75787. if (o.get("show")) {
  75788. var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), c = o.get("align"), f = [this._tlpoints, this._blpoints];
  75789. (!s || Oe(s)) && (s && (r = zA(s) || r), s = r.get(["time", "monthAbbr"]) || []);
  75790. var d = u === "start" ? 0 : 1, h = i === "horizontal" ? 0 : 1;
  75791. l = u === "start" ? -l : l;
  75792. for (var p = c === "center", v = 0; v < f[d].length - 1; v++) {
  75793. var g = f[d][v].slice(), m = this._firstDayOfMonth[v];
  75794. if (p) {
  75795. var y = this._firstDayPoints[v];
  75796. g[h] = (y[h] + f[0][v + 1][h]) / 2;
  75797. }
  75798. var b = o.get("formatter"), _ = s[+m.m - 1], O = {
  75799. yyyy: m.y,
  75800. yy: (m.y + "").slice(2),
  75801. MM: m.m,
  75802. M: +m.m,
  75803. nameMap: _
  75804. }, S = this._formatterLabel(b, O), x = new gt({
  75805. z2: 30,
  75806. style: le(Zt(o, {
  75807. text: S
  75808. }), this._monthTextPositionControl(g, p, i, u, l))
  75809. });
  75810. a.add(x);
  75811. }
  75812. }
  75813. }, e.prototype._weekTextPositionControl = function(n, r, i, a, o) {
  75814. var s = "center", l = "middle", u = n[0], c = n[1], f = i === "start";
  75815. return r === "horizontal" ? (u = u + a + (f ? 1 : -1) * o[0] / 2, s = f ? "right" : "left") : (c = c + a + (f ? 1 : -1) * o[1] / 2, l = f ? "bottom" : "top"), {
  75816. x: u,
  75817. y: c,
  75818. align: s,
  75819. verticalAlign: l
  75820. };
  75821. }, e.prototype._renderWeekText = function(n, r, i, a, o) {
  75822. var s = n.getModel("dayLabel");
  75823. if (s.get("show")) {
  75824. var l = n.coordinateSystem, u = s.get("position"), c = s.get("nameMap"), f = s.get("margin"), d = l.getFirstDayOfWeek();
  75825. if (!c || Oe(c)) {
  75826. c && (r = zA(c) || r);
  75827. var h = r.get(["time", "dayOfWeekShort"]);
  75828. c = h || ce(r.get(["time", "dayOfWeekAbbr"]), function(O) {
  75829. return O[0];
  75830. });
  75831. }
  75832. var p = l.getNextNDay(i.end.time, 7 - i.lweek).time, v = [l.getCellWidth(), l.getCellHeight()];
  75833. f = _e(f, Math.min(v[1], v[0])), u === "start" && (p = l.getNextNDay(i.start.time, -(7 + i.fweek)).time, f = -f);
  75834. for (var g = 0; g < 7; g++) {
  75835. var m = l.getNextNDay(p, g), y = l.dataToRect([m.time], !1).center, b = g;
  75836. b = Math.abs((g + d) % 7);
  75837. var _ = new gt({
  75838. z2: 30,
  75839. style: le(Zt(s, {
  75840. text: c[b]
  75841. }), this._weekTextPositionControl(y, a, u, f, v))
  75842. });
  75843. o.add(_);
  75844. }
  75845. }
  75846. }, e.type = "calendar", e;
  75847. }(Xt)
  75848. ), ZP = 864e5, yHe = (
  75849. /** @class */
  75850. function() {
  75851. function t(e, n, r) {
  75852. this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e;
  75853. }
  75854. return t.getDimensionsInfo = function() {
  75855. return [{
  75856. name: "time",
  75857. type: "time"
  75858. }, "value"];
  75859. }, t.prototype.getRangeInfo = function() {
  75860. return this._rangeInfo;
  75861. }, t.prototype.getModel = function() {
  75862. return this._model;
  75863. }, t.prototype.getRect = function() {
  75864. return this._rect;
  75865. }, t.prototype.getCellWidth = function() {
  75866. return this._sw;
  75867. }, t.prototype.getCellHeight = function() {
  75868. return this._sh;
  75869. }, t.prototype.getOrient = function() {
  75870. return this._orient;
  75871. }, t.prototype.getFirstDayOfWeek = function() {
  75872. return this._firstDayOfWeek;
  75873. }, t.prototype.getDateInfo = function(e) {
  75874. e = Yi(e);
  75875. var n = e.getFullYear(), r = e.getMonth() + 1, i = r < 10 ? "0" + r : "" + r, a = e.getDate(), o = a < 10 ? "0" + a : "" + a, s = e.getDay();
  75876. return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
  75877. y: n + "",
  75878. m: i,
  75879. d: o,
  75880. day: s,
  75881. time: e.getTime(),
  75882. formatedDate: n + "-" + i + "-" + o,
  75883. date: e
  75884. };
  75885. }, t.prototype.getNextNDay = function(e, n) {
  75886. return n = n || 0, n === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + n), this.getDateInfo(e));
  75887. }, t.prototype.update = function(e, n) {
  75888. this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption());
  75889. var r = this._rangeInfo.weeks || 1, i = ["width", "height"], a = this._model.getCellSize().slice(), o = this._model.getBoxLayoutParams(), s = this._orient === "horizontal" ? [r, 7] : [7, r];
  75890. k([0, 1], function(f) {
  75891. c(a, f) && (o[i[f]] = a[f] * s[f]);
  75892. });
  75893. var l = {
  75894. width: n.getWidth(),
  75895. height: n.getHeight()
  75896. }, u = this._rect = Rn(o, l);
  75897. k([0, 1], function(f) {
  75898. c(a, f) || (a[f] = u[i[f]] / s[f]);
  75899. });
  75900. function c(f, d) {
  75901. return f[d] != null && f[d] !== "auto";
  75902. }
  75903. this._sw = a[0], this._sh = a[1];
  75904. }, t.prototype.dataToPoint = function(e, n) {
  75905. ue(e) && (e = e[0]), n == null && (n = !0);
  75906. var r = this.getDateInfo(e), i = this._rangeInfo, a = r.formatedDate;
  75907. if (n && !(r.time >= i.start.time && r.time < i.end.time + ZP))
  75908. return [NaN, NaN];
  75909. var o = r.day, s = this._getRangeInfo([i.start.time, a]).nthWeek;
  75910. return this._orient === "vertical" ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + s * this._sh + this._sh / 2] : [this._rect.x + s * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2];
  75911. }, t.prototype.pointToData = function(e) {
  75912. var n = this.pointToDate(e);
  75913. return n && n.time;
  75914. }, t.prototype.dataToRect = function(e, n) {
  75915. var r = this.dataToPoint(e, n);
  75916. return {
  75917. contentShape: {
  75918. x: r[0] - (this._sw - this._lineWidth) / 2,
  75919. y: r[1] - (this._sh - this._lineWidth) / 2,
  75920. width: this._sw - this._lineWidth,
  75921. height: this._sh - this._lineWidth
  75922. },
  75923. center: r,
  75924. tl: [r[0] - this._sw / 2, r[1] - this._sh / 2],
  75925. tr: [r[0] + this._sw / 2, r[1] - this._sh / 2],
  75926. br: [r[0] + this._sw / 2, r[1] + this._sh / 2],
  75927. bl: [r[0] - this._sw / 2, r[1] + this._sh / 2]
  75928. };
  75929. }, t.prototype.pointToDate = function(e) {
  75930. var n = Math.floor((e[0] - this._rect.x) / this._sw) + 1, r = Math.floor((e[1] - this._rect.y) / this._sh) + 1, i = this._rangeInfo.range;
  75931. return this._orient === "vertical" ? this._getDateByWeeksAndDay(r, n - 1, i) : this._getDateByWeeksAndDay(n, r - 1, i);
  75932. }, t.prototype.convertToPixel = function(e, n, r) {
  75933. var i = u7(n);
  75934. return i === this ? i.dataToPoint(r) : null;
  75935. }, t.prototype.convertFromPixel = function(e, n, r) {
  75936. var i = u7(n);
  75937. return i === this ? i.pointToData(r) : null;
  75938. }, t.prototype.containPoint = function(e) {
  75939. return console.warn("Not implemented."), !1;
  75940. }, t.prototype._initRangeOption = function() {
  75941. var e = this._model.get("range"), n;
  75942. if (ue(e) && e.length === 1 && (e = e[0]), ue(e))
  75943. n = e;
  75944. else {
  75945. var r = e.toString();
  75946. if (/^\d{4}$/.test(r) && (n = [r + "-01-01", r + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(r)) {
  75947. var i = this.getDateInfo(r), a = i.date;
  75948. a.setMonth(a.getMonth() + 1);
  75949. var o = this.getNextNDay(a, -1);
  75950. n = [i.formatedDate, o.formatedDate];
  75951. }
  75952. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r) && (n = [r, r]);
  75953. }
  75954. if (!n)
  75955. return process.env.NODE_ENV !== "production" && Oa("Invalid date range."), e;
  75956. var s = this._getRangeInfo(n);
  75957. return s.start.time > s.end.time && n.reverse(), n;
  75958. }, t.prototype._getRangeInfo = function(e) {
  75959. var n = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], r;
  75960. n[0].time > n[1].time && (r = !0, n.reverse());
  75961. var i = Math.floor(n[1].time / ZP) - Math.floor(n[0].time / ZP) + 1, a = new Date(n[0].time), o = a.getDate(), s = n[1].date.getDate();
  75962. a.setDate(o + i - 1);
  75963. var l = a.getDate();
  75964. if (l !== s)
  75965. for (var u = a.getTime() - n[1].time > 0 ? 1 : -1; (l = a.getDate()) !== s && (a.getTime() - n[1].time) * u > 0; )
  75966. i -= u, a.setDate(l - u);
  75967. var c = Math.floor((i + n[0].day + 6) / 7), f = r ? -c + 1 : c - 1;
  75968. return r && n.reverse(), {
  75969. range: [n[0].formatedDate, n[1].formatedDate],
  75970. start: n[0],
  75971. end: n[1],
  75972. allDay: i,
  75973. weeks: c,
  75974. // From 0.
  75975. nthWeek: f,
  75976. fweek: n[0].day,
  75977. lweek: n[1].day
  75978. };
  75979. }, t.prototype._getDateByWeeksAndDay = function(e, n, r) {
  75980. var i = this._getRangeInfo(r);
  75981. if (e > i.weeks || e === 0 && n < i.fweek || e === i.weeks && n > i.lweek)
  75982. return null;
  75983. var a = (e - 1) * 7 - i.fweek + n, o = new Date(i.start.time);
  75984. return o.setDate(+i.start.d + a), this.getDateInfo(o);
  75985. }, t.create = function(e, n) {
  75986. var r = [];
  75987. return e.eachComponent("calendar", function(i) {
  75988. var a = new t(i);
  75989. r.push(a), i.coordinateSystem = a;
  75990. }), e.eachSeries(function(i) {
  75991. i.get("coordinateSystem") === "calendar" && (i.coordinateSystem = r[i.get("calendarIndex") || 0]);
  75992. }), r;
  75993. }, t.dimensions = ["time", "value"], t;
  75994. }()
  75995. );
  75996. function u7(t) {
  75997. var e = t.calendarModel, n = t.seriesModel, r = e ? e.coordinateSystem : n ? n.coordinateSystem : null;
  75998. return r;
  75999. }
  76000. function bHe(t) {
  76001. t.registerComponentModel(gHe), t.registerComponentView(mHe), t.registerCoordinateSystem("calendar", yHe);
  76002. }
  76003. function _He(t, e) {
  76004. var n = t.existing;
  76005. if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), e.parentId == null) {
  76006. var r = e.parentOption;
  76007. r ? e.parentId = r.id : n && (e.parentId = n.parentId);
  76008. }
  76009. e.parentOption = null;
  76010. }
  76011. function c7(t, e) {
  76012. var n;
  76013. return k(e, function(r) {
  76014. t[r] != null && t[r] !== "auto" && (n = !0);
  76015. }), n;
  76016. }
  76017. function OHe(t, e, n) {
  76018. var r = le({}, n), i = t[e], a = n.$action || "merge";
  76019. if (a === "merge")
  76020. if (i) {
  76021. if (process.env.NODE_ENV !== "production") {
  76022. var o = n.type;
  76023. ke(!o || i.type === o, 'Please set $action: "replace" to change `type`');
  76024. }
  76025. qe(i, r, !0), cu(i, r, {
  76026. ignoreSize: !0
  76027. }), PJ(n, i), Rb(n, i), Rb(n, i, "shape"), Rb(n, i, "style"), Rb(n, i, "extra"), n.clipPath = i.clipPath;
  76028. } else
  76029. t[e] = r;
  76030. else a === "replace" ? t[e] = r : a === "remove" && i && (t[e] = null);
  76031. }
  76032. var zre = ["transition", "enterFrom", "leaveTo"], SHe = zre.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
  76033. function Rb(t, e, n) {
  76034. if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), !(!t || !e))
  76035. for (var r = n ? zre : SHe, i = 0; i < r.length; i++) {
  76036. var a = r[i];
  76037. t[a] == null && e[a] != null && (t[a] = e[a]);
  76038. }
  76039. }
  76040. function xHe(t, e) {
  76041. if (t && (t.hv = e.hv = [
  76042. // Rigid body, don't care about `width`.
  76043. c7(e, ["left", "right"]),
  76044. // Rigid body, don't care about `height`.
  76045. c7(e, ["top", "bottom"])
  76046. ], t.type === "group")) {
  76047. var n = t, r = e;
  76048. n.width == null && (n.width = r.width = 0), n.height == null && (n.height = r.height = 0);
  76049. }
  76050. }
  76051. var wHe = (
  76052. /** @class */
  76053. function(t) {
  76054. q(e, t);
  76055. function e() {
  76056. var n = t !== null && t.apply(this, arguments) || this;
  76057. return n.type = e.type, n.preventAutoZ = !0, n;
  76058. }
  76059. return e.prototype.mergeOption = function(n, r) {
  76060. var i = this.option.elements;
  76061. this.option.elements = null, t.prototype.mergeOption.call(this, n, r), this.option.elements = i;
  76062. }, e.prototype.optionUpdated = function(n, r) {
  76063. var i = this.option, a = (r ? i : n).elements, o = i.elements = r ? [] : i.elements, s = [];
  76064. this._flatten(a, s, null);
  76065. var l = hK(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
  76066. k(l, function(c, f) {
  76067. var d = c.newOption;
  76068. process.env.NODE_ENV !== "production" && ke(Ie(d) || c.existing, "Empty graphic option definition"), d && (u.push(d), _He(c, d), OHe(o, f, d), xHe(o[f], d));
  76069. }, this), i.elements = Nt(o, function(c) {
  76070. return c && delete c.$action, c != null;
  76071. });
  76072. }, e.prototype._flatten = function(n, r, i) {
  76073. k(n, function(a) {
  76074. if (a) {
  76075. i && (a.parentOption = i), r.push(a);
  76076. var o = a.children;
  76077. o && o.length && this._flatten(o, r, a), delete a.children;
  76078. }
  76079. }, this);
  76080. }, e.prototype.useElOptionsToUpdate = function() {
  76081. var n = this._elOptionsToUpdate;
  76082. return this._elOptionsToUpdate = null, n;
  76083. }, e.type = "graphic", e.defaultOption = {
  76084. elements: []
  76085. // parentId: null
  76086. }, e;
  76087. }(rt)
  76088. ), f7 = {
  76089. // Reserved but not supported in graphic component.
  76090. path: null,
  76091. compoundPath: null,
  76092. // Supported in graphic component.
  76093. group: Ve,
  76094. image: lr,
  76095. text: gt
  76096. }, ca = bt(), CHe = (
  76097. /** @class */
  76098. function(t) {
  76099. q(e, t);
  76100. function e() {
  76101. var n = t !== null && t.apply(this, arguments) || this;
  76102. return n.type = e.type, n;
  76103. }
  76104. return e.prototype.init = function() {
  76105. this._elMap = Pe();
  76106. }, e.prototype.render = function(n, r, i) {
  76107. n !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = n, this._updateElements(n), this._relocate(n, i);
  76108. }, e.prototype._updateElements = function(n) {
  76109. var r = n.useElOptionsToUpdate();
  76110. if (r) {
  76111. var i = this._elMap, a = this.group, o = n.get("z"), s = n.get("zlevel");
  76112. k(r, function(l) {
  76113. var u = Vn(l.id, null), c = u != null ? i.get(u) : null, f = Vn(l.parentId, null), d = f != null ? i.get(f) : a, h = l.type, p = l.style;
  76114. h === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
  76115. var v = l.textContent, g = l.textConfig;
  76116. if (p && yre(p, h, !!g, !!v)) {
  76117. var m = bre(p, h, !0);
  76118. !g && m.textConfig && (g = l.textConfig = m.textConfig), !v && m.textContent && (v = m.textContent);
  76119. }
  76120. var y = THe(l);
  76121. process.env.NODE_ENV !== "production" && c && ke(d === c.parent, "Changing parent is not supported.");
  76122. var b = l.$action || "merge", _ = b === "merge", O = b === "replace";
  76123. if (_) {
  76124. var S = !c, x = c;
  76125. S ? x = d7(u, d, l.type, i) : (x && (ca(x).isNew = !1), wre(x)), x && (U_(x, y, n, {
  76126. isInit: S
  76127. }), h7(x, l, o, s));
  76128. } else if (O) {
  76129. q_(c, l, i, n);
  76130. var C = d7(u, d, l.type, i);
  76131. C && (U_(C, y, n, {
  76132. isInit: !0
  76133. }), h7(C, l, o, s));
  76134. } else b === "remove" && (Ore(c, l), q_(c, l, i, n));
  76135. var T = i.get(u);
  76136. if (T && v)
  76137. if (_) {
  76138. var w = T.getTextContent();
  76139. w ? w.attr(v) : T.setTextContent(new gt(v));
  76140. } else O && T.setTextContent(new gt(v));
  76141. if (T) {
  76142. var P = l.clipPath;
  76143. if (P) {
  76144. var $ = P.type, A = void 0, S = !1;
  76145. if (_) {
  76146. var D = T.getClipPath();
  76147. S = !D || ca(D).type !== $, A = S ? IE($) : D;
  76148. } else O && (S = !0, A = IE($));
  76149. T.setClipPath(A), U_(A, P, n, {
  76150. isInit: S
  76151. }), BO(A, P.keyframeAnimation, n);
  76152. }
  76153. var E = ca(T);
  76154. T.setTextConfig(g), E.option = l, PHe(T, n, l), gp({
  76155. el: T,
  76156. componentModel: n,
  76157. itemName: T.name,
  76158. itemTooltipOption: l.tooltip
  76159. }), BO(T, l.keyframeAnimation, n);
  76160. }
  76161. });
  76162. }
  76163. }, e.prototype._relocate = function(n, r) {
  76164. for (var i = n.option.elements, a = this.group, o = this._elMap, s = r.getWidth(), l = r.getHeight(), u = ["x", "y"], c = 0; c < i.length; c++) {
  76165. var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
  76166. if (!(!h || !h.isGroup)) {
  76167. var p = h.parent, v = p === a, g = ca(h), m = ca(p);
  76168. g.width = _e(g.option.width, v ? s : m.width) || 0, g.height = _e(g.option.height, v ? l : m.height) || 0;
  76169. }
  76170. }
  76171. for (var c = i.length - 1; c >= 0; c--) {
  76172. var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
  76173. if (h) {
  76174. var p = h.parent, m = ca(p), y = p === a ? {
  76175. width: s,
  76176. height: l
  76177. } : {
  76178. width: m.width,
  76179. height: m.height
  76180. }, b = {}, _ = aw(h, f, y, null, {
  76181. hv: f.hv,
  76182. boundingMode: f.bounding
  76183. }, b);
  76184. if (!ca(h).isNew && _) {
  76185. for (var O = f.transition, S = {}, x = 0; x < u.length; x++) {
  76186. var C = u[x], T = b[C];
  76187. O && (rf(O) || et(O, C) >= 0) ? S[C] = T : h[C] = T;
  76188. }
  76189. Ct(h, S, n, 0);
  76190. } else
  76191. h.attr(b);
  76192. }
  76193. }
  76194. }, e.prototype._clear = function() {
  76195. var n = this, r = this._elMap;
  76196. r.each(function(i) {
  76197. q_(i, ca(i).option, r, n._lastGraphicModel);
  76198. }), this._elMap = Pe();
  76199. }, e.prototype.dispose = function() {
  76200. this._clear();
  76201. }, e.type = "graphic", e;
  76202. }(Xt)
  76203. );
  76204. function IE(t) {
  76205. process.env.NODE_ENV !== "production" && ke(t, "graphic type MUST be set");
  76206. var e = Ce(f7, t) ? f7[t] : Kx(t);
  76207. process.env.NODE_ENV !== "production" && ke(e, "graphic type " + t + " can not be found");
  76208. var n = new e({});
  76209. return ca(n).type = t, n;
  76210. }
  76211. function d7(t, e, n, r) {
  76212. var i = IE(n);
  76213. return e.add(i), r.set(t, i), ca(i).id = t, ca(i).isNew = !0, i;
  76214. }
  76215. function q_(t, e, n, r) {
  76216. var i = t && t.parent;
  76217. i && (t.type === "group" && t.traverse(function(a) {
  76218. q_(a, e, n, r);
  76219. }), Sw(t, e, r), n.removeKey(ca(t).id));
  76220. }
  76221. function h7(t, e, n, r) {
  76222. t.isGroup || k([
  76223. ["cursor", Ma.prototype.cursor],
  76224. // We should not support configure z and zlevel in the element level.
  76225. // But seems we didn't limit it previously. So here still use it to avoid breaking.
  76226. ["zlevel", r || 0],
  76227. ["z", n || 0],
  76228. // z2 must not be null/undefined, otherwise sort error may occur.
  76229. ["z2", 0]
  76230. ], function(i) {
  76231. var a = i[0];
  76232. Ce(e, a) ? t[a] = We(e[a], i[1]) : t[a] == null && (t[a] = i[1]);
  76233. }), k(st(e), function(i) {
  76234. if (i.indexOf("on") === 0) {
  76235. var a = e[i];
  76236. t[i] = Me(a) ? a : null;
  76237. }
  76238. }), Ce(e, "draggable") && (t.draggable = e.draggable), e.name != null && (t.name = e.name), e.id != null && (t.id = e.id);
  76239. }
  76240. function THe(t) {
  76241. return t = le({}, t), k(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(TJ), function(e) {
  76242. delete t[e];
  76243. }), t;
  76244. }
  76245. function PHe(t, e, n) {
  76246. var r = Fe(t).eventData;
  76247. !t.silent && !t.ignore && !r && (r = Fe(t).eventData = {
  76248. componentType: "graphic",
  76249. componentIndex: e.componentIndex,
  76250. name: t.name
  76251. }), r && (r.info = n.info);
  76252. }
  76253. function $He(t) {
  76254. t.registerComponentModel(wHe), t.registerComponentView(CHe), t.registerPreprocessor(function(e) {
  76255. var n = e.graphic;
  76256. ue(n) ? !n[0] || !n[0].elements ? e.graphic = [{
  76257. elements: n
  76258. }] : e.graphic = [e.graphic[0]] : n && !n.elements && (e.graphic = [{
  76259. elements: [n]
  76260. }]);
  76261. });
  76262. }
  76263. var p7 = ["x", "y", "radius", "angle", "single"], AHe = ["cartesian2d", "polar", "singleAxis"];
  76264. function EHe(t) {
  76265. var e = t.get("coordinateSystem");
  76266. return et(AHe, e) >= 0;
  76267. }
  76268. function Fl(t) {
  76269. return process.env.NODE_ENV !== "production" && ke(t), t + "Axis";
  76270. }
  76271. function MHe(t, e) {
  76272. var n = Pe(), r = [], i = Pe();
  76273. t.eachComponent({
  76274. mainType: "dataZoom",
  76275. query: e
  76276. }, function(c) {
  76277. i.get(c.uid) || s(c);
  76278. });
  76279. var a;
  76280. do
  76281. a = !1, t.eachComponent("dataZoom", o);
  76282. while (a);
  76283. function o(c) {
  76284. !i.get(c.uid) && l(c) && (s(c), a = !0);
  76285. }
  76286. function s(c) {
  76287. i.set(c.uid, !0), r.push(c), u(c);
  76288. }
  76289. function l(c) {
  76290. var f = !1;
  76291. return c.eachTargetAxis(function(d, h) {
  76292. var p = n.get(d);
  76293. p && p[h] && (f = !0);
  76294. }), f;
  76295. }
  76296. function u(c) {
  76297. c.eachTargetAxis(function(f, d) {
  76298. (n.get(f) || n.set(f, []))[d] = !0;
  76299. });
  76300. }
  76301. return r;
  76302. }
  76303. function Vre(t) {
  76304. var e = t.ecModel, n = {
  76305. infoList: [],
  76306. infoMap: Pe()
  76307. };
  76308. return t.eachTargetAxis(function(r, i) {
  76309. var a = e.getComponent(Fl(r), i);
  76310. if (a) {
  76311. var o = a.getCoordSysModel();
  76312. if (o) {
  76313. var s = o.uid, l = n.infoMap.get(s);
  76314. l || (l = {
  76315. model: o,
  76316. axisModels: []
  76317. }, n.infoList.push(l), n.infoMap.set(s, l)), l.axisModels.push(a);
  76318. }
  76319. }
  76320. }), n;
  76321. }
  76322. var UP = (
  76323. /** @class */
  76324. function() {
  76325. function t() {
  76326. this.indexList = [], this.indexMap = [];
  76327. }
  76328. return t.prototype.add = function(e) {
  76329. this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
  76330. }, t;
  76331. }()
  76332. ), Fm = (
  76333. /** @class */
  76334. function(t) {
  76335. q(e, t);
  76336. function e() {
  76337. var n = t !== null && t.apply(this, arguments) || this;
  76338. return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n;
  76339. }
  76340. return e.prototype.init = function(n, r, i) {
  76341. var a = v7(n);
  76342. this.settledOption = a, this.mergeDefaultAndTheme(n, i), this._doInit(a);
  76343. }, e.prototype.mergeOption = function(n) {
  76344. var r = v7(n);
  76345. qe(this.option, n, !0), qe(this.settledOption, r, !0), this._doInit(r);
  76346. }, e.prototype._doInit = function(n) {
  76347. var r = this.option;
  76348. this._setDefaultThrottle(n), this._updateRangeUse(n);
  76349. var i = this.settledOption;
  76350. k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
  76351. this._rangePropMode[o] === "value" && (r[a[0]] = i[a[0]] = null);
  76352. }, this), this._resetTarget();
  76353. }, e.prototype._resetTarget = function() {
  76354. var n = this.get("orient", !0), r = this._targetAxisInfoMap = Pe(), i = this._fillSpecifiedTargetAxis(r);
  76355. i ? this._orient = n || this._makeAutoOrientByTargetAxis() : (this._orient = n || "horizontal", this._fillAutoTargetAxisByOrient(r, this._orient)), this._noTarget = !0, r.each(function(a) {
  76356. a.indexList.length && (this._noTarget = !1);
  76357. }, this);
  76358. }, e.prototype._fillSpecifiedTargetAxis = function(n) {
  76359. var r = !1;
  76360. return k(p7, function(i) {
  76361. var a = this.getReferringComponents(Fl(i), eRe);
  76362. if (a.specified) {
  76363. r = !0;
  76364. var o = new UP();
  76365. k(a.models, function(s) {
  76366. o.add(s.componentIndex);
  76367. }), n.set(i, o);
  76368. }
  76369. }, this), r;
  76370. }, e.prototype._fillAutoTargetAxisByOrient = function(n, r) {
  76371. var i = this.ecModel, a = !0;
  76372. if (a) {
  76373. var o = r === "vertical" ? "y" : "x", s = i.findComponents({
  76374. mainType: o + "Axis"
  76375. });
  76376. l(s, o);
  76377. }
  76378. if (a) {
  76379. var s = i.findComponents({
  76380. mainType: "singleAxis",
  76381. filter: function(c) {
  76382. return c.get("orient", !0) === r;
  76383. }
  76384. });
  76385. l(s, "single");
  76386. }
  76387. function l(u, c) {
  76388. var f = u[0];
  76389. if (f) {
  76390. var d = new UP();
  76391. if (d.add(f.componentIndex), n.set(c, d), a = !1, c === "x" || c === "y") {
  76392. var h = f.getReferringComponents("grid", Dn).models[0];
  76393. h && k(u, function(p) {
  76394. f.componentIndex !== p.componentIndex && h === p.getReferringComponents("grid", Dn).models[0] && d.add(p.componentIndex);
  76395. });
  76396. }
  76397. }
  76398. }
  76399. a && k(p7, function(u) {
  76400. if (a) {
  76401. var c = i.findComponents({
  76402. mainType: Fl(u),
  76403. filter: function(d) {
  76404. return d.get("type", !0) === "category";
  76405. }
  76406. });
  76407. if (c[0]) {
  76408. var f = new UP();
  76409. f.add(c[0].componentIndex), n.set(u, f), a = !1;
  76410. }
  76411. }
  76412. }, this);
  76413. }, e.prototype._makeAutoOrientByTargetAxis = function() {
  76414. var n;
  76415. return this.eachTargetAxis(function(r) {
  76416. !n && (n = r);
  76417. }, this), n === "y" ? "vertical" : "horizontal";
  76418. }, e.prototype._setDefaultThrottle = function(n) {
  76419. if (n.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
  76420. var r = this.ecModel.option;
  76421. this.option.throttle = r.animation && r.animationDurationUpdate > 0 ? 100 : 20;
  76422. }
  76423. }, e.prototype._updateRangeUse = function(n) {
  76424. var r = this._rangePropMode, i = this.get("rangeMode");
  76425. k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
  76426. var s = n[a[0]] != null, l = n[a[1]] != null;
  76427. s && !l ? r[o] = "percent" : !s && l ? r[o] = "value" : i ? r[o] = i[o] : s && (r[o] = "percent");
  76428. });
  76429. }, e.prototype.noTarget = function() {
  76430. return this._noTarget;
  76431. }, e.prototype.getFirstTargetAxisModel = function() {
  76432. var n;
  76433. return this.eachTargetAxis(function(r, i) {
  76434. n == null && (n = this.ecModel.getComponent(Fl(r), i));
  76435. }, this), n;
  76436. }, e.prototype.eachTargetAxis = function(n, r) {
  76437. this._targetAxisInfoMap.each(function(i, a) {
  76438. k(i.indexList, function(o) {
  76439. n.call(r, a, o);
  76440. });
  76441. });
  76442. }, e.prototype.getAxisProxy = function(n, r) {
  76443. var i = this.getAxisModel(n, r);
  76444. if (i)
  76445. return i.__dzAxisProxy;
  76446. }, e.prototype.getAxisModel = function(n, r) {
  76447. process.env.NODE_ENV !== "production" && ke(n && r != null);
  76448. var i = this._targetAxisInfoMap.get(n);
  76449. if (i && i.indexMap[r])
  76450. return this.ecModel.getComponent(Fl(n), r);
  76451. }, e.prototype.setRawRange = function(n) {
  76452. var r = this.option, i = this.settledOption;
  76453. k([["start", "startValue"], ["end", "endValue"]], function(a) {
  76454. (n[a[0]] != null || n[a[1]] != null) && (r[a[0]] = i[a[0]] = n[a[0]], r[a[1]] = i[a[1]] = n[a[1]]);
  76455. }, this), this._updateRangeUse(n);
  76456. }, e.prototype.setCalculatedRange = function(n) {
  76457. var r = this.option;
  76458. k(["start", "startValue", "end", "endValue"], function(i) {
  76459. r[i] = n[i];
  76460. });
  76461. }, e.prototype.getPercentRange = function() {
  76462. var n = this.findRepresentativeAxisProxy();
  76463. if (n)
  76464. return n.getDataPercentWindow();
  76465. }, e.prototype.getValueRange = function(n, r) {
  76466. if (n == null && r == null) {
  76467. var i = this.findRepresentativeAxisProxy();
  76468. if (i)
  76469. return i.getDataValueWindow();
  76470. } else
  76471. return this.getAxisProxy(n, r).getDataValueWindow();
  76472. }, e.prototype.findRepresentativeAxisProxy = function(n) {
  76473. if (n)
  76474. return n.__dzAxisProxy;
  76475. for (var r, i = this._targetAxisInfoMap.keys(), a = 0; a < i.length; a++)
  76476. for (var o = i[a], s = this._targetAxisInfoMap.get(o), l = 0; l < s.indexList.length; l++) {
  76477. var u = this.getAxisProxy(o, s.indexList[l]);
  76478. if (u.hostedBy(this))
  76479. return u;
  76480. r || (r = u);
  76481. }
  76482. return r;
  76483. }, e.prototype.getRangePropMode = function() {
  76484. return this._rangePropMode.slice();
  76485. }, e.prototype.getOrient = function() {
  76486. return process.env.NODE_ENV !== "production" && ke(this._orient), this._orient;
  76487. }, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
  76488. // zlevel: 0,
  76489. z: 4,
  76490. filterMode: "filter",
  76491. start: 0,
  76492. end: 100
  76493. }, e;
  76494. }(rt)
  76495. );
  76496. function v7(t) {
  76497. var e = {};
  76498. return k(["start", "end", "startValue", "endValue", "throttle"], function(n) {
  76499. t.hasOwnProperty(n) && (e[n] = t[n]);
  76500. }), e;
  76501. }
  76502. var IHe = (
  76503. /** @class */
  76504. function(t) {
  76505. q(e, t);
  76506. function e() {
  76507. var n = t !== null && t.apply(this, arguments) || this;
  76508. return n.type = e.type, n;
  76509. }
  76510. return e.type = "dataZoom.select", e;
  76511. }(Fm)
  76512. ), OL = (
  76513. /** @class */
  76514. function(t) {
  76515. q(e, t);
  76516. function e() {
  76517. var n = t !== null && t.apply(this, arguments) || this;
  76518. return n.type = e.type, n;
  76519. }
  76520. return e.prototype.render = function(n, r, i, a) {
  76521. this.dataZoomModel = n, this.ecModel = r, this.api = i;
  76522. }, e.type = "dataZoom", e;
  76523. }(Xt)
  76524. ), DHe = (
  76525. /** @class */
  76526. function(t) {
  76527. q(e, t);
  76528. function e() {
  76529. var n = t !== null && t.apply(this, arguments) || this;
  76530. return n.type = e.type, n;
  76531. }
  76532. return e.type = "dataZoom.select", e;
  76533. }(OL)
  76534. ), Md = k, g7 = Vi, RHe = (
  76535. /** @class */
  76536. function() {
  76537. function t(e, n, r, i) {
  76538. this._dimName = e, this._axisIndex = n, this.ecModel = i, this._dataZoomModel = r;
  76539. }
  76540. return t.prototype.hostedBy = function(e) {
  76541. return this._dataZoomModel === e;
  76542. }, t.prototype.getDataValueWindow = function() {
  76543. return this._valueWindow.slice();
  76544. }, t.prototype.getDataPercentWindow = function() {
  76545. return this._percentWindow.slice();
  76546. }, t.prototype.getTargetSeriesModels = function() {
  76547. var e = [];
  76548. return this.ecModel.eachSeries(function(n) {
  76549. if (EHe(n)) {
  76550. var r = Fl(this._dimName), i = n.getReferringComponents(r, Dn).models[0];
  76551. i && this._axisIndex === i.componentIndex && e.push(n);
  76552. }
  76553. }, this), e;
  76554. }, t.prototype.getAxisModel = function() {
  76555. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
  76556. }, t.prototype.getMinMaxSpan = function() {
  76557. return Le(this._minMaxSpan);
  76558. }, t.prototype.calculateDataWindow = function(e) {
  76559. var n = this._dataExtent, r = this.getAxisModel(), i = r.axis.scale, a = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
  76560. Md(["start", "end"], function(d, h) {
  76561. var p = e[d], v = e[d + "Value"];
  76562. a[h] === "percent" ? (p == null && (p = o[h]), v = i.parse(Lt(p, o, n))) : (u = !0, v = v == null ? n[h] : i.parse(v), p = Lt(v, n, o)), l[h] = v == null || isNaN(v) ? n[h] : v, s[h] = p == null || isNaN(p) ? o[h] : p;
  76563. }), g7(l), g7(s);
  76564. var c = this._minMaxSpan;
  76565. u ? f(l, s, n, o, !1) : f(s, l, o, n, !0);
  76566. function f(d, h, p, v, g) {
  76567. var m = g ? "Span" : "ValueSpan";
  76568. Qf(0, d, p, "all", c["min" + m], c["max" + m]);
  76569. for (var y = 0; y < 2; y++)
  76570. h[y] = Lt(d[y], p, v, !0), g && (h[y] = i.parse(h[y]));
  76571. }
  76572. return {
  76573. valueWindow: l,
  76574. percentWindow: s
  76575. };
  76576. }, t.prototype.reset = function(e) {
  76577. if (e === this._dataZoomModel) {
  76578. var n = this.getTargetSeriesModels();
  76579. this._dataExtent = kHe(this, this._dimName, n), this._updateMinMaxSpan();
  76580. var r = this.calculateDataWindow(e.settledOption);
  76581. this._valueWindow = r.valueWindow, this._percentWindow = r.percentWindow, this._setAxisModel();
  76582. }
  76583. }, t.prototype.filterData = function(e, n) {
  76584. if (e !== this._dataZoomModel)
  76585. return;
  76586. var r = this._dimName, i = this.getTargetSeriesModels(), a = e.get("filterMode"), o = this._valueWindow;
  76587. if (a === "none")
  76588. return;
  76589. Md(i, function(l) {
  76590. var u = l.getData(), c = u.mapDimensionsAll(r);
  76591. if (c.length) {
  76592. if (a === "weakFilter") {
  76593. var f = u.getStore(), d = ce(c, function(h) {
  76594. return u.getDimensionIndex(h);
  76595. }, u);
  76596. u.filterSelf(function(h) {
  76597. for (var p, v, g, m = 0; m < c.length; m++) {
  76598. var y = f.get(d[m], h), b = !isNaN(y), _ = y < o[0], O = y > o[1];
  76599. if (b && !_ && !O)
  76600. return !0;
  76601. b && (g = !0), _ && (p = !0), O && (v = !0);
  76602. }
  76603. return g && p && v;
  76604. });
  76605. } else
  76606. Md(c, function(h) {
  76607. if (a === "empty")
  76608. l.setData(u = u.map(h, function(v) {
  76609. return s(v) ? v : NaN;
  76610. }));
  76611. else {
  76612. var p = {};
  76613. p[h] = o, u.selectRange(p);
  76614. }
  76615. });
  76616. Md(c, function(h) {
  76617. u.setApproximateExtent(o, h);
  76618. });
  76619. }
  76620. });
  76621. function s(l) {
  76622. return l >= o[0] && l <= o[1];
  76623. }
  76624. }, t.prototype._updateMinMaxSpan = function() {
  76625. var e = this._minMaxSpan = {}, n = this._dataZoomModel, r = this._dataExtent;
  76626. Md(["min", "max"], function(i) {
  76627. var a = n.get(i + "Span"), o = n.get(i + "ValueSpan");
  76628. o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? a = Lt(r[0] + o, r, [0, 100], !0) : a != null && (o = Lt(a, [0, 100], r, !0) - r[0]), e[i + "Span"] = a, e[i + "ValueSpan"] = o;
  76629. }, this);
  76630. }, t.prototype._setAxisModel = function() {
  76631. var e = this.getAxisModel(), n = this._percentWindow, r = this._valueWindow;
  76632. if (n) {
  76633. var i = TR(r, [0, 500]);
  76634. i = Math.min(i, 20);
  76635. var a = e.axis.scale.rawExtentInfo;
  76636. n[0] !== 0 && a.setDeterminedMinMax("min", +r[0].toFixed(i)), n[1] !== 100 && a.setDeterminedMinMax("max", +r[1].toFixed(i)), a.freeze();
  76637. }
  76638. }, t;
  76639. }()
  76640. );
  76641. function kHe(t, e, n) {
  76642. var r = [1 / 0, -1 / 0];
  76643. Md(n, function(o) {
  76644. JNe(r, o.getData(), e);
  76645. });
  76646. var i = t.getAxisModel(), a = nte(i.axis.scale, i, r).calculate();
  76647. return [a.min, a.max];
  76648. }
  76649. var LHe = {
  76650. // `dataZoomProcessor` will only be performed in needed series. Consider if
  76651. // there is a line series and a pie series, it is better not to update the
  76652. // line series if only pie series is needed to be updated.
  76653. getTargetSeries: function(t) {
  76654. function e(i) {
  76655. t.eachComponent("dataZoom", function(a) {
  76656. a.eachTargetAxis(function(o, s) {
  76657. var l = t.getComponent(Fl(o), s);
  76658. i(o, s, l, a);
  76659. });
  76660. });
  76661. }
  76662. e(function(i, a, o, s) {
  76663. o.__dzAxisProxy = null;
  76664. });
  76665. var n = [];
  76666. e(function(i, a, o, s) {
  76667. o.__dzAxisProxy || (o.__dzAxisProxy = new RHe(i, a, s, t), n.push(o.__dzAxisProxy));
  76668. });
  76669. var r = Pe();
  76670. return k(n, function(i) {
  76671. k(i.getTargetSeriesModels(), function(a) {
  76672. r.set(a.uid, a);
  76673. });
  76674. }), r;
  76675. },
  76676. // Consider appendData, where filter should be performed. Because data process is
  76677. // in block mode currently, it is not need to worry about that the overallProgress
  76678. // execute every frame.
  76679. overallReset: function(t, e) {
  76680. t.eachComponent("dataZoom", function(n) {
  76681. n.eachTargetAxis(function(r, i) {
  76682. n.getAxisProxy(r, i).reset(n);
  76683. }), n.eachTargetAxis(function(r, i) {
  76684. n.getAxisProxy(r, i).filterData(n, e);
  76685. });
  76686. }), t.eachComponent("dataZoom", function(n) {
  76687. var r = n.findRepresentativeAxisProxy();
  76688. if (r) {
  76689. var i = r.getDataPercentWindow(), a = r.getDataValueWindow();
  76690. n.setCalculatedRange({
  76691. start: i[0],
  76692. end: i[1],
  76693. startValue: a[0],
  76694. endValue: a[1]
  76695. });
  76696. }
  76697. });
  76698. }
  76699. };
  76700. function NHe(t) {
  76701. t.registerAction("dataZoom", function(e, n) {
  76702. var r = MHe(n, e);
  76703. k(r, function(i) {
  76704. i.setRawRange({
  76705. start: e.start,
  76706. end: e.end,
  76707. startValue: e.startValue,
  76708. endValue: e.endValue
  76709. });
  76710. });
  76711. });
  76712. }
  76713. var m7 = !1;
  76714. function SL(t) {
  76715. m7 || (m7 = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, LHe), NHe(t), t.registerSubTypeDefaulter("dataZoom", function() {
  76716. return "slider";
  76717. }));
  76718. }
  76719. function BHe(t) {
  76720. t.registerComponentModel(IHe), t.registerComponentView(DHe), SL(t);
  76721. }
  76722. var pa = (
  76723. /** @class */
  76724. /* @__PURE__ */ function() {
  76725. function t() {
  76726. }
  76727. return t;
  76728. }()
  76729. ), Fre = {};
  76730. function Id(t, e) {
  76731. Fre[t] = e;
  76732. }
  76733. function Wre(t) {
  76734. return Fre[t];
  76735. }
  76736. var zHe = (
  76737. /** @class */
  76738. function(t) {
  76739. q(e, t);
  76740. function e() {
  76741. var n = t !== null && t.apply(this, arguments) || this;
  76742. return n.type = e.type, n;
  76743. }
  76744. return e.prototype.optionUpdated = function() {
  76745. t.prototype.optionUpdated.apply(this, arguments);
  76746. var n = this.ecModel;
  76747. k(this.option.feature, function(r, i) {
  76748. var a = Wre(i);
  76749. a && (a.getDefaultOption && (a.defaultOption = a.getDefaultOption(n)), qe(r, a.defaultOption));
  76750. });
  76751. }, e.type = "toolbox", e.layoutMode = {
  76752. type: "box",
  76753. ignoreSize: !0
  76754. }, e.defaultOption = {
  76755. show: !0,
  76756. z: 6,
  76757. // zlevel: 0,
  76758. orient: "horizontal",
  76759. left: "right",
  76760. top: "top",
  76761. // right
  76762. // bottom
  76763. backgroundColor: "transparent",
  76764. borderColor: "#ccc",
  76765. borderRadius: 0,
  76766. borderWidth: 0,
  76767. padding: 5,
  76768. itemSize: 15,
  76769. itemGap: 8,
  76770. showTitle: !0,
  76771. iconStyle: {
  76772. borderColor: "#666",
  76773. color: "none"
  76774. },
  76775. emphasis: {
  76776. iconStyle: {
  76777. borderColor: "#3E98C5"
  76778. }
  76779. },
  76780. // textStyle: {},
  76781. // feature
  76782. tooltip: {
  76783. show: !1,
  76784. position: "bottom"
  76785. }
  76786. }, e;
  76787. }(rt)
  76788. );
  76789. function VHe(t, e, n) {
  76790. var r = e.getBoxLayoutParams(), i = e.get("padding"), a = {
  76791. width: n.getWidth(),
  76792. height: n.getHeight()
  76793. }, o = Rn(r, a, i);
  76794. ef(e.get("orient"), t, e.get("itemGap"), o.width, o.height), aw(t, r, a, i);
  76795. }
  76796. function Qre(t, e) {
  76797. var n = Bf(e.get("padding")), r = e.getItemStyle(["color", "opacity"]);
  76798. return r.fill = e.get("backgroundColor"), t = new mt({
  76799. shape: {
  76800. x: t.x - n[3],
  76801. y: t.y - n[0],
  76802. width: t.width + n[1] + n[3],
  76803. height: t.height + n[0] + n[2],
  76804. r: e.get("borderRadius")
  76805. },
  76806. style: r,
  76807. silent: !0,
  76808. z2: -1
  76809. }), t;
  76810. }
  76811. var FHe = (
  76812. /** @class */
  76813. function(t) {
  76814. q(e, t);
  76815. function e() {
  76816. return t !== null && t.apply(this, arguments) || this;
  76817. }
  76818. return e.prototype.render = function(n, r, i, a) {
  76819. var o = this.group;
  76820. if (o.removeAll(), !n.get("show"))
  76821. return;
  76822. var s = +n.get("itemSize"), l = n.get("orient") === "vertical", u = n.get("feature") || {}, c = this._features || (this._features = {}), f = [];
  76823. k(u, function(p, v) {
  76824. f.push(v);
  76825. }), new Us(this._featureNames || [], f).add(d).update(d).remove(Ue(d, null)).execute(), this._featureNames = f;
  76826. function d(p, v) {
  76827. var g = f[p], m = f[v], y = u[g], b = new Wt(y, n, n.ecModel), _;
  76828. if (a && a.newTitle != null && a.featureName === g && (y.title = a.newTitle), g && !m) {
  76829. if (WHe(g))
  76830. _ = {
  76831. onclick: b.option.onclick,
  76832. featureName: g
  76833. };
  76834. else {
  76835. var O = Wre(g);
  76836. if (!O)
  76837. return;
  76838. _ = new O();
  76839. }
  76840. c[g] = _;
  76841. } else if (_ = c[m], !_)
  76842. return;
  76843. _.uid = yp("toolbox-feature"), _.model = b, _.ecModel = r, _.api = i;
  76844. var S = _ instanceof pa;
  76845. if (!g && m) {
  76846. S && _.dispose && _.dispose(r, i);
  76847. return;
  76848. }
  76849. if (!b.get("show") || S && _.unusable) {
  76850. S && _.remove && _.remove(r, i);
  76851. return;
  76852. }
  76853. h(b, _, g), b.setIconStatus = function(x, C) {
  76854. var T = this.option, w = this.iconPaths;
  76855. T.iconStatus = T.iconStatus || {}, T.iconStatus[x] = C, w[x] && (C === "emphasis" ? js : Zs)(w[x]);
  76856. }, _ instanceof pa && _.render && _.render(b, r, i, a);
  76857. }
  76858. function h(p, v, g) {
  76859. var m = p.getModel("iconStyle"), y = p.getModel(["emphasis", "iconStyle"]), b = v instanceof pa && v.getIcons ? v.getIcons() : p.get("icon"), _ = p.get("title") || {}, O, S;
  76860. Oe(b) ? (O = {}, O[g] = b) : O = b, Oe(_) ? (S = {}, S[g] = _) : S = _;
  76861. var x = p.iconPaths = {};
  76862. k(O, function(C, T) {
  76863. var w = vp(C, {}, {
  76864. x: -s / 2,
  76865. y: -s / 2,
  76866. width: s,
  76867. height: s
  76868. });
  76869. w.setStyle(m.getItemStyle());
  76870. var P = w.ensureState("emphasis");
  76871. P.style = y.getItemStyle();
  76872. var $ = new gt({
  76873. style: {
  76874. text: S[T],
  76875. align: y.get("textAlign"),
  76876. borderRadius: y.get("textBorderRadius"),
  76877. padding: y.get("textPadding"),
  76878. fill: null,
  76879. font: GR({
  76880. fontStyle: y.get("textFontStyle"),
  76881. fontFamily: y.get("textFontFamily"),
  76882. fontSize: y.get("textFontSize"),
  76883. fontWeight: y.get("textFontWeight")
  76884. }, r)
  76885. },
  76886. ignore: !0
  76887. });
  76888. w.setTextContent($), gp({
  76889. el: w,
  76890. componentModel: n,
  76891. itemName: T,
  76892. formatterParamsExtra: {
  76893. title: S[T]
  76894. }
  76895. }), w.__title = S[T], w.on("mouseover", function() {
  76896. var A = y.getItemStyle(), D = l ? n.get("right") == null && n.get("left") !== "right" ? "right" : "left" : n.get("bottom") == null && n.get("top") !== "bottom" ? "bottom" : "top";
  76897. $.setStyle({
  76898. fill: y.get("textFill") || A.fill || A.stroke || "#000",
  76899. backgroundColor: y.get("textBackgroundColor")
  76900. }), w.setTextConfig({
  76901. position: y.get("textPosition") || D
  76902. }), $.ignore = !n.get("showTitle"), i.enterEmphasis(this);
  76903. }).on("mouseout", function() {
  76904. p.get(["iconStatus", T]) !== "emphasis" && i.leaveEmphasis(this), $.hide();
  76905. }), (p.get(["iconStatus", T]) === "emphasis" ? js : Zs)(w), o.add(w), w.on("click", xe(v.onclick, v, r, i, T)), x[T] = w;
  76906. });
  76907. }
  76908. VHe(o, n, i), o.add(Qre(o.getBoundingRect(), n)), l || o.eachChild(function(p) {
  76909. var v = p.__title, g = p.ensureState("emphasis"), m = g.textConfig || (g.textConfig = {}), y = p.getTextContent(), b = y && y.ensureState("emphasis");
  76910. if (b && !Me(b) && v) {
  76911. var _ = b.style || (b.style = {}), O = k0(v, gt.makeFont(_)), S = p.x + o.x, x = p.y + o.y + s, C = !1;
  76912. x + O.height > i.getHeight() && (m.position = "top", C = !0);
  76913. var T = C ? -5 - O.height : s + 10;
  76914. S + O.width / 2 > i.getWidth() ? (m.position = ["100%", T], _.align = "right") : S - O.width / 2 < 0 && (m.position = [0, T], _.align = "left");
  76915. }
  76916. });
  76917. }, e.prototype.updateView = function(n, r, i, a) {
  76918. k(this._features, function(o) {
  76919. o instanceof pa && o.updateView && o.updateView(o.model, r, i, a);
  76920. });
  76921. }, e.prototype.remove = function(n, r) {
  76922. k(this._features, function(i) {
  76923. i instanceof pa && i.remove && i.remove(n, r);
  76924. }), this.group.removeAll();
  76925. }, e.prototype.dispose = function(n, r) {
  76926. k(this._features, function(i) {
  76927. i instanceof pa && i.dispose && i.dispose(n, r);
  76928. });
  76929. }, e.type = "toolbox", e;
  76930. }(Xt)
  76931. );
  76932. function WHe(t) {
  76933. return t.indexOf("my") === 0;
  76934. }
  76935. var QHe = (
  76936. /** @class */
  76937. function(t) {
  76938. q(e, t);
  76939. function e() {
  76940. return t !== null && t.apply(this, arguments) || this;
  76941. }
  76942. return e.prototype.onclick = function(n, r) {
  76943. var i = this.model, a = i.get("name") || n.get("title.0.text") || "echarts", o = r.getZr().painter.getType() === "svg", s = o ? "svg" : i.get("type", !0) || "png", l = r.getConnectedDataURL({
  76944. type: s,
  76945. backgroundColor: i.get("backgroundColor", !0) || n.get("backgroundColor") || "#fff",
  76946. connectedBackgroundColor: i.get("connectedBackgroundColor"),
  76947. excludeComponents: i.get("excludeComponents"),
  76948. pixelRatio: i.get("pixelRatio")
  76949. }), u = vt.browser;
  76950. if (typeof MouseEvent == "function" && (u.newEdge || !u.ie && !u.edge)) {
  76951. var c = document.createElement("a");
  76952. c.download = a + "." + s, c.target = "_blank", c.href = l;
  76953. var f = new MouseEvent("click", {
  76954. // some micro front-end framework, window maybe is a Proxy
  76955. view: document.defaultView,
  76956. bubbles: !0,
  76957. cancelable: !1
  76958. });
  76959. c.dispatchEvent(f);
  76960. } else if (window.navigator.msSaveOrOpenBlob || o) {
  76961. var d = l.split(","), h = d[0].indexOf("base64") > -1, p = o ? decodeURIComponent(d[1]) : d[1];
  76962. h && (p = window.atob(p));
  76963. var v = a + "." + s;
  76964. if (window.navigator.msSaveOrOpenBlob) {
  76965. for (var g = p.length, m = new Uint8Array(g); g--; )
  76966. m[g] = p.charCodeAt(g);
  76967. var y = new Blob([m]);
  76968. window.navigator.msSaveOrOpenBlob(y, v);
  76969. } else {
  76970. var b = document.createElement("iframe");
  76971. document.body.appendChild(b);
  76972. var _ = b.contentWindow, O = _.document;
  76973. O.open("image/svg+xml", "replace"), O.write(p), O.close(), _.focus(), O.execCommand("SaveAs", !0, v), document.body.removeChild(b);
  76974. }
  76975. } else {
  76976. var S = i.get("lang"), x = '<body style="margin:0;"><img src="' + l + '" style="max-width:100%;" title="' + (S && S[0] || "") + '" /></body>', C = window.open();
  76977. C.document.write(x), C.document.title = a;
  76978. }
  76979. }, e.getDefaultOption = function(n) {
  76980. var r = {
  76981. show: !0,
  76982. icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
  76983. title: n.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
  76984. type: "png",
  76985. // Default use option.backgroundColor
  76986. // backgroundColor: '#fff',
  76987. connectedBackgroundColor: "#fff",
  76988. name: "",
  76989. excludeComponents: ["toolbox"],
  76990. // use current pixel ratio of device by default
  76991. // pixelRatio: 1,
  76992. lang: n.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
  76993. };
  76994. return r;
  76995. }, e;
  76996. }(pa)
  76997. ), y7 = "__ec_magicType_stack__", HHe = [["line", "bar"], ["stack"]], GHe = (
  76998. /** @class */
  76999. function(t) {
  77000. q(e, t);
  77001. function e() {
  77002. return t !== null && t.apply(this, arguments) || this;
  77003. }
  77004. return e.prototype.getIcons = function() {
  77005. var n = this.model, r = n.get("icon"), i = {};
  77006. return k(n.get("type"), function(a) {
  77007. r[a] && (i[a] = r[a]);
  77008. }), i;
  77009. }, e.getDefaultOption = function(n) {
  77010. var r = {
  77011. show: !0,
  77012. type: [],
  77013. // Icon group
  77014. icon: {
  77015. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  77016. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  77017. // eslint-disable-next-line
  77018. stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"
  77019. // jshint ignore:line
  77020. },
  77021. // `line`, `bar`, `stack`, `tiled`
  77022. title: n.getLocaleModel().get(["toolbox", "magicType", "title"]),
  77023. option: {},
  77024. seriesIndex: {}
  77025. };
  77026. return r;
  77027. }, e.prototype.onclick = function(n, r, i) {
  77028. var a = this.model, o = a.get(["seriesIndex", i]);
  77029. if (b7[i]) {
  77030. var s = {
  77031. series: []
  77032. }, l = function(f) {
  77033. var d = f.subType, h = f.id, p = b7[i](d, h, f, a);
  77034. p && (Re(p, f.option), s.series.push(p));
  77035. var v = f.coordinateSystem;
  77036. if (v && v.type === "cartesian2d" && (i === "line" || i === "bar")) {
  77037. var g = v.getAxesByScale("ordinal")[0];
  77038. if (g) {
  77039. var m = g.dim, y = m + "Axis", b = f.getReferringComponents(y, Dn).models[0], _ = b.componentIndex;
  77040. s[y] = s[y] || [];
  77041. for (var O = 0; O <= _; O++)
  77042. s[y][_] = s[y][_] || {};
  77043. s[y][_].boundaryGap = i === "bar";
  77044. }
  77045. }
  77046. };
  77047. k(HHe, function(f) {
  77048. et(f, i) >= 0 && k(f, function(d) {
  77049. a.setIconStatus(d, "normal");
  77050. });
  77051. }), a.setIconStatus(i, "emphasis"), n.eachComponent({
  77052. mainType: "series",
  77053. query: o == null ? null : {
  77054. seriesIndex: o
  77055. }
  77056. }, l);
  77057. var u, c = i;
  77058. i === "stack" && (u = qe({
  77059. stack: a.option.title.tiled,
  77060. tiled: a.option.title.stack
  77061. }, a.option.title), a.get(["iconStatus", i]) !== "emphasis" && (c = "tiled")), r.dispatchAction({
  77062. type: "changeMagicType",
  77063. currentType: c,
  77064. newOption: s,
  77065. newTitle: u,
  77066. featureName: "magicType"
  77067. });
  77068. }
  77069. }, e;
  77070. }(pa)
  77071. ), b7 = {
  77072. line: function(t, e, n, r) {
  77073. if (t === "bar")
  77074. return qe({
  77075. id: e,
  77076. type: "line",
  77077. // Preserve data related option
  77078. data: n.get("data"),
  77079. stack: n.get("stack"),
  77080. markPoint: n.get("markPoint"),
  77081. markLine: n.get("markLine")
  77082. }, r.get(["option", "line"]) || {}, !0);
  77083. },
  77084. bar: function(t, e, n, r) {
  77085. if (t === "line")
  77086. return qe({
  77087. id: e,
  77088. type: "bar",
  77089. // Preserve data related option
  77090. data: n.get("data"),
  77091. stack: n.get("stack"),
  77092. markPoint: n.get("markPoint"),
  77093. markLine: n.get("markLine")
  77094. }, r.get(["option", "bar"]) || {}, !0);
  77095. },
  77096. stack: function(t, e, n, r) {
  77097. var i = n.get("stack") === y7;
  77098. if (t === "line" || t === "bar")
  77099. return r.setIconStatus("stack", i ? "normal" : "emphasis"), qe({
  77100. id: e,
  77101. stack: i ? "" : y7
  77102. }, r.get(["option", "stack"]) || {}, !0);
  77103. }
  77104. };
  77105. vo({
  77106. type: "changeMagicType",
  77107. event: "magicTypeChanged",
  77108. update: "prepareAndUpdate"
  77109. }, function(t, e) {
  77110. e.mergeOption(t.newOption);
  77111. });
  77112. var xw = new Array(60).join("-"), jh = " ";
  77113. function jHe(t) {
  77114. var e = {}, n = [], r = [];
  77115. return t.eachRawSeries(function(i) {
  77116. var a = i.coordinateSystem;
  77117. if (a && (a.type === "cartesian2d" || a.type === "polar")) {
  77118. var o = a.getBaseAxis();
  77119. if (o.type === "category") {
  77120. var s = o.dim + "_" + o.index;
  77121. e[s] || (e[s] = {
  77122. categoryAxis: o,
  77123. valueAxis: a.getOtherAxis(o),
  77124. series: []
  77125. }, r.push({
  77126. axisDim: o.dim,
  77127. axisIndex: o.index
  77128. })), e[s].series.push(i);
  77129. } else
  77130. n.push(i);
  77131. } else
  77132. n.push(i);
  77133. }), {
  77134. seriesGroupByCategoryAxis: e,
  77135. other: n,
  77136. meta: r
  77137. };
  77138. }
  77139. function ZHe(t) {
  77140. var e = [];
  77141. return k(t, function(n, r) {
  77142. var i = n.categoryAxis, a = n.valueAxis, o = a.dim, s = [" "].concat(ce(n.series, function(h) {
  77143. return h.name;
  77144. })), l = [i.model.getCategories()];
  77145. k(n.series, function(h) {
  77146. var p = h.getRawData();
  77147. l.push(h.getRawData().mapArray(p.mapDimension(o), function(v) {
  77148. return v;
  77149. }));
  77150. });
  77151. for (var u = [s.join(jh)], c = 0; c < l[0].length; c++) {
  77152. for (var f = [], d = 0; d < l.length; d++)
  77153. f.push(l[d][c]);
  77154. u.push(f.join(jh));
  77155. }
  77156. e.push(u.join(`
  77157. `));
  77158. }), e.join(`
  77159. ` + xw + `
  77160. `);
  77161. }
  77162. function UHe(t) {
  77163. return ce(t, function(e) {
  77164. var n = e.getRawData(), r = [e.name], i = [];
  77165. return n.each(n.dimensions, function() {
  77166. for (var a = arguments.length, o = arguments[a - 1], s = n.getName(o), l = 0; l < a - 1; l++)
  77167. i[l] = arguments[l];
  77168. r.push((s ? s + jh : "") + i.join(jh));
  77169. }), r.join(`
  77170. `);
  77171. }).join(`
  77172. ` + xw + `
  77173. `);
  77174. }
  77175. function XHe(t) {
  77176. var e = jHe(t);
  77177. return {
  77178. value: Nt([ZHe(e.seriesGroupByCategoryAxis), UHe(e.other)], function(n) {
  77179. return !!n.replace(/[\n\t\s]/g, "");
  77180. }).join(`
  77181. ` + xw + `
  77182. `),
  77183. meta: e.meta
  77184. };
  77185. }
  77186. function WO(t) {
  77187. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
  77188. }
  77189. function YHe(t) {
  77190. var e = t.slice(0, t.indexOf(`
  77191. `));
  77192. if (e.indexOf(jh) >= 0)
  77193. return !0;
  77194. }
  77195. var DE = new RegExp("[" + jh + "]+", "g");
  77196. function qHe(t) {
  77197. for (var e = t.split(/\n+/g), n = WO(e.shift()).split(DE), r = [], i = ce(n, function(l) {
  77198. return {
  77199. name: l,
  77200. data: []
  77201. };
  77202. }), a = 0; a < e.length; a++) {
  77203. var o = WO(e[a]).split(DE);
  77204. r.push(o.shift());
  77205. for (var s = 0; s < o.length; s++)
  77206. i[s] && (i[s].data[a] = o[s]);
  77207. }
  77208. return {
  77209. series: i,
  77210. categories: r
  77211. };
  77212. }
  77213. function KHe(t) {
  77214. for (var e = t.split(/\n+/g), n = WO(e.shift()), r = [], i = 0; i < e.length; i++) {
  77215. var a = WO(e[i]);
  77216. if (a) {
  77217. var o = a.split(DE), s = "", l = void 0, u = !1;
  77218. isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), r[i] = {
  77219. name: s,
  77220. value: []
  77221. }, l = r[i].value) : l = r[i] = [];
  77222. for (var c = 0; c < o.length; c++)
  77223. l.push(+o[c]);
  77224. l.length === 1 && (u ? r[i].value = l[0] : r[i] = l[0]);
  77225. }
  77226. }
  77227. return {
  77228. name: n,
  77229. data: r
  77230. };
  77231. }
  77232. function JHe(t, e) {
  77233. var n = t.split(new RegExp(`
  77234. *` + xw + `
  77235. *`, "g")), r = {
  77236. series: []
  77237. };
  77238. return k(n, function(i, a) {
  77239. if (YHe(i)) {
  77240. var o = qHe(i), s = e[a], l = s.axisDim + "Axis";
  77241. s && (r[l] = r[l] || [], r[l][s.axisIndex] = {
  77242. data: o.categories
  77243. }, r.series = r.series.concat(o.series));
  77244. } else {
  77245. var o = KHe(i);
  77246. r.series.push(o);
  77247. }
  77248. }), r;
  77249. }
  77250. var e9e = (
  77251. /** @class */
  77252. function(t) {
  77253. q(e, t);
  77254. function e() {
  77255. return t !== null && t.apply(this, arguments) || this;
  77256. }
  77257. return e.prototype.onclick = function(n, r) {
  77258. setTimeout(function() {
  77259. r.dispatchAction({
  77260. type: "hideTip"
  77261. });
  77262. });
  77263. var i = r.getDom(), a = this.model;
  77264. this._dom && i.removeChild(this._dom);
  77265. var o = document.createElement("div");
  77266. o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = a.get("backgroundColor") || "#fff";
  77267. var s = document.createElement("h4"), l = a.get("lang") || [];
  77268. s.innerHTML = l[0] || a.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = a.get("textColor");
  77269. var u = document.createElement("div"), c = document.createElement("textarea");
  77270. u.style.cssText = "overflow:auto";
  77271. var f = a.get("optionToContent"), d = a.get("contentToOption"), h = XHe(n);
  77272. if (Me(f)) {
  77273. var p = f(r.getOption());
  77274. Oe(p) ? u.innerHTML = p : au(p) && u.appendChild(p);
  77275. } else {
  77276. c.readOnly = a.get("readOnly");
  77277. var v = c.style;
  77278. v.cssText = "display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none", v.color = a.get("textColor"), v.borderColor = a.get("textareaBorderColor"), v.backgroundColor = a.get("textareaColor"), c.value = h.value, u.appendChild(c);
  77279. }
  77280. var g = h.meta, m = document.createElement("div");
  77281. m.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
  77282. var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", b = document.createElement("div"), _ = document.createElement("div");
  77283. y += ";background-color:" + a.get("buttonColor"), y += ";color:" + a.get("buttonTextColor");
  77284. var O = this;
  77285. function S() {
  77286. i.removeChild(o), O._dom = null;
  77287. }
  77288. cA(b, "click", S), cA(_, "click", function() {
  77289. if (d == null && f != null || d != null && f == null) {
  77290. process.env.NODE_ENV !== "production" && dn("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), S();
  77291. return;
  77292. }
  77293. var x;
  77294. try {
  77295. Me(d) ? x = d(u, r.getOption()) : x = JHe(c.value, g);
  77296. } catch (C) {
  77297. throw S(), new Error("Data view format error " + C);
  77298. }
  77299. x && r.dispatchAction({
  77300. type: "changeDataView",
  77301. newOption: x
  77302. }), S();
  77303. }), b.innerHTML = l[1], _.innerHTML = l[2], _.style.cssText = b.style.cssText = y, !a.get("readOnly") && m.appendChild(_), m.appendChild(b), o.appendChild(s), o.appendChild(u), o.appendChild(m), u.style.height = i.clientHeight - 80 + "px", i.appendChild(o), this._dom = o;
  77304. }, e.prototype.remove = function(n, r) {
  77305. this._dom && r.getDom().removeChild(this._dom);
  77306. }, e.prototype.dispose = function(n, r) {
  77307. this.remove(n, r);
  77308. }, e.getDefaultOption = function(n) {
  77309. var r = {
  77310. show: !0,
  77311. readOnly: !1,
  77312. optionToContent: null,
  77313. contentToOption: null,
  77314. // eslint-disable-next-line
  77315. icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
  77316. title: n.getLocaleModel().get(["toolbox", "dataView", "title"]),
  77317. lang: n.getLocaleModel().get(["toolbox", "dataView", "lang"]),
  77318. backgroundColor: "#fff",
  77319. textColor: "#000",
  77320. textareaColor: "#fff",
  77321. textareaBorderColor: "#333",
  77322. buttonColor: "#c23531",
  77323. buttonTextColor: "#fff"
  77324. };
  77325. return r;
  77326. }, e;
  77327. }(pa)
  77328. );
  77329. function t9e(t, e) {
  77330. return ce(t, function(n, r) {
  77331. var i = e && e[r];
  77332. if (Ie(i) && !ue(i)) {
  77333. var a = Ie(n) && !ue(n);
  77334. a || (n = {
  77335. value: n
  77336. });
  77337. var o = i.name != null && n.name == null;
  77338. return n = Re(n, i), o && delete n.name, n;
  77339. } else
  77340. return n;
  77341. });
  77342. }
  77343. vo({
  77344. type: "changeDataView",
  77345. event: "dataViewChanged",
  77346. update: "prepareAndUpdate"
  77347. }, function(t, e) {
  77348. var n = [];
  77349. k(t.newOption.series, function(r) {
  77350. var i = e.getSeriesByName(r.name)[0];
  77351. if (!i)
  77352. n.push(le({
  77353. // Default is scatter
  77354. type: "scatter"
  77355. }, r));
  77356. else {
  77357. var a = i.get("data");
  77358. n.push({
  77359. name: r.name,
  77360. data: t9e(r.data, a)
  77361. });
  77362. }
  77363. }), e.mergeOption(Re({
  77364. series: n
  77365. }, t.newOption));
  77366. });
  77367. var Hre = k, Gre = bt();
  77368. function n9e(t, e) {
  77369. var n = xL(t);
  77370. Hre(e, function(r, i) {
  77371. for (var a = n.length - 1; a >= 0; a--) {
  77372. var o = n[a];
  77373. if (o[i])
  77374. break;
  77375. }
  77376. if (a < 0) {
  77377. var s = t.queryComponents({
  77378. mainType: "dataZoom",
  77379. subType: "select",
  77380. id: i
  77381. })[0];
  77382. if (s) {
  77383. var l = s.getPercentRange();
  77384. n[0][i] = {
  77385. dataZoomId: i,
  77386. start: l[0],
  77387. end: l[1]
  77388. };
  77389. }
  77390. }
  77391. }), n.push(e);
  77392. }
  77393. function r9e(t) {
  77394. var e = xL(t), n = e[e.length - 1];
  77395. e.length > 1 && e.pop();
  77396. var r = {};
  77397. return Hre(n, function(i, a) {
  77398. for (var o = e.length - 1; o >= 0; o--)
  77399. if (i = e[o][a], i) {
  77400. r[a] = i;
  77401. break;
  77402. }
  77403. }), r;
  77404. }
  77405. function i9e(t) {
  77406. Gre(t).snapshots = null;
  77407. }
  77408. function a9e(t) {
  77409. return xL(t).length;
  77410. }
  77411. function xL(t) {
  77412. var e = Gre(t);
  77413. return e.snapshots || (e.snapshots = [{}]), e.snapshots;
  77414. }
  77415. var o9e = (
  77416. /** @class */
  77417. function(t) {
  77418. q(e, t);
  77419. function e() {
  77420. return t !== null && t.apply(this, arguments) || this;
  77421. }
  77422. return e.prototype.onclick = function(n, r) {
  77423. i9e(n), r.dispatchAction({
  77424. type: "restore",
  77425. from: this.uid
  77426. });
  77427. }, e.getDefaultOption = function(n) {
  77428. var r = {
  77429. show: !0,
  77430. // eslint-disable-next-line
  77431. icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
  77432. title: n.getLocaleModel().get(["toolbox", "restore", "title"])
  77433. };
  77434. return r;
  77435. }, e;
  77436. }(pa)
  77437. );
  77438. vo({
  77439. type: "restore",
  77440. event: "restore",
  77441. update: "prepareAndUpdate"
  77442. }, function(t, e) {
  77443. e.resetOption("recreate");
  77444. });
  77445. var s9e = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], wL = (
  77446. /** @class */
  77447. function() {
  77448. function t(e, n, r) {
  77449. var i = this;
  77450. this._targetInfoList = [];
  77451. var a = _7(n, e);
  77452. k(l9e, function(o, s) {
  77453. (!r || !r.include || et(r.include, s) >= 0) && o(a, i._targetInfoList);
  77454. });
  77455. }
  77456. return t.prototype.setOutputRanges = function(e, n) {
  77457. return this.matchOutputRanges(e, n, function(r, i, a) {
  77458. if ((r.coordRanges || (r.coordRanges = [])).push(i), !r.coordRange) {
  77459. r.coordRange = i;
  77460. var o = XP[r.brushType](0, a, i);
  77461. r.__rangeOffset = {
  77462. offset: w7[r.brushType](o.values, r.range, [1, 1]),
  77463. xyMinMax: o.xyMinMax
  77464. };
  77465. }
  77466. }), e;
  77467. }, t.prototype.matchOutputRanges = function(e, n, r) {
  77468. k(e, function(i) {
  77469. var a = this.findTargetInfo(i, n);
  77470. a && a !== !0 && k(a.coordSyses, function(o) {
  77471. var s = XP[i.brushType](1, o, i.range, !0);
  77472. r(i, s.values, o, n);
  77473. });
  77474. }, this);
  77475. }, t.prototype.setInputRanges = function(e, n) {
  77476. k(e, function(r) {
  77477. var i = this.findTargetInfo(r, n);
  77478. if (process.env.NODE_ENV !== "production" && (ke(!i || i === !0 || r.coordRange, "coordRange must be specified when coord index specified."), ke(!i || i !== !0 || r.range, "range must be specified in global brush.")), r.range = r.range || [], i && i !== !0) {
  77479. r.panelId = i.panelId;
  77480. var a = XP[r.brushType](0, i.coordSys, r.coordRange), o = r.__rangeOffset;
  77481. r.range = o ? w7[r.brushType](a.values, o.offset, u9e(a.xyMinMax, o.xyMinMax)) : a.values;
  77482. }
  77483. }, this);
  77484. }, t.prototype.makePanelOpts = function(e, n) {
  77485. return ce(this._targetInfoList, function(r) {
  77486. var i = r.getPanelRect();
  77487. return {
  77488. panelId: r.panelId,
  77489. defaultBrushType: n ? n(r) : null,
  77490. clipPath: Kne(i),
  77491. isTargetByCursor: ere(i, e, r.coordSysModel),
  77492. getLinearBrushOtherExtent: Jne(i)
  77493. };
  77494. });
  77495. }, t.prototype.controlSeries = function(e, n, r) {
  77496. var i = this.findTargetInfo(e, r);
  77497. return i === !0 || i && et(i.coordSyses, n.coordinateSystem) >= 0;
  77498. }, t.prototype.findTargetInfo = function(e, n) {
  77499. for (var r = this._targetInfoList, i = _7(n, e), a = 0; a < r.length; a++) {
  77500. var o = r[a], s = e.panelId;
  77501. if (s) {
  77502. if (o.panelId === s)
  77503. return o;
  77504. } else
  77505. for (var l = 0; l < O7.length; l++)
  77506. if (O7[l](i, o))
  77507. return o;
  77508. }
  77509. return !0;
  77510. }, t;
  77511. }()
  77512. );
  77513. function RE(t) {
  77514. return t[0] > t[1] && t.reverse(), t;
  77515. }
  77516. function _7(t, e) {
  77517. return $g(t, e, {
  77518. includeMainTypes: s9e
  77519. });
  77520. }
  77521. var l9e = {
  77522. grid: function(t, e) {
  77523. var n = t.xAxisModels, r = t.yAxisModels, i = t.gridModels, a = Pe(), o = {}, s = {};
  77524. !n && !r && !i || (k(n, function(l) {
  77525. var u = l.axis.grid.model;
  77526. a.set(u.id, u), o[u.id] = !0;
  77527. }), k(r, function(l) {
  77528. var u = l.axis.grid.model;
  77529. a.set(u.id, u), s[u.id] = !0;
  77530. }), k(i, function(l) {
  77531. a.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
  77532. }), a.each(function(l) {
  77533. var u = l.coordinateSystem, c = [];
  77534. k(u.getCartesians(), function(f, d) {
  77535. (et(n, f.getAxis("x").model) >= 0 || et(r, f.getAxis("y").model) >= 0) && c.push(f);
  77536. }), e.push({
  77537. panelId: "grid--" + l.id,
  77538. gridModel: l,
  77539. coordSysModel: l,
  77540. // Use the first one as the representitive coordSys.
  77541. coordSys: c[0],
  77542. coordSyses: c,
  77543. getPanelRect: S7.grid,
  77544. xAxisDeclared: o[l.id],
  77545. yAxisDeclared: s[l.id]
  77546. });
  77547. }));
  77548. },
  77549. geo: function(t, e) {
  77550. k(t.geoModels, function(n) {
  77551. var r = n.coordinateSystem;
  77552. e.push({
  77553. panelId: "geo--" + n.id,
  77554. geoModel: n,
  77555. coordSysModel: n,
  77556. coordSys: r,
  77557. coordSyses: [r],
  77558. getPanelRect: S7.geo
  77559. });
  77560. });
  77561. }
  77562. }, O7 = [
  77563. // grid
  77564. function(t, e) {
  77565. var n = t.xAxisModel, r = t.yAxisModel, i = t.gridModel;
  77566. return !i && n && (i = n.axis.grid.model), !i && r && (i = r.axis.grid.model), i && i === e.gridModel;
  77567. },
  77568. // geo
  77569. function(t, e) {
  77570. var n = t.geoModel;
  77571. return n && n === e.geoModel;
  77572. }
  77573. ], S7 = {
  77574. grid: function() {
  77575. return this.coordSys.master.getRect().clone();
  77576. },
  77577. geo: function() {
  77578. var t = this.coordSys, e = t.getBoundingRect().clone();
  77579. return e.applyTransform(ql(t)), e;
  77580. }
  77581. }, XP = {
  77582. lineX: Ue(x7, 0),
  77583. lineY: Ue(x7, 1),
  77584. rect: function(t, e, n, r) {
  77585. var i = t ? e.pointToData([n[0][0], n[1][0]], r) : e.dataToPoint([n[0][0], n[1][0]], r), a = t ? e.pointToData([n[0][1], n[1][1]], r) : e.dataToPoint([n[0][1], n[1][1]], r), o = [RE([i[0], a[0]]), RE([i[1], a[1]])];
  77586. return {
  77587. values: o,
  77588. xyMinMax: o
  77589. };
  77590. },
  77591. polygon: function(t, e, n, r) {
  77592. var i = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], a = ce(n, function(o) {
  77593. var s = t ? e.pointToData(o, r) : e.dataToPoint(o, r);
  77594. return i[0][0] = Math.min(i[0][0], s[0]), i[1][0] = Math.min(i[1][0], s[1]), i[0][1] = Math.max(i[0][1], s[0]), i[1][1] = Math.max(i[1][1], s[1]), s;
  77595. });
  77596. return {
  77597. values: a,
  77598. xyMinMax: i
  77599. };
  77600. }
  77601. };
  77602. function x7(t, e, n, r) {
  77603. process.env.NODE_ENV !== "production" && ke(n.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
  77604. var i = n.getAxis(["x", "y"][t]), a = RE(ce([0, 1], function(s) {
  77605. return e ? i.coordToData(i.toLocalCoord(r[s]), !0) : i.toGlobalCoord(i.dataToCoord(r[s]));
  77606. })), o = [];
  77607. return o[t] = a, o[1 - t] = [NaN, NaN], {
  77608. values: a,
  77609. xyMinMax: o
  77610. };
  77611. }
  77612. var w7 = {
  77613. lineX: Ue(C7, 0),
  77614. lineY: Ue(C7, 1),
  77615. rect: function(t, e, n) {
  77616. return [[t[0][0] - n[0] * e[0][0], t[0][1] - n[0] * e[0][1]], [t[1][0] - n[1] * e[1][0], t[1][1] - n[1] * e[1][1]]];
  77617. },
  77618. polygon: function(t, e, n) {
  77619. return ce(t, function(r, i) {
  77620. return [r[0] - n[0] * e[i][0], r[1] - n[1] * e[i][1]];
  77621. });
  77622. }
  77623. };
  77624. function C7(t, e, n, r) {
  77625. return [e[0] - r[t] * n[0], e[1] - r[t] * n[1]];
  77626. }
  77627. function u9e(t, e) {
  77628. var n = T7(t), r = T7(e), i = [n[0] / r[0], n[1] / r[1]];
  77629. return isNaN(i[0]) && (i[0] = 1), isNaN(i[1]) && (i[1] = 1), i;
  77630. }
  77631. function T7(t) {
  77632. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN];
  77633. }
  77634. var kE = k, c9e = XDe("toolbox-dataZoom_"), f9e = (
  77635. /** @class */
  77636. function(t) {
  77637. q(e, t);
  77638. function e() {
  77639. return t !== null && t.apply(this, arguments) || this;
  77640. }
  77641. return e.prototype.render = function(n, r, i, a) {
  77642. this._brushController || (this._brushController = new Jk(i.getZr()), this._brushController.on("brush", xe(this._onBrush, this)).mount()), p9e(n, r, this, a, i), h9e(n, r);
  77643. }, e.prototype.onclick = function(n, r, i) {
  77644. d9e[i].call(this);
  77645. }, e.prototype.remove = function(n, r) {
  77646. this._brushController && this._brushController.unmount();
  77647. }, e.prototype.dispose = function(n, r) {
  77648. this._brushController && this._brushController.dispose();
  77649. }, e.prototype._onBrush = function(n) {
  77650. var r = n.areas;
  77651. if (!n.isEnd || !r.length)
  77652. return;
  77653. var i = {}, a = this.ecModel;
  77654. this._brushController.updateCovers([]);
  77655. var o = new wL(CL(this.model), a, {
  77656. include: ["grid"]
  77657. });
  77658. o.matchOutputRanges(r, a, function(u, c, f) {
  77659. if (f.type === "cartesian2d") {
  77660. var d = u.brushType;
  77661. d === "rect" ? (s("x", f, c[0]), s("y", f, c[1])) : s({
  77662. lineX: "x",
  77663. lineY: "y"
  77664. }[d], f, c);
  77665. }
  77666. }), n9e(a, i), this._dispatchZoomAction(i);
  77667. function s(u, c, f) {
  77668. var d = c.getAxis(u), h = d.model, p = l(u, h, a), v = p.findRepresentativeAxisProxy(h).getMinMaxSpan();
  77669. (v.minValueSpan != null || v.maxValueSpan != null) && (f = Qf(0, f.slice(), d.scale.getExtent(), 0, v.minValueSpan, v.maxValueSpan)), p && (i[p.id] = {
  77670. dataZoomId: p.id,
  77671. startValue: f[0],
  77672. endValue: f[1]
  77673. });
  77674. }
  77675. function l(u, c, f) {
  77676. var d;
  77677. return f.eachComponent({
  77678. mainType: "dataZoom",
  77679. subType: "select"
  77680. }, function(h) {
  77681. var p = h.getAxisModel(u, c.componentIndex);
  77682. p && (d = h);
  77683. }), d;
  77684. }
  77685. }, e.prototype._dispatchZoomAction = function(n) {
  77686. var r = [];
  77687. kE(n, function(i, a) {
  77688. r.push(Le(i));
  77689. }), r.length && this.api.dispatchAction({
  77690. type: "dataZoom",
  77691. from: this.uid,
  77692. batch: r
  77693. });
  77694. }, e.getDefaultOption = function(n) {
  77695. var r = {
  77696. show: !0,
  77697. filterMode: "filter",
  77698. // Icon group
  77699. icon: {
  77700. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  77701. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  77702. },
  77703. // `zoom`, `back`
  77704. title: n.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
  77705. brushStyle: {
  77706. borderWidth: 0,
  77707. color: "rgba(210,219,238,0.2)"
  77708. }
  77709. };
  77710. return r;
  77711. }, e;
  77712. }(pa)
  77713. ), d9e = {
  77714. zoom: function() {
  77715. var t = !this._isZoomActive;
  77716. this.api.dispatchAction({
  77717. type: "takeGlobalCursor",
  77718. key: "dataZoomSelect",
  77719. dataZoomSelectActive: t
  77720. });
  77721. },
  77722. back: function() {
  77723. this._dispatchZoomAction(r9e(this.ecModel));
  77724. }
  77725. };
  77726. function CL(t) {
  77727. var e = {
  77728. xAxisIndex: t.get("xAxisIndex", !0),
  77729. yAxisIndex: t.get("yAxisIndex", !0),
  77730. xAxisId: t.get("xAxisId", !0),
  77731. yAxisId: t.get("yAxisId", !0)
  77732. };
  77733. return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
  77734. }
  77735. function h9e(t, e) {
  77736. t.setIconStatus("back", a9e(e) > 1 ? "emphasis" : "normal");
  77737. }
  77738. function p9e(t, e, n, r, i) {
  77739. var a = n._isZoomActive;
  77740. r && r.type === "takeGlobalCursor" && (a = r.key === "dataZoomSelect" ? r.dataZoomSelectActive : !1), n._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal");
  77741. var o = new wL(CL(t), e, {
  77742. include: ["grid"]
  77743. }), s = o.makePanelOpts(i, function(l) {
  77744. return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
  77745. });
  77746. n._brushController.setPanels(s).enableBrush(a && s.length ? {
  77747. brushType: "auto",
  77748. brushStyle: t.getModel("brushStyle").getItemStyle()
  77749. } : !1);
  77750. }
  77751. xLe("dataZoom", function(t) {
  77752. var e = t.getComponent("toolbox", 0), n = ["feature", "dataZoom"];
  77753. if (!e || e.get(n) == null)
  77754. return;
  77755. var r = e.getModel(n), i = [], a = CL(r), o = $g(t, a);
  77756. kE(o.xAxisModels, function(l) {
  77757. return s(l, "xAxis", "xAxisIndex");
  77758. }), kE(o.yAxisModels, function(l) {
  77759. return s(l, "yAxis", "yAxisIndex");
  77760. });
  77761. function s(l, u, c) {
  77762. var f = l.componentIndex, d = {
  77763. type: "select",
  77764. $fromToolbox: !0,
  77765. // Default to be filter
  77766. filterMode: r.get("filterMode", !0) || "filter",
  77767. // Id for merge mapping.
  77768. id: c9e + u + f
  77769. };
  77770. d[c] = f, i.push(d);
  77771. }
  77772. return i;
  77773. });
  77774. function v9e(t) {
  77775. t.registerComponentModel(zHe), t.registerComponentView(FHe), Id("saveAsImage", QHe), Id("magicType", GHe), Id("dataView", e9e), Id("dataZoom", f9e), Id("restore", o9e), at(BHe);
  77776. }
  77777. var g9e = (
  77778. /** @class */
  77779. function(t) {
  77780. q(e, t);
  77781. function e() {
  77782. var n = t !== null && t.apply(this, arguments) || this;
  77783. return n.type = e.type, n;
  77784. }
  77785. return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
  77786. // zlevel: 0,
  77787. z: 60,
  77788. show: !0,
  77789. // tooltip main content
  77790. showContent: !0,
  77791. // 'trigger' only works on coordinate system.
  77792. // 'item' | 'axis' | 'none'
  77793. trigger: "item",
  77794. // 'click' | 'mousemove' | 'none'
  77795. triggerOn: "mousemove|click",
  77796. alwaysShowContent: !1,
  77797. displayMode: "single",
  77798. renderMode: "auto",
  77799. // whether restraint content inside viewRect.
  77800. // If renderMode: 'richText', default true.
  77801. // If renderMode: 'html', defaut false (for backward compat).
  77802. confine: null,
  77803. showDelay: 0,
  77804. hideDelay: 100,
  77805. // Animation transition time, unit is second
  77806. transitionDuration: 0.4,
  77807. enterable: !1,
  77808. backgroundColor: "#fff",
  77809. // box shadow
  77810. shadowBlur: 10,
  77811. shadowColor: "rgba(0, 0, 0, .2)",
  77812. shadowOffsetX: 1,
  77813. shadowOffsetY: 2,
  77814. // tooltip border radius, unit is px, default is 4
  77815. borderRadius: 4,
  77816. // tooltip border width, unit is px, default is 0 (no border)
  77817. borderWidth: 1,
  77818. // Tooltip inside padding, default is 5 for all direction
  77819. // Array is allowed to set up, right, bottom, left, same with css
  77820. // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.
  77821. padding: null,
  77822. // Extra css text
  77823. extraCssText: "",
  77824. // axis indicator, trigger by axis
  77825. axisPointer: {
  77826. // default is line
  77827. // legal values: 'line' | 'shadow' | 'cross'
  77828. type: "line",
  77829. // Valid when type is line, appoint tooltip line locate on which line. Optional
  77830. // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'
  77831. // default is 'auto', chose the axis which type is category.
  77832. // for multiply y axis, cartesian coord chose x axis, polar chose angle axis
  77833. axis: "auto",
  77834. animation: "auto",
  77835. animationDurationUpdate: 200,
  77836. animationEasingUpdate: "exponentialOut",
  77837. crossStyle: {
  77838. color: "#999",
  77839. width: 1,
  77840. type: "dashed",
  77841. // TODO formatter
  77842. textStyle: {}
  77843. }
  77844. // lineStyle and shadowStyle should not be specified here,
  77845. // otherwise it will always override those styles on option.axisPointer.
  77846. },
  77847. textStyle: {
  77848. color: "#666",
  77849. fontSize: 14
  77850. }
  77851. }, e;
  77852. }(rt)
  77853. );
  77854. function jre(t) {
  77855. var e = t.get("confine");
  77856. return e != null ? !!e : t.get("renderMode") === "richText";
  77857. }
  77858. function Zre(t) {
  77859. if (vt.domSupported) {
  77860. for (var e = document.documentElement.style, n = 0, r = t.length; n < r; n++)
  77861. if (t[n] in e)
  77862. return t[n];
  77863. }
  77864. }
  77865. var Ure = Zre(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), m9e = Zre(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
  77866. function Xre(t, e) {
  77867. if (!t)
  77868. return e;
  77869. e = JR(e, !0);
  77870. var n = t.indexOf(e);
  77871. return t = n === -1 ? e : "-" + t.slice(0, n) + "-" + e, t.toLowerCase();
  77872. }
  77873. function y9e(t, e) {
  77874. var n = t.currentStyle || document.defaultView && document.defaultView.getComputedStyle(t);
  77875. return n ? n[e] : null;
  77876. }
  77877. var b9e = Xre(m9e, "transition"), TL = Xre(Ure, "transform"), _9e = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (vt.transform3dSupported ? "will-change:transform;" : "");
  77878. function O9e(t) {
  77879. return t = t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top", t;
  77880. }
  77881. function S9e(t, e, n) {
  77882. if (!Oe(n) || n === "inside")
  77883. return "";
  77884. var r = t.get("backgroundColor"), i = t.get("borderWidth");
  77885. e = _f(e);
  77886. var a = O9e(n), o = Math.max(Math.round(i) * 1.5, 6), s = "", l = TL + ":", u;
  77887. et(["left", "right"], a) > -1 ? (s += "top:50%", l += "translateY(-50%) rotate(" + (u = a === "left" ? -225 : -45) + "deg)") : (s += "left:50%", l += "translateX(-50%) rotate(" + (u = a === "top" ? 225 : 45) + "deg)");
  77888. var c = u * Math.PI / 180, f = o + i, d = f * Math.abs(Math.cos(c)) + f * Math.abs(Math.sin(c)), h = Math.round(((d - Math.SQRT2 * i) / 2 + Math.SQRT2 * i - (d - f) / 2) * 100) / 100;
  77889. s += ";" + a + ":-" + h + "px";
  77890. var p = e + " solid " + i + "px;", v = ["position:absolute;width:" + o + "px;height:" + o + "px;z-index:-1;", s + ";" + l + ";", "border-bottom:" + p, "border-right:" + p, "background-color:" + r + ";"];
  77891. return '<div style="' + v.join("") + '"></div>';
  77892. }
  77893. function x9e(t, e) {
  77894. var n = "cubic-bezier(0.23,1,0.32,1)", r = " " + t / 2 + "s " + n, i = "opacity" + r + ",visibility" + r;
  77895. return e || (r = " " + t + "s " + n, i += vt.transformSupported ? "," + TL + r : ",left" + r + ",top" + r), b9e + ":" + i;
  77896. }
  77897. function P7(t, e, n) {
  77898. var r = t.toFixed(0) + "px", i = e.toFixed(0) + "px";
  77899. if (!vt.transformSupported)
  77900. return n ? "top:" + i + ";left:" + r + ";" : [["top", i], ["left", r]];
  77901. var a = vt.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + r + "," + i + (a ? ",0" : "") + ")";
  77902. return n ? "top:0;left:0;" + TL + ":" + o + ";" : [["top", 0], ["left", 0], [Ure, o]];
  77903. }
  77904. function w9e(t) {
  77905. var e = [], n = t.get("fontSize"), r = t.getTextColor();
  77906. r && e.push("color:" + r), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(n * 3 / 2) + "px");
  77907. var i = t.get("textShadowColor"), a = t.get("textShadowBlur") || 0, o = t.get("textShadowOffsetX") || 0, s = t.get("textShadowOffsetY") || 0;
  77908. return i && a && e.push("text-shadow:" + o + "px " + s + "px " + a + "px " + i), k(["decoration", "align"], function(l) {
  77909. var u = t.get(l);
  77910. u && e.push("text-" + l + ":" + u);
  77911. }), e.join(";");
  77912. }
  77913. function C9e(t, e, n) {
  77914. var r = [], i = t.get("transitionDuration"), a = t.get("backgroundColor"), o = t.get("shadowBlur"), s = t.get("shadowColor"), l = t.get("shadowOffsetX"), u = t.get("shadowOffsetY"), c = t.getModel("textStyle"), f = ree(t, "html"), d = l + "px " + u + "px " + o + "px " + s;
  77915. return r.push("box-shadow:" + d), e && i && r.push(x9e(i, n)), a && r.push("background-color:" + a), k(["width", "color", "radius"], function(h) {
  77916. var p = "border-" + h, v = JR(p), g = t.get(v);
  77917. g != null && r.push(p + ":" + g + (h === "color" ? "" : "px"));
  77918. }), r.push(w9e(c)), f != null && r.push("padding:" + Bf(f).join("px ") + "px"), r.join(";") + ";";
  77919. }
  77920. function $7(t, e, n, r, i) {
  77921. var a = e && e.painter;
  77922. if (n) {
  77923. var o = a && a.getViewportRoot();
  77924. o && yIe(t, o, n, r, i);
  77925. } else {
  77926. t[0] = r, t[1] = i;
  77927. var s = a && a.getViewportRootOffset();
  77928. s && (t[0] += s.offsetLeft, t[1] += s.offsetTop);
  77929. }
  77930. t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
  77931. }
  77932. var T9e = (
  77933. /** @class */
  77934. function() {
  77935. function t(e, n) {
  77936. if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, vt.wxa)
  77937. return null;
  77938. var r = document.createElement("div");
  77939. r.domBelongToZr = !0, this.el = r;
  77940. var i = this._zr = e.getZr(), a = n.appendTo, o = a && (Oe(a) ? document.querySelector(a) : au(a) ? a : Me(a) && a(e.getDom()));
  77941. $7(this._styleCoord, i, o, e.getWidth() / 2, e.getHeight() / 2), (o || e.getDom()).appendChild(r), this._api = e, this._container = o;
  77942. var s = this;
  77943. r.onmouseenter = function() {
  77944. s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
  77945. }, r.onmousemove = function(l) {
  77946. if (l = l || window.event, !s._enterable) {
  77947. var u = i.handler, c = i.painter.getViewportRoot();
  77948. sa(c, l, !0), u.dispatch("mousemove", l);
  77949. }
  77950. }, r.onmouseleave = function() {
  77951. s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
  77952. };
  77953. }
  77954. return t.prototype.update = function(e) {
  77955. if (!this._container) {
  77956. var n = this._api.getDom(), r = y9e(n, "position"), i = n.style;
  77957. i.position !== "absolute" && r !== "absolute" && (i.position = "relative");
  77958. }
  77959. var a = e.get("alwaysShowContent");
  77960. a && this._moveIfResized(), this._alwaysShowContent = a, this.el.className = e.get("className") || "";
  77961. }, t.prototype.show = function(e, n) {
  77962. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  77963. var r = this.el, i = r.style, a = this._styleCoord;
  77964. r.innerHTML ? i.cssText = _9e + C9e(e, !this._firstShow, this._longHide) + P7(a[0], a[1], !0) + ("border-color:" + _f(n) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
  77965. }, t.prototype.setContent = function(e, n, r, i, a) {
  77966. var o = this.el;
  77967. if (e == null) {
  77968. o.innerHTML = "";
  77969. return;
  77970. }
  77971. var s = "";
  77972. if (Oe(a) && r.get("trigger") === "item" && !jre(r) && (s = S9e(r, i, a)), Oe(e))
  77973. o.innerHTML = e + s;
  77974. else if (e) {
  77975. o.innerHTML = "", ue(e) || (e = [e]);
  77976. for (var l = 0; l < e.length; l++)
  77977. au(e[l]) && e[l].parentNode !== o && o.appendChild(e[l]);
  77978. if (s && o.childNodes.length) {
  77979. var u = document.createElement("div");
  77980. u.innerHTML = s, o.appendChild(u);
  77981. }
  77982. }
  77983. }, t.prototype.setEnterable = function(e) {
  77984. this._enterable = e;
  77985. }, t.prototype.getSize = function() {
  77986. var e = this.el;
  77987. return [e.offsetWidth, e.offsetHeight];
  77988. }, t.prototype.moveTo = function(e, n) {
  77989. var r = this._styleCoord;
  77990. if ($7(r, this._zr, this._container, e, n), r[0] != null && r[1] != null) {
  77991. var i = this.el.style, a = P7(r[0], r[1]);
  77992. k(a, function(o) {
  77993. i[o[0]] = o[1];
  77994. });
  77995. }
  77996. }, t.prototype._moveIfResized = function() {
  77997. var e = this._styleCoord[2], n = this._styleCoord[3];
  77998. this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
  77999. }, t.prototype.hide = function() {
  78000. var e = this, n = this.el.style;
  78001. n.visibility = "hidden", n.opacity = "0", vt.transform3dSupported && (n.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
  78002. return e._longHide = !0;
  78003. }, 500);
  78004. }, t.prototype.hideLater = function(e) {
  78005. this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(xe(this.hide, this), e)) : this.hide());
  78006. }, t.prototype.isShow = function() {
  78007. return this._show;
  78008. }, t.prototype.dispose = function() {
  78009. clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
  78010. var e = this.el.parentNode;
  78011. e && e.removeChild(this.el), this.el = this._container = null;
  78012. }, t;
  78013. }()
  78014. ), P9e = (
  78015. /** @class */
  78016. function() {
  78017. function t(e) {
  78018. this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), E7(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
  78019. }
  78020. return t.prototype.update = function(e) {
  78021. var n = e.get("alwaysShowContent");
  78022. n && this._moveIfResized(), this._alwaysShowContent = n;
  78023. }, t.prototype.show = function() {
  78024. this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
  78025. }, t.prototype.setContent = function(e, n, r, i, a) {
  78026. var o = this;
  78027. Ie(e) && Et(process.env.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el);
  78028. var s = r.getModel("textStyle");
  78029. this.el = new gt({
  78030. style: {
  78031. rich: n.richTextStyles,
  78032. text: e,
  78033. lineHeight: 22,
  78034. borderWidth: 1,
  78035. borderColor: i,
  78036. textShadowColor: s.get("textShadowColor"),
  78037. fill: r.get(["textStyle", "color"]),
  78038. padding: ree(r, "richText"),
  78039. verticalAlign: "top",
  78040. align: "left"
  78041. },
  78042. z: r.get("z")
  78043. }), k(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
  78044. o.el.style[u] = r.get(u);
  78045. }), k(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(u) {
  78046. o.el.style[u] = s.get(u) || 0;
  78047. }), this._zr.add(this.el);
  78048. var l = this;
  78049. this.el.on("mouseover", function() {
  78050. l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0;
  78051. }), this.el.on("mouseout", function() {
  78052. l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1;
  78053. });
  78054. }, t.prototype.setEnterable = function(e) {
  78055. this._enterable = e;
  78056. }, t.prototype.getSize = function() {
  78057. var e = this.el, n = this.el.getBoundingRect(), r = A7(e.style);
  78058. return [n.width + r.left + r.right, n.height + r.top + r.bottom];
  78059. }, t.prototype.moveTo = function(e, n) {
  78060. var r = this.el;
  78061. if (r) {
  78062. var i = this._styleCoord;
  78063. E7(i, this._zr, e, n), e = i[0], n = i[1];
  78064. var a = r.style, o = xl(a.borderWidth || 0), s = A7(a);
  78065. r.x = e + o + s.left, r.y = n + o + s.top, r.markRedraw();
  78066. }
  78067. }, t.prototype._moveIfResized = function() {
  78068. var e = this._styleCoord[2], n = this._styleCoord[3];
  78069. this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
  78070. }, t.prototype.hide = function() {
  78071. this.el && this.el.hide(), this._show = !1;
  78072. }, t.prototype.hideLater = function(e) {
  78073. this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(xe(this.hide, this), e)) : this.hide());
  78074. }, t.prototype.isShow = function() {
  78075. return this._show;
  78076. }, t.prototype.dispose = function() {
  78077. this._zr.remove(this.el);
  78078. }, t;
  78079. }()
  78080. );
  78081. function xl(t) {
  78082. return Math.max(0, t);
  78083. }
  78084. function A7(t) {
  78085. var e = xl(t.shadowBlur || 0), n = xl(t.shadowOffsetX || 0), r = xl(t.shadowOffsetY || 0);
  78086. return {
  78087. left: xl(e - n),
  78088. right: xl(e + n),
  78089. top: xl(e - r),
  78090. bottom: xl(e + r)
  78091. };
  78092. }
  78093. function E7(t, e, n, r) {
  78094. t[0] = n, t[1] = r, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
  78095. }
  78096. var $9e = new mt({
  78097. shape: {
  78098. x: -1,
  78099. y: -1,
  78100. width: 2,
  78101. height: 2
  78102. }
  78103. }), A9e = (
  78104. /** @class */
  78105. function(t) {
  78106. q(e, t);
  78107. function e() {
  78108. var n = t !== null && t.apply(this, arguments) || this;
  78109. return n.type = e.type, n;
  78110. }
  78111. return e.prototype.init = function(n, r) {
  78112. if (!(vt.node || !r.getDom())) {
  78113. var i = n.getComponent("tooltip"), a = this._renderMode = nRe(i.get("renderMode"));
  78114. this._tooltipContent = a === "richText" ? new P9e(r) : new T9e(r, {
  78115. appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
  78116. });
  78117. }
  78118. }, e.prototype.render = function(n, r, i) {
  78119. if (!(vt.node || !i.getDom())) {
  78120. this.group.removeAll(), this._tooltipModel = n, this._ecModel = r, this._api = i;
  78121. var a = this._tooltipContent;
  78122. a.update(n), a.setEnterable(n.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && n.get("transitionDuration") ? Sp(this, "_updatePosition", 50, "fixRate") : $m(this, "_updatePosition");
  78123. }
  78124. }, e.prototype._initGlobalListener = function() {
  78125. var n = this._tooltipModel, r = n.get("triggerOn");
  78126. Dre("itemTooltip", this._api, xe(function(i, a, o) {
  78127. r !== "none" && (r.indexOf(i) >= 0 ? this._tryShow(a, o) : i === "leave" && this._hide(o));
  78128. }, this));
  78129. }, e.prototype._keepShow = function() {
  78130. var n = this._tooltipModel, r = this._ecModel, i = this._api, a = n.get("triggerOn");
  78131. if (this._lastX != null && this._lastY != null && a !== "none" && a !== "click") {
  78132. var o = this;
  78133. clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
  78134. !i.isDisposed() && o.manuallyShowTip(n, r, i, {
  78135. x: o._lastX,
  78136. y: o._lastY,
  78137. dataByCoordSys: o._lastDataByCoordSys
  78138. });
  78139. });
  78140. }
  78141. }, e.prototype.manuallyShowTip = function(n, r, i, a) {
  78142. if (!(a.from === this.uid || vt.node || !i.getDom())) {
  78143. var o = M7(a, i);
  78144. this._ticket = "";
  78145. var s = a.dataByCoordSys, l = D9e(a, r, i);
  78146. if (l) {
  78147. var u = l.el.getBoundingRect().clone();
  78148. u.applyTransform(l.el.transform), this._tryShow({
  78149. offsetX: u.x + u.width / 2,
  78150. offsetY: u.y + u.height / 2,
  78151. target: l.el,
  78152. position: a.position,
  78153. // When manully trigger, the mouse is not on the el, so we'd better to
  78154. // position tooltip on the bottom of the el and display arrow is possible.
  78155. positionDefault: "bottom"
  78156. }, o);
  78157. } else if (a.tooltip && a.x != null && a.y != null) {
  78158. var c = $9e;
  78159. c.x = a.x, c.y = a.y, c.update(), Fe(c).tooltipConfig = {
  78160. name: null,
  78161. option: a.tooltip
  78162. }, this._tryShow({
  78163. offsetX: a.x,
  78164. offsetY: a.y,
  78165. target: c
  78166. }, o);
  78167. } else if (s)
  78168. this._tryShow({
  78169. offsetX: a.x,
  78170. offsetY: a.y,
  78171. position: a.position,
  78172. dataByCoordSys: s,
  78173. tooltipOption: a.tooltipOption
  78174. }, o);
  78175. else if (a.seriesIndex != null) {
  78176. if (this._manuallyAxisShowTip(n, r, i, a))
  78177. return;
  78178. var f = Rre(a, r), d = f.point[0], h = f.point[1];
  78179. d != null && h != null && this._tryShow({
  78180. offsetX: d,
  78181. offsetY: h,
  78182. target: f.el,
  78183. position: a.position,
  78184. // When manully trigger, the mouse is not on the el, so we'd better to
  78185. // position tooltip on the bottom of the el and display arrow is possible.
  78186. positionDefault: "bottom"
  78187. }, o);
  78188. } else a.x != null && a.y != null && (i.dispatchAction({
  78189. type: "updateAxisPointer",
  78190. x: a.x,
  78191. y: a.y
  78192. }), this._tryShow({
  78193. offsetX: a.x,
  78194. offsetY: a.y,
  78195. position: a.position,
  78196. target: i.getZr().findHover(a.x, a.y).target
  78197. }, o));
  78198. }
  78199. }, e.prototype.manuallyHideTip = function(n, r, i, a) {
  78200. var o = this._tooltipContent;
  78201. this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, a.from !== this.uid && this._hide(M7(a, i));
  78202. }, e.prototype._manuallyAxisShowTip = function(n, r, i, a) {
  78203. var o = a.seriesIndex, s = a.dataIndex, l = r.getComponent("axisPointer").coordSysAxesInfo;
  78204. if (!(o == null || s == null || l == null)) {
  78205. var u = r.getSeriesByIndex(o);
  78206. if (u) {
  78207. var c = u.getData(), f = Ov([c.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
  78208. if (f.get("trigger") === "axis")
  78209. return i.dispatchAction({
  78210. type: "updateAxisPointer",
  78211. seriesIndex: o,
  78212. dataIndex: s,
  78213. position: a.position
  78214. }), !0;
  78215. }
  78216. }
  78217. }, e.prototype._tryShow = function(n, r) {
  78218. var i = n.target, a = this._tooltipModel;
  78219. if (a) {
  78220. this._lastX = n.offsetX, this._lastY = n.offsetY;
  78221. var o = n.dataByCoordSys;
  78222. if (o && o.length)
  78223. this._showAxisTooltip(o, n);
  78224. else if (i) {
  78225. var s = Fe(i);
  78226. if (s.ssrType === "legend")
  78227. return;
  78228. this._lastDataByCoordSys = null;
  78229. var l, u;
  78230. Bc(i, function(c) {
  78231. if (Fe(c).dataIndex != null)
  78232. return l = c, !0;
  78233. if (Fe(c).tooltipConfig != null)
  78234. return u = c, !0;
  78235. }, !0), l ? this._showSeriesItemTooltip(n, l, r) : u ? this._showComponentItemTooltip(n, u, r) : this._hide(r);
  78236. } else
  78237. this._lastDataByCoordSys = null, this._hide(r);
  78238. }
  78239. }, e.prototype._showOrMove = function(n, r) {
  78240. var i = n.get("showDelay");
  78241. r = xe(r, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(r, i) : r();
  78242. }, e.prototype._showAxisTooltip = function(n, r) {
  78243. var i = this._ecModel, a = this._tooltipModel, o = [r.offsetX, r.offsetY], s = Ov([r.tooltipOption], a), l = this._renderMode, u = [], c = tr("section", {
  78244. blocks: [],
  78245. noHeader: !0
  78246. }), f = [], d = new DT();
  78247. k(n, function(y) {
  78248. k(y.dataByAxis, function(b) {
  78249. var _ = i.getComponent(b.axisDim + "Axis", b.axisIndex), O = b.value;
  78250. if (!(!_ || O == null)) {
  78251. var S = Ere(O, _.axis, i, b.seriesDataIndices, b.valueLabelOpt), x = tr("section", {
  78252. header: S,
  78253. noHeader: !ma(S),
  78254. sortBlocks: !0,
  78255. blocks: []
  78256. });
  78257. c.blocks.push(x), k(b.seriesDataIndices, function(C) {
  78258. var T = i.getSeriesByIndex(C.seriesIndex), w = C.dataIndexInside, P = T.getDataParams(w);
  78259. if (!(P.dataIndex < 0)) {
  78260. P.axisDim = b.axisDim, P.axisIndex = b.axisIndex, P.axisType = b.axisType, P.axisId = b.axisId, P.axisValue = Pk(_.axis, {
  78261. value: O
  78262. }), P.axisValueLabel = S, P.marker = d.makeTooltipMarker("item", _f(P.color), l);
  78263. var $ = pz(T.formatTooltip(w, !0, null)), A = $.frag;
  78264. if (A) {
  78265. var D = Ov([T], a).get("valueFormatter");
  78266. x.blocks.push(D ? le({
  78267. valueFormatter: D
  78268. }, A) : A);
  78269. }
  78270. $.text && f.push($.text), u.push(P);
  78271. }
  78272. });
  78273. }
  78274. });
  78275. }), c.blocks.reverse(), f.reverse();
  78276. var h = r.position, p = s.get("order"), v = _z(c, d, l, p, i.get("useUTC"), s.get("textStyle"));
  78277. v && f.unshift(v);
  78278. var g = l === "richText" ? `
  78279. ` : "<br/>", m = f.join(g);
  78280. this._showOrMove(s, function() {
  78281. this._updateContentNotChangedOnAxis(n, u) ? this._updatePosition(s, h, o[0], o[1], this._tooltipContent, u) : this._showTooltipContent(s, m, u, Math.random() + "", o[0], o[1], h, null, d);
  78282. });
  78283. }, e.prototype._showSeriesItemTooltip = function(n, r, i) {
  78284. var a = this._ecModel, o = Fe(r), s = o.seriesIndex, l = a.getSeriesByIndex(s), u = o.dataModel || l, c = o.dataIndex, f = o.dataType, d = u.getData(f), h = this._renderMode, p = n.positionDefault, v = Ov([d.getItemModel(c), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
  78285. position: p
  78286. } : null), g = v.get("trigger");
  78287. if (!(g != null && g !== "item")) {
  78288. var m = u.getDataParams(c, f), y = new DT();
  78289. m.marker = y.makeTooltipMarker("item", _f(m.color), h);
  78290. var b = pz(u.formatTooltip(c, !1, f)), _ = v.get("order"), O = v.get("valueFormatter"), S = b.frag, x = S ? _z(O ? le({
  78291. valueFormatter: O
  78292. }, S) : S, y, h, _, a.get("useUTC"), v.get("textStyle")) : b.text, C = "item_" + u.name + "_" + c;
  78293. this._showOrMove(v, function() {
  78294. this._showTooltipContent(v, x, m, C, n.offsetX, n.offsetY, n.position, n.target, y);
  78295. }), i({
  78296. type: "showTip",
  78297. dataIndexInside: c,
  78298. dataIndex: d.getRawIndex(c),
  78299. seriesIndex: s,
  78300. from: this.uid
  78301. });
  78302. }
  78303. }, e.prototype._showComponentItemTooltip = function(n, r, i) {
  78304. var a = this._renderMode === "html", o = Fe(r), s = o.tooltipConfig, l = s.option || {}, u = l.encodeHTMLContent;
  78305. if (Oe(l)) {
  78306. var c = l;
  78307. l = {
  78308. content: c,
  78309. // Fixed formatter
  78310. formatter: c
  78311. }, u = !0;
  78312. }
  78313. u && a && l.content && (l = Le(l), l.content = Gr(l.content));
  78314. var f = [l], d = this._ecModel.getComponent(o.componentMainType, o.componentIndex);
  78315. d && f.push(d), f.push({
  78316. formatter: l.content
  78317. });
  78318. var h = n.positionDefault, p = Ov(f, this._tooltipModel, h ? {
  78319. position: h
  78320. } : null), v = p.get("content"), g = Math.random() + "", m = new DT();
  78321. this._showOrMove(p, function() {
  78322. var y = Le(p.get("formatterParams") || {});
  78323. this._showTooltipContent(p, v, y, g, n.offsetX, n.offsetY, n.position, r, m);
  78324. }), i({
  78325. type: "showTip",
  78326. from: this.uid
  78327. });
  78328. }, e.prototype._showTooltipContent = function(n, r, i, a, o, s, l, u, c) {
  78329. if (this._ticket = "", !(!n.get("showContent") || !n.get("show"))) {
  78330. var f = this._tooltipContent;
  78331. f.setEnterable(n.get("enterable"));
  78332. var d = n.get("formatter");
  78333. l = l || n.get("position");
  78334. var h = r, p = this._getNearestPoint([o, s], i, n.get("trigger"), n.get("borderColor")), v = p.color;
  78335. if (d)
  78336. if (Oe(d)) {
  78337. var g = n.ecModel.get("useUTC"), m = ue(i) ? i[0] : i, y = m && m.axisType && m.axisType.indexOf("time") >= 0;
  78338. h = d, y && (h = Q0(m.axisValue, h, g)), h = ek(h, i, !0);
  78339. } else if (Me(d)) {
  78340. var b = xe(function(_, O) {
  78341. _ === this._ticket && (f.setContent(O, c, n, v, l), this._updatePosition(n, l, o, s, f, i, u));
  78342. }, this);
  78343. this._ticket = a, h = d(i, a, b);
  78344. } else
  78345. h = d;
  78346. f.setContent(h, c, n, v, l), f.show(n, v), this._updatePosition(n, l, o, s, f, i, u);
  78347. }
  78348. }, e.prototype._getNearestPoint = function(n, r, i, a) {
  78349. if (i === "axis" || ue(r))
  78350. return {
  78351. color: a || (this._renderMode === "html" ? "#fff" : "none")
  78352. };
  78353. if (!ue(r))
  78354. return {
  78355. color: a || r.color || r.borderColor
  78356. };
  78357. }, e.prototype._updatePosition = function(n, r, i, a, o, s, l) {
  78358. var u = this._api.getWidth(), c = this._api.getHeight();
  78359. r = r || n.get("position");
  78360. var f = o.getSize(), d = n.get("align"), h = n.get("verticalAlign"), p = l && l.getBoundingRect().clone();
  78361. if (l && p.applyTransform(l.transform), Me(r) && (r = r([i, a], s, o.el, p, {
  78362. viewSize: [u, c],
  78363. contentSize: f.slice()
  78364. })), ue(r))
  78365. i = _e(r[0], u), a = _e(r[1], c);
  78366. else if (Ie(r)) {
  78367. var v = r;
  78368. v.width = f[0], v.height = f[1];
  78369. var g = Rn(v, {
  78370. width: u,
  78371. height: c
  78372. });
  78373. i = g.x, a = g.y, d = null, h = null;
  78374. } else if (Oe(r) && l) {
  78375. var m = I9e(r, p, f, n.get("borderWidth"));
  78376. i = m[0], a = m[1];
  78377. } else {
  78378. var m = E9e(i, a, o, u, c, d ? null : 20, h ? null : 20);
  78379. i = m[0], a = m[1];
  78380. }
  78381. if (d && (i -= I7(d) ? f[0] / 2 : d === "right" ? f[0] : 0), h && (a -= I7(h) ? f[1] / 2 : h === "bottom" ? f[1] : 0), jre(n)) {
  78382. var m = M9e(i, a, o, u, c);
  78383. i = m[0], a = m[1];
  78384. }
  78385. o.moveTo(i, a);
  78386. }, e.prototype._updateContentNotChangedOnAxis = function(n, r) {
  78387. var i = this._lastDataByCoordSys, a = this._cbParamsList, o = !!i && i.length === n.length;
  78388. return o && k(i, function(s, l) {
  78389. var u = s.dataByAxis || [], c = n[l] || {}, f = c.dataByAxis || [];
  78390. o = o && u.length === f.length, o && k(u, function(d, h) {
  78391. var p = f[h] || {}, v = d.seriesDataIndices || [], g = p.seriesDataIndices || [];
  78392. o = o && d.value === p.value && d.axisType === p.axisType && d.axisId === p.axisId && v.length === g.length, o && k(v, function(m, y) {
  78393. var b = g[y];
  78394. o = o && m.seriesIndex === b.seriesIndex && m.dataIndex === b.dataIndex;
  78395. }), a && k(d.seriesDataIndices, function(m) {
  78396. var y = m.seriesIndex, b = r[y], _ = a[y];
  78397. b && _ && _.data !== b.data && (o = !1);
  78398. });
  78399. });
  78400. }), this._lastDataByCoordSys = n, this._cbParamsList = r, !!o;
  78401. }, e.prototype._hide = function(n) {
  78402. this._lastDataByCoordSys = null, n({
  78403. type: "hideTip",
  78404. from: this.uid
  78405. });
  78406. }, e.prototype.dispose = function(n, r) {
  78407. vt.node || !r.getDom() || ($m(this, "_updatePosition"), this._tooltipContent.dispose(), EE("itemTooltip", r));
  78408. }, e.type = "tooltip", e;
  78409. }(Xt)
  78410. );
  78411. function Ov(t, e, n) {
  78412. var r = e.ecModel, i;
  78413. n ? (i = new Wt(n, r, r), i = new Wt(e.option, i, r)) : i = e;
  78414. for (var a = t.length - 1; a >= 0; a--) {
  78415. var o = t[a];
  78416. o && (o instanceof Wt && (o = o.get("tooltip", !0)), Oe(o) && (o = {
  78417. formatter: o
  78418. }), o && (i = new Wt(o, i, r)));
  78419. }
  78420. return i;
  78421. }
  78422. function M7(t, e) {
  78423. return t.dispatchAction || xe(e.dispatchAction, e);
  78424. }
  78425. function E9e(t, e, n, r, i, a, o) {
  78426. var s = n.getSize(), l = s[0], u = s[1];
  78427. return a != null && (t + l + a + 2 > r ? t -= l + a : t += a), o != null && (e + u + o > i ? e -= u + o : e += o), [t, e];
  78428. }
  78429. function M9e(t, e, n, r, i) {
  78430. var a = n.getSize(), o = a[0], s = a[1];
  78431. return t = Math.min(t + o, r) - o, e = Math.min(e + s, i) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e];
  78432. }
  78433. function I9e(t, e, n, r) {
  78434. var i = n[0], a = n[1], o = Math.ceil(Math.SQRT2 * r) + 8, s = 0, l = 0, u = e.width, c = e.height;
  78435. switch (t) {
  78436. case "inside":
  78437. s = e.x + u / 2 - i / 2, l = e.y + c / 2 - a / 2;
  78438. break;
  78439. case "top":
  78440. s = e.x + u / 2 - i / 2, l = e.y - a - o;
  78441. break;
  78442. case "bottom":
  78443. s = e.x + u / 2 - i / 2, l = e.y + c + o;
  78444. break;
  78445. case "left":
  78446. s = e.x - i - o, l = e.y + c / 2 - a / 2;
  78447. break;
  78448. case "right":
  78449. s = e.x + u + o, l = e.y + c / 2 - a / 2;
  78450. }
  78451. return [s, l];
  78452. }
  78453. function I7(t) {
  78454. return t === "center" || t === "middle";
  78455. }
  78456. function D9e(t, e, n) {
  78457. var r = ER(t).queryOptionMap, i = r.keys()[0];
  78458. if (!(!i || i === "series")) {
  78459. var a = N0(e, i, r.get(i), {
  78460. useDefault: !1,
  78461. enableAll: !1,
  78462. enableNone: !1
  78463. }), o = a.models[0];
  78464. if (o) {
  78465. var s = n.getViewOfComponentModel(o), l;
  78466. if (s.group.traverse(function(u) {
  78467. var c = Fe(u).tooltipConfig;
  78468. if (c && c.name === t.name)
  78469. return l = u, !0;
  78470. }), l)
  78471. return {
  78472. componentMainType: i,
  78473. componentIndex: o.componentIndex,
  78474. el: l
  78475. };
  78476. }
  78477. }
  78478. }
  78479. function R9e(t) {
  78480. at(ey), t.registerComponentModel(g9e), t.registerComponentView(A9e), t.registerAction({
  78481. type: "showTip",
  78482. event: "showTip",
  78483. update: "tooltip:manuallyShowTip"
  78484. }, On), t.registerAction({
  78485. type: "hideTip",
  78486. event: "hideTip",
  78487. update: "tooltip:manuallyHideTip"
  78488. }, On);
  78489. }
  78490. var k9e = ["rect", "polygon", "keep", "clear"];
  78491. function L9e(t, e) {
  78492. var n = Qt(t ? t.brush : []);
  78493. if (n.length) {
  78494. var r = [];
  78495. k(n, function(l) {
  78496. var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
  78497. u instanceof Array && (r = r.concat(u));
  78498. });
  78499. var i = t && t.toolbox;
  78500. ue(i) && (i = i[0]), i || (i = {
  78501. feature: {}
  78502. }, t.toolbox = [i]);
  78503. var a = i.feature || (i.feature = {}), o = a.brush || (a.brush = {}), s = o.type || (o.type = []);
  78504. s.push.apply(s, r), N9e(s), e && !s.length && s.push.apply(s, k9e);
  78505. }
  78506. }
  78507. function N9e(t) {
  78508. var e = {};
  78509. k(t, function(n) {
  78510. e[n] = 1;
  78511. }), t.length = 0, k(e, function(n, r) {
  78512. t.push(r);
  78513. });
  78514. }
  78515. var D7 = k;
  78516. function R7(t) {
  78517. if (t) {
  78518. for (var e in t)
  78519. if (t.hasOwnProperty(e))
  78520. return !0;
  78521. }
  78522. }
  78523. function LE(t, e, n) {
  78524. var r = {};
  78525. return D7(e, function(a) {
  78526. var o = r[a] = i();
  78527. D7(t[a], function(s, l) {
  78528. if (qn.isValidType(l)) {
  78529. var u = {
  78530. type: l,
  78531. visual: s
  78532. };
  78533. n && n(u, a), o[l] = new qn(u), l === "opacity" && (u = Le(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new qn(u));
  78534. }
  78535. });
  78536. }), r;
  78537. function i() {
  78538. var a = function() {
  78539. };
  78540. a.prototype.__hidden = a.prototype;
  78541. var o = new a();
  78542. return o;
  78543. }
  78544. }
  78545. function Yre(t, e, n) {
  78546. var r;
  78547. k(n, function(i) {
  78548. e.hasOwnProperty(i) && R7(e[i]) && (r = !0);
  78549. }), r && k(n, function(i) {
  78550. e.hasOwnProperty(i) && R7(e[i]) ? t[i] = Le(e[i]) : delete t[i];
  78551. });
  78552. }
  78553. function B9e(t, e, n, r, i, a) {
  78554. var o = {};
  78555. k(t, function(f) {
  78556. var d = qn.prepareVisualTypes(e[f]);
  78557. o[f] = d;
  78558. });
  78559. var s;
  78560. function l(f) {
  78561. return ck(n, s, f);
  78562. }
  78563. function u(f, d) {
  78564. hee(n, s, f, d);
  78565. }
  78566. n.each(c);
  78567. function c(f, d) {
  78568. s = f;
  78569. var h = n.getRawDataItem(s);
  78570. if (!(h && h.visualMap === !1))
  78571. for (var p = r.call(i, f), v = e[p], g = o[p], m = 0, y = g.length; m < y; m++) {
  78572. var b = g[m];
  78573. v[b] && v[b].applyVisual(f, l, u);
  78574. }
  78575. }
  78576. }
  78577. function z9e(t, e, n, r) {
  78578. var i = {};
  78579. return k(t, function(a) {
  78580. var o = qn.prepareVisualTypes(e[a]);
  78581. i[a] = o;
  78582. }), {
  78583. progress: function(o, s) {
  78584. var l;
  78585. r != null && (l = s.getDimensionIndex(r));
  78586. function u(O) {
  78587. return ck(s, f, O);
  78588. }
  78589. function c(O, S) {
  78590. hee(s, f, O, S);
  78591. }
  78592. for (var f, d = s.getStore(); (f = o.next()) != null; ) {
  78593. var h = s.getRawDataItem(f);
  78594. if (!(h && h.visualMap === !1))
  78595. for (var p = r != null ? d.get(l, f) : f, v = n(p), g = e[v], m = i[v], y = 0, b = m.length; y < b; y++) {
  78596. var _ = m[y];
  78597. g[_] && g[_].applyVisual(p, u, c);
  78598. }
  78599. }
  78600. }
  78601. };
  78602. }
  78603. function V9e(t) {
  78604. var e = t.brushType, n = {
  78605. point: function(r) {
  78606. return k7[e].point(r, n, t);
  78607. },
  78608. rect: function(r) {
  78609. return k7[e].rect(r, n, t);
  78610. }
  78611. };
  78612. return n;
  78613. }
  78614. var k7 = {
  78615. lineX: L7(0),
  78616. lineY: L7(1),
  78617. rect: {
  78618. point: function(t, e, n) {
  78619. return t && n.boundingRect.contain(t[0], t[1]);
  78620. },
  78621. rect: function(t, e, n) {
  78622. return t && n.boundingRect.intersect(t);
  78623. }
  78624. },
  78625. polygon: {
  78626. point: function(t, e, n) {
  78627. return t && n.boundingRect.contain(t[0], t[1]) && Sc(n.range, t[0], t[1]);
  78628. },
  78629. rect: function(t, e, n) {
  78630. var r = n.range;
  78631. if (!t || r.length <= 1)
  78632. return !1;
  78633. var i = t.x, a = t.y, o = t.width, s = t.height, l = r[0];
  78634. if (Sc(r, i, a) || Sc(r, i + o, a) || Sc(r, i, a + s) || Sc(r, i + o, a + s) || Je.create(t).contain(l[0], l[1]) || Gv(i, a, i + o, a, r) || Gv(i, a, i, a + s, r) || Gv(i + o, a, i + o, a + s, r) || Gv(i, a + s, i + o, a + s, r))
  78635. return !0;
  78636. }
  78637. }
  78638. };
  78639. function L7(t) {
  78640. var e = ["x", "y"], n = ["width", "height"];
  78641. return {
  78642. point: function(r, i, a) {
  78643. if (r) {
  78644. var o = a.range, s = r[t];
  78645. return Sv(s, o);
  78646. }
  78647. },
  78648. rect: function(r, i, a) {
  78649. if (r) {
  78650. var o = a.range, s = [r[e[t]], r[e[t]] + r[n[t]]];
  78651. return s[1] < s[0] && s.reverse(), Sv(s[0], o) || Sv(s[1], o) || Sv(o[0], s) || Sv(o[1], s);
  78652. }
  78653. }
  78654. };
  78655. }
  78656. function Sv(t, e) {
  78657. return e[0] <= t && t <= e[1];
  78658. }
  78659. var N7 = ["inBrush", "outOfBrush"], YP = "__ecBrushSelect", NE = "__ecInBrushSelectEvent";
  78660. function qre(t) {
  78661. t.eachComponent({
  78662. mainType: "brush"
  78663. }, function(e) {
  78664. var n = e.brushTargetManager = new wL(e.option, t);
  78665. n.setInputRanges(e.areas, t);
  78666. });
  78667. }
  78668. function F9e(t, e, n) {
  78669. var r = [], i, a;
  78670. t.eachComponent({
  78671. mainType: "brush"
  78672. }, function(o) {
  78673. n && n.type === "takeGlobalCursor" && o.setBrushOption(n.key === "brush" ? n.brushOption : {
  78674. brushType: !1
  78675. });
  78676. }), qre(t), t.eachComponent({
  78677. mainType: "brush"
  78678. }, function(o, s) {
  78679. var l = {
  78680. brushId: o.id,
  78681. brushIndex: s,
  78682. brushName: o.name,
  78683. areas: Le(o.areas),
  78684. selected: []
  78685. };
  78686. r.push(l);
  78687. var u = o.option, c = u.brushLink, f = [], d = [], h = [], p = !1;
  78688. s || (i = u.throttleType, a = u.throttleDelay);
  78689. var v = ce(o.areas, function(O) {
  78690. var S = G9e[O.brushType], x = Re({
  78691. boundingRect: S ? S(O) : void 0
  78692. }, O);
  78693. return x.selectors = V9e(x), x;
  78694. }), g = LE(o.option, N7, function(O) {
  78695. O.mappingMethod = "fixed";
  78696. });
  78697. ue(c) && k(c, function(O) {
  78698. f[O] = 1;
  78699. });
  78700. function m(O) {
  78701. return c === "all" || !!f[O];
  78702. }
  78703. function y(O) {
  78704. return !!O.length;
  78705. }
  78706. t.eachSeries(function(O, S) {
  78707. var x = h[S] = [];
  78708. O.subType === "parallel" ? b(O, S) : _(O, S, x);
  78709. });
  78710. function b(O, S) {
  78711. var x = O.coordinateSystem;
  78712. p = p || x.hasAxisBrushed(), m(S) && x.eachActiveState(O.getData(), function(C, T) {
  78713. C === "active" && (d[T] = 1);
  78714. });
  78715. }
  78716. function _(O, S, x) {
  78717. if (!(!O.brushSelector || H9e(o, S)) && (k(v, function(T) {
  78718. o.brushTargetManager.controlSeries(T, O, t) && x.push(T), p = p || y(x);
  78719. }), m(S) && y(x))) {
  78720. var C = O.getData();
  78721. C.each(function(T) {
  78722. B7(O, x, C, T) && (d[T] = 1);
  78723. });
  78724. }
  78725. }
  78726. t.eachSeries(function(O, S) {
  78727. var x = {
  78728. seriesId: O.id,
  78729. seriesIndex: S,
  78730. seriesName: O.name,
  78731. dataIndex: []
  78732. };
  78733. l.selected.push(x);
  78734. var C = h[S], T = O.getData(), w = m(S) ? function(P) {
  78735. return d[P] ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
  78736. } : function(P) {
  78737. return B7(O, C, T, P) ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
  78738. };
  78739. (m(S) ? p : y(C)) && B9e(N7, g, T, w);
  78740. });
  78741. }), W9e(e, i, a, r, n);
  78742. }
  78743. function W9e(t, e, n, r, i) {
  78744. if (i) {
  78745. var a = t.getZr();
  78746. if (!a[NE]) {
  78747. a[YP] || (a[YP] = Q9e);
  78748. var o = Sp(a, YP, n, e);
  78749. o(t, r);
  78750. }
  78751. }
  78752. }
  78753. function Q9e(t, e) {
  78754. if (!t.isDisposed()) {
  78755. var n = t.getZr();
  78756. n[NE] = !0, t.dispatchAction({
  78757. type: "brushSelect",
  78758. batch: e
  78759. }), n[NE] = !1;
  78760. }
  78761. }
  78762. function B7(t, e, n, r) {
  78763. for (var i = 0, a = e.length; i < a; i++) {
  78764. var o = e[i];
  78765. if (t.brushSelector(r, n, o.selectors, o))
  78766. return !0;
  78767. }
  78768. }
  78769. function H9e(t, e) {
  78770. var n = t.option.seriesIndex;
  78771. return n != null && n !== "all" && (ue(n) ? et(n, e) < 0 : e !== n);
  78772. }
  78773. var G9e = {
  78774. rect: function(t) {
  78775. return z7(t.range);
  78776. },
  78777. polygon: function(t) {
  78778. for (var e, n = t.range, r = 0, i = n.length; r < i; r++) {
  78779. e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
  78780. var a = n[r];
  78781. a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] > e[1][1] && (e[1][1] = a[1]);
  78782. }
  78783. return e && z7(e);
  78784. }
  78785. };
  78786. function z7(t) {
  78787. return new Je(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]);
  78788. }
  78789. var j9e = (
  78790. /** @class */
  78791. function(t) {
  78792. q(e, t);
  78793. function e() {
  78794. var n = t !== null && t.apply(this, arguments) || this;
  78795. return n.type = e.type, n;
  78796. }
  78797. return e.prototype.init = function(n, r) {
  78798. this.ecModel = n, this.api = r, this.model, (this._brushController = new Jk(r.getZr())).on("brush", xe(this._onBrush, this)).mount();
  78799. }, e.prototype.render = function(n, r, i, a) {
  78800. this.model = n, this._updateController(n, r, i, a);
  78801. }, e.prototype.updateTransform = function(n, r, i, a) {
  78802. qre(r), this._updateController(n, r, i, a);
  78803. }, e.prototype.updateVisual = function(n, r, i, a) {
  78804. this.updateTransform(n, r, i, a);
  78805. }, e.prototype.updateView = function(n, r, i, a) {
  78806. this._updateController(n, r, i, a);
  78807. }, e.prototype._updateController = function(n, r, i, a) {
  78808. (!a || a.$from !== n.id) && this._brushController.setPanels(n.brushTargetManager.makePanelOpts(i)).enableBrush(n.brushOption).updateCovers(n.areas.slice());
  78809. }, e.prototype.dispose = function() {
  78810. this._brushController.dispose();
  78811. }, e.prototype._onBrush = function(n) {
  78812. var r = this.model.id, i = this.model.brushTargetManager.setOutputRanges(n.areas, this.ecModel);
  78813. (!n.isEnd || n.removeOnClick) && this.api.dispatchAction({
  78814. type: "brush",
  78815. brushId: r,
  78816. areas: Le(i),
  78817. $from: r
  78818. }), n.isEnd && this.api.dispatchAction({
  78819. type: "brushEnd",
  78820. brushId: r,
  78821. areas: Le(i),
  78822. $from: r
  78823. });
  78824. }, e.type = "brush", e;
  78825. }(Xt)
  78826. ), Z9e = "#ddd", U9e = (
  78827. /** @class */
  78828. function(t) {
  78829. q(e, t);
  78830. function e() {
  78831. var n = t !== null && t.apply(this, arguments) || this;
  78832. return n.type = e.type, n.areas = [], n.brushOption = {}, n;
  78833. }
  78834. return e.prototype.optionUpdated = function(n, r) {
  78835. var i = this.option;
  78836. !r && Yre(i, n, ["inBrush", "outOfBrush"]);
  78837. var a = i.inBrush = i.inBrush || {};
  78838. i.outOfBrush = i.outOfBrush || {
  78839. color: Z9e
  78840. }, a.hasOwnProperty("liftZ") || (a.liftZ = 5);
  78841. }, e.prototype.setAreas = function(n) {
  78842. process.env.NODE_ENV !== "production" && (ke(ue(n)), k(n, function(r) {
  78843. ke(r.brushType, "Illegal areas");
  78844. })), n && (this.areas = ce(n, function(r) {
  78845. return V7(this.option, r);
  78846. }, this));
  78847. }, e.prototype.setBrushOption = function(n) {
  78848. this.brushOption = V7(this.option, n), this.brushType = this.brushOption.brushType;
  78849. }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
  78850. seriesIndex: "all",
  78851. brushType: "rect",
  78852. brushMode: "single",
  78853. transformable: !0,
  78854. brushStyle: {
  78855. borderWidth: 1,
  78856. color: "rgba(210,219,238,0.3)",
  78857. borderColor: "#D2DBEE"
  78858. },
  78859. throttleType: "fixRate",
  78860. throttleDelay: 0,
  78861. removeOnClick: !0,
  78862. z: 1e4
  78863. }, e;
  78864. }(rt)
  78865. );
  78866. function V7(t, e) {
  78867. return qe({
  78868. brushType: t.brushType,
  78869. brushMode: t.brushMode,
  78870. transformable: t.transformable,
  78871. brushStyle: new Wt(t.brushStyle).getItemStyle(),
  78872. removeOnClick: t.removeOnClick,
  78873. z: t.z
  78874. }, e, !0);
  78875. }
  78876. var X9e = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], Y9e = (
  78877. /** @class */
  78878. function(t) {
  78879. q(e, t);
  78880. function e() {
  78881. return t !== null && t.apply(this, arguments) || this;
  78882. }
  78883. return e.prototype.render = function(n, r, i) {
  78884. var a, o, s;
  78885. r.eachComponent({
  78886. mainType: "brush"
  78887. }, function(l) {
  78888. a = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
  78889. }), this._brushType = a, this._brushMode = o, k(n.get("type", !0), function(l) {
  78890. n.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === a) ? "emphasis" : "normal");
  78891. });
  78892. }, e.prototype.updateView = function(n, r, i) {
  78893. this.render(n, r, i);
  78894. }, e.prototype.getIcons = function() {
  78895. var n = this.model, r = n.get("icon", !0), i = {};
  78896. return k(n.get("type", !0), function(a) {
  78897. r[a] && (i[a] = r[a]);
  78898. }), i;
  78899. }, e.prototype.onclick = function(n, r, i) {
  78900. var a = this._brushType, o = this._brushMode;
  78901. i === "clear" ? (r.dispatchAction({
  78902. type: "axisAreaSelect",
  78903. intervals: []
  78904. }), r.dispatchAction({
  78905. type: "brush",
  78906. command: "clear",
  78907. // Clear all areas of all brush components.
  78908. areas: []
  78909. })) : r.dispatchAction({
  78910. type: "takeGlobalCursor",
  78911. key: "brush",
  78912. brushOption: {
  78913. brushType: i === "keep" ? a : a === i ? !1 : i,
  78914. brushMode: i === "keep" ? o === "multiple" ? "single" : "multiple" : o
  78915. }
  78916. });
  78917. }, e.getDefaultOption = function(n) {
  78918. var r = {
  78919. show: !0,
  78920. type: X9e.slice(),
  78921. icon: {
  78922. /* eslint-disable */
  78923. rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
  78924. polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
  78925. lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
  78926. lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
  78927. keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
  78928. clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
  78929. // jshint ignore:line
  78930. /* eslint-enable */
  78931. },
  78932. // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
  78933. title: n.getLocaleModel().get(["toolbox", "brush", "title"])
  78934. };
  78935. return r;
  78936. }, e;
  78937. }(pa)
  78938. );
  78939. function q9e(t) {
  78940. t.registerComponentView(j9e), t.registerComponentModel(U9e), t.registerPreprocessor(L9e), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, F9e), t.registerAction({
  78941. type: "brush",
  78942. event: "brush",
  78943. update: "updateVisual"
  78944. }, function(e, n) {
  78945. n.eachComponent({
  78946. mainType: "brush",
  78947. query: e
  78948. }, function(r) {
  78949. r.setAreas(e.areas);
  78950. });
  78951. }), t.registerAction({
  78952. type: "brushSelect",
  78953. event: "brushSelected",
  78954. update: "none"
  78955. }, On), t.registerAction({
  78956. type: "brushEnd",
  78957. event: "brushEnd",
  78958. update: "none"
  78959. }, On), Id("brush", Y9e);
  78960. }
  78961. var K9e = (
  78962. /** @class */
  78963. function(t) {
  78964. q(e, t);
  78965. function e() {
  78966. var n = t !== null && t.apply(this, arguments) || this;
  78967. return n.type = e.type, n.layoutMode = {
  78968. type: "box",
  78969. ignoreSize: !0
  78970. }, n;
  78971. }
  78972. return e.type = "title", e.defaultOption = {
  78973. // zlevel: 0,
  78974. z: 6,
  78975. show: !0,
  78976. text: "",
  78977. target: "blank",
  78978. subtext: "",
  78979. subtarget: "blank",
  78980. left: 0,
  78981. top: 0,
  78982. backgroundColor: "rgba(0,0,0,0)",
  78983. borderColor: "#ccc",
  78984. borderWidth: 0,
  78985. padding: 5,
  78986. itemGap: 10,
  78987. textStyle: {
  78988. fontSize: 18,
  78989. fontWeight: "bold",
  78990. color: "#464646"
  78991. },
  78992. subtextStyle: {
  78993. fontSize: 12,
  78994. color: "#6E7079"
  78995. }
  78996. }, e;
  78997. }(rt)
  78998. ), J9e = (
  78999. /** @class */
  79000. function(t) {
  79001. q(e, t);
  79002. function e() {
  79003. var n = t !== null && t.apply(this, arguments) || this;
  79004. return n.type = e.type, n;
  79005. }
  79006. return e.prototype.render = function(n, r, i) {
  79007. if (this.group.removeAll(), !!n.get("show")) {
  79008. var a = this.group, o = n.getModel("textStyle"), s = n.getModel("subtextStyle"), l = n.get("textAlign"), u = We(n.get("textBaseline"), n.get("textVerticalAlign")), c = new gt({
  79009. style: Zt(o, {
  79010. text: n.get("text"),
  79011. fill: o.getTextColor()
  79012. }, {
  79013. disableBox: !0
  79014. }),
  79015. z2: 10
  79016. }), f = c.getBoundingRect(), d = n.get("subtext"), h = new gt({
  79017. style: Zt(s, {
  79018. text: d,
  79019. fill: s.getTextColor(),
  79020. y: f.height + n.get("itemGap"),
  79021. verticalAlign: "top"
  79022. }, {
  79023. disableBox: !0
  79024. }),
  79025. z2: 10
  79026. }), p = n.get("link"), v = n.get("sublink"), g = n.get("triggerEvent", !0);
  79027. c.silent = !p && !g, h.silent = !v && !g, p && c.on("click", function() {
  79028. dO(p, "_" + n.get("target"));
  79029. }), v && h.on("click", function() {
  79030. dO(v, "_" + n.get("subtarget"));
  79031. }), Fe(c).eventData = Fe(h).eventData = g ? {
  79032. componentType: "title",
  79033. componentIndex: n.componentIndex
  79034. } : null, a.add(c), d && a.add(h);
  79035. var m = a.getBoundingRect(), y = n.getBoxLayoutParams();
  79036. y.width = m.width, y.height = m.height;
  79037. var b = Rn(y, {
  79038. width: i.getWidth(),
  79039. height: i.getHeight()
  79040. }, n.get("padding"));
  79041. l || (l = n.get("left") || n.get("right"), l === "middle" && (l = "center"), l === "right" ? b.x += b.width : l === "center" && (b.x += b.width / 2)), u || (u = n.get("top") || n.get("bottom"), u === "center" && (u = "middle"), u === "bottom" ? b.y += b.height : u === "middle" && (b.y += b.height / 2), u = u || "top"), a.x = b.x, a.y = b.y, a.markRedraw();
  79042. var _ = {
  79043. align: l,
  79044. verticalAlign: u
  79045. };
  79046. c.setStyle(_), h.setStyle(_), m = a.getBoundingRect();
  79047. var O = b.margin, S = n.getItemStyle(["color", "opacity"]);
  79048. S.fill = n.get("backgroundColor");
  79049. var x = new mt({
  79050. shape: {
  79051. x: m.x - O[3],
  79052. y: m.y - O[0],
  79053. width: m.width + O[1] + O[3],
  79054. height: m.height + O[0] + O[2],
  79055. r: n.get("borderRadius")
  79056. },
  79057. style: S,
  79058. subPixelOptimize: !0,
  79059. silent: !0
  79060. });
  79061. a.add(x);
  79062. }
  79063. }, e.type = "title", e;
  79064. }(Xt)
  79065. );
  79066. function eGe(t) {
  79067. t.registerComponentModel(K9e), t.registerComponentView(J9e);
  79068. }
  79069. var F7 = (
  79070. /** @class */
  79071. function(t) {
  79072. q(e, t);
  79073. function e() {
  79074. var n = t !== null && t.apply(this, arguments) || this;
  79075. return n.type = e.type, n.layoutMode = "box", n;
  79076. }
  79077. return e.prototype.init = function(n, r, i) {
  79078. this.mergeDefaultAndTheme(n, i), this._initData();
  79079. }, e.prototype.mergeOption = function(n) {
  79080. t.prototype.mergeOption.apply(this, arguments), this._initData();
  79081. }, e.prototype.setCurrentIndex = function(n) {
  79082. n == null && (n = this.option.currentIndex);
  79083. var r = this._data.count();
  79084. this.option.loop ? n = (n % r + r) % r : (n >= r && (n = r - 1), n < 0 && (n = 0)), this.option.currentIndex = n;
  79085. }, e.prototype.getCurrentIndex = function() {
  79086. return this.option.currentIndex;
  79087. }, e.prototype.isIndexMax = function() {
  79088. return this.getCurrentIndex() >= this._data.count() - 1;
  79089. }, e.prototype.setPlayState = function(n) {
  79090. this.option.autoPlay = !!n;
  79091. }, e.prototype.getPlayState = function() {
  79092. return !!this.option.autoPlay;
  79093. }, e.prototype._initData = function() {
  79094. var n = this.option, r = n.data || [], i = n.axisType, a = this._names = [], o;
  79095. i === "category" ? (o = [], k(r, function(u, c) {
  79096. var f = Vn(fp(u), ""), d;
  79097. Ie(u) ? (d = Le(u), d.value = c) : d = c, o.push(d), a.push(f);
  79098. })) : o = r;
  79099. var s = {
  79100. category: "ordinal",
  79101. time: "time",
  79102. value: "number"
  79103. }[i] || "number", l = this._data = new Lr([{
  79104. name: "value",
  79105. type: s
  79106. }], this);
  79107. l.initData(o, a);
  79108. }, e.prototype.getData = function() {
  79109. return this._data;
  79110. }, e.prototype.getCategories = function() {
  79111. if (this.get("axisType") === "category")
  79112. return this._names.slice();
  79113. }, e.type = "timeline", e.defaultOption = {
  79114. // zlevel: 0, // 一级层叠
  79115. z: 4,
  79116. show: !0,
  79117. axisType: "time",
  79118. realtime: !0,
  79119. left: "20%",
  79120. top: null,
  79121. right: "20%",
  79122. bottom: 0,
  79123. width: null,
  79124. height: 40,
  79125. padding: 5,
  79126. controlPosition: "left",
  79127. autoPlay: !1,
  79128. rewind: !1,
  79129. loop: !0,
  79130. playInterval: 2e3,
  79131. currentIndex: 0,
  79132. itemStyle: {},
  79133. label: {
  79134. color: "#000"
  79135. },
  79136. data: []
  79137. }, e;
  79138. }(rt)
  79139. ), Kre = (
  79140. /** @class */
  79141. function(t) {
  79142. q(e, t);
  79143. function e() {
  79144. var n = t !== null && t.apply(this, arguments) || this;
  79145. return n.type = e.type, n;
  79146. }
  79147. return e.type = "timeline.slider", e.defaultOption = Pu(F7.defaultOption, {
  79148. backgroundColor: "rgba(0,0,0,0)",
  79149. borderColor: "#ccc",
  79150. borderWidth: 0,
  79151. orient: "horizontal",
  79152. inverse: !1,
  79153. tooltip: {
  79154. trigger: "item"
  79155. // data item may also have tootip attr.
  79156. },
  79157. symbol: "circle",
  79158. symbolSize: 12,
  79159. lineStyle: {
  79160. show: !0,
  79161. width: 2,
  79162. color: "#DAE1F5"
  79163. },
  79164. label: {
  79165. position: "auto",
  79166. // When using number, label position is not
  79167. // restricted by viewRect.
  79168. // positive: right/bottom, negative: left/top
  79169. show: !0,
  79170. interval: "auto",
  79171. rotate: 0,
  79172. // formatter: null,
  79173. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  79174. color: "#A4B1D7"
  79175. },
  79176. itemStyle: {
  79177. color: "#A4B1D7",
  79178. borderWidth: 1
  79179. },
  79180. checkpointStyle: {
  79181. symbol: "circle",
  79182. symbolSize: 15,
  79183. color: "#316bf3",
  79184. borderColor: "#fff",
  79185. borderWidth: 2,
  79186. shadowBlur: 2,
  79187. shadowOffsetX: 1,
  79188. shadowOffsetY: 1,
  79189. shadowColor: "rgba(0, 0, 0, 0.3)",
  79190. // borderColor: 'rgba(194,53,49, 0.5)',
  79191. animation: !0,
  79192. animationDuration: 300,
  79193. animationEasing: "quinticInOut"
  79194. },
  79195. controlStyle: {
  79196. show: !0,
  79197. showPlayBtn: !0,
  79198. showPrevBtn: !0,
  79199. showNextBtn: !0,
  79200. itemSize: 24,
  79201. itemGap: 12,
  79202. position: "left",
  79203. playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
  79204. stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
  79205. // eslint-disable-next-line max-len
  79206. nextIcon: "M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",
  79207. // eslint-disable-next-line max-len
  79208. prevIcon: "M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",
  79209. prevBtnSize: 18,
  79210. nextBtnSize: 18,
  79211. color: "#A4B1D7",
  79212. borderColor: "#A4B1D7",
  79213. borderWidth: 1
  79214. },
  79215. emphasis: {
  79216. label: {
  79217. show: !0,
  79218. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  79219. color: "#6f778d"
  79220. },
  79221. itemStyle: {
  79222. color: "#316BF3"
  79223. },
  79224. controlStyle: {
  79225. color: "#316BF3",
  79226. borderColor: "#316BF3",
  79227. borderWidth: 2
  79228. }
  79229. },
  79230. progress: {
  79231. lineStyle: {
  79232. color: "#316BF3"
  79233. },
  79234. itemStyle: {
  79235. color: "#316BF3"
  79236. },
  79237. label: {
  79238. color: "#6f778d"
  79239. }
  79240. },
  79241. data: []
  79242. }), e;
  79243. }(F7)
  79244. );
  79245. xn(Kre, sw.prototype);
  79246. var tGe = (
  79247. /** @class */
  79248. function(t) {
  79249. q(e, t);
  79250. function e() {
  79251. var n = t !== null && t.apply(this, arguments) || this;
  79252. return n.type = e.type, n;
  79253. }
  79254. return e.type = "timeline", e;
  79255. }(Xt)
  79256. ), nGe = (
  79257. /** @class */
  79258. function(t) {
  79259. q(e, t);
  79260. function e(n, r, i, a) {
  79261. var o = t.call(this, n, r, i) || this;
  79262. return o.type = a || "value", o;
  79263. }
  79264. return e.prototype.getLabelModel = function() {
  79265. return this.model.getModel("label");
  79266. }, e.prototype.isHorizontal = function() {
  79267. return this.model.get("orient") === "horizontal";
  79268. }, e;
  79269. }(Ba)
  79270. ), qP = Math.PI, W7 = bt(), rGe = (
  79271. /** @class */
  79272. function(t) {
  79273. q(e, t);
  79274. function e() {
  79275. var n = t !== null && t.apply(this, arguments) || this;
  79276. return n.type = e.type, n;
  79277. }
  79278. return e.prototype.init = function(n, r) {
  79279. this.api = r;
  79280. }, e.prototype.render = function(n, r, i) {
  79281. if (this.model = n, this.api = i, this.ecModel = r, this.group.removeAll(), n.get("show", !0)) {
  79282. var a = this._layout(n, i), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(a, n);
  79283. n.formatTooltip = function(u) {
  79284. var c = l.scale.getLabel({
  79285. value: u
  79286. });
  79287. return tr("nameValue", {
  79288. noName: !0,
  79289. value: c
  79290. });
  79291. }, k(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
  79292. this["_render" + u](a, o, l, n);
  79293. }, this), this._renderAxisLabel(a, s, l, n), this._position(a, n);
  79294. }
  79295. this._doPlayStop(), this._updateTicksStatus();
  79296. }, e.prototype.remove = function() {
  79297. this._clearTimer(), this.group.removeAll();
  79298. }, e.prototype.dispose = function() {
  79299. this._clearTimer();
  79300. }, e.prototype._layout = function(n, r) {
  79301. var i = n.get(["label", "position"]), a = n.get("orient"), o = aGe(n, r), s;
  79302. i == null || i === "auto" ? s = a === "horizontal" ? o.y + o.height / 2 < r.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < r.getWidth() / 2 ? "+" : "-" : Oe(i) ? s = {
  79303. horizontal: {
  79304. top: "-",
  79305. bottom: "+"
  79306. },
  79307. vertical: {
  79308. left: "-",
  79309. right: "+"
  79310. }
  79311. }[a][i] : s = i;
  79312. var l = {
  79313. horizontal: "center",
  79314. vertical: s >= 0 || s === "+" ? "left" : "right"
  79315. }, u = {
  79316. horizontal: s >= 0 || s === "+" ? "top" : "bottom",
  79317. vertical: "middle"
  79318. }, c = {
  79319. horizontal: 0,
  79320. vertical: qP / 2
  79321. }, f = a === "vertical" ? o.height : o.width, d = n.getModel("controlStyle"), h = d.get("show", !0), p = h ? d.get("itemSize") : 0, v = h ? d.get("itemGap") : 0, g = p + v, m = n.get(["label", "rotate"]) || 0;
  79322. m = m * qP / 180;
  79323. var y, b, _, O = d.get("position", !0), S = h && d.get("showPlayBtn", !0), x = h && d.get("showPrevBtn", !0), C = h && d.get("showNextBtn", !0), T = 0, w = f;
  79324. O === "left" || O === "bottom" ? (S && (y = [0, 0], T += g), x && (b = [T, 0], T += g), C && (_ = [w - p, 0], w -= g)) : (S && (y = [w - p, 0], w -= g), x && (b = [0, 0], T += g), C && (_ = [w - p, 0], w -= g));
  79325. var P = [T, w];
  79326. return n.get("inverse") && P.reverse(), {
  79327. viewRect: o,
  79328. mainLength: f,
  79329. orient: a,
  79330. rotation: c[a],
  79331. labelRotation: m,
  79332. labelPosOpt: s,
  79333. labelAlign: n.get(["label", "align"]) || l[a],
  79334. labelBaseline: n.get(["label", "verticalAlign"]) || n.get(["label", "baseline"]) || u[a],
  79335. // Based on mainGroup.
  79336. playPosition: y,
  79337. prevBtnPosition: b,
  79338. nextBtnPosition: _,
  79339. axisExtent: P,
  79340. controlSize: p,
  79341. controlGap: v
  79342. };
  79343. }, e.prototype._position = function(n, r) {
  79344. var i = this._mainGroup, a = this._labelGroup, o = n.viewRect;
  79345. if (n.orient === "vertical") {
  79346. var s = Si(), l = o.x, u = o.y + o.height;
  79347. ao(s, s, [-l, -u]), Cu(s, s, -qP / 2), ao(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
  79348. }
  79349. var c = y(o), f = y(i.getBoundingRect()), d = y(a.getBoundingRect()), h = [i.x, i.y], p = [a.x, a.y];
  79350. p[0] = h[0] = c[0][0];
  79351. var v = n.labelPosOpt;
  79352. if (v == null || Oe(v)) {
  79353. var g = v === "+" ? 0 : 1;
  79354. b(h, f, c, 1, g), b(p, d, c, 1, 1 - g);
  79355. } else {
  79356. var g = v >= 0 ? 0 : 1;
  79357. b(h, f, c, 1, g), p[1] = h[1] + v;
  79358. }
  79359. i.setPosition(h), a.setPosition(p), i.rotation = a.rotation = n.rotation, m(i), m(a);
  79360. function m(_) {
  79361. _.originX = c[0][0] - _.x, _.originY = c[1][0] - _.y;
  79362. }
  79363. function y(_) {
  79364. return [[_.x, _.x + _.width], [_.y, _.y + _.height]];
  79365. }
  79366. function b(_, O, S, x, C) {
  79367. _[x] += S[x][C] - O[x][C];
  79368. }
  79369. }, e.prototype._createAxis = function(n, r) {
  79370. var i = r.getData(), a = r.get("axisType"), o = iGe(r, a);
  79371. o.getTicks = function() {
  79372. return i.mapArray(["value"], function(u) {
  79373. return {
  79374. value: u
  79375. };
  79376. });
  79377. };
  79378. var s = i.getDataExtent("value");
  79379. o.setExtent(s[0], s[1]), o.calcNiceTicks();
  79380. var l = new nGe("value", o, n.axisExtent, a);
  79381. return l.model = r, l;
  79382. }, e.prototype._createGroup = function(n) {
  79383. var r = this[n] = new Ve();
  79384. return this.group.add(r), r;
  79385. }, e.prototype._renderAxisLine = function(n, r, i, a) {
  79386. var o = i.getExtent();
  79387. if (a.get(["lineStyle", "show"])) {
  79388. var s = new Un({
  79389. shape: {
  79390. x1: o[0],
  79391. y1: 0,
  79392. x2: o[1],
  79393. y2: 0
  79394. },
  79395. style: le({
  79396. lineCap: "round"
  79397. }, a.getModel("lineStyle").getLineStyle()),
  79398. silent: !0,
  79399. z2: 1
  79400. });
  79401. r.add(s);
  79402. var l = this._progressLine = new Un({
  79403. shape: {
  79404. x1: o[0],
  79405. x2: this._currentPointer ? this._currentPointer.x : o[0],
  79406. y1: 0,
  79407. y2: 0
  79408. },
  79409. style: Re({
  79410. lineCap: "round",
  79411. lineWidth: s.style.lineWidth
  79412. }, a.getModel(["progress", "lineStyle"]).getLineStyle()),
  79413. silent: !0,
  79414. z2: 1
  79415. });
  79416. r.add(l);
  79417. }
  79418. }, e.prototype._renderAxisTick = function(n, r, i, a) {
  79419. var o = this, s = a.getData(), l = i.scale.getTicks();
  79420. this._tickSymbols = [], k(l, function(u) {
  79421. var c = i.dataToCoord(u.value), f = s.getItemModel(u.value), d = f.getModel("itemStyle"), h = f.getModel(["emphasis", "itemStyle"]), p = f.getModel(["progress", "itemStyle"]), v = {
  79422. x: c,
  79423. y: 0,
  79424. onclick: xe(o._changeTimeline, o, u.value)
  79425. }, g = Q7(f, d, r, v);
  79426. g.ensureState("emphasis").style = h.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), Yl(g);
  79427. var m = Fe(g);
  79428. f.get("tooltip") ? (m.dataIndex = u.value, m.dataModel = a) : m.dataIndex = m.dataModel = null, o._tickSymbols.push(g);
  79429. });
  79430. }, e.prototype._renderAxisLabel = function(n, r, i, a) {
  79431. var o = this, s = i.getLabelModel();
  79432. if (s.get("show")) {
  79433. var l = a.getData(), u = i.getViewLabels();
  79434. this._tickLabels = [], k(u, function(c) {
  79435. var f = c.tickValue, d = l.getItemModel(f), h = d.getModel("label"), p = d.getModel(["emphasis", "label"]), v = d.getModel(["progress", "label"]), g = i.dataToCoord(c.tickValue), m = new gt({
  79436. x: g,
  79437. y: 0,
  79438. rotation: n.labelRotation - n.rotation,
  79439. onclick: xe(o._changeTimeline, o, f),
  79440. silent: !1,
  79441. style: Zt(h, {
  79442. text: c.formattedLabel,
  79443. align: n.labelAlign,
  79444. verticalAlign: n.labelBaseline
  79445. })
  79446. });
  79447. m.ensureState("emphasis").style = Zt(p), m.ensureState("progress").style = Zt(v), r.add(m), Yl(m), W7(m).dataIndex = f, o._tickLabels.push(m);
  79448. });
  79449. }
  79450. }, e.prototype._renderControl = function(n, r, i, a) {
  79451. var o = n.controlSize, s = n.rotation, l = a.getModel("controlStyle").getItemStyle(), u = a.getModel(["emphasis", "controlStyle"]).getItemStyle(), c = a.getPlayState(), f = a.get("inverse", !0);
  79452. d(n.nextBtnPosition, "next", xe(this._changeTimeline, this, f ? "-" : "+")), d(n.prevBtnPosition, "prev", xe(this._changeTimeline, this, f ? "+" : "-")), d(n.playPosition, c ? "stop" : "play", xe(this._handlePlayClick, this, !c), !0);
  79453. function d(h, p, v, g) {
  79454. if (h) {
  79455. var m = oo(We(a.get(["controlStyle", p + "BtnSize"]), o), o), y = [0, -m / 2, m, m], b = oGe(a, p + "Icon", y, {
  79456. x: h[0],
  79457. y: h[1],
  79458. originX: o / 2,
  79459. originY: 0,
  79460. rotation: g ? -s : 0,
  79461. rectHover: !0,
  79462. style: l,
  79463. onclick: v
  79464. });
  79465. b.ensureState("emphasis").style = u, r.add(b), Yl(b);
  79466. }
  79467. }
  79468. }, e.prototype._renderCurrentPointer = function(n, r, i, a) {
  79469. var o = a.getData(), s = a.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, c = {
  79470. onCreate: function(f) {
  79471. f.draggable = !0, f.drift = xe(u._handlePointerDrag, u), f.ondragend = xe(u._handlePointerDragend, u), H7(f, u._progressLine, s, i, a, !0);
  79472. },
  79473. onUpdate: function(f) {
  79474. H7(f, u._progressLine, s, i, a);
  79475. }
  79476. };
  79477. this._currentPointer = Q7(l, l, this._mainGroup, {}, this._currentPointer, c);
  79478. }, e.prototype._handlePlayClick = function(n) {
  79479. this._clearTimer(), this.api.dispatchAction({
  79480. type: "timelinePlayChange",
  79481. playState: n,
  79482. from: this.uid
  79483. });
  79484. }, e.prototype._handlePointerDrag = function(n, r, i) {
  79485. this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY]);
  79486. }, e.prototype._handlePointerDragend = function(n) {
  79487. this._pointerChangeTimeline([n.offsetX, n.offsetY], !0);
  79488. }, e.prototype._pointerChangeTimeline = function(n, r) {
  79489. var i = this._toAxisCoord(n)[0], a = this._axis, o = Vi(a.getExtent().slice());
  79490. i > o[1] && (i = o[1]), i < o[0] && (i = o[0]), this._currentPointer.x = i, this._currentPointer.markRedraw();
  79491. var s = this._progressLine;
  79492. s && (s.shape.x2 = i, s.dirty());
  79493. var l = this._findNearestTick(i), u = this.model;
  79494. (r || l !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(l);
  79495. }, e.prototype._doPlayStop = function() {
  79496. var n = this;
  79497. this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
  79498. var r = n.model;
  79499. n._changeTimeline(r.getCurrentIndex() + (r.get("rewind", !0) ? -1 : 1));
  79500. }, this.model.get("playInterval")));
  79501. }, e.prototype._toAxisCoord = function(n) {
  79502. var r = this._mainGroup.getLocalTransform();
  79503. return to(n, r, !0);
  79504. }, e.prototype._findNearestTick = function(n) {
  79505. var r = this.model.getData(), i = 1 / 0, a, o = this._axis;
  79506. return r.each(["value"], function(s, l) {
  79507. var u = o.dataToCoord(s), c = Math.abs(u - n);
  79508. c < i && (i = c, a = l);
  79509. }), a;
  79510. }, e.prototype._clearTimer = function() {
  79511. this._timer && (clearTimeout(this._timer), this._timer = null);
  79512. }, e.prototype._changeTimeline = function(n) {
  79513. var r = this.model.getCurrentIndex();
  79514. n === "+" ? n = r + 1 : n === "-" && (n = r - 1), this.api.dispatchAction({
  79515. type: "timelineChange",
  79516. currentIndex: n,
  79517. from: this.uid
  79518. });
  79519. }, e.prototype._updateTicksStatus = function() {
  79520. var n = this.model.getCurrentIndex(), r = this._tickSymbols, i = this._tickLabels;
  79521. if (r)
  79522. for (var a = 0; a < r.length; a++)
  79523. r && r[a] && r[a].toggleState("progress", a < n);
  79524. if (i)
  79525. for (var a = 0; a < i.length; a++)
  79526. i && i[a] && i[a].toggleState("progress", W7(i[a]).dataIndex <= n);
  79527. }, e.type = "timeline.slider", e;
  79528. }(tGe)
  79529. );
  79530. function iGe(t, e) {
  79531. if (e = e || t.get("type"), e)
  79532. switch (e) {
  79533. case "category":
  79534. return new vw({
  79535. ordinalMeta: t.getCategories(),
  79536. extent: [1 / 0, -1 / 0]
  79537. });
  79538. case "time":
  79539. return new Ck({
  79540. locale: t.ecModel.getLocaleModel(),
  79541. useUTC: t.ecModel.get("useUTC")
  79542. });
  79543. default:
  79544. return new Ys();
  79545. }
  79546. }
  79547. function aGe(t, e) {
  79548. return Rn(t.getBoxLayoutParams(), {
  79549. width: e.getWidth(),
  79550. height: e.getHeight()
  79551. }, t.get("padding"));
  79552. }
  79553. function oGe(t, e, n, r) {
  79554. var i = r.style, a = vp(t.get(["controlStyle", e]), r || {}, new Je(n[0], n[1], n[2], n[3]));
  79555. return i && a.setStyle(i), a;
  79556. }
  79557. function Q7(t, e, n, r, i, a) {
  79558. var o = e.get("color");
  79559. if (i)
  79560. i.setColor(o), n.add(i), a && a.onUpdate(i);
  79561. else {
  79562. var s = t.get("symbol");
  79563. i = $n(s, -1, -1, 2, 2, o), i.setStyle("strokeNoScale", !0), n.add(i), a && a.onCreate(i);
  79564. }
  79565. var l = e.getItemStyle(["color"]);
  79566. i.setStyle(l), r = qe({
  79567. rectHover: !0,
  79568. z2: 100
  79569. }, r, !0);
  79570. var u = xp(t.get("symbolSize"));
  79571. r.scaleX = u[0] / 2, r.scaleY = u[1] / 2;
  79572. var c = Vf(t.get("symbolOffset"), u);
  79573. c && (r.x = (r.x || 0) + c[0], r.y = (r.y || 0) + c[1]);
  79574. var f = t.get("symbolRotate");
  79575. return r.rotation = (f || 0) * Math.PI / 180 || 0, i.attr(r), i.updateTransform(), i;
  79576. }
  79577. function H7(t, e, n, r, i, a) {
  79578. if (!t.dragging) {
  79579. var o = i.getModel("checkpointStyle"), s = r.dataToCoord(i.getData().get("value", n));
  79580. if (a || !o.get("animation", !0))
  79581. t.attr({
  79582. x: s,
  79583. y: 0
  79584. }), e && e.attr({
  79585. shape: {
  79586. x2: s
  79587. }
  79588. });
  79589. else {
  79590. var l = {
  79591. duration: o.get("animationDuration", !0),
  79592. easing: o.get("animationEasing", !0)
  79593. };
  79594. t.stopAnimation(null, !0), t.animateTo({
  79595. x: s,
  79596. y: 0
  79597. }, l), e && e.animateTo({
  79598. shape: {
  79599. x2: s
  79600. }
  79601. }, l);
  79602. }
  79603. }
  79604. }
  79605. function sGe(t) {
  79606. t.registerAction({
  79607. type: "timelineChange",
  79608. event: "timelineChanged",
  79609. update: "prepareAndUpdate"
  79610. }, function(e, n, r) {
  79611. var i = n.getComponent("timeline");
  79612. return i && e.currentIndex != null && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), r.dispatchAction({
  79613. type: "timelinePlayChange",
  79614. playState: !1,
  79615. from: e.from
  79616. }))), n.resetOption("timeline", {
  79617. replaceMerge: i.get("replaceMerge", !0)
  79618. }), Re({
  79619. currentIndex: i.option.currentIndex
  79620. }, e);
  79621. }), t.registerAction({
  79622. type: "timelinePlayChange",
  79623. event: "timelinePlayChanged",
  79624. update: "update"
  79625. }, function(e, n) {
  79626. var r = n.getComponent("timeline");
  79627. r && e.playState != null && r.setPlayState(e.playState);
  79628. });
  79629. }
  79630. function lGe(t) {
  79631. var e = t && t.timeline;
  79632. ue(e) || (e = e ? [e] : []), k(e, function(n) {
  79633. n && uGe(n);
  79634. });
  79635. }
  79636. function uGe(t) {
  79637. var e = t.type, n = {
  79638. number: "value",
  79639. time: "time"
  79640. };
  79641. if (n[e] && (t.axisType = n[e], delete t.type), G7(t), Cc(t, "controlPosition")) {
  79642. var r = t.controlStyle || (t.controlStyle = {});
  79643. Cc(r, "position") || (r.position = t.controlPosition), r.position === "none" && !Cc(r, "show") && (r.show = !1, delete r.position), delete t.controlPosition;
  79644. }
  79645. k(t.data || [], function(i) {
  79646. Ie(i) && !ue(i) && (!Cc(i, "value") && Cc(i, "name") && (i.value = i.name), G7(i));
  79647. });
  79648. }
  79649. function G7(t) {
  79650. var e = t.itemStyle || (t.itemStyle = {}), n = e.emphasis || (e.emphasis = {}), r = t.label || t.label || {}, i = r.normal || (r.normal = {}), a = {
  79651. normal: 1,
  79652. emphasis: 1
  79653. };
  79654. k(r, function(o, s) {
  79655. !a[s] && !Cc(i, s) && (i[s] = o);
  79656. }), n.label && !Cc(r, "emphasis") && (r.emphasis = n.label, delete n.label);
  79657. }
  79658. function Cc(t, e) {
  79659. return t.hasOwnProperty(e);
  79660. }
  79661. function cGe(t) {
  79662. t.registerComponentModel(Kre), t.registerComponentView(rGe), t.registerSubTypeDefaulter("timeline", function() {
  79663. return "slider";
  79664. }), sGe(t), t.registerPreprocessor(lGe);
  79665. }
  79666. function PL(t, e) {
  79667. if (!t)
  79668. return !1;
  79669. for (var n = ue(t) ? t : [t], r = 0; r < n.length; r++)
  79670. if (n[r] && n[r][e])
  79671. return !0;
  79672. return !1;
  79673. }
  79674. function kb(t) {
  79675. gf(t, "label", ["show"]);
  79676. }
  79677. var Lb = bt(), Ks = (
  79678. /** @class */
  79679. function(t) {
  79680. q(e, t);
  79681. function e() {
  79682. var n = t !== null && t.apply(this, arguments) || this;
  79683. return n.type = e.type, n.createdBySelf = !1, n;
  79684. }
  79685. return e.prototype.init = function(n, r, i) {
  79686. if (process.env.NODE_ENV !== "production" && this.type === "marker")
  79687. throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
  79688. this.mergeDefaultAndTheme(n, i), this._mergeOption(n, i, !1, !0);
  79689. }, e.prototype.isAnimationEnabled = function() {
  79690. if (vt.node)
  79691. return !1;
  79692. var n = this.__hostSeries;
  79693. return this.getShallow("animation") && n && n.isAnimationEnabled();
  79694. }, e.prototype.mergeOption = function(n, r) {
  79695. this._mergeOption(n, r, !1, !1);
  79696. }, e.prototype._mergeOption = function(n, r, i, a) {
  79697. var o = this.mainType;
  79698. i || r.eachSeries(function(s) {
  79699. var l = s.get(this.mainType, !0), u = Lb(s)[o];
  79700. if (!l || !l.data) {
  79701. Lb(s)[o] = null;
  79702. return;
  79703. }
  79704. u ? u._mergeOption(l, r, !0) : (a && kb(l), k(l.data, function(c) {
  79705. c instanceof Array ? (kb(c[0]), kb(c[1])) : kb(c);
  79706. }), u = this.createMarkerModelFromSeries(l, this, r), le(u, {
  79707. mainType: this.mainType,
  79708. // Use the same series index and name
  79709. seriesIndex: s.seriesIndex,
  79710. name: s.name,
  79711. createdBySelf: !0
  79712. }), u.__hostSeries = s), Lb(s)[o] = u;
  79713. }, this);
  79714. }, e.prototype.formatTooltip = function(n, r, i) {
  79715. var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
  79716. return tr("section", {
  79717. header: this.name,
  79718. blocks: [tr("nameValue", {
  79719. name: s,
  79720. value: o,
  79721. noName: !s,
  79722. noValue: o == null
  79723. })]
  79724. });
  79725. }, e.prototype.getData = function() {
  79726. return this._data;
  79727. }, e.prototype.setData = function(n) {
  79728. this._data = n;
  79729. }, e.prototype.getDataParams = function(n, r) {
  79730. var i = sw.prototype.getDataParams.call(this, n, r), a = this.__hostSeries;
  79731. return a && (i.seriesId = a.id, i.seriesName = a.name, i.seriesType = a.subType), i;
  79732. }, e.getMarkerModelFromSeries = function(n, r) {
  79733. return Lb(n)[r];
  79734. }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
  79735. }(rt)
  79736. );
  79737. xn(Ks, sw.prototype);
  79738. var fGe = (
  79739. /** @class */
  79740. function(t) {
  79741. q(e, t);
  79742. function e() {
  79743. var n = t !== null && t.apply(this, arguments) || this;
  79744. return n.type = e.type, n;
  79745. }
  79746. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  79747. return new e(n, r, i);
  79748. }, e.type = "markPoint", e.defaultOption = {
  79749. // zlevel: 0,
  79750. z: 5,
  79751. symbol: "pin",
  79752. symbolSize: 50,
  79753. // symbolRotate: 0,
  79754. // symbolOffset: [0, 0]
  79755. tooltip: {
  79756. trigger: "item"
  79757. },
  79758. label: {
  79759. show: !0,
  79760. position: "inside"
  79761. },
  79762. itemStyle: {
  79763. borderWidth: 2
  79764. },
  79765. emphasis: {
  79766. label: {
  79767. show: !0
  79768. }
  79769. }
  79770. }, e;
  79771. }(Ks)
  79772. );
  79773. function BE(t) {
  79774. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
  79775. }
  79776. function dGe(t) {
  79777. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
  79778. }
  79779. function Nb(t, e, n, r, i, a) {
  79780. var o = [], s = Xs(
  79781. e,
  79782. r
  79783. /* , otherDataDim */
  79784. ), l = s ? e.getCalculationInfo("stackResultDimension") : r, u = $L(e, l, t), c = e.indicesOfNearest(l, u)[0];
  79785. o[i] = e.get(n, c), o[a] = e.get(l, c);
  79786. var f = e.get(r, c), d = Ua(e.get(r, c));
  79787. return d = Math.min(d, 20), d >= 0 && (o[a] = +o[a].toFixed(d)), [o, f];
  79788. }
  79789. var KP = {
  79790. min: Ue(Nb, "min"),
  79791. max: Ue(Nb, "max"),
  79792. average: Ue(Nb, "average"),
  79793. median: Ue(Nb, "median")
  79794. };
  79795. function Wm(t, e) {
  79796. if (e) {
  79797. var n = t.getData(), r = t.coordinateSystem, i = r && r.dimensions;
  79798. if (!dGe(e) && !ue(e.coord) && ue(i)) {
  79799. var a = Jre(e, n, r, t);
  79800. if (e = Le(e), e.type && KP[e.type] && a.baseAxis && a.valueAxis) {
  79801. var o = et(i, a.baseAxis.dim), s = et(i, a.valueAxis.dim), l = KP[e.type](n, a.baseDataDim, a.valueDataDim, o, s);
  79802. e.coord = l[0], e.value = l[1];
  79803. } else
  79804. e.coord = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis];
  79805. }
  79806. if (e.coord == null || !ue(i))
  79807. e.coord = [];
  79808. else
  79809. for (var u = e.coord, c = 0; c < 2; c++)
  79810. KP[u[c]] && (u[c] = $L(n, n.mapDimension(i[c]), u[c]));
  79811. return e;
  79812. }
  79813. }
  79814. function Jre(t, e, n, r) {
  79815. var i = {};
  79816. return t.valueIndex != null || t.valueDim != null ? (i.valueDataDim = t.valueIndex != null ? e.getDimension(t.valueIndex) : t.valueDim, i.valueAxis = n.getAxis(hGe(r, i.valueDataDim)), i.baseAxis = n.getOtherAxis(i.valueAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim)) : (i.baseAxis = r.getBaseAxis(), i.valueAxis = n.getOtherAxis(i.baseAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim), i.valueDataDim = e.mapDimension(i.valueAxis.dim)), i;
  79817. }
  79818. function hGe(t, e) {
  79819. var n = t.getData().getDimensionInfo(e);
  79820. return n && n.coordDim;
  79821. }
  79822. function Qm(t, e) {
  79823. return t && t.containData && e.coord && !BE(e) ? t.containData(e.coord) : !0;
  79824. }
  79825. function pGe(t, e, n) {
  79826. return t && t.containZone && e.coord && n.coord && !BE(e) && !BE(n) ? t.containZone(e.coord, n.coord) : !0;
  79827. }
  79828. function eie(t, e) {
  79829. return t ? function(n, r, i, a) {
  79830. var o = a < 2 ? n.coord && n.coord[a] : n.value;
  79831. return Kl(o, e[a]);
  79832. } : function(n, r, i, a) {
  79833. return Kl(n.value, e[a]);
  79834. };
  79835. }
  79836. function $L(t, e, n) {
  79837. if (n === "average") {
  79838. var r = 0, i = 0;
  79839. return t.each(e, function(a, o) {
  79840. isNaN(a) || (r += a, i++);
  79841. }), r / i;
  79842. } else return n === "median" ? t.getMedian(e) : t.getDataExtent(e)[n === "max" ? 1 : 0];
  79843. }
  79844. var JP = bt(), AL = (
  79845. /** @class */
  79846. function(t) {
  79847. q(e, t);
  79848. function e() {
  79849. var n = t !== null && t.apply(this, arguments) || this;
  79850. return n.type = e.type, n;
  79851. }
  79852. return e.prototype.init = function() {
  79853. this.markerGroupMap = Pe();
  79854. }, e.prototype.render = function(n, r, i) {
  79855. var a = this, o = this.markerGroupMap;
  79856. o.each(function(s) {
  79857. JP(s).keep = !1;
  79858. }), r.eachSeries(function(s) {
  79859. var l = Ks.getMarkerModelFromSeries(s, a.type);
  79860. l && a.renderSeries(s, l, r, i);
  79861. }), o.each(function(s) {
  79862. !JP(s).keep && a.group.remove(s.group);
  79863. });
  79864. }, e.prototype.markKeep = function(n) {
  79865. JP(n).keep = !0;
  79866. }, e.prototype.toggleBlurSeries = function(n, r) {
  79867. var i = this;
  79868. k(n, function(a) {
  79869. var o = Ks.getMarkerModelFromSeries(a, i.type);
  79870. if (o) {
  79871. var s = o.getData();
  79872. s.eachItemGraphicEl(function(l) {
  79873. l && (r ? LK(l) : NR(l));
  79874. });
  79875. }
  79876. });
  79877. }, e.type = "marker", e;
  79878. }(Xt)
  79879. );
  79880. function j7(t, e, n) {
  79881. var r = e.coordinateSystem;
  79882. t.each(function(i) {
  79883. var a = t.getItemModel(i), o, s = _e(a.get("x"), n.getWidth()), l = _e(a.get("y"), n.getHeight());
  79884. if (!isNaN(s) && !isNaN(l))
  79885. o = [s, l];
  79886. else if (e.getMarkerPosition)
  79887. o = e.getMarkerPosition(t.getValues(t.dimensions, i));
  79888. else if (r) {
  79889. var u = t.get(r.dimensions[0], i), c = t.get(r.dimensions[1], i);
  79890. o = r.dataToPoint([u, c]);
  79891. }
  79892. isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(i, o);
  79893. });
  79894. }
  79895. var vGe = (
  79896. /** @class */
  79897. function(t) {
  79898. q(e, t);
  79899. function e() {
  79900. var n = t !== null && t.apply(this, arguments) || this;
  79901. return n.type = e.type, n;
  79902. }
  79903. return e.prototype.updateTransform = function(n, r, i) {
  79904. r.eachSeries(function(a) {
  79905. var o = Ks.getMarkerModelFromSeries(a, "markPoint");
  79906. o && (j7(o.getData(), a, i), this.markerGroupMap.get(a.id).updateLayout());
  79907. }, this);
  79908. }, e.prototype.renderSeries = function(n, r, i, a) {
  79909. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new Z0()), f = gGe(o, n, r);
  79910. r.setData(f), j7(r.getData(), n, a), f.each(function(d) {
  79911. var h = f.getItemModel(d), p = h.getShallow("symbol"), v = h.getShallow("symbolSize"), g = h.getShallow("symbolRotate"), m = h.getShallow("symbolOffset"), y = h.getShallow("symbolKeepAspect");
  79912. if (Me(p) || Me(v) || Me(g) || Me(m)) {
  79913. var b = r.getRawValue(d), _ = r.getDataParams(d);
  79914. Me(p) && (p = p(b, _)), Me(v) && (v = v(b, _)), Me(g) && (g = g(b, _)), Me(m) && (m = m(b, _));
  79915. }
  79916. var O = h.getModel("itemStyle").getItemStyle(), S = H0(l, "color");
  79917. O.fill || (O.fill = S), f.setItemVisual(d, {
  79918. symbol: p,
  79919. symbolSize: v,
  79920. symbolRotate: g,
  79921. symbolOffset: m,
  79922. symbolKeepAspect: y,
  79923. style: O
  79924. });
  79925. }), c.updateData(f), this.group.add(c.group), f.eachItemGraphicEl(function(d) {
  79926. d.traverse(function(h) {
  79927. Fe(h).dataModel = r;
  79928. });
  79929. }), this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
  79930. }, e.type = "markPoint", e;
  79931. }(AL)
  79932. );
  79933. function gGe(t, e, n) {
  79934. var r;
  79935. t ? r = ce(t && t.dimensions, function(s) {
  79936. var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
  79937. return le(le({}, l), {
  79938. name: s,
  79939. // DON'T use ordinalMeta to parse and collect ordinal.
  79940. ordinalMeta: null
  79941. });
  79942. }) : r = [{
  79943. name: "value",
  79944. type: "float"
  79945. }];
  79946. var i = new Lr(r, n), a = ce(n.get("data"), Ue(Wm, e));
  79947. t && (a = Nt(a, Ue(Qm, t)));
  79948. var o = eie(!!t, r);
  79949. return i.initData(a, null, o), i;
  79950. }
  79951. function mGe(t) {
  79952. t.registerComponentModel(fGe), t.registerComponentView(vGe), t.registerPreprocessor(function(e) {
  79953. PL(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
  79954. });
  79955. }
  79956. var yGe = (
  79957. /** @class */
  79958. function(t) {
  79959. q(e, t);
  79960. function e() {
  79961. var n = t !== null && t.apply(this, arguments) || this;
  79962. return n.type = e.type, n;
  79963. }
  79964. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  79965. return new e(n, r, i);
  79966. }, e.type = "markLine", e.defaultOption = {
  79967. // zlevel: 0,
  79968. z: 5,
  79969. symbol: ["circle", "arrow"],
  79970. symbolSize: [8, 16],
  79971. // symbolRotate: 0,
  79972. symbolOffset: 0,
  79973. precision: 2,
  79974. tooltip: {
  79975. trigger: "item"
  79976. },
  79977. label: {
  79978. show: !0,
  79979. position: "end",
  79980. distance: 5
  79981. },
  79982. lineStyle: {
  79983. type: "dashed"
  79984. },
  79985. emphasis: {
  79986. label: {
  79987. show: !0
  79988. },
  79989. lineStyle: {
  79990. width: 3
  79991. }
  79992. },
  79993. animationEasing: "linear"
  79994. }, e;
  79995. }(Ks)
  79996. ), Bb = bt(), bGe = function(t, e, n, r) {
  79997. var i = t.getData(), a;
  79998. if (ue(r))
  79999. a = r;
  80000. else {
  80001. var o = r.type;
  80002. if (o === "min" || o === "max" || o === "average" || o === "median" || r.xAxis != null || r.yAxis != null) {
  80003. var s = void 0, l = void 0;
  80004. if (r.yAxis != null || r.xAxis != null)
  80005. s = e.getAxis(r.yAxis != null ? "y" : "x"), l = Tn(r.yAxis, r.xAxis);
  80006. else {
  80007. var u = Jre(r, i, e, t);
  80008. s = u.valueAxis;
  80009. var c = Sk(i, u.valueDataDim);
  80010. l = $L(i, c, o);
  80011. }
  80012. var f = s.dim === "x" ? 0 : 1, d = 1 - f, h = Le(r), p = {
  80013. coord: []
  80014. };
  80015. h.type = null, h.coord = [], h.coord[d] = -1 / 0, p.coord[d] = 1 / 0;
  80016. var v = n.get("precision");
  80017. v >= 0 && St(l) && (l = +l.toFixed(Math.min(v, 20))), h.coord[f] = p.coord[f] = l, a = [h, p, {
  80018. type: o,
  80019. valueIndex: r.valueIndex,
  80020. // Force to use the value of calculated value.
  80021. value: l
  80022. }];
  80023. } else
  80024. process.env.NODE_ENV !== "production" && Oa("Invalid markLine data."), a = [];
  80025. }
  80026. var g = [Wm(t, a[0]), Wm(t, a[1]), le({}, a[2])];
  80027. return g[2].type = g[2].type || null, qe(g[2], g[0]), qe(g[2], g[1]), g;
  80028. };
  80029. function QO(t) {
  80030. return !isNaN(t) && !isFinite(t);
  80031. }
  80032. function Z7(t, e, n, r) {
  80033. var i = 1 - t, a = r.dimensions[t];
  80034. return QO(e[i]) && QO(n[i]) && e[t] === n[t] && r.getAxis(a).containData(e[t]);
  80035. }
  80036. function _Ge(t, e) {
  80037. if (t.type === "cartesian2d") {
  80038. var n = e[0].coord, r = e[1].coord;
  80039. if (n && r && (Z7(1, n, r, t) || Z7(0, n, r, t)))
  80040. return !0;
  80041. }
  80042. return Qm(t, e[0]) && Qm(t, e[1]);
  80043. }
  80044. function e$(t, e, n, r, i) {
  80045. var a = r.coordinateSystem, o = t.getItemModel(e), s, l = _e(o.get("x"), i.getWidth()), u = _e(o.get("y"), i.getHeight());
  80046. if (!isNaN(l) && !isNaN(u))
  80047. s = [l, u];
  80048. else {
  80049. if (r.getMarkerPosition)
  80050. s = r.getMarkerPosition(t.getValues(t.dimensions, e));
  80051. else {
  80052. var c = a.dimensions, f = t.get(c[0], e), d = t.get(c[1], e);
  80053. s = a.dataToPoint([f, d]);
  80054. }
  80055. if (Ff(a, "cartesian2d")) {
  80056. var h = a.getAxis("x"), p = a.getAxis("y"), c = a.dimensions;
  80057. QO(t.get(c[0], e)) ? s[0] = h.toGlobalCoord(h.getExtent()[n ? 0 : 1]) : QO(t.get(c[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[n ? 0 : 1]));
  80058. }
  80059. isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  80060. }
  80061. t.setItemLayout(e, s);
  80062. }
  80063. var OGe = (
  80064. /** @class */
  80065. function(t) {
  80066. q(e, t);
  80067. function e() {
  80068. var n = t !== null && t.apply(this, arguments) || this;
  80069. return n.type = e.type, n;
  80070. }
  80071. return e.prototype.updateTransform = function(n, r, i) {
  80072. r.eachSeries(function(a) {
  80073. var o = Ks.getMarkerModelFromSeries(a, "markLine");
  80074. if (o) {
  80075. var s = o.getData(), l = Bb(o).from, u = Bb(o).to;
  80076. l.each(function(c) {
  80077. e$(l, c, !0, a, i), e$(u, c, !1, a, i);
  80078. }), s.each(function(c) {
  80079. s.setItemLayout(c, [l.getItemLayout(c), u.getItemLayout(c)]);
  80080. }), this.markerGroupMap.get(a.id).updateLayout();
  80081. }
  80082. }, this);
  80083. }, e.prototype.renderSeries = function(n, r, i, a) {
  80084. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new Kk());
  80085. this.group.add(c.group);
  80086. var f = SGe(o, n, r), d = f.from, h = f.to, p = f.line;
  80087. Bb(r).from = d, Bb(r).to = h, r.setData(p);
  80088. var v = r.get("symbol"), g = r.get("symbolSize"), m = r.get("symbolRotate"), y = r.get("symbolOffset");
  80089. ue(v) || (v = [v, v]), ue(g) || (g = [g, g]), ue(m) || (m = [m, m]), ue(y) || (y = [y, y]), f.from.each(function(_) {
  80090. b(d, _, !0), b(h, _, !1);
  80091. }), p.each(function(_) {
  80092. var O = p.getItemModel(_).getModel("lineStyle").getLineStyle();
  80093. p.setItemLayout(_, [d.getItemLayout(_), h.getItemLayout(_)]), O.stroke == null && (O.stroke = d.getItemVisual(_, "style").fill), p.setItemVisual(_, {
  80094. fromSymbolKeepAspect: d.getItemVisual(_, "symbolKeepAspect"),
  80095. fromSymbolOffset: d.getItemVisual(_, "symbolOffset"),
  80096. fromSymbolRotate: d.getItemVisual(_, "symbolRotate"),
  80097. fromSymbolSize: d.getItemVisual(_, "symbolSize"),
  80098. fromSymbol: d.getItemVisual(_, "symbol"),
  80099. toSymbolKeepAspect: h.getItemVisual(_, "symbolKeepAspect"),
  80100. toSymbolOffset: h.getItemVisual(_, "symbolOffset"),
  80101. toSymbolRotate: h.getItemVisual(_, "symbolRotate"),
  80102. toSymbolSize: h.getItemVisual(_, "symbolSize"),
  80103. toSymbol: h.getItemVisual(_, "symbol"),
  80104. style: O
  80105. });
  80106. }), c.updateData(p), f.line.eachItemGraphicEl(function(_) {
  80107. Fe(_).dataModel = r, _.traverse(function(O) {
  80108. Fe(O).dataModel = r;
  80109. });
  80110. });
  80111. function b(_, O, S) {
  80112. var x = _.getItemModel(O);
  80113. e$(_, O, S, n, a);
  80114. var C = x.getModel("itemStyle").getItemStyle();
  80115. C.fill == null && (C.fill = H0(l, "color")), _.setItemVisual(O, {
  80116. symbolKeepAspect: x.get("symbolKeepAspect"),
  80117. // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
  80118. symbolOffset: We(x.get("symbolOffset", !0), y[S ? 0 : 1]),
  80119. symbolRotate: We(x.get("symbolRotate", !0), m[S ? 0 : 1]),
  80120. // TODO: when 2d array is supported, it should ignore parent
  80121. symbolSize: We(x.get("symbolSize"), g[S ? 0 : 1]),
  80122. symbol: We(x.get("symbol", !0), v[S ? 0 : 1]),
  80123. style: C
  80124. });
  80125. }
  80126. this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
  80127. }, e.type = "markLine", e;
  80128. }(AL)
  80129. );
  80130. function SGe(t, e, n) {
  80131. var r;
  80132. t ? r = ce(t && t.dimensions, function(u) {
  80133. var c = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
  80134. return le(le({}, c), {
  80135. name: u,
  80136. // DON'T use ordinalMeta to parse and collect ordinal.
  80137. ordinalMeta: null
  80138. });
  80139. }) : r = [{
  80140. name: "value",
  80141. type: "float"
  80142. }];
  80143. var i = new Lr(r, n), a = new Lr(r, n), o = new Lr([], n), s = ce(n.get("data"), Ue(bGe, e, t, n));
  80144. t && (s = Nt(s, Ue(_Ge, t)));
  80145. var l = eie(!!t, r);
  80146. return i.initData(ce(s, function(u) {
  80147. return u[0];
  80148. }), null, l), a.initData(ce(s, function(u) {
  80149. return u[1];
  80150. }), null, l), o.initData(ce(s, function(u) {
  80151. return u[2];
  80152. })), o.hasItemOption = !0, {
  80153. from: i,
  80154. to: a,
  80155. line: o
  80156. };
  80157. }
  80158. function xGe(t) {
  80159. t.registerComponentModel(yGe), t.registerComponentView(OGe), t.registerPreprocessor(function(e) {
  80160. PL(e.series, "markLine") && (e.markLine = e.markLine || {});
  80161. });
  80162. }
  80163. var wGe = (
  80164. /** @class */
  80165. function(t) {
  80166. q(e, t);
  80167. function e() {
  80168. var n = t !== null && t.apply(this, arguments) || this;
  80169. return n.type = e.type, n;
  80170. }
  80171. return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
  80172. return new e(n, r, i);
  80173. }, e.type = "markArea", e.defaultOption = {
  80174. // zlevel: 0,
  80175. // PENDING
  80176. z: 1,
  80177. tooltip: {
  80178. trigger: "item"
  80179. },
  80180. // markArea should fixed on the coordinate system
  80181. animation: !1,
  80182. label: {
  80183. show: !0,
  80184. position: "top"
  80185. },
  80186. itemStyle: {
  80187. // color and borderColor default to use color from series
  80188. // color: 'auto'
  80189. // borderColor: 'auto'
  80190. borderWidth: 0
  80191. },
  80192. emphasis: {
  80193. label: {
  80194. show: !0,
  80195. position: "top"
  80196. }
  80197. }
  80198. }, e;
  80199. }(Ks)
  80200. ), zb = bt(), CGe = function(t, e, n, r) {
  80201. var i = r[0], a = r[1];
  80202. if (!(!i || !a)) {
  80203. var o = Wm(t, i), s = Wm(t, a), l = o.coord, u = s.coord;
  80204. l[0] = Tn(l[0], -1 / 0), l[1] = Tn(l[1], -1 / 0), u[0] = Tn(u[0], 1 / 0), u[1] = Tn(u[1], 1 / 0);
  80205. var c = Dx([{}, o, s]);
  80206. return c.coord = [o.coord, s.coord], c.x0 = o.x, c.y0 = o.y, c.x1 = s.x, c.y1 = s.y, c;
  80207. }
  80208. };
  80209. function HO(t) {
  80210. return !isNaN(t) && !isFinite(t);
  80211. }
  80212. function U7(t, e, n, r) {
  80213. var i = 1 - t;
  80214. return HO(e[i]) && HO(n[i]);
  80215. }
  80216. function TGe(t, e) {
  80217. var n = e.coord[0], r = e.coord[1], i = {
  80218. coord: n,
  80219. x: e.x0,
  80220. y: e.y0
  80221. }, a = {
  80222. coord: r,
  80223. x: e.x1,
  80224. y: e.y1
  80225. };
  80226. return Ff(t, "cartesian2d") ? n && r && (U7(1, n, r) || U7(0, n, r)) ? !0 : pGe(t, i, a) : Qm(t, i) || Qm(t, a);
  80227. }
  80228. function X7(t, e, n, r, i) {
  80229. var a = r.coordinateSystem, o = t.getItemModel(e), s, l = _e(o.get(n[0]), i.getWidth()), u = _e(o.get(n[1]), i.getHeight());
  80230. if (!isNaN(l) && !isNaN(u))
  80231. s = [l, u];
  80232. else {
  80233. if (r.getMarkerPosition) {
  80234. var c = t.getValues(["x0", "y0"], e), f = t.getValues(["x1", "y1"], e), d = a.clampData(c), h = a.clampData(f), p = [];
  80235. n[0] === "x0" ? p[0] = d[0] > h[0] ? f[0] : c[0] : p[0] = d[0] > h[0] ? c[0] : f[0], n[1] === "y0" ? p[1] = d[1] > h[1] ? f[1] : c[1] : p[1] = d[1] > h[1] ? c[1] : f[1], s = r.getMarkerPosition(p, n, !0);
  80236. } else {
  80237. var v = t.get(n[0], e), g = t.get(n[1], e), m = [v, g];
  80238. a.clampData && a.clampData(m, m), s = a.dataToPoint(m, !0);
  80239. }
  80240. if (Ff(a, "cartesian2d")) {
  80241. var y = a.getAxis("x"), b = a.getAxis("y"), v = t.get(n[0], e), g = t.get(n[1], e);
  80242. HO(v) ? s[0] = y.toGlobalCoord(y.getExtent()[n[0] === "x0" ? 0 : 1]) : HO(g) && (s[1] = b.toGlobalCoord(b.getExtent()[n[1] === "y0" ? 0 : 1]));
  80243. }
  80244. isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  80245. }
  80246. return s;
  80247. }
  80248. var Y7 = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], PGe = (
  80249. /** @class */
  80250. function(t) {
  80251. q(e, t);
  80252. function e() {
  80253. var n = t !== null && t.apply(this, arguments) || this;
  80254. return n.type = e.type, n;
  80255. }
  80256. return e.prototype.updateTransform = function(n, r, i) {
  80257. r.eachSeries(function(a) {
  80258. var o = Ks.getMarkerModelFromSeries(a, "markArea");
  80259. if (o) {
  80260. var s = o.getData();
  80261. s.each(function(l) {
  80262. var u = ce(Y7, function(f) {
  80263. return X7(s, l, f, a, i);
  80264. });
  80265. s.setItemLayout(l, u);
  80266. var c = s.getItemGraphicEl(l);
  80267. c.setShape("points", u);
  80268. });
  80269. }
  80270. }, this);
  80271. }, e.prototype.renderSeries = function(n, r, i, a) {
  80272. var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, {
  80273. group: new Ve()
  80274. });
  80275. this.group.add(c.group), this.markKeep(c);
  80276. var f = $Ge(o, n, r);
  80277. r.setData(f), f.each(function(d) {
  80278. var h = ce(Y7, function(C) {
  80279. return X7(f, d, C, n, a);
  80280. }), p = o.getAxis("x").scale, v = o.getAxis("y").scale, g = p.getExtent(), m = v.getExtent(), y = [p.parse(f.get("x0", d)), p.parse(f.get("x1", d))], b = [v.parse(f.get("y0", d)), v.parse(f.get("y1", d))];
  80281. Vi(y), Vi(b);
  80282. var _ = !(g[0] > y[1] || g[1] < y[0] || m[0] > b[1] || m[1] < b[0]), O = !_;
  80283. f.setItemLayout(d, {
  80284. points: h,
  80285. allClipped: O
  80286. });
  80287. var S = f.getItemModel(d).getModel("itemStyle").getItemStyle(), x = H0(l, "color");
  80288. S.fill || (S.fill = x, Oe(S.fill) && (S.fill = _m(S.fill, 0.4))), S.stroke || (S.stroke = x), f.setItemVisual(d, "style", S);
  80289. }), f.diff(zb(c).data).add(function(d) {
  80290. var h = f.getItemLayout(d);
  80291. if (!h.allClipped) {
  80292. var p = new ii({
  80293. shape: {
  80294. points: h.points
  80295. }
  80296. });
  80297. f.setItemGraphicEl(d, p), c.group.add(p);
  80298. }
  80299. }).update(function(d, h) {
  80300. var p = zb(c).data.getItemGraphicEl(h), v = f.getItemLayout(d);
  80301. v.allClipped ? p && c.group.remove(p) : (p ? Ct(p, {
  80302. shape: {
  80303. points: v.points
  80304. }
  80305. }, r, d) : p = new ii({
  80306. shape: {
  80307. points: v.points
  80308. }
  80309. }), f.setItemGraphicEl(d, p), c.group.add(p));
  80310. }).remove(function(d) {
  80311. var h = zb(c).data.getItemGraphicEl(d);
  80312. c.group.remove(h);
  80313. }).execute(), f.eachItemGraphicEl(function(d, h) {
  80314. var p = f.getItemModel(h), v = f.getItemVisual(h, "style");
  80315. d.useStyle(f.getItemVisual(h, "style")), Pr(d, er(p), {
  80316. labelFetcher: r,
  80317. labelDataIndex: h,
  80318. defaultText: f.getName(h) || "",
  80319. inheritColor: Oe(v.fill) ? _m(v.fill, 1) : "#000"
  80320. }), Tr(d, p), bn(d, null, null, p.get(["emphasis", "disabled"])), Fe(d).dataModel = r;
  80321. }), zb(c).data = f, c.group.silent = r.get("silent") || n.get("silent");
  80322. }, e.type = "markArea", e;
  80323. }(AL)
  80324. );
  80325. function $Ge(t, e, n) {
  80326. var r, i, a = ["x0", "y0", "x1", "y1"];
  80327. if (t) {
  80328. var o = ce(t && t.dimensions, function(u) {
  80329. var c = e.getData(), f = c.getDimensionInfo(c.mapDimension(u)) || {};
  80330. return le(le({}, f), {
  80331. name: u,
  80332. // DON'T use ordinalMeta to parse and collect ordinal.
  80333. ordinalMeta: null
  80334. });
  80335. });
  80336. i = ce(a, function(u, c) {
  80337. return {
  80338. name: u,
  80339. type: o[c % 2].type
  80340. };
  80341. }), r = new Lr(i, n);
  80342. } else
  80343. i = [{
  80344. name: "value",
  80345. type: "float"
  80346. }], r = new Lr(i, n);
  80347. var s = ce(n.get("data"), Ue(CGe, e, t, n));
  80348. t && (s = Nt(s, Ue(TGe, t)));
  80349. var l = t ? function(u, c, f, d) {
  80350. var h = u.coord[Math.floor(d / 2)][d % 2];
  80351. return Kl(h, i[d]);
  80352. } : function(u, c, f, d) {
  80353. return Kl(u.value, i[d]);
  80354. };
  80355. return r.initData(s, null, l), r.hasItemOption = !0, r;
  80356. }
  80357. function AGe(t) {
  80358. t.registerComponentModel(wGe), t.registerComponentView(PGe), t.registerPreprocessor(function(e) {
  80359. PL(e.series, "markArea") && (e.markArea = e.markArea || {});
  80360. });
  80361. }
  80362. var EGe = function(t, e) {
  80363. if (e === "all")
  80364. return {
  80365. type: "all",
  80366. title: t.getLocaleModel().get(["legend", "selector", "all"])
  80367. };
  80368. if (e === "inverse")
  80369. return {
  80370. type: "inverse",
  80371. title: t.getLocaleModel().get(["legend", "selector", "inverse"])
  80372. };
  80373. }, zE = (
  80374. /** @class */
  80375. function(t) {
  80376. q(e, t);
  80377. function e() {
  80378. var n = t !== null && t.apply(this, arguments) || this;
  80379. return n.type = e.type, n.layoutMode = {
  80380. type: "box",
  80381. // legend.width/height are maxWidth/maxHeight actually,
  80382. // whereas real width/height is calculated by its content.
  80383. // (Setting {left: 10, right: 10} does not make sense).
  80384. // So consider the case:
  80385. // `setOption({legend: {left: 10});`
  80386. // then `setOption({legend: {right: 10});`
  80387. // The previous `left` should be cleared by setting `ignoreSize`.
  80388. ignoreSize: !0
  80389. }, n;
  80390. }
  80391. return e.prototype.init = function(n, r, i) {
  80392. this.mergeDefaultAndTheme(n, i), n.selected = n.selected || {}, this._updateSelector(n);
  80393. }, e.prototype.mergeOption = function(n, r) {
  80394. t.prototype.mergeOption.call(this, n, r), this._updateSelector(n);
  80395. }, e.prototype._updateSelector = function(n) {
  80396. var r = n.selector, i = this.ecModel;
  80397. r === !0 && (r = n.selector = ["all", "inverse"]), ue(r) && k(r, function(a, o) {
  80398. Oe(a) && (a = {
  80399. type: a
  80400. }), r[o] = qe(a, EGe(i, a.type));
  80401. });
  80402. }, e.prototype.optionUpdated = function() {
  80403. this._updateData(this.ecModel);
  80404. var n = this._data;
  80405. if (n[0] && this.get("selectedMode") === "single") {
  80406. for (var r = !1, i = 0; i < n.length; i++) {
  80407. var a = n[i].get("name");
  80408. if (this.isSelected(a)) {
  80409. this.select(a), r = !0;
  80410. break;
  80411. }
  80412. }
  80413. !r && this.select(n[0].get("name"));
  80414. }
  80415. }, e.prototype._updateData = function(n) {
  80416. var r = [], i = [];
  80417. n.eachRawSeries(function(l) {
  80418. var u = l.name;
  80419. i.push(u);
  80420. var c;
  80421. if (l.legendVisualProvider) {
  80422. var f = l.legendVisualProvider, d = f.getAllNames();
  80423. n.isSeriesFiltered(l) || (i = i.concat(d)), d.length ? r = r.concat(d) : c = !0;
  80424. } else
  80425. c = !0;
  80426. c && AR(l) && r.push(l.name);
  80427. }), this._availableNames = i;
  80428. var a = this.get("data") || r, o = Pe(), s = ce(a, function(l) {
  80429. return (Oe(l) || St(l)) && (l = {
  80430. name: l
  80431. }), o.get(l.name) ? null : (o.set(l.name, !0), new Wt(l, this, this.ecModel));
  80432. }, this);
  80433. this._data = Nt(s, function(l) {
  80434. return !!l;
  80435. });
  80436. }, e.prototype.getData = function() {
  80437. return this._data;
  80438. }, e.prototype.select = function(n) {
  80439. var r = this.option.selected, i = this.get("selectedMode");
  80440. if (i === "single") {
  80441. var a = this._data;
  80442. k(a, function(o) {
  80443. r[o.get("name")] = !1;
  80444. });
  80445. }
  80446. r[n] = !0;
  80447. }, e.prototype.unSelect = function(n) {
  80448. this.get("selectedMode") !== "single" && (this.option.selected[n] = !1);
  80449. }, e.prototype.toggleSelected = function(n) {
  80450. var r = this.option.selected;
  80451. r.hasOwnProperty(n) || (r[n] = !0), this[r[n] ? "unSelect" : "select"](n);
  80452. }, e.prototype.allSelect = function() {
  80453. var n = this._data, r = this.option.selected;
  80454. k(n, function(i) {
  80455. r[i.get("name", !0)] = !0;
  80456. });
  80457. }, e.prototype.inverseSelect = function() {
  80458. var n = this._data, r = this.option.selected;
  80459. k(n, function(i) {
  80460. var a = i.get("name", !0);
  80461. r.hasOwnProperty(a) || (r[a] = !0), r[a] = !r[a];
  80462. });
  80463. }, e.prototype.isSelected = function(n) {
  80464. var r = this.option.selected;
  80465. return !(r.hasOwnProperty(n) && !r[n]) && et(this._availableNames, n) >= 0;
  80466. }, e.prototype.getOrient = function() {
  80467. return this.get("orient") === "vertical" ? {
  80468. index: 1,
  80469. name: "vertical"
  80470. } : {
  80471. index: 0,
  80472. name: "horizontal"
  80473. };
  80474. }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
  80475. // zlevel: 0,
  80476. z: 4,
  80477. show: !0,
  80478. orient: "horizontal",
  80479. left: "center",
  80480. // right: 'center',
  80481. top: 0,
  80482. // bottom: null,
  80483. align: "auto",
  80484. backgroundColor: "rgba(0,0,0,0)",
  80485. borderColor: "#ccc",
  80486. borderRadius: 0,
  80487. borderWidth: 0,
  80488. padding: 5,
  80489. itemGap: 10,
  80490. itemWidth: 25,
  80491. itemHeight: 14,
  80492. symbolRotate: "inherit",
  80493. symbolKeepAspect: !0,
  80494. inactiveColor: "#ccc",
  80495. inactiveBorderColor: "#ccc",
  80496. inactiveBorderWidth: "auto",
  80497. itemStyle: {
  80498. color: "inherit",
  80499. opacity: "inherit",
  80500. borderColor: "inherit",
  80501. borderWidth: "auto",
  80502. borderCap: "inherit",
  80503. borderJoin: "inherit",
  80504. borderDashOffset: "inherit",
  80505. borderMiterLimit: "inherit"
  80506. },
  80507. lineStyle: {
  80508. width: "auto",
  80509. color: "inherit",
  80510. inactiveColor: "#ccc",
  80511. inactiveWidth: 2,
  80512. opacity: "inherit",
  80513. type: "inherit",
  80514. cap: "inherit",
  80515. join: "inherit",
  80516. dashOffset: "inherit",
  80517. miterLimit: "inherit"
  80518. },
  80519. textStyle: {
  80520. color: "#333"
  80521. },
  80522. selectedMode: !0,
  80523. selector: !1,
  80524. selectorLabel: {
  80525. show: !0,
  80526. borderRadius: 10,
  80527. padding: [3, 5, 3, 5],
  80528. fontSize: 12,
  80529. fontFamily: "sans-serif",
  80530. color: "#666",
  80531. borderWidth: 1,
  80532. borderColor: "#666"
  80533. },
  80534. emphasis: {
  80535. selectorLabel: {
  80536. show: !0,
  80537. color: "#eee",
  80538. backgroundColor: "#666"
  80539. }
  80540. },
  80541. selectorPosition: "auto",
  80542. selectorItemGap: 7,
  80543. selectorButtonGap: 10,
  80544. tooltip: {
  80545. show: !1
  80546. }
  80547. }, e;
  80548. }(rt)
  80549. ), bd = Ue, VE = k, Vb = Ve, tie = (
  80550. /** @class */
  80551. function(t) {
  80552. q(e, t);
  80553. function e() {
  80554. var n = t !== null && t.apply(this, arguments) || this;
  80555. return n.type = e.type, n.newlineDisabled = !1, n;
  80556. }
  80557. return e.prototype.init = function() {
  80558. this.group.add(this._contentGroup = new Vb()), this.group.add(this._selectorGroup = new Vb()), this._isFirstRender = !0;
  80559. }, e.prototype.getContentGroup = function() {
  80560. return this._contentGroup;
  80561. }, e.prototype.getSelectorGroup = function() {
  80562. return this._selectorGroup;
  80563. }, e.prototype.render = function(n, r, i) {
  80564. var a = this._isFirstRender;
  80565. if (this._isFirstRender = !1, this.resetInner(), !!n.get("show", !0)) {
  80566. var o = n.get("align"), s = n.get("orient");
  80567. (!o || o === "auto") && (o = n.get("left") === "right" && s === "vertical" ? "right" : "left");
  80568. var l = n.get("selector", !0), u = n.get("selectorPosition", !0);
  80569. l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, n, r, i, l, s, u);
  80570. var c = n.getBoxLayoutParams(), f = {
  80571. width: i.getWidth(),
  80572. height: i.getHeight()
  80573. }, d = n.get("padding"), h = Rn(c, f, d), p = this.layoutInner(n, o, h, a, l, u), v = Rn(Re({
  80574. width: p.width,
  80575. height: p.height
  80576. }, c), f, d);
  80577. this.group.x = v.x - p.x, this.group.y = v.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = Qre(p, n));
  80578. }
  80579. }, e.prototype.resetInner = function() {
  80580. this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
  80581. }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
  80582. var u = this.getContentGroup(), c = Pe(), f = r.get("selectedMode"), d = [];
  80583. i.eachRawSeries(function(h) {
  80584. !h.get("legendHoverLink") && d.push(h.id);
  80585. }), VE(r.getData(), function(h, p) {
  80586. var v = h.get("name");
  80587. if (!this.newlineDisabled && (v === "" || v === `
  80588. `)) {
  80589. var g = new Vb();
  80590. g.newline = !0, u.add(g);
  80591. return;
  80592. }
  80593. var m = i.getSeriesByName(v)[0];
  80594. if (!c.get(v)) {
  80595. if (m) {
  80596. var y = m.getData(), b = y.getVisual("legendLineStyle") || {}, _ = y.getVisual("legendIcon"), O = y.getVisual("style"), S = this._createItem(m, v, p, h, r, n, b, O, _, f, a);
  80597. S.on("click", bd(q7, v, null, a, d)).on("mouseover", bd(FE, m.name, null, a, d)).on("mouseout", bd(WE, m.name, null, a, d)), i.ssr && S.eachChild(function(x) {
  80598. var C = Fe(x);
  80599. C.seriesIndex = m.seriesIndex, C.dataIndex = p, C.ssrType = "legend";
  80600. }), c.set(v, !0);
  80601. } else
  80602. i.eachRawSeries(function(x) {
  80603. if (!c.get(v) && x.legendVisualProvider) {
  80604. var C = x.legendVisualProvider;
  80605. if (!C.containName(v))
  80606. return;
  80607. var T = C.indexOfName(v), w = C.getItemVisual(T, "style"), P = C.getItemVisual(T, "legendIcon"), $ = qr(w.fill);
  80608. $ && $[3] === 0 && ($[3] = 0.2, w = le(le({}, w), {
  80609. fill: eo($, "rgba")
  80610. }));
  80611. var A = this._createItem(x, v, p, h, r, n, {}, w, P, f, a);
  80612. A.on("click", bd(q7, null, v, a, d)).on("mouseover", bd(FE, null, v, a, d)).on("mouseout", bd(WE, null, v, a, d)), i.ssr && A.eachChild(function(D) {
  80613. var E = Fe(D);
  80614. E.seriesIndex = x.seriesIndex, E.dataIndex = p, E.ssrType = "legend";
  80615. }), c.set(v, !0);
  80616. }
  80617. }, this);
  80618. process.env.NODE_ENV !== "production" && (c.get(v) || console.warn(v + " series not exists. Legend data should be same with series name or data name."));
  80619. }
  80620. }, this), o && this._createSelector(o, r, a, s, l);
  80621. }, e.prototype._createSelector = function(n, r, i, a, o) {
  80622. var s = this.getSelectorGroup();
  80623. VE(n, function(u) {
  80624. var c = u.type, f = new gt({
  80625. style: {
  80626. x: 0,
  80627. y: 0,
  80628. align: "center",
  80629. verticalAlign: "middle"
  80630. },
  80631. onclick: function() {
  80632. i.dispatchAction({
  80633. type: c === "all" ? "legendAllSelect" : "legendInverseSelect"
  80634. });
  80635. }
  80636. });
  80637. s.add(f);
  80638. var d = r.getModel("selectorLabel"), h = r.getModel(["emphasis", "selectorLabel"]);
  80639. Pr(f, {
  80640. normal: d,
  80641. emphasis: h
  80642. }, {
  80643. defaultText: u.title
  80644. }), Yl(f);
  80645. });
  80646. }, e.prototype._createItem = function(n, r, i, a, o, s, l, u, c, f, d) {
  80647. var h = n.visualDrawType, p = o.get("itemWidth"), v = o.get("itemHeight"), g = o.isSelected(r), m = a.get("symbolRotate"), y = a.get("symbolKeepAspect"), b = a.get("icon");
  80648. c = b || c || "roundRect";
  80649. var _ = MGe(c, a, l, u, h, g, d), O = new Vb(), S = a.getModel("textStyle");
  80650. if (Me(n.getLegendIcon) && (!b || b === "inherit"))
  80651. O.add(n.getLegendIcon({
  80652. itemWidth: p,
  80653. itemHeight: v,
  80654. icon: c,
  80655. iconRotate: m,
  80656. itemStyle: _.itemStyle,
  80657. lineStyle: _.lineStyle,
  80658. symbolKeepAspect: y
  80659. }));
  80660. else {
  80661. var x = b === "inherit" && n.getData().getVisual("symbol") ? m === "inherit" ? n.getData().getVisual("symbolRotate") : m : 0;
  80662. O.add(IGe({
  80663. itemWidth: p,
  80664. itemHeight: v,
  80665. icon: c,
  80666. iconRotate: x,
  80667. itemStyle: _.itemStyle,
  80668. lineStyle: _.lineStyle,
  80669. symbolKeepAspect: y
  80670. }));
  80671. }
  80672. var C = s === "left" ? p + 5 : -5, T = s, w = o.get("formatter"), P = r;
  80673. Oe(w) && w ? P = w.replace("{name}", r ?? "") : Me(w) && (P = w(r));
  80674. var $ = g ? S.getTextColor() : a.get("inactiveColor");
  80675. O.add(new gt({
  80676. style: Zt(S, {
  80677. text: P,
  80678. x: C,
  80679. y: v / 2,
  80680. fill: $,
  80681. align: T,
  80682. verticalAlign: "middle"
  80683. }, {
  80684. inheritColor: $
  80685. })
  80686. }));
  80687. var A = new mt({
  80688. shape: O.getBoundingRect(),
  80689. style: {
  80690. // Cannot use 'invisible' because SVG SSR will miss the node
  80691. fill: "transparent"
  80692. }
  80693. }), D = a.getModel("tooltip");
  80694. return D.get("show") && gp({
  80695. el: A,
  80696. componentModel: o,
  80697. itemName: r,
  80698. itemTooltipOption: D.option
  80699. }), O.add(A), O.eachChild(function(E) {
  80700. E.silent = !0;
  80701. }), A.silent = !f, this.getContentGroup().add(O), Yl(O), O.__legendDataIndex = i, O;
  80702. }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
  80703. var l = this.getContentGroup(), u = this.getSelectorGroup();
  80704. ef(n.get("orient"), l, n.get("itemGap"), i.width, i.height);
  80705. var c = l.getBoundingRect(), f = [-c.x, -c.y];
  80706. if (u.markRedraw(), l.markRedraw(), o) {
  80707. ef(
  80708. // Buttons in selectorGroup always layout horizontally
  80709. "horizontal",
  80710. u,
  80711. n.get("selectorItemGap", !0)
  80712. );
  80713. var d = u.getBoundingRect(), h = [-d.x, -d.y], p = n.get("selectorButtonGap", !0), v = n.getOrient().index, g = v === 0 ? "width" : "height", m = v === 0 ? "height" : "width", y = v === 0 ? "y" : "x";
  80714. s === "end" ? h[v] += c[g] + p : f[v] += d[g] + p, h[1 - v] += c[m] / 2 - d[m] / 2, u.x = h[0], u.y = h[1], l.x = f[0], l.y = f[1];
  80715. var b = {
  80716. x: 0,
  80717. y: 0
  80718. };
  80719. return b[g] = c[g] + p + d[g], b[m] = Math.max(c[m], d[m]), b[y] = Math.min(0, d[y] + h[1 - v]), b;
  80720. } else
  80721. return l.x = f[0], l.y = f[1], this.group.getBoundingRect();
  80722. }, e.prototype.remove = function() {
  80723. this.getContentGroup().removeAll(), this._isFirstRender = !0;
  80724. }, e.type = "legend.plain", e;
  80725. }(Xt)
  80726. );
  80727. function MGe(t, e, n, r, i, a, o) {
  80728. function s(g, m) {
  80729. g.lineWidth === "auto" && (g.lineWidth = m.lineWidth > 0 ? 2 : 0), VE(g, function(y, b) {
  80730. g[b] === "inherit" && (g[b] = m[b]);
  80731. });
  80732. }
  80733. var l = e.getModel("itemStyle"), u = l.getItemStyle(), c = t.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", f = l.getShallow("decal");
  80734. u.decal = !f || f === "inherit" ? r.decal : Fh(f, o), u.fill === "inherit" && (u.fill = r[i]), u.stroke === "inherit" && (u.stroke = r[c]), u.opacity === "inherit" && (u.opacity = (i === "fill" ? r : n).opacity), s(u, r);
  80735. var d = e.getModel("lineStyle"), h = d.getLineStyle();
  80736. if (s(h, n), u.fill === "auto" && (u.fill = r.fill), u.stroke === "auto" && (u.stroke = r.fill), h.stroke === "auto" && (h.stroke = r.fill), !a) {
  80737. var p = e.get("inactiveBorderWidth"), v = u[c];
  80738. u.lineWidth = p === "auto" ? r.lineWidth > 0 && v ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), h.stroke = d.get("inactiveColor"), h.lineWidth = d.get("inactiveWidth");
  80739. }
  80740. return {
  80741. itemStyle: u,
  80742. lineStyle: h
  80743. };
  80744. }
  80745. function IGe(t) {
  80746. var e = t.icon || "roundRect", n = $n(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  80747. return n.setStyle(t.itemStyle), n.rotation = (t.iconRotate || 0) * Math.PI / 180, n.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2), n;
  80748. }
  80749. function q7(t, e, n, r) {
  80750. WE(t, e, n, r), n.dispatchAction({
  80751. type: "legendToggleSelect",
  80752. name: t ?? e
  80753. }), FE(t, e, n, r);
  80754. }
  80755. function nie(t) {
  80756. for (var e = t.getZr().storage.getDisplayList(), n, r = 0, i = e.length; r < i && !(n = e[r].states.emphasis); )
  80757. r++;
  80758. return n && n.hoverLayer;
  80759. }
  80760. function FE(t, e, n, r) {
  80761. nie(n) || n.dispatchAction({
  80762. type: "highlight",
  80763. seriesName: t,
  80764. name: e,
  80765. excludeSeriesId: r
  80766. });
  80767. }
  80768. function WE(t, e, n, r) {
  80769. nie(n) || n.dispatchAction({
  80770. type: "downplay",
  80771. seriesName: t,
  80772. name: e,
  80773. excludeSeriesId: r
  80774. });
  80775. }
  80776. function DGe(t) {
  80777. var e = t.findComponents({
  80778. mainType: "legend"
  80779. });
  80780. e && e.length && t.filterSeries(function(n) {
  80781. for (var r = 0; r < e.length; r++)
  80782. if (!e[r].isSelected(n.name))
  80783. return !1;
  80784. return !0;
  80785. });
  80786. }
  80787. function xv(t, e, n) {
  80788. var r = {}, i = t === "toggleSelected", a;
  80789. return n.eachComponent("legend", function(o) {
  80790. i && a != null ? o[a ? "select" : "unSelect"](e.name) : t === "allSelect" || t === "inverseSelect" ? o[t]() : (o[t](e.name), a = o.isSelected(e.name));
  80791. var s = o.getData();
  80792. k(s, function(l) {
  80793. var u = l.get("name");
  80794. if (!(u === `
  80795. ` || u === "")) {
  80796. var c = o.isSelected(u);
  80797. r.hasOwnProperty(u) ? r[u] = r[u] && c : r[u] = c;
  80798. }
  80799. });
  80800. }), t === "allSelect" || t === "inverseSelect" ? {
  80801. selected: r
  80802. } : {
  80803. name: e.name,
  80804. selected: r
  80805. };
  80806. }
  80807. function RGe(t) {
  80808. t.registerAction("legendToggleSelect", "legendselectchanged", Ue(xv, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", Ue(xv, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", Ue(xv, "inverseSelect")), t.registerAction("legendSelect", "legendselected", Ue(xv, "select")), t.registerAction("legendUnSelect", "legendunselected", Ue(xv, "unSelect"));
  80809. }
  80810. function rie(t) {
  80811. t.registerComponentModel(zE), t.registerComponentView(tie), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, DGe), t.registerSubTypeDefaulter("legend", function() {
  80812. return "plain";
  80813. }), RGe(t);
  80814. }
  80815. var kGe = (
  80816. /** @class */
  80817. function(t) {
  80818. q(e, t);
  80819. function e() {
  80820. var n = t !== null && t.apply(this, arguments) || this;
  80821. return n.type = e.type, n;
  80822. }
  80823. return e.prototype.setScrollDataIndex = function(n) {
  80824. this.option.scrollDataIndex = n;
  80825. }, e.prototype.init = function(n, r, i) {
  80826. var a = bp(n);
  80827. t.prototype.init.call(this, n, r, i), K7(this, n, a);
  80828. }, e.prototype.mergeOption = function(n, r) {
  80829. t.prototype.mergeOption.call(this, n, r), K7(this, this.option, n);
  80830. }, e.type = "legend.scroll", e.defaultOption = Pu(zE.defaultOption, {
  80831. scrollDataIndex: 0,
  80832. pageButtonItemGap: 5,
  80833. pageButtonGap: null,
  80834. pageButtonPosition: "end",
  80835. pageFormatter: "{current}/{total}",
  80836. pageIcons: {
  80837. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  80838. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  80839. },
  80840. pageIconColor: "#2f4554",
  80841. pageIconInactiveColor: "#aaa",
  80842. pageIconSize: 15,
  80843. pageTextStyle: {
  80844. color: "#333"
  80845. },
  80846. animationDurationUpdate: 800
  80847. }), e;
  80848. }(zE)
  80849. );
  80850. function K7(t, e, n) {
  80851. var r = t.getOrient(), i = [1, 1];
  80852. i[r.index] = 0, cu(e, n, {
  80853. type: "box",
  80854. ignoreSize: !!i
  80855. });
  80856. }
  80857. var J7 = Ve, t$ = ["width", "height"], n$ = ["x", "y"], LGe = (
  80858. /** @class */
  80859. function(t) {
  80860. q(e, t);
  80861. function e() {
  80862. var n = t !== null && t.apply(this, arguments) || this;
  80863. return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n;
  80864. }
  80865. return e.prototype.init = function() {
  80866. t.prototype.init.call(this), this.group.add(this._containerGroup = new J7()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new J7());
  80867. }, e.prototype.resetInner = function() {
  80868. t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
  80869. }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
  80870. var u = this;
  80871. t.prototype.renderInner.call(this, n, r, i, a, o, s, l);
  80872. var c = this._controllerGroup, f = r.get("pageIconSize", !0), d = ue(f) ? f : [f, f];
  80873. p("pagePrev", 0);
  80874. var h = r.getModel("pageTextStyle");
  80875. c.add(new gt({
  80876. name: "pageText",
  80877. style: {
  80878. // Placeholder to calculate a proper layout.
  80879. text: "xx/xx",
  80880. fill: h.getTextColor(),
  80881. font: h.getFont(),
  80882. verticalAlign: "middle",
  80883. align: "center"
  80884. },
  80885. silent: !0
  80886. })), p("pageNext", 1);
  80887. function p(v, g) {
  80888. var m = v + "DataIndex", y = vp(r.get("pageIcons", !0)[r.getOrient().name][g], {
  80889. // Buttons will be created in each render, so we do not need
  80890. // to worry about avoiding using legendModel kept in scope.
  80891. onclick: xe(u._pageGo, u, m, r, a)
  80892. }, {
  80893. x: -d[0] / 2,
  80894. y: -d[1] / 2,
  80895. width: d[0],
  80896. height: d[1]
  80897. });
  80898. y.name = v, c.add(y);
  80899. }
  80900. }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
  80901. var l = this.getSelectorGroup(), u = n.getOrient().index, c = t$[u], f = n$[u], d = t$[1 - u], h = n$[1 - u];
  80902. o && ef(
  80903. // Buttons in selectorGroup always layout horizontally
  80904. "horizontal",
  80905. l,
  80906. n.get("selectorItemGap", !0)
  80907. );
  80908. var p = n.get("selectorButtonGap", !0), v = l.getBoundingRect(), g = [-v.x, -v.y], m = Le(i);
  80909. o && (m[c] = i[c] - v[c] - p);
  80910. var y = this._layoutContentAndController(n, a, m, u, c, d, h, f);
  80911. if (o) {
  80912. if (s === "end")
  80913. g[u] += y[c] + p;
  80914. else {
  80915. var b = v[c] + p;
  80916. g[u] -= b, y[f] -= b;
  80917. }
  80918. y[c] += v[c] + p, g[1 - u] += y[h] + y[d] / 2 - v[d] / 2, y[d] = Math.max(y[d], v[d]), y[h] = Math.min(y[h], v[h] + g[1 - u]), l.x = g[0], l.y = g[1], l.markRedraw();
  80919. }
  80920. return y;
  80921. }, e.prototype._layoutContentAndController = function(n, r, i, a, o, s, l, u) {
  80922. var c = this.getContentGroup(), f = this._containerGroup, d = this._controllerGroup;
  80923. ef(n.get("orient"), c, n.get("itemGap"), a ? i.width : null, a ? null : i.height), ef(
  80924. // Buttons in controller are layout always horizontally.
  80925. "horizontal",
  80926. d,
  80927. n.get("pageButtonItemGap", !0)
  80928. );
  80929. var h = c.getBoundingRect(), p = d.getBoundingRect(), v = this._showController = h[o] > i[o], g = [-h.x, -h.y];
  80930. r || (g[a] = c[u]);
  80931. var m = [0, 0], y = [-p.x, -p.y], b = We(n.get("pageButtonGap", !0), n.get("itemGap", !0));
  80932. if (v) {
  80933. var _ = n.get("pageButtonPosition", !0);
  80934. _ === "end" ? y[a] += i[o] - p[o] : m[a] += p[o] + b;
  80935. }
  80936. y[1 - a] += h[s] / 2 - p[s] / 2, c.setPosition(g), f.setPosition(m), d.setPosition(y);
  80937. var O = {
  80938. x: 0,
  80939. y: 0
  80940. };
  80941. if (O[o] = v ? i[o] : h[o], O[s] = Math.max(h[s], p[s]), O[l] = Math.min(0, p[l] + y[1 - a]), f.__rectSize = i[o], v) {
  80942. var S = {
  80943. x: 0,
  80944. y: 0
  80945. };
  80946. S[o] = Math.max(i[o] - p[o] - b, 0), S[s] = O[s], f.setClipPath(new mt({
  80947. shape: S
  80948. })), f.__rectSize = S[o];
  80949. } else
  80950. d.eachChild(function(C) {
  80951. C.attr({
  80952. invisible: !0,
  80953. silent: !0
  80954. });
  80955. });
  80956. var x = this._getPageInfo(n);
  80957. return x.pageIndex != null && Ct(
  80958. c,
  80959. {
  80960. x: x.contentPosition[0],
  80961. y: x.contentPosition[1]
  80962. },
  80963. // When switch from "show controller" to "not show controller", view should be
  80964. // updated immediately without animation, otherwise causes weird effect.
  80965. v ? n : null
  80966. ), this._updatePageInfoView(n, x), O;
  80967. }, e.prototype._pageGo = function(n, r, i) {
  80968. var a = this._getPageInfo(r)[n];
  80969. a != null && i.dispatchAction({
  80970. type: "legendScroll",
  80971. scrollDataIndex: a,
  80972. legendId: r.id
  80973. });
  80974. }, e.prototype._updatePageInfoView = function(n, r) {
  80975. var i = this._controllerGroup;
  80976. k(["pagePrev", "pageNext"], function(c) {
  80977. var f = c + "DataIndex", d = r[f] != null, h = i.childOfName(c);
  80978. h && (h.setStyle("fill", d ? n.get("pageIconColor", !0) : n.get("pageIconInactiveColor", !0)), h.cursor = d ? "pointer" : "default");
  80979. });
  80980. var a = i.childOfName("pageText"), o = n.get("pageFormatter"), s = r.pageIndex, l = s != null ? s + 1 : 0, u = r.pageCount;
  80981. a && o && a.setStyle("text", Oe(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
  80982. current: l,
  80983. total: u
  80984. }));
  80985. }, e.prototype._getPageInfo = function(n) {
  80986. var r = n.get("scrollDataIndex", !0), i = this.getContentGroup(), a = this._containerGroup.__rectSize, o = n.getOrient().index, s = t$[o], l = n$[o], u = this._findTargetItemIndex(r), c = i.children(), f = c[u], d = c.length, h = d ? 1 : 0, p = {
  80987. contentPosition: [i.x, i.y],
  80988. pageCount: h,
  80989. pageIndex: h - 1,
  80990. pagePrevDataIndex: null,
  80991. pageNextDataIndex: null
  80992. };
  80993. if (!f)
  80994. return p;
  80995. var v = _(f);
  80996. p.contentPosition[o] = -v.s;
  80997. for (var g = u + 1, m = v, y = v, b = null; g <= d; ++g)
  80998. b = _(c[g]), // Half of the last item is out of the window.
  80999. (!b && y.e > m.s + a || b && !O(b, m.s)) && (y.i > m.i ? m = y : m = b, m && (p.pageNextDataIndex == null && (p.pageNextDataIndex = m.i), ++p.pageCount)), y = b;
  81000. for (var g = u - 1, m = v, y = v, b = null; g >= -1; --g)
  81001. b = _(c[g]), // If the the end item does not intersect with the window started
  81002. // from the current item, a page can be settled.
  81003. (!b || !O(y, b.s)) && m.i < y.i && (y = m, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = m.i), ++p.pageCount, ++p.pageIndex), m = b;
  81004. return p;
  81005. function _(S) {
  81006. if (S) {
  81007. var x = S.getBoundingRect(), C = x[l] + S[l];
  81008. return {
  81009. s: C,
  81010. e: C + x[s],
  81011. i: S.__legendDataIndex
  81012. };
  81013. }
  81014. }
  81015. function O(S, x) {
  81016. return S.e >= x && S.s <= x + a;
  81017. }
  81018. }, e.prototype._findTargetItemIndex = function(n) {
  81019. if (!this._showController)
  81020. return 0;
  81021. var r, i = this.getContentGroup(), a;
  81022. return i.eachChild(function(o, s) {
  81023. var l = o.__legendDataIndex;
  81024. a == null && l != null && (a = s), l === n && (r = s);
  81025. }), r ?? a;
  81026. }, e.type = "legend.scroll", e;
  81027. }(tie)
  81028. );
  81029. function NGe(t) {
  81030. t.registerAction("legendScroll", "legendscroll", function(e, n) {
  81031. var r = e.scrollDataIndex;
  81032. r != null && n.eachComponent({
  81033. mainType: "legend",
  81034. subType: "scroll",
  81035. query: e
  81036. }, function(i) {
  81037. i.setScrollDataIndex(r);
  81038. });
  81039. });
  81040. }
  81041. function BGe(t) {
  81042. at(rie), t.registerComponentModel(kGe), t.registerComponentView(LGe), NGe(t);
  81043. }
  81044. function zGe(t) {
  81045. at(rie), at(BGe);
  81046. }
  81047. var VGe = (
  81048. /** @class */
  81049. function(t) {
  81050. q(e, t);
  81051. function e() {
  81052. var n = t !== null && t.apply(this, arguments) || this;
  81053. return n.type = e.type, n;
  81054. }
  81055. return e.type = "dataZoom.inside", e.defaultOption = Pu(Fm.defaultOption, {
  81056. disabled: !1,
  81057. zoomLock: !1,
  81058. zoomOnMouseWheel: !0,
  81059. moveOnMouseMove: !0,
  81060. moveOnMouseWheel: !1,
  81061. preventDefaultMouseMove: !0
  81062. }), e;
  81063. }(Fm)
  81064. ), EL = bt();
  81065. function FGe(t, e, n) {
  81066. EL(t).coordSysRecordMap.each(function(r) {
  81067. var i = r.dataZoomInfoMap.get(e.uid);
  81068. i && (i.getRange = n);
  81069. });
  81070. }
  81071. function WGe(t, e) {
  81072. for (var n = EL(t).coordSysRecordMap, r = n.keys(), i = 0; i < r.length; i++) {
  81073. var a = r[i], o = n.get(a), s = o.dataZoomInfoMap;
  81074. if (s) {
  81075. var l = e.uid, u = s.get(l);
  81076. u && (s.removeKey(l), s.keys().length || iie(n, o));
  81077. }
  81078. }
  81079. }
  81080. function iie(t, e) {
  81081. if (e) {
  81082. t.removeKey(e.model.uid);
  81083. var n = e.controller;
  81084. n && n.dispose();
  81085. }
  81086. }
  81087. function QGe(t, e) {
  81088. var n = {
  81089. model: e,
  81090. containsPoint: Ue(GGe, e),
  81091. dispatchAction: Ue(HGe, t),
  81092. dataZoomInfoMap: null,
  81093. controller: null
  81094. }, r = n.controller = new K0(t.getZr());
  81095. return k(["pan", "zoom", "scrollMove"], function(i) {
  81096. r.on(i, function(a) {
  81097. var o = [];
  81098. n.dataZoomInfoMap.each(function(s) {
  81099. if (a.isAvailableBehavior(s.model.option)) {
  81100. var l = (s.getRange || {})[i], u = l && l(s.dzReferCoordSysInfo, n.model.mainType, n.controller, a);
  81101. !s.model.get("disabled", !0) && u && o.push({
  81102. dataZoomId: s.model.id,
  81103. start: u[0],
  81104. end: u[1]
  81105. });
  81106. }
  81107. }), o.length && n.dispatchAction(o);
  81108. });
  81109. }), n;
  81110. }
  81111. function HGe(t, e) {
  81112. t.isDisposed() || t.dispatchAction({
  81113. type: "dataZoom",
  81114. animation: {
  81115. easing: "cubicOut",
  81116. duration: 100
  81117. },
  81118. batch: e
  81119. });
  81120. }
  81121. function GGe(t, e, n, r) {
  81122. return t.coordinateSystem.containPoint([n, r]);
  81123. }
  81124. function jGe(t) {
  81125. var e, n = "type_", r = {
  81126. type_true: 2,
  81127. type_move: 1,
  81128. type_false: 0,
  81129. type_undefined: -1
  81130. }, i = !0;
  81131. return t.each(function(a) {
  81132. var o = a.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
  81133. r[n + s] > r[n + e] && (e = s), i = i && o.get("preventDefaultMouseMove", !0);
  81134. }), {
  81135. controlType: e,
  81136. opt: {
  81137. // RoamController will enable all of these functionalities,
  81138. // and the final behavior is determined by its event listener
  81139. // provided by each inside zoom.
  81140. zoomOnMouseWheel: !0,
  81141. moveOnMouseMove: !0,
  81142. moveOnMouseWheel: !0,
  81143. preventDefaultMouseMove: !!i
  81144. }
  81145. };
  81146. }
  81147. function ZGe(t) {
  81148. t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, function(e, n) {
  81149. var r = EL(n), i = r.coordSysRecordMap || (r.coordSysRecordMap = Pe());
  81150. i.each(function(a) {
  81151. a.dataZoomInfoMap = null;
  81152. }), e.eachComponent({
  81153. mainType: "dataZoom",
  81154. subType: "inside"
  81155. }, function(a) {
  81156. var o = Vre(a);
  81157. k(o.infoList, function(s) {
  81158. var l = s.model.uid, u = i.get(l) || i.set(l, QGe(n, s.model)), c = u.dataZoomInfoMap || (u.dataZoomInfoMap = Pe());
  81159. c.set(a.uid, {
  81160. dzReferCoordSysInfo: s,
  81161. model: a,
  81162. getRange: null
  81163. });
  81164. });
  81165. }), i.each(function(a) {
  81166. var o = a.controller, s, l = a.dataZoomInfoMap;
  81167. if (l) {
  81168. var u = l.keys()[0];
  81169. u != null && (s = l.get(u));
  81170. }
  81171. if (!s) {
  81172. iie(i, a);
  81173. return;
  81174. }
  81175. var c = jGe(l);
  81176. o.enable(c.controlType, c.opt), o.setPointerChecker(a.containsPoint), Sp(a, "dispatchAction", s.model.get("throttle", !0), "fixRate");
  81177. });
  81178. });
  81179. }
  81180. var UGe = (
  81181. /** @class */
  81182. function(t) {
  81183. q(e, t);
  81184. function e() {
  81185. var n = t !== null && t.apply(this, arguments) || this;
  81186. return n.type = "dataZoom.inside", n;
  81187. }
  81188. return e.prototype.render = function(n, r, i) {
  81189. if (t.prototype.render.apply(this, arguments), n.noTarget()) {
  81190. this._clear();
  81191. return;
  81192. }
  81193. this.range = n.getPercentRange(), FGe(i, n, {
  81194. pan: xe(r$.pan, this),
  81195. zoom: xe(r$.zoom, this),
  81196. scrollMove: xe(r$.scrollMove, this)
  81197. });
  81198. }, e.prototype.dispose = function() {
  81199. this._clear(), t.prototype.dispose.apply(this, arguments);
  81200. }, e.prototype._clear = function() {
  81201. WGe(this.api, this.dataZoomModel), this.range = null;
  81202. }, e.type = "dataZoom.inside", e;
  81203. }(OL)
  81204. ), r$ = {
  81205. zoom: function(t, e, n, r) {
  81206. var i = this.range, a = i.slice(), o = t.axisModels[0];
  81207. if (o) {
  81208. var s = i$[e](null, [r.originX, r.originY], o, n, t), l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (a[1] - a[0]) + a[0], u = Math.max(1 / r.scale, 0);
  81209. a[0] = (a[0] - l) * u + l, a[1] = (a[1] - l) * u + l;
  81210. var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  81211. if (Qf(0, a, [0, 100], 0, c.minSpan, c.maxSpan), this.range = a, i[0] !== a[0] || i[1] !== a[1])
  81212. return a;
  81213. }
  81214. },
  81215. pan: eQ(function(t, e, n, r, i, a) {
  81216. var o = i$[r]([a.oldX, a.oldY], [a.newX, a.newY], e, i, n);
  81217. return o.signal * (t[1] - t[0]) * o.pixel / o.pixelLength;
  81218. }),
  81219. scrollMove: eQ(function(t, e, n, r, i, a) {
  81220. var o = i$[r]([0, 0], [a.scrollDelta, a.scrollDelta], e, i, n);
  81221. return o.signal * (t[1] - t[0]) * a.scrollDelta;
  81222. })
  81223. };
  81224. function eQ(t) {
  81225. return function(e, n, r, i) {
  81226. var a = this.range, o = a.slice(), s = e.axisModels[0];
  81227. if (s) {
  81228. var l = t(o, s, e, n, r, i);
  81229. if (Qf(l, o, [0, 100], "all"), this.range = o, a[0] !== o[0] || a[1] !== o[1])
  81230. return o;
  81231. }
  81232. };
  81233. }
  81234. var i$ = {
  81235. grid: function(t, e, n, r, i) {
  81236. var a = n.axis, o = {}, s = i.model.coordinateSystem.getRect();
  81237. return t = t || [0, 0], a.dim === "x" ? (o.pixel = e[0] - t[0], o.pixelLength = s.width, o.pixelStart = s.x, o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = s.height, o.pixelStart = s.y, o.signal = a.inverse ? -1 : 1), o;
  81238. },
  81239. polar: function(t, e, n, r, i) {
  81240. var a = n.axis, o = {}, s = i.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
  81241. return t = t ? s.pointToCoord(t) : [0, 0], e = s.pointToCoord(e), n.mainType === "radiusAxis" ? (o.pixel = e[0] - t[0], o.pixelLength = l[1] - l[0], o.pixelStart = l[0], o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = u[1] - u[0], o.pixelStart = u[0], o.signal = a.inverse ? -1 : 1), o;
  81242. },
  81243. singleAxis: function(t, e, n, r, i) {
  81244. var a = n.axis, o = i.model.coordinateSystem.getRect(), s = {};
  81245. return t = t || [0, 0], a.orient === "horizontal" ? (s.pixel = e[0] - t[0], s.pixelLength = o.width, s.pixelStart = o.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = o.height, s.pixelStart = o.y, s.signal = a.inverse ? -1 : 1), s;
  81246. }
  81247. };
  81248. function aie(t) {
  81249. SL(t), t.registerComponentModel(VGe), t.registerComponentView(UGe), ZGe(t);
  81250. }
  81251. var XGe = (
  81252. /** @class */
  81253. function(t) {
  81254. q(e, t);
  81255. function e() {
  81256. var n = t !== null && t.apply(this, arguments) || this;
  81257. return n.type = e.type, n;
  81258. }
  81259. return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = Pu(Fm.defaultOption, {
  81260. show: !0,
  81261. // deault value can only be drived in view stage.
  81262. right: "ph",
  81263. top: "ph",
  81264. width: "ph",
  81265. height: "ph",
  81266. left: null,
  81267. bottom: null,
  81268. borderColor: "#d2dbee",
  81269. borderRadius: 3,
  81270. backgroundColor: "rgba(47,69,84,0)",
  81271. // dataBackgroundColor: '#ddd',
  81272. dataBackground: {
  81273. lineStyle: {
  81274. color: "#d2dbee",
  81275. width: 0.5
  81276. },
  81277. areaStyle: {
  81278. color: "#d2dbee",
  81279. opacity: 0.2
  81280. }
  81281. },
  81282. selectedDataBackground: {
  81283. lineStyle: {
  81284. color: "#8fb0f7",
  81285. width: 0.5
  81286. },
  81287. areaStyle: {
  81288. color: "#8fb0f7",
  81289. opacity: 0.2
  81290. }
  81291. },
  81292. // Color of selected window.
  81293. fillerColor: "rgba(135,175,274,0.2)",
  81294. handleIcon: "path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",
  81295. // Percent of the slider height
  81296. handleSize: "100%",
  81297. handleStyle: {
  81298. color: "#fff",
  81299. borderColor: "#ACB8D1"
  81300. },
  81301. moveHandleSize: 7,
  81302. moveHandleIcon: "path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",
  81303. moveHandleStyle: {
  81304. color: "#D2DBEE",
  81305. opacity: 0.7
  81306. },
  81307. showDetail: !0,
  81308. showDataShadow: "auto",
  81309. realtime: !0,
  81310. zoomLock: !1,
  81311. textStyle: {
  81312. color: "#6E7079"
  81313. },
  81314. brushSelect: !0,
  81315. brushStyle: {
  81316. color: "rgba(135,175,274,0.15)"
  81317. },
  81318. emphasis: {
  81319. handleStyle: {
  81320. borderColor: "#8FB0F7"
  81321. },
  81322. moveHandleStyle: {
  81323. color: "#8FB0F7"
  81324. }
  81325. }
  81326. }), e;
  81327. }(Fm)
  81328. ), wv = mt, tQ = 7, YGe = 1, a$ = 30, qGe = 7, Cv = "horizontal", nQ = "vertical", KGe = 5, JGe = ["line", "bar", "candlestick", "scatter"], eje = {
  81329. easing: "cubicOut",
  81330. duration: 100,
  81331. delay: 0
  81332. }, tje = (
  81333. /** @class */
  81334. function(t) {
  81335. q(e, t);
  81336. function e() {
  81337. var n = t !== null && t.apply(this, arguments) || this;
  81338. return n.type = e.type, n._displayables = {}, n;
  81339. }
  81340. return e.prototype.init = function(n, r) {
  81341. this.api = r, this._onBrush = xe(this._onBrush, this), this._onBrushEnd = xe(this._onBrushEnd, this);
  81342. }, e.prototype.render = function(n, r, i, a) {
  81343. if (t.prototype.render.apply(this, arguments), Sp(this, "_dispatchZoomAction", n.get("throttle"), "fixRate"), this._orient = n.getOrient(), n.get("show") === !1) {
  81344. this.group.removeAll();
  81345. return;
  81346. }
  81347. if (n.noTarget()) {
  81348. this._clear(), this.group.removeAll();
  81349. return;
  81350. }
  81351. (!a || a.type !== "dataZoom" || a.from !== this.uid) && this._buildView(), this._updateView();
  81352. }, e.prototype.dispose = function() {
  81353. this._clear(), t.prototype.dispose.apply(this, arguments);
  81354. }, e.prototype._clear = function() {
  81355. $m(this, "_dispatchZoomAction");
  81356. var n = this.api.getZr();
  81357. n.off("mousemove", this._onBrush), n.off("mouseup", this._onBrushEnd);
  81358. }, e.prototype._buildView = function() {
  81359. var n = this.group;
  81360. n.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
  81361. var r = this._displayables.sliderGroup = new Ve();
  81362. this._renderBackground(), this._renderHandle(), this._renderDataShadow(), n.add(r), this._positionGroup();
  81363. }, e.prototype._resetLocation = function() {
  81364. var n = this.dataZoomModel, r = this.api, i = n.get("brushSelect"), a = i ? qGe : 0, o = this._findCoordRect(), s = {
  81365. width: r.getWidth(),
  81366. height: r.getHeight()
  81367. }, l = this._orient === Cv ? {
  81368. // Why using 'right', because right should be used in vertical,
  81369. // and it is better to be consistent for dealing with position param merge.
  81370. right: s.width - o.x - o.width,
  81371. top: s.height - a$ - tQ - a,
  81372. width: o.width,
  81373. height: a$
  81374. } : {
  81375. right: tQ,
  81376. top: o.y,
  81377. width: a$,
  81378. height: o.height
  81379. }, u = bp(n.option);
  81380. k(["right", "top", "width", "height"], function(f) {
  81381. u[f] === "ph" && (u[f] = l[f]);
  81382. });
  81383. var c = Rn(u, s);
  81384. this._location = {
  81385. x: c.x,
  81386. y: c.y
  81387. }, this._size = [c.width, c.height], this._orient === nQ && this._size.reverse();
  81388. }, e.prototype._positionGroup = function() {
  81389. var n = this.group, r = this._location, i = this._orient, a = this.dataZoomModel.getFirstTargetAxisModel(), o = a && a.get("inverse"), s = this._displayables.sliderGroup, l = (this._dataShadowInfo || {}).otherAxisInverse;
  81390. s.attr(i === Cv && !o ? {
  81391. scaleY: l ? 1 : -1,
  81392. scaleX: 1
  81393. } : i === Cv && o ? {
  81394. scaleY: l ? 1 : -1,
  81395. scaleX: -1
  81396. } : i === nQ && !o ? {
  81397. scaleY: l ? -1 : 1,
  81398. scaleX: 1,
  81399. rotation: Math.PI / 2
  81400. } : {
  81401. scaleY: l ? -1 : 1,
  81402. scaleX: -1,
  81403. rotation: Math.PI / 2
  81404. });
  81405. var u = n.getBoundingRect([s]);
  81406. n.x = r.x - u.x, n.y = r.y - u.y, n.markRedraw();
  81407. }, e.prototype._getViewExtent = function() {
  81408. return [0, this._size[0]];
  81409. }, e.prototype._renderBackground = function() {
  81410. var n = this.dataZoomModel, r = this._size, i = this._displayables.sliderGroup, a = n.get("brushSelect");
  81411. i.add(new wv({
  81412. silent: !0,
  81413. shape: {
  81414. x: 0,
  81415. y: 0,
  81416. width: r[0],
  81417. height: r[1]
  81418. },
  81419. style: {
  81420. fill: n.get("backgroundColor")
  81421. },
  81422. z2: -40
  81423. }));
  81424. var o = new wv({
  81425. shape: {
  81426. x: 0,
  81427. y: 0,
  81428. width: r[0],
  81429. height: r[1]
  81430. },
  81431. style: {
  81432. fill: "transparent"
  81433. },
  81434. z2: 0,
  81435. onclick: xe(this._onClickPanel, this)
  81436. }), s = this.api.getZr();
  81437. a ? (o.on("mousedown", this._onBrushStart, this), o.cursor = "crosshair", s.on("mousemove", this._onBrush), s.on("mouseup", this._onBrushEnd)) : (s.off("mousemove", this._onBrush), s.off("mouseup", this._onBrushEnd)), i.add(o);
  81438. }, e.prototype._renderDataShadow = function() {
  81439. var n = this._dataShadowInfo = this._prepareDataShadowInfo();
  81440. if (this._displayables.dataShadowSegs = [], !n)
  81441. return;
  81442. var r = this._size, i = this._shadowSize || [], a = n.series, o = a.getRawData(), s = a.getShadowDim && a.getShadowDim(), l = s && o.getDimensionInfo(s) ? a.getShadowDim() : n.otherDim;
  81443. if (l == null)
  81444. return;
  81445. var u = this._shadowPolygonPts, c = this._shadowPolylinePts;
  81446. if (o !== this._shadowData || l !== this._shadowDim || r[0] !== i[0] || r[1] !== i[1]) {
  81447. var f = o.getDataExtent(l), d = (f[1] - f[0]) * 0.3;
  81448. f = [f[0] - d, f[1] + d];
  81449. var h = [0, r[1]], p = [0, r[0]], v = [[r[0], 0], [0, 0]], g = [], m = p[1] / (o.count() - 1), y = 0, b = Math.round(o.count() / r[0]), _;
  81450. o.each([l], function(T, w) {
  81451. if (b > 0 && w % b) {
  81452. y += m;
  81453. return;
  81454. }
  81455. var P = T == null || isNaN(T) || T === "", $ = P ? 0 : Lt(T, f, h, !0);
  81456. P && !_ && w ? (v.push([v[v.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !P && _ && (v.push([y, 0]), g.push([y, 0])), v.push([y, $]), g.push([y, $]), y += m, _ = P;
  81457. }), u = this._shadowPolygonPts = v, c = this._shadowPolylinePts = g;
  81458. }
  81459. this._shadowData = o, this._shadowDim = l, this._shadowSize = [r[0], r[1]];
  81460. var O = this.dataZoomModel;
  81461. function S(T) {
  81462. var w = O.getModel(T ? "selectedDataBackground" : "dataBackground"), P = new Ve(), $ = new ii({
  81463. shape: {
  81464. points: u
  81465. },
  81466. segmentIgnoreThreshold: 1,
  81467. style: w.getModel("areaStyle").getAreaStyle(),
  81468. silent: !0,
  81469. z2: -20
  81470. }), A = new ai({
  81471. shape: {
  81472. points: c
  81473. },
  81474. segmentIgnoreThreshold: 1,
  81475. style: w.getModel("lineStyle").getLineStyle(),
  81476. silent: !0,
  81477. z2: -19
  81478. });
  81479. return P.add($), P.add(A), P;
  81480. }
  81481. for (var x = 0; x < 3; x++) {
  81482. var C = S(x === 1);
  81483. this._displayables.sliderGroup.add(C), this._displayables.dataShadowSegs.push(C);
  81484. }
  81485. }, e.prototype._prepareDataShadowInfo = function() {
  81486. var n = this.dataZoomModel, r = n.get("showDataShadow");
  81487. if (r !== !1) {
  81488. var i, a = this.ecModel;
  81489. return n.eachTargetAxis(function(o, s) {
  81490. var l = n.getAxisProxy(o, s).getTargetSeriesModels();
  81491. k(l, function(u) {
  81492. if (!i && !(r !== !0 && et(JGe, u.get("type")) < 0)) {
  81493. var c = a.getComponent(Fl(o), s).axis, f = nje(o), d, h = u.coordinateSystem;
  81494. f != null && h.getOtherAxis && (d = h.getOtherAxis(c).inverse), f = u.getData().mapDimension(f), i = {
  81495. thisAxis: c,
  81496. series: u,
  81497. thisDim: o,
  81498. otherDim: f,
  81499. otherAxisInverse: d
  81500. };
  81501. }
  81502. }, this);
  81503. }, this), i;
  81504. }
  81505. }, e.prototype._renderHandle = function() {
  81506. var n = this.group, r = this._displayables, i = r.handles = [null, null], a = r.handleLabels = [null, null], o = this._displayables.sliderGroup, s = this._size, l = this.dataZoomModel, u = this.api, c = l.get("borderRadius") || 0, f = l.get("brushSelect"), d = r.filler = new wv({
  81507. silent: f,
  81508. style: {
  81509. fill: l.get("fillerColor")
  81510. },
  81511. textConfig: {
  81512. position: "inside"
  81513. }
  81514. });
  81515. o.add(d), o.add(new wv({
  81516. silent: !0,
  81517. subPixelOptimize: !0,
  81518. shape: {
  81519. x: 0,
  81520. y: 0,
  81521. width: s[0],
  81522. height: s[1],
  81523. r: c
  81524. },
  81525. style: {
  81526. // deprecated option
  81527. stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
  81528. lineWidth: YGe,
  81529. fill: "rgba(0,0,0,0)"
  81530. }
  81531. })), k([0, 1], function(b) {
  81532. var _ = l.get("handleIcon");
  81533. !gO[_] && _.indexOf("path://") < 0 && _.indexOf("image://") < 0 && (_ = "path://" + _, process.env.NODE_ENV !== "production" && Ea("handleIcon now needs 'path://' prefix when using a path string"));
  81534. var O = $n(_, -1, 0, 2, 2, null, !0);
  81535. O.attr({
  81536. cursor: rQ(this._orient),
  81537. draggable: !0,
  81538. drift: xe(this._onDragMove, this, b),
  81539. ondragend: xe(this._onDragEnd, this),
  81540. onmouseover: xe(this._showDataInfo, this, !0),
  81541. onmouseout: xe(this._showDataInfo, this, !1),
  81542. z2: 5
  81543. });
  81544. var S = O.getBoundingRect(), x = l.get("handleSize");
  81545. this._handleHeight = _e(x, this._size[1]), this._handleWidth = S.width / S.height * this._handleHeight, O.setStyle(l.getModel("handleStyle").getItemStyle()), O.style.strokeNoScale = !0, O.rectHover = !0, O.ensureState("emphasis").style = l.getModel(["emphasis", "handleStyle"]).getItemStyle(), Yl(O);
  81546. var C = l.get("handleColor");
  81547. C != null && (O.style.fill = C), o.add(i[b] = O);
  81548. var T = l.getModel("textStyle");
  81549. n.add(a[b] = new gt({
  81550. silent: !0,
  81551. invisible: !0,
  81552. style: Zt(T, {
  81553. x: 0,
  81554. y: 0,
  81555. text: "",
  81556. verticalAlign: "middle",
  81557. align: "center",
  81558. fill: T.getTextColor(),
  81559. font: T.getFont()
  81560. }),
  81561. z2: 10
  81562. }));
  81563. }, this);
  81564. var h = d;
  81565. if (f) {
  81566. var p = _e(l.get("moveHandleSize"), s[1]), v = r.moveHandle = new mt({
  81567. style: l.getModel("moveHandleStyle").getItemStyle(),
  81568. silent: !0,
  81569. shape: {
  81570. r: [0, 0, 2, 2],
  81571. y: s[1] - 0.5,
  81572. height: p
  81573. }
  81574. }), g = p * 0.8, m = r.moveHandleIcon = $n(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
  81575. m.silent = !0, m.y = s[1] + p / 2 - 0.5, v.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
  81576. var y = Math.min(s[1] / 2, Math.max(p, 10));
  81577. h = r.moveZone = new mt({
  81578. invisible: !0,
  81579. shape: {
  81580. y: s[1] - y,
  81581. height: p + y
  81582. }
  81583. }), h.on("mouseover", function() {
  81584. u.enterEmphasis(v);
  81585. }).on("mouseout", function() {
  81586. u.leaveEmphasis(v);
  81587. }), o.add(v), o.add(m), o.add(h);
  81588. }
  81589. h.attr({
  81590. draggable: !0,
  81591. cursor: rQ(this._orient),
  81592. drift: xe(this._onDragMove, this, "all"),
  81593. ondragstart: xe(this._showDataInfo, this, !0),
  81594. ondragend: xe(this._onDragEnd, this),
  81595. onmouseover: xe(this._showDataInfo, this, !0),
  81596. onmouseout: xe(this._showDataInfo, this, !1)
  81597. });
  81598. }, e.prototype._resetInterval = function() {
  81599. var n = this._range = this.dataZoomModel.getPercentRange(), r = this._getViewExtent();
  81600. this._handleEnds = [Lt(n[0], [0, 100], r, !0), Lt(n[1], [0, 100], r, !0)];
  81601. }, e.prototype._updateInterval = function(n, r) {
  81602. var i = this.dataZoomModel, a = this._handleEnds, o = this._getViewExtent(), s = i.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
  81603. Qf(r, a, o, i.get("zoomLock") ? "all" : n, s.minSpan != null ? Lt(s.minSpan, l, o, !0) : null, s.maxSpan != null ? Lt(s.maxSpan, l, o, !0) : null);
  81604. var u = this._range, c = this._range = Vi([Lt(a[0], o, l, !0), Lt(a[1], o, l, !0)]);
  81605. return !u || u[0] !== c[0] || u[1] !== c[1];
  81606. }, e.prototype._updateView = function(n) {
  81607. var r = this._displayables, i = this._handleEnds, a = Vi(i.slice()), o = this._size;
  81608. k([0, 1], function(h) {
  81609. var p = r.handles[h], v = this._handleHeight;
  81610. p.attr({
  81611. scaleX: v / 2,
  81612. scaleY: v / 2,
  81613. // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
  81614. // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
  81615. x: i[h] + (h ? -1 : 1),
  81616. y: o[1] / 2 - v / 2
  81617. });
  81618. }, this), r.filler.setShape({
  81619. x: a[0],
  81620. y: 0,
  81621. width: a[1] - a[0],
  81622. height: o[1]
  81623. });
  81624. var s = {
  81625. x: a[0],
  81626. width: a[1] - a[0]
  81627. };
  81628. r.moveHandle && (r.moveHandle.setShape(s), r.moveZone.setShape(s), r.moveZone.getBoundingRect(), r.moveHandleIcon && r.moveHandleIcon.attr("x", s.x + s.width / 2));
  81629. for (var l = r.dataShadowSegs, u = [0, a[0], a[1], o[0]], c = 0; c < l.length; c++) {
  81630. var f = l[c], d = f.getClipPath();
  81631. d || (d = new mt(), f.setClipPath(d)), d.setShape({
  81632. x: u[c],
  81633. y: 0,
  81634. width: u[c + 1] - u[c],
  81635. height: o[1]
  81636. });
  81637. }
  81638. this._updateDataInfo(n);
  81639. }, e.prototype._updateDataInfo = function(n) {
  81640. var r = this.dataZoomModel, i = this._displayables, a = i.handleLabels, o = this._orient, s = ["", ""];
  81641. if (r.get("showDetail")) {
  81642. var l = r.findRepresentativeAxisProxy();
  81643. if (l) {
  81644. var u = l.getAxisModel().axis, c = this._range, f = n ? l.calculateDataWindow({
  81645. start: c[0],
  81646. end: c[1]
  81647. }).valueWindow : l.getDataValueWindow();
  81648. s = [this._formatLabel(f[0], u), this._formatLabel(f[1], u)];
  81649. }
  81650. }
  81651. var d = Vi(this._handleEnds.slice());
  81652. h.call(this, 0), h.call(this, 1);
  81653. function h(p) {
  81654. var v = ql(i.handles[p].parent, this.group), g = Jx(p === 0 ? "right" : "left", v), m = this._handleWidth / 2 + KGe, y = to([d[p] + (p === 0 ? -m : m), this._size[1] / 2], v);
  81655. a[p].setStyle({
  81656. x: y[0],
  81657. y: y[1],
  81658. verticalAlign: o === Cv ? "middle" : g,
  81659. align: o === Cv ? g : "center",
  81660. text: s[p]
  81661. });
  81662. }
  81663. }, e.prototype._formatLabel = function(n, r) {
  81664. var i = this.dataZoomModel, a = i.get("labelFormatter"), o = i.get("labelPrecision");
  81665. (o == null || o === "auto") && (o = r.getPixelPrecision());
  81666. var s = n == null || isNaN(n) ? "" : r.type === "category" || r.type === "time" ? r.scale.getLabel({
  81667. value: Math.round(n)
  81668. }) : n.toFixed(Math.min(o, 20));
  81669. return Me(a) ? a(n, s) : Oe(a) ? a.replace("{value}", s) : s;
  81670. }, e.prototype._showDataInfo = function(n) {
  81671. n = this._dragging || n;
  81672. var r = this._displayables, i = r.handleLabels;
  81673. i[0].attr("invisible", !n), i[1].attr("invisible", !n), r.moveHandle && this.api[n ? "enterEmphasis" : "leaveEmphasis"](r.moveHandle, 1);
  81674. }, e.prototype._onDragMove = function(n, r, i, a) {
  81675. this._dragging = !0, Gs(a.event);
  81676. var o = this._displayables.sliderGroup.getLocalTransform(), s = to([r, i], o, !0), l = this._updateInterval(n, s[0]), u = this.dataZoomModel.get("realtime");
  81677. this._updateView(!u), l && u && this._dispatchZoomAction(!0);
  81678. }, e.prototype._onDragEnd = function() {
  81679. this._dragging = !1, this._showDataInfo(!1);
  81680. var n = this.dataZoomModel.get("realtime");
  81681. !n && this._dispatchZoomAction(!1);
  81682. }, e.prototype._onClickPanel = function(n) {
  81683. var r = this._size, i = this._displayables.sliderGroup.transformCoordToLocal(n.offsetX, n.offsetY);
  81684. if (!(i[0] < 0 || i[0] > r[0] || i[1] < 0 || i[1] > r[1])) {
  81685. var a = this._handleEnds, o = (a[0] + a[1]) / 2, s = this._updateInterval("all", i[0] - o);
  81686. this._updateView(), s && this._dispatchZoomAction(!1);
  81687. }
  81688. }, e.prototype._onBrushStart = function(n) {
  81689. var r = n.offsetX, i = n.offsetY;
  81690. this._brushStart = new Ke(r, i), this._brushing = !0, this._brushStartTime = +/* @__PURE__ */ new Date();
  81691. }, e.prototype._onBrushEnd = function(n) {
  81692. if (this._brushing) {
  81693. var r = this._displayables.brushRect;
  81694. if (this._brushing = !1, !!r) {
  81695. r.attr("ignore", !0);
  81696. var i = r.shape, a = +/* @__PURE__ */ new Date();
  81697. if (!(a - this._brushStartTime < 200 && Math.abs(i.width) < 5)) {
  81698. var o = this._getViewExtent(), s = [0, 100];
  81699. this._range = Vi([Lt(i.x, o, s, !0), Lt(i.x + i.width, o, s, !0)]), this._handleEnds = [i.x, i.x + i.width], this._updateView(), this._dispatchZoomAction(!1);
  81700. }
  81701. }
  81702. }
  81703. }, e.prototype._onBrush = function(n) {
  81704. this._brushing && (Gs(n.event), this._updateBrushRect(n.offsetX, n.offsetY));
  81705. }, e.prototype._updateBrushRect = function(n, r) {
  81706. var i = this._displayables, a = this.dataZoomModel, o = i.brushRect;
  81707. o || (o = i.brushRect = new wv({
  81708. silent: !0,
  81709. style: a.getModel("brushStyle").getItemStyle()
  81710. }), i.sliderGroup.add(o)), o.attr("ignore", !1);
  81711. var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(n, r), c = l.transformCoordToLocal(s.x, s.y), f = this._size;
  81712. u[0] = Math.max(Math.min(f[0], u[0]), 0), o.setShape({
  81713. x: c[0],
  81714. y: 0,
  81715. width: u[0] - c[0],
  81716. height: f[1]
  81717. });
  81718. }, e.prototype._dispatchZoomAction = function(n) {
  81719. var r = this._range;
  81720. this.api.dispatchAction({
  81721. type: "dataZoom",
  81722. from: this.uid,
  81723. dataZoomId: this.dataZoomModel.id,
  81724. animation: n ? eje : null,
  81725. start: r[0],
  81726. end: r[1]
  81727. });
  81728. }, e.prototype._findCoordRect = function() {
  81729. var n, r = Vre(this.dataZoomModel).infoList;
  81730. if (!n && r.length) {
  81731. var i = r[0].model.coordinateSystem;
  81732. n = i.getRect && i.getRect();
  81733. }
  81734. if (!n) {
  81735. var a = this.api.getWidth(), o = this.api.getHeight();
  81736. n = {
  81737. x: a * 0.2,
  81738. y: o * 0.2,
  81739. width: a * 0.6,
  81740. height: o * 0.6
  81741. };
  81742. }
  81743. return n;
  81744. }, e.type = "dataZoom.slider", e;
  81745. }(OL)
  81746. );
  81747. function nje(t) {
  81748. var e = {
  81749. x: "y",
  81750. y: "x",
  81751. radius: "angle",
  81752. angle: "radius"
  81753. };
  81754. return e[t];
  81755. }
  81756. function rQ(t) {
  81757. return t === "vertical" ? "ns-resize" : "ew-resize";
  81758. }
  81759. function oie(t) {
  81760. t.registerComponentModel(XGe), t.registerComponentView(tje), SL(t);
  81761. }
  81762. function rje(t) {
  81763. at(aie), at(oie);
  81764. }
  81765. var sie = {
  81766. /**
  81767. * @public
  81768. */
  81769. get: function(t, e, n) {
  81770. var r = Le((ije[t] || {})[e]);
  81771. return n && ue(r) ? r[r.length - 1] : r;
  81772. }
  81773. }, ije = {
  81774. color: {
  81775. active: ["#006edd", "#e0ffff"],
  81776. inactive: ["rgba(0,0,0,0)"]
  81777. },
  81778. colorHue: {
  81779. active: [0, 360],
  81780. inactive: [0, 0]
  81781. },
  81782. colorSaturation: {
  81783. active: [0.3, 1],
  81784. inactive: [0, 0]
  81785. },
  81786. colorLightness: {
  81787. active: [0.9, 0.5],
  81788. inactive: [0, 0]
  81789. },
  81790. colorAlpha: {
  81791. active: [0.3, 1],
  81792. inactive: [0, 0]
  81793. },
  81794. opacity: {
  81795. active: [0.3, 1],
  81796. inactive: [0, 0]
  81797. },
  81798. symbol: {
  81799. active: ["circle", "roundRect", "diamond"],
  81800. inactive: ["none"]
  81801. },
  81802. symbolSize: {
  81803. active: [10, 50],
  81804. inactive: [0, 0]
  81805. }
  81806. }, iQ = qn.mapVisual, aje = qn.eachVisual, oje = ue, aQ = k, sje = Vi, lje = Lt, GO = (
  81807. /** @class */
  81808. function(t) {
  81809. q(e, t);
  81810. function e() {
  81811. var n = t !== null && t.apply(this, arguments) || this;
  81812. return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
  81813. type: "box",
  81814. ignoreSize: !0
  81815. }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n;
  81816. }
  81817. return e.prototype.init = function(n, r, i) {
  81818. this.mergeDefaultAndTheme(n, i);
  81819. }, e.prototype.optionUpdated = function(n, r) {
  81820. var i = this.option;
  81821. !r && Yre(i, n, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
  81822. }, e.prototype.resetVisual = function(n) {
  81823. var r = this.stateList;
  81824. n = xe(n, this), this.controllerVisuals = LE(this.option.controller, r, n), this.targetVisuals = LE(this.option.target, r, n);
  81825. }, e.prototype.getItemSymbol = function() {
  81826. return null;
  81827. }, e.prototype.getTargetSeriesIndices = function() {
  81828. var n = this.option.seriesIndex, r = [];
  81829. return n == null || n === "all" ? this.ecModel.eachSeries(function(i, a) {
  81830. r.push(a);
  81831. }) : r = Qt(n), r;
  81832. }, e.prototype.eachTargetSeries = function(n, r) {
  81833. k(this.getTargetSeriesIndices(), function(i) {
  81834. var a = this.ecModel.getSeriesByIndex(i);
  81835. a && n.call(r, a);
  81836. }, this);
  81837. }, e.prototype.isTargetSeries = function(n) {
  81838. var r = !1;
  81839. return this.eachTargetSeries(function(i) {
  81840. i === n && (r = !0);
  81841. }), r;
  81842. }, e.prototype.formatValueText = function(n, r, i) {
  81843. var a = this.option, o = a.precision, s = this.dataBound, l = a.formatter, u;
  81844. i = i || ["<", ">"], ue(n) && (n = n.slice(), u = !0);
  81845. var c = r ? n : u ? [f(n[0]), f(n[1])] : f(n);
  81846. if (Oe(l))
  81847. return l.replace("{value}", u ? c[0] : c).replace("{value2}", u ? c[1] : c);
  81848. if (Me(l))
  81849. return u ? l(n[0], n[1]) : l(n);
  81850. if (u)
  81851. return n[0] === s[0] ? i[0] + " " + c[1] : n[1] === s[1] ? i[1] + " " + c[0] : c[0] + " - " + c[1];
  81852. return c;
  81853. function f(d) {
  81854. return d === s[0] ? "min" : d === s[1] ? "max" : (+d).toFixed(Math.min(o, 20));
  81855. }
  81856. }, e.prototype.resetExtent = function() {
  81857. var n = this.option, r = sje([n.min, n.max]);
  81858. this._dataExtent = r;
  81859. }, e.prototype.getDataDimensionIndex = function(n) {
  81860. var r = this.option.dimension;
  81861. if (r != null)
  81862. return n.getDimensionIndex(r);
  81863. for (var i = n.dimensions, a = i.length - 1; a >= 0; a--) {
  81864. var o = i[a], s = n.getDimensionInfo(o);
  81865. if (!s.isCalculationCoord)
  81866. return s.storeDimIndex;
  81867. }
  81868. }, e.prototype.getExtent = function() {
  81869. return this._dataExtent.slice();
  81870. }, e.prototype.completeVisualOption = function() {
  81871. var n = this.ecModel, r = this.option, i = {
  81872. inRange: r.inRange,
  81873. outOfRange: r.outOfRange
  81874. }, a = r.target || (r.target = {}), o = r.controller || (r.controller = {});
  81875. qe(a, i), qe(o, i);
  81876. var s = this.isCategory();
  81877. l.call(this, a), l.call(this, o), u.call(this, a, "inRange", "outOfRange"), c.call(this, o);
  81878. function l(f) {
  81879. oje(r.color) && !f.inRange && (f.inRange = {
  81880. color: r.color.slice().reverse()
  81881. }), f.inRange = f.inRange || {
  81882. color: n.get("gradientColor")
  81883. };
  81884. }
  81885. function u(f, d, h) {
  81886. var p = f[d], v = f[h];
  81887. p && !v && (v = f[h] = {}, aQ(p, function(g, m) {
  81888. if (qn.isValidType(m)) {
  81889. var y = sie.get(m, "inactive", s);
  81890. y != null && (v[m] = y, m === "color" && !v.hasOwnProperty("opacity") && !v.hasOwnProperty("colorAlpha") && (v.opacity = [0, 0]));
  81891. }
  81892. }));
  81893. }
  81894. function c(f) {
  81895. var d = (f.inRange || {}).symbol || (f.outOfRange || {}).symbol, h = (f.inRange || {}).symbolSize || (f.outOfRange || {}).symbolSize, p = this.get("inactiveColor"), v = this.getItemSymbol(), g = v || "roundRect";
  81896. aQ(this.stateList, function(m) {
  81897. var y = this.itemSize, b = f[m];
  81898. b || (b = f[m] = {
  81899. color: s ? p : [p]
  81900. }), b.symbol == null && (b.symbol = d && Le(d) || (s ? g : [g])), b.symbolSize == null && (b.symbolSize = h && Le(h) || (s ? y[0] : [y[0], y[0]])), b.symbol = iQ(b.symbol, function(S) {
  81901. return S === "none" ? g : S;
  81902. });
  81903. var _ = b.symbolSize;
  81904. if (_ != null) {
  81905. var O = -1 / 0;
  81906. aje(_, function(S) {
  81907. S > O && (O = S);
  81908. }), b.symbolSize = iQ(_, function(S) {
  81909. return lje(S, [0, O], [0, y[0]], !0);
  81910. });
  81911. }
  81912. }, this);
  81913. }
  81914. }, e.prototype.resetItemSize = function() {
  81915. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))];
  81916. }, e.prototype.isCategory = function() {
  81917. return !!this.option.categories;
  81918. }, e.prototype.setSelected = function(n) {
  81919. }, e.prototype.getSelected = function() {
  81920. return null;
  81921. }, e.prototype.getValueState = function(n) {
  81922. return null;
  81923. }, e.prototype.getVisualMeta = function(n) {
  81924. return null;
  81925. }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
  81926. show: !0,
  81927. // zlevel: 0,
  81928. z: 4,
  81929. seriesIndex: "all",
  81930. min: 0,
  81931. max: 200,
  81932. left: 0,
  81933. right: null,
  81934. top: null,
  81935. bottom: 0,
  81936. itemWidth: null,
  81937. itemHeight: null,
  81938. inverse: !1,
  81939. orient: "vertical",
  81940. backgroundColor: "rgba(0,0,0,0)",
  81941. borderColor: "#ccc",
  81942. contentColor: "#5793f3",
  81943. inactiveColor: "#aaa",
  81944. borderWidth: 0,
  81945. padding: 5,
  81946. // 接受数组分别设定上右下左边距,同css
  81947. textGap: 10,
  81948. precision: 0,
  81949. textStyle: {
  81950. color: "#333"
  81951. // 值域文字颜色
  81952. }
  81953. }, e;
  81954. }(rt)
  81955. ), oQ = [20, 140], uje = (
  81956. /** @class */
  81957. function(t) {
  81958. q(e, t);
  81959. function e() {
  81960. var n = t !== null && t.apply(this, arguments) || this;
  81961. return n.type = e.type, n;
  81962. }
  81963. return e.prototype.optionUpdated = function(n, r) {
  81964. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(i) {
  81965. i.mappingMethod = "linear", i.dataExtent = this.getExtent();
  81966. }), this._resetRange();
  81967. }, e.prototype.resetItemSize = function() {
  81968. t.prototype.resetItemSize.apply(this, arguments);
  81969. var n = this.itemSize;
  81970. (n[0] == null || isNaN(n[0])) && (n[0] = oQ[0]), (n[1] == null || isNaN(n[1])) && (n[1] = oQ[1]);
  81971. }, e.prototype._resetRange = function() {
  81972. var n = this.getExtent(), r = this.option.range;
  81973. !r || r.auto ? (n.auto = 1, this.option.range = n) : ue(r) && (r[0] > r[1] && r.reverse(), r[0] = Math.max(r[0], n[0]), r[1] = Math.min(r[1], n[1]));
  81974. }, e.prototype.completeVisualOption = function() {
  81975. t.prototype.completeVisualOption.apply(this, arguments), k(this.stateList, function(n) {
  81976. var r = this.option.controller[n].symbolSize;
  81977. r && r[0] !== r[1] && (r[0] = r[1] / 3);
  81978. }, this);
  81979. }, e.prototype.setSelected = function(n) {
  81980. this.option.range = n.slice(), this._resetRange();
  81981. }, e.prototype.getSelected = function() {
  81982. var n = this.getExtent(), r = Vi((this.get("range") || []).slice());
  81983. return r[0] > n[1] && (r[0] = n[1]), r[1] > n[1] && (r[1] = n[1]), r[0] < n[0] && (r[0] = n[0]), r[1] < n[0] && (r[1] = n[0]), r;
  81984. }, e.prototype.getValueState = function(n) {
  81985. var r = this.option.range, i = this.getExtent();
  81986. return (r[0] <= i[0] || r[0] <= n) && (r[1] >= i[1] || n <= r[1]) ? "inRange" : "outOfRange";
  81987. }, e.prototype.findTargetDataIndices = function(n) {
  81988. var r = [];
  81989. return this.eachTargetSeries(function(i) {
  81990. var a = [], o = i.getData();
  81991. o.each(this.getDataDimensionIndex(o), function(s, l) {
  81992. n[0] <= s && s <= n[1] && a.push(l);
  81993. }, this), r.push({
  81994. seriesId: i.id,
  81995. dataIndex: a
  81996. });
  81997. }, this), r;
  81998. }, e.prototype.getVisualMeta = function(n) {
  81999. var r = sQ(this, "outOfRange", this.getExtent()), i = sQ(this, "inRange", this.option.range.slice()), a = [];
  82000. function o(h, p) {
  82001. a.push({
  82002. value: h,
  82003. color: n(h, p)
  82004. });
  82005. }
  82006. for (var s = 0, l = 0, u = i.length, c = r.length; l < c && (!i.length || r[l] <= i[0]); l++)
  82007. r[l] < i[s] && o(r[l], "outOfRange");
  82008. for (var f = 1; s < u; s++, f = 0)
  82009. f && a.length && o(i[s], "outOfRange"), o(i[s], "inRange");
  82010. for (var f = 1; l < c; l++)
  82011. (!i.length || i[i.length - 1] < r[l]) && (f && (a.length && o(a[a.length - 1].value, "outOfRange"), f = 0), o(r[l], "outOfRange"));
  82012. var d = a.length;
  82013. return {
  82014. stops: a,
  82015. outerColors: [d ? a[0].color : "transparent", d ? a[d - 1].color : "transparent"]
  82016. };
  82017. }, e.type = "visualMap.continuous", e.defaultOption = Pu(GO.defaultOption, {
  82018. align: "auto",
  82019. calculable: !1,
  82020. hoverLink: !0,
  82021. realtime: !0,
  82022. handleIcon: "path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",
  82023. handleSize: "120%",
  82024. handleStyle: {
  82025. borderColor: "#fff",
  82026. borderWidth: 1
  82027. },
  82028. indicatorIcon: "circle",
  82029. indicatorSize: "50%",
  82030. indicatorStyle: {
  82031. borderColor: "#fff",
  82032. borderWidth: 2,
  82033. shadowBlur: 2,
  82034. shadowOffsetX: 1,
  82035. shadowOffsetY: 1,
  82036. shadowColor: "rgba(0,0,0,0.2)"
  82037. }
  82038. // emphasis: {
  82039. // handleStyle: {
  82040. // shadowBlur: 3,
  82041. // shadowOffsetX: 1,
  82042. // shadowOffsetY: 1,
  82043. // shadowColor: 'rgba(0,0,0,0.2)'
  82044. // }
  82045. // }
  82046. }), e;
  82047. }(GO)
  82048. );
  82049. function sQ(t, e, n) {
  82050. if (n[0] === n[1])
  82051. return n.slice();
  82052. for (var r = 200, i = (n[1] - n[0]) / r, a = n[0], o = [], s = 0; s <= r && a < n[1]; s++)
  82053. o.push(a), a += i;
  82054. return o.push(n[1]), o;
  82055. }
  82056. var lie = (
  82057. /** @class */
  82058. function(t) {
  82059. q(e, t);
  82060. function e() {
  82061. var n = t !== null && t.apply(this, arguments) || this;
  82062. return n.type = e.type, n.autoPositionValues = {
  82063. left: 1,
  82064. right: 1,
  82065. top: 1,
  82066. bottom: 1
  82067. }, n;
  82068. }
  82069. return e.prototype.init = function(n, r) {
  82070. this.ecModel = n, this.api = r;
  82071. }, e.prototype.render = function(n, r, i, a) {
  82072. if (this.visualMapModel = n, n.get("show") === !1) {
  82073. this.group.removeAll();
  82074. return;
  82075. }
  82076. this.doRender(n, r, i, a);
  82077. }, e.prototype.renderBackground = function(n) {
  82078. var r = this.visualMapModel, i = Bf(r.get("padding") || 0), a = n.getBoundingRect();
  82079. n.add(new mt({
  82080. z2: -1,
  82081. silent: !0,
  82082. shape: {
  82083. x: a.x - i[3],
  82084. y: a.y - i[0],
  82085. width: a.width + i[3] + i[1],
  82086. height: a.height + i[0] + i[2]
  82087. },
  82088. style: {
  82089. fill: r.get("backgroundColor"),
  82090. stroke: r.get("borderColor"),
  82091. lineWidth: r.get("borderWidth")
  82092. }
  82093. }));
  82094. }, e.prototype.getControllerVisual = function(n, r, i) {
  82095. i = i || {};
  82096. var a = i.forceState, o = this.visualMapModel, s = {};
  82097. if (r === "color") {
  82098. var l = o.get("contentColor");
  82099. s.color = l;
  82100. }
  82101. function u(h) {
  82102. return s[h];
  82103. }
  82104. function c(h, p) {
  82105. s[h] = p;
  82106. }
  82107. var f = o.controllerVisuals[a || o.getValueState(n)], d = qn.prepareVisualTypes(f);
  82108. return k(d, function(h) {
  82109. var p = f[h];
  82110. i.convertOpacityToAlpha && h === "opacity" && (h = "colorAlpha", p = f.__alphaForOpacity), qn.dependsOn(h, r) && p && p.applyVisual(n, u, c);
  82111. }), s[r];
  82112. }, e.prototype.positionGroup = function(n) {
  82113. var r = this.visualMapModel, i = this.api;
  82114. aw(n, r.getBoxLayoutParams(), {
  82115. width: i.getWidth(),
  82116. height: i.getHeight()
  82117. });
  82118. }, e.prototype.doRender = function(n, r, i, a) {
  82119. }, e.type = "visualMap", e;
  82120. }(Xt)
  82121. ), lQ = [["left", "right", "width"], ["top", "bottom", "height"]];
  82122. function uie(t, e, n) {
  82123. var r = t.option, i = r.align;
  82124. if (i != null && i !== "auto")
  82125. return i;
  82126. for (var a = {
  82127. width: e.getWidth(),
  82128. height: e.getHeight()
  82129. }, o = r.orient === "horizontal" ? 1 : 0, s = lQ[o], l = [0, null, 10], u = {}, c = 0; c < 3; c++)
  82130. u[lQ[1 - o][c]] = l[c], u[s[c]] = c === 2 ? n[0] : r[s[c]];
  82131. var f = [["x", "width", 3], ["y", "height", 0]][o], d = Rn(u, a, r.padding);
  82132. return s[(d.margin[f[2]] || 0) + d[f[0]] + d[f[1]] * 0.5 < a[f[1]] * 0.5 ? 0 : 1];
  82133. }
  82134. function K_(t, e) {
  82135. return k(t || [], function(n) {
  82136. n.dataIndex != null && (n.dataIndexInside = n.dataIndex, n.dataIndex = null), n.highlightKey = "visualMap" + (e ? e.componentIndex : "");
  82137. }), t;
  82138. }
  82139. var Ao = Lt, cje = k, uQ = Math.min, o$ = Math.max, fje = 12, dje = 6, hje = (
  82140. /** @class */
  82141. function(t) {
  82142. q(e, t);
  82143. function e() {
  82144. var n = t !== null && t.apply(this, arguments) || this;
  82145. return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n;
  82146. }
  82147. return e.prototype.init = function(n, r) {
  82148. t.prototype.init.call(this, n, r), this._hoverLinkFromSeriesMouseOver = xe(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = xe(this._hideIndicator, this);
  82149. }, e.prototype.doRender = function(n, r, i, a) {
  82150. (!a || a.type !== "selectDataRange" || a.from !== this.uid) && this._buildView();
  82151. }, e.prototype._buildView = function() {
  82152. this.group.removeAll();
  82153. var n = this.visualMapModel, r = this.group;
  82154. this._orient = n.get("orient"), this._useHandle = n.get("calculable"), this._resetInterval(), this._renderBar(r);
  82155. var i = n.get("text");
  82156. this._renderEndsText(r, i, 0), this._renderEndsText(r, i, 1), this._updateView(!0), this.renderBackground(r), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(r);
  82157. }, e.prototype._renderEndsText = function(n, r, i) {
  82158. if (r) {
  82159. var a = r[1 - i];
  82160. a = a != null ? a + "" : "";
  82161. var o = this.visualMapModel, s = o.get("textGap"), l = o.itemSize, u = this._shapes.mainGroup, c = this._applyTransform([l[0] / 2, i === 0 ? -s : l[1] + s], u), f = this._applyTransform(i === 0 ? "bottom" : "top", u), d = this._orient, h = this.visualMapModel.textStyleModel;
  82162. this.group.add(new gt({
  82163. style: Zt(h, {
  82164. x: c[0],
  82165. y: c[1],
  82166. verticalAlign: d === "horizontal" ? "middle" : f,
  82167. align: d === "horizontal" ? f : "center",
  82168. text: a
  82169. })
  82170. }));
  82171. }
  82172. }, e.prototype._renderBar = function(n) {
  82173. var r = this.visualMapModel, i = this._shapes, a = r.itemSize, o = this._orient, s = this._useHandle, l = uie(r, this.api, a), u = i.mainGroup = this._createBarGroup(l), c = new Ve();
  82174. u.add(c), c.add(i.outOfRange = cQ()), c.add(i.inRange = cQ(null, s ? dQ(this._orient) : null, xe(this._dragHandle, this, "all", !1), xe(this._dragHandle, this, "all", !0))), c.setClipPath(new mt({
  82175. shape: {
  82176. x: 0,
  82177. y: 0,
  82178. width: a[0],
  82179. height: a[1],
  82180. r: 3
  82181. }
  82182. }));
  82183. var f = r.textStyleModel.getTextRect("国"), d = o$(f.width, f.height);
  82184. s && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(r, u, 0, a, d, o), this._createHandle(r, u, 1, a, d, o)), this._createIndicator(r, u, a, d, o), n.add(u);
  82185. }, e.prototype._createHandle = function(n, r, i, a, o, s) {
  82186. var l = xe(this._dragHandle, this, i, !1), u = xe(this._dragHandle, this, i, !0), c = oo(n.get("handleSize"), a[0]), f = $n(n.get("handleIcon"), -c / 2, -c / 2, c, c, null, !0), d = dQ(this._orient);
  82187. f.attr({
  82188. cursor: d,
  82189. draggable: !0,
  82190. drift: l,
  82191. ondragend: u,
  82192. onmousemove: function(m) {
  82193. Gs(m.event);
  82194. }
  82195. }), f.x = a[0] / 2, f.useStyle(n.getModel("handleStyle").getItemStyle()), f.setStyle({
  82196. strokeNoScale: !0,
  82197. strokeFirst: !0
  82198. }), f.style.lineWidth *= 2, f.ensureState("emphasis").style = n.getModel(["emphasis", "handleStyle"]).getItemStyle(), Lc(f, !0), r.add(f);
  82199. var h = this.visualMapModel.textStyleModel, p = new gt({
  82200. cursor: d,
  82201. draggable: !0,
  82202. drift: l,
  82203. onmousemove: function(m) {
  82204. Gs(m.event);
  82205. },
  82206. ondragend: u,
  82207. style: Zt(h, {
  82208. x: 0,
  82209. y: 0,
  82210. text: ""
  82211. })
  82212. });
  82213. p.ensureState("blur").style = {
  82214. opacity: 0.1
  82215. }, p.stateTransition = {
  82216. duration: 200
  82217. }, this.group.add(p);
  82218. var v = [c, 0], g = this._shapes;
  82219. g.handleThumbs[i] = f, g.handleLabelPoints[i] = v, g.handleLabels[i] = p;
  82220. }, e.prototype._createIndicator = function(n, r, i, a, o) {
  82221. var s = oo(n.get("indicatorSize"), i[0]), l = $n(n.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
  82222. l.attr({
  82223. cursor: "move",
  82224. invisible: !0,
  82225. silent: !0,
  82226. x: i[0] / 2
  82227. });
  82228. var u = n.getModel("indicatorStyle").getItemStyle();
  82229. if (l instanceof lr) {
  82230. var c = l.style;
  82231. l.useStyle(le({
  82232. // TODO other properties like x, y ?
  82233. image: c.image,
  82234. x: c.x,
  82235. y: c.y,
  82236. width: c.width,
  82237. height: c.height
  82238. }, u));
  82239. } else
  82240. l.useStyle(u);
  82241. r.add(l);
  82242. var f = this.visualMapModel.textStyleModel, d = new gt({
  82243. silent: !0,
  82244. invisible: !0,
  82245. style: Zt(f, {
  82246. x: 0,
  82247. y: 0,
  82248. text: ""
  82249. })
  82250. });
  82251. this.group.add(d);
  82252. var h = [(o === "horizontal" ? a / 2 : dje) + i[0] / 2, 0], p = this._shapes;
  82253. p.indicator = l, p.indicatorLabel = d, p.indicatorLabelPoint = h, this._firstShowIndicator = !0;
  82254. }, e.prototype._dragHandle = function(n, r, i, a) {
  82255. if (this._useHandle) {
  82256. if (this._dragging = !r, !r) {
  82257. var o = this._applyTransform([i, a], this._shapes.mainGroup, !0);
  82258. this._updateInterval(n, o[1]), this._hideIndicator(), this._updateView();
  82259. }
  82260. r === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  82261. type: "selectDataRange",
  82262. from: this.uid,
  82263. visualMapId: this.visualMapModel.id,
  82264. selected: this._dataInterval.slice()
  82265. }), r ? !this._hovering && this._clearHoverLinkToSeries() : fQ(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[n], !1);
  82266. }
  82267. }, e.prototype._resetInterval = function() {
  82268. var n = this.visualMapModel, r = this._dataInterval = n.getSelected(), i = n.getExtent(), a = [0, n.itemSize[1]];
  82269. this._handleEnds = [Ao(r[0], i, a, !0), Ao(r[1], i, a, !0)];
  82270. }, e.prototype._updateInterval = function(n, r) {
  82271. r = r || 0;
  82272. var i = this.visualMapModel, a = this._handleEnds, o = [0, i.itemSize[1]];
  82273. Qf(
  82274. r,
  82275. a,
  82276. o,
  82277. n,
  82278. // cross is forbidden
  82279. 0
  82280. );
  82281. var s = i.getExtent();
  82282. this._dataInterval = [Ao(a[0], o, s, !0), Ao(a[1], o, s, !0)];
  82283. }, e.prototype._updateView = function(n) {
  82284. var r = this.visualMapModel, i = r.getExtent(), a = this._shapes, o = [0, r.itemSize[1]], s = n ? o : this._handleEnds, l = this._createBarVisual(this._dataInterval, i, s, "inRange"), u = this._createBarVisual(i, i, o, "outOfRange");
  82285. a.inRange.setStyle({
  82286. fill: l.barColor
  82287. // opacity: visualInRange.opacity
  82288. }).setShape("points", l.barPoints), a.outOfRange.setStyle({
  82289. fill: u.barColor
  82290. // opacity: visualOutOfRange.opacity
  82291. }).setShape("points", u.barPoints), this._updateHandle(s, l);
  82292. }, e.prototype._createBarVisual = function(n, r, i, a) {
  82293. var o = {
  82294. forceState: a,
  82295. convertOpacityToAlpha: !0
  82296. }, s = this._makeColorGradient(n, o), l = [this.getControllerVisual(n[0], "symbolSize", o), this.getControllerVisual(n[1], "symbolSize", o)], u = this._createBarPoints(i, l);
  82297. return {
  82298. barColor: new hp(0, 0, 0, 1, s),
  82299. barPoints: u,
  82300. handlesColor: [s[0].color, s[s.length - 1].color]
  82301. };
  82302. }, e.prototype._makeColorGradient = function(n, r) {
  82303. var i = 100, a = [], o = (n[1] - n[0]) / i;
  82304. a.push({
  82305. color: this.getControllerVisual(n[0], "color", r),
  82306. offset: 0
  82307. });
  82308. for (var s = 1; s < i; s++) {
  82309. var l = n[0] + o * s;
  82310. if (l > n[1])
  82311. break;
  82312. a.push({
  82313. color: this.getControllerVisual(l, "color", r),
  82314. offset: s / i
  82315. });
  82316. }
  82317. return a.push({
  82318. color: this.getControllerVisual(n[1], "color", r),
  82319. offset: 1
  82320. }), a;
  82321. }, e.prototype._createBarPoints = function(n, r) {
  82322. var i = this.visualMapModel.itemSize;
  82323. return [[i[0] - r[0], n[0]], [i[0], n[0]], [i[0], n[1]], [i[0] - r[1], n[1]]];
  82324. }, e.prototype._createBarGroup = function(n) {
  82325. var r = this._orient, i = this.visualMapModel.get("inverse");
  82326. return new Ve(r === "horizontal" && !i ? {
  82327. scaleX: n === "bottom" ? 1 : -1,
  82328. rotation: Math.PI / 2
  82329. } : r === "horizontal" && i ? {
  82330. scaleX: n === "bottom" ? -1 : 1,
  82331. rotation: -Math.PI / 2
  82332. } : r === "vertical" && !i ? {
  82333. scaleX: n === "left" ? 1 : -1,
  82334. scaleY: -1
  82335. } : {
  82336. scaleX: n === "left" ? 1 : -1
  82337. });
  82338. }, e.prototype._updateHandle = function(n, r) {
  82339. if (this._useHandle) {
  82340. var i = this._shapes, a = this.visualMapModel, o = i.handleThumbs, s = i.handleLabels, l = a.itemSize, u = a.getExtent();
  82341. cje([0, 1], function(c) {
  82342. var f = o[c];
  82343. f.setStyle("fill", r.handlesColor[c]), f.y = n[c];
  82344. var d = Ao(n[c], [0, l[1]], u, !0), h = this.getControllerVisual(d, "symbolSize");
  82345. f.scaleX = f.scaleY = h / l[0], f.x = l[0] - h / 2;
  82346. var p = to(i.handleLabelPoints[c], ql(f, this.group));
  82347. s[c].setStyle({
  82348. x: p[0],
  82349. y: p[1],
  82350. text: a.formatValueText(this._dataInterval[c]),
  82351. verticalAlign: "middle",
  82352. align: this._orient === "vertical" ? this._applyTransform("left", i.mainGroup) : "center"
  82353. });
  82354. }, this);
  82355. }
  82356. }, e.prototype._showIndicator = function(n, r, i, a) {
  82357. var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], c = this._shapes, f = c.indicator;
  82358. if (f) {
  82359. f.attr("invisible", !1);
  82360. var d = {
  82361. convertOpacityToAlpha: !0
  82362. }, h = this.getControllerVisual(n, "color", d), p = this.getControllerVisual(n, "symbolSize"), v = Ao(n, s, u, !0), g = l[0] - p / 2, m = {
  82363. x: f.x,
  82364. y: f.y
  82365. };
  82366. f.y = v, f.x = g;
  82367. var y = to(c.indicatorLabelPoint, ql(f, this.group)), b = c.indicatorLabel;
  82368. b.attr("invisible", !1);
  82369. var _ = this._applyTransform("left", c.mainGroup), O = this._orient, S = O === "horizontal";
  82370. b.setStyle({
  82371. text: (i || "") + o.formatValueText(r),
  82372. verticalAlign: S ? _ : "middle",
  82373. align: S ? "center" : _
  82374. });
  82375. var x = {
  82376. x: g,
  82377. y: v,
  82378. style: {
  82379. fill: h
  82380. }
  82381. }, C = {
  82382. style: {
  82383. x: y[0],
  82384. y: y[1]
  82385. }
  82386. };
  82387. if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
  82388. var T = {
  82389. duration: 100,
  82390. easing: "cubicInOut",
  82391. additive: !0
  82392. };
  82393. f.x = m.x, f.y = m.y, f.animateTo(x, T), b.animateTo(C, T);
  82394. } else
  82395. f.attr(x), b.attr(C);
  82396. this._firstShowIndicator = !1;
  82397. var w = this._shapes.handleLabels;
  82398. if (w)
  82399. for (var P = 0; P < w.length; P++)
  82400. this.api.enterBlur(w[P]);
  82401. }
  82402. }, e.prototype._enableHoverLinkToSeries = function() {
  82403. var n = this;
  82404. this._shapes.mainGroup.on("mousemove", function(r) {
  82405. if (n._hovering = !0, !n._dragging) {
  82406. var i = n.visualMapModel.itemSize, a = n._applyTransform([r.offsetX, r.offsetY], n._shapes.mainGroup, !0, !0);
  82407. a[1] = uQ(o$(0, a[1]), i[1]), n._doHoverLinkToSeries(a[1], 0 <= a[0] && a[0] <= i[0]);
  82408. }
  82409. }).on("mouseout", function() {
  82410. n._hovering = !1, !n._dragging && n._clearHoverLinkToSeries();
  82411. });
  82412. }, e.prototype._enableHoverLinkFromSeries = function() {
  82413. var n = this.api.getZr();
  82414. this.visualMapModel.option.hoverLink ? (n.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), n.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
  82415. }, e.prototype._doHoverLinkToSeries = function(n, r) {
  82416. var i = this.visualMapModel, a = i.itemSize;
  82417. if (i.option.hoverLink) {
  82418. var o = [0, a[1]], s = i.getExtent();
  82419. n = uQ(o$(o[0], n), o[1]);
  82420. var l = pje(i, s, o), u = [n - l, n + l], c = Ao(n, o, s, !0), f = [Ao(u[0], o, s, !0), Ao(u[1], o, s, !0)];
  82421. u[0] < o[0] && (f[0] = -1 / 0), u[1] > o[1] && (f[1] = 1 / 0), r && (f[0] === -1 / 0 ? this._showIndicator(c, f[1], "< ", l) : f[1] === 1 / 0 ? this._showIndicator(c, f[0], "> ", l) : this._showIndicator(c, c, "≈ ", l));
  82422. var d = this._hoverLinkDataIndices, h = [];
  82423. (r || fQ(i)) && (h = this._hoverLinkDataIndices = i.findTargetDataIndices(f));
  82424. var p = KDe(d, h);
  82425. this._dispatchHighDown("downplay", K_(p[0], i)), this._dispatchHighDown("highlight", K_(p[1], i));
  82426. }
  82427. }, e.prototype._hoverLinkFromSeriesMouseOver = function(n) {
  82428. var r;
  82429. if (Bc(n.target, function(l) {
  82430. var u = Fe(l);
  82431. if (u.dataIndex != null)
  82432. return r = u, !0;
  82433. }, !0), !!r) {
  82434. var i = this.ecModel.getSeriesByIndex(r.seriesIndex), a = this.visualMapModel;
  82435. if (a.isTargetSeries(i)) {
  82436. var o = i.getData(r.dataType), s = o.getStore().get(a.getDataDimensionIndex(o), r.dataIndex);
  82437. isNaN(s) || this._showIndicator(s, s);
  82438. }
  82439. }
  82440. }, e.prototype._hideIndicator = function() {
  82441. var n = this._shapes;
  82442. n.indicator && n.indicator.attr("invisible", !0), n.indicatorLabel && n.indicatorLabel.attr("invisible", !0);
  82443. var r = this._shapes.handleLabels;
  82444. if (r)
  82445. for (var i = 0; i < r.length; i++)
  82446. this.api.leaveBlur(r[i]);
  82447. }, e.prototype._clearHoverLinkToSeries = function() {
  82448. this._hideIndicator();
  82449. var n = this._hoverLinkDataIndices;
  82450. this._dispatchHighDown("downplay", K_(n, this.visualMapModel)), n.length = 0;
  82451. }, e.prototype._clearHoverLinkFromSeries = function() {
  82452. this._hideIndicator();
  82453. var n = this.api.getZr();
  82454. n.off("mouseover", this._hoverLinkFromSeriesMouseOver), n.off("mouseout", this._hideIndicator);
  82455. }, e.prototype._applyTransform = function(n, r, i, a) {
  82456. var o = ql(r, a ? null : this.group);
  82457. return ue(n) ? to(n, o, i) : Jx(n, o, i);
  82458. }, e.prototype._dispatchHighDown = function(n, r) {
  82459. r && r.length && this.api.dispatchAction({
  82460. type: n,
  82461. batch: r
  82462. });
  82463. }, e.prototype.dispose = function() {
  82464. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
  82465. }, e.type = "visualMap.continuous", e;
  82466. }(lie)
  82467. );
  82468. function cQ(t, e, n, r) {
  82469. return new ii({
  82470. shape: {
  82471. points: t
  82472. },
  82473. draggable: !!n,
  82474. cursor: e,
  82475. drift: n,
  82476. onmousemove: function(i) {
  82477. Gs(i.event);
  82478. },
  82479. ondragend: r
  82480. });
  82481. }
  82482. function pje(t, e, n) {
  82483. var r = fje / 2, i = t.get("hoverLinkDataSize");
  82484. return i && (r = Ao(i, e, n, !0) / 2), r;
  82485. }
  82486. function fQ(t) {
  82487. var e = t.get("hoverLinkOnHandle");
  82488. return !!(e ?? t.get("realtime"));
  82489. }
  82490. function dQ(t) {
  82491. return t === "vertical" ? "ns-resize" : "ew-resize";
  82492. }
  82493. var vje = {
  82494. type: "selectDataRange",
  82495. event: "dataRangeSelected",
  82496. // FIXME use updateView appears wrong
  82497. update: "update"
  82498. }, gje = function(t, e) {
  82499. e.eachComponent({
  82500. mainType: "visualMap",
  82501. query: t
  82502. }, function(n) {
  82503. n.setSelected(t.selected);
  82504. });
  82505. }, mje = [
  82506. {
  82507. createOnAllSeries: !0,
  82508. reset: function(t, e) {
  82509. var n = [];
  82510. return e.eachComponent("visualMap", function(r) {
  82511. var i = t.pipelineContext;
  82512. !r.isTargetSeries(t) || i && i.large || n.push(z9e(r.stateList, r.targetVisuals, xe(r.getValueState, r), r.getDataDimensionIndex(t.getData())));
  82513. }), n;
  82514. }
  82515. },
  82516. // Only support color.
  82517. {
  82518. createOnAllSeries: !0,
  82519. reset: function(t, e) {
  82520. var n = t.getData(), r = [];
  82521. e.eachComponent("visualMap", function(i) {
  82522. if (i.isTargetSeries(t)) {
  82523. var a = i.getVisualMeta(xe(yje, null, t, i)) || {
  82524. stops: [],
  82525. outerColors: []
  82526. }, o = i.getDataDimensionIndex(n);
  82527. o >= 0 && (a.dimension = o, r.push(a));
  82528. }
  82529. }), t.getData().setVisual("visualMeta", r);
  82530. }
  82531. }
  82532. ];
  82533. function yje(t, e, n, r) {
  82534. for (var i = e.targetVisuals[r], a = qn.prepareVisualTypes(i), o = {
  82535. color: H0(t.getData(), "color")
  82536. // default color.
  82537. }, s = 0, l = a.length; s < l; s++) {
  82538. var u = a[s], c = i[u === "opacity" ? "__alphaForOpacity" : u];
  82539. c && c.applyVisual(n, f, d);
  82540. }
  82541. return o.color;
  82542. function f(h) {
  82543. return o[h];
  82544. }
  82545. function d(h, p) {
  82546. o[h] = p;
  82547. }
  82548. }
  82549. var hQ = k;
  82550. function bje(t) {
  82551. var e = t && t.visualMap;
  82552. ue(e) || (e = e ? [e] : []), hQ(e, function(n) {
  82553. if (n) {
  82554. _d(n, "splitList") && !_d(n, "pieces") && (n.pieces = n.splitList, delete n.splitList);
  82555. var r = n.pieces;
  82556. r && ue(r) && hQ(r, function(i) {
  82557. Ie(i) && (_d(i, "start") && !_d(i, "min") && (i.min = i.start), _d(i, "end") && !_d(i, "max") && (i.max = i.end));
  82558. });
  82559. }
  82560. });
  82561. }
  82562. function _d(t, e) {
  82563. return t && t.hasOwnProperty && t.hasOwnProperty(e);
  82564. }
  82565. var pQ = !1;
  82566. function cie(t) {
  82567. pQ || (pQ = !0, t.registerSubTypeDefaulter("visualMap", function(e) {
  82568. return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
  82569. }), t.registerAction(vje, gje), k(mje, function(e) {
  82570. t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e);
  82571. }), t.registerPreprocessor(bje));
  82572. }
  82573. function fie(t) {
  82574. t.registerComponentModel(uje), t.registerComponentView(hje), cie(t);
  82575. }
  82576. var _je = (
  82577. /** @class */
  82578. function(t) {
  82579. q(e, t);
  82580. function e() {
  82581. var n = t !== null && t.apply(this, arguments) || this;
  82582. return n.type = e.type, n._pieceList = [], n;
  82583. }
  82584. return e.prototype.optionUpdated = function(n, r) {
  82585. t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
  82586. var i = this._mode = this._determineMode();
  82587. this._pieceList = [], Oje[this._mode].call(this, this._pieceList), this._resetSelected(n, r);
  82588. var a = this.option.categories;
  82589. this.resetVisual(function(o, s) {
  82590. i === "categories" ? (o.mappingMethod = "category", o.categories = Le(a)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = ce(this._pieceList, function(l) {
  82591. return l = Le(l), s !== "inRange" && (l.visual = null), l;
  82592. }));
  82593. });
  82594. }, e.prototype.completeVisualOption = function() {
  82595. var n = this.option, r = {}, i = qn.listVisualTypes(), a = this.isCategory();
  82596. k(n.pieces, function(s) {
  82597. k(i, function(l) {
  82598. s.hasOwnProperty(l) && (r[l] = 1);
  82599. });
  82600. }), k(r, function(s, l) {
  82601. var u = !1;
  82602. k(this.stateList, function(c) {
  82603. u = u || o(n, c, l) || o(n.target, c, l);
  82604. }, this), !u && k(this.stateList, function(c) {
  82605. (n[c] || (n[c] = {}))[l] = sie.get(l, c === "inRange" ? "active" : "inactive", a);
  82606. });
  82607. }, this);
  82608. function o(s, l, u) {
  82609. return s && s[l] && s[l].hasOwnProperty(u);
  82610. }
  82611. t.prototype.completeVisualOption.apply(this, arguments);
  82612. }, e.prototype._resetSelected = function(n, r) {
  82613. var i = this.option, a = this._pieceList, o = (r ? i : n).selected || {};
  82614. if (i.selected = o, k(a, function(l, u) {
  82615. var c = this.getSelectedMapKey(l);
  82616. o.hasOwnProperty(c) || (o[c] = !0);
  82617. }, this), i.selectedMode === "single") {
  82618. var s = !1;
  82619. k(a, function(l, u) {
  82620. var c = this.getSelectedMapKey(l);
  82621. o[c] && (s ? o[c] = !1 : s = !0);
  82622. }, this);
  82623. }
  82624. }, e.prototype.getItemSymbol = function() {
  82625. return this.get("itemSymbol");
  82626. }, e.prototype.getSelectedMapKey = function(n) {
  82627. return this._mode === "categories" ? n.value + "" : n.index + "";
  82628. }, e.prototype.getPieceList = function() {
  82629. return this._pieceList;
  82630. }, e.prototype._determineMode = function() {
  82631. var n = this.option;
  82632. return n.pieces && n.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
  82633. }, e.prototype.setSelected = function(n) {
  82634. this.option.selected = Le(n);
  82635. }, e.prototype.getValueState = function(n) {
  82636. var r = qn.findPieceIndex(n, this._pieceList);
  82637. return r != null && this.option.selected[this.getSelectedMapKey(this._pieceList[r])] ? "inRange" : "outOfRange";
  82638. }, e.prototype.findTargetDataIndices = function(n) {
  82639. var r = [], i = this._pieceList;
  82640. return this.eachTargetSeries(function(a) {
  82641. var o = [], s = a.getData();
  82642. s.each(this.getDataDimensionIndex(s), function(l, u) {
  82643. var c = qn.findPieceIndex(l, i);
  82644. c === n && o.push(u);
  82645. }, this), r.push({
  82646. seriesId: a.id,
  82647. dataIndex: o
  82648. });
  82649. }, this), r;
  82650. }, e.prototype.getRepresentValue = function(n) {
  82651. var r;
  82652. if (this.isCategory())
  82653. r = n.value;
  82654. else if (n.value != null)
  82655. r = n.value;
  82656. else {
  82657. var i = n.interval || [];
  82658. r = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2;
  82659. }
  82660. return r;
  82661. }, e.prototype.getVisualMeta = function(n) {
  82662. if (this.isCategory())
  82663. return;
  82664. var r = [], i = ["", ""], a = this;
  82665. function o(c, f) {
  82666. var d = a.getRepresentValue({
  82667. interval: c
  82668. });
  82669. f || (f = a.getValueState(d));
  82670. var h = n(d, f);
  82671. c[0] === -1 / 0 ? i[0] = h : c[1] === 1 / 0 ? i[1] = h : r.push({
  82672. value: c[0],
  82673. color: h
  82674. }, {
  82675. value: c[1],
  82676. color: h
  82677. });
  82678. }
  82679. var s = this._pieceList.slice();
  82680. if (!s.length)
  82681. s.push({
  82682. interval: [-1 / 0, 1 / 0]
  82683. });
  82684. else {
  82685. var l = s[0].interval[0];
  82686. l !== -1 / 0 && s.unshift({
  82687. interval: [-1 / 0, l]
  82688. }), l = s[s.length - 1].interval[1], l !== 1 / 0 && s.push({
  82689. interval: [l, 1 / 0]
  82690. });
  82691. }
  82692. var u = -1 / 0;
  82693. return k(s, function(c) {
  82694. var f = c.interval;
  82695. f && (f[0] > u && o([u, f[0]], "outOfRange"), o(f.slice()), u = f[1]);
  82696. }, this), {
  82697. stops: r,
  82698. outerColors: i
  82699. };
  82700. }, e.type = "visualMap.piecewise", e.defaultOption = Pu(GO.defaultOption, {
  82701. selected: null,
  82702. minOpen: !1,
  82703. maxOpen: !1,
  82704. align: "auto",
  82705. itemWidth: 20,
  82706. itemHeight: 14,
  82707. itemSymbol: "roundRect",
  82708. pieces: null,
  82709. categories: null,
  82710. splitNumber: 5,
  82711. selectedMode: "multiple",
  82712. itemGap: 10,
  82713. hoverLink: !0
  82714. // Enable hover highlight.
  82715. }), e;
  82716. }(GO)
  82717. ), Oje = {
  82718. splitNumber: function(t) {
  82719. var e = this.option, n = Math.min(e.precision, 20), r = this.getExtent(), i = e.splitNumber;
  82720. i = Math.max(parseInt(i, 10), 1), e.splitNumber = i;
  82721. for (var a = (r[1] - r[0]) / i; +a.toFixed(n) !== a && n < 5; )
  82722. n++;
  82723. e.precision = n, a = +a.toFixed(n), e.minOpen && t.push({
  82724. interval: [-1 / 0, r[0]],
  82725. close: [0, 0]
  82726. });
  82727. for (var o = 0, s = r[0]; o < i; s += a, o++) {
  82728. var l = o === i - 1 ? r[1] : s + a;
  82729. t.push({
  82730. interval: [s, l],
  82731. close: [1, 1]
  82732. });
  82733. }
  82734. e.maxOpen && t.push({
  82735. interval: [r[1], 1 / 0],
  82736. close: [0, 0]
  82737. }), TA(t), k(t, function(u, c) {
  82738. u.index = c, u.text = this.formatValueText(u.interval);
  82739. }, this);
  82740. },
  82741. categories: function(t) {
  82742. var e = this.option;
  82743. k(e.categories, function(n) {
  82744. t.push({
  82745. text: this.formatValueText(n, !0),
  82746. value: n
  82747. });
  82748. }, this), vQ(e, t);
  82749. },
  82750. pieces: function(t) {
  82751. var e = this.option;
  82752. k(e.pieces, function(n, r) {
  82753. Ie(n) || (n = {
  82754. value: n
  82755. });
  82756. var i = {
  82757. text: "",
  82758. index: r
  82759. };
  82760. if (n.label != null && (i.text = n.label), n.hasOwnProperty("value")) {
  82761. var a = i.value = n.value;
  82762. i.interval = [a, a], i.close = [1, 1];
  82763. } else {
  82764. for (var o = i.interval = [], s = i.close = [0, 0], l = [1, 0, 1], u = [-1 / 0, 1 / 0], c = [], f = 0; f < 2; f++) {
  82765. for (var d = [["gte", "gt", "min"], ["lte", "lt", "max"]][f], h = 0; h < 3 && o[f] == null; h++)
  82766. o[f] = n[d[h]], s[f] = l[h], c[f] = h === 2;
  82767. o[f] == null && (o[f] = u[f]);
  82768. }
  82769. c[0] && o[1] === 1 / 0 && (s[0] = 0), c[1] && o[0] === -1 / 0 && (s[1] = 0), process.env.NODE_ENV !== "production" && o[0] > o[1] && console.warn("Piece " + r + "is illegal: " + o + " lower bound should not greater then uppper bound."), o[0] === o[1] && s[0] && s[1] && (i.value = o[0]);
  82770. }
  82771. i.visual = qn.retrieveVisuals(n), t.push(i);
  82772. }, this), vQ(e, t), TA(t), k(t, function(n) {
  82773. var r = n.close, i = [["<", "≤"][r[1]], [">", "≥"][r[0]]];
  82774. n.text = n.text || this.formatValueText(n.value != null ? n.value : n.interval, !1, i);
  82775. }, this);
  82776. }
  82777. };
  82778. function vQ(t, e) {
  82779. var n = t.inverse;
  82780. (t.orient === "vertical" ? !n : n) && e.reverse();
  82781. }
  82782. var Sje = (
  82783. /** @class */
  82784. function(t) {
  82785. q(e, t);
  82786. function e() {
  82787. var n = t !== null && t.apply(this, arguments) || this;
  82788. return n.type = e.type, n;
  82789. }
  82790. return e.prototype.doRender = function() {
  82791. var n = this.group;
  82792. n.removeAll();
  82793. var r = this.visualMapModel, i = r.get("textGap"), a = r.textStyleModel, o = a.getFont(), s = a.getTextColor(), l = this._getItemAlign(), u = r.itemSize, c = this._getViewData(), f = c.endsText, d = Tn(r.get("showLabel", !0), !f);
  82794. f && this._renderEndsText(n, f[0], u, d, l), k(c.viewPieceList, function(h) {
  82795. var p = h.piece, v = new Ve();
  82796. v.onclick = xe(this._onItemClick, this, p), this._enableHoverLink(v, h.indexInModelPieceList);
  82797. var g = r.getRepresentValue(p);
  82798. if (this._createItemSymbol(v, g, [0, 0, u[0], u[1]]), d) {
  82799. var m = this.visualMapModel.getValueState(g);
  82800. v.add(new gt({
  82801. style: {
  82802. x: l === "right" ? -i : u[0] + i,
  82803. y: u[1] / 2,
  82804. text: p.text,
  82805. verticalAlign: "middle",
  82806. align: l,
  82807. font: o,
  82808. fill: s,
  82809. opacity: m === "outOfRange" ? 0.5 : 1
  82810. }
  82811. }));
  82812. }
  82813. n.add(v);
  82814. }, this), f && this._renderEndsText(n, f[1], u, d, l), ef(r.get("orient"), n, r.get("itemGap")), this.renderBackground(n), this.positionGroup(n);
  82815. }, e.prototype._enableHoverLink = function(n, r) {
  82816. var i = this;
  82817. n.on("mouseover", function() {
  82818. return a("highlight");
  82819. }).on("mouseout", function() {
  82820. return a("downplay");
  82821. });
  82822. var a = function(o) {
  82823. var s = i.visualMapModel;
  82824. s.option.hoverLink && i.api.dispatchAction({
  82825. type: o,
  82826. batch: K_(s.findTargetDataIndices(r), s)
  82827. });
  82828. };
  82829. }, e.prototype._getItemAlign = function() {
  82830. var n = this.visualMapModel, r = n.option;
  82831. if (r.orient === "vertical")
  82832. return uie(n, this.api, n.itemSize);
  82833. var i = r.align;
  82834. return (!i || i === "auto") && (i = "left"), i;
  82835. }, e.prototype._renderEndsText = function(n, r, i, a, o) {
  82836. if (r) {
  82837. var s = new Ve(), l = this.visualMapModel.textStyleModel;
  82838. s.add(new gt({
  82839. style: Zt(l, {
  82840. x: a ? o === "right" ? i[0] : 0 : i[0] / 2,
  82841. y: i[1] / 2,
  82842. verticalAlign: "middle",
  82843. align: a ? o : "center",
  82844. text: r
  82845. })
  82846. })), n.add(s);
  82847. }
  82848. }, e.prototype._getViewData = function() {
  82849. var n = this.visualMapModel, r = ce(n.getPieceList(), function(s, l) {
  82850. return {
  82851. piece: s,
  82852. indexInModelPieceList: l
  82853. };
  82854. }), i = n.get("text"), a = n.get("orient"), o = n.get("inverse");
  82855. return (a === "horizontal" ? o : !o) ? r.reverse() : i && (i = i.slice().reverse()), {
  82856. viewPieceList: r,
  82857. endsText: i
  82858. };
  82859. }, e.prototype._createItemSymbol = function(n, r, i) {
  82860. n.add($n(
  82861. // symbol will be string
  82862. this.getControllerVisual(r, "symbol"),
  82863. i[0],
  82864. i[1],
  82865. i[2],
  82866. i[3],
  82867. // color will be string
  82868. this.getControllerVisual(r, "color")
  82869. ));
  82870. }, e.prototype._onItemClick = function(n) {
  82871. var r = this.visualMapModel, i = r.option, a = i.selectedMode;
  82872. if (a) {
  82873. var o = Le(i.selected), s = r.getSelectedMapKey(n);
  82874. a === "single" || a === !0 ? (o[s] = !0, k(o, function(l, u) {
  82875. o[u] = u === s;
  82876. })) : o[s] = !o[s], this.api.dispatchAction({
  82877. type: "selectDataRange",
  82878. from: this.uid,
  82879. visualMapId: this.visualMapModel.id,
  82880. selected: o
  82881. });
  82882. }
  82883. }, e.type = "visualMap.piecewise", e;
  82884. }(lie)
  82885. );
  82886. function die(t) {
  82887. t.registerComponentModel(_je), t.registerComponentView(Sje), cie(t);
  82888. }
  82889. function xje(t) {
  82890. at(fie), at(die);
  82891. }
  82892. var wje = {
  82893. label: {
  82894. enabled: !0
  82895. },
  82896. decal: {
  82897. show: !1
  82898. }
  82899. }, gQ = bt(), Cje = {};
  82900. function Tje(t, e) {
  82901. var n = t.getModel("aria");
  82902. if (!n.get("enabled"))
  82903. return;
  82904. var r = Le(wje);
  82905. qe(r.label, t.getLocaleModel().get("aria"), !1), qe(n.option, r, !1), i(), a();
  82906. function i() {
  82907. var u = n.getModel("decal"), c = u.get("show");
  82908. if (c) {
  82909. var f = Pe();
  82910. t.eachSeries(function(d) {
  82911. if (!d.isColorBySeries()) {
  82912. var h = f.get(d.type);
  82913. h || (h = {}, f.set(d.type, h)), gQ(d).scope = h;
  82914. }
  82915. }), t.eachRawSeries(function(d) {
  82916. if (t.isSeriesFiltered(d))
  82917. return;
  82918. if (Me(d.enableAriaDecal)) {
  82919. d.enableAriaDecal();
  82920. return;
  82921. }
  82922. var h = d.getData();
  82923. if (d.isColorBySeries()) {
  82924. var y = QA(d.ecModel, d.name, Cje, t.getSeriesCount()), b = h.getVisual("decal");
  82925. h.setVisual("decal", _(b, y));
  82926. } else {
  82927. var p = d.getRawData(), v = {}, g = gQ(d).scope;
  82928. h.each(function(O) {
  82929. var S = h.getRawIndex(O);
  82930. v[S] = O;
  82931. });
  82932. var m = p.count();
  82933. p.each(function(O) {
  82934. var S = v[O], x = p.getName(O) || O + "", C = QA(d.ecModel, x, g, m), T = h.getItemVisual(S, "decal");
  82935. h.setItemVisual(S, "decal", _(T, C));
  82936. });
  82937. }
  82938. function _(O, S) {
  82939. var x = O ? le(le({}, S), O) : S;
  82940. return x.dirty = !0, x;
  82941. }
  82942. });
  82943. }
  82944. }
  82945. function a() {
  82946. var u = e.getZr().dom;
  82947. if (u) {
  82948. var c = t.getLocaleModel().get("aria"), f = n.getModel("label");
  82949. if (f.option = Re(f.option, c), !!f.get("enabled")) {
  82950. if (f.get("description")) {
  82951. u.setAttribute("aria-label", f.get("description"));
  82952. return;
  82953. }
  82954. var d = t.getSeriesCount(), h = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, v = Math.min(d, p), g;
  82955. if (!(d < 1)) {
  82956. var m = s();
  82957. if (m) {
  82958. var y = f.get(["general", "withTitle"]);
  82959. g = o(y, {
  82960. title: m
  82961. });
  82962. } else
  82963. g = f.get(["general", "withoutTitle"]);
  82964. var b = [], _ = d > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
  82965. g += o(_, {
  82966. seriesCount: d
  82967. }), t.eachSeries(function(C, T) {
  82968. if (T < v) {
  82969. var w = void 0, P = C.get("name"), $ = P ? "withName" : "withoutName";
  82970. w = d > 1 ? f.get(["series", "multiple", $]) : f.get(["series", "single", $]), w = o(w, {
  82971. seriesId: C.seriesIndex,
  82972. seriesName: C.get("name"),
  82973. seriesType: l(C.subType)
  82974. });
  82975. var A = C.getData();
  82976. if (A.count() > h) {
  82977. var D = f.get(["data", "partialData"]);
  82978. w += o(D, {
  82979. displayCnt: h
  82980. });
  82981. } else
  82982. w += f.get(["data", "allData"]);
  82983. for (var E = f.get(["data", "separator", "middle"]), R = f.get(["data", "separator", "end"]), N = [], V = 0; V < A.count(); V++)
  82984. if (V < h) {
  82985. var z = A.getName(V), W = A.getValues(V), F = f.get(["data", z ? "withName" : "withoutName"]);
  82986. N.push(o(F, {
  82987. name: z,
  82988. value: W.join(E)
  82989. }));
  82990. }
  82991. w += N.join(E) + R, b.push(w);
  82992. }
  82993. });
  82994. var O = f.getModel(["series", "multiple", "separator"]), S = O.get("middle"), x = O.get("end");
  82995. g += b.join(S) + x, u.setAttribute("aria-label", g);
  82996. }
  82997. }
  82998. }
  82999. }
  83000. function o(u, c) {
  83001. if (!Oe(u))
  83002. return u;
  83003. var f = u;
  83004. return k(c, function(d, h) {
  83005. f = f.replace(new RegExp("\\{\\s*" + h + "\\s*\\}", "g"), d);
  83006. }), f;
  83007. }
  83008. function s() {
  83009. var u = t.get("title");
  83010. return u && u.length && (u = u[0]), u && u.text;
  83011. }
  83012. function l(u) {
  83013. var c = t.getLocaleModel().get(["series", "typeNames"]);
  83014. return c[u] || c.chart;
  83015. }
  83016. }
  83017. function Pje(t) {
  83018. if (!(!t || !t.aria)) {
  83019. var e = t.aria;
  83020. e.show != null && (e.enabled = e.show), e.label = e.label || {}, k(["description", "general", "series", "data"], function(n) {
  83021. e[n] != null && (e.label[n] = e[n]);
  83022. });
  83023. }
  83024. }
  83025. function $je(t) {
  83026. t.registerPreprocessor(Pje), t.registerVisual(t.PRIORITY.VISUAL.ARIA, Tje);
  83027. }
  83028. var mQ = {
  83029. value: "eq",
  83030. // PENDING: not good for literal semantic?
  83031. "<": "lt",
  83032. "<=": "lte",
  83033. ">": "gt",
  83034. ">=": "gte",
  83035. "=": "eq",
  83036. "!=": "ne",
  83037. "<>": "ne"
  83038. // Might be misleading for sake of the difference between '==' and '===',
  83039. // so don't support them.
  83040. // '==': 'eq',
  83041. // '===': 'seq',
  83042. // '!==': 'sne'
  83043. // PENDING: Whether support some common alias "ge", "le", "neq"?
  83044. // ge: 'gte',
  83045. // le: 'lte',
  83046. // neq: 'ne',
  83047. }, Aje = (
  83048. /** @class */
  83049. function() {
  83050. function t(e) {
  83051. var n = this._condVal = Oe(e) ? new RegExp(e) : yR(e) ? e : null;
  83052. if (n == null) {
  83053. var r = "";
  83054. process.env.NODE_ENV !== "production" && (r = ti("Illegal regexp", e, "in")), Et(r);
  83055. }
  83056. }
  83057. return t.prototype.evaluate = function(e) {
  83058. var n = typeof e;
  83059. return Oe(n) ? this._condVal.test(e) : St(n) ? this._condVal.test(e + "") : !1;
  83060. }, t;
  83061. }()
  83062. ), Eje = (
  83063. /** @class */
  83064. function() {
  83065. function t() {
  83066. }
  83067. return t.prototype.evaluate = function() {
  83068. return this.value;
  83069. }, t;
  83070. }()
  83071. ), Mje = (
  83072. /** @class */
  83073. function() {
  83074. function t() {
  83075. }
  83076. return t.prototype.evaluate = function() {
  83077. for (var e = this.children, n = 0; n < e.length; n++)
  83078. if (!e[n].evaluate())
  83079. return !1;
  83080. return !0;
  83081. }, t;
  83082. }()
  83083. ), Ije = (
  83084. /** @class */
  83085. function() {
  83086. function t() {
  83087. }
  83088. return t.prototype.evaluate = function() {
  83089. for (var e = this.children, n = 0; n < e.length; n++)
  83090. if (e[n].evaluate())
  83091. return !0;
  83092. return !1;
  83093. }, t;
  83094. }()
  83095. ), Dje = (
  83096. /** @class */
  83097. function() {
  83098. function t() {
  83099. }
  83100. return t.prototype.evaluate = function() {
  83101. return !this.child.evaluate();
  83102. }, t;
  83103. }()
  83104. ), Rje = (
  83105. /** @class */
  83106. function() {
  83107. function t() {
  83108. }
  83109. return t.prototype.evaluate = function() {
  83110. for (var e = !!this.valueParser, n = this.getValue, r = n(this.valueGetterParam), i = e ? this.valueParser(r) : null, a = 0; a < this.subCondList.length; a++)
  83111. if (!this.subCondList[a].evaluate(e ? i : r))
  83112. return !1;
  83113. return !0;
  83114. }, t;
  83115. }()
  83116. );
  83117. function ML(t, e) {
  83118. if (t === !0 || t === !1) {
  83119. var n = new Eje();
  83120. return n.value = t, n;
  83121. }
  83122. var r = "";
  83123. return hie(t) || (process.env.NODE_ENV !== "production" && (r = ti("Illegal config. Expect a plain object but actually", t)), Et(r)), t.and ? yQ("and", t, e) : t.or ? yQ("or", t, e) : t.not ? kje(t, e) : Lje(t, e);
  83124. }
  83125. function yQ(t, e, n) {
  83126. var r = e[t], i = "";
  83127. process.env.NODE_ENV !== "production" && (i = ti('"and"/"or" condition should only be `' + t + ": [...]` and must not be empty array.", "Illegal condition:", e)), ue(r) || Et(i), r.length || Et(i);
  83128. var a = t === "and" ? new Mje() : new Ije();
  83129. return a.children = ce(r, function(o) {
  83130. return ML(o, n);
  83131. }), a.children.length || Et(i), a;
  83132. }
  83133. function kje(t, e) {
  83134. var n = t.not, r = "";
  83135. process.env.NODE_ENV !== "production" && (r = ti('"not" condition should only be `not: {}`.', "Illegal condition:", t)), hie(n) || Et(r);
  83136. var i = new Dje();
  83137. return i.child = ML(n, e), i.child || Et(r), i;
  83138. }
  83139. function Lje(t, e) {
  83140. for (var n = "", r = e.prepareGetValue(t), i = [], a = st(t), o = t.parser, s = o ? HJ(o) : null, l = 0; l < a.length; l++) {
  83141. var u = a[l];
  83142. if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
  83143. var c = Ce(mQ, u) ? mQ[u] : u, f = t[u], d = s ? s(f) : f, h = o4e(c, d) || c === "reg" && new Aje(d);
  83144. h || (process.env.NODE_ENV !== "production" && (n = ti('Illegal relational operation: "' + u + '" in condition:', t)), Et(n)), i.push(h);
  83145. }
  83146. }
  83147. i.length || (process.env.NODE_ENV !== "production" && (n = ti("Relational condition must have at least one operator.", "Illegal condition:", t)), Et(n));
  83148. var p = new Rje();
  83149. return p.valueGetterParam = r, p.valueParser = s, p.getValue = e.getValue, p.subCondList = i, p;
  83150. }
  83151. function hie(t) {
  83152. return Ie(t) && !wr(t);
  83153. }
  83154. var Nje = (
  83155. /** @class */
  83156. function() {
  83157. function t(e, n) {
  83158. this._cond = ML(e, n);
  83159. }
  83160. return t.prototype.evaluate = function() {
  83161. return this._cond.evaluate();
  83162. }, t;
  83163. }()
  83164. );
  83165. function Bje(t, e) {
  83166. return new Nje(t, e);
  83167. }
  83168. var zje = {
  83169. type: "echarts:filter",
  83170. // PENDING: enhance to filter by index rather than create new data
  83171. transform: function(t) {
  83172. for (var e = t.upstream, n, r = Bje(t.config, {
  83173. valueGetterAttrMap: Pe({
  83174. dimension: !0
  83175. }),
  83176. prepareGetValue: function(s) {
  83177. var l = "", u = s.dimension;
  83178. Ce(s, "dimension") || (process.env.NODE_ENV !== "production" && (l = ti('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), Et(l));
  83179. var c = e.getDimensionInfo(u);
  83180. return c || (process.env.NODE_ENV !== "production" && (l = ti("Can not find dimension info via: " + u + `.
  83181. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
  83182. `, "Illegal condition:", s, `.
  83183. `)), Et(l)), {
  83184. dimIdx: c.index
  83185. };
  83186. },
  83187. getValue: function(s) {
  83188. return e.retrieveValueFromItem(n, s.dimIdx);
  83189. }
  83190. }), i = [], a = 0, o = e.count(); a < o; a++)
  83191. n = e.getRawDataItem(a), r.evaluate() && i.push(n);
  83192. return {
  83193. data: i
  83194. };
  83195. }
  83196. }, QE = "";
  83197. process.env.NODE_ENV !== "production" && (QE = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
  83198. var Vje = {
  83199. type: "echarts:sort",
  83200. transform: function(t) {
  83201. var e = t.upstream, n = t.config, r = "", i = Qt(n);
  83202. i.length || (process.env.NODE_ENV !== "production" && (r = "Empty `config` in sort transform."), Et(r));
  83203. var a = [];
  83204. k(i, function(c) {
  83205. var f = c.dimension, d = c.order, h = c.parser, p = c.incomparable;
  83206. if (f == null && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "dimension" specified.' + QE), Et(r)), d !== "asc" && d !== "desc" && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "order" specified.' + QE), Et(r)), p && p !== "min" && p !== "max") {
  83207. var v = "";
  83208. process.env.NODE_ENV !== "production" && (v = 'incomparable must be "min" or "max" rather than "' + p + '".'), Et(v);
  83209. }
  83210. if (d !== "asc" && d !== "desc") {
  83211. var g = "";
  83212. process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + d + '".'), Et(g);
  83213. }
  83214. var m = e.getDimensionInfo(f);
  83215. m || (process.env.NODE_ENV !== "production" && (r = ti("Can not find dimension info via: " + f + `.
  83216. `, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
  83217. `, "Illegal config:", c, `.
  83218. `)), Et(r));
  83219. var y = h ? HJ(h) : null;
  83220. h && !y && (process.env.NODE_ENV !== "production" && (r = ti("Invalid parser name " + h + `.
  83221. `, "Illegal config:", c, `.
  83222. `)), Et(r)), a.push({
  83223. dimIdx: m.index,
  83224. parser: y,
  83225. comparator: new jJ(d, p)
  83226. });
  83227. });
  83228. var o = e.sourceFormat;
  83229. o !== Br && o !== Na && (process.env.NODE_ENV !== "production" && (r = 'sourceFormat "' + o + '" is not supported yet'), Et(r));
  83230. for (var s = [], l = 0, u = e.count(); l < u; l++)
  83231. s.push(e.getRawDataItem(l));
  83232. return s.sort(function(c, f) {
  83233. for (var d = 0; d < a.length; d++) {
  83234. var h = a[d], p = e.retrieveValueFromItem(c, h.dimIdx), v = e.retrieveValueFromItem(f, h.dimIdx);
  83235. h.parser && (p = h.parser(p), v = h.parser(v));
  83236. var g = h.comparator.evaluate(p, v);
  83237. if (g !== 0)
  83238. return g;
  83239. }
  83240. return 0;
  83241. }), {
  83242. data: s
  83243. };
  83244. }
  83245. };
  83246. function Fje(t) {
  83247. t.registerTransform(zje), t.registerTransform(Vje);
  83248. }
  83249. var Wje = (
  83250. /** @class */
  83251. function(t) {
  83252. q(e, t);
  83253. function e() {
  83254. var n = t !== null && t.apply(this, arguments) || this;
  83255. return n.type = "dataset", n;
  83256. }
  83257. return e.prototype.init = function(n, r, i) {
  83258. t.prototype.init.call(this, n, r, i), this._sourceManager = new YJ(this), yz(this);
  83259. }, e.prototype.mergeOption = function(n, r) {
  83260. t.prototype.mergeOption.call(this, n, r), yz(this);
  83261. }, e.prototype.optionUpdated = function() {
  83262. this._sourceManager.dirty();
  83263. }, e.prototype.getSourceManager = function() {
  83264. return this._sourceManager;
  83265. }, e.type = "dataset", e.defaultOption = {
  83266. seriesLayoutBy: Xo
  83267. }, e;
  83268. }(rt)
  83269. ), Qje = (
  83270. /** @class */
  83271. function(t) {
  83272. q(e, t);
  83273. function e() {
  83274. var n = t !== null && t.apply(this, arguments) || this;
  83275. return n.type = "dataset", n;
  83276. }
  83277. return e.type = "dataset", e;
  83278. }(Xt)
  83279. );
  83280. function Hje(t) {
  83281. t.registerComponentModel(Wje), t.registerComponentView(Qje);
  83282. }
  83283. var xo = as.CMD;
  83284. function Wd(t, e) {
  83285. return Math.abs(t - e) < 1e-5;
  83286. }
  83287. function HE(t) {
  83288. var e = t.data, n = t.len(), r = [], i, a = 0, o = 0, s = 0, l = 0;
  83289. function u(A, D) {
  83290. i && i.length > 2 && r.push(i), i = [A, D];
  83291. }
  83292. function c(A, D, E, R) {
  83293. Wd(A, E) && Wd(D, R) || i.push(A, D, E, R, E, R);
  83294. }
  83295. function f(A, D, E, R, N, V) {
  83296. var z = Math.abs(D - A), W = Math.tan(z / 4) * 4 / 3, F = D < A ? -1 : 1, Q = Math.cos(A), Z = Math.sin(A), ne = Math.cos(D), ee = Math.sin(D), oe = Q * N + E, K = Z * V + R, ie = ne * N + E, X = ee * V + R, H = N * W * F, G = V * W * F;
  83297. i.push(oe - H * Z, K + G * Q, ie + H * ee, X - G * ne, ie, X);
  83298. }
  83299. for (var d, h, p, v, g = 0; g < n; ) {
  83300. var m = e[g++], y = g === 1;
  83301. switch (y && (a = e[g], o = e[g + 1], s = a, l = o, (m === xo.L || m === xo.C || m === xo.Q) && (i = [s, l])), m) {
  83302. case xo.M:
  83303. a = s = e[g++], o = l = e[g++], u(s, l);
  83304. break;
  83305. case xo.L:
  83306. d = e[g++], h = e[g++], c(a, o, d, h), a = d, o = h;
  83307. break;
  83308. case xo.C:
  83309. i.push(e[g++], e[g++], e[g++], e[g++], a = e[g++], o = e[g++]);
  83310. break;
  83311. case xo.Q:
  83312. d = e[g++], h = e[g++], p = e[g++], v = e[g++], i.push(a + 2 / 3 * (d - a), o + 2 / 3 * (h - o), p + 2 / 3 * (d - p), v + 2 / 3 * (h - v), p, v), a = p, o = v;
  83313. break;
  83314. case xo.A:
  83315. var b = e[g++], _ = e[g++], O = e[g++], S = e[g++], x = e[g++], C = e[g++] + x;
  83316. g += 1;
  83317. var T = !e[g++];
  83318. d = Math.cos(x) * O + b, h = Math.sin(x) * S + _, y ? (s = d, l = h, u(s, l)) : c(a, o, d, h), a = Math.cos(C) * O + b, o = Math.sin(C) * S + _;
  83319. for (var w = (T ? -1 : 1) * Math.PI / 2, P = x; T ? P > C : P < C; P += w) {
  83320. var $ = T ? Math.max(P + w, C) : Math.min(P + w, C);
  83321. f(P, $, b, _, O, S);
  83322. }
  83323. break;
  83324. case xo.R:
  83325. s = a = e[g++], l = o = e[g++], d = s + e[g++], h = l + e[g++], u(d, l), c(d, l, d, h), c(d, h, s, h), c(s, h, s, l), c(s, l, d, l);
  83326. break;
  83327. case xo.Z:
  83328. i && c(a, o, s, l), a = s, o = l;
  83329. break;
  83330. }
  83331. }
  83332. return i && i.length > 2 && r.push(i), r;
  83333. }
  83334. function GE(t, e, n, r, i, a, o, s, l, u) {
  83335. if (Wd(t, n) && Wd(e, r) && Wd(i, o) && Wd(a, s)) {
  83336. l.push(o, s);
  83337. return;
  83338. }
  83339. var c = 2 / u, f = c * c, d = o - t, h = s - e, p = Math.sqrt(d * d + h * h);
  83340. d /= p, h /= p;
  83341. var v = n - t, g = r - e, m = i - o, y = a - s, b = v * v + g * g, _ = m * m + y * y;
  83342. if (b < f && _ < f) {
  83343. l.push(o, s);
  83344. return;
  83345. }
  83346. var O = d * v + h * g, S = -d * m - h * y, x = b - O * O, C = _ - S * S;
  83347. if (x < f && O >= 0 && C < f && S >= 0) {
  83348. l.push(o, s);
  83349. return;
  83350. }
  83351. var T = [], w = [];
  83352. su(t, n, i, o, 0.5, T), su(e, r, a, s, 0.5, w), GE(T[0], w[0], T[1], w[1], T[2], w[2], T[3], w[3], l, u), GE(T[4], w[4], T[5], w[5], T[6], w[6], T[7], w[7], l, u);
  83353. }
  83354. function Gje(t, e) {
  83355. var n = HE(t), r = [];
  83356. e = e || 1;
  83357. for (var i = 0; i < n.length; i++) {
  83358. var a = n[i], o = [], s = a[0], l = a[1];
  83359. o.push(s, l);
  83360. for (var u = 2; u < a.length; ) {
  83361. var c = a[u++], f = a[u++], d = a[u++], h = a[u++], p = a[u++], v = a[u++];
  83362. GE(s, l, c, f, d, h, p, v, o, e), s = p, l = v;
  83363. }
  83364. r.push(o);
  83365. }
  83366. return r;
  83367. }
  83368. function pie(t, e, n) {
  83369. var r = t[e], i = t[1 - e], a = Math.abs(r / i), o = Math.ceil(Math.sqrt(a * n)), s = Math.floor(n / o);
  83370. s === 0 && (s = 1, o = n);
  83371. for (var l = [], u = 0; u < o; u++)
  83372. l.push(s);
  83373. var c = o * s, f = n - c;
  83374. if (f > 0)
  83375. for (var u = 0; u < f; u++)
  83376. l[u % o] += 1;
  83377. return l;
  83378. }
  83379. function bQ(t, e, n) {
  83380. for (var r = t.r0, i = t.r, a = t.startAngle, o = t.endAngle, s = Math.abs(o - a), l = s * i, u = i - r, c = l > Math.abs(u), f = pie([l, u], c ? 0 : 1, e), d = (c ? s : u) / f.length, h = 0; h < f.length; h++)
  83381. for (var p = (c ? u : s) / f[h], v = 0; v < f[h]; v++) {
  83382. var g = {};
  83383. c ? (g.startAngle = a + d * h, g.endAngle = a + d * (h + 1), g.r0 = r + p * v, g.r = r + p * (v + 1)) : (g.startAngle = a + p * v, g.endAngle = a + p * (v + 1), g.r0 = r + d * h, g.r = r + d * (h + 1)), g.clockwise = t.clockwise, g.cx = t.cx, g.cy = t.cy, n.push(g);
  83384. }
  83385. }
  83386. function jje(t, e, n) {
  83387. for (var r = t.width, i = t.height, a = r > i, o = pie([r, i], a ? 0 : 1, e), s = a ? "width" : "height", l = a ? "height" : "width", u = a ? "x" : "y", c = a ? "y" : "x", f = t[s] / o.length, d = 0; d < o.length; d++)
  83388. for (var h = t[l] / o[d], p = 0; p < o[d]; p++) {
  83389. var v = {};
  83390. v[u] = d * f, v[c] = p * h, v[s] = f, v[l] = h, v.x += t.x, v.y += t.y, n.push(v);
  83391. }
  83392. }
  83393. function _Q(t, e, n, r) {
  83394. return t * r - n * e;
  83395. }
  83396. function Zje(t, e, n, r, i, a, o, s) {
  83397. var l = n - t, u = r - e, c = o - i, f = s - a, d = _Q(c, f, l, u);
  83398. if (Math.abs(d) < 1e-6)
  83399. return null;
  83400. var h = t - i, p = e - a, v = _Q(h, p, c, f) / d;
  83401. return v < 0 || v > 1 ? null : new Ke(v * l + t, v * u + e);
  83402. }
  83403. function Uje(t, e, n) {
  83404. var r = new Ke();
  83405. Ke.sub(r, n, e), r.normalize();
  83406. var i = new Ke();
  83407. Ke.sub(i, t, e);
  83408. var a = i.dot(r);
  83409. return a;
  83410. }
  83411. function Od(t, e) {
  83412. var n = t[t.length - 1];
  83413. n && n[0] === e[0] && n[1] === e[1] || t.push(e);
  83414. }
  83415. function Xje(t, e, n) {
  83416. for (var r = t.length, i = [], a = 0; a < r; a++) {
  83417. var o = t[a], s = t[(a + 1) % r], l = Zje(o[0], o[1], s[0], s[1], e.x, e.y, n.x, n.y);
  83418. l && i.push({
  83419. projPt: Uje(l, e, n),
  83420. pt: l,
  83421. idx: a
  83422. });
  83423. }
  83424. if (i.length < 2)
  83425. return [{ points: t }, { points: t }];
  83426. i.sort(function(g, m) {
  83427. return g.projPt - m.projPt;
  83428. });
  83429. var u = i[0], c = i[i.length - 1];
  83430. if (c.idx < u.idx) {
  83431. var f = u;
  83432. u = c, c = f;
  83433. }
  83434. for (var d = [u.pt.x, u.pt.y], h = [c.pt.x, c.pt.y], p = [d], v = [h], a = u.idx + 1; a <= c.idx; a++)
  83435. Od(p, t[a].slice());
  83436. Od(p, h), Od(p, d);
  83437. for (var a = c.idx + 1; a <= u.idx + r; a++)
  83438. Od(v, t[a % r].slice());
  83439. return Od(v, d), Od(v, h), [{
  83440. points: p
  83441. }, {
  83442. points: v
  83443. }];
  83444. }
  83445. function OQ(t) {
  83446. var e = t.points, n = [], r = [];
  83447. jx(e, n, r);
  83448. var i = new Je(n[0], n[1], r[0] - n[0], r[1] - n[1]), a = i.width, o = i.height, s = i.x, l = i.y, u = new Ke(), c = new Ke();
  83449. return a > o ? (u.x = c.x = s + a / 2, u.y = l, c.y = l + o) : (u.y = c.y = l + o / 2, u.x = s, c.x = s + a), Xje(e, u, c);
  83450. }
  83451. function jO(t, e, n, r) {
  83452. if (n === 1)
  83453. r.push(e);
  83454. else {
  83455. var i = Math.floor(n / 2), a = t(e);
  83456. jO(t, a[0], i, r), jO(t, a[1], n - i, r);
  83457. }
  83458. return r;
  83459. }
  83460. function Yje(t, e) {
  83461. for (var n = [], r = 0; r < e; r++)
  83462. n.push(zR(t));
  83463. return n;
  83464. }
  83465. function qje(t, e) {
  83466. e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel;
  83467. }
  83468. function Kje(t) {
  83469. for (var e = [], n = 0; n < t.length; )
  83470. e.push([t[n++], t[n++]]);
  83471. return e;
  83472. }
  83473. function Jje(t, e) {
  83474. var n = [], r = t.shape, i;
  83475. switch (t.type) {
  83476. case "rect":
  83477. jje(r, e, n), i = mt;
  83478. break;
  83479. case "sector":
  83480. bQ(r, e, n), i = ri;
  83481. break;
  83482. case "circle":
  83483. bQ({
  83484. r0: 0,
  83485. r: r.r,
  83486. startAngle: 0,
  83487. endAngle: Math.PI * 2,
  83488. cx: r.cx,
  83489. cy: r.cy
  83490. }, e, n), i = ri;
  83491. break;
  83492. default:
  83493. var a = t.getComputedTransform(), o = a ? Math.sqrt(Math.max(a[0] * a[0] + a[1] * a[1], a[2] * a[2] + a[3] * a[3])) : 1, s = ce(Gje(t.getUpdatedPathProxy(), o), function(m) {
  83494. return Kje(m);
  83495. }), l = s.length;
  83496. if (l === 0)
  83497. jO(OQ, {
  83498. points: s[0]
  83499. }, e, n);
  83500. else if (l === e)
  83501. for (var u = 0; u < l; u++)
  83502. n.push({
  83503. points: s[u]
  83504. });
  83505. else {
  83506. var c = 0, f = ce(s, function(m) {
  83507. var y = [], b = [];
  83508. jx(m, y, b);
  83509. var _ = (b[1] - y[1]) * (b[0] - y[0]);
  83510. return c += _, { poly: m, area: _ };
  83511. });
  83512. f.sort(function(m, y) {
  83513. return y.area - m.area;
  83514. });
  83515. for (var d = e, u = 0; u < l; u++) {
  83516. var h = f[u];
  83517. if (d <= 0)
  83518. break;
  83519. var p = u === l - 1 ? d : Math.ceil(h.area / c * e);
  83520. p < 0 || (jO(OQ, {
  83521. points: h.poly
  83522. }, p, n), d -= p);
  83523. }
  83524. }
  83525. i = ii;
  83526. break;
  83527. }
  83528. if (!i)
  83529. return Yje(t, e);
  83530. for (var v = [], u = 0; u < n.length; u++) {
  83531. var g = new i();
  83532. g.setShape(n[u]), qje(t, g), v.push(g);
  83533. }
  83534. return v;
  83535. }
  83536. function eZe(t, e) {
  83537. var n = t.length, r = e.length;
  83538. if (n === r)
  83539. return [t, e];
  83540. for (var i = [], a = [], o = n < r ? t : e, s = Math.min(n, r), l = Math.abs(r - n) / 6, u = (s - 2) / 6, c = Math.ceil(l / u) + 1, f = [o[0], o[1]], d = l, h = 2; h < s; ) {
  83541. var p = o[h - 2], v = o[h - 1], g = o[h++], m = o[h++], y = o[h++], b = o[h++], _ = o[h++], O = o[h++];
  83542. if (d <= 0) {
  83543. f.push(g, m, y, b, _, O);
  83544. continue;
  83545. }
  83546. for (var S = Math.min(d, c - 1) + 1, x = 1; x <= S; x++) {
  83547. var C = x / S;
  83548. su(p, g, y, _, C, i), su(v, m, b, O, C, a), p = i[3], v = a[3], f.push(i[1], a[1], i[2], a[2], p, v), g = i[5], m = a[5], y = i[6], b = a[6];
  83549. }
  83550. d -= S - 1;
  83551. }
  83552. return o === t ? [f, e] : [t, f];
  83553. }
  83554. function SQ(t, e) {
  83555. for (var n = t.length, r = t[n - 2], i = t[n - 1], a = [], o = 0; o < e.length; )
  83556. a[o++] = r, a[o++] = i;
  83557. return a;
  83558. }
  83559. function tZe(t, e) {
  83560. for (var n, r, i, a = [], o = [], s = 0; s < Math.max(t.length, e.length); s++) {
  83561. var l = t[s], u = e[s], c = void 0, f = void 0;
  83562. l ? u ? (n = eZe(l, u), c = n[0], f = n[1], r = c, i = f) : (f = SQ(i || l, l), c = l) : (c = SQ(r || u, u), f = u), a.push(c), o.push(f);
  83563. }
  83564. return [a, o];
  83565. }
  83566. function xQ(t) {
  83567. for (var e = 0, n = 0, r = 0, i = t.length, a = 0, o = i - 2; a < i; o = a, a += 2) {
  83568. var s = t[o], l = t[o + 1], u = t[a], c = t[a + 1], f = s * c - u * l;
  83569. e += f, n += (s + u) * f, r += (l + c) * f;
  83570. }
  83571. return e === 0 ? [t[0] || 0, t[1] || 0] : [n / e / 3, r / e / 3, e];
  83572. }
  83573. function nZe(t, e, n, r) {
  83574. for (var i = (t.length - 2) / 6, a = 1 / 0, o = 0, s = t.length, l = s - 2, u = 0; u < i; u++) {
  83575. for (var c = u * 6, f = 0, d = 0; d < s; d += 2) {
  83576. var h = d === 0 ? c : (c + d - 2) % l + 2, p = t[h] - n[0], v = t[h + 1] - n[1], g = e[d] - r[0], m = e[d + 1] - r[1], y = g - p, b = m - v;
  83577. f += y * y + b * b;
  83578. }
  83579. f < a && (a = f, o = u);
  83580. }
  83581. return o;
  83582. }
  83583. function rZe(t) {
  83584. for (var e = [], n = t.length, r = 0; r < n; r += 2)
  83585. e[r] = t[n - r - 2], e[r + 1] = t[n - r - 1];
  83586. return e;
  83587. }
  83588. function iZe(t, e, n, r) {
  83589. for (var i = [], a, o = 0; o < t.length; o++) {
  83590. var s = t[o], l = e[o], u = xQ(s), c = xQ(l);
  83591. a == null && (a = u[2] < 0 != c[2] < 0);
  83592. var f = [], d = [], h = 0, p = 1 / 0, v = [], g = s.length;
  83593. a && (s = rZe(s));
  83594. for (var m = nZe(s, l, u, c) * 6, y = g - 2, b = 0; b < y; b += 2) {
  83595. var _ = (m + b) % y + 2;
  83596. f[b + 2] = s[_] - u[0], f[b + 3] = s[_ + 1] - u[1];
  83597. }
  83598. f[0] = s[m] - u[0], f[1] = s[m + 1] - u[1];
  83599. for (var O = r / n, S = -r / 2; S <= r / 2; S += O) {
  83600. for (var x = Math.sin(S), C = Math.cos(S), T = 0, b = 0; b < s.length; b += 2) {
  83601. var w = f[b], P = f[b + 1], $ = l[b] - c[0], A = l[b + 1] - c[1], D = $ * C - A * x, E = $ * x + A * C;
  83602. v[b] = D, v[b + 1] = E;
  83603. var R = D - w, N = E - P;
  83604. T += R * R + N * N;
  83605. }
  83606. if (T < p) {
  83607. p = T, h = S;
  83608. for (var V = 0; V < v.length; V++)
  83609. d[V] = v[V];
  83610. }
  83611. }
  83612. i.push({
  83613. from: f,
  83614. to: d,
  83615. fromCp: u,
  83616. toCp: c,
  83617. rotation: -h
  83618. });
  83619. }
  83620. return i;
  83621. }
  83622. function ZO(t) {
  83623. return t.__isCombineMorphing;
  83624. }
  83625. var vie = "__mOriginal_";
  83626. function UO(t, e, n) {
  83627. var r = vie + e, i = t[r] || t[e];
  83628. t[r] || (t[r] = t[e]);
  83629. var a = n.replace, o = n.after, s = n.before;
  83630. t[e] = function() {
  83631. var l = arguments, u;
  83632. return s && s.apply(this, l), a ? u = a.apply(this, l) : u = i.apply(this, l), o && o.apply(this, l), u;
  83633. };
  83634. }
  83635. function Ng(t, e) {
  83636. var n = vie + e;
  83637. t[n] && (t[e] = t[n], t[n] = null);
  83638. }
  83639. function wQ(t, e) {
  83640. for (var n = 0; n < t.length; n++)
  83641. for (var r = t[n], i = 0; i < r.length; ) {
  83642. var a = r[i], o = r[i + 1];
  83643. r[i++] = e[0] * a + e[2] * o + e[4], r[i++] = e[1] * a + e[3] * o + e[5];
  83644. }
  83645. }
  83646. function gie(t, e) {
  83647. var n = t.getUpdatedPathProxy(), r = e.getUpdatedPathProxy(), i = tZe(HE(n), HE(r)), a = i[0], o = i[1], s = t.getComputedTransform(), l = e.getComputedTransform();
  83648. function u() {
  83649. this.transform = null;
  83650. }
  83651. s && wQ(a, s), l && wQ(o, l), UO(e, "updateTransform", { replace: u }), e.transform = null;
  83652. var c = iZe(a, o, 10, Math.PI), f = [];
  83653. UO(e, "buildPath", { replace: function(d) {
  83654. for (var h = e.__morphT, p = 1 - h, v = [], g = 0; g < c.length; g++) {
  83655. var m = c[g], y = m.from, b = m.to, _ = m.rotation * h, O = m.fromCp, S = m.toCp, x = Math.sin(_), C = Math.cos(_);
  83656. xg(v, O, S, h);
  83657. for (var T = 0; T < y.length; T += 2) {
  83658. var w = y[T], P = y[T + 1], $ = b[T], A = b[T + 1], D = w * p + $ * h, E = P * p + A * h;
  83659. f[T] = D * C - E * x + v[0], f[T + 1] = D * x + E * C + v[1];
  83660. }
  83661. var R = f[0], N = f[1];
  83662. d.moveTo(R, N);
  83663. for (var T = 2; T < y.length; ) {
  83664. var $ = f[T++], A = f[T++], V = f[T++], z = f[T++], W = f[T++], F = f[T++];
  83665. R === $ && N === A && V === W && z === F ? d.lineTo(W, F) : d.bezierCurveTo($, A, V, z, W, F), R = W, N = F;
  83666. }
  83667. }
  83668. } });
  83669. }
  83670. function IL(t, e, n) {
  83671. if (!t || !e)
  83672. return e;
  83673. var r = n.done, i = n.during;
  83674. gie(t, e), e.__morphT = 0;
  83675. function a() {
  83676. Ng(e, "buildPath"), Ng(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
  83677. }
  83678. return e.animateTo({
  83679. __morphT: 1
  83680. }, Re({
  83681. during: function(o) {
  83682. e.dirtyShape(), i && i(o);
  83683. },
  83684. done: function() {
  83685. a(), r && r();
  83686. }
  83687. }, n)), e;
  83688. }
  83689. function aZe(t, e, n, r, i, a) {
  83690. var o = 16;
  83691. t = i === n ? 0 : Math.round(32767 * (t - n) / (i - n)), e = a === r ? 0 : Math.round(32767 * (e - r) / (a - r));
  83692. for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
  83693. var c = 0, f = 0;
  83694. (t & u) > 0 && (c = 1), (e & u) > 0 && (f = 1), s += u * u * (3 * c ^ f), f === 0 && (c === 1 && (t = u - 1 - t, e = u - 1 - e), l = t, t = e, e = l);
  83695. }
  83696. return s;
  83697. }
  83698. function XO(t) {
  83699. var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = ce(t, function(s) {
  83700. var l = s.getBoundingRect(), u = s.getComputedTransform(), c = l.x + l.width / 2 + (u ? u[4] : 0), f = l.y + l.height / 2 + (u ? u[5] : 0);
  83701. return e = Math.min(c, e), n = Math.min(f, n), r = Math.max(c, r), i = Math.max(f, i), [c, f];
  83702. }), o = ce(a, function(s, l) {
  83703. return {
  83704. cp: s,
  83705. z: aZe(s[0], s[1], e, n, r, i),
  83706. path: t[l]
  83707. };
  83708. });
  83709. return o.sort(function(s, l) {
  83710. return s.z - l.z;
  83711. }).map(function(s) {
  83712. return s.path;
  83713. });
  83714. }
  83715. function mie(t) {
  83716. return Jje(t.path, t.count);
  83717. }
  83718. function jE() {
  83719. return {
  83720. fromIndividuals: [],
  83721. toIndividuals: [],
  83722. count: 0
  83723. };
  83724. }
  83725. function oZe(t, e, n) {
  83726. var r = [];
  83727. function i(O) {
  83728. for (var S = 0; S < O.length; S++) {
  83729. var x = O[S];
  83730. ZO(x) ? i(x.childrenRef()) : x instanceof ot && r.push(x);
  83731. }
  83732. }
  83733. i(t);
  83734. var a = r.length;
  83735. if (!a)
  83736. return jE();
  83737. var o = n.dividePath || mie, s = o({
  83738. path: e,
  83739. count: a
  83740. });
  83741. if (s.length !== a)
  83742. return console.error("Invalid morphing: unmatched splitted path"), jE();
  83743. r = XO(r), s = XO(s);
  83744. for (var l = n.done, u = n.during, c = n.individualDelay, f = new As(), d = 0; d < a; d++) {
  83745. var h = r[d], p = s[d];
  83746. p.parent = e, p.copyTransform(f), c || gie(h, p);
  83747. }
  83748. e.__isCombineMorphing = !0, e.childrenRef = function() {
  83749. return s;
  83750. };
  83751. function v(O) {
  83752. for (var S = 0; S < s.length; S++)
  83753. s[S].addSelfToZr(O);
  83754. }
  83755. UO(e, "addSelfToZr", {
  83756. after: function(O) {
  83757. v(O);
  83758. }
  83759. }), UO(e, "removeSelfFromZr", {
  83760. after: function(O) {
  83761. for (var S = 0; S < s.length; S++)
  83762. s[S].removeSelfFromZr(O);
  83763. }
  83764. });
  83765. function g() {
  83766. e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, Ng(e, "addSelfToZr"), Ng(e, "removeSelfFromZr");
  83767. }
  83768. var m = s.length;
  83769. if (c)
  83770. for (var y = m, b = function() {
  83771. y--, y === 0 && (g(), l && l());
  83772. }, d = 0; d < m; d++) {
  83773. var _ = c ? Re({
  83774. delay: (n.delay || 0) + c(d, m, r[d], s[d]),
  83775. done: b
  83776. }, n) : n;
  83777. IL(r[d], s[d], _);
  83778. }
  83779. else
  83780. e.__morphT = 0, e.animateTo({
  83781. __morphT: 1
  83782. }, Re({
  83783. during: function(O) {
  83784. for (var S = 0; S < m; S++) {
  83785. var x = s[S];
  83786. x.__morphT = e.__morphT, x.dirtyShape();
  83787. }
  83788. u && u(O);
  83789. },
  83790. done: function() {
  83791. g();
  83792. for (var O = 0; O < t.length; O++)
  83793. Ng(t[O], "updateTransform");
  83794. l && l();
  83795. }
  83796. }, n));
  83797. return e.__zr && v(e.__zr), {
  83798. fromIndividuals: r,
  83799. toIndividuals: s,
  83800. count: m
  83801. };
  83802. }
  83803. function sZe(t, e, n) {
  83804. var r = e.length, i = [], a = n.dividePath || mie;
  83805. function o(h) {
  83806. for (var p = 0; p < h.length; p++) {
  83807. var v = h[p];
  83808. ZO(v) ? o(v.childrenRef()) : v instanceof ot && i.push(v);
  83809. }
  83810. }
  83811. if (ZO(t)) {
  83812. o(t.childrenRef());
  83813. var s = i.length;
  83814. if (s < r)
  83815. for (var l = 0, u = s; u < r; u++)
  83816. i.push(zR(i[l++ % s]));
  83817. i.length = r;
  83818. } else {
  83819. i = a({ path: t, count: r });
  83820. for (var c = t.getComputedTransform(), u = 0; u < i.length; u++)
  83821. i[u].setLocalTransform(c);
  83822. if (i.length !== r)
  83823. return console.error("Invalid morphing: unmatched splitted path"), jE();
  83824. }
  83825. i = XO(i), e = XO(e);
  83826. for (var f = n.individualDelay, u = 0; u < r; u++) {
  83827. var d = f ? Re({
  83828. delay: (n.delay || 0) + f(u, r, i[u], e[u])
  83829. }, n) : n;
  83830. IL(i[u], e[u], d);
  83831. }
  83832. return {
  83833. fromIndividuals: i,
  83834. toIndividuals: e,
  83835. count: e.length
  83836. };
  83837. }
  83838. function CQ(t) {
  83839. return ue(t[0]);
  83840. }
  83841. function TQ(t, e) {
  83842. for (var n = [], r = t.length, i = 0; i < r; i++)
  83843. n.push({
  83844. one: t[i],
  83845. many: []
  83846. });
  83847. for (var i = 0; i < e.length; i++) {
  83848. var a = e[i].length, o = void 0;
  83849. for (o = 0; o < a; o++)
  83850. n[o % r].many.push(e[i][o]);
  83851. }
  83852. for (var s = 0, i = r - 1; i >= 0; i--)
  83853. if (!n[i].many.length) {
  83854. var l = n[s].many;
  83855. if (l.length <= 1)
  83856. if (s)
  83857. s = 0;
  83858. else
  83859. return n;
  83860. var a = l.length, u = Math.ceil(a / 2);
  83861. n[i].many = l.slice(u, a), n[s].many = l.slice(0, u), s++;
  83862. }
  83863. return n;
  83864. }
  83865. var lZe = {
  83866. clone: function(t) {
  83867. for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), r = 0; r < t.count; r++) {
  83868. var i = zR(t.path);
  83869. i.setStyle("opacity", n), e.push(i);
  83870. }
  83871. return e;
  83872. },
  83873. // Use the default divider
  83874. split: null
  83875. };
  83876. function s$(t, e, n, r, i, a) {
  83877. if (!t.length || !e.length)
  83878. return;
  83879. var o = pp("update", r, i);
  83880. if (!(o && o.duration > 0))
  83881. return;
  83882. var s = r.getModel("universalTransition").get("delay"), l = Object.assign({
  83883. // Need to setToFinal so the further calculation based on the style can be correct.
  83884. // Like emphasis color.
  83885. setToFinal: !0
  83886. }, o), u, c;
  83887. CQ(t) && (u = t, c = e), CQ(e) && (u = e, c = t);
  83888. function f(m, y, b, _, O) {
  83889. var S = m.many, x = m.one;
  83890. if (S.length === 1 && !O) {
  83891. var C = y ? S[0] : x, T = y ? x : S[0];
  83892. if (ZO(C))
  83893. f({
  83894. many: [C],
  83895. one: T
  83896. }, !0, b, _, !0);
  83897. else {
  83898. var w = s ? Re({
  83899. delay: s(b, _)
  83900. }, l) : l;
  83901. IL(C, T, w), a(C, T, C, T, w);
  83902. }
  83903. } else
  83904. for (var P = Re({
  83905. dividePath: lZe[n],
  83906. individualDelay: s && function(N, V, z, W) {
  83907. return s(N + b, _);
  83908. }
  83909. }, l), $ = y ? oZe(S, x, P) : sZe(x, S, P), A = $.fromIndividuals, D = $.toIndividuals, E = A.length, R = 0; R < E; R++) {
  83910. var w = s ? Re({
  83911. delay: s(R, E)
  83912. }, l) : l;
  83913. a(A[R], D[R], y ? S[R] : m.one, y ? m.one : S[R], w);
  83914. }
  83915. }
  83916. for (var d = u ? u === t : t.length > e.length, h = u ? TQ(c, u) : TQ(d ? e : t, [d ? t : e]), p = 0, v = 0; v < h.length; v++)
  83917. p += h[v].many.length;
  83918. for (var g = 0, v = 0; v < h.length; v++)
  83919. f(h[v], d, g, p), g += h[v].many.length;
  83920. }
  83921. function mc(t) {
  83922. if (!t)
  83923. return [];
  83924. if (ue(t)) {
  83925. for (var e = [], n = 0; n < t.length; n++)
  83926. e.push(mc(t[n]));
  83927. return e;
  83928. }
  83929. var r = [];
  83930. return t.traverse(function(i) {
  83931. i instanceof ot && !i.disableMorphing && !i.invisible && !i.ignore && r.push(i);
  83932. }), r;
  83933. }
  83934. var yie = 1e4, uZe = 0, PQ = 1, $Q = 2, cZe = bt();
  83935. function fZe(t, e) {
  83936. for (var n = t.dimensions, r = 0; r < n.length; r++) {
  83937. var i = t.getDimensionInfo(n[r]);
  83938. if (i && i.otherDims[e] === 0)
  83939. return n[r];
  83940. }
  83941. }
  83942. function dZe(t, e, n) {
  83943. var r = t.getDimensionInfo(n), i = r && r.ordinalMeta;
  83944. if (r) {
  83945. var a = t.get(r.name, e);
  83946. return i && i.categories[a] || a + "";
  83947. }
  83948. }
  83949. function AQ(t, e, n, r) {
  83950. var i = r ? "itemChildGroupId" : "itemGroupId", a = fZe(t, i);
  83951. if (a) {
  83952. var o = dZe(t, e, a);
  83953. return o;
  83954. }
  83955. var s = t.getRawDataItem(e), l = r ? "childGroupId" : "groupId";
  83956. if (s && s[l])
  83957. return s[l] + "";
  83958. if (!r)
  83959. return n || t.getId(e);
  83960. }
  83961. function EQ(t) {
  83962. var e = [];
  83963. return k(t, function(n) {
  83964. var r = n.data, i = n.dataGroupId;
  83965. if (r.count() > yie) {
  83966. process.env.NODE_ENV !== "production" && dn("Universal transition is disabled on large data > 10k.");
  83967. return;
  83968. }
  83969. for (var a = r.getIndices(), o = 0; o < a.length; o++)
  83970. e.push({
  83971. data: r,
  83972. groupId: AQ(r, o, i, !1),
  83973. childGroupId: AQ(r, o, i, !0),
  83974. divide: n.divide,
  83975. dataIndex: o
  83976. });
  83977. }), e;
  83978. }
  83979. function l$(t, e, n) {
  83980. t.traverse(function(r) {
  83981. r instanceof ot && Yt(r, {
  83982. style: {
  83983. opacity: 0
  83984. }
  83985. }, e, {
  83986. dataIndex: n,
  83987. isFrom: !0
  83988. });
  83989. });
  83990. }
  83991. function u$(t) {
  83992. if (t.parent) {
  83993. var e = t.getComputedTransform();
  83994. t.setLocalTransform(e), t.parent.remove(t);
  83995. }
  83996. }
  83997. function Sd(t) {
  83998. t.stopAnimation(), t.isGroup && t.traverse(function(e) {
  83999. e.stopAnimation();
  84000. });
  84001. }
  84002. function hZe(t, e, n) {
  84003. var r = pp("update", n, e);
  84004. r && t.traverse(function(i) {
  84005. if (i instanceof Ma) {
  84006. var a = Wke(i);
  84007. a && i.animateFrom({
  84008. style: a
  84009. }, r);
  84010. }
  84011. });
  84012. }
  84013. function pZe(t, e) {
  84014. var n = t.length;
  84015. if (n !== e.length)
  84016. return !1;
  84017. for (var r = 0; r < n; r++) {
  84018. var i = t[r], a = e[r];
  84019. if (i.data.getId(i.dataIndex) !== a.data.getId(a.dataIndex))
  84020. return !1;
  84021. }
  84022. return !0;
  84023. }
  84024. function bie(t, e, n) {
  84025. var r = EQ(t), i = EQ(e);
  84026. function a(b, _, O, S, x) {
  84027. (O || b) && _.animateFrom({
  84028. style: O && O !== b ? le(le({}, O.style), b.style) : b.style
  84029. }, x);
  84030. }
  84031. var o = !1, s = uZe, l = Pe(), u = Pe();
  84032. r.forEach(function(b) {
  84033. b.groupId && l.set(b.groupId, !0), b.childGroupId && u.set(b.childGroupId, !0);
  84034. });
  84035. for (var c = 0; c < i.length; c++) {
  84036. var f = i[c].groupId;
  84037. if (u.get(f)) {
  84038. s = PQ;
  84039. break;
  84040. }
  84041. var d = i[c].childGroupId;
  84042. if (d && l.get(d)) {
  84043. s = $Q;
  84044. break;
  84045. }
  84046. }
  84047. function h(b, _) {
  84048. return function(O) {
  84049. var S = O.data, x = O.dataIndex;
  84050. return _ ? S.getId(x) : b ? s === PQ ? O.childGroupId : O.groupId : s === $Q ? O.childGroupId : O.groupId;
  84051. };
  84052. }
  84053. var p = pZe(r, i), v = {};
  84054. if (!p)
  84055. for (var c = 0; c < i.length; c++) {
  84056. var g = i[c], m = g.data.getItemGraphicEl(g.dataIndex);
  84057. m && (v[m.id] = !0);
  84058. }
  84059. function y(b, _) {
  84060. var O = r[_], S = i[b], x = S.data.hostModel, C = O.data.getItemGraphicEl(O.dataIndex), T = S.data.getItemGraphicEl(S.dataIndex);
  84061. if (C === T) {
  84062. T && hZe(T, S.dataIndex, x);
  84063. return;
  84064. }
  84065. // We can't use the elements that already being morphed
  84066. C && v[C.id] || T && (Sd(T), C ? (Sd(C), u$(C), o = !0, s$(mc(C), mc(T), S.divide, x, b, a)) : l$(T, x, b));
  84067. }
  84068. new Us(r, i, h(!0, p), h(!1, p), null, "multiple").update(y).updateManyToOne(function(b, _) {
  84069. var O = i[b], S = O.data, x = S.hostModel, C = S.getItemGraphicEl(O.dataIndex), T = Nt(ce(_, function(w) {
  84070. return r[w].data.getItemGraphicEl(r[w].dataIndex);
  84071. }), function(w) {
  84072. return w && w !== C && !v[w.id];
  84073. });
  84074. C && (Sd(C), T.length ? (k(T, function(w) {
  84075. Sd(w), u$(w);
  84076. }), o = !0, s$(mc(T), mc(C), O.divide, x, b, a)) : l$(C, x, O.dataIndex));
  84077. }).updateOneToMany(function(b, _) {
  84078. var O = r[_], S = O.data.getItemGraphicEl(O.dataIndex);
  84079. if (!(S && v[S.id])) {
  84080. var x = Nt(ce(b, function(T) {
  84081. return i[T].data.getItemGraphicEl(i[T].dataIndex);
  84082. }), function(T) {
  84083. return T && T !== S;
  84084. }), C = i[b[0]].data.hostModel;
  84085. x.length && (k(x, function(T) {
  84086. return Sd(T);
  84087. }), S ? (Sd(S), u$(S), o = !0, s$(
  84088. mc(S),
  84089. mc(x),
  84090. O.divide,
  84091. // Use divide on old.
  84092. C,
  84093. b[0],
  84094. a
  84095. )) : k(x, function(T) {
  84096. return l$(T, C, b[0]);
  84097. }));
  84098. }
  84099. }).updateManyToMany(function(b, _) {
  84100. new Us(_, b, function(O) {
  84101. return r[O].data.getId(r[O].dataIndex);
  84102. }, function(O) {
  84103. return i[O].data.getId(i[O].dataIndex);
  84104. }).update(function(O, S) {
  84105. y(b[O], _[S]);
  84106. }).execute();
  84107. }).execute(), o && k(e, function(b) {
  84108. var _ = b.data, O = _.hostModel, S = O && n.getViewOfSeriesModel(O), x = pp("update", O, 0);
  84109. S && O.isAnimationEnabled() && x && x.duration > 0 && S.group.traverse(function(C) {
  84110. C instanceof ot && !C.animators.length && C.animateFrom({
  84111. style: {
  84112. opacity: 0
  84113. }
  84114. }, x);
  84115. });
  84116. });
  84117. }
  84118. function MQ(t) {
  84119. var e = t.getModel("universalTransition").get("seriesKey");
  84120. return e || t.id;
  84121. }
  84122. function IQ(t) {
  84123. return ue(t) ? t.sort().join(",") : t;
  84124. }
  84125. function Cl(t) {
  84126. if (t.hostModel)
  84127. return t.hostModel.getModel("universalTransition").get("divideShape");
  84128. }
  84129. function vZe(t, e) {
  84130. var n = Pe(), r = Pe(), i = Pe();
  84131. k(t.oldSeries, function(o, s) {
  84132. var l = t.oldDataGroupIds[s], u = t.oldData[s], c = MQ(o), f = IQ(c);
  84133. r.set(f, {
  84134. dataGroupId: l,
  84135. data: u
  84136. }), ue(c) && k(c, function(d) {
  84137. i.set(d, {
  84138. key: f,
  84139. dataGroupId: l,
  84140. data: u
  84141. });
  84142. });
  84143. });
  84144. function a(o) {
  84145. n.get(o) && dn("Duplicated seriesKey in universalTransition " + o);
  84146. }
  84147. return k(e.updatedSeries, function(o) {
  84148. if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
  84149. var s = o.get("dataGroupId"), l = o.getData(), u = MQ(o), c = IQ(u), f = r.get(c);
  84150. if (f)
  84151. process.env.NODE_ENV !== "production" && a(c), n.set(c, {
  84152. oldSeries: [{
  84153. dataGroupId: f.dataGroupId,
  84154. divide: Cl(f.data),
  84155. data: f.data
  84156. }],
  84157. newSeries: [{
  84158. dataGroupId: s,
  84159. divide: Cl(l),
  84160. data: l
  84161. }]
  84162. });
  84163. else if (ue(u)) {
  84164. process.env.NODE_ENV !== "production" && a(c);
  84165. var d = [];
  84166. k(u, function(v) {
  84167. var g = r.get(v);
  84168. g.data && d.push({
  84169. dataGroupId: g.dataGroupId,
  84170. divide: Cl(g.data),
  84171. data: g.data
  84172. });
  84173. }), d.length && n.set(c, {
  84174. oldSeries: d,
  84175. newSeries: [{
  84176. dataGroupId: s,
  84177. data: l,
  84178. divide: Cl(l)
  84179. }]
  84180. });
  84181. } else {
  84182. var h = i.get(u);
  84183. if (h) {
  84184. var p = n.get(h.key);
  84185. p || (p = {
  84186. oldSeries: [{
  84187. dataGroupId: h.dataGroupId,
  84188. data: h.data,
  84189. divide: Cl(h.data)
  84190. }],
  84191. newSeries: []
  84192. }, n.set(h.key, p)), p.newSeries.push({
  84193. dataGroupId: s,
  84194. data: l,
  84195. divide: Cl(l)
  84196. });
  84197. }
  84198. }
  84199. }
  84200. }), n;
  84201. }
  84202. function DQ(t, e) {
  84203. for (var n = 0; n < t.length; n++) {
  84204. var r = e.seriesIndex != null && e.seriesIndex === t[n].seriesIndex || e.seriesId != null && e.seriesId === t[n].id;
  84205. if (r)
  84206. return n;
  84207. }
  84208. }
  84209. function gZe(t, e, n, r) {
  84210. var i = [], a = [];
  84211. k(Qt(t.from), function(o) {
  84212. var s = DQ(e.oldSeries, o);
  84213. s >= 0 && i.push({
  84214. dataGroupId: e.oldDataGroupIds[s],
  84215. data: e.oldData[s],
  84216. // TODO can specify divideShape in transition.
  84217. divide: Cl(e.oldData[s]),
  84218. groupIdDim: o.dimension
  84219. });
  84220. }), k(Qt(t.to), function(o) {
  84221. var s = DQ(n.updatedSeries, o);
  84222. if (s >= 0) {
  84223. var l = n.updatedSeries[s].getData();
  84224. a.push({
  84225. dataGroupId: e.oldDataGroupIds[s],
  84226. data: l,
  84227. divide: Cl(l),
  84228. groupIdDim: o.dimension
  84229. });
  84230. }
  84231. }), i.length > 0 && a.length > 0 && bie(i, a, r);
  84232. }
  84233. function mZe(t) {
  84234. t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
  84235. k(Qt(r.seriesTransition), function(i) {
  84236. k(Qt(i.to), function(a) {
  84237. for (var o = r.updatedSeries, s = 0; s < o.length; s++)
  84238. (a.seriesIndex != null && a.seriesIndex === o[s].seriesIndex || a.seriesId != null && a.seriesId === o[s].id) && (o[s][G_] = !0);
  84239. });
  84240. });
  84241. }), t.registerUpdateLifecycle("series:transition", function(e, n, r) {
  84242. var i = cZe(n);
  84243. if (i.oldSeries && r.updatedSeries && r.optionChanged) {
  84244. var a = r.seriesTransition;
  84245. if (a)
  84246. k(Qt(a), function(h) {
  84247. gZe(h, i, r, n);
  84248. });
  84249. else {
  84250. var o = vZe(i, r);
  84251. k(o.keys(), function(h) {
  84252. var p = o.get(h);
  84253. bie(p.oldSeries, p.newSeries, n);
  84254. });
  84255. }
  84256. k(r.updatedSeries, function(h) {
  84257. h[G_] && (h[G_] = !1);
  84258. });
  84259. }
  84260. for (var s = e.getSeries(), l = i.oldSeries = [], u = i.oldDataGroupIds = [], c = i.oldData = [], f = 0; f < s.length; f++) {
  84261. var d = s[f].getData();
  84262. d.count() < yie && (l.push(s[f]), u.push(s[f].get("dataGroupId")), c.push(d));
  84263. }
  84264. });
  84265. }
  84266. at([P3e]);
  84267. at([S3e]);
  84268. at([Z3e, l6e, y6e, q6e, lBe, UBe, Sze, aVe, PVe, DVe, WVe, LFe, sWe, yWe, RWe, BWe, UWe, t7e, d7e, y7e, $7e, cQe]);
  84269. at(AQe);
  84270. at(nHe);
  84271. at(gne);
  84272. at(vHe);
  84273. at(tre);
  84274. at(bHe);
  84275. at($He);
  84276. at(v9e);
  84277. at(R9e);
  84278. at(ey);
  84279. at(q9e);
  84280. at(eGe);
  84281. at(cGe);
  84282. at(mGe);
  84283. at(xGe);
  84284. at(AGe);
  84285. at(zGe);
  84286. at(rje);
  84287. at(aie);
  84288. at(oie);
  84289. at(xje);
  84290. at(fie);
  84291. at(die);
  84292. at($je);
  84293. at(Fje);
  84294. at(Hje);
  84295. at(mZe);
  84296. at(W5e);
  84297. const yZe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  84298. __proto__: null,
  84299. Axis: Ba,
  84300. ChartView: zt,
  84301. ComponentModel: rt,
  84302. ComponentView: Xt,
  84303. List: Lr,
  84304. Model: Wt,
  84305. PRIORITY: wee,
  84306. SeriesModel: Ht,
  84307. color: KIe,
  84308. connect: U8e,
  84309. dataTool: tNe,
  84310. dependencies: M8e,
  84311. disConnect: X8e,
  84312. disconnect: Dee,
  84313. dispose: Y8e,
  84314. env: vt,
  84315. extendChartView: A5e,
  84316. extendComponentModel: T5e,
  84317. extendComponentView: P5e,
  84318. extendSeriesModel: $5e,
  84319. format: p5e,
  84320. getCoordinateSystemDimensions: K8e,
  84321. getInstanceByDom: gk,
  84322. getInstanceById: q8e,
  84323. getMap: eNe,
  84324. graphic: h5e,
  84325. helper: a5e,
  84326. init: Iee,
  84327. innerDrawElementOnCanvas: dk,
  84328. matrix: AIe,
  84329. number: f5e,
  84330. parseGeoJSON: iE,
  84331. parseGeoJson: iE,
  84332. registerAction: vo,
  84333. registerCoordinateSystem: Lee,
  84334. registerLayout: Nee,
  84335. registerLoading: Ok,
  84336. registerLocale: UR,
  84337. registerMap: Bee,
  84338. registerPostInit: Ree,
  84339. registerPostUpdate: kee,
  84340. registerPreprocessor: yk,
  84341. registerProcessor: bk,
  84342. registerTheme: mk,
  84343. registerTransform: zee,
  84344. registerUpdateLifecycle: fw,
  84345. registerVisual: $u,
  84346. setCanvasCreator: J8e,
  84347. setPlatformAPI: Oq,
  84348. throttle: uw,
  84349. time: d5e,
  84350. use: at,
  84351. util: v5e,
  84352. vector: vIe,
  84353. version: E8e,
  84354. zrUtil: lIe,
  84355. zrender: RDe
  84356. }, Symbol.toStringTag, { value: "Module" }));
  84357. function bZe(t) {
  84358. return jG() ? (f0(t), !0) : !1;
  84359. }
  84360. function YO(t) {
  84361. return typeof t == "function" ? t() : B(t);
  84362. }
  84363. const _Ze = typeof window < "u" && typeof document < "u";
  84364. typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
  84365. const OZe = Object.prototype.toString, SZe = (t) => OZe.call(t) === "[object Object]", ZE = () => {
  84366. };
  84367. function xZe(t, e) {
  84368. function n(...r) {
  84369. return new Promise((i, a) => {
  84370. Promise.resolve(t(() => e.apply(this, r), { fn: e, thisArg: this, args: r })).then(i).catch(a);
  84371. });
  84372. }
  84373. return n;
  84374. }
  84375. function wZe(t, e = {}) {
  84376. let n, r, i = ZE;
  84377. const a = (s) => {
  84378. clearTimeout(s), i(), i = ZE;
  84379. };
  84380. return (s) => {
  84381. const l = YO(t), u = YO(e.maxWait);
  84382. return n && a(n), l <= 0 || u !== void 0 && u <= 0 ? (r && (a(r), r = null), Promise.resolve(s())) : new Promise((c, f) => {
  84383. i = e.rejectOnCancel ? f : c, u && !r && (r = setTimeout(() => {
  84384. n && a(n), r = null, c(s());
  84385. }, u)), n = setTimeout(() => {
  84386. r && a(r), r = null, c(s());
  84387. }, l);
  84388. });
  84389. };
  84390. }
  84391. function CZe(t) {
  84392. return vn();
  84393. }
  84394. function TZe(t, e = 200, n = {}) {
  84395. return xZe(
  84396. wZe(e, n),
  84397. t
  84398. );
  84399. }
  84400. function PZe(t, e) {
  84401. CZe() && nl(t, e);
  84402. }
  84403. function $Ze(t) {
  84404. var e;
  84405. const n = YO(t);
  84406. return (e = n == null ? void 0 : n.$el) != null ? e : n;
  84407. }
  84408. const AZe = _Ze ? window : void 0;
  84409. function EZe(...t) {
  84410. let e, n, r, i;
  84411. if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, r, i] = t, e = AZe) : [e, n, r, i] = t, !e)
  84412. return ZE;
  84413. Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  84414. const a = [], o = () => {
  84415. a.forEach((c) => c()), a.length = 0;
  84416. }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(
  84417. () => [$Ze(e), YO(i)],
  84418. ([c, f]) => {
  84419. if (o(), !c)
  84420. return;
  84421. const d = SZe(f) ? { ...f } : f;
  84422. a.push(
  84423. ...n.flatMap((h) => r.map((p) => s(c, h, p, d)))
  84424. );
  84425. },
  84426. { immediate: !0, flush: "post" }
  84427. ), u = () => {
  84428. l(), o();
  84429. };
  84430. return bZe(u), u;
  84431. }
  84432. function MZe(t, e = "default") {
  84433. let n = null, r = s;
  84434. const i = U({});
  84435. let a;
  84436. const o = L(() => i.value);
  84437. r = TZe(s, 200);
  84438. function s() {
  84439. n == null || n.resize({
  84440. animation: {
  84441. duration: 300,
  84442. easing: "quadraticIn"
  84443. }
  84444. });
  84445. }
  84446. function l(f = e) {
  84447. const d = B(t);
  84448. if (!d || !B(d))
  84449. return;
  84450. n = Iee(d, f), a = EZe(window, "resize", r);
  84451. }
  84452. function u(f, d = !1) {
  84453. return i.value = f, new Promise((h) => {
  84454. var p;
  84455. ((p = B(t)) == null ? void 0 : p.offsetHeight) === 0 && setTimeout(() => {
  84456. u(B(o)), h(null);
  84457. }, 30), Tt(() => {
  84458. setTimeout(() => {
  84459. !n && (l("default"), !n) || (d && (n == null || n.clear()), n == null || n.setOption(B(o)), h(null));
  84460. }, 30);
  84461. });
  84462. });
  84463. }
  84464. se(
  84465. () => e,
  84466. (f) => {
  84467. n && (n.dispose(), l(f), u(i.value));
  84468. }
  84469. ), PZe(() => {
  84470. n && (a(), n.dispose(), n = null);
  84471. });
  84472. function c() {
  84473. return n || l("default"), n;
  84474. }
  84475. return {
  84476. setOptions: u,
  84477. resize: s,
  84478. echarts: yZe,
  84479. getInstance: c
  84480. };
  84481. }
  84482. const DL = /* @__PURE__ */ te({
  84483. __name: "Charts",
  84484. props: {
  84485. echartsOptions: {},
  84486. width: {},
  84487. height: {},
  84488. loading: { type: Boolean }
  84489. },
  84490. setup(t) {
  84491. const e = t, n = U(null), { setOptions: r, resize: i } = MZe(n), a = jg(ts, {
  84492. style: {
  84493. fontSize: "24px"
  84494. }
  84495. });
  84496. return se(
  84497. () => [e.width, e.height],
  84498. Bbe(async () => {
  84499. i();
  84500. }, 200)
  84501. ), se(
  84502. () => e,
  84503. async () => {
  84504. await Tt();
  84505. const { echartsOptions: o } = e;
  84506. r(o);
  84507. },
  84508. {
  84509. immediate: !0,
  84510. deep: !0
  84511. }
  84512. ), (o, s) => (pe(), je(B(gg), {
  84513. spinning: o.loading,
  84514. indicator: B(a)
  84515. }, {
  84516. default: we(() => [
  84517. He("div", {
  84518. ref_key: "chartRef",
  84519. ref: n,
  84520. style: Sr({ width: o.width + "px", height: o.height + "px" })
  84521. }, null, 4)
  84522. ]),
  84523. _: 1
  84524. }, 8, ["spinning", "indicator"]));
  84525. }
  84526. });
  84527. function RL(t) {
  84528. return SU(t, xMe);
  84529. }
  84530. const kL = {
  84531. type: Object,
  84532. default: () => ({
  84533. sourceType: Ri.STATIC,
  84534. data: [],
  84535. url: "",
  84536. method: "GET",
  84537. params: {},
  84538. headers: {},
  84539. refreshTime: 0,
  84540. dataProcess: () => []
  84541. })
  84542. }, IZe = (t, e) => new Promise((n, r) => {
  84543. const i = new Blob([`
  84544. self.onmessage = function(e) {
  84545. self.postMessage((${t}).call(null, e.data));
  84546. }
  84547. `], { type: "application/javascript" }), a = new Worker(URL.createObjectURL(i));
  84548. a.postMessage(JSON.parse(e)), a.onmessage = (o) => {
  84549. a.terminate(), n(o.data);
  84550. }, a.onerror = (o) => {
  84551. a.terminate(), r(o);
  84552. };
  84553. }), LL = {
  84554. width: {
  84555. type: Number,
  84556. default: 400
  84557. },
  84558. height: {
  84559. type: Number,
  84560. default: 260
  84561. },
  84562. dataSource: kL,
  84563. // 标题
  84564. title: {
  84565. type: Object
  84566. },
  84567. // 图例
  84568. legend: {
  84569. type: Object
  84570. },
  84571. // 背景
  84572. backgroundColor: {
  84573. type: String
  84574. },
  84575. // 边框
  84576. grid: {
  84577. type: Object
  84578. },
  84579. // 提示框
  84580. tooltip: {
  84581. type: Object
  84582. },
  84583. // x轴数据
  84584. xAxis: {
  84585. type: Object
  84586. },
  84587. // y轴数据
  84588. yAxis: {
  84589. type: Object
  84590. },
  84591. // 折线
  84592. series: {
  84593. type: Array
  84594. },
  84595. // 数据集
  84596. dataset: {
  84597. type: Object
  84598. }
  84599. }, _ie = [];
  84600. _ie.line = {
  84601. lineStyle: {
  84602. type: "solid",
  84603. width: 1
  84604. },
  84605. symbol: "rect",
  84606. symbolSize: 4,
  84607. symbolRotate: 0,
  84608. smooth: !1,
  84609. step: !1
  84610. };
  84611. const DZe = RL({
  84612. title: {
  84613. text: "折线图标题"
  84614. },
  84615. xAxis: {
  84616. data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  84617. },
  84618. series: _ie
  84619. }), RZe = {
  84620. container: {
  84621. props: {
  84622. width: 400,
  84623. height: 260
  84624. }
  84625. },
  84626. props: {
  84627. // 数据源
  84628. dataSource: {
  84629. sourceType: Ri.STATIC,
  84630. data: {
  84631. xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
  84632. series: [
  84633. {
  84634. type: "line",
  84635. name: "系列1",
  84636. data: [89.3, 92.1, 94.4, 85.4]
  84637. },
  84638. {
  84639. type: "line",
  84640. name: "系列2",
  84641. data: [95.8, 89.4, 91.2, 76.9]
  84642. }
  84643. ]
  84644. },
  84645. url: location.origin + "/mock/api/get/example/line",
  84646. method: "POST",
  84647. params: {},
  84648. headers: {},
  84649. refreshTime: 0,
  84650. dataProcess: `
  84651. (res) => {
  84652. // 取出列表
  84653. const data = res.data;
  84654. // x轴数据
  84655. const xData = data.map((item) => item.name);
  84656. // 系列数据
  84657. const series = [
  84658. { type: 'line', name: '苹果', data: data.map(item => item.apple) },
  84659. { type: 'line', name: 'VIVO', data: data.map(item => item.vivo) },
  84660. { type: 'line', name: '小米', data: data.map(item => item.mi) },
  84661. ];
  84662. // 返回图表数据
  84663. return { xData, series };
  84664. }
  84665. `
  84666. },
  84667. ...DZe
  84668. }
  84669. }, Oie = (t, { manual: e, ready: n = !0, refreshDeps: r = [], refreshDepsAction: i }) => {
  84670. const a = U(!1);
  84671. return ht(() => {
  84672. !e && t.options.refreshDeps !== !0 && (a.value = B(n));
  84673. }), r instanceof Array ? se(
  84674. [a, ...r],
  84675. ([o]) => {
  84676. o && !e && o && (i ? i() : t.refresh());
  84677. },
  84678. {
  84679. deep: !0,
  84680. immediate: !1
  84681. }
  84682. ) : se(a, (o) => {
  84683. !e && o && (i ? i() : t.refresh());
  84684. }), {
  84685. name: "autoRunPlugin",
  84686. onBefore: () => {
  84687. if (!B(n))
  84688. return {
  84689. stopNow: !0
  84690. };
  84691. }
  84692. };
  84693. };
  84694. Oie.onInit = ({ ready: t = !0, manual: e }) => ({
  84695. loading: !e && B(t)
  84696. });
  84697. const J_ = /* @__PURE__ */ new Map(), kZe = (t, e, n) => {
  84698. const r = J_.get(t);
  84699. r != null && r.timer && clearTimeout(r.timer);
  84700. let i;
  84701. e > -1 && (i = setTimeout(() => {
  84702. J_.delete(t);
  84703. }, e)), J_.set(t, {
  84704. ...n,
  84705. timer: i
  84706. });
  84707. }, LZe = (t) => J_.get(t), e1 = /* @__PURE__ */ new Map(), NZe = (t) => e1.get(t), BZe = (t, e) => {
  84708. e1.set(t, e), e.then((n) => (e1.delete(t), n)).catch((n) => {
  84709. throw e1.delete(t), n;
  84710. });
  84711. }, Tc = {}, zZe = [], VZe = (t, e) => {
  84712. Tc[t] && (Tc[t].forEach((n) => n(e)), zZe.forEach((n) => n({
  84713. type: t,
  84714. data: e
  84715. })));
  84716. }, c$ = (t, e) => (Tc[t] || (Tc[t] = []), Tc[t].push(e), function() {
  84717. const r = Tc[t].indexOf(e);
  84718. Tc[t].splice(r, 1);
  84719. }), FZe = (t, {
  84720. cacheKey: e,
  84721. cacheTime: n = 5 * 60 * 1e3,
  84722. staleTime: r = 0,
  84723. setCache: i,
  84724. getCache: a
  84725. }) => {
  84726. const o = U(), s = U(), l = (c, f) => {
  84727. i ? i(f) : kZe(c, n, f), VZe(c, f.data);
  84728. }, u = (c, f = []) => a ? a(f) : LZe(c);
  84729. return ht(() => {
  84730. if (!e)
  84731. return;
  84732. const c = u(e);
  84733. c && Object.hasOwnProperty.call(c, "data") && (t.state.data = c.data, t.state.params = c.params, (r === -1 || (/* @__PURE__ */ new Date()).getTime() - c.time <= r) && (t.state.loading = !1)), o.value = c$(e, (f) => {
  84734. t.setState({ data: f });
  84735. });
  84736. }), f0(() => {
  84737. var c;
  84738. (c = o.value) == null || c.call(o);
  84739. }), e ? {
  84740. name: "cachePlugin",
  84741. onBefore: (c) => {
  84742. const f = u(e, c);
  84743. return !f || !Object.hasOwnProperty.call(f, "data") ? {} : r === -1 || (/* @__PURE__ */ new Date()).getTime() - f.time <= r ? {
  84744. loading: !1,
  84745. data: f == null ? void 0 : f.data,
  84746. returnNow: !0
  84747. } : {
  84748. data: f == null ? void 0 : f.data
  84749. };
  84750. },
  84751. onRequest: (c, f) => {
  84752. let d = NZe(e);
  84753. return d && d !== s.value ? { servicePromise: d } : (d = c(...f), s.value = d, BZe(e, d), { servicePromise: d });
  84754. },
  84755. onSuccess: (c, f) => {
  84756. var d;
  84757. e && ((d = o.value) == null || d.call(o), l(e, {
  84758. data: c,
  84759. params: f,
  84760. time: (/* @__PURE__ */ new Date()).getTime()
  84761. }), o.value = c$(e, (h) => {
  84762. t.setState({ data: h });
  84763. }));
  84764. },
  84765. onMutate: (c) => {
  84766. var f;
  84767. e && ((f = o.value) == null || f.call(o), l(e, {
  84768. data: c,
  84769. params: t.state.params,
  84770. time: (/* @__PURE__ */ new Date()).getTime()
  84771. }), o.value = c$(e, (d) => {
  84772. t.setState({ data: d });
  84773. }));
  84774. }
  84775. } : {};
  84776. };
  84777. function WZe(t) {
  84778. var e = typeof t;
  84779. return t != null && (e == "object" || e == "function");
  84780. }
  84781. var go = WZe, QZe = typeof Iy == "object" && Iy && Iy.Object === Object && Iy, Sie = QZe, HZe = Sie, GZe = typeof self == "object" && self && self.Object === Object && self, jZe = HZe || GZe || Function("return this")(), mo = jZe, ZZe = mo, UZe = function() {
  84782. return ZZe.Date.now();
  84783. }, XZe = UZe, YZe = /\s/;
  84784. function qZe(t) {
  84785. for (var e = t.length; e-- && YZe.test(t.charAt(e)); )
  84786. ;
  84787. return e;
  84788. }
  84789. var KZe = qZe, JZe = KZe, eUe = /^\s+/;
  84790. function tUe(t) {
  84791. return t && t.slice(0, JZe(t) + 1).replace(eUe, "");
  84792. }
  84793. var nUe = tUe, rUe = mo, iUe = rUe.Symbol, ww = iUe, RQ = ww, xie = Object.prototype, aUe = xie.hasOwnProperty, oUe = xie.toString, Tv = RQ ? RQ.toStringTag : void 0;
  84794. function sUe(t) {
  84795. var e = aUe.call(t, Tv), n = t[Tv];
  84796. try {
  84797. t[Tv] = void 0;
  84798. var r = !0;
  84799. } catch {
  84800. }
  84801. var i = oUe.call(t);
  84802. return r && (e ? t[Tv] = n : delete t[Tv]), i;
  84803. }
  84804. var lUe = sUe, uUe = Object.prototype, cUe = uUe.toString;
  84805. function fUe(t) {
  84806. return cUe.call(t);
  84807. }
  84808. var dUe = fUe, kQ = ww, hUe = lUe, pUe = dUe, vUe = "[object Null]", gUe = "[object Undefined]", LQ = kQ ? kQ.toStringTag : void 0;
  84809. function mUe(t) {
  84810. return t == null ? t === void 0 ? gUe : vUe : LQ && LQ in Object(t) ? hUe(t) : pUe(t);
  84811. }
  84812. var $p = mUe;
  84813. function yUe(t) {
  84814. return t != null && typeof t == "object";
  84815. }
  84816. var Au = yUe, bUe = $p, _Ue = Au, OUe = "[object Symbol]";
  84817. function SUe(t) {
  84818. return typeof t == "symbol" || _Ue(t) && bUe(t) == OUe;
  84819. }
  84820. var xUe = SUe, wUe = nUe, NQ = go, CUe = xUe, BQ = NaN, TUe = /^[-+]0x[0-9a-f]+$/i, PUe = /^0b[01]+$/i, $Ue = /^0o[0-7]+$/i, AUe = parseInt;
  84821. function EUe(t) {
  84822. if (typeof t == "number")
  84823. return t;
  84824. if (CUe(t))
  84825. return BQ;
  84826. if (NQ(t)) {
  84827. var e = typeof t.valueOf == "function" ? t.valueOf() : t;
  84828. t = NQ(e) ? e + "" : e;
  84829. }
  84830. if (typeof t != "string")
  84831. return t === 0 ? t : +t;
  84832. t = wUe(t);
  84833. var n = PUe.test(t);
  84834. return n || $Ue.test(t) ? AUe(t.slice(2), n ? 2 : 8) : TUe.test(t) ? BQ : +t;
  84835. }
  84836. var MUe = EUe, IUe = go, f$ = XZe, zQ = MUe, DUe = "Expected a function", RUe = Math.max, kUe = Math.min;
  84837. function LUe(t, e, n) {
  84838. var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  84839. if (typeof t != "function")
  84840. throw new TypeError(DUe);
  84841. e = zQ(e) || 0, IUe(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? RUe(zQ(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  84842. function h(S) {
  84843. var x = r, C = i;
  84844. return r = i = void 0, u = S, o = t.apply(C, x), o;
  84845. }
  84846. function p(S) {
  84847. return u = S, s = setTimeout(m, e), c ? h(S) : o;
  84848. }
  84849. function v(S) {
  84850. var x = S - l, C = S - u, T = e - x;
  84851. return f ? kUe(T, a - C) : T;
  84852. }
  84853. function g(S) {
  84854. var x = S - l, C = S - u;
  84855. return l === void 0 || x >= e || x < 0 || f && C >= a;
  84856. }
  84857. function m() {
  84858. var S = f$();
  84859. if (g(S))
  84860. return y(S);
  84861. s = setTimeout(m, v(S));
  84862. }
  84863. function y(S) {
  84864. return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  84865. }
  84866. function b() {
  84867. s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  84868. }
  84869. function _() {
  84870. return s === void 0 ? o : y(f$());
  84871. }
  84872. function O() {
  84873. var S = f$(), x = g(S);
  84874. if (r = arguments, i = this, l = S, x) {
  84875. if (s === void 0)
  84876. return p(l);
  84877. if (f)
  84878. return clearTimeout(s), s = setTimeout(m, e), h(l);
  84879. }
  84880. return s === void 0 && (s = setTimeout(m, e)), o;
  84881. }
  84882. return O.cancel = b, O.flush = _, O;
  84883. }
  84884. var wie = LUe;
  84885. const NUe = /* @__PURE__ */ vx(wie), BUe = (t, { debounceWait: e, debounceLeading: n, debounceTrailing: r, debounceMaxWait: i }) => {
  84886. const a = U(), o = L(() => {
  84887. const s = {}, l = B(n), u = B(r), c = B(i);
  84888. return l !== void 0 && (s.leading = l), u !== void 0 && (s.trailing = u), c !== void 0 && (s.maxWait = c), s;
  84889. });
  84890. return ht((s) => {
  84891. if (B(e)) {
  84892. const l = t.runAsync.bind(t);
  84893. a.value = NUe(
  84894. (u) => {
  84895. u();
  84896. },
  84897. B(e),
  84898. o.value
  84899. ), t.runAsync = (...u) => new Promise((c, f) => {
  84900. var d;
  84901. (d = a.value) == null || d.call(a, () => {
  84902. l(...u).then(c).catch(f);
  84903. });
  84904. }), s(() => {
  84905. var u;
  84906. (u = a.value) == null || u.cancel(), t.runAsync = l;
  84907. });
  84908. }
  84909. }), B(e) ? {
  84910. name: "debouncePlugin",
  84911. onCancel: () => {
  84912. var s;
  84913. (s = a.value) == null || s.cancel();
  84914. }
  84915. } : {};
  84916. };
  84917. var zUe = Object.defineProperty, VUe = (t, e, n) => e in t ? zUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, VQ = (t, e, n) => (VUe(t, typeof e != "symbol" ? e + "" : e, n), n);
  84918. class FUe {
  84919. constructor() {
  84920. VQ(this, "table", {}), VQ(this, "hashTable", {});
  84921. }
  84922. insert(e) {
  84923. const n = Symbol(e);
  84924. return this.table[e] = !0, this.hashTable[n] = e, n;
  84925. }
  84926. find(e) {
  84927. return this.hashTable[e];
  84928. }
  84929. }
  84930. new FUe();
  84931. function WUe(t) {
  84932. const n = t.toString().match(/^function\s+([^\s(]+)/);
  84933. return n ? n[1] : "";
  84934. }
  84935. function QUe(t) {
  84936. const e = t.toString(), n = /([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/, r = e.match(n);
  84937. return r ? r[1].trim() : "";
  84938. }
  84939. var HUe = Object.defineProperty, GUe = (t, e, n) => e in t ? HUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, FQ = (t, e, n) => (GUe(t, typeof e != "symbol" ? e + "" : e, n), n);
  84940. class jUe {
  84941. constructor() {
  84942. FQ(this, "requestInstances", /* @__PURE__ */ new Map()), FQ(this, "listeners", []);
  84943. }
  84944. emit(e) {
  84945. this.listeners.forEach((n) => n(e));
  84946. }
  84947. subscribe(e) {
  84948. return this.listeners.push(e), () => {
  84949. const n = this.listeners.indexOf(e);
  84950. this.listeners.splice(n, 1);
  84951. };
  84952. }
  84953. insert(e, n) {
  84954. this.requestInstances.set(e, { ...n }), this.emit({
  84955. key: e,
  84956. ...n
  84957. });
  84958. }
  84959. update(e, n) {
  84960. this.has(e) && this.requestInstances.set(e, { ...this.requestInstances.get(e), ...n });
  84961. }
  84962. has(e) {
  84963. return this.requestInstances.has(e);
  84964. }
  84965. reset(e) {
  84966. if (this.requestInstances.has(e)) {
  84967. const n = this.requestInstances.get(e);
  84968. this.requestInstances.clear(), this.insert(e, n);
  84969. } else
  84970. this.requestInstances.clear();
  84971. }
  84972. getAll() {
  84973. return this.requestInstances;
  84974. }
  84975. }
  84976. const li = new jUe(), ZUe = (t, { ready: e = !0, debugKey: n, ...r }) => {
  84977. const i = () => {
  84978. if (n && !li.has(n)) {
  84979. const o = t.serviceRef.value.toString().includes("function") ? WUe(t.serviceRef.value.toString()) : QUe(t.serviceRef.value.toString());
  84980. li.insert(n, {
  84981. instance: t,
  84982. requestName: o,
  84983. time: Date.now()
  84984. });
  84985. }
  84986. }, a = L(
  84987. () => Object.fromEntries(
  84988. Object.entries({ ready: e, ...r }).map(([o, s]) => [o, B(s)])
  84989. )
  84990. );
  84991. return ht(() => {
  84992. n && li.has(n) && li.emit({
  84993. ...t,
  84994. options: { ...t.options, ...a.value }
  84995. });
  84996. }), {
  84997. name: "devtoolsPlugin",
  84998. onBefore: (o) => {
  84999. i(), n && li.has(n) && li.emit({
  85000. ...t.state,
  85001. key: n,
  85002. params: o,
  85003. loading: !0,
  85004. time: Date.now(),
  85005. type: "pending"
  85006. });
  85007. },
  85008. onSuccess(o, s) {
  85009. i(), n && li.has(n) && li.emit({
  85010. ...t.state,
  85011. key: n,
  85012. data: o,
  85013. params: s,
  85014. loading: !1,
  85015. time: Date.now(),
  85016. type: "done"
  85017. });
  85018. },
  85019. onCancel() {
  85020. i(), n && li.has(n) && li.emit({
  85021. ...t.state,
  85022. key: n,
  85023. loading: !1,
  85024. time: Date.now(),
  85025. type: "cancel"
  85026. });
  85027. },
  85028. onError(o, s) {
  85029. i(), n && li.has(n) && li.emit({
  85030. ...t.state,
  85031. key: n,
  85032. params: s,
  85033. loading: !1,
  85034. error: o,
  85035. time: Date.now(),
  85036. type: "error"
  85037. });
  85038. },
  85039. onMutate(o) {
  85040. i(), n && li.has(n) && li.emit({
  85041. ...t.state,
  85042. key: n,
  85043. data: o,
  85044. loading: !1,
  85045. time: Date.now(),
  85046. type: "mutate"
  85047. });
  85048. }
  85049. };
  85050. }, UUe = (t, { loadingDelay: e }) => {
  85051. const n = U(), r = () => {
  85052. n.value && (clearTimeout(B(n.value)), n.value = void 0);
  85053. };
  85054. return {
  85055. name: "loadingDelayPlugin",
  85056. onFinally: () => {
  85057. r();
  85058. const i = B(e);
  85059. i && (t.setState({
  85060. loading: !0
  85061. }), n.value = setTimeout(() => {
  85062. t.setState({
  85063. loading: !1
  85064. });
  85065. }, i));
  85066. },
  85067. onError: () => {
  85068. r();
  85069. }
  85070. };
  85071. };
  85072. function NL() {
  85073. return !!(typeof window < "u" && window.document && window.document.createElement);
  85074. }
  85075. const XUe = !!(typeof window < "u" && window.document && window.document.createElement);
  85076. function BL() {
  85077. return NL() ? document.visibilityState !== "hidden" : !0;
  85078. }
  85079. const Bg = [];
  85080. function YUe(t) {
  85081. return Bg.push(t), function() {
  85082. const n = Bg.indexOf(t);
  85083. Bg.splice(n, 1);
  85084. };
  85085. }
  85086. if (NL()) {
  85087. const t = () => {
  85088. if (BL())
  85089. for (let e = 0; e < Bg.length; e++) {
  85090. const n = Bg[e];
  85091. n();
  85092. }
  85093. };
  85094. window.addEventListener("visibilitychange", t, !1);
  85095. }
  85096. const qUe = (t, { pollingInterval: e, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
  85097. let i;
  85098. const a = U(), o = U(0), s = () => {
  85099. var l;
  85100. i && clearTimeout(i), (l = a.value) == null || l.call(a);
  85101. };
  85102. return ht(() => {
  85103. B(e) || s();
  85104. }), B(e) ? {
  85105. name: "pollingPlugin",
  85106. onBefore: () => {
  85107. s();
  85108. },
  85109. onError: () => {
  85110. o.value += 1;
  85111. },
  85112. onSuccess: () => {
  85113. o.value = 0;
  85114. },
  85115. onFinally: () => {
  85116. r === -1 || r !== -1 && o.value <= r ? i = setTimeout(() => {
  85117. !n && !BL() ? a.value = YUe(() => {
  85118. t.refresh();
  85119. }) : t.refresh();
  85120. }, B(e)) : o.value = 0;
  85121. },
  85122. onCancel: () => {
  85123. s();
  85124. }
  85125. } : {};
  85126. };
  85127. function KUe(t, e) {
  85128. let n = !1;
  85129. return (...r) => {
  85130. n || (n = !0, t(...r), setTimeout(() => {
  85131. n = !1;
  85132. }, e));
  85133. };
  85134. }
  85135. function JUe() {
  85136. return NL() && typeof navigator.onLine < "u" ? navigator.onLine : !0;
  85137. }
  85138. const zg = [];
  85139. function eXe(t) {
  85140. return zg.push(t), function() {
  85141. const n = zg.indexOf(t);
  85142. n > -1 && zg.splice(n, 1);
  85143. };
  85144. }
  85145. if (XUe) {
  85146. const t = () => {
  85147. if (!(!BL() || !JUe()))
  85148. for (let e = 0; e < zg.length; e++) {
  85149. const n = zg[e];
  85150. n();
  85151. }
  85152. };
  85153. window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1);
  85154. }
  85155. const tXe = (t, { refreshOnWindowFocus: e, focusTimespan: n = 5e3 }) => {
  85156. const r = U(), i = () => {
  85157. var a;
  85158. (a = r.value) == null || a.call(r);
  85159. };
  85160. return ht((a) => {
  85161. if (B(e)) {
  85162. const o = KUe(
  85163. t.refresh.bind(t),
  85164. B(n)
  85165. );
  85166. r.value = eXe(() => {
  85167. o();
  85168. });
  85169. }
  85170. a(() => {
  85171. i();
  85172. });
  85173. }), f0(() => {
  85174. i();
  85175. }), {
  85176. name: "refreshOnWindowFocusPlugin"
  85177. };
  85178. }, nXe = (t, { retryInterval: e, retryCount: n }) => {
  85179. const r = U(), i = U(0), a = U(!1);
  85180. return n ? {
  85181. name: "retryPlugin",
  85182. onBefore: () => {
  85183. a.value || (i.value = 0), a.value = !1, r.value && clearTimeout(r.value);
  85184. },
  85185. onSuccess: () => {
  85186. i.value = 0;
  85187. },
  85188. onError: () => {
  85189. if (i.value += 1, n === -1 || i.value <= n) {
  85190. const o = e ?? Math.min(1e3 * 2 ** i.value, 3e4);
  85191. r.value = setTimeout(() => {
  85192. a.value = !0, t.refresh();
  85193. }, o);
  85194. } else
  85195. i.value = 0;
  85196. },
  85197. onCancel: () => {
  85198. i.value = 0, r.value && clearTimeout(r.value);
  85199. }
  85200. } : {};
  85201. };
  85202. var rXe = wie, iXe = go, aXe = "Expected a function";
  85203. function oXe(t, e, n) {
  85204. var r = !0, i = !0;
  85205. if (typeof t != "function")
  85206. throw new TypeError(aXe);
  85207. return iXe(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), rXe(t, e, {
  85208. leading: r,
  85209. maxWait: e,
  85210. trailing: i
  85211. });
  85212. }
  85213. var sXe = oXe;
  85214. const lXe = /* @__PURE__ */ vx(sXe), uXe = (t, { throttleWait: e, throttleLeading: n, throttleTrailing: r }) => {
  85215. const i = L(() => {
  85216. const o = {};
  85217. return B(n) !== void 0 && (o.leading = B(n)), B(r) !== void 0 && (o.trailing = B(r)), o;
  85218. }), a = L(
  85219. () => lXe(
  85220. (o) => {
  85221. o();
  85222. },
  85223. B(e),
  85224. i.value
  85225. )
  85226. );
  85227. return ht((o) => {
  85228. if (B(e)) {
  85229. const s = t.runAsync.bind(t);
  85230. t.runAsync = (...l) => new Promise((u, c) => {
  85231. var f;
  85232. (f = a.value) == null || f.call(a, () => {
  85233. s(...l).then(u).catch(c);
  85234. });
  85235. }), o(() => {
  85236. var l;
  85237. t.runAsync = s, (l = a.value) == null || l.cancel();
  85238. });
  85239. }
  85240. }), B(e) ? {
  85241. name: "throttlePlugin",
  85242. onCancel: () => {
  85243. var o;
  85244. (o = a.value) == null || o.cancel();
  85245. }
  85246. } : {};
  85247. }, WQ = (t) => typeof t == "function", cXe = (t) => typeof t == "boolean";
  85248. var fXe = Object.defineProperty, dXe = (t, e, n) => e in t ? fXe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Fb = (t, e, n) => (dXe(t, typeof e != "symbol" ? e + "" : e, n), n);
  85249. class hXe {
  85250. constructor(e, n, r, i = {}) {
  85251. Fb(this, "pluginImpls"), Fb(this, "count", 0), Fb(this, "state", {
  85252. loading: !1,
  85253. params: void 0,
  85254. data: void 0,
  85255. error: void 0
  85256. }), Fb(this, "previousValidData"), this.serviceRef = e, this.options = n, this.setUpdateData = r, this.initState = i, this.state = {
  85257. ...this.state,
  85258. loading: !n.manual,
  85259. ...i
  85260. };
  85261. }
  85262. setState(e = {}) {
  85263. this.state = {
  85264. ...this.state,
  85265. ...e
  85266. }, this.setUpdateData(this.state);
  85267. }
  85268. setData(e, n) {
  85269. console.warn("Please use 'setFetchState' instead of 'setData'"), n instanceof Array ? n.forEach((r) => {
  85270. this.state[r] = e, this.setUpdateData(e, r);
  85271. }) : (this.state[n] = e, this.setUpdateData(e, n));
  85272. }
  85273. setFetchState(e, n) {
  85274. n instanceof Array ? n.forEach((r) => {
  85275. this.state[r] = e, this.setUpdateData(e, r);
  85276. }) : (this.state[n] = e, this.setUpdateData(e, n));
  85277. }
  85278. runPluginHandler(e, ...n) {
  85279. var r, i, a;
  85280. const o = (a = (i = (r = this.pluginImpls) == null ? void 0 : r.map((s) => {
  85281. var l;
  85282. return (l = s[e]) == null ? void 0 : l.call(s, ...n);
  85283. })) != null ? i : []) == null ? void 0 : a.filter(Boolean);
  85284. return Object.assign({}, ...o);
  85285. }
  85286. async runAsync(...e) {
  85287. var n, r, i, a, o, s, l, u, c, f, d;
  85288. this.count += 1;
  85289. const h = this.count, { stopNow: p = !1, returnNow: v = !1, ...g } = this.runPluginHandler(
  85290. "onBefore",
  85291. e
  85292. );
  85293. if (p)
  85294. return new Promise(() => {
  85295. });
  85296. if (this.setState({
  85297. loading: !0,
  85298. params: e,
  85299. ...g
  85300. }), v)
  85301. return Promise.resolve(g.data);
  85302. try {
  85303. (r = (n = this.options).onBefore) == null || r.call(n, e);
  85304. } catch (m) {
  85305. return this.setState({
  85306. error: m,
  85307. loading: !1
  85308. }), (a = (i = this.options).onError) == null || a.call(i, m, e), this.runPluginHandler("onError", m, e), new Promise(() => {
  85309. });
  85310. }
  85311. try {
  85312. let { servicePromise: m } = this.runPluginHandler("onRequest", this.serviceRef.value, e);
  85313. const y = (_) => {
  85314. var O, S, x, C;
  85315. if (h !== this.count)
  85316. return new Promise(() => {
  85317. });
  85318. const T = this.options.formatResult ? this.options.formatResult(_) : _;
  85319. return this.setState({
  85320. data: T,
  85321. error: void 0,
  85322. loading: !1
  85323. }), (S = (O = this.options).onSuccess) == null || S.call(O, T, e), this.runPluginHandler("onSuccess", T, e), this.previousValidData = T, (C = (x = this.options).onFinally) == null || C.call(x, e, T, void 0), h === this.count && this.runPluginHandler("onFinally", e, T, void 0), T;
  85324. };
  85325. m || (m = this.serviceRef.value(...e));
  85326. const b = await m;
  85327. return y(b);
  85328. } catch (m) {
  85329. if (h !== this.count)
  85330. return new Promise(() => {
  85331. });
  85332. throw this.setState({
  85333. error: m,
  85334. loading: !1
  85335. }), (s = (o = this.options).onError) == null || s.call(o, m, e), this.runPluginHandler("onError", m, e), (WQ((l = this.options) == null ? void 0 : l.rollbackOnError) && ((u = this.options) != null && u.rollbackOnError(e)) || cXe((c = this.options) == null ? void 0 : c.rollbackOnError) && this.options.rollbackOnError) && this.setState({
  85336. data: this.previousValidData
  85337. }), (d = (f = this.options).onFinally) == null || d.call(f, e, void 0, m), h === this.count && this.runPluginHandler("onFinally", e, void 0, m), m;
  85338. }
  85339. }
  85340. run(...e) {
  85341. this.runAsync(...e).catch((n) => {
  85342. this.options.onError || console.error(n);
  85343. });
  85344. }
  85345. cancel() {
  85346. this.count += 1, this.setState({
  85347. loading: !1
  85348. }), this.runPluginHandler("onCancel");
  85349. }
  85350. refresh() {
  85351. this.run(...this.state.params || []);
  85352. }
  85353. refreshAsync() {
  85354. return this.runAsync(...this.state.params || []);
  85355. }
  85356. mutate(e) {
  85357. const n = WQ(e) ? e(this.state.data) : e;
  85358. this.runPluginHandler("onMutate", n), this.setState({
  85359. data: n
  85360. });
  85361. }
  85362. }
  85363. const pXe = Symbol(
  85364. "USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY"
  85365. );
  85366. function vXe(t) {
  85367. return Object.keys(t).filter((n) => ["data", "loading", "params", "error"].includes(n)).length === 4;
  85368. }
  85369. function gXe(t, e = {}, n = []) {
  85370. const r = Ge(
  85371. pXe,
  85372. {}
  85373. ), { initialData: i = void 0, manual: a = !1, ready: o = !0, ...s } = {
  85374. ...r ?? {},
  85375. ...e ?? {}
  85376. }, l = {
  85377. manual: a,
  85378. ready: o,
  85379. initialData: i,
  85380. ...s
  85381. }, u = U(t), c = tn({
  85382. data: i,
  85383. loading: !1,
  85384. params: void 0,
  85385. error: void 0
  85386. }), f = (v, g) => {
  85387. g ? c[g] = v : vXe(v) && (c.data = v.data, c.loading = v.loading, c.error = v.error, c.params = v.params);
  85388. }, d = n.map((v) => {
  85389. var g;
  85390. return (g = v == null ? void 0 : v.onInit) == null ? void 0 : g.call(v, l);
  85391. }).filter(Boolean), h = new hXe(
  85392. u,
  85393. l,
  85394. f,
  85395. Object.assign({}, ...d, c)
  85396. );
  85397. h.options = l, h.pluginImpls = n.map((v) => v(h, l));
  85398. const p = L(() => tp(o) ? o.value : o);
  85399. if (ht(() => {
  85400. if (!a) {
  85401. const v = h.state.params || e.defaultParams || [];
  85402. p.value && h.options.refreshDeps === !0 && u.value && h.run(...v);
  85403. }
  85404. }), !a && h.options.refreshDeps !== !0) {
  85405. const v = h.state.params || e.defaultParams || [];
  85406. B(o) && h.run(...v);
  85407. }
  85408. return f0(() => {
  85409. h.cancel();
  85410. }), {
  85411. ...$S(c),
  85412. cancel: h.cancel.bind(h),
  85413. refresh: h.refresh.bind(h),
  85414. refreshAsync: h.refreshAsync.bind(h),
  85415. run: h.run.bind(h),
  85416. runAsync: h.runAsync.bind(h),
  85417. mutate: h.mutate.bind(h)
  85418. };
  85419. }
  85420. const mXe = (t, e) => function(r, i = {}, a = []) {
  85421. let o = t;
  85422. const s = e || [];
  85423. for (let l = s.length; l--; )
  85424. o = s[l](o);
  85425. return o(r, i, a);
  85426. };
  85427. function yXe(t, e, n) {
  85428. var r;
  85429. const i = (r = [
  85430. process.env.NODE_ENV === "development" ? ZUe : null,
  85431. BUe,
  85432. UUe,
  85433. qUe,
  85434. tXe,
  85435. uXe,
  85436. Oie,
  85437. FZe,
  85438. nXe
  85439. ]) == null ? void 0 : r.filter(Boolean);
  85440. return mXe(gXe, e == null ? void 0 : e.use)(t, e, [
  85441. ...i
  85442. ]);
  85443. }
  85444. /*! js-cookie v3.0.5 | MIT */
  85445. function Wb(t) {
  85446. for (var e = 1; e < arguments.length; e++) {
  85447. var n = arguments[e];
  85448. for (var r in n)
  85449. t[r] = n[r];
  85450. }
  85451. return t;
  85452. }
  85453. var bXe = {
  85454. read: function(t) {
  85455. return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
  85456. },
  85457. write: function(t) {
  85458. return encodeURIComponent(t).replace(
  85459. /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
  85460. decodeURIComponent
  85461. );
  85462. }
  85463. };
  85464. function UE(t, e) {
  85465. function n(i, a, o) {
  85466. if (!(typeof document > "u")) {
  85467. o = Wb({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
  85468. var s = "";
  85469. for (var l in o)
  85470. o[l] && (s += "; " + l, o[l] !== !0 && (s += "=" + o[l].split(";")[0]));
  85471. return document.cookie = i + "=" + t.write(a, i) + s;
  85472. }
  85473. }
  85474. function r(i) {
  85475. if (!(typeof document > "u" || arguments.length && !i)) {
  85476. for (var a = document.cookie ? document.cookie.split("; ") : [], o = {}, s = 0; s < a.length; s++) {
  85477. var l = a[s].split("="), u = l.slice(1).join("=");
  85478. try {
  85479. var c = decodeURIComponent(l[0]);
  85480. if (o[c] = t.read(u, c), i === c)
  85481. break;
  85482. } catch {
  85483. }
  85484. }
  85485. return i ? o[i] : o;
  85486. }
  85487. }
  85488. return Object.create(
  85489. {
  85490. set: n,
  85491. get: r,
  85492. remove: function(i, a) {
  85493. n(
  85494. i,
  85495. "",
  85496. Wb({}, a, {
  85497. expires: -1
  85498. })
  85499. );
  85500. },
  85501. withAttributes: function(i) {
  85502. return UE(this.converter, Wb({}, this.attributes, i));
  85503. },
  85504. withConverter: function(i) {
  85505. return UE(Wb({}, this.converter, i), this.attributes);
  85506. }
  85507. },
  85508. {
  85509. attributes: { value: Object.freeze(e) },
  85510. converter: { value: Object.freeze(t) }
  85511. }
  85512. );
  85513. }
  85514. UE(bXe, { path: "/" });
  85515. function _Xe() {
  85516. this.__data__ = [], this.size = 0;
  85517. }
  85518. var OXe = _Xe;
  85519. function SXe(t, e) {
  85520. return t === e || t !== t && e !== e;
  85521. }
  85522. var Cw = SXe, xXe = Cw;
  85523. function wXe(t, e) {
  85524. for (var n = t.length; n--; )
  85525. if (xXe(t[n][0], e))
  85526. return n;
  85527. return -1;
  85528. }
  85529. var Tw = wXe, CXe = Tw, TXe = Array.prototype, PXe = TXe.splice;
  85530. function $Xe(t) {
  85531. var e = this.__data__, n = CXe(e, t);
  85532. if (n < 0)
  85533. return !1;
  85534. var r = e.length - 1;
  85535. return n == r ? e.pop() : PXe.call(e, n, 1), --this.size, !0;
  85536. }
  85537. var AXe = $Xe, EXe = Tw;
  85538. function MXe(t) {
  85539. var e = this.__data__, n = EXe(e, t);
  85540. return n < 0 ? void 0 : e[n][1];
  85541. }
  85542. var IXe = MXe, DXe = Tw;
  85543. function RXe(t) {
  85544. return DXe(this.__data__, t) > -1;
  85545. }
  85546. var kXe = RXe, LXe = Tw;
  85547. function NXe(t, e) {
  85548. var n = this.__data__, r = LXe(n, t);
  85549. return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
  85550. }
  85551. var BXe = NXe, zXe = OXe, VXe = AXe, FXe = IXe, WXe = kXe, QXe = BXe;
  85552. function Ap(t) {
  85553. var e = -1, n = t == null ? 0 : t.length;
  85554. for (this.clear(); ++e < n; ) {
  85555. var r = t[e];
  85556. this.set(r[0], r[1]);
  85557. }
  85558. }
  85559. Ap.prototype.clear = zXe;
  85560. Ap.prototype.delete = VXe;
  85561. Ap.prototype.get = FXe;
  85562. Ap.prototype.has = WXe;
  85563. Ap.prototype.set = QXe;
  85564. var Pw = Ap, HXe = Pw;
  85565. function GXe() {
  85566. this.__data__ = new HXe(), this.size = 0;
  85567. }
  85568. var jXe = GXe;
  85569. function ZXe(t) {
  85570. var e = this.__data__, n = e.delete(t);
  85571. return this.size = e.size, n;
  85572. }
  85573. var UXe = ZXe;
  85574. function XXe(t) {
  85575. return this.__data__.get(t);
  85576. }
  85577. var YXe = XXe;
  85578. function qXe(t) {
  85579. return this.__data__.has(t);
  85580. }
  85581. var KXe = qXe, JXe = $p, eYe = go, tYe = "[object AsyncFunction]", nYe = "[object Function]", rYe = "[object GeneratorFunction]", iYe = "[object Proxy]";
  85582. function aYe(t) {
  85583. if (!eYe(t))
  85584. return !1;
  85585. var e = JXe(t);
  85586. return e == nYe || e == rYe || e == tYe || e == iYe;
  85587. }
  85588. var zL = aYe, oYe = mo, sYe = oYe["__core-js_shared__"], lYe = sYe, d$ = lYe, QQ = function() {
  85589. var t = /[^.]+$/.exec(d$ && d$.keys && d$.keys.IE_PROTO || "");
  85590. return t ? "Symbol(src)_1." + t : "";
  85591. }();
  85592. function uYe(t) {
  85593. return !!QQ && QQ in t;
  85594. }
  85595. var cYe = uYe, fYe = Function.prototype, dYe = fYe.toString;
  85596. function hYe(t) {
  85597. if (t != null) {
  85598. try {
  85599. return dYe.call(t);
  85600. } catch {
  85601. }
  85602. try {
  85603. return t + "";
  85604. } catch {
  85605. }
  85606. }
  85607. return "";
  85608. }
  85609. var Cie = hYe, pYe = zL, vYe = cYe, gYe = go, mYe = Cie, yYe = /[\\^$.*+?()[\]{}|]/g, bYe = /^\[object .+?Constructor\]$/, _Ye = Function.prototype, OYe = Object.prototype, SYe = _Ye.toString, xYe = OYe.hasOwnProperty, wYe = RegExp(
  85610. "^" + SYe.call(xYe).replace(yYe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  85611. );
  85612. function CYe(t) {
  85613. if (!gYe(t) || vYe(t))
  85614. return !1;
  85615. var e = pYe(t) ? wYe : bYe;
  85616. return e.test(mYe(t));
  85617. }
  85618. var TYe = CYe;
  85619. function PYe(t, e) {
  85620. return t == null ? void 0 : t[e];
  85621. }
  85622. var $Ye = PYe, AYe = TYe, EYe = $Ye;
  85623. function MYe(t, e) {
  85624. var n = EYe(t, e);
  85625. return AYe(n) ? n : void 0;
  85626. }
  85627. var Hf = MYe, IYe = Hf, DYe = mo, RYe = IYe(DYe, "Map"), VL = RYe, kYe = Hf, LYe = kYe(Object, "create"), $w = LYe, HQ = $w;
  85628. function NYe() {
  85629. this.__data__ = HQ ? HQ(null) : {}, this.size = 0;
  85630. }
  85631. var BYe = NYe;
  85632. function zYe(t) {
  85633. var e = this.has(t) && delete this.__data__[t];
  85634. return this.size -= e ? 1 : 0, e;
  85635. }
  85636. var VYe = zYe, FYe = $w, WYe = "__lodash_hash_undefined__", QYe = Object.prototype, HYe = QYe.hasOwnProperty;
  85637. function GYe(t) {
  85638. var e = this.__data__;
  85639. if (FYe) {
  85640. var n = e[t];
  85641. return n === WYe ? void 0 : n;
  85642. }
  85643. return HYe.call(e, t) ? e[t] : void 0;
  85644. }
  85645. var jYe = GYe, ZYe = $w, UYe = Object.prototype, XYe = UYe.hasOwnProperty;
  85646. function YYe(t) {
  85647. var e = this.__data__;
  85648. return ZYe ? e[t] !== void 0 : XYe.call(e, t);
  85649. }
  85650. var qYe = YYe, KYe = $w, JYe = "__lodash_hash_undefined__";
  85651. function eqe(t, e) {
  85652. var n = this.__data__;
  85653. return this.size += this.has(t) ? 0 : 1, n[t] = KYe && e === void 0 ? JYe : e, this;
  85654. }
  85655. var tqe = eqe, nqe = BYe, rqe = VYe, iqe = jYe, aqe = qYe, oqe = tqe;
  85656. function Ep(t) {
  85657. var e = -1, n = t == null ? 0 : t.length;
  85658. for (this.clear(); ++e < n; ) {
  85659. var r = t[e];
  85660. this.set(r[0], r[1]);
  85661. }
  85662. }
  85663. Ep.prototype.clear = nqe;
  85664. Ep.prototype.delete = rqe;
  85665. Ep.prototype.get = iqe;
  85666. Ep.prototype.has = aqe;
  85667. Ep.prototype.set = oqe;
  85668. var sqe = Ep, GQ = sqe, lqe = Pw, uqe = VL;
  85669. function cqe() {
  85670. this.size = 0, this.__data__ = {
  85671. hash: new GQ(),
  85672. map: new (uqe || lqe)(),
  85673. string: new GQ()
  85674. };
  85675. }
  85676. var fqe = cqe;
  85677. function dqe(t) {
  85678. var e = typeof t;
  85679. return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
  85680. }
  85681. var hqe = dqe, pqe = hqe;
  85682. function vqe(t, e) {
  85683. var n = t.__data__;
  85684. return pqe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
  85685. }
  85686. var Aw = vqe, gqe = Aw;
  85687. function mqe(t) {
  85688. var e = gqe(this, t).delete(t);
  85689. return this.size -= e ? 1 : 0, e;
  85690. }
  85691. var yqe = mqe, bqe = Aw;
  85692. function _qe(t) {
  85693. return bqe(this, t).get(t);
  85694. }
  85695. var Oqe = _qe, Sqe = Aw;
  85696. function xqe(t) {
  85697. return Sqe(this, t).has(t);
  85698. }
  85699. var wqe = xqe, Cqe = Aw;
  85700. function Tqe(t, e) {
  85701. var n = Cqe(this, t), r = n.size;
  85702. return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
  85703. }
  85704. var Pqe = Tqe, $qe = fqe, Aqe = yqe, Eqe = Oqe, Mqe = wqe, Iqe = Pqe;
  85705. function Mp(t) {
  85706. var e = -1, n = t == null ? 0 : t.length;
  85707. for (this.clear(); ++e < n; ) {
  85708. var r = t[e];
  85709. this.set(r[0], r[1]);
  85710. }
  85711. }
  85712. Mp.prototype.clear = $qe;
  85713. Mp.prototype.delete = Aqe;
  85714. Mp.prototype.get = Eqe;
  85715. Mp.prototype.has = Mqe;
  85716. Mp.prototype.set = Iqe;
  85717. var Tie = Mp, Dqe = Pw, Rqe = VL, kqe = Tie, Lqe = 200;
  85718. function Nqe(t, e) {
  85719. var n = this.__data__;
  85720. if (n instanceof Dqe) {
  85721. var r = n.__data__;
  85722. if (!Rqe || r.length < Lqe - 1)
  85723. return r.push([t, e]), this.size = ++n.size, this;
  85724. n = this.__data__ = new kqe(r);
  85725. }
  85726. return n.set(t, e), this.size = n.size, this;
  85727. }
  85728. var Bqe = Nqe, zqe = Pw, Vqe = jXe, Fqe = UXe, Wqe = YXe, Qqe = KXe, Hqe = Bqe;
  85729. function Ip(t) {
  85730. var e = this.__data__ = new zqe(t);
  85731. this.size = e.size;
  85732. }
  85733. Ip.prototype.clear = Vqe;
  85734. Ip.prototype.delete = Fqe;
  85735. Ip.prototype.get = Wqe;
  85736. Ip.prototype.has = Qqe;
  85737. Ip.prototype.set = Hqe;
  85738. var Pie = Ip;
  85739. function Gqe(t, e) {
  85740. for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
  85741. ;
  85742. return t;
  85743. }
  85744. var jqe = Gqe, Zqe = Hf, Uqe = function() {
  85745. try {
  85746. var t = Zqe(Object, "defineProperty");
  85747. return t({}, "", {}), t;
  85748. } catch {
  85749. }
  85750. }(), $ie = Uqe, jQ = $ie;
  85751. function Xqe(t, e, n) {
  85752. e == "__proto__" && jQ ? jQ(t, e, {
  85753. configurable: !0,
  85754. enumerable: !0,
  85755. value: n,
  85756. writable: !0
  85757. }) : t[e] = n;
  85758. }
  85759. var FL = Xqe, Yqe = FL, qqe = Cw, Kqe = Object.prototype, Jqe = Kqe.hasOwnProperty;
  85760. function eKe(t, e, n) {
  85761. var r = t[e];
  85762. (!(Jqe.call(t, e) && qqe(r, n)) || n === void 0 && !(e in t)) && Yqe(t, e, n);
  85763. }
  85764. var Aie = eKe, tKe = Aie, nKe = FL;
  85765. function rKe(t, e, n, r) {
  85766. var i = !n;
  85767. n || (n = {});
  85768. for (var a = -1, o = e.length; ++a < o; ) {
  85769. var s = e[a], l = r ? r(n[s], t[s], s, n, t) : void 0;
  85770. l === void 0 && (l = t[s]), i ? nKe(n, s, l) : tKe(n, s, l);
  85771. }
  85772. return n;
  85773. }
  85774. var ty = rKe;
  85775. function iKe(t, e) {
  85776. for (var n = -1, r = Array(t); ++n < t; )
  85777. r[n] = e(n);
  85778. return r;
  85779. }
  85780. var aKe = iKe, oKe = $p, sKe = Au, lKe = "[object Arguments]";
  85781. function uKe(t) {
  85782. return sKe(t) && oKe(t) == lKe;
  85783. }
  85784. var cKe = uKe, ZQ = cKe, fKe = Au, Eie = Object.prototype, dKe = Eie.hasOwnProperty, hKe = Eie.propertyIsEnumerable, pKe = ZQ(/* @__PURE__ */ function() {
  85785. return arguments;
  85786. }()) ? ZQ : function(t) {
  85787. return fKe(t) && dKe.call(t, "callee") && !hKe.call(t, "callee");
  85788. }, Mie = pKe, vKe = Array.isArray, Ew = vKe, qO = { exports: {} };
  85789. function gKe() {
  85790. return !1;
  85791. }
  85792. var mKe = gKe;
  85793. qO.exports;
  85794. (function(t, e) {
  85795. var n = mo, r = mKe, i = e && !e.nodeType && e, a = i && !0 && t && !t.nodeType && t, o = a && a.exports === i, s = o ? n.Buffer : void 0, l = s ? s.isBuffer : void 0, u = l || r;
  85796. t.exports = u;
  85797. })(qO, qO.exports);
  85798. var WL = qO.exports, yKe = 9007199254740991, bKe = /^(?:0|[1-9]\d*)$/;
  85799. function _Ke(t, e) {
  85800. var n = typeof t;
  85801. return e = e ?? yKe, !!e && (n == "number" || n != "symbol" && bKe.test(t)) && t > -1 && t % 1 == 0 && t < e;
  85802. }
  85803. var Iie = _Ke, OKe = 9007199254740991;
  85804. function SKe(t) {
  85805. return typeof t == "number" && t > -1 && t % 1 == 0 && t <= OKe;
  85806. }
  85807. var Die = SKe, xKe = $p, wKe = Die, CKe = Au, TKe = "[object Arguments]", PKe = "[object Array]", $Ke = "[object Boolean]", AKe = "[object Date]", EKe = "[object Error]", MKe = "[object Function]", IKe = "[object Map]", DKe = "[object Number]", RKe = "[object Object]", kKe = "[object RegExp]", LKe = "[object Set]", NKe = "[object String]", BKe = "[object WeakMap]", zKe = "[object ArrayBuffer]", VKe = "[object DataView]", FKe = "[object Float32Array]", WKe = "[object Float64Array]", QKe = "[object Int8Array]", HKe = "[object Int16Array]", GKe = "[object Int32Array]", jKe = "[object Uint8Array]", ZKe = "[object Uint8ClampedArray]", UKe = "[object Uint16Array]", XKe = "[object Uint32Array]", un = {};
  85808. un[FKe] = un[WKe] = un[QKe] = un[HKe] = un[GKe] = un[jKe] = un[ZKe] = un[UKe] = un[XKe] = !0;
  85809. un[TKe] = un[PKe] = un[zKe] = un[$Ke] = un[VKe] = un[AKe] = un[EKe] = un[MKe] = un[IKe] = un[DKe] = un[RKe] = un[kKe] = un[LKe] = un[NKe] = un[BKe] = !1;
  85810. function YKe(t) {
  85811. return CKe(t) && wKe(t.length) && !!un[xKe(t)];
  85812. }
  85813. var qKe = YKe;
  85814. function KKe(t) {
  85815. return function(e) {
  85816. return t(e);
  85817. };
  85818. }
  85819. var QL = KKe, KO = { exports: {} };
  85820. KO.exports;
  85821. (function(t, e) {
  85822. var n = Sie, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a && n.process, s = function() {
  85823. try {
  85824. var l = i && i.require && i.require("util").types;
  85825. return l || o && o.binding && o.binding("util");
  85826. } catch {
  85827. }
  85828. }();
  85829. t.exports = s;
  85830. })(KO, KO.exports);
  85831. var HL = KO.exports, JKe = qKe, eJe = QL, UQ = HL, XQ = UQ && UQ.isTypedArray, tJe = XQ ? eJe(XQ) : JKe, Rie = tJe, nJe = aKe, rJe = Mie, iJe = Ew, aJe = WL, oJe = Iie, sJe = Rie, lJe = Object.prototype, uJe = lJe.hasOwnProperty;
  85832. function cJe(t, e) {
  85833. var n = iJe(t), r = !n && rJe(t), i = !n && !r && aJe(t), a = !n && !r && !i && sJe(t), o = n || r || i || a, s = o ? nJe(t.length, String) : [], l = s.length;
  85834. for (var u in t)
  85835. (e || uJe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
  85836. (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
  85837. i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  85838. a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
  85839. oJe(u, l))) && s.push(u);
  85840. return s;
  85841. }
  85842. var kie = cJe, fJe = Object.prototype;
  85843. function dJe(t) {
  85844. var e = t && t.constructor, n = typeof e == "function" && e.prototype || fJe;
  85845. return t === n;
  85846. }
  85847. var GL = dJe;
  85848. function hJe(t, e) {
  85849. return function(n) {
  85850. return t(e(n));
  85851. };
  85852. }
  85853. var Lie = hJe, pJe = Lie, vJe = pJe(Object.keys, Object), gJe = vJe, mJe = GL, yJe = gJe, bJe = Object.prototype, _Je = bJe.hasOwnProperty;
  85854. function OJe(t) {
  85855. if (!mJe(t))
  85856. return yJe(t);
  85857. var e = [];
  85858. for (var n in Object(t))
  85859. _Je.call(t, n) && n != "constructor" && e.push(n);
  85860. return e;
  85861. }
  85862. var SJe = OJe, xJe = zL, wJe = Die;
  85863. function CJe(t) {
  85864. return t != null && wJe(t.length) && !xJe(t);
  85865. }
  85866. var Mw = CJe, TJe = kie, PJe = SJe, $Je = Mw;
  85867. function AJe(t) {
  85868. return $Je(t) ? TJe(t) : PJe(t);
  85869. }
  85870. var jL = AJe, EJe = ty, MJe = jL;
  85871. function IJe(t, e) {
  85872. return t && EJe(e, MJe(e), t);
  85873. }
  85874. var DJe = IJe;
  85875. function RJe(t) {
  85876. var e = [];
  85877. if (t != null)
  85878. for (var n in Object(t))
  85879. e.push(n);
  85880. return e;
  85881. }
  85882. var kJe = RJe, LJe = go, NJe = GL, BJe = kJe, zJe = Object.prototype, VJe = zJe.hasOwnProperty;
  85883. function FJe(t) {
  85884. if (!LJe(t))
  85885. return BJe(t);
  85886. var e = NJe(t), n = [];
  85887. for (var r in t)
  85888. r == "constructor" && (e || !VJe.call(t, r)) || n.push(r);
  85889. return n;
  85890. }
  85891. var WJe = FJe, QJe = kie, HJe = WJe, GJe = Mw;
  85892. function jJe(t) {
  85893. return GJe(t) ? QJe(t, !0) : HJe(t);
  85894. }
  85895. var ny = jJe, ZJe = ty, UJe = ny;
  85896. function XJe(t, e) {
  85897. return t && ZJe(e, UJe(e), t);
  85898. }
  85899. var YJe = XJe, JO = { exports: {} };
  85900. JO.exports;
  85901. (function(t, e) {
  85902. var n = mo, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a ? n.Buffer : void 0, s = o ? o.allocUnsafe : void 0;
  85903. function l(u, c) {
  85904. if (c)
  85905. return u.slice();
  85906. var f = u.length, d = s ? s(f) : new u.constructor(f);
  85907. return u.copy(d), d;
  85908. }
  85909. t.exports = l;
  85910. })(JO, JO.exports);
  85911. var Nie = JO.exports;
  85912. function qJe(t, e) {
  85913. var n = -1, r = t.length;
  85914. for (e || (e = Array(r)); ++n < r; )
  85915. e[n] = t[n];
  85916. return e;
  85917. }
  85918. var Bie = qJe;
  85919. function KJe(t, e) {
  85920. for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
  85921. var o = t[n];
  85922. e(o, n, t) && (a[i++] = o);
  85923. }
  85924. return a;
  85925. }
  85926. var JJe = KJe;
  85927. function eet() {
  85928. return [];
  85929. }
  85930. var zie = eet, tet = JJe, net = zie, ret = Object.prototype, iet = ret.propertyIsEnumerable, YQ = Object.getOwnPropertySymbols, aet = YQ ? function(t) {
  85931. return t == null ? [] : (t = Object(t), tet(YQ(t), function(e) {
  85932. return iet.call(t, e);
  85933. }));
  85934. } : net, ZL = aet, oet = ty, set = ZL;
  85935. function uet(t, e) {
  85936. return oet(t, set(t), e);
  85937. }
  85938. var cet = uet;
  85939. function fet(t, e) {
  85940. for (var n = -1, r = e.length, i = t.length; ++n < r; )
  85941. t[i + n] = e[n];
  85942. return t;
  85943. }
  85944. var Vie = fet, det = Lie, het = det(Object.getPrototypeOf, Object), UL = het, pet = Vie, vet = UL, get = ZL, met = zie, yet = Object.getOwnPropertySymbols, bet = yet ? function(t) {
  85945. for (var e = []; t; )
  85946. pet(e, get(t)), t = vet(t);
  85947. return e;
  85948. } : met, Fie = bet, _et = ty, Oet = Fie;
  85949. function xet(t, e) {
  85950. return _et(t, Oet(t), e);
  85951. }
  85952. var wet = xet, Cet = Vie, Tet = Ew;
  85953. function Pet(t, e, n) {
  85954. var r = e(t);
  85955. return Tet(t) ? r : Cet(r, n(t));
  85956. }
  85957. var Wie = Pet, $et = Wie, Aet = ZL, Eet = jL;
  85958. function Met(t) {
  85959. return $et(t, Eet, Aet);
  85960. }
  85961. var Iet = Met, Det = Wie, Ret = Fie, ket = ny;
  85962. function Let(t) {
  85963. return Det(t, ket, Ret);
  85964. }
  85965. var Net = Let, Bet = Hf, zet = mo, Vet = Bet(zet, "DataView"), Fet = Vet, Wet = Hf, Qet = mo, Het = Wet(Qet, "Promise"), Get = Het, jet = Hf, Zet = mo, Uet = jet(Zet, "Set"), Xet = Uet, Yet = Hf, qet = mo, Ket = Yet(qet, "WeakMap"), Jet = Ket, XE = Fet, YE = VL, qE = Get, KE = Xet, JE = Jet, Qie = $p, Dp = Cie, qQ = "[object Map]", ett = "[object Object]", KQ = "[object Promise]", JQ = "[object Set]", eH = "[object WeakMap]", tH = "[object DataView]", ttt = Dp(XE), ntt = Dp(YE), rtt = Dp(qE), itt = Dp(KE), att = Dp(JE), yc = Qie;
  85966. (XE && yc(new XE(new ArrayBuffer(1))) != tH || YE && yc(new YE()) != qQ || qE && yc(qE.resolve()) != KQ || KE && yc(new KE()) != JQ || JE && yc(new JE()) != eH) && (yc = function(t) {
  85967. var e = Qie(t), n = e == ett ? t.constructor : void 0, r = n ? Dp(n) : "";
  85968. if (r)
  85969. switch (r) {
  85970. case ttt:
  85971. return tH;
  85972. case ntt:
  85973. return qQ;
  85974. case rtt:
  85975. return KQ;
  85976. case itt:
  85977. return JQ;
  85978. case att:
  85979. return eH;
  85980. }
  85981. return e;
  85982. });
  85983. var XL = yc, ott = Object.prototype, stt = ott.hasOwnProperty;
  85984. function ltt(t) {
  85985. var e = t.length, n = new t.constructor(e);
  85986. return e && typeof t[0] == "string" && stt.call(t, "index") && (n.index = t.index, n.input = t.input), n;
  85987. }
  85988. var utt = ltt, ctt = mo, ftt = ctt.Uint8Array, dtt = ftt, nH = dtt;
  85989. function htt(t) {
  85990. var e = new t.constructor(t.byteLength);
  85991. return new nH(e).set(new nH(t)), e;
  85992. }
  85993. var YL = htt, ptt = YL;
  85994. function vtt(t, e) {
  85995. var n = e ? ptt(t.buffer) : t.buffer;
  85996. return new t.constructor(n, t.byteOffset, t.byteLength);
  85997. }
  85998. var gtt = vtt, mtt = /\w*$/;
  85999. function ytt(t) {
  86000. var e = new t.constructor(t.source, mtt.exec(t));
  86001. return e.lastIndex = t.lastIndex, e;
  86002. }
  86003. var btt = ytt, rH = ww, iH = rH ? rH.prototype : void 0, aH = iH ? iH.valueOf : void 0;
  86004. function _tt(t) {
  86005. return aH ? Object(aH.call(t)) : {};
  86006. }
  86007. var Ott = _tt, Stt = YL;
  86008. function xtt(t, e) {
  86009. var n = e ? Stt(t.buffer) : t.buffer;
  86010. return new t.constructor(n, t.byteOffset, t.length);
  86011. }
  86012. var Hie = xtt, wtt = YL, Ctt = gtt, Ttt = btt, Ptt = Ott, $tt = Hie, Att = "[object Boolean]", Ett = "[object Date]", Mtt = "[object Map]", Itt = "[object Number]", Dtt = "[object RegExp]", Rtt = "[object Set]", ktt = "[object String]", Ltt = "[object Symbol]", Ntt = "[object ArrayBuffer]", Btt = "[object DataView]", ztt = "[object Float32Array]", Vtt = "[object Float64Array]", Ftt = "[object Int8Array]", Wtt = "[object Int16Array]", Qtt = "[object Int32Array]", Htt = "[object Uint8Array]", Gtt = "[object Uint8ClampedArray]", jtt = "[object Uint16Array]", Ztt = "[object Uint32Array]";
  86013. function Utt(t, e, n) {
  86014. var r = t.constructor;
  86015. switch (e) {
  86016. case Ntt:
  86017. return wtt(t);
  86018. case Att:
  86019. case Ett:
  86020. return new r(+t);
  86021. case Btt:
  86022. return Ctt(t, n);
  86023. case ztt:
  86024. case Vtt:
  86025. case Ftt:
  86026. case Wtt:
  86027. case Qtt:
  86028. case Htt:
  86029. case Gtt:
  86030. case jtt:
  86031. case Ztt:
  86032. return $tt(t, n);
  86033. case Mtt:
  86034. return new r();
  86035. case Itt:
  86036. case ktt:
  86037. return new r(t);
  86038. case Dtt:
  86039. return Ttt(t);
  86040. case Rtt:
  86041. return new r();
  86042. case Ltt:
  86043. return Ptt(t);
  86044. }
  86045. }
  86046. var Xtt = Utt, Ytt = go, oH = Object.create, qtt = /* @__PURE__ */ function() {
  86047. function t() {
  86048. }
  86049. return function(e) {
  86050. if (!Ytt(e))
  86051. return {};
  86052. if (oH)
  86053. return oH(e);
  86054. t.prototype = e;
  86055. var n = new t();
  86056. return t.prototype = void 0, n;
  86057. };
  86058. }(), Ktt = qtt, Jtt = Ktt, ent = UL, tnt = GL;
  86059. function nnt(t) {
  86060. return typeof t.constructor == "function" && !tnt(t) ? Jtt(ent(t)) : {};
  86061. }
  86062. var Gie = nnt, rnt = XL, int = Au, ant = "[object Map]";
  86063. function ont(t) {
  86064. return int(t) && rnt(t) == ant;
  86065. }
  86066. var snt = ont, lnt = snt, unt = QL, sH = HL, lH = sH && sH.isMap, cnt = lH ? unt(lH) : lnt, fnt = cnt, dnt = XL, hnt = Au, pnt = "[object Set]";
  86067. function vnt(t) {
  86068. return hnt(t) && dnt(t) == pnt;
  86069. }
  86070. var gnt = vnt, mnt = gnt, ynt = QL, uH = HL, cH = uH && uH.isSet, bnt = cH ? ynt(cH) : mnt, _nt = bnt, Ont = Pie, Snt = jqe, xnt = Aie, wnt = DJe, Cnt = YJe, Tnt = Nie, Pnt = Bie, $nt = cet, Ant = wet, Ent = Iet, Mnt = Net, Int = XL, Dnt = utt, Rnt = Xtt, knt = Gie, Lnt = Ew, Nnt = WL, Bnt = fnt, znt = go, Vnt = _nt, Fnt = jL, Wnt = ny, Qnt = 1, Hnt = 2, Gnt = 4, jie = "[object Arguments]", jnt = "[object Array]", Znt = "[object Boolean]", Unt = "[object Date]", Xnt = "[object Error]", Zie = "[object Function]", Ynt = "[object GeneratorFunction]", qnt = "[object Map]", Knt = "[object Number]", Uie = "[object Object]", Jnt = "[object RegExp]", ert = "[object Set]", trt = "[object String]", nrt = "[object Symbol]", rrt = "[object WeakMap]", irt = "[object ArrayBuffer]", art = "[object DataView]", ort = "[object Float32Array]", srt = "[object Float64Array]", lrt = "[object Int8Array]", urt = "[object Int16Array]", crt = "[object Int32Array]", frt = "[object Uint8Array]", drt = "[object Uint8ClampedArray]", hrt = "[object Uint16Array]", prt = "[object Uint32Array]", an = {};
  86071. an[jie] = an[jnt] = an[irt] = an[art] = an[Znt] = an[Unt] = an[ort] = an[srt] = an[lrt] = an[urt] = an[crt] = an[qnt] = an[Knt] = an[Uie] = an[Jnt] = an[ert] = an[trt] = an[nrt] = an[frt] = an[drt] = an[hrt] = an[prt] = !0;
  86072. an[Xnt] = an[Zie] = an[rrt] = !1;
  86073. function t1(t, e, n, r, i, a) {
  86074. var o, s = e & Qnt, l = e & Hnt, u = e & Gnt;
  86075. if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
  86076. return o;
  86077. if (!znt(t))
  86078. return t;
  86079. var c = Lnt(t);
  86080. if (c) {
  86081. if (o = Dnt(t), !s)
  86082. return Pnt(t, o);
  86083. } else {
  86084. var f = Int(t), d = f == Zie || f == Ynt;
  86085. if (Nnt(t))
  86086. return Tnt(t, s);
  86087. if (f == Uie || f == jie || d && !i) {
  86088. if (o = l || d ? {} : knt(t), !s)
  86089. return l ? Ant(t, Cnt(o, t)) : $nt(t, wnt(o, t));
  86090. } else {
  86091. if (!an[f])
  86092. return i ? t : {};
  86093. o = Rnt(t, f, s);
  86094. }
  86095. }
  86096. a || (a = new Ont());
  86097. var h = a.get(t);
  86098. if (h)
  86099. return h;
  86100. a.set(t, o), Vnt(t) ? t.forEach(function(g) {
  86101. o.add(t1(g, e, n, g, t, a));
  86102. }) : Bnt(t) && t.forEach(function(g, m) {
  86103. o.set(m, t1(g, e, n, m, t, a));
  86104. });
  86105. var p = u ? l ? Mnt : Ent : l ? Wnt : Fnt, v = c ? void 0 : p(t);
  86106. return Snt(v || t, function(g, m) {
  86107. v && (m = g, g = t[m]), xnt(o, m, t1(g, e, n, m, t, a));
  86108. }), o;
  86109. }
  86110. var vrt = t1, grt = vrt, mrt = 1, yrt = 4;
  86111. function brt(t) {
  86112. return grt(t, mrt | yrt);
  86113. }
  86114. var _rt = brt;
  86115. const fH = /* @__PURE__ */ vx(_rt);
  86116. var Ort = Object.defineProperty, Srt = (t, e, n) => e in t ? Ort(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, uc = (t, e, n) => (Srt(t, typeof e != "symbol" ? e + "" : e, n), n);
  86117. class xrt {
  86118. constructor() {
  86119. uc(this, "subscriptions", /* @__PURE__ */ new Map()), uc(this, "emitEffectCache", /* @__PURE__ */ new Map()), uc(this, "useSubscription", (e, n) => {
  86120. const r = U();
  86121. ht((i) => {
  86122. var a, o;
  86123. r.value = n;
  86124. function s(u) {
  86125. r.value && r.value(u);
  86126. }
  86127. const l = (o = (a = this.subscriptions) == null ? void 0 : a.get(e)) != null ? o : [];
  86128. l.push(s), this.subscriptions.set(e, l), this.emitEffect(e), i(() => {
  86129. this.subscriptions.delete(e);
  86130. });
  86131. });
  86132. }), uc(this, "emit", (e, ...n) => {
  86133. if (typeof e == "string" || typeof e == "number") {
  86134. const r = this.subscriptions.get(e);
  86135. r == null || r.forEach((i) => {
  86136. i == null || i({
  86137. params: fH(n),
  86138. event: e
  86139. });
  86140. }), this.emitEffectCache.set(e, {
  86141. params: fH(n),
  86142. event: e
  86143. });
  86144. } else
  86145. throw new TypeError("event must be string or number !");
  86146. }), uc(this, "emitEffect", (e) => {
  86147. const n = this.emitEffectCache.get(e), r = this.subscriptions.get(e);
  86148. n && (r == null || r.forEach((i) => {
  86149. i == null || i({
  86150. ...n
  86151. });
  86152. }));
  86153. }), uc(this, "removeListener", (e) => {
  86154. this.subscriptions.delete(e);
  86155. }), uc(this, "clear", () => {
  86156. this.subscriptions.clear();
  86157. }), this.clear();
  86158. }
  86159. }
  86160. new xrt();
  86161. var wrt = { exports: {} };
  86162. /*!
  86163. * screenfull
  86164. * v5.2.0 - 2021-11-03
  86165. * (c) Sindre Sorhus; MIT License
  86166. */
  86167. (function(t) {
  86168. (function() {
  86169. var e = typeof window < "u" && typeof window.document < "u" ? window.document : {}, n = t.exports, r = function() {
  86170. for (var o, s = [
  86171. [
  86172. "requestFullscreen",
  86173. "exitFullscreen",
  86174. "fullscreenElement",
  86175. "fullscreenEnabled",
  86176. "fullscreenchange",
  86177. "fullscreenerror"
  86178. ],
  86179. // New WebKit
  86180. [
  86181. "webkitRequestFullscreen",
  86182. "webkitExitFullscreen",
  86183. "webkitFullscreenElement",
  86184. "webkitFullscreenEnabled",
  86185. "webkitfullscreenchange",
  86186. "webkitfullscreenerror"
  86187. ],
  86188. // Old WebKit
  86189. [
  86190. "webkitRequestFullScreen",
  86191. "webkitCancelFullScreen",
  86192. "webkitCurrentFullScreenElement",
  86193. "webkitCancelFullScreen",
  86194. "webkitfullscreenchange",
  86195. "webkitfullscreenerror"
  86196. ],
  86197. [
  86198. "mozRequestFullScreen",
  86199. "mozCancelFullScreen",
  86200. "mozFullScreenElement",
  86201. "mozFullScreenEnabled",
  86202. "mozfullscreenchange",
  86203. "mozfullscreenerror"
  86204. ],
  86205. [
  86206. "msRequestFullscreen",
  86207. "msExitFullscreen",
  86208. "msFullscreenElement",
  86209. "msFullscreenEnabled",
  86210. "MSFullscreenChange",
  86211. "MSFullscreenError"
  86212. ]
  86213. ], l = 0, u = s.length, c = {}; l < u; l++)
  86214. if (o = s[l], o && o[1] in e) {
  86215. for (l = 0; l < o.length; l++)
  86216. c[s[0][l]] = o[l];
  86217. return c;
  86218. }
  86219. return !1;
  86220. }(), i = {
  86221. change: r.fullscreenchange,
  86222. error: r.fullscreenerror
  86223. }, a = {
  86224. request: function(o, s) {
  86225. return new Promise((function(l, u) {
  86226. var c = (function() {
  86227. this.off("change", c), l();
  86228. }).bind(this);
  86229. this.on("change", c), o = o || e.documentElement;
  86230. var f = o[r.requestFullscreen](s);
  86231. f instanceof Promise && f.then(c).catch(u);
  86232. }).bind(this));
  86233. },
  86234. exit: function() {
  86235. return new Promise((function(o, s) {
  86236. if (!this.isFullscreen) {
  86237. o();
  86238. return;
  86239. }
  86240. var l = (function() {
  86241. this.off("change", l), o();
  86242. }).bind(this);
  86243. this.on("change", l);
  86244. var u = e[r.exitFullscreen]();
  86245. u instanceof Promise && u.then(l).catch(s);
  86246. }).bind(this));
  86247. },
  86248. toggle: function(o, s) {
  86249. return this.isFullscreen ? this.exit() : this.request(o, s);
  86250. },
  86251. onchange: function(o) {
  86252. this.on("change", o);
  86253. },
  86254. onerror: function(o) {
  86255. this.on("error", o);
  86256. },
  86257. on: function(o, s) {
  86258. var l = i[o];
  86259. l && e.addEventListener(l, s, !1);
  86260. },
  86261. off: function(o, s) {
  86262. var l = i[o];
  86263. l && e.removeEventListener(l, s, !1);
  86264. },
  86265. raw: r
  86266. };
  86267. if (!r) {
  86268. n ? t.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 };
  86269. return;
  86270. }
  86271. Object.defineProperties(a, {
  86272. isFullscreen: {
  86273. get: function() {
  86274. return !!e[r.fullscreenElement];
  86275. }
  86276. },
  86277. element: {
  86278. enumerable: !0,
  86279. get: function() {
  86280. return e[r.fullscreenElement];
  86281. }
  86282. },
  86283. isEnabled: {
  86284. enumerable: !0,
  86285. get: function() {
  86286. return !!e[r.fullscreenEnabled];
  86287. }
  86288. }
  86289. }), n ? t.exports = a : window.screenfull = a;
  86290. })();
  86291. })(wrt);
  86292. var Crt = "__lodash_hash_undefined__";
  86293. function Trt(t) {
  86294. return this.__data__.set(t, Crt), this;
  86295. }
  86296. var Prt = Trt;
  86297. function $rt(t) {
  86298. return this.__data__.has(t);
  86299. }
  86300. var Art = $rt, Ert = Tie, Mrt = Prt, Irt = Art;
  86301. function eM(t) {
  86302. var e = -1, n = t == null ? 0 : t.length;
  86303. for (this.__data__ = new Ert(); ++e < n; )
  86304. this.add(t[e]);
  86305. }
  86306. eM.prototype.add = eM.prototype.push = Mrt;
  86307. eM.prototype.has = Irt;
  86308. var dH = ww, hH = dH ? dH.prototype : void 0;
  86309. hH && hH.valueOf;
  86310. var Drt = FL, Rrt = Cw;
  86311. function krt(t, e, n) {
  86312. (n !== void 0 && !Rrt(t[e], n) || n === void 0 && !(e in t)) && Drt(t, e, n);
  86313. }
  86314. var Xie = krt;
  86315. function Lrt(t) {
  86316. return function(e, n, r) {
  86317. for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
  86318. var l = o[t ? s : ++i];
  86319. if (n(a[l], l, a) === !1)
  86320. break;
  86321. }
  86322. return e;
  86323. };
  86324. }
  86325. var Nrt = Lrt, Brt = Nrt, zrt = Brt(), Vrt = zrt, Frt = Mw, Wrt = Au;
  86326. function Qrt(t) {
  86327. return Wrt(t) && Frt(t);
  86328. }
  86329. var Hrt = Qrt, Grt = $p, jrt = UL, Zrt = Au, Urt = "[object Object]", Xrt = Function.prototype, Yrt = Object.prototype, Yie = Xrt.toString, qrt = Yrt.hasOwnProperty, Krt = Yie.call(Object);
  86330. function Jrt(t) {
  86331. if (!Zrt(t) || Grt(t) != Urt)
  86332. return !1;
  86333. var e = jrt(t);
  86334. if (e === null)
  86335. return !0;
  86336. var n = qrt.call(e, "constructor") && e.constructor;
  86337. return typeof n == "function" && n instanceof n && Yie.call(n) == Krt;
  86338. }
  86339. var eit = Jrt;
  86340. function tit(t, e) {
  86341. if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
  86342. return t[e];
  86343. }
  86344. var qie = tit, nit = ty, rit = ny;
  86345. function iit(t) {
  86346. return nit(t, rit(t));
  86347. }
  86348. var ait = iit, pH = Xie, oit = Nie, sit = Hie, lit = Bie, uit = Gie, vH = Mie, gH = Ew, cit = Hrt, fit = WL, dit = zL, hit = go, pit = eit, vit = Rie, mH = qie, git = ait;
  86349. function mit(t, e, n, r, i, a, o) {
  86350. var s = mH(t, n), l = mH(e, n), u = o.get(l);
  86351. if (u) {
  86352. pH(t, n, u);
  86353. return;
  86354. }
  86355. var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  86356. if (f) {
  86357. var d = gH(l), h = !d && fit(l), p = !d && !h && vit(l);
  86358. c = l, d || h || p ? gH(s) ? c = s : cit(s) ? c = lit(s) : h ? (f = !1, c = oit(l, !0)) : p ? (f = !1, c = sit(l, !0)) : c = [] : pit(l) || vH(l) ? (c = s, vH(s) ? c = git(s) : (!hit(s) || dit(s)) && (c = uit(l))) : f = !1;
  86359. }
  86360. f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), pH(t, n, c);
  86361. }
  86362. var yit = mit, bit = Pie, _it = Xie, Oit = Vrt, Sit = yit, xit = go, wit = ny, Cit = qie;
  86363. function Kie(t, e, n, r, i) {
  86364. t !== e && Oit(e, function(a, o) {
  86365. if (i || (i = new bit()), xit(a))
  86366. Sit(t, e, o, n, Kie, r, i);
  86367. else {
  86368. var s = r ? r(Cit(t, o), a, o + "", t, e, i) : void 0;
  86369. s === void 0 && (s = a), _it(t, o, s);
  86370. }
  86371. }, wit);
  86372. }
  86373. var Tit = Kie;
  86374. function Pit(t) {
  86375. return t;
  86376. }
  86377. var Jie = Pit;
  86378. function $it(t, e, n) {
  86379. switch (n.length) {
  86380. case 0:
  86381. return t.call(e);
  86382. case 1:
  86383. return t.call(e, n[0]);
  86384. case 2:
  86385. return t.call(e, n[0], n[1]);
  86386. case 3:
  86387. return t.call(e, n[0], n[1], n[2]);
  86388. }
  86389. return t.apply(e, n);
  86390. }
  86391. var Ait = $it, Eit = Ait, yH = Math.max;
  86392. function Mit(t, e, n) {
  86393. return e = yH(e === void 0 ? t.length - 1 : e, 0), function() {
  86394. for (var r = arguments, i = -1, a = yH(r.length - e, 0), o = Array(a); ++i < a; )
  86395. o[i] = r[e + i];
  86396. i = -1;
  86397. for (var s = Array(e + 1); ++i < e; )
  86398. s[i] = r[i];
  86399. return s[e] = n(o), Eit(t, this, s);
  86400. };
  86401. }
  86402. var Iit = Mit;
  86403. function Dit(t) {
  86404. return function() {
  86405. return t;
  86406. };
  86407. }
  86408. var Rit = Dit, kit = Rit, bH = $ie, Lit = Jie, Nit = bH ? function(t, e) {
  86409. return bH(t, "toString", {
  86410. configurable: !0,
  86411. enumerable: !1,
  86412. value: kit(e),
  86413. writable: !0
  86414. });
  86415. } : Lit, Bit = Nit, zit = 800, Vit = 16, Fit = Date.now;
  86416. function Wit(t) {
  86417. var e = 0, n = 0;
  86418. return function() {
  86419. var r = Fit(), i = Vit - (r - n);
  86420. if (n = r, i > 0) {
  86421. if (++e >= zit)
  86422. return arguments[0];
  86423. } else
  86424. e = 0;
  86425. return t.apply(void 0, arguments);
  86426. };
  86427. }
  86428. var Qit = Wit, Hit = Bit, Git = Qit, jit = Git(Hit), Zit = jit, Uit = Jie, Xit = Iit, Yit = Zit;
  86429. function qit(t, e) {
  86430. return Yit(Xit(t, e, Uit), t + "");
  86431. }
  86432. var Kit = qit, Jit = Cw, eat = Mw, tat = Iie, nat = go;
  86433. function rat(t, e, n) {
  86434. if (!nat(n))
  86435. return !1;
  86436. var r = typeof e;
  86437. return (r == "number" ? eat(n) && tat(e, n.length) : r == "string" && e in n) ? Jit(n[e], t) : !1;
  86438. }
  86439. var iat = rat, aat = Kit, oat = iat;
  86440. function sat(t) {
  86441. return aat(function(e, n) {
  86442. var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
  86443. for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && oat(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
  86444. var s = n[r];
  86445. s && t(e, s, r, a);
  86446. }
  86447. return e;
  86448. });
  86449. }
  86450. var lat = sat, uat = Tit, cat = lat;
  86451. cat(function(t, e, n) {
  86452. uat(t, e, n);
  86453. });
  86454. const qL = (t) => {
  86455. var d, h;
  86456. const e = t.dataSource || {}, n = U(), r = U(), i = U((d = e == null ? void 0 : e.data) == null ? void 0 : d.series), a = L(() => async () => await fetch(t.dataSource.url, {
  86457. method: t.dataSource.method
  86458. }).then((p) => p.json())), { run: o, refresh: s, cancel: l, data: u, loading: c } = yXe(a.value, {
  86459. defaultParams: t.dataSource.params,
  86460. manual: !0,
  86461. pollingInterval: (((h = t.dataSource) == null ? void 0 : h.refreshTime) || 0) * 1e3,
  86462. // 刷新时间
  86463. onError: (p) => {
  86464. console.error(p), $h.error(t.dataSource.url + "请求失败");
  86465. }
  86466. });
  86467. return t.dataSource.sourceType === Ri.API && o(), se(
  86468. () => u.value,
  86469. async (p) => {
  86470. if (p && t.dataSource.sourceType === Ri.API) {
  86471. let v = p;
  86472. t.dataSource.dataProcess && (v = await IZe(t.dataSource.dataProcess, JSON.stringify(p))), n.value = v.xAxis || { data: v.xData }, r.value = v.yAxis || { data: v.yData }, i.value = v.series;
  86473. }
  86474. },
  86475. {
  86476. deep: !0
  86477. }
  86478. ), se(
  86479. () => [
  86480. t.dataSource.sourceType,
  86481. t.dataSource.method
  86482. ],
  86483. () => {
  86484. if (t.dataSource.sourceType === Ri.API)
  86485. s();
  86486. else {
  86487. l();
  86488. const p = t.dataSource || {}, { xData: v, yData: g, series: m } = (p == null ? void 0 : p.data) || {};
  86489. v && (n.value = { data: v }), g && (r.value = { data: g }), m.value = m;
  86490. }
  86491. },
  86492. {
  86493. deep: !0
  86494. }
  86495. ), {
  86496. options: L(() => {
  86497. var m;
  86498. const p = wU(t, [
  86499. "width",
  86500. "height",
  86501. "dataSource"
  86502. ]), v = (p == null ? void 0 : p.label) || {}, g = SU(
  86503. {
  86504. xAxis: n.value,
  86505. yAxis: r.value,
  86506. series: (m = i.value) == null ? void 0 : m.map((y) => {
  86507. var _;
  86508. const b = ((_ = p.series) == null ? void 0 : _[y.type]) || {};
  86509. return {
  86510. ...v,
  86511. ...y,
  86512. ...b
  86513. };
  86514. })
  86515. },
  86516. p
  86517. );
  86518. return console.log("option result:", g), g;
  86519. }),
  86520. loading: c
  86521. };
  86522. }, Hm = /* @__PURE__ */ te({
  86523. __name: "BasicLine",
  86524. props: LL,
  86525. setup(t) {
  86526. const e = t, { options: n, loading: r } = qL(e);
  86527. return (i, a) => (pe(), je(DL, {
  86528. width: i.width,
  86529. height: i.height,
  86530. "echarts-options": B(n),
  86531. loading: B(r)
  86532. }, null, 8, ["width", "height", "echarts-options", "loading"]));
  86533. }
  86534. });
  86535. class Ft {
  86536. /**
  86537. Get the line description around the given position.
  86538. */
  86539. lineAt(e) {
  86540. if (e < 0 || e > this.length)
  86541. throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
  86542. return this.lineInner(e, !1, 1, 0);
  86543. }
  86544. /**
  86545. Get the description for the given (1-based) line number.
  86546. */
  86547. line(e) {
  86548. if (e < 1 || e > this.lines)
  86549. throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
  86550. return this.lineInner(e, !0, 1, 0);
  86551. }
  86552. /**
  86553. Replace a range of the text with the given content.
  86554. */
  86555. replace(e, n, r) {
  86556. [e, n] = Zh(this, e, n);
  86557. let i = [];
  86558. return this.decompose(
  86559. 0,
  86560. e,
  86561. i,
  86562. 2
  86563. /* Open.To */
  86564. ), r.length && r.decompose(
  86565. 0,
  86566. r.length,
  86567. i,
  86568. 3
  86569. /* Open.To */
  86570. ), this.decompose(
  86571. n,
  86572. this.length,
  86573. i,
  86574. 1
  86575. /* Open.From */
  86576. ), No.from(i, this.length - (n - e) + r.length);
  86577. }
  86578. /**
  86579. Append another document to this one.
  86580. */
  86581. append(e) {
  86582. return this.replace(this.length, this.length, e);
  86583. }
  86584. /**
  86585. Retrieve the text between the given points.
  86586. */
  86587. slice(e, n = this.length) {
  86588. [e, n] = Zh(this, e, n);
  86589. let r = [];
  86590. return this.decompose(e, n, r, 0), No.from(r, n - e);
  86591. }
  86592. /**
  86593. Test whether this text is equal to another instance.
  86594. */
  86595. eq(e) {
  86596. if (e == this)
  86597. return !0;
  86598. if (e.length != this.length || e.lines != this.lines)
  86599. return !1;
  86600. let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), i = new Vg(this), a = new Vg(e);
  86601. for (let o = n, s = n; ; ) {
  86602. if (i.next(o), a.next(o), o = 0, i.lineBreak != a.lineBreak || i.done != a.done || i.value != a.value)
  86603. return !1;
  86604. if (s += i.value.length, i.done || s >= r)
  86605. return !0;
  86606. }
  86607. }
  86608. /**
  86609. Iterate over the text. When `dir` is `-1`, iteration happens
  86610. from end to start. This will return lines and the breaks between
  86611. them as separate strings.
  86612. */
  86613. iter(e = 1) {
  86614. return new Vg(this, e);
  86615. }
  86616. /**
  86617. Iterate over a range of the text. When `from` > `to`, the
  86618. iterator will run in reverse.
  86619. */
  86620. iterRange(e, n = this.length) {
  86621. return new eae(this, e, n);
  86622. }
  86623. /**
  86624. Return a cursor that iterates over the given range of lines,
  86625. _without_ returning the line breaks between, and yielding empty
  86626. strings for empty lines.
  86627. When `from` and `to` are given, they should be 1-based line numbers.
  86628. */
  86629. iterLines(e, n) {
  86630. let r;
  86631. if (e == null)
  86632. r = this.iter();
  86633. else {
  86634. n == null && (n = this.lines + 1);
  86635. let i = this.line(e).from;
  86636. r = this.iterRange(i, Math.max(i, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to));
  86637. }
  86638. return new tae(r);
  86639. }
  86640. /**
  86641. Return the document as a string, using newline characters to
  86642. separate lines.
  86643. */
  86644. toString() {
  86645. return this.sliceString(0);
  86646. }
  86647. /**
  86648. Convert the document to an array of lines (which can be
  86649. deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
  86650. */
  86651. toJSON() {
  86652. let e = [];
  86653. return this.flatten(e), e;
  86654. }
  86655. /**
  86656. @internal
  86657. */
  86658. constructor() {
  86659. }
  86660. /**
  86661. Create a `Text` instance for the given array of lines.
  86662. */
  86663. static of(e) {
  86664. if (e.length == 0)
  86665. throw new RangeError("A document must have at least one line");
  86666. return e.length == 1 && !e[0] ? Ft.empty : e.length <= 32 ? new Mn(e) : No.from(Mn.split(e, []));
  86667. }
  86668. }
  86669. class Mn extends Ft {
  86670. constructor(e, n = fat(e)) {
  86671. super(), this.text = e, this.length = n;
  86672. }
  86673. get lines() {
  86674. return this.text.length;
  86675. }
  86676. get children() {
  86677. return null;
  86678. }
  86679. lineInner(e, n, r, i) {
  86680. for (let a = 0; ; a++) {
  86681. let o = this.text[a], s = i + o.length;
  86682. if ((n ? r : s) >= e)
  86683. return new dat(i, s, r, o);
  86684. i = s + 1, r++;
  86685. }
  86686. }
  86687. decompose(e, n, r, i) {
  86688. let a = e <= 0 && n >= this.length ? this : new Mn(_H(this.text, e, n), Math.min(n, this.length) - Math.max(0, e));
  86689. if (i & 1) {
  86690. let o = r.pop(), s = n1(a.text, o.text.slice(), 0, a.length);
  86691. if (s.length <= 32)
  86692. r.push(new Mn(s, o.length + a.length));
  86693. else {
  86694. let l = s.length >> 1;
  86695. r.push(new Mn(s.slice(0, l)), new Mn(s.slice(l)));
  86696. }
  86697. } else
  86698. r.push(a);
  86699. }
  86700. replace(e, n, r) {
  86701. if (!(r instanceof Mn))
  86702. return super.replace(e, n, r);
  86703. [e, n] = Zh(this, e, n);
  86704. let i = n1(this.text, n1(r.text, _H(this.text, 0, e)), n), a = this.length + r.length - (n - e);
  86705. return i.length <= 32 ? new Mn(i, a) : No.from(Mn.split(i, []), a);
  86706. }
  86707. sliceString(e, n = this.length, r = `
  86708. `) {
  86709. [e, n] = Zh(this, e, n);
  86710. let i = "";
  86711. for (let a = 0, o = 0; a <= n && o < this.text.length; o++) {
  86712. let s = this.text[o], l = a + s.length;
  86713. a > e && o && (i += r), e < l && n > a && (i += s.slice(Math.max(0, e - a), n - a)), a = l + 1;
  86714. }
  86715. return i;
  86716. }
  86717. flatten(e) {
  86718. for (let n of this.text)
  86719. e.push(n);
  86720. }
  86721. scanIdentical() {
  86722. return 0;
  86723. }
  86724. static split(e, n) {
  86725. let r = [], i = -1;
  86726. for (let a of e)
  86727. r.push(a), i += a.length + 1, r.length == 32 && (n.push(new Mn(r, i)), r = [], i = -1);
  86728. return i > -1 && n.push(new Mn(r, i)), n;
  86729. }
  86730. }
  86731. class No extends Ft {
  86732. constructor(e, n) {
  86733. super(), this.children = e, this.length = n, this.lines = 0;
  86734. for (let r of e)
  86735. this.lines += r.lines;
  86736. }
  86737. lineInner(e, n, r, i) {
  86738. for (let a = 0; ; a++) {
  86739. let o = this.children[a], s = i + o.length, l = r + o.lines - 1;
  86740. if ((n ? l : s) >= e)
  86741. return o.lineInner(e, n, r, i);
  86742. i = s + 1, r = l + 1;
  86743. }
  86744. }
  86745. decompose(e, n, r, i) {
  86746. for (let a = 0, o = 0; o <= n && a < this.children.length; a++) {
  86747. let s = this.children[a], l = o + s.length;
  86748. if (e <= l && n >= o) {
  86749. let u = i & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0));
  86750. o >= e && l <= n && !u ? r.push(s) : s.decompose(e - o, n - o, r, u);
  86751. }
  86752. o = l + 1;
  86753. }
  86754. }
  86755. replace(e, n, r) {
  86756. if ([e, n] = Zh(this, e, n), r.lines < this.lines)
  86757. for (let i = 0, a = 0; i < this.children.length; i++) {
  86758. let o = this.children[i], s = a + o.length;
  86759. if (e >= a && n <= s) {
  86760. let l = o.replace(e - a, n - a, r), u = this.lines - o.lines + l.lines;
  86761. if (l.lines < u >> 4 && l.lines > u >> 6) {
  86762. let c = this.children.slice();
  86763. return c[i] = l, new No(c, this.length - (n - e) + r.length);
  86764. }
  86765. return super.replace(a, s, l);
  86766. }
  86767. a = s + 1;
  86768. }
  86769. return super.replace(e, n, r);
  86770. }
  86771. sliceString(e, n = this.length, r = `
  86772. `) {
  86773. [e, n] = Zh(this, e, n);
  86774. let i = "";
  86775. for (let a = 0, o = 0; a < this.children.length && o <= n; a++) {
  86776. let s = this.children[a], l = o + s.length;
  86777. o > e && a && (i += r), e < l && n > o && (i += s.sliceString(e - o, n - o, r)), o = l + 1;
  86778. }
  86779. return i;
  86780. }
  86781. flatten(e) {
  86782. for (let n of this.children)
  86783. n.flatten(e);
  86784. }
  86785. scanIdentical(e, n) {
  86786. if (!(e instanceof No))
  86787. return 0;
  86788. let r = 0, [i, a, o, s] = n > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1];
  86789. for (; ; i += n, a += n) {
  86790. if (i == o || a == s)
  86791. return r;
  86792. let l = this.children[i], u = e.children[a];
  86793. if (l != u)
  86794. return r + l.scanIdentical(u, n);
  86795. r += l.length + 1;
  86796. }
  86797. }
  86798. static from(e, n = e.reduce((r, i) => r + i.length + 1, -1)) {
  86799. let r = 0;
  86800. for (let h of e)
  86801. r += h.lines;
  86802. if (r < 32) {
  86803. let h = [];
  86804. for (let p of e)
  86805. p.flatten(h);
  86806. return new Mn(h, n);
  86807. }
  86808. let i = Math.max(
  86809. 32,
  86810. r >> 5
  86811. /* Tree.BranchShift */
  86812. ), a = i << 1, o = i >> 1, s = [], l = 0, u = -1, c = [];
  86813. function f(h) {
  86814. let p;
  86815. if (h.lines > a && h instanceof No)
  86816. for (let v of h.children)
  86817. f(v);
  86818. else h.lines > o && (l > o || !l) ? (d(), s.push(h)) : h instanceof Mn && l && (p = c[c.length - 1]) instanceof Mn && h.lines + p.lines <= 32 ? (l += h.lines, u += h.length + 1, c[c.length - 1] = new Mn(p.text.concat(h.text), p.length + 1 + h.length)) : (l + h.lines > i && d(), l += h.lines, u += h.length + 1, c.push(h));
  86819. }
  86820. function d() {
  86821. l != 0 && (s.push(c.length == 1 ? c[0] : No.from(c, u)), u = -1, l = c.length = 0);
  86822. }
  86823. for (let h of e)
  86824. f(h);
  86825. return d(), s.length == 1 ? s[0] : new No(s, n);
  86826. }
  86827. }
  86828. Ft.empty = /* @__PURE__ */ new Mn([""], 0);
  86829. function fat(t) {
  86830. let e = -1;
  86831. for (let n of t)
  86832. e += n.length + 1;
  86833. return e;
  86834. }
  86835. function n1(t, e, n = 0, r = 1e9) {
  86836. for (let i = 0, a = 0, o = !0; a < t.length && i <= r; a++) {
  86837. let s = t[a], l = i + s.length;
  86838. l >= n && (l > r && (s = s.slice(0, r - i)), i < n && (s = s.slice(n - i)), o ? (e[e.length - 1] += s, o = !1) : e.push(s)), i = l + 1;
  86839. }
  86840. return e;
  86841. }
  86842. function _H(t, e, n) {
  86843. return n1(t, [""], e, n);
  86844. }
  86845. class Vg {
  86846. constructor(e, n = 1) {
  86847. this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof Mn ? e.text.length : e.children.length) << 1];
  86848. }
  86849. nextInner(e, n) {
  86850. for (this.done = this.lineBreak = !1; ; ) {
  86851. let r = this.nodes.length - 1, i = this.nodes[r], a = this.offsets[r], o = a >> 1, s = i instanceof Mn ? i.text.length : i.children.length;
  86852. if (o == (n > 0 ? s : 0)) {
  86853. if (r == 0)
  86854. return this.done = !0, this.value = "", this;
  86855. n > 0 && this.offsets[r - 1]++, this.nodes.pop(), this.offsets.pop();
  86856. } else if ((a & 1) == (n > 0 ? 0 : 1)) {
  86857. if (this.offsets[r] += n, e == 0)
  86858. return this.lineBreak = !0, this.value = `
  86859. `, this;
  86860. e--;
  86861. } else if (i instanceof Mn) {
  86862. let l = i.text[o + (n < 0 ? -1 : 0)];
  86863. if (this.offsets[r] += n, l.length > Math.max(0, e))
  86864. return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this;
  86865. e -= l.length;
  86866. } else {
  86867. let l = i.children[o + (n < 0 ? -1 : 0)];
  86868. e > l.length ? (e -= l.length, this.offsets[r] += n) : (n < 0 && this.offsets[r]--, this.nodes.push(l), this.offsets.push(n > 0 ? 1 : (l instanceof Mn ? l.text.length : l.children.length) << 1));
  86869. }
  86870. }
  86871. }
  86872. next(e = 0) {
  86873. return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
  86874. }
  86875. }
  86876. class eae {
  86877. constructor(e, n, r) {
  86878. this.value = "", this.done = !1, this.cursor = new Vg(e, n > r ? -1 : 1), this.pos = n > r ? e.length : 0, this.from = Math.min(n, r), this.to = Math.max(n, r);
  86879. }
  86880. nextInner(e, n) {
  86881. if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
  86882. return this.value = "", this.done = !0, this;
  86883. e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos);
  86884. let r = n < 0 ? this.pos - this.from : this.to - this.pos;
  86885. e > r && (e = r), r -= e;
  86886. let { value: i } = this.cursor.next(e);
  86887. return this.pos += (i.length + e) * n, this.value = i.length <= r ? i : n < 0 ? i.slice(i.length - r) : i.slice(0, r), this.done = !this.value, this;
  86888. }
  86889. next(e = 0) {
  86890. return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir);
  86891. }
  86892. get lineBreak() {
  86893. return this.cursor.lineBreak && this.value != "";
  86894. }
  86895. }
  86896. class tae {
  86897. constructor(e) {
  86898. this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
  86899. }
  86900. next(e = 0) {
  86901. let { done: n, lineBreak: r, value: i } = this.inner.next(e);
  86902. return n && this.afterBreak ? (this.value = "", this.afterBreak = !1) : n ? (this.done = !0, this.value = "") : r ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = i, this.afterBreak = !1), this;
  86903. }
  86904. get lineBreak() {
  86905. return !1;
  86906. }
  86907. }
  86908. typeof Symbol < "u" && (Ft.prototype[Symbol.iterator] = function() {
  86909. return this.iter();
  86910. }, Vg.prototype[Symbol.iterator] = eae.prototype[Symbol.iterator] = tae.prototype[Symbol.iterator] = function() {
  86911. return this;
  86912. });
  86913. class dat {
  86914. /**
  86915. @internal
  86916. */
  86917. constructor(e, n, r, i) {
  86918. this.from = e, this.to = n, this.number = r, this.text = i;
  86919. }
  86920. /**
  86921. The length of the line (not including any line break after it).
  86922. */
  86923. get length() {
  86924. return this.to - this.from;
  86925. }
  86926. }
  86927. function Zh(t, e, n) {
  86928. return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))];
  86929. }
  86930. let oh = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1);
  86931. for (let t = 1; t < oh.length; t++)
  86932. oh[t] += oh[t - 1];
  86933. function hat(t) {
  86934. for (let e = 1; e < oh.length; e += 2)
  86935. if (oh[e] > t)
  86936. return oh[e - 1] <= t;
  86937. return !1;
  86938. }
  86939. function OH(t) {
  86940. return t >= 127462 && t <= 127487;
  86941. }
  86942. const SH = 8205;
  86943. function _r(t, e, n = !0, r = !0) {
  86944. return (n ? nae : pat)(t, e, r);
  86945. }
  86946. function nae(t, e, n) {
  86947. if (e == t.length)
  86948. return e;
  86949. e && rae(t.charCodeAt(e)) && iae(t.charCodeAt(e - 1)) && e--;
  86950. let r = gr(t, e);
  86951. for (e += ga(r); e < t.length; ) {
  86952. let i = gr(t, e);
  86953. if (r == SH || i == SH || n && hat(i))
  86954. e += ga(i), r = i;
  86955. else if (OH(i)) {
  86956. let a = 0, o = e - 2;
  86957. for (; o >= 0 && OH(gr(t, o)); )
  86958. a++, o -= 2;
  86959. if (a % 2 == 0)
  86960. break;
  86961. e += 2;
  86962. } else
  86963. break;
  86964. }
  86965. return e;
  86966. }
  86967. function pat(t, e, n) {
  86968. for (; e > 0; ) {
  86969. let r = nae(t, e - 2, n);
  86970. if (r < e)
  86971. return r;
  86972. e--;
  86973. }
  86974. return 0;
  86975. }
  86976. function rae(t) {
  86977. return t >= 56320 && t < 57344;
  86978. }
  86979. function iae(t) {
  86980. return t >= 55296 && t < 56320;
  86981. }
  86982. function gr(t, e) {
  86983. let n = t.charCodeAt(e);
  86984. if (!iae(n) || e + 1 == t.length)
  86985. return n;
  86986. let r = t.charCodeAt(e + 1);
  86987. return rae(r) ? (n - 55296 << 10) + (r - 56320) + 65536 : n;
  86988. }
  86989. function KL(t) {
  86990. return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
  86991. }
  86992. function ga(t) {
  86993. return t < 65536 ? 1 : 2;
  86994. }
  86995. const tM = /\r\n?|\n/;
  86996. var yr = /* @__PURE__ */ function(t) {
  86997. return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t;
  86998. }(yr || (yr = {}));
  86999. class Yo {
  87000. // Sections are encoded as pairs of integers. The first is the
  87001. // length in the current document, and the second is -1 for
  87002. // unaffected sections, and the length of the replacement content
  87003. // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
  87004. // 0), and a replacement two positive numbers.
  87005. /**
  87006. @internal
  87007. */
  87008. constructor(e) {
  87009. this.sections = e;
  87010. }
  87011. /**
  87012. The length of the document before the change.
  87013. */
  87014. get length() {
  87015. let e = 0;
  87016. for (let n = 0; n < this.sections.length; n += 2)
  87017. e += this.sections[n];
  87018. return e;
  87019. }
  87020. /**
  87021. The length of the document after the change.
  87022. */
  87023. get newLength() {
  87024. let e = 0;
  87025. for (let n = 0; n < this.sections.length; n += 2) {
  87026. let r = this.sections[n + 1];
  87027. e += r < 0 ? this.sections[n] : r;
  87028. }
  87029. return e;
  87030. }
  87031. /**
  87032. False when there are actual changes in this set.
  87033. */
  87034. get empty() {
  87035. return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
  87036. }
  87037. /**
  87038. Iterate over the unchanged parts left by these changes. `posA`
  87039. provides the position of the range in the old document, `posB`
  87040. the new position in the changed document.
  87041. */
  87042. iterGaps(e) {
  87043. for (let n = 0, r = 0, i = 0; n < this.sections.length; ) {
  87044. let a = this.sections[n++], o = this.sections[n++];
  87045. o < 0 ? (e(r, i, a), i += a) : i += o, r += a;
  87046. }
  87047. }
  87048. /**
  87049. Iterate over the ranges changed by these changes. (See
  87050. [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
  87051. variant that also provides you with the inserted text.)
  87052. `fromA`/`toA` provides the extent of the change in the starting
  87053. document, `fromB`/`toB` the extent of the replacement in the
  87054. changed document.
  87055. When `individual` is true, adjacent changes (which are kept
  87056. separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
  87057. reported separately.
  87058. */
  87059. iterChangedRanges(e, n = !1) {
  87060. nM(this, e, n);
  87061. }
  87062. /**
  87063. Get a description of the inverted form of these changes.
  87064. */
  87065. get invertedDesc() {
  87066. let e = [];
  87067. for (let n = 0; n < this.sections.length; ) {
  87068. let r = this.sections[n++], i = this.sections[n++];
  87069. i < 0 ? e.push(r, i) : e.push(i, r);
  87070. }
  87071. return new Yo(e);
  87072. }
  87073. /**
  87074. Compute the combined effect of applying another set of changes
  87075. after this one. The length of the document after this set should
  87076. match the length before `other`.
  87077. */
  87078. composeDesc(e) {
  87079. return this.empty ? e : e.empty ? this : aae(this, e);
  87080. }
  87081. /**
  87082. Map this description, which should start with the same document
  87083. as `other`, over another set of changes, so that it can be
  87084. applied after it. When `before` is true, map as if the changes
  87085. in `other` happened before the ones in `this`.
  87086. */
  87087. mapDesc(e, n = !1) {
  87088. return e.empty ? this : rM(this, e, n);
  87089. }
  87090. mapPos(e, n = -1, r = yr.Simple) {
  87091. let i = 0, a = 0;
  87092. for (let o = 0; o < this.sections.length; ) {
  87093. let s = this.sections[o++], l = this.sections[o++], u = i + s;
  87094. if (l < 0) {
  87095. if (u > e)
  87096. return a + (e - i);
  87097. a += s;
  87098. } else {
  87099. if (r != yr.Simple && u >= e && (r == yr.TrackDel && i < e && u > e || r == yr.TrackBefore && i < e || r == yr.TrackAfter && u > e))
  87100. return null;
  87101. if (u > e || u == e && n < 0 && !s)
  87102. return e == i || n < 0 ? a : a + l;
  87103. a += l;
  87104. }
  87105. i = u;
  87106. }
  87107. if (e > i)
  87108. throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
  87109. return a;
  87110. }
  87111. /**
  87112. Check whether these changes touch a given range. When one of the
  87113. changes entirely covers the range, the string `"cover"` is
  87114. returned.
  87115. */
  87116. touchesRange(e, n = e) {
  87117. for (let r = 0, i = 0; r < this.sections.length && i <= n; ) {
  87118. let a = this.sections[r++], o = this.sections[r++], s = i + a;
  87119. if (o >= 0 && i <= n && s >= e)
  87120. return i < e && s > n ? "cover" : !0;
  87121. i = s;
  87122. }
  87123. return !1;
  87124. }
  87125. /**
  87126. @internal
  87127. */
  87128. toString() {
  87129. let e = "";
  87130. for (let n = 0; n < this.sections.length; ) {
  87131. let r = this.sections[n++], i = this.sections[n++];
  87132. e += (e ? " " : "") + r + (i >= 0 ? ":" + i : "");
  87133. }
  87134. return e;
  87135. }
  87136. /**
  87137. Serialize this change desc to a JSON-representable value.
  87138. */
  87139. toJSON() {
  87140. return this.sections;
  87141. }
  87142. /**
  87143. Create a change desc from its JSON representation (as produced
  87144. by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
  87145. */
  87146. static fromJSON(e) {
  87147. if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number"))
  87148. throw new RangeError("Invalid JSON representation of ChangeDesc");
  87149. return new Yo(e);
  87150. }
  87151. /**
  87152. @internal
  87153. */
  87154. static create(e) {
  87155. return new Yo(e);
  87156. }
  87157. }
  87158. class jn extends Yo {
  87159. constructor(e, n) {
  87160. super(e), this.inserted = n;
  87161. }
  87162. /**
  87163. Apply the changes to a document, returning the modified
  87164. document.
  87165. */
  87166. apply(e) {
  87167. if (this.length != e.length)
  87168. throw new RangeError("Applying change set to a document with the wrong length");
  87169. return nM(this, (n, r, i, a, o) => e = e.replace(i, i + (r - n), o), !1), e;
  87170. }
  87171. mapDesc(e, n = !1) {
  87172. return rM(this, e, n, !0);
  87173. }
  87174. /**
  87175. Given the document as it existed _before_ the changes, return a
  87176. change set that represents the inverse of this set, which could
  87177. be used to go from the document created by the changes back to
  87178. the document as it existed before the changes.
  87179. */
  87180. invert(e) {
  87181. let n = this.sections.slice(), r = [];
  87182. for (let i = 0, a = 0; i < n.length; i += 2) {
  87183. let o = n[i], s = n[i + 1];
  87184. if (s >= 0) {
  87185. n[i] = s, n[i + 1] = o;
  87186. let l = i >> 1;
  87187. for (; r.length < l; )
  87188. r.push(Ft.empty);
  87189. r.push(o ? e.slice(a, a + o) : Ft.empty);
  87190. }
  87191. a += o;
  87192. }
  87193. return new jn(n, r);
  87194. }
  87195. /**
  87196. Combine two subsequent change sets into a single set. `other`
  87197. must start in the document produced by `this`. If `this` goes
  87198. `docA` → `docB` and `other` represents `docB` → `docC`, the
  87199. returned value will represent the change `docA` → `docC`.
  87200. */
  87201. compose(e) {
  87202. return this.empty ? e : e.empty ? this : aae(this, e, !0);
  87203. }
  87204. /**
  87205. Given another change set starting in the same document, maps this
  87206. change set over the other, producing a new change set that can be
  87207. applied to the document produced by applying `other`. When
  87208. `before` is `true`, order changes as if `this` comes before
  87209. `other`, otherwise (the default) treat `other` as coming first.
  87210. Given two changes `A` and `B`, `A.compose(B.map(A))` and
  87211. `B.compose(A.map(B, true))` will produce the same document. This
  87212. provides a basic form of [operational
  87213. transformation](https://en.wikipedia.org/wiki/Operational_transformation),
  87214. and can be used for collaborative editing.
  87215. */
  87216. map(e, n = !1) {
  87217. return e.empty ? this : rM(this, e, n, !0);
  87218. }
  87219. /**
  87220. Iterate over the changed ranges in the document, calling `f` for
  87221. each, with the range in the original document (`fromA`-`toA`)
  87222. and the range that replaces it in the new document
  87223. (`fromB`-`toB`).
  87224. When `individual` is true, adjacent changes are reported
  87225. separately.
  87226. */
  87227. iterChanges(e, n = !1) {
  87228. nM(this, e, n);
  87229. }
  87230. /**
  87231. Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
  87232. set.
  87233. */
  87234. get desc() {
  87235. return Yo.create(this.sections);
  87236. }
  87237. /**
  87238. @internal
  87239. */
  87240. filter(e) {
  87241. let n = [], r = [], i = [], a = new Gm(this);
  87242. e: for (let o = 0, s = 0; ; ) {
  87243. let l = o == e.length ? 1e9 : e[o++];
  87244. for (; s < l || s == l && a.len == 0; ) {
  87245. if (a.done)
  87246. break e;
  87247. let c = Math.min(a.len, l - s);
  87248. Dr(i, c, -1);
  87249. let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
  87250. Dr(n, c, f), f > 0 && Wl(r, n, a.text), a.forward(c), s += c;
  87251. }
  87252. let u = e[o++];
  87253. for (; s < u; ) {
  87254. if (a.done)
  87255. break e;
  87256. let c = Math.min(a.len, u - s);
  87257. Dr(n, c, -1), Dr(i, c, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(c), s += c;
  87258. }
  87259. }
  87260. return {
  87261. changes: new jn(n, r),
  87262. filtered: Yo.create(i)
  87263. };
  87264. }
  87265. /**
  87266. Serialize this change set to a JSON-representable value.
  87267. */
  87268. toJSON() {
  87269. let e = [];
  87270. for (let n = 0; n < this.sections.length; n += 2) {
  87271. let r = this.sections[n], i = this.sections[n + 1];
  87272. i < 0 ? e.push(r) : i == 0 ? e.push([r]) : e.push([r].concat(this.inserted[n >> 1].toJSON()));
  87273. }
  87274. return e;
  87275. }
  87276. /**
  87277. Create a change set for the given changes, for a document of the
  87278. given length, using `lineSep` as line separator.
  87279. */
  87280. static of(e, n, r) {
  87281. let i = [], a = [], o = 0, s = null;
  87282. function l(c = !1) {
  87283. if (!c && !i.length)
  87284. return;
  87285. o < n && Dr(i, n - o, -1);
  87286. let f = new jn(i, a);
  87287. s = s ? s.compose(f.map(s)) : f, i = [], a = [], o = 0;
  87288. }
  87289. function u(c) {
  87290. if (Array.isArray(c))
  87291. for (let f of c)
  87292. u(f);
  87293. else if (c instanceof jn) {
  87294. if (c.length != n)
  87295. throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);
  87296. l(), s = s ? s.compose(c.map(s)) : c;
  87297. } else {
  87298. let { from: f, to: d = f, insert: h } = c;
  87299. if (f > d || f < 0 || d > n)
  87300. throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);
  87301. let p = h ? typeof h == "string" ? Ft.of(h.split(r || tM)) : h : Ft.empty, v = p.length;
  87302. if (f == d && v == 0)
  87303. return;
  87304. f < o && l(), f > o && Dr(i, f - o, -1), Dr(i, d - f, v), Wl(a, i, p), o = d;
  87305. }
  87306. }
  87307. return u(e), l(!s), s;
  87308. }
  87309. /**
  87310. Create an empty changeset of the given length.
  87311. */
  87312. static empty(e) {
  87313. return new jn(e ? [e, -1] : [], []);
  87314. }
  87315. /**
  87316. Create a changeset from its JSON representation (as produced by
  87317. [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
  87318. */
  87319. static fromJSON(e) {
  87320. if (!Array.isArray(e))
  87321. throw new RangeError("Invalid JSON representation of ChangeSet");
  87322. let n = [], r = [];
  87323. for (let i = 0; i < e.length; i++) {
  87324. let a = e[i];
  87325. if (typeof a == "number")
  87326. n.push(a, -1);
  87327. else {
  87328. if (!Array.isArray(a) || typeof a[0] != "number" || a.some((o, s) => s && typeof o != "string"))
  87329. throw new RangeError("Invalid JSON representation of ChangeSet");
  87330. if (a.length == 1)
  87331. n.push(a[0], 0);
  87332. else {
  87333. for (; r.length < i; )
  87334. r.push(Ft.empty);
  87335. r[i] = Ft.of(a.slice(1)), n.push(a[0], r[i].length);
  87336. }
  87337. }
  87338. }
  87339. return new jn(n, r);
  87340. }
  87341. /**
  87342. @internal
  87343. */
  87344. static createSet(e, n) {
  87345. return new jn(e, n);
  87346. }
  87347. }
  87348. function Dr(t, e, n, r = !1) {
  87349. if (e == 0 && n <= 0)
  87350. return;
  87351. let i = t.length - 2;
  87352. i >= 0 && n <= 0 && n == t[i + 1] ? t[i] += e : e == 0 && t[i] == 0 ? t[i + 1] += n : r ? (t[i] += e, t[i + 1] += n) : t.push(e, n);
  87353. }
  87354. function Wl(t, e, n) {
  87355. if (n.length == 0)
  87356. return;
  87357. let r = e.length - 2 >> 1;
  87358. if (r < t.length)
  87359. t[t.length - 1] = t[t.length - 1].append(n);
  87360. else {
  87361. for (; t.length < r; )
  87362. t.push(Ft.empty);
  87363. t.push(n);
  87364. }
  87365. }
  87366. function nM(t, e, n) {
  87367. let r = t.inserted;
  87368. for (let i = 0, a = 0, o = 0; o < t.sections.length; ) {
  87369. let s = t.sections[o++], l = t.sections[o++];
  87370. if (l < 0)
  87371. i += s, a += s;
  87372. else {
  87373. let u = i, c = a, f = Ft.empty;
  87374. for (; u += s, c += l, l && r && (f = f.append(r[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); )
  87375. s = t.sections[o++], l = t.sections[o++];
  87376. e(i, u, a, c, f), i = u, a = c;
  87377. }
  87378. }
  87379. }
  87380. function rM(t, e, n, r = !1) {
  87381. let i = [], a = r ? [] : null, o = new Gm(t), s = new Gm(e);
  87382. for (let l = -1; ; )
  87383. if (o.ins == -1 && s.ins == -1) {
  87384. let u = Math.min(o.len, s.len);
  87385. Dr(i, u, -1), o.forward(u), s.forward(u);
  87386. } else if (s.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (s.len < o.len || s.len == o.len && !n))) {
  87387. let u = s.len;
  87388. for (Dr(i, s.ins, -1); u; ) {
  87389. let c = Math.min(o.len, u);
  87390. o.ins >= 0 && l < o.i && o.len <= c && (Dr(i, 0, o.ins), a && Wl(a, i, o.text), l = o.i), o.forward(c), u -= c;
  87391. }
  87392. s.next();
  87393. } else if (o.ins >= 0) {
  87394. let u = 0, c = o.len;
  87395. for (; c; )
  87396. if (s.ins == -1) {
  87397. let f = Math.min(c, s.len);
  87398. u += f, c -= f, s.forward(f);
  87399. } else if (s.ins == 0 && s.len < c)
  87400. c -= s.len, s.next();
  87401. else
  87402. break;
  87403. Dr(i, u, l < o.i ? o.ins : 0), a && l < o.i && Wl(a, i, o.text), l = o.i, o.forward(o.len - c);
  87404. } else {
  87405. if (o.done && s.done)
  87406. return a ? jn.createSet(i, a) : Yo.create(i);
  87407. throw new Error("Mismatched change set lengths");
  87408. }
  87409. }
  87410. function aae(t, e, n = !1) {
  87411. let r = [], i = n ? [] : null, a = new Gm(t), o = new Gm(e);
  87412. for (let s = !1; ; ) {
  87413. if (a.done && o.done)
  87414. return i ? jn.createSet(r, i) : Yo.create(r);
  87415. if (a.ins == 0)
  87416. Dr(r, a.len, 0, s), a.next();
  87417. else if (o.len == 0 && !o.done)
  87418. Dr(r, 0, o.ins, s), i && Wl(i, r, o.text), o.next();
  87419. else {
  87420. if (a.done || o.done)
  87421. throw new Error("Mismatched change set lengths");
  87422. {
  87423. let l = Math.min(a.len2, o.len), u = r.length;
  87424. if (a.ins == -1) {
  87425. let c = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
  87426. Dr(r, l, c, s), i && c && Wl(i, r, o.text);
  87427. } else o.ins == -1 ? (Dr(r, a.off ? 0 : a.len, l, s), i && Wl(i, r, a.textBit(l))) : (Dr(r, a.off ? 0 : a.len, o.off ? 0 : o.ins, s), i && !o.off && Wl(i, r, o.text));
  87428. s = (a.ins > l || o.ins >= 0 && o.len > l) && (s || r.length > u), a.forward2(l), o.forward(l);
  87429. }
  87430. }
  87431. }
  87432. }
  87433. class Gm {
  87434. constructor(e) {
  87435. this.set = e, this.i = 0, this.next();
  87436. }
  87437. next() {
  87438. let { sections: e } = this.set;
  87439. this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
  87440. }
  87441. get done() {
  87442. return this.ins == -2;
  87443. }
  87444. get len2() {
  87445. return this.ins < 0 ? this.len : this.ins;
  87446. }
  87447. get text() {
  87448. let { inserted: e } = this.set, n = this.i - 2 >> 1;
  87449. return n >= e.length ? Ft.empty : e[n];
  87450. }
  87451. textBit(e) {
  87452. let { inserted: n } = this.set, r = this.i - 2 >> 1;
  87453. return r >= n.length && !e ? Ft.empty : n[r].slice(this.off, e == null ? void 0 : this.off + e);
  87454. }
  87455. forward(e) {
  87456. e == this.len ? this.next() : (this.len -= e, this.off += e);
  87457. }
  87458. forward2(e) {
  87459. this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
  87460. }
  87461. }
  87462. class Wc {
  87463. constructor(e, n, r) {
  87464. this.from = e, this.to = n, this.flags = r;
  87465. }
  87466. /**
  87467. The anchor of the range—the side that doesn't move when you
  87468. extend it.
  87469. */
  87470. get anchor() {
  87471. return this.flags & 32 ? this.to : this.from;
  87472. }
  87473. /**
  87474. The head of the range, which is moved when the range is
  87475. [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
  87476. */
  87477. get head() {
  87478. return this.flags & 32 ? this.from : this.to;
  87479. }
  87480. /**
  87481. True when `anchor` and `head` are at the same position.
  87482. */
  87483. get empty() {
  87484. return this.from == this.to;
  87485. }
  87486. /**
  87487. If this is a cursor that is explicitly associated with the
  87488. character on one of its sides, this returns the side. -1 means
  87489. the character before its position, 1 the character after, and 0
  87490. means no association.
  87491. */
  87492. get assoc() {
  87493. return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
  87494. }
  87495. /**
  87496. The bidirectional text level associated with this cursor, if
  87497. any.
  87498. */
  87499. get bidiLevel() {
  87500. let e = this.flags & 7;
  87501. return e == 7 ? null : e;
  87502. }
  87503. /**
  87504. The goal column (stored vertical offset) associated with a
  87505. cursor. This is used to preserve the vertical position when
  87506. [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
  87507. lines of different length.
  87508. */
  87509. get goalColumn() {
  87510. let e = this.flags >> 6;
  87511. return e == 16777215 ? void 0 : e;
  87512. }
  87513. /**
  87514. Map this range through a change, producing a valid range in the
  87515. updated document.
  87516. */
  87517. map(e, n = -1) {
  87518. let r, i;
  87519. return this.empty ? r = i = e.mapPos(this.from, n) : (r = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), r == this.from && i == this.to ? this : new Wc(r, i, this.flags);
  87520. }
  87521. /**
  87522. Extend this range to cover at least `from` to `to`.
  87523. */
  87524. extend(e, n = e) {
  87525. if (e <= this.anchor && n >= this.anchor)
  87526. return me.range(e, n);
  87527. let r = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n;
  87528. return me.range(this.anchor, r);
  87529. }
  87530. /**
  87531. Compare this range to another range.
  87532. */
  87533. eq(e, n = !1) {
  87534. return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc);
  87535. }
  87536. /**
  87537. Return a JSON-serializable object representing the range.
  87538. */
  87539. toJSON() {
  87540. return { anchor: this.anchor, head: this.head };
  87541. }
  87542. /**
  87543. Convert a JSON representation of a range to a `SelectionRange`
  87544. instance.
  87545. */
  87546. static fromJSON(e) {
  87547. if (!e || typeof e.anchor != "number" || typeof e.head != "number")
  87548. throw new RangeError("Invalid JSON representation for SelectionRange");
  87549. return me.range(e.anchor, e.head);
  87550. }
  87551. /**
  87552. @internal
  87553. */
  87554. static create(e, n, r) {
  87555. return new Wc(e, n, r);
  87556. }
  87557. }
  87558. class me {
  87559. constructor(e, n) {
  87560. this.ranges = e, this.mainIndex = n;
  87561. }
  87562. /**
  87563. Map a selection through a change. Used to adjust the selection
  87564. position for changes.
  87565. */
  87566. map(e, n = -1) {
  87567. return e.empty ? this : me.create(this.ranges.map((r) => r.map(e, n)), this.mainIndex);
  87568. }
  87569. /**
  87570. Compare this selection to another selection. By default, ranges
  87571. are compared only by position. When `includeAssoc` is true,
  87572. cursor ranges must also have the same
  87573. [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
  87574. */
  87575. eq(e, n = !1) {
  87576. if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
  87577. return !1;
  87578. for (let r = 0; r < this.ranges.length; r++)
  87579. if (!this.ranges[r].eq(e.ranges[r], n))
  87580. return !1;
  87581. return !0;
  87582. }
  87583. /**
  87584. Get the primary selection range. Usually, you should make sure
  87585. your code applies to _all_ ranges, by using methods like
  87586. [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
  87587. */
  87588. get main() {
  87589. return this.ranges[this.mainIndex];
  87590. }
  87591. /**
  87592. Make sure the selection only has one range. Returns a selection
  87593. holding only the main range from this selection.
  87594. */
  87595. asSingle() {
  87596. return this.ranges.length == 1 ? this : new me([this.main], 0);
  87597. }
  87598. /**
  87599. Extend this selection with an extra range.
  87600. */
  87601. addRange(e, n = !0) {
  87602. return me.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1);
  87603. }
  87604. /**
  87605. Replace a given range with another range, and then normalize the
  87606. selection to merge and sort ranges if necessary.
  87607. */
  87608. replaceRange(e, n = this.mainIndex) {
  87609. let r = this.ranges.slice();
  87610. return r[n] = e, me.create(r, this.mainIndex);
  87611. }
  87612. /**
  87613. Convert this selection to an object that can be serialized to
  87614. JSON.
  87615. */
  87616. toJSON() {
  87617. return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
  87618. }
  87619. /**
  87620. Create a selection from a JSON representation.
  87621. */
  87622. static fromJSON(e) {
  87623. if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
  87624. throw new RangeError("Invalid JSON representation for EditorSelection");
  87625. return new me(e.ranges.map((n) => Wc.fromJSON(n)), e.main);
  87626. }
  87627. /**
  87628. Create a selection holding a single range.
  87629. */
  87630. static single(e, n = e) {
  87631. return new me([me.range(e, n)], 0);
  87632. }
  87633. /**
  87634. Sort and merge the given set of ranges, creating a valid
  87635. selection.
  87636. */
  87637. static create(e, n = 0) {
  87638. if (e.length == 0)
  87639. throw new RangeError("A selection needs at least one range");
  87640. for (let r = 0, i = 0; i < e.length; i++) {
  87641. let a = e[i];
  87642. if (a.empty ? a.from <= r : a.from < r)
  87643. return me.normalized(e.slice(), n);
  87644. r = a.to;
  87645. }
  87646. return new me(e, n);
  87647. }
  87648. /**
  87649. Create a cursor selection range at the given position. You can
  87650. safely ignore the optional arguments in most situations.
  87651. */
  87652. static cursor(e, n = 0, r, i) {
  87653. return Wc.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (r == null ? 7 : Math.min(6, r)) | (i ?? 16777215) << 6);
  87654. }
  87655. /**
  87656. Create a selection range.
  87657. */
  87658. static range(e, n, r, i) {
  87659. let a = (r ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
  87660. return n < e ? Wc.create(n, e, 48 | a) : Wc.create(e, n, (n > e ? 8 : 0) | a);
  87661. }
  87662. /**
  87663. @internal
  87664. */
  87665. static normalized(e, n = 0) {
  87666. let r = e[n];
  87667. e.sort((i, a) => i.from - a.from), n = e.indexOf(r);
  87668. for (let i = 1; i < e.length; i++) {
  87669. let a = e[i], o = e[i - 1];
  87670. if (a.empty ? a.from <= o.to : a.from < o.to) {
  87671. let s = o.from, l = Math.max(a.to, o.to);
  87672. i <= n && n--, e.splice(--i, 2, a.anchor > a.head ? me.range(l, s) : me.range(s, l));
  87673. }
  87674. }
  87675. return new me(e, n);
  87676. }
  87677. }
  87678. function oae(t, e) {
  87679. for (let n of t.ranges)
  87680. if (n.to > e)
  87681. throw new RangeError("Selection points outside of document");
  87682. }
  87683. let JL = 0;
  87684. class Be {
  87685. constructor(e, n, r, i, a) {
  87686. this.combine = e, this.compareInput = n, this.compare = r, this.isStatic = i, this.id = JL++, this.default = e([]), this.extensions = typeof a == "function" ? a(this) : a;
  87687. }
  87688. /**
  87689. Returns a facet reader for this facet, which can be used to
  87690. [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
  87691. */
  87692. get reader() {
  87693. return this;
  87694. }
  87695. /**
  87696. Define a new facet.
  87697. */
  87698. static define(e = {}) {
  87699. return new Be(e.combine || ((n) => n), e.compareInput || ((n, r) => n === r), e.compare || (e.combine ? (n, r) => n === r : e4), !!e.static, e.enables);
  87700. }
  87701. /**
  87702. Returns an extension that adds the given value to this facet.
  87703. */
  87704. of(e) {
  87705. return new r1([], this, 0, e);
  87706. }
  87707. /**
  87708. Create an extension that computes a value for the facet from a
  87709. state. You must take care to declare the parts of the state that
  87710. this value depends on, since your function is only called again
  87711. for a new state when one of those parts changed.
  87712. In cases where your value depends only on a single field, you'll
  87713. want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
  87714. */
  87715. compute(e, n) {
  87716. if (this.isStatic)
  87717. throw new Error("Can't compute a static facet");
  87718. return new r1(e, this, 1, n);
  87719. }
  87720. /**
  87721. Create an extension that computes zero or more values for this
  87722. facet from a state.
  87723. */
  87724. computeN(e, n) {
  87725. if (this.isStatic)
  87726. throw new Error("Can't compute a static facet");
  87727. return new r1(e, this, 2, n);
  87728. }
  87729. from(e, n) {
  87730. return n || (n = (r) => r), this.compute([e], (r) => n(r.field(e)));
  87731. }
  87732. }
  87733. function e4(t, e) {
  87734. return t == e || t.length == e.length && t.every((n, r) => n === e[r]);
  87735. }
  87736. class r1 {
  87737. constructor(e, n, r, i) {
  87738. this.dependencies = e, this.facet = n, this.type = r, this.value = i, this.id = JL++;
  87739. }
  87740. dynamicSlot(e) {
  87741. var n;
  87742. let r = this.value, i = this.facet.compareInput, a = this.id, o = e[a] >> 1, s = this.type == 2, l = !1, u = !1, c = [];
  87743. for (let f of this.dependencies)
  87744. f == "doc" ? l = !0 : f == "selection" ? u = !0 : ((n = e[f.id]) !== null && n !== void 0 ? n : 1) & 1 || c.push(e[f.id]);
  87745. return {
  87746. create(f) {
  87747. return f.values[o] = r(f), 1;
  87748. },
  87749. update(f, d) {
  87750. if (l && d.docChanged || u && (d.docChanged || d.selection) || iM(f, c)) {
  87751. let h = r(f);
  87752. if (s ? !xH(h, f.values[o], i) : !i(h, f.values[o]))
  87753. return f.values[o] = h, 1;
  87754. }
  87755. return 0;
  87756. },
  87757. reconfigure: (f, d) => {
  87758. let h, p = d.config.address[a];
  87759. if (p != null) {
  87760. let v = tS(d, p);
  87761. if (this.dependencies.every((g) => g instanceof Be ? d.facet(g) === f.facet(g) : g instanceof ur ? d.field(g, !1) == f.field(g, !1) : !0) || (s ? xH(h = r(f), v, i) : i(h = r(f), v)))
  87762. return f.values[o] = v, 0;
  87763. } else
  87764. h = r(f);
  87765. return f.values[o] = h, 1;
  87766. }
  87767. };
  87768. }
  87769. }
  87770. function xH(t, e, n) {
  87771. if (t.length != e.length)
  87772. return !1;
  87773. for (let r = 0; r < t.length; r++)
  87774. if (!n(t[r], e[r]))
  87775. return !1;
  87776. return !0;
  87777. }
  87778. function iM(t, e) {
  87779. let n = !1;
  87780. for (let r of e)
  87781. Fg(t, r) & 1 && (n = !0);
  87782. return n;
  87783. }
  87784. function vat(t, e, n) {
  87785. let r = n.map((l) => t[l.id]), i = n.map((l) => l.type), a = r.filter((l) => !(l & 1)), o = t[e.id] >> 1;
  87786. function s(l) {
  87787. let u = [];
  87788. for (let c = 0; c < r.length; c++) {
  87789. let f = tS(l, r[c]);
  87790. if (i[c] == 2)
  87791. for (let d of f)
  87792. u.push(d);
  87793. else
  87794. u.push(f);
  87795. }
  87796. return e.combine(u);
  87797. }
  87798. return {
  87799. create(l) {
  87800. for (let u of r)
  87801. Fg(l, u);
  87802. return l.values[o] = s(l), 1;
  87803. },
  87804. update(l, u) {
  87805. if (!iM(l, a))
  87806. return 0;
  87807. let c = s(l);
  87808. return e.compare(c, l.values[o]) ? 0 : (l.values[o] = c, 1);
  87809. },
  87810. reconfigure(l, u) {
  87811. let c = iM(l, r), f = u.config.facets[e.id], d = u.facet(e);
  87812. if (f && !c && e4(n, f))
  87813. return l.values[o] = d, 0;
  87814. let h = s(l);
  87815. return e.compare(h, d) ? (l.values[o] = d, 0) : (l.values[o] = h, 1);
  87816. }
  87817. };
  87818. }
  87819. const wH = /* @__PURE__ */ Be.define({ static: !0 });
  87820. class ur {
  87821. constructor(e, n, r, i, a) {
  87822. this.id = e, this.createF = n, this.updateF = r, this.compareF = i, this.spec = a, this.provides = void 0;
  87823. }
  87824. /**
  87825. Define a state field.
  87826. */
  87827. static define(e) {
  87828. let n = new ur(JL++, e.create, e.update, e.compare || ((r, i) => r === i), e);
  87829. return e.provide && (n.provides = e.provide(n)), n;
  87830. }
  87831. create(e) {
  87832. let n = e.facet(wH).find((r) => r.field == this);
  87833. return ((n == null ? void 0 : n.create) || this.createF)(e);
  87834. }
  87835. /**
  87836. @internal
  87837. */
  87838. slot(e) {
  87839. let n = e[this.id] >> 1;
  87840. return {
  87841. create: (r) => (r.values[n] = this.create(r), 1),
  87842. update: (r, i) => {
  87843. let a = r.values[n], o = this.updateF(a, i);
  87844. return this.compareF(a, o) ? 0 : (r.values[n] = o, 1);
  87845. },
  87846. reconfigure: (r, i) => i.config.address[this.id] != null ? (r.values[n] = i.field(this), 0) : (r.values[n] = this.create(r), 1)
  87847. };
  87848. }
  87849. /**
  87850. Returns an extension that enables this field and overrides the
  87851. way it is initialized. Can be useful when you need to provide a
  87852. non-default starting value for the field.
  87853. */
  87854. init(e) {
  87855. return [this, wH.of({ field: this, create: e })];
  87856. }
  87857. /**
  87858. State field instances can be used as
  87859. [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
  87860. given state.
  87861. */
  87862. get extension() {
  87863. return this;
  87864. }
  87865. }
  87866. const Pc = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
  87867. function Pv(t) {
  87868. return (e) => new sae(e, t);
  87869. }
  87870. const Eu = {
  87871. /**
  87872. The highest precedence level, for extensions that should end up
  87873. near the start of the precedence ordering.
  87874. */
  87875. highest: /* @__PURE__ */ Pv(Pc.highest),
  87876. /**
  87877. A higher-than-default precedence, for extensions that should
  87878. come before those with default precedence.
  87879. */
  87880. high: /* @__PURE__ */ Pv(Pc.high),
  87881. /**
  87882. The default precedence, which is also used for extensions
  87883. without an explicit precedence.
  87884. */
  87885. default: /* @__PURE__ */ Pv(Pc.default),
  87886. /**
  87887. A lower-than-default precedence.
  87888. */
  87889. low: /* @__PURE__ */ Pv(Pc.low),
  87890. /**
  87891. The lowest precedence level. Meant for things that should end up
  87892. near the end of the extension order.
  87893. */
  87894. lowest: /* @__PURE__ */ Pv(Pc.lowest)
  87895. };
  87896. class sae {
  87897. constructor(e, n) {
  87898. this.inner = e, this.prec = n;
  87899. }
  87900. }
  87901. class ry {
  87902. /**
  87903. Create an instance of this compartment to add to your [state
  87904. configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
  87905. */
  87906. of(e) {
  87907. return new aM(this, e);
  87908. }
  87909. /**
  87910. Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
  87911. reconfigures this compartment.
  87912. */
  87913. reconfigure(e) {
  87914. return ry.reconfigure.of({ compartment: this, extension: e });
  87915. }
  87916. /**
  87917. Get the current content of the compartment in the state, or
  87918. `undefined` if it isn't present.
  87919. */
  87920. get(e) {
  87921. return e.config.compartments.get(this);
  87922. }
  87923. }
  87924. class aM {
  87925. constructor(e, n) {
  87926. this.compartment = e, this.inner = n;
  87927. }
  87928. }
  87929. class eS {
  87930. constructor(e, n, r, i, a, o) {
  87931. for (this.base = e, this.compartments = n, this.dynamicSlots = r, this.address = i, this.staticValues = a, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < r.length; )
  87932. this.statusTemplate.push(
  87933. 0
  87934. /* SlotStatus.Unresolved */
  87935. );
  87936. }
  87937. staticFacet(e) {
  87938. let n = this.address[e.id];
  87939. return n == null ? e.default : this.staticValues[n >> 1];
  87940. }
  87941. static resolve(e, n, r) {
  87942. let i = [], a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
  87943. for (let d of gat(e, n, o))
  87944. d instanceof ur ? i.push(d) : (a[d.facet.id] || (a[d.facet.id] = [])).push(d);
  87945. let s = /* @__PURE__ */ Object.create(null), l = [], u = [];
  87946. for (let d of i)
  87947. s[d.id] = u.length << 1, u.push((h) => d.slot(h));
  87948. let c = r == null ? void 0 : r.config.facets;
  87949. for (let d in a) {
  87950. let h = a[d], p = h[0].facet, v = c && c[d] || [];
  87951. if (h.every(
  87952. (g) => g.type == 0
  87953. /* Provider.Static */
  87954. ))
  87955. if (s[p.id] = l.length << 1 | 1, e4(v, h))
  87956. l.push(r.facet(p));
  87957. else {
  87958. let g = p.combine(h.map((m) => m.value));
  87959. l.push(r && p.compare(g, r.facet(p)) ? r.facet(p) : g);
  87960. }
  87961. else {
  87962. for (let g of h)
  87963. g.type == 0 ? (s[g.id] = l.length << 1 | 1, l.push(g.value)) : (s[g.id] = u.length << 1, u.push((m) => g.dynamicSlot(m)));
  87964. s[p.id] = u.length << 1, u.push((g) => vat(g, p, h));
  87965. }
  87966. }
  87967. let f = u.map((d) => d(s));
  87968. return new eS(e, o, f, s, l, a);
  87969. }
  87970. }
  87971. function gat(t, e, n) {
  87972. let r = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
  87973. function a(o, s) {
  87974. let l = i.get(o);
  87975. if (l != null) {
  87976. if (l <= s)
  87977. return;
  87978. let u = r[l].indexOf(o);
  87979. u > -1 && r[l].splice(u, 1), o instanceof aM && n.delete(o.compartment);
  87980. }
  87981. if (i.set(o, s), Array.isArray(o))
  87982. for (let u of o)
  87983. a(u, s);
  87984. else if (o instanceof aM) {
  87985. if (n.has(o.compartment))
  87986. throw new RangeError("Duplicate use of compartment in extensions");
  87987. let u = e.get(o.compartment) || o.inner;
  87988. n.set(o.compartment, u), a(u, s);
  87989. } else if (o instanceof sae)
  87990. a(o.inner, o.prec);
  87991. else if (o instanceof ur)
  87992. r[s].push(o), o.provides && a(o.provides, s);
  87993. else if (o instanceof r1)
  87994. r[s].push(o), o.facet.extensions && a(o.facet.extensions, Pc.default);
  87995. else {
  87996. let u = o.extension;
  87997. if (!u)
  87998. throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
  87999. a(u, s);
  88000. }
  88001. }
  88002. return a(t, Pc.default), r.reduce((o, s) => o.concat(s));
  88003. }
  88004. function Fg(t, e) {
  88005. if (e & 1)
  88006. return 2;
  88007. let n = e >> 1, r = t.status[n];
  88008. if (r == 4)
  88009. throw new Error("Cyclic dependency between fields and/or facets");
  88010. if (r & 2)
  88011. return r;
  88012. t.status[n] = 4;
  88013. let i = t.computeSlot(t, t.config.dynamicSlots[n]);
  88014. return t.status[n] = 2 | i;
  88015. }
  88016. function tS(t, e) {
  88017. return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1];
  88018. }
  88019. const lae = /* @__PURE__ */ Be.define(), oM = /* @__PURE__ */ Be.define({
  88020. combine: (t) => t.some((e) => e),
  88021. static: !0
  88022. }), uae = /* @__PURE__ */ Be.define({
  88023. combine: (t) => t.length ? t[0] : void 0,
  88024. static: !0
  88025. }), cae = /* @__PURE__ */ Be.define(), fae = /* @__PURE__ */ Be.define(), dae = /* @__PURE__ */ Be.define(), hae = /* @__PURE__ */ Be.define({
  88026. combine: (t) => t.length ? t[0] : !1
  88027. });
  88028. class ul {
  88029. /**
  88030. @internal
  88031. */
  88032. constructor(e, n) {
  88033. this.type = e, this.value = n;
  88034. }
  88035. /**
  88036. Define a new type of annotation.
  88037. */
  88038. static define() {
  88039. return new mat();
  88040. }
  88041. }
  88042. class mat {
  88043. /**
  88044. Create an instance of this annotation.
  88045. */
  88046. of(e) {
  88047. return new ul(this, e);
  88048. }
  88049. }
  88050. class yat {
  88051. /**
  88052. @internal
  88053. */
  88054. constructor(e) {
  88055. this.map = e;
  88056. }
  88057. /**
  88058. Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
  88059. type.
  88060. */
  88061. of(e) {
  88062. return new dt(this, e);
  88063. }
  88064. }
  88065. class dt {
  88066. /**
  88067. @internal
  88068. */
  88069. constructor(e, n) {
  88070. this.type = e, this.value = n;
  88071. }
  88072. /**
  88073. Map this effect through a position mapping. Will return
  88074. `undefined` when that ends up deleting the effect.
  88075. */
  88076. map(e) {
  88077. let n = this.type.map(this.value, e);
  88078. return n === void 0 ? void 0 : n == this.value ? this : new dt(this.type, n);
  88079. }
  88080. /**
  88081. Tells you whether this effect object is of a given
  88082. [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
  88083. */
  88084. is(e) {
  88085. return this.type == e;
  88086. }
  88087. /**
  88088. Define a new effect type. The type parameter indicates the type
  88089. of values that his effect holds. It should be a type that
  88090. doesn't include `undefined`, since that is used in
  88091. [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
  88092. removed.
  88093. */
  88094. static define(e = {}) {
  88095. return new yat(e.map || ((n) => n));
  88096. }
  88097. /**
  88098. Map an array of effects through a change set.
  88099. */
  88100. static mapEffects(e, n) {
  88101. if (!e.length)
  88102. return e;
  88103. let r = [];
  88104. for (let i of e) {
  88105. let a = i.map(n);
  88106. a && r.push(a);
  88107. }
  88108. return r;
  88109. }
  88110. }
  88111. dt.reconfigure = /* @__PURE__ */ dt.define();
  88112. dt.appendConfig = /* @__PURE__ */ dt.define();
  88113. class Fn {
  88114. constructor(e, n, r, i, a, o) {
  88115. this.startState = e, this.changes = n, this.selection = r, this.effects = i, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, r && oae(r, n.newLength), a.some((s) => s.type == Fn.time) || (this.annotations = a.concat(Fn.time.of(Date.now())));
  88116. }
  88117. /**
  88118. @internal
  88119. */
  88120. static create(e, n, r, i, a, o) {
  88121. return new Fn(e, n, r, i, a, o);
  88122. }
  88123. /**
  88124. The new document produced by the transaction. Contrary to
  88125. [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
  88126. force the entire new state to be computed right away, so it is
  88127. recommended that [transaction
  88128. filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
  88129. when they need to look at the new document.
  88130. */
  88131. get newDoc() {
  88132. return this._doc || (this._doc = this.changes.apply(this.startState.doc));
  88133. }
  88134. /**
  88135. The new selection produced by the transaction. If
  88136. [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
  88137. this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
  88138. current selection through the changes made by the transaction.
  88139. */
  88140. get newSelection() {
  88141. return this.selection || this.startState.selection.map(this.changes);
  88142. }
  88143. /**
  88144. The new state created by the transaction. Computed on demand
  88145. (but retained for subsequent access), so it is recommended not to
  88146. access it in [transaction
  88147. filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
  88148. */
  88149. get state() {
  88150. return this._state || this.startState.applyTransaction(this), this._state;
  88151. }
  88152. /**
  88153. Get the value of the given annotation type, if any.
  88154. */
  88155. annotation(e) {
  88156. for (let n of this.annotations)
  88157. if (n.type == e)
  88158. return n.value;
  88159. }
  88160. /**
  88161. Indicates whether the transaction changed the document.
  88162. */
  88163. get docChanged() {
  88164. return !this.changes.empty;
  88165. }
  88166. /**
  88167. Indicates whether this transaction reconfigures the state
  88168. (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
  88169. with a top-level configuration
  88170. [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
  88171. */
  88172. get reconfigured() {
  88173. return this.startState.config != this.state.config;
  88174. }
  88175. /**
  88176. Returns true if the transaction has a [user
  88177. event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
  88178. or more specific than `event`. For example, if the transaction
  88179. has `"select.pointer"` as user event, `"select"` and
  88180. `"select.pointer"` will match it.
  88181. */
  88182. isUserEvent(e) {
  88183. let n = this.annotation(Fn.userEvent);
  88184. return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == "."));
  88185. }
  88186. }
  88187. Fn.time = /* @__PURE__ */ ul.define();
  88188. Fn.userEvent = /* @__PURE__ */ ul.define();
  88189. Fn.addToHistory = /* @__PURE__ */ ul.define();
  88190. Fn.remote = /* @__PURE__ */ ul.define();
  88191. function bat(t, e) {
  88192. let n = [];
  88193. for (let r = 0, i = 0; ; ) {
  88194. let a, o;
  88195. if (r < t.length && (i == e.length || e[i] >= t[r]))
  88196. a = t[r++], o = t[r++];
  88197. else if (i < e.length)
  88198. a = e[i++], o = e[i++];
  88199. else
  88200. return n;
  88201. !n.length || n[n.length - 1] < a ? n.push(a, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
  88202. }
  88203. }
  88204. function pae(t, e, n) {
  88205. var r;
  88206. let i, a, o;
  88207. return n ? (i = e.changes, a = jn.empty(e.changes.length), o = t.changes.compose(e.changes)) : (i = e.changes.map(t.changes), a = t.changes.mapDesc(e.changes, !0), o = t.changes.compose(i)), {
  88208. changes: o,
  88209. selection: e.selection ? e.selection.map(a) : (r = t.selection) === null || r === void 0 ? void 0 : r.map(i),
  88210. effects: dt.mapEffects(t.effects, i).concat(dt.mapEffects(e.effects, a)),
  88211. annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations,
  88212. scrollIntoView: t.scrollIntoView || e.scrollIntoView
  88213. };
  88214. }
  88215. function sM(t, e, n) {
  88216. let r = e.selection, i = sh(e.annotations);
  88217. return e.userEvent && (i = i.concat(Fn.userEvent.of(e.userEvent))), {
  88218. changes: e.changes instanceof jn ? e.changes : jn.of(e.changes || [], n, t.facet(uae)),
  88219. selection: r && (r instanceof me ? r : me.single(r.anchor, r.head)),
  88220. effects: sh(e.effects),
  88221. annotations: i,
  88222. scrollIntoView: !!e.scrollIntoView
  88223. };
  88224. }
  88225. function vae(t, e, n) {
  88226. let r = sM(t, e.length ? e[0] : {}, t.doc.length);
  88227. e.length && e[0].filter === !1 && (n = !1);
  88228. for (let a = 1; a < e.length; a++) {
  88229. e[a].filter === !1 && (n = !1);
  88230. let o = !!e[a].sequential;
  88231. r = pae(r, sM(t, e[a], o ? r.changes.newLength : t.doc.length), o);
  88232. }
  88233. let i = Fn.create(t, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView);
  88234. return Oat(n ? _at(i) : i);
  88235. }
  88236. function _at(t) {
  88237. let e = t.startState, n = !0;
  88238. for (let i of e.facet(cae)) {
  88239. let a = i(t);
  88240. if (a === !1) {
  88241. n = !1;
  88242. break;
  88243. }
  88244. Array.isArray(a) && (n = n === !0 ? a : bat(n, a));
  88245. }
  88246. if (n !== !0) {
  88247. let i, a;
  88248. if (n === !1)
  88249. a = t.changes.invertedDesc, i = jn.empty(e.doc.length);
  88250. else {
  88251. let o = t.changes.filter(n);
  88252. i = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
  88253. }
  88254. t = Fn.create(e, i, t.selection && t.selection.map(a), dt.mapEffects(t.effects, a), t.annotations, t.scrollIntoView);
  88255. }
  88256. let r = e.facet(fae);
  88257. for (let i = r.length - 1; i >= 0; i--) {
  88258. let a = r[i](t);
  88259. a instanceof Fn ? t = a : Array.isArray(a) && a.length == 1 && a[0] instanceof Fn ? t = a[0] : t = vae(e, sh(a), !1);
  88260. }
  88261. return t;
  88262. }
  88263. function Oat(t) {
  88264. let e = t.startState, n = e.facet(dae), r = t;
  88265. for (let i = n.length - 1; i >= 0; i--) {
  88266. let a = n[i](t);
  88267. a && Object.keys(a).length && (r = pae(r, sM(e, a, t.changes.newLength), !0));
  88268. }
  88269. return r == t ? t : Fn.create(e, t.changes, t.selection, r.effects, r.annotations, r.scrollIntoView);
  88270. }
  88271. const Sat = [];
  88272. function sh(t) {
  88273. return t == null ? Sat : Array.isArray(t) ? t : [t];
  88274. }
  88275. var yn = /* @__PURE__ */ function(t) {
  88276. return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t;
  88277. }(yn || (yn = {}));
  88278. const xat = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
  88279. let lM;
  88280. try {
  88281. lM = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
  88282. } catch {
  88283. }
  88284. function wat(t) {
  88285. if (lM)
  88286. return lM.test(t);
  88287. for (let e = 0; e < t.length; e++) {
  88288. let n = t[e];
  88289. if (/\w/.test(n) || n > "€" && (n.toUpperCase() != n.toLowerCase() || xat.test(n)))
  88290. return !0;
  88291. }
  88292. return !1;
  88293. }
  88294. function Cat(t) {
  88295. return (e) => {
  88296. if (!/\S/.test(e))
  88297. return yn.Space;
  88298. if (wat(e))
  88299. return yn.Word;
  88300. for (let n = 0; n < t.length; n++)
  88301. if (e.indexOf(t[n]) > -1)
  88302. return yn.Word;
  88303. return yn.Other;
  88304. };
  88305. }
  88306. class At {
  88307. constructor(e, n, r, i, a, o) {
  88308. this.config = e, this.doc = n, this.selection = r, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = a, o && (o._state = this);
  88309. for (let s = 0; s < this.config.dynamicSlots.length; s++)
  88310. Fg(this, s << 1);
  88311. this.computeSlot = null;
  88312. }
  88313. field(e, n = !0) {
  88314. let r = this.config.address[e.id];
  88315. if (r == null) {
  88316. if (n)
  88317. throw new RangeError("Field is not present in this state");
  88318. return;
  88319. }
  88320. return Fg(this, r), tS(this, r);
  88321. }
  88322. /**
  88323. Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
  88324. state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
  88325. can be passed. Unless
  88326. [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
  88327. [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
  88328. are assumed to start in the _current_ document (not the document
  88329. produced by previous specs), and its
  88330. [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
  88331. [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
  88332. to the document created by its _own_ changes. The resulting
  88333. transaction contains the combined effect of all the different
  88334. specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
  88335. specs take precedence over earlier ones.
  88336. */
  88337. update(...e) {
  88338. return vae(this, e, !0);
  88339. }
  88340. /**
  88341. @internal
  88342. */
  88343. applyTransaction(e) {
  88344. let n = this.config, { base: r, compartments: i } = n;
  88345. for (let s of e.effects)
  88346. s.is(ry.reconfigure) ? (n && (i = /* @__PURE__ */ new Map(), n.compartments.forEach((l, u) => i.set(u, l)), n = null), i.set(s.value.compartment, s.value.extension)) : s.is(dt.reconfigure) ? (n = null, r = s.value) : s.is(dt.appendConfig) && (n = null, r = sh(r).concat(s.value));
  88347. let a;
  88348. n ? a = e.startState.values.slice() : (n = eS.resolve(r, i, this), a = new At(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values);
  88349. let o = e.startState.facet(oM) ? e.newSelection : e.newSelection.asSingle();
  88350. new At(n, e.newDoc, o, a, (s, l) => l.update(s, e), e);
  88351. }
  88352. /**
  88353. Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
  88354. replaces every selection range with the given content.
  88355. */
  88356. replaceSelection(e) {
  88357. return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({
  88358. changes: { from: n.from, to: n.to, insert: e },
  88359. range: me.cursor(n.from + e.length)
  88360. }));
  88361. }
  88362. /**
  88363. Create a set of changes and a new selection by running the given
  88364. function for each range in the active selection. The function
  88365. can return an optional set of changes (in the coordinate space
  88366. of the start document), plus an updated range (in the coordinate
  88367. space of the document produced by the call's own changes). This
  88368. method will merge all the changes and ranges into a single
  88369. changeset and selection, and return it as a [transaction
  88370. spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
  88371. [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
  88372. */
  88373. changeByRange(e) {
  88374. let n = this.selection, r = e(n.ranges[0]), i = this.changes(r.changes), a = [r.range], o = sh(r.effects);
  88375. for (let s = 1; s < n.ranges.length; s++) {
  88376. let l = e(n.ranges[s]), u = this.changes(l.changes), c = u.map(i);
  88377. for (let d = 0; d < s; d++)
  88378. a[d] = a[d].map(c);
  88379. let f = i.mapDesc(u, !0);
  88380. a.push(l.range.map(f)), i = i.compose(c), o = dt.mapEffects(o, c).concat(dt.mapEffects(sh(l.effects), f));
  88381. }
  88382. return {
  88383. changes: i,
  88384. selection: me.create(a, n.mainIndex),
  88385. effects: o
  88386. };
  88387. }
  88388. /**
  88389. Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
  88390. description, taking the state's document length and line
  88391. separator into account.
  88392. */
  88393. changes(e = []) {
  88394. return e instanceof jn ? e : jn.of(e, this.doc.length, this.facet(At.lineSeparator));
  88395. }
  88396. /**
  88397. Using the state's [line
  88398. separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
  88399. [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
  88400. */
  88401. toText(e) {
  88402. return Ft.of(e.split(this.facet(At.lineSeparator) || tM));
  88403. }
  88404. /**
  88405. Return the given range of the document as a string.
  88406. */
  88407. sliceDoc(e = 0, n = this.doc.length) {
  88408. return this.doc.sliceString(e, n, this.lineBreak);
  88409. }
  88410. /**
  88411. Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
  88412. */
  88413. facet(e) {
  88414. let n = this.config.address[e.id];
  88415. return n == null ? e.default : (Fg(this, n), tS(this, n));
  88416. }
  88417. /**
  88418. Convert this state to a JSON-serializable object. When custom
  88419. fields should be serialized, you can pass them in as an object
  88420. mapping property names (in the resulting object, which should
  88421. not use `doc` or `selection`) to fields.
  88422. */
  88423. toJSON(e) {
  88424. let n = {
  88425. doc: this.sliceDoc(),
  88426. selection: this.selection.toJSON()
  88427. };
  88428. if (e)
  88429. for (let r in e) {
  88430. let i = e[r];
  88431. i instanceof ur && this.config.address[i.id] != null && (n[r] = i.spec.toJSON(this.field(e[r]), this));
  88432. }
  88433. return n;
  88434. }
  88435. /**
  88436. Deserialize a state from its JSON representation. When custom
  88437. fields should be deserialized, pass the same object you passed
  88438. to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
  88439. third argument.
  88440. */
  88441. static fromJSON(e, n = {}, r) {
  88442. if (!e || typeof e.doc != "string")
  88443. throw new RangeError("Invalid JSON representation for EditorState");
  88444. let i = [];
  88445. if (r) {
  88446. for (let a in r)
  88447. if (Object.prototype.hasOwnProperty.call(e, a)) {
  88448. let o = r[a], s = e[a];
  88449. i.push(o.init((l) => o.spec.fromJSON(s, l)));
  88450. }
  88451. }
  88452. return At.create({
  88453. doc: e.doc,
  88454. selection: me.fromJSON(e.selection),
  88455. extensions: n.extensions ? i.concat([n.extensions]) : i
  88456. });
  88457. }
  88458. /**
  88459. Create a new state. You'll usually only need this when
  88460. initializing an editor—updated states are created by applying
  88461. transactions.
  88462. */
  88463. static create(e = {}) {
  88464. let n = eS.resolve(e.extensions || [], /* @__PURE__ */ new Map()), r = e.doc instanceof Ft ? e.doc : Ft.of((e.doc || "").split(n.staticFacet(At.lineSeparator) || tM)), i = e.selection ? e.selection instanceof me ? e.selection : me.single(e.selection.anchor, e.selection.head) : me.single(0);
  88465. return oae(i, r.length), n.staticFacet(oM) || (i = i.asSingle()), new At(n, r, i, n.dynamicSlots.map(() => null), (a, o) => o.create(a), null);
  88466. }
  88467. /**
  88468. The size (in columns) of a tab in the document, determined by
  88469. the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
  88470. */
  88471. get tabSize() {
  88472. return this.facet(At.tabSize);
  88473. }
  88474. /**
  88475. Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
  88476. string for this state.
  88477. */
  88478. get lineBreak() {
  88479. return this.facet(At.lineSeparator) || `
  88480. `;
  88481. }
  88482. /**
  88483. Returns true when the editor is
  88484. [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
  88485. */
  88486. get readOnly() {
  88487. return this.facet(hae);
  88488. }
  88489. /**
  88490. Look up a translation for the given phrase (via the
  88491. [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
  88492. original string if no translation is found.
  88493. If additional arguments are passed, they will be inserted in
  88494. place of markers like `$1` (for the first value) and `$2`, etc.
  88495. A single `$` is equivalent to `$1`, and `$$` will produce a
  88496. literal dollar sign.
  88497. */
  88498. phrase(e, ...n) {
  88499. for (let r of this.facet(At.phrases))
  88500. if (Object.prototype.hasOwnProperty.call(r, e)) {
  88501. e = r[e];
  88502. break;
  88503. }
  88504. return n.length && (e = e.replace(/\$(\$|\d*)/g, (r, i) => {
  88505. if (i == "$")
  88506. return "$";
  88507. let a = +(i || 1);
  88508. return !a || a > n.length ? r : n[a - 1];
  88509. })), e;
  88510. }
  88511. /**
  88512. Find the values for a given language data field, provided by the
  88513. the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
  88514. Examples of language data fields are...
  88515. - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
  88516. comment syntax.
  88517. - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
  88518. for providing language-specific completion sources.
  88519. - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
  88520. characters that should be considered part of words in this
  88521. language.
  88522. - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
  88523. bracket closing behavior.
  88524. */
  88525. languageDataAt(e, n, r = -1) {
  88526. let i = [];
  88527. for (let a of this.facet(lae))
  88528. for (let o of a(this, n, r))
  88529. Object.prototype.hasOwnProperty.call(o, e) && i.push(o[e]);
  88530. return i;
  88531. }
  88532. /**
  88533. Return a function that can categorize strings (expected to
  88534. represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
  88535. into one of:
  88536. - Word (contains an alphanumeric character or a character
  88537. explicitly listed in the local language's `"wordChars"`
  88538. language data, which should be a string)
  88539. - Space (contains only whitespace)
  88540. - Other (anything else)
  88541. */
  88542. charCategorizer(e) {
  88543. return Cat(this.languageDataAt("wordChars", e).join(""));
  88544. }
  88545. /**
  88546. Find the word at the given position, meaning the range
  88547. containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
  88548. around it. If no word characters are adjacent to the position,
  88549. this returns null.
  88550. */
  88551. wordAt(e) {
  88552. let { text: n, from: r, length: i } = this.doc.lineAt(e), a = this.charCategorizer(e), o = e - r, s = e - r;
  88553. for (; o > 0; ) {
  88554. let l = _r(n, o, !1);
  88555. if (a(n.slice(l, o)) != yn.Word)
  88556. break;
  88557. o = l;
  88558. }
  88559. for (; s < i; ) {
  88560. let l = _r(n, s);
  88561. if (a(n.slice(s, l)) != yn.Word)
  88562. break;
  88563. s = l;
  88564. }
  88565. return o == s ? null : me.range(o + r, s + r);
  88566. }
  88567. }
  88568. At.allowMultipleSelections = oM;
  88569. At.tabSize = /* @__PURE__ */ Be.define({
  88570. combine: (t) => t.length ? t[0] : 4
  88571. });
  88572. At.lineSeparator = uae;
  88573. At.readOnly = hae;
  88574. At.phrases = /* @__PURE__ */ Be.define({
  88575. compare(t, e) {
  88576. let n = Object.keys(t), r = Object.keys(e);
  88577. return n.length == r.length && n.every((i) => t[i] == e[i]);
  88578. }
  88579. });
  88580. At.languageData = lae;
  88581. At.changeFilter = cae;
  88582. At.transactionFilter = fae;
  88583. At.transactionExtender = dae;
  88584. ry.reconfigure = /* @__PURE__ */ dt.define();
  88585. function fs(t, e, n = {}) {
  88586. let r = {};
  88587. for (let i of t)
  88588. for (let a of Object.keys(i)) {
  88589. let o = i[a], s = r[a];
  88590. if (s === void 0)
  88591. r[a] = o;
  88592. else if (!(s === o || o === void 0)) if (Object.hasOwnProperty.call(n, a))
  88593. r[a] = n[a](s, o);
  88594. else
  88595. throw new Error("Config merge conflict for field " + a);
  88596. }
  88597. for (let i in e)
  88598. r[i] === void 0 && (r[i] = e[i]);
  88599. return r;
  88600. }
  88601. class wf {
  88602. /**
  88603. Compare this value with another value. Used when comparing
  88604. rangesets. The default implementation compares by identity.
  88605. Unless you are only creating a fixed number of unique instances
  88606. of your value type, it is a good idea to implement this
  88607. properly.
  88608. */
  88609. eq(e) {
  88610. return this == e;
  88611. }
  88612. /**
  88613. Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
  88614. */
  88615. range(e, n = e) {
  88616. return uM.create(e, n, this);
  88617. }
  88618. }
  88619. wf.prototype.startSide = wf.prototype.endSide = 0;
  88620. wf.prototype.point = !1;
  88621. wf.prototype.mapMode = yr.TrackDel;
  88622. let uM = class gae {
  88623. constructor(e, n, r) {
  88624. this.from = e, this.to = n, this.value = r;
  88625. }
  88626. /**
  88627. @internal
  88628. */
  88629. static create(e, n, r) {
  88630. return new gae(e, n, r);
  88631. }
  88632. };
  88633. function cM(t, e) {
  88634. return t.from - e.from || t.value.startSide - e.value.startSide;
  88635. }
  88636. class t4 {
  88637. constructor(e, n, r, i) {
  88638. this.from = e, this.to = n, this.value = r, this.maxPoint = i;
  88639. }
  88640. get length() {
  88641. return this.to[this.to.length - 1];
  88642. }
  88643. // Find the index of the given position and side. Use the ranges'
  88644. // `from` pos when `end == false`, `to` when `end == true`.
  88645. findIndex(e, n, r, i = 0) {
  88646. let a = r ? this.to : this.from;
  88647. for (let o = i, s = a.length; ; ) {
  88648. if (o == s)
  88649. return o;
  88650. let l = o + s >> 1, u = a[l] - e || (r ? this.value[l].endSide : this.value[l].startSide) - n;
  88651. if (l == o)
  88652. return u >= 0 ? o : s;
  88653. u >= 0 ? s = l : o = l + 1;
  88654. }
  88655. }
  88656. between(e, n, r, i) {
  88657. for (let a = this.findIndex(n, -1e9, !0), o = this.findIndex(r, 1e9, !1, a); a < o; a++)
  88658. if (i(this.from[a] + e, this.to[a] + e, this.value[a]) === !1)
  88659. return !1;
  88660. }
  88661. map(e, n) {
  88662. let r = [], i = [], a = [], o = -1, s = -1;
  88663. for (let l = 0; l < this.value.length; l++) {
  88664. let u = this.value[l], c = this.from[l] + e, f = this.to[l] + e, d, h;
  88665. if (c == f) {
  88666. let p = n.mapPos(c, u.startSide, u.mapMode);
  88667. if (p == null || (d = h = p, u.startSide != u.endSide && (h = n.mapPos(c, u.endSide), h < d)))
  88668. continue;
  88669. } else if (d = n.mapPos(c, u.startSide), h = n.mapPos(f, u.endSide), d > h || d == h && u.startSide > 0 && u.endSide <= 0)
  88670. continue;
  88671. (h - d || u.endSide - u.startSide) < 0 || (o < 0 && (o = d), u.point && (s = Math.max(s, h - d)), r.push(u), i.push(d - o), a.push(h - o));
  88672. }
  88673. return { mapped: r.length ? new t4(i, a, r, s) : null, pos: o };
  88674. }
  88675. }
  88676. class Vt {
  88677. constructor(e, n, r, i) {
  88678. this.chunkPos = e, this.chunk = n, this.nextLayer = r, this.maxPoint = i;
  88679. }
  88680. /**
  88681. @internal
  88682. */
  88683. static create(e, n, r, i) {
  88684. return new Vt(e, n, r, i);
  88685. }
  88686. /**
  88687. @internal
  88688. */
  88689. get length() {
  88690. let e = this.chunk.length - 1;
  88691. return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
  88692. }
  88693. /**
  88694. The number of ranges in the set.
  88695. */
  88696. get size() {
  88697. if (this.isEmpty)
  88698. return 0;
  88699. let e = this.nextLayer.size;
  88700. for (let n of this.chunk)
  88701. e += n.value.length;
  88702. return e;
  88703. }
  88704. /**
  88705. @internal
  88706. */
  88707. chunkEnd(e) {
  88708. return this.chunkPos[e] + this.chunk[e].length;
  88709. }
  88710. /**
  88711. Update the range set, optionally adding new ranges or filtering
  88712. out existing ones.
  88713. (Note: The type parameter is just there as a kludge to work
  88714. around TypeScript variance issues that prevented `RangeSet<X>`
  88715. from being a subtype of `RangeSet<Y>` when `X` is a subtype of
  88716. `Y`.)
  88717. */
  88718. update(e) {
  88719. let { add: n = [], sort: r = !1, filterFrom: i = 0, filterTo: a = this.length } = e, o = e.filter;
  88720. if (n.length == 0 && !o)
  88721. return this;
  88722. if (r && (n = n.slice().sort(cM)), this.isEmpty)
  88723. return n.length ? Vt.of(n) : this;
  88724. let s = new mae(this, null, -1).goto(0), l = 0, u = [], c = new hu();
  88725. for (; s.value || l < n.length; )
  88726. if (l < n.length && (s.from - n[l].from || s.startSide - n[l].value.startSide) >= 0) {
  88727. let f = n[l++];
  88728. c.addInner(f.from, f.to, f.value) || u.push(f);
  88729. } else s.rangeIndex == 1 && s.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(s.chunkIndex) < n[l].from) && (!o || i > this.chunkEnd(s.chunkIndex) || a < this.chunkPos[s.chunkIndex]) && c.addChunk(this.chunkPos[s.chunkIndex], this.chunk[s.chunkIndex]) ? s.nextChunk() : ((!o || i > s.to || a < s.from || o(s.from, s.to, s.value)) && (c.addInner(s.from, s.to, s.value) || u.push(uM.create(s.from, s.to, s.value))), s.next());
  88730. return c.finishInner(this.nextLayer.isEmpty && !u.length ? Vt.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: i, filterTo: a }));
  88731. }
  88732. /**
  88733. Map this range set through a set of changes, return the new set.
  88734. */
  88735. map(e) {
  88736. if (e.empty || this.isEmpty)
  88737. return this;
  88738. let n = [], r = [], i = -1;
  88739. for (let o = 0; o < this.chunk.length; o++) {
  88740. let s = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(s, s + l.length);
  88741. if (u === !1)
  88742. i = Math.max(i, l.maxPoint), n.push(l), r.push(e.mapPos(s));
  88743. else if (u === !0) {
  88744. let { mapped: c, pos: f } = l.map(s, e);
  88745. c && (i = Math.max(i, c.maxPoint), n.push(c), r.push(f));
  88746. }
  88747. }
  88748. let a = this.nextLayer.map(e);
  88749. return n.length == 0 ? a : new Vt(r, n, a || Vt.empty, i);
  88750. }
  88751. /**
  88752. Iterate over the ranges that touch the region `from` to `to`,
  88753. calling `f` for each. There is no guarantee that the ranges will
  88754. be reported in any specific order. When the callback returns
  88755. `false`, iteration stops.
  88756. */
  88757. between(e, n, r) {
  88758. if (!this.isEmpty) {
  88759. for (let i = 0; i < this.chunk.length; i++) {
  88760. let a = this.chunkPos[i], o = this.chunk[i];
  88761. if (n >= a && e <= a + o.length && o.between(a, e - a, n - a, r) === !1)
  88762. return;
  88763. }
  88764. this.nextLayer.between(e, n, r);
  88765. }
  88766. }
  88767. /**
  88768. Iterate over the ranges in this set, in order, including all
  88769. ranges that end at or after `from`.
  88770. */
  88771. iter(e = 0) {
  88772. return jm.from([this]).goto(e);
  88773. }
  88774. /**
  88775. @internal
  88776. */
  88777. get isEmpty() {
  88778. return this.nextLayer == this;
  88779. }
  88780. /**
  88781. Iterate over the ranges in a collection of sets, in order,
  88782. starting from `from`.
  88783. */
  88784. static iter(e, n = 0) {
  88785. return jm.from(e).goto(n);
  88786. }
  88787. /**
  88788. Iterate over two groups of sets, calling methods on `comparator`
  88789. to notify it of possible differences.
  88790. */
  88791. static compare(e, n, r, i, a = -1) {
  88792. let o = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), s = n.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), l = CH(o, s, r), u = new $v(o, l, a), c = new $v(s, l, a);
  88793. r.iterGaps((f, d, h) => TH(u, f, c, d, h, i)), r.empty && r.length == 0 && TH(u, 0, c, 0, 0, i);
  88794. }
  88795. /**
  88796. Compare the contents of two groups of range sets, returning true
  88797. if they are equivalent in the given range.
  88798. */
  88799. static eq(e, n, r = 0, i) {
  88800. i == null && (i = 999999999);
  88801. let a = e.filter((c) => !c.isEmpty && n.indexOf(c) < 0), o = n.filter((c) => !c.isEmpty && e.indexOf(c) < 0);
  88802. if (a.length != o.length)
  88803. return !1;
  88804. if (!a.length)
  88805. return !0;
  88806. let s = CH(a, o), l = new $v(a, s, 0).goto(r), u = new $v(o, s, 0).goto(r);
  88807. for (; ; ) {
  88808. if (l.to != u.to || !fM(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point)))
  88809. return !1;
  88810. if (l.to > i)
  88811. return !0;
  88812. l.next(), u.next();
  88813. }
  88814. }
  88815. /**
  88816. Iterate over a group of range sets at the same time, notifying
  88817. the iterator about the ranges covering every given piece of
  88818. content. Returns the open count (see
  88819. [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
  88820. of the iteration.
  88821. */
  88822. static spans(e, n, r, i, a = -1) {
  88823. let o = new $v(e, null, a).goto(n), s = n, l = o.openStart;
  88824. for (; ; ) {
  88825. let u = Math.min(o.to, r);
  88826. if (o.point) {
  88827. let c = o.activeForPoint(o.to), f = o.pointFrom < n ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, l);
  88828. i.point(s, u, o.point, c, f, o.pointRank), l = Math.min(o.openEnd(u), c.length);
  88829. } else u > s && (i.span(s, u, o.active, l), l = o.openEnd(u));
  88830. if (o.to > r)
  88831. return l + (o.point && o.to > r ? 1 : 0);
  88832. s = o.to, o.next();
  88833. }
  88834. }
  88835. /**
  88836. Create a range set for the given range or array of ranges. By
  88837. default, this expects the ranges to be _sorted_ (by start
  88838. position and, if two start at the same position,
  88839. `value.startSide`). You can pass `true` as second argument to
  88840. cause the method to sort them.
  88841. */
  88842. static of(e, n = !1) {
  88843. let r = new hu();
  88844. for (let i of e instanceof uM ? [e] : n ? Tat(e) : e)
  88845. r.add(i.from, i.to, i.value);
  88846. return r.finish();
  88847. }
  88848. /**
  88849. Join an array of range sets into a single set.
  88850. */
  88851. static join(e) {
  88852. if (!e.length)
  88853. return Vt.empty;
  88854. let n = e[e.length - 1];
  88855. for (let r = e.length - 2; r >= 0; r--)
  88856. for (let i = e[r]; i != Vt.empty; i = i.nextLayer)
  88857. n = new Vt(i.chunkPos, i.chunk, n, Math.max(i.maxPoint, n.maxPoint));
  88858. return n;
  88859. }
  88860. }
  88861. Vt.empty = /* @__PURE__ */ new Vt([], [], null, -1);
  88862. function Tat(t) {
  88863. if (t.length > 1)
  88864. for (let e = t[0], n = 1; n < t.length; n++) {
  88865. let r = t[n];
  88866. if (cM(e, r) > 0)
  88867. return t.slice().sort(cM);
  88868. e = r;
  88869. }
  88870. return t;
  88871. }
  88872. Vt.empty.nextLayer = Vt.empty;
  88873. class hu {
  88874. finishChunk(e) {
  88875. this.chunks.push(new t4(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
  88876. }
  88877. /**
  88878. Create an empty builder.
  88879. */
  88880. constructor() {
  88881. this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
  88882. }
  88883. /**
  88884. Add a range. Ranges should be added in sorted (by `from` and
  88885. `value.startSide`) order.
  88886. */
  88887. add(e, n, r) {
  88888. this.addInner(e, n, r) || (this.nextLayer || (this.nextLayer = new hu())).add(e, n, r);
  88889. }
  88890. /**
  88891. @internal
  88892. */
  88893. addInner(e, n, r) {
  88894. let i = e - this.lastTo || r.startSide - this.last.endSide;
  88895. if (i <= 0 && (e - this.lastFrom || r.startSide - this.last.startSide) < 0)
  88896. throw new Error("Ranges must be added sorted by `from` position and `startSide`");
  88897. return i < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(n - this.chunkStart), this.last = r, this.lastFrom = e, this.lastTo = n, this.value.push(r), r.point && (this.maxPoint = Math.max(this.maxPoint, n - e)), !0);
  88898. }
  88899. /**
  88900. @internal
  88901. */
  88902. addChunk(e, n) {
  88903. if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0)
  88904. return !1;
  88905. this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e);
  88906. let r = n.value.length - 1;
  88907. return this.last = n.value[r], this.lastFrom = n.from[r] + e, this.lastTo = n.to[r] + e, !0;
  88908. }
  88909. /**
  88910. Finish the range set. Returns the new set. The builder can't be
  88911. used anymore after this has been called.
  88912. */
  88913. finish() {
  88914. return this.finishInner(Vt.empty);
  88915. }
  88916. /**
  88917. @internal
  88918. */
  88919. finishInner(e) {
  88920. if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
  88921. return e;
  88922. let n = Vt.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
  88923. return this.from = null, n;
  88924. }
  88925. }
  88926. function CH(t, e, n) {
  88927. let r = /* @__PURE__ */ new Map();
  88928. for (let a of t)
  88929. for (let o = 0; o < a.chunk.length; o++)
  88930. a.chunk[o].maxPoint <= 0 && r.set(a.chunk[o], a.chunkPos[o]);
  88931. let i = /* @__PURE__ */ new Set();
  88932. for (let a of e)
  88933. for (let o = 0; o < a.chunk.length; o++) {
  88934. let s = r.get(a.chunk[o]);
  88935. s != null && (n ? n.mapPos(s) : s) == a.chunkPos[o] && !(n != null && n.touchesRange(s, s + a.chunk[o].length)) && i.add(a.chunk[o]);
  88936. }
  88937. return i;
  88938. }
  88939. class mae {
  88940. constructor(e, n, r, i = 0) {
  88941. this.layer = e, this.skip = n, this.minPoint = r, this.rank = i;
  88942. }
  88943. get startSide() {
  88944. return this.value ? this.value.startSide : 0;
  88945. }
  88946. get endSide() {
  88947. return this.value ? this.value.endSide : 0;
  88948. }
  88949. goto(e, n = -1e9) {
  88950. return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this;
  88951. }
  88952. gotoInner(e, n, r) {
  88953. for (; this.chunkIndex < this.layer.chunk.length; ) {
  88954. let i = this.layer.chunk[this.chunkIndex];
  88955. if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
  88956. break;
  88957. this.chunkIndex++, r = !1;
  88958. }
  88959. if (this.chunkIndex < this.layer.chunk.length) {
  88960. let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0);
  88961. (!r || this.rangeIndex < i) && this.setRangeIndex(i);
  88962. }
  88963. this.next();
  88964. }
  88965. forward(e, n) {
  88966. (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0);
  88967. }
  88968. next() {
  88969. for (; ; )
  88970. if (this.chunkIndex == this.layer.chunk.length) {
  88971. this.from = this.to = 1e9, this.value = null;
  88972. break;
  88973. } else {
  88974. let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], r = e + n.from[this.rangeIndex];
  88975. if (this.from = r, this.to = e + n.to[this.rangeIndex], this.value = n.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
  88976. break;
  88977. }
  88978. }
  88979. setRangeIndex(e) {
  88980. if (e == this.layer.chunk[this.chunkIndex].value.length) {
  88981. if (this.chunkIndex++, this.skip)
  88982. for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
  88983. this.chunkIndex++;
  88984. this.rangeIndex = 0;
  88985. } else
  88986. this.rangeIndex = e;
  88987. }
  88988. nextChunk() {
  88989. this.chunkIndex++, this.rangeIndex = 0, this.next();
  88990. }
  88991. compare(e) {
  88992. return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
  88993. }
  88994. }
  88995. class jm {
  88996. constructor(e) {
  88997. this.heap = e;
  88998. }
  88999. static from(e, n = null, r = -1) {
  89000. let i = [];
  89001. for (let a = 0; a < e.length; a++)
  89002. for (let o = e[a]; !o.isEmpty; o = o.nextLayer)
  89003. o.maxPoint >= r && i.push(new mae(o, n, r, a));
  89004. return i.length == 1 ? i[0] : new jm(i);
  89005. }
  89006. get startSide() {
  89007. return this.value ? this.value.startSide : 0;
  89008. }
  89009. goto(e, n = -1e9) {
  89010. for (let r of this.heap)
  89011. r.goto(e, n);
  89012. for (let r = this.heap.length >> 1; r >= 0; r--)
  89013. h$(this.heap, r);
  89014. return this.next(), this;
  89015. }
  89016. forward(e, n) {
  89017. for (let r of this.heap)
  89018. r.forward(e, n);
  89019. for (let r = this.heap.length >> 1; r >= 0; r--)
  89020. h$(this.heap, r);
  89021. (this.to - e || this.value.endSide - n) < 0 && this.next();
  89022. }
  89023. next() {
  89024. if (this.heap.length == 0)
  89025. this.from = this.to = 1e9, this.value = null, this.rank = -1;
  89026. else {
  89027. let e = this.heap[0];
  89028. this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), h$(this.heap, 0);
  89029. }
  89030. }
  89031. }
  89032. function h$(t, e) {
  89033. for (let n = t[e]; ; ) {
  89034. let r = (e << 1) + 1;
  89035. if (r >= t.length)
  89036. break;
  89037. let i = t[r];
  89038. if (r + 1 < t.length && i.compare(t[r + 1]) >= 0 && (i = t[r + 1], r++), n.compare(i) < 0)
  89039. break;
  89040. t[r] = n, t[e] = i, e = r;
  89041. }
  89042. }
  89043. class $v {
  89044. constructor(e, n, r) {
  89045. this.minPoint = r, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = jm.from(e, n, r);
  89046. }
  89047. goto(e, n = -1e9) {
  89048. return this.cursor.goto(e, n), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = n, this.openStart = -1, this.next(), this;
  89049. }
  89050. forward(e, n) {
  89051. for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; )
  89052. this.removeActive(this.minActive);
  89053. this.cursor.forward(e, n);
  89054. }
  89055. removeActive(e) {
  89056. Qb(this.active, e), Qb(this.activeTo, e), Qb(this.activeRank, e), this.minActive = PH(this.active, this.activeTo);
  89057. }
  89058. addActive(e) {
  89059. let n = 0, { value: r, to: i, rank: a } = this.cursor;
  89060. for (; n < this.activeRank.length && (a - this.activeRank[n] || i - this.activeTo[n]) > 0; )
  89061. n++;
  89062. Hb(this.active, n, r), Hb(this.activeTo, n, i), Hb(this.activeRank, n, a), e && Hb(e, n, this.cursor.from), this.minActive = PH(this.active, this.activeTo);
  89063. }
  89064. // After calling this, if `this.point` != null, the next range is a
  89065. // point. Otherwise, it's a regular range, covered by `this.active`.
  89066. next() {
  89067. let e = this.to, n = this.point;
  89068. this.point = null;
  89069. let r = this.openStart < 0 ? [] : null;
  89070. for (; ; ) {
  89071. let i = this.minActive;
  89072. if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
  89073. if (this.activeTo[i] > e) {
  89074. this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
  89075. break;
  89076. }
  89077. this.removeActive(i), r && Qb(r, i);
  89078. } else if (this.cursor.value)
  89079. if (this.cursor.from > e) {
  89080. this.to = this.cursor.from, this.endSide = this.cursor.startSide;
  89081. break;
  89082. } else {
  89083. let a = this.cursor.value;
  89084. if (!a.point)
  89085. this.addActive(r), this.cursor.next();
  89086. else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
  89087. this.cursor.next();
  89088. else {
  89089. this.point = a, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = a.endSide, this.cursor.next(), this.forward(this.to, this.endSide);
  89090. break;
  89091. }
  89092. }
  89093. else {
  89094. this.to = this.endSide = 1e9;
  89095. break;
  89096. }
  89097. }
  89098. if (r) {
  89099. this.openStart = 0;
  89100. for (let i = r.length - 1; i >= 0 && r[i] < e; i--)
  89101. this.openStart++;
  89102. }
  89103. }
  89104. activeForPoint(e) {
  89105. if (!this.active.length)
  89106. return this.active;
  89107. let n = [];
  89108. for (let r = this.active.length - 1; r >= 0 && !(this.activeRank[r] < this.pointRank); r--)
  89109. (this.activeTo[r] > e || this.activeTo[r] == e && this.active[r].endSide >= this.point.endSide) && n.push(this.active[r]);
  89110. return n.reverse();
  89111. }
  89112. openEnd(e) {
  89113. let n = 0;
  89114. for (let r = this.activeTo.length - 1; r >= 0 && this.activeTo[r] > e; r--)
  89115. n++;
  89116. return n;
  89117. }
  89118. }
  89119. function TH(t, e, n, r, i, a) {
  89120. t.goto(e), n.goto(r);
  89121. let o = r + i, s = r, l = r - e;
  89122. for (; ; ) {
  89123. let u = t.to + l - n.to || t.endSide - n.endSide, c = u < 0 ? t.to + l : n.to, f = Math.min(c, o);
  89124. if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && fM(t.activeForPoint(t.to), n.activeForPoint(n.to)) || a.comparePoint(s, f, t.point, n.point) : f > s && !fM(t.active, n.active) && a.compareRange(s, f, t.active, n.active), c > o)
  89125. break;
  89126. s = c, u <= 0 && t.next(), u >= 0 && n.next();
  89127. }
  89128. }
  89129. function fM(t, e) {
  89130. if (t.length != e.length)
  89131. return !1;
  89132. for (let n = 0; n < t.length; n++)
  89133. if (t[n] != e[n] && !t[n].eq(e[n]))
  89134. return !1;
  89135. return !0;
  89136. }
  89137. function Qb(t, e) {
  89138. for (let n = e, r = t.length - 1; n < r; n++)
  89139. t[n] = t[n + 1];
  89140. t.pop();
  89141. }
  89142. function Hb(t, e, n) {
  89143. for (let r = t.length - 1; r >= e; r--)
  89144. t[r + 1] = t[r];
  89145. t[e] = n;
  89146. }
  89147. function PH(t, e) {
  89148. let n = -1, r = 1e9;
  89149. for (let i = 0; i < e.length; i++)
  89150. (e[i] - r || t[i].endSide - t[n].endSide) < 0 && (n = i, r = e[i]);
  89151. return n;
  89152. }
  89153. function Rp(t, e, n = t.length) {
  89154. let r = 0;
  89155. for (let i = 0; i < n; )
  89156. t.charCodeAt(i) == 9 ? (r += e - r % e, i++) : (r++, i = _r(t, i));
  89157. return r;
  89158. }
  89159. function dM(t, e, n, r) {
  89160. for (let i = 0, a = 0; ; ) {
  89161. if (a >= e)
  89162. return i;
  89163. if (i == t.length)
  89164. break;
  89165. a += t.charCodeAt(i) == 9 ? n - a % n : 1, i = _r(t, i);
  89166. }
  89167. return r === !0 ? -1 : t.length;
  89168. }
  89169. const hM = "ͼ", $H = typeof Symbol > "u" ? "__" + hM : Symbol.for(hM), pM = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), AH = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {};
  89170. class pu {
  89171. // :: (Object<Style>, ?{finish: ?(string) → string})
  89172. // Create a style module from the given spec.
  89173. //
  89174. // When `finish` is given, it is called on regular (non-`@`)
  89175. // selectors (after `&` expansion) to compute the final selector.
  89176. constructor(e, n) {
  89177. this.rules = [];
  89178. let { finish: r } = n || {};
  89179. function i(o) {
  89180. return /^@/.test(o) ? [o] : o.split(/,\s*/);
  89181. }
  89182. function a(o, s, l, u) {
  89183. let c = [], f = /^@(\w+)\b/.exec(o[0]), d = f && f[1] == "keyframes";
  89184. if (f && s == null) return l.push(o[0] + ";");
  89185. for (let h in s) {
  89186. let p = s[h];
  89187. if (/&/.test(h))
  89188. a(
  89189. h.split(/,\s*/).map((v) => o.map((g) => v.replace(/&/, g))).reduce((v, g) => v.concat(g)),
  89190. p,
  89191. l
  89192. );
  89193. else if (p && typeof p == "object") {
  89194. if (!f) throw new RangeError("The value of a property (" + h + ") should be a primitive value.");
  89195. a(i(h), p, c, d);
  89196. } else p != null && c.push(h.replace(/_.*/, "").replace(/[A-Z]/g, (v) => "-" + v.toLowerCase()) + ": " + p + ";");
  89197. }
  89198. (c.length || d) && l.push((r && !f && !u ? o.map(r) : o).join(", ") + " {" + c.join(" ") + "}");
  89199. }
  89200. for (let o in e) a(i(o), e[o], this.rules);
  89201. }
  89202. // :: () → string
  89203. // Returns a string containing the module's CSS rules.
  89204. getRules() {
  89205. return this.rules.join(`
  89206. `);
  89207. }
  89208. // :: () → string
  89209. // Generate a new unique CSS class name.
  89210. static newName() {
  89211. let e = AH[$H] || 1;
  89212. return AH[$H] = e + 1, hM + e.toString(36);
  89213. }
  89214. // :: (union<Document, ShadowRoot>, union<[StyleModule], StyleModule>, ?{nonce: ?string})
  89215. //
  89216. // Mount the given set of modules in the given DOM root, which ensures
  89217. // that the CSS rules defined by the module are available in that
  89218. // context.
  89219. //
  89220. // Rules are only added to the document once per root.
  89221. //
  89222. // Rule order will follow the order of the modules, so that rules from
  89223. // modules later in the array take precedence of those from earlier
  89224. // modules. If you call this function multiple times for the same root
  89225. // in a way that changes the order of already mounted modules, the old
  89226. // order will be changed.
  89227. //
  89228. // If a Content Security Policy nonce is provided, it is added to
  89229. // the `<style>` tag generated by the library.
  89230. static mount(e, n, r) {
  89231. let i = e[pM], a = r && r.nonce;
  89232. i ? a && i.setNonce(a) : i = new Pat(e, a), i.mount(Array.isArray(n) ? n : [n], e);
  89233. }
  89234. }
  89235. let EH = /* @__PURE__ */ new Map();
  89236. class Pat {
  89237. constructor(e, n) {
  89238. let r = e.ownerDocument || e, i = r.defaultView;
  89239. if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) {
  89240. let a = EH.get(r);
  89241. if (a) return e[pM] = a;
  89242. this.sheet = new i.CSSStyleSheet(), EH.set(r, this);
  89243. } else
  89244. this.styleTag = r.createElement("style"), n && this.styleTag.setAttribute("nonce", n);
  89245. this.modules = [], e[pM] = this;
  89246. }
  89247. mount(e, n) {
  89248. let r = this.sheet, i = 0, a = 0;
  89249. for (let o = 0; o < e.length; o++) {
  89250. let s = e[o], l = this.modules.indexOf(s);
  89251. if (l < a && l > -1 && (this.modules.splice(l, 1), a--, l = -1), l == -1) {
  89252. if (this.modules.splice(a++, 0, s), r) for (let u = 0; u < s.rules.length; u++)
  89253. r.insertRule(s.rules[u], i++);
  89254. } else {
  89255. for (; a < l; ) i += this.modules[a++].rules.length;
  89256. i += s.rules.length, a++;
  89257. }
  89258. }
  89259. if (r)
  89260. n.adoptedStyleSheets.indexOf(this.sheet) < 0 && (n.adoptedStyleSheets = [this.sheet, ...n.adoptedStyleSheets]);
  89261. else {
  89262. let o = "";
  89263. for (let l = 0; l < this.modules.length; l++)
  89264. o += this.modules[l].getRules() + `
  89265. `;
  89266. this.styleTag.textContent = o;
  89267. let s = n.head || n;
  89268. this.styleTag.parentNode != s && s.insertBefore(this.styleTag, s.firstChild);
  89269. }
  89270. }
  89271. setNonce(e) {
  89272. this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
  89273. }
  89274. }
  89275. var vu = {
  89276. 8: "Backspace",
  89277. 9: "Tab",
  89278. 10: "Enter",
  89279. 12: "NumLock",
  89280. 13: "Enter",
  89281. 16: "Shift",
  89282. 17: "Control",
  89283. 18: "Alt",
  89284. 20: "CapsLock",
  89285. 27: "Escape",
  89286. 32: " ",
  89287. 33: "PageUp",
  89288. 34: "PageDown",
  89289. 35: "End",
  89290. 36: "Home",
  89291. 37: "ArrowLeft",
  89292. 38: "ArrowUp",
  89293. 39: "ArrowRight",
  89294. 40: "ArrowDown",
  89295. 44: "PrintScreen",
  89296. 45: "Insert",
  89297. 46: "Delete",
  89298. 59: ";",
  89299. 61: "=",
  89300. 91: "Meta",
  89301. 92: "Meta",
  89302. 106: "*",
  89303. 107: "+",
  89304. 108: ",",
  89305. 109: "-",
  89306. 110: ".",
  89307. 111: "/",
  89308. 144: "NumLock",
  89309. 145: "ScrollLock",
  89310. 160: "Shift",
  89311. 161: "Shift",
  89312. 162: "Control",
  89313. 163: "Control",
  89314. 164: "Alt",
  89315. 165: "Alt",
  89316. 173: "-",
  89317. 186: ";",
  89318. 187: "=",
  89319. 188: ",",
  89320. 189: "-",
  89321. 190: ".",
  89322. 191: "/",
  89323. 192: "`",
  89324. 219: "[",
  89325. 220: "\\",
  89326. 221: "]",
  89327. 222: "'"
  89328. }, Zm = {
  89329. 48: ")",
  89330. 49: "!",
  89331. 50: "@",
  89332. 51: "#",
  89333. 52: "$",
  89334. 53: "%",
  89335. 54: "^",
  89336. 55: "&",
  89337. 56: "*",
  89338. 57: "(",
  89339. 59: ":",
  89340. 61: "+",
  89341. 173: "_",
  89342. 186: ":",
  89343. 187: "+",
  89344. 188: "<",
  89345. 189: "_",
  89346. 190: ">",
  89347. 191: "?",
  89348. 192: "~",
  89349. 219: "{",
  89350. 220: "|",
  89351. 221: "}",
  89352. 222: '"'
  89353. }, $at = typeof navigator < "u" && /Mac/.test(navigator.platform), Aat = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
  89354. for (var mr = 0; mr < 10; mr++) vu[48 + mr] = vu[96 + mr] = String(mr);
  89355. for (var mr = 1; mr <= 24; mr++) vu[mr + 111] = "F" + mr;
  89356. for (var mr = 65; mr <= 90; mr++)
  89357. vu[mr] = String.fromCharCode(mr + 32), Zm[mr] = String.fromCharCode(mr);
  89358. for (var p$ in vu) Zm.hasOwnProperty(p$) || (Zm[p$] = vu[p$]);
  89359. function Eat(t) {
  89360. var e = $at && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Aat && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Zm : vu)[t.keyCode] || t.key || "Unidentified";
  89361. return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
  89362. }
  89363. function Um(t) {
  89364. let e;
  89365. return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
  89366. }
  89367. function vM(t, e) {
  89368. return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
  89369. }
  89370. function Mat(t) {
  89371. let e = t.activeElement;
  89372. for (; e && e.shadowRoot; )
  89373. e = e.shadowRoot.activeElement;
  89374. return e;
  89375. }
  89376. function i1(t, e) {
  89377. if (!e.anchorNode)
  89378. return !1;
  89379. try {
  89380. return vM(t, e.anchorNode);
  89381. } catch {
  89382. return !1;
  89383. }
  89384. }
  89385. function Uh(t) {
  89386. return t.nodeType == 3 ? Tf(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
  89387. }
  89388. function Wg(t, e, n, r) {
  89389. return n ? MH(t, e, n, r, -1) || MH(t, e, n, r, 1) : !1;
  89390. }
  89391. function Cf(t) {
  89392. for (var e = 0; ; e++)
  89393. if (t = t.previousSibling, !t)
  89394. return e;
  89395. }
  89396. function nS(t) {
  89397. return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName);
  89398. }
  89399. function MH(t, e, n, r, i) {
  89400. for (; ; ) {
  89401. if (t == n && e == r)
  89402. return !0;
  89403. if (e == (i < 0 ? 0 : Js(t))) {
  89404. if (t.nodeName == "DIV")
  89405. return !1;
  89406. let a = t.parentNode;
  89407. if (!a || a.nodeType != 1)
  89408. return !1;
  89409. e = Cf(t) + (i < 0 ? 0 : 1), t = a;
  89410. } else if (t.nodeType == 1) {
  89411. if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false")
  89412. return !1;
  89413. e = i < 0 ? Js(t) : 0;
  89414. } else
  89415. return !1;
  89416. }
  89417. }
  89418. function Js(t) {
  89419. return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
  89420. }
  89421. function Iw(t, e) {
  89422. let n = e ? t.left : t.right;
  89423. return { left: n, right: n, top: t.top, bottom: t.bottom };
  89424. }
  89425. function Iat(t) {
  89426. let e = t.visualViewport;
  89427. return e ? {
  89428. left: 0,
  89429. right: e.width,
  89430. top: 0,
  89431. bottom: e.height
  89432. } : {
  89433. left: 0,
  89434. right: t.innerWidth,
  89435. top: 0,
  89436. bottom: t.innerHeight
  89437. };
  89438. }
  89439. function yae(t, e) {
  89440. let n = e.width / t.offsetWidth, r = e.height / t.offsetHeight;
  89441. return (n > 0.995 && n < 1.005 || !isFinite(n) || Math.abs(e.width - t.offsetWidth) < 1) && (n = 1), (r > 0.995 && r < 1.005 || !isFinite(r) || Math.abs(e.height - t.offsetHeight) < 1) && (r = 1), { scaleX: n, scaleY: r };
  89442. }
  89443. function Dat(t, e, n, r, i, a, o, s) {
  89444. let l = t.ownerDocument, u = l.defaultView || window;
  89445. for (let c = t, f = !1; c && !f; )
  89446. if (c.nodeType == 1) {
  89447. let d, h = c == l.body, p = 1, v = 1;
  89448. if (h)
  89449. d = Iat(u);
  89450. else {
  89451. if (/^(fixed|sticky)$/.test(getComputedStyle(c).position) && (f = !0), c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth) {
  89452. c = c.assignedSlot || c.parentNode;
  89453. continue;
  89454. }
  89455. let y = c.getBoundingClientRect();
  89456. ({ scaleX: p, scaleY: v } = yae(c, y)), d = {
  89457. left: y.left,
  89458. right: y.left + c.clientWidth * p,
  89459. top: y.top,
  89460. bottom: y.top + c.clientHeight * v
  89461. };
  89462. }
  89463. let g = 0, m = 0;
  89464. if (i == "nearest")
  89465. e.top < d.top ? (m = -(d.top - e.top + o), n > 0 && e.bottom > d.bottom + m && (m = e.bottom - d.bottom + m + o)) : e.bottom > d.bottom && (m = e.bottom - d.bottom + o, n < 0 && e.top - m < d.top && (m = -(d.top + m - e.top + o)));
  89466. else {
  89467. let y = e.bottom - e.top, b = d.bottom - d.top;
  89468. m = (i == "center" && y <= b ? e.top + y / 2 - b / 2 : i == "start" || i == "center" && n < 0 ? e.top - o : e.bottom - b + o) - d.top;
  89469. }
  89470. if (r == "nearest" ? e.left < d.left ? (g = -(d.left - e.left + a), n > 0 && e.right > d.right + g && (g = e.right - d.right + g + a)) : e.right > d.right && (g = e.right - d.right + a, n < 0 && e.left < d.left + g && (g = -(d.left + g - e.left + a))) : g = (r == "center" ? e.left + (e.right - e.left) / 2 - (d.right - d.left) / 2 : r == "start" == s ? e.left - a : e.right - (d.right - d.left) + a) - d.left, g || m)
  89471. if (h)
  89472. u.scrollBy(g, m);
  89473. else {
  89474. let y = 0, b = 0;
  89475. if (m) {
  89476. let _ = c.scrollTop;
  89477. c.scrollTop += m / v, b = (c.scrollTop - _) * v;
  89478. }
  89479. if (g) {
  89480. let _ = c.scrollLeft;
  89481. c.scrollLeft += g / p, y = (c.scrollLeft - _) * p;
  89482. }
  89483. e = {
  89484. left: e.left - y,
  89485. top: e.top - b,
  89486. right: e.right - y,
  89487. bottom: e.bottom - b
  89488. }, y && Math.abs(y - g) < 1 && (r = "nearest"), b && Math.abs(b - m) < 1 && (i = "nearest");
  89489. }
  89490. if (h)
  89491. break;
  89492. c = c.assignedSlot || c.parentNode;
  89493. } else if (c.nodeType == 11)
  89494. c = c.host;
  89495. else
  89496. break;
  89497. }
  89498. function Rat(t) {
  89499. let e = t.ownerDocument;
  89500. for (let n = t.parentNode; n && n != e.body; )
  89501. if (n.nodeType == 1) {
  89502. if (n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth)
  89503. return n;
  89504. n = n.assignedSlot || n.parentNode;
  89505. } else if (n.nodeType == 11)
  89506. n = n.host;
  89507. else
  89508. break;
  89509. return null;
  89510. }
  89511. class kat {
  89512. constructor() {
  89513. this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
  89514. }
  89515. eq(e) {
  89516. return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset;
  89517. }
  89518. setRange(e) {
  89519. let { anchorNode: n, focusNode: r } = e;
  89520. this.set(n, Math.min(e.anchorOffset, n ? Js(n) : 0), r, Math.min(e.focusOffset, r ? Js(r) : 0));
  89521. }
  89522. set(e, n, r, i) {
  89523. this.anchorNode = e, this.anchorOffset = n, this.focusNode = r, this.focusOffset = i;
  89524. }
  89525. }
  89526. let xd = null;
  89527. function bae(t) {
  89528. if (t.setActive)
  89529. return t.setActive();
  89530. if (xd)
  89531. return t.focus(xd);
  89532. let e = [];
  89533. for (let n = t; n && (e.push(n, n.scrollTop, n.scrollLeft), n != n.ownerDocument); n = n.parentNode)
  89534. ;
  89535. if (t.focus(xd == null ? {
  89536. get preventScroll() {
  89537. return xd = { preventScroll: !0 }, !0;
  89538. }
  89539. } : void 0), !xd) {
  89540. xd = !1;
  89541. for (let n = 0; n < e.length; ) {
  89542. let r = e[n++], i = e[n++], a = e[n++];
  89543. r.scrollTop != i && (r.scrollTop = i), r.scrollLeft != a && (r.scrollLeft = a);
  89544. }
  89545. }
  89546. }
  89547. let IH;
  89548. function Tf(t, e, n = e) {
  89549. let r = IH || (IH = document.createRange());
  89550. return r.setEnd(t, n), r.setStart(t, e), r;
  89551. }
  89552. function lh(t, e, n, r) {
  89553. let i = { key: e, code: e, keyCode: n, which: n, cancelable: !0 };
  89554. r && ({ altKey: i.altKey, ctrlKey: i.ctrlKey, shiftKey: i.shiftKey, metaKey: i.metaKey } = r);
  89555. let a = new KeyboardEvent("keydown", i);
  89556. a.synthetic = !0, t.dispatchEvent(a);
  89557. let o = new KeyboardEvent("keyup", i);
  89558. return o.synthetic = !0, t.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented;
  89559. }
  89560. function Lat(t) {
  89561. for (; t; ) {
  89562. if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host))
  89563. return t;
  89564. t = t.assignedSlot || t.parentNode;
  89565. }
  89566. return null;
  89567. }
  89568. function _ae(t) {
  89569. for (; t.attributes.length; )
  89570. t.removeAttributeNode(t.attributes[0]);
  89571. }
  89572. function Nat(t, e) {
  89573. let n = e.focusNode, r = e.focusOffset;
  89574. if (!n || e.anchorNode != n || e.anchorOffset != r)
  89575. return !1;
  89576. for (r = Math.min(r, Js(n)); ; )
  89577. if (r) {
  89578. if (n.nodeType != 1)
  89579. return !1;
  89580. let i = n.childNodes[r - 1];
  89581. i.contentEditable == "false" ? r-- : (n = i, r = Js(n));
  89582. } else {
  89583. if (n == t)
  89584. return !0;
  89585. r = Cf(n), n = n.parentNode;
  89586. }
  89587. }
  89588. function Oae(t) {
  89589. return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4);
  89590. }
  89591. function Sae(t, e) {
  89592. for (let n = t, r = e; ; ) {
  89593. if (n.nodeType == 3 && r > 0)
  89594. return { node: n, offset: r };
  89595. if (n.nodeType == 1 && r > 0) {
  89596. if (n.contentEditable == "false")
  89597. return null;
  89598. n = n.childNodes[r - 1], r = Js(n);
  89599. } else if (n.parentNode && !nS(n))
  89600. r = Cf(n), n = n.parentNode;
  89601. else
  89602. return null;
  89603. }
  89604. }
  89605. function xae(t, e) {
  89606. for (let n = t, r = e; ; ) {
  89607. if (n.nodeType == 3 && r < n.nodeValue.length)
  89608. return { node: n, offset: r };
  89609. if (n.nodeType == 1 && r < n.childNodes.length) {
  89610. if (n.contentEditable == "false")
  89611. return null;
  89612. n = n.childNodes[r], r = 0;
  89613. } else if (n.parentNode && !nS(n))
  89614. r = Cf(n) + 1, n = n.parentNode;
  89615. else
  89616. return null;
  89617. }
  89618. }
  89619. class kr {
  89620. constructor(e, n, r = !0) {
  89621. this.node = e, this.offset = n, this.precise = r;
  89622. }
  89623. static before(e, n) {
  89624. return new kr(e.parentNode, Cf(e), n);
  89625. }
  89626. static after(e, n) {
  89627. return new kr(e.parentNode, Cf(e) + 1, n);
  89628. }
  89629. }
  89630. const n4 = [];
  89631. class Jt {
  89632. constructor() {
  89633. this.parent = null, this.dom = null, this.flags = 2;
  89634. }
  89635. get overrideDOMText() {
  89636. return null;
  89637. }
  89638. get posAtStart() {
  89639. return this.parent ? this.parent.posBefore(this) : 0;
  89640. }
  89641. get posAtEnd() {
  89642. return this.posAtStart + this.length;
  89643. }
  89644. posBefore(e) {
  89645. let n = this.posAtStart;
  89646. for (let r of this.children) {
  89647. if (r == e)
  89648. return n;
  89649. n += r.length + r.breakAfter;
  89650. }
  89651. throw new RangeError("Invalid child in posBefore");
  89652. }
  89653. posAfter(e) {
  89654. return this.posBefore(e) + e.length;
  89655. }
  89656. sync(e, n) {
  89657. if (this.flags & 2) {
  89658. let r = this.dom, i = null, a;
  89659. for (let o of this.children) {
  89660. if (o.flags & 7) {
  89661. if (!o.dom && (a = i ? i.nextSibling : r.firstChild)) {
  89662. let s = Jt.get(a);
  89663. (!s || !s.parent && s.canReuseDOM(o)) && o.reuseDOM(a);
  89664. }
  89665. o.sync(e, n), o.flags &= -8;
  89666. }
  89667. if (a = i ? i.nextSibling : r.firstChild, n && !n.written && n.node == r && a != o.dom && (n.written = !0), o.dom.parentNode == r)
  89668. for (; a && a != o.dom; )
  89669. a = DH(a);
  89670. else
  89671. r.insertBefore(o.dom, a);
  89672. i = o.dom;
  89673. }
  89674. for (a = i ? i.nextSibling : r.firstChild, a && n && n.node == r && (n.written = !0); a; )
  89675. a = DH(a);
  89676. } else if (this.flags & 1)
  89677. for (let r of this.children)
  89678. r.flags & 7 && (r.sync(e, n), r.flags &= -8);
  89679. }
  89680. reuseDOM(e) {
  89681. }
  89682. localPosFromDOM(e, n) {
  89683. let r;
  89684. if (e == this.dom)
  89685. r = this.dom.childNodes[n];
  89686. else {
  89687. let i = Js(e) == 0 ? 0 : n == 0 ? -1 : 1;
  89688. for (; ; ) {
  89689. let a = e.parentNode;
  89690. if (a == this.dom)
  89691. break;
  89692. i == 0 && a.firstChild != a.lastChild && (e == a.firstChild ? i = -1 : i = 1), e = a;
  89693. }
  89694. i < 0 ? r = e : r = e.nextSibling;
  89695. }
  89696. if (r == this.dom.firstChild)
  89697. return 0;
  89698. for (; r && !Jt.get(r); )
  89699. r = r.nextSibling;
  89700. if (!r)
  89701. return this.length;
  89702. for (let i = 0, a = 0; ; i++) {
  89703. let o = this.children[i];
  89704. if (o.dom == r)
  89705. return a;
  89706. a += o.length + o.breakAfter;
  89707. }
  89708. }
  89709. domBoundsAround(e, n, r = 0) {
  89710. let i = -1, a = -1, o = -1, s = -1;
  89711. for (let l = 0, u = r, c = r; l < this.children.length; l++) {
  89712. let f = this.children[l], d = u + f.length;
  89713. if (u < e && d > n)
  89714. return f.domBoundsAround(e, n, u);
  89715. if (d >= e && i == -1 && (i = l, a = u), u > n && f.dom.parentNode == this.dom) {
  89716. o = l, s = c;
  89717. break;
  89718. }
  89719. c = d, u = d + f.breakAfter;
  89720. }
  89721. return {
  89722. from: a,
  89723. to: s < 0 ? r + this.length : s,
  89724. startDOM: (i ? this.children[i - 1].dom.nextSibling : null) || this.dom.firstChild,
  89725. endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null
  89726. };
  89727. }
  89728. markDirty(e = !1) {
  89729. this.flags |= 2, this.markParentsDirty(e);
  89730. }
  89731. markParentsDirty(e) {
  89732. for (let n = this.parent; n; n = n.parent) {
  89733. if (e && (n.flags |= 2), n.flags & 1)
  89734. return;
  89735. n.flags |= 1, e = !1;
  89736. }
  89737. }
  89738. setParent(e) {
  89739. this.parent != e && (this.parent = e, this.flags & 7 && this.markParentsDirty(!0));
  89740. }
  89741. setDOM(e) {
  89742. this.dom != e && (this.dom && (this.dom.cmView = null), this.dom = e, e.cmView = this);
  89743. }
  89744. get rootView() {
  89745. for (let e = this; ; ) {
  89746. let n = e.parent;
  89747. if (!n)
  89748. return e;
  89749. e = n;
  89750. }
  89751. }
  89752. replaceChildren(e, n, r = n4) {
  89753. this.markDirty();
  89754. for (let i = e; i < n; i++) {
  89755. let a = this.children[i];
  89756. a.parent == this && r.indexOf(a) < 0 && a.destroy();
  89757. }
  89758. this.children.splice(e, n - e, ...r);
  89759. for (let i = 0; i < r.length; i++)
  89760. r[i].setParent(this);
  89761. }
  89762. ignoreMutation(e) {
  89763. return !1;
  89764. }
  89765. ignoreEvent(e) {
  89766. return !1;
  89767. }
  89768. childCursor(e = this.length) {
  89769. return new wae(this.children, e, this.children.length);
  89770. }
  89771. childPos(e, n = 1) {
  89772. return this.childCursor().findPos(e, n);
  89773. }
  89774. toString() {
  89775. let e = this.constructor.name.replace("View", "");
  89776. return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
  89777. }
  89778. static get(e) {
  89779. return e.cmView;
  89780. }
  89781. get isEditable() {
  89782. return !0;
  89783. }
  89784. get isWidget() {
  89785. return !1;
  89786. }
  89787. get isHidden() {
  89788. return !1;
  89789. }
  89790. merge(e, n, r, i, a, o) {
  89791. return !1;
  89792. }
  89793. become(e) {
  89794. return !1;
  89795. }
  89796. canReuseDOM(e) {
  89797. return e.constructor == this.constructor && !((this.flags | e.flags) & 8);
  89798. }
  89799. // When this is a zero-length view with a side, this should return a
  89800. // number <= 0 to indicate it is before its position, or a
  89801. // number > 0 when after its position.
  89802. getSide() {
  89803. return 0;
  89804. }
  89805. destroy() {
  89806. for (let e of this.children)
  89807. e.parent == this && e.destroy();
  89808. this.parent = null;
  89809. }
  89810. }
  89811. Jt.prototype.breakAfter = 0;
  89812. function DH(t) {
  89813. let e = t.nextSibling;
  89814. return t.parentNode.removeChild(t), e;
  89815. }
  89816. class wae {
  89817. constructor(e, n, r) {
  89818. this.children = e, this.pos = n, this.i = r, this.off = 0;
  89819. }
  89820. findPos(e, n = 1) {
  89821. for (; ; ) {
  89822. if (e > this.pos || e == this.pos && (n > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))
  89823. return this.off = e - this.pos, this;
  89824. let r = this.children[--this.i];
  89825. this.pos -= r.length + r.breakAfter;
  89826. }
  89827. }
  89828. }
  89829. function Cae(t, e, n, r, i, a, o, s, l) {
  89830. let { children: u } = t, c = u.length ? u[e] : null, f = a.length ? a[a.length - 1] : null, d = f ? f.breakAfter : o;
  89831. if (!(e == r && c && !o && !d && a.length < 2 && c.merge(n, i, a.length ? f : null, n == 0, s, l))) {
  89832. if (r < u.length) {
  89833. let h = u[r];
  89834. h && (i < h.length || h.breakAfter && (f != null && f.breakAfter)) ? (e == r && (h = h.split(i), i = 0), !d && f && h.merge(0, i, f, !0, 0, l) ? a[a.length - 1] = h : ((i || h.children.length && !h.children[0].length) && h.merge(0, i, null, !1, 0, l), a.push(h))) : h != null && h.breakAfter && (f ? f.breakAfter = 1 : o = 1), r++;
  89835. }
  89836. for (c && (c.breakAfter = o, n > 0 && (!o && a.length && c.merge(n, c.length, a[0], !1, s, 0) ? c.breakAfter = a.shift().breakAfter : (n < c.length || c.children.length && c.children[c.children.length - 1].length == 0) && c.merge(n, c.length, null, !1, s, 0), e++)); e < r && a.length; )
  89837. if (u[r - 1].become(a[a.length - 1]))
  89838. r--, a.pop(), l = a.length ? 0 : s;
  89839. else if (u[e].become(a[0]))
  89840. e++, a.shift(), s = a.length ? 0 : l;
  89841. else
  89842. break;
  89843. !a.length && e && r < u.length && !u[e - 1].breakAfter && u[r].merge(0, 0, u[e - 1], !1, s, l) && e--, (e < r || a.length) && t.replaceChildren(e, r, a);
  89844. }
  89845. }
  89846. function Tae(t, e, n, r, i, a) {
  89847. let o = t.childCursor(), { i: s, off: l } = o.findPos(n, 1), { i: u, off: c } = o.findPos(e, -1), f = e - n;
  89848. for (let d of r)
  89849. f += d.length;
  89850. t.length += f, Cae(t, u, c, s, l, r, 0, i, a);
  89851. }
  89852. let pi = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, gM = typeof document < "u" ? document : { documentElement: { style: {} } };
  89853. const mM = /* @__PURE__ */ /Edge\/(\d+)/.exec(pi.userAgent), Pae = /* @__PURE__ */ /MSIE \d/.test(pi.userAgent), yM = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pi.userAgent), Dw = !!(Pae || yM || mM), RH = !Dw && /* @__PURE__ */ /gecko\/(\d+)/i.test(pi.userAgent), v$ = !Dw && /* @__PURE__ */ /Chrome\/(\d+)/.exec(pi.userAgent), kH = "webkitFontSmoothing" in gM.documentElement.style, $ae = !Dw && /* @__PURE__ */ /Apple Computer/.test(pi.vendor), LH = $ae && (/* @__PURE__ */ /Mobile\/\w+/.test(pi.userAgent) || pi.maxTouchPoints > 2);
  89854. var Ne = {
  89855. mac: LH || /* @__PURE__ */ /Mac/.test(pi.platform),
  89856. windows: /* @__PURE__ */ /Win/.test(pi.platform),
  89857. linux: /* @__PURE__ */ /Linux|X11/.test(pi.platform),
  89858. ie: Dw,
  89859. ie_version: Pae ? gM.documentMode || 6 : yM ? +yM[1] : mM ? +mM[1] : 0,
  89860. gecko: RH,
  89861. gecko_version: RH ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(pi.userAgent) || [0, 0])[1] : 0,
  89862. chrome: !!v$,
  89863. chrome_version: v$ ? +v$[1] : 0,
  89864. ios: LH,
  89865. android: /* @__PURE__ */ /Android\b/.test(pi.userAgent),
  89866. webkit: kH,
  89867. safari: $ae,
  89868. webkit_version: kH ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(pi.userAgent) || [0, 0])[1] : 0,
  89869. tabSize: gM.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
  89870. };
  89871. const Bat = 256;
  89872. class lo extends Jt {
  89873. constructor(e) {
  89874. super(), this.text = e;
  89875. }
  89876. get length() {
  89877. return this.text.length;
  89878. }
  89879. createDOM(e) {
  89880. this.setDOM(e || document.createTextNode(this.text));
  89881. }
  89882. sync(e, n) {
  89883. this.dom || this.createDOM(), this.dom.nodeValue != this.text && (n && n.node == this.dom && (n.written = !0), this.dom.nodeValue = this.text);
  89884. }
  89885. reuseDOM(e) {
  89886. e.nodeType == 3 && this.createDOM(e);
  89887. }
  89888. merge(e, n, r) {
  89889. return this.flags & 8 || r && (!(r instanceof lo) || this.length - (n - e) + r.length > Bat || r.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (r ? r.text : "") + this.text.slice(n), this.markDirty(), !0);
  89890. }
  89891. split(e) {
  89892. let n = new lo(this.text.slice(e));
  89893. return this.text = this.text.slice(0, e), this.markDirty(), n.flags |= this.flags & 8, n;
  89894. }
  89895. localPosFromDOM(e, n) {
  89896. return e == this.dom ? n : n ? this.text.length : 0;
  89897. }
  89898. domAtPos(e) {
  89899. return new kr(this.dom, e);
  89900. }
  89901. domBoundsAround(e, n, r) {
  89902. return { from: r, to: r + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling };
  89903. }
  89904. coordsAt(e, n) {
  89905. return zat(this.dom, e, n);
  89906. }
  89907. }
  89908. class el extends Jt {
  89909. constructor(e, n = [], r = 0) {
  89910. super(), this.mark = e, this.children = n, this.length = r;
  89911. for (let i of n)
  89912. i.setParent(this);
  89913. }
  89914. setAttrs(e) {
  89915. if (_ae(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)
  89916. for (let n in this.mark.attrs)
  89917. e.setAttribute(n, this.mark.attrs[n]);
  89918. return e;
  89919. }
  89920. canReuseDOM(e) {
  89921. return super.canReuseDOM(e) && !((this.flags | e.flags) & 8);
  89922. }
  89923. reuseDOM(e) {
  89924. e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), this.flags |= 6);
  89925. }
  89926. sync(e, n) {
  89927. this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, n);
  89928. }
  89929. merge(e, n, r, i, a, o) {
  89930. return r && (!(r instanceof el && r.mark.eq(this.mark)) || e && a <= 0 || n < this.length && o <= 0) ? !1 : (Tae(this, e, n, r ? r.children.slice() : [], a - 1, o - 1), this.markDirty(), !0);
  89931. }
  89932. split(e) {
  89933. let n = [], r = 0, i = -1, a = 0;
  89934. for (let s of this.children) {
  89935. let l = r + s.length;
  89936. l > e && n.push(r < e ? s.split(e - r) : s), i < 0 && r >= e && (i = a), r = l, a++;
  89937. }
  89938. let o = this.length - e;
  89939. return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new el(this.mark, n, o);
  89940. }
  89941. domAtPos(e) {
  89942. return Aae(this, e);
  89943. }
  89944. coordsAt(e, n) {
  89945. return Mae(this, e, n);
  89946. }
  89947. }
  89948. function zat(t, e, n) {
  89949. let r = t.nodeValue.length;
  89950. e > r && (e = r);
  89951. let i = e, a = e, o = 0;
  89952. e == 0 && n < 0 || e == r && n >= 0 ? Ne.chrome || Ne.gecko || (e ? (i--, o = 1) : a < r && (a++, o = -1)) : n < 0 ? i-- : a < r && a++;
  89953. let s = Tf(t, i, a).getClientRects();
  89954. if (!s.length)
  89955. return null;
  89956. let l = s[(o ? o < 0 : n >= 0) ? 0 : s.length - 1];
  89957. return Ne.safari && !o && l.width == 0 && (l = Array.prototype.find.call(s, (u) => u.width) || l), o ? Iw(l, o < 0) : l || null;
  89958. }
  89959. class Ql extends Jt {
  89960. static create(e, n, r) {
  89961. return new Ql(e, n, r);
  89962. }
  89963. constructor(e, n, r) {
  89964. super(), this.widget = e, this.length = n, this.side = r, this.prevWidget = null;
  89965. }
  89966. split(e) {
  89967. let n = Ql.create(this.widget, this.length - e, this.side);
  89968. return this.length -= e, n;
  89969. }
  89970. sync(e) {
  89971. (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  89972. }
  89973. getSide() {
  89974. return this.side;
  89975. }
  89976. merge(e, n, r, i, a, o) {
  89977. return r && (!(r instanceof Ql) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
  89978. }
  89979. become(e) {
  89980. return e instanceof Ql && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1;
  89981. }
  89982. ignoreMutation() {
  89983. return !0;
  89984. }
  89985. ignoreEvent(e) {
  89986. return this.widget.ignoreEvent(e);
  89987. }
  89988. get overrideDOMText() {
  89989. if (this.length == 0)
  89990. return Ft.empty;
  89991. let e = this;
  89992. for (; e.parent; )
  89993. e = e.parent;
  89994. let { view: n } = e, r = n && n.state.doc, i = this.posAtStart;
  89995. return r ? r.slice(i, i + this.length) : Ft.empty;
  89996. }
  89997. domAtPos(e) {
  89998. return (this.length ? e == 0 : this.side > 0) ? kr.before(this.dom) : kr.after(this.dom, e == this.length);
  89999. }
  90000. domBoundsAround() {
  90001. return null;
  90002. }
  90003. coordsAt(e, n) {
  90004. let r = this.widget.coordsAt(this.dom, e, n);
  90005. if (r)
  90006. return r;
  90007. let i = this.dom.getClientRects(), a = null;
  90008. if (!i.length)
  90009. return null;
  90010. let o = this.side ? this.side < 0 : e > 0;
  90011. for (let s = o ? i.length - 1 : 0; a = i[s], !(e > 0 ? s == 0 : s == i.length - 1 || a.top < a.bottom); s += o ? -1 : 1)
  90012. ;
  90013. return Iw(a, !o);
  90014. }
  90015. get isEditable() {
  90016. return !1;
  90017. }
  90018. get isWidget() {
  90019. return !0;
  90020. }
  90021. get isHidden() {
  90022. return this.widget.isHidden;
  90023. }
  90024. destroy() {
  90025. super.destroy(), this.dom && this.widget.destroy(this.dom);
  90026. }
  90027. }
  90028. class Xh extends Jt {
  90029. constructor(e) {
  90030. super(), this.side = e;
  90031. }
  90032. get length() {
  90033. return 0;
  90034. }
  90035. merge() {
  90036. return !1;
  90037. }
  90038. become(e) {
  90039. return e instanceof Xh && e.side == this.side;
  90040. }
  90041. split() {
  90042. return new Xh(this.side);
  90043. }
  90044. sync() {
  90045. if (!this.dom) {
  90046. let e = document.createElement("img");
  90047. e.className = "cm-widgetBuffer", e.setAttribute("aria-hidden", "true"), this.setDOM(e);
  90048. }
  90049. }
  90050. getSide() {
  90051. return this.side;
  90052. }
  90053. domAtPos(e) {
  90054. return this.side > 0 ? kr.before(this.dom) : kr.after(this.dom);
  90055. }
  90056. localPosFromDOM() {
  90057. return 0;
  90058. }
  90059. domBoundsAround() {
  90060. return null;
  90061. }
  90062. coordsAt(e) {
  90063. return this.dom.getBoundingClientRect();
  90064. }
  90065. get overrideDOMText() {
  90066. return Ft.empty;
  90067. }
  90068. get isHidden() {
  90069. return !0;
  90070. }
  90071. }
  90072. lo.prototype.children = Ql.prototype.children = Xh.prototype.children = n4;
  90073. function Aae(t, e) {
  90074. let n = t.dom, { children: r } = t, i = 0;
  90075. for (let a = 0; i < r.length; i++) {
  90076. let o = r[i], s = a + o.length;
  90077. if (!(s == a && o.getSide() <= 0)) {
  90078. if (e > a && e < s && o.dom.parentNode == n)
  90079. return o.domAtPos(e - a);
  90080. if (e <= a)
  90081. break;
  90082. a = s;
  90083. }
  90084. }
  90085. for (let a = i; a > 0; a--) {
  90086. let o = r[a - 1];
  90087. if (o.dom.parentNode == n)
  90088. return o.domAtPos(o.length);
  90089. }
  90090. for (let a = i; a < r.length; a++) {
  90091. let o = r[a];
  90092. if (o.dom.parentNode == n)
  90093. return o.domAtPos(0);
  90094. }
  90095. return new kr(n, 0);
  90096. }
  90097. function Eae(t, e, n) {
  90098. let r, { children: i } = t;
  90099. n > 0 && e instanceof el && i.length && (r = i[i.length - 1]) instanceof el && r.mark.eq(e.mark) ? Eae(r, e.children[0], n - 1) : (i.push(e), e.setParent(t)), t.length += e.length;
  90100. }
  90101. function Mae(t, e, n) {
  90102. let r = null, i = -1, a = null, o = -1;
  90103. function s(u, c) {
  90104. for (let f = 0, d = 0; f < u.children.length && d <= c; f++) {
  90105. let h = u.children[f], p = d + h.length;
  90106. p >= c && (h.children.length ? s(h, c - d) : (!a || a.isHidden && n > 0) && (p > c || d == p && h.getSide() > 0) ? (a = h, o = c - d) : (d < c || d == p && h.getSide() < 0 && !h.isHidden) && (r = h, i = c - d)), d = p;
  90107. }
  90108. }
  90109. s(t, e);
  90110. let l = (n < 0 ? r : a) || r || a;
  90111. return l ? l.coordsAt(Math.max(0, l == r ? i : o), n) : Vat(t);
  90112. }
  90113. function Vat(t) {
  90114. let e = t.dom.lastChild;
  90115. if (!e)
  90116. return t.dom.getBoundingClientRect();
  90117. let n = Uh(e);
  90118. return n[n.length - 1] || null;
  90119. }
  90120. function bM(t, e) {
  90121. for (let n in t)
  90122. n == "class" && e.class ? e.class += " " + t.class : n == "style" && e.style ? e.style += ";" + t.style : e[n] = t[n];
  90123. return e;
  90124. }
  90125. const NH = /* @__PURE__ */ Object.create(null);
  90126. function rS(t, e, n) {
  90127. if (t == e)
  90128. return !0;
  90129. t || (t = NH), e || (e = NH);
  90130. let r = Object.keys(t), i = Object.keys(e);
  90131. if (r.length - (n && r.indexOf(n) > -1 ? 1 : 0) != i.length - (n && i.indexOf(n) > -1 ? 1 : 0))
  90132. return !1;
  90133. for (let a of r)
  90134. if (a != n && (i.indexOf(a) == -1 || t[a] !== e[a]))
  90135. return !1;
  90136. return !0;
  90137. }
  90138. function _M(t, e, n) {
  90139. let r = !1;
  90140. if (e)
  90141. for (let i in e)
  90142. n && i in n || (r = !0, i == "style" ? t.style.cssText = "" : t.removeAttribute(i));
  90143. if (n)
  90144. for (let i in n)
  90145. e && e[i] == n[i] || (r = !0, i == "style" ? t.style.cssText = n[i] : t.setAttribute(i, n[i]));
  90146. return r;
  90147. }
  90148. function Fat(t) {
  90149. let e = /* @__PURE__ */ Object.create(null);
  90150. for (let n = 0; n < t.attributes.length; n++) {
  90151. let r = t.attributes[n];
  90152. e[r.name] = r.value;
  90153. }
  90154. return e;
  90155. }
  90156. class Ln extends Jt {
  90157. constructor() {
  90158. super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0;
  90159. }
  90160. // Consumes source
  90161. merge(e, n, r, i, a, o) {
  90162. if (r) {
  90163. if (!(r instanceof Ln))
  90164. return !1;
  90165. this.dom || r.transferDOM(this);
  90166. }
  90167. return i && this.setDeco(r ? r.attrs : null), Tae(this, e, n, r ? r.children.slice() : [], a, o), !0;
  90168. }
  90169. split(e) {
  90170. let n = new Ln();
  90171. if (n.breakAfter = this.breakAfter, this.length == 0)
  90172. return n;
  90173. let { i: r, off: i } = this.childPos(e);
  90174. i && (n.append(this.children[r].split(i), 0), this.children[r].merge(i, this.children[r].length, null, !1, 0, 0), r++);
  90175. for (let a = r; a < this.children.length; a++)
  90176. n.append(this.children[a], 0);
  90177. for (; r > 0 && this.children[r - 1].length == 0; )
  90178. this.children[--r].destroy();
  90179. return this.children.length = r, this.markDirty(), this.length = e, n;
  90180. }
  90181. transferDOM(e) {
  90182. this.dom && (this.markDirty(), e.setDOM(this.dom), e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null);
  90183. }
  90184. setDeco(e) {
  90185. rS(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e);
  90186. }
  90187. append(e, n) {
  90188. Eae(this, e, n);
  90189. }
  90190. // Only called when building a line view in ContentBuilder
  90191. addLineDeco(e) {
  90192. let n = e.spec.attributes, r = e.spec.class;
  90193. n && (this.attrs = bM(n, this.attrs || {})), r && (this.attrs = bM({ class: r }, this.attrs || {}));
  90194. }
  90195. domAtPos(e) {
  90196. return Aae(this, e);
  90197. }
  90198. reuseDOM(e) {
  90199. e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6);
  90200. }
  90201. sync(e, n) {
  90202. var r;
  90203. this.dom ? this.flags & 4 && (_ae(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (_M(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, n);
  90204. let i = this.dom.lastChild;
  90205. for (; i && Jt.get(i) instanceof el; )
  90206. i = i.lastChild;
  90207. if (!i || !this.length || i.nodeName != "BR" && ((r = Jt.get(i)) === null || r === void 0 ? void 0 : r.isEditable) == !1 && (!Ne.ios || !this.children.some((a) => a instanceof lo))) {
  90208. let a = document.createElement("BR");
  90209. a.cmIgnore = !0, this.dom.appendChild(a);
  90210. }
  90211. }
  90212. measureTextSize() {
  90213. if (this.children.length == 0 || this.length > 20)
  90214. return null;
  90215. let e = 0, n;
  90216. for (let r of this.children) {
  90217. if (!(r instanceof lo) || /[^ -~]/.test(r.text))
  90218. return null;
  90219. let i = Uh(r.dom);
  90220. if (i.length != 1)
  90221. return null;
  90222. e += i[0].width, n = i[0].height;
  90223. }
  90224. return e ? {
  90225. lineHeight: this.dom.getBoundingClientRect().height,
  90226. charWidth: e / this.length,
  90227. textHeight: n
  90228. } : null;
  90229. }
  90230. coordsAt(e, n) {
  90231. let r = Mae(this, e, n);
  90232. if (!this.children.length && r && this.parent) {
  90233. let { heightOracle: i } = this.parent.view.viewState, a = r.bottom - r.top;
  90234. if (Math.abs(a - i.lineHeight) < 2 && i.textHeight < a) {
  90235. let o = (a - i.textHeight) / 2;
  90236. return { top: r.top + o, bottom: r.bottom - o, left: r.left, right: r.left };
  90237. }
  90238. }
  90239. return r;
  90240. }
  90241. become(e) {
  90242. return e instanceof Ln && this.children.length == 0 && e.children.length == 0 && rS(this.attrs, e.attrs) && this.breakAfter == e.breakAfter;
  90243. }
  90244. covers() {
  90245. return !0;
  90246. }
  90247. static find(e, n) {
  90248. for (let r = 0, i = 0; r < e.children.length; r++) {
  90249. let a = e.children[r], o = i + a.length;
  90250. if (o >= n) {
  90251. if (a instanceof Ln)
  90252. return a;
  90253. if (o > n)
  90254. break;
  90255. }
  90256. i = o + a.breakAfter;
  90257. }
  90258. return null;
  90259. }
  90260. }
  90261. class Ls extends Jt {
  90262. constructor(e, n, r) {
  90263. super(), this.widget = e, this.length = n, this.deco = r, this.breakAfter = 0, this.prevWidget = null;
  90264. }
  90265. merge(e, n, r, i, a, o) {
  90266. return r && (!(r instanceof Ls) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
  90267. }
  90268. domAtPos(e) {
  90269. return e == 0 ? kr.before(this.dom) : kr.after(this.dom, e == this.length);
  90270. }
  90271. split(e) {
  90272. let n = this.length - e;
  90273. this.length = e;
  90274. let r = new Ls(this.widget, n, this.deco);
  90275. return r.breakAfter = this.breakAfter, r;
  90276. }
  90277. get children() {
  90278. return n4;
  90279. }
  90280. sync(e) {
  90281. (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  90282. }
  90283. get overrideDOMText() {
  90284. return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : Ft.empty;
  90285. }
  90286. domBoundsAround() {
  90287. return null;
  90288. }
  90289. become(e) {
  90290. return e instanceof Ls && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1;
  90291. }
  90292. ignoreMutation() {
  90293. return !0;
  90294. }
  90295. ignoreEvent(e) {
  90296. return this.widget.ignoreEvent(e);
  90297. }
  90298. get isEditable() {
  90299. return !1;
  90300. }
  90301. get isWidget() {
  90302. return !0;
  90303. }
  90304. coordsAt(e, n) {
  90305. return this.widget.coordsAt(this.dom, e, n);
  90306. }
  90307. destroy() {
  90308. super.destroy(), this.dom && this.widget.destroy(this.dom);
  90309. }
  90310. covers(e) {
  90311. let { startSide: n, endSide: r } = this.deco;
  90312. return n == r ? !1 : e < 0 ? n < 0 : r > 0;
  90313. }
  90314. }
  90315. class ds {
  90316. /**
  90317. Compare this instance to another instance of the same type.
  90318. (TypeScript can't express this, but only instances of the same
  90319. specific class will be passed to this method.) This is used to
  90320. avoid redrawing widgets when they are replaced by a new
  90321. decoration of the same type. The default implementation just
  90322. returns `false`, which will cause new instances of the widget to
  90323. always be redrawn.
  90324. */
  90325. eq(e) {
  90326. return !1;
  90327. }
  90328. /**
  90329. Update a DOM element created by a widget of the same type (but
  90330. different, non-`eq` content) to reflect this widget. May return
  90331. true to indicate that it could update, false to indicate it
  90332. couldn't (in which case the widget will be redrawn). The default
  90333. implementation just returns false.
  90334. */
  90335. updateDOM(e, n) {
  90336. return !1;
  90337. }
  90338. /**
  90339. @internal
  90340. */
  90341. compare(e) {
  90342. return this == e || this.constructor == e.constructor && this.eq(e);
  90343. }
  90344. /**
  90345. The estimated height this widget will have, to be used when
  90346. estimating the height of content that hasn't been drawn. May
  90347. return -1 to indicate you don't know. The default implementation
  90348. returns -1.
  90349. */
  90350. get estimatedHeight() {
  90351. return -1;
  90352. }
  90353. /**
  90354. For inline widgets that are displayed inline (as opposed to
  90355. `inline-block`) and introduce line breaks (through `<br>` tags
  90356. or textual newlines), this must indicate the amount of line
  90357. breaks they introduce. Defaults to 0.
  90358. */
  90359. get lineBreaks() {
  90360. return 0;
  90361. }
  90362. /**
  90363. Can be used to configure which kinds of events inside the widget
  90364. should be ignored by the editor. The default is to ignore all
  90365. events.
  90366. */
  90367. ignoreEvent(e) {
  90368. return !0;
  90369. }
  90370. /**
  90371. Override the way screen coordinates for positions at/in the
  90372. widget are found. `pos` will be the offset into the widget, and
  90373. `side` the side of the position that is being queried—less than
  90374. zero for before, greater than zero for after, and zero for
  90375. directly at that position.
  90376. */
  90377. coordsAt(e, n, r) {
  90378. return null;
  90379. }
  90380. /**
  90381. @internal
  90382. */
  90383. get isHidden() {
  90384. return !1;
  90385. }
  90386. /**
  90387. @internal
  90388. */
  90389. get editable() {
  90390. return !1;
  90391. }
  90392. /**
  90393. This is called when the an instance of the widget is removed
  90394. from the editor view.
  90395. */
  90396. destroy(e) {
  90397. }
  90398. }
  90399. var Jr = /* @__PURE__ */ function(t) {
  90400. return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t;
  90401. }(Jr || (Jr = {}));
  90402. class Ze extends wf {
  90403. constructor(e, n, r, i) {
  90404. super(), this.startSide = e, this.endSide = n, this.widget = r, this.spec = i;
  90405. }
  90406. /**
  90407. @internal
  90408. */
  90409. get heightRelevant() {
  90410. return !1;
  90411. }
  90412. /**
  90413. Create a mark decoration, which influences the styling of the
  90414. content in its range. Nested mark decorations will cause nested
  90415. DOM elements to be created. Nesting order is determined by
  90416. precedence of the [facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), with
  90417. the higher-precedence decorations creating the inner DOM nodes.
  90418. Such elements are split on line boundaries and on the boundaries
  90419. of lower-precedence decorations.
  90420. */
  90421. static mark(e) {
  90422. return new iy(e);
  90423. }
  90424. /**
  90425. Create a widget decoration, which displays a DOM element at the
  90426. given position.
  90427. */
  90428. static widget(e) {
  90429. let n = Math.max(-1e4, Math.min(1e4, e.side || 0)), r = !!e.block;
  90430. return n += r && !e.inlineOrder ? n > 0 ? 3e8 : -4e8 : n > 0 ? 1e8 : -1e8, new gu(e, n, n, r, e.widget || null, !1);
  90431. }
  90432. /**
  90433. Create a replace decoration which replaces the given range with
  90434. a widget, or simply hides it.
  90435. */
  90436. static replace(e) {
  90437. let n = !!e.block, r, i;
  90438. if (e.isBlockGap)
  90439. r = -5e8, i = 4e8;
  90440. else {
  90441. let { start: a, end: o } = Iae(e, n);
  90442. r = (a ? n ? -3e8 : -1 : 5e8) - 1, i = (o ? n ? 2e8 : 1 : -6e8) + 1;
  90443. }
  90444. return new gu(e, r, i, n, e.widget || null, !0);
  90445. }
  90446. /**
  90447. Create a line decoration, which can add DOM attributes to the
  90448. line starting at the given position.
  90449. */
  90450. static line(e) {
  90451. return new ay(e);
  90452. }
  90453. /**
  90454. Build a [`DecorationSet`](https://codemirror.net/6/docs/ref/#view.DecorationSet) from the given
  90455. decorated range or ranges. If the ranges aren't already sorted,
  90456. pass `true` for `sort` to make the library sort them for you.
  90457. */
  90458. static set(e, n = !1) {
  90459. return Vt.of(e, n);
  90460. }
  90461. /**
  90462. @internal
  90463. */
  90464. hasHeight() {
  90465. return this.widget ? this.widget.estimatedHeight > -1 : !1;
  90466. }
  90467. }
  90468. Ze.none = Vt.empty;
  90469. class iy extends Ze {
  90470. constructor(e) {
  90471. let { start: n, end: r } = Iae(e);
  90472. super(n ? -1 : 5e8, r ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null;
  90473. }
  90474. eq(e) {
  90475. var n, r;
  90476. return this == e || e instanceof iy && this.tagName == e.tagName && (this.class || ((n = this.attrs) === null || n === void 0 ? void 0 : n.class)) == (e.class || ((r = e.attrs) === null || r === void 0 ? void 0 : r.class)) && rS(this.attrs, e.attrs, "class");
  90477. }
  90478. range(e, n = e) {
  90479. if (e >= n)
  90480. throw new RangeError("Mark decorations may not be empty");
  90481. return super.range(e, n);
  90482. }
  90483. }
  90484. iy.prototype.point = !1;
  90485. class ay extends Ze {
  90486. constructor(e) {
  90487. super(-2e8, -2e8, null, e);
  90488. }
  90489. eq(e) {
  90490. return e instanceof ay && this.spec.class == e.spec.class && rS(this.spec.attributes, e.spec.attributes);
  90491. }
  90492. range(e, n = e) {
  90493. if (n != e)
  90494. throw new RangeError("Line decoration ranges must be zero-length");
  90495. return super.range(e, n);
  90496. }
  90497. }
  90498. ay.prototype.mapMode = yr.TrackBefore;
  90499. ay.prototype.point = !0;
  90500. class gu extends Ze {
  90501. constructor(e, n, r, i, a, o) {
  90502. super(n, r, a, e), this.block = i, this.isReplace = o, this.mapMode = i ? n <= 0 ? yr.TrackBefore : yr.TrackAfter : yr.TrackDel;
  90503. }
  90504. // Only relevant when this.block == true
  90505. get type() {
  90506. return this.startSide != this.endSide ? Jr.WidgetRange : this.startSide <= 0 ? Jr.WidgetBefore : Jr.WidgetAfter;
  90507. }
  90508. get heightRelevant() {
  90509. return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
  90510. }
  90511. eq(e) {
  90512. return e instanceof gu && Wat(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide;
  90513. }
  90514. range(e, n = e) {
  90515. if (this.isReplace && (e > n || e == n && this.startSide > 0 && this.endSide <= 0))
  90516. throw new RangeError("Invalid range for replacement decoration");
  90517. if (!this.isReplace && n != e)
  90518. throw new RangeError("Widget decorations can only have zero-length ranges");
  90519. return super.range(e, n);
  90520. }
  90521. }
  90522. gu.prototype.point = !0;
  90523. function Iae(t, e = !1) {
  90524. let { inclusiveStart: n, inclusiveEnd: r } = t;
  90525. return n == null && (n = t.inclusive), r == null && (r = t.inclusive), { start: n ?? e, end: r ?? e };
  90526. }
  90527. function Wat(t, e) {
  90528. return t == e || !!(t && e && t.compare(e));
  90529. }
  90530. function OM(t, e, n, r = 0) {
  90531. let i = n.length - 1;
  90532. i >= 0 && n[i] + r >= t ? n[i] = Math.max(n[i], e) : n.push(t, e);
  90533. }
  90534. class Qg {
  90535. constructor(e, n, r, i) {
  90536. this.doc = e, this.pos = n, this.end = r, this.disallowBlockEffectsFor = i, this.content = [], this.curLine = null, this.breakAtStart = 0, this.pendingBuffer = 0, this.bufferMarks = [], this.atCursorPos = !0, this.openStart = -1, this.openEnd = -1, this.text = "", this.textOff = 0, this.cursor = e.iter(), this.skip = n;
  90537. }
  90538. posCovered() {
  90539. if (this.content.length == 0)
  90540. return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos;
  90541. let e = this.content[this.content.length - 1];
  90542. return !(e.breakAfter || e instanceof Ls && e.deco.endSide < 0);
  90543. }
  90544. getLine() {
  90545. return this.curLine || (this.content.push(this.curLine = new Ln()), this.atCursorPos = !0), this.curLine;
  90546. }
  90547. flushBuffer(e = this.bufferMarks) {
  90548. this.pendingBuffer && (this.curLine.append(Gb(new Xh(-1), e), e.length), this.pendingBuffer = 0);
  90549. }
  90550. addBlockWidget(e) {
  90551. this.flushBuffer(), this.curLine = null, this.content.push(e);
  90552. }
  90553. finish(e) {
  90554. this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof Ls) && this.getLine();
  90555. }
  90556. buildText(e, n, r) {
  90557. for (; e > 0; ) {
  90558. if (this.textOff == this.text.length) {
  90559. let { value: a, lineBreak: o, done: s } = this.cursor.next(this.skip);
  90560. if (this.skip = 0, s)
  90561. throw new Error("Ran out of text content when drawing inline views");
  90562. if (o) {
  90563. this.posCovered() || this.getLine(), this.content.length ? this.content[this.content.length - 1].breakAfter = 1 : this.breakAtStart = 1, this.flushBuffer(), this.curLine = null, this.atCursorPos = !0, e--;
  90564. continue;
  90565. } else
  90566. this.text = a, this.textOff = 0;
  90567. }
  90568. let i = Math.min(
  90569. this.text.length - this.textOff,
  90570. e,
  90571. 512
  90572. /* T.Chunk */
  90573. );
  90574. this.flushBuffer(n.slice(n.length - r)), this.getLine().append(Gb(new lo(this.text.slice(this.textOff, this.textOff + i)), n), r), this.atCursorPos = !0, this.textOff += i, e -= i, r = 0;
  90575. }
  90576. }
  90577. span(e, n, r, i) {
  90578. this.buildText(n - e, r, i), this.pos = n, this.openStart < 0 && (this.openStart = i);
  90579. }
  90580. point(e, n, r, i, a, o) {
  90581. if (this.disallowBlockEffectsFor[o] && r instanceof gu) {
  90582. if (r.block)
  90583. throw new RangeError("Block decorations may not be specified via plugins");
  90584. if (n > this.doc.lineAt(this.pos).to)
  90585. throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
  90586. }
  90587. let s = n - e;
  90588. if (r instanceof gu)
  90589. if (r.block)
  90590. r.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Ls(r.widget || Yh.block, s, r));
  90591. else {
  90592. let l = Ql.create(r.widget || Yh.inline, s, s ? 0 : r.startSide), u = this.atCursorPos && !l.isEditable && a <= i.length && (e < n || r.startSide > 0), c = !l.isEditable && (e < n || a > i.length || r.startSide <= 0), f = this.getLine();
  90593. this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(Gb(new Xh(1), i), a), a = i.length + Math.max(0, a - i.length)), f.append(Gb(l, i), a), this.atCursorPos = c, this.pendingBuffer = c ? e < n || a > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice());
  90594. }
  90595. else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(r);
  90596. s && (this.textOff + s <= this.text.length ? this.textOff += s : (this.skip += s - (this.text.length - this.textOff), this.text = "", this.textOff = 0), this.pos = n), this.openStart < 0 && (this.openStart = a);
  90597. }
  90598. static build(e, n, r, i, a) {
  90599. let o = new Qg(e, n, r, a);
  90600. return o.openEnd = Vt.spans(i, n, r, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
  90601. }
  90602. }
  90603. function Gb(t, e) {
  90604. for (let n of e)
  90605. t = new el(n, [t], t.length);
  90606. return t;
  90607. }
  90608. class Yh extends ds {
  90609. constructor(e) {
  90610. super(), this.tag = e;
  90611. }
  90612. eq(e) {
  90613. return e.tag == this.tag;
  90614. }
  90615. toDOM() {
  90616. return document.createElement(this.tag);
  90617. }
  90618. updateDOM(e) {
  90619. return e.nodeName.toLowerCase() == this.tag;
  90620. }
  90621. get isHidden() {
  90622. return !0;
  90623. }
  90624. }
  90625. Yh.inline = /* @__PURE__ */ new Yh("span");
  90626. Yh.block = /* @__PURE__ */ new Yh("div");
  90627. var pn = /* @__PURE__ */ function(t) {
  90628. return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t;
  90629. }(pn || (pn = {}));
  90630. const Pf = pn.LTR, r4 = pn.RTL;
  90631. function Dae(t) {
  90632. let e = [];
  90633. for (let n = 0; n < t.length; n++)
  90634. e.push(1 << +t[n]);
  90635. return e;
  90636. }
  90637. const Qat = /* @__PURE__ */ Dae("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Hat = /* @__PURE__ */ Dae("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), SM = /* @__PURE__ */ Object.create(null), wo = [];
  90638. for (let t of ["()", "[]", "{}"]) {
  90639. let e = /* @__PURE__ */ t.charCodeAt(0), n = /* @__PURE__ */ t.charCodeAt(1);
  90640. SM[e] = n, SM[n] = -e;
  90641. }
  90642. function Rae(t) {
  90643. return t <= 247 ? Qat[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Hat[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1;
  90644. }
  90645. const Gat = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
  90646. class Hl {
  90647. /**
  90648. The direction of this span.
  90649. */
  90650. get dir() {
  90651. return this.level % 2 ? r4 : Pf;
  90652. }
  90653. /**
  90654. @internal
  90655. */
  90656. constructor(e, n, r) {
  90657. this.from = e, this.to = n, this.level = r;
  90658. }
  90659. /**
  90660. @internal
  90661. */
  90662. side(e, n) {
  90663. return this.dir == n == e ? this.to : this.from;
  90664. }
  90665. /**
  90666. @internal
  90667. */
  90668. forward(e, n) {
  90669. return e == (this.dir == n);
  90670. }
  90671. /**
  90672. @internal
  90673. */
  90674. static find(e, n, r, i) {
  90675. let a = -1;
  90676. for (let o = 0; o < e.length; o++) {
  90677. let s = e[o];
  90678. if (s.from <= n && s.to >= n) {
  90679. if (s.level == r)
  90680. return o;
  90681. (a < 0 || (i != 0 ? i < 0 ? s.from < n : s.to > n : e[a].level > s.level)) && (a = o);
  90682. }
  90683. }
  90684. if (a < 0)
  90685. throw new RangeError("Index out of range");
  90686. return a;
  90687. }
  90688. }
  90689. function kae(t, e) {
  90690. if (t.length != e.length)
  90691. return !1;
  90692. for (let n = 0; n < t.length; n++) {
  90693. let r = t[n], i = e[n];
  90694. if (r.from != i.from || r.to != i.to || r.direction != i.direction || !kae(r.inner, i.inner))
  90695. return !1;
  90696. }
  90697. return !0;
  90698. }
  90699. const qt = [];
  90700. function jat(t, e, n, r, i) {
  90701. for (let a = 0; a <= r.length; a++) {
  90702. let o = a ? r[a - 1].to : e, s = a < r.length ? r[a].from : n, l = a ? 256 : i;
  90703. for (let u = o, c = l, f = l; u < s; u++) {
  90704. let d = Rae(t.charCodeAt(u));
  90705. d == 512 ? d = c : d == 8 && f == 4 && (d = 16), qt[u] = d == 4 ? 2 : d, d & 7 && (f = d), c = d;
  90706. }
  90707. for (let u = o, c = l, f = l; u < s; u++) {
  90708. let d = qt[u];
  90709. if (d == 128)
  90710. u < s - 1 && c == qt[u + 1] && c & 24 ? d = qt[u] = c : qt[u] = 256;
  90711. else if (d == 64) {
  90712. let h = u + 1;
  90713. for (; h < s && qt[h] == 64; )
  90714. h++;
  90715. let p = u && c == 8 || h < n && qt[h] == 8 ? f == 1 ? 1 : 8 : 256;
  90716. for (let v = u; v < h; v++)
  90717. qt[v] = p;
  90718. u = h - 1;
  90719. } else d == 8 && f == 1 && (qt[u] = 1);
  90720. c = d, d & 7 && (f = d);
  90721. }
  90722. }
  90723. }
  90724. function Zat(t, e, n, r, i) {
  90725. let a = i == 1 ? 2 : 1;
  90726. for (let o = 0, s = 0, l = 0; o <= r.length; o++) {
  90727. let u = o ? r[o - 1].to : e, c = o < r.length ? r[o].from : n;
  90728. for (let f = u, d, h, p; f < c; f++)
  90729. if (h = SM[d = t.charCodeAt(f)])
  90730. if (h < 0) {
  90731. for (let v = s - 3; v >= 0; v -= 3)
  90732. if (wo[v + 1] == -h) {
  90733. let g = wo[v + 2], m = g & 2 ? i : g & 4 ? g & 1 ? a : i : 0;
  90734. m && (qt[f] = qt[wo[v]] = m), s = v;
  90735. break;
  90736. }
  90737. } else {
  90738. if (wo.length == 189)
  90739. break;
  90740. wo[s++] = f, wo[s++] = d, wo[s++] = l;
  90741. }
  90742. else if ((p = qt[f]) == 2 || p == 1) {
  90743. let v = p == i;
  90744. l = v ? 0 : 1;
  90745. for (let g = s - 3; g >= 0; g -= 3) {
  90746. let m = wo[g + 2];
  90747. if (m & 2)
  90748. break;
  90749. if (v)
  90750. wo[g + 2] |= 2;
  90751. else {
  90752. if (m & 4)
  90753. break;
  90754. wo[g + 2] |= 4;
  90755. }
  90756. }
  90757. }
  90758. }
  90759. }
  90760. function Uat(t, e, n, r) {
  90761. for (let i = 0, a = r; i <= n.length; i++) {
  90762. let o = i ? n[i - 1].to : t, s = i < n.length ? n[i].from : e;
  90763. for (let l = o; l < s; ) {
  90764. let u = qt[l];
  90765. if (u == 256) {
  90766. let c = l + 1;
  90767. for (; ; )
  90768. if (c == s) {
  90769. if (i == n.length)
  90770. break;
  90771. c = n[i++].to, s = i < n.length ? n[i].from : e;
  90772. } else if (qt[c] == 256)
  90773. c++;
  90774. else
  90775. break;
  90776. let f = a == 1, d = (c < e ? qt[c] : r) == 1, h = f == d ? f ? 1 : 2 : r;
  90777. for (let p = c, v = i, g = v ? n[v - 1].to : t; p > l; )
  90778. p == g && (p = n[--v].from, g = v ? n[v - 1].to : t), qt[--p] = h;
  90779. l = c;
  90780. } else
  90781. a = u, l++;
  90782. }
  90783. }
  90784. }
  90785. function xM(t, e, n, r, i, a, o) {
  90786. let s = r % 2 ? 2 : 1;
  90787. if (r % 2 == i % 2)
  90788. for (let l = e, u = 0; l < n; ) {
  90789. let c = !0, f = !1;
  90790. if (u == a.length || l < a[u].from) {
  90791. let v = qt[l];
  90792. v != s && (c = !1, f = v == 16);
  90793. }
  90794. let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
  90795. e: for (; ; )
  90796. if (u < a.length && p == a[u].from) {
  90797. if (f)
  90798. break e;
  90799. let v = a[u];
  90800. if (!c)
  90801. for (let g = v.to, m = u + 1; ; ) {
  90802. if (g == n)
  90803. break e;
  90804. if (m < a.length && a[m].from == g)
  90805. g = a[m++].to;
  90806. else {
  90807. if (qt[g] == s)
  90808. break e;
  90809. break;
  90810. }
  90811. }
  90812. if (u++, d)
  90813. d.push(v);
  90814. else {
  90815. v.from > l && o.push(new Hl(l, v.from, h));
  90816. let g = v.direction == Pf != !(h % 2);
  90817. wM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.to;
  90818. }
  90819. p = v.to;
  90820. } else {
  90821. if (p == n || (c ? qt[p] != s : qt[p] == s))
  90822. break;
  90823. p++;
  90824. }
  90825. d ? xM(t, l, p, r + 1, i, d, o) : l < p && o.push(new Hl(l, p, h)), l = p;
  90826. }
  90827. else
  90828. for (let l = n, u = a.length; l > e; ) {
  90829. let c = !0, f = !1;
  90830. if (!u || l > a[u - 1].to) {
  90831. let v = qt[l - 1];
  90832. v != s && (c = !1, f = v == 16);
  90833. }
  90834. let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
  90835. e: for (; ; )
  90836. if (u && p == a[u - 1].to) {
  90837. if (f)
  90838. break e;
  90839. let v = a[--u];
  90840. if (!c)
  90841. for (let g = v.from, m = u; ; ) {
  90842. if (g == e)
  90843. break e;
  90844. if (m && a[m - 1].to == g)
  90845. g = a[--m].from;
  90846. else {
  90847. if (qt[g - 1] == s)
  90848. break e;
  90849. break;
  90850. }
  90851. }
  90852. if (d)
  90853. d.push(v);
  90854. else {
  90855. v.to < l && o.push(new Hl(v.to, l, h));
  90856. let g = v.direction == Pf != !(h % 2);
  90857. wM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.from;
  90858. }
  90859. p = v.from;
  90860. } else {
  90861. if (p == e || (c ? qt[p - 1] != s : qt[p - 1] == s))
  90862. break;
  90863. p--;
  90864. }
  90865. d ? xM(t, p, l, r + 1, i, d, o) : p < l && o.push(new Hl(p, l, h)), l = p;
  90866. }
  90867. }
  90868. function wM(t, e, n, r, i, a, o) {
  90869. let s = e % 2 ? 2 : 1;
  90870. jat(t, i, a, r, s), Zat(t, i, a, r, s), Uat(i, a, r, s), xM(t, i, a, e, n, r, o);
  90871. }
  90872. function Xat(t, e, n) {
  90873. if (!t)
  90874. return [new Hl(0, 0, e == r4 ? 1 : 0)];
  90875. if (e == Pf && !n.length && !Gat.test(t))
  90876. return Lae(t.length);
  90877. if (n.length)
  90878. for (; t.length > qt.length; )
  90879. qt[qt.length] = 256;
  90880. let r = [], i = e == Pf ? 0 : 1;
  90881. return wM(t, i, i, n, 0, t.length, r), r;
  90882. }
  90883. function Lae(t) {
  90884. return [new Hl(0, t, 0)];
  90885. }
  90886. let Nae = "";
  90887. function Yat(t, e, n, r, i) {
  90888. var a;
  90889. let o = r.head - t.from, s = Hl.find(e, o, (a = r.bidiLevel) !== null && a !== void 0 ? a : -1, r.assoc), l = e[s], u = l.side(i, n);
  90890. if (o == u) {
  90891. let d = s += i ? 1 : -1;
  90892. if (d < 0 || d >= e.length)
  90893. return null;
  90894. l = e[s = d], o = l.side(!i, n), u = l.side(i, n);
  90895. }
  90896. let c = _r(t.text, o, l.forward(i, n));
  90897. (c < l.from || c > l.to) && (c = u), Nae = t.text.slice(Math.min(o, c), Math.max(o, c));
  90898. let f = s == (i ? e.length - 1 : 0) ? null : e[s + (i ? 1 : -1)];
  90899. return f && c == u && f.level + (i ? 0 : 1) < l.level ? me.cursor(f.side(!i, n) + t.from, f.forward(i, n) ? 1 : -1, f.level) : me.cursor(c + t.from, l.forward(i, n) ? -1 : 1, l.level);
  90900. }
  90901. function qat(t, e, n) {
  90902. for (let r = e; r < n; r++) {
  90903. let i = Rae(t.charCodeAt(r));
  90904. if (i == 1)
  90905. return Pf;
  90906. if (i == 2 || i == 4)
  90907. return r4;
  90908. }
  90909. return Pf;
  90910. }
  90911. const Bae = /* @__PURE__ */ Be.define(), zae = /* @__PURE__ */ Be.define(), Vae = /* @__PURE__ */ Be.define(), Fae = /* @__PURE__ */ Be.define(), CM = /* @__PURE__ */ Be.define(), Wae = /* @__PURE__ */ Be.define(), Qae = /* @__PURE__ */ Be.define(), Hae = /* @__PURE__ */ Be.define({
  90912. combine: (t) => t.some((e) => e)
  90913. }), Gae = /* @__PURE__ */ Be.define({
  90914. combine: (t) => t.some((e) => e)
  90915. }), jae = /* @__PURE__ */ Be.define();
  90916. class uh {
  90917. constructor(e, n = "nearest", r = "nearest", i = 5, a = 5, o = !1) {
  90918. this.range = e, this.y = n, this.x = r, this.yMargin = i, this.xMargin = a, this.isSnapshot = o;
  90919. }
  90920. map(e) {
  90921. return e.empty ? this : new uh(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  90922. }
  90923. clip(e) {
  90924. return this.range.to <= e.doc.length ? this : new uh(me.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  90925. }
  90926. }
  90927. const jb = /* @__PURE__ */ dt.define({ map: (t, e) => t.map(e) }), Zae = /* @__PURE__ */ dt.define();
  90928. function mi(t, e, n) {
  90929. let r = t.facet(Fae);
  90930. r.length ? r[0](e) : window.onerror ? window.onerror(String(e), n, void 0, void 0, e) : n ? console.error(n + ":", e) : console.error(e);
  90931. }
  90932. const El = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : !0 });
  90933. let Kat = 0;
  90934. const Jv = /* @__PURE__ */ Be.define();
  90935. class kn {
  90936. constructor(e, n, r, i, a) {
  90937. this.id = e, this.create = n, this.domEventHandlers = r, this.domEventObservers = i, this.extension = a(this);
  90938. }
  90939. /**
  90940. Define a plugin from a constructor function that creates the
  90941. plugin's value, given an editor view.
  90942. */
  90943. static define(e, n) {
  90944. const { eventHandlers: r, eventObservers: i, provide: a, decorations: o } = n || {};
  90945. return new kn(Kat++, e, r, i, (s) => {
  90946. let l = [Jv.of(s)];
  90947. return o && l.push(Xm.of((u) => {
  90948. let c = u.plugin(s);
  90949. return c ? o(c) : Ze.none;
  90950. })), a && l.push(a(s)), l;
  90951. });
  90952. }
  90953. /**
  90954. Create a plugin for a class whose constructor takes a single
  90955. editor view as argument.
  90956. */
  90957. static fromClass(e, n) {
  90958. return kn.define((r) => new e(r), n);
  90959. }
  90960. }
  90961. class g$ {
  90962. constructor(e) {
  90963. this.spec = e, this.mustUpdate = null, this.value = null;
  90964. }
  90965. update(e) {
  90966. if (this.value) {
  90967. if (this.mustUpdate) {
  90968. let n = this.mustUpdate;
  90969. if (this.mustUpdate = null, this.value.update)
  90970. try {
  90971. this.value.update(n);
  90972. } catch (r) {
  90973. if (mi(n.state, r, "CodeMirror plugin crashed"), this.value.destroy)
  90974. try {
  90975. this.value.destroy();
  90976. } catch {
  90977. }
  90978. this.deactivate();
  90979. }
  90980. }
  90981. } else if (this.spec)
  90982. try {
  90983. this.value = this.spec.create(e);
  90984. } catch (n) {
  90985. mi(e.state, n, "CodeMirror plugin crashed"), this.deactivate();
  90986. }
  90987. return this;
  90988. }
  90989. destroy(e) {
  90990. var n;
  90991. if (!((n = this.value) === null || n === void 0) && n.destroy)
  90992. try {
  90993. this.value.destroy();
  90994. } catch (r) {
  90995. mi(e.state, r, "CodeMirror plugin crashed");
  90996. }
  90997. }
  90998. deactivate() {
  90999. this.spec = this.value = null;
  91000. }
  91001. }
  91002. const Uae = /* @__PURE__ */ Be.define(), i4 = /* @__PURE__ */ Be.define(), Xm = /* @__PURE__ */ Be.define(), Xae = /* @__PURE__ */ Be.define(), a4 = /* @__PURE__ */ Be.define(), Yae = /* @__PURE__ */ Be.define();
  91003. function BH(t, e) {
  91004. let n = t.state.facet(Yae);
  91005. if (!n.length)
  91006. return n;
  91007. let r = n.map((a) => a instanceof Function ? a(t) : a), i = [];
  91008. return Vt.spans(r, e.from, e.to, {
  91009. point() {
  91010. },
  91011. span(a, o, s, l) {
  91012. let u = a - e.from, c = o - e.from, f = i;
  91013. for (let d = s.length - 1; d >= 0; d--, l--) {
  91014. let h = s[d].spec.bidiIsolate, p;
  91015. if (h == null && (h = qat(e.text, u, c)), l > 0 && f.length && (p = f[f.length - 1]).to == u && p.direction == h)
  91016. p.to = c, f = p.inner;
  91017. else {
  91018. let v = { from: u, to: c, direction: h, inner: [] };
  91019. f.push(v), f = v.inner;
  91020. }
  91021. }
  91022. }
  91023. }), i;
  91024. }
  91025. const qae = /* @__PURE__ */ Be.define();
  91026. function Kae(t) {
  91027. let e = 0, n = 0, r = 0, i = 0;
  91028. for (let a of t.state.facet(qae)) {
  91029. let o = a(t);
  91030. o && (o.left != null && (e = Math.max(e, o.left)), o.right != null && (n = Math.max(n, o.right)), o.top != null && (r = Math.max(r, o.top)), o.bottom != null && (i = Math.max(i, o.bottom)));
  91031. }
  91032. return { left: e, right: n, top: r, bottom: i };
  91033. }
  91034. const eg = /* @__PURE__ */ Be.define();
  91035. class xa {
  91036. constructor(e, n, r, i) {
  91037. this.fromA = e, this.toA = n, this.fromB = r, this.toB = i;
  91038. }
  91039. join(e) {
  91040. return new xa(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
  91041. }
  91042. addToSet(e) {
  91043. let n = e.length, r = this;
  91044. for (; n > 0; n--) {
  91045. let i = e[n - 1];
  91046. if (!(i.fromA > r.toA)) {
  91047. if (i.toA < r.fromA)
  91048. break;
  91049. r = r.join(i), e.splice(n - 1, 1);
  91050. }
  91051. }
  91052. return e.splice(n, 0, r), e;
  91053. }
  91054. static extendWithRanges(e, n) {
  91055. if (n.length == 0)
  91056. return e;
  91057. let r = [];
  91058. for (let i = 0, a = 0, o = 0, s = 0; ; i++) {
  91059. let l = i == e.length ? null : e[i], u = o - s, c = l ? l.fromB : 1e9;
  91060. for (; a < n.length && n[a] < c; ) {
  91061. let f = n[a], d = n[a + 1], h = Math.max(s, f), p = Math.min(c, d);
  91062. if (h <= p && new xa(h + u, p + u, h, p).addToSet(r), d > c)
  91063. break;
  91064. a += 2;
  91065. }
  91066. if (!l)
  91067. return r;
  91068. new xa(l.fromA, l.toA, l.fromB, l.toB).addToSet(r), o = l.toA, s = l.toB;
  91069. }
  91070. }
  91071. }
  91072. class iS {
  91073. constructor(e, n, r) {
  91074. this.view = e, this.state = n, this.transactions = r, this.flags = 0, this.startState = e.state, this.changes = jn.empty(this.startState.doc.length);
  91075. for (let a of r)
  91076. this.changes = this.changes.compose(a.changes);
  91077. let i = [];
  91078. this.changes.iterChangedRanges((a, o, s, l) => i.push(new xa(a, o, s, l))), this.changedRanges = i;
  91079. }
  91080. /**
  91081. @internal
  91082. */
  91083. static create(e, n, r) {
  91084. return new iS(e, n, r);
  91085. }
  91086. /**
  91087. Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
  91088. [visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
  91089. update.
  91090. */
  91091. get viewportChanged() {
  91092. return (this.flags & 4) > 0;
  91093. }
  91094. /**
  91095. Indicates whether the height of a block element in the editor
  91096. changed in this update.
  91097. */
  91098. get heightChanged() {
  91099. return (this.flags & 2) > 0;
  91100. }
  91101. /**
  91102. Returns true when the document was modified or the size of the
  91103. editor, or elements within the editor, changed.
  91104. */
  91105. get geometryChanged() {
  91106. return this.docChanged || (this.flags & 10) > 0;
  91107. }
  91108. /**
  91109. True when this update indicates a focus change.
  91110. */
  91111. get focusChanged() {
  91112. return (this.flags & 1) > 0;
  91113. }
  91114. /**
  91115. Whether the document changed in this update.
  91116. */
  91117. get docChanged() {
  91118. return !this.changes.empty;
  91119. }
  91120. /**
  91121. Whether the selection was explicitly set in this update.
  91122. */
  91123. get selectionSet() {
  91124. return this.transactions.some((e) => e.selection);
  91125. }
  91126. /**
  91127. @internal
  91128. */
  91129. get empty() {
  91130. return this.flags == 0 && this.transactions.length == 0;
  91131. }
  91132. }
  91133. class zH extends Jt {
  91134. get length() {
  91135. return this.view.state.doc.length;
  91136. }
  91137. constructor(e) {
  91138. super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [!1], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.editContextFormatting = Ze.none, this.lastCompositionAfterCursor = !1, this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Ln()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new xa(0, 0, 0, e.state.doc.length)], 0, null);
  91139. }
  91140. // Update the document view to a given state.
  91141. update(e) {
  91142. var n;
  91143. let r = e.changedRanges;
  91144. this.minWidth > 0 && r.length && (r.every(({ fromA: u, toA: c }) => c < this.minWidthFrom || u > this.minWidthTo) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0), this.updateEditContextFormatting(e);
  91145. let i = -1;
  91146. this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((n = this.domChanged) === null || n === void 0) && n.newSel ? i = this.domChanged.newSel.head : !aot(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head));
  91147. let a = i > -1 ? eot(this.view, e.changes, i) : null;
  91148. if (this.domChanged = null, this.hasComposition) {
  91149. this.markedForComposition.clear();
  91150. let { from: u, to: c } = this.hasComposition;
  91151. r = new xa(u, c, e.changes.mapPos(u, -1), e.changes.mapPos(c, 1)).addToSet(r.slice());
  91152. }
  91153. this.hasComposition = a ? { from: a.range.fromB, to: a.range.toB } : null, (Ne.ie || Ne.chrome) && !a && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
  91154. let o = this.decorations, s = this.updateDeco(), l = rot(o, s, e.changes);
  91155. return r = xa.extendWithRanges(r, l), !(this.flags & 7) && r.length == 0 ? !1 : (this.updateInner(r, e.startState.doc.length, a), e.transactions.length && (this.lastUpdate = Date.now()), !0);
  91156. }
  91157. // Used by update and the constructor do perform the actual DOM
  91158. // update
  91159. updateInner(e, n, r) {
  91160. this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, n, r);
  91161. let { observer: i } = this.view;
  91162. i.ignore(() => {
  91163. this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
  91164. let o = Ne.chrome || Ne.ios ? { node: i.selectionRange.focusNode, written: !1 } : void 0;
  91165. this.sync(this.view, o), this.flags &= -8, o && (o.written || i.selectionRange.focusNode != o.node) && (this.forceSelection = !0), this.dom.style.height = "";
  91166. }), this.markedForComposition.forEach(
  91167. (o) => o.flags &= -9
  91168. /* ViewFlag.Composition */
  91169. );
  91170. let a = [];
  91171. if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
  91172. for (let o of this.children)
  91173. o instanceof Ls && o.widget instanceof VH && a.push(o.dom);
  91174. i.updateGaps(a);
  91175. }
  91176. updateChildren(e, n, r) {
  91177. let i = r ? r.range.addToSet(e.slice()) : e, a = this.childCursor(n);
  91178. for (let o = i.length - 1; ; o--) {
  91179. let s = o >= 0 ? i[o] : null;
  91180. if (!s)
  91181. break;
  91182. let { fromA: l, toA: u, fromB: c, toB: f } = s, d, h, p, v;
  91183. if (r && r.range.fromB < f && r.range.toB > c) {
  91184. let _ = Qg.build(this.view.state.doc, c, r.range.fromB, this.decorations, this.dynamicDecorationMap), O = Qg.build(this.view.state.doc, r.range.toB, f, this.decorations, this.dynamicDecorationMap);
  91185. h = _.breakAtStart, p = _.openStart, v = O.openEnd;
  91186. let S = this.compositionView(r);
  91187. O.breakAtStart ? S.breakAfter = 1 : O.content.length && S.merge(S.length, S.length, O.content[0], !1, O.openStart, 0) && (S.breakAfter = O.content[0].breakAfter, O.content.shift()), _.content.length && S.merge(0, 0, _.content[_.content.length - 1], !0, 0, _.openEnd) && _.content.pop(), d = _.content.concat(S).concat(O.content);
  91188. } else
  91189. ({ content: d, breakAtStart: h, openStart: p, openEnd: v } = Qg.build(this.view.state.doc, c, f, this.decorations, this.dynamicDecorationMap));
  91190. let { i: g, off: m } = a.findPos(u, 1), { i: y, off: b } = a.findPos(l, -1);
  91191. Cae(this, y, b, g, m, d, h, p, v);
  91192. }
  91193. r && this.fixCompositionDOM(r);
  91194. }
  91195. updateEditContextFormatting(e) {
  91196. this.editContextFormatting = this.editContextFormatting.map(e.changes);
  91197. for (let n of e.transactions)
  91198. for (let r of n.effects)
  91199. r.is(Zae) && (this.editContextFormatting = r.value);
  91200. }
  91201. compositionView(e) {
  91202. let n = new lo(e.text.nodeValue);
  91203. n.flags |= 8;
  91204. for (let { deco: i } of e.marks)
  91205. n = new el(i, [n], n.length);
  91206. let r = new Ln();
  91207. return r.append(n, 0), r;
  91208. }
  91209. fixCompositionDOM(e) {
  91210. let n = (a, o) => {
  91211. o.flags |= 8 | (o.children.some(
  91212. (l) => l.flags & 7
  91213. /* ViewFlag.Dirty */
  91214. ) ? 1 : 0), this.markedForComposition.add(o);
  91215. let s = Jt.get(a);
  91216. s && s != o && (s.dom = null), o.setDOM(a);
  91217. }, r = this.childPos(e.range.fromB, 1), i = this.children[r.i];
  91218. n(e.line, i);
  91219. for (let a = e.marks.length - 1; a >= -1; a--)
  91220. r = i.childPos(r.off, 1), i = i.children[r.i], n(a >= 0 ? e.marks[a].node : e.text, i);
  91221. }
  91222. // Sync the DOM selection to this.state.selection
  91223. updateSelection(e = !1, n = !1) {
  91224. (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
  91225. let r = this.view.root.activeElement, i = r == this.dom, a = !i && i1(this.dom, this.view.observer.selectionRange) && !(r && this.dom.contains(r));
  91226. if (!(i || n || a))
  91227. return;
  91228. let o = this.forceSelection;
  91229. this.forceSelection = !1;
  91230. let s = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(s.anchor)), u = s.empty ? l : this.moveToLine(this.domAtPos(s.head));
  91231. if (Ne.gecko && s.empty && !this.hasComposition && Jat(l)) {
  91232. let f = document.createTextNode("");
  91233. this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new kr(f, 0), o = !0;
  91234. }
  91235. let c = this.view.observer.selectionRange;
  91236. (o || !c.focusNode || (!Wg(l.node, l.offset, c.anchorNode, c.anchorOffset) || !Wg(u.node, u.offset, c.focusNode, c.focusOffset)) && !this.suppressWidgetCursorChange(c, s)) && (this.view.observer.ignore(() => {
  91237. Ne.android && Ne.chrome && this.dom.contains(c.focusNode) && iot(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 }));
  91238. let f = Um(this.view.root);
  91239. if (f) if (s.empty) {
  91240. if (Ne.gecko) {
  91241. let d = tot(l.node, l.offset);
  91242. if (d && d != 3) {
  91243. let h = (d == 1 ? Sae : xae)(l.node, l.offset);
  91244. h && (l = new kr(h.node, h.offset));
  91245. }
  91246. }
  91247. f.collapse(l.node, l.offset), s.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = s.bidiLevel);
  91248. } else if (f.extend) {
  91249. f.collapse(l.node, l.offset);
  91250. try {
  91251. f.extend(u.node, u.offset);
  91252. } catch {
  91253. }
  91254. } else {
  91255. let d = document.createRange();
  91256. s.anchor > s.head && ([l, u] = [u, l]), d.setEnd(u.node, u.offset), d.setStart(l.node, l.offset), f.removeAllRanges(), f.addRange(d);
  91257. }
  91258. a && this.view.root.activeElement == this.dom && (this.dom.blur(), r && r.focus());
  91259. }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new kr(c.anchorNode, c.anchorOffset), this.impreciseHead = u.precise ? null : new kr(c.focusNode, c.focusOffset);
  91260. }
  91261. // If a zero-length widget is inserted next to the cursor during
  91262. // composition, avoid moving it across it and disrupting the
  91263. // composition.
  91264. suppressWidgetCursorChange(e, n) {
  91265. return this.hasComposition && n.empty && Wg(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
  91266. }
  91267. enforceCursorAssoc() {
  91268. if (this.hasComposition)
  91269. return;
  91270. let { view: e } = this, n = e.state.selection.main, r = Um(e.root), { anchorNode: i, anchorOffset: a } = e.observer.selectionRange;
  91271. if (!r || !n.empty || !n.assoc || !r.modify)
  91272. return;
  91273. let o = Ln.find(this, n.head);
  91274. if (!o)
  91275. return;
  91276. let s = o.posAtStart;
  91277. if (n.head == s || n.head == s + o.length)
  91278. return;
  91279. let l = this.coordsAt(n.head, -1), u = this.coordsAt(n.head, 1);
  91280. if (!l || !u || l.bottom > u.top)
  91281. return;
  91282. let c = this.domAtPos(n.head + n.assoc);
  91283. r.collapse(c.node, c.offset), r.modify("move", n.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange();
  91284. let f = e.observer.selectionRange;
  91285. e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != n.from && r.collapse(i, a);
  91286. }
  91287. // If a position is in/near a block widget, move it to a nearby text
  91288. // line, since we don't want the cursor inside a block widget.
  91289. moveToLine(e) {
  91290. let n = this.dom, r;
  91291. if (e.node != n)
  91292. return e;
  91293. for (let i = e.offset; !r && i < n.childNodes.length; i++) {
  91294. let a = Jt.get(n.childNodes[i]);
  91295. a instanceof Ln && (r = a.domAtPos(0));
  91296. }
  91297. for (let i = e.offset - 1; !r && i >= 0; i--) {
  91298. let a = Jt.get(n.childNodes[i]);
  91299. a instanceof Ln && (r = a.domAtPos(a.length));
  91300. }
  91301. return r ? new kr(r.node, r.offset, !0) : e;
  91302. }
  91303. nearest(e) {
  91304. for (let n = e; n; ) {
  91305. let r = Jt.get(n);
  91306. if (r && r.rootView == this)
  91307. return r;
  91308. n = n.parentNode;
  91309. }
  91310. return null;
  91311. }
  91312. posFromDOM(e, n) {
  91313. let r = this.nearest(e);
  91314. if (!r)
  91315. throw new RangeError("Trying to find position for a DOM position outside of the document");
  91316. return r.localPosFromDOM(e, n) + r.posAtStart;
  91317. }
  91318. domAtPos(e) {
  91319. let { i: n, off: r } = this.childCursor().findPos(e, -1);
  91320. for (; n < this.children.length - 1; ) {
  91321. let i = this.children[n];
  91322. if (r < i.length || i instanceof Ln)
  91323. break;
  91324. n++, r = 0;
  91325. }
  91326. return this.children[n].domAtPos(r);
  91327. }
  91328. coordsAt(e, n) {
  91329. let r = null, i = 0;
  91330. for (let a = this.length, o = this.children.length - 1; o >= 0; o--) {
  91331. let s = this.children[o], l = a - s.breakAfter, u = l - s.length;
  91332. if (l < e)
  91333. break;
  91334. if (u <= e && (u < e || s.covers(-1)) && (l > e || s.covers(1)) && (!r || s instanceof Ln && !(r instanceof Ln && n >= 0)))
  91335. r = s, i = u;
  91336. else if (r && u == e && l == e && s instanceof Ls && Math.abs(n) < 2) {
  91337. if (s.deco.startSide < 0)
  91338. break;
  91339. o && (r = null);
  91340. }
  91341. a = u;
  91342. }
  91343. return r ? r.coordsAt(e - i, n) : null;
  91344. }
  91345. coordsForChar(e) {
  91346. let { i: n, off: r } = this.childPos(e, 1), i = this.children[n];
  91347. if (!(i instanceof Ln))
  91348. return null;
  91349. for (; i.children.length; ) {
  91350. let { i: s, off: l } = i.childPos(r, 1);
  91351. for (; ; s++) {
  91352. if (s == i.children.length)
  91353. return null;
  91354. if ((i = i.children[s]).length)
  91355. break;
  91356. }
  91357. r = l;
  91358. }
  91359. if (!(i instanceof lo))
  91360. return null;
  91361. let a = _r(i.text, r);
  91362. if (a == r)
  91363. return null;
  91364. let o = Tf(i.dom, r, a).getClientRects();
  91365. for (let s = 0; s < o.length; s++) {
  91366. let l = o[s];
  91367. if (s == o.length - 1 || l.top < l.bottom && l.left < l.right)
  91368. return l;
  91369. }
  91370. return null;
  91371. }
  91372. measureVisibleLineHeights(e) {
  91373. let n = [], { from: r, to: i } = e, a = this.view.contentDOM.clientWidth, o = a > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, s = -1, l = this.view.textDirection == pn.LTR;
  91374. for (let u = 0, c = 0; c < this.children.length; c++) {
  91375. let f = this.children[c], d = u + f.length;
  91376. if (d > i)
  91377. break;
  91378. if (u >= r) {
  91379. let h = f.dom.getBoundingClientRect();
  91380. if (n.push(h.height), o) {
  91381. let p = f.dom.lastChild, v = p ? Uh(p) : [];
  91382. if (v.length) {
  91383. let g = v[v.length - 1], m = l ? g.right - h.left : h.right - g.left;
  91384. m > s && (s = m, this.minWidth = a, this.minWidthFrom = u, this.minWidthTo = d);
  91385. }
  91386. }
  91387. }
  91388. u = d + f.breakAfter;
  91389. }
  91390. return n;
  91391. }
  91392. textDirectionAt(e) {
  91393. let { i: n } = this.childPos(e, 1);
  91394. return getComputedStyle(this.children[n].dom).direction == "rtl" ? pn.RTL : pn.LTR;
  91395. }
  91396. measureTextSize() {
  91397. for (let a of this.children)
  91398. if (a instanceof Ln) {
  91399. let o = a.measureTextSize();
  91400. if (o)
  91401. return o;
  91402. }
  91403. let e = document.createElement("div"), n, r, i;
  91404. return e.className = "cm-line", e.style.width = "99999px", e.style.position = "absolute", e.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(() => {
  91405. this.dom.appendChild(e);
  91406. let a = Uh(e.firstChild)[0];
  91407. n = e.getBoundingClientRect().height, r = a ? a.width / 27 : 7, i = a ? a.height : n, e.remove();
  91408. }), { lineHeight: n, charWidth: r, textHeight: i };
  91409. }
  91410. childCursor(e = this.length) {
  91411. let n = this.children.length;
  91412. return n && (e -= this.children[--n].length), new wae(this.children, e, n);
  91413. }
  91414. computeBlockGapDeco() {
  91415. let e = [], n = this.view.viewState;
  91416. for (let r = 0, i = 0; ; i++) {
  91417. let a = i == n.viewports.length ? null : n.viewports[i], o = a ? a.from - 1 : this.length;
  91418. if (o > r) {
  91419. let s = (n.lineBlockAt(o).bottom - n.lineBlockAt(r).top) / this.view.scaleY;
  91420. e.push(Ze.replace({
  91421. widget: new VH(s),
  91422. block: !0,
  91423. inclusive: !0,
  91424. isBlockGap: !0
  91425. }).range(r, o));
  91426. }
  91427. if (!a)
  91428. break;
  91429. r = a.to + 1;
  91430. }
  91431. return Ze.set(e);
  91432. }
  91433. updateDeco() {
  91434. let e = 1, n = this.view.state.facet(Xm).map((a) => (this.dynamicDecorationMap[e++] = typeof a == "function") ? a(this.view) : a), r = !1, i = this.view.state.facet(Xae).map((a, o) => {
  91435. let s = typeof a == "function";
  91436. return s && (r = !0), s ? a(this.view) : a;
  91437. });
  91438. for (i.length && (this.dynamicDecorationMap[e++] = r, n.push(Vt.join(i))), this.decorations = [
  91439. this.editContextFormatting,
  91440. ...n,
  91441. this.computeBlockGapDeco(),
  91442. this.view.viewState.lineGapDeco
  91443. ]; e < this.decorations.length; )
  91444. this.dynamicDecorationMap[e++] = !1;
  91445. return this.decorations;
  91446. }
  91447. scrollIntoView(e) {
  91448. if (e.isSnapshot) {
  91449. let u = this.view.viewState.lineBlockAt(e.range.head);
  91450. this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin;
  91451. return;
  91452. }
  91453. for (let u of this.view.state.facet(jae))
  91454. try {
  91455. if (u(this.view, e.range, e))
  91456. return !0;
  91457. } catch (c) {
  91458. mi(this.view.state, c, "scroll handler");
  91459. }
  91460. let { range: n } = e, r = this.coordsAt(n.head, n.empty ? n.assoc : n.head > n.anchor ? -1 : 1), i;
  91461. if (!r)
  91462. return;
  91463. !n.empty && (i = this.coordsAt(n.anchor, n.anchor > n.head ? -1 : 1)) && (r = {
  91464. left: Math.min(r.left, i.left),
  91465. top: Math.min(r.top, i.top),
  91466. right: Math.max(r.right, i.right),
  91467. bottom: Math.max(r.bottom, i.bottom)
  91468. });
  91469. let a = Kae(this.view), o = {
  91470. left: r.left - a.left,
  91471. top: r.top - a.top,
  91472. right: r.right + a.right,
  91473. bottom: r.bottom + a.bottom
  91474. }, { offsetWidth: s, offsetHeight: l } = this.view.scrollDOM;
  91475. Dat(this.view.scrollDOM, o, n.head < n.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, s), -s), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == pn.LTR);
  91476. }
  91477. }
  91478. function Jat(t) {
  91479. return t.node.nodeType == 1 && t.node.firstChild && (t.offset == 0 || t.node.childNodes[t.offset - 1].contentEditable == "false") && (t.offset == t.node.childNodes.length || t.node.childNodes[t.offset].contentEditable == "false");
  91480. }
  91481. class VH extends ds {
  91482. constructor(e) {
  91483. super(), this.height = e;
  91484. }
  91485. toDOM() {
  91486. let e = document.createElement("div");
  91487. return e.className = "cm-gap", this.updateDOM(e), e;
  91488. }
  91489. eq(e) {
  91490. return e.height == this.height;
  91491. }
  91492. updateDOM(e) {
  91493. return e.style.height = this.height + "px", !0;
  91494. }
  91495. get editable() {
  91496. return !0;
  91497. }
  91498. get estimatedHeight() {
  91499. return this.height;
  91500. }
  91501. ignoreEvent() {
  91502. return !1;
  91503. }
  91504. }
  91505. function Jae(t, e) {
  91506. let n = t.observer.selectionRange;
  91507. if (!n.focusNode)
  91508. return null;
  91509. let r = Sae(n.focusNode, n.focusOffset), i = xae(n.focusNode, n.focusOffset), a = r || i;
  91510. if (i && r && i.node != r.node) {
  91511. let s = Jt.get(i.node);
  91512. if (!s || s instanceof lo && s.text != i.node.nodeValue)
  91513. a = i;
  91514. else if (t.docView.lastCompositionAfterCursor) {
  91515. let l = Jt.get(r.node);
  91516. !l || l instanceof lo && l.text != r.node.nodeValue || (a = i);
  91517. }
  91518. }
  91519. if (t.docView.lastCompositionAfterCursor = a != r, !a)
  91520. return null;
  91521. let o = e - a.offset;
  91522. return { from: o, to: o + a.node.nodeValue.length, node: a.node };
  91523. }
  91524. function eot(t, e, n) {
  91525. let r = Jae(t, n);
  91526. if (!r)
  91527. return null;
  91528. let { node: i, from: a, to: o } = r, s = i.nodeValue;
  91529. if (/[\n\r]/.test(s) || t.state.doc.sliceString(r.from, r.to) != s)
  91530. return null;
  91531. let l = e.invertedDesc, u = new xa(l.mapPos(a), l.mapPos(o), a, o), c = [];
  91532. for (let f = i.parentNode; ; f = f.parentNode) {
  91533. let d = Jt.get(f);
  91534. if (d instanceof el)
  91535. c.push({ node: f, deco: d.mark });
  91536. else {
  91537. if (d instanceof Ln || f.nodeName == "DIV" && f.parentNode == t.contentDOM)
  91538. return { range: u, text: i, marks: c, line: f };
  91539. if (f != t.contentDOM)
  91540. c.push({ node: f, deco: new iy({
  91541. inclusive: !0,
  91542. attributes: Fat(f),
  91543. tagName: f.tagName.toLowerCase()
  91544. }) });
  91545. else
  91546. return null;
  91547. }
  91548. }
  91549. }
  91550. function tot(t, e) {
  91551. return t.nodeType != 1 ? 0 : (e && t.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < t.childNodes.length && t.childNodes[e].contentEditable == "false" ? 2 : 0);
  91552. }
  91553. let not = class {
  91554. constructor() {
  91555. this.changes = [];
  91556. }
  91557. compareRange(e, n) {
  91558. OM(e, n, this.changes);
  91559. }
  91560. comparePoint(e, n) {
  91561. OM(e, n, this.changes);
  91562. }
  91563. };
  91564. function rot(t, e, n) {
  91565. let r = new not();
  91566. return Vt.compare(t, e, n, r), r.changes;
  91567. }
  91568. function iot(t, e) {
  91569. for (let n = t; n && n != e; n = n.assignedSlot || n.parentNode)
  91570. if (n.nodeType == 1 && n.contentEditable == "false")
  91571. return !0;
  91572. return !1;
  91573. }
  91574. function aot(t, e) {
  91575. let n = !1;
  91576. return e && t.iterChangedRanges((r, i) => {
  91577. r < e.to && i > e.from && (n = !0);
  91578. }), n;
  91579. }
  91580. function oot(t, e, n = 1) {
  91581. let r = t.charCategorizer(e), i = t.doc.lineAt(e), a = e - i.from;
  91582. if (i.length == 0)
  91583. return me.cursor(e);
  91584. a == 0 ? n = 1 : a == i.length && (n = -1);
  91585. let o = a, s = a;
  91586. n < 0 ? o = _r(i.text, a, !1) : s = _r(i.text, a);
  91587. let l = r(i.text.slice(o, s));
  91588. for (; o > 0; ) {
  91589. let u = _r(i.text, o, !1);
  91590. if (r(i.text.slice(u, o)) != l)
  91591. break;
  91592. o = u;
  91593. }
  91594. for (; s < i.length; ) {
  91595. let u = _r(i.text, s);
  91596. if (r(i.text.slice(s, u)) != l)
  91597. break;
  91598. s = u;
  91599. }
  91600. return me.range(o + i.from, s + i.from);
  91601. }
  91602. function sot(t, e) {
  91603. return e.left > t ? e.left - t : Math.max(0, t - e.right);
  91604. }
  91605. function lot(t, e) {
  91606. return e.top > t ? e.top - t : Math.max(0, t - e.bottom);
  91607. }
  91608. function m$(t, e) {
  91609. return t.top < e.bottom - 1 && t.bottom > e.top + 1;
  91610. }
  91611. function FH(t, e) {
  91612. return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t;
  91613. }
  91614. function WH(t, e) {
  91615. return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t;
  91616. }
  91617. function TM(t, e, n) {
  91618. let r, i, a, o, s = !1, l, u, c, f;
  91619. for (let p = t.firstChild; p; p = p.nextSibling) {
  91620. let v = Uh(p);
  91621. for (let g = 0; g < v.length; g++) {
  91622. let m = v[g];
  91623. i && m$(i, m) && (m = FH(WH(m, i.bottom), i.top));
  91624. let y = sot(e, m), b = lot(n, m);
  91625. if (y == 0 && b == 0)
  91626. return p.nodeType == 3 ? QH(p, e, n) : TM(p, e, n);
  91627. if (!r || o > b || o == b && a > y) {
  91628. r = p, i = m, a = y, o = b;
  91629. let _ = b ? n < m.top ? -1 : 1 : y ? e < m.left ? -1 : 1 : 0;
  91630. s = !_ || (_ > 0 ? g < v.length - 1 : g > 0);
  91631. }
  91632. y == 0 ? n > m.bottom && (!c || c.bottom < m.bottom) ? (l = p, c = m) : n < m.top && (!f || f.top > m.top) && (u = p, f = m) : c && m$(c, m) ? c = WH(c, m.bottom) : f && m$(f, m) && (f = FH(f, m.top));
  91633. }
  91634. }
  91635. if (c && c.bottom >= n ? (r = l, i = c) : f && f.top <= n && (r = u, i = f), !r)
  91636. return { node: t, offset: 0 };
  91637. let d = Math.max(i.left, Math.min(i.right, e));
  91638. if (r.nodeType == 3)
  91639. return QH(r, d, n);
  91640. if (s && r.contentEditable != "false")
  91641. return TM(r, d, n);
  91642. let h = Array.prototype.indexOf.call(t.childNodes, r) + (e >= (i.left + i.right) / 2 ? 1 : 0);
  91643. return { node: t, offset: h };
  91644. }
  91645. function QH(t, e, n) {
  91646. let r = t.nodeValue.length, i = -1, a = 1e9, o = 0;
  91647. for (let s = 0; s < r; s++) {
  91648. let l = Tf(t, s, s + 1).getClientRects();
  91649. for (let u = 0; u < l.length; u++) {
  91650. let c = l[u];
  91651. if (c.top == c.bottom)
  91652. continue;
  91653. o || (o = e - c.left);
  91654. let f = (c.top > n ? c.top - n : n - c.bottom) - 1;
  91655. if (c.left - 1 <= e && c.right + 1 >= e && f < a) {
  91656. let d = e >= (c.left + c.right) / 2, h = d;
  91657. if ((Ne.chrome || Ne.gecko) && Tf(t, s).getBoundingClientRect().left == c.right && (h = !d), f <= 0)
  91658. return { node: t, offset: s + (h ? 1 : 0) };
  91659. i = s + (h ? 1 : 0), a = f;
  91660. }
  91661. }
  91662. }
  91663. return { node: t, offset: i > -1 ? i : o > 0 ? t.nodeValue.length : 0 };
  91664. }
  91665. function eoe(t, e, n, r = -1) {
  91666. var i, a;
  91667. let o = t.contentDOM.getBoundingClientRect(), s = o.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: c, y: f } = e, d = f - s;
  91668. if (d < 0)
  91669. return 0;
  91670. if (d > u)
  91671. return t.state.doc.length;
  91672. for (let _ = t.viewState.heightOracle.textHeight / 2, O = !1; l = t.elementAtHeight(d), l.type != Jr.Text; )
  91673. for (; d = r > 0 ? l.bottom + _ : l.top - _, !(d >= 0 && d <= u); ) {
  91674. if (O)
  91675. return n ? null : 0;
  91676. O = !0, r = -r;
  91677. }
  91678. f = s + d;
  91679. let h = l.from;
  91680. if (h < t.viewport.from)
  91681. return t.viewport.from == 0 ? 0 : n ? null : HH(t, o, l, c, f);
  91682. if (h > t.viewport.to)
  91683. return t.viewport.to == t.state.doc.length ? t.state.doc.length : n ? null : HH(t, o, l, c, f);
  91684. let p = t.dom.ownerDocument, v = t.root.elementFromPoint ? t.root : p, g = v.elementFromPoint(c, f);
  91685. g && !t.contentDOM.contains(g) && (g = null), g || (c = Math.max(o.left + 1, Math.min(o.right - 1, c)), g = v.elementFromPoint(c, f), g && !t.contentDOM.contains(g) && (g = null));
  91686. let m, y = -1;
  91687. if (g && ((i = t.docView.nearest(g)) === null || i === void 0 ? void 0 : i.isEditable) != !1) {
  91688. if (p.caretPositionFromPoint) {
  91689. let _ = p.caretPositionFromPoint(c, f);
  91690. _ && ({ offsetNode: m, offset: y } = _);
  91691. } else if (p.caretRangeFromPoint) {
  91692. let _ = p.caretRangeFromPoint(c, f);
  91693. _ && ({ startContainer: m, startOffset: y } = _, (!t.contentDOM.contains(m) || Ne.safari && uot(m, y, c) || Ne.chrome && cot(m, y, c)) && (m = void 0));
  91694. }
  91695. }
  91696. if (!m || !t.docView.dom.contains(m)) {
  91697. let _ = Ln.find(t.docView, h);
  91698. if (!_)
  91699. return d > l.top + l.height / 2 ? l.to : l.from;
  91700. ({ node: m, offset: y } = TM(_.dom, c, f));
  91701. }
  91702. let b = t.docView.nearest(m);
  91703. if (!b)
  91704. return null;
  91705. if (b.isWidget && ((a = b.dom) === null || a === void 0 ? void 0 : a.nodeType) == 1) {
  91706. let _ = b.dom.getBoundingClientRect();
  91707. return e.y < _.top || e.y <= _.bottom && e.x <= (_.left + _.right) / 2 ? b.posAtStart : b.posAtEnd;
  91708. } else
  91709. return b.localPosFromDOM(m, y) + b.posAtStart;
  91710. }
  91711. function HH(t, e, n, r, i) {
  91712. let a = Math.round((r - e.left) * t.defaultCharacterWidth);
  91713. if (t.lineWrapping && n.height > t.defaultLineHeight * 1.5) {
  91714. let s = t.viewState.heightOracle.textHeight, l = Math.floor((i - n.top - (t.defaultLineHeight - s) * 0.5) / s);
  91715. a += l * t.viewState.heightOracle.lineLength;
  91716. }
  91717. let o = t.state.sliceDoc(n.from, n.to);
  91718. return n.from + dM(o, a, t.state.tabSize);
  91719. }
  91720. function uot(t, e, n) {
  91721. let r;
  91722. if (t.nodeType != 3 || e != (r = t.nodeValue.length))
  91723. return !1;
  91724. for (let i = t.nextSibling; i; i = i.nextSibling)
  91725. if (i.nodeType != 1 || i.nodeName != "BR")
  91726. return !1;
  91727. return Tf(t, r - 1, r).getBoundingClientRect().left > n;
  91728. }
  91729. function cot(t, e, n) {
  91730. if (e != 0)
  91731. return !1;
  91732. for (let i = t; ; ) {
  91733. let a = i.parentNode;
  91734. if (!a || a.nodeType != 1 || a.firstChild != i)
  91735. return !1;
  91736. if (a.classList.contains("cm-line"))
  91737. break;
  91738. i = a;
  91739. }
  91740. let r = t.nodeType == 1 ? t.getBoundingClientRect() : Tf(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect();
  91741. return n - r.left > 5;
  91742. }
  91743. function PM(t, e) {
  91744. let n = t.lineBlockAt(e);
  91745. if (Array.isArray(n.type)) {
  91746. for (let r of n.type)
  91747. if (r.to > e || r.to == e && (r.to == n.to || r.type == Jr.Text))
  91748. return r;
  91749. }
  91750. return n;
  91751. }
  91752. function fot(t, e, n, r) {
  91753. let i = PM(t, e.head), a = !r || i.type != Jr.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head);
  91754. if (a) {
  91755. let o = t.dom.getBoundingClientRect(), s = t.textDirectionAt(i.from), l = t.posAtCoords({
  91756. x: n == (s == pn.LTR) ? o.right - 1 : o.left + 1,
  91757. y: (a.top + a.bottom) / 2
  91758. });
  91759. if (l != null)
  91760. return me.cursor(l, n ? -1 : 1);
  91761. }
  91762. return me.cursor(n ? i.to : i.from, n ? -1 : 1);
  91763. }
  91764. function GH(t, e, n, r) {
  91765. let i = t.state.doc.lineAt(e.head), a = t.bidiSpans(i), o = t.textDirectionAt(i.from);
  91766. for (let s = e, l = null; ; ) {
  91767. let u = Yat(i, a, o, s, n), c = Nae;
  91768. if (!u) {
  91769. if (i.number == (n ? t.state.doc.lines : 1))
  91770. return s;
  91771. c = `
  91772. `, i = t.state.doc.line(i.number + (n ? 1 : -1)), a = t.bidiSpans(i), u = t.visualLineSide(i, !n);
  91773. }
  91774. if (l) {
  91775. if (!l(c))
  91776. return s;
  91777. } else {
  91778. if (!r)
  91779. return u;
  91780. l = r(c);
  91781. }
  91782. s = u;
  91783. }
  91784. }
  91785. function dot(t, e, n) {
  91786. let r = t.state.charCategorizer(e), i = r(n);
  91787. return (a) => {
  91788. let o = r(a);
  91789. return i == yn.Space && (i = o), i == o;
  91790. };
  91791. }
  91792. function hot(t, e, n, r) {
  91793. let i = e.head, a = n ? 1 : -1;
  91794. if (i == (n ? t.state.doc.length : 0))
  91795. return me.cursor(i, e.assoc);
  91796. let o = e.goalColumn, s, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(i, e.assoc || -1), c = t.documentTop;
  91797. if (u)
  91798. o == null && (o = u.left - l.left), s = a < 0 ? u.top : u.bottom;
  91799. else {
  91800. let h = t.viewState.lineBlockAt(i);
  91801. o == null && (o = Math.min(l.right - l.left, t.defaultCharacterWidth * (i - h.from))), s = (a < 0 ? h.top : h.bottom) + c;
  91802. }
  91803. let f = l.left + o, d = r ?? t.viewState.heightOracle.textHeight >> 1;
  91804. for (let h = 0; ; h += 10) {
  91805. let p = s + (d + h) * a, v = eoe(t, { x: f, y: p }, !1, a);
  91806. if (p < l.top || p > l.bottom || (a < 0 ? v < i : v > i)) {
  91807. let g = t.docView.coordsForChar(v), m = !g || p < g.top ? -1 : 1;
  91808. return me.cursor(v, m, void 0, o);
  91809. }
  91810. }
  91811. }
  91812. function a1(t, e, n) {
  91813. for (; ; ) {
  91814. let r = 0;
  91815. for (let i of t)
  91816. i.between(e - 1, e + 1, (a, o, s) => {
  91817. if (e > a && e < o) {
  91818. let l = r || n || (e - a < o - e ? -1 : 1);
  91819. e = l < 0 ? a : o, r = l;
  91820. }
  91821. });
  91822. if (!r)
  91823. return e;
  91824. }
  91825. }
  91826. function y$(t, e, n) {
  91827. let r = a1(t.state.facet(a4).map((i) => i(t)), n.from, e.head > n.from ? -1 : 1);
  91828. return r == n.from ? n : me.cursor(r, r < n.from ? 1 : -1);
  91829. }
  91830. class pot {
  91831. setSelectionOrigin(e) {
  91832. this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
  91833. }
  91834. constructor(e) {
  91835. this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, Ne.safari && e.contentDOM.addEventListener("input", () => null), Ne.gecko && Eot(e.contentDOM.ownerDocument);
  91836. }
  91837. handleEvent(e) {
  91838. !Sot(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e);
  91839. }
  91840. runHandlers(e, n) {
  91841. let r = this.handlers[e];
  91842. if (r) {
  91843. for (let i of r.observers)
  91844. i(this.view, n);
  91845. for (let i of r.handlers) {
  91846. if (n.defaultPrevented)
  91847. break;
  91848. if (i(this.view, n)) {
  91849. n.preventDefault();
  91850. break;
  91851. }
  91852. }
  91853. }
  91854. }
  91855. ensureHandlers(e) {
  91856. let n = vot(e), r = this.handlers, i = this.view.contentDOM;
  91857. for (let a in n)
  91858. if (a != "scroll") {
  91859. let o = !n[a].handlers.length, s = r[a];
  91860. s && o != !s.handlers.length && (i.removeEventListener(a, this.handleEvent), s = null), s || i.addEventListener(a, this.handleEvent, { passive: o });
  91861. }
  91862. for (let a in r)
  91863. a != "scroll" && !n[a] && i.removeEventListener(a, this.handleEvent);
  91864. this.handlers = n;
  91865. }
  91866. keydown(e) {
  91867. if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode))
  91868. return !0;
  91869. if (this.tabFocusMode > 0 && e.keyCode != 27 && noe.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), Ne.android && Ne.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))
  91870. return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
  91871. let n;
  91872. return Ne.ios && !e.synthetic && !e.altKey && !e.metaKey && ((n = toe.find((r) => r.keyCode == e.keyCode)) && !e.ctrlKey || got.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = n || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1);
  91873. }
  91874. flushIOSKey(e) {
  91875. let n = this.pendingIOSKey;
  91876. return !n || n.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, lh(this.view.contentDOM, n.key, n.keyCode, n instanceof KeyboardEvent ? n : void 0));
  91877. }
  91878. ignoreDuringComposition(e) {
  91879. return /^key/.test(e.type) ? this.composing > 0 ? !0 : Ne.safari && !Ne.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1;
  91880. }
  91881. startMouseSelection(e) {
  91882. this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
  91883. }
  91884. update(e) {
  91885. this.view.observer.update(e), this.mouseSelection && this.mouseSelection.update(e), this.draggedContent && e.docChanged && (this.draggedContent = this.draggedContent.map(e.changes)), e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0);
  91886. }
  91887. destroy() {
  91888. this.mouseSelection && this.mouseSelection.destroy();
  91889. }
  91890. }
  91891. function jH(t, e) {
  91892. return (n, r) => {
  91893. try {
  91894. return e.call(t, r, n);
  91895. } catch (i) {
  91896. mi(n.state, i);
  91897. }
  91898. };
  91899. }
  91900. function vot(t) {
  91901. let e = /* @__PURE__ */ Object.create(null);
  91902. function n(r) {
  91903. return e[r] || (e[r] = { observers: [], handlers: [] });
  91904. }
  91905. for (let r of t) {
  91906. let i = r.spec;
  91907. if (i && i.domEventHandlers)
  91908. for (let a in i.domEventHandlers) {
  91909. let o = i.domEventHandlers[a];
  91910. o && n(a).handlers.push(jH(r.value, o));
  91911. }
  91912. if (i && i.domEventObservers)
  91913. for (let a in i.domEventObservers) {
  91914. let o = i.domEventObservers[a];
  91915. o && n(a).observers.push(jH(r.value, o));
  91916. }
  91917. }
  91918. for (let r in uo)
  91919. n(r).handlers.push(uo[r]);
  91920. for (let r in Ia)
  91921. n(r).observers.push(Ia[r]);
  91922. return e;
  91923. }
  91924. const toe = [
  91925. { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
  91926. { key: "Enter", keyCode: 13, inputType: "insertParagraph" },
  91927. { key: "Enter", keyCode: 13, inputType: "insertLineBreak" },
  91928. { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }
  91929. ], got = "dthko", noe = [16, 17, 18, 20, 91, 92, 224, 225], Zb = 6;
  91930. function Ub(t) {
  91931. return Math.max(0, t) * 0.7 + 8;
  91932. }
  91933. function mot(t, e) {
  91934. return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY));
  91935. }
  91936. class yot {
  91937. constructor(e, n, r, i) {
  91938. this.view = e, this.startEvent = n, this.style = r, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = n, this.scrollParent = Rat(e.contentDOM), this.atoms = e.state.facet(a4).map((o) => o(e));
  91939. let a = e.contentDOM.ownerDocument;
  91940. a.addEventListener("mousemove", this.move = this.move.bind(this)), a.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = n.shiftKey, this.multiple = e.state.facet(At.allowMultipleSelections) && bot(e, n), this.dragging = Oot(e, n) && ooe(n) == 1 ? null : !1;
  91941. }
  91942. start(e) {
  91943. this.dragging === !1 && this.select(e);
  91944. }
  91945. move(e) {
  91946. var n;
  91947. if (e.buttons == 0)
  91948. return this.destroy();
  91949. if (this.dragging || this.dragging == null && mot(this.startEvent, e) < 10)
  91950. return;
  91951. this.select(this.lastEvent = e);
  91952. let r = 0, i = 0, a = ((n = this.scrollParent) === null || n === void 0 ? void 0 : n.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, o = Kae(this.view);
  91953. e.clientX - o.left <= a.left + Zb ? r = -Ub(a.left - e.clientX) : e.clientX + o.right >= a.right - Zb && (r = Ub(e.clientX - a.right)), e.clientY - o.top <= a.top + Zb ? i = -Ub(a.top - e.clientY) : e.clientY + o.bottom >= a.bottom - Zb && (i = Ub(e.clientY - a.bottom)), this.setScrollSpeed(r, i);
  91954. }
  91955. up(e) {
  91956. this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy();
  91957. }
  91958. destroy() {
  91959. this.setScrollSpeed(0, 0);
  91960. let e = this.view.contentDOM.ownerDocument;
  91961. e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null;
  91962. }
  91963. setScrollSpeed(e, n) {
  91964. this.scrollSpeed = { x: e, y: n }, e || n ? this.scrolling < 0 && (this.scrolling = setInterval(() => this.scroll(), 50)) : this.scrolling > -1 && (clearInterval(this.scrolling), this.scrolling = -1);
  91965. }
  91966. scroll() {
  91967. this.scrollParent ? (this.scrollParent.scrollLeft += this.scrollSpeed.x, this.scrollParent.scrollTop += this.scrollSpeed.y) : this.view.win.scrollBy(this.scrollSpeed.x, this.scrollSpeed.y), this.dragging === !1 && this.select(this.lastEvent);
  91968. }
  91969. skipAtoms(e) {
  91970. let n = null;
  91971. for (let r = 0; r < e.ranges.length; r++) {
  91972. let i = e.ranges[r], a = null;
  91973. if (i.empty) {
  91974. let o = a1(this.atoms, i.from, 0);
  91975. o != i.from && (a = me.cursor(o, -1));
  91976. } else {
  91977. let o = a1(this.atoms, i.from, -1), s = a1(this.atoms, i.to, 1);
  91978. (o != i.from || s != i.to) && (a = me.range(i.from == i.anchor ? o : s, i.from == i.head ? o : s));
  91979. }
  91980. a && (n || (n = e.ranges.slice()), n[r] = a);
  91981. }
  91982. return n ? me.create(n, e.mainIndex) : e;
  91983. }
  91984. select(e) {
  91985. let { view: n } = this, r = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
  91986. (this.mustSelect || !r.eq(n.state.selection, this.dragging === !1)) && this.view.dispatch({
  91987. selection: r,
  91988. userEvent: "select.pointer"
  91989. }), this.mustSelect = !1;
  91990. }
  91991. update(e) {
  91992. e.transactions.some((n) => n.isUserEvent("input.type")) ? this.destroy() : this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20);
  91993. }
  91994. }
  91995. function bot(t, e) {
  91996. let n = t.state.facet(Bae);
  91997. return n.length ? n[0](e) : Ne.mac ? e.metaKey : e.ctrlKey;
  91998. }
  91999. function _ot(t, e) {
  92000. let n = t.state.facet(zae);
  92001. return n.length ? n[0](e) : Ne.mac ? !e.altKey : !e.ctrlKey;
  92002. }
  92003. function Oot(t, e) {
  92004. let { main: n } = t.state.selection;
  92005. if (n.empty)
  92006. return !1;
  92007. let r = Um(t.root);
  92008. if (!r || r.rangeCount == 0)
  92009. return !0;
  92010. let i = r.getRangeAt(0).getClientRects();
  92011. for (let a = 0; a < i.length; a++) {
  92012. let o = i[a];
  92013. if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY)
  92014. return !0;
  92015. }
  92016. return !1;
  92017. }
  92018. function Sot(t, e) {
  92019. if (!e.bubbles)
  92020. return !0;
  92021. if (e.defaultPrevented)
  92022. return !1;
  92023. for (let n = e.target, r; n != t.contentDOM; n = n.parentNode)
  92024. if (!n || n.nodeType == 11 || (r = Jt.get(n)) && r.ignoreEvent(e))
  92025. return !1;
  92026. return !0;
  92027. }
  92028. const uo = /* @__PURE__ */ Object.create(null), Ia = /* @__PURE__ */ Object.create(null), roe = Ne.ie && Ne.ie_version < 15 || Ne.ios && Ne.webkit_version < 604;
  92029. function xot(t) {
  92030. let e = t.dom.parentNode;
  92031. if (!e)
  92032. return;
  92033. let n = e.appendChild(document.createElement("textarea"));
  92034. n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus(), setTimeout(() => {
  92035. t.focus(), n.remove(), ioe(t, n.value);
  92036. }, 50);
  92037. }
  92038. function ioe(t, e) {
  92039. let { state: n } = t, r, i = 1, a = n.toText(e), o = a.lines == n.selection.ranges.length;
  92040. if ($M != null && n.selection.ranges.every((l) => l.empty) && $M == a.toString()) {
  92041. let l = -1;
  92042. r = n.changeByRange((u) => {
  92043. let c = n.doc.lineAt(u.from);
  92044. if (c.from == l)
  92045. return { range: u };
  92046. l = c.from;
  92047. let f = n.toText((o ? a.line(i++).text : e) + n.lineBreak);
  92048. return {
  92049. changes: { from: c.from, insert: f },
  92050. range: me.cursor(u.from + f.length)
  92051. };
  92052. });
  92053. } else o ? r = n.changeByRange((l) => {
  92054. let u = a.line(i++);
  92055. return {
  92056. changes: { from: l.from, to: l.to, insert: u.text },
  92057. range: me.cursor(l.from + u.length)
  92058. };
  92059. }) : r = n.replaceSelection(a);
  92060. t.dispatch(r, {
  92061. userEvent: "input.paste",
  92062. scrollIntoView: !0
  92063. });
  92064. }
  92065. Ia.scroll = (t) => {
  92066. t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft;
  92067. };
  92068. uo.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1);
  92069. Ia.touchstart = (t, e) => {
  92070. t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer");
  92071. };
  92072. Ia.touchmove = (t) => {
  92073. t.inputState.setSelectionOrigin("select.pointer");
  92074. };
  92075. uo.mousedown = (t, e) => {
  92076. if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3)
  92077. return !1;
  92078. let n = null;
  92079. for (let r of t.state.facet(Vae))
  92080. if (n = r(t, e), n)
  92081. break;
  92082. if (!n && e.button == 0 && (n = Tot(t, e)), n) {
  92083. let r = !t.hasFocus;
  92084. t.inputState.startMouseSelection(new yot(t, e, n, r)), r && t.observer.ignore(() => {
  92085. bae(t.contentDOM);
  92086. let a = t.root.activeElement;
  92087. a && !a.contains(t.contentDOM) && a.blur();
  92088. });
  92089. let i = t.inputState.mouseSelection;
  92090. if (i)
  92091. return i.start(e), i.dragging === !1;
  92092. }
  92093. return !1;
  92094. };
  92095. function ZH(t, e, n, r) {
  92096. if (r == 1)
  92097. return me.cursor(e, n);
  92098. if (r == 2)
  92099. return oot(t.state, e, n);
  92100. {
  92101. let i = Ln.find(t.docView, e), a = t.state.doc.lineAt(i ? i.posAtEnd : e), o = i ? i.posAtStart : a.from, s = i ? i.posAtEnd : a.to;
  92102. return s < t.state.doc.length && s == a.to && s++, me.range(o, s);
  92103. }
  92104. }
  92105. let aoe = (t, e) => t >= e.top && t <= e.bottom, UH = (t, e, n) => aoe(e, n) && t >= n.left && t <= n.right;
  92106. function wot(t, e, n, r) {
  92107. let i = Ln.find(t.docView, e);
  92108. if (!i)
  92109. return 1;
  92110. let a = e - i.posAtStart;
  92111. if (a == 0)
  92112. return 1;
  92113. if (a == i.length)
  92114. return -1;
  92115. let o = i.coordsAt(a, -1);
  92116. if (o && UH(n, r, o))
  92117. return -1;
  92118. let s = i.coordsAt(a, 1);
  92119. return s && UH(n, r, s) ? 1 : o && aoe(r, o) ? -1 : 1;
  92120. }
  92121. function XH(t, e) {
  92122. let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1);
  92123. return { pos: n, bias: wot(t, n, e.clientX, e.clientY) };
  92124. }
  92125. const Cot = Ne.ie && Ne.ie_version <= 11;
  92126. let YH = null, qH = 0, KH = 0;
  92127. function ooe(t) {
  92128. if (!Cot)
  92129. return t.detail;
  92130. let e = YH, n = KH;
  92131. return YH = t, KH = Date.now(), qH = !e || n > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (qH + 1) % 3 : 1;
  92132. }
  92133. function Tot(t, e) {
  92134. let n = XH(t, e), r = ooe(e), i = t.state.selection;
  92135. return {
  92136. update(a) {
  92137. a.docChanged && (n.pos = a.changes.mapPos(n.pos), i = i.map(a.changes));
  92138. },
  92139. get(a, o, s) {
  92140. let l = XH(t, a), u, c = ZH(t, l.pos, l.bias, r);
  92141. if (n.pos != l.pos && !o) {
  92142. let f = ZH(t, n.pos, n.bias, r), d = Math.min(f.from, c.from), h = Math.max(f.to, c.to);
  92143. c = d < c.from ? me.range(d, h) : me.range(h, d);
  92144. }
  92145. return o ? i.replaceRange(i.main.extend(c.from, c.to)) : s && r == 1 && i.ranges.length > 1 && (u = Pot(i, l.pos)) ? u : s ? i.addRange(c) : me.create([c]);
  92146. }
  92147. };
  92148. }
  92149. function Pot(t, e) {
  92150. for (let n = 0; n < t.ranges.length; n++) {
  92151. let { from: r, to: i } = t.ranges[n];
  92152. if (r <= e && i >= e)
  92153. return me.create(t.ranges.slice(0, n).concat(t.ranges.slice(n + 1)), t.mainIndex == n ? 0 : t.mainIndex - (t.mainIndex > n ? 1 : 0));
  92154. }
  92155. return null;
  92156. }
  92157. uo.dragstart = (t, e) => {
  92158. let { selection: { main: n } } = t.state;
  92159. if (e.target.draggable) {
  92160. let i = t.docView.nearest(e.target);
  92161. if (i && i.isWidget) {
  92162. let a = i.posAtStart, o = a + i.length;
  92163. (a >= n.to || o <= n.from) && (n = me.range(a, o));
  92164. }
  92165. }
  92166. let { inputState: r } = t;
  92167. return r.mouseSelection && (r.mouseSelection.dragging = !0), r.draggedContent = n, e.dataTransfer && (e.dataTransfer.setData("Text", t.state.sliceDoc(n.from, n.to)), e.dataTransfer.effectAllowed = "copyMove"), !1;
  92168. };
  92169. uo.dragend = (t) => (t.inputState.draggedContent = null, !1);
  92170. function JH(t, e, n, r) {
  92171. if (!n)
  92172. return;
  92173. let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: a } = t.inputState, o = r && a && _ot(t, e) ? { from: a.from, to: a.to } : null, s = { from: i, insert: n }, l = t.state.changes(o ? [o, s] : s);
  92174. t.focus(), t.dispatch({
  92175. changes: l,
  92176. selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) },
  92177. userEvent: o ? "move.drop" : "input.drop"
  92178. }), t.inputState.draggedContent = null;
  92179. }
  92180. uo.drop = (t, e) => {
  92181. if (!e.dataTransfer)
  92182. return !1;
  92183. if (t.state.readOnly)
  92184. return !0;
  92185. let n = e.dataTransfer.files;
  92186. if (n && n.length) {
  92187. let r = Array(n.length), i = 0, a = () => {
  92188. ++i == n.length && JH(t, e, r.filter((o) => o != null).join(t.state.lineBreak), !1);
  92189. };
  92190. for (let o = 0; o < n.length; o++) {
  92191. let s = new FileReader();
  92192. s.onerror = a, s.onload = () => {
  92193. /[\x00-\x08\x0e-\x1f]{2}/.test(s.result) || (r[o] = s.result), a();
  92194. }, s.readAsText(n[o]);
  92195. }
  92196. return !0;
  92197. } else {
  92198. let r = e.dataTransfer.getData("Text");
  92199. if (r)
  92200. return JH(t, e, r, !0), !0;
  92201. }
  92202. return !1;
  92203. };
  92204. uo.paste = (t, e) => {
  92205. if (t.state.readOnly)
  92206. return !0;
  92207. t.observer.flush();
  92208. let n = roe ? null : e.clipboardData;
  92209. return n ? (ioe(t, n.getData("text/plain") || n.getData("text/uri-list")), !0) : (xot(t), !1);
  92210. };
  92211. function $ot(t, e) {
  92212. let n = t.dom.parentNode;
  92213. if (!n)
  92214. return;
  92215. let r = n.appendChild(document.createElement("textarea"));
  92216. r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.value = e, r.focus(), r.selectionEnd = e.length, r.selectionStart = 0, setTimeout(() => {
  92217. r.remove(), t.focus();
  92218. }, 50);
  92219. }
  92220. function Aot(t) {
  92221. let e = [], n = [], r = !1;
  92222. for (let i of t.selection.ranges)
  92223. i.empty || (e.push(t.sliceDoc(i.from, i.to)), n.push(i));
  92224. if (!e.length) {
  92225. let i = -1;
  92226. for (let { from: a } of t.selection.ranges) {
  92227. let o = t.doc.lineAt(a);
  92228. o.number > i && (e.push(o.text), n.push({ from: o.from, to: Math.min(t.doc.length, o.to + 1) })), i = o.number;
  92229. }
  92230. r = !0;
  92231. }
  92232. return { text: e.join(t.lineBreak), ranges: n, linewise: r };
  92233. }
  92234. let $M = null;
  92235. uo.copy = uo.cut = (t, e) => {
  92236. let { text: n, ranges: r, linewise: i } = Aot(t.state);
  92237. if (!n && !i)
  92238. return !1;
  92239. $M = i ? n : null, e.type == "cut" && !t.state.readOnly && t.dispatch({
  92240. changes: r,
  92241. scrollIntoView: !0,
  92242. userEvent: "delete.cut"
  92243. });
  92244. let a = roe ? null : e.clipboardData;
  92245. return a ? (a.clearData(), a.setData("text/plain", n), !0) : ($ot(t, n), !1);
  92246. };
  92247. const soe = /* @__PURE__ */ ul.define();
  92248. function loe(t, e) {
  92249. let n = [];
  92250. for (let r of t.facet(Qae)) {
  92251. let i = r(t, e);
  92252. i && n.push(i);
  92253. }
  92254. return n ? t.update({ effects: n, annotations: soe.of(!0) }) : null;
  92255. }
  92256. function uoe(t) {
  92257. setTimeout(() => {
  92258. let e = t.hasFocus;
  92259. if (e != t.inputState.notifiedFocused) {
  92260. let n = loe(t.state, e);
  92261. n ? t.dispatch(n) : t.update([]);
  92262. }
  92263. }, 10);
  92264. }
  92265. Ia.focus = (t) => {
  92266. t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), uoe(t);
  92267. };
  92268. Ia.blur = (t) => {
  92269. t.observer.clearSelectionRange(), uoe(t);
  92270. };
  92271. Ia.compositionstart = Ia.compositionupdate = (t) => {
  92272. t.observer.editContext || (t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0));
  92273. };
  92274. Ia.compositionend = (t) => {
  92275. t.observer.editContext || (t.inputState.composing = -1, t.inputState.compositionEndedAt = Date.now(), t.inputState.compositionPendingKey = !0, t.inputState.compositionPendingChange = t.observer.pendingRecords().length > 0, t.inputState.compositionFirstChange = null, Ne.chrome && Ne.android ? t.observer.flushSoon() : t.inputState.compositionPendingChange ? Promise.resolve().then(() => t.observer.flush()) : setTimeout(() => {
  92276. t.inputState.composing < 0 && t.docView.hasComposition && t.update([]);
  92277. }, 50));
  92278. };
  92279. Ia.contextmenu = (t) => {
  92280. t.inputState.lastContextMenu = Date.now();
  92281. };
  92282. uo.beforeinput = (t, e) => {
  92283. var n;
  92284. let r;
  92285. if (Ne.chrome && Ne.android && (r = toe.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(r.key, r.keyCode), r.key == "Backspace" || r.key == "Delete")) {
  92286. let i = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0;
  92287. setTimeout(() => {
  92288. var a;
  92289. (((a = window.visualViewport) === null || a === void 0 ? void 0 : a.height) || 0) > i + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus());
  92290. }, 100);
  92291. }
  92292. return Ne.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), Ne.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => Ia.compositionend(t, e), 20), !1;
  92293. };
  92294. const e9 = /* @__PURE__ */ new Set();
  92295. function Eot(t) {
  92296. e9.has(t) || (e9.add(t), t.addEventListener("copy", () => {
  92297. }), t.addEventListener("cut", () => {
  92298. }));
  92299. }
  92300. const t9 = ["pre-wrap", "normal", "pre-line", "break-spaces"];
  92301. class Mot {
  92302. constructor(e) {
  92303. this.lineWrapping = e, this.doc = Ft.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1;
  92304. }
  92305. heightForGap(e, n) {
  92306. let r = this.doc.lineAt(n).number - this.doc.lineAt(e).number + 1;
  92307. return this.lineWrapping && (r += Math.max(0, Math.ceil((n - e - r * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * r;
  92308. }
  92309. heightForLine(e) {
  92310. return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight;
  92311. }
  92312. setDoc(e) {
  92313. return this.doc = e, this;
  92314. }
  92315. mustRefreshForWrapping(e) {
  92316. return t9.indexOf(e) > -1 != this.lineWrapping;
  92317. }
  92318. mustRefreshForHeights(e) {
  92319. let n = !1;
  92320. for (let r = 0; r < e.length; r++) {
  92321. let i = e[r];
  92322. i < 0 ? r++ : this.heightSamples[Math.floor(i * 10)] || (n = !0, this.heightSamples[Math.floor(i * 10)] = !0);
  92323. }
  92324. return n;
  92325. }
  92326. refresh(e, n, r, i, a, o) {
  92327. let s = t9.indexOf(e) > -1, l = Math.round(n) != Math.round(this.lineHeight) || this.lineWrapping != s;
  92328. if (this.lineWrapping = s, this.lineHeight = n, this.charWidth = r, this.textHeight = i, this.lineLength = a, l) {
  92329. this.heightSamples = {};
  92330. for (let u = 0; u < o.length; u++) {
  92331. let c = o[u];
  92332. c < 0 ? u++ : this.heightSamples[Math.floor(c * 10)] = !0;
  92333. }
  92334. }
  92335. return l;
  92336. }
  92337. }
  92338. class Iot {
  92339. constructor(e, n) {
  92340. this.from = e, this.heights = n, this.index = 0;
  92341. }
  92342. get more() {
  92343. return this.index < this.heights.length;
  92344. }
  92345. }
  92346. class Bo {
  92347. /**
  92348. @internal
  92349. */
  92350. constructor(e, n, r, i, a) {
  92351. this.from = e, this.length = n, this.top = r, this.height = i, this._content = a;
  92352. }
  92353. /**
  92354. The type of element this is. When querying lines, this may be
  92355. an array of all the blocks that make up the line.
  92356. */
  92357. get type() {
  92358. return typeof this._content == "number" ? Jr.Text : Array.isArray(this._content) ? this._content : this._content.type;
  92359. }
  92360. /**
  92361. The end of the element as a document position.
  92362. */
  92363. get to() {
  92364. return this.from + this.length;
  92365. }
  92366. /**
  92367. The bottom position of the element.
  92368. */
  92369. get bottom() {
  92370. return this.top + this.height;
  92371. }
  92372. /**
  92373. If this is a widget block, this will return the widget
  92374. associated with it.
  92375. */
  92376. get widget() {
  92377. return this._content instanceof gu ? this._content.widget : null;
  92378. }
  92379. /**
  92380. If this is a textblock, this holds the number of line breaks
  92381. that appear in widgets inside the block.
  92382. */
  92383. get widgetLineBreaks() {
  92384. return typeof this._content == "number" ? this._content : 0;
  92385. }
  92386. /**
  92387. @internal
  92388. */
  92389. join(e) {
  92390. let n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]);
  92391. return new Bo(this.from, this.length + e.length, this.top, this.height + e.height, n);
  92392. }
  92393. }
  92394. var cn = /* @__PURE__ */ function(t) {
  92395. return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t;
  92396. }(cn || (cn = {}));
  92397. const o1 = 1e-3;
  92398. class ei {
  92399. constructor(e, n, r = 2) {
  92400. this.length = e, this.height = n, this.flags = r;
  92401. }
  92402. get outdated() {
  92403. return (this.flags & 2) > 0;
  92404. }
  92405. set outdated(e) {
  92406. this.flags = (e ? 2 : 0) | this.flags & -3;
  92407. }
  92408. setHeight(e, n) {
  92409. this.height != n && (Math.abs(this.height - n) > o1 && (e.heightChanged = !0), this.height = n);
  92410. }
  92411. // Base case is to replace a leaf node, which simply builds a tree
  92412. // from the new nodes and returns that (HeightMapBranch and
  92413. // HeightMapGap override this to actually use from/to)
  92414. replace(e, n, r) {
  92415. return ei.of(r);
  92416. }
  92417. // Again, these are base cases, and are overridden for branch and gap nodes.
  92418. decomposeLeft(e, n) {
  92419. n.push(this);
  92420. }
  92421. decomposeRight(e, n) {
  92422. n.push(this);
  92423. }
  92424. applyChanges(e, n, r, i) {
  92425. let a = this, o = r.doc;
  92426. for (let s = i.length - 1; s >= 0; s--) {
  92427. let { fromA: l, toA: u, fromB: c, toB: f } = i[s], d = a.lineAt(l, cn.ByPosNoHeight, r.setDoc(n), 0, 0), h = d.to >= u ? d : a.lineAt(u, cn.ByPosNoHeight, r, 0, 0);
  92428. for (f += h.to - u, u = h.to; s > 0 && d.from <= i[s - 1].toA; )
  92429. l = i[s - 1].fromA, c = i[s - 1].fromB, s--, l < d.from && (d = a.lineAt(l, cn.ByPosNoHeight, r, 0, 0));
  92430. c += d.from - l, l = d.from;
  92431. let p = o4.build(r.setDoc(o), e, c, f);
  92432. a = a.replace(l, u, p);
  92433. }
  92434. return a.updateHeight(r, 0);
  92435. }
  92436. static empty() {
  92437. return new Di(0, 0);
  92438. }
  92439. // nodes uses null values to indicate the position of line breaks.
  92440. // There are never line breaks at the start or end of the array, or
  92441. // two line breaks next to each other, and the array isn't allowed
  92442. // to be empty (same restrictions as return value from the builder).
  92443. static of(e) {
  92444. if (e.length == 1)
  92445. return e[0];
  92446. let n = 0, r = e.length, i = 0, a = 0;
  92447. for (; ; )
  92448. if (n == r)
  92449. if (i > a * 2) {
  92450. let s = e[n - 1];
  92451. s.break ? e.splice(--n, 1, s.left, null, s.right) : e.splice(--n, 1, s.left, s.right), r += 1 + s.break, i -= s.size;
  92452. } else if (a > i * 2) {
  92453. let s = e[r];
  92454. s.break ? e.splice(r, 1, s.left, null, s.right) : e.splice(r, 1, s.left, s.right), r += 2 + s.break, a -= s.size;
  92455. } else
  92456. break;
  92457. else if (i < a) {
  92458. let s = e[n++];
  92459. s && (i += s.size);
  92460. } else {
  92461. let s = e[--r];
  92462. s && (a += s.size);
  92463. }
  92464. let o = 0;
  92465. return e[n - 1] == null ? (o = 1, n--) : e[n] == null && (o = 1, r++), new Dot(ei.of(e.slice(0, n)), o, ei.of(e.slice(r)));
  92466. }
  92467. }
  92468. ei.prototype.size = 1;
  92469. class coe extends ei {
  92470. constructor(e, n, r) {
  92471. super(e, n), this.deco = r;
  92472. }
  92473. blockAt(e, n, r, i) {
  92474. return new Bo(i, this.length, r, this.height, this.deco || 0);
  92475. }
  92476. lineAt(e, n, r, i, a) {
  92477. return this.blockAt(0, r, i, a);
  92478. }
  92479. forEachLine(e, n, r, i, a, o) {
  92480. e <= a + this.length && n >= a && o(this.blockAt(0, r, i, a));
  92481. }
  92482. updateHeight(e, n = 0, r = !1, i) {
  92483. return i && i.from <= n && i.more && this.setHeight(e, i.heights[i.index++]), this.outdated = !1, this;
  92484. }
  92485. toString() {
  92486. return `block(${this.length})`;
  92487. }
  92488. }
  92489. class Di extends coe {
  92490. constructor(e, n) {
  92491. super(e, n, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0;
  92492. }
  92493. blockAt(e, n, r, i) {
  92494. return new Bo(i, this.length, r, this.height, this.breaks);
  92495. }
  92496. replace(e, n, r) {
  92497. let i = r[0];
  92498. return r.length == 1 && (i instanceof Di || i instanceof fr && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof fr ? i = new Di(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : ei.of(r);
  92499. }
  92500. updateHeight(e, n = 0, r = !1, i) {
  92501. return i && i.from <= n && i.more ? this.setHeight(e, i.heights[i.index++]) : (r || this.outdated) && this.setHeight(e, Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), this.outdated = !1, this;
  92502. }
  92503. toString() {
  92504. return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`;
  92505. }
  92506. }
  92507. class fr extends ei {
  92508. constructor(e) {
  92509. super(e, 0);
  92510. }
  92511. heightMetrics(e, n) {
  92512. let r = e.doc.lineAt(n).number, i = e.doc.lineAt(n + this.length).number, a = i - r + 1, o, s = 0;
  92513. if (e.lineWrapping) {
  92514. let l = Math.min(this.height, e.lineHeight * a);
  92515. o = l / a, this.length > a + 1 && (s = (this.height - l) / (this.length - a - 1));
  92516. } else
  92517. o = this.height / a;
  92518. return { firstLine: r, lastLine: i, perLine: o, perChar: s };
  92519. }
  92520. blockAt(e, n, r, i) {
  92521. let { firstLine: a, lastLine: o, perLine: s, perChar: l } = this.heightMetrics(n, i);
  92522. if (n.lineWrapping) {
  92523. let u = i + (e < n.lineHeight ? 0 : Math.round(Math.max(0, Math.min(1, (e - r) / this.height)) * this.length)), c = n.doc.lineAt(u), f = s + c.length * l, d = Math.max(r, e - f / 2);
  92524. return new Bo(c.from, c.length, d, f, 0);
  92525. } else {
  92526. let u = Math.max(0, Math.min(o - a, Math.floor((e - r) / s))), { from: c, length: f } = n.doc.line(a + u);
  92527. return new Bo(c, f, r + s * u, s, 0);
  92528. }
  92529. }
  92530. lineAt(e, n, r, i, a) {
  92531. if (n == cn.ByHeight)
  92532. return this.blockAt(e, r, i, a);
  92533. if (n == cn.ByPosNoHeight) {
  92534. let { from: h, to: p } = r.doc.lineAt(e);
  92535. return new Bo(h, p - h, 0, 0, 0);
  92536. }
  92537. let { firstLine: o, perLine: s, perChar: l } = this.heightMetrics(r, a), u = r.doc.lineAt(e), c = s + u.length * l, f = u.number - o, d = i + s * f + l * (u.from - a - f);
  92538. return new Bo(u.from, u.length, Math.max(i, Math.min(d, i + this.height - c)), c, 0);
  92539. }
  92540. forEachLine(e, n, r, i, a, o) {
  92541. e = Math.max(e, a), n = Math.min(n, a + this.length);
  92542. let { firstLine: s, perLine: l, perChar: u } = this.heightMetrics(r, a);
  92543. for (let c = e, f = i; c <= n; ) {
  92544. let d = r.doc.lineAt(c);
  92545. if (c == e) {
  92546. let p = d.number - s;
  92547. f += l * p + u * (e - a - p);
  92548. }
  92549. let h = l + u * d.length;
  92550. o(new Bo(d.from, d.length, f, h, 0)), f += h, c = d.to + 1;
  92551. }
  92552. }
  92553. replace(e, n, r) {
  92554. let i = this.length - n;
  92555. if (i > 0) {
  92556. let a = r[r.length - 1];
  92557. a instanceof fr ? r[r.length - 1] = new fr(a.length + i) : r.push(null, new fr(i - 1));
  92558. }
  92559. if (e > 0) {
  92560. let a = r[0];
  92561. a instanceof fr ? r[0] = new fr(e + a.length) : r.unshift(new fr(e - 1), null);
  92562. }
  92563. return ei.of(r);
  92564. }
  92565. decomposeLeft(e, n) {
  92566. n.push(new fr(e - 1), null);
  92567. }
  92568. decomposeRight(e, n) {
  92569. n.push(null, new fr(this.length - e - 1));
  92570. }
  92571. updateHeight(e, n = 0, r = !1, i) {
  92572. let a = n + this.length;
  92573. if (i && i.from <= n + this.length && i.more) {
  92574. let o = [], s = Math.max(n, i.from), l = -1;
  92575. for (i.from > n && o.push(new fr(i.from - n - 1).updateHeight(e, n)); s <= a && i.more; ) {
  92576. let c = e.doc.lineAt(s).length;
  92577. o.length && o.push(null);
  92578. let f = i.heights[i.index++];
  92579. l == -1 ? l = f : Math.abs(f - l) >= o1 && (l = -2);
  92580. let d = new Di(c, f);
  92581. d.outdated = !1, o.push(d), s += c + 1;
  92582. }
  92583. s <= a && o.push(null, new fr(a - s).updateHeight(e, s));
  92584. let u = ei.of(o);
  92585. return (l < 0 || Math.abs(u.height - this.height) >= o1 || Math.abs(l - this.heightMetrics(e, n).perLine) >= o1) && (e.heightChanged = !0), u;
  92586. } else (r || this.outdated) && (this.setHeight(e, e.heightForGap(n, n + this.length)), this.outdated = !1);
  92587. return this;
  92588. }
  92589. toString() {
  92590. return `gap(${this.length})`;
  92591. }
  92592. }
  92593. class Dot extends ei {
  92594. constructor(e, n, r) {
  92595. super(e.length + n + r.length, e.height + r.height, n | (e.outdated || r.outdated ? 2 : 0)), this.left = e, this.right = r, this.size = e.size + r.size;
  92596. }
  92597. get break() {
  92598. return this.flags & 1;
  92599. }
  92600. blockAt(e, n, r, i) {
  92601. let a = r + this.left.height;
  92602. return e < a ? this.left.blockAt(e, n, r, i) : this.right.blockAt(e, n, a, i + this.left.length + this.break);
  92603. }
  92604. lineAt(e, n, r, i, a) {
  92605. let o = i + this.left.height, s = a + this.left.length + this.break, l = n == cn.ByHeight ? e < o : e < s, u = l ? this.left.lineAt(e, n, r, i, a) : this.right.lineAt(e, n, r, o, s);
  92606. if (this.break || (l ? u.to < s : u.from > s))
  92607. return u;
  92608. let c = n == cn.ByPosNoHeight ? cn.ByPosNoHeight : cn.ByPos;
  92609. return l ? u.join(this.right.lineAt(s, c, r, o, s)) : this.left.lineAt(s, c, r, i, a).join(u);
  92610. }
  92611. forEachLine(e, n, r, i, a, o) {
  92612. let s = i + this.left.height, l = a + this.left.length + this.break;
  92613. if (this.break)
  92614. e < l && this.left.forEachLine(e, n, r, i, a, o), n >= l && this.right.forEachLine(e, n, r, s, l, o);
  92615. else {
  92616. let u = this.lineAt(l, cn.ByPos, r, i, a);
  92617. e < u.from && this.left.forEachLine(e, u.from - 1, r, i, a, o), u.to >= e && u.from <= n && o(u), n > u.to && this.right.forEachLine(u.to + 1, n, r, s, l, o);
  92618. }
  92619. }
  92620. replace(e, n, r) {
  92621. let i = this.left.length + this.break;
  92622. if (n < i)
  92623. return this.balanced(this.left.replace(e, n, r), this.right);
  92624. if (e > this.left.length)
  92625. return this.balanced(this.left, this.right.replace(e - i, n - i, r));
  92626. let a = [];
  92627. e > 0 && this.decomposeLeft(e, a);
  92628. let o = a.length;
  92629. for (let s of r)
  92630. a.push(s);
  92631. if (e > 0 && n9(a, o - 1), n < this.length) {
  92632. let s = a.length;
  92633. this.decomposeRight(n, a), n9(a, s);
  92634. }
  92635. return ei.of(a);
  92636. }
  92637. decomposeLeft(e, n) {
  92638. let r = this.left.length;
  92639. if (e <= r)
  92640. return this.left.decomposeLeft(e, n);
  92641. n.push(this.left), this.break && (r++, e >= r && n.push(null)), e > r && this.right.decomposeLeft(e - r, n);
  92642. }
  92643. decomposeRight(e, n) {
  92644. let r = this.left.length, i = r + this.break;
  92645. if (e >= i)
  92646. return this.right.decomposeRight(e - i, n);
  92647. e < r && this.left.decomposeRight(e, n), this.break && e < i && n.push(null), n.push(this.right);
  92648. }
  92649. balanced(e, n) {
  92650. return e.size > 2 * n.size || n.size > 2 * e.size ? ei.of(this.break ? [e, null, n] : [e, n]) : (this.left = e, this.right = n, this.height = e.height + n.height, this.outdated = e.outdated || n.outdated, this.size = e.size + n.size, this.length = e.length + this.break + n.length, this);
  92651. }
  92652. updateHeight(e, n = 0, r = !1, i) {
  92653. let { left: a, right: o } = this, s = n + a.length + this.break, l = null;
  92654. return i && i.from <= n + a.length && i.more ? l = a = a.updateHeight(e, n, r, i) : a.updateHeight(e, n, r), i && i.from <= s + o.length && i.more ? l = o = o.updateHeight(e, s, r, i) : o.updateHeight(e, s, r), l ? this.balanced(a, o) : (this.height = this.left.height + this.right.height, this.outdated = !1, this);
  92655. }
  92656. toString() {
  92657. return this.left + (this.break ? " " : "-") + this.right;
  92658. }
  92659. }
  92660. function n9(t, e) {
  92661. let n, r;
  92662. t[e] == null && (n = t[e - 1]) instanceof fr && (r = t[e + 1]) instanceof fr && t.splice(e - 1, 3, new fr(n.length + 1 + r.length));
  92663. }
  92664. const Rot = 5;
  92665. class o4 {
  92666. constructor(e, n) {
  92667. this.pos = e, this.oracle = n, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e;
  92668. }
  92669. get isCovered() {
  92670. return this.covering && this.nodes[this.nodes.length - 1] == this.covering;
  92671. }
  92672. span(e, n) {
  92673. if (this.lineStart > -1) {
  92674. let r = Math.min(n, this.lineEnd), i = this.nodes[this.nodes.length - 1];
  92675. i instanceof Di ? i.length += r - this.pos : (r > this.pos || !this.isCovered) && this.nodes.push(new Di(r - this.pos, -1)), this.writtenTo = r, n > r && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1);
  92676. }
  92677. this.pos = n;
  92678. }
  92679. point(e, n, r) {
  92680. if (e < n || r.heightRelevant) {
  92681. let i = r.widget ? r.widget.estimatedHeight : 0, a = r.widget ? r.widget.lineBreaks : 0;
  92682. i < 0 && (i = this.oracle.lineHeight);
  92683. let o = n - e;
  92684. r.block ? this.addBlock(new coe(o, i, r)) : (o || a || i >= Rot) && this.addLineDeco(i, a, o);
  92685. } else n > e && this.span(e, n);
  92686. this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to);
  92687. }
  92688. enterLine() {
  92689. if (this.lineStart > -1)
  92690. return;
  92691. let { from: e, to: n } = this.oracle.doc.lineAt(this.pos);
  92692. this.lineStart = e, this.lineEnd = n, this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new Di(this.pos - e, -1)), this.writtenTo = this.pos;
  92693. }
  92694. blankContent(e, n) {
  92695. let r = new fr(n - e);
  92696. return this.oracle.doc.lineAt(e).to == n && (r.flags |= 4), r;
  92697. }
  92698. ensureLine() {
  92699. this.enterLine();
  92700. let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null;
  92701. if (e instanceof Di)
  92702. return e;
  92703. let n = new Di(0, -1);
  92704. return this.nodes.push(n), n;
  92705. }
  92706. addBlock(e) {
  92707. this.enterLine();
  92708. let n = e.deco;
  92709. n && n.startSide > 0 && !this.isCovered && this.ensureLine(), this.nodes.push(e), this.writtenTo = this.pos = this.pos + e.length, n && n.endSide > 0 && (this.covering = e);
  92710. }
  92711. addLineDeco(e, n, r) {
  92712. let i = this.ensureLine();
  92713. i.length += r, i.collapsed += r, i.widgetHeight = Math.max(i.widgetHeight, e), i.breaks += n, this.writtenTo = this.pos = this.pos + r;
  92714. }
  92715. finish(e) {
  92716. let n = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1];
  92717. this.lineStart > -1 && !(n instanceof Di) && !this.isCovered ? this.nodes.push(new Di(0, -1)) : (this.writtenTo < this.pos || n == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos));
  92718. let r = e;
  92719. for (let i of this.nodes)
  92720. i instanceof Di && i.updateHeight(this.oracle, r), r += i ? i.length : 1;
  92721. return this.nodes;
  92722. }
  92723. // Always called with a region that on both sides either stretches
  92724. // to a line break or the end of the document.
  92725. // The returned array uses null to indicate line breaks, but never
  92726. // starts or ends in a line break, or has multiple line breaks next
  92727. // to each other.
  92728. static build(e, n, r, i) {
  92729. let a = new o4(r, e);
  92730. return Vt.spans(n, r, i, a, 0), a.finish(r);
  92731. }
  92732. }
  92733. function kot(t, e, n) {
  92734. let r = new Lot();
  92735. return Vt.compare(t, e, n, r, 0), r.changes;
  92736. }
  92737. class Lot {
  92738. constructor() {
  92739. this.changes = [];
  92740. }
  92741. compareRange() {
  92742. }
  92743. comparePoint(e, n, r, i) {
  92744. (e < n || r && r.heightRelevant || i && i.heightRelevant) && OM(e, n, this.changes, 5);
  92745. }
  92746. }
  92747. function Not(t, e) {
  92748. let n = t.getBoundingClientRect(), r = t.ownerDocument, i = r.defaultView || window, a = Math.max(0, n.left), o = Math.min(i.innerWidth, n.right), s = Math.max(0, n.top), l = Math.min(i.innerHeight, n.bottom);
  92749. for (let u = t.parentNode; u && u != r.body; )
  92750. if (u.nodeType == 1) {
  92751. let c = u, f = window.getComputedStyle(c);
  92752. if ((c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth) && f.overflow != "visible") {
  92753. let d = c.getBoundingClientRect();
  92754. a = Math.max(a, d.left), o = Math.min(o, d.right), s = Math.max(s, d.top), l = u == t.parentNode ? d.bottom : Math.min(l, d.bottom);
  92755. }
  92756. u = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode;
  92757. } else if (u.nodeType == 11)
  92758. u = u.host;
  92759. else
  92760. break;
  92761. return {
  92762. left: a - n.left,
  92763. right: Math.max(a, o) - n.left,
  92764. top: s - (n.top + e),
  92765. bottom: Math.max(s, l) - (n.top + e)
  92766. };
  92767. }
  92768. function Bot(t, e) {
  92769. let n = t.getBoundingClientRect();
  92770. return {
  92771. left: 0,
  92772. right: n.right - n.left,
  92773. top: e,
  92774. bottom: n.bottom - (n.top + e)
  92775. };
  92776. }
  92777. class b$ {
  92778. constructor(e, n, r) {
  92779. this.from = e, this.to = n, this.size = r;
  92780. }
  92781. static same(e, n) {
  92782. if (e.length != n.length)
  92783. return !1;
  92784. for (let r = 0; r < e.length; r++) {
  92785. let i = e[r], a = n[r];
  92786. if (i.from != a.from || i.to != a.to || i.size != a.size)
  92787. return !1;
  92788. }
  92789. return !0;
  92790. }
  92791. draw(e, n) {
  92792. return Ze.replace({
  92793. widget: new zot(this.size * (n ? e.scaleY : e.scaleX), n)
  92794. }).range(this.from, this.to);
  92795. }
  92796. }
  92797. class zot extends ds {
  92798. constructor(e, n) {
  92799. super(), this.size = e, this.vertical = n;
  92800. }
  92801. eq(e) {
  92802. return e.size == this.size && e.vertical == this.vertical;
  92803. }
  92804. toDOM() {
  92805. let e = document.createElement("div");
  92806. return this.vertical ? e.style.height = this.size + "px" : (e.style.width = this.size + "px", e.style.height = "2px", e.style.display = "inline-block"), e;
  92807. }
  92808. get estimatedHeight() {
  92809. return this.vertical ? this.size : -1;
  92810. }
  92811. }
  92812. class r9 {
  92813. constructor(e) {
  92814. this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !1, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = i9, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = pn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
  92815. let n = e.facet(i4).some((r) => typeof r != "function" && r.class == "cm-lineWrapping");
  92816. this.heightOracle = new Mot(n), this.stateDeco = e.facet(Xm).filter((r) => typeof r != "function"), this.heightMap = ei.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle.setDoc(e.doc), [new xa(0, 0, 0, e.doc.length)]);
  92817. for (let r = 0; r < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); r++)
  92818. ;
  92819. this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Ze.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
  92820. }
  92821. updateForViewport() {
  92822. let e = [this.viewport], { main: n } = this.state.selection;
  92823. for (let r = 0; r <= 1; r++) {
  92824. let i = r ? n.head : n.anchor;
  92825. if (!e.some(({ from: a, to: o }) => i >= a && i <= o)) {
  92826. let { from: a, to: o } = this.lineBlockAt(i);
  92827. e.push(new Xb(a, o));
  92828. }
  92829. }
  92830. return this.viewports = e.sort((r, i) => r.from - i.from), this.updateScaler();
  92831. }
  92832. updateScaler() {
  92833. let e = this.scaler;
  92834. return this.scaler = this.heightMap.height <= 7e6 ? i9 : new s4(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2;
  92835. }
  92836. updateViewportLines() {
  92837. this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
  92838. this.viewportLines.push(tg(e, this.scaler));
  92839. });
  92840. }
  92841. update(e, n = null) {
  92842. this.state = e.state;
  92843. let r = this.stateDeco;
  92844. this.stateDeco = this.state.facet(Xm).filter((c) => typeof c != "function");
  92845. let i = e.changedRanges, a = xa.extendWithRanges(i, kot(r, this.stateDeco, e ? e.changes : jn.empty(this.state.doc.length))), o = this.heightMap.height, s = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
  92846. this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), a), this.heightMap.height != o && (e.flags |= 2), s ? (this.scrollAnchorPos = e.changes.mapPos(s.from, -1), this.scrollAnchorHeight = s.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height);
  92847. let l = a.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
  92848. (n && (n.range.head < l.from || n.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, n));
  92849. let u = l.from != this.viewport.from || l.to != this.viewport.to;
  92850. this.viewport = l, e.flags |= this.updateForViewport(), (u || !e.changes.empty || e.flags & 2) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(), n && (this.scrollTarget = n), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(Gae) && (this.mustEnforceCursorAssoc = !0);
  92851. }
  92852. measure(e) {
  92853. let n = e.contentDOM, r = window.getComputedStyle(n), i = this.heightOracle, a = r.whiteSpace;
  92854. this.defaultTextDirection = r.direction == "rtl" ? pn.RTL : pn.LTR;
  92855. let o = this.heightOracle.mustRefreshForWrapping(a), s = n.getBoundingClientRect(), l = o || this.mustMeasureContent || this.contentDOMHeight != s.height;
  92856. this.contentDOMHeight = s.height, this.mustMeasureContent = !1;
  92857. let u = 0, c = 0;
  92858. if (s.width && s.height) {
  92859. let { scaleX: _, scaleY: O } = yae(n, s);
  92860. (_ > 5e-3 && Math.abs(this.scaleX - _) > 5e-3 || O > 5e-3 && Math.abs(this.scaleY - O) > 5e-3) && (this.scaleX = _, this.scaleY = O, u |= 8, o = l = !0);
  92861. }
  92862. let f = (parseInt(r.paddingTop) || 0) * this.scaleY, d = (parseInt(r.paddingBottom) || 0) * this.scaleY;
  92863. (this.paddingTop != f || this.paddingBottom != d) && (this.paddingTop = f, this.paddingBottom = d, u |= 10), this.editorWidth != e.scrollDOM.clientWidth && (i.lineWrapping && (l = !0), this.editorWidth = e.scrollDOM.clientWidth, u |= 8);
  92864. let h = e.scrollDOM.scrollTop * this.scaleY;
  92865. this.scrollTop != h && (this.scrollAnchorHeight = -1, this.scrollTop = h), this.scrolledToBottom = Oae(e.scrollDOM);
  92866. let p = (this.printing ? Bot : Not)(n, this.paddingTop), v = p.top - this.pixelViewport.top, g = p.bottom - this.pixelViewport.bottom;
  92867. this.pixelViewport = p;
  92868. let m = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
  92869. if (m != this.inView && (this.inView = m, m && (l = !0)), !this.inView && !this.scrollTarget)
  92870. return 0;
  92871. let y = s.width;
  92872. if ((this.contentDOMWidth != y || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = s.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 8), l) {
  92873. let _ = e.docView.measureVisibleLineHeights(this.viewport);
  92874. if (i.mustRefreshForHeights(_) && (o = !0), o || i.lineWrapping && Math.abs(y - this.contentDOMWidth) > i.charWidth) {
  92875. let { lineHeight: O, charWidth: S, textHeight: x } = e.docView.measureTextSize();
  92876. o = O > 0 && i.refresh(a, O, S, x, y / S, _), o && (e.docView.minWidth = 0, u |= 8);
  92877. }
  92878. v > 0 && g > 0 ? c = Math.max(v, g) : v < 0 && g < 0 && (c = Math.min(v, g)), i.heightChanged = !1;
  92879. for (let O of this.viewports) {
  92880. let S = O.from == this.viewport.from ? _ : e.docView.measureVisibleLineHeights(O);
  92881. this.heightMap = (o ? ei.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle, [new xa(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, o, new Iot(O.from, S));
  92882. }
  92883. i.heightChanged && (u |= 2);
  92884. }
  92885. let b = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
  92886. return b && (u & 2 && (u |= this.updateScaler()), this.viewport = this.getViewport(c, this.scrollTarget), u |= this.updateForViewport()), (u & 2 || b) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), u |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), u;
  92887. }
  92888. get visibleTop() {
  92889. return this.scaler.fromDOM(this.pixelViewport.top);
  92890. }
  92891. get visibleBottom() {
  92892. return this.scaler.fromDOM(this.pixelViewport.bottom);
  92893. }
  92894. getViewport(e, n) {
  92895. let r = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), i = this.heightMap, a = this.heightOracle, { visibleTop: o, visibleBottom: s } = this, l = new Xb(i.lineAt(o - r * 1e3, cn.ByHeight, a, 0, 0).from, i.lineAt(s + (1 - r) * 1e3, cn.ByHeight, a, 0, 0).to);
  92896. if (n) {
  92897. let { head: u } = n.range;
  92898. if (u < l.from || u > l.to) {
  92899. let c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, cn.ByPos, a, 0, 0), d;
  92900. n.y == "center" ? d = (f.top + f.bottom) / 2 - c / 2 : n.y == "start" || n.y == "nearest" && u < l.from ? d = f.top : d = f.bottom - c, l = new Xb(i.lineAt(d - 1e3 / 2, cn.ByHeight, a, 0, 0).from, i.lineAt(d + c + 1e3 / 2, cn.ByHeight, a, 0, 0).to);
  92901. }
  92902. }
  92903. return l;
  92904. }
  92905. mapViewport(e, n) {
  92906. let r = n.mapPos(e.from, -1), i = n.mapPos(e.to, 1);
  92907. return new Xb(this.heightMap.lineAt(r, cn.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, cn.ByPos, this.heightOracle, 0, 0).to);
  92908. }
  92909. // Checks if a given viewport covers the visible part of the
  92910. // document and not too much beyond that.
  92911. viewportIsAppropriate({ from: e, to: n }, r = 0) {
  92912. if (!this.inView)
  92913. return !0;
  92914. let { top: i } = this.heightMap.lineAt(e, cn.ByPos, this.heightOracle, 0, 0), { bottom: a } = this.heightMap.lineAt(n, cn.ByPos, this.heightOracle, 0, 0), { visibleTop: o, visibleBottom: s } = this;
  92915. return (e == 0 || i <= o - Math.max(10, Math.min(
  92916. -r,
  92917. 250
  92918. /* VP.MaxCoverMargin */
  92919. ))) && (n == this.state.doc.length || a >= s + Math.max(10, Math.min(
  92920. r,
  92921. 250
  92922. /* VP.MaxCoverMargin */
  92923. ))) && i > o - 2 * 1e3 && a < s + 2 * 1e3;
  92924. }
  92925. mapLineGaps(e, n) {
  92926. if (!e.length || n.empty)
  92927. return e;
  92928. let r = [];
  92929. for (let i of e)
  92930. n.touchesRange(i.from, i.to) || r.push(new b$(n.mapPos(i.from), n.mapPos(i.to), i.size));
  92931. return r;
  92932. }
  92933. // Computes positions in the viewport where the start or end of a
  92934. // line should be hidden, trying to reuse existing line gaps when
  92935. // appropriate to avoid unneccesary redraws.
  92936. // Uses crude character-counting for the positioning and sizing,
  92937. // since actual DOM coordinates aren't always available and
  92938. // predictable. Relies on generous margins (see LG.Margin) to hide
  92939. // the artifacts this might produce from the user.
  92940. ensureLineGaps(e, n) {
  92941. let r = this.heightOracle.lineWrapping, i = r ? 1e4 : 2e3, a = i >> 1, o = i << 1;
  92942. if (this.defaultTextDirection != pn.LTR && !r)
  92943. return [];
  92944. let s = [], l = (c, f, d, h) => {
  92945. if (f - c < a)
  92946. return;
  92947. let p = this.state.selection.main, v = [p.from];
  92948. p.empty || v.push(p.to);
  92949. for (let m of v)
  92950. if (m > c && m < f) {
  92951. l(c, m - 10, d, h), l(m + 10, f, d, h);
  92952. return;
  92953. }
  92954. let g = Fot(e, (m) => m.from >= d.from && m.to <= d.to && Math.abs(m.from - c) < a && Math.abs(m.to - f) < a && !v.some((y) => m.from < y && m.to > y));
  92955. if (!g) {
  92956. if (f < d.to && n && r && n.visibleRanges.some((m) => m.from <= f && m.to >= f)) {
  92957. let m = n.moveToLineBoundary(me.cursor(f), !1, !0).head;
  92958. m > c && (f = m);
  92959. }
  92960. g = new b$(c, f, this.gapSize(d, c, f, h));
  92961. }
  92962. s.push(g);
  92963. }, u = (c) => {
  92964. if (c.length < o || c.type != Jr.Text)
  92965. return;
  92966. let f = Vot(c.from, c.to, this.stateDeco);
  92967. if (f.total < o)
  92968. return;
  92969. let d = this.scrollTarget ? this.scrollTarget.range.head : null, h, p;
  92970. if (r) {
  92971. let v = i / this.heightOracle.lineLength * this.heightOracle.lineHeight, g, m;
  92972. if (d != null) {
  92973. let y = qb(f, d), b = ((this.visibleBottom - this.visibleTop) / 2 + v) / c.height;
  92974. g = y - b, m = y + b;
  92975. } else
  92976. g = (this.visibleTop - c.top - v) / c.height, m = (this.visibleBottom - c.top + v) / c.height;
  92977. h = Yb(f, g), p = Yb(f, m);
  92978. } else {
  92979. let v = f.total * this.heightOracle.charWidth, g = i * this.heightOracle.charWidth, m, y;
  92980. if (d != null) {
  92981. let b = qb(f, d), _ = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + g) / v;
  92982. m = b - _, y = b + _;
  92983. } else
  92984. m = (this.pixelViewport.left - g) / v, y = (this.pixelViewport.right + g) / v;
  92985. h = Yb(f, m), p = Yb(f, y);
  92986. }
  92987. h > c.from && l(c.from, h, c, f), p < c.to && l(p, c.to, c, f);
  92988. };
  92989. for (let c of this.viewportLines)
  92990. Array.isArray(c.type) ? c.type.forEach(u) : u(c);
  92991. return s;
  92992. }
  92993. gapSize(e, n, r, i) {
  92994. let a = qb(i, r) - qb(i, n);
  92995. return this.heightOracle.lineWrapping ? e.height * a : i.total * this.heightOracle.charWidth * a;
  92996. }
  92997. updateLineGaps(e) {
  92998. b$.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Ze.set(e.map((n) => n.draw(this, this.heightOracle.lineWrapping))));
  92999. }
  93000. computeVisibleRanges() {
  93001. let e = this.stateDeco;
  93002. this.lineGaps.length && (e = e.concat(this.lineGapDeco));
  93003. let n = [];
  93004. Vt.spans(e, this.viewport.from, this.viewport.to, {
  93005. span(i, a) {
  93006. n.push({ from: i, to: a });
  93007. },
  93008. point() {
  93009. }
  93010. }, 20);
  93011. let r = n.length != this.visibleRanges.length || this.visibleRanges.some((i, a) => i.from != n[a].from || i.to != n[a].to);
  93012. return this.visibleRanges = n, r ? 4 : 0;
  93013. }
  93014. lineBlockAt(e) {
  93015. return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || tg(this.heightMap.lineAt(e, cn.ByPos, this.heightOracle, 0, 0), this.scaler);
  93016. }
  93017. lineBlockAtHeight(e) {
  93018. return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) || tg(this.heightMap.lineAt(this.scaler.fromDOM(e), cn.ByHeight, this.heightOracle, 0, 0), this.scaler);
  93019. }
  93020. scrollAnchorAt(e) {
  93021. let n = this.lineBlockAtHeight(e + 8);
  93022. return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
  93023. }
  93024. elementAtHeight(e) {
  93025. return tg(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
  93026. }
  93027. get docHeight() {
  93028. return this.scaler.toDOM(this.heightMap.height);
  93029. }
  93030. get contentHeight() {
  93031. return this.docHeight + this.paddingTop + this.paddingBottom;
  93032. }
  93033. }
  93034. class Xb {
  93035. constructor(e, n) {
  93036. this.from = e, this.to = n;
  93037. }
  93038. }
  93039. function Vot(t, e, n) {
  93040. let r = [], i = t, a = 0;
  93041. return Vt.spans(n, t, e, {
  93042. span() {
  93043. },
  93044. point(o, s) {
  93045. o > i && (r.push({ from: i, to: o }), a += o - i), i = s;
  93046. }
  93047. }, 20), i < e && (r.push({ from: i, to: e }), a += e - i), { total: a, ranges: r };
  93048. }
  93049. function Yb({ total: t, ranges: e }, n) {
  93050. if (n <= 0)
  93051. return e[0].from;
  93052. if (n >= 1)
  93053. return e[e.length - 1].to;
  93054. let r = Math.floor(t * n);
  93055. for (let i = 0; ; i++) {
  93056. let { from: a, to: o } = e[i], s = o - a;
  93057. if (r <= s)
  93058. return a + r;
  93059. r -= s;
  93060. }
  93061. }
  93062. function qb(t, e) {
  93063. let n = 0;
  93064. for (let { from: r, to: i } of t.ranges) {
  93065. if (e <= i) {
  93066. n += e - r;
  93067. break;
  93068. }
  93069. n += i - r;
  93070. }
  93071. return n / t.total;
  93072. }
  93073. function Fot(t, e) {
  93074. for (let n of t)
  93075. if (e(n))
  93076. return n;
  93077. }
  93078. const i9 = {
  93079. toDOM(t) {
  93080. return t;
  93081. },
  93082. fromDOM(t) {
  93083. return t;
  93084. },
  93085. scale: 1,
  93086. eq(t) {
  93087. return t == this;
  93088. }
  93089. };
  93090. class s4 {
  93091. constructor(e, n, r) {
  93092. let i = 0, a = 0, o = 0;
  93093. this.viewports = r.map(({ from: s, to: l }) => {
  93094. let u = n.lineAt(s, cn.ByPos, e, 0, 0).top, c = n.lineAt(l, cn.ByPos, e, 0, 0).bottom;
  93095. return i += c - u, { from: s, to: l, top: u, bottom: c, domTop: 0, domBottom: 0 };
  93096. }), this.scale = (7e6 - i) / (n.height - i);
  93097. for (let s of this.viewports)
  93098. s.domTop = o + (s.top - a) * this.scale, o = s.domBottom = s.domTop + (s.bottom - s.top), a = s.bottom;
  93099. }
  93100. toDOM(e) {
  93101. for (let n = 0, r = 0, i = 0; ; n++) {
  93102. let a = n < this.viewports.length ? this.viewports[n] : null;
  93103. if (!a || e < a.top)
  93104. return i + (e - r) * this.scale;
  93105. if (e <= a.bottom)
  93106. return a.domTop + (e - a.top);
  93107. r = a.bottom, i = a.domBottom;
  93108. }
  93109. }
  93110. fromDOM(e) {
  93111. for (let n = 0, r = 0, i = 0; ; n++) {
  93112. let a = n < this.viewports.length ? this.viewports[n] : null;
  93113. if (!a || e < a.domTop)
  93114. return r + (e - i) / this.scale;
  93115. if (e <= a.domBottom)
  93116. return a.top + (e - a.domTop);
  93117. r = a.bottom, i = a.domBottom;
  93118. }
  93119. }
  93120. eq(e) {
  93121. return e instanceof s4 ? this.scale == e.scale && this.viewports.length == e.viewports.length && this.viewports.every((n, r) => n.from == e.viewports[r].from && n.to == e.viewports[r].to) : !1;
  93122. }
  93123. }
  93124. function tg(t, e) {
  93125. if (e.scale == 1)
  93126. return t;
  93127. let n = e.toDOM(t.top), r = e.toDOM(t.bottom);
  93128. return new Bo(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((i) => tg(i, e)) : t._content);
  93129. }
  93130. const Kb = /* @__PURE__ */ Be.define({ combine: (t) => t.join(" ") }), AM = /* @__PURE__ */ Be.define({ combine: (t) => t.indexOf(!0) > -1 }), EM = /* @__PURE__ */ pu.newName(), foe = /* @__PURE__ */ pu.newName(), doe = /* @__PURE__ */ pu.newName(), hoe = { "&light": "." + foe, "&dark": "." + doe };
  93131. function MM(t, e, n) {
  93132. return new pu(e, {
  93133. finish(r) {
  93134. return /&/.test(r) ? r.replace(/&\w*/, (i) => {
  93135. if (i == "&")
  93136. return t;
  93137. if (!n || !n[i])
  93138. throw new RangeError(`Unsupported selector: ${i}`);
  93139. return n[i];
  93140. }) : t + " " + r;
  93141. }
  93142. });
  93143. }
  93144. const Wot = /* @__PURE__ */ MM("." + EM, {
  93145. "&": {
  93146. position: "relative !important",
  93147. boxSizing: "border-box",
  93148. "&.cm-focused": {
  93149. // Provide a simple default outline to make sure a focused
  93150. // editor is visually distinct. Can't leave the default behavior
  93151. // because that will apply to the content element, which is
  93152. // inside the scrollable container and doesn't include the
  93153. // gutters. We also can't use an 'auto' outline, since those
  93154. // are, for some reason, drawn behind the element content, which
  93155. // will cause things like the active line background to cover
  93156. // the outline (#297).
  93157. outline: "1px dotted #212121"
  93158. },
  93159. display: "flex !important",
  93160. flexDirection: "column"
  93161. },
  93162. ".cm-scroller": {
  93163. display: "flex !important",
  93164. alignItems: "flex-start !important",
  93165. fontFamily: "monospace",
  93166. lineHeight: 1.4,
  93167. height: "100%",
  93168. overflowX: "auto",
  93169. position: "relative",
  93170. zIndex: 0
  93171. },
  93172. ".cm-content": {
  93173. margin: 0,
  93174. flexGrow: 2,
  93175. flexShrink: 0,
  93176. display: "block",
  93177. whiteSpace: "pre",
  93178. wordWrap: "normal",
  93179. // https://github.com/codemirror/dev/issues/456
  93180. boxSizing: "border-box",
  93181. minHeight: "100%",
  93182. padding: "4px 0",
  93183. outline: "none",
  93184. "&[contenteditable=true]": {
  93185. WebkitUserModify: "read-write-plaintext-only"
  93186. }
  93187. },
  93188. ".cm-lineWrapping": {
  93189. whiteSpace_fallback: "pre-wrap",
  93190. // For IE
  93191. whiteSpace: "break-spaces",
  93192. wordBreak: "break-word",
  93193. // For Safari, which doesn't support overflow-wrap: anywhere
  93194. overflowWrap: "anywhere",
  93195. flexShrink: 1
  93196. },
  93197. "&light .cm-content": { caretColor: "black" },
  93198. "&dark .cm-content": { caretColor: "white" },
  93199. ".cm-line": {
  93200. display: "block",
  93201. padding: "0 2px 0 6px"
  93202. },
  93203. ".cm-layer": {
  93204. position: "absolute",
  93205. left: 0,
  93206. top: 0,
  93207. contain: "size style",
  93208. "& > *": {
  93209. position: "absolute"
  93210. }
  93211. },
  93212. "&light .cm-selectionBackground": {
  93213. background: "#d9d9d9"
  93214. },
  93215. "&dark .cm-selectionBackground": {
  93216. background: "#222"
  93217. },
  93218. "&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
  93219. background: "#d7d4f0"
  93220. },
  93221. "&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
  93222. background: "#233"
  93223. },
  93224. ".cm-cursorLayer": {
  93225. pointerEvents: "none"
  93226. },
  93227. "&.cm-focused > .cm-scroller > .cm-cursorLayer": {
  93228. animation: "steps(1) cm-blink 1.2s infinite"
  93229. },
  93230. // Two animations defined so that we can switch between them to
  93231. // restart the animation without forcing another style
  93232. // recomputation.
  93233. "@keyframes cm-blink": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  93234. "@keyframes cm-blink2": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  93235. ".cm-cursor, .cm-dropCursor": {
  93236. borderLeft: "1.2px solid black",
  93237. marginLeft: "-0.6px",
  93238. pointerEvents: "none"
  93239. },
  93240. ".cm-cursor": {
  93241. display: "none"
  93242. },
  93243. "&dark .cm-cursor": {
  93244. borderLeftColor: "#444"
  93245. },
  93246. ".cm-dropCursor": {
  93247. position: "absolute"
  93248. },
  93249. "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": {
  93250. display: "block"
  93251. },
  93252. ".cm-iso": {
  93253. unicodeBidi: "isolate"
  93254. },
  93255. ".cm-announced": {
  93256. position: "fixed",
  93257. top: "-10000px"
  93258. },
  93259. "@media print": {
  93260. ".cm-announced": { display: "none" }
  93261. },
  93262. "&light .cm-activeLine": { backgroundColor: "#cceeff44" },
  93263. "&dark .cm-activeLine": { backgroundColor: "#99eeff33" },
  93264. "&light .cm-specialChar": { color: "red" },
  93265. "&dark .cm-specialChar": { color: "#f78" },
  93266. ".cm-gutters": {
  93267. flexShrink: 0,
  93268. display: "flex",
  93269. height: "100%",
  93270. boxSizing: "border-box",
  93271. insetInlineStart: 0,
  93272. zIndex: 200
  93273. },
  93274. "&light .cm-gutters": {
  93275. backgroundColor: "#f5f5f5",
  93276. color: "#6c6c6c",
  93277. borderRight: "1px solid #ddd"
  93278. },
  93279. "&dark .cm-gutters": {
  93280. backgroundColor: "#333338",
  93281. color: "#ccc"
  93282. },
  93283. ".cm-gutter": {
  93284. display: "flex !important",
  93285. // Necessary -- prevents margin collapsing
  93286. flexDirection: "column",
  93287. flexShrink: 0,
  93288. boxSizing: "border-box",
  93289. minHeight: "100%",
  93290. overflow: "hidden"
  93291. },
  93292. ".cm-gutterElement": {
  93293. boxSizing: "border-box"
  93294. },
  93295. ".cm-lineNumbers .cm-gutterElement": {
  93296. padding: "0 3px 0 5px",
  93297. minWidth: "20px",
  93298. textAlign: "right",
  93299. whiteSpace: "nowrap"
  93300. },
  93301. "&light .cm-activeLineGutter": {
  93302. backgroundColor: "#e2f2ff"
  93303. },
  93304. "&dark .cm-activeLineGutter": {
  93305. backgroundColor: "#222227"
  93306. },
  93307. ".cm-panels": {
  93308. boxSizing: "border-box",
  93309. position: "sticky",
  93310. left: 0,
  93311. right: 0
  93312. },
  93313. "&light .cm-panels": {
  93314. backgroundColor: "#f5f5f5",
  93315. color: "black"
  93316. },
  93317. "&light .cm-panels-top": {
  93318. borderBottom: "1px solid #ddd"
  93319. },
  93320. "&light .cm-panels-bottom": {
  93321. borderTop: "1px solid #ddd"
  93322. },
  93323. "&dark .cm-panels": {
  93324. backgroundColor: "#333338",
  93325. color: "white"
  93326. },
  93327. ".cm-tab": {
  93328. display: "inline-block",
  93329. overflow: "hidden",
  93330. verticalAlign: "bottom"
  93331. },
  93332. ".cm-widgetBuffer": {
  93333. verticalAlign: "text-top",
  93334. height: "1em",
  93335. width: 0,
  93336. display: "inline"
  93337. },
  93338. ".cm-placeholder": {
  93339. color: "#888",
  93340. display: "inline-block",
  93341. verticalAlign: "top"
  93342. },
  93343. ".cm-highlightSpace:before": {
  93344. content: "attr(data-display)",
  93345. position: "absolute",
  93346. pointerEvents: "none",
  93347. color: "#888"
  93348. },
  93349. ".cm-highlightTab": {
  93350. backgroundImage: `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,
  93351. backgroundSize: "auto 100%",
  93352. backgroundPosition: "right 90%",
  93353. backgroundRepeat: "no-repeat"
  93354. },
  93355. ".cm-trailingSpace": {
  93356. backgroundColor: "#ff332255"
  93357. },
  93358. ".cm-button": {
  93359. verticalAlign: "middle",
  93360. color: "inherit",
  93361. fontSize: "70%",
  93362. padding: ".2em 1em",
  93363. borderRadius: "1px"
  93364. },
  93365. "&light .cm-button": {
  93366. backgroundImage: "linear-gradient(#eff1f5, #d9d9df)",
  93367. border: "1px solid #888",
  93368. "&:active": {
  93369. backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)"
  93370. }
  93371. },
  93372. "&dark .cm-button": {
  93373. backgroundImage: "linear-gradient(#393939, #111)",
  93374. border: "1px solid #888",
  93375. "&:active": {
  93376. backgroundImage: "linear-gradient(#111, #333)"
  93377. }
  93378. },
  93379. ".cm-textfield": {
  93380. verticalAlign: "middle",
  93381. color: "inherit",
  93382. fontSize: "70%",
  93383. border: "1px solid silver",
  93384. padding: ".2em .5em"
  93385. },
  93386. "&light .cm-textfield": {
  93387. backgroundColor: "white"
  93388. },
  93389. "&dark .cm-textfield": {
  93390. border: "1px solid #555",
  93391. backgroundColor: "inherit"
  93392. }
  93393. }, hoe), ng = "￿";
  93394. class Qot {
  93395. constructor(e, n) {
  93396. this.points = e, this.text = "", this.lineSeparator = n.facet(At.lineSeparator);
  93397. }
  93398. append(e) {
  93399. this.text += e;
  93400. }
  93401. lineBreak() {
  93402. this.text += ng;
  93403. }
  93404. readRange(e, n) {
  93405. if (!e)
  93406. return this;
  93407. let r = e.parentNode;
  93408. for (let i = e; ; ) {
  93409. this.findPointBefore(r, i);
  93410. let a = this.text.length;
  93411. this.readNode(i);
  93412. let o = i.nextSibling;
  93413. if (o == n)
  93414. break;
  93415. let s = Jt.get(i), l = Jt.get(o);
  93416. (s && l ? s.breakAfter : (s ? s.breakAfter : nS(i)) || nS(o) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > a) && this.lineBreak(), i = o;
  93417. }
  93418. return this.findPointBefore(r, n), this;
  93419. }
  93420. readTextNode(e) {
  93421. let n = e.nodeValue;
  93422. for (let r of this.points)
  93423. r.node == e && (r.pos = this.text.length + Math.min(r.offset, n.length));
  93424. for (let r = 0, i = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
  93425. let a = -1, o = 1, s;
  93426. if (this.lineSeparator ? (a = n.indexOf(this.lineSeparator, r), o = this.lineSeparator.length) : (s = i.exec(n)) && (a = s.index, o = s[0].length), this.append(n.slice(r, a < 0 ? n.length : a)), a < 0)
  93427. break;
  93428. if (this.lineBreak(), o > 1)
  93429. for (let l of this.points)
  93430. l.node == e && l.pos > this.text.length && (l.pos -= o - 1);
  93431. r = a + o;
  93432. }
  93433. }
  93434. readNode(e) {
  93435. if (e.cmIgnore)
  93436. return;
  93437. let n = Jt.get(e), r = n && n.overrideDOMText;
  93438. if (r != null) {
  93439. this.findPointInside(e, r.length);
  93440. for (let i = r.iter(); !i.next().done; )
  93441. i.lineBreak ? this.lineBreak() : this.append(i.value);
  93442. } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null);
  93443. }
  93444. findPointBefore(e, n) {
  93445. for (let r of this.points)
  93446. r.node == e && e.childNodes[r.offset] == n && (r.pos = this.text.length);
  93447. }
  93448. findPointInside(e, n) {
  93449. for (let r of this.points)
  93450. (e.nodeType == 3 ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + (Hot(e, r.node, r.offset) ? n : 0));
  93451. }
  93452. }
  93453. function Hot(t, e, n) {
  93454. for (; ; ) {
  93455. if (!e || n < Js(e))
  93456. return !1;
  93457. if (e == t)
  93458. return !0;
  93459. n = Cf(e) + 1, e = e.parentNode;
  93460. }
  93461. }
  93462. class a9 {
  93463. constructor(e, n) {
  93464. this.node = e, this.offset = n, this.pos = -1;
  93465. }
  93466. }
  93467. class Got {
  93468. constructor(e, n, r, i) {
  93469. this.typeOver = i, this.bounds = null, this.text = "", this.domChanged = n > -1;
  93470. let { impreciseHead: a, impreciseAnchor: o } = e.docView;
  93471. if (e.state.readOnly && n > -1)
  93472. this.newSel = null;
  93473. else if (n > -1 && (this.bounds = e.docView.domBoundsAround(n, r, 0))) {
  93474. let s = a || o ? [] : Uot(e), l = new Qot(s, e.state);
  93475. l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = Xot(s, this.bounds.from);
  93476. } else {
  93477. let s = e.observer.selectionRange, l = a && a.node == s.focusNode && a.offset == s.focusOffset || !vM(e.contentDOM, s.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(s.focusNode, s.focusOffset), u = o && o.node == s.anchorNode && o.offset == s.anchorOffset || !vM(e.contentDOM, s.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(s.anchorNode, s.anchorOffset), c = e.viewport;
  93478. if ((Ne.ios || Ne.chrome) && e.state.selection.main.empty && l != u && (c.from > 0 || c.to < e.state.doc.length)) {
  93479. let f = Math.min(l, u), d = Math.max(l, u), h = c.from - f, p = c.to - d;
  93480. (h == 0 || h == 1 || f == 0) && (p == 0 || p == -1 || d == e.state.doc.length) && (l = 0, u = e.state.doc.length);
  93481. }
  93482. this.newSel = me.single(u, l);
  93483. }
  93484. }
  93485. }
  93486. function poe(t, e) {
  93487. let n, { newSel: r } = e, i = t.state.selection.main, a = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1;
  93488. if (e.bounds) {
  93489. let { from: o, to: s } = e.bounds, l = i.from, u = null;
  93490. (a === 8 || Ne.android && e.text.length < s - o) && (l = i.to, u = "end");
  93491. let c = Zot(t.state.doc.sliceString(o, s, ng), e.text, l - o, u);
  93492. c && (Ne.chrome && a == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == ng + ng && c.toB--, n = {
  93493. from: o + c.from,
  93494. to: o + c.toA,
  93495. insert: Ft.of(e.text.slice(c.from, c.toB).split(ng))
  93496. });
  93497. } else r && (!t.hasFocus && t.state.facet(El) || r.main.eq(i)) && (r = null);
  93498. if (!n && !r)
  93499. return !1;
  93500. if (!n && e.typeOver && !i.empty && r && r.main.empty ? n = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, i.to) } : n && n.from >= i.from && n.to <= i.to && (n.from != i.from || n.to != i.to) && i.to - i.from - (n.to - n.from) <= 4 ? n = {
  93501. from: i.from,
  93502. to: i.to,
  93503. insert: t.state.doc.slice(i.from, n.from).append(n.insert).append(t.state.doc.slice(n.to, i.to))
  93504. } : (Ne.mac || Ne.android) && n && n.from == n.to && n.from == i.head - 1 && /^\. ?$/.test(n.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (r && n.insert.length == 2 && (r = me.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Ft.of([" "]) }) : Ne.chrome && n && n.from == n.to && n.from == i.head && n.insert.toString() == `
  93505. ` && t.lineWrapping && (r && (r = me.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Ft.of([" "]) }), n)
  93506. return voe(t, n, r, a);
  93507. if (r && !r.main.eq(i)) {
  93508. let o = !1, s = "select";
  93509. return t.inputState.lastSelectionTime > Date.now() - 50 && (t.inputState.lastSelectionOrigin == "select" && (o = !0), s = t.inputState.lastSelectionOrigin), t.dispatch({ selection: r, scrollIntoView: o, userEvent: s }), !0;
  93510. } else
  93511. return !1;
  93512. }
  93513. function voe(t, e, n, r = -1) {
  93514. if (Ne.ios && t.inputState.flushIOSKey(e))
  93515. return !0;
  93516. let i = t.state.selection.main;
  93517. if (Ne.android && (e.to == i.to && // GBoard will sometimes remove a space it just inserted
  93518. // after a completion when you press enter
  93519. (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && lh(t.contentDOM, "Enter", 13) || (e.from == i.from - 1 && e.to == i.to && e.insert.length == 0 || r == 8 && e.insert.length < e.to - e.from && e.to > i.head) && lh(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && lh(t.contentDOM, "Delete", 46)))
  93520. return !0;
  93521. let a = e.insert.toString();
  93522. t.inputState.composing >= 0 && t.inputState.composing++;
  93523. let o, s = () => o || (o = jot(t, e, n));
  93524. return t.state.facet(Wae).some((l) => l(t, e.from, e.to, a, s)) || t.dispatch(s()), !0;
  93525. }
  93526. function jot(t, e, n) {
  93527. let r, i = t.state, a = i.selection.main;
  93528. if (e.from >= a.from && e.to <= a.to && e.to - e.from >= (a.to - a.from) / 3 && (!n || n.main.empty && n.main.from == e.from + e.insert.length) && t.inputState.composing < 0) {
  93529. let s = a.from < e.from ? i.sliceDoc(a.from, e.from) : "", l = a.to > e.to ? i.sliceDoc(e.to, a.to) : "";
  93530. r = i.replaceSelection(t.state.toText(s + e.insert.sliceString(0, void 0, t.state.lineBreak) + l));
  93531. } else {
  93532. let s = i.changes(e), l = n && n.main.to <= s.newLength ? n.main : void 0;
  93533. if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= a.to && e.to >= a.to - 10) {
  93534. let u = t.state.sliceDoc(e.from, e.to), c, f = n && Jae(t, n.main.head);
  93535. if (f) {
  93536. let p = e.insert.length - (e.to - e.from);
  93537. c = { from: f.from, to: f.to - p };
  93538. } else
  93539. c = t.state.doc.lineAt(a.head);
  93540. let d = a.to - e.to, h = a.to - a.from;
  93541. r = i.changeByRange((p) => {
  93542. if (p.from == a.from && p.to == a.to)
  93543. return { changes: s, range: l || p.map(s) };
  93544. let v = p.to - d, g = v - u.length;
  93545. if (p.to - p.from != h || t.state.sliceDoc(g, v) != u || // Unfortunately, there's no way to make multiple
  93546. // changes in the same node work without aborting
  93547. // composition, so cursors in the composition range are
  93548. // ignored.
  93549. p.to >= c.from && p.from <= c.to)
  93550. return { range: p };
  93551. let m = i.changes({ from: g, to: v, insert: e.insert }), y = p.to - a.to;
  93552. return {
  93553. changes: m,
  93554. range: l ? me.range(Math.max(0, l.anchor + y), Math.max(0, l.head + y)) : p.map(m)
  93555. };
  93556. });
  93557. } else
  93558. r = {
  93559. changes: s,
  93560. selection: l && i.selection.replaceRange(l)
  93561. };
  93562. }
  93563. let o = "input.type";
  93564. return (t.composing || t.inputState.compositionPendingChange && t.inputState.compositionEndedAt > Date.now() - 50) && (t.inputState.compositionPendingChange = !1, o += ".compose", t.inputState.compositionFirstChange && (o += ".start", t.inputState.compositionFirstChange = !1)), i.update(r, { userEvent: o, scrollIntoView: !0 });
  93565. }
  93566. function Zot(t, e, n, r) {
  93567. let i = Math.min(t.length, e.length), a = 0;
  93568. for (; a < i && t.charCodeAt(a) == e.charCodeAt(a); )
  93569. a++;
  93570. if (a == i && t.length == e.length)
  93571. return null;
  93572. let o = t.length, s = e.length;
  93573. for (; o > 0 && s > 0 && t.charCodeAt(o - 1) == e.charCodeAt(s - 1); )
  93574. o--, s--;
  93575. if (r == "end") {
  93576. let l = Math.max(0, a - Math.min(o, s));
  93577. n -= o + l - a;
  93578. }
  93579. if (o < a && t.length < e.length) {
  93580. let l = n <= a && n >= o ? a - n : 0;
  93581. a -= l, s = a + (s - o), o = a;
  93582. } else if (s < a) {
  93583. let l = n <= a && n >= s ? a - n : 0;
  93584. a -= l, o = a + (o - s), s = a;
  93585. }
  93586. return { from: a, toA: o, toB: s };
  93587. }
  93588. function Uot(t) {
  93589. let e = [];
  93590. if (t.root.activeElement != t.contentDOM)
  93591. return e;
  93592. let { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a } = t.observer.selectionRange;
  93593. return n && (e.push(new a9(n, r)), (i != n || a != r) && e.push(new a9(i, a))), e;
  93594. }
  93595. function Xot(t, e) {
  93596. if (t.length == 0)
  93597. return null;
  93598. let n = t[0].pos, r = t.length == 2 ? t[1].pos : n;
  93599. return n > -1 && r > -1 ? me.single(n + e, r + e) : null;
  93600. }
  93601. const Yot = {
  93602. childList: !0,
  93603. characterData: !0,
  93604. subtree: !0,
  93605. attributes: !0,
  93606. characterDataOldValue: !0
  93607. }, _$ = Ne.ie && Ne.ie_version <= 11;
  93608. class qot {
  93609. constructor(e) {
  93610. this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new kat(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.printQuery = null, this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((n) => {
  93611. for (let r of n)
  93612. this.queue.push(r);
  93613. (Ne.ie && Ne.ie_version <= 11 || Ne.ios && e.composing) && n.some((r) => r.type == "childList" && r.removedNodes.length || r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length) ? this.flushSoon() : this.flush();
  93614. }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && // Chrome <126 doesn't support inverted selections in edit context (#1392)
  93615. !(Ne.chrome && Ne.chrome_version < 126) && (this.editContext = new Jot(e), e.state.facet(El) && (e.contentDOM.editContext = this.editContext.editContext)), _$ && (this.onCharData = (n) => {
  93616. this.queue.push({
  93617. target: n.target,
  93618. type: "characterData",
  93619. oldValue: n.prevValue
  93620. }), this.flushSoon();
  93621. }), this.onSelectionChange = this.onSelectionChange.bind(this), this.onResize = this.onResize.bind(this), this.onPrint = this.onPrint.bind(this), this.onScroll = this.onScroll.bind(this), window.matchMedia && (this.printQuery = window.matchMedia("print")), typeof ResizeObserver == "function" && (this.resizeScroll = new ResizeObserver(() => {
  93622. var n;
  93623. ((n = this.view.docView) === null || n === void 0 ? void 0 : n.lastUpdate) < Date.now() - 75 && this.onResize();
  93624. }), this.resizeScroll.observe(e.scrollDOM)), this.addWindowListeners(this.win = e.win), this.start(), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver((n) => {
  93625. this.parentCheck < 0 && (this.parentCheck = setTimeout(this.listenForScroll.bind(this), 1e3)), n.length > 0 && n[n.length - 1].intersectionRatio > 0 != this.intersecting && (this.intersecting = !this.intersecting, this.intersecting != this.view.inView && this.onScrollChanged(document.createEvent("Event")));
  93626. }, { threshold: [0, 1e-3] }), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver((n) => {
  93627. n.length > 0 && n[n.length - 1].intersectionRatio > 0 && this.onScrollChanged(document.createEvent("Event"));
  93628. }, {})), this.listenForScroll(), this.readSelectionRange();
  93629. }
  93630. onScrollChanged(e) {
  93631. this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure();
  93632. }
  93633. onScroll(e) {
  93634. this.intersecting && this.flush(!1), this.editContext && this.view.requestMeasure(this.editContext.measureReq), this.onScrollChanged(e);
  93635. }
  93636. onResize() {
  93637. this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(() => {
  93638. this.resizeTimeout = -1, this.view.requestMeasure();
  93639. }, 50));
  93640. }
  93641. onPrint(e) {
  93642. e.type == "change" && !e.matches || (this.view.viewState.printing = !0, this.view.measure(), setTimeout(() => {
  93643. this.view.viewState.printing = !1, this.view.requestMeasure();
  93644. }, 500));
  93645. }
  93646. updateGaps(e) {
  93647. if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((n, r) => n != e[r]))) {
  93648. this.gapIntersection.disconnect();
  93649. for (let n of e)
  93650. this.gapIntersection.observe(n);
  93651. this.gaps = e;
  93652. }
  93653. }
  93654. onSelectionChange(e) {
  93655. let n = this.selectionChanged;
  93656. if (!this.readSelectionRange() || this.delayedAndroidKey)
  93657. return;
  93658. let { view: r } = this, i = this.selectionRange;
  93659. if (r.state.facet(El) ? r.root.activeElement != this.dom : !i1(r.dom, i))
  93660. return;
  93661. let a = i.anchorNode && r.docView.nearest(i.anchorNode);
  93662. if (a && a.ignoreEvent(e)) {
  93663. n || (this.selectionChanged = !1);
  93664. return;
  93665. }
  93666. (Ne.ie && Ne.ie_version <= 11 || Ne.android && Ne.chrome) && !r.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
  93667. i.focusNode && Wg(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1);
  93668. }
  93669. readSelectionRange() {
  93670. let { view: e } = this, n = Um(e.root);
  93671. if (!n)
  93672. return !1;
  93673. let r = Ne.safari && e.root.nodeType == 11 && Mat(this.dom.ownerDocument) == this.dom && Kot(this.view, n) || n;
  93674. if (!r || this.selectionRange.eq(r))
  93675. return !1;
  93676. let i = i1(this.dom, r);
  93677. return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Nat(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), i && (this.selectionChanged = !0), !0);
  93678. }
  93679. setSelectionRange(e, n) {
  93680. this.selectionRange.set(e.node, e.offset, n.node, n.offset), this.selectionChanged = !1;
  93681. }
  93682. clearSelectionRange() {
  93683. this.selectionRange.set(null, 0, null, 0);
  93684. }
  93685. listenForScroll() {
  93686. this.parentCheck = -1;
  93687. let e = 0, n = null;
  93688. for (let r = this.dom; r; )
  93689. if (r.nodeType == 1)
  93690. !n && e < this.scrollTargets.length && this.scrollTargets[e] == r ? e++ : n || (n = this.scrollTargets.slice(0, e)), n && n.push(r), r = r.assignedSlot || r.parentNode;
  93691. else if (r.nodeType == 11)
  93692. r = r.host;
  93693. else
  93694. break;
  93695. if (e < this.scrollTargets.length && !n && (n = this.scrollTargets.slice(0, e)), n) {
  93696. for (let r of this.scrollTargets)
  93697. r.removeEventListener("scroll", this.onScroll);
  93698. for (let r of this.scrollTargets = n)
  93699. r.addEventListener("scroll", this.onScroll);
  93700. }
  93701. }
  93702. ignore(e) {
  93703. if (!this.active)
  93704. return e();
  93705. try {
  93706. return this.stop(), e();
  93707. } finally {
  93708. this.start(), this.clear();
  93709. }
  93710. }
  93711. start() {
  93712. this.active || (this.observer.observe(this.dom, Yot), _$ && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0);
  93713. }
  93714. stop() {
  93715. this.active && (this.active = !1, this.observer.disconnect(), _$ && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData));
  93716. }
  93717. // Throw away any pending changes
  93718. clear() {
  93719. this.processRecords(), this.queue.length = 0, this.selectionChanged = !1;
  93720. }
  93721. // Chrome Android, especially in combination with GBoard, not only
  93722. // doesn't reliably fire regular key events, but also often
  93723. // surrounds the effect of enter or backspace with a bunch of
  93724. // composition events that, when interrupted, cause text duplication
  93725. // or other kinds of corruption. This hack makes the editor back off
  93726. // from handling DOM changes for a moment when such a key is
  93727. // detected (via beforeinput or keydown), and then tries to flush
  93728. // them or, if that has no effect, dispatches the given key.
  93729. delayAndroidKey(e, n) {
  93730. var r;
  93731. if (!this.delayedAndroidKey) {
  93732. let i = () => {
  93733. let a = this.delayedAndroidKey;
  93734. a && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = a.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && a.force && lh(this.dom, a.key, a.keyCode));
  93735. };
  93736. this.flushingAndroidKey = this.view.win.requestAnimationFrame(i);
  93737. }
  93738. (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = {
  93739. key: e,
  93740. keyCode: n,
  93741. // Only run the key handler when no changes are detected if
  93742. // this isn't coming right after another change, in which case
  93743. // it is probably part of a weird chain of updates, and should
  93744. // be ignored if it returns the DOM to its previous state.
  93745. force: this.lastChange < Date.now() - 50 || !!(!((r = this.delayedAndroidKey) === null || r === void 0) && r.force)
  93746. });
  93747. }
  93748. clearDelayedAndroidKey() {
  93749. this.win.cancelAnimationFrame(this.flushingAndroidKey), this.delayedAndroidKey = null, this.flushingAndroidKey = -1;
  93750. }
  93751. flushSoon() {
  93752. this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame(() => {
  93753. this.delayedFlush = -1, this.flush();
  93754. }));
  93755. }
  93756. forceFlush() {
  93757. this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), this.delayedFlush = -1), this.flush();
  93758. }
  93759. pendingRecords() {
  93760. for (let e of this.observer.takeRecords())
  93761. this.queue.push(e);
  93762. return this.queue;
  93763. }
  93764. processRecords() {
  93765. let e = this.pendingRecords();
  93766. e.length && (this.queue = []);
  93767. let n = -1, r = -1, i = !1;
  93768. for (let a of e) {
  93769. let o = this.readMutation(a);
  93770. o && (o.typeOver && (i = !0), n == -1 ? { from: n, to: r } = o : (n = Math.min(o.from, n), r = Math.max(o.to, r)));
  93771. }
  93772. return { from: n, to: r, typeOver: i };
  93773. }
  93774. readChange() {
  93775. let { from: e, to: n, typeOver: r } = this.processRecords(), i = this.selectionChanged && i1(this.dom, this.selectionRange);
  93776. if (e < 0 && !i)
  93777. return null;
  93778. e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
  93779. let a = new Got(this.view, e, n, r);
  93780. return this.view.docView.domChanged = { newSel: a.newSel ? a.newSel.main : null }, a;
  93781. }
  93782. // Apply pending changes, if any
  93783. flush(e = !0) {
  93784. if (this.delayedFlush >= 0 || this.delayedAndroidKey)
  93785. return !1;
  93786. e && this.readSelectionRange();
  93787. let n = this.readChange();
  93788. if (!n)
  93789. return this.view.requestMeasure(), !1;
  93790. let r = this.view.state, i = poe(this.view, n);
  93791. return this.view.state == r && (n.domChanged || n.newSel && !n.newSel.main.eq(this.view.state.selection.main)) && this.view.update([]), i;
  93792. }
  93793. readMutation(e) {
  93794. let n = this.view.docView.nearest(e.target);
  93795. if (!n || n.ignoreMutation(e))
  93796. return null;
  93797. if (n.markDirty(e.type == "attributes"), e.type == "attributes" && (n.flags |= 4), e.type == "childList") {
  93798. let r = o9(n, e.previousSibling || e.target.previousSibling, -1), i = o9(n, e.nextSibling || e.target.nextSibling, 1);
  93799. return {
  93800. from: r ? n.posAfter(r) : n.posAtStart,
  93801. to: i ? n.posBefore(i) : n.posAtEnd,
  93802. typeOver: !1
  93803. };
  93804. } else return e.type == "characterData" ? { from: n.posAtStart, to: n.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null;
  93805. }
  93806. setWindow(e) {
  93807. e != this.win && (this.removeWindowListeners(this.win), this.win = e, this.addWindowListeners(this.win));
  93808. }
  93809. addWindowListeners(e) {
  93810. e.addEventListener("resize", this.onResize), this.printQuery ? this.printQuery.addEventListener("change", this.onPrint) : e.addEventListener("beforeprint", this.onPrint), e.addEventListener("scroll", this.onScroll), e.document.addEventListener("selectionchange", this.onSelectionChange);
  93811. }
  93812. removeWindowListeners(e) {
  93813. e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), this.printQuery ? this.printQuery.removeEventListener("change", this.onPrint) : e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange);
  93814. }
  93815. update(e) {
  93816. this.editContext && (this.editContext.update(e), e.startState.facet(El) != e.state.facet(El) && (e.view.contentDOM.editContext = e.state.facet(El) ? this.editContext.editContext : null));
  93817. }
  93818. destroy() {
  93819. var e, n, r;
  93820. this.stop(), (e = this.intersection) === null || e === void 0 || e.disconnect(), (n = this.gapIntersection) === null || n === void 0 || n.disconnect(), (r = this.resizeScroll) === null || r === void 0 || r.disconnect();
  93821. for (let i of this.scrollTargets)
  93822. i.removeEventListener("scroll", this.onScroll);
  93823. this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey);
  93824. }
  93825. }
  93826. function o9(t, e, n) {
  93827. for (; e; ) {
  93828. let r = Jt.get(e);
  93829. if (r && r.parent == t)
  93830. return r;
  93831. let i = e.parentNode;
  93832. e = i != t.dom ? i : n > 0 ? e.nextSibling : e.previousSibling;
  93833. }
  93834. return null;
  93835. }
  93836. function s9(t, e) {
  93837. let n = e.startContainer, r = e.startOffset, i = e.endContainer, a = e.endOffset, o = t.docView.domAtPos(t.state.selection.main.anchor);
  93838. return Wg(o.node, o.offset, i, a) && ([n, r, i, a] = [i, a, n, r]), { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a };
  93839. }
  93840. function Kot(t, e) {
  93841. if (e.getComposedRanges) {
  93842. let i = e.getComposedRanges(t.root)[0];
  93843. if (i)
  93844. return s9(t, i);
  93845. }
  93846. let n = null;
  93847. function r(i) {
  93848. i.preventDefault(), i.stopImmediatePropagation(), n = i.getTargetRanges()[0];
  93849. }
  93850. return t.contentDOM.addEventListener("beforeinput", r, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", r, !0), n ? s9(t, n) : null;
  93851. }
  93852. class Jot {
  93853. constructor(e) {
  93854. this.from = 0, this.to = 0, this.pendingContextChange = null, this.resetRange(e.state);
  93855. let n = this.editContext = new window.EditContext({
  93856. text: e.state.doc.sliceString(this.from, this.to),
  93857. selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, e.state.selection.main.anchor))),
  93858. selectionEnd: this.toContextPos(e.state.selection.main.head)
  93859. });
  93860. n.addEventListener("textupdate", (r) => {
  93861. let { anchor: i } = e.state.selection.main, a = {
  93862. from: this.toEditorPos(r.updateRangeStart),
  93863. to: this.toEditorPos(r.updateRangeEnd),
  93864. insert: Ft.of(r.text.split(`
  93865. `))
  93866. };
  93867. a.from == this.from && i < this.from ? a.from = i : a.to == this.to && i > this.to && (a.to = i), !(a.from == a.to && !a.insert.length) && (this.pendingContextChange = a, voe(e, a, me.single(this.toEditorPos(r.selectionStart), this.toEditorPos(r.selectionEnd))), this.pendingContextChange && this.revertPending(e.state));
  93868. }), n.addEventListener("characterboundsupdate", (r) => {
  93869. let i = [], a = null;
  93870. for (let o = this.toEditorPos(r.rangeStart), s = this.toEditorPos(r.rangeEnd); o < s; o++) {
  93871. let l = e.coordsForChar(o);
  93872. a = l && new DOMRect(l.left, l.top, l.right - l.left, l.bottom - l.top) || a || new DOMRect(), i.push(a);
  93873. }
  93874. n.updateCharacterBounds(r.rangeStart, i);
  93875. }), n.addEventListener("textformatupdate", (r) => {
  93876. let i = [];
  93877. for (let a of r.getTextFormats()) {
  93878. let o = a.underlineStyle, s = a.underlineThickness;
  93879. if (o != "None" && s != "None") {
  93880. let l = `text-decoration: underline ${o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${s == "Thin" ? 1 : 2}px`;
  93881. i.push(Ze.mark({ attributes: { style: l } }).range(this.toEditorPos(a.rangeStart), this.toEditorPos(a.rangeEnd)));
  93882. }
  93883. }
  93884. e.dispatch({ effects: Zae.of(Ze.set(i)) });
  93885. }), n.addEventListener("compositionstart", () => {
  93886. e.inputState.composing < 0 && (e.inputState.composing = 0, e.inputState.compositionFirstChange = !0);
  93887. }), n.addEventListener("compositionend", () => {
  93888. e.inputState.composing = -1, e.inputState.compositionFirstChange = null;
  93889. }), this.measureReq = { read: (r) => {
  93890. this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());
  93891. let i = Um(r.root);
  93892. i && i.rangeCount && this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect());
  93893. } };
  93894. }
  93895. applyEdits(e) {
  93896. let n = 0, r = !1, i = this.pendingContextChange;
  93897. return e.changes.iterChanges((a, o, s, l, u) => {
  93898. if (r)
  93899. return;
  93900. let c = u.length - (o - a);
  93901. if (i && o >= i.to)
  93902. if (i.from == a && i.to == o && i.insert.eq(u)) {
  93903. i = this.pendingContextChange = null, n += c, this.to += c;
  93904. return;
  93905. } else
  93906. i = null, this.revertPending(e.state);
  93907. if (a += n, o += n, o <= this.from)
  93908. this.from += c, this.to += c;
  93909. else if (a < this.to) {
  93910. if (a < this.from || o > this.to || this.to - this.from + u.length > 3e4) {
  93911. r = !0;
  93912. return;
  93913. }
  93914. this.editContext.updateText(this.toContextPos(a), this.toContextPos(o), u.toString()), this.to += c;
  93915. }
  93916. n += c;
  93917. }), i && !r && this.revertPending(e.state), !r;
  93918. }
  93919. update(e) {
  93920. !this.applyEdits(e) || !this.rangeIsValid(e.state) ? (this.pendingContextChange = null, this.resetRange(e.state), this.editContext.updateText(0, this.editContext.text.length, e.state.doc.sliceString(this.from, this.to)), this.setSelection(e.state)) : (e.docChanged || e.selectionSet) && this.setSelection(e.state), (e.geometryChanged || e.docChanged || e.selectionSet) && e.view.requestMeasure(this.measureReq);
  93921. }
  93922. resetRange(e) {
  93923. let { head: n } = e.selection.main;
  93924. this.from = Math.max(
  93925. 0,
  93926. n - 1e4
  93927. /* CxVp.Margin */
  93928. ), this.to = Math.min(
  93929. e.doc.length,
  93930. n + 1e4
  93931. /* CxVp.Margin */
  93932. );
  93933. }
  93934. revertPending(e) {
  93935. let n = this.pendingContextChange;
  93936. this.pendingContextChange = null, this.editContext.updateText(this.toContextPos(n.from), this.toContextPos(n.to + n.insert.length), e.doc.sliceString(n.from, n.to));
  93937. }
  93938. setSelection(e) {
  93939. let { main: n } = e.selection, r = this.toContextPos(Math.max(this.from, Math.min(this.to, n.anchor))), i = this.toContextPos(n.head);
  93940. (this.editContext.selectionStart != r || this.editContext.selectionEnd != i) && this.editContext.updateSelection(r, i);
  93941. }
  93942. rangeIsValid(e) {
  93943. let { head: n } = e.selection.main;
  93944. return !(this.from > 0 && n - this.from < 500 || this.to < e.doc.length && this.to - n < 500 || this.to - this.from > 1e4 * 3);
  93945. }
  93946. toEditorPos(e) {
  93947. return e + this.from;
  93948. }
  93949. toContextPos(e) {
  93950. return e - this.from;
  93951. }
  93952. }
  93953. class De {
  93954. /**
  93955. The current editor state.
  93956. */
  93957. get state() {
  93958. return this.viewState.state;
  93959. }
  93960. /**
  93961. To be able to display large documents without consuming too much
  93962. memory or overloading the browser, CodeMirror only draws the
  93963. code that is visible (plus a margin around it) to the DOM. This
  93964. property tells you the extent of the current drawn viewport, in
  93965. document positions.
  93966. */
  93967. get viewport() {
  93968. return this.viewState.viewport;
  93969. }
  93970. /**
  93971. When there are, for example, large collapsed ranges in the
  93972. viewport, its size can be a lot bigger than the actual visible
  93973. content. Thus, if you are doing something like styling the
  93974. content in the viewport, it is preferable to only do so for
  93975. these ranges, which are the subset of the viewport that is
  93976. actually drawn.
  93977. */
  93978. get visibleRanges() {
  93979. return this.viewState.visibleRanges;
  93980. }
  93981. /**
  93982. Returns false when the editor is entirely scrolled out of view
  93983. or otherwise hidden.
  93984. */
  93985. get inView() {
  93986. return this.viewState.inView;
  93987. }
  93988. /**
  93989. Indicates whether the user is currently composing text via
  93990. [IME](https://en.wikipedia.org/wiki/Input_method), and at least
  93991. one change has been made in the current composition.
  93992. */
  93993. get composing() {
  93994. return this.inputState.composing > 0;
  93995. }
  93996. /**
  93997. Indicates whether the user is currently in composing state. Note
  93998. that on some platforms, like Android, this will be the case a
  93999. lot, since just putting the cursor on a word starts a
  94000. composition there.
  94001. */
  94002. get compositionStarted() {
  94003. return this.inputState.composing >= 0;
  94004. }
  94005. /**
  94006. The document or shadow root that the view lives in.
  94007. */
  94008. get root() {
  94009. return this._root;
  94010. }
  94011. /**
  94012. @internal
  94013. */
  94014. get win() {
  94015. return this.dom.ownerDocument.defaultView || window;
  94016. }
  94017. /**
  94018. Construct a new view. You'll want to either provide a `parent`
  94019. option, or put `view.dom` into your document after creating a
  94020. view, so that the user can see the editor.
  94021. */
  94022. constructor(e = {}) {
  94023. this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom);
  94024. let { dispatch: n } = e;
  94025. this.dispatchTransactions = e.dispatchTransactions || n && ((r) => r.forEach((i) => n(i, this))) || ((r) => this.update(r)), this.dispatch = this.dispatch.bind(this), this._root = e.root || Lat(e.parent) || document, this.viewState = new r9(e.state || At.create(e)), e.scrollTo && e.scrollTo.is(jb) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(Jv).map((r) => new g$(r));
  94026. for (let r of this.plugins)
  94027. r.update(this);
  94028. this.observer = new qot(this), this.inputState = new pot(this), this.inputState.ensureHandlers(this.plugins), this.docView = new zH(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure();
  94029. }
  94030. dispatch(...e) {
  94031. let n = e.length == 1 && e[0] instanceof Fn ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
  94032. this.dispatchTransactions(n, this);
  94033. }
  94034. /**
  94035. Update the view for the given array of transactions. This will
  94036. update the visible document and selection to match the state
  94037. produced by the transactions, and notify view plugins of the
  94038. change. You should usually call
  94039. [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
  94040. as a primitive.
  94041. */
  94042. update(e) {
  94043. if (this.updateState != 0)
  94044. throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
  94045. let n = !1, r = !1, i, a = this.state;
  94046. for (let d of e) {
  94047. if (d.startState != a)
  94048. throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");
  94049. a = d.state;
  94050. }
  94051. if (this.destroyed) {
  94052. this.viewState.state = a;
  94053. return;
  94054. }
  94055. let o = this.hasFocus, s = 0, l = null;
  94056. e.some((d) => d.annotation(soe)) ? (this.inputState.notifiedFocused = o, s = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, l = loe(a, o), l || (s = 1));
  94057. let u = this.observer.delayedAndroidKey, c = null;
  94058. if (u ? (this.observer.clearDelayedAndroidKey(), c = this.observer.readChange(), (c && !this.state.doc.eq(a.doc) || !this.state.selection.eq(a.selection)) && (c = null)) : this.observer.clear(), a.facet(At.phrases) != this.state.facet(At.phrases))
  94059. return this.setState(a);
  94060. i = iS.create(this, a, e), i.flags |= s;
  94061. let f = this.viewState.scrollTarget;
  94062. try {
  94063. this.updateState = 2;
  94064. for (let d of e) {
  94065. if (f && (f = f.map(d.changes)), d.scrollIntoView) {
  94066. let { main: h } = d.state.selection;
  94067. f = new uh(h.empty ? h : me.cursor(h.head, h.head > h.anchor ? -1 : 1));
  94068. }
  94069. for (let h of d.effects)
  94070. h.is(jb) && (f = h.value.clip(this.state));
  94071. }
  94072. this.viewState.update(i, f), this.bidiCache = aS.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), n = this.docView.update(i), this.state.facet(eg) != this.styleModules && this.mountStyles(), r = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((d) => d.isUserEvent("select.pointer")));
  94073. } finally {
  94074. this.updateState = 0;
  94075. }
  94076. if (i.startState.facet(Kb) != i.state.facet(Kb) && (this.viewState.mustMeasureContent = !0), (n || r || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), n && this.docViewUpdate(), !i.empty)
  94077. for (let d of this.state.facet(CM))
  94078. try {
  94079. d(i);
  94080. } catch (h) {
  94081. mi(this.state, h, "update listener");
  94082. }
  94083. (l || c) && Promise.resolve().then(() => {
  94084. l && this.state == l.startState && this.dispatch(l), c && !poe(this, c) && u.force && lh(this.contentDOM, u.key, u.keyCode);
  94085. });
  94086. }
  94087. /**
  94088. Reset the view to the given state. (This will cause the entire
  94089. document to be redrawn and all view plugins to be reinitialized,
  94090. so you should probably only use it when the new state isn't
  94091. derived from the old state. Otherwise, use
  94092. [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
  94093. */
  94094. setState(e) {
  94095. if (this.updateState != 0)
  94096. throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
  94097. if (this.destroyed) {
  94098. this.viewState.state = e;
  94099. return;
  94100. }
  94101. this.updateState = 2;
  94102. let n = this.hasFocus;
  94103. try {
  94104. for (let r of this.plugins)
  94105. r.destroy(this);
  94106. this.viewState = new r9(e), this.plugins = e.facet(Jv).map((r) => new g$(r)), this.pluginMap.clear();
  94107. for (let r of this.plugins)
  94108. r.update(this);
  94109. this.docView.destroy(), this.docView = new zH(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
  94110. } finally {
  94111. this.updateState = 0;
  94112. }
  94113. n && this.focus(), this.requestMeasure();
  94114. }
  94115. updatePlugins(e) {
  94116. let n = e.startState.facet(Jv), r = e.state.facet(Jv);
  94117. if (n != r) {
  94118. let i = [];
  94119. for (let a of r) {
  94120. let o = n.indexOf(a);
  94121. if (o < 0)
  94122. i.push(new g$(a));
  94123. else {
  94124. let s = this.plugins[o];
  94125. s.mustUpdate = e, i.push(s);
  94126. }
  94127. }
  94128. for (let a of this.plugins)
  94129. a.mustUpdate != e && a.destroy(this);
  94130. this.plugins = i, this.pluginMap.clear();
  94131. } else
  94132. for (let i of this.plugins)
  94133. i.mustUpdate = e;
  94134. for (let i = 0; i < this.plugins.length; i++)
  94135. this.plugins[i].update(this);
  94136. n != r && this.inputState.ensureHandlers(this.plugins);
  94137. }
  94138. docViewUpdate() {
  94139. for (let e of this.plugins) {
  94140. let n = e.value;
  94141. if (n && n.docViewUpdate)
  94142. try {
  94143. n.docViewUpdate(this);
  94144. } catch (r) {
  94145. mi(this.state, r, "doc view update listener");
  94146. }
  94147. }
  94148. }
  94149. /**
  94150. @internal
  94151. */
  94152. measure(e = !0) {
  94153. if (this.destroyed)
  94154. return;
  94155. if (this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey) {
  94156. this.measureScheduled = -1, this.requestMeasure();
  94157. return;
  94158. }
  94159. this.measureScheduled = 0, e && this.observer.forceFlush();
  94160. let n = null, r = this.scrollDOM, i = r.scrollTop * this.scaleY, { scrollAnchorPos: a, scrollAnchorHeight: o } = this.viewState;
  94161. Math.abs(i - this.viewState.scrollTop) > 1 && (o = -1), this.viewState.scrollAnchorHeight = -1;
  94162. try {
  94163. for (let s = 0; ; s++) {
  94164. if (o < 0)
  94165. if (Oae(r))
  94166. a = -1, o = this.viewState.heightMap.height;
  94167. else {
  94168. let h = this.viewState.scrollAnchorAt(i);
  94169. a = h.from, o = h.top;
  94170. }
  94171. this.updateState = 1;
  94172. let l = this.viewState.measure(this);
  94173. if (!l && !this.measureRequests.length && this.viewState.scrollTarget == null)
  94174. break;
  94175. if (s > 5) {
  94176. console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
  94177. break;
  94178. }
  94179. let u = [];
  94180. l & 4 || ([this.measureRequests, u] = [u, this.measureRequests]);
  94181. let c = u.map((h) => {
  94182. try {
  94183. return h.read(this);
  94184. } catch (p) {
  94185. return mi(this.state, p), l9;
  94186. }
  94187. }), f = iS.create(this, this.state, []), d = !1;
  94188. f.flags |= l, n ? n.flags |= l : n = f, this.updateState = 2, f.empty || (this.updatePlugins(f), this.inputState.update(f), this.updateAttrs(), d = this.docView.update(f), d && this.docViewUpdate());
  94189. for (let h = 0; h < u.length; h++)
  94190. if (c[h] != l9)
  94191. try {
  94192. let p = u[h];
  94193. p.write && p.write(c[h], this);
  94194. } catch (p) {
  94195. mi(this.state, p);
  94196. }
  94197. if (d && this.docView.updateSelection(!0), !f.viewportChanged && this.measureRequests.length == 0) {
  94198. if (this.viewState.editorHeight)
  94199. if (this.viewState.scrollTarget) {
  94200. this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, o = -1;
  94201. continue;
  94202. } else {
  94203. let p = (a < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(a).top) - o;
  94204. if (p > 1 || p < -1) {
  94205. i = i + p, r.scrollTop = i / this.scaleY, o = -1;
  94206. continue;
  94207. }
  94208. }
  94209. break;
  94210. }
  94211. }
  94212. } finally {
  94213. this.updateState = 0, this.measureScheduled = -1;
  94214. }
  94215. if (n && !n.empty)
  94216. for (let s of this.state.facet(CM))
  94217. s(n);
  94218. }
  94219. /**
  94220. Get the CSS classes for the currently active editor themes.
  94221. */
  94222. get themeClasses() {
  94223. return EM + " " + (this.state.facet(AM) ? doe : foe) + " " + this.state.facet(Kb);
  94224. }
  94225. updateAttrs() {
  94226. let e = u9(this, Uae, {
  94227. class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
  94228. }), n = {
  94229. spellcheck: "false",
  94230. autocorrect: "off",
  94231. autocapitalize: "off",
  94232. translate: "no",
  94233. contenteditable: this.state.facet(El) ? "true" : "false",
  94234. class: "cm-content",
  94235. style: `${Ne.tabSize}: ${this.state.tabSize}`,
  94236. role: "textbox",
  94237. "aria-multiline": "true"
  94238. };
  94239. this.state.readOnly && (n["aria-readonly"] = "true"), u9(this, i4, n);
  94240. let r = this.observer.ignore(() => {
  94241. let i = _M(this.contentDOM, this.contentAttrs, n), a = _M(this.dom, this.editorAttrs, e);
  94242. return i || a;
  94243. });
  94244. return this.editorAttrs = e, this.contentAttrs = n, r;
  94245. }
  94246. showAnnouncements(e) {
  94247. let n = !0;
  94248. for (let r of e)
  94249. for (let i of r.effects)
  94250. if (i.is(De.announce)) {
  94251. n && (this.announceDOM.textContent = ""), n = !1;
  94252. let a = this.announceDOM.appendChild(document.createElement("div"));
  94253. a.textContent = i.value;
  94254. }
  94255. }
  94256. mountStyles() {
  94257. this.styleModules = this.state.facet(eg);
  94258. let e = this.state.facet(De.cspNonce);
  94259. pu.mount(this.root, this.styleModules.concat(Wot).reverse(), e ? { nonce: e } : void 0);
  94260. }
  94261. readMeasured() {
  94262. if (this.updateState == 2)
  94263. throw new Error("Reading the editor layout isn't allowed during an update");
  94264. this.updateState == 0 && this.measureScheduled > -1 && this.measure(!1);
  94265. }
  94266. /**
  94267. Schedule a layout measurement, optionally providing callbacks to
  94268. do custom DOM measuring followed by a DOM write phase. Using
  94269. this is preferable reading DOM layout directly from, for
  94270. example, an event handler, because it'll make sure measuring and
  94271. drawing done by other components is synchronized, avoiding
  94272. unnecessary DOM layout computations.
  94273. */
  94274. requestMeasure(e) {
  94275. if (this.measureScheduled < 0 && (this.measureScheduled = this.win.requestAnimationFrame(() => this.measure())), e) {
  94276. if (this.measureRequests.indexOf(e) > -1)
  94277. return;
  94278. if (e.key != null) {
  94279. for (let n = 0; n < this.measureRequests.length; n++)
  94280. if (this.measureRequests[n].key === e.key) {
  94281. this.measureRequests[n] = e;
  94282. return;
  94283. }
  94284. }
  94285. this.measureRequests.push(e);
  94286. }
  94287. }
  94288. /**
  94289. Get the value of a specific plugin, if present. Note that
  94290. plugins that crash can be dropped from a view, so even when you
  94291. know you registered a given plugin, it is recommended to check
  94292. the return value of this method.
  94293. */
  94294. plugin(e) {
  94295. let n = this.pluginMap.get(e);
  94296. return (n === void 0 || n && n.spec != e) && this.pluginMap.set(e, n = this.plugins.find((r) => r.spec == e) || null), n && n.update(this).value;
  94297. }
  94298. /**
  94299. The top position of the document, in screen coordinates. This
  94300. may be negative when the editor is scrolled down. Points
  94301. directly to the top of the first line, not above the padding.
  94302. */
  94303. get documentTop() {
  94304. return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop;
  94305. }
  94306. /**
  94307. Reports the padding above and below the document.
  94308. */
  94309. get documentPadding() {
  94310. return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom };
  94311. }
  94312. /**
  94313. If the editor is transformed with CSS, this provides the scale
  94314. along the X axis. Otherwise, it will just be 1. Note that
  94315. transforms other than translation and scaling are not supported.
  94316. */
  94317. get scaleX() {
  94318. return this.viewState.scaleX;
  94319. }
  94320. /**
  94321. Provide the CSS transformed scale along the Y axis.
  94322. */
  94323. get scaleY() {
  94324. return this.viewState.scaleY;
  94325. }
  94326. /**
  94327. Find the text line or block widget at the given vertical
  94328. position (which is interpreted as relative to the [top of the
  94329. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
  94330. */
  94331. elementAtHeight(e) {
  94332. return this.readMeasured(), this.viewState.elementAtHeight(e);
  94333. }
  94334. /**
  94335. Find the line block (see
  94336. [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
  94337. height, again interpreted relative to the [top of the
  94338. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
  94339. */
  94340. lineBlockAtHeight(e) {
  94341. return this.readMeasured(), this.viewState.lineBlockAtHeight(e);
  94342. }
  94343. /**
  94344. Get the extent and vertical position of all [line
  94345. blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
  94346. are relative to the [top of the
  94347. document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
  94348. */
  94349. get viewportLineBlocks() {
  94350. return this.viewState.viewportLines;
  94351. }
  94352. /**
  94353. Find the line block around the given document position. A line
  94354. block is a range delimited on both sides by either a
  94355. non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line breaks, or the
  94356. start/end of the document. It will usually just hold a line of
  94357. text, but may be broken into multiple textblocks by block
  94358. widgets.
  94359. */
  94360. lineBlockAt(e) {
  94361. return this.viewState.lineBlockAt(e);
  94362. }
  94363. /**
  94364. The editor's total content height.
  94365. */
  94366. get contentHeight() {
  94367. return this.viewState.contentHeight;
  94368. }
  94369. /**
  94370. Move a cursor position by [grapheme
  94371. cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
  94372. the motion is away from the line start, or towards it. In
  94373. bidirectional text, the line is traversed in visual order, using
  94374. the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
  94375. When the start position was the last one on the line, the
  94376. returned position will be across the line break. If there is no
  94377. further line, the original position is returned.
  94378. By default, this method moves over a single cluster. The
  94379. optional `by` argument can be used to move across more. It will
  94380. be called with the first cluster as argument, and should return
  94381. a predicate that determines, for each subsequent cluster,
  94382. whether it should also be moved over.
  94383. */
  94384. moveByChar(e, n, r) {
  94385. return y$(this, e, GH(this, e, n, r));
  94386. }
  94387. /**
  94388. Move a cursor position across the next group of either
  94389. [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
  94390. non-whitespace characters.
  94391. */
  94392. moveByGroup(e, n) {
  94393. return y$(this, e, GH(this, e, n, (r) => dot(this, e.head, r)));
  94394. }
  94395. /**
  94396. Get the cursor position visually at the start or end of a line.
  94397. Note that this may differ from the _logical_ position at its
  94398. start or end (which is simply at `line.from`/`line.to`) if text
  94399. at the start or end goes against the line's base text direction.
  94400. */
  94401. visualLineSide(e, n) {
  94402. let r = this.bidiSpans(e), i = this.textDirectionAt(e.from), a = r[n ? r.length - 1 : 0];
  94403. return me.cursor(a.side(n, i) + e.from, a.forward(!n, i) ? 1 : -1);
  94404. }
  94405. /**
  94406. Move to the next line boundary in the given direction. If
  94407. `includeWrap` is true, line wrapping is on, and there is a
  94408. further wrap point on the current line, the wrap point will be
  94409. returned. Otherwise this function will return the start or end
  94410. of the line.
  94411. */
  94412. moveToLineBoundary(e, n, r = !0) {
  94413. return fot(this, e, n, r);
  94414. }
  94415. /**
  94416. Move a cursor position vertically. When `distance` isn't given,
  94417. it defaults to moving to the next line (including wrapped
  94418. lines). Otherwise, `distance` should provide a positive distance
  94419. in pixels.
  94420. When `start` has a
  94421. [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
  94422. motion will use that as a target horizontal position. Otherwise,
  94423. the cursor's own horizontal position is used. The returned
  94424. cursor will have its goal column set to whichever column was
  94425. used.
  94426. */
  94427. moveVertically(e, n, r) {
  94428. return y$(this, e, hot(this, e, n, r));
  94429. }
  94430. /**
  94431. Find the DOM parent node and offset (child offset if `node` is
  94432. an element, character offset when it is a text node) at the
  94433. given document position.
  94434. Note that for positions that aren't currently in
  94435. `visibleRanges`, the resulting DOM position isn't necessarily
  94436. meaningful (it may just point before or after a placeholder
  94437. element).
  94438. */
  94439. domAtPos(e) {
  94440. return this.docView.domAtPos(e);
  94441. }
  94442. /**
  94443. Find the document position at the given DOM node. Can be useful
  94444. for associating positions with DOM events. Will raise an error
  94445. when `node` isn't part of the editor content.
  94446. */
  94447. posAtDOM(e, n = 0) {
  94448. return this.docView.posFromDOM(e, n);
  94449. }
  94450. posAtCoords(e, n = !0) {
  94451. return this.readMeasured(), eoe(this, e, n);
  94452. }
  94453. /**
  94454. Get the screen coordinates at the given document position.
  94455. `side` determines whether the coordinates are based on the
  94456. element before (-1) or after (1) the position (if no element is
  94457. available on the given side, the method will transparently use
  94458. another strategy to get reasonable coordinates).
  94459. */
  94460. coordsAtPos(e, n = 1) {
  94461. this.readMeasured();
  94462. let r = this.docView.coordsAt(e, n);
  94463. if (!r || r.left == r.right)
  94464. return r;
  94465. let i = this.state.doc.lineAt(e), a = this.bidiSpans(i), o = a[Hl.find(a, e - i.from, -1, n)];
  94466. return Iw(r, o.dir == pn.LTR == n > 0);
  94467. }
  94468. /**
  94469. Return the rectangle around a given character. If `pos` does not
  94470. point in front of a character that is in the viewport and
  94471. rendered (i.e. not replaced, not a line break), this will return
  94472. null. For space characters that are a line wrap point, this will
  94473. return the position before the line break.
  94474. */
  94475. coordsForChar(e) {
  94476. return this.readMeasured(), this.docView.coordsForChar(e);
  94477. }
  94478. /**
  94479. The default width of a character in the editor. May not
  94480. accurately reflect the width of all characters (given variable
  94481. width fonts or styling of invididual ranges).
  94482. */
  94483. get defaultCharacterWidth() {
  94484. return this.viewState.heightOracle.charWidth;
  94485. }
  94486. /**
  94487. The default height of a line in the editor. May not be accurate
  94488. for all lines.
  94489. */
  94490. get defaultLineHeight() {
  94491. return this.viewState.heightOracle.lineHeight;
  94492. }
  94493. /**
  94494. The text direction
  94495. ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
  94496. CSS property) of the editor's content element.
  94497. */
  94498. get textDirection() {
  94499. return this.viewState.defaultTextDirection;
  94500. }
  94501. /**
  94502. Find the text direction of the block at the given position, as
  94503. assigned by CSS. If
  94504. [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
  94505. isn't enabled, or the given position is outside of the viewport,
  94506. this will always return the same as
  94507. [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
  94508. this may trigger a DOM layout.
  94509. */
  94510. textDirectionAt(e) {
  94511. return !this.state.facet(Hae) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e));
  94512. }
  94513. /**
  94514. Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
  94515. (as determined by the
  94516. [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
  94517. CSS property of its content element).
  94518. */
  94519. get lineWrapping() {
  94520. return this.viewState.heightOracle.lineWrapping;
  94521. }
  94522. /**
  94523. Returns the bidirectional text structure of the given line
  94524. (which should be in the current document) as an array of span
  94525. objects. The order of these spans matches the [text
  94526. direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
  94527. left-to-right, the leftmost spans come first, otherwise the
  94528. rightmost spans come first.
  94529. */
  94530. bidiSpans(e) {
  94531. if (e.length > est)
  94532. return Lae(e.length);
  94533. let n = this.textDirectionAt(e.from), r;
  94534. for (let a of this.bidiCache)
  94535. if (a.from == e.from && a.dir == n && (a.fresh || kae(a.isolates, r = BH(this, e))))
  94536. return a.order;
  94537. r || (r = BH(this, e));
  94538. let i = Xat(e.text, n, r);
  94539. return this.bidiCache.push(new aS(e.from, e.to, n, r, !0, i)), i;
  94540. }
  94541. /**
  94542. Check whether the editor has focus.
  94543. */
  94544. get hasFocus() {
  94545. var e;
  94546. return (this.dom.ownerDocument.hasFocus() || Ne.safari && ((e = this.inputState) === null || e === void 0 ? void 0 : e.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
  94547. }
  94548. /**
  94549. Put focus on the editor.
  94550. */
  94551. focus() {
  94552. this.observer.ignore(() => {
  94553. bae(this.contentDOM), this.docView.updateSelection();
  94554. });
  94555. }
  94556. /**
  94557. Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
  94558. necessary when moving the editor's existing DOM to a new window or shadow root.
  94559. */
  94560. setRoot(e) {
  94561. this._root != e && (this._root = e, this.observer.setWindow((e.nodeType == 9 ? e : e.ownerDocument).defaultView || window), this.mountStyles());
  94562. }
  94563. /**
  94564. Clean up this editor view, removing its element from the
  94565. document, unregistering event handlers, and notifying
  94566. plugins. The view instance can no longer be used after
  94567. calling this.
  94568. */
  94569. destroy() {
  94570. this.root.activeElement == this.contentDOM && this.contentDOM.blur();
  94571. for (let e of this.plugins)
  94572. e.destroy(this);
  94573. this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0;
  94574. }
  94575. /**
  94576. Returns an effect that can be
  94577. [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
  94578. cause it to scroll the given position or range into view.
  94579. */
  94580. static scrollIntoView(e, n = {}) {
  94581. return jb.of(new uh(typeof e == "number" ? me.cursor(e) : e, n.y, n.x, n.yMargin, n.xMargin));
  94582. }
  94583. /**
  94584. Return an effect that resets the editor to its current (at the
  94585. time this method was called) scroll position. Note that this
  94586. only affects the editor's own scrollable element, not parents.
  94587. See also
  94588. [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
  94589. The effect should be used with a document identical to the one
  94590. it was created for. Failing to do so is not an error, but may
  94591. not scroll to the expected position. You can
  94592. [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
  94593. */
  94594. scrollSnapshot() {
  94595. let { scrollTop: e, scrollLeft: n } = this.scrollDOM, r = this.viewState.scrollAnchorAt(e);
  94596. return jb.of(new uh(me.cursor(r.from), "start", "start", r.top - e, n, !0));
  94597. }
  94598. /**
  94599. Enable or disable tab-focus mode, which disables key bindings
  94600. for Tab and Shift-Tab, letting the browser's default
  94601. focus-changing behavior go through instead. This is useful to
  94602. prevent trapping keyboard users in your editor.
  94603. Without argument, this toggles the mode. With a boolean, it
  94604. enables (true) or disables it (false). Given a number, it
  94605. temporarily enables the mode until that number of milliseconds
  94606. have passed or another non-Tab key is pressed.
  94607. */
  94608. setTabFocusMode(e) {
  94609. e == null ? this.inputState.tabFocusMode = this.inputState.tabFocusMode < 0 ? 0 : -1 : typeof e == "boolean" ? this.inputState.tabFocusMode = e ? 0 : -1 : this.inputState.tabFocusMode != 0 && (this.inputState.tabFocusMode = Date.now() + e);
  94610. }
  94611. /**
  94612. Returns an extension that can be used to add DOM event handlers.
  94613. The value should be an object mapping event names to handler
  94614. functions. For any given event, such functions are ordered by
  94615. extension precedence, and the first handler to return true will
  94616. be assumed to have handled that event, and no other handlers or
  94617. built-in behavior will be activated for it. These are registered
  94618. on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
  94619. for `scroll` handlers, which will be called any time the
  94620. editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
  94621. its parent nodes is scrolled.
  94622. */
  94623. static domEventHandlers(e) {
  94624. return kn.define(() => ({}), { eventHandlers: e });
  94625. }
  94626. /**
  94627. Create an extension that registers DOM event observers. Contrary
  94628. to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
  94629. observers can't be prevented from running by a higher-precedence
  94630. handler returning true. They also don't prevent other handlers
  94631. and observers from running when they return true, and should not
  94632. call `preventDefault`.
  94633. */
  94634. static domEventObservers(e) {
  94635. return kn.define(() => ({}), { eventObservers: e });
  94636. }
  94637. /**
  94638. Create a theme extension. The first argument can be a
  94639. [`style-mod`](https://github.com/marijnh/style-mod#documentation)
  94640. style spec providing the styles for the theme. These will be
  94641. prefixed with a generated class for the style.
  94642. Because the selectors will be prefixed with a scope class, rule
  94643. that directly match the editor's [wrapper
  94644. element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
  94645. added—need to be explicitly differentiated by adding an `&` to
  94646. the selector for that element—for example
  94647. `&.cm-focused`.
  94648. When `dark` is set to true, the theme will be marked as dark,
  94649. which will cause the `&dark` rules from [base
  94650. themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
  94651. `&light` when a light theme is active).
  94652. */
  94653. static theme(e, n) {
  94654. let r = pu.newName(), i = [Kb.of(r), eg.of(MM(`.${r}`, e))];
  94655. return n && n.dark && i.push(AM.of(!0)), i;
  94656. }
  94657. /**
  94658. Create an extension that adds styles to the base theme. Like
  94659. with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
  94660. place of the editor wrapper element when directly targeting
  94661. that. You can also use `&dark` or `&light` instead to only
  94662. target editors with a dark or light theme.
  94663. */
  94664. static baseTheme(e) {
  94665. return Eu.lowest(eg.of(MM("." + EM, e, hoe)));
  94666. }
  94667. /**
  94668. Retrieve an editor view instance from the view's DOM
  94669. representation.
  94670. */
  94671. static findFromDOM(e) {
  94672. var n;
  94673. let r = e.querySelector(".cm-content"), i = r && Jt.get(r) || Jt.get(e);
  94674. return ((n = i == null ? void 0 : i.rootView) === null || n === void 0 ? void 0 : n.view) || null;
  94675. }
  94676. }
  94677. De.styleModule = eg;
  94678. De.inputHandler = Wae;
  94679. De.scrollHandler = jae;
  94680. De.focusChangeEffect = Qae;
  94681. De.perLineTextDirection = Hae;
  94682. De.exceptionSink = Fae;
  94683. De.updateListener = CM;
  94684. De.editable = El;
  94685. De.mouseSelectionStyle = Vae;
  94686. De.dragMovesSelection = zae;
  94687. De.clickAddsSelectionRange = Bae;
  94688. De.decorations = Xm;
  94689. De.outerDecorations = Xae;
  94690. De.atomicRanges = a4;
  94691. De.bidiIsolatedRanges = Yae;
  94692. De.scrollMargins = qae;
  94693. De.darkTheme = AM;
  94694. De.cspNonce = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : "" });
  94695. De.contentAttributes = i4;
  94696. De.editorAttributes = Uae;
  94697. De.lineWrapping = /* @__PURE__ */ De.contentAttributes.of({ class: "cm-lineWrapping" });
  94698. De.announce = /* @__PURE__ */ dt.define();
  94699. const est = 4096, l9 = {};
  94700. class aS {
  94701. constructor(e, n, r, i, a, o) {
  94702. this.from = e, this.to = n, this.dir = r, this.isolates = i, this.fresh = a, this.order = o;
  94703. }
  94704. static update(e, n) {
  94705. if (n.empty && !e.some((a) => a.fresh))
  94706. return e;
  94707. let r = [], i = e.length ? e[e.length - 1].dir : pn.LTR;
  94708. for (let a = Math.max(0, e.length - 10); a < e.length; a++) {
  94709. let o = e[a];
  94710. o.dir == i && !n.touchesRange(o.from, o.to) && r.push(new aS(n.mapPos(o.from, 1), n.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order));
  94711. }
  94712. return r;
  94713. }
  94714. }
  94715. function u9(t, e, n) {
  94716. for (let r = t.state.facet(e), i = r.length - 1; i >= 0; i--) {
  94717. let a = r[i], o = typeof a == "function" ? a(t) : a;
  94718. o && bM(o, n);
  94719. }
  94720. return n;
  94721. }
  94722. const tst = Ne.mac ? "mac" : Ne.windows ? "win" : Ne.linux ? "linux" : "key";
  94723. function nst(t, e) {
  94724. const n = t.split(/-(?!$)/);
  94725. let r = n[n.length - 1];
  94726. r == "Space" && (r = " ");
  94727. let i, a, o, s;
  94728. for (let l = 0; l < n.length - 1; ++l) {
  94729. const u = n[l];
  94730. if (/^(cmd|meta|m)$/i.test(u))
  94731. s = !0;
  94732. else if (/^a(lt)?$/i.test(u))
  94733. i = !0;
  94734. else if (/^(c|ctrl|control)$/i.test(u))
  94735. a = !0;
  94736. else if (/^s(hift)?$/i.test(u))
  94737. o = !0;
  94738. else if (/^mod$/i.test(u))
  94739. e == "mac" ? s = !0 : a = !0;
  94740. else
  94741. throw new Error("Unrecognized modifier name: " + u);
  94742. }
  94743. return i && (r = "Alt-" + r), a && (r = "Ctrl-" + r), s && (r = "Meta-" + r), o && (r = "Shift-" + r), r;
  94744. }
  94745. function Jb(t, e, n) {
  94746. return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n !== !1 && e.shiftKey && (t = "Shift-" + t), t;
  94747. }
  94748. const rst = /* @__PURE__ */ Eu.default(/* @__PURE__ */ De.domEventHandlers({
  94749. keydown(t, e) {
  94750. return moe(goe(e.state), t, e, "editor");
  94751. }
  94752. })), oy = /* @__PURE__ */ Be.define({ enables: rst }), c9 = /* @__PURE__ */ new WeakMap();
  94753. function goe(t) {
  94754. let e = t.facet(oy), n = c9.get(e);
  94755. return n || c9.set(e, n = ost(e.reduce((r, i) => r.concat(i), []))), n;
  94756. }
  94757. function ist(t, e, n) {
  94758. return moe(goe(t.state), e, t, n);
  94759. }
  94760. let Ml = null;
  94761. const ast = 4e3;
  94762. function ost(t, e = tst) {
  94763. let n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), i = (o, s) => {
  94764. let l = r[o];
  94765. if (l == null)
  94766. r[o] = s;
  94767. else if (l != s)
  94768. throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix");
  94769. }, a = (o, s, l, u, c) => {
  94770. var f, d;
  94771. let h = n[o] || (n[o] = /* @__PURE__ */ Object.create(null)), p = s.split(/ (?!$)/).map((m) => nst(m, e));
  94772. for (let m = 1; m < p.length; m++) {
  94773. let y = p.slice(0, m).join(" ");
  94774. i(y, !0), h[y] || (h[y] = {
  94775. preventDefault: !0,
  94776. stopPropagation: !1,
  94777. run: [(b) => {
  94778. let _ = Ml = { view: b, prefix: y, scope: o };
  94779. return setTimeout(() => {
  94780. Ml == _ && (Ml = null);
  94781. }, ast), !0;
  94782. }]
  94783. });
  94784. }
  94785. let v = p.join(" ");
  94786. i(v, !1);
  94787. let g = h[v] || (h[v] = {
  94788. preventDefault: !1,
  94789. stopPropagation: !1,
  94790. run: ((d = (f = h._any) === null || f === void 0 ? void 0 : f.run) === null || d === void 0 ? void 0 : d.slice()) || []
  94791. });
  94792. l && g.run.push(l), u && (g.preventDefault = !0), c && (g.stopPropagation = !0);
  94793. };
  94794. for (let o of t) {
  94795. let s = o.scope ? o.scope.split(" ") : ["editor"];
  94796. if (o.any)
  94797. for (let u of s) {
  94798. let c = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
  94799. c._any || (c._any = { preventDefault: !1, stopPropagation: !1, run: [] });
  94800. let { any: f } = o;
  94801. for (let d in c)
  94802. c[d].run.push((h) => f(h, IM));
  94803. }
  94804. let l = o[e] || o.key;
  94805. if (l)
  94806. for (let u of s)
  94807. a(u, l, o.run, o.preventDefault, o.stopPropagation), o.shift && a(u, "Shift-" + l, o.shift, o.preventDefault, o.stopPropagation);
  94808. }
  94809. return n;
  94810. }
  94811. let IM = null;
  94812. function moe(t, e, n, r) {
  94813. IM = e;
  94814. let i = Eat(e), a = gr(i, 0), o = ga(a) == i.length && i != " ", s = "", l = !1, u = !1, c = !1;
  94815. Ml && Ml.view == n && Ml.scope == r && (s = Ml.prefix + " ", noe.indexOf(e.keyCode) < 0 && (u = !0, Ml = null));
  94816. let f = /* @__PURE__ */ new Set(), d = (g) => {
  94817. if (g) {
  94818. for (let m of g.run)
  94819. if (!f.has(m) && (f.add(m), m(n)))
  94820. return g.stopPropagation && (c = !0), !0;
  94821. g.preventDefault && (g.stopPropagation && (c = !0), u = !0);
  94822. }
  94823. return !1;
  94824. }, h = t[r], p, v;
  94825. return h && (d(h[s + Jb(i, e, !o)]) ? l = !0 : o && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
  94826. !(Ne.windows && e.ctrlKey && e.altKey) && (p = vu[e.keyCode]) && p != i ? (d(h[s + Jb(p, e, !0)]) || e.shiftKey && (v = Zm[e.keyCode]) != i && v != p && d(h[s + Jb(v, e, !1)])) && (l = !0) : o && e.shiftKey && d(h[s + Jb(i, e, !0)]) && (l = !0), !l && d(h._any) && (l = !0)), u && (l = !0), l && c && e.stopPropagation(), IM = null, l;
  94827. }
  94828. class sy {
  94829. /**
  94830. Create a marker with the given class and dimensions. If `width`
  94831. is null, the DOM element will get no width style.
  94832. */
  94833. constructor(e, n, r, i, a) {
  94834. this.className = e, this.left = n, this.top = r, this.width = i, this.height = a;
  94835. }
  94836. draw() {
  94837. let e = document.createElement("div");
  94838. return e.className = this.className, this.adjust(e), e;
  94839. }
  94840. update(e, n) {
  94841. return n.className != this.className ? !1 : (this.adjust(e), !0);
  94842. }
  94843. adjust(e) {
  94844. e.style.left = this.left + "px", e.style.top = this.top + "px", this.width != null && (e.style.width = this.width + "px"), e.style.height = this.height + "px";
  94845. }
  94846. eq(e) {
  94847. return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className;
  94848. }
  94849. /**
  94850. Create a set of rectangles for the given selection range,
  94851. assigning them theclass`className`. Will create a single
  94852. rectangle for empty ranges, and a set of selection-style
  94853. rectangles covering the range's content (in a bidi-aware
  94854. way) for non-empty ones.
  94855. */
  94856. static forRange(e, n, r) {
  94857. if (r.empty) {
  94858. let i = e.coordsAtPos(r.head, r.assoc || 1);
  94859. if (!i)
  94860. return [];
  94861. let a = yoe(e);
  94862. return [new sy(n, i.left - a.left, i.top - a.top, null, i.bottom - i.top)];
  94863. } else
  94864. return sst(e, n, r);
  94865. }
  94866. }
  94867. function yoe(t) {
  94868. let e = t.scrollDOM.getBoundingClientRect();
  94869. return { left: (t.textDirection == pn.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY };
  94870. }
  94871. function f9(t, e, n, r) {
  94872. let i = t.coordsAtPos(e, n * 2);
  94873. if (!i)
  94874. return r;
  94875. let a = t.dom.getBoundingClientRect(), o = (i.top + i.bottom) / 2, s = t.posAtCoords({ x: a.left + 1, y: o }), l = t.posAtCoords({ x: a.right - 1, y: o });
  94876. return s == null || l == null ? r : { from: Math.max(r.from, Math.min(s, l)), to: Math.min(r.to, Math.max(s, l)) };
  94877. }
  94878. function sst(t, e, n) {
  94879. if (n.to <= t.viewport.from || n.from >= t.viewport.to)
  94880. return [];
  94881. let r = Math.max(n.from, t.viewport.from), i = Math.min(n.to, t.viewport.to), a = t.textDirection == pn.LTR, o = t.contentDOM, s = o.getBoundingClientRect(), l = yoe(t), u = o.querySelector(".cm-line"), c = u && window.getComputedStyle(u), f = s.left + (c ? parseInt(c.paddingLeft) + Math.min(0, parseInt(c.textIndent)) : 0), d = s.right - (c ? parseInt(c.paddingRight) : 0), h = PM(t, r), p = PM(t, i), v = h.type == Jr.Text ? h : null, g = p.type == Jr.Text ? p : null;
  94882. if (v && (t.lineWrapping || h.widgetLineBreaks) && (v = f9(t, r, 1, v)), g && (t.lineWrapping || p.widgetLineBreaks) && (g = f9(t, i, -1, g)), v && g && v.from == g.from && v.to == g.to)
  94883. return y(b(n.from, n.to, v));
  94884. {
  94885. let O = v ? b(n.from, null, v) : _(h, !1), S = g ? b(null, n.to, g) : _(p, !0), x = [];
  94886. return (v || h).to < (g || p).from - (v && g ? 1 : 0) || h.widgetLineBreaks > 1 && O.bottom + t.defaultLineHeight / 2 < S.top ? x.push(m(f, O.bottom, d, S.top)) : O.bottom < S.top && t.elementAtHeight((O.bottom + S.top) / 2).type == Jr.Text && (O.bottom = S.top = (O.bottom + S.top) / 2), y(O).concat(x).concat(y(S));
  94887. }
  94888. function m(O, S, x, C) {
  94889. return new sy(
  94890. e,
  94891. O - l.left,
  94892. S - l.top - 0.01,
  94893. x - O,
  94894. C - S + 0.01
  94895. /* C.Epsilon */
  94896. );
  94897. }
  94898. function y({ top: O, bottom: S, horizontal: x }) {
  94899. let C = [];
  94900. for (let T = 0; T < x.length; T += 2)
  94901. C.push(m(x[T], O, x[T + 1], S));
  94902. return C;
  94903. }
  94904. function b(O, S, x) {
  94905. let C = 1e9, T = -1e9, w = [];
  94906. function P(D, E, R, N, V) {
  94907. let z = t.coordsAtPos(D, D == x.to ? -2 : 2), W = t.coordsAtPos(R, R == x.from ? 2 : -2);
  94908. !z || !W || (C = Math.min(z.top, W.top, C), T = Math.max(z.bottom, W.bottom, T), V == pn.LTR ? w.push(a && E ? f : z.left, a && N ? d : W.right) : w.push(!a && N ? f : W.left, !a && E ? d : z.right));
  94909. }
  94910. let $ = O ?? x.from, A = S ?? x.to;
  94911. for (let D of t.visibleRanges)
  94912. if (D.to > $ && D.from < A)
  94913. for (let E = Math.max(D.from, $), R = Math.min(D.to, A); ; ) {
  94914. let N = t.state.doc.lineAt(E);
  94915. for (let V of t.bidiSpans(N)) {
  94916. let z = V.from + N.from, W = V.to + N.from;
  94917. if (z >= R)
  94918. break;
  94919. W > E && P(Math.max(z, E), O == null && z <= $, Math.min(W, R), S == null && W >= A, V.dir);
  94920. }
  94921. if (E = N.to + 1, E >= R)
  94922. break;
  94923. }
  94924. return w.length == 0 && P($, O == null, A, S == null, t.textDirection), { top: C, bottom: T, horizontal: w };
  94925. }
  94926. function _(O, S) {
  94927. let x = s.top + (S ? O.top : O.bottom);
  94928. return { top: x, bottom: x, horizontal: [] };
  94929. }
  94930. }
  94931. function lst(t, e) {
  94932. return t.constructor == e.constructor && t.eq(e);
  94933. }
  94934. class ust {
  94935. constructor(e, n) {
  94936. this.view = e, this.layer = n, this.drawn = [], this.scaleX = 1, this.scaleY = 1, this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }, this.dom = e.scrollDOM.appendChild(document.createElement("div")), this.dom.classList.add("cm-layer"), n.above && this.dom.classList.add("cm-layer-above"), n.class && this.dom.classList.add(n.class), this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), n.mount && n.mount(this.dom, e);
  94937. }
  94938. update(e) {
  94939. e.startState.facet(s1) != e.state.facet(s1) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq));
  94940. }
  94941. docViewUpdate(e) {
  94942. this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq);
  94943. }
  94944. setOrder(e) {
  94945. let n = 0, r = e.facet(s1);
  94946. for (; n < r.length && r[n] != this.layer; )
  94947. n++;
  94948. this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - n);
  94949. }
  94950. measure() {
  94951. return this.layer.markers(this.view);
  94952. }
  94953. scale() {
  94954. let { scaleX: e, scaleY: n } = this.view;
  94955. (e != this.scaleX || n != this.scaleY) && (this.scaleX = e, this.scaleY = n, this.dom.style.transform = `scale(${1 / e}, ${1 / n})`);
  94956. }
  94957. draw(e) {
  94958. if (e.length != this.drawn.length || e.some((n, r) => !lst(n, this.drawn[r]))) {
  94959. let n = this.dom.firstChild, r = 0;
  94960. for (let i of e)
  94961. i.update && n && i.constructor && this.drawn[r].constructor && i.update(n, this.drawn[r]) ? (n = n.nextSibling, r++) : this.dom.insertBefore(i.draw(), n);
  94962. for (; n; ) {
  94963. let i = n.nextSibling;
  94964. n.remove(), n = i;
  94965. }
  94966. this.drawn = e;
  94967. }
  94968. }
  94969. destroy() {
  94970. this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
  94971. }
  94972. }
  94973. const s1 = /* @__PURE__ */ Be.define();
  94974. function boe(t) {
  94975. return [
  94976. kn.define((e) => new ust(e, t)),
  94977. s1.of(t)
  94978. ];
  94979. }
  94980. const _oe = !Ne.ios, Ym = /* @__PURE__ */ Be.define({
  94981. combine(t) {
  94982. return fs(t, {
  94983. cursorBlinkRate: 1200,
  94984. drawRangeCursor: !0
  94985. }, {
  94986. cursorBlinkRate: (e, n) => Math.min(e, n),
  94987. drawRangeCursor: (e, n) => e || n
  94988. });
  94989. }
  94990. });
  94991. function cst(t = {}) {
  94992. return [
  94993. Ym.of(t),
  94994. fst,
  94995. dst,
  94996. hst,
  94997. Gae.of(!0)
  94998. ];
  94999. }
  95000. function Ooe(t) {
  95001. return t.startState.facet(Ym) != t.state.facet(Ym);
  95002. }
  95003. const fst = /* @__PURE__ */ boe({
  95004. above: !0,
  95005. markers(t) {
  95006. let { state: e } = t, n = e.facet(Ym), r = [];
  95007. for (let i of e.selection.ranges) {
  95008. let a = i == e.selection.main;
  95009. if (i.empty ? !a || _oe : n.drawRangeCursor) {
  95010. let o = a ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", s = i.empty ? i : me.cursor(i.head, i.head > i.anchor ? -1 : 1);
  95011. for (let l of sy.forRange(t, o, s))
  95012. r.push(l);
  95013. }
  95014. }
  95015. return r;
  95016. },
  95017. update(t, e) {
  95018. t.transactions.some((r) => r.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink");
  95019. let n = Ooe(t);
  95020. return n && d9(t.state, e), t.docChanged || t.selectionSet || n;
  95021. },
  95022. mount(t, e) {
  95023. d9(e.state, t);
  95024. },
  95025. class: "cm-cursorLayer"
  95026. });
  95027. function d9(t, e) {
  95028. e.style.animationDuration = t.facet(Ym).cursorBlinkRate + "ms";
  95029. }
  95030. const dst = /* @__PURE__ */ boe({
  95031. above: !1,
  95032. markers(t) {
  95033. return t.state.selection.ranges.map((e) => e.empty ? [] : sy.forRange(t, "cm-selectionBackground", e)).reduce((e, n) => e.concat(n));
  95034. },
  95035. update(t, e) {
  95036. return t.docChanged || t.selectionSet || t.viewportChanged || Ooe(t);
  95037. },
  95038. class: "cm-selectionLayer"
  95039. }), DM = {
  95040. ".cm-line": {
  95041. "& ::selection, &::selection": { backgroundColor: "transparent !important" }
  95042. },
  95043. ".cm-content": {
  95044. "& :focus": {
  95045. caretColor: "initial !important",
  95046. "&::selection, & ::selection": {
  95047. backgroundColor: "Highlight !important"
  95048. }
  95049. }
  95050. }
  95051. };
  95052. _oe && (DM[".cm-line"].caretColor = DM[".cm-content"].caretColor = "transparent !important");
  95053. const hst = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.theme(DM)), Soe = /* @__PURE__ */ dt.define({
  95054. map(t, e) {
  95055. return t == null ? null : e.mapPos(t);
  95056. }
  95057. }), rg = /* @__PURE__ */ ur.define({
  95058. create() {
  95059. return null;
  95060. },
  95061. update(t, e) {
  95062. return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((n, r) => r.is(Soe) ? r.value : n, t);
  95063. }
  95064. }), pst = /* @__PURE__ */ kn.fromClass(class {
  95065. constructor(t) {
  95066. this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
  95067. }
  95068. update(t) {
  95069. var e;
  95070. let n = t.state.field(rg);
  95071. n == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(rg) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
  95072. }
  95073. readPos() {
  95074. let { view: t } = this, e = t.state.field(rg), n = e != null && t.coordsAtPos(e);
  95075. if (!n)
  95076. return null;
  95077. let r = t.scrollDOM.getBoundingClientRect();
  95078. return {
  95079. left: n.left - r.left + t.scrollDOM.scrollLeft * t.scaleX,
  95080. top: n.top - r.top + t.scrollDOM.scrollTop * t.scaleY,
  95081. height: n.bottom - n.top
  95082. };
  95083. }
  95084. drawCursor(t) {
  95085. if (this.cursor) {
  95086. let { scaleX: e, scaleY: n } = this.view;
  95087. t ? (this.cursor.style.left = t.left / e + "px", this.cursor.style.top = t.top / n + "px", this.cursor.style.height = t.height / n + "px") : this.cursor.style.left = "-100000px";
  95088. }
  95089. }
  95090. destroy() {
  95091. this.cursor && this.cursor.remove();
  95092. }
  95093. setDropPos(t) {
  95094. this.view.state.field(rg) != t && this.view.dispatch({ effects: Soe.of(t) });
  95095. }
  95096. }, {
  95097. eventObservers: {
  95098. dragover(t) {
  95099. this.setDropPos(this.view.posAtCoords({ x: t.clientX, y: t.clientY }));
  95100. },
  95101. dragleave(t) {
  95102. (t.target == this.view.contentDOM || !this.view.contentDOM.contains(t.relatedTarget)) && this.setDropPos(null);
  95103. },
  95104. dragend() {
  95105. this.setDropPos(null);
  95106. },
  95107. drop() {
  95108. this.setDropPos(null);
  95109. }
  95110. }
  95111. });
  95112. function vst() {
  95113. return [rg, pst];
  95114. }
  95115. function h9(t, e, n, r, i) {
  95116. e.lastIndex = 0;
  95117. for (let a = t.iterRange(n, r), o = n, s; !a.next().done; o += a.value.length)
  95118. if (!a.lineBreak)
  95119. for (; s = e.exec(a.value); )
  95120. i(o + s.index, s);
  95121. }
  95122. function gst(t, e) {
  95123. let n = t.visibleRanges;
  95124. if (n.length == 1 && n[0].from == t.viewport.from && n[0].to == t.viewport.to)
  95125. return n;
  95126. let r = [];
  95127. for (let { from: i, to: a } of n)
  95128. i = Math.max(t.state.doc.lineAt(i).from, i - e), a = Math.min(t.state.doc.lineAt(a).to, a + e), r.length && r[r.length - 1].to >= i ? r[r.length - 1].to = a : r.push({ from: i, to: a });
  95129. return r;
  95130. }
  95131. class mst {
  95132. /**
  95133. Create a decorator.
  95134. */
  95135. constructor(e) {
  95136. const { regexp: n, decoration: r, decorate: i, boundary: a, maxLength: o = 1e3 } = e;
  95137. if (!n.global)
  95138. throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
  95139. if (this.regexp = n, i)
  95140. this.addMatch = (s, l, u, c) => i(c, u, u + s[0].length, s, l);
  95141. else if (typeof r == "function")
  95142. this.addMatch = (s, l, u, c) => {
  95143. let f = r(s, l, u);
  95144. f && c(u, u + s[0].length, f);
  95145. };
  95146. else if (r)
  95147. this.addMatch = (s, l, u, c) => c(u, u + s[0].length, r);
  95148. else
  95149. throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
  95150. this.boundary = a, this.maxLength = o;
  95151. }
  95152. /**
  95153. Compute the full set of decorations for matches in the given
  95154. view's viewport. You'll want to call this when initializing your
  95155. plugin.
  95156. */
  95157. createDeco(e) {
  95158. let n = new hu(), r = n.add.bind(n);
  95159. for (let { from: i, to: a } of gst(e, this.maxLength))
  95160. h9(e.state.doc, this.regexp, i, a, (o, s) => this.addMatch(s, e, o, r));
  95161. return n.finish();
  95162. }
  95163. /**
  95164. Update a set of decorations for a view update. `deco` _must_ be
  95165. the set of decorations produced by _this_ `MatchDecorator` for
  95166. the view state before the update.
  95167. */
  95168. updateDeco(e, n) {
  95169. let r = 1e9, i = -1;
  95170. return e.docChanged && e.changes.iterChanges((a, o, s, l) => {
  95171. l > e.view.viewport.from && s < e.view.viewport.to && (r = Math.min(s, r), i = Math.max(l, i));
  95172. }), e.viewportChanged || i - r > 1e3 ? this.createDeco(e.view) : i > -1 ? this.updateRange(e.view, n.map(e.changes), r, i) : n;
  95173. }
  95174. updateRange(e, n, r, i) {
  95175. for (let a of e.visibleRanges) {
  95176. let o = Math.max(a.from, r), s = Math.min(a.to, i);
  95177. if (s > o) {
  95178. let l = e.state.doc.lineAt(o), u = l.to < s ? e.state.doc.lineAt(s) : l, c = Math.max(a.from, l.from), f = Math.min(a.to, u.to);
  95179. if (this.boundary) {
  95180. for (; o > l.from; o--)
  95181. if (this.boundary.test(l.text[o - 1 - l.from])) {
  95182. c = o;
  95183. break;
  95184. }
  95185. for (; s < u.to; s++)
  95186. if (this.boundary.test(u.text[s - u.from])) {
  95187. f = s;
  95188. break;
  95189. }
  95190. }
  95191. let d = [], h, p = (v, g, m) => d.push(m.range(v, g));
  95192. if (l == u)
  95193. for (this.regexp.lastIndex = c - l.from; (h = this.regexp.exec(l.text)) && h.index < f - l.from; )
  95194. this.addMatch(h, e, h.index + l.from, p);
  95195. else
  95196. h9(e.state.doc, this.regexp, c, f, (v, g) => this.addMatch(g, e, v, p));
  95197. n = n.update({ filterFrom: c, filterTo: f, filter: (v, g) => v < c || g > f, add: d });
  95198. }
  95199. }
  95200. return n;
  95201. }
  95202. }
  95203. const RM = /x/.unicode != null ? "gu" : "g", yst = /* @__PURE__ */ new RegExp(`[\0-\b
  95204. --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`, RM), bst = {
  95205. 0: "null",
  95206. 7: "bell",
  95207. 8: "backspace",
  95208. 10: "newline",
  95209. 11: "vertical tab",
  95210. 13: "carriage return",
  95211. 27: "escape",
  95212. 8203: "zero width space",
  95213. 8204: "zero width non-joiner",
  95214. 8205: "zero width joiner",
  95215. 8206: "left-to-right mark",
  95216. 8207: "right-to-left mark",
  95217. 8232: "line separator",
  95218. 8237: "left-to-right override",
  95219. 8238: "right-to-left override",
  95220. 8294: "left-to-right isolate",
  95221. 8295: "right-to-left isolate",
  95222. 8297: "pop directional isolate",
  95223. 8233: "paragraph separator",
  95224. 65279: "zero width no-break space",
  95225. 65532: "object replacement"
  95226. };
  95227. let O$ = null;
  95228. function _st() {
  95229. var t;
  95230. if (O$ == null && typeof document < "u" && document.body) {
  95231. let e = document.body.style;
  95232. O$ = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null;
  95233. }
  95234. return O$ || !1;
  95235. }
  95236. const l1 = /* @__PURE__ */ Be.define({
  95237. combine(t) {
  95238. let e = fs(t, {
  95239. render: null,
  95240. specialChars: yst,
  95241. addSpecialChars: null
  95242. });
  95243. return (e.replaceTabs = !_st()) && (e.specialChars = new RegExp(" |" + e.specialChars.source, RM)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, RM)), e;
  95244. }
  95245. });
  95246. function Ost(t = {}) {
  95247. return [l1.of(t), Sst()];
  95248. }
  95249. let p9 = null;
  95250. function Sst() {
  95251. return p9 || (p9 = kn.fromClass(class {
  95252. constructor(t) {
  95253. this.view = t, this.decorations = Ze.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(l1)), this.decorations = this.decorator.createDeco(t);
  95254. }
  95255. makeDecorator(t) {
  95256. return new mst({
  95257. regexp: t.specialChars,
  95258. decoration: (e, n, r) => {
  95259. let { doc: i } = n.state, a = gr(e[0], 0);
  95260. if (a == 9) {
  95261. let o = i.lineAt(r), s = n.state.tabSize, l = Rp(o.text, s, r - o.from);
  95262. return Ze.replace({
  95263. widget: new Tst((s - l % s) * this.view.defaultCharacterWidth / this.view.scaleX)
  95264. });
  95265. }
  95266. return this.decorationCache[a] || (this.decorationCache[a] = Ze.replace({ widget: new Cst(t, a) }));
  95267. },
  95268. boundary: t.replaceTabs ? void 0 : /[^]/
  95269. });
  95270. }
  95271. update(t) {
  95272. let e = t.state.facet(l1);
  95273. t.startState.facet(l1) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations);
  95274. }
  95275. }, {
  95276. decorations: (t) => t.decorations
  95277. }));
  95278. }
  95279. const xst = "•";
  95280. function wst(t) {
  95281. return t >= 32 ? xst : t == 10 ? "␤" : String.fromCharCode(9216 + t);
  95282. }
  95283. class Cst extends ds {
  95284. constructor(e, n) {
  95285. super(), this.options = e, this.code = n;
  95286. }
  95287. eq(e) {
  95288. return e.code == this.code;
  95289. }
  95290. toDOM(e) {
  95291. let n = wst(this.code), r = e.state.phrase("Control character") + " " + (bst[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, r, n);
  95292. if (i)
  95293. return i;
  95294. let a = document.createElement("span");
  95295. return a.textContent = n, a.title = r, a.setAttribute("aria-label", r), a.className = "cm-specialChar", a;
  95296. }
  95297. ignoreEvent() {
  95298. return !1;
  95299. }
  95300. }
  95301. class Tst extends ds {
  95302. constructor(e) {
  95303. super(), this.width = e;
  95304. }
  95305. eq(e) {
  95306. return e.width == this.width;
  95307. }
  95308. toDOM() {
  95309. let e = document.createElement("span");
  95310. return e.textContent = " ", e.className = "cm-tab", e.style.width = this.width + "px", e;
  95311. }
  95312. ignoreEvent() {
  95313. return !1;
  95314. }
  95315. }
  95316. function Pst() {
  95317. return Ast;
  95318. }
  95319. const $st = /* @__PURE__ */ Ze.line({ class: "cm-activeLine" }), Ast = /* @__PURE__ */ kn.fromClass(class {
  95320. constructor(t) {
  95321. this.decorations = this.getDeco(t);
  95322. }
  95323. update(t) {
  95324. (t.docChanged || t.selectionSet) && (this.decorations = this.getDeco(t.view));
  95325. }
  95326. getDeco(t) {
  95327. let e = -1, n = [];
  95328. for (let r of t.state.selection.ranges) {
  95329. let i = t.lineBlockAt(r.head);
  95330. i.from > e && (n.push($st.range(i.from)), e = i.from);
  95331. }
  95332. return Ze.set(n);
  95333. }
  95334. }, {
  95335. decorations: (t) => t.decorations
  95336. });
  95337. class Est extends ds {
  95338. constructor(e) {
  95339. super(), this.content = e;
  95340. }
  95341. toDOM() {
  95342. let e = document.createElement("span");
  95343. return e.className = "cm-placeholder", e.style.pointerEvents = "none", e.appendChild(typeof this.content == "string" ? document.createTextNode(this.content) : this.content), typeof this.content == "string" ? e.setAttribute("aria-label", "placeholder " + this.content) : e.setAttribute("aria-hidden", "true"), e;
  95344. }
  95345. coordsAt(e) {
  95346. let n = e.firstChild ? Uh(e.firstChild) : [];
  95347. if (!n.length)
  95348. return null;
  95349. let r = window.getComputedStyle(e.parentNode), i = Iw(n[0], r.direction != "rtl"), a = parseInt(r.lineHeight);
  95350. return i.bottom - i.top > a * 1.5 ? { left: i.left, right: i.right, top: i.top, bottom: i.top + a } : i;
  95351. }
  95352. ignoreEvent() {
  95353. return !1;
  95354. }
  95355. }
  95356. function Mst(t) {
  95357. return kn.fromClass(class {
  95358. constructor(e) {
  95359. this.view = e, this.placeholder = t ? Ze.set([Ze.widget({ widget: new Est(t), side: 1 }).range(0)]) : Ze.none;
  95360. }
  95361. get decorations() {
  95362. return this.view.state.doc.length ? Ze.none : this.placeholder;
  95363. }
  95364. }, { decorations: (e) => e.decorations });
  95365. }
  95366. const kM = 2e3;
  95367. function Ist(t, e, n) {
  95368. let r = Math.min(e.line, n.line), i = Math.max(e.line, n.line), a = [];
  95369. if (e.off > kM || n.off > kM || e.col < 0 || n.col < 0) {
  95370. let o = Math.min(e.off, n.off), s = Math.max(e.off, n.off);
  95371. for (let l = r; l <= i; l++) {
  95372. let u = t.doc.line(l);
  95373. u.length <= s && a.push(me.range(u.from + o, u.to + s));
  95374. }
  95375. } else {
  95376. let o = Math.min(e.col, n.col), s = Math.max(e.col, n.col);
  95377. for (let l = r; l <= i; l++) {
  95378. let u = t.doc.line(l), c = dM(u.text, o, t.tabSize, !0);
  95379. if (c < 0)
  95380. a.push(me.cursor(u.to));
  95381. else {
  95382. let f = dM(u.text, s, t.tabSize);
  95383. a.push(me.range(u.from + c, u.from + f));
  95384. }
  95385. }
  95386. }
  95387. return a;
  95388. }
  95389. function Dst(t, e) {
  95390. let n = t.coordsAtPos(t.viewport.from);
  95391. return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
  95392. }
  95393. function v9(t, e) {
  95394. let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), i = n - r.from, a = i > kM ? -1 : i == r.length ? Dst(t, e.clientX) : Rp(r.text, t.state.tabSize, n - r.from);
  95395. return { line: r.number, col: a, off: i };
  95396. }
  95397. function Rst(t, e) {
  95398. let n = v9(t, e), r = t.state.selection;
  95399. return n ? {
  95400. update(i) {
  95401. if (i.docChanged) {
  95402. let a = i.changes.mapPos(i.startState.doc.line(n.line).from), o = i.state.doc.lineAt(a);
  95403. n = { line: o.number, col: n.col, off: Math.min(n.off, o.length) }, r = r.map(i.changes);
  95404. }
  95405. },
  95406. get(i, a, o) {
  95407. let s = v9(t, i);
  95408. if (!s)
  95409. return r;
  95410. let l = Ist(t.state, n, s);
  95411. return l.length ? o ? me.create(l.concat(r.ranges)) : me.create(l) : r;
  95412. }
  95413. } : null;
  95414. }
  95415. function kst(t) {
  95416. let e = (n) => n.altKey && n.button == 0;
  95417. return De.mouseSelectionStyle.of((n, r) => e(r) ? Rst(n, r) : null);
  95418. }
  95419. const Lst = {
  95420. Alt: [18, (t) => !!t.altKey],
  95421. Control: [17, (t) => !!t.ctrlKey],
  95422. Shift: [16, (t) => !!t.shiftKey],
  95423. Meta: [91, (t) => !!t.metaKey]
  95424. }, Nst = { style: "cursor: crosshair" };
  95425. function Bst(t = {}) {
  95426. let [e, n] = Lst[t.key || "Alt"], r = kn.fromClass(class {
  95427. constructor(i) {
  95428. this.view = i, this.isDown = !1;
  95429. }
  95430. set(i) {
  95431. this.isDown != i && (this.isDown = i, this.view.update([]));
  95432. }
  95433. }, {
  95434. eventObservers: {
  95435. keydown(i) {
  95436. this.set(i.keyCode == e || n(i));
  95437. },
  95438. keyup(i) {
  95439. (i.keyCode == e || !n(i)) && this.set(!1);
  95440. },
  95441. mousemove(i) {
  95442. this.set(n(i));
  95443. }
  95444. }
  95445. });
  95446. return [
  95447. r,
  95448. De.contentAttributes.of((i) => {
  95449. var a;
  95450. return !((a = i.plugin(r)) === null || a === void 0) && a.isDown ? Nst : null;
  95451. })
  95452. ];
  95453. }
  95454. const Av = "-10000px";
  95455. class xoe {
  95456. constructor(e, n, r, i) {
  95457. this.facet = n, this.createTooltipView = r, this.removeTooltipView = i, this.input = e.state.facet(n), this.tooltips = this.input.filter((o) => o);
  95458. let a = null;
  95459. this.tooltipViews = this.tooltips.map((o) => a = r(o, a));
  95460. }
  95461. update(e, n) {
  95462. var r;
  95463. let i = e.state.facet(this.facet), a = i.filter((l) => l);
  95464. if (i === this.input) {
  95465. for (let l of this.tooltipViews)
  95466. l.update && l.update(e);
  95467. return !1;
  95468. }
  95469. let o = [], s = n ? [] : null;
  95470. for (let l = 0; l < a.length; l++) {
  95471. let u = a[l], c = -1;
  95472. if (u) {
  95473. for (let f = 0; f < this.tooltips.length; f++) {
  95474. let d = this.tooltips[f];
  95475. d && d.create == u.create && (c = f);
  95476. }
  95477. if (c < 0)
  95478. o[l] = this.createTooltipView(u, l ? o[l - 1] : null), s && (s[l] = !!u.above);
  95479. else {
  95480. let f = o[l] = this.tooltipViews[c];
  95481. s && (s[l] = n[c]), f.update && f.update(e);
  95482. }
  95483. }
  95484. }
  95485. for (let l of this.tooltipViews)
  95486. o.indexOf(l) < 0 && (this.removeTooltipView(l), (r = l.destroy) === null || r === void 0 || r.call(l));
  95487. return n && (s.forEach((l, u) => n[u] = l), n.length = s.length), this.input = i, this.tooltips = a, this.tooltipViews = o, !0;
  95488. }
  95489. }
  95490. function zst(t) {
  95491. let { win: e } = t;
  95492. return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth };
  95493. }
  95494. const S$ = /* @__PURE__ */ Be.define({
  95495. combine: (t) => {
  95496. var e, n, r;
  95497. return {
  95498. position: Ne.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed",
  95499. parent: ((n = t.find((i) => i.parent)) === null || n === void 0 ? void 0 : n.parent) || null,
  95500. tooltipSpace: ((r = t.find((i) => i.tooltipSpace)) === null || r === void 0 ? void 0 : r.tooltipSpace) || zst
  95501. };
  95502. }
  95503. }), g9 = /* @__PURE__ */ new WeakMap(), l4 = /* @__PURE__ */ kn.fromClass(class {
  95504. constructor(t) {
  95505. this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1;
  95506. let e = t.state.facet(S$);
  95507. this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.resizeObserver = typeof ResizeObserver == "function" ? new ResizeObserver(() => this.measureSoon()) : null, this.manager = new xoe(t, u4, (n, r) => this.createTooltip(n, r), (n) => {
  95508. this.resizeObserver && this.resizeObserver.unobserve(n.dom), n.dom.remove();
  95509. }), this.above = this.manager.tooltips.map((n) => !!n.above), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((n) => {
  95510. Date.now() > this.lastTransaction - 50 && n.length > 0 && n[n.length - 1].intersectionRatio < 1 && this.measureSoon();
  95511. }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure();
  95512. }
  95513. createContainer() {
  95514. this.parent ? (this.container = document.createElement("div"), this.container.style.position = "relative", this.container.className = this.view.themeClasses, this.parent.appendChild(this.container)) : this.container = this.view.dom;
  95515. }
  95516. observeIntersection() {
  95517. if (this.intersectionObserver) {
  95518. this.intersectionObserver.disconnect();
  95519. for (let t of this.manager.tooltipViews)
  95520. this.intersectionObserver.observe(t.dom);
  95521. }
  95522. }
  95523. measureSoon() {
  95524. this.measureTimeout < 0 && (this.measureTimeout = setTimeout(() => {
  95525. this.measureTimeout = -1, this.maybeMeasure();
  95526. }, 50));
  95527. }
  95528. update(t) {
  95529. t.transactions.length && (this.lastTransaction = Date.now());
  95530. let e = this.manager.update(t, this.above);
  95531. e && this.observeIntersection();
  95532. let n = e || t.geometryChanged, r = t.state.facet(S$);
  95533. if (r.position != this.position && !this.madeAbsolute) {
  95534. this.position = r.position;
  95535. for (let i of this.manager.tooltipViews)
  95536. i.dom.style.position = this.position;
  95537. n = !0;
  95538. }
  95539. if (r.parent != this.parent) {
  95540. this.parent && this.container.remove(), this.parent = r.parent, this.createContainer();
  95541. for (let i of this.manager.tooltipViews)
  95542. this.container.appendChild(i.dom);
  95543. n = !0;
  95544. } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses);
  95545. n && this.maybeMeasure();
  95546. }
  95547. createTooltip(t, e) {
  95548. let n = t.create(this.view), r = e ? e.dom : null;
  95549. if (n.dom.classList.add("cm-tooltip"), t.arrow && !n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
  95550. let i = document.createElement("div");
  95551. i.className = "cm-tooltip-arrow", n.dom.appendChild(i);
  95552. }
  95553. return n.dom.style.position = this.position, n.dom.style.top = Av, n.dom.style.left = "0px", this.container.insertBefore(n.dom, r), n.mount && n.mount(this.view), this.resizeObserver && this.resizeObserver.observe(n.dom), n;
  95554. }
  95555. destroy() {
  95556. var t, e, n;
  95557. this.view.win.removeEventListener("resize", this.measureSoon);
  95558. for (let r of this.manager.tooltipViews)
  95559. r.dom.remove(), (t = r.destroy) === null || t === void 0 || t.call(r);
  95560. this.parent && this.container.remove(), (e = this.resizeObserver) === null || e === void 0 || e.disconnect(), (n = this.intersectionObserver) === null || n === void 0 || n.disconnect(), clearTimeout(this.measureTimeout);
  95561. }
  95562. readMeasure() {
  95563. let t = this.view.dom.getBoundingClientRect(), e = 1, n = 1, r = !1;
  95564. if (this.position == "fixed" && this.manager.tooltipViews.length) {
  95565. let { dom: i } = this.manager.tooltipViews[0];
  95566. if (Ne.gecko)
  95567. r = i.offsetParent != this.container.ownerDocument.body;
  95568. else if (i.style.top == Av && i.style.left == "0px") {
  95569. let a = i.getBoundingClientRect();
  95570. r = Math.abs(a.top + 1e4) > 1 || Math.abs(a.left) > 1;
  95571. }
  95572. }
  95573. if (r || this.position == "absolute")
  95574. if (this.parent) {
  95575. let i = this.parent.getBoundingClientRect();
  95576. i.width && i.height && (e = i.width / this.parent.offsetWidth, n = i.height / this.parent.offsetHeight);
  95577. } else
  95578. ({ scaleX: e, scaleY: n } = this.view.viewState);
  95579. return {
  95580. editor: t,
  95581. parent: this.parent ? this.container.getBoundingClientRect() : t,
  95582. pos: this.manager.tooltips.map((i, a) => {
  95583. let o = this.manager.tooltipViews[a];
  95584. return o.getCoords ? o.getCoords(i.pos) : this.view.coordsAtPos(i.pos);
  95585. }),
  95586. size: this.manager.tooltipViews.map(({ dom: i }) => i.getBoundingClientRect()),
  95587. space: this.view.state.facet(S$).tooltipSpace(this.view),
  95588. scaleX: e,
  95589. scaleY: n,
  95590. makeAbsolute: r
  95591. };
  95592. }
  95593. writeMeasure(t) {
  95594. var e;
  95595. if (t.makeAbsolute) {
  95596. this.madeAbsolute = !0, this.position = "absolute";
  95597. for (let s of this.manager.tooltipViews)
  95598. s.dom.style.position = "absolute";
  95599. }
  95600. let { editor: n, space: r, scaleX: i, scaleY: a } = t, o = [];
  95601. for (let s = 0; s < this.manager.tooltips.length; s++) {
  95602. let l = this.manager.tooltips[s], u = this.manager.tooltipViews[s], { dom: c } = u, f = t.pos[s], d = t.size[s];
  95603. if (!f || f.bottom <= Math.max(n.top, r.top) || f.top >= Math.min(n.bottom, r.bottom) || f.right < Math.max(n.left, r.left) - 0.1 || f.left > Math.min(n.right, r.right) + 0.1) {
  95604. c.style.top = Av;
  95605. continue;
  95606. }
  95607. let h = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, p = h ? 7 : 0, v = d.right - d.left, g = (e = g9.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, m = u.offset || Fst, y = this.view.textDirection == pn.LTR, b = d.width > r.right - r.left ? y ? r.left : r.right - d.width : y ? Math.min(f.left - (h ? 14 : 0) + m.x, r.right - v) : Math.max(r.left, f.left - v + (h ? 14 : 0) - m.x), _ = this.above[s];
  95608. !l.strictSide && (_ ? f.top - (d.bottom - d.top) - m.y < r.top : f.bottom + (d.bottom - d.top) + m.y > r.bottom) && _ == r.bottom - f.bottom > f.top - r.top && (_ = this.above[s] = !_);
  95609. let O = (_ ? f.top - r.top : r.bottom - f.bottom) - p;
  95610. if (O < g && u.resize !== !1) {
  95611. if (O < this.view.defaultLineHeight) {
  95612. c.style.top = Av;
  95613. continue;
  95614. }
  95615. g9.set(u, g), c.style.height = (g = O) / a + "px";
  95616. } else c.style.height && (c.style.height = "");
  95617. let S = _ ? f.top - g - p - m.y : f.bottom + p + m.y, x = b + v;
  95618. if (u.overlap !== !0)
  95619. for (let C of o)
  95620. C.left < x && C.right > b && C.top < S + g && C.bottom > S && (S = _ ? C.top - g - 2 - p : C.bottom + p + 2);
  95621. if (this.position == "absolute" ? (c.style.top = (S - t.parent.top) / a + "px", c.style.left = (b - t.parent.left) / i + "px") : (c.style.top = S / a + "px", c.style.left = b / i + "px"), h) {
  95622. let C = f.left + (y ? m.x : -m.x) - (b + 14 - 7);
  95623. h.style.left = C / i + "px";
  95624. }
  95625. u.overlap !== !0 && o.push({ left: b, top: S, right: x, bottom: S + g }), c.classList.toggle("cm-tooltip-above", _), c.classList.toggle("cm-tooltip-below", !_), u.positioned && u.positioned(t.space);
  95626. }
  95627. }
  95628. maybeMeasure() {
  95629. if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && (this.inView = this.view.inView, !this.inView)))
  95630. for (let t of this.manager.tooltipViews)
  95631. t.dom.style.top = Av;
  95632. }
  95633. }, {
  95634. eventObservers: {
  95635. scroll() {
  95636. this.maybeMeasure();
  95637. }
  95638. }
  95639. }), Vst = /* @__PURE__ */ De.baseTheme({
  95640. ".cm-tooltip": {
  95641. zIndex: 100,
  95642. boxSizing: "border-box"
  95643. },
  95644. "&light .cm-tooltip": {
  95645. border: "1px solid #bbb",
  95646. backgroundColor: "#f5f5f5"
  95647. },
  95648. "&light .cm-tooltip-section:not(:first-child)": {
  95649. borderTop: "1px solid #bbb"
  95650. },
  95651. "&dark .cm-tooltip": {
  95652. backgroundColor: "#333338",
  95653. color: "white"
  95654. },
  95655. ".cm-tooltip-arrow": {
  95656. height: "7px",
  95657. width: `${7 * 2}px`,
  95658. position: "absolute",
  95659. zIndex: -1,
  95660. overflow: "hidden",
  95661. "&:before, &:after": {
  95662. content: "''",
  95663. position: "absolute",
  95664. width: 0,
  95665. height: 0,
  95666. borderLeft: "7px solid transparent",
  95667. borderRight: "7px solid transparent"
  95668. },
  95669. ".cm-tooltip-above &": {
  95670. bottom: "-7px",
  95671. "&:before": {
  95672. borderTop: "7px solid #bbb"
  95673. },
  95674. "&:after": {
  95675. borderTop: "7px solid #f5f5f5",
  95676. bottom: "1px"
  95677. }
  95678. },
  95679. ".cm-tooltip-below &": {
  95680. top: "-7px",
  95681. "&:before": {
  95682. borderBottom: "7px solid #bbb"
  95683. },
  95684. "&:after": {
  95685. borderBottom: "7px solid #f5f5f5",
  95686. top: "1px"
  95687. }
  95688. }
  95689. },
  95690. "&dark .cm-tooltip .cm-tooltip-arrow": {
  95691. "&:before": {
  95692. borderTopColor: "#333338",
  95693. borderBottomColor: "#333338"
  95694. },
  95695. "&:after": {
  95696. borderTopColor: "transparent",
  95697. borderBottomColor: "transparent"
  95698. }
  95699. }
  95700. }), Fst = { x: 0, y: 0 }, u4 = /* @__PURE__ */ Be.define({
  95701. enables: [l4, Vst]
  95702. }), oS = /* @__PURE__ */ Be.define({
  95703. combine: (t) => t.reduce((e, n) => e.concat(n), [])
  95704. });
  95705. class Rw {
  95706. // Needs to be static so that host tooltip instances always match
  95707. static create(e) {
  95708. return new Rw(e);
  95709. }
  95710. constructor(e) {
  95711. this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new xoe(e, oS, (n, r) => this.createHostedView(n, r), (n) => n.dom.remove());
  95712. }
  95713. createHostedView(e, n) {
  95714. let r = e.create(this.view);
  95715. return r.dom.classList.add("cm-tooltip-section"), this.dom.insertBefore(r.dom, n ? n.dom.nextSibling : this.dom.firstChild), this.mounted && r.mount && r.mount(this.view), r;
  95716. }
  95717. mount(e) {
  95718. for (let n of this.manager.tooltipViews)
  95719. n.mount && n.mount(e);
  95720. this.mounted = !0;
  95721. }
  95722. positioned(e) {
  95723. for (let n of this.manager.tooltipViews)
  95724. n.positioned && n.positioned(e);
  95725. }
  95726. update(e) {
  95727. this.manager.update(e);
  95728. }
  95729. destroy() {
  95730. var e;
  95731. for (let n of this.manager.tooltipViews)
  95732. (e = n.destroy) === null || e === void 0 || e.call(n);
  95733. }
  95734. passProp(e) {
  95735. let n;
  95736. for (let r of this.manager.tooltipViews) {
  95737. let i = r[e];
  95738. if (i !== void 0) {
  95739. if (n === void 0)
  95740. n = i;
  95741. else if (n !== i)
  95742. return;
  95743. }
  95744. }
  95745. return n;
  95746. }
  95747. get offset() {
  95748. return this.passProp("offset");
  95749. }
  95750. get getCoords() {
  95751. return this.passProp("getCoords");
  95752. }
  95753. get overlap() {
  95754. return this.passProp("overlap");
  95755. }
  95756. get resize() {
  95757. return this.passProp("resize");
  95758. }
  95759. }
  95760. const Wst = /* @__PURE__ */ u4.compute([oS], (t) => {
  95761. let e = t.facet(oS);
  95762. return e.length === 0 ? null : {
  95763. pos: Math.min(...e.map((n) => n.pos)),
  95764. end: Math.max(...e.map((n) => {
  95765. var r;
  95766. return (r = n.end) !== null && r !== void 0 ? r : n.pos;
  95767. })),
  95768. create: Rw.create,
  95769. above: e[0].above,
  95770. arrow: e.some((n) => n.arrow)
  95771. };
  95772. });
  95773. class Qst {
  95774. constructor(e, n, r, i, a) {
  95775. this.view = e, this.source = n, this.field = r, this.setHover = i, this.hoverTime = a, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: e.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), e.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), e.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this));
  95776. }
  95777. update() {
  95778. this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(() => this.startHover(), 20));
  95779. }
  95780. get active() {
  95781. return this.view.state.field(this.field);
  95782. }
  95783. checkHover() {
  95784. if (this.hoverTimeout = -1, this.active.length)
  95785. return;
  95786. let e = Date.now() - this.lastMove.time;
  95787. e < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e) : this.startHover();
  95788. }
  95789. startHover() {
  95790. clearTimeout(this.restartTimeout);
  95791. let { view: e, lastMove: n } = this, r = e.docView.nearest(n.target);
  95792. if (!r)
  95793. return;
  95794. let i, a = 1;
  95795. if (r instanceof Ql)
  95796. i = r.posAtStart;
  95797. else {
  95798. if (i = e.posAtCoords(n), i == null)
  95799. return;
  95800. let s = e.coordsAtPos(i);
  95801. if (!s || n.y < s.top || n.y > s.bottom || n.x < s.left - e.defaultCharacterWidth || n.x > s.right + e.defaultCharacterWidth)
  95802. return;
  95803. let l = e.bidiSpans(e.state.doc.lineAt(i)).find((c) => c.from <= i && c.to >= i), u = l && l.dir == pn.RTL ? -1 : 1;
  95804. a = n.x < s.left ? -u : u;
  95805. }
  95806. let o = this.source(e, i, a);
  95807. if (o != null && o.then) {
  95808. let s = this.pending = { pos: i };
  95809. o.then((l) => {
  95810. this.pending == s && (this.pending = null, l && !(Array.isArray(l) && !l.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(l) ? l : [l]) }));
  95811. }, (l) => mi(e.state, l, "hover tooltip"));
  95812. } else o && !(Array.isArray(o) && !o.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(o) ? o : [o]) });
  95813. }
  95814. get tooltip() {
  95815. let e = this.view.plugin(l4), n = e ? e.manager.tooltips.findIndex((r) => r.create == Rw.create) : -1;
  95816. return n > -1 ? e.manager.tooltipViews[n] : null;
  95817. }
  95818. mousemove(e) {
  95819. var n, r;
  95820. this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime));
  95821. let { active: i, tooltip: a } = this;
  95822. if (i.length && a && !Hst(a.dom, e) || this.pending) {
  95823. let { pos: o } = i[0] || this.pending, s = (r = (n = i[0]) === null || n === void 0 ? void 0 : n.end) !== null && r !== void 0 ? r : o;
  95824. (o == s ? this.view.posAtCoords(this.lastMove) != o : !Gst(this.view, o, s, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null);
  95825. }
  95826. }
  95827. mouseleave(e) {
  95828. clearTimeout(this.hoverTimeout), this.hoverTimeout = -1;
  95829. let { active: n } = this;
  95830. if (n.length) {
  95831. let { tooltip: r } = this;
  95832. r && r.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(r.dom) : this.view.dispatch({ effects: this.setHover.of([]) });
  95833. }
  95834. }
  95835. watchTooltipLeave(e) {
  95836. let n = (r) => {
  95837. e.removeEventListener("mouseleave", n), this.active.length && !this.view.dom.contains(r.relatedTarget) && this.view.dispatch({ effects: this.setHover.of([]) });
  95838. };
  95839. e.addEventListener("mouseleave", n);
  95840. }
  95841. destroy() {
  95842. clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove);
  95843. }
  95844. }
  95845. const e_ = 4;
  95846. function Hst(t, e) {
  95847. let n = t.getBoundingClientRect();
  95848. return e.clientX >= n.left - e_ && e.clientX <= n.right + e_ && e.clientY >= n.top - e_ && e.clientY <= n.bottom + e_;
  95849. }
  95850. function Gst(t, e, n, r, i, a) {
  95851. let o = t.scrollDOM.getBoundingClientRect(), s = t.documentTop + t.documentPadding.top + t.contentHeight;
  95852. if (o.left > r || o.right < r || o.top > i || Math.min(o.bottom, s) < i)
  95853. return !1;
  95854. let l = t.posAtCoords({ x: r, y: i }, !1);
  95855. return l >= e && l <= n;
  95856. }
  95857. function jst(t, e = {}) {
  95858. let n = dt.define(), r = ur.define({
  95859. create() {
  95860. return [];
  95861. },
  95862. update(i, a) {
  95863. if (i.length && (e.hideOnChange && (a.docChanged || a.selection) ? i = [] : e.hideOn && (i = i.filter((o) => !e.hideOn(a, o))), a.docChanged)) {
  95864. let o = [];
  95865. for (let s of i) {
  95866. let l = a.changes.mapPos(s.pos, -1, yr.TrackDel);
  95867. if (l != null) {
  95868. let u = Object.assign(/* @__PURE__ */ Object.create(null), s);
  95869. u.pos = l, u.end != null && (u.end = a.changes.mapPos(u.end)), o.push(u);
  95870. }
  95871. }
  95872. i = o;
  95873. }
  95874. for (let o of a.effects)
  95875. o.is(n) && (i = o.value), o.is(Zst) && (i = []);
  95876. return i;
  95877. },
  95878. provide: (i) => oS.from(i)
  95879. });
  95880. return [
  95881. r,
  95882. kn.define((i) => new Qst(
  95883. i,
  95884. t,
  95885. r,
  95886. n,
  95887. e.hoverTime || 300
  95888. /* Hover.Time */
  95889. )),
  95890. Wst
  95891. ];
  95892. }
  95893. function woe(t, e) {
  95894. let n = t.plugin(l4);
  95895. if (!n)
  95896. return null;
  95897. let r = n.manager.tooltips.indexOf(e);
  95898. return r < 0 ? null : n.manager.tooltipViews[r];
  95899. }
  95900. const Zst = /* @__PURE__ */ dt.define(), m9 = /* @__PURE__ */ Be.define({
  95901. combine(t) {
  95902. let e, n;
  95903. for (let r of t)
  95904. e = e || r.topContainer, n = n || r.bottomContainer;
  95905. return { topContainer: e, bottomContainer: n };
  95906. }
  95907. });
  95908. function qm(t, e) {
  95909. let n = t.plugin(Coe), r = n ? n.specs.indexOf(e) : -1;
  95910. return r > -1 ? n.panels[r] : null;
  95911. }
  95912. const Coe = /* @__PURE__ */ kn.fromClass(class {
  95913. constructor(t) {
  95914. this.input = t.state.facet(Km), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
  95915. let e = t.state.facet(m9);
  95916. this.top = new t_(t, !0, e.topContainer), this.bottom = new t_(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
  95917. for (let n of this.panels)
  95918. n.dom.classList.add("cm-panel"), n.mount && n.mount();
  95919. }
  95920. update(t) {
  95921. let e = t.state.facet(m9);
  95922. this.top.container != e.topContainer && (this.top.sync([]), this.top = new t_(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new t_(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
  95923. let n = t.state.facet(Km);
  95924. if (n != this.input) {
  95925. let r = n.filter((l) => l), i = [], a = [], o = [], s = [];
  95926. for (let l of r) {
  95927. let u = this.specs.indexOf(l), c;
  95928. u < 0 ? (c = l(t.view), s.push(c)) : (c = this.panels[u], c.update && c.update(t)), i.push(c), (c.top ? a : o).push(c);
  95929. }
  95930. this.specs = r, this.panels = i, this.top.sync(a), this.bottom.sync(o);
  95931. for (let l of s)
  95932. l.dom.classList.add("cm-panel"), l.mount && l.mount();
  95933. } else
  95934. for (let r of this.panels)
  95935. r.update && r.update(t);
  95936. }
  95937. destroy() {
  95938. this.top.sync([]), this.bottom.sync([]);
  95939. }
  95940. }, {
  95941. provide: (t) => De.scrollMargins.of((e) => {
  95942. let n = e.plugin(t);
  95943. return n && { top: n.top.scrollMargin(), bottom: n.bottom.scrollMargin() };
  95944. })
  95945. });
  95946. class t_ {
  95947. constructor(e, n, r) {
  95948. this.view = e, this.top = n, this.container = r, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses();
  95949. }
  95950. sync(e) {
  95951. for (let n of this.panels)
  95952. n.destroy && e.indexOf(n) < 0 && n.destroy();
  95953. this.panels = e, this.syncDOM();
  95954. }
  95955. syncDOM() {
  95956. if (this.panels.length == 0) {
  95957. this.dom && (this.dom.remove(), this.dom = void 0);
  95958. return;
  95959. }
  95960. if (!this.dom) {
  95961. this.dom = document.createElement("div"), this.dom.className = this.top ? "cm-panels cm-panels-top" : "cm-panels cm-panels-bottom", this.dom.style[this.top ? "top" : "bottom"] = "0";
  95962. let n = this.container || this.view.dom;
  95963. n.insertBefore(this.dom, this.top ? n.firstChild : null);
  95964. }
  95965. let e = this.dom.firstChild;
  95966. for (let n of this.panels)
  95967. if (n.dom.parentNode == this.dom) {
  95968. for (; e != n.dom; )
  95969. e = y9(e);
  95970. e = e.nextSibling;
  95971. } else
  95972. this.dom.insertBefore(n.dom, e);
  95973. for (; e; )
  95974. e = y9(e);
  95975. }
  95976. scrollMargin() {
  95977. return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top);
  95978. }
  95979. syncClasses() {
  95980. if (!(!this.container || this.classes == this.view.themeClasses)) {
  95981. for (let e of this.classes.split(" "))
  95982. e && this.container.classList.remove(e);
  95983. for (let e of (this.classes = this.view.themeClasses).split(" "))
  95984. e && this.container.classList.add(e);
  95985. }
  95986. }
  95987. }
  95988. function y9(t) {
  95989. let e = t.nextSibling;
  95990. return t.remove(), e;
  95991. }
  95992. const Km = /* @__PURE__ */ Be.define({
  95993. enables: Coe
  95994. });
  95995. class tl extends wf {
  95996. /**
  95997. @internal
  95998. */
  95999. compare(e) {
  96000. return this == e || this.constructor == e.constructor && this.eq(e);
  96001. }
  96002. /**
  96003. Compare this marker to another marker of the same type.
  96004. */
  96005. eq(e) {
  96006. return !1;
  96007. }
  96008. /**
  96009. Called if the marker has a `toDOM` method and its representation
  96010. was removed from a gutter.
  96011. */
  96012. destroy(e) {
  96013. }
  96014. }
  96015. tl.prototype.elementClass = "";
  96016. tl.prototype.toDOM = void 0;
  96017. tl.prototype.mapMode = yr.TrackBefore;
  96018. tl.prototype.startSide = tl.prototype.endSide = -1;
  96019. tl.prototype.point = !0;
  96020. const u1 = /* @__PURE__ */ Be.define(), Ust = {
  96021. class: "",
  96022. renderEmptyElements: !1,
  96023. elementStyle: "",
  96024. markers: () => Vt.empty,
  96025. lineMarker: () => null,
  96026. widgetMarker: () => null,
  96027. lineMarkerChange: null,
  96028. initialSpacer: null,
  96029. updateSpacer: null,
  96030. domEventHandlers: {}
  96031. }, Hg = /* @__PURE__ */ Be.define();
  96032. function Xst(t) {
  96033. return [Toe(), Hg.of(Object.assign(Object.assign({}, Ust), t))];
  96034. }
  96035. const b9 = /* @__PURE__ */ Be.define({
  96036. combine: (t) => t.some((e) => e)
  96037. });
  96038. function Toe(t) {
  96039. return [
  96040. Yst
  96041. ];
  96042. }
  96043. const Yst = /* @__PURE__ */ kn.fromClass(class {
  96044. constructor(t) {
  96045. this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(Hg).map((e) => new O9(t, e));
  96046. for (let e of this.gutters)
  96047. this.dom.appendChild(e.dom);
  96048. this.fixed = !t.state.facet(b9), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
  96049. }
  96050. update(t) {
  96051. if (this.updateGutters(t)) {
  96052. let e = this.prevViewport, n = t.view.viewport, r = Math.min(e.to, n.to) - Math.max(e.from, n.from);
  96053. this.syncGutters(r < (n.to - n.from) * 0.8);
  96054. }
  96055. t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(b9) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport;
  96056. }
  96057. syncGutters(t) {
  96058. let e = this.dom.nextSibling;
  96059. t && this.dom.remove();
  96060. let n = Vt.iter(this.view.state.facet(u1), this.view.viewport.from), r = [], i = this.gutters.map((a) => new qst(a, this.view.viewport, -this.view.documentPadding.top));
  96061. for (let a of this.view.viewportLineBlocks)
  96062. if (r.length && (r = []), Array.isArray(a.type)) {
  96063. let o = !0;
  96064. for (let s of a.type)
  96065. if (s.type == Jr.Text && o) {
  96066. LM(n, r, s.from);
  96067. for (let l of i)
  96068. l.line(this.view, s, r);
  96069. o = !1;
  96070. } else if (s.widget)
  96071. for (let l of i)
  96072. l.widget(this.view, s);
  96073. } else if (a.type == Jr.Text) {
  96074. LM(n, r, a.from);
  96075. for (let o of i)
  96076. o.line(this.view, a, r);
  96077. } else if (a.widget)
  96078. for (let o of i)
  96079. o.widget(this.view, a);
  96080. for (let a of i)
  96081. a.finish();
  96082. t && this.view.scrollDOM.insertBefore(this.dom, e);
  96083. }
  96084. updateGutters(t) {
  96085. let e = t.startState.facet(Hg), n = t.state.facet(Hg), r = t.docChanged || t.heightChanged || t.viewportChanged || !Vt.eq(t.startState.facet(u1), t.state.facet(u1), t.view.viewport.from, t.view.viewport.to);
  96086. if (e == n)
  96087. for (let i of this.gutters)
  96088. i.update(t) && (r = !0);
  96089. else {
  96090. r = !0;
  96091. let i = [];
  96092. for (let a of n) {
  96093. let o = e.indexOf(a);
  96094. o < 0 ? i.push(new O9(this.view, a)) : (this.gutters[o].update(t), i.push(this.gutters[o]));
  96095. }
  96096. for (let a of this.gutters)
  96097. a.dom.remove(), i.indexOf(a) < 0 && a.destroy();
  96098. for (let a of i)
  96099. this.dom.appendChild(a.dom);
  96100. this.gutters = i;
  96101. }
  96102. return r;
  96103. }
  96104. destroy() {
  96105. for (let t of this.gutters)
  96106. t.destroy();
  96107. this.dom.remove();
  96108. }
  96109. }, {
  96110. provide: (t) => De.scrollMargins.of((e) => {
  96111. let n = e.plugin(t);
  96112. return !n || n.gutters.length == 0 || !n.fixed ? null : e.textDirection == pn.LTR ? { left: n.dom.offsetWidth * e.scaleX } : { right: n.dom.offsetWidth * e.scaleX };
  96113. })
  96114. });
  96115. function _9(t) {
  96116. return Array.isArray(t) ? t : [t];
  96117. }
  96118. function LM(t, e, n) {
  96119. for (; t.value && t.from <= n; )
  96120. t.from == n && e.push(t.value), t.next();
  96121. }
  96122. class qst {
  96123. constructor(e, n, r) {
  96124. this.gutter = e, this.height = r, this.i = 0, this.cursor = Vt.iter(e.markers, n.from);
  96125. }
  96126. addElement(e, n, r) {
  96127. let { gutter: i } = this, a = (n.top - this.height) / e.scaleY, o = n.height / e.scaleY;
  96128. if (this.i == i.elements.length) {
  96129. let s = new Poe(e, o, a, r);
  96130. i.elements.push(s), i.dom.appendChild(s.dom);
  96131. } else
  96132. i.elements[this.i].update(e, o, a, r);
  96133. this.height = n.bottom, this.i++;
  96134. }
  96135. line(e, n, r) {
  96136. let i = [];
  96137. LM(this.cursor, i, n.from), r.length && (i = i.concat(r));
  96138. let a = this.gutter.config.lineMarker(e, n, i);
  96139. a && i.unshift(a);
  96140. let o = this.gutter;
  96141. i.length == 0 && !o.config.renderEmptyElements || this.addElement(e, n, i);
  96142. }
  96143. widget(e, n) {
  96144. let r = this.gutter.config.widgetMarker(e, n.widget, n);
  96145. r && this.addElement(e, n, [r]);
  96146. }
  96147. finish() {
  96148. let e = this.gutter;
  96149. for (; e.elements.length > this.i; ) {
  96150. let n = e.elements.pop();
  96151. e.dom.removeChild(n.dom), n.destroy();
  96152. }
  96153. }
  96154. }
  96155. class O9 {
  96156. constructor(e, n) {
  96157. this.view = e, this.config = n, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : "");
  96158. for (let r in n.domEventHandlers)
  96159. this.dom.addEventListener(r, (i) => {
  96160. let a = i.target, o;
  96161. if (a != this.dom && this.dom.contains(a)) {
  96162. for (; a.parentNode != this.dom; )
  96163. a = a.parentNode;
  96164. let l = a.getBoundingClientRect();
  96165. o = (l.top + l.bottom) / 2;
  96166. } else
  96167. o = i.clientY;
  96168. let s = e.lineBlockAtHeight(o - e.documentTop);
  96169. n.domEventHandlers[r](e, s, i) && i.preventDefault();
  96170. });
  96171. this.markers = _9(n.markers(e)), n.initialSpacer && (this.spacer = new Poe(e, 0, 0, [n.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
  96172. }
  96173. update(e) {
  96174. let n = this.markers;
  96175. if (this.markers = _9(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) {
  96176. let i = this.config.updateSpacer(this.spacer.markers[0], e);
  96177. i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]);
  96178. }
  96179. let r = e.view.viewport;
  96180. return !Vt.eq(this.markers, n, r.from, r.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
  96181. }
  96182. destroy() {
  96183. for (let e of this.elements)
  96184. e.destroy();
  96185. }
  96186. }
  96187. class Poe {
  96188. constructor(e, n, r, i) {
  96189. this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, n, r, i);
  96190. }
  96191. update(e, n, r, i) {
  96192. this.height != n && (this.height = n, this.dom.style.height = n + "px"), this.above != r && (this.dom.style.marginTop = (this.above = r) ? r + "px" : ""), Kst(this.markers, i) || this.setMarkers(e, i);
  96193. }
  96194. setMarkers(e, n) {
  96195. let r = "cm-gutterElement", i = this.dom.firstChild;
  96196. for (let a = 0, o = 0; ; ) {
  96197. let s = o, l = a < n.length ? n[a++] : null, u = !1;
  96198. if (l) {
  96199. let c = l.elementClass;
  96200. c && (r += " " + c);
  96201. for (let f = o; f < this.markers.length; f++)
  96202. if (this.markers[f].compare(l)) {
  96203. s = f, u = !0;
  96204. break;
  96205. }
  96206. } else
  96207. s = this.markers.length;
  96208. for (; o < s; ) {
  96209. let c = this.markers[o++];
  96210. if (c.toDOM) {
  96211. c.destroy(i);
  96212. let f = i.nextSibling;
  96213. i.remove(), i = f;
  96214. }
  96215. }
  96216. if (!l)
  96217. break;
  96218. l.toDOM && (u ? i = i.nextSibling : this.dom.insertBefore(l.toDOM(e), i)), u && o++;
  96219. }
  96220. this.dom.className = r, this.markers = n;
  96221. }
  96222. destroy() {
  96223. this.setMarkers(null, []);
  96224. }
  96225. }
  96226. function Kst(t, e) {
  96227. if (t.length != e.length)
  96228. return !1;
  96229. for (let n = 0; n < t.length; n++)
  96230. if (!t[n].compare(e[n]))
  96231. return !1;
  96232. return !0;
  96233. }
  96234. const Jst = /* @__PURE__ */ Be.define(), Qd = /* @__PURE__ */ Be.define({
  96235. combine(t) {
  96236. return fs(t, { formatNumber: String, domEventHandlers: {} }, {
  96237. domEventHandlers(e, n) {
  96238. let r = Object.assign({}, e);
  96239. for (let i in n) {
  96240. let a = r[i], o = n[i];
  96241. r[i] = a ? (s, l, u) => a(s, l, u) || o(s, l, u) : o;
  96242. }
  96243. return r;
  96244. }
  96245. });
  96246. }
  96247. });
  96248. class x$ extends tl {
  96249. constructor(e) {
  96250. super(), this.number = e;
  96251. }
  96252. eq(e) {
  96253. return this.number == e.number;
  96254. }
  96255. toDOM() {
  96256. return document.createTextNode(this.number);
  96257. }
  96258. }
  96259. function w$(t, e) {
  96260. return t.state.facet(Qd).formatNumber(e, t.state);
  96261. }
  96262. const elt = /* @__PURE__ */ Hg.compute([Qd], (t) => ({
  96263. class: "cm-lineNumbers",
  96264. renderEmptyElements: !1,
  96265. markers(e) {
  96266. return e.state.facet(Jst);
  96267. },
  96268. lineMarker(e, n, r) {
  96269. return r.some((i) => i.toDOM) ? null : new x$(w$(e, e.state.doc.lineAt(n.from).number));
  96270. },
  96271. widgetMarker: () => null,
  96272. lineMarkerChange: (e) => e.startState.facet(Qd) != e.state.facet(Qd),
  96273. initialSpacer(e) {
  96274. return new x$(w$(e, S9(e.state.doc.lines)));
  96275. },
  96276. updateSpacer(e, n) {
  96277. let r = w$(n.view, S9(n.view.state.doc.lines));
  96278. return r == e.number ? e : new x$(r);
  96279. },
  96280. domEventHandlers: t.facet(Qd).domEventHandlers
  96281. }));
  96282. function tlt(t = {}) {
  96283. return [
  96284. Qd.of(t),
  96285. Toe(),
  96286. elt
  96287. ];
  96288. }
  96289. function S9(t) {
  96290. let e = 9;
  96291. for (; e < t; )
  96292. e = e * 10 + 9;
  96293. return e;
  96294. }
  96295. const nlt = /* @__PURE__ */ new class extends tl {
  96296. constructor() {
  96297. super(...arguments), this.elementClass = "cm-activeLineGutter";
  96298. }
  96299. }(), rlt = /* @__PURE__ */ u1.compute(["selection"], (t) => {
  96300. let e = [], n = -1;
  96301. for (let r of t.selection.ranges) {
  96302. let i = t.doc.lineAt(r.head).from;
  96303. i > n && (n = i, e.push(nlt.range(i)));
  96304. }
  96305. return Vt.of(e);
  96306. });
  96307. function ilt() {
  96308. return rlt;
  96309. }
  96310. const $oe = 1024;
  96311. let alt = 0;
  96312. class C$ {
  96313. constructor(e, n) {
  96314. this.from = e, this.to = n;
  96315. }
  96316. }
  96317. class Pt {
  96318. /**
  96319. Create a new node prop type.
  96320. */
  96321. constructor(e = {}) {
  96322. this.id = alt++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
  96323. throw new Error("This node type doesn't define a deserialize function");
  96324. });
  96325. }
  96326. /**
  96327. This is meant to be used with
  96328. [`NodeSet.extend`](#common.NodeSet.extend) or
  96329. [`LRParser.configure`](#lr.ParserConfig.props) to compute
  96330. prop values for each node type in the set. Takes a [match
  96331. object](#common.NodeType^match) or function that returns undefined
  96332. if the node type doesn't get this prop, and the prop's value if
  96333. it does.
  96334. */
  96335. add(e) {
  96336. if (this.perNode)
  96337. throw new RangeError("Can't add per-node props to node types");
  96338. return typeof e != "function" && (e = Ci.match(e)), (n) => {
  96339. let r = e(n);
  96340. return r === void 0 ? null : [this, r];
  96341. };
  96342. }
  96343. }
  96344. Pt.closedBy = new Pt({ deserialize: (t) => t.split(" ") });
  96345. Pt.openedBy = new Pt({ deserialize: (t) => t.split(" ") });
  96346. Pt.group = new Pt({ deserialize: (t) => t.split(" ") });
  96347. Pt.isolate = new Pt({ deserialize: (t) => {
  96348. if (t && t != "rtl" && t != "ltr" && t != "auto")
  96349. throw new RangeError("Invalid value for isolate: " + t);
  96350. return t || "auto";
  96351. } });
  96352. Pt.contextHash = new Pt({ perNode: !0 });
  96353. Pt.lookAhead = new Pt({ perNode: !0 });
  96354. Pt.mounted = new Pt({ perNode: !0 });
  96355. class sS {
  96356. constructor(e, n, r) {
  96357. this.tree = e, this.overlay = n, this.parser = r;
  96358. }
  96359. /**
  96360. @internal
  96361. */
  96362. static get(e) {
  96363. return e && e.props && e.props[Pt.mounted.id];
  96364. }
  96365. }
  96366. const olt = /* @__PURE__ */ Object.create(null);
  96367. class Ci {
  96368. /**
  96369. @internal
  96370. */
  96371. constructor(e, n, r, i = 0) {
  96372. this.name = e, this.props = n, this.id = r, this.flags = i;
  96373. }
  96374. /**
  96375. Define a node type.
  96376. */
  96377. static define(e) {
  96378. let n = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : olt, r = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Ci(e.name || "", n, e.id, r);
  96379. if (e.props) {
  96380. for (let a of e.props)
  96381. if (Array.isArray(a) || (a = a(i)), a) {
  96382. if (a[0].perNode)
  96383. throw new RangeError("Can't store a per-node prop on a node type");
  96384. n[a[0].id] = a[1];
  96385. }
  96386. }
  96387. return i;
  96388. }
  96389. /**
  96390. Retrieves a node prop for this type. Will return `undefined` if
  96391. the prop isn't present on this node.
  96392. */
  96393. prop(e) {
  96394. return this.props[e.id];
  96395. }
  96396. /**
  96397. True when this is the top node of a grammar.
  96398. */
  96399. get isTop() {
  96400. return (this.flags & 1) > 0;
  96401. }
  96402. /**
  96403. True when this node is produced by a skip rule.
  96404. */
  96405. get isSkipped() {
  96406. return (this.flags & 2) > 0;
  96407. }
  96408. /**
  96409. Indicates whether this is an error node.
  96410. */
  96411. get isError() {
  96412. return (this.flags & 4) > 0;
  96413. }
  96414. /**
  96415. When true, this node type doesn't correspond to a user-declared
  96416. named node, for example because it is used to cache repetition.
  96417. */
  96418. get isAnonymous() {
  96419. return (this.flags & 8) > 0;
  96420. }
  96421. /**
  96422. Returns true when this node's name or one of its
  96423. [groups](#common.NodeProp^group) matches the given string.
  96424. */
  96425. is(e) {
  96426. if (typeof e == "string") {
  96427. if (this.name == e)
  96428. return !0;
  96429. let n = this.prop(Pt.group);
  96430. return n ? n.indexOf(e) > -1 : !1;
  96431. }
  96432. return this.id == e;
  96433. }
  96434. /**
  96435. Create a function from node types to arbitrary values by
  96436. specifying an object whose property names are node or
  96437. [group](#common.NodeProp^group) names. Often useful with
  96438. [`NodeProp.add`](#common.NodeProp.add). You can put multiple
  96439. names, separated by spaces, in a single property name to map
  96440. multiple node names to a single value.
  96441. */
  96442. static match(e) {
  96443. let n = /* @__PURE__ */ Object.create(null);
  96444. for (let r in e)
  96445. for (let i of r.split(" "))
  96446. n[i] = e[r];
  96447. return (r) => {
  96448. for (let i = r.prop(Pt.group), a = -1; a < (i ? i.length : 0); a++) {
  96449. let o = n[a < 0 ? r.name : i[a]];
  96450. if (o)
  96451. return o;
  96452. }
  96453. };
  96454. }
  96455. }
  96456. Ci.none = new Ci(
  96457. "",
  96458. /* @__PURE__ */ Object.create(null),
  96459. 0,
  96460. 8
  96461. /* NodeFlag.Anonymous */
  96462. );
  96463. class c4 {
  96464. /**
  96465. Create a set with the given types. The `id` property of each
  96466. type should correspond to its position within the array.
  96467. */
  96468. constructor(e) {
  96469. this.types = e;
  96470. for (let n = 0; n < e.length; n++)
  96471. if (e[n].id != n)
  96472. throw new RangeError("Node type ids should correspond to array positions when creating a node set");
  96473. }
  96474. /**
  96475. Create a copy of this set with some node properties added. The
  96476. arguments to this method can be created with
  96477. [`NodeProp.add`](#common.NodeProp.add).
  96478. */
  96479. extend(...e) {
  96480. let n = [];
  96481. for (let r of this.types) {
  96482. let i = null;
  96483. for (let a of e) {
  96484. let o = a(r);
  96485. o && (i || (i = Object.assign({}, r.props)), i[o[0].id] = o[1]);
  96486. }
  96487. n.push(i ? new Ci(r.name, i, r.id, r.flags) : r);
  96488. }
  96489. return new c4(n);
  96490. }
  96491. }
  96492. const n_ = /* @__PURE__ */ new WeakMap(), x9 = /* @__PURE__ */ new WeakMap();
  96493. var Zn;
  96494. (function(t) {
  96495. t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays";
  96496. })(Zn || (Zn = {}));
  96497. class Wn {
  96498. /**
  96499. Construct a new tree. See also [`Tree.build`](#common.Tree^build).
  96500. */
  96501. constructor(e, n, r, i, a) {
  96502. if (this.type = e, this.children = n, this.positions = r, this.length = i, this.props = null, a && a.length) {
  96503. this.props = /* @__PURE__ */ Object.create(null);
  96504. for (let [o, s] of a)
  96505. this.props[typeof o == "number" ? o : o.id] = s;
  96506. }
  96507. }
  96508. /**
  96509. @internal
  96510. */
  96511. toString() {
  96512. let e = sS.get(this);
  96513. if (e && !e.overlay)
  96514. return e.tree.toString();
  96515. let n = "";
  96516. for (let r of this.children) {
  96517. let i = r.toString();
  96518. i && (n && (n += ","), n += i);
  96519. }
  96520. return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n.length ? "(" + n + ")" : "") : n;
  96521. }
  96522. /**
  96523. Get a [tree cursor](#common.TreeCursor) positioned at the top of
  96524. the tree. Mode can be used to [control](#common.IterMode) which
  96525. nodes the cursor visits.
  96526. */
  96527. cursor(e = 0) {
  96528. return new BM(this.topNode, e);
  96529. }
  96530. /**
  96531. Get a [tree cursor](#common.TreeCursor) pointing into this tree
  96532. at the given position and side (see
  96533. [`moveTo`](#common.TreeCursor.moveTo).
  96534. */
  96535. cursorAt(e, n = 0, r = 0) {
  96536. let i = n_.get(this) || this.topNode, a = new BM(i);
  96537. return a.moveTo(e, n), n_.set(this, a._tree), a;
  96538. }
  96539. /**
  96540. Get a [syntax node](#common.SyntaxNode) object for the top of the
  96541. tree.
  96542. */
  96543. get topNode() {
  96544. return new xi(this, 0, 0, null);
  96545. }
  96546. /**
  96547. Get the [syntax node](#common.SyntaxNode) at the given position.
  96548. If `side` is -1, this will move into nodes that end at the
  96549. position. If 1, it'll move into nodes that start at the
  96550. position. With 0, it'll only enter nodes that cover the position
  96551. from both sides.
  96552. Note that this will not enter
  96553. [overlays](#common.MountedTree.overlay), and you often want
  96554. [`resolveInner`](#common.Tree.resolveInner) instead.
  96555. */
  96556. resolve(e, n = 0) {
  96557. let r = Jm(n_.get(this) || this.topNode, e, n, !1);
  96558. return n_.set(this, r), r;
  96559. }
  96560. /**
  96561. Like [`resolve`](#common.Tree.resolve), but will enter
  96562. [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
  96563. pointing into the innermost overlaid tree at the given position
  96564. (with parent links going through all parent structure, including
  96565. the host trees).
  96566. */
  96567. resolveInner(e, n = 0) {
  96568. let r = Jm(x9.get(this) || this.topNode, e, n, !0);
  96569. return x9.set(this, r), r;
  96570. }
  96571. /**
  96572. In some situations, it can be useful to iterate through all
  96573. nodes around a position, including those in overlays that don't
  96574. directly cover the position. This method gives you an iterator
  96575. that will produce all nodes, from small to big, around the given
  96576. position.
  96577. */
  96578. resolveStack(e, n = 0) {
  96579. return ult(this, e, n);
  96580. }
  96581. /**
  96582. Iterate over the tree and its children, calling `enter` for any
  96583. node that touches the `from`/`to` region (if given) before
  96584. running over such a node's children, and `leave` (if given) when
  96585. leaving the node. When `enter` returns `false`, that node will
  96586. not have its children iterated over (or `leave` called).
  96587. */
  96588. iterate(e) {
  96589. let { enter: n, leave: r, from: i = 0, to: a = this.length } = e, o = e.mode || 0, s = (o & Zn.IncludeAnonymous) > 0;
  96590. for (let l = this.cursor(o | Zn.IncludeAnonymous); ; ) {
  96591. let u = !1;
  96592. if (l.from <= a && l.to >= i && (!s && l.type.isAnonymous || n(l) !== !1)) {
  96593. if (l.firstChild())
  96594. continue;
  96595. u = !0;
  96596. }
  96597. for (; u && r && (s || !l.type.isAnonymous) && r(l), !l.nextSibling(); ) {
  96598. if (!l.parent())
  96599. return;
  96600. u = !0;
  96601. }
  96602. }
  96603. }
  96604. /**
  96605. Get the value of the given [node prop](#common.NodeProp) for this
  96606. node. Works with both per-node and per-type props.
  96607. */
  96608. prop(e) {
  96609. return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
  96610. }
  96611. /**
  96612. Returns the node's [per-node props](#common.NodeProp.perNode) in a
  96613. format that can be passed to the [`Tree`](#common.Tree)
  96614. constructor.
  96615. */
  96616. get propValues() {
  96617. let e = [];
  96618. if (this.props)
  96619. for (let n in this.props)
  96620. e.push([+n, this.props[n]]);
  96621. return e;
  96622. }
  96623. /**
  96624. Balance the direct children of this tree, producing a copy of
  96625. which may have children grouped into subtrees with type
  96626. [`NodeType.none`](#common.NodeType^none).
  96627. */
  96628. balance(e = {}) {
  96629. return this.children.length <= 8 ? this : h4(Ci.none, this.children, this.positions, 0, this.children.length, 0, this.length, (n, r, i) => new Wn(this.type, n, r, i, this.propValues), e.makeTree || ((n, r, i) => new Wn(Ci.none, n, r, i)));
  96630. }
  96631. /**
  96632. Build a tree from a postfix-ordered buffer of node information,
  96633. or a cursor over such a buffer.
  96634. */
  96635. static build(e) {
  96636. return clt(e);
  96637. }
  96638. }
  96639. Wn.empty = new Wn(Ci.none, [], [], 0);
  96640. class f4 {
  96641. constructor(e, n) {
  96642. this.buffer = e, this.index = n;
  96643. }
  96644. get id() {
  96645. return this.buffer[this.index - 4];
  96646. }
  96647. get start() {
  96648. return this.buffer[this.index - 3];
  96649. }
  96650. get end() {
  96651. return this.buffer[this.index - 2];
  96652. }
  96653. get size() {
  96654. return this.buffer[this.index - 1];
  96655. }
  96656. get pos() {
  96657. return this.index;
  96658. }
  96659. next() {
  96660. this.index -= 4;
  96661. }
  96662. fork() {
  96663. return new f4(this.buffer, this.index);
  96664. }
  96665. }
  96666. class mu {
  96667. /**
  96668. Create a tree buffer.
  96669. */
  96670. constructor(e, n, r) {
  96671. this.buffer = e, this.length = n, this.set = r;
  96672. }
  96673. /**
  96674. @internal
  96675. */
  96676. get type() {
  96677. return Ci.none;
  96678. }
  96679. /**
  96680. @internal
  96681. */
  96682. toString() {
  96683. let e = [];
  96684. for (let n = 0; n < this.buffer.length; )
  96685. e.push(this.childString(n)), n = this.buffer[n + 3];
  96686. return e.join(",");
  96687. }
  96688. /**
  96689. @internal
  96690. */
  96691. childString(e) {
  96692. let n = this.buffer[e], r = this.buffer[e + 3], i = this.set.types[n], a = i.name;
  96693. if (/\W/.test(a) && !i.isError && (a = JSON.stringify(a)), e += 4, r == e)
  96694. return a;
  96695. let o = [];
  96696. for (; e < r; )
  96697. o.push(this.childString(e)), e = this.buffer[e + 3];
  96698. return a + "(" + o.join(",") + ")";
  96699. }
  96700. /**
  96701. @internal
  96702. */
  96703. findChild(e, n, r, i, a) {
  96704. let { buffer: o } = this, s = -1;
  96705. for (let l = e; l != n && !(Aoe(a, i, o[l + 1], o[l + 2]) && (s = l, r > 0)); l = o[l + 3])
  96706. ;
  96707. return s;
  96708. }
  96709. /**
  96710. @internal
  96711. */
  96712. slice(e, n, r) {
  96713. let i = this.buffer, a = new Uint16Array(n - e), o = 0;
  96714. for (let s = e, l = 0; s < n; ) {
  96715. a[l++] = i[s++], a[l++] = i[s++] - r;
  96716. let u = a[l++] = i[s++] - r;
  96717. a[l++] = i[s++] - e, o = Math.max(o, u);
  96718. }
  96719. return new mu(a, o, this.set);
  96720. }
  96721. }
  96722. function Aoe(t, e, n, r) {
  96723. switch (t) {
  96724. case -2:
  96725. return n < e;
  96726. case -1:
  96727. return r >= e && n < e;
  96728. case 0:
  96729. return n < e && r > e;
  96730. case 1:
  96731. return n <= e && r > e;
  96732. case 2:
  96733. return r > e;
  96734. case 4:
  96735. return !0;
  96736. }
  96737. }
  96738. function Jm(t, e, n, r) {
  96739. for (var i; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
  96740. let o = !r && t instanceof xi && t.index < 0 ? null : t.parent;
  96741. if (!o)
  96742. return t;
  96743. t = o;
  96744. }
  96745. let a = r ? 0 : Zn.IgnoreOverlays;
  96746. if (r)
  96747. for (let o = t, s = o.parent; s; o = s, s = o.parent)
  96748. o instanceof xi && o.index < 0 && ((i = s.enter(e, n, a)) === null || i === void 0 ? void 0 : i.from) != o.from && (t = s);
  96749. for (; ; ) {
  96750. let o = t.enter(e, n, a);
  96751. if (!o)
  96752. return t;
  96753. t = o;
  96754. }
  96755. }
  96756. class Eoe {
  96757. cursor(e = 0) {
  96758. return new BM(this, e);
  96759. }
  96760. getChild(e, n = null, r = null) {
  96761. let i = w9(this, e, n, r);
  96762. return i.length ? i[0] : null;
  96763. }
  96764. getChildren(e, n = null, r = null) {
  96765. return w9(this, e, n, r);
  96766. }
  96767. resolve(e, n = 0) {
  96768. return Jm(this, e, n, !1);
  96769. }
  96770. resolveInner(e, n = 0) {
  96771. return Jm(this, e, n, !0);
  96772. }
  96773. matchContext(e) {
  96774. return NM(this, e);
  96775. }
  96776. enterUnfinishedNodesBefore(e) {
  96777. let n = this.childBefore(e), r = this;
  96778. for (; n; ) {
  96779. let i = n.lastChild;
  96780. if (!i || i.to != n.to)
  96781. break;
  96782. i.type.isError && i.from == i.to ? (r = n, n = i.prevSibling) : n = i;
  96783. }
  96784. return r;
  96785. }
  96786. get node() {
  96787. return this;
  96788. }
  96789. get next() {
  96790. return this.parent;
  96791. }
  96792. }
  96793. class xi extends Eoe {
  96794. constructor(e, n, r, i) {
  96795. super(), this._tree = e, this.from = n, this.index = r, this._parent = i;
  96796. }
  96797. get type() {
  96798. return this._tree.type;
  96799. }
  96800. get name() {
  96801. return this._tree.type.name;
  96802. }
  96803. get to() {
  96804. return this.from + this._tree.length;
  96805. }
  96806. nextChild(e, n, r, i, a = 0) {
  96807. for (let o = this; ; ) {
  96808. for (let { children: s, positions: l } = o._tree, u = n > 0 ? s.length : -1; e != u; e += n) {
  96809. let c = s[e], f = l[e] + o.from;
  96810. if (Aoe(i, r, f, f + c.length)) {
  96811. if (c instanceof mu) {
  96812. if (a & Zn.ExcludeBuffers)
  96813. continue;
  96814. let d = c.findChild(0, c.buffer.length, n, r - f, i);
  96815. if (d > -1)
  96816. return new Qo(new slt(o, c, e, f), null, d);
  96817. } else if (a & Zn.IncludeAnonymous || !c.type.isAnonymous || d4(c)) {
  96818. let d;
  96819. if (!(a & Zn.IgnoreMounts) && (d = sS.get(c)) && !d.overlay)
  96820. return new xi(d.tree, f, e, o);
  96821. let h = new xi(c, f, e, o);
  96822. return a & Zn.IncludeAnonymous || !h.type.isAnonymous ? h : h.nextChild(n < 0 ? c.children.length - 1 : 0, n, r, i);
  96823. }
  96824. }
  96825. }
  96826. if (a & Zn.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? e = o.index + n : e = n < 0 ? -1 : o._parent._tree.children.length, o = o._parent, !o))
  96827. return null;
  96828. }
  96829. }
  96830. get firstChild() {
  96831. return this.nextChild(
  96832. 0,
  96833. 1,
  96834. 0,
  96835. 4
  96836. /* Side.DontCare */
  96837. );
  96838. }
  96839. get lastChild() {
  96840. return this.nextChild(
  96841. this._tree.children.length - 1,
  96842. -1,
  96843. 0,
  96844. 4
  96845. /* Side.DontCare */
  96846. );
  96847. }
  96848. childAfter(e) {
  96849. return this.nextChild(
  96850. 0,
  96851. 1,
  96852. e,
  96853. 2
  96854. /* Side.After */
  96855. );
  96856. }
  96857. childBefore(e) {
  96858. return this.nextChild(
  96859. this._tree.children.length - 1,
  96860. -1,
  96861. e,
  96862. -2
  96863. /* Side.Before */
  96864. );
  96865. }
  96866. enter(e, n, r = 0) {
  96867. let i;
  96868. if (!(r & Zn.IgnoreOverlays) && (i = sS.get(this._tree)) && i.overlay) {
  96869. let a = e - this.from;
  96870. for (let { from: o, to: s } of i.overlay)
  96871. if ((n > 0 ? o <= a : o < a) && (n < 0 ? s >= a : s > a))
  96872. return new xi(i.tree, i.overlay[0].from + this.from, -1, this);
  96873. }
  96874. return this.nextChild(0, 1, e, n, r);
  96875. }
  96876. nextSignificantParent() {
  96877. let e = this;
  96878. for (; e.type.isAnonymous && e._parent; )
  96879. e = e._parent;
  96880. return e;
  96881. }
  96882. get parent() {
  96883. return this._parent ? this._parent.nextSignificantParent() : null;
  96884. }
  96885. get nextSibling() {
  96886. return this._parent && this.index >= 0 ? this._parent.nextChild(
  96887. this.index + 1,
  96888. 1,
  96889. 0,
  96890. 4
  96891. /* Side.DontCare */
  96892. ) : null;
  96893. }
  96894. get prevSibling() {
  96895. return this._parent && this.index >= 0 ? this._parent.nextChild(
  96896. this.index - 1,
  96897. -1,
  96898. 0,
  96899. 4
  96900. /* Side.DontCare */
  96901. ) : null;
  96902. }
  96903. get tree() {
  96904. return this._tree;
  96905. }
  96906. toTree() {
  96907. return this._tree;
  96908. }
  96909. /**
  96910. @internal
  96911. */
  96912. toString() {
  96913. return this._tree.toString();
  96914. }
  96915. }
  96916. function w9(t, e, n, r) {
  96917. let i = t.cursor(), a = [];
  96918. if (!i.firstChild())
  96919. return a;
  96920. if (n != null) {
  96921. for (let o = !1; !o; )
  96922. if (o = i.type.is(n), !i.nextSibling())
  96923. return a;
  96924. }
  96925. for (; ; ) {
  96926. if (r != null && i.type.is(r))
  96927. return a;
  96928. if (i.type.is(e) && a.push(i.node), !i.nextSibling())
  96929. return r == null ? a : [];
  96930. }
  96931. }
  96932. function NM(t, e, n = e.length - 1) {
  96933. for (let r = t.parent; n >= 0; r = r.parent) {
  96934. if (!r)
  96935. return !1;
  96936. if (!r.type.isAnonymous) {
  96937. if (e[n] && e[n] != r.name)
  96938. return !1;
  96939. n--;
  96940. }
  96941. }
  96942. return !0;
  96943. }
  96944. class slt {
  96945. constructor(e, n, r, i) {
  96946. this.parent = e, this.buffer = n, this.index = r, this.start = i;
  96947. }
  96948. }
  96949. class Qo extends Eoe {
  96950. get name() {
  96951. return this.type.name;
  96952. }
  96953. get from() {
  96954. return this.context.start + this.context.buffer.buffer[this.index + 1];
  96955. }
  96956. get to() {
  96957. return this.context.start + this.context.buffer.buffer[this.index + 2];
  96958. }
  96959. constructor(e, n, r) {
  96960. super(), this.context = e, this._parent = n, this.index = r, this.type = e.buffer.set.types[e.buffer.buffer[r]];
  96961. }
  96962. child(e, n, r) {
  96963. let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.context.start, r);
  96964. return a < 0 ? null : new Qo(this.context, this, a);
  96965. }
  96966. get firstChild() {
  96967. return this.child(
  96968. 1,
  96969. 0,
  96970. 4
  96971. /* Side.DontCare */
  96972. );
  96973. }
  96974. get lastChild() {
  96975. return this.child(
  96976. -1,
  96977. 0,
  96978. 4
  96979. /* Side.DontCare */
  96980. );
  96981. }
  96982. childAfter(e) {
  96983. return this.child(
  96984. 1,
  96985. e,
  96986. 2
  96987. /* Side.After */
  96988. );
  96989. }
  96990. childBefore(e) {
  96991. return this.child(
  96992. -1,
  96993. e,
  96994. -2
  96995. /* Side.Before */
  96996. );
  96997. }
  96998. enter(e, n, r = 0) {
  96999. if (r & Zn.ExcludeBuffers)
  97000. return null;
  97001. let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], n > 0 ? 1 : -1, e - this.context.start, n);
  97002. return a < 0 ? null : new Qo(this.context, this, a);
  97003. }
  97004. get parent() {
  97005. return this._parent || this.context.parent.nextSignificantParent();
  97006. }
  97007. externalSibling(e) {
  97008. return this._parent ? null : this.context.parent.nextChild(
  97009. this.context.index + e,
  97010. e,
  97011. 0,
  97012. 4
  97013. /* Side.DontCare */
  97014. );
  97015. }
  97016. get nextSibling() {
  97017. let { buffer: e } = this.context, n = e.buffer[this.index + 3];
  97018. return n < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Qo(this.context, this._parent, n) : this.externalSibling(1);
  97019. }
  97020. get prevSibling() {
  97021. let { buffer: e } = this.context, n = this._parent ? this._parent.index + 4 : 0;
  97022. return this.index == n ? this.externalSibling(-1) : new Qo(this.context, this._parent, e.findChild(
  97023. n,
  97024. this.index,
  97025. -1,
  97026. 0,
  97027. 4
  97028. /* Side.DontCare */
  97029. ));
  97030. }
  97031. get tree() {
  97032. return null;
  97033. }
  97034. toTree() {
  97035. let e = [], n = [], { buffer: r } = this.context, i = this.index + 4, a = r.buffer[this.index + 3];
  97036. if (a > i) {
  97037. let o = r.buffer[this.index + 1];
  97038. e.push(r.slice(i, a, o)), n.push(0);
  97039. }
  97040. return new Wn(this.type, e, n, this.to - this.from);
  97041. }
  97042. /**
  97043. @internal
  97044. */
  97045. toString() {
  97046. return this.context.buffer.childString(this.index);
  97047. }
  97048. }
  97049. function Moe(t) {
  97050. if (!t.length)
  97051. return null;
  97052. let e = 0, n = t[0];
  97053. for (let a = 1; a < t.length; a++) {
  97054. let o = t[a];
  97055. (o.from > n.from || o.to < n.to) && (n = o, e = a);
  97056. }
  97057. let r = n instanceof xi && n.index < 0 ? null : n.parent, i = t.slice();
  97058. return r ? i[e] = r : i.splice(e, 1), new llt(i, n);
  97059. }
  97060. class llt {
  97061. constructor(e, n) {
  97062. this.heads = e, this.node = n;
  97063. }
  97064. get next() {
  97065. return Moe(this.heads);
  97066. }
  97067. }
  97068. function ult(t, e, n) {
  97069. let r = t.resolveInner(e, n), i = null;
  97070. for (let a = r instanceof xi ? r : r.context.parent; a; a = a.parent)
  97071. if (a.index < 0) {
  97072. let o = a.parent;
  97073. (i || (i = [r])).push(o.resolve(e, n)), a = o;
  97074. } else {
  97075. let o = sS.get(a.tree);
  97076. if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
  97077. let s = new xi(o.tree, o.overlay[0].from + a.from, -1, a);
  97078. (i || (i = [r])).push(Jm(s, e, n, !1));
  97079. }
  97080. }
  97081. return i ? Moe(i) : r;
  97082. }
  97083. class BM {
  97084. /**
  97085. Shorthand for `.type.name`.
  97086. */
  97087. get name() {
  97088. return this.type.name;
  97089. }
  97090. /**
  97091. @internal
  97092. */
  97093. constructor(e, n = 0) {
  97094. if (this.mode = n, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof xi)
  97095. this.yieldNode(e);
  97096. else {
  97097. this._tree = e.context.parent, this.buffer = e.context;
  97098. for (let r = e._parent; r; r = r._parent)
  97099. this.stack.unshift(r.index);
  97100. this.bufferNode = e, this.yieldBuf(e.index);
  97101. }
  97102. }
  97103. yieldNode(e) {
  97104. return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
  97105. }
  97106. yieldBuf(e, n) {
  97107. this.index = e;
  97108. let { start: r, buffer: i } = this.buffer;
  97109. return this.type = n || i.set.types[i.buffer[e]], this.from = r + i.buffer[e + 1], this.to = r + i.buffer[e + 2], !0;
  97110. }
  97111. /**
  97112. @internal
  97113. */
  97114. yield(e) {
  97115. return e ? e instanceof xi ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
  97116. }
  97117. /**
  97118. @internal
  97119. */
  97120. toString() {
  97121. return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
  97122. }
  97123. /**
  97124. @internal
  97125. */
  97126. enterChild(e, n, r) {
  97127. if (!this.buffer)
  97128. return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, n, r, this.mode));
  97129. let { buffer: i } = this.buffer, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.buffer.start, r);
  97130. return a < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(a));
  97131. }
  97132. /**
  97133. Move the cursor to this node's first child. When this returns
  97134. false, the node has no child, and the cursor has not been moved.
  97135. */
  97136. firstChild() {
  97137. return this.enterChild(
  97138. 1,
  97139. 0,
  97140. 4
  97141. /* Side.DontCare */
  97142. );
  97143. }
  97144. /**
  97145. Move the cursor to this node's last child.
  97146. */
  97147. lastChild() {
  97148. return this.enterChild(
  97149. -1,
  97150. 0,
  97151. 4
  97152. /* Side.DontCare */
  97153. );
  97154. }
  97155. /**
  97156. Move the cursor to the first child that ends after `pos`.
  97157. */
  97158. childAfter(e) {
  97159. return this.enterChild(
  97160. 1,
  97161. e,
  97162. 2
  97163. /* Side.After */
  97164. );
  97165. }
  97166. /**
  97167. Move to the last child that starts before `pos`.
  97168. */
  97169. childBefore(e) {
  97170. return this.enterChild(
  97171. -1,
  97172. e,
  97173. -2
  97174. /* Side.Before */
  97175. );
  97176. }
  97177. /**
  97178. Move the cursor to the child around `pos`. If side is -1 the
  97179. child may end at that position, when 1 it may start there. This
  97180. will also enter [overlaid](#common.MountedTree.overlay)
  97181. [mounted](#common.NodeProp^mounted) trees unless `overlays` is
  97182. set to false.
  97183. */
  97184. enter(e, n, r = this.mode) {
  97185. return this.buffer ? r & Zn.ExcludeBuffers ? !1 : this.enterChild(1, e, n) : this.yield(this._tree.enter(e, n, r));
  97186. }
  97187. /**
  97188. Move to the node's parent node, if this isn't the top node.
  97189. */
  97190. parent() {
  97191. if (!this.buffer)
  97192. return this.yieldNode(this.mode & Zn.IncludeAnonymous ? this._tree._parent : this._tree.parent);
  97193. if (this.stack.length)
  97194. return this.yieldBuf(this.stack.pop());
  97195. let e = this.mode & Zn.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
  97196. return this.buffer = null, this.yieldNode(e);
  97197. }
  97198. /**
  97199. @internal
  97200. */
  97201. sibling(e) {
  97202. if (!this.buffer)
  97203. return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1;
  97204. let { buffer: n } = this.buffer, r = this.stack.length - 1;
  97205. if (e < 0) {
  97206. let i = r < 0 ? 0 : this.stack[r] + 4;
  97207. if (this.index != i)
  97208. return this.yieldBuf(n.findChild(
  97209. i,
  97210. this.index,
  97211. -1,
  97212. 0,
  97213. 4
  97214. /* Side.DontCare */
  97215. ));
  97216. } else {
  97217. let i = n.buffer[this.index + 3];
  97218. if (i < (r < 0 ? n.buffer.length : n.buffer[this.stack[r] + 3]))
  97219. return this.yieldBuf(i);
  97220. }
  97221. return r < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
  97222. }
  97223. /**
  97224. Move to this node's next sibling, if any.
  97225. */
  97226. nextSibling() {
  97227. return this.sibling(1);
  97228. }
  97229. /**
  97230. Move to this node's previous sibling, if any.
  97231. */
  97232. prevSibling() {
  97233. return this.sibling(-1);
  97234. }
  97235. atLastNode(e) {
  97236. let n, r, { buffer: i } = this;
  97237. if (i) {
  97238. if (e > 0) {
  97239. if (this.index < i.buffer.buffer.length)
  97240. return !1;
  97241. } else
  97242. for (let a = 0; a < this.index; a++)
  97243. if (i.buffer.buffer[a + 3] < this.index)
  97244. return !1;
  97245. ({ index: n, parent: r } = i);
  97246. } else
  97247. ({ index: n, _parent: r } = this._tree);
  97248. for (; r; { index: n, _parent: r } = r)
  97249. if (n > -1)
  97250. for (let a = n + e, o = e < 0 ? -1 : r._tree.children.length; a != o; a += e) {
  97251. let s = r._tree.children[a];
  97252. if (this.mode & Zn.IncludeAnonymous || s instanceof mu || !s.type.isAnonymous || d4(s))
  97253. return !1;
  97254. }
  97255. return !0;
  97256. }
  97257. move(e, n) {
  97258. if (n && this.enterChild(
  97259. e,
  97260. 0,
  97261. 4
  97262. /* Side.DontCare */
  97263. ))
  97264. return !0;
  97265. for (; ; ) {
  97266. if (this.sibling(e))
  97267. return !0;
  97268. if (this.atLastNode(e) || !this.parent())
  97269. return !1;
  97270. }
  97271. }
  97272. /**
  97273. Move to the next node in a
  97274. [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
  97275. traversal, going from a node to its first child or, if the
  97276. current node is empty or `enter` is false, its next sibling or
  97277. the next sibling of the first parent node that has one.
  97278. */
  97279. next(e = !0) {
  97280. return this.move(1, e);
  97281. }
  97282. /**
  97283. Move to the next node in a last-to-first pre-order traveral. A
  97284. node is followed by its last child or, if it has none, its
  97285. previous sibling or the previous sibling of the first parent
  97286. node that has one.
  97287. */
  97288. prev(e = !0) {
  97289. return this.move(-1, e);
  97290. }
  97291. /**
  97292. Move the cursor to the innermost node that covers `pos`. If
  97293. `side` is -1, it will enter nodes that end at `pos`. If it is 1,
  97294. it will enter nodes that start at `pos`.
  97295. */
  97296. moveTo(e, n = 0) {
  97297. for (; (this.from == this.to || (n < 1 ? this.from >= e : this.from > e) || (n > -1 ? this.to <= e : this.to < e)) && this.parent(); )
  97298. ;
  97299. for (; this.enterChild(1, e, n); )
  97300. ;
  97301. return this;
  97302. }
  97303. /**
  97304. Get a [syntax node](#common.SyntaxNode) at the cursor's current
  97305. position.
  97306. */
  97307. get node() {
  97308. if (!this.buffer)
  97309. return this._tree;
  97310. let e = this.bufferNode, n = null, r = 0;
  97311. if (e && e.context == this.buffer)
  97312. e: for (let i = this.index, a = this.stack.length; a >= 0; ) {
  97313. for (let o = e; o; o = o._parent)
  97314. if (o.index == i) {
  97315. if (i == this.index)
  97316. return o;
  97317. n = o, r = a + 1;
  97318. break e;
  97319. }
  97320. i = this.stack[--a];
  97321. }
  97322. for (let i = r; i < this.stack.length; i++)
  97323. n = new Qo(this.buffer, n, this.stack[i]);
  97324. return this.bufferNode = new Qo(this.buffer, n, this.index);
  97325. }
  97326. /**
  97327. Get the [tree](#common.Tree) that represents the current node, if
  97328. any. Will return null when the node is in a [tree
  97329. buffer](#common.TreeBuffer).
  97330. */
  97331. get tree() {
  97332. return this.buffer ? null : this._tree._tree;
  97333. }
  97334. /**
  97335. Iterate over the current node and all its descendants, calling
  97336. `enter` when entering a node and `leave`, if given, when leaving
  97337. one. When `enter` returns `false`, any children of that node are
  97338. skipped, and `leave` isn't called for it.
  97339. */
  97340. iterate(e, n) {
  97341. for (let r = 0; ; ) {
  97342. let i = !1;
  97343. if (this.type.isAnonymous || e(this) !== !1) {
  97344. if (this.firstChild()) {
  97345. r++;
  97346. continue;
  97347. }
  97348. this.type.isAnonymous || (i = !0);
  97349. }
  97350. for (; i && n && n(this), i = this.type.isAnonymous, !this.nextSibling(); ) {
  97351. if (!r)
  97352. return;
  97353. this.parent(), r--, i = !0;
  97354. }
  97355. }
  97356. }
  97357. /**
  97358. Test whether the current node matches a given context—a sequence
  97359. of direct parent node names. Empty strings in the context array
  97360. are treated as wildcards.
  97361. */
  97362. matchContext(e) {
  97363. if (!this.buffer)
  97364. return NM(this.node, e);
  97365. let { buffer: n } = this.buffer, { types: r } = n.set;
  97366. for (let i = e.length - 1, a = this.stack.length - 1; i >= 0; a--) {
  97367. if (a < 0)
  97368. return NM(this.node, e, i);
  97369. let o = r[n.buffer[this.stack[a]]];
  97370. if (!o.isAnonymous) {
  97371. if (e[i] && e[i] != o.name)
  97372. return !1;
  97373. i--;
  97374. }
  97375. }
  97376. return !0;
  97377. }
  97378. }
  97379. function d4(t) {
  97380. return t.children.some((e) => e instanceof mu || !e.type.isAnonymous || d4(e));
  97381. }
  97382. function clt(t) {
  97383. var e;
  97384. let { buffer: n, nodeSet: r, maxBufferLength: i = $oe, reused: a = [], minRepeatType: o = r.types.length } = t, s = Array.isArray(n) ? new f4(n, n.length) : n, l = r.types, u = 0, c = 0;
  97385. function f(O, S, x, C, T, w) {
  97386. let { id: P, start: $, end: A, size: D } = s, E = c;
  97387. for (; D < 0; )
  97388. if (s.next(), D == -1) {
  97389. let W = a[P];
  97390. x.push(W), C.push($ - O);
  97391. return;
  97392. } else if (D == -3) {
  97393. u = P;
  97394. return;
  97395. } else if (D == -4) {
  97396. c = P;
  97397. return;
  97398. } else
  97399. throw new RangeError(`Unrecognized record size: ${D}`);
  97400. let R = l[P], N, V, z = $ - O;
  97401. if (A - $ <= i && (V = g(s.pos - S, T))) {
  97402. let W = new Uint16Array(V.size - V.skip), F = s.pos - V.size, Q = W.length;
  97403. for (; s.pos > F; )
  97404. Q = m(V.start, W, Q);
  97405. N = new mu(W, A - V.start, r), z = V.start - O;
  97406. } else {
  97407. let W = s.pos - D;
  97408. s.next();
  97409. let F = [], Q = [], Z = P >= o ? P : -1, ne = 0, ee = A;
  97410. for (; s.pos > W; )
  97411. Z >= 0 && s.id == Z && s.size >= 0 ? (s.end <= ee - i && (p(F, Q, $, ne, s.end, ee, Z, E), ne = F.length, ee = s.end), s.next()) : w > 2500 ? d($, W, F, Q) : f($, W, F, Q, Z, w + 1);
  97412. if (Z >= 0 && ne > 0 && ne < F.length && p(F, Q, $, ne, $, ee, Z, E), F.reverse(), Q.reverse(), Z > -1 && ne > 0) {
  97413. let oe = h(R);
  97414. N = h4(R, F, Q, 0, F.length, 0, A - $, oe, oe);
  97415. } else
  97416. N = v(R, F, Q, A - $, E - A);
  97417. }
  97418. x.push(N), C.push(z);
  97419. }
  97420. function d(O, S, x, C) {
  97421. let T = [], w = 0, P = -1;
  97422. for (; s.pos > S; ) {
  97423. let { id: $, start: A, end: D, size: E } = s;
  97424. if (E > 4)
  97425. s.next();
  97426. else {
  97427. if (P > -1 && A < P)
  97428. break;
  97429. P < 0 && (P = D - i), T.push($, A, D), w++, s.next();
  97430. }
  97431. }
  97432. if (w) {
  97433. let $ = new Uint16Array(w * 4), A = T[T.length - 2];
  97434. for (let D = T.length - 3, E = 0; D >= 0; D -= 3)
  97435. $[E++] = T[D], $[E++] = T[D + 1] - A, $[E++] = T[D + 2] - A, $[E++] = E;
  97436. x.push(new mu($, T[2] - A, r)), C.push(A - O);
  97437. }
  97438. }
  97439. function h(O) {
  97440. return (S, x, C) => {
  97441. let T = 0, w = S.length - 1, P, $;
  97442. if (w >= 0 && (P = S[w]) instanceof Wn) {
  97443. if (!w && P.type == O && P.length == C)
  97444. return P;
  97445. ($ = P.prop(Pt.lookAhead)) && (T = x[w] + P.length + $);
  97446. }
  97447. return v(O, S, x, C, T);
  97448. };
  97449. }
  97450. function p(O, S, x, C, T, w, P, $) {
  97451. let A = [], D = [];
  97452. for (; O.length > C; )
  97453. A.push(O.pop()), D.push(S.pop() + x - T);
  97454. O.push(v(r.types[P], A, D, w - T, $ - w)), S.push(T - x);
  97455. }
  97456. function v(O, S, x, C, T = 0, w) {
  97457. if (u) {
  97458. let P = [Pt.contextHash, u];
  97459. w = w ? [P].concat(w) : [P];
  97460. }
  97461. if (T > 25) {
  97462. let P = [Pt.lookAhead, T];
  97463. w = w ? [P].concat(w) : [P];
  97464. }
  97465. return new Wn(O, S, x, C, w);
  97466. }
  97467. function g(O, S) {
  97468. let x = s.fork(), C = 0, T = 0, w = 0, P = x.end - i, $ = { size: 0, start: 0, skip: 0 };
  97469. e: for (let A = x.pos - O; x.pos > A; ) {
  97470. let D = x.size;
  97471. if (x.id == S && D >= 0) {
  97472. $.size = C, $.start = T, $.skip = w, w += 4, C += 4, x.next();
  97473. continue;
  97474. }
  97475. let E = x.pos - D;
  97476. if (D < 0 || E < A || x.start < P)
  97477. break;
  97478. let R = x.id >= o ? 4 : 0, N = x.start;
  97479. for (x.next(); x.pos > E; ) {
  97480. if (x.size < 0)
  97481. if (x.size == -3)
  97482. R += 4;
  97483. else
  97484. break e;
  97485. else x.id >= o && (R += 4);
  97486. x.next();
  97487. }
  97488. T = N, C += D, w += R;
  97489. }
  97490. return (S < 0 || C == O) && ($.size = C, $.start = T, $.skip = w), $.size > 4 ? $ : void 0;
  97491. }
  97492. function m(O, S, x) {
  97493. let { id: C, start: T, end: w, size: P } = s;
  97494. if (s.next(), P >= 0 && C < o) {
  97495. let $ = x;
  97496. if (P > 4) {
  97497. let A = s.pos - (P - 4);
  97498. for (; s.pos > A; )
  97499. x = m(O, S, x);
  97500. }
  97501. S[--x] = $, S[--x] = w - O, S[--x] = T - O, S[--x] = C;
  97502. } else P == -3 ? u = C : P == -4 && (c = C);
  97503. return x;
  97504. }
  97505. let y = [], b = [];
  97506. for (; s.pos > 0; )
  97507. f(t.start || 0, t.bufferStart || 0, y, b, -1, 0);
  97508. let _ = (e = t.length) !== null && e !== void 0 ? e : y.length ? b[0] + y[0].length : 0;
  97509. return new Wn(l[t.topID], y.reverse(), b.reverse(), _);
  97510. }
  97511. const C9 = /* @__PURE__ */ new WeakMap();
  97512. function c1(t, e) {
  97513. if (!t.isAnonymous || e instanceof mu || e.type != t)
  97514. return 1;
  97515. let n = C9.get(e);
  97516. if (n == null) {
  97517. n = 1;
  97518. for (let r of e.children) {
  97519. if (r.type != t || !(r instanceof Wn)) {
  97520. n = 1;
  97521. break;
  97522. }
  97523. n += c1(t, r);
  97524. }
  97525. C9.set(e, n);
  97526. }
  97527. return n;
  97528. }
  97529. function h4(t, e, n, r, i, a, o, s, l) {
  97530. let u = 0;
  97531. for (let p = r; p < i; p++)
  97532. u += c1(t, e[p]);
  97533. let c = Math.ceil(
  97534. u * 1.5 / 8
  97535. /* Balance.BranchFactor */
  97536. ), f = [], d = [];
  97537. function h(p, v, g, m, y) {
  97538. for (let b = g; b < m; ) {
  97539. let _ = b, O = v[b], S = c1(t, p[b]);
  97540. for (b++; b < m; b++) {
  97541. let x = c1(t, p[b]);
  97542. if (S + x >= c)
  97543. break;
  97544. S += x;
  97545. }
  97546. if (b == _ + 1) {
  97547. if (S > c) {
  97548. let x = p[_];
  97549. h(x.children, x.positions, 0, x.children.length, v[_] + y);
  97550. continue;
  97551. }
  97552. f.push(p[_]);
  97553. } else {
  97554. let x = v[b - 1] + p[b - 1].length - O;
  97555. f.push(h4(t, p, v, _, b, O, x, null, l));
  97556. }
  97557. d.push(O + y - a);
  97558. }
  97559. }
  97560. return h(e, n, r, i, 0), (s || l)(f, d, o);
  97561. }
  97562. class flt {
  97563. constructor() {
  97564. this.map = /* @__PURE__ */ new WeakMap();
  97565. }
  97566. setBuffer(e, n, r) {
  97567. let i = this.map.get(e);
  97568. i || this.map.set(e, i = /* @__PURE__ */ new Map()), i.set(n, r);
  97569. }
  97570. getBuffer(e, n) {
  97571. let r = this.map.get(e);
  97572. return r && r.get(n);
  97573. }
  97574. /**
  97575. Set the value for this syntax node.
  97576. */
  97577. set(e, n) {
  97578. e instanceof Qo ? this.setBuffer(e.context.buffer, e.index, n) : e instanceof xi && this.map.set(e.tree, n);
  97579. }
  97580. /**
  97581. Retrieve value for this syntax node, if it exists in the map.
  97582. */
  97583. get(e) {
  97584. return e instanceof Qo ? this.getBuffer(e.context.buffer, e.index) : e instanceof xi ? this.map.get(e.tree) : void 0;
  97585. }
  97586. /**
  97587. Set the value for the node that a cursor currently points to.
  97588. */
  97589. cursorSet(e, n) {
  97590. e.buffer ? this.setBuffer(e.buffer.buffer, e.index, n) : this.map.set(e.tree, n);
  97591. }
  97592. /**
  97593. Retrieve the value for the node that a cursor currently points
  97594. to.
  97595. */
  97596. cursorGet(e) {
  97597. return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree);
  97598. }
  97599. }
  97600. class af {
  97601. /**
  97602. Construct a tree fragment. You'll usually want to use
  97603. [`addTree`](#common.TreeFragment^addTree) and
  97604. [`applyChanges`](#common.TreeFragment^applyChanges) instead of
  97605. calling this directly.
  97606. */
  97607. constructor(e, n, r, i, a = !1, o = !1) {
  97608. this.from = e, this.to = n, this.tree = r, this.offset = i, this.open = (a ? 1 : 0) | (o ? 2 : 0);
  97609. }
  97610. /**
  97611. Whether the start of the fragment represents the start of a
  97612. parse, or the end of a change. (In the second case, it may not
  97613. be safe to reuse some nodes at the start, depending on the
  97614. parsing algorithm.)
  97615. */
  97616. get openStart() {
  97617. return (this.open & 1) > 0;
  97618. }
  97619. /**
  97620. Whether the end of the fragment represents the end of a
  97621. full-document parse, or the start of a change.
  97622. */
  97623. get openEnd() {
  97624. return (this.open & 2) > 0;
  97625. }
  97626. /**
  97627. Create a set of fragments from a freshly parsed tree, or update
  97628. an existing set of fragments by replacing the ones that overlap
  97629. with a tree with content from the new tree. When `partial` is
  97630. true, the parse is treated as incomplete, and the resulting
  97631. fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
  97632. true.
  97633. */
  97634. static addTree(e, n = [], r = !1) {
  97635. let i = [new af(0, e.length, e, 0, !1, r)];
  97636. for (let a of n)
  97637. a.to > e.length && i.push(a);
  97638. return i;
  97639. }
  97640. /**
  97641. Apply a set of edits to an array of fragments, removing or
  97642. splitting fragments as necessary to remove edited ranges, and
  97643. adjusting offsets for fragments that moved.
  97644. */
  97645. static applyChanges(e, n, r = 128) {
  97646. if (!n.length)
  97647. return e;
  97648. let i = [], a = 1, o = e.length ? e[0] : null;
  97649. for (let s = 0, l = 0, u = 0; ; s++) {
  97650. let c = s < n.length ? n[s] : null, f = c ? c.fromA : 1e9;
  97651. if (f - l >= r)
  97652. for (; o && o.from < f; ) {
  97653. let d = o;
  97654. if (l >= d.from || f <= d.to || u) {
  97655. let h = Math.max(d.from, l) - u, p = Math.min(d.to, f) - u;
  97656. d = h >= p ? null : new af(h, p, d.tree, d.offset + u, s > 0, !!c);
  97657. }
  97658. if (d && i.push(d), o.to > f)
  97659. break;
  97660. o = a < e.length ? e[a++] : null;
  97661. }
  97662. if (!c)
  97663. break;
  97664. l = c.toA, u = c.toA - c.toB;
  97665. }
  97666. return i;
  97667. }
  97668. }
  97669. class Ioe {
  97670. /**
  97671. Start a parse, returning a [partial parse](#common.PartialParse)
  97672. object. [`fragments`](#common.TreeFragment) can be passed in to
  97673. make the parse incremental.
  97674. By default, the entire input is parsed. You can pass `ranges`,
  97675. which should be a sorted array of non-empty, non-overlapping
  97676. ranges, to parse only those ranges. The tree returned in that
  97677. case will start at `ranges[0].from`.
  97678. */
  97679. startParse(e, n, r) {
  97680. return typeof e == "string" && (e = new dlt(e)), r = r ? r.length ? r.map((i) => new C$(i.from, i.to)) : [new C$(0, 0)] : [new C$(0, e.length)], this.createParse(e, n || [], r);
  97681. }
  97682. /**
  97683. Run a full parse, returning the resulting tree.
  97684. */
  97685. parse(e, n, r) {
  97686. let i = this.startParse(e, n, r);
  97687. for (; ; ) {
  97688. let a = i.advance();
  97689. if (a)
  97690. return a;
  97691. }
  97692. }
  97693. }
  97694. class dlt {
  97695. constructor(e) {
  97696. this.string = e;
  97697. }
  97698. get length() {
  97699. return this.string.length;
  97700. }
  97701. chunk(e) {
  97702. return this.string.slice(e);
  97703. }
  97704. get lineChunks() {
  97705. return !1;
  97706. }
  97707. read(e, n) {
  97708. return this.string.slice(e, n);
  97709. }
  97710. }
  97711. new Pt({ perNode: !0 });
  97712. let hlt = 0;
  97713. class Ro {
  97714. /**
  97715. @internal
  97716. */
  97717. constructor(e, n, r) {
  97718. this.set = e, this.base = n, this.modified = r, this.id = hlt++;
  97719. }
  97720. /**
  97721. Define a new tag. If `parent` is given, the tag is treated as a
  97722. sub-tag of that parent, and
  97723. [highlighters](#highlight.tagHighlighter) that don't mention
  97724. this tag will try to fall back to the parent tag (or grandparent
  97725. tag, etc).
  97726. */
  97727. static define(e) {
  97728. if (e != null && e.base)
  97729. throw new Error("Can not derive from a modified tag");
  97730. let n = new Ro([], null, []);
  97731. if (n.set.push(n), e)
  97732. for (let r of e.set)
  97733. n.set.push(r);
  97734. return n;
  97735. }
  97736. /**
  97737. Define a tag _modifier_, which is a function that, given a tag,
  97738. will return a tag that is a subtag of the original. Applying the
  97739. same modifier to a twice tag will return the same value (`m1(t1)
  97740. == m1(t1)`) and applying multiple modifiers will, regardless or
  97741. order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
  97742. When multiple modifiers are applied to a given base tag, each
  97743. smaller set of modifiers is registered as a parent, so that for
  97744. example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
  97745. `m1(m3(t1)`, and so on.
  97746. */
  97747. static defineModifier() {
  97748. let e = new lS();
  97749. return (n) => n.modified.indexOf(e) > -1 ? n : lS.get(n.base || n, n.modified.concat(e).sort((r, i) => r.id - i.id));
  97750. }
  97751. }
  97752. let plt = 0;
  97753. class lS {
  97754. constructor() {
  97755. this.instances = [], this.id = plt++;
  97756. }
  97757. static get(e, n) {
  97758. if (!n.length)
  97759. return e;
  97760. let r = n[0].instances.find((s) => s.base == e && vlt(n, s.modified));
  97761. if (r)
  97762. return r;
  97763. let i = [], a = new Ro(i, e, n);
  97764. for (let s of n)
  97765. s.instances.push(a);
  97766. let o = glt(n);
  97767. for (let s of e.set)
  97768. if (!s.modified.length)
  97769. for (let l of o)
  97770. i.push(lS.get(s, l));
  97771. return a;
  97772. }
  97773. }
  97774. function vlt(t, e) {
  97775. return t.length == e.length && t.every((n, r) => n == e[r]);
  97776. }
  97777. function glt(t) {
  97778. let e = [[]];
  97779. for (let n = 0; n < t.length; n++)
  97780. for (let r = 0, i = e.length; r < i; r++)
  97781. e.push(e[r].concat(t[n]));
  97782. return e.sort((n, r) => r.length - n.length);
  97783. }
  97784. function p4(t) {
  97785. let e = /* @__PURE__ */ Object.create(null);
  97786. for (let n in t) {
  97787. let r = t[n];
  97788. Array.isArray(r) || (r = [r]);
  97789. for (let i of n.split(" "))
  97790. if (i) {
  97791. let a = [], o = 2, s = i;
  97792. for (let f = 0; ; ) {
  97793. if (s == "..." && f > 0 && f + 3 == i.length) {
  97794. o = 1;
  97795. break;
  97796. }
  97797. let d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);
  97798. if (!d)
  97799. throw new RangeError("Invalid path: " + i);
  97800. if (a.push(d[0] == "*" ? "" : d[0][0] == '"' ? JSON.parse(d[0]) : d[0]), f += d[0].length, f == i.length)
  97801. break;
  97802. let h = i[f++];
  97803. if (f == i.length && h == "!") {
  97804. o = 0;
  97805. break;
  97806. }
  97807. if (h != "/")
  97808. throw new RangeError("Invalid path: " + i);
  97809. s = i.slice(f);
  97810. }
  97811. let l = a.length - 1, u = a[l];
  97812. if (!u)
  97813. throw new RangeError("Invalid path: " + i);
  97814. let c = new uS(r, o, l > 0 ? a.slice(0, l) : null);
  97815. e[u] = c.sort(e[u]);
  97816. }
  97817. }
  97818. return Doe.add(e);
  97819. }
  97820. const Doe = new Pt();
  97821. class uS {
  97822. constructor(e, n, r, i) {
  97823. this.tags = e, this.mode = n, this.context = r, this.next = i;
  97824. }
  97825. get opaque() {
  97826. return this.mode == 0;
  97827. }
  97828. get inherit() {
  97829. return this.mode == 1;
  97830. }
  97831. sort(e) {
  97832. return !e || e.depth < this.depth ? (this.next = e, this) : (e.next = this.sort(e.next), e);
  97833. }
  97834. get depth() {
  97835. return this.context ? this.context.length : 0;
  97836. }
  97837. }
  97838. uS.empty = new uS([], 2, null);
  97839. function Roe(t, e) {
  97840. let n = /* @__PURE__ */ Object.create(null);
  97841. for (let a of t)
  97842. if (!Array.isArray(a.tag))
  97843. n[a.tag.id] = a.class;
  97844. else
  97845. for (let o of a.tag)
  97846. n[o.id] = a.class;
  97847. let { scope: r, all: i = null } = e || {};
  97848. return {
  97849. style: (a) => {
  97850. let o = i;
  97851. for (let s of a)
  97852. for (let l of s.set) {
  97853. let u = n[l.id];
  97854. if (u) {
  97855. o = o ? o + " " + u : u;
  97856. break;
  97857. }
  97858. }
  97859. return o;
  97860. },
  97861. scope: r
  97862. };
  97863. }
  97864. function mlt(t, e) {
  97865. let n = null;
  97866. for (let r of t) {
  97867. let i = r.style(e);
  97868. i && (n = n ? n + " " + i : i);
  97869. }
  97870. return n;
  97871. }
  97872. function ylt(t, e, n, r = 0, i = t.length) {
  97873. let a = new blt(r, Array.isArray(e) ? e : [e], n);
  97874. a.highlightRange(t.cursor(), r, i, "", a.highlighters), a.flush(i);
  97875. }
  97876. class blt {
  97877. constructor(e, n, r) {
  97878. this.at = e, this.highlighters = n, this.span = r, this.class = "";
  97879. }
  97880. startSpan(e, n) {
  97881. n != this.class && (this.flush(e), e > this.at && (this.at = e), this.class = n);
  97882. }
  97883. flush(e) {
  97884. e > this.at && this.class && this.span(this.at, e, this.class);
  97885. }
  97886. highlightRange(e, n, r, i, a) {
  97887. let { type: o, from: s, to: l } = e;
  97888. if (s >= r || l <= n)
  97889. return;
  97890. o.isTop && (a = this.highlighters.filter((h) => !h.scope || h.scope(o)));
  97891. let u = i, c = _lt(e) || uS.empty, f = mlt(a, c.tags);
  97892. if (f && (u && (u += " "), u += f, c.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(n, s), u), c.opaque)
  97893. return;
  97894. let d = e.tree && e.tree.prop(Pt.mounted);
  97895. if (d && d.overlay) {
  97896. let h = e.node.enter(d.overlay[0].from + s, 1), p = this.highlighters.filter((g) => !g.scope || g.scope(d.tree.type)), v = e.firstChild();
  97897. for (let g = 0, m = s; ; g++) {
  97898. let y = g < d.overlay.length ? d.overlay[g] : null, b = y ? y.from + s : l, _ = Math.max(n, m), O = Math.min(r, b);
  97899. if (_ < O && v)
  97900. for (; e.from < O && (this.highlightRange(e, _, O, i, a), this.startSpan(Math.min(O, e.to), u), !(e.to >= b || !e.nextSibling())); )
  97901. ;
  97902. if (!y || b > r)
  97903. break;
  97904. m = y.to + s, m > n && (this.highlightRange(h.cursor(), Math.max(n, y.from + s), Math.min(r, m), "", p), this.startSpan(Math.min(r, m), u));
  97905. }
  97906. v && e.parent();
  97907. } else if (e.firstChild()) {
  97908. d && (i = "");
  97909. do
  97910. if (!(e.to <= n)) {
  97911. if (e.from >= r)
  97912. break;
  97913. this.highlightRange(e, n, r, i, a), this.startSpan(Math.min(r, e.to), u);
  97914. }
  97915. while (e.nextSibling());
  97916. e.parent();
  97917. }
  97918. }
  97919. }
  97920. function _lt(t) {
  97921. let e = t.type.prop(Doe);
  97922. for (; e && e.context && !t.matchContext(e.context); )
  97923. e = e.next;
  97924. return e || null;
  97925. }
  97926. const Ae = Ro.define, r_ = Ae(), Tl = Ae(), T9 = Ae(Tl), P9 = Ae(Tl), Pl = Ae(), i_ = Ae(Pl), T$ = Ae(Pl), Eo = Ae(), cc = Ae(Eo), Co = Ae(), To = Ae(), zM = Ae(), Ev = Ae(zM), a_ = Ae(), J = {
  97927. /**
  97928. A comment.
  97929. */
  97930. comment: r_,
  97931. /**
  97932. A line [comment](#highlight.tags.comment).
  97933. */
  97934. lineComment: Ae(r_),
  97935. /**
  97936. A block [comment](#highlight.tags.comment).
  97937. */
  97938. blockComment: Ae(r_),
  97939. /**
  97940. A documentation [comment](#highlight.tags.comment).
  97941. */
  97942. docComment: Ae(r_),
  97943. /**
  97944. Any kind of identifier.
  97945. */
  97946. name: Tl,
  97947. /**
  97948. The [name](#highlight.tags.name) of a variable.
  97949. */
  97950. variableName: Ae(Tl),
  97951. /**
  97952. A type [name](#highlight.tags.name).
  97953. */
  97954. typeName: T9,
  97955. /**
  97956. A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
  97957. */
  97958. tagName: Ae(T9),
  97959. /**
  97960. A property or field [name](#highlight.tags.name).
  97961. */
  97962. propertyName: P9,
  97963. /**
  97964. An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
  97965. */
  97966. attributeName: Ae(P9),
  97967. /**
  97968. The [name](#highlight.tags.name) of a class.
  97969. */
  97970. className: Ae(Tl),
  97971. /**
  97972. A label [name](#highlight.tags.name).
  97973. */
  97974. labelName: Ae(Tl),
  97975. /**
  97976. A namespace [name](#highlight.tags.name).
  97977. */
  97978. namespace: Ae(Tl),
  97979. /**
  97980. The [name](#highlight.tags.name) of a macro.
  97981. */
  97982. macroName: Ae(Tl),
  97983. /**
  97984. A literal value.
  97985. */
  97986. literal: Pl,
  97987. /**
  97988. A string [literal](#highlight.tags.literal).
  97989. */
  97990. string: i_,
  97991. /**
  97992. A documentation [string](#highlight.tags.string).
  97993. */
  97994. docString: Ae(i_),
  97995. /**
  97996. A character literal (subtag of [string](#highlight.tags.string)).
  97997. */
  97998. character: Ae(i_),
  97999. /**
  98000. An attribute value (subtag of [string](#highlight.tags.string)).
  98001. */
  98002. attributeValue: Ae(i_),
  98003. /**
  98004. A number [literal](#highlight.tags.literal).
  98005. */
  98006. number: T$,
  98007. /**
  98008. An integer [number](#highlight.tags.number) literal.
  98009. */
  98010. integer: Ae(T$),
  98011. /**
  98012. A floating-point [number](#highlight.tags.number) literal.
  98013. */
  98014. float: Ae(T$),
  98015. /**
  98016. A boolean [literal](#highlight.tags.literal).
  98017. */
  98018. bool: Ae(Pl),
  98019. /**
  98020. Regular expression [literal](#highlight.tags.literal).
  98021. */
  98022. regexp: Ae(Pl),
  98023. /**
  98024. An escape [literal](#highlight.tags.literal), for example a
  98025. backslash escape in a string.
  98026. */
  98027. escape: Ae(Pl),
  98028. /**
  98029. A color [literal](#highlight.tags.literal).
  98030. */
  98031. color: Ae(Pl),
  98032. /**
  98033. A URL [literal](#highlight.tags.literal).
  98034. */
  98035. url: Ae(Pl),
  98036. /**
  98037. A language keyword.
  98038. */
  98039. keyword: Co,
  98040. /**
  98041. The [keyword](#highlight.tags.keyword) for the self or this
  98042. object.
  98043. */
  98044. self: Ae(Co),
  98045. /**
  98046. The [keyword](#highlight.tags.keyword) for null.
  98047. */
  98048. null: Ae(Co),
  98049. /**
  98050. A [keyword](#highlight.tags.keyword) denoting some atomic value.
  98051. */
  98052. atom: Ae(Co),
  98053. /**
  98054. A [keyword](#highlight.tags.keyword) that represents a unit.
  98055. */
  98056. unit: Ae(Co),
  98057. /**
  98058. A modifier [keyword](#highlight.tags.keyword).
  98059. */
  98060. modifier: Ae(Co),
  98061. /**
  98062. A [keyword](#highlight.tags.keyword) that acts as an operator.
  98063. */
  98064. operatorKeyword: Ae(Co),
  98065. /**
  98066. A control-flow related [keyword](#highlight.tags.keyword).
  98067. */
  98068. controlKeyword: Ae(Co),
  98069. /**
  98070. A [keyword](#highlight.tags.keyword) that defines something.
  98071. */
  98072. definitionKeyword: Ae(Co),
  98073. /**
  98074. A [keyword](#highlight.tags.keyword) related to defining or
  98075. interfacing with modules.
  98076. */
  98077. moduleKeyword: Ae(Co),
  98078. /**
  98079. An operator.
  98080. */
  98081. operator: To,
  98082. /**
  98083. An [operator](#highlight.tags.operator) that dereferences something.
  98084. */
  98085. derefOperator: Ae(To),
  98086. /**
  98087. Arithmetic-related [operator](#highlight.tags.operator).
  98088. */
  98089. arithmeticOperator: Ae(To),
  98090. /**
  98091. Logical [operator](#highlight.tags.operator).
  98092. */
  98093. logicOperator: Ae(To),
  98094. /**
  98095. Bit [operator](#highlight.tags.operator).
  98096. */
  98097. bitwiseOperator: Ae(To),
  98098. /**
  98099. Comparison [operator](#highlight.tags.operator).
  98100. */
  98101. compareOperator: Ae(To),
  98102. /**
  98103. [Operator](#highlight.tags.operator) that updates its operand.
  98104. */
  98105. updateOperator: Ae(To),
  98106. /**
  98107. [Operator](#highlight.tags.operator) that defines something.
  98108. */
  98109. definitionOperator: Ae(To),
  98110. /**
  98111. Type-related [operator](#highlight.tags.operator).
  98112. */
  98113. typeOperator: Ae(To),
  98114. /**
  98115. Control-flow [operator](#highlight.tags.operator).
  98116. */
  98117. controlOperator: Ae(To),
  98118. /**
  98119. Program or markup punctuation.
  98120. */
  98121. punctuation: zM,
  98122. /**
  98123. [Punctuation](#highlight.tags.punctuation) that separates
  98124. things.
  98125. */
  98126. separator: Ae(zM),
  98127. /**
  98128. Bracket-style [punctuation](#highlight.tags.punctuation).
  98129. */
  98130. bracket: Ev,
  98131. /**
  98132. Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
  98133. tokens).
  98134. */
  98135. angleBracket: Ae(Ev),
  98136. /**
  98137. Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
  98138. tokens).
  98139. */
  98140. squareBracket: Ae(Ev),
  98141. /**
  98142. Parentheses (usually `(` and `)` tokens). Subtag of
  98143. [bracket](#highlight.tags.bracket).
  98144. */
  98145. paren: Ae(Ev),
  98146. /**
  98147. Braces (usually `{` and `}` tokens). Subtag of
  98148. [bracket](#highlight.tags.bracket).
  98149. */
  98150. brace: Ae(Ev),
  98151. /**
  98152. Content, for example plain text in XML or markup documents.
  98153. */
  98154. content: Eo,
  98155. /**
  98156. [Content](#highlight.tags.content) that represents a heading.
  98157. */
  98158. heading: cc,
  98159. /**
  98160. A level 1 [heading](#highlight.tags.heading).
  98161. */
  98162. heading1: Ae(cc),
  98163. /**
  98164. A level 2 [heading](#highlight.tags.heading).
  98165. */
  98166. heading2: Ae(cc),
  98167. /**
  98168. A level 3 [heading](#highlight.tags.heading).
  98169. */
  98170. heading3: Ae(cc),
  98171. /**
  98172. A level 4 [heading](#highlight.tags.heading).
  98173. */
  98174. heading4: Ae(cc),
  98175. /**
  98176. A level 5 [heading](#highlight.tags.heading).
  98177. */
  98178. heading5: Ae(cc),
  98179. /**
  98180. A level 6 [heading](#highlight.tags.heading).
  98181. */
  98182. heading6: Ae(cc),
  98183. /**
  98184. A prose separator (such as a horizontal rule).
  98185. */
  98186. contentSeparator: Ae(Eo),
  98187. /**
  98188. [Content](#highlight.tags.content) that represents a list.
  98189. */
  98190. list: Ae(Eo),
  98191. /**
  98192. [Content](#highlight.tags.content) that represents a quote.
  98193. */
  98194. quote: Ae(Eo),
  98195. /**
  98196. [Content](#highlight.tags.content) that is emphasized.
  98197. */
  98198. emphasis: Ae(Eo),
  98199. /**
  98200. [Content](#highlight.tags.content) that is styled strong.
  98201. */
  98202. strong: Ae(Eo),
  98203. /**
  98204. [Content](#highlight.tags.content) that is part of a link.
  98205. */
  98206. link: Ae(Eo),
  98207. /**
  98208. [Content](#highlight.tags.content) that is styled as code or
  98209. monospace.
  98210. */
  98211. monospace: Ae(Eo),
  98212. /**
  98213. [Content](#highlight.tags.content) that has a strike-through
  98214. style.
  98215. */
  98216. strikethrough: Ae(Eo),
  98217. /**
  98218. Inserted text in a change-tracking format.
  98219. */
  98220. inserted: Ae(),
  98221. /**
  98222. Deleted text.
  98223. */
  98224. deleted: Ae(),
  98225. /**
  98226. Changed text.
  98227. */
  98228. changed: Ae(),
  98229. /**
  98230. An invalid or unsyntactic element.
  98231. */
  98232. invalid: Ae(),
  98233. /**
  98234. Metadata or meta-instruction.
  98235. */
  98236. meta: a_,
  98237. /**
  98238. [Metadata](#highlight.tags.meta) that applies to the entire
  98239. document.
  98240. */
  98241. documentMeta: Ae(a_),
  98242. /**
  98243. [Metadata](#highlight.tags.meta) that annotates or adds
  98244. attributes to a given syntactic element.
  98245. */
  98246. annotation: Ae(a_),
  98247. /**
  98248. Processing instruction or preprocessor directive. Subtag of
  98249. [meta](#highlight.tags.meta).
  98250. */
  98251. processingInstruction: Ae(a_),
  98252. /**
  98253. [Modifier](#highlight.Tag^defineModifier) that indicates that a
  98254. given element is being defined. Expected to be used with the
  98255. various [name](#highlight.tags.name) tags.
  98256. */
  98257. definition: Ro.defineModifier(),
  98258. /**
  98259. [Modifier](#highlight.Tag^defineModifier) that indicates that
  98260. something is constant. Mostly expected to be used with
  98261. [variable names](#highlight.tags.variableName).
  98262. */
  98263. constant: Ro.defineModifier(),
  98264. /**
  98265. [Modifier](#highlight.Tag^defineModifier) used to indicate that
  98266. a [variable](#highlight.tags.variableName) or [property
  98267. name](#highlight.tags.propertyName) is being called or defined
  98268. as a function.
  98269. */
  98270. function: Ro.defineModifier(),
  98271. /**
  98272. [Modifier](#highlight.Tag^defineModifier) that can be applied to
  98273. [names](#highlight.tags.name) to indicate that they belong to
  98274. the language's standard environment.
  98275. */
  98276. standard: Ro.defineModifier(),
  98277. /**
  98278. [Modifier](#highlight.Tag^defineModifier) that indicates a given
  98279. [names](#highlight.tags.name) is local to some scope.
  98280. */
  98281. local: Ro.defineModifier(),
  98282. /**
  98283. A generic variant [modifier](#highlight.Tag^defineModifier) that
  98284. can be used to tag language-specific alternative variants of
  98285. some common tag. It is recommended for themes to define special
  98286. forms of at least the [string](#highlight.tags.string) and
  98287. [variable name](#highlight.tags.variableName) tags, since those
  98288. come up a lot.
  98289. */
  98290. special: Ro.defineModifier()
  98291. };
  98292. Roe([
  98293. { tag: J.link, class: "tok-link" },
  98294. { tag: J.heading, class: "tok-heading" },
  98295. { tag: J.emphasis, class: "tok-emphasis" },
  98296. { tag: J.strong, class: "tok-strong" },
  98297. { tag: J.keyword, class: "tok-keyword" },
  98298. { tag: J.atom, class: "tok-atom" },
  98299. { tag: J.bool, class: "tok-bool" },
  98300. { tag: J.url, class: "tok-url" },
  98301. { tag: J.labelName, class: "tok-labelName" },
  98302. { tag: J.inserted, class: "tok-inserted" },
  98303. { tag: J.deleted, class: "tok-deleted" },
  98304. { tag: J.literal, class: "tok-literal" },
  98305. { tag: J.string, class: "tok-string" },
  98306. { tag: J.number, class: "tok-number" },
  98307. { tag: [J.regexp, J.escape, J.special(J.string)], class: "tok-string2" },
  98308. { tag: J.variableName, class: "tok-variableName" },
  98309. { tag: J.local(J.variableName), class: "tok-variableName tok-local" },
  98310. { tag: J.definition(J.variableName), class: "tok-variableName tok-definition" },
  98311. { tag: J.special(J.variableName), class: "tok-variableName2" },
  98312. { tag: J.definition(J.propertyName), class: "tok-propertyName tok-definition" },
  98313. { tag: J.typeName, class: "tok-typeName" },
  98314. { tag: J.namespace, class: "tok-namespace" },
  98315. { tag: J.className, class: "tok-className" },
  98316. { tag: J.macroName, class: "tok-macroName" },
  98317. { tag: J.propertyName, class: "tok-propertyName" },
  98318. { tag: J.operator, class: "tok-operator" },
  98319. { tag: J.comment, class: "tok-comment" },
  98320. { tag: J.meta, class: "tok-meta" },
  98321. { tag: J.invalid, class: "tok-invalid" },
  98322. { tag: J.punctuation, class: "tok-punctuation" }
  98323. ]);
  98324. var P$;
  98325. const Hd = /* @__PURE__ */ new Pt();
  98326. function koe(t) {
  98327. return Be.define({
  98328. combine: t ? (e) => e.concat(t) : void 0
  98329. });
  98330. }
  98331. const v4 = /* @__PURE__ */ new Pt();
  98332. class Ya {
  98333. /**
  98334. Construct a language object. If you need to invoke this
  98335. directly, first define a data facet with
  98336. [`defineLanguageFacet`](https://codemirror.net/6/docs/ref/#language.defineLanguageFacet), and then
  98337. configure your parser to [attach](https://codemirror.net/6/docs/ref/#language.languageDataProp) it
  98338. to the language's outer syntax node.
  98339. */
  98340. constructor(e, n, r = [], i = "") {
  98341. this.data = e, this.name = i, At.prototype.hasOwnProperty("tree") || Object.defineProperty(At.prototype, "tree", { get() {
  98342. return nr(this);
  98343. } }), this.parser = n, this.extension = [
  98344. yu.of(this),
  98345. At.languageData.of((a, o, s) => {
  98346. let l = $9(a, o, s), u = l.type.prop(Hd);
  98347. if (!u)
  98348. return [];
  98349. let c = a.facet(u), f = l.type.prop(v4);
  98350. if (f) {
  98351. let d = l.resolve(o - l.from, s);
  98352. for (let h of f)
  98353. if (h.test(d, a)) {
  98354. let p = a.facet(h.facet);
  98355. return h.type == "replace" ? p : p.concat(c);
  98356. }
  98357. }
  98358. return c;
  98359. })
  98360. ].concat(r);
  98361. }
  98362. /**
  98363. Query whether this language is active at the given position.
  98364. */
  98365. isActiveAt(e, n, r = -1) {
  98366. return $9(e, n, r).type.prop(Hd) == this.data;
  98367. }
  98368. /**
  98369. Find the document regions that were parsed using this language.
  98370. The returned regions will _include_ any nested languages rooted
  98371. in this language, when those exist.
  98372. */
  98373. findRegions(e) {
  98374. let n = e.facet(yu);
  98375. if ((n == null ? void 0 : n.data) == this.data)
  98376. return [{ from: 0, to: e.doc.length }];
  98377. if (!n || !n.allowsNesting)
  98378. return [];
  98379. let r = [], i = (a, o) => {
  98380. if (a.prop(Hd) == this.data) {
  98381. r.push({ from: o, to: o + a.length });
  98382. return;
  98383. }
  98384. let s = a.prop(Pt.mounted);
  98385. if (s) {
  98386. if (s.tree.prop(Hd) == this.data) {
  98387. if (s.overlay)
  98388. for (let l of s.overlay)
  98389. r.push({ from: l.from + o, to: l.to + o });
  98390. else
  98391. r.push({ from: o, to: o + a.length });
  98392. return;
  98393. } else if (s.overlay) {
  98394. let l = r.length;
  98395. if (i(s.tree, s.overlay[0].from + o), r.length > l)
  98396. return;
  98397. }
  98398. }
  98399. for (let l = 0; l < a.children.length; l++) {
  98400. let u = a.children[l];
  98401. u instanceof Wn && i(u, a.positions[l] + o);
  98402. }
  98403. };
  98404. return i(nr(e), 0), r;
  98405. }
  98406. /**
  98407. Indicates whether this language allows nested languages. The
  98408. default implementation returns true.
  98409. */
  98410. get allowsNesting() {
  98411. return !0;
  98412. }
  98413. }
  98414. Ya.setState = /* @__PURE__ */ dt.define();
  98415. function $9(t, e, n) {
  98416. let r = t.facet(yu), i = nr(t).topNode;
  98417. if (!r || r.allowsNesting)
  98418. for (let a = i; a; a = a.enter(e, n, Zn.ExcludeBuffers))
  98419. a.type.isTop && (i = a);
  98420. return i;
  98421. }
  98422. class e0 extends Ya {
  98423. constructor(e, n, r) {
  98424. super(e, n, [], r), this.parser = n;
  98425. }
  98426. /**
  98427. Define a language from a parser.
  98428. */
  98429. static define(e) {
  98430. let n = koe(e.languageData);
  98431. return new e0(n, e.parser.configure({
  98432. props: [Hd.add((r) => r.isTop ? n : void 0)]
  98433. }), e.name);
  98434. }
  98435. /**
  98436. Create a new instance of this language with a reconfigured
  98437. version of its parser and optionally a new name.
  98438. */
  98439. configure(e, n) {
  98440. return new e0(this.data, this.parser.configure(e), n || this.name);
  98441. }
  98442. get allowsNesting() {
  98443. return this.parser.hasWrappers();
  98444. }
  98445. }
  98446. function nr(t) {
  98447. let e = t.field(Ya.state, !1);
  98448. return e ? e.tree : Wn.empty;
  98449. }
  98450. class Olt {
  98451. /**
  98452. Create an input object for the given document.
  98453. */
  98454. constructor(e) {
  98455. this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter();
  98456. }
  98457. get length() {
  98458. return this.doc.length;
  98459. }
  98460. syncTo(e) {
  98461. return this.string = this.cursor.next(e - this.cursorPos).value, this.cursorPos = e + this.string.length, this.cursorPos - this.string.length;
  98462. }
  98463. chunk(e) {
  98464. return this.syncTo(e), this.string;
  98465. }
  98466. get lineChunks() {
  98467. return !0;
  98468. }
  98469. read(e, n) {
  98470. let r = this.cursorPos - this.string.length;
  98471. return e < r || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - r, n - r);
  98472. }
  98473. }
  98474. let Mv = null;
  98475. class cS {
  98476. constructor(e, n, r = [], i, a, o, s, l) {
  98477. this.parser = e, this.state = n, this.fragments = r, this.tree = i, this.treeLen = a, this.viewport = o, this.skipped = s, this.scheduleOn = l, this.parse = null, this.tempSkipped = [];
  98478. }
  98479. /**
  98480. @internal
  98481. */
  98482. static create(e, n, r) {
  98483. return new cS(e, n, [], Wn.empty, 0, r, [], null);
  98484. }
  98485. startParse() {
  98486. return this.parser.startParse(new Olt(this.state.doc), this.fragments);
  98487. }
  98488. /**
  98489. @internal
  98490. */
  98491. work(e, n) {
  98492. return n != null && n >= this.state.doc.length && (n = void 0), this.tree != Wn.empty && this.isDone(n ?? this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => {
  98493. var r;
  98494. if (typeof e == "number") {
  98495. let i = Date.now() + e;
  98496. e = () => Date.now() > i;
  98497. }
  98498. for (this.parse || (this.parse = this.startParse()), n != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > n) && n < this.state.doc.length && this.parse.stopAt(n); ; ) {
  98499. let i = this.parse.advance();
  98500. if (i)
  98501. if (this.fragments = this.withoutTempSkipped(af.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (r = this.parse.stoppedAt) !== null && r !== void 0 ? r : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (n ?? this.state.doc.length))
  98502. this.parse = this.startParse();
  98503. else
  98504. return !0;
  98505. if (e())
  98506. return !1;
  98507. }
  98508. });
  98509. }
  98510. /**
  98511. @internal
  98512. */
  98513. takeTree() {
  98514. let e, n;
  98515. this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => {
  98516. for (; !(n = this.parse.advance()); )
  98517. ;
  98518. }), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(af.addTree(this.tree, this.fragments, !0)), this.parse = null);
  98519. }
  98520. withContext(e) {
  98521. let n = Mv;
  98522. Mv = this;
  98523. try {
  98524. return e();
  98525. } finally {
  98526. Mv = n;
  98527. }
  98528. }
  98529. withoutTempSkipped(e) {
  98530. for (let n; n = this.tempSkipped.pop(); )
  98531. e = A9(e, n.from, n.to);
  98532. return e;
  98533. }
  98534. /**
  98535. @internal
  98536. */
  98537. changes(e, n) {
  98538. let { fragments: r, tree: i, treeLen: a, viewport: o, skipped: s } = this;
  98539. if (this.takeTree(), !e.empty) {
  98540. let l = [];
  98541. if (e.iterChangedRanges((u, c, f, d) => l.push({ fromA: u, toA: c, fromB: f, toB: d })), r = af.applyChanges(r, l), i = Wn.empty, a = 0, o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }, this.skipped.length) {
  98542. s = [];
  98543. for (let u of this.skipped) {
  98544. let c = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1);
  98545. c < f && s.push({ from: c, to: f });
  98546. }
  98547. }
  98548. }
  98549. return new cS(this.parser, n, r, i, a, o, s, this.scheduleOn);
  98550. }
  98551. /**
  98552. @internal
  98553. */
  98554. updateViewport(e) {
  98555. if (this.viewport.from == e.from && this.viewport.to == e.to)
  98556. return !1;
  98557. this.viewport = e;
  98558. let n = this.skipped.length;
  98559. for (let r = 0; r < this.skipped.length; r++) {
  98560. let { from: i, to: a } = this.skipped[r];
  98561. i < e.to && a > e.from && (this.fragments = A9(this.fragments, i, a), this.skipped.splice(r--, 1));
  98562. }
  98563. return this.skipped.length >= n ? !1 : (this.reset(), !0);
  98564. }
  98565. /**
  98566. @internal
  98567. */
  98568. reset() {
  98569. this.parse && (this.takeTree(), this.parse = null);
  98570. }
  98571. /**
  98572. Notify the parse scheduler that the given region was skipped
  98573. because it wasn't in view, and the parse should be restarted
  98574. when it comes into view.
  98575. */
  98576. skipUntilInView(e, n) {
  98577. this.skipped.push({ from: e, to: n });
  98578. }
  98579. /**
  98580. Returns a parser intended to be used as placeholder when
  98581. asynchronously loading a nested parser. It'll skip its input and
  98582. mark it as not-really-parsed, so that the next update will parse
  98583. it again.
  98584. When `until` is given, a reparse will be scheduled when that
  98585. promise resolves.
  98586. */
  98587. static getSkippingParser(e) {
  98588. return new class extends Ioe {
  98589. createParse(n, r, i) {
  98590. let a = i[0].from, o = i[i.length - 1].to;
  98591. return {
  98592. parsedPos: a,
  98593. advance() {
  98594. let l = Mv;
  98595. if (l) {
  98596. for (let u of i)
  98597. l.tempSkipped.push(u);
  98598. e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e);
  98599. }
  98600. return this.parsedPos = o, new Wn(Ci.none, [], [], o - a);
  98601. },
  98602. stoppedAt: null,
  98603. stopAt() {
  98604. }
  98605. };
  98606. }
  98607. }();
  98608. }
  98609. /**
  98610. @internal
  98611. */
  98612. isDone(e) {
  98613. e = Math.min(e, this.state.doc.length);
  98614. let n = this.fragments;
  98615. return this.treeLen >= e && n.length && n[0].from == 0 && n[0].to >= e;
  98616. }
  98617. /**
  98618. Get the context for the current parse, or `null` if no editor
  98619. parse is in progress.
  98620. */
  98621. static get() {
  98622. return Mv;
  98623. }
  98624. }
  98625. function A9(t, e, n) {
  98626. return af.applyChanges(t, [{ fromA: e, toA: n, fromB: e, toB: n }]);
  98627. }
  98628. class qh {
  98629. constructor(e) {
  98630. this.context = e, this.tree = e.tree;
  98631. }
  98632. apply(e) {
  98633. if (!e.docChanged && this.tree == this.context.tree)
  98634. return this;
  98635. let n = this.context.changes(e.changes, e.state), r = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), n.viewport.to);
  98636. return n.work(20, r) || n.takeTree(), new qh(n);
  98637. }
  98638. static init(e) {
  98639. let n = Math.min(3e3, e.doc.length), r = cS.create(e.facet(yu).parser, e, { from: 0, to: n });
  98640. return r.work(20, n) || r.takeTree(), new qh(r);
  98641. }
  98642. }
  98643. Ya.state = /* @__PURE__ */ ur.define({
  98644. create: qh.init,
  98645. update(t, e) {
  98646. for (let n of e.effects)
  98647. if (n.is(Ya.setState))
  98648. return n.value;
  98649. return e.startState.facet(yu) != e.state.facet(yu) ? qh.init(e.state) : t.apply(e);
  98650. }
  98651. });
  98652. let Loe = (t) => {
  98653. let e = setTimeout(
  98654. () => t(),
  98655. 500
  98656. /* Work.MaxPause */
  98657. );
  98658. return () => clearTimeout(e);
  98659. };
  98660. typeof requestIdleCallback < "u" && (Loe = (t) => {
  98661. let e = -1, n = setTimeout(
  98662. () => {
  98663. e = requestIdleCallback(t, {
  98664. timeout: 400
  98665. /* Work.MinPause */
  98666. });
  98667. },
  98668. 100
  98669. /* Work.MinPause */
  98670. );
  98671. return () => e < 0 ? clearTimeout(n) : cancelIdleCallback(e);
  98672. });
  98673. const $$ = typeof navigator < "u" && (!((P$ = navigator.scheduling) === null || P$ === void 0) && P$.isInputPending) ? () => navigator.scheduling.isInputPending() : null, Slt = /* @__PURE__ */ kn.fromClass(class {
  98674. constructor(e) {
  98675. this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
  98676. }
  98677. update(e) {
  98678. let n = this.view.state.field(Ya.state).context;
  98679. (n.updateViewport(e.view.viewport) || this.view.viewport.to > n.treeLen) && this.scheduleWork(), (e.docChanged || e.selectionSet) && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(n);
  98680. }
  98681. scheduleWork() {
  98682. if (this.working)
  98683. return;
  98684. let { state: e } = this.view, n = e.field(Ya.state);
  98685. (n.tree != n.context.tree || !n.context.isDone(e.doc.length)) && (this.working = Loe(this.work));
  98686. }
  98687. work(e) {
  98688. this.working = null;
  98689. let n = Date.now();
  98690. if (this.chunkEnd < n && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = n + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
  98691. return;
  98692. let { state: r, viewport: { to: i } } = this.view, a = r.field(Ya.state);
  98693. if (a.tree == a.context.tree && a.context.isDone(
  98694. i + 1e5
  98695. /* Work.MaxParseAhead */
  98696. ))
  98697. return;
  98698. let o = Date.now() + Math.min(this.chunkBudget, 100, e && !$$ ? Math.max(25, e.timeRemaining() - 5) : 1e9), s = a.context.treeLen < i && r.doc.length > i + 1e3, l = a.context.work(() => $$ && $$() || Date.now() > o, i + (s ? 0 : 1e5));
  98699. this.chunkBudget -= Date.now() - n, (l || this.chunkBudget <= 0) && (a.context.takeTree(), this.view.dispatch({ effects: Ya.setState.of(new qh(a.context)) })), this.chunkBudget > 0 && !(l && !s) && this.scheduleWork(), this.checkAsyncSchedule(a.context);
  98700. }
  98701. checkAsyncSchedule(e) {
  98702. e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((n) => mi(this.view.state, n)).then(() => this.workScheduled--), e.scheduleOn = null);
  98703. }
  98704. destroy() {
  98705. this.working && this.working();
  98706. }
  98707. isWorking() {
  98708. return !!(this.working || this.workScheduled > 0);
  98709. }
  98710. }, {
  98711. eventHandlers: { focus() {
  98712. this.scheduleWork();
  98713. } }
  98714. }), yu = /* @__PURE__ */ Be.define({
  98715. combine(t) {
  98716. return t.length ? t[0] : null;
  98717. },
  98718. enables: (t) => [
  98719. Ya.state,
  98720. Slt,
  98721. De.contentAttributes.compute([t], (e) => {
  98722. let n = e.facet(t);
  98723. return n && n.name ? { "data-language": n.name } : {};
  98724. })
  98725. ]
  98726. });
  98727. class Noe {
  98728. /**
  98729. Create a language support object.
  98730. */
  98731. constructor(e, n = []) {
  98732. this.language = e, this.support = n, this.extension = [e, n];
  98733. }
  98734. }
  98735. const xlt = /* @__PURE__ */ Be.define(), ly = /* @__PURE__ */ Be.define({
  98736. combine: (t) => {
  98737. if (!t.length)
  98738. return " ";
  98739. let e = t[0];
  98740. if (!e || /\S/.test(e) || Array.from(e).some((n) => n != e[0]))
  98741. throw new Error("Invalid indent unit: " + JSON.stringify(t[0]));
  98742. return e;
  98743. }
  98744. });
  98745. function fS(t) {
  98746. let e = t.facet(ly);
  98747. return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
  98748. }
  98749. function t0(t, e) {
  98750. let n = "", r = t.tabSize, i = t.facet(ly)[0];
  98751. if (i == " ") {
  98752. for (; e >= r; )
  98753. n += " ", e -= r;
  98754. i = " ";
  98755. }
  98756. for (let a = 0; a < e; a++)
  98757. n += i;
  98758. return n;
  98759. }
  98760. function g4(t, e) {
  98761. t instanceof At && (t = new kw(t));
  98762. for (let r of t.state.facet(xlt)) {
  98763. let i = r(t, e);
  98764. if (i !== void 0)
  98765. return i;
  98766. }
  98767. let n = nr(t.state);
  98768. return n.length >= e ? wlt(t, n, e) : null;
  98769. }
  98770. class kw {
  98771. /**
  98772. Create an indent context.
  98773. */
  98774. constructor(e, n = {}) {
  98775. this.state = e, this.options = n, this.unit = fS(e);
  98776. }
  98777. /**
  98778. Get a description of the line at the given position, taking
  98779. [simulated line
  98780. breaks](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  98781. into account. If there is such a break at `pos`, the `bias`
  98782. argument determines whether the part of the line line before or
  98783. after the break is used.
  98784. */
  98785. lineAt(e, n = 1) {
  98786. let r = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: a } = this.options;
  98787. return i != null && i >= r.from && i <= r.to ? a && i == e ? { text: "", from: e } : (n < 0 ? i < e : i <= e) ? { text: r.text.slice(i - r.from), from: i } : { text: r.text.slice(0, i - r.from), from: r.from } : r;
  98788. }
  98789. /**
  98790. Get the text directly after `pos`, either the entire line
  98791. or the next 100 characters, whichever is shorter.
  98792. */
  98793. textAfterPos(e, n = 1) {
  98794. if (this.options.simulateDoubleBreak && e == this.options.simulateBreak)
  98795. return "";
  98796. let { text: r, from: i } = this.lineAt(e, n);
  98797. return r.slice(e - i, Math.min(r.length, e + 100 - i));
  98798. }
  98799. /**
  98800. Find the column for the given position.
  98801. */
  98802. column(e, n = 1) {
  98803. let { text: r, from: i } = this.lineAt(e, n), a = this.countColumn(r, e - i), o = this.options.overrideIndentation ? this.options.overrideIndentation(i) : -1;
  98804. return o > -1 && (a += o - this.countColumn(r, r.search(/\S|$/))), a;
  98805. }
  98806. /**
  98807. Find the column position (taking tabs into account) of the given
  98808. position in the given string.
  98809. */
  98810. countColumn(e, n = e.length) {
  98811. return Rp(e, this.state.tabSize, n);
  98812. }
  98813. /**
  98814. Find the indentation column of the line at the given point.
  98815. */
  98816. lineIndent(e, n = 1) {
  98817. let { text: r, from: i } = this.lineAt(e, n), a = this.options.overrideIndentation;
  98818. if (a) {
  98819. let o = a(i);
  98820. if (o > -1)
  98821. return o;
  98822. }
  98823. return this.countColumn(r, r.search(/\S|$/));
  98824. }
  98825. /**
  98826. Returns the [simulated line
  98827. break](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  98828. for this context, if any.
  98829. */
  98830. get simulatedBreak() {
  98831. return this.options.simulateBreak || null;
  98832. }
  98833. }
  98834. const m4 = /* @__PURE__ */ new Pt();
  98835. function wlt(t, e, n) {
  98836. let r = e.resolveStack(n), i = r.node.enterUnfinishedNodesBefore(n);
  98837. if (i != r.node) {
  98838. let a = [];
  98839. for (let o = i; o != r.node; o = o.parent)
  98840. a.push(o);
  98841. for (let o = a.length - 1; o >= 0; o--)
  98842. r = { node: a[o], next: r };
  98843. }
  98844. return Boe(r, t, n);
  98845. }
  98846. function Boe(t, e, n) {
  98847. for (let r = t; r; r = r.next) {
  98848. let i = Tlt(r.node);
  98849. if (i)
  98850. return i(y4.create(e, n, r));
  98851. }
  98852. return 0;
  98853. }
  98854. function Clt(t) {
  98855. return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak;
  98856. }
  98857. function Tlt(t) {
  98858. let e = t.type.prop(m4);
  98859. if (e)
  98860. return e;
  98861. let n = t.firstChild, r;
  98862. if (n && (r = n.type.prop(Pt.closedBy))) {
  98863. let i = t.lastChild, a = i && r.indexOf(i.name) > -1;
  98864. return (o) => zoe(o, !0, 1, void 0, a && !Clt(o) ? i.from : void 0);
  98865. }
  98866. return t.parent == null ? Plt : null;
  98867. }
  98868. function Plt() {
  98869. return 0;
  98870. }
  98871. class y4 extends kw {
  98872. constructor(e, n, r) {
  98873. super(e.state, e.options), this.base = e, this.pos = n, this.context = r;
  98874. }
  98875. /**
  98876. The syntax tree node to which the indentation strategy
  98877. applies.
  98878. */
  98879. get node() {
  98880. return this.context.node;
  98881. }
  98882. /**
  98883. @internal
  98884. */
  98885. static create(e, n, r) {
  98886. return new y4(e, n, r);
  98887. }
  98888. /**
  98889. Get the text directly after `this.pos`, either the entire line
  98890. or the next 100 characters, whichever is shorter.
  98891. */
  98892. get textAfter() {
  98893. return this.textAfterPos(this.pos);
  98894. }
  98895. /**
  98896. Get the indentation at the reference line for `this.node`, which
  98897. is the line on which it starts, unless there is a node that is
  98898. _not_ a parent of this node covering the start of that line. If
  98899. so, the line at the start of that node is tried, again skipping
  98900. on if it is covered by another such node.
  98901. */
  98902. get baseIndent() {
  98903. return this.baseIndentFor(this.node);
  98904. }
  98905. /**
  98906. Get the indentation for the reference line of the given node
  98907. (see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
  98908. */
  98909. baseIndentFor(e) {
  98910. let n = this.state.doc.lineAt(e.from);
  98911. for (; ; ) {
  98912. let r = e.resolve(n.from);
  98913. for (; r.parent && r.parent.from == r.from; )
  98914. r = r.parent;
  98915. if ($lt(r, e))
  98916. break;
  98917. n = this.state.doc.lineAt(r.from);
  98918. }
  98919. return this.lineIndent(n.from);
  98920. }
  98921. /**
  98922. Continue looking for indentations in the node's parent nodes,
  98923. and return the result of that.
  98924. */
  98925. continue() {
  98926. return Boe(this.context.next, this.base, this.pos);
  98927. }
  98928. }
  98929. function $lt(t, e) {
  98930. for (let n = e; n; n = n.parent)
  98931. if (t == n)
  98932. return !0;
  98933. return !1;
  98934. }
  98935. function Alt(t) {
  98936. let e = t.node, n = e.childAfter(e.from), r = e.lastChild;
  98937. if (!n)
  98938. return null;
  98939. let i = t.options.simulateBreak, a = t.state.doc.lineAt(n.from), o = i == null || i <= a.from ? a.to : Math.min(a.to, i);
  98940. for (let s = n.to; ; ) {
  98941. let l = e.childAfter(s);
  98942. if (!l || l == r)
  98943. return null;
  98944. if (!l.type.isSkipped)
  98945. return l.from < o ? n : null;
  98946. s = l.to;
  98947. }
  98948. }
  98949. function Elt({ closing: t, align: e = !0, units: n = 1 }) {
  98950. return (r) => zoe(r, e, n, t);
  98951. }
  98952. function zoe(t, e, n, r, i) {
  98953. let a = t.textAfter, o = a.match(/^\s*/)[0].length, s = r && a.slice(o, o + r.length) == r || i == t.pos + o, l = e ? Alt(t) : null;
  98954. return l ? s ? t.column(l.from) : t.column(l.to) : t.baseIndent + (s ? 0 : t.unit * n);
  98955. }
  98956. const Mlt = (t) => t.baseIndent;
  98957. function Gg({ except: t, units: e = 1 } = {}) {
  98958. return (n) => {
  98959. let r = t && t.test(n.textAfter);
  98960. return n.baseIndent + (r ? 0 : e * n.unit);
  98961. };
  98962. }
  98963. const Ilt = 200;
  98964. function Dlt() {
  98965. return At.transactionFilter.of((t) => {
  98966. if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete"))
  98967. return t;
  98968. let e = t.startState.languageDataAt("indentOnInput", t.startState.selection.main.head);
  98969. if (!e.length)
  98970. return t;
  98971. let n = t.newDoc, { head: r } = t.newSelection.main, i = n.lineAt(r);
  98972. if (r > i.from + Ilt)
  98973. return t;
  98974. let a = n.sliceString(i.from, r);
  98975. if (!e.some((u) => u.test(a)))
  98976. return t;
  98977. let { state: o } = t, s = -1, l = [];
  98978. for (let { head: u } of o.selection.ranges) {
  98979. let c = o.doc.lineAt(u);
  98980. if (c.from == s)
  98981. continue;
  98982. s = c.from;
  98983. let f = g4(o, c.from);
  98984. if (f == null)
  98985. continue;
  98986. let d = /^\s*/.exec(c.text)[0], h = t0(o, f);
  98987. d != h && l.push({ from: c.from, to: c.from + d.length, insert: h });
  98988. }
  98989. return l.length ? [t, { changes: l, sequential: !0 }] : t;
  98990. });
  98991. }
  98992. const Rlt = /* @__PURE__ */ Be.define(), b4 = /* @__PURE__ */ new Pt();
  98993. function Voe(t) {
  98994. let e = t.firstChild, n = t.lastChild;
  98995. return e && e.to < n.from ? { from: e.to, to: n.type.isError ? t.to : n.from } : null;
  98996. }
  98997. function klt(t, e, n) {
  98998. let r = nr(t);
  98999. if (r.length < n)
  99000. return null;
  99001. let i = r.resolveStack(n, 1), a = null;
  99002. for (let o = i; o; o = o.next) {
  99003. let s = o.node;
  99004. if (s.to <= n || s.from > n)
  99005. continue;
  99006. if (a && s.from < e)
  99007. break;
  99008. let l = s.type.prop(b4);
  99009. if (l && (s.to < r.length - 50 || r.length == t.doc.length || !Llt(s))) {
  99010. let u = l(s, t);
  99011. u && u.from <= n && u.from >= e && u.to > n && (a = u);
  99012. }
  99013. }
  99014. return a;
  99015. }
  99016. function Llt(t) {
  99017. let e = t.lastChild;
  99018. return e && e.to == t.to && e.type.isError;
  99019. }
  99020. function dS(t, e, n) {
  99021. for (let r of t.facet(Rlt)) {
  99022. let i = r(t, e, n);
  99023. if (i)
  99024. return i;
  99025. }
  99026. return klt(t, e, n);
  99027. }
  99028. function Foe(t, e) {
  99029. let n = e.mapPos(t.from, 1), r = e.mapPos(t.to, -1);
  99030. return n >= r ? void 0 : { from: n, to: r };
  99031. }
  99032. const Lw = /* @__PURE__ */ dt.define({ map: Foe }), uy = /* @__PURE__ */ dt.define({ map: Foe });
  99033. function Woe(t) {
  99034. let e = [];
  99035. for (let { head: n } of t.state.selection.ranges)
  99036. e.some((r) => r.from <= n && r.to >= n) || e.push(t.lineBlockAt(n));
  99037. return e;
  99038. }
  99039. const $f = /* @__PURE__ */ ur.define({
  99040. create() {
  99041. return Ze.none;
  99042. },
  99043. update(t, e) {
  99044. t = t.map(e.changes);
  99045. for (let n of e.effects)
  99046. if (n.is(Lw) && !Nlt(t, n.value.from, n.value.to)) {
  99047. let { preparePlaceholder: r } = e.state.facet(Goe), i = r ? Ze.replace({ widget: new Hlt(r(e.state, n.value)) }) : E9;
  99048. t = t.update({ add: [i.range(n.value.from, n.value.to)] });
  99049. } else n.is(uy) && (t = t.update({
  99050. filter: (r, i) => n.value.from != r || n.value.to != i,
  99051. filterFrom: n.value.from,
  99052. filterTo: n.value.to
  99053. }));
  99054. if (e.selection) {
  99055. let n = !1, { head: r } = e.selection.main;
  99056. t.between(r, r, (i, a) => {
  99057. i < r && a > r && (n = !0);
  99058. }), n && (t = t.update({
  99059. filterFrom: r,
  99060. filterTo: r,
  99061. filter: (i, a) => a <= r || i >= r
  99062. }));
  99063. }
  99064. return t;
  99065. },
  99066. provide: (t) => De.decorations.from(t),
  99067. toJSON(t, e) {
  99068. let n = [];
  99069. return t.between(0, e.doc.length, (r, i) => {
  99070. n.push(r, i);
  99071. }), n;
  99072. },
  99073. fromJSON(t) {
  99074. if (!Array.isArray(t) || t.length % 2)
  99075. throw new RangeError("Invalid JSON for fold state");
  99076. let e = [];
  99077. for (let n = 0; n < t.length; ) {
  99078. let r = t[n++], i = t[n++];
  99079. if (typeof r != "number" || typeof i != "number")
  99080. throw new RangeError("Invalid JSON for fold state");
  99081. e.push(E9.range(r, i));
  99082. }
  99083. return Ze.set(e, !0);
  99084. }
  99085. });
  99086. function hS(t, e, n) {
  99087. var r;
  99088. let i = null;
  99089. return (r = t.field($f, !1)) === null || r === void 0 || r.between(e, n, (a, o) => {
  99090. (!i || i.from > a) && (i = { from: a, to: o });
  99091. }), i;
  99092. }
  99093. function Nlt(t, e, n) {
  99094. let r = !1;
  99095. return t.between(e, e, (i, a) => {
  99096. i == e && a == n && (r = !0);
  99097. }), r;
  99098. }
  99099. function Qoe(t, e) {
  99100. return t.field($f, !1) ? e : e.concat(dt.appendConfig.of(joe()));
  99101. }
  99102. const Blt = (t) => {
  99103. for (let e of Woe(t)) {
  99104. let n = dS(t.state, e.from, e.to);
  99105. if (n)
  99106. return t.dispatch({ effects: Qoe(t.state, [Lw.of(n), Hoe(t, n)]) }), !0;
  99107. }
  99108. return !1;
  99109. }, zlt = (t) => {
  99110. if (!t.state.field($f, !1))
  99111. return !1;
  99112. let e = [];
  99113. for (let n of Woe(t)) {
  99114. let r = hS(t.state, n.from, n.to);
  99115. r && e.push(uy.of(r), Hoe(t, r, !1));
  99116. }
  99117. return e.length && t.dispatch({ effects: e }), e.length > 0;
  99118. };
  99119. function Hoe(t, e, n = !0) {
  99120. let r = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number;
  99121. return De.announce.of(`${t.state.phrase(n ? "Folded lines" : "Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`);
  99122. }
  99123. const Vlt = (t) => {
  99124. let { state: e } = t, n = [];
  99125. for (let r = 0; r < e.doc.length; ) {
  99126. let i = t.lineBlockAt(r), a = dS(e, i.from, i.to);
  99127. a && n.push(Lw.of(a)), r = (a ? t.lineBlockAt(a.to) : i).to + 1;
  99128. }
  99129. return n.length && t.dispatch({ effects: Qoe(t.state, n) }), !!n.length;
  99130. }, Flt = (t) => {
  99131. let e = t.state.field($f, !1);
  99132. if (!e || !e.size)
  99133. return !1;
  99134. let n = [];
  99135. return e.between(0, t.state.doc.length, (r, i) => {
  99136. n.push(uy.of({ from: r, to: i }));
  99137. }), t.dispatch({ effects: n }), !0;
  99138. }, Wlt = [
  99139. { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: Blt },
  99140. { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: zlt },
  99141. { key: "Ctrl-Alt-[", run: Vlt },
  99142. { key: "Ctrl-Alt-]", run: Flt }
  99143. ], Qlt = {
  99144. placeholderDOM: null,
  99145. preparePlaceholder: null,
  99146. placeholderText: "…"
  99147. }, Goe = /* @__PURE__ */ Be.define({
  99148. combine(t) {
  99149. return fs(t, Qlt);
  99150. }
  99151. });
  99152. function joe(t) {
  99153. return [$f, Zlt];
  99154. }
  99155. function Zoe(t, e) {
  99156. let { state: n } = t, r = n.facet(Goe), i = (o) => {
  99157. let s = t.lineBlockAt(t.posAtDOM(o.target)), l = hS(t.state, s.from, s.to);
  99158. l && t.dispatch({ effects: uy.of(l) }), o.preventDefault();
  99159. };
  99160. if (r.placeholderDOM)
  99161. return r.placeholderDOM(t, i, e);
  99162. let a = document.createElement("span");
  99163. return a.textContent = r.placeholderText, a.setAttribute("aria-label", n.phrase("folded code")), a.title = n.phrase("unfold"), a.className = "cm-foldPlaceholder", a.onclick = i, a;
  99164. }
  99165. const E9 = /* @__PURE__ */ Ze.replace({ widget: /* @__PURE__ */ new class extends ds {
  99166. toDOM(t) {
  99167. return Zoe(t, null);
  99168. }
  99169. }() });
  99170. class Hlt extends ds {
  99171. constructor(e) {
  99172. super(), this.value = e;
  99173. }
  99174. eq(e) {
  99175. return this.value == e.value;
  99176. }
  99177. toDOM(e) {
  99178. return Zoe(e, this.value);
  99179. }
  99180. }
  99181. const Glt = {
  99182. openText: "⌄",
  99183. closedText: "›",
  99184. markerDOM: null,
  99185. domEventHandlers: {},
  99186. foldingChanged: () => !1
  99187. };
  99188. class A$ extends tl {
  99189. constructor(e, n) {
  99190. super(), this.config = e, this.open = n;
  99191. }
  99192. eq(e) {
  99193. return this.config == e.config && this.open == e.open;
  99194. }
  99195. toDOM(e) {
  99196. if (this.config.markerDOM)
  99197. return this.config.markerDOM(this.open);
  99198. let n = document.createElement("span");
  99199. return n.textContent = this.open ? this.config.openText : this.config.closedText, n.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), n;
  99200. }
  99201. }
  99202. function jlt(t = {}) {
  99203. let e = Object.assign(Object.assign({}, Glt), t), n = new A$(e, !0), r = new A$(e, !1), i = kn.fromClass(class {
  99204. constructor(o) {
  99205. this.from = o.viewport.from, this.markers = this.buildMarkers(o);
  99206. }
  99207. update(o) {
  99208. (o.docChanged || o.viewportChanged || o.startState.facet(yu) != o.state.facet(yu) || o.startState.field($f, !1) != o.state.field($f, !1) || nr(o.startState) != nr(o.state) || e.foldingChanged(o)) && (this.markers = this.buildMarkers(o.view));
  99209. }
  99210. buildMarkers(o) {
  99211. let s = new hu();
  99212. for (let l of o.viewportLineBlocks) {
  99213. let u = hS(o.state, l.from, l.to) ? r : dS(o.state, l.from, l.to) ? n : null;
  99214. u && s.add(l.from, l.from, u);
  99215. }
  99216. return s.finish();
  99217. }
  99218. }), { domEventHandlers: a } = e;
  99219. return [
  99220. i,
  99221. Xst({
  99222. class: "cm-foldGutter",
  99223. markers(o) {
  99224. var s;
  99225. return ((s = o.plugin(i)) === null || s === void 0 ? void 0 : s.markers) || Vt.empty;
  99226. },
  99227. initialSpacer() {
  99228. return new A$(e, !1);
  99229. },
  99230. domEventHandlers: Object.assign(Object.assign({}, a), { click: (o, s, l) => {
  99231. if (a.click && a.click(o, s, l))
  99232. return !0;
  99233. let u = hS(o.state, s.from, s.to);
  99234. if (u)
  99235. return o.dispatch({ effects: uy.of(u) }), !0;
  99236. let c = dS(o.state, s.from, s.to);
  99237. return c ? (o.dispatch({ effects: Lw.of(c) }), !0) : !1;
  99238. } })
  99239. }),
  99240. joe()
  99241. ];
  99242. }
  99243. const Zlt = /* @__PURE__ */ De.baseTheme({
  99244. ".cm-foldPlaceholder": {
  99245. backgroundColor: "#eee",
  99246. border: "1px solid #ddd",
  99247. color: "#888",
  99248. borderRadius: ".2em",
  99249. margin: "0 1px",
  99250. padding: "0 1px",
  99251. cursor: "pointer"
  99252. },
  99253. ".cm-foldGutter span": {
  99254. padding: "0 1px",
  99255. cursor: "pointer"
  99256. }
  99257. });
  99258. class cy {
  99259. constructor(e, n) {
  99260. this.specs = e;
  99261. let r;
  99262. function i(s) {
  99263. let l = pu.newName();
  99264. return (r || (r = /* @__PURE__ */ Object.create(null)))["." + l] = s, l;
  99265. }
  99266. const a = typeof n.all == "string" ? n.all : n.all ? i(n.all) : void 0, o = n.scope;
  99267. this.scope = o instanceof Ya ? (s) => s.prop(Hd) == o.data : o ? (s) => s == o : void 0, this.style = Roe(e.map((s) => ({
  99268. tag: s.tag,
  99269. class: s.class || i(Object.assign({}, s, { tag: null }))
  99270. })), {
  99271. all: a
  99272. }).style, this.module = r ? new pu(r) : null, this.themeType = n.themeType;
  99273. }
  99274. /**
  99275. Create a highlighter style that associates the given styles to
  99276. the given tags. The specs must be objects that hold a style tag
  99277. or array of tags in their `tag` property, and either a single
  99278. `class` property providing a static CSS class (for highlighter
  99279. that rely on external styling), or a
  99280. [`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
  99281. set of CSS properties (which define the styling for those tags).
  99282. The CSS rules created for a highlighter will be emitted in the
  99283. order of the spec's properties. That means that for elements that
  99284. have multiple tags associated with them, styles defined further
  99285. down in the list will have a higher CSS precedence than styles
  99286. defined earlier.
  99287. */
  99288. static define(e, n) {
  99289. return new cy(e, n || {});
  99290. }
  99291. }
  99292. const VM = /* @__PURE__ */ Be.define(), Uoe = /* @__PURE__ */ Be.define({
  99293. combine(t) {
  99294. return t.length ? [t[0]] : null;
  99295. }
  99296. });
  99297. function E$(t) {
  99298. let e = t.facet(VM);
  99299. return e.length ? e : t.facet(Uoe);
  99300. }
  99301. function Xoe(t, e) {
  99302. let n = [Xlt], r;
  99303. return t instanceof cy && (t.module && n.push(De.styleModule.of(t.module)), r = t.themeType), e != null && e.fallback ? n.push(Uoe.of(t)) : r ? n.push(VM.computeN([De.darkTheme], (i) => i.facet(De.darkTheme) == (r == "dark") ? [t] : [])) : n.push(VM.of(t)), n;
  99304. }
  99305. class Ult {
  99306. constructor(e) {
  99307. this.markCache = /* @__PURE__ */ Object.create(null), this.tree = nr(e.state), this.decorations = this.buildDeco(e, E$(e.state)), this.decoratedTo = e.viewport.to;
  99308. }
  99309. update(e) {
  99310. let n = nr(e.state), r = E$(e.state), i = r != E$(e.startState), { viewport: a } = e.view, o = e.changes.mapPos(this.decoratedTo, 1);
  99311. n.length < a.to && !i && n.type == this.tree.type && o >= a.to ? (this.decorations = this.decorations.map(e.changes), this.decoratedTo = o) : (n != this.tree || e.viewportChanged || i) && (this.tree = n, this.decorations = this.buildDeco(e.view, r), this.decoratedTo = a.to);
  99312. }
  99313. buildDeco(e, n) {
  99314. if (!n || !this.tree.length)
  99315. return Ze.none;
  99316. let r = new hu();
  99317. for (let { from: i, to: a } of e.visibleRanges)
  99318. ylt(this.tree, n, (o, s, l) => {
  99319. r.add(o, s, this.markCache[l] || (this.markCache[l] = Ze.mark({ class: l })));
  99320. }, i, a);
  99321. return r.finish();
  99322. }
  99323. }
  99324. const Xlt = /* @__PURE__ */ Eu.high(/* @__PURE__ */ kn.fromClass(Ult, {
  99325. decorations: (t) => t.decorations
  99326. })), Ylt = /* @__PURE__ */ cy.define([
  99327. {
  99328. tag: J.meta,
  99329. color: "#404740"
  99330. },
  99331. {
  99332. tag: J.link,
  99333. textDecoration: "underline"
  99334. },
  99335. {
  99336. tag: J.heading,
  99337. textDecoration: "underline",
  99338. fontWeight: "bold"
  99339. },
  99340. {
  99341. tag: J.emphasis,
  99342. fontStyle: "italic"
  99343. },
  99344. {
  99345. tag: J.strong,
  99346. fontWeight: "bold"
  99347. },
  99348. {
  99349. tag: J.strikethrough,
  99350. textDecoration: "line-through"
  99351. },
  99352. {
  99353. tag: J.keyword,
  99354. color: "#708"
  99355. },
  99356. {
  99357. tag: [J.atom, J.bool, J.url, J.contentSeparator, J.labelName],
  99358. color: "#219"
  99359. },
  99360. {
  99361. tag: [J.literal, J.inserted],
  99362. color: "#164"
  99363. },
  99364. {
  99365. tag: [J.string, J.deleted],
  99366. color: "#a11"
  99367. },
  99368. {
  99369. tag: [J.regexp, J.escape, /* @__PURE__ */ J.special(J.string)],
  99370. color: "#e40"
  99371. },
  99372. {
  99373. tag: /* @__PURE__ */ J.definition(J.variableName),
  99374. color: "#00f"
  99375. },
  99376. {
  99377. tag: /* @__PURE__ */ J.local(J.variableName),
  99378. color: "#30a"
  99379. },
  99380. {
  99381. tag: [J.typeName, J.namespace],
  99382. color: "#085"
  99383. },
  99384. {
  99385. tag: J.className,
  99386. color: "#167"
  99387. },
  99388. {
  99389. tag: [/* @__PURE__ */ J.special(J.variableName), J.macroName],
  99390. color: "#256"
  99391. },
  99392. {
  99393. tag: /* @__PURE__ */ J.definition(J.propertyName),
  99394. color: "#00c"
  99395. },
  99396. {
  99397. tag: J.comment,
  99398. color: "#940"
  99399. },
  99400. {
  99401. tag: J.invalid,
  99402. color: "#f00"
  99403. }
  99404. ]), qlt = /* @__PURE__ */ De.baseTheme({
  99405. "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
  99406. "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
  99407. }), Yoe = 1e4, qoe = "()[]{}", Koe = /* @__PURE__ */ Be.define({
  99408. combine(t) {
  99409. return fs(t, {
  99410. afterCursor: !0,
  99411. brackets: qoe,
  99412. maxScanDistance: Yoe,
  99413. renderMatch: eut
  99414. });
  99415. }
  99416. }), Klt = /* @__PURE__ */ Ze.mark({ class: "cm-matchingBracket" }), Jlt = /* @__PURE__ */ Ze.mark({ class: "cm-nonmatchingBracket" });
  99417. function eut(t) {
  99418. let e = [], n = t.matched ? Klt : Jlt;
  99419. return e.push(n.range(t.start.from, t.start.to)), t.end && e.push(n.range(t.end.from, t.end.to)), e;
  99420. }
  99421. const tut = /* @__PURE__ */ ur.define({
  99422. create() {
  99423. return Ze.none;
  99424. },
  99425. update(t, e) {
  99426. if (!e.docChanged && !e.selection)
  99427. return t;
  99428. let n = [], r = e.state.facet(Koe);
  99429. for (let i of e.state.selection.ranges) {
  99430. if (!i.empty)
  99431. continue;
  99432. let a = Ho(e.state, i.head, -1, r) || i.head > 0 && Ho(e.state, i.head - 1, 1, r) || r.afterCursor && (Ho(e.state, i.head, 1, r) || i.head < e.state.doc.length && Ho(e.state, i.head + 1, -1, r));
  99433. a && (n = n.concat(r.renderMatch(a, e.state)));
  99434. }
  99435. return Ze.set(n, !0);
  99436. },
  99437. provide: (t) => De.decorations.from(t)
  99438. }), nut = [
  99439. tut,
  99440. qlt
  99441. ];
  99442. function rut(t = {}) {
  99443. return [Koe.of(t), nut];
  99444. }
  99445. const iut = /* @__PURE__ */ new Pt();
  99446. function FM(t, e, n) {
  99447. let r = t.prop(e < 0 ? Pt.openedBy : Pt.closedBy);
  99448. if (r)
  99449. return r;
  99450. if (t.name.length == 1) {
  99451. let i = n.indexOf(t.name);
  99452. if (i > -1 && i % 2 == (e < 0 ? 1 : 0))
  99453. return [n[i + e]];
  99454. }
  99455. return null;
  99456. }
  99457. function WM(t) {
  99458. let e = t.type.prop(iut);
  99459. return e ? e(t.node) : t;
  99460. }
  99461. function Ho(t, e, n, r = {}) {
  99462. let i = r.maxScanDistance || Yoe, a = r.brackets || qoe, o = nr(t), s = o.resolveInner(e, n);
  99463. for (let l = s; l; l = l.parent) {
  99464. let u = FM(l.type, n, a);
  99465. if (u && l.from < l.to) {
  99466. let c = WM(l);
  99467. if (c && (n > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to))
  99468. return aut(t, e, n, l, c, u, a);
  99469. }
  99470. }
  99471. return out(t, e, n, o, s.type, i, a);
  99472. }
  99473. function aut(t, e, n, r, i, a, o) {
  99474. let s = r.parent, l = { from: i.from, to: i.to }, u = 0, c = s == null ? void 0 : s.cursor();
  99475. if (c && (n < 0 ? c.childBefore(r.from) : c.childAfter(r.to)))
  99476. do
  99477. if (n < 0 ? c.to <= r.from : c.from >= r.to) {
  99478. if (u == 0 && a.indexOf(c.type.name) > -1 && c.from < c.to) {
  99479. let f = WM(c);
  99480. return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 };
  99481. } else if (FM(c.type, n, o))
  99482. u++;
  99483. else if (FM(c.type, -n, o)) {
  99484. if (u == 0) {
  99485. let f = WM(c);
  99486. return {
  99487. start: l,
  99488. end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0,
  99489. matched: !1
  99490. };
  99491. }
  99492. u--;
  99493. }
  99494. }
  99495. while (n < 0 ? c.prevSibling() : c.nextSibling());
  99496. return { start: l, matched: !1 };
  99497. }
  99498. function out(t, e, n, r, i, a, o) {
  99499. let s = n < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = o.indexOf(s);
  99500. if (l < 0 || l % 2 == 0 != n > 0)
  99501. return null;
  99502. let u = { from: n < 0 ? e - 1 : e, to: n > 0 ? e + 1 : e }, c = t.doc.iterRange(e, n > 0 ? t.doc.length : 0), f = 0;
  99503. for (let d = 0; !c.next().done && d <= a; ) {
  99504. let h = c.value;
  99505. n < 0 && (d += h.length);
  99506. let p = e + d * n;
  99507. for (let v = n > 0 ? 0 : h.length - 1, g = n > 0 ? h.length : -1; v != g; v += n) {
  99508. let m = o.indexOf(h[v]);
  99509. if (!(m < 0 || r.resolveInner(p + v, 1).type != i))
  99510. if (m % 2 == 0 == n > 0)
  99511. f++;
  99512. else {
  99513. if (f == 1)
  99514. return { start: u, end: { from: p + v, to: p + v + 1 }, matched: m >> 1 == l >> 1 };
  99515. f--;
  99516. }
  99517. }
  99518. n > 0 && (d += h.length);
  99519. }
  99520. return c.done ? { start: u, matched: !1 } : null;
  99521. }
  99522. const sut = /* @__PURE__ */ Object.create(null), M9 = [Ci.none], I9 = [], D9 = /* @__PURE__ */ Object.create(null), lut = /* @__PURE__ */ Object.create(null);
  99523. for (let [t, e] of [
  99524. ["variable", "variableName"],
  99525. ["variable-2", "variableName.special"],
  99526. ["string-2", "string.special"],
  99527. ["def", "variableName.definition"],
  99528. ["tag", "tagName"],
  99529. ["attribute", "attributeName"],
  99530. ["type", "typeName"],
  99531. ["builtin", "variableName.standard"],
  99532. ["qualifier", "modifier"],
  99533. ["error", "invalid"],
  99534. ["header", "heading"],
  99535. ["property", "propertyName"]
  99536. ])
  99537. lut[t] = /* @__PURE__ */ uut(sut, e);
  99538. function M$(t, e) {
  99539. I9.indexOf(t) > -1 || (I9.push(t), console.warn(e));
  99540. }
  99541. function uut(t, e) {
  99542. let n = [];
  99543. for (let s of e.split(" ")) {
  99544. let l = [];
  99545. for (let u of s.split(".")) {
  99546. let c = t[u] || J[u];
  99547. c ? typeof c == "function" ? l.length ? l = l.map(c) : M$(u, `Modifier ${u} used at start of tag`) : l.length ? M$(u, `Tag ${u} used as modifier`) : l = Array.isArray(c) ? c : [c] : M$(u, `Unknown highlighting tag ${u}`);
  99548. }
  99549. for (let u of l)
  99550. n.push(u);
  99551. }
  99552. if (!n.length)
  99553. return 0;
  99554. let r = e.replace(/ /g, "_"), i = r + " " + n.map((s) => s.id), a = D9[i];
  99555. if (a)
  99556. return a.id;
  99557. let o = D9[i] = Ci.define({
  99558. id: M9.length,
  99559. name: r,
  99560. props: [p4({ [r]: n })]
  99561. });
  99562. return M9.push(o), o.id;
  99563. }
  99564. pn.RTL, pn.LTR;
  99565. const cut = (t) => {
  99566. let { state: e } = t, n = e.doc.lineAt(e.selection.main.from), r = O4(t.state, n.from);
  99567. return r.line ? fut(t) : r.block ? hut(t) : !1;
  99568. };
  99569. function _4(t, e) {
  99570. return ({ state: n, dispatch: r }) => {
  99571. if (n.readOnly)
  99572. return !1;
  99573. let i = t(e, n);
  99574. return i ? (r(n.update(i)), !0) : !1;
  99575. };
  99576. }
  99577. const fut = /* @__PURE__ */ _4(
  99578. gut,
  99579. 0
  99580. /* CommentOption.Toggle */
  99581. ), dut = /* @__PURE__ */ _4(
  99582. Joe,
  99583. 0
  99584. /* CommentOption.Toggle */
  99585. ), hut = /* @__PURE__ */ _4(
  99586. (t, e) => Joe(t, e, vut(e)),
  99587. 0
  99588. /* CommentOption.Toggle */
  99589. );
  99590. function O4(t, e) {
  99591. let n = t.languageDataAt("commentTokens", e);
  99592. return n.length ? n[0] : {};
  99593. }
  99594. const Iv = 50;
  99595. function put(t, { open: e, close: n }, r, i) {
  99596. let a = t.sliceDoc(r - Iv, r), o = t.sliceDoc(i, i + Iv), s = /\s*$/.exec(a)[0].length, l = /^\s*/.exec(o)[0].length, u = a.length - s;
  99597. if (a.slice(u - e.length, u) == e && o.slice(l, l + n.length) == n)
  99598. return {
  99599. open: { pos: r - s, margin: s && 1 },
  99600. close: { pos: i + l, margin: l && 1 }
  99601. };
  99602. let c, f;
  99603. i - r <= 2 * Iv ? c = f = t.sliceDoc(r, i) : (c = t.sliceDoc(r, r + Iv), f = t.sliceDoc(i - Iv, i));
  99604. let d = /^\s*/.exec(c)[0].length, h = /\s*$/.exec(f)[0].length, p = f.length - h - n.length;
  99605. return c.slice(d, d + e.length) == e && f.slice(p, p + n.length) == n ? {
  99606. open: {
  99607. pos: r + d + e.length,
  99608. margin: /\s/.test(c.charAt(d + e.length)) ? 1 : 0
  99609. },
  99610. close: {
  99611. pos: i - h - n.length,
  99612. margin: /\s/.test(f.charAt(p - 1)) ? 1 : 0
  99613. }
  99614. } : null;
  99615. }
  99616. function vut(t) {
  99617. let e = [];
  99618. for (let n of t.selection.ranges) {
  99619. let r = t.doc.lineAt(n.from), i = n.to <= r.to ? r : t.doc.lineAt(n.to), a = e.length - 1;
  99620. a >= 0 && e[a].to > r.from ? e[a].to = i.to : e.push({ from: r.from + /^\s*/.exec(r.text)[0].length, to: i.to });
  99621. }
  99622. return e;
  99623. }
  99624. function Joe(t, e, n = e.selection.ranges) {
  99625. let r = n.map((a) => O4(e, a.from).block);
  99626. if (!r.every((a) => a))
  99627. return null;
  99628. let i = n.map((a, o) => put(e, r[o], a.from, a.to));
  99629. if (t != 2 && !i.every((a) => a))
  99630. return { changes: e.changes(n.map((a, o) => i[o] ? [] : [{ from: a.from, insert: r[o].open + " " }, { from: a.to, insert: " " + r[o].close }])) };
  99631. if (t != 1 && i.some((a) => a)) {
  99632. let a = [];
  99633. for (let o = 0, s; o < i.length; o++)
  99634. if (s = i[o]) {
  99635. let l = r[o], { open: u, close: c } = s;
  99636. a.push({ from: u.pos - l.open.length, to: u.pos + u.margin }, { from: c.pos - c.margin, to: c.pos + l.close.length });
  99637. }
  99638. return { changes: a };
  99639. }
  99640. return null;
  99641. }
  99642. function gut(t, e, n = e.selection.ranges) {
  99643. let r = [], i = -1;
  99644. for (let { from: a, to: o } of n) {
  99645. let s = r.length, l = 1e9, u = O4(e, a).line;
  99646. if (u) {
  99647. for (let c = a; c <= o; ) {
  99648. let f = e.doc.lineAt(c);
  99649. if (f.from > i && (a == o || o > f.from)) {
  99650. i = f.from;
  99651. let d = /^\s*/.exec(f.text)[0].length, h = d == f.length, p = f.text.slice(d, d + u.length) == u ? d : -1;
  99652. d < f.text.length && d < l && (l = d), r.push({ line: f, comment: p, token: u, indent: d, empty: h, single: !1 });
  99653. }
  99654. c = f.to + 1;
  99655. }
  99656. if (l < 1e9)
  99657. for (let c = s; c < r.length; c++)
  99658. r[c].indent < r[c].line.text.length && (r[c].indent = l);
  99659. r.length == s + 1 && (r[s].single = !0);
  99660. }
  99661. }
  99662. if (t != 2 && r.some((a) => a.comment < 0 && (!a.empty || a.single))) {
  99663. let a = [];
  99664. for (let { line: s, token: l, indent: u, empty: c, single: f } of r)
  99665. (f || !c) && a.push({ from: s.from + u, insert: l + " " });
  99666. let o = e.changes(a);
  99667. return { changes: o, selection: e.selection.map(o, 1) };
  99668. } else if (t != 1 && r.some((a) => a.comment >= 0)) {
  99669. let a = [];
  99670. for (let { line: o, comment: s, token: l } of r)
  99671. if (s >= 0) {
  99672. let u = o.from + s, c = u + l.length;
  99673. o.text[c - o.from] == " " && c++, a.push({ from: u, to: c });
  99674. }
  99675. return { changes: a };
  99676. }
  99677. return null;
  99678. }
  99679. const QM = /* @__PURE__ */ ul.define(), mut = /* @__PURE__ */ ul.define(), yut = /* @__PURE__ */ Be.define(), ese = /* @__PURE__ */ Be.define({
  99680. combine(t) {
  99681. return fs(t, {
  99682. minDepth: 100,
  99683. newGroupDelay: 500,
  99684. joinToEvent: (e, n) => n
  99685. }, {
  99686. minDepth: Math.max,
  99687. newGroupDelay: Math.min,
  99688. joinToEvent: (e, n) => (r, i) => e(r, i) || n(r, i)
  99689. });
  99690. }
  99691. }), tse = /* @__PURE__ */ ur.define({
  99692. create() {
  99693. return Go.empty;
  99694. },
  99695. update(t, e) {
  99696. let n = e.state.facet(ese), r = e.annotation(QM);
  99697. if (r) {
  99698. let l = yi.fromTransaction(e, r.selection), u = r.side, c = u == 0 ? t.undone : t.done;
  99699. return l ? c = pS(c, c.length, n.minDepth, l) : c = ise(c, e.startState.selection), new Go(u == 0 ? r.rest : c, u == 0 ? c : r.rest);
  99700. }
  99701. let i = e.annotation(mut);
  99702. if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(Fn.addToHistory) === !1)
  99703. return e.changes.empty ? t : t.addMapping(e.changes.desc);
  99704. let a = yi.fromTransaction(e), o = e.annotation(Fn.time), s = e.annotation(Fn.userEvent);
  99705. return a ? t = t.addChanges(a, o, s, n, e) : e.selection && (t = t.addSelection(e.startState.selection, o, s, n.newGroupDelay)), (i == "full" || i == "after") && (t = t.isolate()), t;
  99706. },
  99707. toJSON(t) {
  99708. return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
  99709. },
  99710. fromJSON(t) {
  99711. return new Go(t.done.map(yi.fromJSON), t.undone.map(yi.fromJSON));
  99712. }
  99713. });
  99714. function but(t = {}) {
  99715. return [
  99716. tse,
  99717. ese.of(t),
  99718. De.domEventHandlers({
  99719. beforeinput(e, n) {
  99720. let r = e.inputType == "historyUndo" ? nse : e.inputType == "historyRedo" ? HM : null;
  99721. return r ? (e.preventDefault(), r(n)) : !1;
  99722. }
  99723. })
  99724. ];
  99725. }
  99726. function Nw(t, e) {
  99727. return function({ state: n, dispatch: r }) {
  99728. if (!e && n.readOnly)
  99729. return !1;
  99730. let i = n.field(tse, !1);
  99731. if (!i)
  99732. return !1;
  99733. let a = i.pop(t, n, e);
  99734. return a ? (r(a), !0) : !1;
  99735. };
  99736. }
  99737. const nse = /* @__PURE__ */ Nw(0, !1), HM = /* @__PURE__ */ Nw(1, !1), _ut = /* @__PURE__ */ Nw(0, !0), Out = /* @__PURE__ */ Nw(1, !0);
  99738. class yi {
  99739. constructor(e, n, r, i, a) {
  99740. this.changes = e, this.effects = n, this.mapped = r, this.startSelection = i, this.selectionsAfter = a;
  99741. }
  99742. setSelAfter(e) {
  99743. return new yi(this.changes, this.effects, this.mapped, this.startSelection, e);
  99744. }
  99745. toJSON() {
  99746. var e, n, r;
  99747. return {
  99748. changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
  99749. mapped: (n = this.mapped) === null || n === void 0 ? void 0 : n.toJSON(),
  99750. startSelection: (r = this.startSelection) === null || r === void 0 ? void 0 : r.toJSON(),
  99751. selectionsAfter: this.selectionsAfter.map((i) => i.toJSON())
  99752. };
  99753. }
  99754. static fromJSON(e) {
  99755. return new yi(e.changes && jn.fromJSON(e.changes), [], e.mapped && Yo.fromJSON(e.mapped), e.startSelection && me.fromJSON(e.startSelection), e.selectionsAfter.map(me.fromJSON));
  99756. }
  99757. // This does not check `addToHistory` and such, it assumes the
  99758. // transaction needs to be converted to an item. Returns null when
  99759. // there are no changes or effects in the transaction.
  99760. static fromTransaction(e, n) {
  99761. let r = ya;
  99762. for (let i of e.startState.facet(yut)) {
  99763. let a = i(e);
  99764. a.length && (r = r.concat(a));
  99765. }
  99766. return !r.length && e.changes.empty ? null : new yi(e.changes.invert(e.startState.doc), r, void 0, n || e.startState.selection, ya);
  99767. }
  99768. static selection(e) {
  99769. return new yi(void 0, ya, void 0, void 0, e);
  99770. }
  99771. }
  99772. function pS(t, e, n, r) {
  99773. let i = e + 1 > n + 20 ? e - n - 1 : 0, a = t.slice(i, e);
  99774. return a.push(r), a;
  99775. }
  99776. function Sut(t, e) {
  99777. let n = [], r = !1;
  99778. return t.iterChangedRanges((i, a) => n.push(i, a)), e.iterChangedRanges((i, a, o, s) => {
  99779. for (let l = 0; l < n.length; ) {
  99780. let u = n[l++], c = n[l++];
  99781. s >= u && o <= c && (r = !0);
  99782. }
  99783. }), r;
  99784. }
  99785. function xut(t, e) {
  99786. return t.ranges.length == e.ranges.length && t.ranges.filter((n, r) => n.empty != e.ranges[r].empty).length === 0;
  99787. }
  99788. function rse(t, e) {
  99789. return t.length ? e.length ? t.concat(e) : t : e;
  99790. }
  99791. const ya = [], wut = 200;
  99792. function ise(t, e) {
  99793. if (t.length) {
  99794. let n = t[t.length - 1], r = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - wut));
  99795. return r.length && r[r.length - 1].eq(e) ? t : (r.push(e), pS(t, t.length - 1, 1e9, n.setSelAfter(r)));
  99796. } else
  99797. return [yi.selection([e])];
  99798. }
  99799. function Cut(t) {
  99800. let e = t[t.length - 1], n = t.slice();
  99801. return n[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), n;
  99802. }
  99803. function I$(t, e) {
  99804. if (!t.length)
  99805. return t;
  99806. let n = t.length, r = ya;
  99807. for (; n; ) {
  99808. let i = Tut(t[n - 1], e, r);
  99809. if (i.changes && !i.changes.empty || i.effects.length) {
  99810. let a = t.slice(0, n);
  99811. return a[n - 1] = i, a;
  99812. } else
  99813. e = i.mapped, n--, r = i.selectionsAfter;
  99814. }
  99815. return r.length ? [yi.selection(r)] : ya;
  99816. }
  99817. function Tut(t, e, n) {
  99818. let r = rse(t.selectionsAfter.length ? t.selectionsAfter.map((s) => s.map(e)) : ya, n);
  99819. if (!t.changes)
  99820. return yi.selection(r);
  99821. let i = t.changes.map(e), a = e.mapDesc(t.changes, !0), o = t.mapped ? t.mapped.composeDesc(a) : a;
  99822. return new yi(i, dt.mapEffects(t.effects, e), o, t.startSelection.map(a), r);
  99823. }
  99824. const Put = /^(input\.type|delete)($|\.)/;
  99825. class Go {
  99826. constructor(e, n, r = 0, i = void 0) {
  99827. this.done = e, this.undone = n, this.prevTime = r, this.prevUserEvent = i;
  99828. }
  99829. isolate() {
  99830. return this.prevTime ? new Go(this.done, this.undone) : this;
  99831. }
  99832. addChanges(e, n, r, i, a) {
  99833. let o = this.done, s = o[o.length - 1];
  99834. return s && s.changes && !s.changes.empty && e.changes && (!r || Put.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, Sut(s.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
  99835. r == "input.type.compose") ? o = pS(o, o.length - 1, i.minDepth, new yi(e.changes.compose(s.changes), rse(e.effects, s.effects), s.mapped, s.startSelection, ya)) : o = pS(o, o.length, i.minDepth, e), new Go(o, ya, n, r);
  99836. }
  99837. addSelection(e, n, r, i) {
  99838. let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : ya;
  99839. return a.length > 0 && n - this.prevTime < i && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && xut(a[a.length - 1], e) ? this : new Go(ise(this.done, e), this.undone, n, r);
  99840. }
  99841. addMapping(e) {
  99842. return new Go(I$(this.done, e), I$(this.undone, e), this.prevTime, this.prevUserEvent);
  99843. }
  99844. pop(e, n, r) {
  99845. let i = e == 0 ? this.done : this.undone;
  99846. if (i.length == 0)
  99847. return null;
  99848. let a = i[i.length - 1], o = a.selectionsAfter[0] || n.selection;
  99849. if (r && a.selectionsAfter.length)
  99850. return n.update({
  99851. selection: a.selectionsAfter[a.selectionsAfter.length - 1],
  99852. annotations: QM.of({ side: e, rest: Cut(i), selection: o }),
  99853. userEvent: e == 0 ? "select.undo" : "select.redo",
  99854. scrollIntoView: !0
  99855. });
  99856. if (a.changes) {
  99857. let s = i.length == 1 ? ya : i.slice(0, i.length - 1);
  99858. return a.mapped && (s = I$(s, a.mapped)), n.update({
  99859. changes: a.changes,
  99860. selection: a.startSelection,
  99861. effects: a.effects,
  99862. annotations: QM.of({ side: e, rest: s, selection: o }),
  99863. filter: !1,
  99864. userEvent: e == 0 ? "undo" : "redo",
  99865. scrollIntoView: !0
  99866. });
  99867. } else
  99868. return null;
  99869. }
  99870. }
  99871. Go.empty = /* @__PURE__ */ new Go(ya, ya);
  99872. const $ut = [
  99873. { key: "Mod-z", run: nse, preventDefault: !0 },
  99874. { key: "Mod-y", mac: "Mod-Shift-z", run: HM, preventDefault: !0 },
  99875. { linux: "Ctrl-Shift-z", run: HM, preventDefault: !0 },
  99876. { key: "Mod-u", run: _ut, preventDefault: !0 },
  99877. { key: "Alt-u", mac: "Mod-Shift-u", run: Out, preventDefault: !0 }
  99878. ];
  99879. function kp(t, e) {
  99880. return me.create(t.ranges.map(e), t.mainIndex);
  99881. }
  99882. function hs(t, e) {
  99883. return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
  99884. }
  99885. function yo({ state: t, dispatch: e }, n) {
  99886. let r = kp(t.selection, n);
  99887. return r.eq(t.selection, !0) ? !1 : (e(hs(t, r)), !0);
  99888. }
  99889. function Bw(t, e) {
  99890. return me.cursor(e ? t.to : t.from);
  99891. }
  99892. function ase(t, e) {
  99893. return yo(t, (n) => n.empty ? t.moveByChar(n, e) : Bw(n, e));
  99894. }
  99895. function zr(t) {
  99896. return t.textDirectionAt(t.state.selection.main.head) == pn.LTR;
  99897. }
  99898. const ose = (t) => ase(t, !zr(t)), sse = (t) => ase(t, zr(t));
  99899. function lse(t, e) {
  99900. return yo(t, (n) => n.empty ? t.moveByGroup(n, e) : Bw(n, e));
  99901. }
  99902. const Aut = (t) => lse(t, !zr(t)), Eut = (t) => lse(t, zr(t));
  99903. function Mut(t, e, n) {
  99904. if (e.type.prop(n))
  99905. return !0;
  99906. let r = e.to - e.from;
  99907. return r && (r > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
  99908. }
  99909. function zw(t, e, n) {
  99910. let r = nr(t).resolveInner(e.head), i = n ? Pt.closedBy : Pt.openedBy;
  99911. for (let l = e.head; ; ) {
  99912. let u = n ? r.childAfter(l) : r.childBefore(l);
  99913. if (!u)
  99914. break;
  99915. Mut(t, u, i) ? r = u : l = n ? u.to : u.from;
  99916. }
  99917. let a = r.type.prop(i), o, s;
  99918. return a && (o = n ? Ho(t, r.from, 1) : Ho(t, r.to, -1)) && o.matched ? s = n ? o.end.to : o.end.from : s = n ? r.to : r.from, me.cursor(s, n ? -1 : 1);
  99919. }
  99920. const Iut = (t) => yo(t, (e) => zw(t.state, e, !zr(t))), Dut = (t) => yo(t, (e) => zw(t.state, e, zr(t)));
  99921. function use(t, e) {
  99922. return yo(t, (n) => {
  99923. if (!n.empty)
  99924. return Bw(n, e);
  99925. let r = t.moveVertically(n, e);
  99926. return r.head != n.head ? r : t.moveToLineBoundary(n, e);
  99927. });
  99928. }
  99929. const cse = (t) => use(t, !1), fse = (t) => use(t, !0);
  99930. function dse(t) {
  99931. let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, n = 0, r = 0, i;
  99932. if (e) {
  99933. for (let a of t.state.facet(De.scrollMargins)) {
  99934. let o = a(t);
  99935. o != null && o.top && (n = Math.max(o == null ? void 0 : o.top, n)), o != null && o.bottom && (r = Math.max(o == null ? void 0 : o.bottom, r));
  99936. }
  99937. i = t.scrollDOM.clientHeight - n - r;
  99938. } else
  99939. i = (t.dom.ownerDocument.defaultView || window).innerHeight;
  99940. return {
  99941. marginTop: n,
  99942. marginBottom: r,
  99943. selfScroll: e,
  99944. height: Math.max(t.defaultLineHeight, i - 5)
  99945. };
  99946. }
  99947. function hse(t, e) {
  99948. let n = dse(t), { state: r } = t, i = kp(r.selection, (o) => o.empty ? t.moveVertically(o, e, n.height) : Bw(o, e));
  99949. if (i.eq(r.selection))
  99950. return !1;
  99951. let a;
  99952. if (n.selfScroll) {
  99953. let o = t.coordsAtPos(r.selection.main.head), s = t.scrollDOM.getBoundingClientRect(), l = s.top + n.marginTop, u = s.bottom - n.marginBottom;
  99954. o && o.top > l && o.bottom < u && (a = De.scrollIntoView(i.main.head, { y: "start", yMargin: o.top - l }));
  99955. }
  99956. return t.dispatch(hs(r, i), { effects: a }), !0;
  99957. }
  99958. const R9 = (t) => hse(t, !1), GM = (t) => hse(t, !0);
  99959. function Mu(t, e, n) {
  99960. let r = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, n);
  99961. if (i.head == e.head && i.head != (n ? r.to : r.from) && (i = t.moveToLineBoundary(e, n, !1)), !n && i.head == r.from && r.length) {
  99962. let a = /^\s*/.exec(t.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
  99963. a && e.head != r.from + a && (i = me.cursor(r.from + a));
  99964. }
  99965. return i;
  99966. }
  99967. const Rut = (t) => yo(t, (e) => Mu(t, e, !0)), kut = (t) => yo(t, (e) => Mu(t, e, !1)), Lut = (t) => yo(t, (e) => Mu(t, e, !zr(t))), Nut = (t) => yo(t, (e) => Mu(t, e, zr(t))), But = (t) => yo(t, (e) => me.cursor(t.lineBlockAt(e.head).from, 1)), zut = (t) => yo(t, (e) => me.cursor(t.lineBlockAt(e.head).to, -1));
  99968. function Vut(t, e, n) {
  99969. let r = !1, i = kp(t.selection, (a) => {
  99970. let o = Ho(t, a.head, -1) || Ho(t, a.head, 1) || a.head > 0 && Ho(t, a.head - 1, 1) || a.head < t.doc.length && Ho(t, a.head + 1, -1);
  99971. if (!o || !o.end)
  99972. return a;
  99973. r = !0;
  99974. let s = o.start.from == a.head ? o.end.to : o.end.from;
  99975. return me.cursor(s);
  99976. });
  99977. return r ? (e(hs(t, i)), !0) : !1;
  99978. }
  99979. const Fut = ({ state: t, dispatch: e }) => Vut(t, e);
  99980. function za(t, e) {
  99981. let n = kp(t.state.selection, (r) => {
  99982. let i = e(r);
  99983. return me.range(r.anchor, i.head, i.goalColumn, i.bidiLevel || void 0);
  99984. });
  99985. return n.eq(t.state.selection) ? !1 : (t.dispatch(hs(t.state, n)), !0);
  99986. }
  99987. function pse(t, e) {
  99988. return za(t, (n) => t.moveByChar(n, e));
  99989. }
  99990. const vse = (t) => pse(t, !zr(t)), gse = (t) => pse(t, zr(t));
  99991. function mse(t, e) {
  99992. return za(t, (n) => t.moveByGroup(n, e));
  99993. }
  99994. const Wut = (t) => mse(t, !zr(t)), Qut = (t) => mse(t, zr(t)), Hut = (t) => za(t, (e) => zw(t.state, e, !zr(t))), Gut = (t) => za(t, (e) => zw(t.state, e, zr(t)));
  99995. function yse(t, e) {
  99996. return za(t, (n) => t.moveVertically(n, e));
  99997. }
  99998. const bse = (t) => yse(t, !1), _se = (t) => yse(t, !0);
  99999. function Ose(t, e) {
  100000. return za(t, (n) => t.moveVertically(n, e, dse(t).height));
  100001. }
  100002. const k9 = (t) => Ose(t, !1), L9 = (t) => Ose(t, !0), jut = (t) => za(t, (e) => Mu(t, e, !0)), Zut = (t) => za(t, (e) => Mu(t, e, !1)), Uut = (t) => za(t, (e) => Mu(t, e, !zr(t))), Xut = (t) => za(t, (e) => Mu(t, e, zr(t))), Yut = (t) => za(t, (e) => me.cursor(t.lineBlockAt(e.head).from)), qut = (t) => za(t, (e) => me.cursor(t.lineBlockAt(e.head).to)), N9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: 0 })), !0), B9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.doc.length })), !0), z9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.selection.main.anchor, head: 0 })), !0), V9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), Kut = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), Jut = ({ state: t, dispatch: e }) => {
  100003. let n = Vw(t).map(({ from: r, to: i }) => me.range(r, Math.min(i + 1, t.doc.length)));
  100004. return e(t.update({ selection: me.create(n), userEvent: "select" })), !0;
  100005. }, ect = ({ state: t, dispatch: e }) => {
  100006. let n = kp(t.selection, (r) => {
  100007. var i;
  100008. let a = nr(t).resolveStack(r.from, 1);
  100009. for (let o = a; o; o = o.next) {
  100010. let { node: s } = o;
  100011. if ((s.from < r.from && s.to >= r.to || s.to > r.to && s.from <= r.from) && (!((i = s.parent) === null || i === void 0) && i.parent))
  100012. return me.range(s.to, s.from);
  100013. }
  100014. return r;
  100015. });
  100016. return e(hs(t, n)), !0;
  100017. }, tct = ({ state: t, dispatch: e }) => {
  100018. let n = t.selection, r = null;
  100019. return n.ranges.length > 1 ? r = me.create([n.main]) : n.main.empty || (r = me.create([me.cursor(n.main.head)])), r ? (e(hs(t, r)), !0) : !1;
  100020. };
  100021. function fy(t, e) {
  100022. if (t.state.readOnly)
  100023. return !1;
  100024. let n = "delete.selection", { state: r } = t, i = r.changeByRange((a) => {
  100025. let { from: o, to: s } = a;
  100026. if (o == s) {
  100027. let l = e(a);
  100028. l < o ? (n = "delete.backward", l = o_(t, l, !1)) : l > o && (n = "delete.forward", l = o_(t, l, !0)), o = Math.min(o, l), s = Math.max(s, l);
  100029. } else
  100030. o = o_(t, o, !1), s = o_(t, s, !0);
  100031. return o == s ? { range: a } : { changes: { from: o, to: s }, range: me.cursor(o, o < a.head ? -1 : 1) };
  100032. });
  100033. return i.changes.empty ? !1 : (t.dispatch(r.update(i, {
  100034. scrollIntoView: !0,
  100035. userEvent: n,
  100036. effects: n == "delete.selection" ? De.announce.of(r.phrase("Selection deleted")) : void 0
  100037. })), !0);
  100038. }
  100039. function o_(t, e, n) {
  100040. if (t instanceof De)
  100041. for (let r of t.state.facet(De.atomicRanges).map((i) => i(t)))
  100042. r.between(e, e, (i, a) => {
  100043. i < e && a > e && (e = n ? a : i);
  100044. });
  100045. return e;
  100046. }
  100047. const Sse = (t, e, n) => fy(t, (r) => {
  100048. let i = r.from, { state: a } = t, o = a.doc.lineAt(i), s, l;
  100049. if (n && !e && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
  100050. if (s[s.length - 1] == " ")
  100051. return i - 1;
  100052. let u = Rp(s, a.tabSize), c = u % fS(a) || fS(a);
  100053. for (let f = 0; f < c && s[s.length - 1 - f] == " "; f++)
  100054. i--;
  100055. l = i;
  100056. } else
  100057. l = _r(o.text, i - o.from, e, e) + o.from, l == i && o.number != (e ? a.doc.lines : 1) ? l += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(o.text.slice(l - o.from, i - o.from)) && (l = _r(o.text, l - o.from, !1, !1) + o.from);
  100058. return l;
  100059. }), jM = (t) => Sse(t, !1, !0), xse = (t) => Sse(t, !0, !1), wse = (t, e) => fy(t, (n) => {
  100060. let r = n.head, { state: i } = t, a = i.doc.lineAt(r), o = i.charCategorizer(r);
  100061. for (let s = null; ; ) {
  100062. if (r == (e ? a.to : a.from)) {
  100063. r == n.head && a.number != (e ? i.doc.lines : 1) && (r += e ? 1 : -1);
  100064. break;
  100065. }
  100066. let l = _r(a.text, r - a.from, e) + a.from, u = a.text.slice(Math.min(r, l) - a.from, Math.max(r, l) - a.from), c = o(u);
  100067. if (s != null && c != s)
  100068. break;
  100069. (u != " " || r != n.head) && (s = c), r = l;
  100070. }
  100071. return r;
  100072. }), Cse = (t) => wse(t, !1), nct = (t) => wse(t, !0), rct = (t) => fy(t, (e) => {
  100073. let n = t.lineBlockAt(e.head).to;
  100074. return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
  100075. }), ict = (t) => fy(t, (e) => {
  100076. let n = t.moveToLineBoundary(e, !1).head;
  100077. return e.head > n ? n : Math.max(0, e.head - 1);
  100078. }), act = (t) => fy(t, (e) => {
  100079. let n = t.moveToLineBoundary(e, !0).head;
  100080. return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
  100081. }), oct = ({ state: t, dispatch: e }) => {
  100082. if (t.readOnly)
  100083. return !1;
  100084. let n = t.changeByRange((r) => ({
  100085. changes: { from: r.from, to: r.to, insert: Ft.of(["", ""]) },
  100086. range: me.cursor(r.from)
  100087. }));
  100088. return e(t.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
  100089. }, sct = ({ state: t, dispatch: e }) => {
  100090. if (t.readOnly)
  100091. return !1;
  100092. let n = t.changeByRange((r) => {
  100093. if (!r.empty || r.from == 0 || r.from == t.doc.length)
  100094. return { range: r };
  100095. let i = r.from, a = t.doc.lineAt(i), o = i == a.from ? i - 1 : _r(a.text, i - a.from, !1) + a.from, s = i == a.to ? i + 1 : _r(a.text, i - a.from, !0) + a.from;
  100096. return {
  100097. changes: { from: o, to: s, insert: t.doc.slice(i, s).append(t.doc.slice(o, i)) },
  100098. range: me.cursor(s)
  100099. };
  100100. });
  100101. return n.changes.empty ? !1 : (e(t.update(n, { scrollIntoView: !0, userEvent: "move.character" })), !0);
  100102. };
  100103. function Vw(t) {
  100104. let e = [], n = -1;
  100105. for (let r of t.selection.ranges) {
  100106. let i = t.doc.lineAt(r.from), a = t.doc.lineAt(r.to);
  100107. if (!r.empty && r.to == a.from && (a = t.doc.lineAt(r.to - 1)), n >= i.number) {
  100108. let o = e[e.length - 1];
  100109. o.to = a.to, o.ranges.push(r);
  100110. } else
  100111. e.push({ from: i.from, to: a.to, ranges: [r] });
  100112. n = a.number + 1;
  100113. }
  100114. return e;
  100115. }
  100116. function Tse(t, e, n) {
  100117. if (t.readOnly)
  100118. return !1;
  100119. let r = [], i = [];
  100120. for (let a of Vw(t)) {
  100121. if (n ? a.to == t.doc.length : a.from == 0)
  100122. continue;
  100123. let o = t.doc.lineAt(n ? a.to + 1 : a.from - 1), s = o.length + 1;
  100124. if (n) {
  100125. r.push({ from: a.to, to: o.to }, { from: a.from, insert: o.text + t.lineBreak });
  100126. for (let l of a.ranges)
  100127. i.push(me.range(Math.min(t.doc.length, l.anchor + s), Math.min(t.doc.length, l.head + s)));
  100128. } else {
  100129. r.push({ from: o.from, to: a.from }, { from: a.to, insert: t.lineBreak + o.text });
  100130. for (let l of a.ranges)
  100131. i.push(me.range(l.anchor - s, l.head - s));
  100132. }
  100133. }
  100134. return r.length ? (e(t.update({
  100135. changes: r,
  100136. scrollIntoView: !0,
  100137. selection: me.create(i, t.selection.mainIndex),
  100138. userEvent: "move.line"
  100139. })), !0) : !1;
  100140. }
  100141. const lct = ({ state: t, dispatch: e }) => Tse(t, e, !1), uct = ({ state: t, dispatch: e }) => Tse(t, e, !0);
  100142. function Pse(t, e, n) {
  100143. if (t.readOnly)
  100144. return !1;
  100145. let r = [];
  100146. for (let i of Vw(t))
  100147. n ? r.push({ from: i.from, insert: t.doc.slice(i.from, i.to) + t.lineBreak }) : r.push({ from: i.to, insert: t.lineBreak + t.doc.slice(i.from, i.to) });
  100148. return e(t.update({ changes: r, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
  100149. }
  100150. const cct = ({ state: t, dispatch: e }) => Pse(t, e, !1), fct = ({ state: t, dispatch: e }) => Pse(t, e, !0), dct = (t) => {
  100151. if (t.state.readOnly)
  100152. return !1;
  100153. let { state: e } = t, n = e.changes(Vw(e).map(({ from: i, to: a }) => (i > 0 ? i-- : a < e.doc.length && a++, { from: i, to: a }))), r = kp(e.selection, (i) => {
  100154. let a;
  100155. if (t.lineWrapping) {
  100156. let o = t.lineBlockAt(i.head), s = t.coordsAtPos(i.head, i.assoc || 1);
  100157. s && (a = o.bottom + t.documentTop - s.bottom + t.defaultLineHeight / 2);
  100158. }
  100159. return t.moveVertically(i, !0, a);
  100160. }).map(n);
  100161. return t.dispatch({ changes: n, selection: r, scrollIntoView: !0, userEvent: "delete.line" }), !0;
  100162. };
  100163. function hct(t, e) {
  100164. if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
  100165. return { from: e, to: e };
  100166. let n = nr(t).resolveInner(e), r = n.childBefore(e), i = n.childAfter(e), a;
  100167. return r && i && r.to <= e && i.from >= e && (a = r.type.prop(Pt.closedBy)) && a.indexOf(i.name) > -1 && t.doc.lineAt(r.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(r.to, i.from)) ? { from: r.to, to: i.from } : null;
  100168. }
  100169. const pct = /* @__PURE__ */ $se(!1), vct = /* @__PURE__ */ $se(!0);
  100170. function $se(t) {
  100171. return ({ state: e, dispatch: n }) => {
  100172. if (e.readOnly)
  100173. return !1;
  100174. let r = e.changeByRange((i) => {
  100175. let { from: a, to: o } = i, s = e.doc.lineAt(a), l = !t && a == o && hct(e, a);
  100176. t && (a = o = (o <= s.to ? s : e.doc.lineAt(o)).to);
  100177. let u = new kw(e, { simulateBreak: a, simulateDoubleBreak: !!l }), c = g4(u, a);
  100178. for (c == null && (c = Rp(/^\s*/.exec(e.doc.lineAt(a).text)[0], e.tabSize)); o < s.to && /\s/.test(s.text[o - s.from]); )
  100179. o++;
  100180. l ? { from: a, to: o } = l : a > s.from && a < s.from + 100 && !/\S/.test(s.text.slice(0, a)) && (a = s.from);
  100181. let f = ["", t0(e, c)];
  100182. return l && f.push(t0(e, u.lineIndent(s.from, -1))), {
  100183. changes: { from: a, to: o, insert: Ft.of(f) },
  100184. range: me.cursor(a + 1 + f[1].length)
  100185. };
  100186. });
  100187. return n(e.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
  100188. };
  100189. }
  100190. function S4(t, e) {
  100191. let n = -1;
  100192. return t.changeByRange((r) => {
  100193. let i = [];
  100194. for (let o = r.from; o <= r.to; ) {
  100195. let s = t.doc.lineAt(o);
  100196. s.number > n && (r.empty || r.to > s.from) && (e(s, i, r), n = s.number), o = s.to + 1;
  100197. }
  100198. let a = t.changes(i);
  100199. return {
  100200. changes: i,
  100201. range: me.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
  100202. };
  100203. });
  100204. }
  100205. const gct = ({ state: t, dispatch: e }) => {
  100206. if (t.readOnly)
  100207. return !1;
  100208. let n = /* @__PURE__ */ Object.create(null), r = new kw(t, { overrideIndentation: (a) => {
  100209. let o = n[a];
  100210. return o ?? -1;
  100211. } }), i = S4(t, (a, o, s) => {
  100212. let l = g4(r, a.from);
  100213. if (l == null)
  100214. return;
  100215. /\S/.test(a.text) || (l = 0);
  100216. let u = /^\s*/.exec(a.text)[0], c = t0(t, l);
  100217. (u != c || s.from < a.from + u.length) && (n[a.from] = l, o.push({ from: a.from, to: a.from + u.length, insert: c }));
  100218. });
  100219. return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0;
  100220. }, Ase = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(S4(t, (n, r) => {
  100221. r.push({ from: n.from, insert: t.facet(ly) });
  100222. }), { userEvent: "input.indent" })), !0), Ese = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(S4(t, (n, r) => {
  100223. let i = /^\s*/.exec(n.text)[0];
  100224. if (!i)
  100225. return;
  100226. let a = Rp(i, t.tabSize), o = 0, s = t0(t, Math.max(0, a - fS(t)));
  100227. for (; o < i.length && o < s.length && i.charCodeAt(o) == s.charCodeAt(o); )
  100228. o++;
  100229. r.push({ from: n.from + o, to: n.from + i.length, insert: s.slice(o) });
  100230. }), { userEvent: "delete.dedent" })), !0), mct = (t) => (t.setTabFocusMode(), !0), yct = [
  100231. { key: "Ctrl-b", run: ose, shift: vse, preventDefault: !0 },
  100232. { key: "Ctrl-f", run: sse, shift: gse },
  100233. { key: "Ctrl-p", run: cse, shift: bse },
  100234. { key: "Ctrl-n", run: fse, shift: _se },
  100235. { key: "Ctrl-a", run: But, shift: Yut },
  100236. { key: "Ctrl-e", run: zut, shift: qut },
  100237. { key: "Ctrl-d", run: xse },
  100238. { key: "Ctrl-h", run: jM },
  100239. { key: "Ctrl-k", run: rct },
  100240. { key: "Ctrl-Alt-h", run: Cse },
  100241. { key: "Ctrl-o", run: oct },
  100242. { key: "Ctrl-t", run: sct },
  100243. { key: "Ctrl-v", run: GM }
  100244. ], bct = /* @__PURE__ */ [
  100245. { key: "ArrowLeft", run: ose, shift: vse, preventDefault: !0 },
  100246. { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: Aut, shift: Wut, preventDefault: !0 },
  100247. { mac: "Cmd-ArrowLeft", run: Lut, shift: Uut, preventDefault: !0 },
  100248. { key: "ArrowRight", run: sse, shift: gse, preventDefault: !0 },
  100249. { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Eut, shift: Qut, preventDefault: !0 },
  100250. { mac: "Cmd-ArrowRight", run: Nut, shift: Xut, preventDefault: !0 },
  100251. { key: "ArrowUp", run: cse, shift: bse, preventDefault: !0 },
  100252. { mac: "Cmd-ArrowUp", run: N9, shift: z9 },
  100253. { mac: "Ctrl-ArrowUp", run: R9, shift: k9 },
  100254. { key: "ArrowDown", run: fse, shift: _se, preventDefault: !0 },
  100255. { mac: "Cmd-ArrowDown", run: B9, shift: V9 },
  100256. { mac: "Ctrl-ArrowDown", run: GM, shift: L9 },
  100257. { key: "PageUp", run: R9, shift: k9 },
  100258. { key: "PageDown", run: GM, shift: L9 },
  100259. { key: "Home", run: kut, shift: Zut, preventDefault: !0 },
  100260. { key: "Mod-Home", run: N9, shift: z9 },
  100261. { key: "End", run: Rut, shift: jut, preventDefault: !0 },
  100262. { key: "Mod-End", run: B9, shift: V9 },
  100263. { key: "Enter", run: pct },
  100264. { key: "Mod-a", run: Kut },
  100265. { key: "Backspace", run: jM, shift: jM },
  100266. { key: "Delete", run: xse },
  100267. { key: "Mod-Backspace", mac: "Alt-Backspace", run: Cse },
  100268. { key: "Mod-Delete", mac: "Alt-Delete", run: nct },
  100269. { mac: "Mod-Backspace", run: ict },
  100270. { mac: "Mod-Delete", run: act }
  100271. ].concat(/* @__PURE__ */ yct.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), _ct = /* @__PURE__ */ [
  100272. { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: Iut, shift: Hut },
  100273. { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: Dut, shift: Gut },
  100274. { key: "Alt-ArrowUp", run: lct },
  100275. { key: "Shift-Alt-ArrowUp", run: cct },
  100276. { key: "Alt-ArrowDown", run: uct },
  100277. { key: "Shift-Alt-ArrowDown", run: fct },
  100278. { key: "Escape", run: tct },
  100279. { key: "Mod-Enter", run: vct },
  100280. { key: "Alt-l", mac: "Ctrl-l", run: Jut },
  100281. { key: "Mod-i", run: ect, preventDefault: !0 },
  100282. { key: "Mod-[", run: Ese },
  100283. { key: "Mod-]", run: Ase },
  100284. { key: "Mod-Alt-\\", run: gct },
  100285. { key: "Shift-Mod-k", run: dct },
  100286. { key: "Shift-Mod-\\", run: Fut },
  100287. { key: "Mod-/", run: cut },
  100288. { key: "Alt-A", run: dut },
  100289. { key: "Ctrl-m", mac: "Shift-Alt-m", run: mct }
  100290. ].concat(bct), Oct = { key: "Tab", run: Ase, shift: Ese };
  100291. function on() {
  100292. var t = arguments[0];
  100293. typeof t == "string" && (t = document.createElement(t));
  100294. var e = 1, n = arguments[1];
  100295. if (n && typeof n == "object" && n.nodeType == null && !Array.isArray(n)) {
  100296. for (var r in n) if (Object.prototype.hasOwnProperty.call(n, r)) {
  100297. var i = n[r];
  100298. typeof i == "string" ? t.setAttribute(r, i) : i != null && (t[r] = i);
  100299. }
  100300. e++;
  100301. }
  100302. for (; e < arguments.length; e++) Mse(t, arguments[e]);
  100303. return t;
  100304. }
  100305. function Mse(t, e) {
  100306. if (typeof e == "string")
  100307. t.appendChild(document.createTextNode(e));
  100308. else if (e != null) if (e.nodeType != null)
  100309. t.appendChild(e);
  100310. else if (Array.isArray(e))
  100311. for (var n = 0; n < e.length; n++) Mse(t, e[n]);
  100312. else
  100313. throw new RangeError("Unsupported child node: " + e);
  100314. }
  100315. const F9 = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t;
  100316. class Kh {
  100317. /**
  100318. Create a text cursor. The query is the search string, `from` to
  100319. `to` provides the region to search.
  100320. When `normalize` is given, it will be called, on both the query
  100321. string and the content it is matched against, before comparing.
  100322. You can, for example, create a case-insensitive search by
  100323. passing `s => s.toLowerCase()`.
  100324. Text is always normalized with
  100325. [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
  100326. (when supported).
  100327. */
  100328. constructor(e, n, r = 0, i = e.length, a, o) {
  100329. this.test = o, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(r, i), this.bufferStart = r, this.normalize = a ? (s) => a(F9(s)) : F9, this.query = this.normalize(n);
  100330. }
  100331. peek() {
  100332. if (this.bufferPos == this.buffer.length) {
  100333. if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
  100334. return -1;
  100335. this.bufferPos = 0, this.buffer = this.iter.value;
  100336. }
  100337. return gr(this.buffer, this.bufferPos);
  100338. }
  100339. /**
  100340. Look for the next match. Updates the iterator's
  100341. [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
  100342. [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
  100343. at least once before using the cursor.
  100344. */
  100345. next() {
  100346. for (; this.matches.length; )
  100347. this.matches.pop();
  100348. return this.nextOverlapping();
  100349. }
  100350. /**
  100351. The `next` method will ignore matches that partially overlap a
  100352. previous match. This method behaves like `next`, but includes
  100353. such matches.
  100354. */
  100355. nextOverlapping() {
  100356. for (; ; ) {
  100357. let e = this.peek();
  100358. if (e < 0)
  100359. return this.done = !0, this;
  100360. let n = KL(e), r = this.bufferStart + this.bufferPos;
  100361. this.bufferPos += ga(e);
  100362. let i = this.normalize(n);
  100363. for (let a = 0, o = r; ; a++) {
  100364. let s = i.charCodeAt(a), l = this.match(s, o, this.bufferPos + this.bufferStart);
  100365. if (a == i.length - 1) {
  100366. if (l)
  100367. return this.value = l, this;
  100368. break;
  100369. }
  100370. o == r && a < n.length && n.charCodeAt(a) == s && o++;
  100371. }
  100372. }
  100373. }
  100374. match(e, n, r) {
  100375. let i = null;
  100376. for (let a = 0; a < this.matches.length; a += 2) {
  100377. let o = this.matches[a], s = !1;
  100378. this.query.charCodeAt(o) == e && (o == this.query.length - 1 ? i = { from: this.matches[a + 1], to: r } : (this.matches[a]++, s = !0)), s || (this.matches.splice(a, 2), a -= 2);
  100379. }
  100380. return this.query.charCodeAt(0) == e && (this.query.length == 1 ? i = { from: n, to: r } : this.matches.push(1, n)), i && this.test && !this.test(i.from, i.to, this.buffer, this.bufferStart) && (i = null), i;
  100381. }
  100382. }
  100383. typeof Symbol < "u" && (Kh.prototype[Symbol.iterator] = function() {
  100384. return this;
  100385. });
  100386. const Ise = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, x4 = "gm" + (/x/.unicode == null ? "" : "u");
  100387. class Dse {
  100388. /**
  100389. Create a cursor that will search the given range in the given
  100390. document. `query` should be the raw pattern (as you'd pass it to
  100391. `new RegExp`).
  100392. */
  100393. constructor(e, n, r, i = 0, a = e.length) {
  100394. if (this.text = e, this.to = a, this.curLine = "", this.done = !1, this.value = Ise, /\\[sWDnr]|\n|\r|\[\^/.test(n))
  100395. return new Rse(e, n, r, i, a);
  100396. this.re = new RegExp(n, x4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.iter = e.iter();
  100397. let o = e.lineAt(i);
  100398. this.curLineStart = o.from, this.matchPos = vS(e, i), this.getLine(this.curLineStart);
  100399. }
  100400. getLine(e) {
  100401. this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
  100402. }
  100403. nextLine() {
  100404. this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
  100405. }
  100406. /**
  100407. Move to the next match, if there is one.
  100408. */
  100409. next() {
  100410. for (let e = this.matchPos - this.curLineStart; ; ) {
  100411. this.re.lastIndex = e;
  100412. let n = this.matchPos <= this.to && this.re.exec(this.curLine);
  100413. if (n) {
  100414. let r = this.curLineStart + n.index, i = r + n[0].length;
  100415. if (this.matchPos = vS(this.text, i + (r == i ? 1 : 0)), r == this.curLineStart + this.curLine.length && this.nextLine(), (r < i || r > this.value.to) && (!this.test || this.test(r, i, n)))
  100416. return this.value = { from: r, to: i, match: n }, this;
  100417. e = this.matchPos - this.curLineStart;
  100418. } else if (this.curLineStart + this.curLine.length < this.to)
  100419. this.nextLine(), e = 0;
  100420. else
  100421. return this.done = !0, this;
  100422. }
  100423. }
  100424. }
  100425. const D$ = /* @__PURE__ */ new WeakMap();
  100426. class ch {
  100427. constructor(e, n) {
  100428. this.from = e, this.text = n;
  100429. }
  100430. get to() {
  100431. return this.from + this.text.length;
  100432. }
  100433. static get(e, n, r) {
  100434. let i = D$.get(e);
  100435. if (!i || i.from >= r || i.to <= n) {
  100436. let s = new ch(n, e.sliceString(n, r));
  100437. return D$.set(e, s), s;
  100438. }
  100439. if (i.from == n && i.to == r)
  100440. return i;
  100441. let { text: a, from: o } = i;
  100442. return o > n && (a = e.sliceString(n, o) + a, o = n), i.to < r && (a += e.sliceString(i.to, r)), D$.set(e, new ch(o, a)), new ch(n, a.slice(n - o, r - o));
  100443. }
  100444. }
  100445. class Rse {
  100446. constructor(e, n, r, i, a) {
  100447. this.text = e, this.to = a, this.done = !1, this.value = Ise, this.matchPos = vS(e, i), this.re = new RegExp(n, x4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.flat = ch.get(e, i, this.chunkEnd(
  100448. i + 5e3
  100449. /* Chunk.Base */
  100450. ));
  100451. }
  100452. chunkEnd(e) {
  100453. return e >= this.to ? this.to : this.text.lineAt(e).to;
  100454. }
  100455. next() {
  100456. for (; ; ) {
  100457. let e = this.re.lastIndex = this.matchPos - this.flat.from, n = this.re.exec(this.flat.text);
  100458. if (n && !n[0] && n.index == e && (this.re.lastIndex = e + 1, n = this.re.exec(this.flat.text)), n) {
  100459. let r = this.flat.from + n.index, i = r + n[0].length;
  100460. if ((this.flat.to >= this.to || n.index + n[0].length <= this.flat.text.length - 10) && (!this.test || this.test(r, i, n)))
  100461. return this.value = { from: r, to: i, match: n }, this.matchPos = vS(this.text, i + (r == i ? 1 : 0)), this;
  100462. }
  100463. if (this.flat.to == this.to)
  100464. return this.done = !0, this;
  100465. this.flat = ch.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
  100466. }
  100467. }
  100468. }
  100469. typeof Symbol < "u" && (Dse.prototype[Symbol.iterator] = Rse.prototype[Symbol.iterator] = function() {
  100470. return this;
  100471. });
  100472. function Sct(t) {
  100473. try {
  100474. return new RegExp(t, x4), !0;
  100475. } catch {
  100476. return !1;
  100477. }
  100478. }
  100479. function vS(t, e) {
  100480. if (e >= t.length)
  100481. return e;
  100482. let n = t.lineAt(e), r;
  100483. for (; e < n.to && (r = n.text.charCodeAt(e - n.from)) >= 56320 && r < 57344; )
  100484. e++;
  100485. return e;
  100486. }
  100487. function ZM(t) {
  100488. let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), n = on("input", { class: "cm-textfield", name: "line", value: e }), r = on("form", {
  100489. class: "cm-gotoLine",
  100490. onkeydown: (a) => {
  100491. a.keyCode == 27 ? (a.preventDefault(), t.dispatch({ effects: gS.of(!1) }), t.focus()) : a.keyCode == 13 && (a.preventDefault(), i());
  100492. },
  100493. onsubmit: (a) => {
  100494. a.preventDefault(), i();
  100495. }
  100496. }, on("label", t.state.phrase("Go to line"), ": ", n), " ", on("button", { class: "cm-button", type: "submit" }, t.state.phrase("go")));
  100497. function i() {
  100498. let a = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);
  100499. if (!a)
  100500. return;
  100501. let { state: o } = t, s = o.doc.lineAt(o.selection.main.head), [, l, u, c, f] = a, d = c ? +c.slice(1) : 0, h = u ? +u : s.number;
  100502. if (u && f) {
  100503. let g = h / 100;
  100504. l && (g = g * (l == "-" ? -1 : 1) + s.number / o.doc.lines), h = Math.round(o.doc.lines * g);
  100505. } else u && l && (h = h * (l == "-" ? -1 : 1) + s.number);
  100506. let p = o.doc.line(Math.max(1, Math.min(o.doc.lines, h))), v = me.cursor(p.from + Math.max(0, Math.min(d, p.length)));
  100507. t.dispatch({
  100508. effects: [gS.of(!1), De.scrollIntoView(v.from, { y: "center" })],
  100509. selection: v
  100510. }), t.focus();
  100511. }
  100512. return { dom: r };
  100513. }
  100514. const gS = /* @__PURE__ */ dt.define(), W9 = /* @__PURE__ */ ur.define({
  100515. create() {
  100516. return !0;
  100517. },
  100518. update(t, e) {
  100519. for (let n of e.effects)
  100520. n.is(gS) && (t = n.value);
  100521. return t;
  100522. },
  100523. provide: (t) => Km.from(t, (e) => e ? ZM : null)
  100524. }), xct = (t) => {
  100525. let e = qm(t, ZM);
  100526. if (!e) {
  100527. let n = [gS.of(!0)];
  100528. t.state.field(W9, !1) == null && n.push(dt.appendConfig.of([W9, wct])), t.dispatch({ effects: n }), e = qm(t, ZM);
  100529. }
  100530. return e && e.dom.querySelector("input").select(), !0;
  100531. }, wct = /* @__PURE__ */ De.baseTheme({
  100532. ".cm-panel.cm-gotoLine": {
  100533. padding: "2px 6px 4px",
  100534. "& label": { fontSize: "80%" }
  100535. }
  100536. }), Cct = {
  100537. highlightWordAroundCursor: !1,
  100538. minSelectionLength: 1,
  100539. maxMatches: 100,
  100540. wholeWords: !1
  100541. }, Tct = /* @__PURE__ */ Be.define({
  100542. combine(t) {
  100543. return fs(t, Cct, {
  100544. highlightWordAroundCursor: (e, n) => e || n,
  100545. minSelectionLength: Math.min,
  100546. maxMatches: Math.min
  100547. });
  100548. }
  100549. });
  100550. function Pct(t) {
  100551. return [Ict, Mct];
  100552. }
  100553. const $ct = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch" }), Act = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
  100554. function Q9(t, e, n, r) {
  100555. return (n == 0 || t(e.sliceDoc(n - 1, n)) != yn.Word) && (r == e.doc.length || t(e.sliceDoc(r, r + 1)) != yn.Word);
  100556. }
  100557. function Ect(t, e, n, r) {
  100558. return t(e.sliceDoc(n, n + 1)) == yn.Word && t(e.sliceDoc(r - 1, r)) == yn.Word;
  100559. }
  100560. const Mct = /* @__PURE__ */ kn.fromClass(class {
  100561. constructor(t) {
  100562. this.decorations = this.getDeco(t);
  100563. }
  100564. update(t) {
  100565. (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view));
  100566. }
  100567. getDeco(t) {
  100568. let e = t.state.facet(Tct), { state: n } = t, r = n.selection;
  100569. if (r.ranges.length > 1)
  100570. return Ze.none;
  100571. let i = r.main, a, o = null;
  100572. if (i.empty) {
  100573. if (!e.highlightWordAroundCursor)
  100574. return Ze.none;
  100575. let l = n.wordAt(i.head);
  100576. if (!l)
  100577. return Ze.none;
  100578. o = n.charCategorizer(i.head), a = n.sliceDoc(l.from, l.to);
  100579. } else {
  100580. let l = i.to - i.from;
  100581. if (l < e.minSelectionLength || l > 200)
  100582. return Ze.none;
  100583. if (e.wholeWords) {
  100584. if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(Q9(o, n, i.from, i.to) && Ect(o, n, i.from, i.to)))
  100585. return Ze.none;
  100586. } else if (a = n.sliceDoc(i.from, i.to), !a)
  100587. return Ze.none;
  100588. }
  100589. let s = [];
  100590. for (let l of t.visibleRanges) {
  100591. let u = new Kh(n.doc, a, l.from, l.to);
  100592. for (; !u.next().done; ) {
  100593. let { from: c, to: f } = u.value;
  100594. if ((!o || Q9(o, n, c, f)) && (i.empty && c <= i.from && f >= i.to ? s.push(Act.range(c, f)) : (c >= i.to || f <= i.from) && s.push($ct.range(c, f)), s.length > e.maxMatches))
  100595. return Ze.none;
  100596. }
  100597. }
  100598. return Ze.set(s);
  100599. }
  100600. }, {
  100601. decorations: (t) => t.decorations
  100602. }), Ict = /* @__PURE__ */ De.baseTheme({
  100603. ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
  100604. ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
  100605. }), Dct = ({ state: t, dispatch: e }) => {
  100606. let { selection: n } = t, r = me.create(n.ranges.map((i) => t.wordAt(i.head) || me.cursor(i.head)), n.mainIndex);
  100607. return r.eq(n) ? !1 : (e(t.update({ selection: r })), !0);
  100608. };
  100609. function Rct(t, e) {
  100610. let { main: n, ranges: r } = t.selection, i = t.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
  100611. for (let o = !1, s = new Kh(t.doc, e, r[r.length - 1].to); ; )
  100612. if (s.next(), s.done) {
  100613. if (o)
  100614. return null;
  100615. s = new Kh(t.doc, e, 0, Math.max(0, r[r.length - 1].from - 1)), o = !0;
  100616. } else {
  100617. if (o && r.some((l) => l.from == s.value.from))
  100618. continue;
  100619. if (a) {
  100620. let l = t.wordAt(s.value.from);
  100621. if (!l || l.from != s.value.from || l.to != s.value.to)
  100622. continue;
  100623. }
  100624. return s.value;
  100625. }
  100626. }
  100627. const kct = ({ state: t, dispatch: e }) => {
  100628. let { ranges: n } = t.selection;
  100629. if (n.some((a) => a.from === a.to))
  100630. return Dct({ state: t, dispatch: e });
  100631. let r = t.sliceDoc(n[0].from, n[0].to);
  100632. if (t.selection.ranges.some((a) => t.sliceDoc(a.from, a.to) != r))
  100633. return !1;
  100634. let i = Rct(t, r);
  100635. return i ? (e(t.update({
  100636. selection: t.selection.addRange(me.range(i.from, i.to), !1),
  100637. effects: De.scrollIntoView(i.to)
  100638. })), !0) : !1;
  100639. }, Lp = /* @__PURE__ */ Be.define({
  100640. combine(t) {
  100641. return fs(t, {
  100642. top: !1,
  100643. caseSensitive: !1,
  100644. literal: !1,
  100645. regexp: !1,
  100646. wholeWord: !1,
  100647. createPanel: (e) => new Zct(e),
  100648. scrollToMatch: (e) => De.scrollIntoView(e)
  100649. });
  100650. }
  100651. });
  100652. class kse {
  100653. /**
  100654. Create a query object.
  100655. */
  100656. constructor(e) {
  100657. this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || Sct(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord;
  100658. }
  100659. /**
  100660. @internal
  100661. */
  100662. unquote(e) {
  100663. return this.literal ? e : e.replace(/\\([nrt\\])/g, (n, r) => r == "n" ? `
  100664. ` : r == "r" ? "\r" : r == "t" ? " " : "\\");
  100665. }
  100666. /**
  100667. Compare this query to another query.
  100668. */
  100669. eq(e) {
  100670. return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
  100671. }
  100672. /**
  100673. @internal
  100674. */
  100675. create() {
  100676. return this.regexp ? new zct(this) : new Nct(this);
  100677. }
  100678. /**
  100679. Get a search cursor for this query, searching through the given
  100680. range in the given state.
  100681. */
  100682. getCursor(e, n = 0, r) {
  100683. let i = e.doc ? e : At.create({ doc: e });
  100684. return r == null && (r = i.doc.length), this.regexp ? Rd(this, i, n, r) : Dd(this, i, n, r);
  100685. }
  100686. }
  100687. class Lse {
  100688. constructor(e) {
  100689. this.spec = e;
  100690. }
  100691. }
  100692. function Dd(t, e, n, r) {
  100693. return new Kh(e.doc, t.unquoted, n, r, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? Lct(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
  100694. }
  100695. function Lct(t, e) {
  100696. return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = t.sliceString(a, Math.min(t.length, r + 2))), (e(mS(i, n - a)) != yn.Word || e(yS(i, n - a)) != yn.Word) && (e(yS(i, r - a)) != yn.Word || e(mS(i, r - a)) != yn.Word));
  100697. }
  100698. class Nct extends Lse {
  100699. constructor(e) {
  100700. super(e);
  100701. }
  100702. nextMatch(e, n, r) {
  100703. let i = Dd(this.spec, e, r, e.doc.length).nextOverlapping();
  100704. return i.done && (i = Dd(this.spec, e, 0, n).nextOverlapping()), i.done ? null : i.value;
  100705. }
  100706. // Searching in reverse is, rather than implementing an inverted search
  100707. // cursor, done by scanning chunk after chunk forward.
  100708. prevMatchInRange(e, n, r) {
  100709. for (let i = r; ; ) {
  100710. let a = Math.max(n, i - 1e4 - this.spec.unquoted.length), o = Dd(this.spec, e, a, i), s = null;
  100711. for (; !o.nextOverlapping().done; )
  100712. s = o.value;
  100713. if (s)
  100714. return s;
  100715. if (a == n)
  100716. return null;
  100717. i -= 1e4;
  100718. }
  100719. }
  100720. prevMatch(e, n, r) {
  100721. return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  100722. }
  100723. getReplacement(e) {
  100724. return this.spec.unquote(this.spec.replace);
  100725. }
  100726. matchAll(e, n) {
  100727. let r = Dd(this.spec, e, 0, e.doc.length), i = [];
  100728. for (; !r.next().done; ) {
  100729. if (i.length >= n)
  100730. return null;
  100731. i.push(r.value);
  100732. }
  100733. return i;
  100734. }
  100735. highlight(e, n, r, i) {
  100736. let a = Dd(this.spec, e, Math.max(0, n - this.spec.unquoted.length), Math.min(r + this.spec.unquoted.length, e.doc.length));
  100737. for (; !a.next().done; )
  100738. i(a.value.from, a.value.to);
  100739. }
  100740. }
  100741. function Rd(t, e, n, r) {
  100742. return new Dse(e.doc, t.search, {
  100743. ignoreCase: !t.caseSensitive,
  100744. test: t.wholeWord ? Bct(e.charCategorizer(e.selection.main.head)) : void 0
  100745. }, n, r);
  100746. }
  100747. function mS(t, e) {
  100748. return t.slice(_r(t, e, !1), e);
  100749. }
  100750. function yS(t, e) {
  100751. return t.slice(e, _r(t, e));
  100752. }
  100753. function Bct(t) {
  100754. return (e, n, r) => !r[0].length || (t(mS(r.input, r.index)) != yn.Word || t(yS(r.input, r.index)) != yn.Word) && (t(yS(r.input, r.index + r[0].length)) != yn.Word || t(mS(r.input, r.index + r[0].length)) != yn.Word);
  100755. }
  100756. class zct extends Lse {
  100757. nextMatch(e, n, r) {
  100758. let i = Rd(this.spec, e, r, e.doc.length).next();
  100759. return i.done && (i = Rd(this.spec, e, 0, n).next()), i.done ? null : i.value;
  100760. }
  100761. prevMatchInRange(e, n, r) {
  100762. for (let i = 1; ; i++) {
  100763. let a = Math.max(
  100764. n,
  100765. r - i * 1e4
  100766. /* FindPrev.ChunkSize */
  100767. ), o = Rd(this.spec, e, a, r), s = null;
  100768. for (; !o.next().done; )
  100769. s = o.value;
  100770. if (s && (a == n || s.from > a + 10))
  100771. return s;
  100772. if (a == n)
  100773. return null;
  100774. }
  100775. }
  100776. prevMatch(e, n, r) {
  100777. return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  100778. }
  100779. getReplacement(e) {
  100780. return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (n, r) => r == "$" ? "$" : r == "&" ? e.match[0] : r != "0" && +r < e.match.length ? e.match[r] : n);
  100781. }
  100782. matchAll(e, n) {
  100783. let r = Rd(this.spec, e, 0, e.doc.length), i = [];
  100784. for (; !r.next().done; ) {
  100785. if (i.length >= n)
  100786. return null;
  100787. i.push(r.value);
  100788. }
  100789. return i;
  100790. }
  100791. highlight(e, n, r, i) {
  100792. let a = Rd(this.spec, e, Math.max(
  100793. 0,
  100794. n - 250
  100795. /* RegExp.HighlightMargin */
  100796. ), Math.min(r + 250, e.doc.length));
  100797. for (; !a.next().done; )
  100798. i(a.value.from, a.value.to);
  100799. }
  100800. }
  100801. const n0 = /* @__PURE__ */ dt.define(), w4 = /* @__PURE__ */ dt.define(), eu = /* @__PURE__ */ ur.define({
  100802. create(t) {
  100803. return new R$(UM(t).create(), null);
  100804. },
  100805. update(t, e) {
  100806. for (let n of e.effects)
  100807. n.is(n0) ? t = new R$(n.value.create(), t.panel) : n.is(w4) && (t = new R$(t.query, n.value ? C4 : null));
  100808. return t;
  100809. },
  100810. provide: (t) => Km.from(t, (e) => e.panel)
  100811. });
  100812. class R$ {
  100813. constructor(e, n) {
  100814. this.query = e, this.panel = n;
  100815. }
  100816. }
  100817. const Vct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch" }), Fct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Wct = /* @__PURE__ */ kn.fromClass(class {
  100818. constructor(t) {
  100819. this.view = t, this.decorations = this.highlight(t.state.field(eu));
  100820. }
  100821. update(t) {
  100822. let e = t.state.field(eu);
  100823. (e != t.startState.field(eu) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
  100824. }
  100825. highlight({ query: t, panel: e }) {
  100826. if (!e || !t.spec.valid)
  100827. return Ze.none;
  100828. let { view: n } = this, r = new hu();
  100829. for (let i = 0, a = n.visibleRanges, o = a.length; i < o; i++) {
  100830. let { from: s, to: l } = a[i];
  100831. for (; i < o - 1 && l > a[i + 1].from - 2 * 250; )
  100832. l = a[++i].to;
  100833. t.highlight(n.state, s, l, (u, c) => {
  100834. let f = n.state.selection.ranges.some((d) => d.from == u && d.to == c);
  100835. r.add(u, c, f ? Fct : Vct);
  100836. });
  100837. }
  100838. return r.finish();
  100839. }
  100840. }, {
  100841. decorations: (t) => t.decorations
  100842. });
  100843. function dy(t) {
  100844. return (e) => {
  100845. let n = e.state.field(eu, !1);
  100846. return n && n.query.spec.valid ? t(e, n) : zse(e);
  100847. };
  100848. }
  100849. const bS = /* @__PURE__ */ dy((t, { query: e }) => {
  100850. let { to: n } = t.state.selection.main, r = e.nextMatch(t.state, n, n);
  100851. if (!r)
  100852. return !1;
  100853. let i = me.single(r.from, r.to), a = t.state.facet(Lp);
  100854. return t.dispatch({
  100855. selection: i,
  100856. effects: [T4(t, r), a.scrollToMatch(i.main, t)],
  100857. userEvent: "select.search"
  100858. }), Bse(t), !0;
  100859. }), _S = /* @__PURE__ */ dy((t, { query: e }) => {
  100860. let { state: n } = t, { from: r } = n.selection.main, i = e.prevMatch(n, r, r);
  100861. if (!i)
  100862. return !1;
  100863. let a = me.single(i.from, i.to), o = t.state.facet(Lp);
  100864. return t.dispatch({
  100865. selection: a,
  100866. effects: [T4(t, i), o.scrollToMatch(a.main, t)],
  100867. userEvent: "select.search"
  100868. }), Bse(t), !0;
  100869. }), Qct = /* @__PURE__ */ dy((t, { query: e }) => {
  100870. let n = e.matchAll(t.state, 1e3);
  100871. return !n || !n.length ? !1 : (t.dispatch({
  100872. selection: me.create(n.map((r) => me.range(r.from, r.to))),
  100873. userEvent: "select.search.matches"
  100874. }), !0);
  100875. }), Hct = ({ state: t, dispatch: e }) => {
  100876. let n = t.selection;
  100877. if (n.ranges.length > 1 || n.main.empty)
  100878. return !1;
  100879. let { from: r, to: i } = n.main, a = [], o = 0;
  100880. for (let s = new Kh(t.doc, t.sliceDoc(r, i)); !s.next().done; ) {
  100881. if (a.length > 1e3)
  100882. return !1;
  100883. s.value.from == r && (o = a.length), a.push(me.range(s.value.from, s.value.to));
  100884. }
  100885. return e(t.update({
  100886. selection: me.create(a, o),
  100887. userEvent: "select.search.matches"
  100888. })), !0;
  100889. }, H9 = /* @__PURE__ */ dy((t, { query: e }) => {
  100890. let { state: n } = t, { from: r, to: i } = n.selection.main;
  100891. if (n.readOnly)
  100892. return !1;
  100893. let a = e.nextMatch(n, r, r);
  100894. if (!a)
  100895. return !1;
  100896. let o = [], s, l, u = [];
  100897. if (a.from == r && a.to == i && (l = n.toText(e.getReplacement(a)), o.push({ from: a.from, to: a.to, insert: l }), a = e.nextMatch(n, a.from, a.to), u.push(De.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))), a) {
  100898. let c = o.length == 0 || o[0].from >= a.to ? 0 : a.to - a.from - l.length;
  100899. s = me.single(a.from - c, a.to - c), u.push(T4(t, a)), u.push(n.facet(Lp).scrollToMatch(s.main, t));
  100900. }
  100901. return t.dispatch({
  100902. changes: o,
  100903. selection: s,
  100904. effects: u,
  100905. userEvent: "input.replace"
  100906. }), !0;
  100907. }), Gct = /* @__PURE__ */ dy((t, { query: e }) => {
  100908. if (t.state.readOnly)
  100909. return !1;
  100910. let n = e.matchAll(t.state, 1e9).map((i) => {
  100911. let { from: a, to: o } = i;
  100912. return { from: a, to: o, insert: e.getReplacement(i) };
  100913. });
  100914. if (!n.length)
  100915. return !1;
  100916. let r = t.state.phrase("replaced $ matches", n.length) + ".";
  100917. return t.dispatch({
  100918. changes: n,
  100919. effects: De.announce.of(r),
  100920. userEvent: "input.replace.all"
  100921. }), !0;
  100922. });
  100923. function C4(t) {
  100924. return t.state.facet(Lp).createPanel(t);
  100925. }
  100926. function UM(t, e) {
  100927. var n, r, i, a, o;
  100928. let s = t.selection.main, l = s.empty || s.to > s.from + 100 ? "" : t.sliceDoc(s.from, s.to);
  100929. if (e && !l)
  100930. return e;
  100931. let u = t.facet(Lp);
  100932. return new kse({
  100933. search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : u.literal) ? l : l.replace(/\n/g, "\\n"),
  100934. caseSensitive: (r = e == null ? void 0 : e.caseSensitive) !== null && r !== void 0 ? r : u.caseSensitive,
  100935. literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal,
  100936. regexp: (a = e == null ? void 0 : e.regexp) !== null && a !== void 0 ? a : u.regexp,
  100937. wholeWord: (o = e == null ? void 0 : e.wholeWord) !== null && o !== void 0 ? o : u.wholeWord
  100938. });
  100939. }
  100940. function Nse(t) {
  100941. let e = qm(t, C4);
  100942. return e && e.dom.querySelector("[main-field]");
  100943. }
  100944. function Bse(t) {
  100945. let e = Nse(t);
  100946. e && e == t.root.activeElement && e.select();
  100947. }
  100948. const zse = (t) => {
  100949. let e = t.state.field(eu, !1);
  100950. if (e && e.panel) {
  100951. let n = Nse(t);
  100952. if (n && n != t.root.activeElement) {
  100953. let r = UM(t.state, e.query.spec);
  100954. r.valid && t.dispatch({ effects: n0.of(r) }), n.focus(), n.select();
  100955. }
  100956. } else
  100957. t.dispatch({ effects: [
  100958. w4.of(!0),
  100959. e ? n0.of(UM(t.state, e.query.spec)) : dt.appendConfig.of(Xct)
  100960. ] });
  100961. return !0;
  100962. }, Vse = (t) => {
  100963. let e = t.state.field(eu, !1);
  100964. if (!e || !e.panel)
  100965. return !1;
  100966. let n = qm(t, C4);
  100967. return n && n.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: w4.of(!1) }), !0;
  100968. }, jct = [
  100969. { key: "Mod-f", run: zse, scope: "editor search-panel" },
  100970. { key: "F3", run: bS, shift: _S, scope: "editor search-panel", preventDefault: !0 },
  100971. { key: "Mod-g", run: bS, shift: _S, scope: "editor search-panel", preventDefault: !0 },
  100972. { key: "Escape", run: Vse, scope: "editor search-panel" },
  100973. { key: "Mod-Shift-l", run: Hct },
  100974. { key: "Mod-Alt-g", run: xct },
  100975. { key: "Mod-d", run: kct, preventDefault: !0 }
  100976. ];
  100977. class Zct {
  100978. constructor(e) {
  100979. this.view = e;
  100980. let n = this.query = e.state.field(eu).query.spec;
  100981. this.commit = this.commit.bind(this), this.searchField = on("input", {
  100982. value: n.search,
  100983. placeholder: Ai(e, "Find"),
  100984. "aria-label": Ai(e, "Find"),
  100985. class: "cm-textfield",
  100986. name: "search",
  100987. form: "",
  100988. "main-field": "true",
  100989. onchange: this.commit,
  100990. onkeyup: this.commit
  100991. }), this.replaceField = on("input", {
  100992. value: n.replace,
  100993. placeholder: Ai(e, "Replace"),
  100994. "aria-label": Ai(e, "Replace"),
  100995. class: "cm-textfield",
  100996. name: "replace",
  100997. form: "",
  100998. onchange: this.commit,
  100999. onkeyup: this.commit
  101000. }), this.caseField = on("input", {
  101001. type: "checkbox",
  101002. name: "case",
  101003. form: "",
  101004. checked: n.caseSensitive,
  101005. onchange: this.commit
  101006. }), this.reField = on("input", {
  101007. type: "checkbox",
  101008. name: "re",
  101009. form: "",
  101010. checked: n.regexp,
  101011. onchange: this.commit
  101012. }), this.wordField = on("input", {
  101013. type: "checkbox",
  101014. name: "word",
  101015. form: "",
  101016. checked: n.wholeWord,
  101017. onchange: this.commit
  101018. });
  101019. function r(i, a, o) {
  101020. return on("button", { class: "cm-button", name: i, onclick: a, type: "button" }, o);
  101021. }
  101022. this.dom = on("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [
  101023. this.searchField,
  101024. r("next", () => bS(e), [Ai(e, "next")]),
  101025. r("prev", () => _S(e), [Ai(e, "previous")]),
  101026. r("select", () => Qct(e), [Ai(e, "all")]),
  101027. on("label", null, [this.caseField, Ai(e, "match case")]),
  101028. on("label", null, [this.reField, Ai(e, "regexp")]),
  101029. on("label", null, [this.wordField, Ai(e, "by word")]),
  101030. ...e.state.readOnly ? [] : [
  101031. on("br"),
  101032. this.replaceField,
  101033. r("replace", () => H9(e), [Ai(e, "replace")]),
  101034. r("replaceAll", () => Gct(e), [Ai(e, "replace all")])
  101035. ],
  101036. on("button", {
  101037. name: "close",
  101038. onclick: () => Vse(e),
  101039. "aria-label": Ai(e, "close"),
  101040. type: "button"
  101041. }, ["×"])
  101042. ]);
  101043. }
  101044. commit() {
  101045. let e = new kse({
  101046. search: this.searchField.value,
  101047. caseSensitive: this.caseField.checked,
  101048. regexp: this.reField.checked,
  101049. wholeWord: this.wordField.checked,
  101050. replace: this.replaceField.value
  101051. });
  101052. e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: n0.of(e) }));
  101053. }
  101054. keydown(e) {
  101055. ist(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? _S : bS)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), H9(this.view));
  101056. }
  101057. update(e) {
  101058. for (let n of e.transactions)
  101059. for (let r of n.effects)
  101060. r.is(n0) && !r.value.eq(this.query) && this.setQuery(r.value);
  101061. }
  101062. setQuery(e) {
  101063. this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
  101064. }
  101065. mount() {
  101066. this.searchField.select();
  101067. }
  101068. get pos() {
  101069. return 80;
  101070. }
  101071. get top() {
  101072. return this.view.state.facet(Lp).top;
  101073. }
  101074. }
  101075. function Ai(t, e) {
  101076. return t.state.phrase(e);
  101077. }
  101078. const s_ = 30, l_ = /[\s\.,:;?!]/;
  101079. function T4(t, { from: e, to: n }) {
  101080. let r = t.state.doc.lineAt(e), i = t.state.doc.lineAt(n).to, a = Math.max(r.from, e - s_), o = Math.min(i, n + s_), s = t.state.sliceDoc(a, o);
  101081. if (a != r.from) {
  101082. for (let l = 0; l < s_; l++)
  101083. if (!l_.test(s[l + 1]) && l_.test(s[l])) {
  101084. s = s.slice(l);
  101085. break;
  101086. }
  101087. }
  101088. if (o != i) {
  101089. for (let l = s.length - 1; l > s.length - s_; l--)
  101090. if (!l_.test(s[l - 1]) && l_.test(s[l])) {
  101091. s = s.slice(0, l);
  101092. break;
  101093. }
  101094. }
  101095. return De.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`);
  101096. }
  101097. const Uct = /* @__PURE__ */ De.baseTheme({
  101098. ".cm-panel.cm-search": {
  101099. padding: "2px 6px 4px",
  101100. position: "relative",
  101101. "& [name=close]": {
  101102. position: "absolute",
  101103. top: "0",
  101104. right: "4px",
  101105. backgroundColor: "inherit",
  101106. border: "none",
  101107. font: "inherit",
  101108. padding: 0,
  101109. margin: 0
  101110. },
  101111. "& input, & button, & label": {
  101112. margin: ".2em .6em .2em 0"
  101113. },
  101114. "& input[type=checkbox]": {
  101115. marginRight: ".2em"
  101116. },
  101117. "& label": {
  101118. fontSize: "80%",
  101119. whiteSpace: "pre"
  101120. }
  101121. },
  101122. "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
  101123. "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
  101124. "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
  101125. "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
  101126. }), Xct = [
  101127. eu,
  101128. /* @__PURE__ */ Eu.low(Wct),
  101129. Uct
  101130. ];
  101131. class Fse {
  101132. /**
  101133. Create a new completion context. (Mostly useful for testing
  101134. completion sources—in the editor, the extension will create
  101135. these for you.)
  101136. */
  101137. constructor(e, n, r, i) {
  101138. this.state = e, this.pos = n, this.explicit = r, this.view = i, this.abortListeners = [];
  101139. }
  101140. /**
  101141. Get the extent, content, and (if there is a token) type of the
  101142. token before `this.pos`.
  101143. */
  101144. tokenBefore(e) {
  101145. let n = nr(this.state).resolveInner(this.pos, -1);
  101146. for (; n && e.indexOf(n.name) < 0; )
  101147. n = n.parent;
  101148. return n ? {
  101149. from: n.from,
  101150. to: this.pos,
  101151. text: this.state.sliceDoc(n.from, this.pos),
  101152. type: n.type
  101153. } : null;
  101154. }
  101155. /**
  101156. Get the match of the given expression directly before the
  101157. cursor.
  101158. */
  101159. matchBefore(e) {
  101160. let n = this.state.doc.lineAt(this.pos), r = Math.max(n.from, this.pos - 250), i = n.text.slice(r - n.from, this.pos - n.from), a = i.search(Qse(e, !1));
  101161. return a < 0 ? null : { from: r + a, to: this.pos, text: i.slice(a) };
  101162. }
  101163. /**
  101164. Yields true when the query has been aborted. Can be useful in
  101165. asynchronous queries to avoid doing work that will be ignored.
  101166. */
  101167. get aborted() {
  101168. return this.abortListeners == null;
  101169. }
  101170. /**
  101171. Allows you to register abort handlers, which will be called when
  101172. the query is
  101173. [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
  101174. */
  101175. addEventListener(e, n) {
  101176. e == "abort" && this.abortListeners && this.abortListeners.push(n);
  101177. }
  101178. }
  101179. function G9(t) {
  101180. let e = Object.keys(t).join(""), n = /\w/.test(e);
  101181. return n && (e = e.replace(/\w/g, "")), `[${n ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`;
  101182. }
  101183. function Yct(t) {
  101184. let e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
  101185. for (let { label: i } of t) {
  101186. e[i[0]] = !0;
  101187. for (let a = 1; a < i.length; a++)
  101188. n[i[a]] = !0;
  101189. }
  101190. let r = G9(e) + G9(n) + "*$";
  101191. return [new RegExp("^" + r), new RegExp(r)];
  101192. }
  101193. function Wse(t) {
  101194. let e = t.map((i) => typeof i == "string" ? { label: i } : i), [n, r] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : Yct(e);
  101195. return (i) => {
  101196. let a = i.matchBefore(r);
  101197. return a || i.explicit ? { from: a ? a.from : i.pos, options: e, validFor: n } : null;
  101198. };
  101199. }
  101200. function qct(t, e) {
  101201. return (n) => {
  101202. for (let r = nr(n.state).resolveInner(n.pos, -1); r; r = r.parent) {
  101203. if (t.indexOf(r.name) > -1)
  101204. return null;
  101205. if (r.type.isTop)
  101206. break;
  101207. }
  101208. return e(n);
  101209. };
  101210. }
  101211. class j9 {
  101212. constructor(e, n, r, i) {
  101213. this.completion = e, this.source = n, this.match = r, this.score = i;
  101214. }
  101215. }
  101216. function tu(t) {
  101217. return t.selection.main.from;
  101218. }
  101219. function Qse(t, e) {
  101220. var n;
  101221. let { source: r } = t, i = e && r[0] != "^", a = r[r.length - 1] != "$";
  101222. return !i && !a ? t : new RegExp(`${i ? "^" : ""}(?:${r})${a ? "$" : ""}`, (n = t.flags) !== null && n !== void 0 ? n : t.ignoreCase ? "i" : "");
  101223. }
  101224. const P4 = /* @__PURE__ */ ul.define();
  101225. function Kct(t, e, n, r) {
  101226. let { main: i } = t.selection, a = n - i.from, o = r - i.from;
  101227. return Object.assign(Object.assign({}, t.changeByRange((s) => s != i && n != r && t.sliceDoc(s.from + a, s.from + o) != t.sliceDoc(n, r) ? { range: s } : {
  101228. changes: { from: s.from + a, to: r == i.from ? s.to : s.from + o, insert: e },
  101229. range: me.cursor(s.from + a + e.length)
  101230. })), { scrollIntoView: !0, userEvent: "input.complete" });
  101231. }
  101232. const Z9 = /* @__PURE__ */ new WeakMap();
  101233. function Jct(t) {
  101234. if (!Array.isArray(t))
  101235. return t;
  101236. let e = Z9.get(t);
  101237. return e || Z9.set(t, e = Wse(t)), e;
  101238. }
  101239. const OS = /* @__PURE__ */ dt.define(), r0 = /* @__PURE__ */ dt.define();
  101240. class eft {
  101241. constructor(e) {
  101242. this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
  101243. for (let n = 0; n < e.length; ) {
  101244. let r = gr(e, n), i = ga(r);
  101245. this.chars.push(r);
  101246. let a = e.slice(n, n + i), o = a.toUpperCase();
  101247. this.folded.push(gr(o == a ? a.toLowerCase() : o, 0)), n += i;
  101248. }
  101249. this.astral = e.length != this.chars.length;
  101250. }
  101251. ret(e, n) {
  101252. return this.score = e, this.matched = n, this;
  101253. }
  101254. // Matches a given word (completion) against the pattern (input).
  101255. // Will return a boolean indicating whether there was a match and,
  101256. // on success, set `this.score` to the score, `this.matched` to an
  101257. // array of `from, to` pairs indicating the matched parts of `word`.
  101258. //
  101259. // The score is a number that is more negative the worse the match
  101260. // is. See `Penalty` above.
  101261. match(e) {
  101262. if (this.pattern.length == 0)
  101263. return this.ret(-100, []);
  101264. if (e.length < this.pattern.length)
  101265. return null;
  101266. let { chars: n, folded: r, any: i, precise: a, byWord: o } = this;
  101267. if (n.length == 1) {
  101268. let y = gr(e, 0), b = ga(y), _ = b == e.length ? 0 : -100;
  101269. if (y != n[0]) if (y == r[0])
  101270. _ += -200;
  101271. else
  101272. return null;
  101273. return this.ret(_, [0, b]);
  101274. }
  101275. let s = e.indexOf(this.pattern);
  101276. if (s == 0)
  101277. return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
  101278. let l = n.length, u = 0;
  101279. if (s < 0) {
  101280. for (let y = 0, b = Math.min(e.length, 200); y < b && u < l; ) {
  101281. let _ = gr(e, y);
  101282. (_ == n[u] || _ == r[u]) && (i[u++] = y), y += ga(_);
  101283. }
  101284. if (u < l)
  101285. return null;
  101286. }
  101287. let c = 0, f = 0, d = !1, h = 0, p = -1, v = -1, g = /[a-z]/.test(e), m = !0;
  101288. for (let y = 0, b = Math.min(e.length, 200), _ = 0; y < b && f < l; ) {
  101289. let O = gr(e, y);
  101290. s < 0 && (c < l && O == n[c] && (a[c++] = y), h < l && (O == n[h] || O == r[h] ? (h == 0 && (p = y), v = y + 1, h++) : h = 0));
  101291. let S, x = O < 255 ? O >= 48 && O <= 57 || O >= 97 && O <= 122 ? 2 : O >= 65 && O <= 90 ? 1 : 0 : (S = KL(O)) != S.toLowerCase() ? 1 : S != S.toUpperCase() ? 2 : 0;
  101292. (!y || x == 1 && g || _ == 0 && x != 0) && (n[f] == O || r[f] == O && (d = !0) ? o[f++] = y : o.length && (m = !1)), _ = x, y += ga(O);
  101293. }
  101294. return f == l && o[0] == 0 && m ? this.result(-100 + (d ? -200 : 0), o, e) : h == l && p == 0 ? this.ret(-200 - e.length + (v == e.length ? 0 : -100), [0, v]) : s > -1 ? this.ret(-700 - e.length, [s, s + this.pattern.length]) : h == l ? this.ret(-900 - e.length, [p, v]) : f == l ? this.result(-100 + (d ? -200 : 0) + -700 + (m ? 0 : -1100), o, e) : n.length == 2 ? null : this.result((i[0] ? -700 : 0) + -200 + -1100, i, e);
  101295. }
  101296. result(e, n, r) {
  101297. let i = [], a = 0;
  101298. for (let o of n) {
  101299. let s = o + (this.astral ? ga(gr(r, o)) : 1);
  101300. a && i[a - 1] == o ? i[a - 1] = s : (i[a++] = o, i[a++] = s);
  101301. }
  101302. return this.ret(e - r.length, i);
  101303. }
  101304. }
  101305. class tft {
  101306. constructor(e) {
  101307. this.pattern = e, this.matched = [], this.score = 0, this.folded = e.toLowerCase();
  101308. }
  101309. match(e) {
  101310. if (e.length < this.pattern.length)
  101311. return null;
  101312. let n = e.slice(0, this.pattern.length), r = n == this.pattern ? 0 : n.toLowerCase() == this.folded ? -200 : null;
  101313. return r == null ? null : (this.matched = [0, n.length], this.score = r + (e.length == this.pattern.length ? 0 : -100), this);
  101314. }
  101315. }
  101316. const br = /* @__PURE__ */ Be.define({
  101317. combine(t) {
  101318. return fs(t, {
  101319. activateOnTyping: !0,
  101320. activateOnCompletion: () => !1,
  101321. activateOnTypingDelay: 100,
  101322. selectOnOpen: !0,
  101323. override: null,
  101324. closeOnBlur: !0,
  101325. maxRenderedOptions: 100,
  101326. defaultKeymap: !0,
  101327. tooltipClass: () => "",
  101328. optionClass: () => "",
  101329. aboveCursor: !1,
  101330. icons: !0,
  101331. addToOptions: [],
  101332. positionInfo: nft,
  101333. filterStrict: !1,
  101334. compareCompletions: (e, n) => e.label.localeCompare(n.label),
  101335. interactionDelay: 75,
  101336. updateSyncTime: 100
  101337. }, {
  101338. defaultKeymap: (e, n) => e && n,
  101339. closeOnBlur: (e, n) => e && n,
  101340. icons: (e, n) => e && n,
  101341. tooltipClass: (e, n) => (r) => U9(e(r), n(r)),
  101342. optionClass: (e, n) => (r) => U9(e(r), n(r)),
  101343. addToOptions: (e, n) => e.concat(n),
  101344. filterStrict: (e, n) => e || n
  101345. });
  101346. }
  101347. });
  101348. function U9(t, e) {
  101349. return t ? e ? t + " " + e : t : e;
  101350. }
  101351. function nft(t, e, n, r, i, a) {
  101352. let o = t.textDirection == pn.RTL, s = o, l = !1, u = "top", c, f, d = e.left - i.left, h = i.right - e.right, p = r.right - r.left, v = r.bottom - r.top;
  101353. if (s && d < Math.min(p, h) ? s = !1 : !s && h < Math.min(p, d) && (s = !0), p <= (s ? d : h))
  101354. c = Math.max(i.top, Math.min(n.top, i.bottom - v)) - e.top, f = Math.min(400, s ? d : h);
  101355. else {
  101356. l = !0, f = Math.min(
  101357. 400,
  101358. (o ? e.right : i.right - e.left) - 30
  101359. /* Info.Margin */
  101360. );
  101361. let y = i.bottom - e.bottom;
  101362. y >= v || y > e.top ? c = n.bottom - e.top : (u = "bottom", c = e.bottom - n.top);
  101363. }
  101364. let g = (e.bottom - e.top) / a.offsetHeight, m = (e.right - e.left) / a.offsetWidth;
  101365. return {
  101366. style: `${u}: ${c / g}px; max-width: ${f / m}px`,
  101367. class: "cm-completionInfo-" + (l ? o ? "left-narrow" : "right-narrow" : s ? "left" : "right")
  101368. };
  101369. }
  101370. function rft(t) {
  101371. let e = t.addToOptions.slice();
  101372. return t.icons && e.push({
  101373. render(n) {
  101374. let r = document.createElement("div");
  101375. return r.classList.add("cm-completionIcon"), n.type && r.classList.add(...n.type.split(/\s+/g).map((i) => "cm-completionIcon-" + i)), r.setAttribute("aria-hidden", "true"), r;
  101376. },
  101377. position: 20
  101378. }), e.push({
  101379. render(n, r, i, a) {
  101380. let o = document.createElement("span");
  101381. o.className = "cm-completionLabel";
  101382. let s = n.displayLabel || n.label, l = 0;
  101383. for (let u = 0; u < a.length; ) {
  101384. let c = a[u++], f = a[u++];
  101385. c > l && o.appendChild(document.createTextNode(s.slice(l, c)));
  101386. let d = o.appendChild(document.createElement("span"));
  101387. d.appendChild(document.createTextNode(s.slice(c, f))), d.className = "cm-completionMatchedText", l = f;
  101388. }
  101389. return l < s.length && o.appendChild(document.createTextNode(s.slice(l))), o;
  101390. },
  101391. position: 50
  101392. }, {
  101393. render(n) {
  101394. if (!n.detail)
  101395. return null;
  101396. let r = document.createElement("span");
  101397. return r.className = "cm-completionDetail", r.textContent = n.detail, r;
  101398. },
  101399. position: 80
  101400. }), e.sort((n, r) => n.position - r.position).map((n) => n.render);
  101401. }
  101402. function k$(t, e, n) {
  101403. if (t <= n)
  101404. return { from: 0, to: t };
  101405. if (e < 0 && (e = 0), e <= t >> 1) {
  101406. let i = Math.floor(e / n);
  101407. return { from: i * n, to: (i + 1) * n };
  101408. }
  101409. let r = Math.floor((t - e) / n);
  101410. return { from: t - (r + 1) * n, to: t - r * n };
  101411. }
  101412. class ift {
  101413. constructor(e, n, r) {
  101414. this.view = e, this.stateField = n, this.applyCompletion = r, this.info = null, this.infoDestroy = null, this.placeInfoReq = {
  101415. read: () => this.measureInfo(),
  101416. write: (l) => this.placeInfo(l),
  101417. key: this
  101418. }, this.space = null, this.currentClass = "";
  101419. let i = e.state.field(n), { options: a, selected: o } = i.open, s = e.state.facet(br);
  101420. this.optionContent = rft(s), this.optionClass = s.optionClass, this.tooltipClass = s.tooltipClass, this.range = k$(a.length, o, s.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => {
  101421. let { options: u } = e.state.field(n).open;
  101422. for (let c = l.target, f; c && c != this.dom; c = c.parentNode)
  101423. if (c.nodeName == "LI" && (f = /-(\d+)$/.exec(c.id)) && +f[1] < u.length) {
  101424. this.applyCompletion(e, u[+f[1]]), l.preventDefault();
  101425. return;
  101426. }
  101427. }), this.dom.addEventListener("focusout", (l) => {
  101428. let u = e.state.field(this.stateField, !1);
  101429. u && u.tooltip && e.state.facet(br).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: r0.of(null) });
  101430. }), this.showOptions(a, i.id);
  101431. }
  101432. mount() {
  101433. this.updateSel();
  101434. }
  101435. showOptions(e, n) {
  101436. this.list && this.list.remove(), this.list = this.dom.appendChild(this.createListBox(e, n, this.range)), this.list.addEventListener("scroll", () => {
  101437. this.info && this.view.requestMeasure(this.placeInfoReq);
  101438. });
  101439. }
  101440. update(e) {
  101441. var n;
  101442. let r = e.state.field(this.stateField), i = e.startState.field(this.stateField);
  101443. if (this.updateTooltipClass(e.state), r != i) {
  101444. let { options: a, selected: o, disabled: s } = r.open;
  101445. (!i.open || i.open.options != a) && (this.range = k$(a.length, o, e.state.facet(br).maxRenderedOptions), this.showOptions(a, r.id)), this.updateSel(), s != ((n = i.open) === null || n === void 0 ? void 0 : n.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!s);
  101446. }
  101447. }
  101448. updateTooltipClass(e) {
  101449. let n = this.tooltipClass(e);
  101450. if (n != this.currentClass) {
  101451. for (let r of this.currentClass.split(" "))
  101452. r && this.dom.classList.remove(r);
  101453. for (let r of n.split(" "))
  101454. r && this.dom.classList.add(r);
  101455. this.currentClass = n;
  101456. }
  101457. }
  101458. positioned(e) {
  101459. this.space = e, this.info && this.view.requestMeasure(this.placeInfoReq);
  101460. }
  101461. updateSel() {
  101462. let e = this.view.state.field(this.stateField), n = e.open;
  101463. if ((n.selected > -1 && n.selected < this.range.from || n.selected >= this.range.to) && (this.range = k$(n.options.length, n.selected, this.view.state.facet(br).maxRenderedOptions), this.showOptions(n.options, e.id)), this.updateSelectedOption(n.selected)) {
  101464. this.destroyInfo();
  101465. let { completion: r } = n.options[n.selected], { info: i } = r;
  101466. if (!i)
  101467. return;
  101468. let a = typeof i == "string" ? document.createTextNode(i) : i(r);
  101469. if (!a)
  101470. return;
  101471. "then" in a ? a.then((o) => {
  101472. o && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(o, r);
  101473. }).catch((o) => mi(this.view.state, o, "completion info")) : this.addInfoPane(a, r);
  101474. }
  101475. }
  101476. addInfoPane(e, n) {
  101477. this.destroyInfo();
  101478. let r = this.info = document.createElement("div");
  101479. if (r.className = "cm-tooltip cm-completionInfo", e.nodeType != null)
  101480. r.appendChild(e), this.infoDestroy = null;
  101481. else {
  101482. let { dom: i, destroy: a } = e;
  101483. r.appendChild(i), this.infoDestroy = a || null;
  101484. }
  101485. this.dom.appendChild(r), this.view.requestMeasure(this.placeInfoReq);
  101486. }
  101487. updateSelectedOption(e) {
  101488. let n = null;
  101489. for (let r = this.list.firstChild, i = this.range.from; r; r = r.nextSibling, i++)
  101490. r.nodeName != "LI" || !r.id ? i-- : i == e ? r.hasAttribute("aria-selected") || (r.setAttribute("aria-selected", "true"), n = r) : r.hasAttribute("aria-selected") && r.removeAttribute("aria-selected");
  101491. return n && oft(this.list, n), n;
  101492. }
  101493. measureInfo() {
  101494. let e = this.dom.querySelector("[aria-selected]");
  101495. if (!e || !this.info)
  101496. return null;
  101497. let n = this.dom.getBoundingClientRect(), r = this.info.getBoundingClientRect(), i = e.getBoundingClientRect(), a = this.space;
  101498. if (!a) {
  101499. let o = this.dom.ownerDocument.defaultView || window;
  101500. a = { left: 0, top: 0, right: o.innerWidth, bottom: o.innerHeight };
  101501. }
  101502. return i.top > Math.min(a.bottom, n.bottom) - 10 || i.bottom < Math.max(a.top, n.top) + 10 ? null : this.view.state.facet(br).positionInfo(this.view, n, i, r, a, this.dom);
  101503. }
  101504. placeInfo(e) {
  101505. this.info && (e ? (e.style && (this.info.style.cssText = e.style), this.info.className = "cm-tooltip cm-completionInfo " + (e.class || "")) : this.info.style.cssText = "top: -1e6px");
  101506. }
  101507. createListBox(e, n, r) {
  101508. const i = document.createElement("ul");
  101509. i.id = n, i.setAttribute("role", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-label", this.view.state.phrase("Completions"));
  101510. let a = null;
  101511. for (let o = r.from; o < r.to; o++) {
  101512. let { completion: s, match: l } = e[o], { section: u } = s;
  101513. if (u) {
  101514. let d = typeof u == "string" ? u : u.name;
  101515. if (d != a && (o > r.from || r.from == 0))
  101516. if (a = d, typeof u != "string" && u.header)
  101517. i.appendChild(u.header(u));
  101518. else {
  101519. let h = i.appendChild(document.createElement("completion-section"));
  101520. h.textContent = d;
  101521. }
  101522. }
  101523. const c = i.appendChild(document.createElement("li"));
  101524. c.id = n + "-" + o, c.setAttribute("role", "option");
  101525. let f = this.optionClass(s);
  101526. f && (c.className = f);
  101527. for (let d of this.optionContent) {
  101528. let h = d(s, this.view.state, this.view, l);
  101529. h && c.appendChild(h);
  101530. }
  101531. }
  101532. return r.from && i.classList.add("cm-completionListIncompleteTop"), r.to < e.length && i.classList.add("cm-completionListIncompleteBottom"), i;
  101533. }
  101534. destroyInfo() {
  101535. this.info && (this.infoDestroy && this.infoDestroy(), this.info.remove(), this.info = null);
  101536. }
  101537. destroy() {
  101538. this.destroyInfo();
  101539. }
  101540. }
  101541. function aft(t, e) {
  101542. return (n) => new ift(n, t, e);
  101543. }
  101544. function oft(t, e) {
  101545. let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = n.height / t.offsetHeight;
  101546. r.top < n.top ? t.scrollTop -= (n.top - r.top) / i : r.bottom > n.bottom && (t.scrollTop += (r.bottom - n.bottom) / i);
  101547. }
  101548. function X9(t) {
  101549. return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0);
  101550. }
  101551. function sft(t, e) {
  101552. let n = [], r = null, i = (u) => {
  101553. n.push(u);
  101554. let { section: c } = u.completion;
  101555. if (c) {
  101556. r || (r = []);
  101557. let f = typeof c == "string" ? c : c.name;
  101558. r.some((d) => d.name == f) || r.push(typeof c == "string" ? { name: f } : c);
  101559. }
  101560. }, a = e.facet(br);
  101561. for (let u of t)
  101562. if (u.hasResult()) {
  101563. let c = u.result.getMatch;
  101564. if (u.result.filter === !1)
  101565. for (let f of u.result.options)
  101566. i(new j9(f, u.source, c ? c(f) : [], 1e9 - n.length));
  101567. else {
  101568. let f = e.sliceDoc(u.from, u.to), d, h = a.filterStrict ? new tft(f) : new eft(f);
  101569. for (let p of u.result.options)
  101570. if (d = h.match(p.label)) {
  101571. let v = p.displayLabel ? c ? c(p, d.matched) : [] : d.matched;
  101572. i(new j9(p, u.source, v, d.score + (p.boost || 0)));
  101573. }
  101574. }
  101575. }
  101576. if (r) {
  101577. let u = /* @__PURE__ */ Object.create(null), c = 0, f = (d, h) => {
  101578. var p, v;
  101579. return ((p = d.rank) !== null && p !== void 0 ? p : 1e9) - ((v = h.rank) !== null && v !== void 0 ? v : 1e9) || (d.name < h.name ? -1 : 1);
  101580. };
  101581. for (let d of r.sort(f))
  101582. c -= 1e5, u[d.name] = c;
  101583. for (let d of n) {
  101584. let { section: h } = d.completion;
  101585. h && (d.score += u[typeof h == "string" ? h : h.name]);
  101586. }
  101587. }
  101588. let o = [], s = null, l = a.compareCompletions;
  101589. for (let u of n.sort((c, f) => f.score - c.score || l(c.completion, f.completion))) {
  101590. let c = u.completion;
  101591. !s || s.label != c.label || s.detail != c.detail || s.type != null && c.type != null && s.type != c.type || s.apply != c.apply || s.boost != c.boost ? o.push(u) : X9(u.completion) > X9(s) && (o[o.length - 1] = u), s = u.completion;
  101592. }
  101593. return o;
  101594. }
  101595. class Gd {
  101596. constructor(e, n, r, i, a, o) {
  101597. this.options = e, this.attrs = n, this.tooltip = r, this.timestamp = i, this.selected = a, this.disabled = o;
  101598. }
  101599. setSelected(e, n) {
  101600. return e == this.selected || e >= this.options.length ? this : new Gd(this.options, Y9(n, e), this.tooltip, this.timestamp, e, this.disabled);
  101601. }
  101602. static build(e, n, r, i, a) {
  101603. let o = sft(e, n);
  101604. if (!o.length)
  101605. return i && e.some(
  101606. (l) => l.state == 1
  101607. /* State.Pending */
  101608. ) ? new Gd(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null;
  101609. let s = n.facet(br).selectOnOpen ? 0 : -1;
  101610. if (i && i.selected != s && i.selected != -1) {
  101611. let l = i.options[i.selected].completion;
  101612. for (let u = 0; u < o.length; u++)
  101613. if (o[u].completion == l) {
  101614. s = u;
  101615. break;
  101616. }
  101617. }
  101618. return new Gd(o, Y9(r, s), {
  101619. pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8),
  101620. create: hft,
  101621. above: a.aboveCursor
  101622. }, i ? i.timestamp : Date.now(), s, !1);
  101623. }
  101624. map(e) {
  101625. return new Gd(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
  101626. }
  101627. }
  101628. class SS {
  101629. constructor(e, n, r) {
  101630. this.active = e, this.id = n, this.open = r;
  101631. }
  101632. static start() {
  101633. return new SS(fft, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
  101634. }
  101635. update(e) {
  101636. let { state: n } = e, r = n.facet(br), a = (r.override || n.languageDataAt("autocomplete", tu(n)).map(Jct)).map((s) => (this.active.find((u) => u.source == s) || new Ni(
  101637. s,
  101638. this.active.some(
  101639. (u) => u.state != 0
  101640. /* State.Inactive */
  101641. ) ? 1 : 0
  101642. /* State.Inactive */
  101643. )).update(e, r));
  101644. a.length == this.active.length && a.every((s, l) => s == this.active[l]) && (a = this.active);
  101645. let o = this.open;
  101646. o && e.docChanged && (o = o.map(e.changes)), e.selection || a.some((s) => s.hasResult() && e.changes.touchesRange(s.from, s.to)) || !lft(a, this.active) ? o = Gd.build(a, n, this.id, o, r) : o && o.disabled && !a.some(
  101647. (s) => s.state == 1
  101648. /* State.Pending */
  101649. ) && (o = null), !o && a.every(
  101650. (s) => s.state != 1
  101651. /* State.Pending */
  101652. ) && a.some((s) => s.hasResult()) && (a = a.map((s) => s.hasResult() ? new Ni(
  101653. s.source,
  101654. 0
  101655. /* State.Inactive */
  101656. ) : s));
  101657. for (let s of e.effects)
  101658. s.is(jse) && (o = o && o.setSelected(s.value, this.id));
  101659. return a == this.active && o == this.open ? this : new SS(a, this.id, o);
  101660. }
  101661. get tooltip() {
  101662. return this.open ? this.open.tooltip : null;
  101663. }
  101664. get attrs() {
  101665. return this.open ? this.open.attrs : this.active.length ? uft : cft;
  101666. }
  101667. }
  101668. function lft(t, e) {
  101669. if (t == e)
  101670. return !0;
  101671. for (let n = 0, r = 0; ; ) {
  101672. for (; n < t.length && !t[n].hasResult; )
  101673. n++;
  101674. for (; r < e.length && !e[r].hasResult; )
  101675. r++;
  101676. let i = n == t.length, a = r == e.length;
  101677. if (i || a)
  101678. return i == a;
  101679. if (t[n++].result != e[r++].result)
  101680. return !1;
  101681. }
  101682. }
  101683. const uft = {
  101684. "aria-autocomplete": "list"
  101685. }, cft = {};
  101686. function Y9(t, e) {
  101687. let n = {
  101688. "aria-autocomplete": "list",
  101689. "aria-haspopup": "listbox",
  101690. "aria-controls": t
  101691. };
  101692. return e > -1 && (n["aria-activedescendant"] = t + "-" + e), n;
  101693. }
  101694. const fft = [];
  101695. function Hse(t, e) {
  101696. if (t.isUserEvent("input.complete")) {
  101697. let r = t.annotation(P4);
  101698. if (r && e.activateOnCompletion(r))
  101699. return 12;
  101700. }
  101701. let n = t.isUserEvent("input.type");
  101702. return n && e.activateOnTyping ? 5 : n ? 1 : t.isUserEvent("delete.backward") ? 2 : t.selection ? 8 : t.docChanged ? 16 : 0;
  101703. }
  101704. class Ni {
  101705. constructor(e, n, r = -1) {
  101706. this.source = e, this.state = n, this.explicitPos = r;
  101707. }
  101708. hasResult() {
  101709. return !1;
  101710. }
  101711. update(e, n) {
  101712. let r = Hse(e, n), i = this;
  101713. (r & 8 || r & 16 && this.touches(e)) && (i = new Ni(
  101714. i.source,
  101715. 0
  101716. /* State.Inactive */
  101717. )), r & 4 && i.state == 0 && (i = new Ni(
  101718. this.source,
  101719. 1
  101720. /* State.Pending */
  101721. )), i = i.updateFor(e, r);
  101722. for (let a of e.effects)
  101723. if (a.is(OS))
  101724. i = new Ni(i.source, 1, a.value ? tu(e.state) : -1);
  101725. else if (a.is(r0))
  101726. i = new Ni(
  101727. i.source,
  101728. 0
  101729. /* State.Inactive */
  101730. );
  101731. else if (a.is(Gse))
  101732. for (let o of a.value)
  101733. o.source == i.source && (i = o);
  101734. return i;
  101735. }
  101736. updateFor(e, n) {
  101737. return this.map(e.changes);
  101738. }
  101739. map(e) {
  101740. return e.empty || this.explicitPos < 0 ? this : new Ni(this.source, this.state, e.mapPos(this.explicitPos));
  101741. }
  101742. touches(e) {
  101743. return e.changes.touchesRange(tu(e.state));
  101744. }
  101745. }
  101746. class fh extends Ni {
  101747. constructor(e, n, r, i, a) {
  101748. super(e, 2, n), this.result = r, this.from = i, this.to = a;
  101749. }
  101750. hasResult() {
  101751. return !0;
  101752. }
  101753. updateFor(e, n) {
  101754. var r;
  101755. if (!(n & 3))
  101756. return this.map(e.changes);
  101757. let i = this.result;
  101758. i.map && !e.changes.empty && (i = i.map(i, e.changes));
  101759. let a = e.changes.mapPos(this.from), o = e.changes.mapPos(this.to, 1), s = tu(e.state);
  101760. if ((this.explicitPos < 0 ? s <= a : s < this.from) || s > o || !i || n & 2 && tu(e.startState) == this.from)
  101761. return new Ni(
  101762. this.source,
  101763. n & 4 ? 1 : 0
  101764. /* State.Inactive */
  101765. );
  101766. let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos);
  101767. return dft(i.validFor, e.state, a, o) ? new fh(this.source, l, i, a, o) : i.update && (i = i.update(i, a, o, new Fse(e.state, s, l >= 0))) ? new fh(this.source, l, i, i.from, (r = i.to) !== null && r !== void 0 ? r : tu(e.state)) : new Ni(this.source, 1, l);
  101768. }
  101769. map(e) {
  101770. return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new fh(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new Ni(
  101771. this.source,
  101772. 0
  101773. /* State.Inactive */
  101774. );
  101775. }
  101776. touches(e) {
  101777. return e.changes.touchesRange(this.from, this.to);
  101778. }
  101779. }
  101780. function dft(t, e, n, r) {
  101781. if (!t)
  101782. return !1;
  101783. let i = e.sliceDoc(n, r);
  101784. return typeof t == "function" ? t(i, n, r, e) : Qse(t, !0).test(i);
  101785. }
  101786. const Gse = /* @__PURE__ */ dt.define({
  101787. map(t, e) {
  101788. return t.map((n) => n.map(e));
  101789. }
  101790. }), jse = /* @__PURE__ */ dt.define(), vi = /* @__PURE__ */ ur.define({
  101791. create() {
  101792. return SS.start();
  101793. },
  101794. update(t, e) {
  101795. return t.update(e);
  101796. },
  101797. provide: (t) => [
  101798. u4.from(t, (e) => e.tooltip),
  101799. De.contentAttributes.from(t, (e) => e.attrs)
  101800. ]
  101801. });
  101802. function $4(t, e) {
  101803. const n = e.completion.apply || e.completion.label;
  101804. let r = t.state.field(vi).active.find((i) => i.source == e.source);
  101805. return r instanceof fh ? (typeof n == "string" ? t.dispatch(Object.assign(Object.assign({}, Kct(t.state, n, r.from, r.to)), { annotations: P4.of(e.completion) })) : n(t, e.completion, r.from, r.to), !0) : !1;
  101806. }
  101807. const hft = /* @__PURE__ */ aft(vi, $4);
  101808. function u_(t, e = "option") {
  101809. return (n) => {
  101810. let r = n.state.field(vi, !1);
  101811. if (!r || !r.open || r.open.disabled || Date.now() - r.open.timestamp < n.state.facet(br).interactionDelay)
  101812. return !1;
  101813. let i = 1, a;
  101814. e == "page" && (a = woe(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
  101815. let { length: o } = r.open.options, s = r.open.selected > -1 ? r.open.selected + i * (t ? 1 : -1) : t ? 0 : o - 1;
  101816. return s < 0 ? s = e == "page" ? 0 : o - 1 : s >= o && (s = e == "page" ? o - 1 : 0), n.dispatch({ effects: jse.of(s) }), !0;
  101817. };
  101818. }
  101819. const pft = (t) => {
  101820. let e = t.state.field(vi, !1);
  101821. return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(br).interactionDelay ? !1 : $4(t, e.open.options[e.open.selected]);
  101822. }, vft = (t) => t.state.field(vi, !1) ? (t.dispatch({ effects: OS.of(!0) }), !0) : !1, gft = (t) => {
  101823. let e = t.state.field(vi, !1);
  101824. return !e || !e.active.some(
  101825. (n) => n.state != 0
  101826. /* State.Inactive */
  101827. ) ? !1 : (t.dispatch({ effects: r0.of(null) }), !0);
  101828. };
  101829. class mft {
  101830. constructor(e, n) {
  101831. this.active = e, this.context = n, this.time = Date.now(), this.updates = [], this.done = void 0;
  101832. }
  101833. }
  101834. const yft = 50, bft = 1e3, _ft = /* @__PURE__ */ kn.fromClass(class {
  101835. constructor(t) {
  101836. this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
  101837. for (let e of t.state.field(vi).active)
  101838. e.state == 1 && this.startQuery(e);
  101839. }
  101840. update(t) {
  101841. let e = t.state.field(vi), n = t.state.facet(br);
  101842. if (!t.selectionSet && !t.docChanged && t.startState.field(vi) == e)
  101843. return;
  101844. let r = t.transactions.some((a) => {
  101845. let o = Hse(a, n);
  101846. return o & 8 || (a.selection || a.docChanged) && !(o & 3);
  101847. });
  101848. for (let a = 0; a < this.running.length; a++) {
  101849. let o = this.running[a];
  101850. if (r || o.updates.length + t.transactions.length > yft && Date.now() - o.time > bft) {
  101851. for (let s of o.context.abortListeners)
  101852. try {
  101853. s();
  101854. } catch (l) {
  101855. mi(this.view.state, l);
  101856. }
  101857. o.context.abortListeners = null, this.running.splice(a--, 1);
  101858. } else
  101859. o.updates.push(...t.transactions);
  101860. }
  101861. this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((a) => a.effects.some((o) => o.is(OS))) && (this.pendingStart = !0);
  101862. let i = this.pendingStart ? 50 : n.activateOnTypingDelay;
  101863. if (this.debounceUpdate = e.active.some((a) => a.state == 1 && !this.running.some((o) => o.active.source == a.source)) ? setTimeout(() => this.startUpdate(), i) : -1, this.composing != 0)
  101864. for (let a of t.transactions)
  101865. a.isUserEvent("input.type") ? this.composing = 2 : this.composing == 2 && a.selection && (this.composing = 3);
  101866. }
  101867. startUpdate() {
  101868. this.debounceUpdate = -1, this.pendingStart = !1;
  101869. let { state: t } = this.view, e = t.field(vi);
  101870. for (let n of e.active)
  101871. n.state == 1 && !this.running.some((r) => r.active.source == n.source) && this.startQuery(n);
  101872. }
  101873. startQuery(t) {
  101874. let { state: e } = this.view, n = tu(e), r = new Fse(e, n, t.explicitPos == n, this.view), i = new mft(t, r);
  101875. this.running.push(i), Promise.resolve(t.source(r)).then((a) => {
  101876. i.context.aborted || (i.done = a || null, this.scheduleAccept());
  101877. }, (a) => {
  101878. this.view.dispatch({ effects: r0.of(null) }), mi(this.view.state, a);
  101879. });
  101880. }
  101881. scheduleAccept() {
  101882. this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(br).updateSyncTime));
  101883. }
  101884. // For each finished query in this.running, try to create a result
  101885. // or, if appropriate, restart the query.
  101886. accept() {
  101887. var t;
  101888. this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1;
  101889. let e = [], n = this.view.state.facet(br);
  101890. for (let r = 0; r < this.running.length; r++) {
  101891. let i = this.running[r];
  101892. if (i.done === void 0)
  101893. continue;
  101894. if (this.running.splice(r--, 1), i.done) {
  101895. let o = new fh(i.active.source, i.active.explicitPos, i.done, i.done.from, (t = i.done.to) !== null && t !== void 0 ? t : tu(i.updates.length ? i.updates[0].startState : this.view.state));
  101896. for (let s of i.updates)
  101897. o = o.update(s, n);
  101898. if (o.hasResult()) {
  101899. e.push(o);
  101900. continue;
  101901. }
  101902. }
  101903. let a = this.view.state.field(vi).active.find((o) => o.source == i.active.source);
  101904. if (a && a.state == 1)
  101905. if (i.done == null) {
  101906. let o = new Ni(
  101907. i.active.source,
  101908. 0
  101909. /* State.Inactive */
  101910. );
  101911. for (let s of i.updates)
  101912. o = o.update(s, n);
  101913. o.state != 1 && e.push(o);
  101914. } else
  101915. this.startQuery(a);
  101916. }
  101917. e.length && this.view.dispatch({ effects: Gse.of(e) });
  101918. }
  101919. }, {
  101920. eventHandlers: {
  101921. blur(t) {
  101922. let e = this.view.state.field(vi, !1);
  101923. if (e && e.tooltip && this.view.state.facet(br).closeOnBlur) {
  101924. let n = e.open && woe(this.view, e.open.tooltip);
  101925. (!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: r0.of(null) }), 10);
  101926. }
  101927. },
  101928. compositionstart() {
  101929. this.composing = 1;
  101930. },
  101931. compositionend() {
  101932. this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: OS.of(!1) }), 20), this.composing = 0;
  101933. }
  101934. }
  101935. }), Oft = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), Sft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.domEventHandlers({
  101936. keydown(t, e) {
  101937. let n = e.state.field(vi, !1);
  101938. if (!n || !n.open || n.open.disabled || n.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(Oft && t.altKey) || t.metaKey)
  101939. return !1;
  101940. let r = n.open.options[n.open.selected], i = n.active.find((o) => o.source == r.source), a = r.completion.commitCharacters || i.result.commitCharacters;
  101941. return a && a.indexOf(t.key) > -1 && $4(e, r), !1;
  101942. }
  101943. })), Zse = /* @__PURE__ */ De.baseTheme({
  101944. ".cm-tooltip.cm-tooltip-autocomplete": {
  101945. "& > ul": {
  101946. fontFamily: "monospace",
  101947. whiteSpace: "nowrap",
  101948. overflow: "hidden auto",
  101949. maxWidth_fallback: "700px",
  101950. maxWidth: "min(700px, 95vw)",
  101951. minWidth: "250px",
  101952. maxHeight: "10em",
  101953. height: "100%",
  101954. listStyle: "none",
  101955. margin: 0,
  101956. padding: 0,
  101957. "& > li, & > completion-section": {
  101958. padding: "1px 3px",
  101959. lineHeight: 1.2
  101960. },
  101961. "& > li": {
  101962. overflowX: "hidden",
  101963. textOverflow: "ellipsis",
  101964. cursor: "pointer"
  101965. },
  101966. "& > completion-section": {
  101967. display: "list-item",
  101968. borderBottom: "1px solid silver",
  101969. paddingLeft: "0.5em",
  101970. opacity: 0.7
  101971. }
  101972. }
  101973. },
  101974. "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
  101975. background: "#17c",
  101976. color: "white"
  101977. },
  101978. "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
  101979. background: "#777"
  101980. },
  101981. "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
  101982. background: "#347",
  101983. color: "white"
  101984. },
  101985. "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
  101986. background: "#444"
  101987. },
  101988. ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
  101989. content: '"···"',
  101990. opacity: 0.5,
  101991. display: "block",
  101992. textAlign: "center"
  101993. },
  101994. ".cm-tooltip.cm-completionInfo": {
  101995. position: "absolute",
  101996. padding: "3px 9px",
  101997. width: "max-content",
  101998. maxWidth: "400px",
  101999. boxSizing: "border-box"
  102000. },
  102001. ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
  102002. ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
  102003. ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
  102004. ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
  102005. "&light .cm-snippetField": { backgroundColor: "#00000022" },
  102006. "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
  102007. ".cm-snippetFieldPosition": {
  102008. verticalAlign: "text-top",
  102009. width: 0,
  102010. height: "1.15em",
  102011. display: "inline-block",
  102012. margin: "0 -0.7px -.7em",
  102013. borderLeft: "1.4px dotted #888"
  102014. },
  102015. ".cm-completionMatchedText": {
  102016. textDecoration: "underline"
  102017. },
  102018. ".cm-completionDetail": {
  102019. marginLeft: "0.5em",
  102020. fontStyle: "italic"
  102021. },
  102022. ".cm-completionIcon": {
  102023. fontSize: "90%",
  102024. width: ".8em",
  102025. display: "inline-block",
  102026. textAlign: "center",
  102027. paddingRight: ".6em",
  102028. opacity: "0.6",
  102029. boxSizing: "content-box"
  102030. },
  102031. ".cm-completionIcon-function, .cm-completionIcon-method": {
  102032. "&:after": { content: "'ƒ'" }
  102033. },
  102034. ".cm-completionIcon-class": {
  102035. "&:after": { content: "'○'" }
  102036. },
  102037. ".cm-completionIcon-interface": {
  102038. "&:after": { content: "'◌'" }
  102039. },
  102040. ".cm-completionIcon-variable": {
  102041. "&:after": { content: "'𝑥'" }
  102042. },
  102043. ".cm-completionIcon-constant": {
  102044. "&:after": { content: "'𝐶'" }
  102045. },
  102046. ".cm-completionIcon-type": {
  102047. "&:after": { content: "'𝑡'" }
  102048. },
  102049. ".cm-completionIcon-enum": {
  102050. "&:after": { content: "'∪'" }
  102051. },
  102052. ".cm-completionIcon-property": {
  102053. "&:after": { content: "'□'" }
  102054. },
  102055. ".cm-completionIcon-keyword": {
  102056. "&:after": { content: "'🔑︎'" }
  102057. // Disable emoji rendering
  102058. },
  102059. ".cm-completionIcon-namespace": {
  102060. "&:after": { content: "'▢'" }
  102061. },
  102062. ".cm-completionIcon-text": {
  102063. "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
  102064. }
  102065. });
  102066. class xft {
  102067. constructor(e, n, r, i) {
  102068. this.field = e, this.line = n, this.from = r, this.to = i;
  102069. }
  102070. }
  102071. class A4 {
  102072. constructor(e, n, r) {
  102073. this.field = e, this.from = n, this.to = r;
  102074. }
  102075. map(e) {
  102076. let n = e.mapPos(this.from, -1, yr.TrackDel), r = e.mapPos(this.to, 1, yr.TrackDel);
  102077. return n == null || r == null ? null : new A4(this.field, n, r);
  102078. }
  102079. }
  102080. class E4 {
  102081. constructor(e, n) {
  102082. this.lines = e, this.fieldPositions = n;
  102083. }
  102084. instantiate(e, n) {
  102085. let r = [], i = [n], a = e.doc.lineAt(n), o = /^\s*/.exec(a.text)[0];
  102086. for (let l of this.lines) {
  102087. if (r.length) {
  102088. let u = o, c = /^\t*/.exec(l)[0].length;
  102089. for (let f = 0; f < c; f++)
  102090. u += e.facet(ly);
  102091. i.push(n + u.length - c), l = u + l.slice(c);
  102092. }
  102093. r.push(l), n += l.length + 1;
  102094. }
  102095. let s = this.fieldPositions.map((l) => new A4(l.field, i[l.line] + l.from, i[l.line] + l.to));
  102096. return { text: r, ranges: s };
  102097. }
  102098. static parse(e) {
  102099. let n = [], r = [], i = [], a;
  102100. for (let o of e.split(/\r\n?|\n/)) {
  102101. for (; a = /[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o); ) {
  102102. let s = a[1] ? +a[1] : null, l = a[2] || a[3] || "", u = -1, c = l.replace(/\\[{}]/g, (f) => f[1]);
  102103. for (let f = 0; f < n.length; f++)
  102104. (s != null ? n[f].seq == s : c && n[f].name == c) && (u = f);
  102105. if (u < 0) {
  102106. let f = 0;
  102107. for (; f < n.length && (s == null || n[f].seq != null && n[f].seq < s); )
  102108. f++;
  102109. n.splice(f, 0, { seq: s, name: c }), u = f;
  102110. for (let d of i)
  102111. d.field >= u && d.field++;
  102112. }
  102113. i.push(new xft(u, r.length, a.index, a.index + c.length)), o = o.slice(0, a.index) + l + o.slice(a.index + a[0].length);
  102114. }
  102115. o = o.replace(/\\([{}])/g, (s, l, u) => {
  102116. for (let c of i)
  102117. c.line == r.length && c.from > u && (c.from--, c.to--);
  102118. return l;
  102119. }), r.push(o);
  102120. }
  102121. return new E4(r, i);
  102122. }
  102123. }
  102124. let wft = /* @__PURE__ */ Ze.widget({ widget: /* @__PURE__ */ new class extends ds {
  102125. toDOM() {
  102126. let t = document.createElement("span");
  102127. return t.className = "cm-snippetFieldPosition", t;
  102128. }
  102129. ignoreEvent() {
  102130. return !1;
  102131. }
  102132. }() }), Cft = /* @__PURE__ */ Ze.mark({ class: "cm-snippetField" });
  102133. class Np {
  102134. constructor(e, n) {
  102135. this.ranges = e, this.active = n, this.deco = Ze.set(e.map((r) => (r.from == r.to ? wft : Cft).range(r.from, r.to)));
  102136. }
  102137. map(e) {
  102138. let n = [];
  102139. for (let r of this.ranges) {
  102140. let i = r.map(e);
  102141. if (!i)
  102142. return null;
  102143. n.push(i);
  102144. }
  102145. return new Np(n, this.active);
  102146. }
  102147. selectionInsideField(e) {
  102148. return e.ranges.every((n) => this.ranges.some((r) => r.field == this.active && r.from <= n.from && r.to >= n.to));
  102149. }
  102150. }
  102151. const hy = /* @__PURE__ */ dt.define({
  102152. map(t, e) {
  102153. return t && t.map(e);
  102154. }
  102155. }), Tft = /* @__PURE__ */ dt.define(), i0 = /* @__PURE__ */ ur.define({
  102156. create() {
  102157. return null;
  102158. },
  102159. update(t, e) {
  102160. for (let n of e.effects) {
  102161. if (n.is(hy))
  102162. return n.value;
  102163. if (n.is(Tft) && t)
  102164. return new Np(t.ranges, n.value);
  102165. }
  102166. return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
  102167. },
  102168. provide: (t) => De.decorations.from(t, (e) => e ? e.deco : Ze.none)
  102169. });
  102170. function M4(t, e) {
  102171. return me.create(t.filter((n) => n.field == e).map((n) => me.range(n.from, n.to)));
  102172. }
  102173. function Pft(t) {
  102174. let e = E4.parse(t);
  102175. return (n, r, i, a) => {
  102176. let { text: o, ranges: s } = e.instantiate(n.state, i), l = {
  102177. changes: { from: i, to: a, insert: Ft.of(o) },
  102178. scrollIntoView: !0,
  102179. annotations: r ? [P4.of(r), Fn.userEvent.of("input.complete")] : void 0
  102180. };
  102181. if (s.length && (l.selection = M4(s, 0)), s.some((u) => u.field > 0)) {
  102182. let u = new Np(s, 0), c = l.effects = [hy.of(u)];
  102183. n.state.field(i0, !1) === void 0 && c.push(dt.appendConfig.of([i0, Ift, Dft, Zse]));
  102184. }
  102185. n.dispatch(n.state.update(l));
  102186. };
  102187. }
  102188. function Use(t) {
  102189. return ({ state: e, dispatch: n }) => {
  102190. let r = e.field(i0, !1);
  102191. if (!r || t < 0 && r.active == 0)
  102192. return !1;
  102193. let i = r.active + t, a = t > 0 && !r.ranges.some((o) => o.field == i + t);
  102194. return n(e.update({
  102195. selection: M4(r.ranges, i),
  102196. effects: hy.of(a ? null : new Np(r.ranges, i)),
  102197. scrollIntoView: !0
  102198. })), !0;
  102199. };
  102200. }
  102201. const $ft = ({ state: t, dispatch: e }) => t.field(i0, !1) ? (e(t.update({ effects: hy.of(null) })), !0) : !1, Aft = /* @__PURE__ */ Use(1), Eft = /* @__PURE__ */ Use(-1), Mft = [
  102202. { key: "Tab", run: Aft, shift: Eft },
  102203. { key: "Escape", run: $ft }
  102204. ], q9 = /* @__PURE__ */ Be.define({
  102205. combine(t) {
  102206. return t.length ? t[0] : Mft;
  102207. }
  102208. }), Ift = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ oy.compute([q9], (t) => t.facet(q9)));
  102209. function ui(t, e) {
  102210. return Object.assign(Object.assign({}, e), { apply: Pft(t) });
  102211. }
  102212. const Dft = /* @__PURE__ */ De.domEventHandlers({
  102213. mousedown(t, e) {
  102214. let n = e.state.field(i0, !1), r;
  102215. if (!n || (r = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
  102216. return !1;
  102217. let i = n.ranges.find((a) => a.from <= r && a.to >= r);
  102218. return !i || i.field == n.active ? !1 : (e.dispatch({
  102219. selection: M4(n.ranges, i.field),
  102220. effects: hy.of(n.ranges.some((a) => a.field > i.field) ? new Np(n.ranges, i.field) : null),
  102221. scrollIntoView: !0
  102222. }), !0);
  102223. }
  102224. }), a0 = {
  102225. brackets: ["(", "[", "{", "'", '"'],
  102226. before: ")]}:;>",
  102227. stringPrefixes: []
  102228. }, Qc = /* @__PURE__ */ dt.define({
  102229. map(t, e) {
  102230. let n = e.mapPos(t, -1, yr.TrackAfter);
  102231. return n ?? void 0;
  102232. }
  102233. }), I4 = /* @__PURE__ */ new class extends wf {
  102234. }();
  102235. I4.startSide = 1;
  102236. I4.endSide = -1;
  102237. const Xse = /* @__PURE__ */ ur.define({
  102238. create() {
  102239. return Vt.empty;
  102240. },
  102241. update(t, e) {
  102242. if (t = t.map(e.changes), e.selection) {
  102243. let n = e.state.doc.lineAt(e.selection.main.head);
  102244. t = t.update({ filter: (r) => r >= n.from && r <= n.to });
  102245. }
  102246. for (let n of e.effects)
  102247. n.is(Qc) && (t = t.update({ add: [I4.range(n.value, n.value + 1)] }));
  102248. return t;
  102249. }
  102250. });
  102251. function Rft() {
  102252. return [Lft, Xse];
  102253. }
  102254. const L$ = "()[]{}<>";
  102255. function Yse(t) {
  102256. for (let e = 0; e < L$.length; e += 2)
  102257. if (L$.charCodeAt(e) == t)
  102258. return L$.charAt(e + 1);
  102259. return KL(t < 128 ? t : t + 1);
  102260. }
  102261. function qse(t, e) {
  102262. return t.languageDataAt("closeBrackets", e)[0] || a0;
  102263. }
  102264. const kft = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Lft = /* @__PURE__ */ De.inputHandler.of((t, e, n, r) => {
  102265. if ((kft ? t.composing : t.compositionStarted) || t.state.readOnly)
  102266. return !1;
  102267. let i = t.state.selection.main;
  102268. if (r.length > 2 || r.length == 2 && ga(gr(r, 0)) == 1 || e != i.from || n != i.to)
  102269. return !1;
  102270. let a = zft(t.state, r);
  102271. return a ? (t.dispatch(a), !0) : !1;
  102272. }), Nft = ({ state: t, dispatch: e }) => {
  102273. if (t.readOnly)
  102274. return !1;
  102275. let r = qse(t, t.selection.main.head).brackets || a0.brackets, i = null, a = t.changeByRange((o) => {
  102276. if (o.empty) {
  102277. let s = Vft(t.doc, o.head);
  102278. for (let l of r)
  102279. if (l == s && Fw(t.doc, o.head) == Yse(gr(l, 0)))
  102280. return {
  102281. changes: { from: o.head - l.length, to: o.head + l.length },
  102282. range: me.cursor(o.head - l.length)
  102283. };
  102284. }
  102285. return { range: i = o };
  102286. });
  102287. return i || e(t.update(a, { scrollIntoView: !0, userEvent: "delete.backward" })), !i;
  102288. }, Bft = [
  102289. { key: "Backspace", run: Nft }
  102290. ];
  102291. function zft(t, e) {
  102292. let n = qse(t, t.selection.main.head), r = n.brackets || a0.brackets;
  102293. for (let i of r) {
  102294. let a = Yse(gr(i, 0));
  102295. if (e == i)
  102296. return a == i ? Qft(t, i, r.indexOf(i + i + i) > -1, n) : Fft(t, i, a, n.before || a0.before);
  102297. if (e == a && Kse(t, t.selection.main.from))
  102298. return Wft(t, i, a);
  102299. }
  102300. return null;
  102301. }
  102302. function Kse(t, e) {
  102303. let n = !1;
  102304. return t.field(Xse).between(0, t.doc.length, (r) => {
  102305. r == e && (n = !0);
  102306. }), n;
  102307. }
  102308. function Fw(t, e) {
  102309. let n = t.sliceString(e, e + 2);
  102310. return n.slice(0, ga(gr(n, 0)));
  102311. }
  102312. function Vft(t, e) {
  102313. let n = t.sliceString(e - 2, e);
  102314. return ga(gr(n, 0)) == n.length ? n : n.slice(1);
  102315. }
  102316. function Fft(t, e, n, r) {
  102317. let i = null, a = t.changeByRange((o) => {
  102318. if (!o.empty)
  102319. return {
  102320. changes: [{ insert: e, from: o.from }, { insert: n, from: o.to }],
  102321. effects: Qc.of(o.to + e.length),
  102322. range: me.range(o.anchor + e.length, o.head + e.length)
  102323. };
  102324. let s = Fw(t.doc, o.head);
  102325. return !s || /\s/.test(s) || r.indexOf(s) > -1 ? {
  102326. changes: { insert: e + n, from: o.head },
  102327. effects: Qc.of(o.head + e.length),
  102328. range: me.cursor(o.head + e.length)
  102329. } : { range: i = o };
  102330. });
  102331. return i ? null : t.update(a, {
  102332. scrollIntoView: !0,
  102333. userEvent: "input.type"
  102334. });
  102335. }
  102336. function Wft(t, e, n) {
  102337. let r = null, i = t.changeByRange((a) => a.empty && Fw(t.doc, a.head) == n ? {
  102338. changes: { from: a.head, to: a.head + n.length, insert: n },
  102339. range: me.cursor(a.head + n.length)
  102340. } : r = { range: a });
  102341. return r ? null : t.update(i, {
  102342. scrollIntoView: !0,
  102343. userEvent: "input.type"
  102344. });
  102345. }
  102346. function Qft(t, e, n, r) {
  102347. let i = r.stringPrefixes || a0.stringPrefixes, a = null, o = t.changeByRange((s) => {
  102348. if (!s.empty)
  102349. return {
  102350. changes: [{ insert: e, from: s.from }, { insert: e, from: s.to }],
  102351. effects: Qc.of(s.to + e.length),
  102352. range: me.range(s.anchor + e.length, s.head + e.length)
  102353. };
  102354. let l = s.head, u = Fw(t.doc, l), c;
  102355. if (u == e) {
  102356. if (K9(t, l))
  102357. return {
  102358. changes: { insert: e + e, from: l },
  102359. effects: Qc.of(l + e.length),
  102360. range: me.cursor(l + e.length)
  102361. };
  102362. if (Kse(t, l)) {
  102363. let d = n && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
  102364. return {
  102365. changes: { from: l, to: l + d.length, insert: d },
  102366. range: me.cursor(l + d.length)
  102367. };
  102368. }
  102369. } else {
  102370. if (n && t.sliceDoc(l - 2 * e.length, l) == e + e && (c = J9(t, l - 2 * e.length, i)) > -1 && K9(t, c))
  102371. return {
  102372. changes: { insert: e + e + e + e, from: l },
  102373. effects: Qc.of(l + e.length),
  102374. range: me.cursor(l + e.length)
  102375. };
  102376. if (t.charCategorizer(l)(u) != yn.Word && J9(t, l, i) > -1 && !Hft(t, l, e, i))
  102377. return {
  102378. changes: { insert: e + e, from: l },
  102379. effects: Qc.of(l + e.length),
  102380. range: me.cursor(l + e.length)
  102381. };
  102382. }
  102383. return { range: a = s };
  102384. });
  102385. return a ? null : t.update(o, {
  102386. scrollIntoView: !0,
  102387. userEvent: "input.type"
  102388. });
  102389. }
  102390. function K9(t, e) {
  102391. let n = nr(t).resolveInner(e + 1);
  102392. return n.parent && n.from == e;
  102393. }
  102394. function Hft(t, e, n, r) {
  102395. let i = nr(t).resolveInner(e, -1), a = r.reduce((o, s) => Math.max(o, s.length), 0);
  102396. for (let o = 0; o < 5; o++) {
  102397. let s = t.sliceDoc(i.from, Math.min(i.to, i.from + n.length + a)), l = s.indexOf(n);
  102398. if (!l || l > -1 && r.indexOf(s.slice(0, l)) > -1) {
  102399. let c = i.firstChild;
  102400. for (; c && c.from == i.from && c.to - c.from > n.length + l; ) {
  102401. if (t.sliceDoc(c.to - n.length, c.to) == n)
  102402. return !1;
  102403. c = c.firstChild;
  102404. }
  102405. return !0;
  102406. }
  102407. let u = i.to == e && i.parent;
  102408. if (!u)
  102409. break;
  102410. i = u;
  102411. }
  102412. return !1;
  102413. }
  102414. function J9(t, e, n) {
  102415. let r = t.charCategorizer(e);
  102416. if (r(t.sliceDoc(e - 1, e)) != yn.Word)
  102417. return e;
  102418. for (let i of n) {
  102419. let a = e - i.length;
  102420. if (t.sliceDoc(a, e) == i && r(t.sliceDoc(a - 1, a)) != yn.Word)
  102421. return a;
  102422. }
  102423. return -1;
  102424. }
  102425. function Gft(t = {}) {
  102426. return [
  102427. Sft,
  102428. vi,
  102429. br.of(t),
  102430. _ft,
  102431. jft,
  102432. Zse
  102433. ];
  102434. }
  102435. const Jse = [
  102436. { key: "Ctrl-Space", run: vft },
  102437. { key: "Escape", run: gft },
  102438. { key: "ArrowDown", run: /* @__PURE__ */ u_(!0) },
  102439. { key: "ArrowUp", run: /* @__PURE__ */ u_(!1) },
  102440. { key: "PageDown", run: /* @__PURE__ */ u_(!0, "page") },
  102441. { key: "PageUp", run: /* @__PURE__ */ u_(!1, "page") },
  102442. { key: "Enter", run: pft }
  102443. ], jft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ oy.computeN([br], (t) => t.facet(br).defaultKeymap ? [Jse] : []));
  102444. class Zft {
  102445. constructor(e, n, r) {
  102446. this.from = e, this.to = n, this.diagnostic = r;
  102447. }
  102448. }
  102449. class $c {
  102450. constructor(e, n, r) {
  102451. this.diagnostics = e, this.panel = n, this.selected = r;
  102452. }
  102453. static init(e, n, r) {
  102454. let i = e, a = r.facet(o0).markerFilter;
  102455. a && (i = a(i, r));
  102456. let o = Ze.set(i.map((s) => s.from == s.to || s.from == s.to - 1 && r.doc.lineAt(s.from).to == s.from ? Ze.widget({
  102457. widget: new ndt(s),
  102458. diagnostic: s
  102459. }).range(s.from) : Ze.mark({
  102460. attributes: { class: "cm-lintRange cm-lintRange-" + s.severity + (s.markClass ? " " + s.markClass : "") },
  102461. diagnostic: s
  102462. }).range(s.from, s.to)), !0);
  102463. return new $c(o, n, Jh(o));
  102464. }
  102465. }
  102466. function Jh(t, e = null, n = 0) {
  102467. let r = null;
  102468. return t.between(n, 1e9, (i, a, { spec: o }) => {
  102469. if (!(e && o.diagnostic != e))
  102470. return r = new Zft(i, a, o.diagnostic), !1;
  102471. }), r;
  102472. }
  102473. function Uft(t, e) {
  102474. let n = e.pos, r = e.end || n, i = t.state.facet(o0).hideOn(t, n, r);
  102475. if (i != null)
  102476. return i;
  102477. let a = t.startState.doc.lineAt(e.pos);
  102478. return !!(t.effects.some((o) => o.is(ele)) || t.changes.touchesRange(a.from, Math.max(a.to, r)));
  102479. }
  102480. function Xft(t, e) {
  102481. return t.field(Wi, !1) ? e : e.concat(dt.appendConfig.of(adt));
  102482. }
  102483. const ele = /* @__PURE__ */ dt.define(), D4 = /* @__PURE__ */ dt.define(), tle = /* @__PURE__ */ dt.define(), Wi = /* @__PURE__ */ ur.define({
  102484. create() {
  102485. return new $c(Ze.none, null, null);
  102486. },
  102487. update(t, e) {
  102488. if (e.docChanged && t.diagnostics.size) {
  102489. let n = t.diagnostics.map(e.changes), r = null, i = t.panel;
  102490. if (t.selected) {
  102491. let a = e.changes.mapPos(t.selected.from, 1);
  102492. r = Jh(n, t.selected.diagnostic, a) || Jh(n, null, a);
  102493. }
  102494. !n.size && i && e.state.facet(o0).autoPanel && (i = null), t = new $c(n, i, r);
  102495. }
  102496. for (let n of e.effects)
  102497. if (n.is(ele)) {
  102498. let r = e.state.facet(o0).autoPanel ? n.value.length ? s0.open : null : t.panel;
  102499. t = $c.init(n.value, r, e.state);
  102500. } else n.is(D4) ? t = new $c(t.diagnostics, n.value ? s0.open : null, t.selected) : n.is(tle) && (t = new $c(t.diagnostics, t.panel, n.value));
  102501. return t;
  102502. },
  102503. provide: (t) => [
  102504. Km.from(t, (e) => e.panel),
  102505. De.decorations.from(t, (e) => e.diagnostics)
  102506. ]
  102507. }), Yft = /* @__PURE__ */ Ze.mark({ class: "cm-lintRange cm-lintRange-active" });
  102508. function qft(t, e, n) {
  102509. let { diagnostics: r } = t.state.field(Wi), i = [], a = 2e8, o = 0;
  102510. r.between(e - (n < 0 ? 1 : 0), e + (n > 0 ? 1 : 0), (l, u, { spec: c }) => {
  102511. e >= l && e <= u && (l == u || (e > l || n > 0) && (e < u || n < 0)) && (i.push(c.diagnostic), a = Math.min(l, a), o = Math.max(u, o));
  102512. });
  102513. let s = t.state.facet(o0).tooltipFilter;
  102514. return s && (i = s(i, t.state)), i.length ? {
  102515. pos: a,
  102516. end: o,
  102517. above: t.state.doc.lineAt(a).to < o,
  102518. create() {
  102519. return { dom: Kft(t, i) };
  102520. }
  102521. } : null;
  102522. }
  102523. function Kft(t, e) {
  102524. return on("ul", { class: "cm-tooltip-lint" }, e.map((n) => rle(t, n, !1)));
  102525. }
  102526. const Jft = (t) => {
  102527. let e = t.state.field(Wi, !1);
  102528. (!e || !e.panel) && t.dispatch({ effects: Xft(t.state, [D4.of(!0)]) });
  102529. let n = qm(t, s0.open);
  102530. return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
  102531. }, eG = (t) => {
  102532. let e = t.state.field(Wi, !1);
  102533. return !e || !e.panel ? !1 : (t.dispatch({ effects: D4.of(!1) }), !0);
  102534. }, edt = (t) => {
  102535. let e = t.state.field(Wi, !1);
  102536. if (!e)
  102537. return !1;
  102538. let n = t.state.selection.main, r = e.diagnostics.iter(n.to + 1);
  102539. return !r.value && (r = e.diagnostics.iter(0), !r.value || r.from == n.from && r.to == n.to) ? !1 : (t.dispatch({ selection: { anchor: r.from, head: r.to }, scrollIntoView: !0 }), !0);
  102540. }, tdt = [
  102541. { key: "Mod-Shift-m", run: Jft, preventDefault: !0 },
  102542. { key: "F8", run: edt }
  102543. ], o0 = /* @__PURE__ */ Be.define({
  102544. combine(t) {
  102545. return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, fs(t.map((e) => e.config), {
  102546. delay: 750,
  102547. markerFilter: null,
  102548. tooltipFilter: null,
  102549. needsRefresh: null,
  102550. hideOn: () => null
  102551. }, {
  102552. needsRefresh: (e, n) => e ? n ? (r) => e(r) || n(r) : e : n
  102553. }));
  102554. }
  102555. });
  102556. function nle(t) {
  102557. let e = [];
  102558. if (t)
  102559. e: for (let { name: n } of t) {
  102560. for (let r = 0; r < n.length; r++) {
  102561. let i = n[r];
  102562. if (/[a-zA-Z]/.test(i) && !e.some((a) => a.toLowerCase() == i.toLowerCase())) {
  102563. e.push(i);
  102564. continue e;
  102565. }
  102566. }
  102567. e.push("");
  102568. }
  102569. return e;
  102570. }
  102571. function rle(t, e, n) {
  102572. var r;
  102573. let i = n ? nle(e.actions) : [];
  102574. return on("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, on("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (r = e.actions) === null || r === void 0 ? void 0 : r.map((a, o) => {
  102575. let s = !1, l = (d) => {
  102576. if (d.preventDefault(), s)
  102577. return;
  102578. s = !0;
  102579. let h = Jh(t.state.field(Wi).diagnostics, e);
  102580. h && a.apply(t, h.from, h.to);
  102581. }, { name: u } = a, c = i[o] ? u.indexOf(i[o]) : -1, f = c < 0 ? u : [
  102582. u.slice(0, c),
  102583. on("u", u.slice(c, c + 1)),
  102584. u.slice(c + 1)
  102585. ];
  102586. return on("button", {
  102587. type: "button",
  102588. class: "cm-diagnosticAction",
  102589. onclick: l,
  102590. onmousedown: l,
  102591. "aria-label": ` Action: ${u}${c < 0 ? "" : ` (access key "${i[o]})"`}.`
  102592. }, f);
  102593. }), e.source && on("div", { class: "cm-diagnosticSource" }, e.source));
  102594. }
  102595. class ndt extends ds {
  102596. constructor(e) {
  102597. super(), this.diagnostic = e;
  102598. }
  102599. eq(e) {
  102600. return e.diagnostic == this.diagnostic;
  102601. }
  102602. toDOM() {
  102603. return on("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity });
  102604. }
  102605. }
  102606. class tG {
  102607. constructor(e, n) {
  102608. this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = rle(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
  102609. }
  102610. }
  102611. class s0 {
  102612. constructor(e) {
  102613. this.view = e, this.items = [];
  102614. let n = (i) => {
  102615. if (i.keyCode == 27)
  102616. eG(this.view), this.view.focus();
  102617. else if (i.keyCode == 38 || i.keyCode == 33)
  102618. this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
  102619. else if (i.keyCode == 40 || i.keyCode == 34)
  102620. this.moveSelection((this.selectedIndex + 1) % this.items.length);
  102621. else if (i.keyCode == 36)
  102622. this.moveSelection(0);
  102623. else if (i.keyCode == 35)
  102624. this.moveSelection(this.items.length - 1);
  102625. else if (i.keyCode == 13)
  102626. this.view.focus();
  102627. else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) {
  102628. let { diagnostic: a } = this.items[this.selectedIndex], o = nle(a.actions);
  102629. for (let s = 0; s < o.length; s++)
  102630. if (o[s].toUpperCase().charCodeAt(0) == i.keyCode) {
  102631. let l = Jh(this.view.state.field(Wi).diagnostics, a);
  102632. l && a.actions[s].apply(e, l.from, l.to);
  102633. }
  102634. } else
  102635. return;
  102636. i.preventDefault();
  102637. }, r = (i) => {
  102638. for (let a = 0; a < this.items.length; a++)
  102639. this.items[a].dom.contains(i.target) && this.moveSelection(a);
  102640. };
  102641. this.list = on("ul", {
  102642. tabIndex: 0,
  102643. role: "listbox",
  102644. "aria-label": this.view.state.phrase("Diagnostics"),
  102645. onkeydown: n,
  102646. onclick: r
  102647. }), this.dom = on("div", { class: "cm-panel-lint" }, this.list, on("button", {
  102648. type: "button",
  102649. name: "close",
  102650. "aria-label": this.view.state.phrase("close"),
  102651. onclick: () => eG(this.view)
  102652. }, "×")), this.update();
  102653. }
  102654. get selectedIndex() {
  102655. let e = this.view.state.field(Wi).selected;
  102656. if (!e)
  102657. return -1;
  102658. for (let n = 0; n < this.items.length; n++)
  102659. if (this.items[n].diagnostic == e.diagnostic)
  102660. return n;
  102661. return -1;
  102662. }
  102663. update() {
  102664. let { diagnostics: e, selected: n } = this.view.state.field(Wi), r = 0, i = !1, a = null;
  102665. for (e.between(0, this.view.state.doc.length, (o, s, { spec: l }) => {
  102666. let u = -1, c;
  102667. for (let f = r; f < this.items.length; f++)
  102668. if (this.items[f].diagnostic == l.diagnostic) {
  102669. u = f;
  102670. break;
  102671. }
  102672. u < 0 ? (c = new tG(this.view, l.diagnostic), this.items.splice(r, 0, c), i = !0) : (c = this.items[u], u > r && (this.items.splice(r, u - r), i = !0)), n && c.diagnostic == n.diagnostic ? c.dom.hasAttribute("aria-selected") || (c.dom.setAttribute("aria-selected", "true"), a = c) : c.dom.hasAttribute("aria-selected") && c.dom.removeAttribute("aria-selected"), r++;
  102673. }); r < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
  102674. i = !0, this.items.pop();
  102675. this.items.length == 0 && (this.items.push(new tG(this.view, {
  102676. from: -1,
  102677. to: -1,
  102678. severity: "info",
  102679. message: this.view.state.phrase("No diagnostics")
  102680. })), i = !0), a ? (this.list.setAttribute("aria-activedescendant", a.id), this.view.requestMeasure({
  102681. key: this,
  102682. read: () => ({ sel: a.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
  102683. write: ({ sel: o, panel: s }) => {
  102684. let l = s.height / this.list.offsetHeight;
  102685. o.top < s.top ? this.list.scrollTop -= (s.top - o.top) / l : o.bottom > s.bottom && (this.list.scrollTop += (o.bottom - s.bottom) / l);
  102686. }
  102687. })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), i && this.sync();
  102688. }
  102689. sync() {
  102690. let e = this.list.firstChild;
  102691. function n() {
  102692. let r = e;
  102693. e = r.nextSibling, r.remove();
  102694. }
  102695. for (let r of this.items)
  102696. if (r.dom.parentNode == this.list) {
  102697. for (; e != r.dom; )
  102698. n();
  102699. e = r.dom.nextSibling;
  102700. } else
  102701. this.list.insertBefore(r.dom, e);
  102702. for (; e; )
  102703. n();
  102704. }
  102705. moveSelection(e) {
  102706. if (this.selectedIndex < 0)
  102707. return;
  102708. let n = this.view.state.field(Wi), r = Jh(n.diagnostics, this.items[e].diagnostic);
  102709. r && this.view.dispatch({
  102710. selection: { anchor: r.from, head: r.to },
  102711. scrollIntoView: !0,
  102712. effects: tle.of(r)
  102713. });
  102714. }
  102715. static open(e) {
  102716. return new s0(e);
  102717. }
  102718. }
  102719. function rdt(t, e = 'viewBox="0 0 40 40"') {
  102720. return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
  102721. }
  102722. function c_(t) {
  102723. return rdt(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
  102724. }
  102725. const idt = /* @__PURE__ */ De.baseTheme({
  102726. ".cm-diagnostic": {
  102727. padding: "3px 6px 3px 8px",
  102728. marginLeft: "-1px",
  102729. display: "block",
  102730. whiteSpace: "pre-wrap"
  102731. },
  102732. ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
  102733. ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
  102734. ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
  102735. ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
  102736. ".cm-diagnosticAction": {
  102737. font: "inherit",
  102738. border: "none",
  102739. padding: "2px 4px",
  102740. backgroundColor: "#444",
  102741. color: "white",
  102742. borderRadius: "3px",
  102743. marginLeft: "8px",
  102744. cursor: "pointer"
  102745. },
  102746. ".cm-diagnosticSource": {
  102747. fontSize: "70%",
  102748. opacity: 0.7
  102749. },
  102750. ".cm-lintRange": {
  102751. backgroundPosition: "left bottom",
  102752. backgroundRepeat: "repeat-x",
  102753. paddingBottom: "0.7px"
  102754. },
  102755. ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ c_("#d11") },
  102756. ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ c_("orange") },
  102757. ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ c_("#999") },
  102758. ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ c_("#66d") },
  102759. ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
  102760. ".cm-tooltip-lint": {
  102761. padding: 0,
  102762. margin: 0
  102763. },
  102764. ".cm-lintPoint": {
  102765. position: "relative",
  102766. "&:after": {
  102767. content: '""',
  102768. position: "absolute",
  102769. bottom: 0,
  102770. left: "-2px",
  102771. borderLeft: "3px solid transparent",
  102772. borderRight: "3px solid transparent",
  102773. borderBottom: "4px solid #d11"
  102774. }
  102775. },
  102776. ".cm-lintPoint-warning": {
  102777. "&:after": { borderBottomColor: "orange" }
  102778. },
  102779. ".cm-lintPoint-info": {
  102780. "&:after": { borderBottomColor: "#999" }
  102781. },
  102782. ".cm-lintPoint-hint": {
  102783. "&:after": { borderBottomColor: "#66d" }
  102784. },
  102785. ".cm-panel.cm-panel-lint": {
  102786. position: "relative",
  102787. "& ul": {
  102788. maxHeight: "100px",
  102789. overflowY: "auto",
  102790. "& [aria-selected]": {
  102791. backgroundColor: "#ddd",
  102792. "& u": { textDecoration: "underline" }
  102793. },
  102794. "&:focus [aria-selected]": {
  102795. background_fallback: "#bdf",
  102796. backgroundColor: "Highlight",
  102797. color_fallback: "white",
  102798. color: "HighlightText"
  102799. },
  102800. "& u": { textDecoration: "none" },
  102801. padding: 0,
  102802. margin: 0
  102803. },
  102804. "& [name=close]": {
  102805. position: "absolute",
  102806. top: "0",
  102807. right: "2px",
  102808. background: "inherit",
  102809. border: "none",
  102810. font: "inherit",
  102811. padding: 0,
  102812. margin: 0
  102813. }
  102814. }
  102815. }), adt = [
  102816. Wi,
  102817. /* @__PURE__ */ De.decorations.compute([Wi], (t) => {
  102818. let { selected: e, panel: n } = t.field(Wi);
  102819. return !e || !n || e.from == e.to ? Ze.none : Ze.set([
  102820. Yft.range(e.from, e.to)
  102821. ]);
  102822. }),
  102823. /* @__PURE__ */ jst(qft, { hideOn: Uft }),
  102824. idt
  102825. ], odt = [
  102826. tlt(),
  102827. ilt(),
  102828. Ost(),
  102829. but(),
  102830. jlt(),
  102831. cst(),
  102832. vst(),
  102833. At.allowMultipleSelections.of(!0),
  102834. Dlt(),
  102835. Xoe(Ylt, { fallback: !0 }),
  102836. rut(),
  102837. Rft(),
  102838. Gft(),
  102839. kst(),
  102840. Bst(),
  102841. Pst(),
  102842. Pct(),
  102843. oy.of([
  102844. ...Bft,
  102845. ..._ct,
  102846. ...jct,
  102847. ...$ut,
  102848. ...Wlt,
  102849. ...Jse,
  102850. ...tdt
  102851. ])
  102852. ];
  102853. /*!
  102854. * VueCodemirror v6.1.1
  102855. * Copyright (c) Surmon. All rights reserved.
  102856. * Released under the MIT License.
  102857. * Surmon
  102858. */
  102859. var sdt = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSize: 2, placeholder: "", autoDestroy: !0, extensions: [odt] }), ldt = Symbol("vue-codemirror-global-config"), jr, udt = function(t) {
  102860. var e = t.onUpdate, n = t.onChange, r = t.onFocus, i = t.onBlur, a = function(o, s) {
  102861. var l = {};
  102862. for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && s.indexOf(u) < 0 && (l[u] = o[u]);
  102863. if (o != null && typeof Object.getOwnPropertySymbols == "function") {
  102864. var c = 0;
  102865. for (u = Object.getOwnPropertySymbols(o); c < u.length; c++) s.indexOf(u[c]) < 0 && Object.prototype.propertyIsEnumerable.call(o, u[c]) && (l[u[c]] = o[u[c]]);
  102866. }
  102867. return l;
  102868. }(t, ["onUpdate", "onChange", "onFocus", "onBlur"]);
  102869. return At.create({ doc: a.doc, selection: a.selection, extensions: (Array.isArray(a.extensions) ? a.extensions : [a.extensions]).concat([De.updateListener.of(function(o) {
  102870. e(o), o.docChanged && n(o.state.doc.toString(), o), o.focusChanged && (o.view.hasFocus ? r(o) : i(o));
  102871. })]) });
  102872. }, kd = function(t) {
  102873. var e = new ry();
  102874. return { compartment: e, run: function(n) {
  102875. e.get(t.state) ? t.dispatch({ effects: e.reconfigure(n) }) : t.dispatch({ effects: dt.appendConfig.of(e.of(n)) });
  102876. } };
  102877. }, nG = function(t, e) {
  102878. var n = kd(t), r = n.compartment, i = n.run;
  102879. return function(a) {
  102880. var o = r.get(t.state);
  102881. i(a ?? o !== e ? e : []);
  102882. };
  102883. }, f_ = { type: Boolean, default: void 0 }, cdt = { autofocus: f_, disabled: f_, indentWithTab: f_, tabSize: Number, placeholder: String, style: Object, autoDestroy: f_, phrases: Object, root: Object, extensions: Array, selection: Object }, fdt = { modelValue: { type: String, default: "" } }, ddt = Object.assign(Object.assign({}, cdt), fdt);
  102884. (function(t) {
  102885. t.Change = "change", t.Update = "update", t.Focus = "focus", t.Blur = "blur", t.Ready = "ready", t.ModelUpdate = "update:modelValue";
  102886. })(jr || (jr = {}));
  102887. var Ac = {};
  102888. Ac[jr.Change] = function(t, e) {
  102889. return !0;
  102890. }, Ac[jr.Update] = function(t) {
  102891. return !0;
  102892. }, Ac[jr.Focus] = function(t) {
  102893. return !0;
  102894. }, Ac[jr.Blur] = function(t) {
  102895. return !0;
  102896. }, Ac[jr.Ready] = function(t) {
  102897. return !0;
  102898. };
  102899. var ile = {};
  102900. ile[jr.ModelUpdate] = Ac[jr.Change];
  102901. var hdt = Object.assign(Object.assign({}, Ac), ile), pdt = te({ name: "VueCodemirror", props: Object.assign({}, ddt), emits: Object.assign({}, hdt), setup: function(t, e) {
  102902. var n = ae(), r = ae(), i = ae(), a = Object.assign(Object.assign({}, sdt), Ge(ldt, {})), o = L(function() {
  102903. var s = {};
  102904. return Object.keys(qo(t)).forEach(function(l) {
  102905. var u;
  102906. l !== "modelValue" && (s[l] = (u = t[l]) !== null && u !== void 0 ? u : a[l]);
  102907. }), s;
  102908. });
  102909. return it(function() {
  102910. var s;
  102911. r.value = udt({ doc: t.modelValue, selection: o.value.selection, extensions: (s = a.extensions) !== null && s !== void 0 ? s : [], onFocus: function(u) {
  102912. return e.emit(jr.Focus, u);
  102913. }, onBlur: function(u) {
  102914. return e.emit(jr.Blur, u);
  102915. }, onUpdate: function(u) {
  102916. return e.emit(jr.Update, u);
  102917. }, onChange: function(u, c) {
  102918. u !== t.modelValue && (e.emit(jr.Change, u, c), e.emit(jr.ModelUpdate, u, c));
  102919. } }), i.value = function(u) {
  102920. return new De(Object.assign({}, u));
  102921. }({ state: r.value, parent: n.value, root: o.value.root });
  102922. var l = function(u) {
  102923. var c = function() {
  102924. return u.state.doc.toString();
  102925. }, f = kd(u).run, d = nG(u, [De.editable.of(!1), At.readOnly.of(!0)]), h = nG(u, oy.of([Oct])), p = kd(u).run, v = kd(u).run, g = kd(u).run, m = kd(u).run;
  102926. return { focus: function() {
  102927. return u.focus();
  102928. }, getDoc: c, setDoc: function(y) {
  102929. y !== c() && u.dispatch({ changes: { from: 0, to: u.state.doc.length, insert: y } });
  102930. }, reExtensions: f, toggleDisabled: d, toggleIndentWithTab: h, setTabSize: function(y) {
  102931. p([At.tabSize.of(y), ly.of(" ".repeat(y))]);
  102932. }, setPhrases: function(y) {
  102933. v([At.phrases.of(y)]);
  102934. }, setPlaceholder: function(y) {
  102935. g(Mst(y));
  102936. }, setStyle: function(y) {
  102937. y === void 0 && (y = {}), m(De.theme({ "&": Object.assign({}, y) }));
  102938. } };
  102939. }(i.value);
  102940. se(function() {
  102941. return t.modelValue;
  102942. }, function(u) {
  102943. u !== l.getDoc() && l.setDoc(u);
  102944. }), se(function() {
  102945. return t.extensions;
  102946. }, function(u) {
  102947. return l.reExtensions(u || []);
  102948. }, { immediate: !0 }), se(function() {
  102949. return o.value.disabled;
  102950. }, function(u) {
  102951. return l.toggleDisabled(u);
  102952. }, { immediate: !0 }), se(function() {
  102953. return o.value.indentWithTab;
  102954. }, function(u) {
  102955. return l.toggleIndentWithTab(u);
  102956. }, { immediate: !0 }), se(function() {
  102957. return o.value.tabSize;
  102958. }, function(u) {
  102959. return l.setTabSize(u);
  102960. }, { immediate: !0 }), se(function() {
  102961. return o.value.phrases;
  102962. }, function(u) {
  102963. return l.setPhrases(u || {});
  102964. }, { immediate: !0 }), se(function() {
  102965. return o.value.placeholder;
  102966. }, function(u) {
  102967. return l.setPlaceholder(u);
  102968. }, { immediate: !0 }), se(function() {
  102969. return o.value.style;
  102970. }, function(u) {
  102971. return l.setStyle(u);
  102972. }, { immediate: !0 }), o.value.autofocus && l.focus(), e.emit(jr.Ready, { state: r.value, view: i.value, container: n.value });
  102973. }), yt(function() {
  102974. o.value.autoDestroy && i.value && function(s) {
  102975. s.destroy();
  102976. }(i.value);
  102977. }), function() {
  102978. return jg("div", { class: "v-codemirror", style: { display: "contents" }, ref: n });
  102979. };
  102980. } }), vdt = pdt;
  102981. const gdt = "#e5c07b", rG = "#e06c75", mdt = "#56b6c2", ydt = "#ffffff", f1 = "#abb2bf", XM = "#7d8799", bdt = "#61afef", _dt = "#98c379", iG = "#d19a66", Odt = "#c678dd", Sdt = "#21252b", aG = "#2c313a", oG = "#282c34", N$ = "#353a42", xdt = "#3E4451", sG = "#528bff", wdt = /* @__PURE__ */ De.theme({
  102982. "&": {
  102983. color: f1,
  102984. backgroundColor: oG
  102985. },
  102986. ".cm-content": {
  102987. caretColor: sG
  102988. },
  102989. ".cm-cursor, .cm-dropCursor": { borderLeftColor: sG },
  102990. "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: xdt },
  102991. ".cm-panels": { backgroundColor: Sdt, color: f1 },
  102992. ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
  102993. ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
  102994. ".cm-searchMatch": {
  102995. backgroundColor: "#72a1ff59",
  102996. outline: "1px solid #457dff"
  102997. },
  102998. ".cm-searchMatch.cm-searchMatch-selected": {
  102999. backgroundColor: "#6199ff2f"
  103000. },
  103001. ".cm-activeLine": { backgroundColor: "#6699ff0b" },
  103002. ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
  103003. "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
  103004. backgroundColor: "#bad0f847"
  103005. },
  103006. ".cm-gutters": {
  103007. backgroundColor: oG,
  103008. color: XM,
  103009. border: "none"
  103010. },
  103011. ".cm-activeLineGutter": {
  103012. backgroundColor: aG
  103013. },
  103014. ".cm-foldPlaceholder": {
  103015. backgroundColor: "transparent",
  103016. border: "none",
  103017. color: "#ddd"
  103018. },
  103019. ".cm-tooltip": {
  103020. border: "none",
  103021. backgroundColor: N$
  103022. },
  103023. ".cm-tooltip .cm-tooltip-arrow:before": {
  103024. borderTopColor: "transparent",
  103025. borderBottomColor: "transparent"
  103026. },
  103027. ".cm-tooltip .cm-tooltip-arrow:after": {
  103028. borderTopColor: N$,
  103029. borderBottomColor: N$
  103030. },
  103031. ".cm-tooltip-autocomplete": {
  103032. "& > ul > li[aria-selected]": {
  103033. backgroundColor: aG,
  103034. color: f1
  103035. }
  103036. }
  103037. }, { dark: !0 }), Cdt = /* @__PURE__ */ cy.define([
  103038. {
  103039. tag: J.keyword,
  103040. color: Odt
  103041. },
  103042. {
  103043. tag: [J.name, J.deleted, J.character, J.propertyName, J.macroName],
  103044. color: rG
  103045. },
  103046. {
  103047. tag: [/* @__PURE__ */ J.function(J.variableName), J.labelName],
  103048. color: bdt
  103049. },
  103050. {
  103051. tag: [J.color, /* @__PURE__ */ J.constant(J.name), /* @__PURE__ */ J.standard(J.name)],
  103052. color: iG
  103053. },
  103054. {
  103055. tag: [/* @__PURE__ */ J.definition(J.name), J.separator],
  103056. color: f1
  103057. },
  103058. {
  103059. tag: [J.typeName, J.className, J.number, J.changed, J.annotation, J.modifier, J.self, J.namespace],
  103060. color: gdt
  103061. },
  103062. {
  103063. tag: [J.operator, J.operatorKeyword, J.url, J.escape, J.regexp, J.link, /* @__PURE__ */ J.special(J.string)],
  103064. color: mdt
  103065. },
  103066. {
  103067. tag: [J.meta, J.comment],
  103068. color: XM
  103069. },
  103070. {
  103071. tag: J.strong,
  103072. fontWeight: "bold"
  103073. },
  103074. {
  103075. tag: J.emphasis,
  103076. fontStyle: "italic"
  103077. },
  103078. {
  103079. tag: J.strikethrough,
  103080. textDecoration: "line-through"
  103081. },
  103082. {
  103083. tag: J.link,
  103084. color: XM,
  103085. textDecoration: "underline"
  103086. },
  103087. {
  103088. tag: J.heading,
  103089. fontWeight: "bold",
  103090. color: rG
  103091. },
  103092. {
  103093. tag: [J.atom, J.bool, /* @__PURE__ */ J.special(J.variableName)],
  103094. color: iG
  103095. },
  103096. {
  103097. tag: [J.processingInstruction, J.string, J.inserted],
  103098. color: _dt
  103099. },
  103100. {
  103101. tag: J.invalid,
  103102. color: ydt
  103103. }
  103104. ]), Tdt = [wdt, /* @__PURE__ */ Xoe(Cdt)];
  103105. class xS {
  103106. /**
  103107. @internal
  103108. */
  103109. constructor(e, n, r, i, a, o, s, l, u, c = 0, f) {
  103110. this.p = e, this.stack = n, this.state = r, this.reducePos = i, this.pos = a, this.score = o, this.buffer = s, this.bufferBase = l, this.curContext = u, this.lookAhead = c, this.parent = f;
  103111. }
  103112. /**
  103113. @internal
  103114. */
  103115. toString() {
  103116. return `[${this.stack.filter((e, n) => n % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
  103117. }
  103118. // Start an empty stack
  103119. /**
  103120. @internal
  103121. */
  103122. static start(e, n, r = 0) {
  103123. let i = e.parser.context;
  103124. return new xS(e, [], n, r, r, 0, [], 0, i ? new lG(i, i.start) : null, 0, null);
  103125. }
  103126. /**
  103127. The stack's current [context](#lr.ContextTracker) value, if
  103128. any. Its type will depend on the context tracker's type
  103129. parameter, or it will be `null` if there is no context
  103130. tracker.
  103131. */
  103132. get context() {
  103133. return this.curContext ? this.curContext.context : null;
  103134. }
  103135. // Push a state onto the stack, tracking its start position as well
  103136. // as the buffer base at that point.
  103137. /**
  103138. @internal
  103139. */
  103140. pushState(e, n) {
  103141. this.stack.push(this.state, n, this.bufferBase + this.buffer.length), this.state = e;
  103142. }
  103143. // Apply a reduce action
  103144. /**
  103145. @internal
  103146. */
  103147. reduce(e) {
  103148. var n;
  103149. let r = e >> 19, i = e & 65535, { parser: a } = this.p;
  103150. this.reducePos < this.pos - 25 && this.setLookAhead(this.pos);
  103151. let o = a.dynamicPrecedence(i);
  103152. if (o && (this.score += o), r == 0) {
  103153. this.pushState(a.getGoto(this.state, i, !0), this.reducePos), i < a.minRepeatTerm && this.storeNode(i, this.reducePos, this.reducePos, 4, !0), this.reduceContext(i, this.reducePos);
  103154. return;
  103155. }
  103156. let s = this.stack.length - (r - 1) * 3 - (e & 262144 ? 6 : 0), l = s ? this.stack[s - 2] : this.p.ranges[0].from, u = this.reducePos - l;
  103157. u >= 2e3 && !(!((n = this.p.parser.nodeSet.types[i]) === null || n === void 0) && n.isAnonymous) && (l == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = l, this.p.lastBigReductionSize = u));
  103158. let c = s ? this.stack[s - 1] : 0, f = this.bufferBase + this.buffer.length - c;
  103159. if (i < a.minRepeatTerm || e & 131072) {
  103160. let d = a.stateFlag(
  103161. this.state,
  103162. 1
  103163. /* StateFlag.Skipped */
  103164. ) ? this.pos : this.reducePos;
  103165. this.storeNode(i, l, d, f + 4, !0);
  103166. }
  103167. if (e & 262144)
  103168. this.state = this.stack[s];
  103169. else {
  103170. let d = this.stack[s - 3];
  103171. this.state = a.getGoto(d, i, !0);
  103172. }
  103173. for (; this.stack.length > s; )
  103174. this.stack.pop();
  103175. this.reduceContext(i, l);
  103176. }
  103177. // Shift a value into the buffer
  103178. /**
  103179. @internal
  103180. */
  103181. storeNode(e, n, r, i = 4, a = !1) {
  103182. if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
  103183. let o = this, s = this.buffer.length;
  103184. if (s == 0 && o.parent && (s = o.bufferBase - o.parent.bufferBase, o = o.parent), s > 0 && o.buffer[s - 4] == 0 && o.buffer[s - 1] > -1) {
  103185. if (n == r)
  103186. return;
  103187. if (o.buffer[s - 2] >= n) {
  103188. o.buffer[s - 2] = r;
  103189. return;
  103190. }
  103191. }
  103192. }
  103193. if (!a || this.pos == r)
  103194. this.buffer.push(e, n, r, i);
  103195. else {
  103196. let o = this.buffer.length;
  103197. if (o > 0 && this.buffer[o - 4] != 0)
  103198. for (; o > 0 && this.buffer[o - 2] > r; )
  103199. this.buffer[o] = this.buffer[o - 4], this.buffer[o + 1] = this.buffer[o - 3], this.buffer[o + 2] = this.buffer[o - 2], this.buffer[o + 3] = this.buffer[o - 1], o -= 4, i > 4 && (i -= 4);
  103200. this.buffer[o] = e, this.buffer[o + 1] = n, this.buffer[o + 2] = r, this.buffer[o + 3] = i;
  103201. }
  103202. }
  103203. // Apply a shift action
  103204. /**
  103205. @internal
  103206. */
  103207. shift(e, n, r, i) {
  103208. if (e & 131072)
  103209. this.pushState(e & 65535, this.pos);
  103210. else if (e & 262144)
  103211. this.pos = i, this.shiftContext(n, r), n <= this.p.parser.maxNode && this.buffer.push(n, r, i, 4);
  103212. else {
  103213. let a = e, { parser: o } = this.p;
  103214. (i > this.pos || n <= o.maxNode) && (this.pos = i, o.stateFlag(
  103215. a,
  103216. 1
  103217. /* StateFlag.Skipped */
  103218. ) || (this.reducePos = i)), this.pushState(a, r), this.shiftContext(n, r), n <= o.maxNode && this.buffer.push(n, r, i, 4);
  103219. }
  103220. }
  103221. // Apply an action
  103222. /**
  103223. @internal
  103224. */
  103225. apply(e, n, r, i) {
  103226. e & 65536 ? this.reduce(e) : this.shift(e, n, r, i);
  103227. }
  103228. // Add a prebuilt (reused) node into the buffer.
  103229. /**
  103230. @internal
  103231. */
  103232. useNode(e, n) {
  103233. let r = this.p.reused.length - 1;
  103234. (r < 0 || this.p.reused[r] != e) && (this.p.reused.push(e), r++);
  103235. let i = this.pos;
  103236. this.reducePos = this.pos = i + e.length, this.pushState(n, i), this.buffer.push(
  103237. r,
  103238. i,
  103239. this.reducePos,
  103240. -1
  103241. /* size == -1 means this is a reused value */
  103242. ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
  103243. }
  103244. // Split the stack. Due to the buffer sharing and the fact
  103245. // that `this.stack` tends to stay quite shallow, this isn't very
  103246. // expensive.
  103247. /**
  103248. @internal
  103249. */
  103250. split() {
  103251. let e = this, n = e.buffer.length;
  103252. for (; n > 0 && e.buffer[n - 2] > e.reducePos; )
  103253. n -= 4;
  103254. let r = e.buffer.slice(n), i = e.bufferBase + n;
  103255. for (; e && i == e.bufferBase; )
  103256. e = e.parent;
  103257. return new xS(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r, i, this.curContext, this.lookAhead, e);
  103258. }
  103259. // Try to recover from an error by 'deleting' (ignoring) one token.
  103260. /**
  103261. @internal
  103262. */
  103263. recoverByDelete(e, n) {
  103264. let r = e <= this.p.parser.maxNode;
  103265. r && this.storeNode(e, this.pos, n, 4), this.storeNode(0, this.pos, n, r ? 8 : 4), this.pos = this.reducePos = n, this.score -= 190;
  103266. }
  103267. /**
  103268. Check if the given term would be able to be shifted (optionally
  103269. after some reductions) on this stack. This can be useful for
  103270. external tokenizers that want to make sure they only provide a
  103271. given token when it applies.
  103272. */
  103273. canShift(e) {
  103274. for (let n = new Pdt(this); ; ) {
  103275. let r = this.p.parser.stateSlot(
  103276. n.state,
  103277. 4
  103278. /* ParseState.DefaultReduce */
  103279. ) || this.p.parser.hasAction(n.state, e);
  103280. if (r == 0)
  103281. return !1;
  103282. if (!(r & 65536))
  103283. return !0;
  103284. n.reduce(r);
  103285. }
  103286. }
  103287. // Apply up to Recover.MaxNext recovery actions that conceptually
  103288. // inserts some missing token or rule.
  103289. /**
  103290. @internal
  103291. */
  103292. recoverByInsert(e) {
  103293. if (this.stack.length >= 300)
  103294. return [];
  103295. let n = this.p.parser.nextStates(this.state);
  103296. if (n.length > 8 || this.stack.length >= 120) {
  103297. let i = [];
  103298. for (let a = 0, o; a < n.length; a += 2)
  103299. (o = n[a + 1]) != this.state && this.p.parser.hasAction(o, e) && i.push(n[a], o);
  103300. if (this.stack.length < 120)
  103301. for (let a = 0; i.length < 8 && a < n.length; a += 2) {
  103302. let o = n[a + 1];
  103303. i.some((s, l) => l & 1 && s == o) || i.push(n[a], o);
  103304. }
  103305. n = i;
  103306. }
  103307. let r = [];
  103308. for (let i = 0; i < n.length && r.length < 4; i += 2) {
  103309. let a = n[i + 1];
  103310. if (a == this.state)
  103311. continue;
  103312. let o = this.split();
  103313. o.pushState(a, this.pos), o.storeNode(0, o.pos, o.pos, 4, !0), o.shiftContext(n[i], this.pos), o.reducePos = this.pos, o.score -= 200, r.push(o);
  103314. }
  103315. return r;
  103316. }
  103317. // Force a reduce, if possible. Return false if that can't
  103318. // be done.
  103319. /**
  103320. @internal
  103321. */
  103322. forceReduce() {
  103323. let { parser: e } = this.p, n = e.stateSlot(
  103324. this.state,
  103325. 5
  103326. /* ParseState.ForcedReduce */
  103327. );
  103328. if (!(n & 65536))
  103329. return !1;
  103330. if (!e.validAction(this.state, n)) {
  103331. let r = n >> 19, i = n & 65535, a = this.stack.length - r * 3;
  103332. if (a < 0 || e.getGoto(this.stack[a], i, !1) < 0) {
  103333. let o = this.findForcedReduction();
  103334. if (o == null)
  103335. return !1;
  103336. n = o;
  103337. }
  103338. this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
  103339. }
  103340. return this.reducePos = this.pos, this.reduce(n), !0;
  103341. }
  103342. /**
  103343. Try to scan through the automaton to find some kind of reduction
  103344. that can be applied. Used when the regular ForcedReduce field
  103345. isn't a valid action. @internal
  103346. */
  103347. findForcedReduction() {
  103348. let { parser: e } = this.p, n = [], r = (i, a) => {
  103349. if (!n.includes(i))
  103350. return n.push(i), e.allActions(i, (o) => {
  103351. if (!(o & 393216)) if (o & 65536) {
  103352. let s = (o >> 19) - a;
  103353. if (s > 1) {
  103354. let l = o & 65535, u = this.stack.length - s * 3;
  103355. if (u >= 0 && e.getGoto(this.stack[u], l, !1) >= 0)
  103356. return s << 19 | 65536 | l;
  103357. }
  103358. } else {
  103359. let s = r(o, a + 1);
  103360. if (s != null)
  103361. return s;
  103362. }
  103363. });
  103364. };
  103365. return r(this.state, 0);
  103366. }
  103367. /**
  103368. @internal
  103369. */
  103370. forceAll() {
  103371. for (; !this.p.parser.stateFlag(
  103372. this.state,
  103373. 2
  103374. /* StateFlag.Accepting */
  103375. ); )
  103376. if (!this.forceReduce()) {
  103377. this.storeNode(0, this.pos, this.pos, 4, !0);
  103378. break;
  103379. }
  103380. return this;
  103381. }
  103382. /**
  103383. Check whether this state has no further actions (assumed to be a direct descendant of the
  103384. top state, since any other states must be able to continue
  103385. somehow). @internal
  103386. */
  103387. get deadEnd() {
  103388. if (this.stack.length != 3)
  103389. return !1;
  103390. let { parser: e } = this.p;
  103391. return e.data[e.stateSlot(
  103392. this.state,
  103393. 1
  103394. /* ParseState.Actions */
  103395. )] == 65535 && !e.stateSlot(
  103396. this.state,
  103397. 4
  103398. /* ParseState.DefaultReduce */
  103399. );
  103400. }
  103401. /**
  103402. Restart the stack (put it back in its start state). Only safe
  103403. when this.stack.length == 3 (state is directly below the top
  103404. state). @internal
  103405. */
  103406. restart() {
  103407. this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
  103408. }
  103409. /**
  103410. @internal
  103411. */
  103412. sameState(e) {
  103413. if (this.state != e.state || this.stack.length != e.stack.length)
  103414. return !1;
  103415. for (let n = 0; n < this.stack.length; n += 3)
  103416. if (this.stack[n] != e.stack[n])
  103417. return !1;
  103418. return !0;
  103419. }
  103420. /**
  103421. Get the parser used by this stack.
  103422. */
  103423. get parser() {
  103424. return this.p.parser;
  103425. }
  103426. /**
  103427. Test whether a given dialect (by numeric ID, as exported from
  103428. the terms file) is enabled.
  103429. */
  103430. dialectEnabled(e) {
  103431. return this.p.parser.dialect.flags[e];
  103432. }
  103433. shiftContext(e, n) {
  103434. this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(n)));
  103435. }
  103436. reduceContext(e, n) {
  103437. this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(n)));
  103438. }
  103439. /**
  103440. @internal
  103441. */
  103442. emitContext() {
  103443. let e = this.buffer.length - 1;
  103444. (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
  103445. }
  103446. /**
  103447. @internal
  103448. */
  103449. emitLookAhead() {
  103450. let e = this.buffer.length - 1;
  103451. (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
  103452. }
  103453. updateContext(e) {
  103454. if (e != this.curContext.context) {
  103455. let n = new lG(this.curContext.tracker, e);
  103456. n.hash != this.curContext.hash && this.emitContext(), this.curContext = n;
  103457. }
  103458. }
  103459. /**
  103460. @internal
  103461. */
  103462. setLookAhead(e) {
  103463. e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
  103464. }
  103465. /**
  103466. @internal
  103467. */
  103468. close() {
  103469. this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
  103470. }
  103471. }
  103472. class lG {
  103473. constructor(e, n) {
  103474. this.tracker = e, this.context = n, this.hash = e.strict ? e.hash(n) : 0;
  103475. }
  103476. }
  103477. class Pdt {
  103478. constructor(e) {
  103479. this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
  103480. }
  103481. reduce(e) {
  103482. let n = e & 65535, r = e >> 19;
  103483. r == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (r - 1) * 3;
  103484. let i = this.start.p.parser.getGoto(this.stack[this.base - 3], n, !0);
  103485. this.state = i;
  103486. }
  103487. }
  103488. class wS {
  103489. constructor(e, n, r) {
  103490. this.stack = e, this.pos = n, this.index = r, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
  103491. }
  103492. static create(e, n = e.bufferBase + e.buffer.length) {
  103493. return new wS(e, n, n - e.bufferBase);
  103494. }
  103495. maybeNext() {
  103496. let e = this.stack.parent;
  103497. e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
  103498. }
  103499. get id() {
  103500. return this.buffer[this.index - 4];
  103501. }
  103502. get start() {
  103503. return this.buffer[this.index - 3];
  103504. }
  103505. get end() {
  103506. return this.buffer[this.index - 2];
  103507. }
  103508. get size() {
  103509. return this.buffer[this.index - 1];
  103510. }
  103511. next() {
  103512. this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
  103513. }
  103514. fork() {
  103515. return new wS(this.stack, this.pos, this.index);
  103516. }
  103517. }
  103518. function ig(t, e = Uint16Array) {
  103519. if (typeof t != "string")
  103520. return t;
  103521. let n = null;
  103522. for (let r = 0, i = 0; r < t.length; ) {
  103523. let a = 0;
  103524. for (; ; ) {
  103525. let o = t.charCodeAt(r++), s = !1;
  103526. if (o == 126) {
  103527. a = 65535;
  103528. break;
  103529. }
  103530. o >= 92 && o--, o >= 34 && o--;
  103531. let l = o - 32;
  103532. if (l >= 46 && (l -= 46, s = !0), a += l, s)
  103533. break;
  103534. a *= 46;
  103535. }
  103536. n ? n[i++] = a : n = new e(a);
  103537. }
  103538. return n;
  103539. }
  103540. class d1 {
  103541. constructor() {
  103542. this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
  103543. }
  103544. }
  103545. const uG = new d1();
  103546. class $dt {
  103547. /**
  103548. @internal
  103549. */
  103550. constructor(e, n) {
  103551. this.input = e, this.ranges = n, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = uG, this.rangeIndex = 0, this.pos = this.chunkPos = n[0].from, this.range = n[0], this.end = n[n.length - 1].to, this.readNext();
  103552. }
  103553. /**
  103554. @internal
  103555. */
  103556. resolveOffset(e, n) {
  103557. let r = this.range, i = this.rangeIndex, a = this.pos + e;
  103558. for (; a < r.from; ) {
  103559. if (!i)
  103560. return null;
  103561. let o = this.ranges[--i];
  103562. a -= r.from - o.to, r = o;
  103563. }
  103564. for (; n < 0 ? a > r.to : a >= r.to; ) {
  103565. if (i == this.ranges.length - 1)
  103566. return null;
  103567. let o = this.ranges[++i];
  103568. a += o.from - r.to, r = o;
  103569. }
  103570. return a;
  103571. }
  103572. /**
  103573. @internal
  103574. */
  103575. clipPos(e) {
  103576. if (e >= this.range.from && e < this.range.to)
  103577. return e;
  103578. for (let n of this.ranges)
  103579. if (n.to > e)
  103580. return Math.max(e, n.from);
  103581. return this.end;
  103582. }
  103583. /**
  103584. Look at a code unit near the stream position. `.peek(0)` equals
  103585. `.next`, `.peek(-1)` gives you the previous character, and so
  103586. on.
  103587. Note that looking around during tokenizing creates dependencies
  103588. on potentially far-away content, which may reduce the
  103589. effectiveness incremental parsing—when looking forward—or even
  103590. cause invalid reparses when looking backward more than 25 code
  103591. units, since the library does not track lookbehind.
  103592. */
  103593. peek(e) {
  103594. let n = this.chunkOff + e, r, i;
  103595. if (n >= 0 && n < this.chunk.length)
  103596. r = this.pos + e, i = this.chunk.charCodeAt(n);
  103597. else {
  103598. let a = this.resolveOffset(e, 1);
  103599. if (a == null)
  103600. return -1;
  103601. if (r = a, r >= this.chunk2Pos && r < this.chunk2Pos + this.chunk2.length)
  103602. i = this.chunk2.charCodeAt(r - this.chunk2Pos);
  103603. else {
  103604. let o = this.rangeIndex, s = this.range;
  103605. for (; s.to <= r; )
  103606. s = this.ranges[++o];
  103607. this.chunk2 = this.input.chunk(this.chunk2Pos = r), r + this.chunk2.length > s.to && (this.chunk2 = this.chunk2.slice(0, s.to - r)), i = this.chunk2.charCodeAt(0);
  103608. }
  103609. }
  103610. return r >= this.token.lookAhead && (this.token.lookAhead = r + 1), i;
  103611. }
  103612. /**
  103613. Accept a token. By default, the end of the token is set to the
  103614. current stream position, but you can pass an offset (relative to
  103615. the stream position) to change that.
  103616. */
  103617. acceptToken(e, n = 0) {
  103618. let r = n ? this.resolveOffset(n, -1) : this.pos;
  103619. if (r == null || r < this.token.start)
  103620. throw new RangeError("Token end out of bounds");
  103621. this.token.value = e, this.token.end = r;
  103622. }
  103623. /**
  103624. Accept a token ending at a specific given position.
  103625. */
  103626. acceptTokenTo(e, n) {
  103627. this.token.value = e, this.token.end = n;
  103628. }
  103629. getChunk() {
  103630. if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
  103631. let { chunk: e, chunkPos: n } = this;
  103632. this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = n, this.chunkOff = this.pos - this.chunkPos;
  103633. } else {
  103634. this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
  103635. let e = this.input.chunk(this.pos), n = this.pos + e.length;
  103636. this.chunk = n > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
  103637. }
  103638. }
  103639. readNext() {
  103640. return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
  103641. }
  103642. /**
  103643. Move the stream forward N (defaults to 1) code units. Returns
  103644. the new value of [`next`](#lr.InputStream.next).
  103645. */
  103646. advance(e = 1) {
  103647. for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
  103648. if (this.rangeIndex == this.ranges.length - 1)
  103649. return this.setDone();
  103650. e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
  103651. }
  103652. return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
  103653. }
  103654. setDone() {
  103655. return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
  103656. }
  103657. /**
  103658. @internal
  103659. */
  103660. reset(e, n) {
  103661. if (n ? (this.token = n, n.start = e, n.lookAhead = e + 1, n.value = n.extended = -1) : this.token = uG, this.pos != e) {
  103662. if (this.pos = e, e == this.end)
  103663. return this.setDone(), this;
  103664. for (; e < this.range.from; )
  103665. this.range = this.ranges[--this.rangeIndex];
  103666. for (; e >= this.range.to; )
  103667. this.range = this.ranges[++this.rangeIndex];
  103668. e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
  103669. }
  103670. return this;
  103671. }
  103672. /**
  103673. @internal
  103674. */
  103675. read(e, n) {
  103676. if (e >= this.chunkPos && n <= this.chunkPos + this.chunk.length)
  103677. return this.chunk.slice(e - this.chunkPos, n - this.chunkPos);
  103678. if (e >= this.chunk2Pos && n <= this.chunk2Pos + this.chunk2.length)
  103679. return this.chunk2.slice(e - this.chunk2Pos, n - this.chunk2Pos);
  103680. if (e >= this.range.from && n <= this.range.to)
  103681. return this.input.read(e, n);
  103682. let r = "";
  103683. for (let i of this.ranges) {
  103684. if (i.from >= n)
  103685. break;
  103686. i.to > e && (r += this.input.read(Math.max(i.from, e), Math.min(i.to, n)));
  103687. }
  103688. return r;
  103689. }
  103690. }
  103691. class dh {
  103692. constructor(e, n) {
  103693. this.data = e, this.id = n;
  103694. }
  103695. token(e, n) {
  103696. let { parser: r } = n.p;
  103697. ale(this.data, e, n, this.id, r.data, r.tokenPrecTable);
  103698. }
  103699. }
  103700. dh.prototype.contextual = dh.prototype.fallback = dh.prototype.extend = !1;
  103701. class YM {
  103702. constructor(e, n, r) {
  103703. this.precTable = n, this.elseToken = r, this.data = typeof e == "string" ? ig(e) : e;
  103704. }
  103705. token(e, n) {
  103706. let r = e.pos, i = 0;
  103707. for (; ; ) {
  103708. let a = e.next < 0, o = e.resolveOffset(1, 1);
  103709. if (ale(this.data, e, n, 0, this.data, this.precTable), e.token.value > -1)
  103710. break;
  103711. if (this.elseToken == null)
  103712. return;
  103713. if (a || i++, o == null)
  103714. break;
  103715. e.reset(o, e.token);
  103716. }
  103717. i && (e.reset(r, e.token), e.acceptToken(this.elseToken, i));
  103718. }
  103719. }
  103720. YM.prototype.contextual = dh.prototype.fallback = dh.prototype.extend = !1;
  103721. class Ww {
  103722. /**
  103723. Create a tokenizer. The first argument is the function that,
  103724. given an input stream, scans for the types of tokens it
  103725. recognizes at the stream's position, and calls
  103726. [`acceptToken`](#lr.InputStream.acceptToken) when it finds
  103727. one.
  103728. */
  103729. constructor(e, n = {}) {
  103730. this.token = e, this.contextual = !!n.contextual, this.fallback = !!n.fallback, this.extend = !!n.extend;
  103731. }
  103732. }
  103733. function ale(t, e, n, r, i, a) {
  103734. let o = 0, s = 1 << r, { dialect: l } = n.p.parser;
  103735. e: for (; s & t[o]; ) {
  103736. let u = t[o + 1];
  103737. for (let h = o + 3; h < u; h += 2)
  103738. if ((t[h + 1] & s) > 0) {
  103739. let p = t[h];
  103740. if (l.allows(p) && (e.token.value == -1 || e.token.value == p || Adt(p, e.token.value, i, a))) {
  103741. e.acceptToken(p);
  103742. break;
  103743. }
  103744. }
  103745. let c = e.next, f = 0, d = t[o + 2];
  103746. if (e.next < 0 && d > f && t[u + d * 3 - 3] == 65535) {
  103747. o = t[u + d * 3 - 1];
  103748. continue e;
  103749. }
  103750. for (; f < d; ) {
  103751. let h = f + d >> 1, p = u + h + (h << 1), v = t[p], g = t[p + 1] || 65536;
  103752. if (c < v)
  103753. d = h;
  103754. else if (c >= g)
  103755. f = h + 1;
  103756. else {
  103757. o = t[p + 2], e.advance();
  103758. continue e;
  103759. }
  103760. }
  103761. break;
  103762. }
  103763. }
  103764. function cG(t, e, n) {
  103765. for (let r = e, i; (i = t[r]) != 65535; r++)
  103766. if (i == n)
  103767. return r - e;
  103768. return -1;
  103769. }
  103770. function Adt(t, e, n, r) {
  103771. let i = cG(n, r, e);
  103772. return i < 0 || cG(n, r, t) < i;
  103773. }
  103774. const Ei = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
  103775. let B$ = null;
  103776. function fG(t, e, n) {
  103777. let r = t.cursor(Zn.IncludeAnonymous);
  103778. for (r.moveTo(e); ; )
  103779. if (!(n < 0 ? r.childBefore(e) : r.childAfter(e)))
  103780. for (; ; ) {
  103781. if ((n < 0 ? r.to < e : r.from > e) && !r.type.isError)
  103782. return n < 0 ? Math.max(0, Math.min(
  103783. r.to - 1,
  103784. e - 25
  103785. /* Lookahead.Margin */
  103786. )) : Math.min(t.length, Math.max(
  103787. r.from + 1,
  103788. e + 25
  103789. /* Lookahead.Margin */
  103790. ));
  103791. if (n < 0 ? r.prevSibling() : r.nextSibling())
  103792. break;
  103793. if (!r.parent())
  103794. return n < 0 ? 0 : t.length;
  103795. }
  103796. }
  103797. class Edt {
  103798. constructor(e, n) {
  103799. this.fragments = e, this.nodeSet = n, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
  103800. }
  103801. nextFragment() {
  103802. let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
  103803. if (e) {
  103804. for (this.safeFrom = e.openStart ? fG(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? fG(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
  103805. this.trees.pop(), this.start.pop(), this.index.pop();
  103806. this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
  103807. } else
  103808. this.nextStart = 1e9;
  103809. }
  103810. // `pos` must be >= any previously given `pos` for this cursor
  103811. nodeAt(e) {
  103812. if (e < this.nextStart)
  103813. return null;
  103814. for (; this.fragment && this.safeTo <= e; )
  103815. this.nextFragment();
  103816. if (!this.fragment)
  103817. return null;
  103818. for (; ; ) {
  103819. let n = this.trees.length - 1;
  103820. if (n < 0)
  103821. return this.nextFragment(), null;
  103822. let r = this.trees[n], i = this.index[n];
  103823. if (i == r.children.length) {
  103824. this.trees.pop(), this.start.pop(), this.index.pop();
  103825. continue;
  103826. }
  103827. let a = r.children[i], o = this.start[n] + r.positions[i];
  103828. if (o > e)
  103829. return this.nextStart = o, null;
  103830. if (a instanceof Wn) {
  103831. if (o == e) {
  103832. if (o < this.safeFrom)
  103833. return null;
  103834. let s = o + a.length;
  103835. if (s <= this.safeTo) {
  103836. let l = a.prop(Pt.lookAhead);
  103837. if (!l || s + l < this.fragment.to)
  103838. return a;
  103839. }
  103840. }
  103841. this.index[n]++, o + a.length >= Math.max(this.safeFrom, e) && (this.trees.push(a), this.start.push(o), this.index.push(0));
  103842. } else
  103843. this.index[n]++, this.nextStart = o + a.length;
  103844. }
  103845. }
  103846. }
  103847. class Mdt {
  103848. constructor(e, n) {
  103849. this.stream = n, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((r) => new d1());
  103850. }
  103851. getActions(e) {
  103852. let n = 0, r = null, { parser: i } = e.p, { tokenizers: a } = i, o = i.stateSlot(
  103853. e.state,
  103854. 3
  103855. /* ParseState.TokenizerMask */
  103856. ), s = e.curContext ? e.curContext.hash : 0, l = 0;
  103857. for (let u = 0; u < a.length; u++) {
  103858. if (!(1 << u & o))
  103859. continue;
  103860. let c = a[u], f = this.tokens[u];
  103861. if (!(r && !c.fallback) && ((c.contextual || f.start != e.pos || f.mask != o || f.context != s) && (this.updateCachedToken(f, c, e), f.mask = o, f.context = s), f.lookAhead > f.end + 25 && (l = Math.max(f.lookAhead, l)), f.value != 0)) {
  103862. let d = n;
  103863. if (f.extended > -1 && (n = this.addActions(e, f.extended, f.end, n)), n = this.addActions(e, f.value, f.end, n), !c.extend && (r = f, n > d))
  103864. break;
  103865. }
  103866. }
  103867. for (; this.actions.length > n; )
  103868. this.actions.pop();
  103869. return l && e.setLookAhead(l), !r && e.pos == this.stream.end && (r = new d1(), r.value = e.p.parser.eofTerm, r.start = r.end = e.pos, n = this.addActions(e, r.value, r.end, n)), this.mainToken = r, this.actions;
  103870. }
  103871. getMainToken(e) {
  103872. if (this.mainToken)
  103873. return this.mainToken;
  103874. let n = new d1(), { pos: r, p: i } = e;
  103875. return n.start = r, n.end = Math.min(r + 1, i.stream.end), n.value = r == i.stream.end ? i.parser.eofTerm : 0, n;
  103876. }
  103877. updateCachedToken(e, n, r) {
  103878. let i = this.stream.clipPos(r.pos);
  103879. if (n.token(this.stream.reset(i, e), r), e.value > -1) {
  103880. let { parser: a } = r.p;
  103881. for (let o = 0; o < a.specialized.length; o++)
  103882. if (a.specialized[o] == e.value) {
  103883. let s = a.specializers[o](this.stream.read(e.start, e.end), r);
  103884. if (s >= 0 && r.p.parser.dialect.allows(s >> 1)) {
  103885. s & 1 ? e.extended = s >> 1 : e.value = s >> 1;
  103886. break;
  103887. }
  103888. }
  103889. } else
  103890. e.value = 0, e.end = this.stream.clipPos(i + 1);
  103891. }
  103892. putAction(e, n, r, i) {
  103893. for (let a = 0; a < i; a += 3)
  103894. if (this.actions[a] == e)
  103895. return i;
  103896. return this.actions[i++] = e, this.actions[i++] = n, this.actions[i++] = r, i;
  103897. }
  103898. addActions(e, n, r, i) {
  103899. let { state: a } = e, { parser: o } = e.p, { data: s } = o;
  103900. for (let l = 0; l < 2; l++)
  103901. for (let u = o.stateSlot(
  103902. a,
  103903. l ? 2 : 1
  103904. /* ParseState.Actions */
  103905. ); ; u += 3) {
  103906. if (s[u] == 65535)
  103907. if (s[u + 1] == 1)
  103908. u = xs(s, u + 2);
  103909. else {
  103910. i == 0 && s[u + 1] == 2 && (i = this.putAction(xs(s, u + 2), n, r, i));
  103911. break;
  103912. }
  103913. s[u] == n && (i = this.putAction(xs(s, u + 1), n, r, i));
  103914. }
  103915. return i;
  103916. }
  103917. }
  103918. class Idt {
  103919. constructor(e, n, r, i) {
  103920. this.parser = e, this.input = n, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new $dt(n, i), this.tokens = new Mdt(e, this.stream), this.topTerm = e.top[1];
  103921. let { from: a } = i[0];
  103922. this.stacks = [xS.start(this, e.top[0], a)], this.fragments = r.length && this.stream.end - a > e.bufferLength * 4 ? new Edt(r, e.nodeSet) : null;
  103923. }
  103924. get parsedPos() {
  103925. return this.minStackPos;
  103926. }
  103927. // Move the parser forward. This will process all parse stacks at
  103928. // `this.pos` and try to advance them to a further position. If no
  103929. // stack for such a position is found, it'll start error-recovery.
  103930. //
  103931. // When the parse is finished, this will return a syntax tree. When
  103932. // not, it returns `null`.
  103933. advance() {
  103934. let e = this.stacks, n = this.minStackPos, r = this.stacks = [], i, a;
  103935. if (this.bigReductionCount > 300 && e.length == 1) {
  103936. let [o] = e;
  103937. for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; )
  103938. ;
  103939. this.bigReductionCount = this.lastBigReductionSize = 0;
  103940. }
  103941. for (let o = 0; o < e.length; o++) {
  103942. let s = e[o];
  103943. for (; ; ) {
  103944. if (this.tokens.mainToken = null, s.pos > n)
  103945. r.push(s);
  103946. else {
  103947. if (this.advanceStack(s, r, e))
  103948. continue;
  103949. {
  103950. i || (i = [], a = []), i.push(s);
  103951. let l = this.tokens.getMainToken(s);
  103952. a.push(l.value, l.end);
  103953. }
  103954. }
  103955. break;
  103956. }
  103957. }
  103958. if (!r.length) {
  103959. let o = i && kdt(i);
  103960. if (o)
  103961. return Ei && console.log("Finish with " + this.stackID(o)), this.stackToTree(o);
  103962. if (this.parser.strict)
  103963. throw Ei && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + n);
  103964. this.recovering || (this.recovering = 5);
  103965. }
  103966. if (this.recovering && i) {
  103967. let o = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, a, r);
  103968. if (o)
  103969. return Ei && console.log("Force-finish " + this.stackID(o)), this.stackToTree(o.forceAll());
  103970. }
  103971. if (this.recovering) {
  103972. let o = this.recovering == 1 ? 1 : this.recovering * 3;
  103973. if (r.length > o)
  103974. for (r.sort((s, l) => l.score - s.score); r.length > o; )
  103975. r.pop();
  103976. r.some((s) => s.reducePos > n) && this.recovering--;
  103977. } else if (r.length > 1) {
  103978. e: for (let o = 0; o < r.length - 1; o++) {
  103979. let s = r[o];
  103980. for (let l = o + 1; l < r.length; l++) {
  103981. let u = r[l];
  103982. if (s.sameState(u) || s.buffer.length > 500 && u.buffer.length > 500)
  103983. if ((s.score - u.score || s.buffer.length - u.buffer.length) > 0)
  103984. r.splice(l--, 1);
  103985. else {
  103986. r.splice(o--, 1);
  103987. continue e;
  103988. }
  103989. }
  103990. }
  103991. r.length > 12 && r.splice(
  103992. 12,
  103993. r.length - 12
  103994. /* Rec.MaxStackCount */
  103995. );
  103996. }
  103997. this.minStackPos = r[0].pos;
  103998. for (let o = 1; o < r.length; o++)
  103999. r[o].pos < this.minStackPos && (this.minStackPos = r[o].pos);
  104000. return null;
  104001. }
  104002. stopAt(e) {
  104003. if (this.stoppedAt != null && this.stoppedAt < e)
  104004. throw new RangeError("Can't move stoppedAt forward");
  104005. this.stoppedAt = e;
  104006. }
  104007. // Returns an updated version of the given stack, or null if the
  104008. // stack can't advance normally. When `split` and `stacks` are
  104009. // given, stacks split off by ambiguous operations will be pushed to
  104010. // `split`, or added to `stacks` if they move `pos` forward.
  104011. advanceStack(e, n, r) {
  104012. let i = e.pos, { parser: a } = this, o = Ei ? this.stackID(e) + " -> " : "";
  104013. if (this.stoppedAt != null && i > this.stoppedAt)
  104014. return e.forceReduce() ? e : null;
  104015. if (this.fragments) {
  104016. let u = e.curContext && e.curContext.tracker.strict, c = u ? e.curContext.hash : 0;
  104017. for (let f = this.fragments.nodeAt(i); f; ) {
  104018. let d = this.parser.nodeSet.types[f.type.id] == f.type ? a.getGoto(e.state, f.type.id) : -1;
  104019. if (d > -1 && f.length && (!u || (f.prop(Pt.contextHash) || 0) == c))
  104020. return e.useNode(f, d), Ei && console.log(o + this.stackID(e) + ` (via reuse of ${a.getName(f.type.id)})`), !0;
  104021. if (!(f instanceof Wn) || f.children.length == 0 || f.positions[0] > 0)
  104022. break;
  104023. let h = f.children[0];
  104024. if (h instanceof Wn && f.positions[0] == 0)
  104025. f = h;
  104026. else
  104027. break;
  104028. }
  104029. }
  104030. let s = a.stateSlot(
  104031. e.state,
  104032. 4
  104033. /* ParseState.DefaultReduce */
  104034. );
  104035. if (s > 0)
  104036. return e.reduce(s), Ei && console.log(o + this.stackID(e) + ` (via always-reduce ${a.getName(
  104037. s & 65535
  104038. /* Action.ValueMask */
  104039. )})`), !0;
  104040. if (e.stack.length >= 8400)
  104041. for (; e.stack.length > 6e3 && e.forceReduce(); )
  104042. ;
  104043. let l = this.tokens.getActions(e);
  104044. for (let u = 0; u < l.length; ) {
  104045. let c = l[u++], f = l[u++], d = l[u++], h = u == l.length || !r, p = h ? e : e.split(), v = this.tokens.mainToken;
  104046. if (p.apply(c, f, v ? v.start : p.pos, d), Ei && console.log(o + this.stackID(p) + ` (via ${c & 65536 ? `reduce of ${a.getName(
  104047. c & 65535
  104048. /* Action.ValueMask */
  104049. )}` : "shift"} for ${a.getName(f)} @ ${i}${p == e ? "" : ", split"})`), h)
  104050. return !0;
  104051. p.pos > i ? n.push(p) : r.push(p);
  104052. }
  104053. return !1;
  104054. }
  104055. // Advance a given stack forward as far as it will go. Returns the
  104056. // (possibly updated) stack if it got stuck, or null if it moved
  104057. // forward and was given to `pushStackDedup`.
  104058. advanceFully(e, n) {
  104059. let r = e.pos;
  104060. for (; ; ) {
  104061. if (!this.advanceStack(e, null, null))
  104062. return !1;
  104063. if (e.pos > r)
  104064. return dG(e, n), !0;
  104065. }
  104066. }
  104067. runRecovery(e, n, r) {
  104068. let i = null, a = !1;
  104069. for (let o = 0; o < e.length; o++) {
  104070. let s = e[o], l = n[o << 1], u = n[(o << 1) + 1], c = Ei ? this.stackID(s) + " -> " : "";
  104071. if (s.deadEnd && (a || (a = !0, s.restart(), Ei && console.log(c + this.stackID(s) + " (restarted)"), this.advanceFully(s, r))))
  104072. continue;
  104073. let f = s.split(), d = c;
  104074. for (let h = 0; f.forceReduce() && h < 10 && (Ei && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, r)); h++)
  104075. Ei && (d = this.stackID(f) + " -> ");
  104076. for (let h of s.recoverByInsert(l))
  104077. Ei && console.log(c + this.stackID(h) + " (via recover-insert)"), this.advanceFully(h, r);
  104078. this.stream.end > s.pos ? (u == s.pos && (u++, l = 0), s.recoverByDelete(l, u), Ei && console.log(c + this.stackID(s) + ` (via recover-delete ${this.parser.getName(l)})`), dG(s, r)) : (!i || i.score < s.score) && (i = s);
  104079. }
  104080. return i;
  104081. }
  104082. // Convert the stack's buffer to a syntax tree.
  104083. stackToTree(e) {
  104084. return e.close(), Wn.build({
  104085. buffer: wS.create(e),
  104086. nodeSet: this.parser.nodeSet,
  104087. topID: this.topTerm,
  104088. maxBufferLength: this.parser.bufferLength,
  104089. reused: this.reused,
  104090. start: this.ranges[0].from,
  104091. length: e.pos - this.ranges[0].from,
  104092. minRepeatType: this.parser.minRepeatTerm
  104093. });
  104094. }
  104095. stackID(e) {
  104096. let n = (B$ || (B$ = /* @__PURE__ */ new WeakMap())).get(e);
  104097. return n || B$.set(e, n = String.fromCodePoint(this.nextStackID++)), n + e;
  104098. }
  104099. }
  104100. function dG(t, e) {
  104101. for (let n = 0; n < e.length; n++) {
  104102. let r = e[n];
  104103. if (r.pos == t.pos && r.sameState(t)) {
  104104. e[n].score < t.score && (e[n] = t);
  104105. return;
  104106. }
  104107. }
  104108. e.push(t);
  104109. }
  104110. class Ddt {
  104111. constructor(e, n, r) {
  104112. this.source = e, this.flags = n, this.disabled = r;
  104113. }
  104114. allows(e) {
  104115. return !this.disabled || this.disabled[e] == 0;
  104116. }
  104117. }
  104118. const z$ = (t) => t;
  104119. class Rdt {
  104120. /**
  104121. Define a context tracker.
  104122. */
  104123. constructor(e) {
  104124. this.start = e.start, this.shift = e.shift || z$, this.reduce = e.reduce || z$, this.reuse = e.reuse || z$, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
  104125. }
  104126. }
  104127. class l0 extends Ioe {
  104128. /**
  104129. @internal
  104130. */
  104131. constructor(e) {
  104132. if (super(), this.wrappers = [], e.version != 14)
  104133. throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
  104134. let n = e.nodeNames.split(" ");
  104135. this.minRepeatTerm = n.length;
  104136. for (let s = 0; s < e.repeatNodeCount; s++)
  104137. n.push("");
  104138. let r = Object.keys(e.topRules).map((s) => e.topRules[s][1]), i = [];
  104139. for (let s = 0; s < n.length; s++)
  104140. i.push([]);
  104141. function a(s, l, u) {
  104142. i[s].push([l, l.deserialize(String(u))]);
  104143. }
  104144. if (e.nodeProps)
  104145. for (let s of e.nodeProps) {
  104146. let l = s[0];
  104147. typeof l == "string" && (l = Pt[l]);
  104148. for (let u = 1; u < s.length; ) {
  104149. let c = s[u++];
  104150. if (c >= 0)
  104151. a(c, l, s[u++]);
  104152. else {
  104153. let f = s[u + -c];
  104154. for (let d = -c; d > 0; d--)
  104155. a(s[u++], l, f);
  104156. u++;
  104157. }
  104158. }
  104159. }
  104160. this.nodeSet = new c4(n.map((s, l) => Ci.define({
  104161. name: l >= this.minRepeatTerm ? void 0 : s,
  104162. id: l,
  104163. props: i[l],
  104164. top: r.indexOf(l) > -1,
  104165. error: l == 0,
  104166. skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
  104167. }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = $oe;
  104168. let o = ig(e.tokenData);
  104169. this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
  104170. for (let s = 0; s < this.specializerSpecs.length; s++)
  104171. this.specialized[s] = this.specializerSpecs[s].term;
  104172. this.specializers = this.specializerSpecs.map(hG), this.states = ig(e.states, Uint32Array), this.data = ig(e.stateData), this.goto = ig(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((s) => typeof s == "number" ? new dh(o, s) : s), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
  104173. }
  104174. createParse(e, n, r) {
  104175. let i = new Idt(this, e, n, r);
  104176. for (let a of this.wrappers)
  104177. i = a(i, e, n, r);
  104178. return i;
  104179. }
  104180. /**
  104181. Get a goto table entry @internal
  104182. */
  104183. getGoto(e, n, r = !1) {
  104184. let i = this.goto;
  104185. if (n >= i[0])
  104186. return -1;
  104187. for (let a = i[n + 1]; ; ) {
  104188. let o = i[a++], s = o & 1, l = i[a++];
  104189. if (s && r)
  104190. return l;
  104191. for (let u = a + (o >> 1); a < u; a++)
  104192. if (i[a] == e)
  104193. return l;
  104194. if (s)
  104195. return -1;
  104196. }
  104197. }
  104198. /**
  104199. Check if this state has an action for a given terminal @internal
  104200. */
  104201. hasAction(e, n) {
  104202. let r = this.data;
  104203. for (let i = 0; i < 2; i++)
  104204. for (let a = this.stateSlot(
  104205. e,
  104206. i ? 2 : 1
  104207. /* ParseState.Actions */
  104208. ), o; ; a += 3) {
  104209. if ((o = r[a]) == 65535)
  104210. if (r[a + 1] == 1)
  104211. o = r[a = xs(r, a + 2)];
  104212. else {
  104213. if (r[a + 1] == 2)
  104214. return xs(r, a + 2);
  104215. break;
  104216. }
  104217. if (o == n || o == 0)
  104218. return xs(r, a + 1);
  104219. }
  104220. return 0;
  104221. }
  104222. /**
  104223. @internal
  104224. */
  104225. stateSlot(e, n) {
  104226. return this.states[e * 6 + n];
  104227. }
  104228. /**
  104229. @internal
  104230. */
  104231. stateFlag(e, n) {
  104232. return (this.stateSlot(
  104233. e,
  104234. 0
  104235. /* ParseState.Flags */
  104236. ) & n) > 0;
  104237. }
  104238. /**
  104239. @internal
  104240. */
  104241. validAction(e, n) {
  104242. return !!this.allActions(e, (r) => r == n ? !0 : null);
  104243. }
  104244. /**
  104245. @internal
  104246. */
  104247. allActions(e, n) {
  104248. let r = this.stateSlot(
  104249. e,
  104250. 4
  104251. /* ParseState.DefaultReduce */
  104252. ), i = r ? n(r) : void 0;
  104253. for (let a = this.stateSlot(
  104254. e,
  104255. 1
  104256. /* ParseState.Actions */
  104257. ); i == null; a += 3) {
  104258. if (this.data[a] == 65535)
  104259. if (this.data[a + 1] == 1)
  104260. a = xs(this.data, a + 2);
  104261. else
  104262. break;
  104263. i = n(xs(this.data, a + 1));
  104264. }
  104265. return i;
  104266. }
  104267. /**
  104268. Get the states that can follow this one through shift actions or
  104269. goto jumps. @internal
  104270. */
  104271. nextStates(e) {
  104272. let n = [];
  104273. for (let r = this.stateSlot(
  104274. e,
  104275. 1
  104276. /* ParseState.Actions */
  104277. ); ; r += 3) {
  104278. if (this.data[r] == 65535)
  104279. if (this.data[r + 1] == 1)
  104280. r = xs(this.data, r + 2);
  104281. else
  104282. break;
  104283. if (!(this.data[r + 2] & 1)) {
  104284. let i = this.data[r + 1];
  104285. n.some((a, o) => o & 1 && a == i) || n.push(this.data[r], i);
  104286. }
  104287. }
  104288. return n;
  104289. }
  104290. /**
  104291. Configure the parser. Returns a new parser instance that has the
  104292. given settings modified. Settings not provided in `config` are
  104293. kept from the original parser.
  104294. */
  104295. configure(e) {
  104296. let n = Object.assign(Object.create(l0.prototype), this);
  104297. if (e.props && (n.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
  104298. let r = this.topRules[e.top];
  104299. if (!r)
  104300. throw new RangeError(`Invalid top rule name ${e.top}`);
  104301. n.top = r;
  104302. }
  104303. return e.tokenizers && (n.tokenizers = this.tokenizers.map((r) => {
  104304. let i = e.tokenizers.find((a) => a.from == r);
  104305. return i ? i.to : r;
  104306. })), e.specializers && (n.specializers = this.specializers.slice(), n.specializerSpecs = this.specializerSpecs.map((r, i) => {
  104307. let a = e.specializers.find((s) => s.from == r.external);
  104308. if (!a)
  104309. return r;
  104310. let o = Object.assign(Object.assign({}, r), { external: a.to });
  104311. return n.specializers[i] = hG(o), o;
  104312. })), e.contextTracker && (n.context = e.contextTracker), e.dialect && (n.dialect = this.parseDialect(e.dialect)), e.strict != null && (n.strict = e.strict), e.wrap && (n.wrappers = n.wrappers.concat(e.wrap)), e.bufferLength != null && (n.bufferLength = e.bufferLength), n;
  104313. }
  104314. /**
  104315. Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
  104316. are registered for this parser.
  104317. */
  104318. hasWrappers() {
  104319. return this.wrappers.length > 0;
  104320. }
  104321. /**
  104322. Returns the name associated with a given term. This will only
  104323. work for all terms when the parser was generated with the
  104324. `--names` option. By default, only the names of tagged terms are
  104325. stored.
  104326. */
  104327. getName(e) {
  104328. return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
  104329. }
  104330. /**
  104331. The eof term id is always allocated directly after the node
  104332. types. @internal
  104333. */
  104334. get eofTerm() {
  104335. return this.maxNode + 1;
  104336. }
  104337. /**
  104338. The type of top node produced by the parser.
  104339. */
  104340. get topNode() {
  104341. return this.nodeSet.types[this.top[1]];
  104342. }
  104343. /**
  104344. @internal
  104345. */
  104346. dynamicPrecedence(e) {
  104347. let n = this.dynamicPrecedences;
  104348. return n == null ? 0 : n[e] || 0;
  104349. }
  104350. /**
  104351. @internal
  104352. */
  104353. parseDialect(e) {
  104354. let n = Object.keys(this.dialects), r = n.map(() => !1);
  104355. if (e)
  104356. for (let a of e.split(" ")) {
  104357. let o = n.indexOf(a);
  104358. o >= 0 && (r[o] = !0);
  104359. }
  104360. let i = null;
  104361. for (let a = 0; a < n.length; a++)
  104362. if (!r[a])
  104363. for (let o = this.dialects[n[a]], s; (s = this.data[o++]) != 65535; )
  104364. (i || (i = new Uint8Array(this.maxTerm + 1)))[s] = 1;
  104365. return new Ddt(e, r, i);
  104366. }
  104367. /**
  104368. Used by the output of the parser generator. Not available to
  104369. user code. @hide
  104370. */
  104371. static deserialize(e) {
  104372. return new l0(e);
  104373. }
  104374. }
  104375. function xs(t, e) {
  104376. return t[e] | t[e + 1] << 16;
  104377. }
  104378. function kdt(t) {
  104379. let e = null;
  104380. for (let n of t) {
  104381. let r = n.p.stoppedAt;
  104382. (n.pos == n.p.stream.end || r != null && n.pos > r) && n.p.parser.stateFlag(
  104383. n.state,
  104384. 2
  104385. /* StateFlag.Accepting */
  104386. ) && (!e || e.score < n.score) && (e = n);
  104387. }
  104388. return e;
  104389. }
  104390. function hG(t) {
  104391. if (t.external) {
  104392. let e = t.extend ? 1 : 0;
  104393. return (n, r) => t.external(n, r) << 1 | e;
  104394. }
  104395. return t.get;
  104396. }
  104397. const Ldt = 312, pG = 1, Ndt = 2, Bdt = 3, zdt = 4, Vdt = 313, Fdt = 315, Wdt = 316, Qdt = 5, Hdt = 6, Gdt = 0, qM = [
  104398. 9,
  104399. 10,
  104400. 11,
  104401. 12,
  104402. 13,
  104403. 32,
  104404. 133,
  104405. 160,
  104406. 5760,
  104407. 8192,
  104408. 8193,
  104409. 8194,
  104410. 8195,
  104411. 8196,
  104412. 8197,
  104413. 8198,
  104414. 8199,
  104415. 8200,
  104416. 8201,
  104417. 8202,
  104418. 8232,
  104419. 8233,
  104420. 8239,
  104421. 8287,
  104422. 12288
  104423. ], ole = 125, jdt = 59, KM = 47, Zdt = 42, Udt = 43, Xdt = 45, Ydt = 60, qdt = 44, Kdt = 63, Jdt = 46, eht = new Rdt({
  104424. start: !1,
  104425. shift(t, e) {
  104426. return e == Qdt || e == Hdt || e == Fdt ? t : e == Wdt;
  104427. },
  104428. strict: !1
  104429. }), tht = new Ww((t, e) => {
  104430. let { next: n } = t;
  104431. (n == ole || n == -1 || e.context) && t.acceptToken(Vdt);
  104432. }, { contextual: !0, fallback: !0 }), nht = new Ww((t, e) => {
  104433. let { next: n } = t, r;
  104434. qM.indexOf(n) > -1 || n == KM && ((r = t.peek(1)) == KM || r == Zdt) || n != ole && n != jdt && n != -1 && !e.context && t.acceptToken(Ldt);
  104435. }, { contextual: !0 }), rht = new Ww((t, e) => {
  104436. let { next: n } = t;
  104437. if (n == Udt || n == Xdt) {
  104438. if (t.advance(), n == t.next) {
  104439. t.advance();
  104440. let r = !e.context && e.canShift(pG);
  104441. t.acceptToken(r ? pG : Ndt);
  104442. }
  104443. } else n == Kdt && t.peek(1) == Jdt && (t.advance(), t.advance(), (t.next < 48 || t.next > 57) && t.acceptToken(Bdt));
  104444. }, { contextual: !0 });
  104445. function V$(t, e) {
  104446. return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57;
  104447. }
  104448. const iht = new Ww((t, e) => {
  104449. if (t.next != Ydt || !e.dialectEnabled(Gdt) || (t.advance(), t.next == KM)) return;
  104450. let n = 0;
  104451. for (; qM.indexOf(t.next) > -1; )
  104452. t.advance(), n++;
  104453. if (V$(t.next, !0)) {
  104454. for (t.advance(), n++; V$(t.next, !1); )
  104455. t.advance(), n++;
  104456. for (; qM.indexOf(t.next) > -1; )
  104457. t.advance(), n++;
  104458. if (t.next == qdt) return;
  104459. for (let r = 0; ; r++) {
  104460. if (r == 7) {
  104461. if (!V$(t.next, !0)) return;
  104462. break;
  104463. }
  104464. if (t.next != "extends".charCodeAt(r)) break;
  104465. t.advance(), n++;
  104466. }
  104467. }
  104468. t.acceptToken(zdt, -n);
  104469. }), aht = p4({
  104470. "get set async static": J.modifier,
  104471. "for while do if else switch try catch finally return throw break continue default case": J.controlKeyword,
  104472. "in of await yield void typeof delete instanceof": J.operatorKeyword,
  104473. "let var const using function class extends": J.definitionKeyword,
  104474. "import export from": J.moduleKeyword,
  104475. "with debugger as new": J.keyword,
  104476. TemplateString: J.special(J.string),
  104477. super: J.atom,
  104478. BooleanLiteral: J.bool,
  104479. this: J.self,
  104480. null: J.null,
  104481. Star: J.modifier,
  104482. VariableName: J.variableName,
  104483. "CallExpression/VariableName TaggedTemplateExpression/VariableName": J.function(J.variableName),
  104484. VariableDefinition: J.definition(J.variableName),
  104485. Label: J.labelName,
  104486. PropertyName: J.propertyName,
  104487. PrivatePropertyName: J.special(J.propertyName),
  104488. "CallExpression/MemberExpression/PropertyName": J.function(J.propertyName),
  104489. "FunctionDeclaration/VariableDefinition": J.function(J.definition(J.variableName)),
  104490. "ClassDeclaration/VariableDefinition": J.definition(J.className),
  104491. PropertyDefinition: J.definition(J.propertyName),
  104492. PrivatePropertyDefinition: J.definition(J.special(J.propertyName)),
  104493. UpdateOp: J.updateOperator,
  104494. "LineComment Hashbang": J.lineComment,
  104495. BlockComment: J.blockComment,
  104496. Number: J.number,
  104497. String: J.string,
  104498. Escape: J.escape,
  104499. ArithOp: J.arithmeticOperator,
  104500. LogicOp: J.logicOperator,
  104501. BitOp: J.bitwiseOperator,
  104502. CompareOp: J.compareOperator,
  104503. RegExp: J.regexp,
  104504. Equals: J.definitionOperator,
  104505. Arrow: J.function(J.punctuation),
  104506. ": Spread": J.punctuation,
  104507. "( )": J.paren,
  104508. "[ ]": J.squareBracket,
  104509. "{ }": J.brace,
  104510. "InterpolationStart InterpolationEnd": J.special(J.brace),
  104511. ".": J.derefOperator,
  104512. ", ;": J.separator,
  104513. "@": J.meta,
  104514. TypeName: J.typeName,
  104515. TypeDefinition: J.definition(J.typeName),
  104516. "type enum interface implements namespace module declare": J.definitionKeyword,
  104517. "abstract global Privacy readonly override": J.modifier,
  104518. "is keyof unique infer": J.operatorKeyword,
  104519. JSXAttributeValue: J.attributeValue,
  104520. JSXText: J.content,
  104521. "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": J.angleBracket,
  104522. "JSXIdentifier JSXNameSpacedName": J.tagName,
  104523. "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": J.attributeName,
  104524. "JSXBuiltin/JSXIdentifier": J.standard(J.tagName)
  104525. }), oht = { __proto__: null, export: 20, as: 25, from: 33, default: 36, async: 41, function: 42, extends: 54, this: 58, true: 66, false: 66, null: 78, void: 82, typeof: 86, super: 102, new: 136, delete: 148, yield: 157, await: 161, class: 166, public: 229, private: 229, protected: 229, readonly: 231, instanceof: 250, satisfies: 253, in: 254, const: 256, import: 290, keyof: 345, unique: 349, infer: 355, is: 391, abstract: 411, implements: 413, type: 415, let: 418, var: 420, using: 423, interface: 429, enum: 433, namespace: 439, module: 441, declare: 445, global: 449, for: 468, of: 477, while: 480, with: 484, do: 488, if: 492, else: 494, switch: 498, case: 504, try: 510, catch: 514, finally: 518, return: 522, throw: 526, break: 530, continue: 534, debugger: 538 }, sht = { __proto__: null, async: 123, get: 125, set: 127, declare: 189, public: 191, private: 191, protected: 191, static: 193, abstract: 195, override: 197, readonly: 203, accessor: 205, new: 395 }, lht = { __proto__: null, "<": 187 }, uht = l0.deserialize({
  104526. version: 14,
  104527. states: "$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOO<nQWO'#HRO>VQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-E<f-E<fO9^QWO,5=[O!$VQWO,5=[O!$[Q^O,5;WO!&_Q7[O'#EhO!'xQWO,5;WO!'}Q^O'#DvO!(XQ`O,5;aO!(aQ`O,5;aO%[Q^O,5;aOOQU'#FS'#FSOOQU'#FU'#FUO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bOOQU'#FY'#FYO!(oQ^O,5;sOOQ?Mr,5;x,5;xOOQ?Mr,5;y,5;yOOQ?Mr,5;{,5;{O%[Q^O'#IlO!*rQ?MxO,5<gO%[Q^O,5;bO!&_Q7[O,5;bO!+aQ7[O,5;bO!-RQ7[O'#EZO%[Q^O,5;vOOQ?Mr,5;z,5;zO!-YQ&jO'#FiO!.VQ&jO'#KSO!-qQ&jO'#KSO!.^Q&jO'#KSOOQO'#KS'#KSO!.rQ&jO,5<ROOOS,5<_,5<_O!/TQ^O'#FuOOOS'#Ik'#IkO7VO,YO,5<PO!/[Q&jO'#FwOOQ?Mr,5<P,5<PO!/{Q!LQO'#CvOOQ?Mr'#Cz'#CzO!0`O!0LbO'#DOO!0|Q7[O,5<dO!1TQWO,5<fO!2pQ$ISO'#GVO!2}QWO'#GWO!3SQWO'#GWO!4rQ$ISO'#G[O!5nQ`O'#G`OOQO'#Gk'#GkO!+hQ7[O'#GjOOQO'#Gm'#GmO!+hQ7[O'#GlO!6aQ!LQO'#JgOOQ?Mr'#Jg'#JgO!6kQWO'#JfO!6yQWO'#JeO!7RQWO'#CuOOQ?Mr'#Cx'#CxO!7ZQWO'#CzOOQ?Mr'#DS'#DSOOQ?Mr'#DU'#DUO1SQWO'#DWO!+hQ7[O'#F}O!+hQ7[O'#GPO!7`QWO'#GRO!7eQWO'#GSO!3SQWO'#GYO!+hQ7[O'#G_O!7jQWO'#EnO!8XQWO,5<eOOQ?Mp'#Cr'#CrO!8aQWO'#EoO!9ZQ`O'#EpOOQ?Mp'#J|'#J|O!9bQ?MxO'#K]O9hQ?MxO,5=`O`Q^O,5>pOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-E<X-E<XO!;aQ?NdO,5:_O!9UQ`O,5:]O!=zQ?NdO,5:gO%[Q^O,5:gO!@bQ?NdO,5:iOOQO,5@v,5@vO!ARQ7[O,5=[O!AaQ?MxO'#JdO9RQWO'#JdO!ArQ?MxO,59ZO!A}Q`O,59ZO!BVQ7[O,59ZO:VQ7[O,59ZO!BbQWO,5;WO!BjQWO'#H^O!COQWO'#K`O%[Q^O,5;|O!9UQ`O,5<OO!CWQWO,5=wO!C]QWO,5=wO!CbQWO,5=wO9hQ?MxO,5=wO;wQWO,5=gOOQO'#Cv'#CvO!CpQ`O,5=dO!CxQ7[O,5=eO!DTQWO,5=gO!DYQpO,5=jO!DbQWO'#K[O>tQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-E<b-E<bO#(XQ?NQO,5;OOCrQ`O,5:oO#(cQ`O,5:oOCrQ`O,5;OO!ArQ?MxO,5:oOOQ?Mp'#Eg'#EgOOQO,5;O,5;OO%[Q^O,5;OO#(pQ?MxO,5;OO#({Q?MxO,5;OO!A}Q`O,5:oOOQO,5;U,5;UO#)ZQ?MxO,5;OPOOO'#IY'#IYP#)oO#@ItO,58|POOO,58|,58|OOOO-E<Y-E<YOOQ?Mr1G.p1G.pOOOO-E<Z-E<ZO#)zQpO,59zOOOO-E<]-E<]OOQ?Mr1G/d1G/dO#*PQrO,5>zO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-E<d-E<dO#*wQWO,5@iOOQ?Mp1G0u1G0uOOQ?Mv1G/u1G/uOOQ?Mv1G0V1G0VO%[Q^O,5@gO#+eQ?MxO,5@gO#+vQ?MxO,5@gO#+}QWO,5@fO9WQWO,5@fO#,VQWO,5@fO#,eQWO'#IiO#+}QWO,5@fOOQ?Mp1G0t1G0tO!(XQ`O,5:rO!(dQ`O,5:rOOQQ,5:t,5:tO#-VQYO,5:tO#-_Q7[O1G2vO9^QWO1G2vOOQ?Mr1G0r1G0rO#-mQ?NdO1G0rO#.rQ?NbO,5;SOOQ?Mr'#GU'#GUO#/`Q?NdO'#JgO!$[Q^O1G0rO#1hQrO'#JrO%[Q^O'#JrO#1rQWO,5:bOOQ?Mr'#D['#D[OOQ?Mr1G0{1G0{O%[Q^O1G0{OOQ?Mr1G1e1G1eO#1wQWO1G0{O#4]Q?NdO1G0|O#4dQ?NdO1G0|O#6zQ?NdO1G0|O#7RQ?NdO1G0|O#9iQ?NdO1G0|O#<PQ?NdO1G0|O#<WQ?NdO1G0|O#<_Q?NdO1G0|O#>uQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-E<j-E<jO#E}Q?NdO1G0|O#FzQ?NdO1G0|OOQ?Mr1G0|1G0|O#GzQ7[O'#JwO#HUQWO,5:uO#HZQ?NdO1G1bO#H}Q&jO,5<VO#IVQ&jO,5<WO#I_Q&jO'#FnO#IvQWO'#FmOOQO'#KT'#KTOOQO'#Ij'#IjO#I{Q&jO1G1mOOQ?Mr1G1m1G1mOOOS1G1x1G1xO#J^Q07bO'#JmO#JhQWO,5<aO!(oQ^O,5<aOOOS-E<i-E<iOOQ?Mr1G1k1G1kO#JmQ`O'#KSOOQ?Mr,5<c,5<cO#JuQ`O,5<cO!&_Q7[O'#DQOOOO'#I^'#I^O#JzO!0LbO,59jOOQ?Mr,59j,59jO%[Q^O1G2OO!7eQWO'#InO#KVQ7[O,5<xOOQ?Mr,5<u,5<uO!+hQ7[O'#IqO#KuQ7[O,5=UO!+hQ7[O'#IsO#LhQ7[O,5=WO!&_Q7[O,5=YOOQO1G2Q1G2QO#LrQpO'#CrO#MVQ$ISO'#EoO#NUQ`O'#G`O#NrQpO,5<qO#NyQWO'#KWO9WQWO'#KWO$ XQWO,5<sO!+hQ7[O,5<rO$ ^QWO'#GXO$ oQWO,5<rO$ tQpO'#GUO$!RQpO'#KXO$!]QWO'#KXO!&_Q7[O'#KXO$!bQWO,5<vO$!gQ`O'#GaO!5iQ`O'#GaO$!xQWO'#GcO$!}QWO'#GeO!3SQWO'#GhO$#SQ?MxO'#IpO$#_Q`O,5<zOOQ?Mv,5<z,5<zO$#fQ`O'#GaO$#tQ`O'#GbO$#|Q`O'#GbO$$RQ7[O,5=UO$$cQ7[O,5=WOOQ?Mr,5=Z,5=ZO!+hQ7[O,5@QO!+hQ7[O,5@QO$$sQWO'#IuO$%OQWO,5@PO$%WQWO,59aOOQ?Mr,59f,59fO$%zQ!LSO,59rOOQ?Mr'#Jk'#JkO$&mQ7[O,5<iO$'`Q7[O,5<kO@fQWO,5<mOOQ?Mr,5<n,5<nO$'jQWO,5<tO$'oQ7[O,5<yO$(PQWO'#JzO!$[Q^O1G2PO$(UQWO1G2PO9WQWO'#J}O9WQWO'#EqO%[Q^O'#EqO9WQWO'#IwO$(ZQ?MxO,5@wOOQU1G2z1G2zOOQU1G4[1G4[OOQ?Mr1G/y1G/yOOQ?Mr1G/w1G/wO$*]Q?NdO1G0ROOQU1G2v1G2vO!&_Q7[O1G2vO%[Q^O1G2vO#-bQWO1G2vO$,aQ7[O'#EhOOQ?Mp,5@O,5@OO$,kQ?MxO,5@OOOQU1G.u1G.uO!ArQ?MxO1G.uO!A}Q`O1G.uO!BVQ7[O1G.uO$,|QWO1G0rO$-RQWO'#CiO$-^QWO'#KaO$-fQWO,5=xO$-kQWO'#KaO$-pQWO'#KaO$.OQWO'#I}O$.^QWO,5@zO$.fQrO1G1hOOQ?Mr1G1j1G1jO9^QWO1G3cO@fQWO1G3cO$.mQWO1G3cO$.rQWO1G3cOOQU1G3c1G3cO!DTQWO1G3RO!&_Q7[O1G3OO$.wQWO1G3OOOQU1G3P1G3PO!&_Q7[O1G3PO$.|QWO1G3PO$/UQ`O'#G}OOQU1G3R1G3RO!5iQ`O'#IyO!DYQpO1G3UOOQU1G3U1G3UOOQU,5=o,5=oO$/^Q7[O,5=qO9^QWO,5=qO$!}QWO,5=sO9RQWO,5=sO!A}Q`O,5=sO!BVQ7[O,5=sO:VQ7[O,5=sO$/lQWO'#K_O$/wQWO,5=tOOQU1G.k1G.kO$/|Q?MxO1G.kO@fQWO1G.kO$0XQWO1G.kO9hQ?MxO1G.kO$2aQrO,5@|O$2nQWO,5@|O9WQWO,5@|O$2yQ^O,5={O$3QQWO,5={OOQU1G3e1G3eO`Q^O1G3eOOQU1G3k1G3kOOQU1G3m1G3mO>oQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$<WQ`O'#IaO$<nQWO,5@[OOQ?Mr1G/o1G/oO$<vQ`O'#IgO$=QQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$=YQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-E<W-E<WPOOO1G.h1G.hOOOO1G/f1G/fO$>jQpO,5<gO$>rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E<g-E<gOOQQ1G0^1G0^OOQQ1G0`1G0`O#-YQWO1G0`OOQU7+(b7+(bO!&_Q7[O7+(bO%[Q^O7+(bO$AVQWO7+(bO$AbQ7[O7+(bO$ApQ?NdO,5=UO$CxQ?NdO,5=WO$FQQ?NdO,5=UO$H`Q?NdO,5=WO$JnQ?NdO,59rO$LsQ?NdO,5<iO$N{Q?NdO,5<kO%#TQ?NdO,5<yOOQ?Mr7+&^7+&^O%%cQ?NdO7+&^O%&VQ^O'#IbO%&dQWO,5@^O%&lQrO,5@^OOQ?Mr1G/|1G/|O%&vQWO7+&gOOQ?Mr7+&g7+&gO%&{Q07bO,5:cO%[Q^O7+&yO%'VQ07bO,5:_O%'dQ07bO,5:gO%'nQ07bO,5:iO%'xQ7[O'#IeO%(SQWO,5@cOOQ?Mr1G0a1G0aOOQO1G1q1G1qOOQO1G1r1G1rO%([QtO,5<YO!(oQ^O,5<XOOQO-E<h-E<hOOQ?Mr7+'X7+'XOOOS7+'d7+'dOOOS1G1{1G1{O%(gQWO1G1{OOQ?Mr1G1}1G1}O%(lQpO,59lOOOO-E<[-E<[OOQ?Mr1G/U1G/UO%(sQ?NdO7+'jOOQ?Mr,5?Y,5?YO%)gQpO,5?YOOQ?Mr1G2d1G2dP!&_Q7[O'#InPOQ?Mr-E<l-E<lO%*VQ7[O,5?]OOQ?Mr-E<o-E<oO%*xQ7[O,5?_OOQ?Mr-E<q-E<qO%+SQpO1G2tO%+ZQpO'#CrO%+qQ7[O'#J}O%+xQ^O'#EqOOQ?Mr1G2]1G2]O%,SQWO'#ImO%,hQWO,5@rO%,hQWO,5@rO%,pQWO,5@rO%,{QWO,5@rOOQO1G2_1G2_O%-ZQ7[O1G2^O!+hQ7[O1G2^O%-kQ$ISO'#IoO%-xQWO,5@sO!&_Q7[O,5@sO%.QQpO,5@sOOQ?Mr1G2b1G2bOOQ?Mp,5<{,5<{OOQ?Mp,5<|,5<|O$(PQWO,5<|OCcQWO,5<|O!A}Q`O,5<{OOQO'#Gd'#GdO%.[QWO,5<}OOQ?Mp,5=P,5=PO$(PQWO,5=SOOQO,5?[,5?[OOQO-E<n-E<nOOQ?Mv1G2f1G2fO!5iQ`O,5<{O%.dQWO,5<|O$!xQWO,5<}O%.oQ`O,5<|O!+hQ7[O'#IqO%/`Q7[O1G2pO!+hQ7[O'#IsO%0RQ7[O1G2rO%0]Q7[O1G5lO%0gQ7[O1G5lOOQO,5?a,5?aOOQO-E<s-E<sOOQO1G.{1G.{O!9UQ`O,59tO%[Q^O,59tOOQ?Mr,5<h,5<hO%0tQWO1G2XO!+hQ7[O1G2`O%0yQ?NdO7+'kOOQ?Mr7+'k7+'kO!$[Q^O7+'kO%1mQWO,5;]OOQ?Mp,5?c,5?cOOQ?Mp-E<u-E<uO%1rQpO'#KYO#&wQWO7+(bO4UQrO7+(bO$AYQWO7+(bO%1|Q?NbO'#CiO%2aQ?NbO,5=QO%3RQWO,5=QOOQ?Mp1G5j1G5jOOQU7+$a7+$aO!ArQ?MxO7+$aO!A}Q`O7+$aO!$[Q^O7+&^O%3WQWO'#I|O%3oQWO,5@{OOQO1G3d1G3dO9^QWO,5@{O%3oQWO,5@{O%3wQWO,5@{OOQO,5?i,5?iOOQO-E<{-E<{OOQ?Mr7+'S7+'SO%3|QWO7+(}O9hQ?MxO7+(}O9^QWO7+(}O@fQWO7+(}OOQU7+(m7+(mO%4RQ?NbO7+(jO!&_Q7[O7+(jO%4]QpO7+(kOOQU7+(k7+(kO!&_Q7[O7+(kO%4dQWO'#K^O%4oQWO,5=iOOQO,5?e,5?eOOQO-E<w-E<wOOQU7+(p7+(pO%6RQ`O'#HWOOQU1G3]1G3]O!&_Q7[O1G3]O%[Q^O1G3]O%6YQWO1G3]O%6eQ7[O1G3]O9hQ?MxO1G3_O$!}QWO1G3_O9RQWO1G3_O!A}Q`O1G3_O!BVQ7[O1G3_O%6sQWO'#I{O%7XQWO,5@yO%7aQ`O,5@yOOQ?Mp1G3`1G3`OOQU7+$V7+$VO@fQWO7+$VO9hQ?MxO7+$VO%7lQWO7+$VO%[Q^O1G6hO%[Q^O1G6iO%7qQ?MxO1G6hO%7{Q^O1G3gO%8SQWO1G3gO%8XQ^O1G3gOOQU7+)P7+)PO9hQ?MxO7+)ZO`Q^O7+)]OOQU'#Kd'#KdOOQU'#JO'#JOO%8`Q^O,5>[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-E<e-E<eO!A}Q`O1G/pOOQO-E<a-E<aOOQ?Mv1G0Y1G0YOOQ?Mr7+%r7+%rO#&wQWO7+%rOOQ?Mr7+&]7+&]O>tQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<<K|O4UQrO<<K|O%;YQWO<<K|OOQU<<K|<<K|O!&_Q7[O<<K|O%[Q^O<<K|O%;bQWO<<K|O%;mQ?NdO,5?]O%=uQ?NdO,5?_O%?}Q?NdO1G2^O%B]Q?NdO1G2pO%DeQ?NdO1G2rO%FmQrO,5>|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<<JR<<JRO%GPQ07bO1G0rO%IWQ07bO1G0|O%I_Q07bO1G0|O%K`Q07bO1G0|O%KgQ07bO1G0|O%MhQ07bO1G0|O& iQ07bO1G0|O& pQ07bO1G0|O& wQ07bO1G0|O&#xQ07bO1G0|O&$PQ07bO1G0|O&$WQ?NdO<<JeO&&OQ07bO1G0|O&&{Q07bO1G0|O&'{Q07bO'#JgO&*OQ07bO1G1bO&*]Q07bO1G0RO&*gQ7[O,5?POOQO-E<c-E<cO!(oQ^O'#FpOOQO'#KU'#KUOOQO1G1t1G1tO&*qQWO1G1sO&*vQ07bO,5?WOOOS7+'g7+'gOOOO1G/W1G/WOOQ?Mr1G4t1G4tO!+hQ7[O7+(`O&-WQrO'#CiO&-bQWO,5?XO9WQWO,5?XOOQO-E<k-E<kO&-pQWO1G6^O&-pQWO1G6^O&-xQWO1G6^O&.TQ7[O7+'xO&.eQpO,5?ZO&.oQWO,5?ZO!&_Q7[O,5?ZOOQO-E<m-E<mO&.tQpO1G6_O&/OQWO1G6_OOQ?Mp1G2h1G2hO$(PQWO1G2hOOQ?Mp1G2g1G2gO&/WQWO1G2iO!&_Q7[O1G2iOOQ?Mp1G2n1G2nO!A}Q`O1G2gOCcQWO1G2hO&/]QWO1G2iO&/eQWO1G2hO$!xQWO1G2iO&0XQ7[O,5?]OOQ?Mr-E<p-E<pO&0zQ7[O,5?_OOQ?Mr-E<r-E<rO!+hQ7[O7++WOOQ?Mr1G/`1G/`O&1UQWO1G/`OOQ?Mr7+'s7+'sO&1ZQ7[O7+'zO&1kQ?NdO<<KVOOQ?Mr<<KV<<KVO&2_QWO1G0wO!&_Q7[O'#IvO&2dQWO,5@tO&4fQrO<<K|O!&_Q7[O1G2lOOQU<<G{<<G{O!ArQ?MxO<<G{O&4mQ?NdO<<IxOOQ?Mr<<Ix<<IxOOQO,5?h,5?hO&5aQWO,5?hO&5fQWO,5?hOOQO-E<z-E<zO&5tQWO1G6gO&5tQWO1G6gO9^QWO1G6gO@fQWO<<LiOOQU<<Li<<LiO&5|QWO<<LiO9hQ?MxO<<LiOOQU<<LU<<LUO%4RQ?NbO<<LUOOQU<<LV<<LVO%4]QpO<<LVO&6RQ`O'#IxO&6^QWO,5@xO!(oQ^O,5@xOOQU1G3T1G3TO%+xQ^O'#JqOOQO'#Iz'#IzO9hQ?MxO'#IzO&6fQ`O,5=rOOQU,5=r,5=rO&6mQ`O'#EdO&7RQ`O'#GcO&7WQWO7+(wO&7]QWO7+(wOOQU7+(w7+(wO!&_Q7[O7+(wO%[Q^O7+(wO&7eQWO7+(wOOQU7+(y7+(yO9hQ?MxO7+(yO$!}QWO7+(yO9RQWO7+(yO!A}Q`O7+(yO&7pQWO,5?gOOQO-E<y-E<yOOQO'#HZ'#HZO&7{QWO1G6eO9hQ?MxO<<GqOOQU<<Gq<<GqO@fQWO<<GqO&8TQWO7+,SO&8YQWO7+,TO%[Q^O7+,SO%[Q^O7+,TOOQU7+)R7+)RO&8_QWO7+)RO&8dQ^O7+)RO&8kQWO7+)ROOQU<<Lu<<LuOOQU<<Lw<<LwOOQU-E<|-E<|OOQU1G3v1G3vO&8pQWO,5>]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<<I^<<I^OOQ?Mr<<Iw<<IwO>tQWO<<IwOOQO<<Ip<<IpO$>`Q?NdO<<IpO%[Q^O<<IpOOQO<<Ia<<IaO!ArQ?MxO<<IaO&9UQ?MxO<<IpO&9aQ?NdO<= XO&9qQWO<= WOOQO7+*Z7+*ZO9WQWO7+*ZOOQUANAhANAhO&9yQrOANAhO!&_Q7[OANAhO#&wQWOANAhO4UQrOANAhO&:QQWOANAhO%[Q^OANAhO&:YQ?NdO7+'xO&<hQ?NdO,5?]O&>pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5<iO&LlQ07bO,5<kO&N}Q07bO,5<yO'!pQ07bO7+'jO'!}Q07bO7+'kO'#[QWO,5<[OOQO7+'_7+'_O'#aQ7[O<<KzOOQO1G4s1G4sO'#hQWO1G4sO'#sQWO1G4sO'$RQWO7++xO'$RQWO7++xO!&_Q7[O1G4uO'$ZQpO1G4uO'$eQWO7++yOOQ?Mp7+(S7+(SO'$mQWO7+(TO'$xQpO7+(TOOQ?Mp7+(R7+(RO$(PQWO7+(SO'%PQWO7+(TO!&_Q7[O7+(TOCcQWO7+(SO'%UQWO7+(TO'%^Q7[O<<NrOOQ?Mr7+$z7+$zO'%hQpO,5?bOOQO-E<t-E<tO'%rQ?NbO7+(WOOQUAN=gAN=gO9^QWO1G5SOOQO1G5S1G5SO'&SQWO1G5SO'&XQWO7+,RO'&XQWO7+,RO9hQ?MxOANBTO@fQWOANBTOOQUANBTANBTOOQUANApANApOOQUANAqANAqO'&aQWO,5?dOOQO-E<v-E<vO'&lQ07bO1G6dOOQO,5?f,5?fOOQO-E<x-E<xOOQU1G3^1G3^O%+xQ^O,5<}O'&vQWO,5<}OOQU<<Lc<<LcO!&_Q7[O<<LcO&7WQWO<<LcO'&{QWO<<LcO%[Q^O<<LcOOQU<<Le<<LeO9hQ?MxO<<LeO$!}QWO<<LeO9RQWO<<LeO''TQ`O1G5RO''`QWO7+,POOQUAN=]AN=]O9hQ?MxOAN=]OOQU<= n<= nOOQU<= o<= oO''hQWO<= nO''mQWO<= oOOQU<<Lm<<LmO''rQWO<<LmO''wQ^O<<LmOOQU1G3w1G3wO>tQWO7+)hO'(OQWO<<I}O'(ZQ07bO<<I}OOQO<<Hv<<HvOOQ?MrAN?cAN?cOOQOAN?[AN?[O$>`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<<Mu<<MuOOQUG27SG27SO!&_Q7[OG27SO#&wQWOG27SO'(eQrOG27SO4UQrOG27SO'(lQWOG27SO'(tQ07bO<<JeO')RQ07bO1G2^O'*tQ07bO,5?]O',tQ07bO,5?_O'.tQ07bO1G2pO'0tQ07bO1G2rO'2tQ07bO<<KVO'3RQ07bO<<IxOOQO1G1v1G1vO!+hQ7[OANAfOOQO7+*_7+*_O'3`QWO7+*_O'3kQWO<= dO'3sQpO7+*aOOQ?Mp<<Ko<<KoO$(PQWO<<KoOCcQWO<<KoO'3}QWO<<KoOOQ?Mp<<Kn<<KnO'4YQpO<<KoO$(PQWO<<KnO'4aQWO<<KoO!&_Q7[O<<KoOOQO7+*n7+*nO9^QWO7+*nO'4fQWO<= mOOQUG27oG27oO9hQ?MxOG27oO!(oQ^O1G5OO'4nQWO7+,OO&7WQWOANA}OOQUANA}ANA}O!&_Q7[OANA}O'4vQWOANA}OOQUANBPANBPO9hQ?MxOANBPO$!}QWOANBPOOQO'#H['#H[OOQO7+*m7+*mOOQUG22wG22wOOQUANEYANEYOOQUANEZANEZOOQUANBXANBXO'5OQWOANBXOOQU<<MS<<MSO!(oQ^OAN?iOOQOG24vG24vO$>`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'<pQ7[OG27QOOQO<<My<<MyOOQ?MpANAZANAZO$(PQWOANAZOCcQWOANAZO'=QQWOANAZOOQ?MpANAYANAYO'=]QpOANAZOOQO<<NY<<NYOOQULD-ZLD-ZO'=dQ07bO7+*jOOQUG27iG27iO&7WQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'=nQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'=xQ?NdOG27QOOQ?MpG26uG26uO$(PQWOG26uOCcQWOG26uO'@WQWOG26uOOQULD-TLD-TO&7WQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQ?MpLD,aLD,aO$(PQWOLD,aOCcQWOLD,aOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'@cQ07bOG27QOOQ?Mp!$( {!$( {O$(PQWO!$( {OOQ?Mp!)9Eg!)9EgO!(oQ^O'#DwO1PQWO'#EUO'BUQrO'#JmO'B]QMnO'#DsO'BdQ^O'#D{O'BkQrO'#CiO'ERQrO'#CiO!(oQ^O'#D}O'EcQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'GfQWO,5<gO!(oQ^O,5;bO'GnQ7[O,5;bO'IXQ7[O,5;bO!(oQ^O,5;vO!&_Q7[O'#GjO'GnQ7[O'#GjO!&_Q7[O'#GlO'GnQ7[O'#GlO1SQWO'#DWO1SQWO'#DWO!&_Q7[O'#F}O'GnQ7[O'#F}O!&_Q7[O'#GPO'GnQ7[O'#GPO!&_Q7[O'#G_O'GnQ7[O'#G_O!(oQ^O,5:gO'I`Q`O'#D[O!(oQ^O,5@jO'EcQ^O1G0rO'IjQ07bO'#CiO!(oQ^O1G2OO!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO'ItQpO'#CrO!&_Q7[O,5<rO'GnQ7[O,5<rO'EcQ^O1G2PO!(oQ^O7+&yO!&_Q7[O1G2^O'GnQ7[O1G2^O!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO!&_Q7[O1G2`O'GnQ7[O1G2`O'EcQ^O7+'kO'EcQ^O7+&^O!&_Q7[OANAfO'GnQ7[OANAfO'JXQWO'#ElO'J^QWO'#ElO'JfQWO'#F[O'JkQWO'#EvO'JpQWO'#KOO'J{QWO'#J|O'KWQWO,5;WO'K]Q7[O,5<dO'KdQWO'#GWO'KiQWO'#GWO'KnQWO,5<eO'KvQWO,5;WO'LOQ07bO1G1_O'LVQWO,5<rO'L[QWO,5<rO'LaQWO,5<tO'LfQWO,5<tO'LkQWO1G2PO'LpQWO1G0rO'LuQ7[O<<KzO'L|Q7[O<<KzO7eQ7[O'#FzO9RQWO'#FyOAaQWO'#EkO!(oQ^O,5;sO!3SQWO'#GWO!3SQWO'#GWO!3SQWO'#GYO!3SQWO'#GYO!+hQ7[O7+(`O!+hQ7[O7+(`O%+SQpO1G2tO%+SQpO1G2tO!&_Q7[O,5=YO!&_Q7[O,5=Y",
  104528. stateData: "'NQ~O'wOS'xOSTOS'yRQ~OPYOQYOSfOY!VOaqOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!rwO!uxO!y]O#t!PO$V|O%e}O%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO&S!WO&Y!XO&[!YO&^!ZO&`![O&c!]O&i!^O&o!_O&q!`O&s!aO&u!bO&w!cO(OSO(QTO(TUO([VO(j[O(yiO~OWtO~P`OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa!wOp!nO!P!oO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!xO#T!pO#U!pO#X!zO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O'y!{O~OP]XR]X[]Xa]Xo]X}]X!P]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X'u]X([]X(m]X(t]X(u]X~O!d%PX~P(qO_!}O(Q#PO(R!}O(S#PO~O_#QO(S#PO(T#PO(U#QO~Ou#SO!R#TO(]#TO(^#VO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O;UO(QTO(TUO([VO(j[O(yiO~O!X#ZO!Y#WO!V(cP!V(qP~P+}O!Z#cO~P`OPYOQYOSfOd!jOe!iOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(QTO(TUO([VO(j[O(yiO~Om#mO!X#iO!y]O#f#lO#g#iO(O;VO!h(nP~P.iO!i#oO(O#nO~O!u#sO!y]O%e#tO~O#h#uO~O!d#vO#h#uO~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y$_O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa(aX'u(aX's(aX!h(aX!V(aX![(aX%f(aX!d(aX~P1qO#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX![(bX%f(bX~Oa(bX'u(bX's(bX!V(bX!h(bXs(bX!d(bX~P4UO#]$eO~O$[$hO$^$gO$e$mO~OSfO![$nO$h$oO$j$qO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O$sO(QTO(TUO([$uO(t$}O(u%POg(XP~O!i%cO~O!P%fO![%gO(O%eO~O!d%kO~Oa%lO'u%lO~O}%pO~P%[O(P!lO~P%[O%k%tO~P%[Oh%VO!i%cO(O%eO(P!lO~Oe%{O!i%cO(O%eO~O#s$RO~O}&QO![%}O!i&PO%g&TO(O%eO(P!lO(QTO(TUO`)SP~O!u#sO~O%p&VO!P)OX![)OX(O)OX~O(O&WO~O!r&]O#t!PO%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO~Od&bOe&aO!u&_O%e&`O%x&^O~P;|Od&eOeyO![&dO!r&]O!uxO!y]O#t!PO%e}O%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO~Ob&hO#]&kO%g&fO(P!lO~P=RO!i&lO!r&pO~O!i#oO~O![XO~Oa%lO't&xO'u%lO~Oa%lO't&{O'u%lO~Oa%lO't&}O'u%lO~O's]X!V]Xs]X!h]X&W]X![]X%f]X!d]X~P(qO!_'[O!`'TO!a'TO(P!lO(QTO(TUO~Op'RO!P'QO!X'UO(`'PO!Z(dP!Z(sP~P@YOk'_O![']O(O%eO~Oe'dO!i%cO(O%eO~O}&QO!i&PO~Op!nO!P!oO!y;QO#Q!pO#R!pO#T!pO#U!pO(P!lO(QTO(TUO(`!mO(j!sO~O!_'jO!`'iO!a'iO#S!pO#X'kO#Y'kO~PAtOa%lOh%VO!d#vO!i%cO'u%lO(m'mO~O!m'qO#]'oO~PCSOp!nO!P!oO(QTO(TUO(`!mO(j!sO~O![XOp(hX!P(hX!_(hX!`(hX!a(hX!y(hX#Q(hX#R(hX#S(hX#T(hX#U(hX#X(hX#Y(hX(P(hX(Q(hX(T(hX(`(hX(j(hX~O!`'iO!a'iO(P!lO~PCrO'z'uO'{'uO'|'wO~O_!}O(Q'yO(R!}O(S'yO~O_#QO(S'yO(T'yO(U#QO~Ou#SO!R#TO(]#TO(^'}O~O!X(PO!V'SX!V'YX!Y'SX!Y'YX~P+}O!Y(RO!V(cX~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y(RO!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~O!V(cX~PGfO!V(WO~O!V(pX!Y(pX!d(pX!h(pX(m(pX~O#](pX#h#aX!Z(pX~PIiO#](XO!V(rX!Y(rX~O!Y(YO!V(qX~O!V(]O~O#]$eO~PIiO!Z(^O~P`OR#zO}#yO!P#{O!i#xO([VOP!ka[!kao!ka!Y!ka!m!ka#O!ka#k!ka#l!ka#m!ka#n!ka#o!ka#p!ka#q!ka#r!ka#s!ka#u!ka#w!ka#y!ka#z!ka(m!ka(t!ka(u!ka~Oa!ka'u!ka's!ka!V!ka!h!kas!ka![!ka%f!ka!d!ka~PKPO!h(_O~O!d#vO#](`O(m'mO!Y(oXa(oX'u(oX~O!h(oX~PMlO!P%fO![%gO!y]O#f(eO#g(dO(O%eO~O!Y(fO!h(nX~O!h(hO~O!P%fO![%gO#g(dO(O%eO~OP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O!d#vO!h(bX~P! YOR(jO}(iO!i#xO#P$dO!y!xa!P!xa~O!u!xa%e!xa![!xa#f!xa#g!xa(O!xa~P!#ZO!u(nO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~O#h(tO~O!X(vO!h(fP~P%[O(`(xO(j[O~O!P(zO!i#xO(`(xO(j[O~OP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![!eO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(O)XO(QTO(TUO([VO(j[O(y<xO~O!Y$_Oa$oa'u$oa's$oa!h$oa!V$oa![$oa%f$oa!d$oa~O#t)`O~P!&_Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~Og(kP~P!+hO})eO!d)dO![$]X$Y$]X$[$]X$^$]X$e$]X~O!d)dO![(vX$Y(vX$[(vX$^(vX$e(vX~O})eO~P!-qO})eO![(vX$Y(vX$[(vX$^(vX$e(vX~O![)gO$Y)kO$[)fO$^)fO$e)lO~O!X)oO~P!(oO$[$hO$^$gO$e)sO~Ok$xX}$xX!P$xX#P$xX(t$xX(u$xX~OgjXg$xXkjX!YjX#]jX~P!/gOu)uO(])vO(^)xO~Ok*RO})zO!P){O(t$}O(u%PO~Og)yO~P!0kOg*SO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P*UO![*VO!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~O!X*YO(O*TO!h(zP~P!1YO#h*[O~O!i*]O~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(O*_O(QTO(TUO([$uO(t$}O(u%PO~O!X*bO!V({P~P!3XOo*nO!P*fO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO(`!mO~O!Z*kO~P!4|O#P$dOk(ZX}(ZX!P(ZX(t(ZX(u(ZX!Y(ZX#](ZX~Og(ZX#}(ZX~P!5uOk*sO#]*rOg(YX!Y(YX~O!Y*tOg(XX~O(O&WOg(XP~Op*wO~O!i*|O~O(O(rO~Om+QO!P%fO!X#iO![%gO!y]O#f#lO#g#iO(O%eO!h(nP~O!d#vO#h+RO~O!P%fO!X+TO!Y(YO![%gO(O%eO!V(qP~Op'XO!P+VO!X+UO(QTO(TUO(`(xO~O!Z(sP~P!8uO!Y+WOa)PX'u)PX~OP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa!ga!Y!ga'u!ga's!ga!V!ga!h!gas!ga![!ga%f!ga!d!ga~P!9mOR#zO}#yO!P#{O!i#xO([VOP!oa[!oao!oa!Y!oa!m!oa#O!oa#k!oa#l!oa#m!oa#n!oa#o!oa#p!oa#q!oa#r!oa#s!oa#u!oa#w!oa#y!oa#z!oa(m!oa(t!oa(u!oa~Oa!oa'u!oa's!oa!V!oa!h!oas!oa![!oa%f!oa!d!oa~P!<TOR#zO}#yO!P#{O!i#xO([VOP!qa[!qao!qa!Y!qa!m!qa#O!qa#k!qa#l!qa#m!qa#n!qa#o!qa#p!qa#q!qa#r!qa#s!qa#u!qa#w!qa#y!qa#z!qa(m!qa(t!qa(u!qa~Oa!qa'u!qa's!qa!V!qa!h!qas!qa![!qa%f!qa!d!qa~P!>kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![!eO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(QTO(TUO([VO(j[O(y<xO~O(O;zO~P##_O!Y-TO!Z(dX~O!Z-VO~O!d,}O#],|O!Y#eX!Z#eX~O!Y-WO!Z(sX~O!Z-YO~O!`-ZO!a-ZO(P!lO~P#!|O!Z-^O~P'_Ok-aO![']O~O!V-fO~Op!xa!_!xa!`!xa!a!xa#Q!xa#R!xa#S!xa#T!xa#U!xa#X!xa#Y!xa(P!xa(Q!xa(T!xa(`!xa(j!xa~P!#ZO!m-kO#]-iO~PCSO!`-mO!a-mO(P!lO~PCrOa%lO#]-iO'u%lO~Oa%lO!d#vO#]-iO'u%lO~Oa%lO!d#vO!m-kO#]-iO'u%lO(m'mO~O'z'uO'{'uO'|-rO~Os-sO~O!V'Sa!Y'Sa~P!9mO!X-wO!V'SX!Y'SX~P%[O!Y(RO!V(ca~O!V(ca~PGfO!Y(YO!V(qa~O!P%fO!X-{O![%gO(O%eO!V'YX!Y'YX~O#]-}O!Y(oa!h(oaa(oa'u(oa~O!d#vO~P#+eO!Y(fO!h(na~O!P%fO![%gO#g.RO(O%eO~Om.WO!P%fO!X.TO![%gO!y]O#f.VO#g.TO(O%eO!Y']X!h']X~OR.[O!i#xO~Oh%VOk._O![']O%f.^O~Oa#`i!Y#`i'u#`i's#`i!V#`i!h#`is#`i![#`i%f#`i!d#`i~P!9mOk=UO})zO!P){O(t$}O(u%PO~O#h#[aa#[a#]#[a'u#[a!Y#[a!h#[a![#[a!V#[a~P#.aO#h(ZXP(ZXR(ZX[(ZXa(ZXo(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX'u(ZX([(ZX(m(ZX!h(ZX!V(ZX's(ZXs(ZX![(ZX%f(ZX!d(ZX~P!5uO!Y.lO!h(fX~P!9mO!h.oO~O!V.qO~OP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jia#jio#ji!Y#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#k#ji~P#1|O#k$OO~P#1|OP$[OR#zOo$aO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO[#jia#ji!Y#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#o#ji~P#4kO#o$QO~P#4kOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO([VOa#ji!Y#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#u#ji~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO([VO(u#}Oa#ji!Y#ji#y#ji#z#ji'u#ji(m#ji(t#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#w$UO~P#9pO#w#ji~P#9pO#u$SO~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO([VO(t#|O(u#}Oa#ji!Y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#y#ji~P#<fO#y$WO~P#<fOP]XR]X[]Xo]X}]X!P]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X!Y]X!Z]X~O#}]X~P#?TOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O#y;bO#z;cO([VO(m$YO(t#|O(u#}O~O#}.sO~P#AbO#P$dO#];iO$P;iO#}(bX!Z(bX~P! YOa'`a!Y'`a'u'`a's'`a!h'`a!V'`as'`a!['`a%f'`a!d'`a~P!9mO[#jia#jio#ji!Y#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO(t#ji(u#ji~P#DdOk=UO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P#DdO!Y.wOg(kX~P!0kOg.yO~Oa$Oi!Y$Oi'u$Oi's$Oi!V$Oi!h$Ois$Oi![$Oi%f$Oi!d$Oi~P!9mO$[.zO$^.zO~O$[.{O$^.{O~O!d)dO#].|O![$bX$Y$bX$[$bX$^$bX$e$bX~O!X.}O~O![)gO$Y/PO$[)fO$^)fO$e/QO~O!Y;dO!Z(aX~P#AbO!Z/RO~O!d)dO$e(vX~O$e/TO~Ou)uO(])vO(^/WO~O!V/[O~P!&_O(t$}Ok%^a}%^a!P%^a(u%^a!Y%^a#]%^a~Og%^a#}%^a~P#K^O(u%POk%`a}%`a!P%`a(t%`a!Y%`a#]%`a~Og%`a#}%`a~P#LPO!YfX!dfX!hfX!h$xX(mfX~P!/gO!X/eO!Y(YO(O/dO!V(qP!V({P~P!1YOo*nO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO~Op'XO!P/fO!X+UO!Z*kO(QTO(TUO(`;wO!Z(sP~P#MjO!h/gO~P#.aO!Y/hO!d#vO(m'mO!h(zX~O!h/mO~O!P%fO!X*YO![%gO(O%eO!h(zP~O#h/oO~O!V$xX!Y$xX!d%PX~P!/gO!Y/pO!V({X~P#.aO!d/rO~O!V/tO~Oh%VOo/xO!d#vO!i%cO(m'mO~O(O/zO~O!d+cO~Oa%lO!Y0OO'u%lO~O!Z0QO~P!4|O!`0RO!a0RO(P!lO(`!mO~O!P0TO(`!mO~O#X0UO~Og%^a!Y%^a#]%^a#}%^a~P!0kOg%`a!Y%`a#]%`a#}%`a~P!0kO(O&WOg'iX!Y'iX~O!Y*tOg(Xa~Og0_O~OR0`O}0`O!P0aO#P$dOkza(tza(uza!Yza#]za~Ogza#}za~P$%]O})zO!P){Ok$qa(t$qa(u$qa!Y$qa#]$qa~Og$qa#}$qa~P$&UO})zO!P){Ok$sa(t$sa(u$sa!Y$sa#]$sa~Og$sa#}$sa~P$&wO#h0dO~Og%Ra!Y%Ra#]%Ra#}%Ra~P!0kO!d#vO~O#h0gO~O!Y+WOa)Pa'u)Pa~OR#zO}#yO!P#{O!i#xO([VOP!oi[!oio!oi!Y!oi!m!oi#O!oi#k!oi#l!oi#m!oi#n!oi#o!oi#p!oi#q!oi#r!oi#s!oi#u!oi#w!oi#y!oi#z!oi(m!oi(t!oi(u!oi~Oa!oi'u!oi's!oi!V!oi!h!ois!oi![!oi%f!oi!d!oi~P$(fOh%VOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~Om0pO(O0oO~P$*|O!d+cOa(Wa![(Wa'u(Wa!Y(Wa~O#h0vO~O[]X!YfX!ZfX~O!Y0wO!Z)TX~O!Z0yO~O[0zO~Ob0|O(O+kO(QTO(TUO~O![%}O(O%eO`'qX!Y'qX~O!Y+pO`)Sa~O!h1PO~P!9mO[1SO~O`1TO~O#]1WO~Ok1ZO![$|O~O(`(xO!Z)QP~Oh%VOk1dO![1aO%f1cO~O[1nO!Y1lO!Z)RX~O!Z1oO~O`1qOa%lO'u%lO~O(O#nO(QTO(TUO~O#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O#s1tO&W1uOa(bX~P$0dO#]$eO#s1tO&W1uO~Oa1wO~P%[Oa1yO~O&a1|OP&_iQ&_iS&_iY&_ia&_id&_ie&_im&_io&_ip&_iq&_iw&_iy&_i{&_i!P&_i!T&_i!U&_i![&_i!f&_i!i&_i!l&_i!m&_i!n&_i!p&_i!r&_i!u&_i!y&_i#t&_i$V&_i%e&_i%g&_i%i&_i%j&_i%k&_i%n&_i%p&_i%s&_i%t&_i%v&_i&S&_i&Y&_i&[&_i&^&_i&`&_i&c&_i&i&_i&o&_i&q&_i&s&_i&u&_i&w&_i's&_i(O&_i(Q&_i(T&_i([&_i(j&_i(y&_i!Z&_ib&_i&f&_i~Ob2SO!Z2QO&f2RO~P`O![XO!i2UO~O&m,sOP&hiQ&hiS&hiY&hia&hid&hie&him&hio&hip&hiq&hiw&hiy&hi{&hi!P&hi!T&hi!U&hi![&hi!f&hi!i&hi!l&hi!m&hi!n&hi!p&hi!r&hi!u&hi!y&hi#t&hi$V&hi%e&hi%g&hi%i&hi%j&hi%k&hi%n&hi%p&hi%s&hi%t&hi%v&hi&S&hi&Y&hi&[&hi&^&hi&`&hi&c&hi&i&hi&o&hi&q&hi&s&hi&u&hi&w&hi's&hi(O&hi(Q&hi(T&hi([&hi(j&hi(y&hi!Z&hi&a&hib&hi&f&hi~O!V2[O~O!Y!^a!Z!^a~P#AbOp!nO!P!oO!X2bO(`!mO!Y'TX!Z'TX~P@YO!Y-TO!Z(da~O!Y'ZX!Z'ZX~P!8uO!Y-WO!Z(sa~O!Z2iO~P'_Oa%lO#]2rO'u%lO~Oa%lO!d#vO#]2rO'u%lO~Oa%lO!d#vO!m2vO#]2rO'u%lO(m'mO~Oa%lO'u%lO~P!9mO!Y$_Os$oa~O!V'Si!Y'Si~P!9mO!Y(RO!V(ci~O!Y(YO!V(qi~O!V(ri!Y(ri~P!9mO!Y(oi!h(oia(oi'u(oi~P!9mO#]2xO!Y(oi!h(oia(oi'u(oi~O!Y(fO!h(ni~O!P%fO![%gO!y]O#f2}O#g2|O(O%eO~O!P%fO![%gO#g2|O(O%eO~Ok3UO![']O%f3TO~Oh%VOk3UO![']O%f3TO~O#h%^aP%^aR%^a[%^aa%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^as%^a![%^a%f%^a!d%^a~P#K^O#h%`aP%`aR%`a[%`aa%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`as%`a![%`a%f%`a!d%`a~P#LPO#h%^aP%^aR%^a[%^aa%^ao%^a!Y%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^a#]%^as%^a![%^a%f%^a!d%^a~P#.aO#h%`aP%`aR%`a[%`aa%`ao%`a!Y%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`a#]%`as%`a![%`a%f%`a!d%`a~P#.aO#hzaPza[zaazaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza'uza([za(mza!hza!Vza'szasza![za%fza!dza~P$%]O#h$qaP$qaR$qa[$qaa$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa'u$qa([$qa(m$qa!h$qa!V$qa's$qas$qa![$qa%f$qa!d$qa~P$&UO#h$saP$saR$sa[$saa$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa'u$sa([$sa(m$sa!h$sa!V$sa's$sas$sa![$sa%f$sa!d$sa~P$&wO#h%RaP%RaR%Ra[%Raa%Rao%Ra!Y%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra'u%Ra([%Ra(m%Ra!h%Ra!V%Ra's%Ra#]%Ras%Ra![%Ra%f%Ra!d%Ra~P#.aOa#`q!Y#`q'u#`q's#`q!V#`q!h#`qs#`q![#`q%f#`q!d#`q~P!9mO!X3^O!Y'UX!h'UX~P%[O!Y.lO!h(fa~O!Y.lO!h(fa~P!9mO!V3aO~O#}!ka!Z!ka~PKPO#}!ga!Y!ga!Z!ga~P#AbO#}!oa!Z!oa~P!<TO#}!qa!Z!qa~P!>kOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O<QO~P!1YOmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0kO!X4YO!V'cX!Y'cX~P!3XO!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O!P4hO(`!mO~O(t$}Ok%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%.wO(u%POk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%/jOg(Yi!Y(Yi~P!0kO#]4mOg(Yi!Y(Yi~P!0kO!h4pO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4tO~O!Y4uO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4xOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4xO~Ob5OO%g5PO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5TO~O`5UO~Oa%lO'u%lO~P#.aO![$|O~P#.aO!Y5^O#]5`O!Z)QX~O!Z5aO~Oo5hOp!nO!P5bO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5gO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5fO~P%4tOk5mO![1aO%f5lO~Oh%VOk5mO![1aO%f5lO~Ob5tO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5vO~O`5zO~O#s5}O&W6OO~PMlO!h6PO~P%[Oa6RO~Oa6RO~P%[Ob2SO!Z6WO&f2RO~P`O!d6YO~O!d6[Oh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#AbO#]6]O!Y#ei!Z#ei~O!Y!^i!Z!^i~P#AbOa%lO#]6fO'u%lO~Oa%lO!d#vO#]6fO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6mO(O%eO~O![']O%f6pO~Ok6tO![']O%f6pO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%)nO#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%*aO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%.wO#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%/jO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#AbOP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%G^O#k;YO~P%G^OP$[OR#zOo;fO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO[#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#o#ji~P%IfO#o;[O~P%IfOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O([VO#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#u#ji~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w;`O~P%MoO#w#ji~P%MoO#u;^O~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O([VO(t#|O(u#}O#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#y#ji~P&!OO#y;bO~P&!OOa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mO[#jio#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO(t#ji(u#ji~P&$zOk=VO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P&$zO#P$dOP(ZXR(ZX[(ZXk(ZXo(ZX}(ZX!P(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX#}(ZX([(ZX(m(ZX(t(ZX(u(ZX!Y(ZX!Z(ZX~O#}$Oi!Y$Oi!Z$Oi~P#AbO#}!oi!Z!oi~P$(fOg'Xa!Y'Xa~P!0kO!Z7WO~O!Y'`a!Z'`a~P#AbOP]XR]X[]Xo]X}]X!P]X!V]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!d%WX#s%WX~P&+QO!d#vO(m'mO!Y'aa!h'aa~O!Y/hO!h(zi~O!Y/hO!d#vO!h(zi~Og$zq!Y$zq#]$zq#}$zq~P!0kO!V'ca!Y'ca~P#.aO!d7_O~O!Y/pO!V({i~P#.aO!Y/pO!V({i~O!V7cO~O!d#vO#s7hO~Oo7iO!d#vO(m'mO~O})zO!P){O(u%POk'fa(t'fa!Y'fa#]'fa~Og'fa#}'fa~P&/pO})zO!P){Ok'ha(t'ha(u'ha!Y'ha#]'ha~Og'ha#}'ha~P&0cO!V7lO~Og$|q!Y$|q#]$|q#}$|q~P!0kOa$my!Y$my'u$my's$my!V$my!h$mys$my![$my%f$my!d$my~P!9mO!d6[O~O!Y4uO![(|a~O![']OP$SaR$Sa[$Sao$Sa}$Sa!P$Sa!Y$Sa!i$Sa!m$Sa#O$Sa#k$Sa#l$Sa#m$Sa#n$Sa#o$Sa#p$Sa#q$Sa#r$Sa#s$Sa#u$Sa#w$Sa#y$Sa#z$Sa([$Sa(m$Sa(t$Sa(u$Sa~O%f6pO~P&2lOa#`y!Y#`y'u#`y's#`y!V#`y!h#`ys#`y![#`y%f#`y!d#`y~P!9mO[7qO~Ob7sO(O+kO(QTO(TUO~O!Y0wO!Z)Ti~O`7wO~O(`(xO!Y'lX!Z'lX~O!Y5^O!Z)Qa~O!Z8QO~P%4tOp!nO!P8RO(QTO(TUO(`!mO(j!sO~O#X8SO~O![1aO~O![1aO%f8UO~Ok8XO![1aO%f8UO~O[8^O!Y'oa!Z'oa~O!Y1lO!Z)Ri~O!h8bO~O!h8cO~O!h8fO~O!h8fO~P%[Oa8hO~O!d8iO~O!h8jO~O!Y(ri!Z(ri~P#AbOa%lO#]8rO'u%lO~O!Y(oy!h(oya(oy'u(oy~P!9mO!Y(fO!h(ny~O%f8uO~P&2lO![']O%f8uO~O#h$zqP$zqR$zq[$zqa$zqo$zq!Y$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq'u$zq([$zq(m$zq!h$zq!V$zq's$zq#]$zqs$zq![$zq%f$zq!d$zq~P#.aO#h'faP'faR'fa['faa'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa'u'fa(['fa(m'fa!h'fa!V'fa's'fas'fa!['fa%f'fa!d'fa~P&/pO#h'haP'haR'ha['haa'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha'u'ha(['ha(m'ha!h'ha!V'ha's'has'ha!['ha%f'ha!d'ha~P&0cO#h$|qP$|qR$|q[$|qa$|qo$|q!Y$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q'u$|q([$|q(m$|q!h$|q!V$|q's$|q#]$|qs$|q![$|q%f$|q!d$|q~P#.aO!Y'Ui!h'Ui~P!9mO#}#`q!Y#`q!Z#`q~P#AbO(t$}OP%^aR%^a[%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a#}%^a([%^a(m%^a!Y%^a!Z%^a~Ok%^a}%^a!P%^a(u%^a~P&CoO(u%POP%`aR%`a[%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a#}%`a([%`a(m%`a!Y%`a!Z%`a~Ok%`a}%`a!P%`a(t%`a~P&EsOk=VO})zO!P){O(u%PO~P&CoOk=VO})zO!P){O(t$}O~P&EsOR0`O}0`O!P0aO#P$dOPza[zakzaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza#}za([za(mza(tza(uza!Yza!Zza~O})zO!P){OP$qaR$qa[$qak$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa#}$qa([$qa(m$qa(t$qa(u$qa!Y$qa!Z$qa~O})zO!P){OP$saR$sa[$sak$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa#}$sa([$sa(m$sa(t$sa(u$sa!Y$sa!Z$sa~Ok=VO})zO!P){O(t$}O(u%PO~OP%RaR%Ra[%Rao%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra#}%Ra([%Ra(m%Ra!Y%Ra!Z%Ra~P&NlO#}$lq!Y$lq!Z$lq~P#AbO#}$mq!Y$mq!Z$mq~P#AbO!Z9SO~O#}9TO~P!0kO!d#vO!Y'ai!h'ai~O!d#vO(m'mO!Y'ai!h'ai~O!Y/hO!h(zq~O!V'ci!Y'ci~P#.aO!Y/pO!V({q~Oo9[O!d#vO(m'mO~O!V9]O~P#.aO!V9]O~O!d#vO#s9bO~Og(Yy!Y(Yy~P!0kO!Y'ja!['ja~P#.aOa%Yq![%Yq'u%Yq!Y%Yq~P#.aO[9dO~O!Y0wO!Z)Tq~O#]9hO!Y'la!Z'la~O!Y5^O!Z)Qi~P#AbO!P4hO~O![1aO%f9lO~O(QTO(TUO(`9qO~O!Y1lO!Z)Rq~O!h9tO~O!h9uO~O!h9vO~O!h9vO~P%[O#]9yO!Y#ey!Z#ey~O!Y#ey!Z#ey~P#AbO%f:OO~P&2lO![']O%f:OO~O#}#{y!Y#{y!Z#{y~P#AbOP$ziR$zi[$zio$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi#}$zi([$zi(m$zi!Y$zi!Z$zi~P&NlO})zO!P){O(u%POP'eaR'ea['eak'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea#}'ea(['ea(m'ea(t'ea!Y'ea!Z'ea~O})zO!P){OP'gaR'ga['gak'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga#}'ga(['ga(m'ga(t'ga(u'ga!Y'ga!Z'ga~O(t$}OP%^iR%^i[%^ik%^io%^i}%^i!P%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i#}%^i([%^i(m%^i(u%^i!Y%^i!Z%^i~O(u%POP%`iR%`i[%`ik%`io%`i}%`i!P%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i#}%`i([%`i(m%`i(t%`i!Y%`i!Z%`i~O#}$my!Y$my!Z$my~P#AbO#}#`y!Y#`y!Z#`y~P#AbO!d#vO!Y'aq!h'aq~O!Y/hO!h(zy~O!V'cq!Y'cq~P#.aOo:YO!d#vO(m'mO~O!V:ZO~P#.aO!V:ZO~O!Y0wO!Z)Ty~O!Y5^O!Z)Qq~O![1aO%f:cO~O!h:fO~O%f:kO~P&2lOP$zqR$zq[$zqo$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq#}$zq([$zq(m$zq!Y$zq!Z$zq~P&NlO})zO!P){O(u%POP'faR'fa['fak'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa#}'fa(['fa(m'fa(t'fa!Y'fa!Z'fa~O})zO!P){OP'haR'ha['hak'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha#}'ha(['ha(m'ha(t'ha(u'ha!Y'ha!Z'ha~OP$|qR$|q[$|qo$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q#}$|q([$|q(m$|q!Y$|q!Z$|q~P&NlOg%b!Z!Y%b!Z#]%b!Z#}%b!Z~P!0kOo:oO!d#vO(m'mO~O!V:pO~P#.aO!Y'lq!Z'lq~P#AbO!Y#e!Z!Z#e!Z~P#AbO#h%b!ZP%b!ZR%b!Z[%b!Za%b!Zo%b!Z!Y%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z'u%b!Z([%b!Z(m%b!Z!h%b!Z!V%b!Z's%b!Z#]%b!Zs%b!Z![%b!Z%f%b!Z!d%b!Z~P#.aOo:xO!d#vO(m'mO~OP%b!ZR%b!Z[%b!Zo%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z#}%b!Z([%b!Z(m%b!Z!Y%b!Z!Z%b!Z~P&NlOs(aX~P1qO}%pO~P!(oO(P!lO~P!(oO!VfX!YfX#]fX~P&+QOP]XR]X[]Xo]X}]X!P]X!Y]X!YfX!i]X!m]X#O]X#P]X#]]X#]fX#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!dfX!h]X!hfX(mfX~P'BxOP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![XO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(O)XO(QTO(TUO([VO(j[O(y<xO~O!Y;dO!Z$oa~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;oO!P${O![$|O!f=PO!i$xO#g;uO$V%_O$r;qO$t;sO$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~O#t)`O~P'GnOo!bX(m!bX~P# ZO!Z]X!ZfX~P'BxO!VfX!V$xX!YfX!Y$xX#]fX~P!/gO#h;XO~O!d#vO#h;XO~O#];iO~O#s;]O~O#];xO!Y(rX!Z(rX~O#];iO!Y(pX!Z(pX~O#h;yO~Og;{O~P!0kO#h<RO~O#h<SO~O!d#vO#h<TO~O!d#vO#h;yO~O#}<UO~P#AbO#h<VO~O#h<WO~O#h<]O~O#h<^O~O#h<_O~O#h<`O~O#}<aO~P!0kO#}<bO~P!0kO#P#Q#R#T#U#X#f#g#r(y$r$t$w%Z%e%f%g%n%p%s%t%v%x~'yT#l!U'w(P#mp#k#no}'x$['x(O$^(`~",
  104529. goto: "$4Q)XPPPPPP)YPP)]P)nP+O/PPPPP5xPP6`PP<V?mP@QP@QPPP@QPBRP@QP@QP@QPBVPB[PByPGrPPPGvPPPPGvJxPPPKOKzPGvPGvPPNYGvPPPGvPGvP!!aGvP!%v!&{!'UP!'x!'|!'x!+YPPPPPPP!+y!&{PP!,Z!-gP!0jGvGv!0o!3z!8b!8b!<`PPP!<hGvPPPPPPPPPPP!?vP!ATPPGv!BfPGvPGvGvGvGvGvPGv!CxP!GRP!JWP!J[!Jf!Jj!JjP!GOP!Jn!JnP!MsP!MwGvGv!M}##RBV@QP@QP@Q@QP#$_@Q@Q#&j@Q#)Z@Q#+`@Q@Q#,O#.]#.]#.b#.k#.]#.wP#.]P@Q#/a@Q#3S@Q@Q5xPPP#6{PPP#7f#7fP#7fP#7|#7fPP#8SP#7yP#7y#8g#7y#9R#9X5u)]#9[)]P#9c#9c#9cP)]P)]P)]P)]PP)]P#9i#9lP#9l)]P#9pP#9sP)]P)]P)]P)]P)]P)])]PP#9y#:P#:[#:b#:h#:n#:t#;S#;Y#;d#;j#;t#;z#<[#<b#=S#=f#=l#=r#>Q#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U*y%[;n;oQ+n%}Q,^&dQ,e&lQ0m+aQ0q+cQ0|+oQ1s,cQ3Q._Q5O0wQ5t1lQ6r3UQ7s5PR8x6t'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{t!nQ!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5g$|$ti#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ&U|Q'R!eU'X%g*V-WQ+n%}Q,^&dQ0c*|Q0|+oQ1R+uQ1r,bQ1s,cQ5O0wQ5X1TQ5t1lQ5w1nQ5x1qQ7s5PQ7v5UQ8a5zQ9g7wR9r8^rnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR,`&h&x^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<z<{[#]WZ#W#Z'U(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ%uxQ%yyS&O|&TQ&[!TQ'`!hQ'b!iQ(m#sS+h%z%{Q+l%}Q,V&_Q,Z&aS-d'c'dQ.a(nQ0u+iQ0{+oQ0}+pQ1Q+tQ1f,WS1j,[,]Q2n-eQ4}0wQ5R0zQ5W1SQ5s1kQ7r5PQ7u5TQ9c7qR:^9d!O$zi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R!S%wy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dQ+b%uQ+{&XQ,O&YQ,Y&aQ.`(mQ1e,VU1i,Z,[,]Q3V.aQ5n1fS5r1j1kQ8]5s#^<|#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo<};g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bW%Ti%V*t<xS&X!Q&fQ&Y!RQ&Z!SR+y&V$}%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VT)v$u)wV*y%[;n;oW'X!e%g*V-WS(y#y#zQ+]%pQ+s&QS.Y(i(jQ1[,PQ4n0`R7{5^'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{$i$^c#Y#e%o%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.t.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oT#TV#U'PkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q'V!eR2c-Tv!nQ!e!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5gU*d$|*V*jS/y*e*lQ0S*mQ1^,RQ4d0RR4g0UnqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&v!^Q's!xS(o#u;XQ+f%xQ,T&[Q,U&^Q-b'aQ-o'lS.j(t;yS0f+R<TQ0s+gQ1`,SQ2T,rQ2V,sQ2_-OQ2l-cQ2o-gS4s0g<_Q4y0tS4|0v<`Q6^2aQ6b2mQ6g2tQ7p4zQ8m6`Q8n6cQ8q6hR9x8j$d$]c#Y#e%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oS(k#p'fQ({#zS+[%o.tS.Z(j(lR3O.['OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S#q];QQ&q!XQ&r!YQ&t![Q&u!]R1{,nQ'^!hQ+_%uQ-`'`S.](m+bQ2j-_W3S.`.a0l0nQ6a2kW6n3P3R3V4wU8t6o6q6sU9}8v8w8yS:i9|:PQ:t:jR:z:uU!wQ']-]T5c1a5e!Q_OXZ`st!V!Z#d#h%c%k&f&h&o&q&r&t(f,k,p.S1|2P]!pQ!r']-]1a5eT#q];Q%[{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS(y#y#zS.Y(i(j!s<f$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U$fd)Z,eS(l#p'fU*q%R(s3pU0b*x.f7PQ4w0mQ6o3QQ8w6rR:P8xm!tQ!r!v!y!z']'i'j'k-]-m1a5e5gQ'q!uS(b#g1vS-k'h'tQ/k*XQ/w*dQ2v-nQ4U/lS4_/x0SQ7Z4PS7f4e4gQ9V7[Q9Z7cQ9`7iS:X9[9]S:n:Y:ZS:w:o:pR:}:xQ#wbQ'p!uS(a#g1vS(c#m+QQ+S%dQ+d%vQ+j%|U-j'h'q'tQ.O(bQ/j*XQ/v*dQ/|*gQ0r+eQ1g,XS2s-k-nQ2{.WS4T/k/lS4^/w0SQ4a/{Q4c/}Q5p1hQ6i2vQ7Y4PQ7^4US7b4_4gQ7g4fQ8Z5qS9U7Z7[Q9Y7cQ9^7fQ9a7jQ9o8[Q:V9VS:W9Z9]Q:[9`Q:e9pS:m:X:ZS:v:n:pQ:|:wQ;O:}Q<i<dQ<t<mR<u<nV!wQ']-]%[aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS#wz!j!r<c$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<i<z%[bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rQ%dj!S%vy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dS%|z!jQ+e%wQ,X&aW1h,Y,Z,[,]U5q1i1j1kS8[5r5sQ9p8]!r<d$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q<m<yR<n<z%OeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rY#bWZ#W#Z(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ,f&l!p<e$Z$n)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<h'UU'Y!e%g*VR2e-W%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8r!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q,e&lQ0m+aQ3Q._Q6r3UR8x6t!b$Tc#Y%o(O(U(p(u)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!P;_)Y)m-R.t2]2`3b3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!f$Vc#Y%o(O(U(p(u)S)T)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!T;a)Y)m-R.t2]2`3b3h3i3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!^$Zc#Y%o(O(U(p(u)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;RQ3}/cz<{)Y)m-R.t2]2`3b3q3y6_6z7T7U7}8l8z9Q9R:`:g<oQ=Q=SR=R=T'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S$oh$pR3v.|'VgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$kf$qQ$ifS)f$l)jR)r$qT$jf$qT)h$l)j'VhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$oh$pQ$rhR)q$p%[jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8r!s<y$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{#elOPXZst!Z!`!o#S#d#o#{$n%k&h&k&l&o&q&r&t&x'Q'_(z)o+V+a,h,k,p-a._.}/f0a1d1t1u1w1y1|2P2R3U3u5b5m5}6O6R6t8R8X8h!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=VQ*}%`Q/Y)zo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!O$yi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=RQ*^$zU*g$|*V*jQ+O%aQ/}*h#^<k#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn<l;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bQ<p<|Q<q<}Q<r=OR<s=P!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bnoOXst!Z#d%k&o&q&r&t,k,p1|2PS*a${*UQ,y&{Q,z&}R4X/p$|%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ+|&YQ1Y,OQ5[1XR7z5]V*i$|*V*jU*i$|*V*jT5d1a5eU/{*f/f5bS4f0T8RR7j4hQ+d%vQ/|*gQ0r+eQ1g,XQ5p1hQ8Z5qQ9o8[R:e9p!O%Oi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rr)}$v)a*O*p+P/n0Z0[3s4V4q7X7k:U<j<v<wS0V*o0W#^;j#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;k;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!`;|(q)_*W*`.b.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=T`;}3o6{7O7S8{:Q:T:{S<X.d3ZT<Y6}9O!O%Qi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rv*P$v)a*Q*o+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<wS0X*p0Y#^;l#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;m;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!d<O(q)_*W*`.c.d.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=Td<P3o6|6}7S8{8|:Q:R:T:{S<Z.e3[T<[7O9PrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ&c!UR,h&lrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR&c!UQ,Q&ZR1U+ysnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ1b,VS5k1e1fU8T5i5j5nS9k8V8WS:a9j9mQ:q:bR:y:rQ&j!VR,a&fR5w1nS&O|&TR0}+pQ&o!WR,k&pR,q&uT1},p2PR,u&vQ,t&vR2W,uQ'v!{R-q'vSsOtQ#dXT%ns#dQ#OTR'x#OQ#RUR'z#RQ)w$uR/V)wQ#UVR'|#UQ#XWU(S#X(T-xQ(T#YR-x(UQ-U'VR2d-UQ.m(uS3_.m3`R3`.nQ-]']R2h-]Y!rQ']-]1a5eR'g!rQ.x)aR3t.xU#_W%f*UU(Z#_([-yQ([#`R-y(VQ-X'YR2f-Xt`OXst!V!Z#d%k&f&h&o&q&r&t,k,p1|2PS#hZ%cU#r`#h.SR.S(fQ(g#jQ.P(cW.X(g.P2y6kQ2y.QR6k2zQ)j$lR/O)jQ$phR)p$pQ$`cU)]$`-t;eQ-t;RR;e)mQ/i*XW4R/i4S7]9WU4S/j/k/lS7]4T4UR9W7^$Z)|$v(q)_)a*W*`*o*p*z*{+P.d.e.g.h.i/U/Z/_/a/c/n/s0Z0[0k1V1X3W3X3Y3o3s4V4W4[4i4k4q5Z5]6u6v6w6x6}7O7Q7R7S7X7`7d7k7m7o8{8|8}9X9_:Q:R:S:T:U:]:l:{<j<v<w=S=TQ/q*`U4Z/q4]7aQ4]/sR7a4[S*j$|*VR0P*jr*O$v)a*o*p+P/n0Z0[3s4V4q7X7k:U<j<v<w!`.b(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=TU/`*O.b6{a6{3o6}7O7S8{:Q:T:{Q0W*oQ3Z.dU4j0W3Z9OR9O6}v*Q$v)a*o*p+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<w!d.c(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=TU/b*Q.c6|e6|3o6}7O7S8{8|:Q:R:T:{Q0Y*pQ3[.eU4l0Y3[9PR9P7OQ*u%UR0^*uQ4v0kR7n4vQ+X%iR0j+XQ5_1[S7|5_9iR9i7}Q,S&[R1_,SQ5e1aR8P5eQ1m,^S5u1m8_R8_5wQ0x+lW5Q0x5S7t9eQ5S0{Q7t5RR9e7uQ+q&OR1O+qQ2P,pR6V2PYrOXst#dQ&s!ZQ+Z%kQ,j&oQ,l&qQ,m&rQ,o&tQ1z,kS1},p2PR6U1|Q%mpQ&w!_Q&z!aQ&|!bQ'O!cQ'n!uQ+Y%jQ+f%xQ+x&UQ,`&jQ,w&yW-h'h'p'q'tQ-o'lQ0O*iQ0s+gS1p,a,dQ2X,vQ2Y,yQ2Z,zQ2o-gW2q-j-k-n-pQ4y0tQ5V1RQ5Y1VQ5o1gQ5y1rQ6T1{U6d2p2s2vQ6g2tQ7p4zQ7x5XQ7y5ZQ8O5dQ8Y5pQ8`5xS8o6e6iQ8q6hQ9f7vQ9n8ZQ9s8aQ9z8pQ:_9gQ:d9oQ:h9{R:s:eQ%xyQ'a!iQ'l!uU+g%y%z%{Q-O'SU-c'b'c'dS-g'h'rQ/u*dS0t+h+iQ2a-QS2m-d-eQ2t-lQ4`/yQ4z0uQ6`2gQ6c2nQ6h2uR7e4dS$wi<xR*v%VU%Ui%V<xR0]*tQ$viS(q#v+cS)_$b$cQ)a$dQ*W$xS*`${*UQ*o%OQ*p%QQ*z%]Q*{%^Q+P%bQ.d;jQ.e;lQ.g;pQ.h;rQ.i;tQ/U)uS/Z){/]Q/_)}Q/a*PQ/c*RQ/n*[S/s*b/eQ0Z*rQ0[*sh0k+`.^1c3T5l6p8U8u9l:O:c:kQ1V+zQ1X+}Q3W;|Q3X<OQ3Y<RS3o;g;hQ3s.wQ4V/oQ4W/pQ4[/rQ4i0VQ4k0XQ4q0dQ5Z1WQ5]1ZQ6u<VQ6v<XQ6w<ZQ6x<]Q6};kQ7O;mQ7Q;qQ7R;sQ7S;uQ7X3}Q7`4YQ7d4bQ7k4mQ7m4uQ7o4xQ8{<SQ8|;}Q8}<PQ9X7_Q9_7hQ:Q<WQ:R<YQ:S<[Q:T<^Q:U9TQ:]9bQ:l<aQ:{<bQ<j<xQ<v=QQ<w=RQ=S=UR=T=VQ*x%[Q.f;nR7P;onpOXst!Z#d%k&o&q&r&t,k,p1|2PQ!fPS#fZ#oQ&y!`U'e!o5b8RQ'{#SQ(|#{Q)n$nS,d&h&kQ,i&lQ,v&xQ,{'QQ-_'_Q.p(zQ/S)oS0h+V/fQ0n+aQ1x,hQ2k-aQ3R._Q3x.}Q4o0aQ5j1dQ5{1tQ5|1uQ6Q1wQ6S1yQ6X2RQ6s3UQ7V3uQ8W5mQ8d5}Q8e6OQ8g6RQ8y6tQ9m8XR9w8h#YcOPXZst!Z!`!o#d#o#{%k&h&k&l&o&q&r&t&x'Q'_(z+V+a,h,k,p-a._/f0a1d1t1u1w1y1|2P2R3U5b5m5}6O6R6t8R8X8hQ#YWQ#eYQ%ouQ%qvS%sw!gS(O#W(RQ(U#ZQ(p#uQ(u#xQ(}$OQ)O$PQ)P$QQ)Q$RQ)R$SQ)S$TQ)T$UQ)U$VQ)V$WQ)W$XQ)Y$ZQ)[$_Q)^$aQ)c$eW)m$n)o.}3uQ+^%rQ+r&PS-R'U2bQ-p'oS-u(P-wQ-z(XQ-|(`Q.k(tQ.n(vQ.r;PQ.t;SQ.u;TQ.v;WQ/X)yQ0e+RQ2],|Q2`-PQ2p-iQ2w-}Q3].lQ3b;XQ3c;YQ3d;ZQ3e;[Q3f;]Q3g;^Q3h;_Q3i;`Q3j;aQ3k;bQ3l;cQ3m.sQ3n;fQ3q;iQ3r;vQ3y;dQ4r0gQ4{0vQ6_;xQ6e2rQ6j2xQ6y3^Q6z;yQ7T;{Q7U<TQ7}5`Q8l6]Q8p6fQ8z<UQ9Q<_Q9R<`Q9{8rQ:`9hQ:g9yQ;R#SR<o<{R#[WR'W!el!tQ!r!v!y!z']'i'j'k-]-m1a5e5gS'S!e-TS-Q'T'[R2g-ZR(w#xQ!fQT-[']-]]!qQ!r']-]1a5eQ#p]R'f;QR)b$dY!uQ']-]1a5eQ'h!rS'r!v!yS't!z5gS-l'i'jQ-n'kR2u-mT#kZ%cS#jZ%cS%im,gU(c#h#i#lS.Q(d(eQ.U(fQ0i+WQ2z.RU2{.S.T.VS6l2|2}R8s6md#^W#W#Z%f(P(Y*U+T-{/er#gZm#h#i#l%c(d(e(f+W.R.S.T.V2|2}6mS*X$x*]Q/l*YQ1v,gQ2^,}Q4P/hQ6Z2UQ7[4QQ8k6[T<g'U+UV#aW%f*UU#`W%f*US(Q#W(YU(V#Z+T/eS-S'U+UT-v(P-{V'Z!e%g*VQ$lfR)t$qT)i$l)jR3w.|T*Z$x*]T*c${*UQ0l+`Q3P.^Q5i1cQ6q3TQ8V5lQ8v6pQ9j8UQ9|8uQ:b9lQ:j:OQ:r:cR:u:knqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&i!VR,`&ftmOXst!U!V!Z#d%k&f&o&q&r&t,k,p1|2PR,g&lT%jm,gR1],PR,_&dQ&S|R+w&TR+m%}T&m!W&pT&n!W&pT2O,p2P",
  104530. nodeNames: "⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",
  104531. maxTerm: 376,
  104532. context: eht,
  104533. nodeProps: [
  104534. ["isolate", -8, 5, 6, 14, 34, 36, 48, 50, 52, ""],
  104535. ["group", -26, 9, 17, 19, 65, 204, 208, 212, 213, 215, 218, 221, 231, 233, 239, 241, 243, 245, 248, 254, 260, 262, 264, 266, 268, 270, 271, "Statement", -34, 13, 14, 29, 32, 33, 39, 48, 51, 52, 54, 59, 67, 69, 73, 77, 79, 81, 82, 107, 108, 117, 118, 135, 138, 140, 141, 142, 143, 144, 146, 147, 166, 167, 169, "Expression", -23, 28, 30, 34, 38, 40, 42, 171, 173, 175, 176, 178, 179, 180, 182, 183, 184, 186, 187, 188, 198, 200, 202, 203, "Type", -3, 85, 100, 106, "ClassItem"],
  104536. ["openedBy", 23, "<", 35, "InterpolationStart", 53, "[", 57, "{", 70, "(", 159, "JSXStartCloseTag"],
  104537. ["closedBy", 24, ">", 37, "InterpolationEnd", 47, "]", 58, "}", 71, ")", 164, "JSXEndTag"]
  104538. ],
  104539. propSources: [aht],
  104540. skippedNodes: [0, 5, 6, 274],
  104541. repeatNodeCount: 37,
  104542. tokenData: "$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$h&j(Rp(U!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$h&j(U!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$h&j(j%1l(Rp(U!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$h&j(Rp(U!b$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$h&j(Rp(U!b$[#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$h&j(Rp(U!b#m(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$h&j$P(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(u+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$h&j#y(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(T';W$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$h&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$c`$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(RpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$c`(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!i/.^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!h!Lf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$h&j(Rp(U!b(P%&f#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$h&j(Rp(U!b#k(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$h&j(Rp(U!bo+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!Y+Jf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$h&j(Rp(U!b}.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_!X!L^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$h&j(Rp(U!b#l(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$h&j(U!b!U7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$h&j!U7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$h&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$h&j(Rp!U7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$h&j(Rp!U7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Rp!U7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Rp!U7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(RpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$h&j(RpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$h&j(Rp(U!b!U7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Rp(U!b!U7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Rp(U!b!U7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Rp(U!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$h&j(Rp(U!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$h&j(Rp(U!b'y0/l!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$h&j(Rp(U!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$h&j(U!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$h&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(U!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$h&j(RpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(RpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Rp(U!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$h&j$P(Ch(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Y#t$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-<U(Rp(U!b(y7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$j&j(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#o(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$P(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#p(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#]*!Y$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#h(Cl$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#p(Ch$e#|$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#p(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(m(Ct$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$h&j#z(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!y$Ip$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!P0,v$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$h&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$h&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$h&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$h&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$h&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!V#)l$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#w(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$h&j(Rp(U!b([+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$h&j(Rp(U!b(O,2j$^#t(`$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$h&j(Rp(U!b$^#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X![#Hb(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(t+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z(Kd$?V_!Z(Cds`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Rp(U!b'w0/l$[#t(O,2j(`$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Rp(U!b'x0/l$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",
  104543. tokenizers: [nht, rht, iht, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, tht, new YM("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(^~~", 141, 335), new YM("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~", 25, 318)],
  104544. topRules: { Script: [0, 7], SingleExpression: [1, 272], SingleClassItem: [2, 273] },
  104545. dialects: { jsx: 0, ts: 14725 },
  104546. dynamicPrecedences: { 77: 1, 79: 1, 91: 1, 167: 1, 196: 1 },
  104547. specialized: [{ term: 322, get: (t) => oht[t] || -1 }, { term: 338, get: (t) => sht[t] || -1 }, { term: 92, get: (t) => lht[t] || -1 }],
  104548. tokenPrec: 14749
  104549. }), sle = [
  104550. /* @__PURE__ */ ui("function ${name}(${params}) {\n ${}\n}", {
  104551. label: "function",
  104552. detail: "definition",
  104553. type: "keyword"
  104554. }),
  104555. /* @__PURE__ */ ui("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}", {
  104556. label: "for",
  104557. detail: "loop",
  104558. type: "keyword"
  104559. }),
  104560. /* @__PURE__ */ ui("for (let ${name} of ${collection}) {\n ${}\n}", {
  104561. label: "for",
  104562. detail: "of loop",
  104563. type: "keyword"
  104564. }),
  104565. /* @__PURE__ */ ui("do {\n ${}\n} while (${})", {
  104566. label: "do",
  104567. detail: "loop",
  104568. type: "keyword"
  104569. }),
  104570. /* @__PURE__ */ ui("while (${}) {\n ${}\n}", {
  104571. label: "while",
  104572. detail: "loop",
  104573. type: "keyword"
  104574. }),
  104575. /* @__PURE__ */ ui(`try {
  104576. \${}
  104577. } catch (\${error}) {
  104578. \${}
  104579. }`, {
  104580. label: "try",
  104581. detail: "/ catch block",
  104582. type: "keyword"
  104583. }),
  104584. /* @__PURE__ */ ui("if (${}) {\n ${}\n}", {
  104585. label: "if",
  104586. detail: "block",
  104587. type: "keyword"
  104588. }),
  104589. /* @__PURE__ */ ui(`if (\${}) {
  104590. \${}
  104591. } else {
  104592. \${}
  104593. }`, {
  104594. label: "if",
  104595. detail: "/ else block",
  104596. type: "keyword"
  104597. }),
  104598. /* @__PURE__ */ ui(`class \${name} {
  104599. constructor(\${params}) {
  104600. \${}
  104601. }
  104602. }`, {
  104603. label: "class",
  104604. detail: "definition",
  104605. type: "keyword"
  104606. }),
  104607. /* @__PURE__ */ ui('import {${names}} from "${module}"\n${}', {
  104608. label: "import",
  104609. detail: "named",
  104610. type: "keyword"
  104611. }),
  104612. /* @__PURE__ */ ui('import ${name} from "${module}"\n${}', {
  104613. label: "import",
  104614. detail: "default",
  104615. type: "keyword"
  104616. })
  104617. ], cht = /* @__PURE__ */ sle.concat([
  104618. /* @__PURE__ */ ui("interface ${name} {\n ${}\n}", {
  104619. label: "interface",
  104620. detail: "definition",
  104621. type: "keyword"
  104622. }),
  104623. /* @__PURE__ */ ui("type ${name} = ${type}", {
  104624. label: "type",
  104625. detail: "definition",
  104626. type: "keyword"
  104627. }),
  104628. /* @__PURE__ */ ui("enum ${name} {\n ${}\n}", {
  104629. label: "enum",
  104630. detail: "definition",
  104631. type: "keyword"
  104632. })
  104633. ]), vG = /* @__PURE__ */ new flt(), lle = /* @__PURE__ */ new Set([
  104634. "Script",
  104635. "Block",
  104636. "FunctionExpression",
  104637. "FunctionDeclaration",
  104638. "ArrowFunction",
  104639. "MethodDeclaration",
  104640. "ForStatement"
  104641. ]);
  104642. function Dv(t) {
  104643. return (e, n) => {
  104644. let r = e.node.getChild("VariableDefinition");
  104645. return r && n(r, t), !0;
  104646. };
  104647. }
  104648. const fht = ["FunctionDeclaration"], dht = {
  104649. FunctionDeclaration: /* @__PURE__ */ Dv("function"),
  104650. ClassDeclaration: /* @__PURE__ */ Dv("class"),
  104651. ClassExpression: () => !0,
  104652. EnumDeclaration: /* @__PURE__ */ Dv("constant"),
  104653. TypeAliasDeclaration: /* @__PURE__ */ Dv("type"),
  104654. NamespaceDeclaration: /* @__PURE__ */ Dv("namespace"),
  104655. VariableDefinition(t, e) {
  104656. t.matchContext(fht) || e(t, "variable");
  104657. },
  104658. TypeDefinition(t, e) {
  104659. e(t, "type");
  104660. },
  104661. __proto__: null
  104662. };
  104663. function ule(t, e) {
  104664. let n = vG.get(e);
  104665. if (n)
  104666. return n;
  104667. let r = [], i = !0;
  104668. function a(o, s) {
  104669. let l = t.sliceString(o.from, o.to);
  104670. r.push({ label: l, type: s });
  104671. }
  104672. return e.cursor(Zn.IncludeAnonymous).iterate((o) => {
  104673. if (i)
  104674. i = !1;
  104675. else if (o.name) {
  104676. let s = dht[o.name];
  104677. if (s && s(o, a) || lle.has(o.name))
  104678. return !1;
  104679. } else if (o.to - o.from > 8192) {
  104680. for (let s of ule(t, o.node))
  104681. r.push(s);
  104682. return !1;
  104683. }
  104684. }), vG.set(e, r), r;
  104685. }
  104686. const gG = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, cle = [
  104687. "TemplateString",
  104688. "String",
  104689. "RegExp",
  104690. "LineComment",
  104691. "BlockComment",
  104692. "VariableDefinition",
  104693. "TypeDefinition",
  104694. "Label",
  104695. "PropertyDefinition",
  104696. "PropertyName",
  104697. "PrivatePropertyDefinition",
  104698. "PrivatePropertyName",
  104699. ".",
  104700. "?."
  104701. ];
  104702. function hht(t) {
  104703. let e = nr(t.state).resolveInner(t.pos, -1);
  104704. if (cle.indexOf(e.name) > -1)
  104705. return null;
  104706. let n = e.name == "VariableName" || e.to - e.from < 20 && gG.test(t.state.sliceDoc(e.from, e.to));
  104707. if (!n && !t.explicit)
  104708. return null;
  104709. let r = [];
  104710. for (let i = e; i; i = i.parent)
  104711. lle.has(i.name) && (r = r.concat(ule(t.state.doc, i)));
  104712. return {
  104713. options: r,
  104714. from: n ? e.from : t.pos,
  104715. validFor: gG
  104716. };
  104717. }
  104718. const of = /* @__PURE__ */ e0.define({
  104719. name: "javascript",
  104720. parser: /* @__PURE__ */ uht.configure({
  104721. props: [
  104722. /* @__PURE__ */ m4.add({
  104723. IfStatement: /* @__PURE__ */ Gg({ except: /^\s*({|else\b)/ }),
  104724. TryStatement: /* @__PURE__ */ Gg({ except: /^\s*({|catch\b|finally\b)/ }),
  104725. LabeledStatement: Mlt,
  104726. SwitchBody: (t) => {
  104727. let e = t.textAfter, n = /^\s*\}/.test(e), r = /^\s*(case|default)\b/.test(e);
  104728. return t.baseIndent + (n ? 0 : r ? 1 : 2) * t.unit;
  104729. },
  104730. Block: /* @__PURE__ */ Elt({ closing: "}" }),
  104731. ArrowFunction: (t) => t.baseIndent + t.unit,
  104732. "TemplateString BlockComment": () => null,
  104733. "Statement Property": /* @__PURE__ */ Gg({ except: /^{/ }),
  104734. JSXElement(t) {
  104735. let e = /^\s*<\//.test(t.textAfter);
  104736. return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
  104737. },
  104738. JSXEscape(t) {
  104739. let e = /\s*\}/.test(t.textAfter);
  104740. return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
  104741. },
  104742. "JSXOpenTag JSXSelfClosingTag"(t) {
  104743. return t.column(t.node.from) + t.unit;
  104744. }
  104745. }),
  104746. /* @__PURE__ */ b4.add({
  104747. "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": Voe,
  104748. BlockComment(t) {
  104749. return { from: t.from + 2, to: t.to - 2 };
  104750. }
  104751. })
  104752. ]
  104753. }),
  104754. languageData: {
  104755. closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
  104756. commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
  104757. indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
  104758. wordChars: "$"
  104759. }
  104760. }), fle = {
  104761. test: (t) => /^JSX/.test(t.name),
  104762. facet: /* @__PURE__ */ koe({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
  104763. }, pht = /* @__PURE__ */ of.configure({ dialect: "ts" }, "typescript"), vht = /* @__PURE__ */ of.configure({
  104764. dialect: "jsx",
  104765. props: [/* @__PURE__ */ v4.add((t) => t.isTop ? [fle] : void 0)]
  104766. }), ght = /* @__PURE__ */ of.configure({
  104767. dialect: "jsx ts",
  104768. props: [/* @__PURE__ */ v4.add((t) => t.isTop ? [fle] : void 0)]
  104769. }, "typescript");
  104770. let dle = (t) => ({ label: t, type: "keyword" });
  104771. const hle = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(dle), mht = /* @__PURE__ */ hle.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(dle));
  104772. function yht(t = {}) {
  104773. let e = t.jsx ? t.typescript ? ght : vht : t.typescript ? pht : of, n = t.typescript ? cht.concat(mht) : sle.concat(hle);
  104774. return new Noe(e, [
  104775. of.data.of({
  104776. autocomplete: qct(cle, Wse(n))
  104777. }),
  104778. of.data.of({
  104779. autocomplete: hht
  104780. }),
  104781. t.jsx ? Oht : []
  104782. ]);
  104783. }
  104784. function bht(t) {
  104785. for (; ; ) {
  104786. if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag")
  104787. return t;
  104788. if (t.name == "JSXEscape" || !t.parent)
  104789. return null;
  104790. t = t.parent;
  104791. }
  104792. }
  104793. function mG(t, e, n = t.length) {
  104794. for (let r = e == null ? void 0 : e.firstChild; r; r = r.nextSibling)
  104795. if (r.name == "JSXIdentifier" || r.name == "JSXBuiltin" || r.name == "JSXNamespacedName" || r.name == "JSXMemberExpression")
  104796. return t.sliceString(r.from, Math.min(r.to, n));
  104797. return "";
  104798. }
  104799. const _ht = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Oht = /* @__PURE__ */ De.inputHandler.of((t, e, n, r, i) => {
  104800. if ((_ht ? t.composing : t.compositionStarted) || t.state.readOnly || e != n || r != ">" && r != "/" || !of.isActiveAt(t.state, e, -1))
  104801. return !1;
  104802. let a = i(), { state: o } = a, s = o.changeByRange((l) => {
  104803. var u;
  104804. let { head: c } = l, f = nr(o).resolveInner(c - 1, -1), d;
  104805. if (f.name == "JSXStartTag" && (f = f.parent), !(o.doc.sliceString(c - 1, c) != r || f.name == "JSXAttributeValue" && f.to > c)) {
  104806. if (r == ">" && f.name == "JSXFragmentTag")
  104807. return { range: l, changes: { from: c, insert: "</>" } };
  104808. if (r == "/" && f.name == "JSXStartCloseTag") {
  104809. let h = f.parent, p = h.parent;
  104810. if (p && h.from == c - 2 && ((d = mG(o.doc, p.firstChild, c)) || ((u = p.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) {
  104811. let v = `${d}>`;
  104812. return { range: me.cursor(c + v.length, -1), changes: { from: c, insert: v } };
  104813. }
  104814. } else if (r == ">") {
  104815. let h = bht(f);
  104816. if (h && h.name == "JSXOpenTag" && !/^\/?>|^<\//.test(o.doc.sliceString(c, c + 2)) && (d = mG(o.doc, h, c)))
  104817. return { range: l, changes: { from: c, insert: `</${d}>` } };
  104818. }
  104819. }
  104820. return { range: l };
  104821. });
  104822. return s.changes.empty ? !1 : (t.dispatch([
  104823. a,
  104824. o.update(s, { userEvent: "input.complete", scrollIntoView: !0 })
  104825. ]), !0);
  104826. }), Sht = p4({
  104827. String: J.string,
  104828. Number: J.number,
  104829. "True False": J.bool,
  104830. PropertyName: J.propertyName,
  104831. Null: J.null,
  104832. ",": J.separator,
  104833. "[ ]": J.squareBracket,
  104834. "{ }": J.brace
  104835. }), xht = l0.deserialize({
  104836. version: 14,
  104837. states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",
  104838. stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",
  104839. goto: "!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
  104840. nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",
  104841. maxTerm: 25,
  104842. nodeProps: [
  104843. ["isolate", -2, 6, 11, ""],
  104844. ["openedBy", 7, "{", 12, "["],
  104845. ["closedBy", 8, "}", 13, "]"]
  104846. ],
  104847. propSources: [Sht],
  104848. skippedNodes: [0],
  104849. repeatNodeCount: 2,
  104850. tokenData: "(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",
  104851. tokenizers: [0],
  104852. topRules: { JsonText: [0, 1] },
  104853. tokenPrec: 0
  104854. }), wht = /* @__PURE__ */ e0.define({
  104855. name: "json",
  104856. parser: /* @__PURE__ */ xht.configure({
  104857. props: [
  104858. /* @__PURE__ */ m4.add({
  104859. Object: /* @__PURE__ */ Gg({ except: /^\s*\}/ }),
  104860. Array: /* @__PURE__ */ Gg({ except: /^\s*\]/ })
  104861. }),
  104862. /* @__PURE__ */ b4.add({
  104863. "Object Array": Voe
  104864. })
  104865. ]
  104866. }),
  104867. languageData: {
  104868. closeBrackets: { brackets: ["[", "{", '"'] },
  104869. indentOnInput: /^\s*[\}\]]$/
  104870. }
  104871. });
  104872. function Cht() {
  104873. return new Noe(wht);
  104874. }
  104875. var ple = { exports: {} }, Rv = {}, d_ = { exports: {} }, F$ = {}, W$ = {}, yG;
  104876. function R4() {
  104877. if (yG) return W$;
  104878. yG = 1;
  104879. function t(r) {
  104880. this.__parent = r, this.__character_count = 0, this.__indent_count = -1, this.__alignment_count = 0, this.__wrap_point_index = 0, this.__wrap_point_character_count = 0, this.__wrap_point_indent_count = -1, this.__wrap_point_alignment_count = 0, this.__items = [];
  104881. }
  104882. t.prototype.clone_empty = function() {
  104883. var r = new t(this.__parent);
  104884. return r.set_indent(this.__indent_count, this.__alignment_count), r;
  104885. }, t.prototype.item = function(r) {
  104886. return r < 0 ? this.__items[this.__items.length + r] : this.__items[r];
  104887. }, t.prototype.has_match = function(r) {
  104888. for (var i = this.__items.length - 1; i >= 0; i--)
  104889. if (this.__items[i].match(r))
  104890. return !0;
  104891. return !1;
  104892. }, t.prototype.set_indent = function(r, i) {
  104893. this.is_empty() && (this.__indent_count = r || 0, this.__alignment_count = i || 0, this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count));
  104894. }, t.prototype._set_wrap_point = function() {
  104895. this.__parent.wrap_line_length && (this.__wrap_point_index = this.__items.length, this.__wrap_point_character_count = this.__character_count, this.__wrap_point_indent_count = this.__parent.next_line.__indent_count, this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count);
  104896. }, t.prototype._should_wrap = function() {
  104897. return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
  104898. }, t.prototype._allow_wrap = function() {
  104899. if (this._should_wrap()) {
  104900. this.__parent.add_new_line();
  104901. var r = this.__parent.current_line;
  104902. return r.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count), r.__items = this.__items.slice(this.__wrap_point_index), this.__items = this.__items.slice(0, this.__wrap_point_index), r.__character_count += this.__character_count - this.__wrap_point_character_count, this.__character_count = this.__wrap_point_character_count, r.__items[0] === " " && (r.__items.splice(0, 1), r.__character_count -= 1), !0;
  104903. }
  104904. return !1;
  104905. }, t.prototype.is_empty = function() {
  104906. return this.__items.length === 0;
  104907. }, t.prototype.last = function() {
  104908. return this.is_empty() ? null : this.__items[this.__items.length - 1];
  104909. }, t.prototype.push = function(r) {
  104910. this.__items.push(r);
  104911. var i = r.lastIndexOf(`
  104912. `);
  104913. i !== -1 ? this.__character_count = r.length - i : this.__character_count += r.length;
  104914. }, t.prototype.pop = function() {
  104915. var r = null;
  104916. return this.is_empty() || (r = this.__items.pop(), this.__character_count -= r.length), r;
  104917. }, t.prototype._remove_indent = function() {
  104918. this.__indent_count > 0 && (this.__indent_count -= 1, this.__character_count -= this.__parent.indent_size);
  104919. }, t.prototype._remove_wrap_indent = function() {
  104920. this.__wrap_point_indent_count > 0 && (this.__wrap_point_indent_count -= 1);
  104921. }, t.prototype.trim = function() {
  104922. for (; this.last() === " "; )
  104923. this.__items.pop(), this.__character_count -= 1;
  104924. }, t.prototype.toString = function() {
  104925. var r = "";
  104926. return this.is_empty() ? this.__parent.indent_empty_lines && (r = this.__parent.get_indent_string(this.__indent_count)) : (r = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count), r += this.__items.join("")), r;
  104927. };
  104928. function e(r, i) {
  104929. this.__cache = [""], this.__indent_size = r.indent_size, this.__indent_string = r.indent_char, r.indent_with_tabs || (this.__indent_string = new Array(r.indent_size + 1).join(r.indent_char)), i = i || "", r.indent_level > 0 && (i = new Array(r.indent_level + 1).join(this.__indent_string)), this.__base_string = i, this.__base_string_length = i.length;
  104930. }
  104931. e.prototype.get_indent_size = function(r, i) {
  104932. var a = this.__base_string_length;
  104933. return i = i || 0, r < 0 && (a = 0), a += r * this.__indent_size, a += i, a;
  104934. }, e.prototype.get_indent_string = function(r, i) {
  104935. var a = this.__base_string;
  104936. return i = i || 0, r < 0 && (r = 0, a = ""), i += r * this.__indent_size, this.__ensure_cache(i), a += this.__cache[i], a;
  104937. }, e.prototype.__ensure_cache = function(r) {
  104938. for (; r >= this.__cache.length; )
  104939. this.__add_column();
  104940. }, e.prototype.__add_column = function() {
  104941. var r = this.__cache.length, i = 0, a = "";
  104942. this.__indent_size && r >= this.__indent_size && (i = Math.floor(r / this.__indent_size), r -= i * this.__indent_size, a = new Array(i + 1).join(this.__indent_string)), r && (a += new Array(r + 1).join(" ")), this.__cache.push(a);
  104943. };
  104944. function n(r, i) {
  104945. this.__indent_cache = new e(r, i), this.raw = !1, this._end_with_newline = r.end_with_newline, this.indent_size = r.indent_size, this.wrap_line_length = r.wrap_line_length, this.indent_empty_lines = r.indent_empty_lines, this.__lines = [], this.previous_line = null, this.current_line = null, this.next_line = new t(this), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1, this.__add_outputline();
  104946. }
  104947. return n.prototype.__add_outputline = function() {
  104948. this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
  104949. }, n.prototype.get_line_number = function() {
  104950. return this.__lines.length;
  104951. }, n.prototype.get_indent_string = function(r, i) {
  104952. return this.__indent_cache.get_indent_string(r, i);
  104953. }, n.prototype.get_indent_size = function(r, i) {
  104954. return this.__indent_cache.get_indent_size(r, i);
  104955. }, n.prototype.is_empty = function() {
  104956. return !this.previous_line && this.current_line.is_empty();
  104957. }, n.prototype.add_new_line = function(r) {
  104958. return this.is_empty() || !r && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
  104959. }, n.prototype.get_code = function(r) {
  104960. this.trim(!0);
  104961. var i = this.current_line.pop();
  104962. i && (i[i.length - 1] === `
  104963. ` && (i = i.replace(/\n+$/g, "")), this.current_line.push(i)), this._end_with_newline && this.__add_outputline();
  104964. var a = this.__lines.join(`
  104965. `);
  104966. return r !== `
  104967. ` && (a = a.replace(/[\n]/g, r)), a;
  104968. }, n.prototype.set_wrap_point = function() {
  104969. this.current_line._set_wrap_point();
  104970. }, n.prototype.set_indent = function(r, i) {
  104971. return r = r || 0, i = i || 0, this.next_line.set_indent(r, i), this.__lines.length > 1 ? (this.current_line.set_indent(r, i), !0) : (this.current_line.set_indent(), !1);
  104972. }, n.prototype.add_raw_token = function(r) {
  104973. for (var i = 0; i < r.newlines; i++)
  104974. this.__add_outputline();
  104975. this.current_line.set_indent(-1), this.current_line.push(r.whitespace_before), this.current_line.push(r.text), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1;
  104976. }, n.prototype.add_token = function(r) {
  104977. this.__add_space_before_token(), this.current_line.push(r), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = this.current_line._allow_wrap();
  104978. }, n.prototype.__add_space_before_token = function() {
  104979. this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
  104980. }, n.prototype.remove_indent = function(r) {
  104981. for (var i = this.__lines.length; r < i; )
  104982. this.__lines[r]._remove_indent(), r++;
  104983. this.current_line._remove_wrap_indent();
  104984. }, n.prototype.trim = function(r) {
  104985. for (r = r === void 0 ? !1 : r, this.current_line.trim(); r && this.__lines.length > 1 && this.current_line.is_empty(); )
  104986. this.__lines.pop(), this.current_line = this.__lines[this.__lines.length - 1], this.current_line.trim();
  104987. this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
  104988. }, n.prototype.just_added_newline = function() {
  104989. return this.current_line.is_empty();
  104990. }, n.prototype.just_added_blankline = function() {
  104991. return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
  104992. }, n.prototype.ensure_empty_line_above = function(r, i) {
  104993. for (var a = this.__lines.length - 2; a >= 0; ) {
  104994. var o = this.__lines[a];
  104995. if (o.is_empty())
  104996. break;
  104997. if (o.item(0).indexOf(r) !== 0 && o.item(-1) !== i) {
  104998. this.__lines.splice(a + 1, 0, new t(this)), this.previous_line = this.__lines[this.__lines.length - 2];
  104999. break;
  105000. }
  105001. a--;
  105002. }
  105003. }, W$.Output = n, W$;
  105004. }
  105005. var Q$ = {}, bG;
  105006. function vle() {
  105007. if (bG) return Q$;
  105008. bG = 1;
  105009. function t(e, n, r, i) {
  105010. this.type = e, this.text = n, this.comments_before = null, this.newlines = r || 0, this.whitespace_before = i || "", this.parent = null, this.next = null, this.previous = null, this.opened = null, this.closed = null, this.directives = null;
  105011. }
  105012. return Q$.Token = t, Q$;
  105013. }
  105014. var H$ = {}, _G;
  105015. function gle() {
  105016. return _G || (_G = 1, function(t) {
  105017. var e = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a", n = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a", r = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc", i = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f", a = "\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}", o = "(?:" + a + "|[" + e + r + "])", s = "(?:" + a + "|[" + n + r + i + "])*";
  105018. t.identifier = new RegExp(o + s, "g"), t.identifierStart = new RegExp(o), t.identifierMatch = new RegExp("(?:" + a + "|[" + n + r + i + "])+"), t.newline = /[\n\r\u2028\u2029]/, t.lineBreak = new RegExp(`\r
  105019. |` + t.newline.source), t.allLineBreaks = new RegExp(t.lineBreak.source, "g");
  105020. }(H$)), H$;
  105021. }
  105022. var G$ = {}, kv = {}, OG;
  105023. function k4() {
  105024. if (OG) return kv;
  105025. OG = 1;
  105026. function t(r, i) {
  105027. this.raw_options = e(r, i), this.disabled = this._get_boolean("disabled"), this.eol = this._get_characters("eol", "auto"), this.end_with_newline = this._get_boolean("end_with_newline"), this.indent_size = this._get_number("indent_size", 4), this.indent_char = this._get_characters("indent_char", " "), this.indent_level = this._get_number("indent_level"), this.preserve_newlines = this._get_boolean("preserve_newlines", !0), this.max_preserve_newlines = this._get_number("max_preserve_newlines", 32786), this.preserve_newlines || (this.max_preserve_newlines = 0), this.indent_with_tabs = this._get_boolean("indent_with_tabs", this.indent_char === " "), this.indent_with_tabs && (this.indent_char = " ", this.indent_size === 1 && (this.indent_size = 4)), this.wrap_line_length = this._get_number("wrap_line_length", this._get_number("max_char")), this.indent_empty_lines = this._get_boolean("indent_empty_lines"), this.templating = this._get_selection_list("templating", ["auto", "none", "angular", "django", "erb", "handlebars", "php", "smarty"], ["auto"]);
  105028. }
  105029. t.prototype._get_array = function(r, i) {
  105030. var a = this.raw_options[r], o = i || [];
  105031. return typeof a == "object" ? a !== null && typeof a.concat == "function" && (o = a.concat()) : typeof a == "string" && (o = a.split(/[^a-zA-Z0-9_\/\-]+/)), o;
  105032. }, t.prototype._get_boolean = function(r, i) {
  105033. var a = this.raw_options[r], o = a === void 0 ? !!i : !!a;
  105034. return o;
  105035. }, t.prototype._get_characters = function(r, i) {
  105036. var a = this.raw_options[r], o = i || "";
  105037. return typeof a == "string" && (o = a.replace(/\\r/, "\r").replace(/\\n/, `
  105038. `).replace(/\\t/, " ")), o;
  105039. }, t.prototype._get_number = function(r, i) {
  105040. var a = this.raw_options[r];
  105041. i = parseInt(i, 10), isNaN(i) && (i = 0);
  105042. var o = parseInt(a, 10);
  105043. return isNaN(o) && (o = i), o;
  105044. }, t.prototype._get_selection = function(r, i, a) {
  105045. var o = this._get_selection_list(r, i, a);
  105046. if (o.length !== 1)
  105047. throw new Error(
  105048. "Invalid Option Value: The option '" + r + `' can only be one of the following values:
  105049. ` + i + `
  105050. You passed in: '` + this.raw_options[r] + "'"
  105051. );
  105052. return o[0];
  105053. }, t.prototype._get_selection_list = function(r, i, a) {
  105054. if (!i || i.length === 0)
  105055. throw new Error("Selection list cannot be empty.");
  105056. if (a = a || [i[0]], !this._is_valid_selection(a, i))
  105057. throw new Error("Invalid Default Value!");
  105058. var o = this._get_array(r, a);
  105059. if (!this._is_valid_selection(o, i))
  105060. throw new Error(
  105061. "Invalid Option Value: The option '" + r + `' can contain only the following values:
  105062. ` + i + `
  105063. You passed in: '` + this.raw_options[r] + "'"
  105064. );
  105065. return o;
  105066. }, t.prototype._is_valid_selection = function(r, i) {
  105067. return r.length && i.length && !r.some(function(a) {
  105068. return i.indexOf(a) === -1;
  105069. });
  105070. };
  105071. function e(r, i) {
  105072. var a = {};
  105073. r = n(r);
  105074. var o;
  105075. for (o in r)
  105076. o !== i && (a[o] = r[o]);
  105077. if (i && r[i])
  105078. for (o in r[i])
  105079. a[o] = r[i][o];
  105080. return a;
  105081. }
  105082. function n(r) {
  105083. var i = {}, a;
  105084. for (a in r) {
  105085. var o = a.replace(/-/g, "_");
  105086. i[o] = r[a];
  105087. }
  105088. return i;
  105089. }
  105090. return kv.Options = t, kv.normalizeOpts = n, kv.mergeOpts = e, kv;
  105091. }
  105092. var SG;
  105093. function mle() {
  105094. if (SG) return G$;
  105095. SG = 1;
  105096. var t = k4().Options, e = ["before-newline", "after-newline", "preserve-newline"];
  105097. function n(r) {
  105098. t.call(this, r, "js");
  105099. var i = this.raw_options.brace_style || null;
  105100. i === "expand-strict" ? this.raw_options.brace_style = "expand" : i === "collapse-preserve-inline" ? this.raw_options.brace_style = "collapse,preserve-inline" : this.raw_options.braces_on_own_line !== void 0 && (this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse");
  105101. var a = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
  105102. this.brace_preserve_inline = !1, this.brace_style = "collapse";
  105103. for (var o = 0; o < a.length; o++)
  105104. a[o] === "preserve-inline" ? this.brace_preserve_inline = !0 : this.brace_style = a[o];
  105105. this.unindent_chained_methods = this._get_boolean("unindent_chained_methods"), this.break_chained_methods = this._get_boolean("break_chained_methods"), this.space_in_paren = this._get_boolean("space_in_paren"), this.space_in_empty_paren = this._get_boolean("space_in_empty_paren"), this.jslint_happy = this._get_boolean("jslint_happy"), this.space_after_anon_function = this._get_boolean("space_after_anon_function"), this.space_after_named_function = this._get_boolean("space_after_named_function"), this.keep_array_indentation = this._get_boolean("keep_array_indentation"), this.space_before_conditional = this._get_boolean("space_before_conditional", !0), this.unescape_strings = this._get_boolean("unescape_strings"), this.e4x = this._get_boolean("e4x"), this.comma_first = this._get_boolean("comma_first"), this.operator_position = this._get_selection("operator_position", e), this.test_output_raw = this._get_boolean("test_output_raw"), this.jslint_happy && (this.space_after_anon_function = !0);
  105106. }
  105107. return n.prototype = new t(), G$.Options = n, G$;
  105108. }
  105109. var wd = {}, j$ = {}, xG;
  105110. function L4() {
  105111. if (xG) return j$;
  105112. xG = 1;
  105113. var t = RegExp.prototype.hasOwnProperty("sticky");
  105114. function e(n) {
  105115. this.__input = n || "", this.__input_length = this.__input.length, this.__position = 0;
  105116. }
  105117. return e.prototype.restart = function() {
  105118. this.__position = 0;
  105119. }, e.prototype.back = function() {
  105120. this.__position > 0 && (this.__position -= 1);
  105121. }, e.prototype.hasNext = function() {
  105122. return this.__position < this.__input_length;
  105123. }, e.prototype.next = function() {
  105124. var n = null;
  105125. return this.hasNext() && (n = this.__input.charAt(this.__position), this.__position += 1), n;
  105126. }, e.prototype.peek = function(n) {
  105127. var r = null;
  105128. return n = n || 0, n += this.__position, n >= 0 && n < this.__input_length && (r = this.__input.charAt(n)), r;
  105129. }, e.prototype.__match = function(n, r) {
  105130. n.lastIndex = r;
  105131. var i = n.exec(this.__input);
  105132. return i && !(t && n.sticky) && i.index !== r && (i = null), i;
  105133. }, e.prototype.test = function(n, r) {
  105134. return r = r || 0, r += this.__position, r >= 0 && r < this.__input_length ? !!this.__match(n, r) : !1;
  105135. }, e.prototype.testChar = function(n, r) {
  105136. var i = this.peek(r);
  105137. return n.lastIndex = 0, i !== null && n.test(i);
  105138. }, e.prototype.match = function(n) {
  105139. var r = this.__match(n, this.__position);
  105140. return r ? this.__position += r[0].length : r = null, r;
  105141. }, e.prototype.read = function(n, r, i) {
  105142. var a = "", o;
  105143. return n && (o = this.match(n), o && (a += o[0])), r && (o || !n) && (a += this.readUntil(r, i)), a;
  105144. }, e.prototype.readUntil = function(n, r) {
  105145. var i = "", a = this.__position;
  105146. n.lastIndex = this.__position;
  105147. var o = n.exec(this.__input);
  105148. return o ? (a = o.index, r && (a += o[0].length)) : a = this.__input_length, i = this.__input.substring(this.__position, a), this.__position = a, i;
  105149. }, e.prototype.readUntilAfter = function(n) {
  105150. return this.readUntil(n, !0);
  105151. }, e.prototype.get_regexp = function(n, r) {
  105152. var i = null, a = "g";
  105153. return r && t && (a = "y"), typeof n == "string" && n !== "" ? i = new RegExp(n, a) : n && (i = new RegExp(n.source, a)), i;
  105154. }, e.prototype.get_literal_regexp = function(n) {
  105155. return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
  105156. }, e.prototype.peekUntilAfter = function(n) {
  105157. var r = this.__position, i = this.readUntilAfter(n);
  105158. return this.__position = r, i;
  105159. }, e.prototype.lookBack = function(n) {
  105160. var r = this.__position - 1;
  105161. return r >= n.length && this.__input.substring(r - n.length, r).toLowerCase() === n;
  105162. }, j$.InputScanner = e, j$;
  105163. }
  105164. var h_ = {}, Z$ = {}, wG;
  105165. function Tht() {
  105166. if (wG) return Z$;
  105167. wG = 1;
  105168. function t(e) {
  105169. this.__tokens = [], this.__tokens_length = this.__tokens.length, this.__position = 0, this.__parent_token = e;
  105170. }
  105171. return t.prototype.restart = function() {
  105172. this.__position = 0;
  105173. }, t.prototype.isEmpty = function() {
  105174. return this.__tokens_length === 0;
  105175. }, t.prototype.hasNext = function() {
  105176. return this.__position < this.__tokens_length;
  105177. }, t.prototype.next = function() {
  105178. var e = null;
  105179. return this.hasNext() && (e = this.__tokens[this.__position], this.__position += 1), e;
  105180. }, t.prototype.peek = function(e) {
  105181. var n = null;
  105182. return e = e || 0, e += this.__position, e >= 0 && e < this.__tokens_length && (n = this.__tokens[e]), n;
  105183. }, t.prototype.add = function(e) {
  105184. this.__parent_token && (e.parent = this.__parent_token), this.__tokens.push(e), this.__tokens_length += 1;
  105185. }, Z$.TokenStream = t, Z$;
  105186. }
  105187. var U$ = {}, X$ = {}, CG;
  105188. function Qw() {
  105189. if (CG) return X$;
  105190. CG = 1;
  105191. function t(e, n) {
  105192. this._input = e, this._starting_pattern = null, this._match_pattern = null, this._until_pattern = null, this._until_after = !1, n && (this._starting_pattern = this._input.get_regexp(n._starting_pattern, !0), this._match_pattern = this._input.get_regexp(n._match_pattern, !0), this._until_pattern = this._input.get_regexp(n._until_pattern), this._until_after = n._until_after);
  105193. }
  105194. return t.prototype.read = function() {
  105195. var e = this._input.read(this._starting_pattern);
  105196. return (!this._starting_pattern || e) && (e += this._input.read(this._match_pattern, this._until_pattern, this._until_after)), e;
  105197. }, t.prototype.read_match = function() {
  105198. return this._input.match(this._match_pattern);
  105199. }, t.prototype.until_after = function(e) {
  105200. var n = this._create();
  105201. return n._until_after = !0, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  105202. }, t.prototype.until = function(e) {
  105203. var n = this._create();
  105204. return n._until_after = !1, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  105205. }, t.prototype.starting_with = function(e) {
  105206. var n = this._create();
  105207. return n._starting_pattern = this._input.get_regexp(e, !0), n._update(), n;
  105208. }, t.prototype.matching = function(e) {
  105209. var n = this._create();
  105210. return n._match_pattern = this._input.get_regexp(e, !0), n._update(), n;
  105211. }, t.prototype._create = function() {
  105212. return new t(this._input, this);
  105213. }, t.prototype._update = function() {
  105214. }, X$.Pattern = t, X$;
  105215. }
  105216. var TG;
  105217. function Pht() {
  105218. if (TG) return U$;
  105219. TG = 1;
  105220. var t = Qw().Pattern;
  105221. function e(n, r) {
  105222. t.call(this, n, r), r ? this._line_regexp = this._input.get_regexp(r._line_regexp) : this.__set_whitespace_patterns("", ""), this.newline_count = 0, this.whitespace_before_token = "";
  105223. }
  105224. return e.prototype = new t(), e.prototype.__set_whitespace_patterns = function(n, r) {
  105225. n += "\\t ", r += "\\n\\r", this._match_pattern = this._input.get_regexp(
  105226. "[" + n + r + "]+",
  105227. !0
  105228. ), this._newline_regexp = this._input.get_regexp(
  105229. "\\r\\n|[" + r + "]"
  105230. );
  105231. }, e.prototype.read = function() {
  105232. this.newline_count = 0, this.whitespace_before_token = "";
  105233. var n = this._input.read(this._match_pattern);
  105234. if (n === " ")
  105235. this.whitespace_before_token = " ";
  105236. else if (n) {
  105237. var r = this.__split(this._newline_regexp, n);
  105238. this.newline_count = r.length - 1, this.whitespace_before_token = r[this.newline_count];
  105239. }
  105240. return n;
  105241. }, e.prototype.matching = function(n, r) {
  105242. var i = this._create();
  105243. return i.__set_whitespace_patterns(n, r), i._update(), i;
  105244. }, e.prototype._create = function() {
  105245. return new e(this._input, this);
  105246. }, e.prototype.__split = function(n, r) {
  105247. n.lastIndex = 0;
  105248. for (var i = 0, a = [], o = n.exec(r); o; )
  105249. a.push(r.substring(i, o.index)), i = o.index + o[0].length, o = n.exec(r);
  105250. return i < r.length ? a.push(r.substring(i, r.length)) : a.push(""), a;
  105251. }, U$.WhitespacePattern = e, U$;
  105252. }
  105253. var PG;
  105254. function CS() {
  105255. if (PG) return h_;
  105256. PG = 1;
  105257. var t = L4().InputScanner, e = vle().Token, n = Tht().TokenStream, r = Pht().WhitespacePattern, i = {
  105258. START: "TK_START",
  105259. RAW: "TK_RAW",
  105260. EOF: "TK_EOF"
  105261. }, a = function(o, s) {
  105262. this._input = new t(o), this._options = s || {}, this.__tokens = null, this._patterns = {}, this._patterns.whitespace = new r(this._input);
  105263. };
  105264. return a.prototype.tokenize = function() {
  105265. this._input.restart(), this.__tokens = new n(), this._reset();
  105266. for (var o, s = new e(i.START, ""), l = null, u = [], c = new n(); s.type !== i.EOF; ) {
  105267. for (o = this._get_next_token(s, l); this._is_comment(o); )
  105268. c.add(o), o = this._get_next_token(s, l);
  105269. c.isEmpty() || (o.comments_before = c, c = new n()), o.parent = l, this._is_opening(o) ? (u.push(l), l = o) : l && this._is_closing(o, l) && (o.opened = l, l.closed = o, l = u.pop(), o.parent = l), o.previous = s, s.next = o, this.__tokens.add(o), s = o;
  105270. }
  105271. return this.__tokens;
  105272. }, a.prototype._is_first_token = function() {
  105273. return this.__tokens.isEmpty();
  105274. }, a.prototype._reset = function() {
  105275. }, a.prototype._get_next_token = function(o, s) {
  105276. this._readWhitespace();
  105277. var l = this._input.read(/.+/g);
  105278. return l ? this._create_token(i.RAW, l) : this._create_token(i.EOF, "");
  105279. }, a.prototype._is_comment = function(o) {
  105280. return !1;
  105281. }, a.prototype._is_opening = function(o) {
  105282. return !1;
  105283. }, a.prototype._is_closing = function(o, s) {
  105284. return !1;
  105285. }, a.prototype._create_token = function(o, s) {
  105286. var l = new e(
  105287. o,
  105288. s,
  105289. this._patterns.whitespace.newline_count,
  105290. this._patterns.whitespace.whitespace_before_token
  105291. );
  105292. return l;
  105293. }, a.prototype._readWhitespace = function() {
  105294. return this._patterns.whitespace.read();
  105295. }, h_.Tokenizer = a, h_.TOKEN = i, h_;
  105296. }
  105297. var Y$ = {}, $G;
  105298. function N4() {
  105299. if ($G) return Y$;
  105300. $G = 1;
  105301. function t(e, n) {
  105302. e = typeof e == "string" ? e : e.source, n = typeof n == "string" ? n : n.source, this.__directives_block_pattern = new RegExp(e + / beautify( \w+[:]\w+)+ /.source + n, "g"), this.__directive_pattern = / (\w+)[:](\w+)/g, this.__directives_end_ignore_pattern = new RegExp(e + /\sbeautify\signore:end\s/.source + n, "g");
  105303. }
  105304. return t.prototype.get_directives = function(e) {
  105305. if (!e.match(this.__directives_block_pattern))
  105306. return null;
  105307. var n = {};
  105308. this.__directive_pattern.lastIndex = 0;
  105309. for (var r = this.__directive_pattern.exec(e); r; )
  105310. n[r[1]] = r[2], r = this.__directive_pattern.exec(e);
  105311. return n;
  105312. }, t.prototype.readIgnored = function(e) {
  105313. return e.readUntilAfter(this.__directives_end_ignore_pattern);
  105314. }, Y$.Directives = t, Y$;
  105315. }
  105316. var q$ = {}, AG;
  105317. function yle() {
  105318. if (AG) return q$;
  105319. AG = 1;
  105320. var t = Qw().Pattern, e = {
  105321. django: !1,
  105322. erb: !1,
  105323. handlebars: !1,
  105324. php: !1,
  105325. smarty: !1,
  105326. angular: !1
  105327. };
  105328. function n(r, i) {
  105329. t.call(this, r, i), this.__template_pattern = null, this._disabled = Object.assign({}, e), this._excluded = Object.assign({}, e), i && (this.__template_pattern = this._input.get_regexp(i.__template_pattern), this._excluded = Object.assign(this._excluded, i._excluded), this._disabled = Object.assign(this._disabled, i._disabled));
  105330. var a = new t(r);
  105331. this.__patterns = {
  105332. handlebars_comment: a.starting_with(/{{!--/).until_after(/--}}/),
  105333. handlebars_unescaped: a.starting_with(/{{{/).until_after(/}}}/),
  105334. handlebars: a.starting_with(/{{/).until_after(/}}/),
  105335. php: a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
  105336. erb: a.starting_with(/<%[^%]/).until_after(/[^%]%>/),
  105337. // django coflicts with handlebars a bit.
  105338. django: a.starting_with(/{%/).until_after(/%}/),
  105339. django_value: a.starting_with(/{{/).until_after(/}}/),
  105340. django_comment: a.starting_with(/{#/).until_after(/#}/),
  105341. smarty: a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
  105342. smarty_comment: a.starting_with(/{\*/).until_after(/\*}/),
  105343. smarty_literal: a.starting_with(/{literal}/).until_after(/{\/literal}/)
  105344. };
  105345. }
  105346. return n.prototype = new t(), n.prototype._create = function() {
  105347. return new n(this._input, this);
  105348. }, n.prototype._update = function() {
  105349. this.__set_templated_pattern();
  105350. }, n.prototype.disable = function(r) {
  105351. var i = this._create();
  105352. return i._disabled[r] = !0, i._update(), i;
  105353. }, n.prototype.read_options = function(r) {
  105354. var i = this._create();
  105355. for (var a in e)
  105356. i._disabled[a] = r.templating.indexOf(a) === -1;
  105357. return i._update(), i;
  105358. }, n.prototype.exclude = function(r) {
  105359. var i = this._create();
  105360. return i._excluded[r] = !0, i._update(), i;
  105361. }, n.prototype.read = function() {
  105362. var r = "";
  105363. this._match_pattern ? r = this._input.read(this._starting_pattern) : r = this._input.read(this._starting_pattern, this.__template_pattern);
  105364. for (var i = this._read_template(); i; )
  105365. this._match_pattern ? i += this._input.read(this._match_pattern) : i += this._input.readUntil(this.__template_pattern), r += i, i = this._read_template();
  105366. return this._until_after && (r += this._input.readUntilAfter(this._until_pattern)), r;
  105367. }, n.prototype.__set_templated_pattern = function() {
  105368. var r = [];
  105369. this._disabled.php || r.push(this.__patterns.php._starting_pattern.source), this._disabled.handlebars || r.push(this.__patterns.handlebars._starting_pattern.source), this._disabled.erb || r.push(this.__patterns.erb._starting_pattern.source), this._disabled.django || (r.push(this.__patterns.django._starting_pattern.source), r.push(this.__patterns.django_value._starting_pattern.source), r.push(this.__patterns.django_comment._starting_pattern.source)), this._disabled.smarty || r.push(this.__patterns.smarty._starting_pattern.source), this._until_pattern && r.push(this._until_pattern.source), this.__template_pattern = this._input.get_regexp("(?:" + r.join("|") + ")");
  105370. }, n.prototype._read_template = function() {
  105371. var r = "", i = this._input.peek();
  105372. if (i === "<") {
  105373. var a = this._input.peek(1);
  105374. !this._disabled.php && !this._excluded.php && a === "?" && (r = r || this.__patterns.php.read()), !this._disabled.erb && !this._excluded.erb && a === "%" && (r = r || this.__patterns.erb.read());
  105375. } else i === "{" && (!this._disabled.handlebars && !this._excluded.handlebars && (r = r || this.__patterns.handlebars_comment.read(), r = r || this.__patterns.handlebars_unescaped.read(), r = r || this.__patterns.handlebars.read()), this._disabled.django || (!this._excluded.django && !this._excluded.handlebars && (r = r || this.__patterns.django_value.read()), this._excluded.django || (r = r || this.__patterns.django_comment.read(), r = r || this.__patterns.django.read())), this._disabled.smarty || this._disabled.django && this._disabled.handlebars && (r = r || this.__patterns.smarty_comment.read(), r = r || this.__patterns.smarty_literal.read(), r = r || this.__patterns.smarty.read()));
  105376. return r;
  105377. }, q$.TemplatablePattern = n, q$;
  105378. }
  105379. var EG;
  105380. function p_() {
  105381. if (EG) return wd;
  105382. EG = 1;
  105383. var t = L4().InputScanner, e = CS().Tokenizer, n = CS().TOKEN, r = N4().Directives, i = gle(), a = Qw().Pattern, o = yle().TemplatablePattern;
  105384. function s(S, x) {
  105385. return x.indexOf(S) !== -1;
  105386. }
  105387. var l = {
  105388. START_EXPR: "TK_START_EXPR",
  105389. END_EXPR: "TK_END_EXPR",
  105390. START_BLOCK: "TK_START_BLOCK",
  105391. END_BLOCK: "TK_END_BLOCK",
  105392. WORD: "TK_WORD",
  105393. RESERVED: "TK_RESERVED",
  105394. SEMICOLON: "TK_SEMICOLON",
  105395. STRING: "TK_STRING",
  105396. EQUALS: "TK_EQUALS",
  105397. OPERATOR: "TK_OPERATOR",
  105398. COMMA: "TK_COMMA",
  105399. BLOCK_COMMENT: "TK_BLOCK_COMMENT",
  105400. COMMENT: "TK_COMMENT",
  105401. DOT: "TK_DOT",
  105402. UNKNOWN: "TK_UNKNOWN",
  105403. START: n.START,
  105404. RAW: n.RAW,
  105405. EOF: n.EOF
  105406. }, u = new r(/\/\*/, /\*\//), c = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/, f = /[0-9]/, d = /[^\d\.]/, h = ">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "), p = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
  105407. p = p.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), p = "\\?\\.(?!\\d) " + p, p = p.replace(/ /g, "|");
  105408. var v = new RegExp(p), g = "continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","), m = g.concat(["do", "in", "of", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await", "from", "as", "class", "extends"]), y = new RegExp("^(?:" + m.join("|") + ")$"), b, _ = function(S, x) {
  105409. e.call(this, S, x), this._patterns.whitespace = this._patterns.whitespace.matching(
  105410. /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
  105411. /\u2028\u2029/.source
  105412. );
  105413. var C = new a(this._input), T = new o(this._input).read_options(this._options);
  105414. this.__patterns = {
  105415. template: T,
  105416. identifier: T.starting_with(i.identifier).matching(i.identifierMatch),
  105417. number: C.matching(c),
  105418. punct: C.matching(v),
  105419. // comment ends just before nearest linefeed or end of file
  105420. comment: C.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
  105421. // /* ... */ comment ends with nearest */ or end of file
  105422. block_comment: C.starting_with(/\/\*/).until_after(/\*\//),
  105423. html_comment_start: C.matching(/<!--/),
  105424. html_comment_end: C.matching(/-->/),
  105425. include: C.starting_with(/#include/).until_after(i.lineBreak),
  105426. shebang: C.starting_with(/#!/).until_after(i.lineBreak),
  105427. xml: C.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
  105428. single_quote: T.until(/['\\\n\r\u2028\u2029]/),
  105429. double_quote: T.until(/["\\\n\r\u2028\u2029]/),
  105430. template_text: T.until(/[`\\$]/),
  105431. template_expression: T.until(/[`}\\]/)
  105432. };
  105433. };
  105434. _.prototype = new e(), _.prototype._is_comment = function(S) {
  105435. return S.type === l.COMMENT || S.type === l.BLOCK_COMMENT || S.type === l.UNKNOWN;
  105436. }, _.prototype._is_opening = function(S) {
  105437. return S.type === l.START_BLOCK || S.type === l.START_EXPR;
  105438. }, _.prototype._is_closing = function(S, x) {
  105439. return (S.type === l.END_BLOCK || S.type === l.END_EXPR) && x && (S.text === "]" && x.text === "[" || S.text === ")" && x.text === "(" || S.text === "}" && x.text === "{");
  105440. }, _.prototype._reset = function() {
  105441. b = !1;
  105442. }, _.prototype._get_next_token = function(S, x) {
  105443. var C = null;
  105444. this._readWhitespace();
  105445. var T = this._input.peek();
  105446. return T === null ? this._create_token(l.EOF, "") : (C = C || this._read_non_javascript(T), C = C || this._read_string(T), C = C || this._read_pair(T, this._input.peek(1)), C = C || this._read_word(S), C = C || this._read_singles(T), C = C || this._read_comment(T), C = C || this._read_regexp(T, S), C = C || this._read_xml(T, S), C = C || this._read_punctuation(), C = C || this._create_token(l.UNKNOWN, this._input.next()), C);
  105447. }, _.prototype._read_word = function(S) {
  105448. var x;
  105449. if (x = this.__patterns.identifier.read(), x !== "")
  105450. return x = x.replace(i.allLineBreaks, `
  105451. `), !(S.type === l.DOT || S.type === l.RESERVED && (S.text === "set" || S.text === "get")) && y.test(x) ? (x === "in" || x === "of") && (S.type === l.WORD || S.type === l.STRING) ? this._create_token(l.OPERATOR, x) : this._create_token(l.RESERVED, x) : this._create_token(l.WORD, x);
  105452. if (x = this.__patterns.number.read(), x !== "")
  105453. return this._create_token(l.WORD, x);
  105454. }, _.prototype._read_singles = function(S) {
  105455. var x = null;
  105456. return S === "(" || S === "[" ? x = this._create_token(l.START_EXPR, S) : S === ")" || S === "]" ? x = this._create_token(l.END_EXPR, S) : S === "{" ? x = this._create_token(l.START_BLOCK, S) : S === "}" ? x = this._create_token(l.END_BLOCK, S) : S === ";" ? x = this._create_token(l.SEMICOLON, S) : S === "." && d.test(this._input.peek(1)) ? x = this._create_token(l.DOT, S) : S === "," && (x = this._create_token(l.COMMA, S)), x && this._input.next(), x;
  105457. }, _.prototype._read_pair = function(S, x) {
  105458. var C = null;
  105459. return S === "#" && x === "{" && (C = this._create_token(l.START_BLOCK, S + x)), C && (this._input.next(), this._input.next()), C;
  105460. }, _.prototype._read_punctuation = function() {
  105461. var S = this.__patterns.punct.read();
  105462. if (S !== "")
  105463. return S === "=" ? this._create_token(l.EQUALS, S) : S === "?." ? this._create_token(l.DOT, S) : this._create_token(l.OPERATOR, S);
  105464. }, _.prototype._read_non_javascript = function(S) {
  105465. var x = "";
  105466. if (S === "#") {
  105467. if (this._is_first_token() && (x = this.__patterns.shebang.read(), x))
  105468. return this._create_token(l.UNKNOWN, x.trim() + `
  105469. `);
  105470. if (x = this.__patterns.include.read(), x)
  105471. return this._create_token(l.UNKNOWN, x.trim() + `
  105472. `);
  105473. S = this._input.next();
  105474. var C = "#";
  105475. if (this._input.hasNext() && this._input.testChar(f)) {
  105476. do
  105477. S = this._input.next(), C += S;
  105478. while (this._input.hasNext() && S !== "#" && S !== "=");
  105479. return S === "#" || (this._input.peek() === "[" && this._input.peek(1) === "]" ? (C += "[]", this._input.next(), this._input.next()) : this._input.peek() === "{" && this._input.peek(1) === "}" && (C += "{}", this._input.next(), this._input.next())), this._create_token(l.WORD, C);
  105480. }
  105481. this._input.back();
  105482. } else if (S === "<" && this._is_first_token()) {
  105483. if (x = this.__patterns.html_comment_start.read(), x) {
  105484. for (; this._input.hasNext() && !this._input.testChar(i.newline); )
  105485. x += this._input.next();
  105486. return b = !0, this._create_token(l.COMMENT, x);
  105487. }
  105488. } else if (b && S === "-" && (x = this.__patterns.html_comment_end.read(), x))
  105489. return b = !1, this._create_token(l.COMMENT, x);
  105490. return null;
  105491. }, _.prototype._read_comment = function(S) {
  105492. var x = null;
  105493. if (S === "/") {
  105494. var C = "";
  105495. if (this._input.peek(1) === "*") {
  105496. C = this.__patterns.block_comment.read();
  105497. var T = u.get_directives(C);
  105498. T && T.ignore === "start" && (C += u.readIgnored(this._input)), C = C.replace(i.allLineBreaks, `
  105499. `), x = this._create_token(l.BLOCK_COMMENT, C), x.directives = T;
  105500. } else this._input.peek(1) === "/" && (C = this.__patterns.comment.read(), x = this._create_token(l.COMMENT, C));
  105501. }
  105502. return x;
  105503. }, _.prototype._read_string = function(S) {
  105504. if (S === "`" || S === "'" || S === '"') {
  105505. var x = this._input.next();
  105506. return this.has_char_escapes = !1, S === "`" ? x += this._read_string_recursive("`", !0, "${") : x += this._read_string_recursive(S), this.has_char_escapes && this._options.unescape_strings && (x = O(x)), this._input.peek() === S && (x += this._input.next()), x = x.replace(i.allLineBreaks, `
  105507. `), this._create_token(l.STRING, x);
  105508. }
  105509. return null;
  105510. }, _.prototype._allow_regexp_or_xml = function(S) {
  105511. return S.type === l.RESERVED && s(S.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || S.type === l.END_EXPR && S.text === ")" && S.opened.previous.type === l.RESERVED && s(S.opened.previous.text, ["if", "while", "for"]) || s(S.type, [
  105512. l.COMMENT,
  105513. l.START_EXPR,
  105514. l.START_BLOCK,
  105515. l.START,
  105516. l.END_BLOCK,
  105517. l.OPERATOR,
  105518. l.EQUALS,
  105519. l.EOF,
  105520. l.SEMICOLON,
  105521. l.COMMA
  105522. ]);
  105523. }, _.prototype._read_regexp = function(S, x) {
  105524. if (S === "/" && this._allow_regexp_or_xml(x)) {
  105525. for (var C = this._input.next(), T = !1, w = !1; this._input.hasNext() && (T || w || this._input.peek() !== S) && !this._input.testChar(i.newline); )
  105526. C += this._input.peek(), T ? T = !1 : (T = this._input.peek() === "\\", this._input.peek() === "[" ? w = !0 : this._input.peek() === "]" && (w = !1)), this._input.next();
  105527. return this._input.peek() === S && (C += this._input.next(), C += this._input.read(i.identifier)), this._create_token(l.STRING, C);
  105528. }
  105529. return null;
  105530. }, _.prototype._read_xml = function(S, x) {
  105531. if (this._options.e4x && S === "<" && this._allow_regexp_or_xml(x)) {
  105532. var C = "", T = this.__patterns.xml.read_match();
  105533. if (T) {
  105534. for (var w = T[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), P = w.indexOf("{") === 0, $ = 0; T; ) {
  105535. var A = !!T[1], D = T[2], E = !!T[T.length - 1] || D.slice(0, 8) === "![CDATA[";
  105536. if (!E && (D === w || P && D.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (A ? --$ : ++$), C += T[0], $ <= 0)
  105537. break;
  105538. T = this.__patterns.xml.read_match();
  105539. }
  105540. return T || (C += this._input.match(/[\s\S]*/g)[0]), C = C.replace(i.allLineBreaks, `
  105541. `), this._create_token(l.STRING, C);
  105542. }
  105543. }
  105544. return null;
  105545. };
  105546. function O(S) {
  105547. for (var x = "", C = 0, T = new t(S), w = null; T.hasNext(); )
  105548. if (w = T.match(/([\s]|[^\\]|\\\\)+/g), w && (x += w[0]), T.peek() === "\\") {
  105549. if (T.next(), T.peek() === "x")
  105550. w = T.match(/x([0-9A-Fa-f]{2})/g);
  105551. else if (T.peek() === "u")
  105552. w = T.match(/u([0-9A-Fa-f]{4})/g), w || (w = T.match(/u\{([0-9A-Fa-f]+)\}/g));
  105553. else {
  105554. x += "\\", T.hasNext() && (x += T.next());
  105555. continue;
  105556. }
  105557. if (!w || (C = parseInt(w[1], 16), C > 126 && C <= 255 && w[0].indexOf("x") === 0))
  105558. return S;
  105559. C >= 0 && C < 32 || C > 1114111 ? x += "\\" + w[0] : C === 34 || C === 39 || C === 92 ? x += "\\" + String.fromCharCode(C) : x += String.fromCharCode(C);
  105560. }
  105561. return x;
  105562. }
  105563. return _.prototype._read_string_recursive = function(S, x, C) {
  105564. var T, w;
  105565. S === "'" ? w = this.__patterns.single_quote : S === '"' ? w = this.__patterns.double_quote : S === "`" ? w = this.__patterns.template_text : S === "}" && (w = this.__patterns.template_expression);
  105566. for (var P = w.read(), $ = ""; this._input.hasNext(); ) {
  105567. if ($ = this._input.next(), $ === S || !x && i.newline.test($)) {
  105568. this._input.back();
  105569. break;
  105570. } else $ === "\\" && this._input.hasNext() ? (T = this._input.peek(), T === "x" || T === "u" ? this.has_char_escapes = !0 : T === "\r" && this._input.peek(1) === `
  105571. ` && this._input.next(), $ += this._input.next()) : C && (C === "${" && $ === "$" && this._input.peek() === "{" && ($ += this._input.next()), C === $ && (S === "`" ? $ += this._read_string_recursive("}", x, "`") : $ += this._read_string_recursive("`", x, "${"), this._input.hasNext() && ($ += this._input.next())));
  105572. $ += w.read(), P += $;
  105573. }
  105574. return P;
  105575. }, wd.Tokenizer = _, wd.TOKEN = l, wd.positionable_operators = h.slice(), wd.line_starters = g.slice(), wd;
  105576. }
  105577. var MG;
  105578. function $ht() {
  105579. if (MG) return F$;
  105580. MG = 1;
  105581. var t = R4().Output, e = vle().Token, n = gle(), r = mle().Options, i = p_().Tokenizer, a = p_().line_starters, o = p_().positionable_operators, s = p_().TOKEN;
  105582. function l(w, P) {
  105583. return P.indexOf(w) !== -1;
  105584. }
  105585. function u(w) {
  105586. return w.replace(/^\s+/g, "");
  105587. }
  105588. function c(w) {
  105589. for (var P = {}, $ = 0; $ < w.length; $++)
  105590. P[w[$].replace(/-/g, "_")] = w[$];
  105591. return P;
  105592. }
  105593. function f(w, P) {
  105594. return w && w.type === s.RESERVED && w.text === P;
  105595. }
  105596. function d(w, P) {
  105597. return w && w.type === s.RESERVED && l(w.text, P);
  105598. }
  105599. var h = ["case", "return", "do", "if", "throw", "else", "await", "break", "continue", "async"], p = ["before-newline", "after-newline", "preserve-newline"], v = c(p), g = [v.before_newline, v.preserve_newline], m = {
  105600. BlockStatement: "BlockStatement",
  105601. // 'BLOCK'
  105602. Statement: "Statement",
  105603. // 'STATEMENT'
  105604. ObjectLiteral: "ObjectLiteral",
  105605. // 'OBJECT',
  105606. ArrayLiteral: "ArrayLiteral",
  105607. //'[EXPRESSION]',
  105608. ForInitializer: "ForInitializer",
  105609. //'(FOR-EXPRESSION)',
  105610. Conditional: "Conditional",
  105611. //'(COND-EXPRESSION)',
  105612. Expression: "Expression"
  105613. //'(EXPRESSION)'
  105614. };
  105615. function y(w, P) {
  105616. P.multiline_frame || P.mode === m.ForInitializer || P.mode === m.Conditional || w.remove_indent(P.start_line_index);
  105617. }
  105618. function b(w) {
  105619. w = w.replace(n.allLineBreaks, `
  105620. `);
  105621. for (var P = [], $ = w.indexOf(`
  105622. `); $ !== -1; )
  105623. P.push(w.substring(0, $)), w = w.substring($ + 1), $ = w.indexOf(`
  105624. `);
  105625. return w.length && P.push(w), P;
  105626. }
  105627. function _(w) {
  105628. return w === m.ArrayLiteral;
  105629. }
  105630. function O(w) {
  105631. return l(w, [m.Expression, m.ForInitializer, m.Conditional]);
  105632. }
  105633. function S(w, P) {
  105634. for (var $ = 0; $ < w.length; $++) {
  105635. var A = w[$].trim();
  105636. if (A.charAt(0) !== P)
  105637. return !1;
  105638. }
  105639. return !0;
  105640. }
  105641. function x(w, P) {
  105642. for (var $ = 0, A = w.length, D; $ < A; $++)
  105643. if (D = w[$], D && D.indexOf(P) !== 0)
  105644. return !1;
  105645. return !0;
  105646. }
  105647. function C(w, P) {
  105648. P = P || {}, this._source_text = w || "", this._output = null, this._tokens = null, this._last_last_text = null, this._flags = null, this._previous_flags = null, this._flag_store = null, this._options = new r(P);
  105649. }
  105650. C.prototype.create_flags = function(w, P) {
  105651. var $ = 0;
  105652. w && ($ = w.indentation_level, !this._output.just_added_newline() && w.line_indent_level > $ && ($ = w.line_indent_level));
  105653. var A = {
  105654. mode: P,
  105655. parent: w,
  105656. last_token: w ? w.last_token : new e(s.START_BLOCK, ""),
  105657. // last token text
  105658. last_word: w ? w.last_word : "",
  105659. // last TOKEN.WORD passed
  105660. declaration_statement: !1,
  105661. declaration_assignment: !1,
  105662. multiline_frame: !1,
  105663. inline_frame: !1,
  105664. if_block: !1,
  105665. else_block: !1,
  105666. class_start_block: !1,
  105667. // class A { INSIDE HERE } or class B extends C { INSIDE HERE }
  105668. do_block: !1,
  105669. do_while: !1,
  105670. import_block: !1,
  105671. in_case_statement: !1,
  105672. // switch(..){ INSIDE HERE }
  105673. in_case: !1,
  105674. // we're on the exact line with "case 0:"
  105675. case_body: !1,
  105676. // the indented case-action block
  105677. case_block: !1,
  105678. // the indented case-action block is wrapped with {}
  105679. indentation_level: $,
  105680. alignment: 0,
  105681. line_indent_level: w ? w.line_indent_level : $,
  105682. start_line_index: this._output.get_line_number(),
  105683. ternary_depth: 0
  105684. };
  105685. return A;
  105686. }, C.prototype._reset = function(w) {
  105687. var P = w.match(/^[\t ]*/)[0];
  105688. this._last_last_text = "", this._output = new t(this._options, P), this._output.raw = this._options.test_output_raw, this._flag_store = [], this.set_mode(m.BlockStatement);
  105689. var $ = new i(w, this._options);
  105690. return this._tokens = $.tokenize(), w;
  105691. }, C.prototype.beautify = function() {
  105692. if (this._options.disabled)
  105693. return this._source_text;
  105694. var w, P = this._reset(this._source_text), $ = this._options.eol;
  105695. this._options.eol === "auto" && ($ = `
  105696. `, P && n.lineBreak.test(P || "") && ($ = P.match(n.lineBreak)[0]));
  105697. for (var A = this._tokens.next(); A; )
  105698. this.handle_token(A), this._last_last_text = this._flags.last_token.text, this._flags.last_token = A, A = this._tokens.next();
  105699. return w = this._output.get_code($), w;
  105700. }, C.prototype.handle_token = function(w, P) {
  105701. w.type === s.START_EXPR ? this.handle_start_expr(w) : w.type === s.END_EXPR ? this.handle_end_expr(w) : w.type === s.START_BLOCK ? this.handle_start_block(w) : w.type === s.END_BLOCK ? this.handle_end_block(w) : w.type === s.WORD ? this.handle_word(w) : w.type === s.RESERVED ? this.handle_word(w) : w.type === s.SEMICOLON ? this.handle_semicolon(w) : w.type === s.STRING ? this.handle_string(w) : w.type === s.EQUALS ? this.handle_equals(w) : w.type === s.OPERATOR ? this.handle_operator(w) : w.type === s.COMMA ? this.handle_comma(w) : w.type === s.BLOCK_COMMENT ? this.handle_block_comment(w, P) : w.type === s.COMMENT ? this.handle_comment(w, P) : w.type === s.DOT ? this.handle_dot(w) : w.type === s.EOF ? this.handle_eof(w) : w.type === s.UNKNOWN ? this.handle_unknown(w, P) : this.handle_unknown(w, P);
  105702. }, C.prototype.handle_whitespace_and_comments = function(w, P) {
  105703. var $ = w.newlines, A = this._options.keep_array_indentation && _(this._flags.mode);
  105704. if (w.comments_before)
  105705. for (var D = w.comments_before.next(); D; )
  105706. this.handle_whitespace_and_comments(D, P), this.handle_token(D, P), D = w.comments_before.next();
  105707. if (A)
  105708. for (var E = 0; E < $; E += 1)
  105709. this.print_newline(E > 0, P);
  105710. else if (this._options.max_preserve_newlines && $ > this._options.max_preserve_newlines && ($ = this._options.max_preserve_newlines), this._options.preserve_newlines && $ > 1) {
  105711. this.print_newline(!1, P);
  105712. for (var R = 1; R < $; R += 1)
  105713. this.print_newline(!0, P);
  105714. }
  105715. };
  105716. var T = ["async", "break", "continue", "return", "throw", "yield"];
  105717. return C.prototype.allow_wrap_or_preserved_newline = function(w, P) {
  105718. if (P = P === void 0 ? !1 : P, !this._output.just_added_newline()) {
  105719. var $ = this._options.preserve_newlines && w.newlines || P, A = l(this._flags.last_token.text, o) || l(w.text, o);
  105720. if (A) {
  105721. var D = l(this._flags.last_token.text, o) && l(this._options.operator_position, g) || l(w.text, o);
  105722. $ = $ && D;
  105723. }
  105724. if ($)
  105725. this.print_newline(!1, !0);
  105726. else if (this._options.wrap_line_length) {
  105727. if (d(this._flags.last_token, T))
  105728. return;
  105729. this._output.set_wrap_point();
  105730. }
  105731. }
  105732. }, C.prototype.print_newline = function(w, P) {
  105733. if (!P && this._flags.last_token.text !== ";" && this._flags.last_token.text !== "," && this._flags.last_token.text !== "=" && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++"))
  105734. for (var $ = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f($, "else")) && !this._flags.do_block; )
  105735. this.restore_mode();
  105736. this._output.add_new_line(w) && (this._flags.multiline_frame = !0);
  105737. }, C.prototype.print_token_line_indentation = function(w) {
  105738. this._output.just_added_newline() && (this._options.keep_array_indentation && w.newlines && (w.text === "[" || _(this._flags.mode)) ? (this._output.current_line.set_indent(-1), this._output.current_line.push(w.whitespace_before), this._output.space_before_token = !1) : this._output.set_indent(this._flags.indentation_level, this._flags.alignment) && (this._flags.line_indent_level = this._flags.indentation_level));
  105739. }, C.prototype.print_token = function(w) {
  105740. if (this._output.raw) {
  105741. this._output.add_raw_token(w);
  105742. return;
  105743. }
  105744. if (this._options.comma_first && w.previous && w.previous.type === s.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
  105745. var P = this._output.previous_line.pop();
  105746. this._output.previous_line.is_empty() && (this._output.previous_line.push(P), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(w), this._output.add_token(","), this._output.space_before_token = !0;
  105747. }
  105748. this.print_token_line_indentation(w), this._output.non_breaking_space = !0, this._output.add_token(w.text), this._output.previous_token_wrapped && (this._flags.multiline_frame = !0);
  105749. }, C.prototype.indent = function() {
  105750. this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  105751. }, C.prototype.deindent = function() {
  105752. this._flags.indentation_level > 0 && (!this._flags.parent || this._flags.indentation_level > this._flags.parent.indentation_level) && (this._flags.indentation_level -= 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
  105753. }, C.prototype.set_mode = function(w) {
  105754. this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null, w), this._flags = this.create_flags(this._previous_flags, w), this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  105755. }, C.prototype.restore_mode = function() {
  105756. this._flag_store.length > 0 && (this._previous_flags = this._flags, this._flags = this._flag_store.pop(), this._previous_flags.mode === m.Statement && y(this._output, this._previous_flags), this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
  105757. }, C.prototype.start_of_object_property = function() {
  105758. return this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"]));
  105759. }, C.prototype.start_of_statement = function(w) {
  105760. var P = !1;
  105761. return P = P || d(this._flags.last_token, ["var", "let", "const"]) && w.type === s.WORD, P = P || f(this._flags.last_token, "do"), P = P || !(this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement) && d(this._flags.last_token, T) && !w.newlines, P = P || f(this._flags.last_token, "else") && !(f(w, "if") && !w.comments_before), P = P || this._flags.last_token.type === s.END_EXPR && (this._previous_flags.mode === m.ForInitializer || this._previous_flags.mode === m.Conditional), P = P || this._flags.last_token.type === s.WORD && this._flags.mode === m.BlockStatement && !this._flags.in_case && !(w.text === "--" || w.text === "++") && this._last_last_text !== "function" && w.type !== s.WORD && w.type !== s.RESERVED, P = P || this._flags.mode === m.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"])), P ? (this.set_mode(m.Statement), this.indent(), this.handle_whitespace_and_comments(w, !0), this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
  105762. w,
  105763. d(w, ["do", "for", "if", "while"])
  105764. ), !0) : !1;
  105765. }, C.prototype.handle_start_expr = function(w) {
  105766. this.start_of_statement(w) || this.handle_whitespace_and_comments(w);
  105767. var P = m.Expression;
  105768. if (w.text === "[") {
  105769. if (this._flags.last_token.type === s.WORD || this._flags.last_token.text === ")") {
  105770. d(this._flags.last_token, a) && (this._output.space_before_token = !0), this.print_token(w), this.set_mode(P), this.indent(), this._options.space_in_paren && (this._output.space_before_token = !0);
  105771. return;
  105772. }
  105773. P = m.ArrayLiteral, _(this._flags.mode) && (this._flags.last_token.text === "[" || this._flags.last_token.text === "," && (this._last_last_text === "]" || this._last_last_text === "}")) && (this._options.keep_array_indentation || this.print_newline()), l(this._flags.last_token.type, [s.START_EXPR, s.END_EXPR, s.WORD, s.OPERATOR, s.DOT]) || (this._output.space_before_token = !0);
  105774. } else {
  105775. if (this._flags.last_token.type === s.RESERVED)
  105776. this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, P = m.ForInitializer) : l(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, P = m.Conditional) : l(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" && w.whitespace_before === "" ? this._output.space_before_token = !1 : (l(this._flags.last_token.text, a) || this._flags.last_token.text === "catch") && (this._output.space_before_token = !0);
  105777. else if (this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR)
  105778. this.start_of_object_property() || this.allow_wrap_or_preserved_newline(w);
  105779. else if (this._flags.last_token.type === s.WORD) {
  105780. this._output.space_before_token = !1;
  105781. var $ = this._tokens.peek(-3);
  105782. if (this._options.space_after_named_function && $) {
  105783. var A = this._tokens.peek(-4);
  105784. d($, ["async", "function"]) || $.text === "*" && d(A, ["async", "function"]) ? this._output.space_before_token = !0 : this._flags.mode === m.ObjectLiteral ? ($.text === "{" || $.text === "," || $.text === "*" && (A.text === "{" || A.text === ",")) && (this._output.space_before_token = !0) : this._flags.parent && this._flags.parent.class_start_block && (this._output.space_before_token = !0);
  105785. }
  105786. } else
  105787. this.allow_wrap_or_preserved_newline(w);
  105788. (this._flags.last_token.type === s.RESERVED && (this._flags.last_word === "function" || this._flags.last_word === "typeof") || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","]))) && (this._output.space_before_token = this._options.space_after_anon_function);
  105789. }
  105790. this._flags.last_token.text === ";" || this._flags.last_token.type === s.START_BLOCK ? this.print_newline() : (this._flags.last_token.type === s.END_EXPR || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === s.COMMA) && this.allow_wrap_or_preserved_newline(w, w.newlines), this.print_token(w), this.set_mode(P), this._options.space_in_paren && (this._output.space_before_token = !0), this.indent();
  105791. }, C.prototype.handle_end_expr = function(w) {
  105792. for (; this._flags.mode === m.Statement; )
  105793. this.restore_mode();
  105794. this.handle_whitespace_and_comments(w), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
  105795. w,
  105796. w.text === "]" && _(this._flags.mode) && !this._options.keep_array_indentation
  105797. ), this._options.space_in_paren && (this._flags.last_token.type === s.START_EXPR && !this._options.space_in_empty_paren ? (this._output.trim(), this._output.space_before_token = !1) : this._output.space_before_token = !0), this.deindent(), this.print_token(w), this.restore_mode(), y(this._output, this._previous_flags), this._flags.do_while && this._previous_flags.mode === m.Conditional && (this._previous_flags.mode = m.Expression, this._flags.do_block = !1, this._flags.do_while = !1);
  105798. }, C.prototype.handle_start_block = function(w) {
  105799. this.handle_whitespace_and_comments(w);
  105800. var P = this._tokens.peek(), $ = this._tokens.peek(1);
  105801. this._flags.last_word === "switch" && this._flags.last_token.type === s.END_EXPR ? (this.set_mode(m.BlockStatement), this._flags.in_case_statement = !0) : this._flags.case_body ? this.set_mode(m.BlockStatement) : $ && (l($.text, [":", ","]) && l(P.type, [s.STRING, s.WORD, s.RESERVED]) || l(P.text, ["get", "set", "..."]) && l($.type, [s.WORD, s.RESERVED])) ? l(this._last_last_text, ["class", "interface"]) && !l($.text, [":", ","]) ? this.set_mode(m.BlockStatement) : this.set_mode(m.ObjectLiteral) : this._flags.last_token.type === s.OPERATOR && this._flags.last_token.text === "=>" ? this.set_mode(m.BlockStatement) : l(this._flags.last_token.type, [s.EQUALS, s.START_EXPR, s.COMMA, s.OPERATOR]) || d(this._flags.last_token, ["return", "throw", "import", "default"]) ? this.set_mode(m.ObjectLiteral) : this.set_mode(m.BlockStatement), this._flags.last_token && d(this._flags.last_token.previous, ["class", "extends"]) && (this._flags.class_start_block = !0);
  105802. var A = !P.comments_before && P.text === "}", D = A && this._flags.last_word === "function" && this._flags.last_token.type === s.END_EXPR;
  105803. if (this._options.brace_preserve_inline) {
  105804. var E = 0, R = null;
  105805. this._flags.inline_frame = !0;
  105806. do
  105807. if (E += 1, R = this._tokens.peek(E - 1), R.newlines) {
  105808. this._flags.inline_frame = !1;
  105809. break;
  105810. }
  105811. while (R.type !== s.EOF && !(R.type === s.END_BLOCK && R.opened === w));
  105812. }
  105813. (this._options.brace_style === "expand" || this._options.brace_style === "none" && w.newlines) && !this._flags.inline_frame ? this._flags.last_token.type !== s.OPERATOR && (D || this._flags.last_token.type === s.EQUALS || d(this._flags.last_token, h) && this._flags.last_token.text !== "else") ? this._output.space_before_token = !0 : this.print_newline(!1, !0) : (_(this._previous_flags.mode) && (this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.COMMA) && ((this._flags.last_token.type === s.COMMA || this._options.space_in_paren) && (this._output.space_before_token = !0), (this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR && this._flags.inline_frame) && (this.allow_wrap_or_preserved_newline(w), this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame, this._flags.multiline_frame = !1)), this._flags.last_token.type !== s.OPERATOR && this._flags.last_token.type !== s.START_EXPR && (l(this._flags.last_token.type, [s.START_BLOCK, s.SEMICOLON]) && !this._flags.inline_frame ? this.print_newline() : this._output.space_before_token = !0)), this.print_token(w), this.indent(), !A && !(this._options.brace_preserve_inline && this._flags.inline_frame) && this.print_newline();
  105814. }, C.prototype.handle_end_block = function(w) {
  105815. for (this.handle_whitespace_and_comments(w); this._flags.mode === m.Statement; )
  105816. this.restore_mode();
  105817. var P = this._flags.last_token.type === s.START_BLOCK;
  105818. this._flags.inline_frame && !P ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? P || this.print_newline() : P || (_(this._flags.mode) && this._options.keep_array_indentation ? (this._options.keep_array_indentation = !1, this.print_newline(), this._options.keep_array_indentation = !0) : this.print_newline()), this.restore_mode(), this.print_token(w);
  105819. }, C.prototype.handle_word = function(w) {
  105820. if (w.type === s.RESERVED) {
  105821. if (l(w.text, ["set", "get"]) && this._flags.mode !== m.ObjectLiteral)
  105822. w.type = s.WORD;
  105823. else if (w.text === "import" && l(this._tokens.peek().text, ["(", "."]))
  105824. w.type = s.WORD;
  105825. else if (l(w.text, ["as", "from"]) && !this._flags.import_block)
  105826. w.type = s.WORD;
  105827. else if (this._flags.mode === m.ObjectLiteral) {
  105828. var P = this._tokens.peek();
  105829. P.text === ":" && (w.type = s.WORD);
  105830. }
  105831. }
  105832. if (this.start_of_statement(w) ? d(this._flags.last_token, ["var", "let", "const"]) && w.type === s.WORD && (this._flags.declaration_statement = !0) : w.newlines && !O(this._flags.mode) && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++") && this._flags.last_token.type !== s.EQUALS && (this._options.preserve_newlines || !d(this._flags.last_token, ["var", "let", "const", "set", "get"])) ? (this.handle_whitespace_and_comments(w), this.print_newline()) : this.handle_whitespace_and_comments(w), this._flags.do_block && !this._flags.do_while)
  105833. if (f(w, "while")) {
  105834. this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0, this._flags.do_while = !0;
  105835. return;
  105836. } else
  105837. this.print_newline(), this._flags.do_block = !1;
  105838. if (this._flags.if_block)
  105839. if (!this._flags.else_block && f(w, "else"))
  105840. this._flags.else_block = !0;
  105841. else {
  105842. for (; this._flags.mode === m.Statement; )
  105843. this.restore_mode();
  105844. this._flags.if_block = !1, this._flags.else_block = !1;
  105845. }
  105846. if (this._flags.in_case_statement && d(w, ["case", "default"])) {
  105847. this.print_newline(), !this._flags.case_block && (this._flags.case_body || this._options.jslint_happy) && this.deindent(), this._flags.case_body = !1, this.print_token(w), this._flags.in_case = !0;
  105848. return;
  105849. }
  105850. if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR) && !this.start_of_object_property() && !// start of object property is different for numeric values with +/- prefix operators
  105851. (l(this._flags.last_token.text, ["+", "-"]) && this._last_last_text === ":" && this._flags.parent.mode === m.ObjectLiteral) && this.allow_wrap_or_preserved_newline(w), f(w, "function")) {
  105852. (l(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(l(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === s.OPERATOR)) && !this._output.just_added_blankline() && !w.comments_before && (this.print_newline(), this.print_newline(!0)), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD ? d(this._flags.last_token, ["get", "set", "new", "export"]) || d(this._flags.last_token, T) ? this._output.space_before_token = !0 : f(this._flags.last_token, "default") && this._last_last_text === "export" ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" ? this._output.space_before_token = !0 : this.print_newline() : this._flags.last_token.type === s.OPERATOR || this._flags.last_token.text === "=" ? this._output.space_before_token = !0 : !this._flags.multiline_frame && (O(this._flags.mode) || _(this._flags.mode)) || this.print_newline(), this.print_token(w), this._flags.last_word = w.text;
  105853. return;
  105854. }
  105855. var $ = "NONE";
  105856. if (this._flags.last_token.type === s.END_BLOCK ? this._previous_flags.inline_frame ? $ = "SPACE" : d(w, ["else", "catch", "finally", "from"]) ? this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && w.newlines ? $ = "NEWLINE" : ($ = "SPACE", this._output.space_before_token = !0) : $ = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && this._flags.mode === m.BlockStatement ? $ = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && O(this._flags.mode) ? $ = "SPACE" : this._flags.last_token.type === s.STRING ? $ = "NEWLINE" : this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","])) ? $ = "SPACE" : this._flags.last_token.type === s.START_BLOCK ? this._flags.inline_frame ? $ = "SPACE" : $ = "NEWLINE" : this._flags.last_token.type === s.END_EXPR && (this._output.space_before_token = !0, $ = "NEWLINE"), d(w, a) && this._flags.last_token.text !== ")" && (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export" ? $ = "SPACE" : $ = "NEWLINE"), d(w, ["else", "catch", "finally"]))
  105857. if ((!(this._flags.last_token.type === s.END_BLOCK && this._previous_flags.mode === m.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && w.newlines) && !this._flags.inline_frame)
  105858. this.print_newline();
  105859. else {
  105860. this._output.trim(!0);
  105861. var A = this._output.current_line;
  105862. A.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
  105863. }
  105864. else $ === "NEWLINE" ? d(this._flags.last_token, h) ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" && d(w, ["var", "let", "const"]) ? this._output.space_before_token = !0 : this._flags.last_token.type !== s.END_EXPR ? (this._flags.last_token.type !== s.START_EXPR || !d(w, ["var", "let", "const"])) && this._flags.last_token.text !== ":" && (f(w, "if") && f(w.previous, "else") ? this._output.space_before_token = !0 : this.print_newline()) : d(w, a) && this._flags.last_token.text !== ")" && this.print_newline() : this._flags.multiline_frame && _(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}" ? this.print_newline() : $ === "SPACE" && (this._output.space_before_token = !0);
  105865. w.previous && (w.previous.type === s.WORD || w.previous.type === s.RESERVED) && (this._output.space_before_token = !0), this.print_token(w), this._flags.last_word = w.text, w.type === s.RESERVED && (w.text === "do" ? this._flags.do_block = !0 : w.text === "if" ? this._flags.if_block = !0 : w.text === "import" ? this._flags.import_block = !0 : this._flags.import_block && f(w, "from") && (this._flags.import_block = !1));
  105866. }, C.prototype.handle_semicolon = function(w) {
  105867. this.start_of_statement(w) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(w);
  105868. for (var P = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(P, "else")) && !this._flags.do_block; )
  105869. this.restore_mode();
  105870. this._flags.import_block && (this._flags.import_block = !1), this.print_token(w);
  105871. }, C.prototype.handle_string = function(w) {
  105872. w.text.startsWith("`") && w.newlines === 0 && w.whitespace_before === "" && (w.previous.text === ")" || this._flags.last_token.type === s.WORD) || (this.start_of_statement(w) ? this._output.space_before_token = !0 : (this.handle_whitespace_and_comments(w), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.inline_frame ? this._output.space_before_token = !0 : this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR ? this.start_of_object_property() || this.allow_wrap_or_preserved_newline(w) : w.text.startsWith("`") && this._flags.last_token.type === s.END_EXPR && (w.previous.text === "]" || w.previous.text === ")") && w.newlines === 0 ? this._output.space_before_token = !0 : this.print_newline())), this.print_token(w);
  105873. }, C.prototype.handle_equals = function(w) {
  105874. this.start_of_statement(w) || this.handle_whitespace_and_comments(w), this._flags.declaration_statement && (this._flags.declaration_assignment = !0), this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0;
  105875. }, C.prototype.handle_comma = function(w) {
  105876. this.handle_whitespace_and_comments(w, !0), this.print_token(w), this._output.space_before_token = !0, this._flags.declaration_statement ? (O(this._flags.parent.mode) && (this._flags.declaration_assignment = !1), this._flags.declaration_assignment ? (this._flags.declaration_assignment = !1, this.print_newline(!1, !0)) : this._options.comma_first && this.allow_wrap_or_preserved_newline(w)) : this._flags.mode === m.ObjectLiteral || this._flags.mode === m.Statement && this._flags.parent.mode === m.ObjectLiteral ? (this._flags.mode === m.Statement && this.restore_mode(), this._flags.inline_frame || this.print_newline()) : this._options.comma_first && this.allow_wrap_or_preserved_newline(w);
  105877. }, C.prototype.handle_operator = function(w) {
  105878. var P = w.text === "*" && (d(this._flags.last_token, ["function", "yield"]) || l(this._flags.last_token.type, [s.START_BLOCK, s.COMMA, s.END_BLOCK, s.SEMICOLON])), $ = l(w.text, ["-", "+"]) && (l(this._flags.last_token.type, [s.START_BLOCK, s.START_EXPR, s.EQUALS, s.OPERATOR]) || l(this._flags.last_token.text, a) || this._flags.last_token.text === ",");
  105879. if (!this.start_of_statement(w)) {
  105880. var A = !P;
  105881. this.handle_whitespace_and_comments(w, A);
  105882. }
  105883. if (w.text === "*" && this._flags.last_token.type === s.DOT) {
  105884. this.print_token(w);
  105885. return;
  105886. }
  105887. if (w.text === "::") {
  105888. this.print_token(w);
  105889. return;
  105890. }
  105891. if (l(w.text, ["-", "+"]) && this.start_of_object_property()) {
  105892. this.print_token(w);
  105893. return;
  105894. }
  105895. if (this._flags.last_token.type === s.OPERATOR && l(this._options.operator_position, g) && this.allow_wrap_or_preserved_newline(w), w.text === ":" && this._flags.in_case) {
  105896. this.print_token(w), this._flags.in_case = !1, this._flags.case_body = !0, this._tokens.peek().type !== s.START_BLOCK ? (this.indent(), this.print_newline(), this._flags.case_block = !1) : (this._flags.case_block = !0, this._output.space_before_token = !0);
  105897. return;
  105898. }
  105899. var D = !0, E = !0, R = !1;
  105900. if (w.text === ":" ? this._flags.ternary_depth === 0 ? D = !1 : (this._flags.ternary_depth -= 1, R = !0) : w.text === "?" && (this._flags.ternary_depth += 1), !$ && !P && this._options.preserve_newlines && l(w.text, o)) {
  105901. var N = w.text === ":", V = N && R, z = N && !R;
  105902. switch (this._options.operator_position) {
  105903. case v.before_newline:
  105904. this._output.space_before_token = !z, this.print_token(w), (!N || V) && this.allow_wrap_or_preserved_newline(w), this._output.space_before_token = !0;
  105905. return;
  105906. case v.after_newline:
  105907. this._output.space_before_token = !0, !N || V ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(w) : this._output.space_before_token = !1, this.print_token(w), this._output.space_before_token = !0;
  105908. return;
  105909. case v.preserve_newline:
  105910. z || this.allow_wrap_or_preserved_newline(w), D = !(this._output.just_added_newline() || z), this._output.space_before_token = D, this.print_token(w), this._output.space_before_token = !0;
  105911. return;
  105912. }
  105913. }
  105914. if (P) {
  105915. this.allow_wrap_or_preserved_newline(w), D = !1;
  105916. var W = this._tokens.peek();
  105917. E = W && l(W.type, [s.WORD, s.RESERVED]);
  105918. } else if (w.text === "...")
  105919. this.allow_wrap_or_preserved_newline(w), D = this._flags.last_token.type === s.START_BLOCK, E = !1;
  105920. else if (l(w.text, ["--", "++", "!", "~"]) || $) {
  105921. if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR) && this.allow_wrap_or_preserved_newline(w), D = !1, E = !1, w.newlines && (w.text === "--" || w.text === "++" || w.text === "~")) {
  105922. var F = d(this._flags.last_token, h) && w.newlines;
  105923. F && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(F, !0);
  105924. }
  105925. this._flags.last_token.text === ";" && O(this._flags.mode) && (D = !0), this._flags.last_token.type === s.RESERVED ? D = !0 : this._flags.last_token.type === s.END_EXPR ? D = !(this._flags.last_token.text === "]" && (w.text === "--" || w.text === "++")) : this._flags.last_token.type === s.OPERATOR && (D = l(w.text, ["--", "-", "++", "+"]) && l(this._flags.last_token.text, ["--", "-", "++", "+"]), l(w.text, ["+", "-"]) && l(this._flags.last_token.text, ["--", "++"]) && (E = !0)), (this._flags.mode === m.BlockStatement && !this._flags.inline_frame || this._flags.mode === m.Statement) && (this._flags.last_token.text === "{" || this._flags.last_token.text === ";") && this.print_newline();
  105926. }
  105927. this._output.space_before_token = this._output.space_before_token || D, this.print_token(w), this._output.space_before_token = E;
  105928. }, C.prototype.handle_block_comment = function(w, P) {
  105929. if (this._output.raw) {
  105930. this._output.add_raw_token(w), w.directives && w.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
  105931. return;
  105932. }
  105933. if (w.directives) {
  105934. this.print_newline(!1, P), this.print_token(w), w.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
  105935. return;
  105936. }
  105937. if (!n.newline.test(w.text) && !w.newlines) {
  105938. this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0;
  105939. return;
  105940. } else
  105941. this.print_block_commment(w, P);
  105942. }, C.prototype.print_block_commment = function(w, P) {
  105943. var $ = b(w.text), A, D = !1, E = !1, R = w.whitespace_before, N = R.length;
  105944. if (this.print_newline(!1, P), this.print_token_line_indentation(w), this._output.add_token($[0]), this.print_newline(!1, P), $.length > 1) {
  105945. for ($ = $.slice(1), D = S($, "*"), E = x($, R), D && (this._flags.alignment = 1), A = 0; A < $.length; A++)
  105946. D ? (this.print_token_line_indentation(w), this._output.add_token(u($[A]))) : E && $[A] ? (this.print_token_line_indentation(w), this._output.add_token($[A].substring(N))) : (this._output.current_line.set_indent(-1), this._output.add_token($[A])), this.print_newline(!1, P);
  105947. this._flags.alignment = 0;
  105948. }
  105949. }, C.prototype.handle_comment = function(w, P) {
  105950. w.newlines ? this.print_newline(!1, P) : this._output.trim(!0), this._output.space_before_token = !0, this.print_token(w), this.print_newline(!1, P);
  105951. }, C.prototype.handle_dot = function(w) {
  105952. this.start_of_statement(w) || this.handle_whitespace_and_comments(w, !0), this._flags.last_token.text.match("^[0-9]+$") && (this._output.space_before_token = !0), d(this._flags.last_token, h) ? this._output.space_before_token = !1 : this.allow_wrap_or_preserved_newline(
  105953. w,
  105954. this._flags.last_token.text === ")" && this._options.break_chained_methods
  105955. ), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(w);
  105956. }, C.prototype.handle_unknown = function(w, P) {
  105957. this.print_token(w), w.text[w.text.length - 1] === `
  105958. ` && this.print_newline(!1, P);
  105959. }, C.prototype.handle_eof = function(w) {
  105960. for (; this._flags.mode === m.Statement; )
  105961. this.restore_mode();
  105962. this.handle_whitespace_and_comments(w);
  105963. }, F$.Beautifier = C, F$;
  105964. }
  105965. var IG;
  105966. function Aht() {
  105967. if (IG) return d_.exports;
  105968. IG = 1;
  105969. var t = $ht().Beautifier, e = mle().Options;
  105970. function n(r, i) {
  105971. var a = new t(r, i);
  105972. return a.beautify();
  105973. }
  105974. return d_.exports = n, d_.exports.defaultOptions = function() {
  105975. return new e();
  105976. }, d_.exports;
  105977. }
  105978. var v_ = { exports: {} }, K$ = {}, J$ = {}, DG;
  105979. function ble() {
  105980. if (DG) return J$;
  105981. DG = 1;
  105982. var t = k4().Options;
  105983. function e(n) {
  105984. t.call(this, n, "css"), this.selector_separator_newline = this._get_boolean("selector_separator_newline", !0), this.newline_between_rules = this._get_boolean("newline_between_rules", !0);
  105985. var r = this._get_boolean("space_around_selector_separator");
  105986. this.space_around_combinator = this._get_boolean("space_around_combinator") || r;
  105987. var i = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
  105988. this.brace_style = "collapse";
  105989. for (var a = 0; a < i.length; a++)
  105990. i[a] !== "expand" ? this.brace_style = "collapse" : this.brace_style = i[a];
  105991. }
  105992. return e.prototype = new t(), J$.Options = e, J$;
  105993. }
  105994. var RG;
  105995. function Eht() {
  105996. if (RG) return K$;
  105997. RG = 1;
  105998. var t = ble().Options, e = R4().Output, n = L4().InputScanner, r = N4().Directives, i = new r(/\/\*/, /\*\//), a = /\r\n|[\r\n]/, o = /\r\n|[\r\n]/g, s = /\s/, l = /(?:\s|\n)+/g, u = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, c = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
  105999. function f(d, h) {
  106000. this._source_text = d || "", this._options = new t(h), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
  106001. page: !0,
  106002. "font-face": !0,
  106003. keyframes: !0,
  106004. // also in CONDITIONAL_GROUP_RULE below
  106005. media: !0,
  106006. supports: !0,
  106007. document: !0
  106008. }, this.CONDITIONAL_GROUP_RULE = {
  106009. media: !0,
  106010. supports: !0,
  106011. document: !0
  106012. }, this.NON_SEMICOLON_NEWLINE_PROPERTY = [
  106013. "grid-template-areas",
  106014. "grid-template"
  106015. ];
  106016. }
  106017. return f.prototype.eatString = function(d) {
  106018. var h = "";
  106019. for (this._ch = this._input.next(); this._ch; ) {
  106020. if (h += this._ch, this._ch === "\\")
  106021. h += this._input.next();
  106022. else if (d.indexOf(this._ch) !== -1 || this._ch === `
  106023. `)
  106024. break;
  106025. this._ch = this._input.next();
  106026. }
  106027. return h;
  106028. }, f.prototype.eatWhitespace = function(d) {
  106029. for (var h = s.test(this._input.peek()), p = 0; s.test(this._input.peek()); )
  106030. this._ch = this._input.next(), d && this._ch === `
  106031. ` && (p === 0 || p < this._options.max_preserve_newlines) && (p++, this._output.add_new_line(!0));
  106032. return h;
  106033. }, f.prototype.foundNestedPseudoClass = function() {
  106034. for (var d = 0, h = 1, p = this._input.peek(h); p; ) {
  106035. if (p === "{")
  106036. return !0;
  106037. if (p === "(")
  106038. d += 1;
  106039. else if (p === ")") {
  106040. if (d === 0)
  106041. return !1;
  106042. d -= 1;
  106043. } else if (p === ";" || p === "}")
  106044. return !1;
  106045. h++, p = this._input.peek(h);
  106046. }
  106047. return !1;
  106048. }, f.prototype.print_string = function(d) {
  106049. this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(d);
  106050. }, f.prototype.preserveSingleSpace = function(d) {
  106051. d && (this._output.space_before_token = !0);
  106052. }, f.prototype.indent = function() {
  106053. this._indentLevel++;
  106054. }, f.prototype.outdent = function() {
  106055. this._indentLevel > 0 && this._indentLevel--;
  106056. }, f.prototype.beautify = function() {
  106057. if (this._options.disabled)
  106058. return this._source_text;
  106059. var d = this._source_text, h = this._options.eol;
  106060. h === "auto" && (h = `
  106061. `, d && a.test(d || "") && (h = d.match(a)[0])), d = d.replace(o, `
  106062. `);
  106063. var p = d.match(/^[\t ]*/)[0];
  106064. this._output = new e(this._options, p), this._input = new n(d), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
  106065. for (var v = 0, g = !1, m = !1, y = !1, b = !1, _ = !1, O = this._ch, S = !1, x, C, T; x = this._input.read(l), C = x !== "", T = O, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), O = this._ch, this._ch; )
  106066. if (this._ch === "/" && this._input.peek() === "*") {
  106067. this._output.add_new_line(), this._input.back();
  106068. var w = this._input.read(u), P = i.get_directives(w);
  106069. P && P.ignore === "start" && (w += i.readIgnored(this._input)), this.print_string(w), this.eatWhitespace(!0), this._output.add_new_line();
  106070. } else if (this._ch === "/" && this._input.peek() === "/")
  106071. this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(c)), this.eatWhitespace(!0);
  106072. else if (this._ch === "$") {
  106073. this.preserveSingleSpace(C), this.print_string(this._ch);
  106074. var $ = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
  106075. $.match(/[ :]$/) && ($ = this.eatString(": ").replace(/\s+$/, ""), this.print_string($), this._output.space_before_token = !0), v === 0 && $.indexOf(":") !== -1 && (m = !0, this.indent());
  106076. } else if (this._ch === "@")
  106077. if (this.preserveSingleSpace(C), this._input.peek() === "{")
  106078. this.print_string(this._ch + this.eatString("}"));
  106079. else {
  106080. this.print_string(this._ch);
  106081. var A = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
  106082. A.match(/[ :]$/) && (A = this.eatString(": ").replace(/\s+$/, ""), this.print_string(A), this._output.space_before_token = !0), v === 0 && A.indexOf(":") !== -1 ? (m = !0, this.indent()) : A in this.NESTED_AT_RULE ? (this._nestedLevel += 1, A in this.CONDITIONAL_GROUP_RULE && (y = !0)) : v === 0 && !m && (b = !0);
  106083. }
  106084. else if (this._ch === "#" && this._input.peek() === "{")
  106085. this.preserveSingleSpace(C), this.print_string(this._ch + this.eatString("}"));
  106086. else if (this._ch === "{")
  106087. m && (m = !1, this.outdent()), b = !1, y ? (y = !1, g = this._indentLevel >= this._nestedLevel) : g = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && g && this._output.previous_line && this._output.previous_line.item(-1) !== "{" && this._output.ensure_empty_line_above("/", ","), this._output.space_before_token = !0, this._options.brace_style === "expand" ? (this._output.add_new_line(), this.print_string(this._ch), this.indent(), this._output.set_indent(this._indentLevel)) : (T === "(" ? this._output.space_before_token = !1 : T !== "," && this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line();
  106088. else if (this._ch === "}")
  106089. this.outdent(), this._output.add_new_line(), T === "{" && this._output.trim(!0), m && (this.outdent(), m = !1), this.print_string(this._ch), g = !1, this._nestedLevel && this._nestedLevel--, this.eatWhitespace(!0), this._output.add_new_line(), this._options.newline_between_rules && !this._output.just_added_blankline() && this._input.peek() !== "}" && this._output.add_new_line(!0), this._input.peek() === ")" && (this._output.trim(!0), this._options.brace_style === "expand" && this._output.add_new_line(!0));
  106090. else if (this._ch === ":") {
  106091. for (var D = 0; D < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; D++)
  106092. if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[D])) {
  106093. S = !0;
  106094. break;
  106095. }
  106096. (g || y) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !b && v === 0 ? (this.print_string(":"), m || (m = !0, this._output.space_before_token = !0, this.eatWhitespace(!0), this.indent())) : (this._input.lookBack(" ") && (this._output.space_before_token = !0), this._input.peek() === ":" ? (this._ch = this._input.next(), this.print_string("::")) : this.print_string(":"));
  106097. } else if (this._ch === '"' || this._ch === "'") {
  106098. var E = T === '"' || T === "'";
  106099. this.preserveSingleSpace(E || C), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
  106100. } else if (this._ch === ";")
  106101. S = !1, v === 0 ? (m && (this.outdent(), m = !1), b = !1, this.print_string(this._ch), this.eatWhitespace(!0), this._input.peek() !== "/" && this._output.add_new_line()) : (this.print_string(this._ch), this.eatWhitespace(!0), this._output.space_before_token = !0);
  106102. else if (this._ch === "(")
  106103. if (this._input.lookBack("url"))
  106104. this.print_string(this._ch), this.eatWhitespace(), v++, this.indent(), this._ch = this._input.next(), this._ch === ")" || this._ch === '"' || this._ch === "'" ? this._input.back() : this._ch && (this.print_string(this._ch + this.eatString(")")), v && (v--, this.outdent()));
  106105. else {
  106106. var R = !1;
  106107. this._input.lookBack("with") && (R = !0), this.preserveSingleSpace(C || R), this.print_string(this._ch), m && T === "$" && this._options.selector_separator_newline ? (this._output.add_new_line(), _ = !0) : (this.eatWhitespace(), v++, this.indent());
  106108. }
  106109. else if (this._ch === ")")
  106110. v && (v--, this.outdent()), _ && this._input.peek() === ";" && this._options.selector_separator_newline && (_ = !1, this.outdent(), this._output.add_new_line()), this.print_string(this._ch);
  106111. else if (this._ch === ",")
  106112. this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!m || _) && v === 0 && !b ? this._output.add_new_line() : this._output.space_before_token = !0;
  106113. else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !m && v === 0)
  106114. this._options.space_around_combinator ? (this._output.space_before_token = !0, this.print_string(this._ch), this._output.space_before_token = !0) : (this.print_string(this._ch), this.eatWhitespace(), this._ch && s.test(this._ch) && (this._ch = ""));
  106115. else if (this._ch === "]")
  106116. this.print_string(this._ch);
  106117. else if (this._ch === "[")
  106118. this.preserveSingleSpace(C), this.print_string(this._ch);
  106119. else if (this._ch === "=")
  106120. this.eatWhitespace(), this.print_string("="), s.test(this._ch) && (this._ch = "");
  106121. else if (this._ch === "!" && !this._input.lookBack("\\"))
  106122. this._output.space_before_token = !0, this.print_string(this._ch);
  106123. else {
  106124. var N = T === '"' || T === "'";
  106125. this.preserveSingleSpace(N || C), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
  106126. ` && S && this._output.add_new_line();
  106127. }
  106128. var V = this._output.get_code(h);
  106129. return V;
  106130. }, K$.Beautifier = f, K$;
  106131. }
  106132. var kG;
  106133. function Mht() {
  106134. if (kG) return v_.exports;
  106135. kG = 1;
  106136. var t = Eht().Beautifier, e = ble().Options;
  106137. function n(r, i) {
  106138. var a = new t(r, i);
  106139. return a.beautify();
  106140. }
  106141. return v_.exports = n, v_.exports.defaultOptions = function() {
  106142. return new e();
  106143. }, v_.exports;
  106144. }
  106145. var g_ = { exports: {} }, e2 = {}, t2 = {}, LG;
  106146. function _le() {
  106147. if (LG) return t2;
  106148. LG = 1;
  106149. var t = k4().Options;
  106150. function e(n) {
  106151. t.call(this, n, "html"), this.templating.length === 1 && this.templating[0] === "auto" && (this.templating = ["django", "erb", "handlebars", "php"]), this.indent_inner_html = this._get_boolean("indent_inner_html"), this.indent_body_inner_html = this._get_boolean("indent_body_inner_html", !0), this.indent_head_inner_html = this._get_boolean("indent_head_inner_html", !0), this.indent_handlebars = this._get_boolean("indent_handlebars", !0), this.wrap_attributes = this._get_selection(
  106152. "wrap_attributes",
  106153. ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
  106154. ), this.wrap_attributes_min_attrs = this._get_number("wrap_attributes_min_attrs", 2), this.wrap_attributes_indent_size = this._get_number("wrap_attributes_indent_size", this.indent_size), this.extra_liners = this._get_array("extra_liners", ["head", "body", "/html"]), this.inline = this._get_array("inline", [
  106155. "a",
  106156. "abbr",
  106157. "area",
  106158. "audio",
  106159. "b",
  106160. "bdi",
  106161. "bdo",
  106162. "br",
  106163. "button",
  106164. "canvas",
  106165. "cite",
  106166. "code",
  106167. "data",
  106168. "datalist",
  106169. "del",
  106170. "dfn",
  106171. "em",
  106172. "embed",
  106173. "i",
  106174. "iframe",
  106175. "img",
  106176. "input",
  106177. "ins",
  106178. "kbd",
  106179. "keygen",
  106180. "label",
  106181. "map",
  106182. "mark",
  106183. "math",
  106184. "meter",
  106185. "noscript",
  106186. "object",
  106187. "output",
  106188. "progress",
  106189. "q",
  106190. "ruby",
  106191. "s",
  106192. "samp",
  106193. /* 'script', */
  106194. "select",
  106195. "small",
  106196. "span",
  106197. "strong",
  106198. "sub",
  106199. "sup",
  106200. "svg",
  106201. "template",
  106202. "textarea",
  106203. "time",
  106204. "u",
  106205. "var",
  106206. "video",
  106207. "wbr",
  106208. "text",
  106209. // obsolete inline tags
  106210. "acronym",
  106211. "big",
  106212. "strike",
  106213. "tt"
  106214. ]), this.inline_custom_elements = this._get_boolean("inline_custom_elements", !0), this.void_elements = this._get_array("void_elements", [
  106215. // HTLM void elements - aka self-closing tags - aka singletons
  106216. // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
  106217. "area",
  106218. "base",
  106219. "br",
  106220. "col",
  106221. "embed",
  106222. "hr",
  106223. "img",
  106224. "input",
  106225. "keygen",
  106226. "link",
  106227. "menuitem",
  106228. "meta",
  106229. "param",
  106230. "source",
  106231. "track",
  106232. "wbr",
  106233. // NOTE: Optional tags are too complex for a simple list
  106234. // they are hard coded in _do_optional_end_element
  106235. // Doctype and xml elements
  106236. "!doctype",
  106237. "?xml",
  106238. // obsolete tags
  106239. // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
  106240. // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
  106241. "basefont",
  106242. "isindex"
  106243. ]), this.unformatted = this._get_array("unformatted", []), this.content_unformatted = this._get_array("content_unformatted", [
  106244. "pre",
  106245. "textarea"
  106246. ]), this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter"), this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
  106247. }
  106248. return e.prototype = new t(), t2.Options = e, t2;
  106249. }
  106250. var m_ = {}, NG;
  106251. function BG() {
  106252. if (NG) return m_;
  106253. NG = 1;
  106254. var t = CS().Tokenizer, e = CS().TOKEN, n = N4().Directives, r = yle().TemplatablePattern, i = Qw().Pattern, a = {
  106255. TAG_OPEN: "TK_TAG_OPEN",
  106256. TAG_CLOSE: "TK_TAG_CLOSE",
  106257. CONTROL_FLOW_OPEN: "TK_CONTROL_FLOW_OPEN",
  106258. CONTROL_FLOW_CLOSE: "TK_CONTROL_FLOW_CLOSE",
  106259. ATTRIBUTE: "TK_ATTRIBUTE",
  106260. EQUALS: "TK_EQUALS",
  106261. VALUE: "TK_VALUE",
  106262. COMMENT: "TK_COMMENT",
  106263. TEXT: "TK_TEXT",
  106264. UNKNOWN: "TK_UNKNOWN",
  106265. START: e.START,
  106266. RAW: e.RAW,
  106267. EOF: e.EOF
  106268. }, o = new n(/<\!--/, /-->/), s = function(l, u) {
  106269. t.call(this, l, u), this._current_tag_name = "";
  106270. var c = new r(this._input).read_options(this._options), f = new i(this._input);
  106271. if (this.__patterns = {
  106272. word: c.until(/[\n\r\t <]/),
  106273. word_control_flow_close_excluded: c.until(/[\n\r\t <}]/),
  106274. single_quote: c.until_after(/'/),
  106275. double_quote: c.until_after(/"/),
  106276. attribute: c.until(/[\n\r\t =>]|\/>/),
  106277. element_name: c.until(/[\n\r\t >\/]/),
  106278. angular_control_flow_start: f.matching(/\@[a-zA-Z]+[^({]*[({]/),
  106279. handlebars_comment: f.starting_with(/{{!--/).until_after(/--}}/),
  106280. handlebars: f.starting_with(/{{/).until_after(/}}/),
  106281. handlebars_open: f.until(/[\n\r\t }]/),
  106282. handlebars_raw_close: f.until(/}}/),
  106283. comment: f.starting_with(/<!--/).until_after(/-->/),
  106284. cdata: f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
  106285. // https://en.wikipedia.org/wiki/Conditional_comment
  106286. conditional_comment: f.starting_with(/<!\[/).until_after(/]>/),
  106287. processing: f.starting_with(/<\?/).until_after(/\?>/)
  106288. }, this._options.indent_handlebars && (this.__patterns.word = this.__patterns.word.exclude("handlebars"), this.__patterns.word_control_flow_close_excluded = this.__patterns.word_control_flow_close_excluded.exclude("handlebars")), this._unformatted_content_delimiter = null, this._options.unformatted_content_delimiter) {
  106289. var d = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
  106290. this.__patterns.unformatted_content_delimiter = f.matching(d).until_after(d);
  106291. }
  106292. };
  106293. return s.prototype = new t(), s.prototype._is_comment = function(l) {
  106294. return !1;
  106295. }, s.prototype._is_opening = function(l) {
  106296. return l.type === a.TAG_OPEN || l.type === a.CONTROL_FLOW_OPEN;
  106297. }, s.prototype._is_closing = function(l, u) {
  106298. return l.type === a.TAG_CLOSE && u && ((l.text === ">" || l.text === "/>") && u.text[0] === "<" || l.text === "}}" && u.text[0] === "{" && u.text[1] === "{") || l.type === a.CONTROL_FLOW_CLOSE && l.text === "}" && u.text.endsWith("{");
  106299. }, s.prototype._reset = function() {
  106300. this._current_tag_name = "";
  106301. }, s.prototype._get_next_token = function(l, u) {
  106302. var c = null;
  106303. this._readWhitespace();
  106304. var f = this._input.peek();
  106305. return f === null ? this._create_token(a.EOF, "") : (c = c || this._read_open_handlebars(f, u), c = c || this._read_attribute(f, l, u), c = c || this._read_close(f, u), c = c || this._read_control_flows(f, u), c = c || this._read_raw_content(f, l, u), c = c || this._read_content_word(f, u), c = c || this._read_comment_or_cdata(f), c = c || this._read_processing(f), c = c || this._read_open(f, u), c = c || this._create_token(a.UNKNOWN, this._input.next()), c);
  106306. }, s.prototype._read_comment_or_cdata = function(l) {
  106307. var u = null, c = null, f = null;
  106308. if (l === "<") {
  106309. var d = this._input.peek(1);
  106310. d === "!" && (c = this.__patterns.comment.read(), c ? (f = o.get_directives(c), f && f.ignore === "start" && (c += o.readIgnored(this._input))) : c = this.__patterns.cdata.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
  106311. }
  106312. return u;
  106313. }, s.prototype._read_processing = function(l) {
  106314. var u = null, c = null, f = null;
  106315. if (l === "<") {
  106316. var d = this._input.peek(1);
  106317. (d === "!" || d === "?") && (c = this.__patterns.conditional_comment.read(), c = c || this.__patterns.processing.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
  106318. }
  106319. return u;
  106320. }, s.prototype._read_open = function(l, u) {
  106321. var c = null, f = null;
  106322. return (!u || u.type === a.CONTROL_FLOW_OPEN) && l === "<" && (c = this._input.next(), this._input.peek() === "/" && (c += this._input.next()), c += this.__patterns.element_name.read(), f = this._create_token(a.TAG_OPEN, c)), f;
  106323. }, s.prototype._read_open_handlebars = function(l, u) {
  106324. var c = null, f = null;
  106325. return (!u || u.type === a.CONTROL_FLOW_OPEN) && this._options.indent_handlebars && l === "{" && this._input.peek(1) === "{" && (this._input.peek(2) === "!" ? (c = this.__patterns.handlebars_comment.read(), c = c || this.__patterns.handlebars.read(), f = this._create_token(a.COMMENT, c)) : (c = this.__patterns.handlebars_open.read(), f = this._create_token(a.TAG_OPEN, c))), f;
  106326. }, s.prototype._read_control_flows = function(l, u) {
  106327. var c = "", f = null;
  106328. if (!this._options.templating.includes("angular") || !this._options.indent_handlebars)
  106329. return f;
  106330. if (l === "@") {
  106331. if (c = this.__patterns.angular_control_flow_start.read(), c === "")
  106332. return f;
  106333. for (var d = c.endsWith("(") ? 1 : 0, h = 0; !(c.endsWith("{") && d === h); ) {
  106334. var p = this._input.next();
  106335. if (p === null)
  106336. break;
  106337. p === "(" ? d++ : p === ")" && h++, c += p;
  106338. }
  106339. f = this._create_token(a.CONTROL_FLOW_OPEN, c);
  106340. } else l === "}" && u && u.type === a.CONTROL_FLOW_OPEN && (c = this._input.next(), f = this._create_token(a.CONTROL_FLOW_CLOSE, c));
  106341. return f;
  106342. }, s.prototype._read_close = function(l, u) {
  106343. var c = null, f = null;
  106344. return u && u.type === a.TAG_OPEN && (u.text[0] === "<" && (l === ">" || l === "/" && this._input.peek(1) === ">") ? (c = this._input.next(), l === "/" && (c += this._input.next()), f = this._create_token(a.TAG_CLOSE, c)) : u.text[0] === "{" && l === "}" && this._input.peek(1) === "}" && (this._input.next(), this._input.next(), f = this._create_token(a.TAG_CLOSE, "}}"))), f;
  106345. }, s.prototype._read_attribute = function(l, u, c) {
  106346. var f = null, d = "";
  106347. if (c && c.text[0] === "<")
  106348. if (l === "=")
  106349. f = this._create_token(a.EQUALS, this._input.next());
  106350. else if (l === '"' || l === "'") {
  106351. var h = this._input.next();
  106352. l === '"' ? h += this.__patterns.double_quote.read() : h += this.__patterns.single_quote.read(), f = this._create_token(a.VALUE, h);
  106353. } else
  106354. d = this.__patterns.attribute.read(), d && (u.type === a.EQUALS ? f = this._create_token(a.VALUE, d) : f = this._create_token(a.ATTRIBUTE, d));
  106355. return f;
  106356. }, s.prototype._is_content_unformatted = function(l) {
  106357. return this._options.void_elements.indexOf(l) === -1 && (this._options.content_unformatted.indexOf(l) !== -1 || this._options.unformatted.indexOf(l) !== -1);
  106358. }, s.prototype._read_raw_content = function(l, u, c) {
  106359. var f = "";
  106360. if (c && c.text[0] === "{")
  106361. f = this.__patterns.handlebars_raw_close.read();
  106362. else if (u.type === a.TAG_CLOSE && u.opened.text[0] === "<" && u.text[0] !== "/") {
  106363. var d = u.opened.text.substr(1).toLowerCase();
  106364. if (d === "script" || d === "style") {
  106365. var h = this._read_comment_or_cdata(l);
  106366. if (h)
  106367. return h.type = a.TEXT, h;
  106368. f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig"));
  106369. } else this._is_content_unformatted(d) && (f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig")));
  106370. }
  106371. return f ? this._create_token(a.TEXT, f) : null;
  106372. }, s.prototype._read_content_word = function(l, u) {
  106373. var c = "";
  106374. if (this._options.unformatted_content_delimiter && l === this._options.unformatted_content_delimiter[0] && (c = this.__patterns.unformatted_content_delimiter.read()), c || (c = u && u.type === a.CONTROL_FLOW_OPEN ? this.__patterns.word_control_flow_close_excluded.read() : this.__patterns.word.read()), c)
  106375. return this._create_token(a.TEXT, c);
  106376. }, m_.Tokenizer = s, m_.TOKEN = a, m_;
  106377. }
  106378. var zG;
  106379. function Iht() {
  106380. if (zG) return e2;
  106381. zG = 1;
  106382. var t = _le().Options, e = R4().Output, n = BG().Tokenizer, r = BG().TOKEN, i = /\r\n|[\r\n]/, a = /\r\n|[\r\n]/g, o = function(g, m) {
  106383. this.indent_level = 0, this.alignment_size = 0, this.max_preserve_newlines = g.max_preserve_newlines, this.preserve_newlines = g.preserve_newlines, this._output = new e(g, m);
  106384. };
  106385. o.prototype.current_line_has_match = function(g) {
  106386. return this._output.current_line.has_match(g);
  106387. }, o.prototype.set_space_before_token = function(g, m) {
  106388. this._output.space_before_token = g, this._output.non_breaking_space = m;
  106389. }, o.prototype.set_wrap_point = function() {
  106390. this._output.set_indent(this.indent_level, this.alignment_size), this._output.set_wrap_point();
  106391. }, o.prototype.add_raw_token = function(g) {
  106392. this._output.add_raw_token(g);
  106393. }, o.prototype.print_preserved_newlines = function(g) {
  106394. var m = 0;
  106395. g.type !== r.TEXT && g.previous.type !== r.TEXT && (m = g.newlines ? 1 : 0), this.preserve_newlines && (m = g.newlines < this.max_preserve_newlines + 1 ? g.newlines : this.max_preserve_newlines + 1);
  106396. for (var y = 0; y < m; y++)
  106397. this.print_newline(y > 0);
  106398. return m !== 0;
  106399. }, o.prototype.traverse_whitespace = function(g) {
  106400. return g.whitespace_before || g.newlines ? (this.print_preserved_newlines(g) || (this._output.space_before_token = !0), !0) : !1;
  106401. }, o.prototype.previous_token_wrapped = function() {
  106402. return this._output.previous_token_wrapped;
  106403. }, o.prototype.print_newline = function(g) {
  106404. this._output.add_new_line(g);
  106405. }, o.prototype.print_token = function(g) {
  106406. g.text && (this._output.set_indent(this.indent_level, this.alignment_size), this._output.add_token(g.text));
  106407. }, o.prototype.indent = function() {
  106408. this.indent_level++;
  106409. }, o.prototype.deindent = function() {
  106410. this.indent_level > 0 && (this.indent_level--, this._output.set_indent(this.indent_level, this.alignment_size));
  106411. }, o.prototype.get_full_indent = function(g) {
  106412. return g = this.indent_level + (g || 0), g < 1 ? "" : this._output.get_indent_string(g);
  106413. };
  106414. var s = function(g) {
  106415. for (var m = null, y = g.next; y.type !== r.EOF && g.closed !== y; ) {
  106416. if (y.type === r.ATTRIBUTE && y.text === "type") {
  106417. y.next && y.next.type === r.EQUALS && y.next.next && y.next.next.type === r.VALUE && (m = y.next.next.text);
  106418. break;
  106419. }
  106420. y = y.next;
  106421. }
  106422. return m;
  106423. }, l = function(g, m) {
  106424. var y = null, b = null;
  106425. return m.closed ? (g === "script" ? y = "text/javascript" : g === "style" && (y = "text/css"), y = s(m) || y, y.search("text/css") > -1 ? b = "css" : y.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1 ? b = "javascript" : y.search(/(text|application|dojo)\/(x-)?(html)/) > -1 ? b = "html" : y.search(/test\/null/) > -1 && (b = "null"), b) : null;
  106426. };
  106427. function u(g, m) {
  106428. return m.indexOf(g) !== -1;
  106429. }
  106430. function c(g, m, y) {
  106431. this.parent = g || null, this.tag = m ? m.tag_name : "", this.indent_level = y || 0, this.parser_token = m || null;
  106432. }
  106433. function f(g) {
  106434. this._printer = g, this._current_frame = null;
  106435. }
  106436. f.prototype.get_parser_token = function() {
  106437. return this._current_frame ? this._current_frame.parser_token : null;
  106438. }, f.prototype.record_tag = function(g) {
  106439. var m = new c(this._current_frame, g, this._printer.indent_level);
  106440. this._current_frame = m;
  106441. }, f.prototype._try_pop_frame = function(g) {
  106442. var m = null;
  106443. return g && (m = g.parser_token, this._printer.indent_level = g.indent_level, this._current_frame = g.parent), m;
  106444. }, f.prototype._get_frame = function(g, m) {
  106445. for (var y = this._current_frame; y && g.indexOf(y.tag) === -1; ) {
  106446. if (m && m.indexOf(y.tag) !== -1) {
  106447. y = null;
  106448. break;
  106449. }
  106450. y = y.parent;
  106451. }
  106452. return y;
  106453. }, f.prototype.try_pop = function(g, m) {
  106454. var y = this._get_frame([g], m);
  106455. return this._try_pop_frame(y);
  106456. }, f.prototype.indent_to_tag = function(g) {
  106457. var m = this._get_frame(g);
  106458. m && (this._printer.indent_level = m.indent_level);
  106459. };
  106460. function d(g, m, y, b) {
  106461. this._source_text = g || "", m = m || {}, this._js_beautify = y, this._css_beautify = b, this._tag_stack = null;
  106462. var _ = new t(m, "html");
  106463. this._options = _, this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 5) === "force", this._is_wrap_attributes_force_expand_multiline = this._options.wrap_attributes === "force-expand-multiline", this._is_wrap_attributes_force_aligned = this._options.wrap_attributes === "force-aligned", this._is_wrap_attributes_aligned_multiple = this._options.wrap_attributes === "aligned-multiple", this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 8) === "preserve", this._is_wrap_attributes_preserve_aligned = this._options.wrap_attributes === "preserve-aligned";
  106464. }
  106465. d.prototype.beautify = function() {
  106466. if (this._options.disabled)
  106467. return this._source_text;
  106468. var g = this._source_text, m = this._options.eol;
  106469. this._options.eol === "auto" && (m = `
  106470. `, g && i.test(g) && (m = g.match(i)[0])), g = g.replace(a, `
  106471. `);
  106472. var y = g.match(/^[\t ]*/)[0], b = {
  106473. text: "",
  106474. type: ""
  106475. }, _ = new h(), O = new o(this._options, y), S = new n(g, this._options).tokenize();
  106476. this._tag_stack = new f(O);
  106477. for (var x = null, C = S.next(); C.type !== r.EOF; )
  106478. C.type === r.TAG_OPEN || C.type === r.COMMENT ? (x = this._handle_tag_open(O, C, _, b, S), _ = x) : C.type === r.ATTRIBUTE || C.type === r.EQUALS || C.type === r.VALUE || C.type === r.TEXT && !_.tag_complete ? x = this._handle_inside_tag(O, C, _, b) : C.type === r.TAG_CLOSE ? x = this._handle_tag_close(O, C, _) : C.type === r.TEXT ? x = this._handle_text(O, C, _) : C.type === r.CONTROL_FLOW_OPEN ? x = this._handle_control_flow_open(O, C) : C.type === r.CONTROL_FLOW_CLOSE ? x = this._handle_control_flow_close(O, C) : O.add_raw_token(C), b = x, C = S.next();
  106479. var T = O._output.get_code(m);
  106480. return T;
  106481. }, d.prototype._handle_control_flow_open = function(g, m) {
  106482. var y = {
  106483. text: m.text,
  106484. type: m.type
  106485. };
  106486. return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), g.indent(), y;
  106487. }, d.prototype._handle_control_flow_close = function(g, m) {
  106488. var y = {
  106489. text: m.text,
  106490. type: m.type
  106491. };
  106492. return g.deindent(), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), y;
  106493. }, d.prototype._handle_tag_close = function(g, m, y) {
  106494. var b = {
  106495. text: m.text,
  106496. type: m.type
  106497. };
  106498. return g.alignment_size = 0, y.tag_complete = !0, g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : (y.tag_start_char === "<" && (g.set_space_before_token(m.text[0] === "/", !0), this._is_wrap_attributes_force_expand_multiline && y.has_wrapped_attrs && g.print_newline(!1)), g.print_token(m)), y.indent_content && !(y.is_unformatted || y.is_content_unformatted) && (g.indent(), y.indent_content = !1), !y.is_inline_element && !(y.is_unformatted || y.is_content_unformatted) && g.set_wrap_point(), b;
  106499. }, d.prototype._handle_inside_tag = function(g, m, y, b) {
  106500. var _ = y.has_wrapped_attrs, O = {
  106501. text: m.text,
  106502. type: m.type
  106503. };
  106504. return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : y.tag_start_char === "{" && m.type === r.TEXT ? g.print_preserved_newlines(m) ? (m.newlines = 0, g.add_raw_token(m)) : g.print_token(m) : (m.type === r.ATTRIBUTE ? g.set_space_before_token(!0) : (m.type === r.EQUALS || m.type === r.VALUE && m.previous.type === r.EQUALS) && g.set_space_before_token(!1), m.type === r.ATTRIBUTE && y.tag_start_char === "<" && ((this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) && (g.traverse_whitespace(m), _ = _ || m.newlines !== 0), this._is_wrap_attributes_force && y.attr_count >= this._options.wrap_attributes_min_attrs && (b.type !== r.TAG_OPEN || // ie. second attribute and beyond
  106505. this._is_wrap_attributes_force_expand_multiline) && (g.print_newline(!1), _ = !0)), g.print_token(m), _ = _ || g.previous_token_wrapped(), y.has_wrapped_attrs = _), O;
  106506. }, d.prototype._handle_text = function(g, m, y) {
  106507. var b = {
  106508. text: m.text,
  106509. type: "TK_CONTENT"
  106510. };
  106511. return y.custom_beautifier_name ? this._print_custom_beatifier_text(g, m, y) : y.is_unformatted || y.is_content_unformatted ? g.add_raw_token(m) : (g.traverse_whitespace(m), g.print_token(m)), b;
  106512. }, d.prototype._print_custom_beatifier_text = function(g, m, y) {
  106513. var b = this;
  106514. if (m.text !== "") {
  106515. var _ = m.text, O, S = 1, x = "", C = "";
  106516. y.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ? O = this._js_beautify : y.custom_beautifier_name === "css" && typeof this._css_beautify == "function" ? O = this._css_beautify : y.custom_beautifier_name === "html" && (O = function(D, E) {
  106517. var R = new d(D, E, b._js_beautify, b._css_beautify);
  106518. return R.beautify();
  106519. }), this._options.indent_scripts === "keep" ? S = 0 : this._options.indent_scripts === "separate" && (S = -g.indent_level);
  106520. var T = g.get_full_indent(S);
  106521. if (_ = _.replace(/\n[ \t]*$/, ""), y.custom_beautifier_name !== "html" && _[0] === "<" && _.match(/^(<!--|<!\[CDATA\[)/)) {
  106522. var w = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(_);
  106523. if (!w) {
  106524. g.add_raw_token(m);
  106525. return;
  106526. }
  106527. x = T + w[1] + `
  106528. `, _ = w[4], w[5] && (C = T + w[5]), _ = _.replace(/\n[ \t]*$/, ""), (w[2] || w[3].indexOf(`
  106529. `) !== -1) && (w = w[3].match(/[ \t]+$/), w && (m.whitespace_before = w[0]));
  106530. }
  106531. if (_)
  106532. if (O) {
  106533. var P = function() {
  106534. this.eol = `
  106535. `;
  106536. };
  106537. P.prototype = this._options.raw_options;
  106538. var $ = new P();
  106539. _ = O(T + _, $);
  106540. } else {
  106541. var A = m.whitespace_before;
  106542. A && (_ = _.replace(new RegExp(`
  106543. (` + A + ")?", "g"), `
  106544. `)), _ = T + _.replace(/\n/g, `
  106545. ` + T);
  106546. }
  106547. x && (_ ? _ = x + _ + `
  106548. ` + C : _ = x + C), g.print_newline(!1), _ && (m.text = _, m.whitespace_before = "", m.newlines = 0, g.add_raw_token(m), g.print_newline(!0));
  106549. }
  106550. }, d.prototype._handle_tag_open = function(g, m, y, b, _) {
  106551. var O = this._get_tag_open_token(m);
  106552. if ((y.is_unformatted || y.is_content_unformatted) && !y.is_empty_element && m.type === r.TAG_OPEN && !O.is_start_tag ? (g.add_raw_token(m), O.start_tag_token = this._tag_stack.try_pop(O.tag_name)) : (g.traverse_whitespace(m), this._set_tag_position(g, m, O, y, b), O.is_inline_element || g.set_wrap_point(), g.print_token(m)), O.is_start_tag && this._is_wrap_attributes_force) {
  106553. var S = 0, x;
  106554. do
  106555. x = _.peek(S), x.type === r.ATTRIBUTE && (O.attr_count += 1), S += 1;
  106556. while (x.type !== r.EOF && x.type !== r.TAG_CLOSE);
  106557. }
  106558. return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (O.alignment_size = m.text.length + 1), !O.tag_complete && !O.is_unformatted && (g.alignment_size = O.alignment_size), O;
  106559. };
  106560. var h = function(g, m) {
  106561. if (this.parent = g || null, this.text = "", this.type = "TK_TAG_OPEN", this.tag_name = "", this.is_inline_element = !1, this.is_unformatted = !1, this.is_content_unformatted = !1, this.is_empty_element = !1, this.is_start_tag = !1, this.is_end_tag = !1, this.indent_content = !1, this.multiline_content = !1, this.custom_beautifier_name = null, this.start_tag_token = null, this.attr_count = 0, this.has_wrapped_attrs = !1, this.alignment_size = 0, this.tag_complete = !1, this.tag_start_char = "", this.tag_check = "", !m)
  106562. this.tag_complete = !0;
  106563. else {
  106564. var y;
  106565. this.tag_start_char = m.text[0], this.text = m.text, this.tag_start_char === "<" ? (y = m.text.match(/^<([^\s>]*)/), this.tag_check = y ? y[1] : "") : (y = m.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/), this.tag_check = y ? y[1] : "", (m.text.startsWith("{{#>") || m.text.startsWith("{{~#>")) && this.tag_check[0] === ">" && (this.tag_check === ">" && m.next !== null ? this.tag_check = m.next.text.split(" ")[0] : this.tag_check = m.text.split(">")[1])), this.tag_check = this.tag_check.toLowerCase(), m.type === r.COMMENT && (this.tag_complete = !0), this.is_start_tag = this.tag_check.charAt(0) !== "/", this.tag_name = this.is_start_tag ? this.tag_check : this.tag_check.substr(1), this.is_end_tag = !this.is_start_tag || m.closed && m.closed.text === "/>";
  106566. var b = 2;
  106567. this.tag_start_char === "{" && this.text.length >= 3 && this.text.charAt(2) === "~" && (b = 3), this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (this.text.length < 3 || /[^#\^]/.test(this.text.charAt(b)));
  106568. }
  106569. };
  106570. d.prototype._get_tag_open_token = function(g) {
  106571. var m = new h(this._tag_stack.get_parser_token(), g);
  106572. return m.alignment_size = this._options.wrap_attributes_indent_size, m.is_end_tag = m.is_end_tag || u(m.tag_check, this._options.void_elements), m.is_empty_element = m.tag_complete || m.is_start_tag && m.is_end_tag, m.is_unformatted = !m.tag_complete && u(m.tag_check, this._options.unformatted), m.is_content_unformatted = !m.is_empty_element && u(m.tag_check, this._options.content_unformatted), m.is_inline_element = u(m.tag_name, this._options.inline) || this._options.inline_custom_elements && m.tag_name.includes("-") || m.tag_start_char === "{", m;
  106573. }, d.prototype._set_tag_position = function(g, m, y, b, _) {
  106574. if (y.is_empty_element || (y.is_end_tag ? y.start_tag_token = this._tag_stack.try_pop(y.tag_name) : (this._do_optional_end_element(y) && (y.is_inline_element || g.print_newline(!1)), this._tag_stack.record_tag(y), (y.tag_name === "script" || y.tag_name === "style") && !(y.is_unformatted || y.is_content_unformatted) && (y.custom_beautifier_name = l(y.tag_check, m)))), u(y.tag_check, this._options.extra_liners) && (g.print_newline(!1), g._output.just_added_blankline() || g.print_newline(!0)), y.is_empty_element) {
  106575. if (y.tag_start_char === "{" && y.tag_check === "else") {
  106576. this._tag_stack.indent_to_tag(["if", "unless", "each"]), y.indent_content = !0;
  106577. var O = g.current_line_has_match(/{{#if/);
  106578. O || g.print_newline(!1);
  106579. }
  106580. y.tag_name === "!--" && _.type === r.TAG_CLOSE && b.is_end_tag && y.text.indexOf(`
  106581. `) === -1 || (y.is_inline_element || y.is_unformatted || g.print_newline(!1), this._calcluate_parent_multiline(g, y));
  106582. } else if (y.is_end_tag) {
  106583. var S = !1;
  106584. S = y.start_tag_token && y.start_tag_token.multiline_content, S = S || !y.is_inline_element && !(b.is_inline_element || b.is_unformatted) && !(_.type === r.TAG_CLOSE && y.start_tag_token === b) && _.type !== "TK_CONTENT", (y.is_content_unformatted || y.is_unformatted) && (S = !1), S && g.print_newline(!1);
  106585. } else
  106586. y.indent_content = !y.custom_beautifier_name, y.tag_start_char === "<" && (y.tag_name === "html" ? y.indent_content = this._options.indent_inner_html : y.tag_name === "head" ? y.indent_content = this._options.indent_head_inner_html : y.tag_name === "body" && (y.indent_content = this._options.indent_body_inner_html)), !(y.is_inline_element || y.is_unformatted) && (_.type !== "TK_CONTENT" || y.is_content_unformatted) && g.print_newline(!1), this._calcluate_parent_multiline(g, y);
  106587. }, d.prototype._calcluate_parent_multiline = function(g, m) {
  106588. m.parent && g._output.just_added_newline() && !((m.is_inline_element || m.is_unformatted) && m.parent.is_inline_element) && (m.parent.multiline_content = !0);
  106589. };
  106590. var p = ["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "main", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"], v = ["a", "audio", "del", "ins", "map", "noscript", "video"];
  106591. return d.prototype._do_optional_end_element = function(g) {
  106592. var m = null;
  106593. if (!(g.is_empty_element || !g.is_start_tag || !g.parent)) {
  106594. if (g.tag_name === "body")
  106595. m = m || this._tag_stack.try_pop("head");
  106596. else if (g.tag_name === "li")
  106597. m = m || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
  106598. else if (g.tag_name === "dd" || g.tag_name === "dt")
  106599. m = m || this._tag_stack.try_pop("dt", ["dl"]), m = m || this._tag_stack.try_pop("dd", ["dl"]);
  106600. else if (g.parent.tag_name === "p" && p.indexOf(g.tag_name) !== -1) {
  106601. var y = g.parent.parent;
  106602. (!y || v.indexOf(y.tag_name) === -1) && (m = m || this._tag_stack.try_pop("p"));
  106603. } else g.tag_name === "rp" || g.tag_name === "rt" ? (m = m || this._tag_stack.try_pop("rt", ["ruby", "rtc"]), m = m || this._tag_stack.try_pop("rp", ["ruby", "rtc"])) : g.tag_name === "optgroup" ? m = m || this._tag_stack.try_pop("optgroup", ["select"]) : g.tag_name === "option" ? m = m || this._tag_stack.try_pop("option", ["select", "datalist", "optgroup"]) : g.tag_name === "colgroup" ? m = m || this._tag_stack.try_pop("caption", ["table"]) : g.tag_name === "thead" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"])) : g.tag_name === "tbody" || g.tag_name === "tfoot" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("thead", ["table"]), m = m || this._tag_stack.try_pop("tbody", ["table"])) : g.tag_name === "tr" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("tr", ["table", "thead", "tbody", "tfoot"])) : (g.tag_name === "th" || g.tag_name === "td") && (m = m || this._tag_stack.try_pop("td", ["table", "thead", "tbody", "tfoot", "tr"]), m = m || this._tag_stack.try_pop("th", ["table", "thead", "tbody", "tfoot", "tr"]));
  106604. return g.parent = this._tag_stack.get_parser_token(), m;
  106605. }
  106606. }, e2.Beautifier = d, e2;
  106607. }
  106608. var VG;
  106609. function Dht() {
  106610. if (VG) return g_.exports;
  106611. VG = 1;
  106612. var t = Iht().Beautifier, e = _le().Options;
  106613. function n(r, i, a, o) {
  106614. var s = new t(r, i, a, o);
  106615. return s.beautify();
  106616. }
  106617. return g_.exports = n, g_.exports.defaultOptions = function() {
  106618. return new e();
  106619. }, g_.exports;
  106620. }
  106621. var FG;
  106622. function Rht() {
  106623. if (FG) return Rv;
  106624. FG = 1;
  106625. var t = Aht(), e = Mht(), n = Dht();
  106626. function r(i, a, o, s) {
  106627. return o = o || t, s = s || e, n(i, a, o, s);
  106628. }
  106629. return r.defaultOptions = n.defaultOptions, Rv.js = t, Rv.css = e, Rv.html = r, Rv;
  106630. }
  106631. (function(t) {
  106632. function e(n, r, i) {
  106633. var a = function(o, s) {
  106634. return n.js_beautify(o, s);
  106635. };
  106636. return a.js = n.js_beautify, a.css = r.css_beautify, a.html = i.html_beautify, a.js_beautify = n.js_beautify, a.css_beautify = r.css_beautify, a.html_beautify = i.html_beautify, a;
  106637. }
  106638. (function(n) {
  106639. var r = Rht();
  106640. r.js_beautify = r.js, r.css_beautify = r.css, r.html_beautify = r.html, n.exports = e(r, r, r);
  106641. })(t);
  106642. })(ple);
  106643. var kht = ple.exports;
  106644. const Lht = /* @__PURE__ */ vx(kht), Nht = /* @__PURE__ */ te({
  106645. __name: "Editor",
  106646. props: {
  106647. code: {
  106648. type: String,
  106649. default: ""
  106650. }
  106651. },
  106652. emits: ["update:code", "change"],
  106653. setup(t, { emit: e }) {
  106654. const n = t, r = e, i = U(null), a = U(n.code);
  106655. se(
  106656. () => n.code,
  106657. (s) => {
  106658. a.value = Lht.js(s, { indent_size: 2 });
  106659. },
  106660. { immediate: !0 }
  106661. );
  106662. const o = (s) => {
  106663. try {
  106664. r("update:code", s), r("change", s);
  106665. } catch (l) {
  106666. console.error(l);
  106667. return;
  106668. }
  106669. };
  106670. return (s, l) => (pe(), je(B(vdt), {
  106671. ref_key: "editorRef",
  106672. ref: i,
  106673. placeholder: "请输入",
  106674. style: { height: "500px" },
  106675. "model-value": a.value,
  106676. "tab-size": 2,
  106677. "auto-focus": !0,
  106678. "indent-with-tabs": !0,
  106679. extensions: [
  106680. B(Tdt),
  106681. B(yht)(),
  106682. B(Cht)()
  106683. ],
  106684. onChange: o
  106685. }, null, 8, ["model-value", "extensions"]));
  106686. }
  106687. }), Bht = /* @__PURE__ */ te({
  106688. __name: "index",
  106689. props: {
  106690. title: { default: "编辑" },
  106691. width: { default: 800 }
  106692. },
  106693. emits: ["ok"],
  106694. setup(t, { expose: e, emit: n }) {
  106695. const r = n, i = U(!1), a = U(""), o = () => {
  106696. r("ok", a.value), i.value = !1;
  106697. };
  106698. return e({
  106699. open: (s) => {
  106700. i.value = !0, a.value = s;
  106701. },
  106702. close: () => {
  106703. i.value = !1;
  106704. }
  106705. }), (s, l) => (pe(), je(B(Hi), {
  106706. open: i.value,
  106707. "onUpdate:open": l[1] || (l[1] = (u) => i.value = u),
  106708. title: s.title,
  106709. width: s.width,
  106710. onOk: o
  106711. }, {
  106712. default: we(() => [
  106713. M(Nht, {
  106714. code: a.value,
  106715. "onUpdate:code": l[0] || (l[0] = (u) => a.value = u)
  106716. }, null, 8, ["code"])
  106717. ]),
  106718. _: 1
  106719. }, 8, ["open", "title", "width"]));
  106720. }
  106721. }), zht = /* @__PURE__ */ He("span", { class: "text-gray-500" }, "秒", -1), B4 = /* @__PURE__ */ te({
  106722. __name: "DataConfig",
  106723. props: {
  106724. dataSource: {}
  106725. },
  106726. emits: ["change"],
  106727. setup(t, { emit: e }) {
  106728. const n = e, r = t, i = U({
  106729. sourceType: Ri.STATIC,
  106730. // 静态数据相关
  106731. data: "",
  106732. // 接口相关
  106733. url: "",
  106734. method: "",
  106735. params: {},
  106736. headers: {},
  106737. refreshTime: 0,
  106738. // 数据处理
  106739. dataProcess: ""
  106740. }), a = (c) => {
  106741. i.value.refreshTime = c === 0 || c >= 60 ? c : 60;
  106742. };
  106743. let o;
  106744. const s = U(null), l = (c) => {
  106745. var f;
  106746. o = c, (f = s.value) == null || f.open(JSON.stringify(i.value[c]));
  106747. }, u = (c) => {
  106748. i.value[o] = JSON.parse(c);
  106749. };
  106750. return se(
  106751. () => r.dataSource,
  106752. (c) => {
  106753. Object.assign(i.value, c || {});
  106754. },
  106755. { immediate: !0 }
  106756. ), se(
  106757. () => i.value,
  106758. (c) => {
  106759. n("change", c);
  106760. },
  106761. { deep: !0 }
  106762. ), (c, f) => (pe(), Qe(wt, null, [
  106763. M(B(dr), {
  106764. size: "small",
  106765. layout: "horizontal",
  106766. model: i.value,
  106767. "label-col": { span: 8 },
  106768. "wrapper-col": { span: 16 }
  106769. }, {
  106770. default: we(() => [
  106771. M(B(dr).Item, {
  106772. label: "类型",
  106773. name: "sourceType"
  106774. }, {
  106775. default: we(() => [
  106776. M(B(ci), {
  106777. value: i.value.sourceType,
  106778. "onUpdate:value": f[0] || (f[0] = (d) => i.value.sourceType = d)
  106779. }, {
  106780. default: we(() => [
  106781. M(B(M1), {
  106782. value: B(Ri).STATIC
  106783. }, {
  106784. default: we(() => [
  106785. Kt("静态数据")
  106786. ]),
  106787. _: 1
  106788. }, 8, ["value"]),
  106789. M(B(M1), {
  106790. value: B(Ri).API
  106791. }, {
  106792. default: we(() => [
  106793. Kt("动态数据")
  106794. ]),
  106795. _: 1
  106796. }, 8, ["value"])
  106797. ]),
  106798. _: 1
  106799. }, 8, ["value"])
  106800. ]),
  106801. _: 1
  106802. }),
  106803. i.value.sourceType === B(Ri).STATIC ? (pe(), je(B(dr).Item, {
  106804. key: 0,
  106805. label: "数据",
  106806. name: "data"
  106807. }, {
  106808. default: we(() => [
  106809. M(B(Ur), {
  106810. type: "default",
  106811. size: "small",
  106812. onClick: f[1] || (f[1] = (d) => l("data"))
  106813. }, {
  106814. default: we(() => [
  106815. Kt("编辑")
  106816. ]),
  106817. _: 1
  106818. })
  106819. ]),
  106820. _: 1
  106821. })) : i.value.sourceType === B(Ri).API ? (pe(), Qe(wt, { key: 1 }, [
  106822. M(B(dr).Item, {
  106823. label: "接口地址",
  106824. name: "url"
  106825. }, {
  106826. default: we(() => [
  106827. M(B(Hn).TextArea, {
  106828. "auto-size": { minRows: 5 },
  106829. placeholder: "请输入接口地址",
  106830. value: i.value.url,
  106831. "onUpdate:value": f[2] || (f[2] = (d) => i.value.url = d)
  106832. }, null, 8, ["value"])
  106833. ]),
  106834. _: 1
  106835. }),
  106836. M(B(dr).Item, {
  106837. label: "请求方式",
  106838. name: "method"
  106839. }, {
  106840. default: we(() => [
  106841. M(B(vf), {
  106842. value: i.value.method,
  106843. "onUpdate:value": f[3] || (f[3] = (d) => i.value.method = d)
  106844. }, {
  106845. default: we(() => [
  106846. M(B(fi), { value: "GET" }, {
  106847. default: we(() => [
  106848. Kt("GET")
  106849. ]),
  106850. _: 1
  106851. }),
  106852. M(B(fi), { value: "POST" }, {
  106853. default: we(() => [
  106854. Kt("POST")
  106855. ]),
  106856. _: 1
  106857. })
  106858. ]),
  106859. _: 1
  106860. }, 8, ["value"])
  106861. ]),
  106862. _: 1
  106863. }),
  106864. M(B(dr).Item, {
  106865. label: "刷新时间",
  106866. name: "refreshTime"
  106867. }, {
  106868. default: we(() => [
  106869. M(B(O0), {
  106870. value: i.value.refreshTime,
  106871. "onUpdate:value": f[4] || (f[4] = (d) => i.value.refreshTime = d),
  106872. step: 1,
  106873. style: { width: "100%" },
  106874. onChange: a
  106875. }, {
  106876. addonAfter: we(() => [
  106877. zht
  106878. ]),
  106879. _: 1
  106880. }, 8, ["value"])
  106881. ]),
  106882. _: 1
  106883. }),
  106884. M(B(dr).Item, {
  106885. label: "请求参数",
  106886. name: "params"
  106887. }, {
  106888. default: we(() => [
  106889. M(B(Ur), {
  106890. type: "default",
  106891. size: "small",
  106892. onClick: f[5] || (f[5] = (d) => l("params"))
  106893. }, {
  106894. default: we(() => [
  106895. Kt("编辑")
  106896. ]),
  106897. _: 1
  106898. })
  106899. ]),
  106900. _: 1
  106901. }),
  106902. M(B(dr).Item, {
  106903. label: "请求头",
  106904. name: "headers"
  106905. }, {
  106906. default: we(() => [
  106907. M(B(Ur), {
  106908. type: "default",
  106909. size: "small",
  106910. onClick: f[6] || (f[6] = (d) => l("headers"))
  106911. }, {
  106912. default: we(() => [
  106913. Kt("编辑")
  106914. ]),
  106915. _: 1
  106916. })
  106917. ]),
  106918. _: 1
  106919. }),
  106920. M(B(dr).Item, {
  106921. label: "数据处理",
  106922. name: "dataProcess"
  106923. }, {
  106924. default: we(() => [
  106925. M(B(Ur), {
  106926. type: "default",
  106927. size: "small",
  106928. onClick: f[7] || (f[7] = (d) => l("dataProcess"))
  106929. }, {
  106930. default: we(() => [
  106931. Kt("编辑")
  106932. ]),
  106933. _: 1
  106934. })
  106935. ]),
  106936. _: 1
  106937. })
  106938. ], 64)) : _t("", !0)
  106939. ]),
  106940. _: 1
  106941. }, 8, ["model"]),
  106942. M(B(Bht), {
  106943. ref_key: "codeEditorRef",
  106944. ref: s,
  106945. title: "编辑数据",
  106946. onOk: u
  106947. }, null, 512)
  106948. ], 64));
  106949. }
  106950. }), In = {
  106951. /* 标题 */
  106952. title: {
  106953. label: "标题",
  106954. prop: "title",
  106955. type: "group",
  106956. children: [
  106957. {
  106958. label: " ",
  106959. prop: "title.show",
  106960. type: "checkboxGroup",
  106961. fieldProps: {
  106962. options: [{ label: "标题可见", value: !0 }]
  106963. },
  106964. defaultValue: [],
  106965. format: (t, e) => {
  106966. t.value["title.show"] = !!(e != null && e.length);
  106967. },
  106968. valueToForm: (t) => t ? [!0] : []
  106969. },
  106970. {
  106971. type: "dependency",
  106972. label: "",
  106973. prop: "",
  106974. name: ["title.show"],
  106975. children: (t) => t["title.show"].length ? [
  106976. {
  106977. label: "文本",
  106978. prop: "title.text",
  106979. type: "input",
  106980. defaultValue: "图表标题"
  106981. },
  106982. {
  106983. label: "位置",
  106984. prop: "title.left",
  106985. type: "position",
  106986. defaultValue: "center"
  106987. },
  106988. {
  106989. label: "样式",
  106990. prop: "title.textStyle",
  106991. type: "fontStyle",
  106992. defaultValue: {
  106993. color: "#ffffffff",
  106994. size: 18,
  106995. bold: !0,
  106996. italic: !1
  106997. },
  106998. format: (e, n) => {
  106999. e.value["title.textStyle"] = {
  107000. color: n.color,
  107001. fontSize: n.size,
  107002. fontWeight: n.bold ? "bold" : "normal",
  107003. fontStyle: n.italic ? "italic" : "normal"
  107004. };
  107005. },
  107006. valueToForm: (e, n) => ({
  107007. color: kt(n, "title.textStyle.color", "#FFFFFF"),
  107008. size: kt(n, "title.textStyle.size", 16),
  107009. bold: kt(n, "title.textStyle.fontWeight") === "bold",
  107010. italic: kt(n, "title.textStyle.fontStyle") === "italic"
  107011. })
  107012. },
  107013. {
  107014. label: "背景",
  107015. prop: "",
  107016. type: "divider"
  107017. },
  107018. {
  107019. label: "填充",
  107020. prop: "title.backgroundColor",
  107021. type: "backgroundSelect",
  107022. fieldProps: {
  107023. filterOptions: ["image"]
  107024. },
  107025. defaultValue: {
  107026. type: "color",
  107027. color: "#FFFFFF00"
  107028. },
  107029. format: (e, n) => {
  107030. e.value["title.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107031. },
  107032. valueToForm: (e) => !e || e === "none" ? {
  107033. type: "none",
  107034. color: "#000000ff"
  107035. } : {
  107036. type: "color",
  107037. color: e.color
  107038. }
  107039. },
  107040. {
  107041. label: "圆角",
  107042. prop: "title.borderRadius",
  107043. type: "inputNumber",
  107044. fieldProps: {
  107045. addonAfter: "px"
  107046. },
  107047. defaultValue: 0
  107048. }
  107049. ] : []
  107050. }
  107051. ]
  107052. },
  107053. /* 图例 */
  107054. legend: {
  107055. label: "图例",
  107056. prop: "legend",
  107057. type: "group",
  107058. children: [
  107059. {
  107060. label: " ",
  107061. prop: "legend.show",
  107062. type: "checkboxGroup",
  107063. fieldProps: {
  107064. options: [{ label: "图例可见", value: !0 }]
  107065. },
  107066. defaultValue: [!0],
  107067. format: (t, e) => {
  107068. t.value["legend.show"] = !!(e != null && e.length);
  107069. },
  107070. valueToForm: (t) => t ? [!0] : []
  107071. },
  107072. {
  107073. type: "dependency",
  107074. label: "",
  107075. prop: "",
  107076. name: ["legend.show"],
  107077. children: (t) => t["legend.show"].length ? [
  107078. {
  107079. label: "位置",
  107080. prop: "legend.position",
  107081. type: "position",
  107082. fieldProps: {
  107083. type: "round"
  107084. },
  107085. defaultValue: "top",
  107086. format: (e, n) => {
  107087. switch (["left", "right"].includes(n) ? e.value["legend.orient"] = "vertical" : e.value["legend.orient"] = "horizontal", n) {
  107088. case "bottom":
  107089. e.value["legend.top"] = "auto", e.value["legend.right"] = "auto", e.value["legend.bottom"] = 8, e.value["legend.left"] = "center";
  107090. break;
  107091. case "left":
  107092. e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.left"] = 8, e.value["legend.top"] = "center";
  107093. break;
  107094. case "right":
  107095. e.value["legend.bottom"] = "auto", e.value["legend.left"] = "auto", e.value["legend.right"] = 8, e.value["legend.top"] = "center";
  107096. break;
  107097. default:
  107098. e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.top"] = 32, e.value["legend.left"] = "center";
  107099. }
  107100. },
  107101. valueToForm: (e, n) => kt(n, "legend.orient") === "vertical" ? e === "top" ? "top" : e === "bottom" ? "bottom" : "left" : kt(n, "legend.bottom") === 8 && kt(n, "legend.left") === "center" ? "bottom" : "top"
  107102. },
  107103. {
  107104. label: "样式",
  107105. prop: "legend.textStyle",
  107106. type: "fontStyle",
  107107. defaultValue: {
  107108. color: "#000000ff",
  107109. size: 12,
  107110. bold: !1,
  107111. italic: !1
  107112. },
  107113. format: (e, n) => {
  107114. e.value["legend.textStyle"] = {
  107115. color: n.color,
  107116. fontSize: n.size,
  107117. fontWeight: n.bold ? "bold" : "normal",
  107118. fontStyle: n.italic ? "italic" : "normal"
  107119. };
  107120. },
  107121. valueToForm: (e, n) => ({
  107122. color: kt(n, "legend.textStyle.color", "#000000ff"),
  107123. size: kt(n, "legend.textStyle.fontSize", 12),
  107124. bold: kt(n, "legend.textStyle.fontWeight") === "bold",
  107125. italic: kt(n, "legend.textStyle.fontStyle") === "italic"
  107126. })
  107127. },
  107128. {
  107129. label: "边框",
  107130. prop: "",
  107131. type: "divider"
  107132. },
  107133. {
  107134. label: "线宽",
  107135. prop: "legend.borderWidth",
  107136. type: "inputNumber",
  107137. fieldProps: {
  107138. addonAfter: "px"
  107139. },
  107140. defaultValue: 0
  107141. },
  107142. {
  107143. label: "颜色",
  107144. prop: "legend.borderColor",
  107145. type: "colorSelect",
  107146. defaultValue: "#ccc"
  107147. },
  107148. {
  107149. label: "圆角",
  107150. prop: "legend.borderRadius",
  107151. type: "inputNumber",
  107152. fieldProps: {
  107153. addonAfter: "px"
  107154. },
  107155. defaultValue: 0
  107156. },
  107157. {
  107158. label: "背景",
  107159. prop: "",
  107160. type: "divider"
  107161. },
  107162. {
  107163. label: "背景",
  107164. prop: "legend.backgroundColor",
  107165. type: "backgroundSelect",
  107166. fieldProps: {
  107167. filterOptions: ["image"]
  107168. },
  107169. defaultValue: {
  107170. type: "color",
  107171. color: "#fff"
  107172. },
  107173. format: (e, n) => {
  107174. e.value["legend.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107175. },
  107176. valueToForm: (e) => !e || e === "none" ? {
  107177. type: "none"
  107178. } : {
  107179. type: "color",
  107180. color: e.color
  107181. }
  107182. },
  107183. {
  107184. label: "阴影",
  107185. prop: "legend.shadowBlur",
  107186. type: "radioGroup",
  107187. fieldProps: {
  107188. options: [
  107189. { label: "开启", value: !0 },
  107190. { label: "关闭", value: !1 }
  107191. ]
  107192. },
  107193. defaultValue: !1,
  107194. format: (e, n) => {
  107195. n ? (e.value["legend.shadowBlur"] = 10, e.value["legend.shadowColor"] = e.value["legend.backgroundColor"] || "#000000ff", e.value["legend.shadowOffsetX"] = 3, e.value["legend.shadowOffsetY"] = 3) : (e.value["legend.shadowBlur"] = 0, e.value["legend.shadowColor"] = "transparent", e.value["legend.shadowOffsetX"] = 0, e.value["legend.shadowOffsetY"] = 0);
  107196. },
  107197. valueToForm: (e) => !!e
  107198. }
  107199. ] : []
  107200. }
  107201. ]
  107202. },
  107203. /* 系列 */
  107204. series: {
  107205. label: "系列",
  107206. prop: "series",
  107207. type: "group",
  107208. children: [
  107209. {
  107210. label: "配色",
  107211. prop: "color",
  107212. type: "colorScheme",
  107213. defaultValue: Z1[0].color
  107214. }
  107215. ]
  107216. },
  107217. /* X轴 */
  107218. xAxis: {
  107219. label: "X 轴",
  107220. prop: "xAxis",
  107221. type: "group",
  107222. children: [
  107223. {
  107224. label: "类型",
  107225. prop: "xAxis.type",
  107226. type: "select",
  107227. fieldProps: {
  107228. options: [
  107229. { label: "类目坐标轴", value: "category" },
  107230. { label: "数值坐标轴", value: "value" },
  107231. { label: "时间坐标轴", value: "time" }
  107232. ]
  107233. },
  107234. defaultValue: "category"
  107235. },
  107236. {
  107237. label: " ",
  107238. prop: "xAxis.showName",
  107239. type: "checkboxGroup",
  107240. fieldProps: {
  107241. options: [{ label: "显示轴标题", value: !0 }]
  107242. },
  107243. defaultValue: [!0],
  107244. format: (t, e) => {
  107245. e != null && e.length ? (t.value["xAxis.showName"] = !0, t.value["xAxis.name"] = "X轴标题", t.value["xAxis.nameGap"] = 25) : (t.value["xAxis.showName"] = !1, t.value["xAxis.name"] = "", t.value["xAxis.nameGap"] = 15, t.value["xAxis.nameGap"] = 15);
  107246. },
  107247. valueToForm: (t) => t ? [!0] : []
  107248. },
  107249. {
  107250. label: "",
  107251. prop: "",
  107252. type: "dependency",
  107253. name: ["xAxis.showName"],
  107254. children: (t) => t["xAxis.showName"].length ? [
  107255. {
  107256. label: "标题内容",
  107257. prop: "xAxis.name",
  107258. type: "input",
  107259. defaultValue: "X 轴标题",
  107260. format: (e, n) => {
  107261. e.value["xAxis.showName"] && (e.value["xAxis.name"] = n, e.value["xAxis.nameGap"] = 25);
  107262. },
  107263. valueToForm: (e) => e || "X 轴标题"
  107264. },
  107265. {
  107266. label: "标题位置",
  107267. prop: "xAxis.nameLocation",
  107268. type: "position",
  107269. defaultValue: "center",
  107270. format: (e, n) => {
  107271. const r = {
  107272. left: "start",
  107273. center: "middle",
  107274. right: "end"
  107275. };
  107276. e.value["xAxis.nameLocation"] = n ? r[n] : "middle";
  107277. },
  107278. valueToForm: (e) => ({
  107279. start: "left",
  107280. middle: "center",
  107281. end: "right"
  107282. })[e] || "center"
  107283. },
  107284. {
  107285. label: "标题样式",
  107286. prop: "xAxis.nameTextStyle",
  107287. type: "fontStyle",
  107288. defaultValue: {
  107289. color: "#000000ff",
  107290. size: 12,
  107291. bold: !1,
  107292. italic: !1
  107293. },
  107294. format: (e, n) => {
  107295. e.value["xAxis.nameTextStyle"] = {
  107296. color: n.color,
  107297. fontSize: n.size,
  107298. fontWeight: n.bold ? "bold" : "normal",
  107299. fontStyle: n.italic ? "italic" : "normal"
  107300. };
  107301. },
  107302. valueToForm: (e) => ({
  107303. color: (e == null ? void 0 : e.color) || "#000000ff",
  107304. size: (e == null ? void 0 : e.fontSize) || 12,
  107305. bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
  107306. italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
  107307. })
  107308. }
  107309. ] : []
  107310. },
  107311. {
  107312. label: "轴线",
  107313. prop: "",
  107314. type: "divider"
  107315. },
  107316. {
  107317. label: "线宽",
  107318. prop: "xAxis.axisLine.lineStyle.width",
  107319. type: "inputNumber",
  107320. fieldProps: {
  107321. addonAfter: "px"
  107322. },
  107323. defaultValue: 1
  107324. },
  107325. {
  107326. label: "颜色",
  107327. prop: "xAxis.axisLine.lineStyle.color",
  107328. type: "colorSelect",
  107329. defaultValue: "#ccc"
  107330. },
  107331. {
  107332. label: "刻度",
  107333. prop: "",
  107334. type: "divider"
  107335. },
  107336. {
  107337. label: " ",
  107338. prop: "xAxis.axisTick.show",
  107339. type: "checkboxGroup",
  107340. fieldProps: {
  107341. options: [{ label: "显示刻度", value: !0 }]
  107342. },
  107343. defaultValue: [!0],
  107344. format: (t, e) => {
  107345. t.value["xAxis.axisTick.show"] = !!(e != null && e.length);
  107346. },
  107347. valueToForm: (t) => t ? [!0] : []
  107348. },
  107349. {
  107350. label: "",
  107351. prop: "",
  107352. type: "dependency",
  107353. name: ["xAxis.axisTick.show"],
  107354. children: (t) => t["xAxis.axisTick.show"].length ? [
  107355. {
  107356. label: "刻度宽度",
  107357. prop: "xAxis.axisTick.lineStyle.width",
  107358. type: "inputNumber",
  107359. fieldProps: {
  107360. addonAfter: "px"
  107361. },
  107362. defaultValue: 5
  107363. },
  107364. {
  107365. label: "刻度颜色",
  107366. prop: "xAxis.axisTick.lineStyle.color",
  107367. type: "colorSelect",
  107368. defaultValue: "#ccc"
  107369. }
  107370. ] : []
  107371. },
  107372. {
  107373. label: "标签",
  107374. prop: "",
  107375. type: "divider"
  107376. },
  107377. {
  107378. label: " ",
  107379. prop: "xAxis.axisLabel.show",
  107380. type: "checkboxGroup",
  107381. fieldProps: {
  107382. options: [{ label: "显示标签", value: !0 }]
  107383. },
  107384. defaultValue: [!0],
  107385. format: (t, e) => {
  107386. t.value["xAxis.axisLabel.show"] = !!(e != null && e.length);
  107387. },
  107388. valueToForm: (t) => t ? [!0] : []
  107389. },
  107390. {
  107391. label: "",
  107392. prop: "",
  107393. type: "dependency",
  107394. name: ["xAxis.axisLabel.show"],
  107395. children: (t) => t["xAxis.axisLabel.show"].length ? [
  107396. {
  107397. label: "样式",
  107398. prop: "xAxis.axisLabel",
  107399. type: "fontStyle",
  107400. defaultValue: {
  107401. color: "#000000ff",
  107402. size: 12,
  107403. bold: !1,
  107404. italic: !1
  107405. },
  107406. format: (e, n) => {
  107407. e.value["xAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["xAxis.axisLabel.fontSize"] = n.size, e.value["xAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["xAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
  107408. },
  107409. valueToForm: (e, n) => ({
  107410. color: kt(n, "xAxis.axisLabel.color", "#000000ff"),
  107411. size: kt(n, "xAxis.axisLabel.fontSize", 12),
  107412. bold: kt(n, "xAxis.axisLabel.fontWeight") === "bold",
  107413. italic: kt(n, "xAxis.axisLabel.fontStyle") === "italic"
  107414. })
  107415. }
  107416. ] : []
  107417. }
  107418. ]
  107419. },
  107420. /* Y 轴 */
  107421. yAxis: {
  107422. label: "Y 轴",
  107423. prop: "yAxis",
  107424. type: "group",
  107425. children: [
  107426. {
  107427. label: " ",
  107428. prop: "yAxis.showName",
  107429. type: "checkboxGroup",
  107430. fieldProps: {
  107431. options: [{ label: "显示轴标题", value: !0 }]
  107432. },
  107433. defaultValue: [],
  107434. format: (t, e) => {
  107435. e != null && e.length ? (t.value["yAxis.showName"] = !0, t.value["yAxis.name"] = "Y轴标题", t.value["yAxis.nameGap"] = 25) : (t.value["yAxis.showName"] = !1, t.value["yAxis.name"] = "", t.value["yAxis.nameGap"] = 15);
  107436. },
  107437. valueToForm: (t) => t ? [!0] : []
  107438. },
  107439. {
  107440. label: "",
  107441. prop: "",
  107442. type: "dependency",
  107443. name: ["yAxis.showName"],
  107444. children: (t) => t["yAxis.showName"].length ? [
  107445. {
  107446. label: "标题内容",
  107447. prop: "yAxis.name",
  107448. type: "input",
  107449. defaultValue: "Y 轴标题",
  107450. format: (e, n) => {
  107451. e.value["yAxis.showName"] ? (e.value["yAxis.name"] = n, e.value["yAxis.nameGap"] = 25) : (e.value["yAxis.name"] = "", e.value["yAxis.nameGap"] = 15);
  107452. },
  107453. valueToForm: (e) => e || "Y 轴标题"
  107454. },
  107455. {
  107456. label: "标题位置",
  107457. prop: "yAxis.nameLocation",
  107458. type: "position",
  107459. defaultValue: "center",
  107460. format: (e, n) => {
  107461. const r = {
  107462. left: "start",
  107463. center: "middle",
  107464. right: "end"
  107465. };
  107466. e.value["yAxis.nameLocation"] = n ? r[n] : "middle";
  107467. },
  107468. valueToForm: (e) => ({
  107469. start: "left",
  107470. middle: "center",
  107471. end: "right"
  107472. })[e] || "center "
  107473. },
  107474. {
  107475. label: "标题样式",
  107476. prop: "yAxis.nameTextStyle",
  107477. type: "fontStyle",
  107478. defaultValue: {
  107479. color: "#FFFFFFFF",
  107480. size: 12,
  107481. bold: !1,
  107482. italic: !1
  107483. },
  107484. format: (e, n) => {
  107485. e.value["yAxis.nameTextStyle"] = {
  107486. color: n.color,
  107487. fontSize: n.size,
  107488. fontWeight: n.bold ? "bold" : "normal",
  107489. fontStyle: n.italic ? "italic" : "normal"
  107490. };
  107491. },
  107492. valueToForm: (e) => ({
  107493. color: (e == null ? void 0 : e.color) || "#000000ff",
  107494. size: (e == null ? void 0 : e.fontSize) || 12,
  107495. bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
  107496. italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
  107497. })
  107498. }
  107499. ] : []
  107500. },
  107501. {
  107502. label: "轴线",
  107503. prop: "",
  107504. type: "divider"
  107505. },
  107506. {
  107507. label: " ",
  107508. prop: "yAxis.axisLine.show",
  107509. type: "checkboxGroup",
  107510. fieldProps: {
  107511. options: [{ label: "显示轴线", value: !0 }]
  107512. },
  107513. defaultValue: [!0],
  107514. format: (t, e) => {
  107515. t.value["yAxis.axisLine.show"] = !!(e != null && e.length);
  107516. },
  107517. valueToForm: (t) => t ? [!0] : []
  107518. },
  107519. {
  107520. label: "",
  107521. prop: "",
  107522. type: "dependency",
  107523. name: ["yAxis.axisLine.show"],
  107524. children: (t) => t["yAxis.axisLine.show"].length ? [
  107525. {
  107526. label: "线宽",
  107527. prop: "yAxis.axisLine.lineStyle.width",
  107528. type: "inputNumber",
  107529. fieldProps: {
  107530. addonAfter: "px"
  107531. },
  107532. defaultValue: 1
  107533. },
  107534. {
  107535. label: "颜色",
  107536. prop: "yAxis.axisLine.lineStyle.color",
  107537. type: "colorSelect",
  107538. defaultValue: "#ccc"
  107539. }
  107540. ] : []
  107541. },
  107542. {
  107543. label: "刻度",
  107544. prop: "",
  107545. type: "divider"
  107546. },
  107547. {
  107548. label: " ",
  107549. prop: "yAxis.axisTick.show",
  107550. type: "checkboxGroup",
  107551. fieldProps: {
  107552. options: [{ label: "显示刻度", value: !0 }]
  107553. },
  107554. defaultValue: [!0],
  107555. format: (t, e) => {
  107556. t.value["yAxis.axisTick.show"] = !!(e != null && e.length);
  107557. },
  107558. valueToForm: (t) => t ? [!0] : []
  107559. },
  107560. {
  107561. label: "",
  107562. prop: "",
  107563. type: "dependency",
  107564. name: ["yAxis.axisTick.show"],
  107565. children: (t) => t["yAxis.axisTick.show"].length ? [
  107566. {
  107567. label: "刻度长度",
  107568. prop: "yAxis.axisTick.lineStyle.width",
  107569. type: "inputNumber",
  107570. fieldProps: {
  107571. addonAfter: "px"
  107572. },
  107573. defaultValue: 5
  107574. },
  107575. {
  107576. label: "刻度颜色",
  107577. prop: "yAxis.axisTick.lineStyle.color",
  107578. type: "colorSelect",
  107579. defaultValue: "#ccc"
  107580. }
  107581. ] : []
  107582. },
  107583. {
  107584. label: "标签",
  107585. prop: "",
  107586. type: "divider"
  107587. },
  107588. {
  107589. label: " ",
  107590. prop: "yAxis.axisLabel.show",
  107591. type: "checkboxGroup",
  107592. fieldProps: {
  107593. options: [{ label: "显示标签", value: !0 }]
  107594. },
  107595. defaultValue: [!0],
  107596. format: (t, e) => {
  107597. t.value["yAxis.axisLabel.show"] = !!(e != null && e.length);
  107598. },
  107599. valueToForm: (t) => t ? [!0] : []
  107600. },
  107601. {
  107602. label: "",
  107603. prop: "",
  107604. type: "dependency",
  107605. name: ["yAxis.axisLabel.show"],
  107606. children: (t) => t["yAxis.axisLabel.show"].length ? [
  107607. {
  107608. label: "样式",
  107609. prop: "yAxis.axisLabel",
  107610. type: "fontStyle",
  107611. defaultValue: {
  107612. color: "#000000ff",
  107613. size: 12,
  107614. bold: !1,
  107615. italic: !1
  107616. },
  107617. format: (e, n) => {
  107618. e.value["yAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["yAxis.axisLabel.fontSize"] = n.size, e.value["yAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["yAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
  107619. },
  107620. valueToForm: (e, n) => ({
  107621. color: kt(n, "yAxis.axisLabel.color", "#000000ff"),
  107622. size: kt(n, "yAxis.axisLabel.fontSize", 12),
  107623. bold: kt(n, "yAxis.axisLabel.fontWeight") === "bold",
  107624. italic: kt(n, "yAxis.axisLabel.fontStyle") === "italic"
  107625. })
  107626. },
  107627. {
  107628. label: "旋转角度",
  107629. prop: "yAxis.axisLabel.rotate",
  107630. type: "inputNumber",
  107631. fieldProps: {
  107632. addonAfter: "°",
  107633. min: -90,
  107634. max: 90,
  107635. step: 1
  107636. }
  107637. }
  107638. ] : []
  107639. }
  107640. ]
  107641. },
  107642. /* 提示 */
  107643. tooltip: {
  107644. label: "提示",
  107645. prop: "tooltip",
  107646. type: "group",
  107647. children: [
  107648. {
  107649. label: " ",
  107650. prop: "tooltip.show",
  107651. type: "checkboxGroup",
  107652. fieldProps: {
  107653. options: [{ label: "提示可见", value: !0 }]
  107654. },
  107655. defaultValue: [!0],
  107656. format: (t, e) => {
  107657. t.value["tooltip.show"] = !!(e != null && e.length);
  107658. },
  107659. valueToForm: (t) => t ? [!0] : []
  107660. },
  107661. {
  107662. label: "",
  107663. prop: "",
  107664. type: "dependency",
  107665. name: ["tooltip.show"],
  107666. children: (t) => t["tooltip.show"].length ? [
  107667. {
  107668. label: "文本",
  107669. prop: "tooltip.formatter",
  107670. type: "checkboxGroup",
  107671. fieldProps: {
  107672. options: [
  107673. { label: "分类名", value: "b" },
  107674. { label: "系列名", value: "a" },
  107675. { label: "数值", value: "c" }
  107676. ]
  107677. },
  107678. defaultValue: ["b"],
  107679. format: (e, n) => {
  107680. e.value["tooltip.formatter"] = n.map((r) => `{${r}}`).join(" ");
  107681. },
  107682. valueToForm: (e, n) => {
  107683. var r, i;
  107684. return (i = (r = kt(n, "tooltip.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
  107685. }
  107686. },
  107687. // {
  107688. // label: "格式化",
  107689. // prop: "tooltip.valueFormatter",
  107690. // type: "input",
  107691. // tip: "支持字符串模板和回调函数",
  107692. // defaultValue: "(value, dataIndex) => value",
  107693. // },
  107694. {
  107695. label: "样式",
  107696. prop: "tooltip.textStyle",
  107697. type: "fontStyle",
  107698. defaultValue: {
  107699. color: "#000000ff",
  107700. size: 12,
  107701. bold: !1,
  107702. italic: !1
  107703. },
  107704. format: (e, n) => {
  107705. e.value["tooltip.textStyle"] = {
  107706. color: n.color,
  107707. fontSize: n.size,
  107708. fontWeight: n.bold ? "bold" : "normal",
  107709. fontStyle: n.italic ? "italic" : "normal"
  107710. };
  107711. },
  107712. valueToForm: (e, n) => ({
  107713. color: kt(n, "tooltip.textStyle.color", "#000000ff"),
  107714. size: kt(n, "tooltip.textStyle.fontSize", 12),
  107715. bold: kt(n, "tooltip.textStyle.fontWeight") === "bold",
  107716. italic: kt(n, "tooltip.textStyle.fontStyle") === "italic"
  107717. })
  107718. },
  107719. {
  107720. label: "边框",
  107721. prop: "",
  107722. type: "divider"
  107723. },
  107724. {
  107725. label: "线宽",
  107726. prop: "tooltip.borderWidth",
  107727. type: "inputNumber",
  107728. fieldProps: {
  107729. addonAfter: "px"
  107730. },
  107731. defaultValue: 1
  107732. },
  107733. {
  107734. label: "颜色",
  107735. prop: "tooltip.borderColor",
  107736. type: "colorSelect",
  107737. defaultValue: "#ccc"
  107738. },
  107739. {
  107740. label: "圆角",
  107741. prop: "tooltip.borderRadius",
  107742. type: "inputNumber",
  107743. fieldProps: {
  107744. addonAfter: "px"
  107745. },
  107746. defaultValue: 4
  107747. },
  107748. {
  107749. label: "背景",
  107750. prop: "",
  107751. type: "divider"
  107752. },
  107753. {
  107754. label: "填充",
  107755. prop: "tooltip.backgroundColor",
  107756. type: "backgroundSelect",
  107757. fieldProps: {
  107758. filterOptions: ["image"]
  107759. },
  107760. defaultValue: {
  107761. type: "color",
  107762. color: "#fff"
  107763. },
  107764. format: (e, n) => {
  107765. e.value["tooltip.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
  107766. },
  107767. valueToForm: (e) => !e || e === "none" ? {
  107768. type: "none"
  107769. } : {
  107770. type: "color",
  107771. color: e
  107772. }
  107773. },
  107774. {
  107775. label: "阴影",
  107776. prop: "tooltip.extraCssText",
  107777. type: "radioGroup",
  107778. fieldProps: {
  107779. options: [
  107780. { label: "开启", value: !0 },
  107781. { label: "关闭", value: !1 }
  107782. ]
  107783. },
  107784. defaultValue: !1,
  107785. format: (e, n) => {
  107786. e.value["tooltip.extraCssText"] = n ? "box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);" : "";
  107787. },
  107788. valueToForm: (e, n) => !!kt(n, "tooltip.extraCssText")
  107789. }
  107790. ] : []
  107791. }
  107792. ]
  107793. },
  107794. /* 标签 */
  107795. label: {
  107796. label: "标签",
  107797. prop: "label",
  107798. type: "group",
  107799. children: [
  107800. {
  107801. label: " ",
  107802. prop: "label.show",
  107803. type: "checkboxGroup",
  107804. fieldProps: {
  107805. options: [{ label: "标签可见", value: !0 }]
  107806. },
  107807. defaultValue: [],
  107808. format: (t, e) => {
  107809. t.value["label.show"] = !!(e != null && e.length);
  107810. },
  107811. valueToForm: (t) => t ? [!0] : []
  107812. },
  107813. {
  107814. label: "",
  107815. prop: "",
  107816. type: "dependency",
  107817. name: ["label.show"],
  107818. children: (t) => t["label.show"].length ? [
  107819. {
  107820. label: "文本",
  107821. prop: "label.formatter",
  107822. type: "checkboxGroup",
  107823. fieldProps: {
  107824. options: [
  107825. { label: "分类名", value: "b" },
  107826. { label: "系列名", value: "a" },
  107827. { label: "数值", value: "c" }
  107828. // { label: "百分比", value: "percent" },
  107829. ]
  107830. },
  107831. defaultValue: ["a"],
  107832. format: (e, n) => {
  107833. e.value["label.formatter"] = `{${n}}`;
  107834. },
  107835. valueToForm: (e, n) => {
  107836. var r, i;
  107837. return (i = (r = kt(n, "label.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
  107838. }
  107839. },
  107840. {
  107841. label: "样式",
  107842. prop: "label.fontStyle",
  107843. type: "fontStyle",
  107844. defaultValue: {
  107845. color: "#000000ff",
  107846. size: 12,
  107847. bold: !1,
  107848. italic: !1
  107849. },
  107850. format: (e, n) => {
  107851. e.value["label.color"] = n == null ? void 0 : n.color, e.value["label.fontSize"] = n.size, e.value["label.fontWeight"] = n.bold ? "bold" : "normal", e.value["label.fontStyle"] = n.italic ? "italic" : "normal";
  107852. },
  107853. valueToForm: (e, n) => ({
  107854. color: kt(n, "label.color", "#000000ff"),
  107855. size: kt(n, "label.fontSize", 12),
  107856. bold: kt(n, "label.fontWeight") === "bold",
  107857. italic: kt(n, "label.fontStyle") === "italic"
  107858. })
  107859. },
  107860. {
  107861. label: "布局",
  107862. prop: "",
  107863. type: "divider"
  107864. },
  107865. {
  107866. label: "位置",
  107867. prop: "label.position",
  107868. type: "radioGroup",
  107869. fieldProps: {
  107870. options: [
  107871. { label: "顶部", value: "top" },
  107872. { label: "左侧", value: "left" },
  107873. { label: "右侧", value: "right" },
  107874. { label: "底部", value: "bottom" },
  107875. { label: "内部", value: "inside" },
  107876. { label: "内部左侧", value: "insideLeft" },
  107877. { label: "内部右侧", value: "insideRight" },
  107878. { label: "内部顶部", value: "insideTop" },
  107879. { label: "内部底部", value: "insideBottom" }
  107880. ]
  107881. },
  107882. defaultValue: "top"
  107883. },
  107884. {
  107885. label: "文本方向",
  107886. prop: "label.rotate",
  107887. type: "radioGroup",
  107888. fieldProps: {
  107889. options: [
  107890. { label: "水平", value: "horizontal" },
  107891. { label: "垂直", value: "vertical" }
  107892. ]
  107893. },
  107894. defaultValue: "horizontal",
  107895. format: (e, n) => {
  107896. e.value["label.rotate"] = n === "horizontal" ? 0 : 90;
  107897. },
  107898. valueToForm: (e) => e === 0 ? "horizontal" : "vertical"
  107899. },
  107900. {
  107901. label: "边框",
  107902. prop: "",
  107903. type: "divider"
  107904. },
  107905. {
  107906. label: "线宽",
  107907. prop: "label.borderWidth",
  107908. type: "inputNumber",
  107909. fieldProps: {
  107910. addonAfter: "px"
  107911. },
  107912. defaultValue: 0
  107913. },
  107914. {
  107915. label: "颜色",
  107916. prop: "label.borderColor",
  107917. type: "colorSelect",
  107918. defaultValue: "#ccc"
  107919. },
  107920. {
  107921. label: "圆角",
  107922. prop: "label.borderRadius",
  107923. type: "inputNumber",
  107924. fieldProps: {
  107925. addonAfter: "px"
  107926. },
  107927. defaultValue: 0
  107928. }
  107929. ] : []
  107930. }
  107931. ]
  107932. }
  107933. }, Ole = (t) => (AS("data-v-0b356b47"), t = t(), ES(), t), Vht = { class: "chart-config" }, Fht = { class: "config-tab" }, Wht = /* @__PURE__ */ Ole(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), Qht = /* @__PURE__ */ Ole(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), Hht = /* @__PURE__ */ te({
  107934. __name: "Config",
  107935. props: LL,
  107936. emits: ["change"],
  107937. setup(t, { emit: e }) {
  107938. const n = t, r = U("1"), i = e, a = [
  107939. {
  107940. label: "线",
  107941. prop: "",
  107942. type: "divider"
  107943. },
  107944. {
  107945. label: "线条样式",
  107946. prop: "series.line.lineStyle.type",
  107947. type: "select",
  107948. fieldProps: {
  107949. options: [
  107950. { label: "实线", value: "solid" },
  107951. { label: "虚线", value: "dashed" },
  107952. { label: "点线", value: "dotted" }
  107953. ]
  107954. }
  107955. },
  107956. {
  107957. label: "线宽",
  107958. prop: "series.line.lineStyle.width",
  107959. type: "inputNumber",
  107960. fieldProps: {
  107961. min: 0,
  107962. addonAfter: "px"
  107963. }
  107964. },
  107965. {
  107966. label: "形态",
  107967. prop: "series.line.lineType",
  107968. type: "radioGroupButton",
  107969. fieldProps: {
  107970. options: [
  107971. { label: "普通", value: "normal" },
  107972. { label: "平滑", value: "smooth" },
  107973. { label: "阶梯", value: "step" }
  107974. ]
  107975. },
  107976. format: (u, c) => {
  107977. switch (c) {
  107978. case "smooth":
  107979. u.value["series.line.smooth"] = !0, u.value["series.line.step"] = !1;
  107980. break;
  107981. case "step":
  107982. u.value["series.line.smooth"] = !1, u.value["series.line.step"] = "end";
  107983. break;
  107984. default:
  107985. u.value["series.line.smooth"] = !1, u.value["series.line.step"] = !1;
  107986. }
  107987. },
  107988. valueToForm: (u, c) => {
  107989. const f = kt(c, "series.line.step"), d = kt(c, "series.line.smooth");
  107990. return f ? "step" : d ? "smooth" : "normal";
  107991. }
  107992. },
  107993. {
  107994. label: "标记点",
  107995. prop: "",
  107996. type: "divider"
  107997. },
  107998. {
  107999. label: "图形",
  108000. prop: "series.line.symbol",
  108001. type: "select",
  108002. fieldProps: {
  108003. options: [
  108004. { label: "圆", value: "circle" },
  108005. { label: "方", value: "rect" },
  108006. { label: "三角", value: "triangle" },
  108007. { label: "菱形", value: "diamond" },
  108008. { label: "标记", value: "pin" },
  108009. { label: "箭头", value: "arrow" },
  108010. { label: "无", value: "none" }
  108011. ]
  108012. }
  108013. },
  108014. {
  108015. label: "大小",
  108016. prop: "series.line.symbolSize",
  108017. type: "inputNumber",
  108018. fieldProps: {
  108019. min: 0,
  108020. addonAfter: "px"
  108021. }
  108022. },
  108023. {
  108024. label: "旋转",
  108025. prop: "series.line.symbolRotate",
  108026. type: "inputNumber",
  108027. fieldProps: {
  108028. min: 0,
  108029. addonAfter: "°"
  108030. }
  108031. }
  108032. ], o = [
  108033. In.title,
  108034. In.legend,
  108035. In.label,
  108036. {
  108037. ...In.series,
  108038. children: In.series.children.concat(
  108039. a
  108040. )
  108041. },
  108042. In.tooltip,
  108043. In.background
  108044. ], s = (u) => {
  108045. i("change", {
  108046. ...n,
  108047. dataSource: u
  108048. });
  108049. }, l = (u) => {
  108050. const c = Zc(n);
  108051. Object.keys(u).forEach((f) => {
  108052. YI(c, f, u[f]);
  108053. }), i("change", c);
  108054. };
  108055. return (u, c) => (pe(), Qe("div", Vht, [
  108056. He("div", Fht, [
  108057. M(B(Uc), {
  108058. activeKey: r.value,
  108059. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108060. size: "small",
  108061. centered: ""
  108062. }, {
  108063. default: we(() => [
  108064. M(B(Fs), { key: "1" }, {
  108065. tab: we(() => [
  108066. M(B(x0)),
  108067. Wht
  108068. ]),
  108069. _: 1
  108070. }),
  108071. M(B(Fs), { key: "2" }, {
  108072. tab: we(() => [
  108073. M(B(w0)),
  108074. Qht
  108075. ]),
  108076. _: 1
  108077. })
  108078. ]),
  108079. _: 1
  108080. }, 8, ["activeKey"])
  108081. ]),
  108082. r.value === "1" ? (pe(), je(B4, {
  108083. key: 0,
  108084. dataSource: u.dataSource,
  108085. onChange: s
  108086. }, null, 8, ["dataSource"])) : _t("", !0),
  108087. r.value === "2" ? (pe(), je(B(Mx), {
  108088. key: 1,
  108089. columns: o,
  108090. formModel: n,
  108091. onChange: l
  108092. }, null, 8, ["formModel"])) : _t("", !0)
  108093. ]));
  108094. }
  108095. }), Sle = /* @__PURE__ */ po(Hht, [["__scopeId", "data-v-0b356b47"]]);
  108096. Hm.Config = Sle;
  108097. Hm.install = (t) => (t.component("FmBasicLine", Hm), t);
  108098. const Ght = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108099. __proto__: null,
  108100. Config: Sle,
  108101. basicLineProps: LL,
  108102. default: Hm,
  108103. defaultPropsValue: RZe
  108104. }, Symbol.toStringTag, { value: "Module" })), z4 = {
  108105. width: {
  108106. type: Number,
  108107. default: 400
  108108. },
  108109. height: {
  108110. type: Number,
  108111. default: 260
  108112. },
  108113. dataSource: kL,
  108114. // 标题
  108115. title: {
  108116. type: Object
  108117. },
  108118. // 图例
  108119. legend: {
  108120. type: Object
  108121. },
  108122. // 背景
  108123. backgroundColor: {
  108124. type: String
  108125. },
  108126. // 边框
  108127. grid: {
  108128. type: Object
  108129. },
  108130. // 提示框
  108131. tooltip: {
  108132. type: Object
  108133. },
  108134. // x轴数据
  108135. xAxis: {
  108136. type: Object
  108137. },
  108138. // y轴数据
  108139. yAxis: {
  108140. type: Object
  108141. },
  108142. // 折线
  108143. series: {
  108144. type: Array
  108145. },
  108146. // color
  108147. color: {
  108148. type: Object
  108149. }
  108150. }, xle = [];
  108151. xle.bar = {
  108152. // @ts-ignore
  108153. fixedBarWidth: !1,
  108154. barWidth: "auto",
  108155. barGap: "30%",
  108156. barCategoryGap: "20%",
  108157. itemStyle: {
  108158. borderColor: "#ccc",
  108159. borderRadius: 0,
  108160. borderWidth: 0
  108161. }
  108162. };
  108163. const jht = RL({
  108164. title: {
  108165. text: "柱状图标题"
  108166. },
  108167. xAxis: {
  108168. data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  108169. },
  108170. series: xle
  108171. }), Zht = {
  108172. // 组件容器默认属性
  108173. container: {
  108174. props: {
  108175. width: 400,
  108176. height: 260
  108177. }
  108178. },
  108179. // 图表默认属性
  108180. props: {
  108181. // 数据源
  108182. dataSource: {
  108183. sourceType: Ri.STATIC,
  108184. data: {
  108185. xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
  108186. series: [
  108187. {
  108188. type: "bar",
  108189. name: "系列1",
  108190. data: [89.3, 92.1, 94.4, 85.4]
  108191. },
  108192. {
  108193. type: "bar",
  108194. name: "系列2",
  108195. data: [95.8, 89.4, 91.2, 76.9]
  108196. }
  108197. ]
  108198. },
  108199. url: location.origin + "/mock/api/get/example/bar",
  108200. method: "POST",
  108201. params: {},
  108202. headers: {},
  108203. refreshTime: 0,
  108204. dataProcess: `
  108205. (res) => {
  108206. // 取出列表
  108207. const data = res.data;
  108208. // x轴数据
  108209. const xData = data.map((item) => item.name);
  108210. // 系列数据
  108211. const series = [
  108212. { type: 'bar', name: '价格', data: data.map(item => item.price) },
  108213. { type: 'bar', name: '总量', data: data.map(item => item.count) },
  108214. ];
  108215. // 返回图表数据
  108216. return { xData, series };
  108217. }
  108218. `
  108219. },
  108220. ...jht
  108221. }
  108222. }, u0 = /* @__PURE__ */ te({
  108223. __name: "BasicBar",
  108224. props: z4,
  108225. setup(t) {
  108226. const e = t, { options: n, loading: r } = qL(e);
  108227. return (i, a) => (pe(), je(DL, {
  108228. width: i.width,
  108229. height: i.height,
  108230. "echarts-options": B(n),
  108231. loading: B(r)
  108232. }, null, 8, ["width", "height", "echarts-options", "loading"]));
  108233. }
  108234. }), wle = (t) => (AS("data-v-d6923dbc"), t = t(), ES(), t), Uht = { class: "chart-config" }, Xht = { class: "config-tab" }, Yht = /* @__PURE__ */ wle(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), qht = /* @__PURE__ */ wle(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), Kht = /* @__PURE__ */ te({
  108235. __name: "Config",
  108236. props: z4,
  108237. emits: ["change"],
  108238. setup(t, { emit: e }) {
  108239. const n = t, r = U("1"), i = e, a = [
  108240. {
  108241. label: "样式",
  108242. prop: "",
  108243. type: "divider"
  108244. },
  108245. {
  108246. label: "固定柱宽",
  108247. prop: "series.bar.fixedBarWidth",
  108248. type: "radioGroup",
  108249. fieldProps: {
  108250. options: [
  108251. { label: "是", value: !0 },
  108252. { label: "否", value: !1 }
  108253. ]
  108254. },
  108255. defaultValue: !1,
  108256. format: (u, c) => {
  108257. var f, d;
  108258. u.value["series.bar.barWidth"] = c && ((f = u.value) == null ? void 0 : f["series.bar.barWidth"]) !== "auto" ? ((d = u.value) == null ? void 0 : d["series.bar.barWidth"]) || 20 : "auto";
  108259. }
  108260. },
  108261. {
  108262. label: "",
  108263. prop: "",
  108264. type: "dependency",
  108265. name: ["series.bar.fixedBarWidth"],
  108266. children: (u) => u["series.bar.fixedBarWidth"] ? [
  108267. {
  108268. label: "柱宽",
  108269. prop: "series.bar.barWidth",
  108270. type: "inputNumber",
  108271. fieldProps: {
  108272. addonAfter: "px"
  108273. },
  108274. defaultValue: 20
  108275. }
  108276. ] : []
  108277. },
  108278. {
  108279. label: "系列间隔",
  108280. prop: "series.bar.barGap",
  108281. type: "slider",
  108282. defaultValue: 30,
  108283. format: (u, c) => {
  108284. u.value["series.bar.barGap"] = c + "%";
  108285. },
  108286. valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
  108287. },
  108288. {
  108289. label: "分类间隔",
  108290. prop: "series.bar.barCategoryGap",
  108291. type: "slider",
  108292. defaultValue: 20,
  108293. format: (u, c) => {
  108294. u.value["series.bar.barCategoryGap"] = c + "%";
  108295. },
  108296. valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
  108297. },
  108298. {
  108299. label: "边框",
  108300. prop: "",
  108301. type: "divider"
  108302. },
  108303. {
  108304. label: "线宽",
  108305. prop: "series.bar.itemStyle.borderWidth",
  108306. type: "inputNumber",
  108307. fieldProps: {
  108308. addonAfter: "px"
  108309. },
  108310. defaultValue: 0
  108311. },
  108312. {
  108313. label: "颜色",
  108314. prop: "series.bar.itemStyle.borderColor",
  108315. type: "colorSelect",
  108316. defaultValue: "#ccc"
  108317. },
  108318. {
  108319. label: "圆角",
  108320. prop: "series.bar.itemStyle.borderRadius",
  108321. type: "inputNumber",
  108322. fieldProps: {
  108323. addonAfter: "px"
  108324. },
  108325. defaultValue: 0
  108326. }
  108327. ], o = [
  108328. In.title,
  108329. In.legend,
  108330. In.label,
  108331. {
  108332. ...In.series,
  108333. children: In.series.children.concat(
  108334. a
  108335. )
  108336. },
  108337. In.xAxis,
  108338. In.yAxis,
  108339. In.tooltip
  108340. ], s = (u) => {
  108341. i("change", {
  108342. ...n,
  108343. dataSource: u
  108344. });
  108345. }, l = (u) => {
  108346. const c = Zc(n);
  108347. Object.keys(u).forEach((f) => {
  108348. YI(c, f, u[f]);
  108349. }), i("change", c);
  108350. };
  108351. return (u, c) => (pe(), Qe("div", Uht, [
  108352. He("div", Xht, [
  108353. M(B(Uc), {
  108354. activeKey: r.value,
  108355. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108356. size: "small",
  108357. centered: ""
  108358. }, {
  108359. default: we(() => [
  108360. M(B(Fs), { key: "1" }, {
  108361. tab: we(() => [
  108362. M(B(x0)),
  108363. Yht
  108364. ]),
  108365. _: 1
  108366. }),
  108367. M(B(Fs), { key: "2" }, {
  108368. tab: we(() => [
  108369. M(B(w0)),
  108370. qht
  108371. ]),
  108372. _: 1
  108373. })
  108374. ]),
  108375. _: 1
  108376. }, 8, ["activeKey"])
  108377. ]),
  108378. r.value === "1" ? (pe(), je(B4, {
  108379. key: 0,
  108380. dataSource: u.dataSource,
  108381. onChange: s
  108382. }, null, 8, ["dataSource"])) : _t("", !0),
  108383. r.value === "2" ? (pe(), je(B(Mx), {
  108384. key: 1,
  108385. columns: o,
  108386. formModel: n,
  108387. onChange: l
  108388. }, null, 8, ["formModel"])) : _t("", !0)
  108389. ]));
  108390. }
  108391. }), Cle = /* @__PURE__ */ po(Kht, [["__scopeId", "data-v-d6923dbc"]]);
  108392. u0.Config = Cle;
  108393. u0.install = (t) => (t.component("FmBasicBar", u0), t);
  108394. const Jht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108395. __proto__: null,
  108396. Config: Cle,
  108397. basicBarProps: z4,
  108398. default: u0,
  108399. defaultPropsValue: Zht
  108400. }, Symbol.toStringTag, { value: "Module" })), V4 = {
  108401. width: {
  108402. type: Number,
  108403. default: 400
  108404. },
  108405. height: {
  108406. type: Number,
  108407. default: 260
  108408. },
  108409. dataSource: kL,
  108410. // 标题
  108411. title: {
  108412. type: Object
  108413. },
  108414. // 图例
  108415. legend: {
  108416. type: Object
  108417. },
  108418. // 背景
  108419. backgroundColor: {
  108420. type: String
  108421. },
  108422. // 边框
  108423. grid: {
  108424. type: Object
  108425. },
  108426. // 提示框
  108427. tooltip: {
  108428. type: Object
  108429. },
  108430. // 饼图数据
  108431. series: {
  108432. type: Array
  108433. },
  108434. // color
  108435. color: {
  108436. type: Object
  108437. }
  108438. }, Tle = [];
  108439. Tle.pie = {
  108440. top: 70,
  108441. startAngle: 0,
  108442. endAngle: 360,
  108443. radius: ["0%", "75%"]
  108444. };
  108445. const ept = RL({
  108446. title: {
  108447. text: "饼图标题"
  108448. },
  108449. grid: {
  108450. show: !1
  108451. },
  108452. xAxis: {
  108453. show: !1
  108454. },
  108455. yAxis: {
  108456. show: !1
  108457. },
  108458. series: Tle
  108459. }), tpt = {
  108460. // 组件容器默认属性
  108461. container: {
  108462. props: {
  108463. width: 400,
  108464. height: 260
  108465. }
  108466. },
  108467. // 图表默认属性
  108468. props: {
  108469. // 数据源
  108470. dataSource: {
  108471. sourceType: Ri.STATIC,
  108472. data: {
  108473. series: [
  108474. {
  108475. type: "pie",
  108476. name: "系列1",
  108477. data: [
  108478. { value: 335, name: "直接访问" },
  108479. { value: 310, name: "邮件营销" },
  108480. { value: 234, name: "联盟广告" },
  108481. { value: 135, name: "视频广告" }
  108482. ]
  108483. }
  108484. ]
  108485. },
  108486. url: location.origin + "/mock/api/get/example/pie",
  108487. method: "POST",
  108488. params: {},
  108489. headers: {},
  108490. refreshTime: 0,
  108491. dataProcess: `
  108492. (res) => {
  108493. // 取出列表
  108494. const data = res.data;
  108495. // 系列数据
  108496. const series = [
  108497. { type: 'pie', name: '价格', data: data.map(item => item.price) },
  108498. ];
  108499. // 返回图表数据
  108500. return { series };
  108501. }
  108502. `
  108503. },
  108504. ...ept
  108505. }
  108506. }, c0 = /* @__PURE__ */ te({
  108507. __name: "BasicPie",
  108508. props: V4,
  108509. setup(t) {
  108510. const e = t, { options: n, loading: r } = qL(e);
  108511. return (i, a) => (pe(), je(DL, {
  108512. width: i.width,
  108513. height: i.height,
  108514. "echarts-options": B(n),
  108515. loading: B(r)
  108516. }, null, 8, ["width", "height", "echarts-options", "loading"]));
  108517. }
  108518. }), Ple = (t) => (AS("data-v-bd423688"), t = t(), ES(), t), npt = { class: "chart-config" }, rpt = { class: "config-tab" }, ipt = /* @__PURE__ */ Ple(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), apt = /* @__PURE__ */ Ple(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), opt = /* @__PURE__ */ te({
  108519. __name: "Config",
  108520. props: V4,
  108521. emits: ["change"],
  108522. setup(t, { emit: e }) {
  108523. const n = t, r = U("1"), i = e, a = [
  108524. {
  108525. label: "样式",
  108526. prop: "",
  108527. type: "divider"
  108528. },
  108529. {
  108530. label: "起始角度",
  108531. prop: "series.pie.startAngle",
  108532. type: "inputNumber",
  108533. fieldProps: {
  108534. min: 0,
  108535. max: 360,
  108536. addonAfter: "°"
  108537. }
  108538. },
  108539. {
  108540. label: "完结角度",
  108541. prop: "series.pie.endAngle",
  108542. type: "inputNumber",
  108543. fieldProps: {
  108544. min: 0,
  108545. max: 360,
  108546. addonAfter: "°"
  108547. }
  108548. },
  108549. {
  108550. label: "内径占比",
  108551. prop: "series.pie.radius",
  108552. type: "slider",
  108553. format: (u, c) => {
  108554. console.log("formatModel", u);
  108555. const f = c * 0.75;
  108556. return u.value["series.pie.radius"] = [f + "%", "75%"], c * 100;
  108557. },
  108558. valueToForm: (u) => (u || ["0%", "75%"])[0].replace("%", "") / 0.75
  108559. }
  108560. ], o = [
  108561. In.title,
  108562. In.legend,
  108563. In.label,
  108564. {
  108565. ...In.series,
  108566. children: In.series.children.concat(
  108567. a
  108568. )
  108569. },
  108570. In.tooltip
  108571. ], s = (u) => {
  108572. i("change", {
  108573. ...n,
  108574. dataSource: u
  108575. });
  108576. }, l = (u) => {
  108577. const c = Zc(n);
  108578. Object.keys(u).forEach((f) => {
  108579. YI(c, f, u[f]);
  108580. }), i("change", c);
  108581. };
  108582. return (u, c) => (pe(), Qe("div", npt, [
  108583. He("div", rpt, [
  108584. M(B(Uc), {
  108585. activeKey: r.value,
  108586. "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
  108587. size: "small",
  108588. centered: ""
  108589. }, {
  108590. default: we(() => [
  108591. M(B(Fs), { key: "1" }, {
  108592. tab: we(() => [
  108593. M(B(x0)),
  108594. ipt
  108595. ]),
  108596. _: 1
  108597. }),
  108598. M(B(Fs), { key: "2" }, {
  108599. tab: we(() => [
  108600. M(B(w0)),
  108601. apt
  108602. ]),
  108603. _: 1
  108604. })
  108605. ]),
  108606. _: 1
  108607. }, 8, ["activeKey"])
  108608. ]),
  108609. r.value === "1" ? (pe(), je(B4, {
  108610. key: 0,
  108611. dataSource: u.dataSource,
  108612. onChange: s
  108613. }, null, 8, ["dataSource"])) : _t("", !0),
  108614. r.value === "2" ? (pe(), je(B(Mx), {
  108615. key: 1,
  108616. columns: o,
  108617. formModel: n,
  108618. onChange: l
  108619. }, null, 8, ["formModel"])) : _t("", !0)
  108620. ]));
  108621. }
  108622. }), $le = /* @__PURE__ */ po(opt, [["__scopeId", "data-v-bd423688"]]);
  108623. c0.Config = $le;
  108624. c0.install = (t) => (t.component("FmBasicPie", c0), t);
  108625. const spt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  108626. __proto__: null,
  108627. Config: $le,
  108628. basicPieProps: V4,
  108629. default: c0,
  108630. defaultPropsValue: tpt
  108631. }, Symbol.toStringTag, { value: "Module" })), mpt = {
  108632. Title: () => Promise.resolve().then(() => GMe),
  108633. BasicLine: () => Promise.resolve().then(() => Ght),
  108634. BasicBar: () => Promise.resolve().then(() => Jht),
  108635. BasicPie: () => Promise.resolve().then(() => spt)
  108636. }, WG = {
  108637. BasicLine: Hm,
  108638. BasicBar: u0,
  108639. Title: Zg,
  108640. BasicPie: c0
  108641. }, lpt = function(t) {
  108642. return Object.keys(WG).forEach((e) => {
  108643. const n = WG[e];
  108644. n != null && n.install && (console.log("注册组件:", e), t.use(n));
  108645. }), t;
  108646. }, ypt = {
  108647. version: "1.0.0",
  108648. install: lpt
  108649. };
  108650. export {
  108651. u0 as BasicBar,
  108652. Cle as BasicBarConfig,
  108653. Zht as BasicBarDefaultProps,
  108654. z4 as BasicBarProps,
  108655. Hm as BasicLine,
  108656. Sle as BasicLineConfig,
  108657. RZe as BasicLineDefaultProps,
  108658. LL as BasicLineProps,
  108659. c0 as BasicPie,
  108660. $le as BasicPieConfig,
  108661. tpt as BasicPieDefaultProps,
  108662. V4 as BasicPieProps,
  108663. Mx as CusForm,
  108664. Ri as DataSourceType,
  108665. Zg as Title,
  108666. mpt as asyncComponentAll,
  108667. WG as components,
  108668. ypt as default,
  108669. lpt as install
  108670. };
  108671. //# sourceMappingURL=shalu-dashboard-ui.js.map