index.umd.js 1.8 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811488124881348814488154881648817488184881948820488214882248823488244882548826488274882848829488304883148832488334883448835488364883748838488394884048841488424884348844488454884648847488484884948850488514885248853488544885548856488574885848859488604886148862488634886448865488664886748868488694887048871488724887348874488754887648877488784887948880488814888248883488844888548886488874888848889488904889148892488934889448895488964889748898488994890048901489024890348904489054890648907489084890948910489114891248913489144891548916489174891848919489204892148922489234892448925489264892748928489294893048931489324893348934489354893648937489384893948940489414894248943489444894548946489474894848949489504895148952489534895448955489564895748958489594896048961489624896348964489654896648967489684896948970489714897248973489744897548976489774897848979489804898148982489834898448985489864898748988489894899048991489924899348994489954899648997489984899949000490014900249003490044900549006490074900849009490104901149012490134901449015490164901749018490194902049021490224902349024490254902649027490284902949030490314903249033490344903549036490374903849039490404904149042490434904449045490464904749048490494905049051490524905349054490554905649057490584905949060490614906249063490644906549066490674906849069490704907149072490734907449075490764907749078490794908049081490824908349084490854908649087490884908949090490914909249093490944909549096490974909849099491004910149102491034910449105491064910749108491094911049111491124911349114491154911649117491184911949120491214912249123491244912549126491274912849129491304913149132491334913449135491364913749138491394914049141491424914349144491454914649147491484914949150491514915249153491544915549156491574915849159491604916149162491634916449165491664916749168491694917049171491724917349174491754917649177491784917949180491814918249183491844918549186491874918849189491904919149192491934919449195491964919749198491994920049201492024920349204492054920649207492084920949210492114921249213492144921549216492174921849219492204922149222492234922449225492264922749228492294923049231492324923349234492354923649237492384923949240492414924249243492444924549246492474924849249492504925149252492534925449255492564925749258492594926049261492624926349264492654926649267492684926949270492714927249273492744927549276492774927849279492804928149282492834928449285492864928749288492894929049291492924929349294492954929649297492984929949300493014930249303493044930549306493074930849309493104931149312493134931449315493164931749318493194932049321493224932349324493254932649327493284932949330493314933249333493344933549336493374933849339493404934149342493434934449345493464934749348493494935049351493524935349354493554935649357493584935949360493614936249363493644936549366493674936849369493704937149372493734937449375493764937749378493794938049381493824938349384493854938649387493884938949390493914939249393493944939549396493974939849399494004940149402494034940449405494064940749408494094941049411494124941349414494154941649417494184941949420494214942249423494244942549426494274942849429494304943149432494334943449435494364943749438494394944049441494424944349444494454944649447494484944949450494514945249453494544945549456494574945849459494604946149462494634946449465494664946749468494694947049471494724947349474494754947649477494784947949480494814948249483494844948549486494874948849489494904949149492494934949449495494964949749498494994950049501495024950349504495054950649507495084950949510495114951249513495144951549516495174951849519495204952149522495234952449525495264952749528495294953049531495324953349534495354953649537495384953949540495414954249543495444954549546495474954849549495504955149552495534955449555495564955749558495594956049561495624956349564495654956649567495684956949570495714957249573495744957549576495774957849579495804958149582495834958449585495864958749588495894959049591495924959349594495954959649597495984959949600496014960249603496044960549606496074960849609496104961149612496134961449615496164961749618496194962049621496224962349624496254962649627496284962949630496314963249633496344963549636496374963849639496404964149642496434964449645496464964749648496494965049651496524965349654496554965649657496584965949660496614966249663496644966549666496674966849669496704967149672496734967449675496764967749678496794968049681496824968349684496854968649687496884968949690496914969249693496944969549696496974969849699497004970149702497034970449705497064970749708497094971049711497124971349714497154971649717497184971949720497214972249723497244972549726497274972849729497304973149732497334973449735497364973749738497394974049741497424974349744497454974649747497484974949750497514975249753497544975549756497574975849759497604976149762497634976449765497664976749768497694977049771497724977349774497754977649777497784977949780497814978249783497844978549786497874978849789497904979149792497934979449795497964979749798497994980049801498024980349804498054980649807498084980949810498114981249813498144981549816498174981849819498204982149822498234982449825498264982749828498294983049831498324983349834498354983649837498384983949840498414984249843498444984549846498474984849849498504985149852498534985449855498564985749858498594986049861498624986349864498654986649867498684986949870498714987249873498744987549876498774987849879498804988149882498834988449885498864988749888498894989049891498924989349894498954989649897498984989949900499014990249903499044990549906499074990849909499104991149912499134991449915499164991749918499194992049921499224992349924499254992649927499284992949930499314993249933499344993549936499374993849939499404994149942499434994449945499464994749948499494995049951499524995349954499554995649957499584995949960499614996249963499644996549966499674996849969499704997149972499734997449975499764997749978499794998049981499824998349984499854998649987499884998949990499914999249993499944999549996499974999849999500005000150002500035000450005500065000750008500095001050011500125001350014500155001650017500185001950020500215002250023500245002550026500275002850029500305003150032500335003450035500365003750038500395004050041500425004350044500455004650047500485004950050500515005250053500545005550056500575005850059500605006150062500635006450065500665006750068500695007050071500725007350074500755007650077500785007950080500815008250083500845008550086500875008850089500905009150092500935009450095500965009750098500995010050101501025010350104501055010650107501085010950110501115011250113501145011550116501175011850119501205012150122501235012450125501265012750128501295013050131501325013350134501355013650137501385013950140501415014250143501445014550146501475014850149501505015150152501535015450155501565015750158501595016050161501625016350164501655016650167501685016950170501715017250173501745017550176501775017850179501805018150182501835018450185501865018750188501895019050191501925019350194501955019650197501985019950200502015020250203502045020550206502075020850209502105021150212502135021450215502165021750218502195022050221502225022350224502255022650227502285022950230502315023250233502345023550236502375023850239502405024150242502435024450245502465024750248502495025050251502525025350254502555025650257502585025950260502615026250263502645026550266502675026850269502705027150272502735027450275502765027750278502795028050281502825028350284502855028650287502885028950290502915029250293502945029550296502975029850299503005030150302503035030450305503065030750308503095031050311503125031350314503155031650317503185031950320503215032250323503245032550326503275032850329503305033150332503335033450335503365033750338503395034050341503425034350344503455034650347503485034950350503515035250353503545035550356503575035850359503605036150362503635036450365503665036750368503695037050371503725037350374503755037650377503785037950380503815038250383503845038550386503875038850389503905039150392503935039450395503965039750398503995040050401504025040350404504055040650407504085040950410504115041250413504145041550416504175041850419504205042150422504235042450425504265042750428504295043050431504325043350434504355043650437504385043950440504415044250443504445044550446504475044850449504505045150452504535045450455504565045750458504595046050461504625046350464504655046650467504685046950470504715047250473504745047550476504775047850479504805048150482504835048450485504865048750488504895049050491504925049350494504955049650497504985049950500505015050250503505045050550506505075050850509505105051150512505135051450515505165051750518505195052050521505225052350524505255052650527505285052950530505315053250533505345053550536505375053850539505405054150542505435054450545505465054750548505495055050551505525055350554505555055650557505585055950560505615056250563505645056550566505675056850569505705057150572505735057450575505765057750578505795058050581505825058350584505855058650587505885058950590505915059250593505945059550596505975059850599506005060150602506035060450605506065060750608506095061050611506125061350614506155061650617506185061950620506215062250623506245062550626506275062850629506305063150632506335063450635506365063750638506395064050641506425064350644506455064650647506485064950650506515065250653506545065550656506575065850659506605066150662506635066450665506665066750668506695067050671506725067350674506755067650677506785067950680506815068250683506845068550686506875068850689506905069150692506935069450695506965069750698506995070050701507025070350704507055070650707507085070950710507115071250713507145071550716507175071850719507205072150722507235072450725507265072750728507295073050731507325073350734507355073650737507385073950740507415074250743507445074550746507475074850749507505075150752507535075450755507565075750758507595076050761507625076350764507655076650767507685076950770507715077250773507745077550776507775077850779507805078150782507835078450785507865078750788507895079050791507925079350794507955079650797507985079950800508015080250803508045080550806508075080850809508105081150812508135081450815508165081750818508195082050821508225082350824508255082650827508285082950830508315083250833508345083550836508375083850839508405084150842508435084450845508465084750848508495085050851508525085350854508555085650857508585085950860508615086250863508645086550866508675086850869508705087150872508735087450875508765087750878508795088050881508825088350884508855088650887508885088950890508915089250893508945089550896508975089850899509005090150902509035090450905509065090750908509095091050911509125091350914509155091650917509185091950920509215092250923509245092550926509275092850929509305093150932509335093450935509365093750938509395094050941509425094350944509455094650947509485094950950509515095250953509545095550956509575095850959509605096150962509635096450965509665096750968509695097050971509725097350974509755097650977509785097950980509815098250983509845098550986509875098850989509905099150992509935099450995509965099750998509995100051001510025100351004510055100651007510085100951010510115101251013510145101551016510175101851019510205102151022510235102451025510265102751028510295103051031510325103351034510355103651037510385103951040510415104251043510445104551046510475104851049510505105151052510535105451055510565105751058510595106051061510625106351064510655106651067510685106951070510715107251073510745107551076510775107851079510805108151082510835108451085510865108751088510895109051091510925109351094510955109651097510985109951100511015110251103511045110551106511075110851109511105111151112511135111451115511165111751118511195112051121511225112351124511255112651127511285112951130511315113251133511345113551136511375113851139511405114151142511435114451145511465114751148511495115051151511525115351154511555115651157511585115951160511615116251163511645116551166511675116851169511705117151172511735117451175511765117751178511795118051181511825118351184511855118651187511885118951190511915119251193511945119551196511975119851199512005120151202512035120451205512065120751208512095121051211512125121351214512155121651217512185121951220512215122251223512245122551226512275122851229512305123151232512335123451235512365123751238512395124051241512425124351244512455124651247512485124951250512515125251253512545125551256512575125851259512605126151262512635126451265512665126751268512695127051271512725127351274512755127651277512785127951280512815128251283512845128551286512875128851289512905129151292512935129451295512965129751298512995130051301513025130351304513055130651307513085130951310513115131251313513145131551316513175131851319513205132151322513235132451325513265132751328513295133051331513325133351334513355133651337513385133951340513415134251343513445134551346513475134851349513505135151352513535135451355513565135751358513595136051361513625136351364513655136651367513685136951370513715137251373513745137551376513775137851379513805138151382513835138451385513865138751388513895139051391513925139351394513955139651397513985139951400514015140251403514045140551406514075140851409514105141151412514135141451415514165141751418514195142051421514225142351424514255142651427514285142951430514315143251433514345143551436514375143851439514405144151442514435144451445514465144751448514495145051451514525145351454514555145651457514585145951460514615146251463514645146551466514675146851469514705147151472514735147451475514765147751478514795148051481514825148351484514855148651487514885148951490514915149251493514945149551496514975149851499515005150151502515035150451505515065150751508515095151051511515125151351514515155151651517515185151951520515215152251523515245152551526515275152851529515305153151532515335153451535515365153751538515395154051541515425154351544515455154651547515485154951550515515155251553515545155551556515575155851559515605156151562515635156451565515665156751568515695157051571515725157351574515755157651577515785157951580515815158251583515845158551586515875158851589515905159151592515935159451595515965159751598515995160051601516025160351604516055160651607516085160951610516115161251613516145161551616516175161851619516205162151622516235162451625516265162751628516295163051631516325163351634516355163651637516385163951640516415164251643516445164551646516475164851649516505165151652516535165451655516565165751658516595166051661516625166351664516655166651667516685166951670516715167251673516745167551676516775167851679516805168151682516835168451685516865168751688516895169051691516925169351694516955169651697516985169951700517015170251703517045170551706517075170851709517105171151712517135171451715517165171751718517195172051721517225172351724517255172651727517285172951730517315173251733517345173551736517375173851739517405174151742517435174451745517465174751748517495175051751517525175351754517555175651757517585175951760517615176251763517645176551766517675176851769517705177151772517735177451775517765177751778517795178051781517825178351784517855178651787517885178951790517915179251793517945179551796517975179851799518005180151802518035180451805518065180751808518095181051811518125181351814518155181651817518185181951820518215182251823518245182551826518275182851829518305183151832518335183451835518365183751838518395184051841518425184351844518455184651847518485184951850518515185251853518545185551856518575185851859518605186151862518635186451865518665186751868518695187051871518725187351874518755187651877518785187951880518815188251883518845188551886518875188851889518905189151892518935189451895518965189751898518995190051901519025190351904519055190651907519085190951910519115191251913519145191551916519175191851919519205192151922519235192451925519265192751928519295193051931519325193351934519355193651937519385193951940519415194251943519445194551946519475194851949519505195151952519535195451955519565195751958519595196051961519625196351964519655196651967519685196951970519715197251973519745197551976519775197851979519805198151982519835198451985519865198751988519895199051991519925199351994519955199651997519985199952000520015200252003520045200552006520075200852009520105201152012520135201452015520165201752018520195202052021520225202352024520255202652027520285202952030520315203252033520345203552036520375203852039520405204152042520435204452045520465204752048520495205052051520525205352054520555205652057520585205952060520615206252063520645206552066520675206852069520705207152072520735207452075520765207752078520795208052081520825208352084520855208652087520885208952090520915209252093520945209552096520975209852099521005210152102521035210452105521065210752108521095211052111521125211352114521155211652117521185211952120521215212252123521245212552126521275212852129521305213152132521335213452135521365213752138521395214052141521425214352144521455214652147521485214952150521515215252153521545215552156521575215852159521605216152162521635216452165521665216752168521695217052171521725217352174521755217652177521785217952180521815218252183521845218552186521875218852189521905219152192521935219452195521965219752198521995220052201522025220352204522055220652207522085220952210522115221252213522145221552216522175221852219522205222152222522235222452225522265222752228522295223052231522325223352234522355223652237522385223952240522415224252243522445224552246522475224852249522505225152252522535225452255522565225752258522595226052261522625226352264522655226652267522685226952270522715227252273522745227552276522775227852279522805228152282522835228452285522865228752288522895229052291522925229352294522955229652297522985229952300523015230252303523045230552306523075230852309523105231152312523135231452315523165231752318523195232052321523225232352324523255232652327523285232952330523315233252333523345233552336523375233852339523405234152342523435234452345523465234752348523495235052351523525235352354523555235652357523585235952360523615236252363523645236552366523675236852369523705237152372523735237452375523765237752378523795238052381523825238352384523855238652387523885238952390523915239252393523945239552396523975239852399524005240152402524035240452405524065240752408524095241052411524125241352414524155241652417524185241952420524215242252423524245242552426524275242852429524305243152432524335243452435524365243752438524395244052441524425244352444524455244652447524485244952450524515245252453524545245552456524575245852459524605246152462524635246452465524665246752468524695247052471524725247352474524755247652477524785247952480524815248252483524845248552486524875248852489524905249152492524935249452495524965249752498524995250052501525025250352504525055250652507525085250952510525115251252513525145251552516525175251852519525205252152522525235252452525525265252752528525295253052531525325253352534525355253652537525385253952540525415254252543525445254552546525475254852549525505255152552525535255452555525565255752558525595256052561525625256352564525655256652567525685256952570525715257252573525745257552576525775257852579525805258152582525835258452585525865258752588525895259052591525925259352594525955259652597525985259952600526015260252603526045260552606526075260852609526105261152612526135261452615526165261752618526195262052621526225262352624526255262652627526285262952630526315263252633526345263552636526375263852639526405264152642526435264452645526465264752648526495265052651526525265352654526555265652657526585265952660526615266252663526645266552666526675266852669526705267152672526735267452675526765267752678526795268052681526825268352684526855268652687526885268952690526915269252693526945269552696526975269852699527005270152702527035270452705527065270752708527095271052711527125271352714527155271652717527185271952720527215272252723527245272552726527275272852729527305273152732527335273452735527365273752738527395274052741527425274352744527455274652747527485274952750527515275252753527545275552756527575275852759527605276152762527635276452765527665276752768527695277052771527725277352774527755277652777527785277952780527815278252783527845278552786527875278852789527905279152792527935279452795527965279752798527995280052801528025280352804528055280652807528085280952810528115281252813528145281552816528175281852819528205282152822528235282452825528265282752828528295283052831528325283352834528355283652837528385283952840528415284252843528445284552846528475284852849528505285152852528535285452855528565285752858528595286052861528625286352864528655286652867528685286952870528715287252873528745287552876528775287852879528805288152882528835288452885528865288752888528895289052891528925289352894528955289652897528985289952900529015290252903529045290552906529075290852909529105291152912529135291452915529165291752918529195292052921529225292352924529255292652927529285292952930529315293252933529345293552936529375293852939529405294152942529435294452945529465294752948529495295052951529525295352954529555295652957529585295952960529615296252963529645296552966529675296852969529705297152972529735297452975529765297752978529795298052981529825298352984529855298652987529885298952990529915299252993529945299552996529975299852999530005300153002530035300453005530065300753008530095301053011530125301353014530155301653017530185301953020530215302253023530245302553026530275302853029530305303153032530335303453035530365303753038530395304053041530425304353044530455304653047530485304953050530515305253053530545305553056530575305853059530605306153062530635306453065530665306753068530695307053071530725307353074530755307653077530785307953080530815308253083530845308553086530875308853089530905309153092530935309453095530965309753098530995310053101531025310353104531055310653107531085310953110531115311253113531145311553116531175311853119531205312153122531235312453125531265312753128531295313053131531325313353134531355313653137531385313953140531415314253143531445314553146531475314853149531505315153152531535315453155531565315753158531595316053161531625316353164531655316653167531685316953170531715317253173531745317553176531775317853179531805318153182531835318453185531865318753188531895319053191531925319353194531955319653197531985319953200532015320253203532045320553206532075320853209532105321153212532135321453215532165321753218532195322053221532225322353224532255322653227532285322953230532315323253233532345323553236532375323853239532405324153242532435324453245532465324753248532495325053251532525325353254532555325653257532585325953260532615326253263532645326553266532675326853269532705327153272532735327453275532765327753278532795328053281532825328353284532855328653287532885328953290532915329253293532945329553296532975329853299533005330153302533035330453305533065330753308533095331053311533125331353314533155331653317533185331953320533215332253323533245332553326533275332853329533305333153332533335333453335533365333753338533395334053341533425334353344533455334653347533485334953350533515335253353533545335553356533575335853359533605336153362533635336453365533665336753368533695337053371533725337353374533755337653377533785337953380533815338253383533845338553386533875338853389533905339153392533935339453395533965339753398533995340053401534025340353404534055340653407534085340953410534115341253413534145341553416534175341853419534205342153422534235342453425534265342753428534295343053431534325343353434534355343653437534385343953440534415344253443534445344553446534475344853449534505345153452534535345453455534565345753458534595346053461534625346353464534655346653467534685346953470534715347253473534745347553476534775347853479534805348153482534835348453485534865348753488534895349053491534925349353494534955349653497534985349953500535015350253503535045350553506535075350853509535105351153512535135351453515535165351753518535195352053521535225352353524535255352653527535285352953530535315353253533535345353553536535375353853539535405354153542535435354453545535465354753548535495355053551535525355353554535555355653557535585355953560535615356253563535645356553566535675356853569535705357153572535735357453575535765357753578535795358053581535825358353584535855358653587535885358953590535915359253593535945359553596535975359853599536005360153602536035360453605536065360753608536095361053611536125361353614536155361653617536185361953620536215362253623536245362553626536275362853629536305363153632536335363453635536365363753638536395364053641536425364353644536455364653647536485364953650536515365253653536545365553656536575365853659536605366153662536635366453665536665366753668536695367053671536725367353674536755367653677536785367953680536815368253683536845368553686536875368853689536905369153692536935369453695536965369753698536995370053701537025370353704537055370653707537085370953710537115371253713537145371553716537175371853719537205372153722537235372453725537265372753728537295373053731537325373353734537355373653737537385373953740537415374253743537445374553746537475374853749537505375153752537535375453755537565375753758537595376053761537625376353764537655376653767537685376953770537715377253773537745377553776537775377853779537805378153782537835378453785537865378753788537895379053791537925379353794537955379653797537985379953800538015380253803538045380553806538075380853809538105381153812538135381453815538165381753818538195382053821538225382353824538255382653827538285382953830538315383253833538345383553836538375383853839538405384153842538435384453845538465384753848538495385053851538525385353854538555385653857538585385953860538615386253863538645386553866538675386853869538705387153872538735387453875538765387753878538795388053881538825388353884538855388653887538885388953890538915389253893538945389553896538975389853899539005390153902539035390453905539065390753908539095391053911539125391353914539155391653917539185391953920539215392253923539245392553926539275392853929539305393153932539335393453935539365393753938539395394053941539425394353944539455394653947539485394953950539515395253953539545395553956539575395853959539605396153962539635396453965539665396753968539695397053971539725397353974539755397653977539785397953980539815398253983539845398553986539875398853989539905399153992539935399453995539965399753998539995400054001540025400354004540055400654007540085400954010540115401254013540145401554016540175401854019540205402154022540235402454025540265402754028540295403054031540325403354034540355403654037540385403954040540415404254043540445404554046540475404854049540505405154052540535405454055540565405754058540595406054061540625406354064540655406654067540685406954070540715407254073540745407554076540775407854079540805408154082540835408454085540865408754088540895409054091540925409354094540955409654097540985409954100541015410254103541045410554106541075410854109541105411154112541135411454115541165411754118541195412054121541225412354124541255412654127541285412954130541315413254133541345413554136541375413854139541405414154142541435414454145541465414754148541495415054151541525415354154541555415654157541585415954160541615416254163541645416554166541675416854169541705417154172541735417454175541765417754178541795418054181541825418354184541855418654187541885418954190541915419254193541945419554196541975419854199542005420154202542035420454205542065420754208542095421054211542125421354214542155421654217542185421954220542215422254223542245422554226542275422854229542305423154232542335423454235542365423754238542395424054241542425424354244542455424654247542485424954250542515425254253542545425554256542575425854259542605426154262542635426454265542665426754268542695427054271542725427354274542755427654277542785427954280542815428254283542845428554286542875428854289542905429154292542935429454295542965429754298542995430054301543025430354304543055430654307543085430954310543115431254313543145431554316543175431854319543205432154322543235432454325543265432754328543295433054331543325433354334543355433654337543385433954340543415434254343543445434554346543475434854349543505435154352543535435454355543565435754358543595436054361543625436354364543655436654367543685436954370543715437254373543745437554376543775437854379543805438154382543835438454385543865438754388543895439054391543925439354394543955439654397543985439954400544015440254403544045440554406544075440854409544105441154412544135441454415544165441754418544195442054421544225442354424544255442654427544285442954430544315443254433544345443554436544375443854439544405444154442544435444454445544465444754448544495445054451544525445354454544555445654457544585445954460544615446254463544645446554466544675446854469544705447154472544735447454475544765447754478544795448054481544825448354484544855448654487544885448954490544915449254493544945449554496544975449854499545005450154502545035450454505545065450754508545095451054511545125451354514545155451654517545185451954520545215452254523545245452554526545275452854529545305453154532545335453454535545365453754538545395454054541545425454354544545455454654547545485454954550545515455254553545545455554556545575455854559545605456154562545635456454565545665456754568545695457054571545725457354574545755457654577545785457954580545815458254583545845458554586545875458854589545905459154592545935459454595545965459754598545995460054601546025460354604546055460654607546085460954610546115461254613546145461554616546175461854619546205462154622546235462454625546265462754628546295463054631546325463354634546355463654637546385463954640546415464254643546445464554646546475464854649546505465154652546535465454655546565465754658546595466054661546625466354664546655466654667546685466954670546715467254673546745467554676546775467854679546805468154682546835468454685546865468754688546895469054691546925469354694546955469654697546985469954700547015470254703547045470554706547075470854709547105471154712547135471454715547165471754718547195472054721547225472354724547255472654727547285472954730547315473254733547345473554736547375473854739547405474154742547435474454745547465474754748547495475054751547525475354754547555475654757547585475954760547615476254763547645476554766547675476854769547705477154772547735477454775547765477754778547795478054781547825478354784547855478654787547885478954790547915479254793547945479554796547975479854799548005480154802548035480454805548065480754808548095481054811548125481354814548155481654817548185481954820548215482254823548245482554826548275482854829548305483154832548335483454835548365483754838548395484054841548425484354844548455484654847548485484954850548515485254853548545485554856548575485854859548605486154862548635486454865548665486754868548695487054871548725487354874548755487654877548785487954880548815488254883548845488554886548875488854889548905489154892548935489454895548965489754898548995490054901549025490354904549055490654907549085490954910549115491254913549145491554916549175491854919549205492154922549235492454925549265492754928549295493054931549325493354934549355493654937549385493954940549415494254943549445494554946549475494854949549505495154952549535495454955549565495754958549595496054961549625496354964549655496654967549685496954970549715497254973549745497554976549775497854979549805498154982549835498454985549865498754988549895499054991549925499354994549955499654997549985499955000550015500255003550045500555006550075500855009550105501155012550135501455015550165501755018550195502055021550225502355024550255502655027550285502955030550315503255033550345503555036550375503855039550405504155042550435504455045550465504755048550495505055051550525505355054550555505655057550585505955060550615506255063550645506555066550675506855069550705507155072550735507455075550765507755078550795508055081550825508355084550855508655087550885508955090550915509255093550945509555096550975509855099551005510155102551035510455105551065510755108551095511055111551125511355114551155511655117551185511955120551215512255123551245512555126551275512855129551305513155132551335513455135551365513755138551395514055141551425514355144551455514655147551485514955150551515515255153551545515555156551575515855159551605516155162551635516455165551665516755168551695517055171551725517355174551755517655177551785517955180551815518255183551845518555186551875518855189551905519155192551935519455195551965519755198551995520055201552025520355204552055520655207552085520955210552115521255213552145521555216552175521855219552205522155222552235522455225552265522755228552295523055231552325523355234552355523655237552385523955240552415524255243552445524555246552475524855249552505525155252552535525455255552565525755258552595526055261552625526355264552655526655267552685526955270552715527255273552745527555276552775527855279552805528155282552835528455285552865528755288552895529055291552925529355294552955529655297552985529955300553015530255303553045530555306553075530855309553105531155312553135531455315553165531755318553195532055321553225532355324553255532655327553285532955330553315533255333553345533555336553375533855339553405534155342553435534455345553465534755348553495535055351553525535355354553555535655357553585535955360553615536255363553645536555366553675536855369553705537155372553735537455375553765537755378553795538055381553825538355384553855538655387553885538955390553915539255393553945539555396553975539855399554005540155402554035540455405554065540755408554095541055411554125541355414554155541655417554185541955420554215542255423554245542555426554275542855429554305543155432554335543455435554365543755438554395544055441554425544355444554455544655447554485544955450554515545255453554545545555456554575545855459554605546155462554635546455465554665546755468554695547055471554725547355474554755547655477554785547955480554815548255483554845548555486554875548855489554905549155492554935549455495554965549755498554995550055501555025550355504555055550655507555085550955510555115551255513555145551555516555175551855519555205552155522555235552455525555265552755528555295553055531555325553355534555355553655537555385553955540555415554255543555445554555546555475554855549555505555155552555535555455555555565555755558555595556055561555625556355564555655556655567555685556955570555715557255573555745557555576555775557855579555805558155582555835558455585555865558755588555895559055591555925559355594555955559655597555985559955600556015560255603556045560555606556075560855609556105561155612556135561455615556165561755618556195562055621556225562355624556255562655627556285562955630556315563255633556345563555636556375563855639556405564155642556435564455645556465564755648556495565055651556525565355654556555565655657556585565955660556615566255663556645566555666556675566855669556705567155672556735567455675556765567755678556795568055681556825568355684556855568655687556885568955690556915569255693556945569555696556975569855699557005570155702557035570455705557065570755708557095571055711557125571355714557155571655717557185571955720557215572255723557245572555726557275572855729557305573155732557335573455735557365573755738557395574055741557425574355744557455574655747557485574955750557515575255753557545575555756557575575855759557605576155762557635576455765557665576755768557695577055771557725577355774557755577655777557785577955780557815578255783557845578555786557875578855789557905579155792557935579455795557965579755798557995580055801558025580355804558055580655807558085580955810558115581255813558145581555816558175581855819558205582155822558235582455825558265582755828558295583055831558325583355834558355583655837558385583955840558415584255843558445584555846558475584855849558505585155852558535585455855558565585755858558595586055861558625586355864558655586655867558685586955870558715587255873558745587555876558775587855879558805588155882558835588455885558865588755888558895589055891558925589355894558955589655897558985589955900559015590255903559045590555906559075590855909559105591155912559135591455915559165591755918559195592055921559225592355924559255592655927559285592955930559315593255933559345593555936559375593855939559405594155942559435594455945559465594755948559495595055951559525595355954559555595655957559585595955960559615596255963559645596555966559675596855969559705597155972559735597455975559765597755978559795598055981559825598355984559855598655987559885598955990559915599255993559945599555996559975599855999560005600156002560035600456005560065600756008560095601056011560125601356014560155601656017560185601956020560215602256023560245602556026560275602856029560305603156032560335603456035560365603756038560395604056041560425604356044560455604656047560485604956050560515605256053560545605556056560575605856059560605606156062560635606456065560665606756068560695607056071560725607356074560755607656077560785607956080560815608256083560845608556086560875608856089560905609156092560935609456095560965609756098560995610056101561025610356104561055610656107561085610956110561115611256113561145611556116561175611856119561205612156122561235612456125561265612756128561295613056131561325613356134561355613656137561385613956140561415614256143561445614556146561475614856149561505615156152561535615456155561565615756158561595616056161561625616356164561655616656167561685616956170561715617256173561745617556176561775617856179561805618156182561835618456185561865618756188561895619056191561925619356194561955619656197561985619956200562015620256203562045620556206562075620856209562105621156212562135621456215562165621756218562195622056221562225622356224562255622656227562285622956230562315623256233562345623556236562375623856239562405624156242562435624456245562465624756248562495625056251562525625356254562555625656257562585625956260562615626256263562645626556266562675626856269562705627156272562735627456275562765627756278562795628056281562825628356284562855628656287562885628956290562915629256293562945629556296562975629856299563005630156302563035630456305563065630756308563095631056311563125631356314563155631656317563185631956320563215632256323563245632556326563275632856329563305633156332563335633456335563365633756338563395634056341563425634356344563455634656347563485634956350563515635256353563545635556356563575635856359563605636156362563635636456365563665636756368563695637056371563725637356374563755637656377563785637956380563815638256383563845638556386563875638856389563905639156392563935639456395563965639756398563995640056401564025640356404564055640656407564085640956410564115641256413564145641556416564175641856419564205642156422564235642456425564265642756428564295643056431564325643356434564355643656437564385643956440564415644256443564445644556446564475644856449564505645156452564535645456455564565645756458564595646056461564625646356464564655646656467564685646956470564715647256473564745647556476564775647856479564805648156482564835648456485564865648756488564895649056491564925649356494564955649656497564985649956500565015650256503565045650556506565075650856509565105651156512565135651456515565165651756518565195652056521565225652356524565255652656527565285652956530565315653256533565345653556536565375653856539565405654156542565435654456545565465654756548565495655056551565525655356554565555655656557565585655956560565615656256563565645656556566565675656856569565705657156572565735657456575565765657756578565795658056581565825658356584565855658656587565885658956590565915659256593565945659556596565975659856599566005660156602566035660456605566065660756608566095661056611566125661356614566155661656617566185661956620566215662256623566245662556626566275662856629566305663156632566335663456635566365663756638566395664056641566425664356644566455664656647566485664956650566515665256653566545665556656566575665856659566605666156662566635666456665566665666756668566695667056671566725667356674566755667656677566785667956680566815668256683566845668556686566875668856689566905669156692566935669456695566965669756698566995670056701567025670356704567055670656707567085670956710567115671256713567145671556716567175671856719567205672156722567235672456725567265672756728567295673056731567325673356734567355673656737567385673956740567415674256743567445674556746567475674856749567505675156752567535675456755567565675756758567595676056761567625676356764567655676656767567685676956770567715677256773567745677556776567775677856779567805678156782567835678456785567865678756788567895679056791567925679356794567955679656797567985679956800568015680256803568045680556806568075680856809568105681156812568135681456815568165681756818568195682056821568225682356824568255682656827568285682956830568315683256833568345683556836568375683856839568405684156842568435684456845568465684756848568495685056851568525685356854568555685656857568585685956860568615686256863568645686556866568675686856869568705687156872568735687456875568765687756878568795688056881568825688356884568855688656887568885688956890568915689256893568945689556896568975689856899569005690156902569035690456905569065690756908569095691056911569125691356914569155691656917569185691956920569215692256923569245692556926569275692856929569305693156932569335693456935569365693756938569395694056941569425694356944569455694656947569485694956950569515695256953569545695556956569575695856959569605696156962569635696456965569665696756968569695697056971569725697356974569755697656977569785697956980569815698256983569845698556986569875698856989569905699156992569935699456995569965699756998569995700057001
  1. (function webpackUniversalModuleDefinition(root, factory) {
  2. if(typeof exports === 'object' && typeof module === 'object')
  3. module.exports = factory(require("vue"), require("xe-utils"));
  4. else if(typeof define === 'function' && define.amd)
  5. define([, "xe-utils"], factory);
  6. else if(typeof exports === 'object')
  7. exports["VxeUI"] = factory(require("vue"), require("xe-utils"));
  8. else
  9. root["VxeUI"] = factory(root["Vue"], root["XEUtils"]);
  10. })((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__9274__, __WEBPACK_EXTERNAL_MODULE__8871__) {
  11. return /******/ (function() { // webpackBootstrap
  12. /******/ var __webpack_modules__ = ({
  13. /***/ 1834:
  14. /***/ (function(module, exports, __webpack_require__) {
  15. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = (__webpack_require__(8251)["default"]);
  16. __webpack_require__(6280);
  17. __webpack_require__(3851);
  18. __webpack_require__(4864);
  19. __webpack_require__(7465);
  20. __webpack_require__(7495);
  21. __webpack_require__(7745);
  22. __webpack_require__(8781);
  23. __webpack_require__(5440);
  24. __webpack_require__(2762);
  25. __webpack_require__(3611);
  26. // addapted from the document.currentScript polyfill by Adam Miller
  27. // MIT license
  28. // source: https://github.com/amiller-gh/currentScript-polyfill
  29. // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
  30. (function (root, factory) {
  31. if (true) {
  32. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  33. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  34. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  35. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  36. } else {}
  37. })(typeof self !== 'undefined' ? self : this, function () {
  38. function getCurrentScript() {
  39. var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript');
  40. // for chrome
  41. if (!descriptor && 'currentScript' in document && document.currentScript) {
  42. return document.currentScript;
  43. }
  44. // for other browsers with native support for currentScript
  45. if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
  46. return document.currentScript;
  47. }
  48. // IE 8-10 support script readyState
  49. // IE 11+ & Firefox support stack trace
  50. try {
  51. throw new Error();
  52. } catch (err) {
  53. // Find the second match for the "at" string to get file src url from stack.
  54. var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
  55. ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
  56. stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
  57. scriptLocation = stackDetails && stackDetails[1] || false,
  58. line = stackDetails && stackDetails[2] || false,
  59. currentLocation = document.location.href.replace(document.location.hash, ''),
  60. pageSource,
  61. inlineScriptSourceRegExp,
  62. inlineScriptSource,
  63. scripts = document.getElementsByTagName('script'); // Live NodeList collection
  64. if (scriptLocation === currentLocation) {
  65. pageSource = document.documentElement.outerHTML;
  66. inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
  67. inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
  68. }
  69. for (var i = 0; i < scripts.length; i++) {
  70. // If ready state is interactive, return the script tag
  71. if (scripts[i].readyState === 'interactive') {
  72. return scripts[i];
  73. }
  74. // If src matches, return the script tag
  75. if (scripts[i].src === scriptLocation) {
  76. return scripts[i];
  77. }
  78. // If inline source matches, return the script tag
  79. if (scriptLocation === currentLocation && scripts[i].innerHTML && scripts[i].innerHTML.trim() === inlineScriptSource) {
  80. return scripts[i];
  81. }
  82. }
  83. // If no match, return null
  84. return null;
  85. }
  86. }
  87. ;
  88. return getCurrentScript;
  89. });
  90. /***/ }),
  91. /***/ 9274:
  92. /***/ (function(module) {
  93. "use strict";
  94. module.exports = __WEBPACK_EXTERNAL_MODULE__9274__;
  95. /***/ }),
  96. /***/ 8871:
  97. /***/ (function(module) {
  98. "use strict";
  99. module.exports = __WEBPACK_EXTERNAL_MODULE__8871__;
  100. /***/ }),
  101. /***/ 9306:
  102. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  103. "use strict";
  104. var isCallable = __webpack_require__(4901);
  105. var tryToString = __webpack_require__(6823);
  106. var $TypeError = TypeError;
  107. // `Assert: IsCallable(argument) is true`
  108. module.exports = function (argument) {
  109. if (isCallable(argument)) return argument;
  110. throw new $TypeError(tryToString(argument) + ' is not a function');
  111. };
  112. /***/ }),
  113. /***/ 5548:
  114. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  115. "use strict";
  116. var isConstructor = __webpack_require__(3517);
  117. var tryToString = __webpack_require__(6823);
  118. var $TypeError = TypeError;
  119. // `Assert: IsConstructor(argument) is true`
  120. module.exports = function (argument) {
  121. if (isConstructor(argument)) return argument;
  122. throw new $TypeError(tryToString(argument) + ' is not a constructor');
  123. };
  124. /***/ }),
  125. /***/ 3506:
  126. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  127. "use strict";
  128. var isPossiblePrototype = __webpack_require__(3925);
  129. var $String = String;
  130. var $TypeError = TypeError;
  131. module.exports = function (argument) {
  132. if (isPossiblePrototype(argument)) return argument;
  133. throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
  134. };
  135. /***/ }),
  136. /***/ 6469:
  137. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  138. "use strict";
  139. var wellKnownSymbol = __webpack_require__(8227);
  140. var create = __webpack_require__(2360);
  141. var defineProperty = (__webpack_require__(4913).f);
  142. var UNSCOPABLES = wellKnownSymbol('unscopables');
  143. var ArrayPrototype = Array.prototype;
  144. // Array.prototype[@@unscopables]
  145. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  146. if (ArrayPrototype[UNSCOPABLES] === undefined) {
  147. defineProperty(ArrayPrototype, UNSCOPABLES, {
  148. configurable: true,
  149. value: create(null)
  150. });
  151. }
  152. // add a key to Array.prototype[@@unscopables]
  153. module.exports = function (key) {
  154. ArrayPrototype[UNSCOPABLES][key] = true;
  155. };
  156. /***/ }),
  157. /***/ 7829:
  158. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  159. "use strict";
  160. var charAt = (__webpack_require__(8183).charAt);
  161. // `AdvanceStringIndex` abstract operation
  162. // https://tc39.es/ecma262/#sec-advancestringindex
  163. module.exports = function (S, index, unicode) {
  164. return index + (unicode ? charAt(S, index).length : 1);
  165. };
  166. /***/ }),
  167. /***/ 679:
  168. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  169. "use strict";
  170. var isPrototypeOf = __webpack_require__(1625);
  171. var $TypeError = TypeError;
  172. module.exports = function (it, Prototype) {
  173. if (isPrototypeOf(Prototype, it)) return it;
  174. throw new $TypeError('Incorrect invocation');
  175. };
  176. /***/ }),
  177. /***/ 8551:
  178. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  179. "use strict";
  180. var isObject = __webpack_require__(34);
  181. var $String = String;
  182. var $TypeError = TypeError;
  183. // `Assert: Type(argument) is Object`
  184. module.exports = function (argument) {
  185. if (isObject(argument)) return argument;
  186. throw new $TypeError($String(argument) + ' is not an object');
  187. };
  188. /***/ }),
  189. /***/ 4373:
  190. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  191. "use strict";
  192. var toObject = __webpack_require__(8981);
  193. var toAbsoluteIndex = __webpack_require__(5610);
  194. var lengthOfArrayLike = __webpack_require__(6198);
  195. // `Array.prototype.fill` method implementation
  196. // https://tc39.es/ecma262/#sec-array.prototype.fill
  197. module.exports = function fill(value /* , start = 0, end = @length */) {
  198. var O = toObject(this);
  199. var length = lengthOfArrayLike(O);
  200. var argumentsLength = arguments.length;
  201. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  202. var end = argumentsLength > 2 ? arguments[2] : undefined;
  203. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  204. while (endPos > index) O[index++] = value;
  205. return O;
  206. };
  207. /***/ }),
  208. /***/ 235:
  209. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  210. "use strict";
  211. var $forEach = (__webpack_require__(9213).forEach);
  212. var arrayMethodIsStrict = __webpack_require__(4598);
  213. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  214. // `Array.prototype.forEach` method implementation
  215. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  216. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  217. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  218. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  219. } : [].forEach;
  220. /***/ }),
  221. /***/ 7916:
  222. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  223. "use strict";
  224. var bind = __webpack_require__(6080);
  225. var call = __webpack_require__(9565);
  226. var toObject = __webpack_require__(8981);
  227. var callWithSafeIterationClosing = __webpack_require__(6319);
  228. var isArrayIteratorMethod = __webpack_require__(4209);
  229. var isConstructor = __webpack_require__(3517);
  230. var lengthOfArrayLike = __webpack_require__(6198);
  231. var createProperty = __webpack_require__(2278);
  232. var getIterator = __webpack_require__(81);
  233. var getIteratorMethod = __webpack_require__(851);
  234. var $Array = Array;
  235. // `Array.from` method implementation
  236. // https://tc39.es/ecma262/#sec-array.from
  237. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  238. var O = toObject(arrayLike);
  239. var IS_CONSTRUCTOR = isConstructor(this);
  240. var argumentsLength = arguments.length;
  241. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  242. var mapping = mapfn !== undefined;
  243. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
  244. var iteratorMethod = getIteratorMethod(O);
  245. var index = 0;
  246. var length, result, step, iterator, next, value;
  247. // if the target is not iterable or it's an array with the default iterator - use a simple case
  248. if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
  249. result = IS_CONSTRUCTOR ? new this() : [];
  250. iterator = getIterator(O, iteratorMethod);
  251. next = iterator.next;
  252. for (;!(step = call(next, iterator)).done; index++) {
  253. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  254. createProperty(result, index, value);
  255. }
  256. } else {
  257. length = lengthOfArrayLike(O);
  258. result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
  259. for (;length > index; index++) {
  260. value = mapping ? mapfn(O[index], index) : O[index];
  261. createProperty(result, index, value);
  262. }
  263. }
  264. result.length = index;
  265. return result;
  266. };
  267. /***/ }),
  268. /***/ 9617:
  269. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  270. "use strict";
  271. var toIndexedObject = __webpack_require__(5397);
  272. var toAbsoluteIndex = __webpack_require__(5610);
  273. var lengthOfArrayLike = __webpack_require__(6198);
  274. // `Array.prototype.{ indexOf, includes }` methods implementation
  275. var createMethod = function (IS_INCLUDES) {
  276. return function ($this, el, fromIndex) {
  277. var O = toIndexedObject($this);
  278. var length = lengthOfArrayLike(O);
  279. if (length === 0) return !IS_INCLUDES && -1;
  280. var index = toAbsoluteIndex(fromIndex, length);
  281. var value;
  282. // Array#includes uses SameValueZero equality algorithm
  283. // eslint-disable-next-line no-self-compare -- NaN check
  284. if (IS_INCLUDES && el !== el) while (length > index) {
  285. value = O[index++];
  286. // eslint-disable-next-line no-self-compare -- NaN check
  287. if (value !== value) return true;
  288. // Array#indexOf ignores holes, Array#includes - not
  289. } else for (;length > index; index++) {
  290. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  291. } return !IS_INCLUDES && -1;
  292. };
  293. };
  294. module.exports = {
  295. // `Array.prototype.includes` method
  296. // https://tc39.es/ecma262/#sec-array.prototype.includes
  297. includes: createMethod(true),
  298. // `Array.prototype.indexOf` method
  299. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  300. indexOf: createMethod(false)
  301. };
  302. /***/ }),
  303. /***/ 9213:
  304. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  305. "use strict";
  306. var bind = __webpack_require__(6080);
  307. var uncurryThis = __webpack_require__(9504);
  308. var IndexedObject = __webpack_require__(7055);
  309. var toObject = __webpack_require__(8981);
  310. var lengthOfArrayLike = __webpack_require__(6198);
  311. var arraySpeciesCreate = __webpack_require__(1469);
  312. var push = uncurryThis([].push);
  313. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  314. var createMethod = function (TYPE) {
  315. var IS_MAP = TYPE === 1;
  316. var IS_FILTER = TYPE === 2;
  317. var IS_SOME = TYPE === 3;
  318. var IS_EVERY = TYPE === 4;
  319. var IS_FIND_INDEX = TYPE === 6;
  320. var IS_FILTER_REJECT = TYPE === 7;
  321. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  322. return function ($this, callbackfn, that, specificCreate) {
  323. var O = toObject($this);
  324. var self = IndexedObject(O);
  325. var length = lengthOfArrayLike(self);
  326. var boundFunction = bind(callbackfn, that);
  327. var index = 0;
  328. var create = specificCreate || arraySpeciesCreate;
  329. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  330. var value, result;
  331. for (;length > index; index++) if (NO_HOLES || index in self) {
  332. value = self[index];
  333. result = boundFunction(value, index, O);
  334. if (TYPE) {
  335. if (IS_MAP) target[index] = result; // map
  336. else if (result) switch (TYPE) {
  337. case 3: return true; // some
  338. case 5: return value; // find
  339. case 6: return index; // findIndex
  340. case 2: push(target, value); // filter
  341. } else switch (TYPE) {
  342. case 4: return false; // every
  343. case 7: push(target, value); // filterReject
  344. }
  345. }
  346. }
  347. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  348. };
  349. };
  350. module.exports = {
  351. // `Array.prototype.forEach` method
  352. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  353. forEach: createMethod(0),
  354. // `Array.prototype.map` method
  355. // https://tc39.es/ecma262/#sec-array.prototype.map
  356. map: createMethod(1),
  357. // `Array.prototype.filter` method
  358. // https://tc39.es/ecma262/#sec-array.prototype.filter
  359. filter: createMethod(2),
  360. // `Array.prototype.some` method
  361. // https://tc39.es/ecma262/#sec-array.prototype.some
  362. some: createMethod(3),
  363. // `Array.prototype.every` method
  364. // https://tc39.es/ecma262/#sec-array.prototype.every
  365. every: createMethod(4),
  366. // `Array.prototype.find` method
  367. // https://tc39.es/ecma262/#sec-array.prototype.find
  368. find: createMethod(5),
  369. // `Array.prototype.findIndex` method
  370. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  371. findIndex: createMethod(6),
  372. // `Array.prototype.filterReject` method
  373. // https://github.com/tc39/proposal-array-filtering
  374. filterReject: createMethod(7)
  375. };
  376. /***/ }),
  377. /***/ 597:
  378. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  379. "use strict";
  380. var fails = __webpack_require__(9039);
  381. var wellKnownSymbol = __webpack_require__(8227);
  382. var V8_VERSION = __webpack_require__(9519);
  383. var SPECIES = wellKnownSymbol('species');
  384. module.exports = function (METHOD_NAME) {
  385. // We can't use this feature detection in V8 since it causes
  386. // deoptimization and serious performance degradation
  387. // https://github.com/zloirock/core-js/issues/677
  388. return V8_VERSION >= 51 || !fails(function () {
  389. var array = [];
  390. var constructor = array.constructor = {};
  391. constructor[SPECIES] = function () {
  392. return { foo: 1 };
  393. };
  394. return array[METHOD_NAME](Boolean).foo !== 1;
  395. });
  396. };
  397. /***/ }),
  398. /***/ 4598:
  399. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  400. "use strict";
  401. var fails = __webpack_require__(9039);
  402. module.exports = function (METHOD_NAME, argument) {
  403. var method = [][METHOD_NAME];
  404. return !!method && fails(function () {
  405. // eslint-disable-next-line no-useless-call -- required for testing
  406. method.call(null, argument || function () { return 1; }, 1);
  407. });
  408. };
  409. /***/ }),
  410. /***/ 4527:
  411. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  412. "use strict";
  413. var DESCRIPTORS = __webpack_require__(3724);
  414. var isArray = __webpack_require__(4376);
  415. var $TypeError = TypeError;
  416. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  417. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  418. // Safari < 13 does not throw an error in this case
  419. var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
  420. // makes no sense without proper strict mode support
  421. if (this !== undefined) return true;
  422. try {
  423. // eslint-disable-next-line es/no-object-defineproperty -- safe
  424. Object.defineProperty([], 'length', { writable: false }).length = 1;
  425. } catch (error) {
  426. return error instanceof TypeError;
  427. }
  428. }();
  429. module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
  430. if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
  431. throw new $TypeError('Cannot set read only .length');
  432. } return O.length = length;
  433. } : function (O, length) {
  434. return O.length = length;
  435. };
  436. /***/ }),
  437. /***/ 7680:
  438. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  439. "use strict";
  440. var uncurryThis = __webpack_require__(9504);
  441. module.exports = uncurryThis([].slice);
  442. /***/ }),
  443. /***/ 4488:
  444. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  445. "use strict";
  446. var arraySlice = __webpack_require__(7680);
  447. var floor = Math.floor;
  448. var sort = function (array, comparefn) {
  449. var length = array.length;
  450. if (length < 8) {
  451. // insertion sort
  452. var i = 1;
  453. var element, j;
  454. while (i < length) {
  455. j = i;
  456. element = array[i];
  457. while (j && comparefn(array[j - 1], element) > 0) {
  458. array[j] = array[--j];
  459. }
  460. if (j !== i++) array[j] = element;
  461. }
  462. } else {
  463. // merge sort
  464. var middle = floor(length / 2);
  465. var left = sort(arraySlice(array, 0, middle), comparefn);
  466. var right = sort(arraySlice(array, middle), comparefn);
  467. var llength = left.length;
  468. var rlength = right.length;
  469. var lindex = 0;
  470. var rindex = 0;
  471. while (lindex < llength || rindex < rlength) {
  472. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  473. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  474. : lindex < llength ? left[lindex++] : right[rindex++];
  475. }
  476. }
  477. return array;
  478. };
  479. module.exports = sort;
  480. /***/ }),
  481. /***/ 7433:
  482. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  483. "use strict";
  484. var isArray = __webpack_require__(4376);
  485. var isConstructor = __webpack_require__(3517);
  486. var isObject = __webpack_require__(34);
  487. var wellKnownSymbol = __webpack_require__(8227);
  488. var SPECIES = wellKnownSymbol('species');
  489. var $Array = Array;
  490. // a part of `ArraySpeciesCreate` abstract operation
  491. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  492. module.exports = function (originalArray) {
  493. var C;
  494. if (isArray(originalArray)) {
  495. C = originalArray.constructor;
  496. // cross-realm fallback
  497. if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
  498. else if (isObject(C)) {
  499. C = C[SPECIES];
  500. if (C === null) C = undefined;
  501. }
  502. } return C === undefined ? $Array : C;
  503. };
  504. /***/ }),
  505. /***/ 1469:
  506. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  507. "use strict";
  508. var arraySpeciesConstructor = __webpack_require__(7433);
  509. // `ArraySpeciesCreate` abstract operation
  510. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  511. module.exports = function (originalArray, length) {
  512. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  513. };
  514. /***/ }),
  515. /***/ 6319:
  516. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  517. "use strict";
  518. var anObject = __webpack_require__(8551);
  519. var iteratorClose = __webpack_require__(9539);
  520. // call something on iterator step with safe closing on error
  521. module.exports = function (iterator, fn, value, ENTRIES) {
  522. try {
  523. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  524. } catch (error) {
  525. iteratorClose(iterator, 'throw', error);
  526. }
  527. };
  528. /***/ }),
  529. /***/ 4428:
  530. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  531. "use strict";
  532. var wellKnownSymbol = __webpack_require__(8227);
  533. var ITERATOR = wellKnownSymbol('iterator');
  534. var SAFE_CLOSING = false;
  535. try {
  536. var called = 0;
  537. var iteratorWithReturn = {
  538. next: function () {
  539. return { done: !!called++ };
  540. },
  541. 'return': function () {
  542. SAFE_CLOSING = true;
  543. }
  544. };
  545. iteratorWithReturn[ITERATOR] = function () {
  546. return this;
  547. };
  548. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  549. Array.from(iteratorWithReturn, function () { throw 2; });
  550. } catch (error) { /* empty */ }
  551. module.exports = function (exec, SKIP_CLOSING) {
  552. try {
  553. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  554. } catch (error) { return false; } // workaround of old WebKit + `eval` bug
  555. var ITERATION_SUPPORT = false;
  556. try {
  557. var object = {};
  558. object[ITERATOR] = function () {
  559. return {
  560. next: function () {
  561. return { done: ITERATION_SUPPORT = true };
  562. }
  563. };
  564. };
  565. exec(object);
  566. } catch (error) { /* empty */ }
  567. return ITERATION_SUPPORT;
  568. };
  569. /***/ }),
  570. /***/ 2195:
  571. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  572. "use strict";
  573. var uncurryThis = __webpack_require__(9504);
  574. var toString = uncurryThis({}.toString);
  575. var stringSlice = uncurryThis(''.slice);
  576. module.exports = function (it) {
  577. return stringSlice(toString(it), 8, -1);
  578. };
  579. /***/ }),
  580. /***/ 6955:
  581. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  582. "use strict";
  583. var TO_STRING_TAG_SUPPORT = __webpack_require__(2140);
  584. var isCallable = __webpack_require__(4901);
  585. var classofRaw = __webpack_require__(2195);
  586. var wellKnownSymbol = __webpack_require__(8227);
  587. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  588. var $Object = Object;
  589. // ES3 wrong here
  590. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
  591. // fallback for IE11 Script Access Denied error
  592. var tryGet = function (it, key) {
  593. try {
  594. return it[key];
  595. } catch (error) { /* empty */ }
  596. };
  597. // getting tag from ES6+ `Object.prototype.toString`
  598. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  599. var O, tag, result;
  600. return it === undefined ? 'Undefined' : it === null ? 'Null'
  601. // @@toStringTag case
  602. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  603. // builtinTag case
  604. : CORRECT_ARGUMENTS ? classofRaw(O)
  605. // ES3 arguments fallback
  606. : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  607. };
  608. /***/ }),
  609. /***/ 7740:
  610. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  611. "use strict";
  612. var hasOwn = __webpack_require__(9297);
  613. var ownKeys = __webpack_require__(5031);
  614. var getOwnPropertyDescriptorModule = __webpack_require__(7347);
  615. var definePropertyModule = __webpack_require__(4913);
  616. module.exports = function (target, source, exceptions) {
  617. var keys = ownKeys(source);
  618. var defineProperty = definePropertyModule.f;
  619. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  620. for (var i = 0; i < keys.length; i++) {
  621. var key = keys[i];
  622. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  623. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  624. }
  625. }
  626. };
  627. /***/ }),
  628. /***/ 1436:
  629. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  630. "use strict";
  631. var wellKnownSymbol = __webpack_require__(8227);
  632. var MATCH = wellKnownSymbol('match');
  633. module.exports = function (METHOD_NAME) {
  634. var regexp = /./;
  635. try {
  636. '/./'[METHOD_NAME](regexp);
  637. } catch (error1) {
  638. try {
  639. regexp[MATCH] = false;
  640. return '/./'[METHOD_NAME](regexp);
  641. } catch (error2) { /* empty */ }
  642. } return false;
  643. };
  644. /***/ }),
  645. /***/ 2211:
  646. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  647. "use strict";
  648. var fails = __webpack_require__(9039);
  649. module.exports = !fails(function () {
  650. function F() { /* empty */ }
  651. F.prototype.constructor = null;
  652. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  653. return Object.getPrototypeOf(new F()) !== F.prototype;
  654. });
  655. /***/ }),
  656. /***/ 7240:
  657. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  658. "use strict";
  659. var uncurryThis = __webpack_require__(9504);
  660. var requireObjectCoercible = __webpack_require__(7750);
  661. var toString = __webpack_require__(655);
  662. var quot = /"/g;
  663. var replace = uncurryThis(''.replace);
  664. // `CreateHTML` abstract operation
  665. // https://tc39.es/ecma262/#sec-createhtml
  666. module.exports = function (string, tag, attribute, value) {
  667. var S = toString(requireObjectCoercible(string));
  668. var p1 = '<' + tag;
  669. if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '&quot;') + '"';
  670. return p1 + '>' + S + '</' + tag + '>';
  671. };
  672. /***/ }),
  673. /***/ 2529:
  674. /***/ (function(module) {
  675. "use strict";
  676. // `CreateIterResultObject` abstract operation
  677. // https://tc39.es/ecma262/#sec-createiterresultobject
  678. module.exports = function (value, done) {
  679. return { value: value, done: done };
  680. };
  681. /***/ }),
  682. /***/ 6699:
  683. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  684. "use strict";
  685. var DESCRIPTORS = __webpack_require__(3724);
  686. var definePropertyModule = __webpack_require__(4913);
  687. var createPropertyDescriptor = __webpack_require__(6980);
  688. module.exports = DESCRIPTORS ? function (object, key, value) {
  689. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  690. } : function (object, key, value) {
  691. object[key] = value;
  692. return object;
  693. };
  694. /***/ }),
  695. /***/ 6980:
  696. /***/ (function(module) {
  697. "use strict";
  698. module.exports = function (bitmap, value) {
  699. return {
  700. enumerable: !(bitmap & 1),
  701. configurable: !(bitmap & 2),
  702. writable: !(bitmap & 4),
  703. value: value
  704. };
  705. };
  706. /***/ }),
  707. /***/ 2278:
  708. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  709. "use strict";
  710. var DESCRIPTORS = __webpack_require__(3724);
  711. var definePropertyModule = __webpack_require__(4913);
  712. var createPropertyDescriptor = __webpack_require__(6980);
  713. module.exports = function (object, key, value) {
  714. if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  715. else object[key] = value;
  716. };
  717. /***/ }),
  718. /***/ 3640:
  719. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  720. "use strict";
  721. var anObject = __webpack_require__(8551);
  722. var ordinaryToPrimitive = __webpack_require__(4270);
  723. var $TypeError = TypeError;
  724. // `Date.prototype[@@toPrimitive](hint)` method implementation
  725. // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
  726. module.exports = function (hint) {
  727. anObject(this);
  728. if (hint === 'string' || hint === 'default') hint = 'string';
  729. else if (hint !== 'number') throw new $TypeError('Incorrect hint');
  730. return ordinaryToPrimitive(this, hint);
  731. };
  732. /***/ }),
  733. /***/ 2106:
  734. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  735. "use strict";
  736. var makeBuiltIn = __webpack_require__(283);
  737. var defineProperty = __webpack_require__(4913);
  738. module.exports = function (target, name, descriptor) {
  739. if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
  740. if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
  741. return defineProperty.f(target, name, descriptor);
  742. };
  743. /***/ }),
  744. /***/ 6840:
  745. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  746. "use strict";
  747. var isCallable = __webpack_require__(4901);
  748. var definePropertyModule = __webpack_require__(4913);
  749. var makeBuiltIn = __webpack_require__(283);
  750. var defineGlobalProperty = __webpack_require__(9433);
  751. module.exports = function (O, key, value, options) {
  752. if (!options) options = {};
  753. var simple = options.enumerable;
  754. var name = options.name !== undefined ? options.name : key;
  755. if (isCallable(value)) makeBuiltIn(value, name, options);
  756. if (options.global) {
  757. if (simple) O[key] = value;
  758. else defineGlobalProperty(key, value);
  759. } else {
  760. try {
  761. if (!options.unsafe) delete O[key];
  762. else if (O[key]) simple = true;
  763. } catch (error) { /* empty */ }
  764. if (simple) O[key] = value;
  765. else definePropertyModule.f(O, key, {
  766. value: value,
  767. enumerable: false,
  768. configurable: !options.nonConfigurable,
  769. writable: !options.nonWritable
  770. });
  771. } return O;
  772. };
  773. /***/ }),
  774. /***/ 6279:
  775. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  776. "use strict";
  777. var defineBuiltIn = __webpack_require__(6840);
  778. module.exports = function (target, src, options) {
  779. for (var key in src) defineBuiltIn(target, key, src[key], options);
  780. return target;
  781. };
  782. /***/ }),
  783. /***/ 9433:
  784. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  785. "use strict";
  786. var globalThis = __webpack_require__(4576);
  787. // eslint-disable-next-line es/no-object-defineproperty -- safe
  788. var defineProperty = Object.defineProperty;
  789. module.exports = function (key, value) {
  790. try {
  791. defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
  792. } catch (error) {
  793. globalThis[key] = value;
  794. } return value;
  795. };
  796. /***/ }),
  797. /***/ 4606:
  798. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  799. "use strict";
  800. var tryToString = __webpack_require__(6823);
  801. var $TypeError = TypeError;
  802. module.exports = function (O, P) {
  803. if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  804. };
  805. /***/ }),
  806. /***/ 3724:
  807. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  808. "use strict";
  809. var fails = __webpack_require__(9039);
  810. // Detect IE8's incomplete defineProperty implementation
  811. module.exports = !fails(function () {
  812. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  813. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  814. });
  815. /***/ }),
  816. /***/ 4055:
  817. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  818. "use strict";
  819. var globalThis = __webpack_require__(4576);
  820. var isObject = __webpack_require__(34);
  821. var document = globalThis.document;
  822. // typeof document.createElement is 'object' in old IE
  823. var EXISTS = isObject(document) && isObject(document.createElement);
  824. module.exports = function (it) {
  825. return EXISTS ? document.createElement(it) : {};
  826. };
  827. /***/ }),
  828. /***/ 6837:
  829. /***/ (function(module) {
  830. "use strict";
  831. var $TypeError = TypeError;
  832. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  833. module.exports = function (it) {
  834. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  835. return it;
  836. };
  837. /***/ }),
  838. /***/ 7400:
  839. /***/ (function(module) {
  840. "use strict";
  841. // iterable DOM collections
  842. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  843. module.exports = {
  844. CSSRuleList: 0,
  845. CSSStyleDeclaration: 0,
  846. CSSValueList: 0,
  847. ClientRectList: 0,
  848. DOMRectList: 0,
  849. DOMStringList: 0,
  850. DOMTokenList: 1,
  851. DataTransferItemList: 0,
  852. FileList: 0,
  853. HTMLAllCollection: 0,
  854. HTMLCollection: 0,
  855. HTMLFormElement: 0,
  856. HTMLSelectElement: 0,
  857. MediaList: 0,
  858. MimeTypeArray: 0,
  859. NamedNodeMap: 0,
  860. NodeList: 1,
  861. PaintRequestList: 0,
  862. Plugin: 0,
  863. PluginArray: 0,
  864. SVGLengthList: 0,
  865. SVGNumberList: 0,
  866. SVGPathSegList: 0,
  867. SVGPointList: 0,
  868. SVGStringList: 0,
  869. SVGTransformList: 0,
  870. SourceBufferList: 0,
  871. StyleSheetList: 0,
  872. TextTrackCueList: 0,
  873. TextTrackList: 0,
  874. TouchList: 0
  875. };
  876. /***/ }),
  877. /***/ 9296:
  878. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  879. "use strict";
  880. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  881. var documentCreateElement = __webpack_require__(4055);
  882. var classList = documentCreateElement('span').classList;
  883. var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
  884. module.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
  885. /***/ }),
  886. /***/ 8727:
  887. /***/ (function(module) {
  888. "use strict";
  889. // IE8- don't enum bug keys
  890. module.exports = [
  891. 'constructor',
  892. 'hasOwnProperty',
  893. 'isPrototypeOf',
  894. 'propertyIsEnumerable',
  895. 'toLocaleString',
  896. 'toString',
  897. 'valueOf'
  898. ];
  899. /***/ }),
  900. /***/ 3709:
  901. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  902. "use strict";
  903. var userAgent = __webpack_require__(2839);
  904. var firefox = userAgent.match(/firefox\/(\d+)/i);
  905. module.exports = !!firefox && +firefox[1];
  906. /***/ }),
  907. /***/ 3763:
  908. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  909. "use strict";
  910. var UA = __webpack_require__(2839);
  911. module.exports = /MSIE|Trident/.test(UA);
  912. /***/ }),
  913. /***/ 4265:
  914. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  915. "use strict";
  916. var userAgent = __webpack_require__(2839);
  917. module.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';
  918. /***/ }),
  919. /***/ 9544:
  920. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  921. "use strict";
  922. var userAgent = __webpack_require__(2839);
  923. // eslint-disable-next-line redos/no-vulnerable -- safe
  924. module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
  925. /***/ }),
  926. /***/ 8574:
  927. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  928. "use strict";
  929. var ENVIRONMENT = __webpack_require__(4215);
  930. module.exports = ENVIRONMENT === 'NODE';
  931. /***/ }),
  932. /***/ 7860:
  933. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  934. "use strict";
  935. var userAgent = __webpack_require__(2839);
  936. module.exports = /web0s(?!.*chrome)/i.test(userAgent);
  937. /***/ }),
  938. /***/ 2839:
  939. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  940. "use strict";
  941. var globalThis = __webpack_require__(4576);
  942. var navigator = globalThis.navigator;
  943. var userAgent = navigator && navigator.userAgent;
  944. module.exports = userAgent ? String(userAgent) : '';
  945. /***/ }),
  946. /***/ 9519:
  947. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  948. "use strict";
  949. var globalThis = __webpack_require__(4576);
  950. var userAgent = __webpack_require__(2839);
  951. var process = globalThis.process;
  952. var Deno = globalThis.Deno;
  953. var versions = process && process.versions || Deno && Deno.version;
  954. var v8 = versions && versions.v8;
  955. var match, version;
  956. if (v8) {
  957. match = v8.split('.');
  958. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  959. // but their correct versions are not interesting for us
  960. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  961. }
  962. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  963. // so check `userAgent` even if `.v8` exists, but 0
  964. if (!version && userAgent) {
  965. match = userAgent.match(/Edge\/(\d+)/);
  966. if (!match || match[1] >= 74) {
  967. match = userAgent.match(/Chrome\/(\d+)/);
  968. if (match) version = +match[1];
  969. }
  970. }
  971. module.exports = version;
  972. /***/ }),
  973. /***/ 3607:
  974. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  975. "use strict";
  976. var userAgent = __webpack_require__(2839);
  977. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  978. module.exports = !!webkit && +webkit[1];
  979. /***/ }),
  980. /***/ 4215:
  981. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  982. "use strict";
  983. /* global Bun, Deno -- detection */
  984. var globalThis = __webpack_require__(4576);
  985. var userAgent = __webpack_require__(2839);
  986. var classof = __webpack_require__(2195);
  987. var userAgentStartsWith = function (string) {
  988. return userAgent.slice(0, string.length) === string;
  989. };
  990. module.exports = (function () {
  991. if (userAgentStartsWith('Bun/')) return 'BUN';
  992. if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
  993. if (userAgentStartsWith('Deno/')) return 'DENO';
  994. if (userAgentStartsWith('Node.js/')) return 'NODE';
  995. if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';
  996. if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';
  997. if (classof(globalThis.process) === 'process') return 'NODE';
  998. if (globalThis.window && globalThis.document) return 'BROWSER';
  999. return 'REST';
  1000. })();
  1001. /***/ }),
  1002. /***/ 6193:
  1003. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1004. "use strict";
  1005. var uncurryThis = __webpack_require__(9504);
  1006. var $Error = Error;
  1007. var replace = uncurryThis(''.replace);
  1008. var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
  1009. // eslint-disable-next-line redos/no-vulnerable -- safe
  1010. var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
  1011. var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
  1012. module.exports = function (stack, dropEntries) {
  1013. if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
  1014. while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  1015. } return stack;
  1016. };
  1017. /***/ }),
  1018. /***/ 747:
  1019. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1020. "use strict";
  1021. var createNonEnumerableProperty = __webpack_require__(6699);
  1022. var clearErrorStack = __webpack_require__(6193);
  1023. var ERROR_STACK_INSTALLABLE = __webpack_require__(4659);
  1024. // non-standard V8
  1025. var captureStackTrace = Error.captureStackTrace;
  1026. module.exports = function (error, C, stack, dropEntries) {
  1027. if (ERROR_STACK_INSTALLABLE) {
  1028. if (captureStackTrace) captureStackTrace(error, C);
  1029. else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));
  1030. }
  1031. };
  1032. /***/ }),
  1033. /***/ 4659:
  1034. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1035. "use strict";
  1036. var fails = __webpack_require__(9039);
  1037. var createPropertyDescriptor = __webpack_require__(6980);
  1038. module.exports = !fails(function () {
  1039. var error = new Error('a');
  1040. if (!('stack' in error)) return true;
  1041. // eslint-disable-next-line es/no-object-defineproperty -- safe
  1042. Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  1043. return error.stack !== 7;
  1044. });
  1045. /***/ }),
  1046. /***/ 6518:
  1047. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1048. "use strict";
  1049. var globalThis = __webpack_require__(4576);
  1050. var getOwnPropertyDescriptor = (__webpack_require__(7347).f);
  1051. var createNonEnumerableProperty = __webpack_require__(6699);
  1052. var defineBuiltIn = __webpack_require__(6840);
  1053. var defineGlobalProperty = __webpack_require__(9433);
  1054. var copyConstructorProperties = __webpack_require__(7740);
  1055. var isForced = __webpack_require__(2796);
  1056. /*
  1057. options.target - name of the target object
  1058. options.global - target is the global object
  1059. options.stat - export as static methods of target
  1060. options.proto - export as prototype methods of target
  1061. options.real - real prototype method for the `pure` version
  1062. options.forced - export even if the native feature is available
  1063. options.bind - bind methods to the target, required for the `pure` version
  1064. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  1065. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  1066. options.sham - add a flag to not completely full polyfills
  1067. options.enumerable - export as enumerable property
  1068. options.dontCallGetSet - prevent calling a getter on target
  1069. options.name - the .name of the function if it does not match the key
  1070. */
  1071. module.exports = function (options, source) {
  1072. var TARGET = options.target;
  1073. var GLOBAL = options.global;
  1074. var STATIC = options.stat;
  1075. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1076. if (GLOBAL) {
  1077. target = globalThis;
  1078. } else if (STATIC) {
  1079. target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
  1080. } else {
  1081. target = globalThis[TARGET] && globalThis[TARGET].prototype;
  1082. }
  1083. if (target) for (key in source) {
  1084. sourceProperty = source[key];
  1085. if (options.dontCallGetSet) {
  1086. descriptor = getOwnPropertyDescriptor(target, key);
  1087. targetProperty = descriptor && descriptor.value;
  1088. } else targetProperty = target[key];
  1089. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1090. // contained in target
  1091. if (!FORCED && targetProperty !== undefined) {
  1092. if (typeof sourceProperty == typeof targetProperty) continue;
  1093. copyConstructorProperties(sourceProperty, targetProperty);
  1094. }
  1095. // add a flag to not completely full polyfills
  1096. if (options.sham || (targetProperty && targetProperty.sham)) {
  1097. createNonEnumerableProperty(sourceProperty, 'sham', true);
  1098. }
  1099. defineBuiltIn(target, key, sourceProperty, options);
  1100. }
  1101. };
  1102. /***/ }),
  1103. /***/ 9039:
  1104. /***/ (function(module) {
  1105. "use strict";
  1106. module.exports = function (exec) {
  1107. try {
  1108. return !!exec();
  1109. } catch (error) {
  1110. return true;
  1111. }
  1112. };
  1113. /***/ }),
  1114. /***/ 9228:
  1115. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1116. "use strict";
  1117. // TODO: Remove from `core-js@4` since it's moved to entry points
  1118. __webpack_require__(7495);
  1119. var call = __webpack_require__(9565);
  1120. var defineBuiltIn = __webpack_require__(6840);
  1121. var regexpExec = __webpack_require__(7323);
  1122. var fails = __webpack_require__(9039);
  1123. var wellKnownSymbol = __webpack_require__(8227);
  1124. var createNonEnumerableProperty = __webpack_require__(6699);
  1125. var SPECIES = wellKnownSymbol('species');
  1126. var RegExpPrototype = RegExp.prototype;
  1127. module.exports = function (KEY, exec, FORCED, SHAM) {
  1128. var SYMBOL = wellKnownSymbol(KEY);
  1129. var DELEGATES_TO_SYMBOL = !fails(function () {
  1130. // String methods call symbol-named RegExp methods
  1131. var O = {};
  1132. O[SYMBOL] = function () { return 7; };
  1133. return ''[KEY](O) !== 7;
  1134. });
  1135. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  1136. // Symbol-named RegExp methods call .exec
  1137. var execCalled = false;
  1138. var re = /a/;
  1139. if (KEY === 'split') {
  1140. // We can't use real regex here since it causes deoptimization
  1141. // and serious performance degradation in V8
  1142. // https://github.com/zloirock/core-js/issues/306
  1143. re = {};
  1144. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1145. // a new one. We need to return the patched regex when creating the new one.
  1146. re.constructor = {};
  1147. re.constructor[SPECIES] = function () { return re; };
  1148. re.flags = '';
  1149. re[SYMBOL] = /./[SYMBOL];
  1150. }
  1151. re.exec = function () {
  1152. execCalled = true;
  1153. return null;
  1154. };
  1155. re[SYMBOL]('');
  1156. return !execCalled;
  1157. });
  1158. if (
  1159. !DELEGATES_TO_SYMBOL ||
  1160. !DELEGATES_TO_EXEC ||
  1161. FORCED
  1162. ) {
  1163. var nativeRegExpMethod = /./[SYMBOL];
  1164. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1165. var $exec = regexp.exec;
  1166. if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
  1167. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1168. // The native String method already delegates to @@method (this
  1169. // polyfilled function), leasing to infinite recursion.
  1170. // We avoid it by directly calling the native @@method method.
  1171. return { done: true, value: call(nativeRegExpMethod, regexp, str, arg2) };
  1172. }
  1173. return { done: true, value: call(nativeMethod, str, regexp, arg2) };
  1174. }
  1175. return { done: false };
  1176. });
  1177. defineBuiltIn(String.prototype, KEY, methods[0]);
  1178. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  1179. }
  1180. if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
  1181. };
  1182. /***/ }),
  1183. /***/ 8745:
  1184. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1185. "use strict";
  1186. var NATIVE_BIND = __webpack_require__(616);
  1187. var FunctionPrototype = Function.prototype;
  1188. var apply = FunctionPrototype.apply;
  1189. var call = FunctionPrototype.call;
  1190. // eslint-disable-next-line es/no-reflect -- safe
  1191. module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  1192. return call.apply(apply, arguments);
  1193. });
  1194. /***/ }),
  1195. /***/ 6080:
  1196. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1197. "use strict";
  1198. var uncurryThis = __webpack_require__(7476);
  1199. var aCallable = __webpack_require__(9306);
  1200. var NATIVE_BIND = __webpack_require__(616);
  1201. var bind = uncurryThis(uncurryThis.bind);
  1202. // optional / simple context binding
  1203. module.exports = function (fn, that) {
  1204. aCallable(fn);
  1205. return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
  1206. return fn.apply(that, arguments);
  1207. };
  1208. };
  1209. /***/ }),
  1210. /***/ 616:
  1211. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1212. "use strict";
  1213. var fails = __webpack_require__(9039);
  1214. module.exports = !fails(function () {
  1215. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  1216. var test = (function () { /* empty */ }).bind();
  1217. // eslint-disable-next-line no-prototype-builtins -- safe
  1218. return typeof test != 'function' || test.hasOwnProperty('prototype');
  1219. });
  1220. /***/ }),
  1221. /***/ 9565:
  1222. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1223. "use strict";
  1224. var NATIVE_BIND = __webpack_require__(616);
  1225. var call = Function.prototype.call;
  1226. module.exports = NATIVE_BIND ? call.bind(call) : function () {
  1227. return call.apply(call, arguments);
  1228. };
  1229. /***/ }),
  1230. /***/ 350:
  1231. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1232. "use strict";
  1233. var DESCRIPTORS = __webpack_require__(3724);
  1234. var hasOwn = __webpack_require__(9297);
  1235. var FunctionPrototype = Function.prototype;
  1236. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1237. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  1238. var EXISTS = hasOwn(FunctionPrototype, 'name');
  1239. // additional protection from minified / mangled / dropped function names
  1240. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  1241. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  1242. module.exports = {
  1243. EXISTS: EXISTS,
  1244. PROPER: PROPER,
  1245. CONFIGURABLE: CONFIGURABLE
  1246. };
  1247. /***/ }),
  1248. /***/ 6706:
  1249. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1250. "use strict";
  1251. var uncurryThis = __webpack_require__(9504);
  1252. var aCallable = __webpack_require__(9306);
  1253. module.exports = function (object, key, method) {
  1254. try {
  1255. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1256. return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
  1257. } catch (error) { /* empty */ }
  1258. };
  1259. /***/ }),
  1260. /***/ 7476:
  1261. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1262. "use strict";
  1263. var classofRaw = __webpack_require__(2195);
  1264. var uncurryThis = __webpack_require__(9504);
  1265. module.exports = function (fn) {
  1266. // Nashorn bug:
  1267. // https://github.com/zloirock/core-js/issues/1128
  1268. // https://github.com/zloirock/core-js/issues/1130
  1269. if (classofRaw(fn) === 'Function') return uncurryThis(fn);
  1270. };
  1271. /***/ }),
  1272. /***/ 9504:
  1273. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1274. "use strict";
  1275. var NATIVE_BIND = __webpack_require__(616);
  1276. var FunctionPrototype = Function.prototype;
  1277. var call = FunctionPrototype.call;
  1278. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  1279. module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  1280. return function () {
  1281. return call.apply(fn, arguments);
  1282. };
  1283. };
  1284. /***/ }),
  1285. /***/ 7751:
  1286. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1287. "use strict";
  1288. var globalThis = __webpack_require__(4576);
  1289. var isCallable = __webpack_require__(4901);
  1290. var aFunction = function (argument) {
  1291. return isCallable(argument) ? argument : undefined;
  1292. };
  1293. module.exports = function (namespace, method) {
  1294. return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
  1295. };
  1296. /***/ }),
  1297. /***/ 851:
  1298. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1299. "use strict";
  1300. var classof = __webpack_require__(6955);
  1301. var getMethod = __webpack_require__(5966);
  1302. var isNullOrUndefined = __webpack_require__(4117);
  1303. var Iterators = __webpack_require__(6269);
  1304. var wellKnownSymbol = __webpack_require__(8227);
  1305. var ITERATOR = wellKnownSymbol('iterator');
  1306. module.exports = function (it) {
  1307. if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
  1308. || getMethod(it, '@@iterator')
  1309. || Iterators[classof(it)];
  1310. };
  1311. /***/ }),
  1312. /***/ 81:
  1313. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1314. "use strict";
  1315. var call = __webpack_require__(9565);
  1316. var aCallable = __webpack_require__(9306);
  1317. var anObject = __webpack_require__(8551);
  1318. var tryToString = __webpack_require__(6823);
  1319. var getIteratorMethod = __webpack_require__(851);
  1320. var $TypeError = TypeError;
  1321. module.exports = function (argument, usingIterator) {
  1322. var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
  1323. if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
  1324. throw new $TypeError(tryToString(argument) + ' is not iterable');
  1325. };
  1326. /***/ }),
  1327. /***/ 6933:
  1328. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1329. "use strict";
  1330. var uncurryThis = __webpack_require__(9504);
  1331. var isArray = __webpack_require__(4376);
  1332. var isCallable = __webpack_require__(4901);
  1333. var classof = __webpack_require__(2195);
  1334. var toString = __webpack_require__(655);
  1335. var push = uncurryThis([].push);
  1336. module.exports = function (replacer) {
  1337. if (isCallable(replacer)) return replacer;
  1338. if (!isArray(replacer)) return;
  1339. var rawLength = replacer.length;
  1340. var keys = [];
  1341. for (var i = 0; i < rawLength; i++) {
  1342. var element = replacer[i];
  1343. if (typeof element == 'string') push(keys, element);
  1344. else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));
  1345. }
  1346. var keysLength = keys.length;
  1347. var root = true;
  1348. return function (key, value) {
  1349. if (root) {
  1350. root = false;
  1351. return value;
  1352. }
  1353. if (isArray(this)) return value;
  1354. for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
  1355. };
  1356. };
  1357. /***/ }),
  1358. /***/ 5966:
  1359. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1360. "use strict";
  1361. var aCallable = __webpack_require__(9306);
  1362. var isNullOrUndefined = __webpack_require__(4117);
  1363. // `GetMethod` abstract operation
  1364. // https://tc39.es/ecma262/#sec-getmethod
  1365. module.exports = function (V, P) {
  1366. var func = V[P];
  1367. return isNullOrUndefined(func) ? undefined : aCallable(func);
  1368. };
  1369. /***/ }),
  1370. /***/ 2478:
  1371. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1372. "use strict";
  1373. var uncurryThis = __webpack_require__(9504);
  1374. var toObject = __webpack_require__(8981);
  1375. var floor = Math.floor;
  1376. var charAt = uncurryThis(''.charAt);
  1377. var replace = uncurryThis(''.replace);
  1378. var stringSlice = uncurryThis(''.slice);
  1379. // eslint-disable-next-line redos/no-vulnerable -- safe
  1380. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  1381. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  1382. // `GetSubstitution` abstract operation
  1383. // https://tc39.es/ecma262/#sec-getsubstitution
  1384. module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  1385. var tailPos = position + matched.length;
  1386. var m = captures.length;
  1387. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1388. if (namedCaptures !== undefined) {
  1389. namedCaptures = toObject(namedCaptures);
  1390. symbols = SUBSTITUTION_SYMBOLS;
  1391. }
  1392. return replace(replacement, symbols, function (match, ch) {
  1393. var capture;
  1394. switch (charAt(ch, 0)) {
  1395. case '$': return '$';
  1396. case '&': return matched;
  1397. case '`': return stringSlice(str, 0, position);
  1398. case "'": return stringSlice(str, tailPos);
  1399. case '<':
  1400. capture = namedCaptures[stringSlice(ch, 1, -1)];
  1401. break;
  1402. default: // \d\d?
  1403. var n = +ch;
  1404. if (n === 0) return match;
  1405. if (n > m) {
  1406. var f = floor(n / 10);
  1407. if (f === 0) return match;
  1408. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  1409. return match;
  1410. }
  1411. capture = captures[n - 1];
  1412. }
  1413. return capture === undefined ? '' : capture;
  1414. });
  1415. };
  1416. /***/ }),
  1417. /***/ 4576:
  1418. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1419. "use strict";
  1420. var check = function (it) {
  1421. return it && it.Math === Math && it;
  1422. };
  1423. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  1424. module.exports =
  1425. // eslint-disable-next-line es/no-global-this -- safe
  1426. check(typeof globalThis == 'object' && globalThis) ||
  1427. check(typeof window == 'object' && window) ||
  1428. // eslint-disable-next-line no-restricted-globals -- safe
  1429. check(typeof self == 'object' && self) ||
  1430. check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||
  1431. check(typeof this == 'object' && this) ||
  1432. // eslint-disable-next-line no-new-func -- fallback
  1433. (function () { return this; })() || Function('return this')();
  1434. /***/ }),
  1435. /***/ 9297:
  1436. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1437. "use strict";
  1438. var uncurryThis = __webpack_require__(9504);
  1439. var toObject = __webpack_require__(8981);
  1440. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  1441. // `HasOwnProperty` abstract operation
  1442. // https://tc39.es/ecma262/#sec-hasownproperty
  1443. // eslint-disable-next-line es/no-object-hasown -- safe
  1444. module.exports = Object.hasOwn || function hasOwn(it, key) {
  1445. return hasOwnProperty(toObject(it), key);
  1446. };
  1447. /***/ }),
  1448. /***/ 421:
  1449. /***/ (function(module) {
  1450. "use strict";
  1451. module.exports = {};
  1452. /***/ }),
  1453. /***/ 3138:
  1454. /***/ (function(module) {
  1455. "use strict";
  1456. module.exports = function (a, b) {
  1457. try {
  1458. // eslint-disable-next-line no-console -- safe
  1459. arguments.length === 1 ? console.error(a) : console.error(a, b);
  1460. } catch (error) { /* empty */ }
  1461. };
  1462. /***/ }),
  1463. /***/ 397:
  1464. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1465. "use strict";
  1466. var getBuiltIn = __webpack_require__(7751);
  1467. module.exports = getBuiltIn('document', 'documentElement');
  1468. /***/ }),
  1469. /***/ 5917:
  1470. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1471. "use strict";
  1472. var DESCRIPTORS = __webpack_require__(3724);
  1473. var fails = __webpack_require__(9039);
  1474. var createElement = __webpack_require__(4055);
  1475. // Thanks to IE8 for its funny defineProperty
  1476. module.exports = !DESCRIPTORS && !fails(function () {
  1477. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1478. return Object.defineProperty(createElement('div'), 'a', {
  1479. get: function () { return 7; }
  1480. }).a !== 7;
  1481. });
  1482. /***/ }),
  1483. /***/ 7055:
  1484. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1485. "use strict";
  1486. var uncurryThis = __webpack_require__(9504);
  1487. var fails = __webpack_require__(9039);
  1488. var classof = __webpack_require__(2195);
  1489. var $Object = Object;
  1490. var split = uncurryThis(''.split);
  1491. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  1492. module.exports = fails(function () {
  1493. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  1494. // eslint-disable-next-line no-prototype-builtins -- safe
  1495. return !$Object('z').propertyIsEnumerable(0);
  1496. }) ? function (it) {
  1497. return classof(it) === 'String' ? split(it, '') : $Object(it);
  1498. } : $Object;
  1499. /***/ }),
  1500. /***/ 3167:
  1501. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1502. "use strict";
  1503. var isCallable = __webpack_require__(4901);
  1504. var isObject = __webpack_require__(34);
  1505. var setPrototypeOf = __webpack_require__(2967);
  1506. // makes subclassing work correct for wrapped built-ins
  1507. module.exports = function ($this, dummy, Wrapper) {
  1508. var NewTarget, NewTargetPrototype;
  1509. if (
  1510. // it can work only with native `setPrototypeOf`
  1511. setPrototypeOf &&
  1512. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  1513. isCallable(NewTarget = dummy.constructor) &&
  1514. NewTarget !== Wrapper &&
  1515. isObject(NewTargetPrototype = NewTarget.prototype) &&
  1516. NewTargetPrototype !== Wrapper.prototype
  1517. ) setPrototypeOf($this, NewTargetPrototype);
  1518. return $this;
  1519. };
  1520. /***/ }),
  1521. /***/ 3706:
  1522. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1523. "use strict";
  1524. var uncurryThis = __webpack_require__(9504);
  1525. var isCallable = __webpack_require__(4901);
  1526. var store = __webpack_require__(7629);
  1527. var functionToString = uncurryThis(Function.toString);
  1528. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  1529. if (!isCallable(store.inspectSource)) {
  1530. store.inspectSource = function (it) {
  1531. return functionToString(it);
  1532. };
  1533. }
  1534. module.exports = store.inspectSource;
  1535. /***/ }),
  1536. /***/ 7584:
  1537. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1538. "use strict";
  1539. var isObject = __webpack_require__(34);
  1540. var createNonEnumerableProperty = __webpack_require__(6699);
  1541. // `InstallErrorCause` abstract operation
  1542. // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
  1543. module.exports = function (O, options) {
  1544. if (isObject(options) && 'cause' in options) {
  1545. createNonEnumerableProperty(O, 'cause', options.cause);
  1546. }
  1547. };
  1548. /***/ }),
  1549. /***/ 1181:
  1550. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1551. "use strict";
  1552. var NATIVE_WEAK_MAP = __webpack_require__(8622);
  1553. var globalThis = __webpack_require__(4576);
  1554. var isObject = __webpack_require__(34);
  1555. var createNonEnumerableProperty = __webpack_require__(6699);
  1556. var hasOwn = __webpack_require__(9297);
  1557. var shared = __webpack_require__(7629);
  1558. var sharedKey = __webpack_require__(6119);
  1559. var hiddenKeys = __webpack_require__(421);
  1560. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  1561. var TypeError = globalThis.TypeError;
  1562. var WeakMap = globalThis.WeakMap;
  1563. var set, get, has;
  1564. var enforce = function (it) {
  1565. return has(it) ? get(it) : set(it, {});
  1566. };
  1567. var getterFor = function (TYPE) {
  1568. return function (it) {
  1569. var state;
  1570. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  1571. throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
  1572. } return state;
  1573. };
  1574. };
  1575. if (NATIVE_WEAK_MAP || shared.state) {
  1576. var store = shared.state || (shared.state = new WeakMap());
  1577. /* eslint-disable no-self-assign -- prototype methods protection */
  1578. store.get = store.get;
  1579. store.has = store.has;
  1580. store.set = store.set;
  1581. /* eslint-enable no-self-assign -- prototype methods protection */
  1582. set = function (it, metadata) {
  1583. if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  1584. metadata.facade = it;
  1585. store.set(it, metadata);
  1586. return metadata;
  1587. };
  1588. get = function (it) {
  1589. return store.get(it) || {};
  1590. };
  1591. has = function (it) {
  1592. return store.has(it);
  1593. };
  1594. } else {
  1595. var STATE = sharedKey('state');
  1596. hiddenKeys[STATE] = true;
  1597. set = function (it, metadata) {
  1598. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  1599. metadata.facade = it;
  1600. createNonEnumerableProperty(it, STATE, metadata);
  1601. return metadata;
  1602. };
  1603. get = function (it) {
  1604. return hasOwn(it, STATE) ? it[STATE] : {};
  1605. };
  1606. has = function (it) {
  1607. return hasOwn(it, STATE);
  1608. };
  1609. }
  1610. module.exports = {
  1611. set: set,
  1612. get: get,
  1613. has: has,
  1614. enforce: enforce,
  1615. getterFor: getterFor
  1616. };
  1617. /***/ }),
  1618. /***/ 4209:
  1619. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1620. "use strict";
  1621. var wellKnownSymbol = __webpack_require__(8227);
  1622. var Iterators = __webpack_require__(6269);
  1623. var ITERATOR = wellKnownSymbol('iterator');
  1624. var ArrayPrototype = Array.prototype;
  1625. // check on default Array iterator
  1626. module.exports = function (it) {
  1627. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  1628. };
  1629. /***/ }),
  1630. /***/ 4376:
  1631. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1632. "use strict";
  1633. var classof = __webpack_require__(2195);
  1634. // `IsArray` abstract operation
  1635. // https://tc39.es/ecma262/#sec-isarray
  1636. // eslint-disable-next-line es/no-array-isarray -- safe
  1637. module.exports = Array.isArray || function isArray(argument) {
  1638. return classof(argument) === 'Array';
  1639. };
  1640. /***/ }),
  1641. /***/ 4901:
  1642. /***/ (function(module) {
  1643. "use strict";
  1644. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  1645. var documentAll = typeof document == 'object' && document.all;
  1646. // `IsCallable` abstract operation
  1647. // https://tc39.es/ecma262/#sec-iscallable
  1648. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  1649. module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  1650. return typeof argument == 'function' || argument === documentAll;
  1651. } : function (argument) {
  1652. return typeof argument == 'function';
  1653. };
  1654. /***/ }),
  1655. /***/ 3517:
  1656. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1657. "use strict";
  1658. var uncurryThis = __webpack_require__(9504);
  1659. var fails = __webpack_require__(9039);
  1660. var isCallable = __webpack_require__(4901);
  1661. var classof = __webpack_require__(6955);
  1662. var getBuiltIn = __webpack_require__(7751);
  1663. var inspectSource = __webpack_require__(3706);
  1664. var noop = function () { /* empty */ };
  1665. var construct = getBuiltIn('Reflect', 'construct');
  1666. var constructorRegExp = /^\s*(?:class|function)\b/;
  1667. var exec = uncurryThis(constructorRegExp.exec);
  1668. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  1669. var isConstructorModern = function isConstructor(argument) {
  1670. if (!isCallable(argument)) return false;
  1671. try {
  1672. construct(noop, [], argument);
  1673. return true;
  1674. } catch (error) {
  1675. return false;
  1676. }
  1677. };
  1678. var isConstructorLegacy = function isConstructor(argument) {
  1679. if (!isCallable(argument)) return false;
  1680. switch (classof(argument)) {
  1681. case 'AsyncFunction':
  1682. case 'GeneratorFunction':
  1683. case 'AsyncGeneratorFunction': return false;
  1684. }
  1685. try {
  1686. // we can't check .prototype since constructors produced by .bind haven't it
  1687. // `Function#toString` throws on some built-it function in some legacy engines
  1688. // (for example, `DOMQuad` and similar in FF41-)
  1689. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1690. } catch (error) {
  1691. return true;
  1692. }
  1693. };
  1694. isConstructorLegacy.sham = true;
  1695. // `IsConstructor` abstract operation
  1696. // https://tc39.es/ecma262/#sec-isconstructor
  1697. module.exports = !construct || fails(function () {
  1698. var called;
  1699. return isConstructorModern(isConstructorModern.call)
  1700. || !isConstructorModern(Object)
  1701. || !isConstructorModern(function () { called = true; })
  1702. || called;
  1703. }) ? isConstructorLegacy : isConstructorModern;
  1704. /***/ }),
  1705. /***/ 2796:
  1706. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1707. "use strict";
  1708. var fails = __webpack_require__(9039);
  1709. var isCallable = __webpack_require__(4901);
  1710. var replacement = /#|\.prototype\./;
  1711. var isForced = function (feature, detection) {
  1712. var value = data[normalize(feature)];
  1713. return value === POLYFILL ? true
  1714. : value === NATIVE ? false
  1715. : isCallable(detection) ? fails(detection)
  1716. : !!detection;
  1717. };
  1718. var normalize = isForced.normalize = function (string) {
  1719. return String(string).replace(replacement, '.').toLowerCase();
  1720. };
  1721. var data = isForced.data = {};
  1722. var NATIVE = isForced.NATIVE = 'N';
  1723. var POLYFILL = isForced.POLYFILL = 'P';
  1724. module.exports = isForced;
  1725. /***/ }),
  1726. /***/ 4117:
  1727. /***/ (function(module) {
  1728. "use strict";
  1729. // we can't use just `it == null` since of `document.all` special case
  1730. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  1731. module.exports = function (it) {
  1732. return it === null || it === undefined;
  1733. };
  1734. /***/ }),
  1735. /***/ 34:
  1736. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1737. "use strict";
  1738. var isCallable = __webpack_require__(4901);
  1739. module.exports = function (it) {
  1740. return typeof it == 'object' ? it !== null : isCallable(it);
  1741. };
  1742. /***/ }),
  1743. /***/ 3925:
  1744. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1745. "use strict";
  1746. var isObject = __webpack_require__(34);
  1747. module.exports = function (argument) {
  1748. return isObject(argument) || argument === null;
  1749. };
  1750. /***/ }),
  1751. /***/ 6395:
  1752. /***/ (function(module) {
  1753. "use strict";
  1754. module.exports = false;
  1755. /***/ }),
  1756. /***/ 788:
  1757. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1758. "use strict";
  1759. var isObject = __webpack_require__(34);
  1760. var classof = __webpack_require__(2195);
  1761. var wellKnownSymbol = __webpack_require__(8227);
  1762. var MATCH = wellKnownSymbol('match');
  1763. // `IsRegExp` abstract operation
  1764. // https://tc39.es/ecma262/#sec-isregexp
  1765. module.exports = function (it) {
  1766. var isRegExp;
  1767. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
  1768. };
  1769. /***/ }),
  1770. /***/ 757:
  1771. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1772. "use strict";
  1773. var getBuiltIn = __webpack_require__(7751);
  1774. var isCallable = __webpack_require__(4901);
  1775. var isPrototypeOf = __webpack_require__(1625);
  1776. var USE_SYMBOL_AS_UID = __webpack_require__(7040);
  1777. var $Object = Object;
  1778. module.exports = USE_SYMBOL_AS_UID ? function (it) {
  1779. return typeof it == 'symbol';
  1780. } : function (it) {
  1781. var $Symbol = getBuiltIn('Symbol');
  1782. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  1783. };
  1784. /***/ }),
  1785. /***/ 2652:
  1786. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1787. "use strict";
  1788. var bind = __webpack_require__(6080);
  1789. var call = __webpack_require__(9565);
  1790. var anObject = __webpack_require__(8551);
  1791. var tryToString = __webpack_require__(6823);
  1792. var isArrayIteratorMethod = __webpack_require__(4209);
  1793. var lengthOfArrayLike = __webpack_require__(6198);
  1794. var isPrototypeOf = __webpack_require__(1625);
  1795. var getIterator = __webpack_require__(81);
  1796. var getIteratorMethod = __webpack_require__(851);
  1797. var iteratorClose = __webpack_require__(9539);
  1798. var $TypeError = TypeError;
  1799. var Result = function (stopped, result) {
  1800. this.stopped = stopped;
  1801. this.result = result;
  1802. };
  1803. var ResultPrototype = Result.prototype;
  1804. module.exports = function (iterable, unboundFunction, options) {
  1805. var that = options && options.that;
  1806. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  1807. var IS_RECORD = !!(options && options.IS_RECORD);
  1808. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  1809. var INTERRUPTED = !!(options && options.INTERRUPTED);
  1810. var fn = bind(unboundFunction, that);
  1811. var iterator, iterFn, index, length, result, next, step;
  1812. var stop = function (condition) {
  1813. if (iterator) iteratorClose(iterator, 'normal', condition);
  1814. return new Result(true, condition);
  1815. };
  1816. var callFn = function (value) {
  1817. if (AS_ENTRIES) {
  1818. anObject(value);
  1819. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  1820. } return INTERRUPTED ? fn(value, stop) : fn(value);
  1821. };
  1822. if (IS_RECORD) {
  1823. iterator = iterable.iterator;
  1824. } else if (IS_ITERATOR) {
  1825. iterator = iterable;
  1826. } else {
  1827. iterFn = getIteratorMethod(iterable);
  1828. if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
  1829. // optimisation for array iterators
  1830. if (isArrayIteratorMethod(iterFn)) {
  1831. for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
  1832. result = callFn(iterable[index]);
  1833. if (result && isPrototypeOf(ResultPrototype, result)) return result;
  1834. } return new Result(false);
  1835. }
  1836. iterator = getIterator(iterable, iterFn);
  1837. }
  1838. next = IS_RECORD ? iterable.next : iterator.next;
  1839. while (!(step = call(next, iterator)).done) {
  1840. try {
  1841. result = callFn(step.value);
  1842. } catch (error) {
  1843. iteratorClose(iterator, 'throw', error);
  1844. }
  1845. if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  1846. } return new Result(false);
  1847. };
  1848. /***/ }),
  1849. /***/ 9539:
  1850. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1851. "use strict";
  1852. var call = __webpack_require__(9565);
  1853. var anObject = __webpack_require__(8551);
  1854. var getMethod = __webpack_require__(5966);
  1855. module.exports = function (iterator, kind, value) {
  1856. var innerResult, innerError;
  1857. anObject(iterator);
  1858. try {
  1859. innerResult = getMethod(iterator, 'return');
  1860. if (!innerResult) {
  1861. if (kind === 'throw') throw value;
  1862. return value;
  1863. }
  1864. innerResult = call(innerResult, iterator);
  1865. } catch (error) {
  1866. innerError = true;
  1867. innerResult = error;
  1868. }
  1869. if (kind === 'throw') throw value;
  1870. if (innerError) throw innerResult;
  1871. anObject(innerResult);
  1872. return value;
  1873. };
  1874. /***/ }),
  1875. /***/ 3994:
  1876. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1877. "use strict";
  1878. var IteratorPrototype = (__webpack_require__(7657).IteratorPrototype);
  1879. var create = __webpack_require__(2360);
  1880. var createPropertyDescriptor = __webpack_require__(6980);
  1881. var setToStringTag = __webpack_require__(687);
  1882. var Iterators = __webpack_require__(6269);
  1883. var returnThis = function () { return this; };
  1884. module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
  1885. var TO_STRING_TAG = NAME + ' Iterator';
  1886. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
  1887. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  1888. Iterators[TO_STRING_TAG] = returnThis;
  1889. return IteratorConstructor;
  1890. };
  1891. /***/ }),
  1892. /***/ 1088:
  1893. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1894. "use strict";
  1895. var $ = __webpack_require__(6518);
  1896. var call = __webpack_require__(9565);
  1897. var IS_PURE = __webpack_require__(6395);
  1898. var FunctionName = __webpack_require__(350);
  1899. var isCallable = __webpack_require__(4901);
  1900. var createIteratorConstructor = __webpack_require__(3994);
  1901. var getPrototypeOf = __webpack_require__(2787);
  1902. var setPrototypeOf = __webpack_require__(2967);
  1903. var setToStringTag = __webpack_require__(687);
  1904. var createNonEnumerableProperty = __webpack_require__(6699);
  1905. var defineBuiltIn = __webpack_require__(6840);
  1906. var wellKnownSymbol = __webpack_require__(8227);
  1907. var Iterators = __webpack_require__(6269);
  1908. var IteratorsCore = __webpack_require__(7657);
  1909. var PROPER_FUNCTION_NAME = FunctionName.PROPER;
  1910. var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
  1911. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  1912. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  1913. var ITERATOR = wellKnownSymbol('iterator');
  1914. var KEYS = 'keys';
  1915. var VALUES = 'values';
  1916. var ENTRIES = 'entries';
  1917. var returnThis = function () { return this; };
  1918. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  1919. createIteratorConstructor(IteratorConstructor, NAME, next);
  1920. var getIterationMethod = function (KIND) {
  1921. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  1922. if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
  1923. switch (KIND) {
  1924. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  1925. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  1926. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  1927. }
  1928. return function () { return new IteratorConstructor(this); };
  1929. };
  1930. var TO_STRING_TAG = NAME + ' Iterator';
  1931. var INCORRECT_VALUES_NAME = false;
  1932. var IterablePrototype = Iterable.prototype;
  1933. var nativeIterator = IterablePrototype[ITERATOR]
  1934. || IterablePrototype['@@iterator']
  1935. || DEFAULT && IterablePrototype[DEFAULT];
  1936. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  1937. var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  1938. var CurrentIteratorPrototype, methods, KEY;
  1939. // fix native
  1940. if (anyNativeIterator) {
  1941. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  1942. if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  1943. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  1944. if (setPrototypeOf) {
  1945. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  1946. } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
  1947. defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
  1948. }
  1949. }
  1950. // Set @@toStringTag to native iterators
  1951. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  1952. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  1953. }
  1954. }
  1955. // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
  1956. if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  1957. if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
  1958. createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
  1959. } else {
  1960. INCORRECT_VALUES_NAME = true;
  1961. defaultIterator = function values() { return call(nativeIterator, this); };
  1962. }
  1963. }
  1964. // export additional methods
  1965. if (DEFAULT) {
  1966. methods = {
  1967. values: getIterationMethod(VALUES),
  1968. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  1969. entries: getIterationMethod(ENTRIES)
  1970. };
  1971. if (FORCED) for (KEY in methods) {
  1972. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  1973. defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
  1974. }
  1975. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  1976. }
  1977. // define iterator
  1978. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  1979. defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
  1980. }
  1981. Iterators[NAME] = defaultIterator;
  1982. return methods;
  1983. };
  1984. /***/ }),
  1985. /***/ 7657:
  1986. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1987. "use strict";
  1988. var fails = __webpack_require__(9039);
  1989. var isCallable = __webpack_require__(4901);
  1990. var isObject = __webpack_require__(34);
  1991. var create = __webpack_require__(2360);
  1992. var getPrototypeOf = __webpack_require__(2787);
  1993. var defineBuiltIn = __webpack_require__(6840);
  1994. var wellKnownSymbol = __webpack_require__(8227);
  1995. var IS_PURE = __webpack_require__(6395);
  1996. var ITERATOR = wellKnownSymbol('iterator');
  1997. var BUGGY_SAFARI_ITERATORS = false;
  1998. // `%IteratorPrototype%` object
  1999. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  2000. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  2001. /* eslint-disable es/no-array-prototype-keys -- safe */
  2002. if ([].keys) {
  2003. arrayIterator = [].keys();
  2004. // Safari 8 has buggy iterators w/o `next`
  2005. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  2006. else {
  2007. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  2008. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  2009. }
  2010. }
  2011. var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {
  2012. var test = {};
  2013. // FF44- legacy iterators case
  2014. return IteratorPrototype[ITERATOR].call(test) !== test;
  2015. });
  2016. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  2017. else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);
  2018. // `%IteratorPrototype%[@@iterator]()` method
  2019. // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
  2020. if (!isCallable(IteratorPrototype[ITERATOR])) {
  2021. defineBuiltIn(IteratorPrototype, ITERATOR, function () {
  2022. return this;
  2023. });
  2024. }
  2025. module.exports = {
  2026. IteratorPrototype: IteratorPrototype,
  2027. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  2028. };
  2029. /***/ }),
  2030. /***/ 6269:
  2031. /***/ (function(module) {
  2032. "use strict";
  2033. module.exports = {};
  2034. /***/ }),
  2035. /***/ 6198:
  2036. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2037. "use strict";
  2038. var toLength = __webpack_require__(8014);
  2039. // `LengthOfArrayLike` abstract operation
  2040. // https://tc39.es/ecma262/#sec-lengthofarraylike
  2041. module.exports = function (obj) {
  2042. return toLength(obj.length);
  2043. };
  2044. /***/ }),
  2045. /***/ 283:
  2046. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2047. "use strict";
  2048. var uncurryThis = __webpack_require__(9504);
  2049. var fails = __webpack_require__(9039);
  2050. var isCallable = __webpack_require__(4901);
  2051. var hasOwn = __webpack_require__(9297);
  2052. var DESCRIPTORS = __webpack_require__(3724);
  2053. var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(350).CONFIGURABLE);
  2054. var inspectSource = __webpack_require__(3706);
  2055. var InternalStateModule = __webpack_require__(1181);
  2056. var enforceInternalState = InternalStateModule.enforce;
  2057. var getInternalState = InternalStateModule.get;
  2058. var $String = String;
  2059. // eslint-disable-next-line es/no-object-defineproperty -- safe
  2060. var defineProperty = Object.defineProperty;
  2061. var stringSlice = uncurryThis(''.slice);
  2062. var replace = uncurryThis(''.replace);
  2063. var join = uncurryThis([].join);
  2064. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  2065. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  2066. });
  2067. var TEMPLATE = String(String).split('String');
  2068. var makeBuiltIn = module.exports = function (value, name, options) {
  2069. if (stringSlice($String(name), 0, 7) === 'Symbol(') {
  2070. name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  2071. }
  2072. if (options && options.getter) name = 'get ' + name;
  2073. if (options && options.setter) name = 'set ' + name;
  2074. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  2075. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  2076. else value.name = name;
  2077. }
  2078. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  2079. defineProperty(value, 'length', { value: options.arity });
  2080. }
  2081. try {
  2082. if (options && hasOwn(options, 'constructor') && options.constructor) {
  2083. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  2084. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  2085. } else if (value.prototype) value.prototype = undefined;
  2086. } catch (error) { /* empty */ }
  2087. var state = enforceInternalState(value);
  2088. if (!hasOwn(state, 'source')) {
  2089. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  2090. } return value;
  2091. };
  2092. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  2093. // eslint-disable-next-line no-extend-native -- required
  2094. Function.prototype.toString = makeBuiltIn(function toString() {
  2095. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  2096. }, 'toString');
  2097. /***/ }),
  2098. /***/ 9340:
  2099. /***/ (function(module) {
  2100. "use strict";
  2101. var log = Math.log;
  2102. var LOG10E = Math.LOG10E;
  2103. // eslint-disable-next-line es/no-math-log10 -- safe
  2104. module.exports = Math.log10 || function log10(x) {
  2105. return log(x) * LOG10E;
  2106. };
  2107. /***/ }),
  2108. /***/ 741:
  2109. /***/ (function(module) {
  2110. "use strict";
  2111. var ceil = Math.ceil;
  2112. var floor = Math.floor;
  2113. // `Math.trunc` method
  2114. // https://tc39.es/ecma262/#sec-math.trunc
  2115. // eslint-disable-next-line es/no-math-trunc -- safe
  2116. module.exports = Math.trunc || function trunc(x) {
  2117. var n = +x;
  2118. return (n > 0 ? floor : ceil)(n);
  2119. };
  2120. /***/ }),
  2121. /***/ 1955:
  2122. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2123. "use strict";
  2124. var globalThis = __webpack_require__(4576);
  2125. var safeGetBuiltIn = __webpack_require__(3389);
  2126. var bind = __webpack_require__(6080);
  2127. var macrotask = (__webpack_require__(9225).set);
  2128. var Queue = __webpack_require__(8265);
  2129. var IS_IOS = __webpack_require__(9544);
  2130. var IS_IOS_PEBBLE = __webpack_require__(4265);
  2131. var IS_WEBOS_WEBKIT = __webpack_require__(7860);
  2132. var IS_NODE = __webpack_require__(8574);
  2133. var MutationObserver = globalThis.MutationObserver || globalThis.WebKitMutationObserver;
  2134. var document = globalThis.document;
  2135. var process = globalThis.process;
  2136. var Promise = globalThis.Promise;
  2137. var microtask = safeGetBuiltIn('queueMicrotask');
  2138. var notify, toggle, node, promise, then;
  2139. // modern engines have queueMicrotask method
  2140. if (!microtask) {
  2141. var queue = new Queue();
  2142. var flush = function () {
  2143. var parent, fn;
  2144. if (IS_NODE && (parent = process.domain)) parent.exit();
  2145. while (fn = queue.get()) try {
  2146. fn();
  2147. } catch (error) {
  2148. if (queue.head) notify();
  2149. throw error;
  2150. }
  2151. if (parent) parent.enter();
  2152. };
  2153. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  2154. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  2155. if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
  2156. toggle = true;
  2157. node = document.createTextNode('');
  2158. new MutationObserver(flush).observe(node, { characterData: true });
  2159. notify = function () {
  2160. node.data = toggle = !toggle;
  2161. };
  2162. // environments with maybe non-completely correct, but existent Promise
  2163. } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
  2164. // Promise.resolve without an argument throws an error in LG WebOS 2
  2165. promise = Promise.resolve(undefined);
  2166. // workaround of WebKit ~ iOS Safari 10.1 bug
  2167. promise.constructor = Promise;
  2168. then = bind(promise.then, promise);
  2169. notify = function () {
  2170. then(flush);
  2171. };
  2172. // Node.js without promises
  2173. } else if (IS_NODE) {
  2174. notify = function () {
  2175. process.nextTick(flush);
  2176. };
  2177. // for other environments - macrotask based on:
  2178. // - setImmediate
  2179. // - MessageChannel
  2180. // - window.postMessage
  2181. // - onreadystatechange
  2182. // - setTimeout
  2183. } else {
  2184. // `webpack` dev server bug on IE global methods - use bind(fn, global)
  2185. macrotask = bind(macrotask, globalThis);
  2186. notify = function () {
  2187. macrotask(flush);
  2188. };
  2189. }
  2190. microtask = function (fn) {
  2191. if (!queue.head) notify();
  2192. queue.add(fn);
  2193. };
  2194. }
  2195. module.exports = microtask;
  2196. /***/ }),
  2197. /***/ 6043:
  2198. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2199. "use strict";
  2200. var aCallable = __webpack_require__(9306);
  2201. var $TypeError = TypeError;
  2202. var PromiseCapability = function (C) {
  2203. var resolve, reject;
  2204. this.promise = new C(function ($$resolve, $$reject) {
  2205. if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor');
  2206. resolve = $$resolve;
  2207. reject = $$reject;
  2208. });
  2209. this.resolve = aCallable(resolve);
  2210. this.reject = aCallable(reject);
  2211. };
  2212. // `NewPromiseCapability` abstract operation
  2213. // https://tc39.es/ecma262/#sec-newpromisecapability
  2214. module.exports.f = function (C) {
  2215. return new PromiseCapability(C);
  2216. };
  2217. /***/ }),
  2218. /***/ 2603:
  2219. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2220. "use strict";
  2221. var toString = __webpack_require__(655);
  2222. module.exports = function (argument, $default) {
  2223. return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
  2224. };
  2225. /***/ }),
  2226. /***/ 5749:
  2227. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2228. "use strict";
  2229. var isRegExp = __webpack_require__(788);
  2230. var $TypeError = TypeError;
  2231. module.exports = function (it) {
  2232. if (isRegExp(it)) {
  2233. throw new $TypeError("The method doesn't accept regular expressions");
  2234. } return it;
  2235. };
  2236. /***/ }),
  2237. /***/ 4213:
  2238. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2239. "use strict";
  2240. var DESCRIPTORS = __webpack_require__(3724);
  2241. var uncurryThis = __webpack_require__(9504);
  2242. var call = __webpack_require__(9565);
  2243. var fails = __webpack_require__(9039);
  2244. var objectKeys = __webpack_require__(1072);
  2245. var getOwnPropertySymbolsModule = __webpack_require__(3717);
  2246. var propertyIsEnumerableModule = __webpack_require__(8773);
  2247. var toObject = __webpack_require__(8981);
  2248. var IndexedObject = __webpack_require__(7055);
  2249. // eslint-disable-next-line es/no-object-assign -- safe
  2250. var $assign = Object.assign;
  2251. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  2252. var defineProperty = Object.defineProperty;
  2253. var concat = uncurryThis([].concat);
  2254. // `Object.assign` method
  2255. // https://tc39.es/ecma262/#sec-object.assign
  2256. module.exports = !$assign || fails(function () {
  2257. // should have correct order of operations (Edge bug)
  2258. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  2259. enumerable: true,
  2260. get: function () {
  2261. defineProperty(this, 'b', {
  2262. value: 3,
  2263. enumerable: false
  2264. });
  2265. }
  2266. }), { b: 2 })).b !== 1) return true;
  2267. // should work with symbols and should have deterministic property order (V8 bug)
  2268. var A = {};
  2269. var B = {};
  2270. // eslint-disable-next-line es/no-symbol -- safe
  2271. var symbol = Symbol('assign detection');
  2272. var alphabet = 'abcdefghijklmnopqrst';
  2273. A[symbol] = 7;
  2274. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  2275. return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
  2276. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  2277. var T = toObject(target);
  2278. var argumentsLength = arguments.length;
  2279. var index = 1;
  2280. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  2281. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  2282. while (argumentsLength > index) {
  2283. var S = IndexedObject(arguments[index++]);
  2284. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  2285. var length = keys.length;
  2286. var j = 0;
  2287. var key;
  2288. while (length > j) {
  2289. key = keys[j++];
  2290. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  2291. }
  2292. } return T;
  2293. } : $assign;
  2294. /***/ }),
  2295. /***/ 2360:
  2296. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2297. "use strict";
  2298. /* global ActiveXObject -- old IE, WSH */
  2299. var anObject = __webpack_require__(8551);
  2300. var definePropertiesModule = __webpack_require__(6801);
  2301. var enumBugKeys = __webpack_require__(8727);
  2302. var hiddenKeys = __webpack_require__(421);
  2303. var html = __webpack_require__(397);
  2304. var documentCreateElement = __webpack_require__(4055);
  2305. var sharedKey = __webpack_require__(6119);
  2306. var GT = '>';
  2307. var LT = '<';
  2308. var PROTOTYPE = 'prototype';
  2309. var SCRIPT = 'script';
  2310. var IE_PROTO = sharedKey('IE_PROTO');
  2311. var EmptyConstructor = function () { /* empty */ };
  2312. var scriptTag = function (content) {
  2313. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  2314. };
  2315. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  2316. var NullProtoObjectViaActiveX = function (activeXDocument) {
  2317. activeXDocument.write(scriptTag(''));
  2318. activeXDocument.close();
  2319. var temp = activeXDocument.parentWindow.Object;
  2320. // eslint-disable-next-line no-useless-assignment -- avoid memory leak
  2321. activeXDocument = null;
  2322. return temp;
  2323. };
  2324. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  2325. var NullProtoObjectViaIFrame = function () {
  2326. // Thrash, waste and sodomy: IE GC bug
  2327. var iframe = documentCreateElement('iframe');
  2328. var JS = 'java' + SCRIPT + ':';
  2329. var iframeDocument;
  2330. iframe.style.display = 'none';
  2331. html.appendChild(iframe);
  2332. // https://github.com/zloirock/core-js/issues/475
  2333. iframe.src = String(JS);
  2334. iframeDocument = iframe.contentWindow.document;
  2335. iframeDocument.open();
  2336. iframeDocument.write(scriptTag('document.F=Object'));
  2337. iframeDocument.close();
  2338. return iframeDocument.F;
  2339. };
  2340. // Check for document.domain and active x support
  2341. // No need to use active x approach when document.domain is not set
  2342. // see https://github.com/es-shims/es5-shim/issues/150
  2343. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  2344. // avoid IE GC bug
  2345. var activeXDocument;
  2346. var NullProtoObject = function () {
  2347. try {
  2348. activeXDocument = new ActiveXObject('htmlfile');
  2349. } catch (error) { /* ignore */ }
  2350. NullProtoObject = typeof document != 'undefined'
  2351. ? document.domain && activeXDocument
  2352. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  2353. : NullProtoObjectViaIFrame()
  2354. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  2355. var length = enumBugKeys.length;
  2356. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  2357. return NullProtoObject();
  2358. };
  2359. hiddenKeys[IE_PROTO] = true;
  2360. // `Object.create` method
  2361. // https://tc39.es/ecma262/#sec-object.create
  2362. // eslint-disable-next-line es/no-object-create -- safe
  2363. module.exports = Object.create || function create(O, Properties) {
  2364. var result;
  2365. if (O !== null) {
  2366. EmptyConstructor[PROTOTYPE] = anObject(O);
  2367. result = new EmptyConstructor();
  2368. EmptyConstructor[PROTOTYPE] = null;
  2369. // add "__proto__" for Object.getPrototypeOf polyfill
  2370. result[IE_PROTO] = O;
  2371. } else result = NullProtoObject();
  2372. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  2373. };
  2374. /***/ }),
  2375. /***/ 6801:
  2376. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2377. "use strict";
  2378. var DESCRIPTORS = __webpack_require__(3724);
  2379. var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(8686);
  2380. var definePropertyModule = __webpack_require__(4913);
  2381. var anObject = __webpack_require__(8551);
  2382. var toIndexedObject = __webpack_require__(5397);
  2383. var objectKeys = __webpack_require__(1072);
  2384. // `Object.defineProperties` method
  2385. // https://tc39.es/ecma262/#sec-object.defineproperties
  2386. // eslint-disable-next-line es/no-object-defineproperties -- safe
  2387. exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  2388. anObject(O);
  2389. var props = toIndexedObject(Properties);
  2390. var keys = objectKeys(Properties);
  2391. var length = keys.length;
  2392. var index = 0;
  2393. var key;
  2394. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  2395. return O;
  2396. };
  2397. /***/ }),
  2398. /***/ 4913:
  2399. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2400. "use strict";
  2401. var DESCRIPTORS = __webpack_require__(3724);
  2402. var IE8_DOM_DEFINE = __webpack_require__(5917);
  2403. var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(8686);
  2404. var anObject = __webpack_require__(8551);
  2405. var toPropertyKey = __webpack_require__(6969);
  2406. var $TypeError = TypeError;
  2407. // eslint-disable-next-line es/no-object-defineproperty -- safe
  2408. var $defineProperty = Object.defineProperty;
  2409. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2410. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2411. var ENUMERABLE = 'enumerable';
  2412. var CONFIGURABLE = 'configurable';
  2413. var WRITABLE = 'writable';
  2414. // `Object.defineProperty` method
  2415. // https://tc39.es/ecma262/#sec-object.defineproperty
  2416. exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  2417. anObject(O);
  2418. P = toPropertyKey(P);
  2419. anObject(Attributes);
  2420. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  2421. var current = $getOwnPropertyDescriptor(O, P);
  2422. if (current && current[WRITABLE]) {
  2423. O[P] = Attributes.value;
  2424. Attributes = {
  2425. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  2426. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  2427. writable: false
  2428. };
  2429. }
  2430. } return $defineProperty(O, P, Attributes);
  2431. } : $defineProperty : function defineProperty(O, P, Attributes) {
  2432. anObject(O);
  2433. P = toPropertyKey(P);
  2434. anObject(Attributes);
  2435. if (IE8_DOM_DEFINE) try {
  2436. return $defineProperty(O, P, Attributes);
  2437. } catch (error) { /* empty */ }
  2438. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  2439. if ('value' in Attributes) O[P] = Attributes.value;
  2440. return O;
  2441. };
  2442. /***/ }),
  2443. /***/ 7347:
  2444. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2445. "use strict";
  2446. var DESCRIPTORS = __webpack_require__(3724);
  2447. var call = __webpack_require__(9565);
  2448. var propertyIsEnumerableModule = __webpack_require__(8773);
  2449. var createPropertyDescriptor = __webpack_require__(6980);
  2450. var toIndexedObject = __webpack_require__(5397);
  2451. var toPropertyKey = __webpack_require__(6969);
  2452. var hasOwn = __webpack_require__(9297);
  2453. var IE8_DOM_DEFINE = __webpack_require__(5917);
  2454. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2455. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2456. // `Object.getOwnPropertyDescriptor` method
  2457. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  2458. exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  2459. O = toIndexedObject(O);
  2460. P = toPropertyKey(P);
  2461. if (IE8_DOM_DEFINE) try {
  2462. return $getOwnPropertyDescriptor(O, P);
  2463. } catch (error) { /* empty */ }
  2464. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  2465. };
  2466. /***/ }),
  2467. /***/ 298:
  2468. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2469. "use strict";
  2470. /* eslint-disable es/no-object-getownpropertynames -- safe */
  2471. var classof = __webpack_require__(2195);
  2472. var toIndexedObject = __webpack_require__(5397);
  2473. var $getOwnPropertyNames = (__webpack_require__(8480).f);
  2474. var arraySlice = __webpack_require__(7680);
  2475. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  2476. ? Object.getOwnPropertyNames(window) : [];
  2477. var getWindowNames = function (it) {
  2478. try {
  2479. return $getOwnPropertyNames(it);
  2480. } catch (error) {
  2481. return arraySlice(windowNames);
  2482. }
  2483. };
  2484. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  2485. module.exports.f = function getOwnPropertyNames(it) {
  2486. return windowNames && classof(it) === 'Window'
  2487. ? getWindowNames(it)
  2488. : $getOwnPropertyNames(toIndexedObject(it));
  2489. };
  2490. /***/ }),
  2491. /***/ 8480:
  2492. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2493. "use strict";
  2494. var internalObjectKeys = __webpack_require__(1828);
  2495. var enumBugKeys = __webpack_require__(8727);
  2496. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  2497. // `Object.getOwnPropertyNames` method
  2498. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  2499. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  2500. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  2501. return internalObjectKeys(O, hiddenKeys);
  2502. };
  2503. /***/ }),
  2504. /***/ 3717:
  2505. /***/ (function(__unused_webpack_module, exports) {
  2506. "use strict";
  2507. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  2508. exports.f = Object.getOwnPropertySymbols;
  2509. /***/ }),
  2510. /***/ 2787:
  2511. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2512. "use strict";
  2513. var hasOwn = __webpack_require__(9297);
  2514. var isCallable = __webpack_require__(4901);
  2515. var toObject = __webpack_require__(8981);
  2516. var sharedKey = __webpack_require__(6119);
  2517. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(2211);
  2518. var IE_PROTO = sharedKey('IE_PROTO');
  2519. var $Object = Object;
  2520. var ObjectPrototype = $Object.prototype;
  2521. // `Object.getPrototypeOf` method
  2522. // https://tc39.es/ecma262/#sec-object.getprototypeof
  2523. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  2524. module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  2525. var object = toObject(O);
  2526. if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
  2527. var constructor = object.constructor;
  2528. if (isCallable(constructor) && object instanceof constructor) {
  2529. return constructor.prototype;
  2530. } return object instanceof $Object ? ObjectPrototype : null;
  2531. };
  2532. /***/ }),
  2533. /***/ 1625:
  2534. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2535. "use strict";
  2536. var uncurryThis = __webpack_require__(9504);
  2537. module.exports = uncurryThis({}.isPrototypeOf);
  2538. /***/ }),
  2539. /***/ 1828:
  2540. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2541. "use strict";
  2542. var uncurryThis = __webpack_require__(9504);
  2543. var hasOwn = __webpack_require__(9297);
  2544. var toIndexedObject = __webpack_require__(5397);
  2545. var indexOf = (__webpack_require__(9617).indexOf);
  2546. var hiddenKeys = __webpack_require__(421);
  2547. var push = uncurryThis([].push);
  2548. module.exports = function (object, names) {
  2549. var O = toIndexedObject(object);
  2550. var i = 0;
  2551. var result = [];
  2552. var key;
  2553. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  2554. // Don't enum bug & hidden keys
  2555. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  2556. ~indexOf(result, key) || push(result, key);
  2557. }
  2558. return result;
  2559. };
  2560. /***/ }),
  2561. /***/ 1072:
  2562. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2563. "use strict";
  2564. var internalObjectKeys = __webpack_require__(1828);
  2565. var enumBugKeys = __webpack_require__(8727);
  2566. // `Object.keys` method
  2567. // https://tc39.es/ecma262/#sec-object.keys
  2568. // eslint-disable-next-line es/no-object-keys -- safe
  2569. module.exports = Object.keys || function keys(O) {
  2570. return internalObjectKeys(O, enumBugKeys);
  2571. };
  2572. /***/ }),
  2573. /***/ 8773:
  2574. /***/ (function(__unused_webpack_module, exports) {
  2575. "use strict";
  2576. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  2577. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2578. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2579. // Nashorn ~ JDK8 bug
  2580. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  2581. // `Object.prototype.propertyIsEnumerable` method implementation
  2582. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  2583. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  2584. var descriptor = getOwnPropertyDescriptor(this, V);
  2585. return !!descriptor && descriptor.enumerable;
  2586. } : $propertyIsEnumerable;
  2587. /***/ }),
  2588. /***/ 2967:
  2589. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2590. "use strict";
  2591. /* eslint-disable no-proto -- safe */
  2592. var uncurryThisAccessor = __webpack_require__(6706);
  2593. var isObject = __webpack_require__(34);
  2594. var requireObjectCoercible = __webpack_require__(7750);
  2595. var aPossiblePrototype = __webpack_require__(3506);
  2596. // `Object.setPrototypeOf` method
  2597. // https://tc39.es/ecma262/#sec-object.setprototypeof
  2598. // Works with __proto__ only. Old v8 can't work with null proto objects.
  2599. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  2600. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  2601. var CORRECT_SETTER = false;
  2602. var test = {};
  2603. var setter;
  2604. try {
  2605. setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
  2606. setter(test, []);
  2607. CORRECT_SETTER = test instanceof Array;
  2608. } catch (error) { /* empty */ }
  2609. return function setPrototypeOf(O, proto) {
  2610. requireObjectCoercible(O);
  2611. aPossiblePrototype(proto);
  2612. if (!isObject(O)) return O;
  2613. if (CORRECT_SETTER) setter(O, proto);
  2614. else O.__proto__ = proto;
  2615. return O;
  2616. };
  2617. }() : undefined);
  2618. /***/ }),
  2619. /***/ 3179:
  2620. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2621. "use strict";
  2622. var TO_STRING_TAG_SUPPORT = __webpack_require__(2140);
  2623. var classof = __webpack_require__(6955);
  2624. // `Object.prototype.toString` method implementation
  2625. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2626. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  2627. return '[object ' + classof(this) + ']';
  2628. };
  2629. /***/ }),
  2630. /***/ 4270:
  2631. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2632. "use strict";
  2633. var call = __webpack_require__(9565);
  2634. var isCallable = __webpack_require__(4901);
  2635. var isObject = __webpack_require__(34);
  2636. var $TypeError = TypeError;
  2637. // `OrdinaryToPrimitive` abstract operation
  2638. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  2639. module.exports = function (input, pref) {
  2640. var fn, val;
  2641. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  2642. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  2643. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  2644. throw new $TypeError("Can't convert object to primitive value");
  2645. };
  2646. /***/ }),
  2647. /***/ 5031:
  2648. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2649. "use strict";
  2650. var getBuiltIn = __webpack_require__(7751);
  2651. var uncurryThis = __webpack_require__(9504);
  2652. var getOwnPropertyNamesModule = __webpack_require__(8480);
  2653. var getOwnPropertySymbolsModule = __webpack_require__(3717);
  2654. var anObject = __webpack_require__(8551);
  2655. var concat = uncurryThis([].concat);
  2656. // all object keys, includes non-enumerable and symbols
  2657. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  2658. var keys = getOwnPropertyNamesModule.f(anObject(it));
  2659. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  2660. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  2661. };
  2662. /***/ }),
  2663. /***/ 9167:
  2664. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2665. "use strict";
  2666. var globalThis = __webpack_require__(4576);
  2667. module.exports = globalThis;
  2668. /***/ }),
  2669. /***/ 1103:
  2670. /***/ (function(module) {
  2671. "use strict";
  2672. module.exports = function (exec) {
  2673. try {
  2674. return { error: false, value: exec() };
  2675. } catch (error) {
  2676. return { error: true, value: error };
  2677. }
  2678. };
  2679. /***/ }),
  2680. /***/ 916:
  2681. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2682. "use strict";
  2683. var globalThis = __webpack_require__(4576);
  2684. var NativePromiseConstructor = __webpack_require__(550);
  2685. var isCallable = __webpack_require__(4901);
  2686. var isForced = __webpack_require__(2796);
  2687. var inspectSource = __webpack_require__(3706);
  2688. var wellKnownSymbol = __webpack_require__(8227);
  2689. var ENVIRONMENT = __webpack_require__(4215);
  2690. var IS_PURE = __webpack_require__(6395);
  2691. var V8_VERSION = __webpack_require__(9519);
  2692. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  2693. var SPECIES = wellKnownSymbol('species');
  2694. var SUBCLASSING = false;
  2695. var NATIVE_PROMISE_REJECTION_EVENT = isCallable(globalThis.PromiseRejectionEvent);
  2696. var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {
  2697. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor);
  2698. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor);
  2699. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  2700. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  2701. // We can't detect it synchronously, so just check versions
  2702. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  2703. // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution
  2704. if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true;
  2705. // We can't use @@species feature detection in V8 since it causes
  2706. // deoptimization and performance degradation
  2707. // https://github.com/zloirock/core-js/issues/679
  2708. if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
  2709. // Detect correctness of subclassing with @@species support
  2710. var promise = new NativePromiseConstructor(function (resolve) { resolve(1); });
  2711. var FakePromise = function (exec) {
  2712. exec(function () { /* empty */ }, function () { /* empty */ });
  2713. };
  2714. var constructor = promise.constructor = {};
  2715. constructor[SPECIES] = FakePromise;
  2716. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  2717. if (!SUBCLASSING) return true;
  2718. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  2719. } return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT;
  2720. });
  2721. module.exports = {
  2722. CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,
  2723. REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,
  2724. SUBCLASSING: SUBCLASSING
  2725. };
  2726. /***/ }),
  2727. /***/ 550:
  2728. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2729. "use strict";
  2730. var globalThis = __webpack_require__(4576);
  2731. module.exports = globalThis.Promise;
  2732. /***/ }),
  2733. /***/ 3438:
  2734. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2735. "use strict";
  2736. var anObject = __webpack_require__(8551);
  2737. var isObject = __webpack_require__(34);
  2738. var newPromiseCapability = __webpack_require__(6043);
  2739. module.exports = function (C, x) {
  2740. anObject(C);
  2741. if (isObject(x) && x.constructor === C) return x;
  2742. var promiseCapability = newPromiseCapability.f(C);
  2743. var resolve = promiseCapability.resolve;
  2744. resolve(x);
  2745. return promiseCapability.promise;
  2746. };
  2747. /***/ }),
  2748. /***/ 537:
  2749. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2750. "use strict";
  2751. var NativePromiseConstructor = __webpack_require__(550);
  2752. var checkCorrectnessOfIteration = __webpack_require__(4428);
  2753. var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(916).CONSTRUCTOR);
  2754. module.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) {
  2755. NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ });
  2756. });
  2757. /***/ }),
  2758. /***/ 1056:
  2759. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2760. "use strict";
  2761. var defineProperty = (__webpack_require__(4913).f);
  2762. module.exports = function (Target, Source, key) {
  2763. key in Target || defineProperty(Target, key, {
  2764. configurable: true,
  2765. get: function () { return Source[key]; },
  2766. set: function (it) { Source[key] = it; }
  2767. });
  2768. };
  2769. /***/ }),
  2770. /***/ 8265:
  2771. /***/ (function(module) {
  2772. "use strict";
  2773. var Queue = function () {
  2774. this.head = null;
  2775. this.tail = null;
  2776. };
  2777. Queue.prototype = {
  2778. add: function (item) {
  2779. var entry = { item: item, next: null };
  2780. var tail = this.tail;
  2781. if (tail) tail.next = entry;
  2782. else this.head = entry;
  2783. this.tail = entry;
  2784. },
  2785. get: function () {
  2786. var entry = this.head;
  2787. if (entry) {
  2788. var next = this.head = entry.next;
  2789. if (next === null) this.tail = null;
  2790. return entry.item;
  2791. }
  2792. }
  2793. };
  2794. module.exports = Queue;
  2795. /***/ }),
  2796. /***/ 6682:
  2797. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2798. "use strict";
  2799. var call = __webpack_require__(9565);
  2800. var anObject = __webpack_require__(8551);
  2801. var isCallable = __webpack_require__(4901);
  2802. var classof = __webpack_require__(2195);
  2803. var regexpExec = __webpack_require__(7323);
  2804. var $TypeError = TypeError;
  2805. // `RegExpExec` abstract operation
  2806. // https://tc39.es/ecma262/#sec-regexpexec
  2807. module.exports = function (R, S) {
  2808. var exec = R.exec;
  2809. if (isCallable(exec)) {
  2810. var result = call(exec, R, S);
  2811. if (result !== null) anObject(result);
  2812. return result;
  2813. }
  2814. if (classof(R) === 'RegExp') return call(regexpExec, R, S);
  2815. throw new $TypeError('RegExp#exec called on incompatible receiver');
  2816. };
  2817. /***/ }),
  2818. /***/ 7323:
  2819. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2820. "use strict";
  2821. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  2822. /* eslint-disable regexp/no-useless-quantifier -- testing */
  2823. var call = __webpack_require__(9565);
  2824. var uncurryThis = __webpack_require__(9504);
  2825. var toString = __webpack_require__(655);
  2826. var regexpFlags = __webpack_require__(7979);
  2827. var stickyHelpers = __webpack_require__(8429);
  2828. var shared = __webpack_require__(5745);
  2829. var create = __webpack_require__(2360);
  2830. var getInternalState = (__webpack_require__(1181).get);
  2831. var UNSUPPORTED_DOT_ALL = __webpack_require__(3635);
  2832. var UNSUPPORTED_NCG = __webpack_require__(8814);
  2833. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  2834. var nativeExec = RegExp.prototype.exec;
  2835. var patchedExec = nativeExec;
  2836. var charAt = uncurryThis(''.charAt);
  2837. var indexOf = uncurryThis(''.indexOf);
  2838. var replace = uncurryThis(''.replace);
  2839. var stringSlice = uncurryThis(''.slice);
  2840. var UPDATES_LAST_INDEX_WRONG = (function () {
  2841. var re1 = /a/;
  2842. var re2 = /b*/g;
  2843. call(nativeExec, re1, 'a');
  2844. call(nativeExec, re2, 'a');
  2845. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  2846. })();
  2847. var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
  2848. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  2849. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  2850. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  2851. if (PATCH) {
  2852. patchedExec = function exec(string) {
  2853. var re = this;
  2854. var state = getInternalState(re);
  2855. var str = toString(string);
  2856. var raw = state.raw;
  2857. var result, reCopy, lastIndex, match, i, object, group;
  2858. if (raw) {
  2859. raw.lastIndex = re.lastIndex;
  2860. result = call(patchedExec, raw, str);
  2861. re.lastIndex = raw.lastIndex;
  2862. return result;
  2863. }
  2864. var groups = state.groups;
  2865. var sticky = UNSUPPORTED_Y && re.sticky;
  2866. var flags = call(regexpFlags, re);
  2867. var source = re.source;
  2868. var charsAdded = 0;
  2869. var strCopy = str;
  2870. if (sticky) {
  2871. flags = replace(flags, 'y', '');
  2872. if (indexOf(flags, 'g') === -1) {
  2873. flags += 'g';
  2874. }
  2875. strCopy = stringSlice(str, re.lastIndex);
  2876. // Support anchored sticky behavior.
  2877. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
  2878. source = '(?: ' + source + ')';
  2879. strCopy = ' ' + strCopy;
  2880. charsAdded++;
  2881. }
  2882. // ^(? + rx + ) is needed, in combination with some str slicing, to
  2883. // simulate the 'y' flag.
  2884. reCopy = new RegExp('^(?:' + source + ')', flags);
  2885. }
  2886. if (NPCG_INCLUDED) {
  2887. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  2888. }
  2889. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  2890. match = call(nativeExec, sticky ? reCopy : re, strCopy);
  2891. if (sticky) {
  2892. if (match) {
  2893. match.input = stringSlice(match.input, charsAdded);
  2894. match[0] = stringSlice(match[0], charsAdded);
  2895. match.index = re.lastIndex;
  2896. re.lastIndex += match[0].length;
  2897. } else re.lastIndex = 0;
  2898. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  2899. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  2900. }
  2901. if (NPCG_INCLUDED && match && match.length > 1) {
  2902. // Fix browsers whose `exec` methods don't consistently return `undefined`
  2903. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  2904. call(nativeReplace, match[0], reCopy, function () {
  2905. for (i = 1; i < arguments.length - 2; i++) {
  2906. if (arguments[i] === undefined) match[i] = undefined;
  2907. }
  2908. });
  2909. }
  2910. if (match && groups) {
  2911. match.groups = object = create(null);
  2912. for (i = 0; i < groups.length; i++) {
  2913. group = groups[i];
  2914. object[group[0]] = match[group[1]];
  2915. }
  2916. }
  2917. return match;
  2918. };
  2919. }
  2920. module.exports = patchedExec;
  2921. /***/ }),
  2922. /***/ 7979:
  2923. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2924. "use strict";
  2925. var anObject = __webpack_require__(8551);
  2926. // `RegExp.prototype.flags` getter implementation
  2927. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  2928. module.exports = function () {
  2929. var that = anObject(this);
  2930. var result = '';
  2931. if (that.hasIndices) result += 'd';
  2932. if (that.global) result += 'g';
  2933. if (that.ignoreCase) result += 'i';
  2934. if (that.multiline) result += 'm';
  2935. if (that.dotAll) result += 's';
  2936. if (that.unicode) result += 'u';
  2937. if (that.unicodeSets) result += 'v';
  2938. if (that.sticky) result += 'y';
  2939. return result;
  2940. };
  2941. /***/ }),
  2942. /***/ 1034:
  2943. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2944. "use strict";
  2945. var call = __webpack_require__(9565);
  2946. var hasOwn = __webpack_require__(9297);
  2947. var isPrototypeOf = __webpack_require__(1625);
  2948. var regExpFlags = __webpack_require__(7979);
  2949. var RegExpPrototype = RegExp.prototype;
  2950. module.exports = function (R) {
  2951. var flags = R.flags;
  2952. return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
  2953. ? call(regExpFlags, R) : flags;
  2954. };
  2955. /***/ }),
  2956. /***/ 8429:
  2957. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2958. "use strict";
  2959. var fails = __webpack_require__(9039);
  2960. var globalThis = __webpack_require__(4576);
  2961. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  2962. var $RegExp = globalThis.RegExp;
  2963. var UNSUPPORTED_Y = fails(function () {
  2964. var re = $RegExp('a', 'y');
  2965. re.lastIndex = 2;
  2966. return re.exec('abcd') !== null;
  2967. });
  2968. // UC Browser bug
  2969. // https://github.com/zloirock/core-js/issues/1008
  2970. var MISSED_STICKY = UNSUPPORTED_Y || fails(function () {
  2971. return !$RegExp('a', 'y').sticky;
  2972. });
  2973. var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
  2974. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  2975. var re = $RegExp('^r', 'gy');
  2976. re.lastIndex = 2;
  2977. return re.exec('str') !== null;
  2978. });
  2979. module.exports = {
  2980. BROKEN_CARET: BROKEN_CARET,
  2981. MISSED_STICKY: MISSED_STICKY,
  2982. UNSUPPORTED_Y: UNSUPPORTED_Y
  2983. };
  2984. /***/ }),
  2985. /***/ 3635:
  2986. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2987. "use strict";
  2988. var fails = __webpack_require__(9039);
  2989. var globalThis = __webpack_require__(4576);
  2990. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  2991. var $RegExp = globalThis.RegExp;
  2992. module.exports = fails(function () {
  2993. var re = $RegExp('.', 's');
  2994. return !(re.dotAll && re.test('\n') && re.flags === 's');
  2995. });
  2996. /***/ }),
  2997. /***/ 8814:
  2998. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2999. "use strict";
  3000. var fails = __webpack_require__(9039);
  3001. var globalThis = __webpack_require__(4576);
  3002. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  3003. var $RegExp = globalThis.RegExp;
  3004. module.exports = fails(function () {
  3005. var re = $RegExp('(?<a>b)', 'g');
  3006. return re.exec('b').groups.a !== 'b' ||
  3007. 'b'.replace(re, '$<a>c') !== 'bc';
  3008. });
  3009. /***/ }),
  3010. /***/ 7750:
  3011. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3012. "use strict";
  3013. var isNullOrUndefined = __webpack_require__(4117);
  3014. var $TypeError = TypeError;
  3015. // `RequireObjectCoercible` abstract operation
  3016. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  3017. module.exports = function (it) {
  3018. if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  3019. return it;
  3020. };
  3021. /***/ }),
  3022. /***/ 3389:
  3023. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3024. "use strict";
  3025. var globalThis = __webpack_require__(4576);
  3026. var DESCRIPTORS = __webpack_require__(3724);
  3027. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  3028. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  3029. // Avoid NodeJS experimental warning
  3030. module.exports = function (name) {
  3031. if (!DESCRIPTORS) return globalThis[name];
  3032. var descriptor = getOwnPropertyDescriptor(globalThis, name);
  3033. return descriptor && descriptor.value;
  3034. };
  3035. /***/ }),
  3036. /***/ 7633:
  3037. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3038. "use strict";
  3039. var getBuiltIn = __webpack_require__(7751);
  3040. var defineBuiltInAccessor = __webpack_require__(2106);
  3041. var wellKnownSymbol = __webpack_require__(8227);
  3042. var DESCRIPTORS = __webpack_require__(3724);
  3043. var SPECIES = wellKnownSymbol('species');
  3044. module.exports = function (CONSTRUCTOR_NAME) {
  3045. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  3046. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  3047. defineBuiltInAccessor(Constructor, SPECIES, {
  3048. configurable: true,
  3049. get: function () { return this; }
  3050. });
  3051. }
  3052. };
  3053. /***/ }),
  3054. /***/ 687:
  3055. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3056. "use strict";
  3057. var defineProperty = (__webpack_require__(4913).f);
  3058. var hasOwn = __webpack_require__(9297);
  3059. var wellKnownSymbol = __webpack_require__(8227);
  3060. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  3061. module.exports = function (target, TAG, STATIC) {
  3062. if (target && !STATIC) target = target.prototype;
  3063. if (target && !hasOwn(target, TO_STRING_TAG)) {
  3064. defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
  3065. }
  3066. };
  3067. /***/ }),
  3068. /***/ 6119:
  3069. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3070. "use strict";
  3071. var shared = __webpack_require__(5745);
  3072. var uid = __webpack_require__(3392);
  3073. var keys = shared('keys');
  3074. module.exports = function (key) {
  3075. return keys[key] || (keys[key] = uid(key));
  3076. };
  3077. /***/ }),
  3078. /***/ 7629:
  3079. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3080. "use strict";
  3081. var IS_PURE = __webpack_require__(6395);
  3082. var globalThis = __webpack_require__(4576);
  3083. var defineGlobalProperty = __webpack_require__(9433);
  3084. var SHARED = '__core-js_shared__';
  3085. var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
  3086. (store.versions || (store.versions = [])).push({
  3087. version: '3.38.1',
  3088. mode: IS_PURE ? 'pure' : 'global',
  3089. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  3090. license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
  3091. source: 'https://github.com/zloirock/core-js'
  3092. });
  3093. /***/ }),
  3094. /***/ 5745:
  3095. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3096. "use strict";
  3097. var store = __webpack_require__(7629);
  3098. module.exports = function (key, value) {
  3099. return store[key] || (store[key] = value || {});
  3100. };
  3101. /***/ }),
  3102. /***/ 2293:
  3103. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3104. "use strict";
  3105. var anObject = __webpack_require__(8551);
  3106. var aConstructor = __webpack_require__(5548);
  3107. var isNullOrUndefined = __webpack_require__(4117);
  3108. var wellKnownSymbol = __webpack_require__(8227);
  3109. var SPECIES = wellKnownSymbol('species');
  3110. // `SpeciesConstructor` abstract operation
  3111. // https://tc39.es/ecma262/#sec-speciesconstructor
  3112. module.exports = function (O, defaultConstructor) {
  3113. var C = anObject(O).constructor;
  3114. var S;
  3115. return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S);
  3116. };
  3117. /***/ }),
  3118. /***/ 3061:
  3119. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3120. "use strict";
  3121. var fails = __webpack_require__(9039);
  3122. // check the existence of a method, lowercase
  3123. // of a tag and escaping quotes in arguments
  3124. module.exports = function (METHOD_NAME) {
  3125. return fails(function () {
  3126. var test = ''[METHOD_NAME]('"');
  3127. return test !== test.toLowerCase() || test.split('"').length > 3;
  3128. });
  3129. };
  3130. /***/ }),
  3131. /***/ 8183:
  3132. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3133. "use strict";
  3134. var uncurryThis = __webpack_require__(9504);
  3135. var toIntegerOrInfinity = __webpack_require__(1291);
  3136. var toString = __webpack_require__(655);
  3137. var requireObjectCoercible = __webpack_require__(7750);
  3138. var charAt = uncurryThis(''.charAt);
  3139. var charCodeAt = uncurryThis(''.charCodeAt);
  3140. var stringSlice = uncurryThis(''.slice);
  3141. var createMethod = function (CONVERT_TO_STRING) {
  3142. return function ($this, pos) {
  3143. var S = toString(requireObjectCoercible($this));
  3144. var position = toIntegerOrInfinity(pos);
  3145. var size = S.length;
  3146. var first, second;
  3147. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  3148. first = charCodeAt(S, position);
  3149. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  3150. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  3151. ? CONVERT_TO_STRING
  3152. ? charAt(S, position)
  3153. : first
  3154. : CONVERT_TO_STRING
  3155. ? stringSlice(S, position, position + 2)
  3156. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  3157. };
  3158. };
  3159. module.exports = {
  3160. // `String.prototype.codePointAt` method
  3161. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  3162. codeAt: createMethod(false),
  3163. // `String.prototype.at` method
  3164. // https://github.com/mathiasbynens/String.prototype.at
  3165. charAt: createMethod(true)
  3166. };
  3167. /***/ }),
  3168. /***/ 3063:
  3169. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3170. "use strict";
  3171. // https://github.com/zloirock/core-js/issues/280
  3172. var userAgent = __webpack_require__(2839);
  3173. module.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent);
  3174. /***/ }),
  3175. /***/ 533:
  3176. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3177. "use strict";
  3178. // https://github.com/tc39/proposal-string-pad-start-end
  3179. var uncurryThis = __webpack_require__(9504);
  3180. var toLength = __webpack_require__(8014);
  3181. var toString = __webpack_require__(655);
  3182. var $repeat = __webpack_require__(2333);
  3183. var requireObjectCoercible = __webpack_require__(7750);
  3184. var repeat = uncurryThis($repeat);
  3185. var stringSlice = uncurryThis(''.slice);
  3186. var ceil = Math.ceil;
  3187. // `String.prototype.{ padStart, padEnd }` methods implementation
  3188. var createMethod = function (IS_END) {
  3189. return function ($this, maxLength, fillString) {
  3190. var S = toString(requireObjectCoercible($this));
  3191. var intMaxLength = toLength(maxLength);
  3192. var stringLength = S.length;
  3193. var fillStr = fillString === undefined ? ' ' : toString(fillString);
  3194. var fillLen, stringFiller;
  3195. if (intMaxLength <= stringLength || fillStr === '') return S;
  3196. fillLen = intMaxLength - stringLength;
  3197. stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));
  3198. if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);
  3199. return IS_END ? S + stringFiller : stringFiller + S;
  3200. };
  3201. };
  3202. module.exports = {
  3203. // `String.prototype.padStart` method
  3204. // https://tc39.es/ecma262/#sec-string.prototype.padstart
  3205. start: createMethod(false),
  3206. // `String.prototype.padEnd` method
  3207. // https://tc39.es/ecma262/#sec-string.prototype.padend
  3208. end: createMethod(true)
  3209. };
  3210. /***/ }),
  3211. /***/ 6098:
  3212. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3213. "use strict";
  3214. // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
  3215. var uncurryThis = __webpack_require__(9504);
  3216. var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
  3217. var base = 36;
  3218. var tMin = 1;
  3219. var tMax = 26;
  3220. var skew = 38;
  3221. var damp = 700;
  3222. var initialBias = 72;
  3223. var initialN = 128; // 0x80
  3224. var delimiter = '-'; // '\x2D'
  3225. var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
  3226. var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
  3227. var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
  3228. var baseMinusTMin = base - tMin;
  3229. var $RangeError = RangeError;
  3230. var exec = uncurryThis(regexSeparators.exec);
  3231. var floor = Math.floor;
  3232. var fromCharCode = String.fromCharCode;
  3233. var charCodeAt = uncurryThis(''.charCodeAt);
  3234. var join = uncurryThis([].join);
  3235. var push = uncurryThis([].push);
  3236. var replace = uncurryThis(''.replace);
  3237. var split = uncurryThis(''.split);
  3238. var toLowerCase = uncurryThis(''.toLowerCase);
  3239. /**
  3240. * Creates an array containing the numeric code points of each Unicode
  3241. * character in the string. While JavaScript uses UCS-2 internally,
  3242. * this function will convert a pair of surrogate halves (each of which
  3243. * UCS-2 exposes as separate characters) into a single code point,
  3244. * matching UTF-16.
  3245. */
  3246. var ucs2decode = function (string) {
  3247. var output = [];
  3248. var counter = 0;
  3249. var length = string.length;
  3250. while (counter < length) {
  3251. var value = charCodeAt(string, counter++);
  3252. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  3253. // It's a high surrogate, and there is a next character.
  3254. var extra = charCodeAt(string, counter++);
  3255. if ((extra & 0xFC00) === 0xDC00) { // Low surrogate.
  3256. push(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  3257. } else {
  3258. // It's an unmatched surrogate; only append this code unit, in case the
  3259. // next code unit is the high surrogate of a surrogate pair.
  3260. push(output, value);
  3261. counter--;
  3262. }
  3263. } else {
  3264. push(output, value);
  3265. }
  3266. }
  3267. return output;
  3268. };
  3269. /**
  3270. * Converts a digit/integer into a basic code point.
  3271. */
  3272. var digitToBasic = function (digit) {
  3273. // 0..25 map to ASCII a..z or A..Z
  3274. // 26..35 map to ASCII 0..9
  3275. return digit + 22 + 75 * (digit < 26);
  3276. };
  3277. /**
  3278. * Bias adaptation function as per section 3.4 of RFC 3492.
  3279. * https://tools.ietf.org/html/rfc3492#section-3.4
  3280. */
  3281. var adapt = function (delta, numPoints, firstTime) {
  3282. var k = 0;
  3283. delta = firstTime ? floor(delta / damp) : delta >> 1;
  3284. delta += floor(delta / numPoints);
  3285. while (delta > baseMinusTMin * tMax >> 1) {
  3286. delta = floor(delta / baseMinusTMin);
  3287. k += base;
  3288. }
  3289. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  3290. };
  3291. /**
  3292. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  3293. * Punycode string of ASCII-only symbols.
  3294. */
  3295. var encode = function (input) {
  3296. var output = [];
  3297. // Convert the input in UCS-2 to an array of Unicode code points.
  3298. input = ucs2decode(input);
  3299. // Cache the length.
  3300. var inputLength = input.length;
  3301. // Initialize the state.
  3302. var n = initialN;
  3303. var delta = 0;
  3304. var bias = initialBias;
  3305. var i, currentValue;
  3306. // Handle the basic code points.
  3307. for (i = 0; i < input.length; i++) {
  3308. currentValue = input[i];
  3309. if (currentValue < 0x80) {
  3310. push(output, fromCharCode(currentValue));
  3311. }
  3312. }
  3313. var basicLength = output.length; // number of basic code points.
  3314. var handledCPCount = basicLength; // number of code points that have been handled;
  3315. // Finish the basic string with a delimiter unless it's empty.
  3316. if (basicLength) {
  3317. push(output, delimiter);
  3318. }
  3319. // Main encoding loop:
  3320. while (handledCPCount < inputLength) {
  3321. // All non-basic code points < n have been handled already. Find the next larger one:
  3322. var m = maxInt;
  3323. for (i = 0; i < input.length; i++) {
  3324. currentValue = input[i];
  3325. if (currentValue >= n && currentValue < m) {
  3326. m = currentValue;
  3327. }
  3328. }
  3329. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
  3330. var handledCPCountPlusOne = handledCPCount + 1;
  3331. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  3332. throw new $RangeError(OVERFLOW_ERROR);
  3333. }
  3334. delta += (m - n) * handledCPCountPlusOne;
  3335. n = m;
  3336. for (i = 0; i < input.length; i++) {
  3337. currentValue = input[i];
  3338. if (currentValue < n && ++delta > maxInt) {
  3339. throw new $RangeError(OVERFLOW_ERROR);
  3340. }
  3341. if (currentValue === n) {
  3342. // Represent delta as a generalized variable-length integer.
  3343. var q = delta;
  3344. var k = base;
  3345. while (true) {
  3346. var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
  3347. if (q < t) break;
  3348. var qMinusT = q - t;
  3349. var baseMinusT = base - t;
  3350. push(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
  3351. q = floor(qMinusT / baseMinusT);
  3352. k += base;
  3353. }
  3354. push(output, fromCharCode(digitToBasic(q)));
  3355. bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
  3356. delta = 0;
  3357. handledCPCount++;
  3358. }
  3359. }
  3360. delta++;
  3361. n++;
  3362. }
  3363. return join(output, '');
  3364. };
  3365. module.exports = function (input) {
  3366. var encoded = [];
  3367. var labels = split(replace(toLowerCase(input), regexSeparators, '\u002E'), '.');
  3368. var i, label;
  3369. for (i = 0; i < labels.length; i++) {
  3370. label = labels[i];
  3371. push(encoded, exec(regexNonASCII, label) ? 'xn--' + encode(label) : label);
  3372. }
  3373. return join(encoded, '.');
  3374. };
  3375. /***/ }),
  3376. /***/ 2333:
  3377. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3378. "use strict";
  3379. var toIntegerOrInfinity = __webpack_require__(1291);
  3380. var toString = __webpack_require__(655);
  3381. var requireObjectCoercible = __webpack_require__(7750);
  3382. var $RangeError = RangeError;
  3383. // `String.prototype.repeat` method implementation
  3384. // https://tc39.es/ecma262/#sec-string.prototype.repeat
  3385. module.exports = function repeat(count) {
  3386. var str = toString(requireObjectCoercible(this));
  3387. var result = '';
  3388. var n = toIntegerOrInfinity(count);
  3389. if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');
  3390. for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
  3391. return result;
  3392. };
  3393. /***/ }),
  3394. /***/ 706:
  3395. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3396. "use strict";
  3397. var PROPER_FUNCTION_NAME = (__webpack_require__(350).PROPER);
  3398. var fails = __webpack_require__(9039);
  3399. var whitespaces = __webpack_require__(7452);
  3400. var non = '\u200B\u0085\u180E';
  3401. // check that a method works with the correct list
  3402. // of whitespaces and has a correct name
  3403. module.exports = function (METHOD_NAME) {
  3404. return fails(function () {
  3405. return !!whitespaces[METHOD_NAME]()
  3406. || non[METHOD_NAME]() !== non
  3407. || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
  3408. });
  3409. };
  3410. /***/ }),
  3411. /***/ 3802:
  3412. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3413. "use strict";
  3414. var uncurryThis = __webpack_require__(9504);
  3415. var requireObjectCoercible = __webpack_require__(7750);
  3416. var toString = __webpack_require__(655);
  3417. var whitespaces = __webpack_require__(7452);
  3418. var replace = uncurryThis(''.replace);
  3419. var ltrim = RegExp('^[' + whitespaces + ']+');
  3420. var rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');
  3421. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  3422. var createMethod = function (TYPE) {
  3423. return function ($this) {
  3424. var string = toString(requireObjectCoercible($this));
  3425. if (TYPE & 1) string = replace(string, ltrim, '');
  3426. if (TYPE & 2) string = replace(string, rtrim, '$1');
  3427. return string;
  3428. };
  3429. };
  3430. module.exports = {
  3431. // `String.prototype.{ trimLeft, trimStart }` methods
  3432. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  3433. start: createMethod(1),
  3434. // `String.prototype.{ trimRight, trimEnd }` methods
  3435. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  3436. end: createMethod(2),
  3437. // `String.prototype.trim` method
  3438. // https://tc39.es/ecma262/#sec-string.prototype.trim
  3439. trim: createMethod(3)
  3440. };
  3441. /***/ }),
  3442. /***/ 4495:
  3443. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3444. "use strict";
  3445. /* eslint-disable es/no-symbol -- required for testing */
  3446. var V8_VERSION = __webpack_require__(9519);
  3447. var fails = __webpack_require__(9039);
  3448. var globalThis = __webpack_require__(4576);
  3449. var $String = globalThis.String;
  3450. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  3451. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  3452. var symbol = Symbol('symbol detection');
  3453. // Chrome 38 Symbol has incorrect toString conversion
  3454. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  3455. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  3456. // of course, fail.
  3457. return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
  3458. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  3459. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  3460. });
  3461. /***/ }),
  3462. /***/ 8242:
  3463. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3464. "use strict";
  3465. var call = __webpack_require__(9565);
  3466. var getBuiltIn = __webpack_require__(7751);
  3467. var wellKnownSymbol = __webpack_require__(8227);
  3468. var defineBuiltIn = __webpack_require__(6840);
  3469. module.exports = function () {
  3470. var Symbol = getBuiltIn('Symbol');
  3471. var SymbolPrototype = Symbol && Symbol.prototype;
  3472. var valueOf = SymbolPrototype && SymbolPrototype.valueOf;
  3473. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  3474. if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) {
  3475. // `Symbol.prototype[@@toPrimitive]` method
  3476. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  3477. // eslint-disable-next-line no-unused-vars -- required for .length
  3478. defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) {
  3479. return call(valueOf, this);
  3480. }, { arity: 1 });
  3481. }
  3482. };
  3483. /***/ }),
  3484. /***/ 1296:
  3485. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3486. "use strict";
  3487. var NATIVE_SYMBOL = __webpack_require__(4495);
  3488. /* eslint-disable es/no-symbol -- safe */
  3489. module.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;
  3490. /***/ }),
  3491. /***/ 9225:
  3492. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3493. "use strict";
  3494. var globalThis = __webpack_require__(4576);
  3495. var apply = __webpack_require__(8745);
  3496. var bind = __webpack_require__(6080);
  3497. var isCallable = __webpack_require__(4901);
  3498. var hasOwn = __webpack_require__(9297);
  3499. var fails = __webpack_require__(9039);
  3500. var html = __webpack_require__(397);
  3501. var arraySlice = __webpack_require__(7680);
  3502. var createElement = __webpack_require__(4055);
  3503. var validateArgumentsLength = __webpack_require__(2812);
  3504. var IS_IOS = __webpack_require__(9544);
  3505. var IS_NODE = __webpack_require__(8574);
  3506. var set = globalThis.setImmediate;
  3507. var clear = globalThis.clearImmediate;
  3508. var process = globalThis.process;
  3509. var Dispatch = globalThis.Dispatch;
  3510. var Function = globalThis.Function;
  3511. var MessageChannel = globalThis.MessageChannel;
  3512. var String = globalThis.String;
  3513. var counter = 0;
  3514. var queue = {};
  3515. var ONREADYSTATECHANGE = 'onreadystatechange';
  3516. var $location, defer, channel, port;
  3517. fails(function () {
  3518. // Deno throws a ReferenceError on `location` access without `--location` flag
  3519. $location = globalThis.location;
  3520. });
  3521. var run = function (id) {
  3522. if (hasOwn(queue, id)) {
  3523. var fn = queue[id];
  3524. delete queue[id];
  3525. fn();
  3526. }
  3527. };
  3528. var runner = function (id) {
  3529. return function () {
  3530. run(id);
  3531. };
  3532. };
  3533. var eventListener = function (event) {
  3534. run(event.data);
  3535. };
  3536. var globalPostMessageDefer = function (id) {
  3537. // old engines have not location.origin
  3538. globalThis.postMessage(String(id), $location.protocol + '//' + $location.host);
  3539. };
  3540. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  3541. if (!set || !clear) {
  3542. set = function setImmediate(handler) {
  3543. validateArgumentsLength(arguments.length, 1);
  3544. var fn = isCallable(handler) ? handler : Function(handler);
  3545. var args = arraySlice(arguments, 1);
  3546. queue[++counter] = function () {
  3547. apply(fn, undefined, args);
  3548. };
  3549. defer(counter);
  3550. return counter;
  3551. };
  3552. clear = function clearImmediate(id) {
  3553. delete queue[id];
  3554. };
  3555. // Node.js 0.8-
  3556. if (IS_NODE) {
  3557. defer = function (id) {
  3558. process.nextTick(runner(id));
  3559. };
  3560. // Sphere (JS game engine) Dispatch API
  3561. } else if (Dispatch && Dispatch.now) {
  3562. defer = function (id) {
  3563. Dispatch.now(runner(id));
  3564. };
  3565. // Browsers with MessageChannel, includes WebWorkers
  3566. // except iOS - https://github.com/zloirock/core-js/issues/624
  3567. } else if (MessageChannel && !IS_IOS) {
  3568. channel = new MessageChannel();
  3569. port = channel.port2;
  3570. channel.port1.onmessage = eventListener;
  3571. defer = bind(port.postMessage, port);
  3572. // Browsers with postMessage, skip WebWorkers
  3573. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  3574. } else if (
  3575. globalThis.addEventListener &&
  3576. isCallable(globalThis.postMessage) &&
  3577. !globalThis.importScripts &&
  3578. $location && $location.protocol !== 'file:' &&
  3579. !fails(globalPostMessageDefer)
  3580. ) {
  3581. defer = globalPostMessageDefer;
  3582. globalThis.addEventListener('message', eventListener, false);
  3583. // IE8-
  3584. } else if (ONREADYSTATECHANGE in createElement('script')) {
  3585. defer = function (id) {
  3586. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  3587. html.removeChild(this);
  3588. run(id);
  3589. };
  3590. };
  3591. // Rest old browsers
  3592. } else {
  3593. defer = function (id) {
  3594. setTimeout(runner(id), 0);
  3595. };
  3596. }
  3597. }
  3598. module.exports = {
  3599. set: set,
  3600. clear: clear
  3601. };
  3602. /***/ }),
  3603. /***/ 1240:
  3604. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3605. "use strict";
  3606. var uncurryThis = __webpack_require__(9504);
  3607. // `thisNumberValue` abstract operation
  3608. // https://tc39.es/ecma262/#sec-thisnumbervalue
  3609. module.exports = uncurryThis(1.0.valueOf);
  3610. /***/ }),
  3611. /***/ 5610:
  3612. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3613. "use strict";
  3614. var toIntegerOrInfinity = __webpack_require__(1291);
  3615. var max = Math.max;
  3616. var min = Math.min;
  3617. // Helper for a popular repeating case of the spec:
  3618. // Let integer be ? ToInteger(index).
  3619. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  3620. module.exports = function (index, length) {
  3621. var integer = toIntegerOrInfinity(index);
  3622. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  3623. };
  3624. /***/ }),
  3625. /***/ 5397:
  3626. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3627. "use strict";
  3628. // toObject with fallback for non-array-like ES3 strings
  3629. var IndexedObject = __webpack_require__(7055);
  3630. var requireObjectCoercible = __webpack_require__(7750);
  3631. module.exports = function (it) {
  3632. return IndexedObject(requireObjectCoercible(it));
  3633. };
  3634. /***/ }),
  3635. /***/ 1291:
  3636. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3637. "use strict";
  3638. var trunc = __webpack_require__(741);
  3639. // `ToIntegerOrInfinity` abstract operation
  3640. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  3641. module.exports = function (argument) {
  3642. var number = +argument;
  3643. // eslint-disable-next-line no-self-compare -- NaN check
  3644. return number !== number || number === 0 ? 0 : trunc(number);
  3645. };
  3646. /***/ }),
  3647. /***/ 8014:
  3648. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3649. "use strict";
  3650. var toIntegerOrInfinity = __webpack_require__(1291);
  3651. var min = Math.min;
  3652. // `ToLength` abstract operation
  3653. // https://tc39.es/ecma262/#sec-tolength
  3654. module.exports = function (argument) {
  3655. var len = toIntegerOrInfinity(argument);
  3656. return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  3657. };
  3658. /***/ }),
  3659. /***/ 8981:
  3660. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3661. "use strict";
  3662. var requireObjectCoercible = __webpack_require__(7750);
  3663. var $Object = Object;
  3664. // `ToObject` abstract operation
  3665. // https://tc39.es/ecma262/#sec-toobject
  3666. module.exports = function (argument) {
  3667. return $Object(requireObjectCoercible(argument));
  3668. };
  3669. /***/ }),
  3670. /***/ 2777:
  3671. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3672. "use strict";
  3673. var call = __webpack_require__(9565);
  3674. var isObject = __webpack_require__(34);
  3675. var isSymbol = __webpack_require__(757);
  3676. var getMethod = __webpack_require__(5966);
  3677. var ordinaryToPrimitive = __webpack_require__(4270);
  3678. var wellKnownSymbol = __webpack_require__(8227);
  3679. var $TypeError = TypeError;
  3680. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  3681. // `ToPrimitive` abstract operation
  3682. // https://tc39.es/ecma262/#sec-toprimitive
  3683. module.exports = function (input, pref) {
  3684. if (!isObject(input) || isSymbol(input)) return input;
  3685. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  3686. var result;
  3687. if (exoticToPrim) {
  3688. if (pref === undefined) pref = 'default';
  3689. result = call(exoticToPrim, input, pref);
  3690. if (!isObject(result) || isSymbol(result)) return result;
  3691. throw new $TypeError("Can't convert object to primitive value");
  3692. }
  3693. if (pref === undefined) pref = 'number';
  3694. return ordinaryToPrimitive(input, pref);
  3695. };
  3696. /***/ }),
  3697. /***/ 6969:
  3698. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3699. "use strict";
  3700. var toPrimitive = __webpack_require__(2777);
  3701. var isSymbol = __webpack_require__(757);
  3702. // `ToPropertyKey` abstract operation
  3703. // https://tc39.es/ecma262/#sec-topropertykey
  3704. module.exports = function (argument) {
  3705. var key = toPrimitive(argument, 'string');
  3706. return isSymbol(key) ? key : key + '';
  3707. };
  3708. /***/ }),
  3709. /***/ 2140:
  3710. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3711. "use strict";
  3712. var wellKnownSymbol = __webpack_require__(8227);
  3713. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  3714. var test = {};
  3715. test[TO_STRING_TAG] = 'z';
  3716. module.exports = String(test) === '[object z]';
  3717. /***/ }),
  3718. /***/ 655:
  3719. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3720. "use strict";
  3721. var classof = __webpack_require__(6955);
  3722. var $String = String;
  3723. module.exports = function (argument) {
  3724. if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  3725. return $String(argument);
  3726. };
  3727. /***/ }),
  3728. /***/ 6823:
  3729. /***/ (function(module) {
  3730. "use strict";
  3731. var $String = String;
  3732. module.exports = function (argument) {
  3733. try {
  3734. return $String(argument);
  3735. } catch (error) {
  3736. return 'Object';
  3737. }
  3738. };
  3739. /***/ }),
  3740. /***/ 3392:
  3741. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3742. "use strict";
  3743. var uncurryThis = __webpack_require__(9504);
  3744. var id = 0;
  3745. var postfix = Math.random();
  3746. var toString = uncurryThis(1.0.toString);
  3747. module.exports = function (key) {
  3748. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  3749. };
  3750. /***/ }),
  3751. /***/ 7416:
  3752. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3753. "use strict";
  3754. var fails = __webpack_require__(9039);
  3755. var wellKnownSymbol = __webpack_require__(8227);
  3756. var DESCRIPTORS = __webpack_require__(3724);
  3757. var IS_PURE = __webpack_require__(6395);
  3758. var ITERATOR = wellKnownSymbol('iterator');
  3759. module.exports = !fails(function () {
  3760. // eslint-disable-next-line unicorn/relative-url-style -- required for testing
  3761. var url = new URL('b?a=1&b=2&c=3', 'https://a');
  3762. var params = url.searchParams;
  3763. var params2 = new URLSearchParams('a=1&a=2&b=3');
  3764. var result = '';
  3765. url.pathname = 'c%20d';
  3766. params.forEach(function (value, key) {
  3767. params['delete']('b');
  3768. result += key + value;
  3769. });
  3770. params2['delete']('a', 2);
  3771. // `undefined` case is a Chromium 117 bug
  3772. // https://bugs.chromium.org/p/v8/issues/detail?id=14222
  3773. params2['delete']('b', undefined);
  3774. return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))
  3775. || (!params.size && (IS_PURE || !DESCRIPTORS))
  3776. || !params.sort
  3777. || url.href !== 'https://a/c%20d?a=1&c=3'
  3778. || params.get('c') !== '3'
  3779. || String(new URLSearchParams('?a=1')) !== 'a=1'
  3780. || !params[ITERATOR]
  3781. // throws in Edge
  3782. || new URL('https://a@b').username !== 'a'
  3783. || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
  3784. // not punycoded in Edge
  3785. || new URL('https://тест').host !== 'xn--e1aybc'
  3786. // not escaped in Chrome 62-
  3787. || new URL('https://a#б').hash !== '#%D0%B1'
  3788. // fails in Chrome 66-
  3789. || result !== 'a1c3'
  3790. // throws in Safari
  3791. || new URL('https://x', undefined).host !== 'x';
  3792. });
  3793. /***/ }),
  3794. /***/ 7040:
  3795. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3796. "use strict";
  3797. /* eslint-disable es/no-symbol -- required for testing */
  3798. var NATIVE_SYMBOL = __webpack_require__(4495);
  3799. module.exports = NATIVE_SYMBOL
  3800. && !Symbol.sham
  3801. && typeof Symbol.iterator == 'symbol';
  3802. /***/ }),
  3803. /***/ 8686:
  3804. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3805. "use strict";
  3806. var DESCRIPTORS = __webpack_require__(3724);
  3807. var fails = __webpack_require__(9039);
  3808. // V8 ~ Chrome 36-
  3809. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  3810. module.exports = DESCRIPTORS && fails(function () {
  3811. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  3812. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  3813. value: 42,
  3814. writable: false
  3815. }).prototype !== 42;
  3816. });
  3817. /***/ }),
  3818. /***/ 2812:
  3819. /***/ (function(module) {
  3820. "use strict";
  3821. var $TypeError = TypeError;
  3822. module.exports = function (passed, required) {
  3823. if (passed < required) throw new $TypeError('Not enough arguments');
  3824. return passed;
  3825. };
  3826. /***/ }),
  3827. /***/ 8622:
  3828. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3829. "use strict";
  3830. var globalThis = __webpack_require__(4576);
  3831. var isCallable = __webpack_require__(4901);
  3832. var WeakMap = globalThis.WeakMap;
  3833. module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
  3834. /***/ }),
  3835. /***/ 511:
  3836. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3837. "use strict";
  3838. var path = __webpack_require__(9167);
  3839. var hasOwn = __webpack_require__(9297);
  3840. var wrappedWellKnownSymbolModule = __webpack_require__(1951);
  3841. var defineProperty = (__webpack_require__(4913).f);
  3842. module.exports = function (NAME) {
  3843. var Symbol = path.Symbol || (path.Symbol = {});
  3844. if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
  3845. value: wrappedWellKnownSymbolModule.f(NAME)
  3846. });
  3847. };
  3848. /***/ }),
  3849. /***/ 1951:
  3850. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  3851. "use strict";
  3852. var wellKnownSymbol = __webpack_require__(8227);
  3853. exports.f = wellKnownSymbol;
  3854. /***/ }),
  3855. /***/ 8227:
  3856. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3857. "use strict";
  3858. var globalThis = __webpack_require__(4576);
  3859. var shared = __webpack_require__(5745);
  3860. var hasOwn = __webpack_require__(9297);
  3861. var uid = __webpack_require__(3392);
  3862. var NATIVE_SYMBOL = __webpack_require__(4495);
  3863. var USE_SYMBOL_AS_UID = __webpack_require__(7040);
  3864. var Symbol = globalThis.Symbol;
  3865. var WellKnownSymbolsStore = shared('wks');
  3866. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
  3867. module.exports = function (name) {
  3868. if (!hasOwn(WellKnownSymbolsStore, name)) {
  3869. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
  3870. ? Symbol[name]
  3871. : createWellKnownSymbol('Symbol.' + name);
  3872. } return WellKnownSymbolsStore[name];
  3873. };
  3874. /***/ }),
  3875. /***/ 7452:
  3876. /***/ (function(module) {
  3877. "use strict";
  3878. // a string of all valid unicode whitespaces
  3879. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  3880. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  3881. /***/ }),
  3882. /***/ 4601:
  3883. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  3884. "use strict";
  3885. var getBuiltIn = __webpack_require__(7751);
  3886. var hasOwn = __webpack_require__(9297);
  3887. var createNonEnumerableProperty = __webpack_require__(6699);
  3888. var isPrototypeOf = __webpack_require__(1625);
  3889. var setPrototypeOf = __webpack_require__(2967);
  3890. var copyConstructorProperties = __webpack_require__(7740);
  3891. var proxyAccessor = __webpack_require__(1056);
  3892. var inheritIfRequired = __webpack_require__(3167);
  3893. var normalizeStringArgument = __webpack_require__(2603);
  3894. var installErrorCause = __webpack_require__(7584);
  3895. var installErrorStack = __webpack_require__(747);
  3896. var DESCRIPTORS = __webpack_require__(3724);
  3897. var IS_PURE = __webpack_require__(6395);
  3898. module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
  3899. var STACK_TRACE_LIMIT = 'stackTraceLimit';
  3900. var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
  3901. var path = FULL_NAME.split('.');
  3902. var ERROR_NAME = path[path.length - 1];
  3903. var OriginalError = getBuiltIn.apply(null, path);
  3904. if (!OriginalError) return;
  3905. var OriginalErrorPrototype = OriginalError.prototype;
  3906. // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
  3907. if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
  3908. if (!FORCED) return OriginalError;
  3909. var BaseError = getBuiltIn('Error');
  3910. var WrappedError = wrapper(function (a, b) {
  3911. var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
  3912. var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
  3913. if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
  3914. installErrorStack(result, WrappedError, result.stack, 2);
  3915. if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
  3916. if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
  3917. return result;
  3918. });
  3919. WrappedError.prototype = OriginalErrorPrototype;
  3920. if (ERROR_NAME !== 'Error') {
  3921. if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
  3922. else copyConstructorProperties(WrappedError, BaseError, { name: true });
  3923. } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
  3924. proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
  3925. proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
  3926. }
  3927. copyConstructorProperties(WrappedError, OriginalError);
  3928. if (!IS_PURE) try {
  3929. // Safari 13- bug: WebAssembly errors does not have a proper `.name`
  3930. if (OriginalErrorPrototype.name !== ERROR_NAME) {
  3931. createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
  3932. }
  3933. OriginalErrorPrototype.constructor = WrappedError;
  3934. } catch (error) { /* empty */ }
  3935. return WrappedError;
  3936. };
  3937. /***/ }),
  3938. /***/ 8706:
  3939. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3940. "use strict";
  3941. var $ = __webpack_require__(6518);
  3942. var fails = __webpack_require__(9039);
  3943. var isArray = __webpack_require__(4376);
  3944. var isObject = __webpack_require__(34);
  3945. var toObject = __webpack_require__(8981);
  3946. var lengthOfArrayLike = __webpack_require__(6198);
  3947. var doesNotExceedSafeInteger = __webpack_require__(6837);
  3948. var createProperty = __webpack_require__(2278);
  3949. var arraySpeciesCreate = __webpack_require__(1469);
  3950. var arrayMethodHasSpeciesSupport = __webpack_require__(597);
  3951. var wellKnownSymbol = __webpack_require__(8227);
  3952. var V8_VERSION = __webpack_require__(9519);
  3953. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  3954. // We can't use this feature detection in V8 since it causes
  3955. // deoptimization and serious performance degradation
  3956. // https://github.com/zloirock/core-js/issues/679
  3957. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  3958. var array = [];
  3959. array[IS_CONCAT_SPREADABLE] = false;
  3960. return array.concat()[0] !== array;
  3961. });
  3962. var isConcatSpreadable = function (O) {
  3963. if (!isObject(O)) return false;
  3964. var spreadable = O[IS_CONCAT_SPREADABLE];
  3965. return spreadable !== undefined ? !!spreadable : isArray(O);
  3966. };
  3967. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');
  3968. // `Array.prototype.concat` method
  3969. // https://tc39.es/ecma262/#sec-array.prototype.concat
  3970. // with adding support of @@isConcatSpreadable and @@species
  3971. $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  3972. // eslint-disable-next-line no-unused-vars -- required for `.length`
  3973. concat: function concat(arg) {
  3974. var O = toObject(this);
  3975. var A = arraySpeciesCreate(O, 0);
  3976. var n = 0;
  3977. var i, k, length, len, E;
  3978. for (i = -1, length = arguments.length; i < length; i++) {
  3979. E = i === -1 ? O : arguments[i];
  3980. if (isConcatSpreadable(E)) {
  3981. len = lengthOfArrayLike(E);
  3982. doesNotExceedSafeInteger(n + len);
  3983. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  3984. } else {
  3985. doesNotExceedSafeInteger(n + 1);
  3986. createProperty(A, n++, E);
  3987. }
  3988. }
  3989. A.length = n;
  3990. return A;
  3991. }
  3992. });
  3993. /***/ }),
  3994. /***/ 3771:
  3995. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  3996. "use strict";
  3997. var $ = __webpack_require__(6518);
  3998. var fill = __webpack_require__(4373);
  3999. var addToUnscopables = __webpack_require__(6469);
  4000. // `Array.prototype.fill` method
  4001. // https://tc39.es/ecma262/#sec-array.prototype.fill
  4002. $({ target: 'Array', proto: true }, {
  4003. fill: fill
  4004. });
  4005. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  4006. addToUnscopables('fill');
  4007. /***/ }),
  4008. /***/ 2008:
  4009. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4010. "use strict";
  4011. var $ = __webpack_require__(6518);
  4012. var $filter = (__webpack_require__(9213).filter);
  4013. var arrayMethodHasSpeciesSupport = __webpack_require__(597);
  4014. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  4015. // `Array.prototype.filter` method
  4016. // https://tc39.es/ecma262/#sec-array.prototype.filter
  4017. // with adding support of @@species
  4018. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  4019. filter: function filter(callbackfn /* , thisArg */) {
  4020. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  4021. }
  4022. });
  4023. /***/ }),
  4024. /***/ 113:
  4025. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4026. "use strict";
  4027. var $ = __webpack_require__(6518);
  4028. var $find = (__webpack_require__(9213).find);
  4029. var addToUnscopables = __webpack_require__(6469);
  4030. var FIND = 'find';
  4031. var SKIPS_HOLES = true;
  4032. // Shouldn't skip holes
  4033. // eslint-disable-next-line es/no-array-prototype-find -- testing
  4034. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  4035. // `Array.prototype.find` method
  4036. // https://tc39.es/ecma262/#sec-array.prototype.find
  4037. $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  4038. find: function find(callbackfn /* , that = undefined */) {
  4039. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  4040. }
  4041. });
  4042. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  4043. addToUnscopables(FIND);
  4044. /***/ }),
  4045. /***/ 3418:
  4046. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4047. "use strict";
  4048. var $ = __webpack_require__(6518);
  4049. var from = __webpack_require__(7916);
  4050. var checkCorrectnessOfIteration = __webpack_require__(4428);
  4051. var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  4052. // eslint-disable-next-line es/no-array-from -- required for testing
  4053. Array.from(iterable);
  4054. });
  4055. // `Array.from` method
  4056. // https://tc39.es/ecma262/#sec-array.from
  4057. $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  4058. from: from
  4059. });
  4060. /***/ }),
  4061. /***/ 4423:
  4062. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4063. "use strict";
  4064. var $ = __webpack_require__(6518);
  4065. var $includes = (__webpack_require__(9617).includes);
  4066. var fails = __webpack_require__(9039);
  4067. var addToUnscopables = __webpack_require__(6469);
  4068. // FF99+ bug
  4069. var BROKEN_ON_SPARSE = fails(function () {
  4070. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  4071. return !Array(1).includes();
  4072. });
  4073. // `Array.prototype.includes` method
  4074. // https://tc39.es/ecma262/#sec-array.prototype.includes
  4075. $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  4076. includes: function includes(el /* , fromIndex = 0 */) {
  4077. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  4078. }
  4079. });
  4080. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  4081. addToUnscopables('includes');
  4082. /***/ }),
  4083. /***/ 3792:
  4084. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  4085. "use strict";
  4086. var toIndexedObject = __webpack_require__(5397);
  4087. var addToUnscopables = __webpack_require__(6469);
  4088. var Iterators = __webpack_require__(6269);
  4089. var InternalStateModule = __webpack_require__(1181);
  4090. var defineProperty = (__webpack_require__(4913).f);
  4091. var defineIterator = __webpack_require__(1088);
  4092. var createIterResultObject = __webpack_require__(2529);
  4093. var IS_PURE = __webpack_require__(6395);
  4094. var DESCRIPTORS = __webpack_require__(3724);
  4095. var ARRAY_ITERATOR = 'Array Iterator';
  4096. var setInternalState = InternalStateModule.set;
  4097. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  4098. // `Array.prototype.entries` method
  4099. // https://tc39.es/ecma262/#sec-array.prototype.entries
  4100. // `Array.prototype.keys` method
  4101. // https://tc39.es/ecma262/#sec-array.prototype.keys
  4102. // `Array.prototype.values` method
  4103. // https://tc39.es/ecma262/#sec-array.prototype.values
  4104. // `Array.prototype[@@iterator]` method
  4105. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  4106. // `CreateArrayIterator` internal method
  4107. // https://tc39.es/ecma262/#sec-createarrayiterator
  4108. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  4109. setInternalState(this, {
  4110. type: ARRAY_ITERATOR,
  4111. target: toIndexedObject(iterated), // target
  4112. index: 0, // next index
  4113. kind: kind // kind
  4114. });
  4115. // `%ArrayIteratorPrototype%.next` method
  4116. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  4117. }, function () {
  4118. var state = getInternalState(this);
  4119. var target = state.target;
  4120. var index = state.index++;
  4121. if (!target || index >= target.length) {
  4122. state.target = null;
  4123. return createIterResultObject(undefined, true);
  4124. }
  4125. switch (state.kind) {
  4126. case 'keys': return createIterResultObject(index, false);
  4127. case 'values': return createIterResultObject(target[index], false);
  4128. } return createIterResultObject([index, target[index]], false);
  4129. }, 'values');
  4130. // argumentsList[@@iterator] is %ArrayProto_values%
  4131. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  4132. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  4133. var values = Iterators.Arguments = Iterators.Array;
  4134. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  4135. addToUnscopables('keys');
  4136. addToUnscopables('values');
  4137. addToUnscopables('entries');
  4138. // V8 ~ Chrome 45- bug
  4139. if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
  4140. defineProperty(values, 'name', { value: 'values' });
  4141. } catch (error) { /* empty */ }
  4142. /***/ }),
  4143. /***/ 8598:
  4144. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4145. "use strict";
  4146. var $ = __webpack_require__(6518);
  4147. var uncurryThis = __webpack_require__(9504);
  4148. var IndexedObject = __webpack_require__(7055);
  4149. var toIndexedObject = __webpack_require__(5397);
  4150. var arrayMethodIsStrict = __webpack_require__(4598);
  4151. var nativeJoin = uncurryThis([].join);
  4152. var ES3_STRINGS = IndexedObject !== Object;
  4153. var FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');
  4154. // `Array.prototype.join` method
  4155. // https://tc39.es/ecma262/#sec-array.prototype.join
  4156. $({ target: 'Array', proto: true, forced: FORCED }, {
  4157. join: function join(separator) {
  4158. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  4159. }
  4160. });
  4161. /***/ }),
  4162. /***/ 2062:
  4163. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4164. "use strict";
  4165. var $ = __webpack_require__(6518);
  4166. var $map = (__webpack_require__(9213).map);
  4167. var arrayMethodHasSpeciesSupport = __webpack_require__(597);
  4168. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  4169. // `Array.prototype.map` method
  4170. // https://tc39.es/ecma262/#sec-array.prototype.map
  4171. // with adding support of @@species
  4172. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  4173. map: function map(callbackfn /* , thisArg */) {
  4174. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  4175. }
  4176. });
  4177. /***/ }),
  4178. /***/ 4114:
  4179. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4180. "use strict";
  4181. var $ = __webpack_require__(6518);
  4182. var toObject = __webpack_require__(8981);
  4183. var lengthOfArrayLike = __webpack_require__(6198);
  4184. var setArrayLength = __webpack_require__(4527);
  4185. var doesNotExceedSafeInteger = __webpack_require__(6837);
  4186. var fails = __webpack_require__(9039);
  4187. var INCORRECT_TO_LENGTH = fails(function () {
  4188. return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
  4189. });
  4190. // V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
  4191. // https://bugs.chromium.org/p/v8/issues/detail?id=12681
  4192. var properErrorOnNonWritableLength = function () {
  4193. try {
  4194. // eslint-disable-next-line es/no-object-defineproperty -- safe
  4195. Object.defineProperty([], 'length', { writable: false }).push();
  4196. } catch (error) {
  4197. return error instanceof TypeError;
  4198. }
  4199. };
  4200. var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
  4201. // `Array.prototype.push` method
  4202. // https://tc39.es/ecma262/#sec-array.prototype.push
  4203. $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  4204. // eslint-disable-next-line no-unused-vars -- required for `.length`
  4205. push: function push(item) {
  4206. var O = toObject(this);
  4207. var len = lengthOfArrayLike(O);
  4208. var argCount = arguments.length;
  4209. doesNotExceedSafeInteger(len + argCount);
  4210. for (var i = 0; i < argCount; i++) {
  4211. O[len] = arguments[i];
  4212. len++;
  4213. }
  4214. setArrayLength(O, len);
  4215. return len;
  4216. }
  4217. });
  4218. /***/ }),
  4219. /***/ 4782:
  4220. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4221. "use strict";
  4222. var $ = __webpack_require__(6518);
  4223. var isArray = __webpack_require__(4376);
  4224. var isConstructor = __webpack_require__(3517);
  4225. var isObject = __webpack_require__(34);
  4226. var toAbsoluteIndex = __webpack_require__(5610);
  4227. var lengthOfArrayLike = __webpack_require__(6198);
  4228. var toIndexedObject = __webpack_require__(5397);
  4229. var createProperty = __webpack_require__(2278);
  4230. var wellKnownSymbol = __webpack_require__(8227);
  4231. var arrayMethodHasSpeciesSupport = __webpack_require__(597);
  4232. var nativeSlice = __webpack_require__(7680);
  4233. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  4234. var SPECIES = wellKnownSymbol('species');
  4235. var $Array = Array;
  4236. var max = Math.max;
  4237. // `Array.prototype.slice` method
  4238. // https://tc39.es/ecma262/#sec-array.prototype.slice
  4239. // fallback for not array-like ES3 strings and DOM objects
  4240. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  4241. slice: function slice(start, end) {
  4242. var O = toIndexedObject(this);
  4243. var length = lengthOfArrayLike(O);
  4244. var k = toAbsoluteIndex(start, length);
  4245. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  4246. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  4247. var Constructor, result, n;
  4248. if (isArray(O)) {
  4249. Constructor = O.constructor;
  4250. // cross-realm fallback
  4251. if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {
  4252. Constructor = undefined;
  4253. } else if (isObject(Constructor)) {
  4254. Constructor = Constructor[SPECIES];
  4255. if (Constructor === null) Constructor = undefined;
  4256. }
  4257. if (Constructor === $Array || Constructor === undefined) {
  4258. return nativeSlice(O, k, fin);
  4259. }
  4260. }
  4261. result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));
  4262. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  4263. result.length = n;
  4264. return result;
  4265. }
  4266. });
  4267. /***/ }),
  4268. /***/ 6910:
  4269. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4270. "use strict";
  4271. var $ = __webpack_require__(6518);
  4272. var uncurryThis = __webpack_require__(9504);
  4273. var aCallable = __webpack_require__(9306);
  4274. var toObject = __webpack_require__(8981);
  4275. var lengthOfArrayLike = __webpack_require__(6198);
  4276. var deletePropertyOrThrow = __webpack_require__(4606);
  4277. var toString = __webpack_require__(655);
  4278. var fails = __webpack_require__(9039);
  4279. var internalSort = __webpack_require__(4488);
  4280. var arrayMethodIsStrict = __webpack_require__(4598);
  4281. var FF = __webpack_require__(3709);
  4282. var IE_OR_EDGE = __webpack_require__(3763);
  4283. var V8 = __webpack_require__(9519);
  4284. var WEBKIT = __webpack_require__(3607);
  4285. var test = [];
  4286. var nativeSort = uncurryThis(test.sort);
  4287. var push = uncurryThis(test.push);
  4288. // IE8-
  4289. var FAILS_ON_UNDEFINED = fails(function () {
  4290. test.sort(undefined);
  4291. });
  4292. // V8 bug
  4293. var FAILS_ON_NULL = fails(function () {
  4294. test.sort(null);
  4295. });
  4296. // Old WebKit
  4297. var STRICT_METHOD = arrayMethodIsStrict('sort');
  4298. var STABLE_SORT = !fails(function () {
  4299. // feature detection can be too slow, so check engines versions
  4300. if (V8) return V8 < 70;
  4301. if (FF && FF > 3) return;
  4302. if (IE_OR_EDGE) return true;
  4303. if (WEBKIT) return WEBKIT < 603;
  4304. var result = '';
  4305. var code, chr, value, index;
  4306. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  4307. for (code = 65; code < 76; code++) {
  4308. chr = String.fromCharCode(code);
  4309. switch (code) {
  4310. case 66: case 69: case 70: case 72: value = 3; break;
  4311. case 68: case 71: value = 4; break;
  4312. default: value = 2;
  4313. }
  4314. for (index = 0; index < 47; index++) {
  4315. test.push({ k: chr + index, v: value });
  4316. }
  4317. }
  4318. test.sort(function (a, b) { return b.v - a.v; });
  4319. for (index = 0; index < test.length; index++) {
  4320. chr = test[index].k.charAt(0);
  4321. if (result.charAt(result.length - 1) !== chr) result += chr;
  4322. }
  4323. return result !== 'DGBEFHACIJK';
  4324. });
  4325. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  4326. var getSortCompare = function (comparefn) {
  4327. return function (x, y) {
  4328. if (y === undefined) return -1;
  4329. if (x === undefined) return 1;
  4330. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  4331. return toString(x) > toString(y) ? 1 : -1;
  4332. };
  4333. };
  4334. // `Array.prototype.sort` method
  4335. // https://tc39.es/ecma262/#sec-array.prototype.sort
  4336. $({ target: 'Array', proto: true, forced: FORCED }, {
  4337. sort: function sort(comparefn) {
  4338. if (comparefn !== undefined) aCallable(comparefn);
  4339. var array = toObject(this);
  4340. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  4341. var items = [];
  4342. var arrayLength = lengthOfArrayLike(array);
  4343. var itemsLength, index;
  4344. for (index = 0; index < arrayLength; index++) {
  4345. if (index in array) push(items, array[index]);
  4346. }
  4347. internalSort(items, getSortCompare(comparefn));
  4348. itemsLength = lengthOfArrayLike(items);
  4349. index = 0;
  4350. while (index < itemsLength) array[index] = items[index++];
  4351. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  4352. return array;
  4353. }
  4354. });
  4355. /***/ }),
  4356. /***/ 4554:
  4357. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4358. "use strict";
  4359. var $ = __webpack_require__(6518);
  4360. var toObject = __webpack_require__(8981);
  4361. var toAbsoluteIndex = __webpack_require__(5610);
  4362. var toIntegerOrInfinity = __webpack_require__(1291);
  4363. var lengthOfArrayLike = __webpack_require__(6198);
  4364. var setArrayLength = __webpack_require__(4527);
  4365. var doesNotExceedSafeInteger = __webpack_require__(6837);
  4366. var arraySpeciesCreate = __webpack_require__(1469);
  4367. var createProperty = __webpack_require__(2278);
  4368. var deletePropertyOrThrow = __webpack_require__(4606);
  4369. var arrayMethodHasSpeciesSupport = __webpack_require__(597);
  4370. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  4371. var max = Math.max;
  4372. var min = Math.min;
  4373. // `Array.prototype.splice` method
  4374. // https://tc39.es/ecma262/#sec-array.prototype.splice
  4375. // with adding support of @@species
  4376. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  4377. splice: function splice(start, deleteCount /* , ...items */) {
  4378. var O = toObject(this);
  4379. var len = lengthOfArrayLike(O);
  4380. var actualStart = toAbsoluteIndex(start, len);
  4381. var argumentsLength = arguments.length;
  4382. var insertCount, actualDeleteCount, A, k, from, to;
  4383. if (argumentsLength === 0) {
  4384. insertCount = actualDeleteCount = 0;
  4385. } else if (argumentsLength === 1) {
  4386. insertCount = 0;
  4387. actualDeleteCount = len - actualStart;
  4388. } else {
  4389. insertCount = argumentsLength - 2;
  4390. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  4391. }
  4392. doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
  4393. A = arraySpeciesCreate(O, actualDeleteCount);
  4394. for (k = 0; k < actualDeleteCount; k++) {
  4395. from = actualStart + k;
  4396. if (from in O) createProperty(A, k, O[from]);
  4397. }
  4398. A.length = actualDeleteCount;
  4399. if (insertCount < actualDeleteCount) {
  4400. for (k = actualStart; k < len - actualDeleteCount; k++) {
  4401. from = k + actualDeleteCount;
  4402. to = k + insertCount;
  4403. if (from in O) O[to] = O[from];
  4404. else deletePropertyOrThrow(O, to);
  4405. }
  4406. for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
  4407. } else if (insertCount > actualDeleteCount) {
  4408. for (k = len - actualDeleteCount; k > actualStart; k--) {
  4409. from = k + actualDeleteCount - 1;
  4410. to = k + insertCount - 1;
  4411. if (from in O) O[to] = O[from];
  4412. else deletePropertyOrThrow(O, to);
  4413. }
  4414. }
  4415. for (k = 0; k < insertCount; k++) {
  4416. O[k + actualStart] = arguments[k + 2];
  4417. }
  4418. setArrayLength(O, len - actualDeleteCount + insertCount);
  4419. return A;
  4420. }
  4421. });
  4422. /***/ }),
  4423. /***/ 9572:
  4424. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4425. "use strict";
  4426. var hasOwn = __webpack_require__(9297);
  4427. var defineBuiltIn = __webpack_require__(6840);
  4428. var dateToPrimitive = __webpack_require__(3640);
  4429. var wellKnownSymbol = __webpack_require__(8227);
  4430. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  4431. var DatePrototype = Date.prototype;
  4432. // `Date.prototype[@@toPrimitive]` method
  4433. // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
  4434. if (!hasOwn(DatePrototype, TO_PRIMITIVE)) {
  4435. defineBuiltIn(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
  4436. }
  4437. /***/ }),
  4438. /***/ 6280:
  4439. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4440. "use strict";
  4441. /* eslint-disable no-unused-vars -- required for functions `.length` */
  4442. var $ = __webpack_require__(6518);
  4443. var globalThis = __webpack_require__(4576);
  4444. var apply = __webpack_require__(8745);
  4445. var wrapErrorConstructorWithCause = __webpack_require__(4601);
  4446. var WEB_ASSEMBLY = 'WebAssembly';
  4447. var WebAssembly = globalThis[WEB_ASSEMBLY];
  4448. // eslint-disable-next-line es/no-error-cause -- feature detection
  4449. var FORCED = new Error('e', { cause: 7 }).cause !== 7;
  4450. var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  4451. var O = {};
  4452. O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
  4453. $({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
  4454. };
  4455. var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  4456. if (WebAssembly && WebAssembly[ERROR_NAME]) {
  4457. var O = {};
  4458. O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
  4459. $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
  4460. }
  4461. };
  4462. // https://tc39.es/ecma262/#sec-nativeerror
  4463. exportGlobalErrorCauseWrapper('Error', function (init) {
  4464. return function Error(message) { return apply(init, this, arguments); };
  4465. });
  4466. exportGlobalErrorCauseWrapper('EvalError', function (init) {
  4467. return function EvalError(message) { return apply(init, this, arguments); };
  4468. });
  4469. exportGlobalErrorCauseWrapper('RangeError', function (init) {
  4470. return function RangeError(message) { return apply(init, this, arguments); };
  4471. });
  4472. exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
  4473. return function ReferenceError(message) { return apply(init, this, arguments); };
  4474. });
  4475. exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
  4476. return function SyntaxError(message) { return apply(init, this, arguments); };
  4477. });
  4478. exportGlobalErrorCauseWrapper('TypeError', function (init) {
  4479. return function TypeError(message) { return apply(init, this, arguments); };
  4480. });
  4481. exportGlobalErrorCauseWrapper('URIError', function (init) {
  4482. return function URIError(message) { return apply(init, this, arguments); };
  4483. });
  4484. exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
  4485. return function CompileError(message) { return apply(init, this, arguments); };
  4486. });
  4487. exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
  4488. return function LinkError(message) { return apply(init, this, arguments); };
  4489. });
  4490. exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
  4491. return function RuntimeError(message) { return apply(init, this, arguments); };
  4492. });
  4493. /***/ }),
  4494. /***/ 2010:
  4495. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4496. "use strict";
  4497. var DESCRIPTORS = __webpack_require__(3724);
  4498. var FUNCTION_NAME_EXISTS = (__webpack_require__(350).EXISTS);
  4499. var uncurryThis = __webpack_require__(9504);
  4500. var defineBuiltInAccessor = __webpack_require__(2106);
  4501. var FunctionPrototype = Function.prototype;
  4502. var functionToString = uncurryThis(FunctionPrototype.toString);
  4503. var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
  4504. var regExpExec = uncurryThis(nameRE.exec);
  4505. var NAME = 'name';
  4506. // Function instances `.name` property
  4507. // https://tc39.es/ecma262/#sec-function-instances-name
  4508. if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {
  4509. defineBuiltInAccessor(FunctionPrototype, NAME, {
  4510. configurable: true,
  4511. get: function () {
  4512. try {
  4513. return regExpExec(nameRE, functionToString(this))[1];
  4514. } catch (error) {
  4515. return '';
  4516. }
  4517. }
  4518. });
  4519. }
  4520. /***/ }),
  4521. /***/ 3110:
  4522. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4523. "use strict";
  4524. var $ = __webpack_require__(6518);
  4525. var getBuiltIn = __webpack_require__(7751);
  4526. var apply = __webpack_require__(8745);
  4527. var call = __webpack_require__(9565);
  4528. var uncurryThis = __webpack_require__(9504);
  4529. var fails = __webpack_require__(9039);
  4530. var isCallable = __webpack_require__(4901);
  4531. var isSymbol = __webpack_require__(757);
  4532. var arraySlice = __webpack_require__(7680);
  4533. var getReplacerFunction = __webpack_require__(6933);
  4534. var NATIVE_SYMBOL = __webpack_require__(4495);
  4535. var $String = String;
  4536. var $stringify = getBuiltIn('JSON', 'stringify');
  4537. var exec = uncurryThis(/./.exec);
  4538. var charAt = uncurryThis(''.charAt);
  4539. var charCodeAt = uncurryThis(''.charCodeAt);
  4540. var replace = uncurryThis(''.replace);
  4541. var numberToString = uncurryThis(1.0.toString);
  4542. var tester = /[\uD800-\uDFFF]/g;
  4543. var low = /^[\uD800-\uDBFF]$/;
  4544. var hi = /^[\uDC00-\uDFFF]$/;
  4545. var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
  4546. var symbol = getBuiltIn('Symbol')('stringify detection');
  4547. // MS Edge converts symbol values to JSON as {}
  4548. return $stringify([symbol]) !== '[null]'
  4549. // WebKit converts symbol values to JSON as null
  4550. || $stringify({ a: symbol }) !== '{}'
  4551. // V8 throws on boxed symbols
  4552. || $stringify(Object(symbol)) !== '{}';
  4553. });
  4554. // https://github.com/tc39/proposal-well-formed-stringify
  4555. var ILL_FORMED_UNICODE = fails(function () {
  4556. return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
  4557. || $stringify('\uDEAD') !== '"\\udead"';
  4558. });
  4559. var stringifyWithSymbolsFix = function (it, replacer) {
  4560. var args = arraySlice(arguments);
  4561. var $replacer = getReplacerFunction(replacer);
  4562. if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
  4563. args[1] = function (key, value) {
  4564. // some old implementations (like WebKit) could pass numbers as keys
  4565. if (isCallable($replacer)) value = call($replacer, this, $String(key), value);
  4566. if (!isSymbol(value)) return value;
  4567. };
  4568. return apply($stringify, null, args);
  4569. };
  4570. var fixIllFormed = function (match, offset, string) {
  4571. var prev = charAt(string, offset - 1);
  4572. var next = charAt(string, offset + 1);
  4573. if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {
  4574. return '\\u' + numberToString(charCodeAt(match, 0), 16);
  4575. } return match;
  4576. };
  4577. if ($stringify) {
  4578. // `JSON.stringify` method
  4579. // https://tc39.es/ecma262/#sec-json.stringify
  4580. $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
  4581. // eslint-disable-next-line no-unused-vars -- required for `.length`
  4582. stringify: function stringify(it, replacer, space) {
  4583. var args = arraySlice(arguments);
  4584. var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
  4585. return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;
  4586. }
  4587. });
  4588. }
  4589. /***/ }),
  4590. /***/ 2892:
  4591. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4592. "use strict";
  4593. var $ = __webpack_require__(6518);
  4594. var IS_PURE = __webpack_require__(6395);
  4595. var DESCRIPTORS = __webpack_require__(3724);
  4596. var globalThis = __webpack_require__(4576);
  4597. var path = __webpack_require__(9167);
  4598. var uncurryThis = __webpack_require__(9504);
  4599. var isForced = __webpack_require__(2796);
  4600. var hasOwn = __webpack_require__(9297);
  4601. var inheritIfRequired = __webpack_require__(3167);
  4602. var isPrototypeOf = __webpack_require__(1625);
  4603. var isSymbol = __webpack_require__(757);
  4604. var toPrimitive = __webpack_require__(2777);
  4605. var fails = __webpack_require__(9039);
  4606. var getOwnPropertyNames = (__webpack_require__(8480).f);
  4607. var getOwnPropertyDescriptor = (__webpack_require__(7347).f);
  4608. var defineProperty = (__webpack_require__(4913).f);
  4609. var thisNumberValue = __webpack_require__(1240);
  4610. var trim = (__webpack_require__(3802).trim);
  4611. var NUMBER = 'Number';
  4612. var NativeNumber = globalThis[NUMBER];
  4613. var PureNumberNamespace = path[NUMBER];
  4614. var NumberPrototype = NativeNumber.prototype;
  4615. var TypeError = globalThis.TypeError;
  4616. var stringSlice = uncurryThis(''.slice);
  4617. var charCodeAt = uncurryThis(''.charCodeAt);
  4618. // `ToNumeric` abstract operation
  4619. // https://tc39.es/ecma262/#sec-tonumeric
  4620. var toNumeric = function (value) {
  4621. var primValue = toPrimitive(value, 'number');
  4622. return typeof primValue == 'bigint' ? primValue : toNumber(primValue);
  4623. };
  4624. // `ToNumber` abstract operation
  4625. // https://tc39.es/ecma262/#sec-tonumber
  4626. var toNumber = function (argument) {
  4627. var it = toPrimitive(argument, 'number');
  4628. var first, third, radix, maxCode, digits, length, index, code;
  4629. if (isSymbol(it)) throw new TypeError('Cannot convert a Symbol value to a number');
  4630. if (typeof it == 'string' && it.length > 2) {
  4631. it = trim(it);
  4632. first = charCodeAt(it, 0);
  4633. if (first === 43 || first === 45) {
  4634. third = charCodeAt(it, 2);
  4635. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  4636. } else if (first === 48) {
  4637. switch (charCodeAt(it, 1)) {
  4638. // fast equal of /^0b[01]+$/i
  4639. case 66:
  4640. case 98:
  4641. radix = 2;
  4642. maxCode = 49;
  4643. break;
  4644. // fast equal of /^0o[0-7]+$/i
  4645. case 79:
  4646. case 111:
  4647. radix = 8;
  4648. maxCode = 55;
  4649. break;
  4650. default:
  4651. return +it;
  4652. }
  4653. digits = stringSlice(it, 2);
  4654. length = digits.length;
  4655. for (index = 0; index < length; index++) {
  4656. code = charCodeAt(digits, index);
  4657. // parseInt parses a string to a first unavailable symbol
  4658. // but ToNumber should return NaN if a string contains unavailable symbols
  4659. if (code < 48 || code > maxCode) return NaN;
  4660. } return parseInt(digits, radix);
  4661. }
  4662. } return +it;
  4663. };
  4664. var FORCED = isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'));
  4665. var calledWithNew = function (dummy) {
  4666. // includes check on 1..constructor(foo) case
  4667. return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); });
  4668. };
  4669. // `Number` constructor
  4670. // https://tc39.es/ecma262/#sec-number-constructor
  4671. var NumberWrapper = function Number(value) {
  4672. var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
  4673. return calledWithNew(this) ? inheritIfRequired(Object(n), this, NumberWrapper) : n;
  4674. };
  4675. NumberWrapper.prototype = NumberPrototype;
  4676. if (FORCED && !IS_PURE) NumberPrototype.constructor = NumberWrapper;
  4677. $({ global: true, constructor: true, wrap: true, forced: FORCED }, {
  4678. Number: NumberWrapper
  4679. });
  4680. // Use `internal/copy-constructor-properties` helper in `core-js@4`
  4681. var copyConstructorProperties = function (target, source) {
  4682. for (var keys = DESCRIPTORS ? getOwnPropertyNames(source) : (
  4683. // ES3:
  4684. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  4685. // ES2015 (in case, if modules with ES2015 Number statics required before):
  4686. 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +
  4687. // ESNext
  4688. 'fromString,range'
  4689. ).split(','), j = 0, key; keys.length > j; j++) {
  4690. if (hasOwn(source, key = keys[j]) && !hasOwn(target, key)) {
  4691. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  4692. }
  4693. }
  4694. };
  4695. if (IS_PURE && PureNumberNamespace) copyConstructorProperties(path[NUMBER], PureNumberNamespace);
  4696. if (FORCED || IS_PURE) copyConstructorProperties(path[NUMBER], NativeNumber);
  4697. /***/ }),
  4698. /***/ 2337:
  4699. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4700. "use strict";
  4701. var $ = __webpack_require__(6518);
  4702. var uncurryThis = __webpack_require__(9504);
  4703. var toIntegerOrInfinity = __webpack_require__(1291);
  4704. var thisNumberValue = __webpack_require__(1240);
  4705. var $repeat = __webpack_require__(2333);
  4706. var log10 = __webpack_require__(9340);
  4707. var fails = __webpack_require__(9039);
  4708. var $RangeError = RangeError;
  4709. var $String = String;
  4710. var $isFinite = isFinite;
  4711. var abs = Math.abs;
  4712. var floor = Math.floor;
  4713. var pow = Math.pow;
  4714. var round = Math.round;
  4715. var nativeToExponential = uncurryThis(1.0.toExponential);
  4716. var repeat = uncurryThis($repeat);
  4717. var stringSlice = uncurryThis(''.slice);
  4718. // Edge 17-
  4719. var ROUNDS_PROPERLY = nativeToExponential(-6.9e-11, 4) === '-6.9000e-11'
  4720. // IE11- && Edge 14-
  4721. && nativeToExponential(1.255, 2) === '1.25e+0'
  4722. // FF86-, V8 ~ Chrome 49-50
  4723. && nativeToExponential(12345, 3) === '1.235e+4'
  4724. // FF86-, V8 ~ Chrome 49-50
  4725. && nativeToExponential(25, 0) === '3e+1';
  4726. // IE8-
  4727. var throwsOnInfinityFraction = function () {
  4728. return fails(function () {
  4729. nativeToExponential(1, Infinity);
  4730. }) && fails(function () {
  4731. nativeToExponential(1, -Infinity);
  4732. });
  4733. };
  4734. // Safari <11 && FF <50
  4735. var properNonFiniteThisCheck = function () {
  4736. return !fails(function () {
  4737. nativeToExponential(Infinity, Infinity);
  4738. nativeToExponential(NaN, Infinity);
  4739. });
  4740. };
  4741. var FORCED = !ROUNDS_PROPERLY || !throwsOnInfinityFraction() || !properNonFiniteThisCheck();
  4742. // `Number.prototype.toExponential` method
  4743. // https://tc39.es/ecma262/#sec-number.prototype.toexponential
  4744. $({ target: 'Number', proto: true, forced: FORCED }, {
  4745. toExponential: function toExponential(fractionDigits) {
  4746. var x = thisNumberValue(this);
  4747. if (fractionDigits === undefined) return nativeToExponential(x);
  4748. var f = toIntegerOrInfinity(fractionDigits);
  4749. if (!$isFinite(x)) return String(x);
  4750. // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
  4751. if (f < 0 || f > 20) throw new $RangeError('Incorrect fraction digits');
  4752. if (ROUNDS_PROPERLY) return nativeToExponential(x, f);
  4753. var s = '';
  4754. var m, e, c, d;
  4755. if (x < 0) {
  4756. s = '-';
  4757. x = -x;
  4758. }
  4759. if (x === 0) {
  4760. e = 0;
  4761. m = repeat('0', f + 1);
  4762. } else {
  4763. // this block is based on https://gist.github.com/SheetJSDev/1100ad56b9f856c95299ed0e068eea08
  4764. // TODO: improve accuracy with big fraction digits
  4765. var l = log10(x);
  4766. e = floor(l);
  4767. var w = pow(10, e - f);
  4768. var n = round(x / w);
  4769. if (2 * x >= (2 * n + 1) * w) {
  4770. n += 1;
  4771. }
  4772. if (n >= pow(10, f + 1)) {
  4773. n /= 10;
  4774. e += 1;
  4775. }
  4776. m = $String(n);
  4777. }
  4778. if (f !== 0) {
  4779. m = stringSlice(m, 0, 1) + '.' + stringSlice(m, 1);
  4780. }
  4781. if (e === 0) {
  4782. c = '+';
  4783. d = '0';
  4784. } else {
  4785. c = e > 0 ? '+' : '-';
  4786. d = $String(abs(e));
  4787. }
  4788. m += 'e' + c + d;
  4789. return s + m;
  4790. }
  4791. });
  4792. /***/ }),
  4793. /***/ 9868:
  4794. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4795. "use strict";
  4796. var $ = __webpack_require__(6518);
  4797. var uncurryThis = __webpack_require__(9504);
  4798. var toIntegerOrInfinity = __webpack_require__(1291);
  4799. var thisNumberValue = __webpack_require__(1240);
  4800. var $repeat = __webpack_require__(2333);
  4801. var fails = __webpack_require__(9039);
  4802. var $RangeError = RangeError;
  4803. var $String = String;
  4804. var floor = Math.floor;
  4805. var repeat = uncurryThis($repeat);
  4806. var stringSlice = uncurryThis(''.slice);
  4807. var nativeToFixed = uncurryThis(1.0.toFixed);
  4808. var pow = function (x, n, acc) {
  4809. return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
  4810. };
  4811. var log = function (x) {
  4812. var n = 0;
  4813. var x2 = x;
  4814. while (x2 >= 4096) {
  4815. n += 12;
  4816. x2 /= 4096;
  4817. }
  4818. while (x2 >= 2) {
  4819. n += 1;
  4820. x2 /= 2;
  4821. } return n;
  4822. };
  4823. var multiply = function (data, n, c) {
  4824. var index = -1;
  4825. var c2 = c;
  4826. while (++index < 6) {
  4827. c2 += n * data[index];
  4828. data[index] = c2 % 1e7;
  4829. c2 = floor(c2 / 1e7);
  4830. }
  4831. };
  4832. var divide = function (data, n) {
  4833. var index = 6;
  4834. var c = 0;
  4835. while (--index >= 0) {
  4836. c += data[index];
  4837. data[index] = floor(c / n);
  4838. c = (c % n) * 1e7;
  4839. }
  4840. };
  4841. var dataToString = function (data) {
  4842. var index = 6;
  4843. var s = '';
  4844. while (--index >= 0) {
  4845. if (s !== '' || index === 0 || data[index] !== 0) {
  4846. var t = $String(data[index]);
  4847. s = s === '' ? t : s + repeat('0', 7 - t.length) + t;
  4848. }
  4849. } return s;
  4850. };
  4851. var FORCED = fails(function () {
  4852. return nativeToFixed(0.00008, 3) !== '0.000' ||
  4853. nativeToFixed(0.9, 0) !== '1' ||
  4854. nativeToFixed(1.255, 2) !== '1.25' ||
  4855. nativeToFixed(1000000000000000128.0, 0) !== '1000000000000000128';
  4856. }) || !fails(function () {
  4857. // V8 ~ Android 4.3-
  4858. nativeToFixed({});
  4859. });
  4860. // `Number.prototype.toFixed` method
  4861. // https://tc39.es/ecma262/#sec-number.prototype.tofixed
  4862. $({ target: 'Number', proto: true, forced: FORCED }, {
  4863. toFixed: function toFixed(fractionDigits) {
  4864. var number = thisNumberValue(this);
  4865. var fractDigits = toIntegerOrInfinity(fractionDigits);
  4866. var data = [0, 0, 0, 0, 0, 0];
  4867. var sign = '';
  4868. var result = '0';
  4869. var e, z, j, k;
  4870. // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
  4871. if (fractDigits < 0 || fractDigits > 20) throw new $RangeError('Incorrect fraction digits');
  4872. // eslint-disable-next-line no-self-compare -- NaN check
  4873. if (number !== number) return 'NaN';
  4874. if (number <= -1e21 || number >= 1e21) return $String(number);
  4875. if (number < 0) {
  4876. sign = '-';
  4877. number = -number;
  4878. }
  4879. if (number > 1e-21) {
  4880. e = log(number * pow(2, 69, 1)) - 69;
  4881. z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
  4882. z *= 0x10000000000000;
  4883. e = 52 - e;
  4884. if (e > 0) {
  4885. multiply(data, 0, z);
  4886. j = fractDigits;
  4887. while (j >= 7) {
  4888. multiply(data, 1e7, 0);
  4889. j -= 7;
  4890. }
  4891. multiply(data, pow(10, j, 1), 0);
  4892. j = e - 1;
  4893. while (j >= 23) {
  4894. divide(data, 1 << 23);
  4895. j -= 23;
  4896. }
  4897. divide(data, 1 << j);
  4898. multiply(data, 1, 1);
  4899. divide(data, 2);
  4900. result = dataToString(data);
  4901. } else {
  4902. multiply(data, 0, z);
  4903. multiply(data, 1 << -e, 0);
  4904. result = dataToString(data) + repeat('0', fractDigits);
  4905. }
  4906. }
  4907. if (fractDigits > 0) {
  4908. k = result.length;
  4909. result = sign + (k <= fractDigits
  4910. ? '0.' + repeat('0', fractDigits - k) + result
  4911. : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));
  4912. } else {
  4913. result = sign + result;
  4914. } return result;
  4915. }
  4916. });
  4917. /***/ }),
  4918. /***/ 9085:
  4919. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4920. "use strict";
  4921. var $ = __webpack_require__(6518);
  4922. var assign = __webpack_require__(4213);
  4923. // `Object.assign` method
  4924. // https://tc39.es/ecma262/#sec-object.assign
  4925. // eslint-disable-next-line es/no-object-assign -- required for testing
  4926. $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  4927. assign: assign
  4928. });
  4929. /***/ }),
  4930. /***/ 3851:
  4931. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4932. "use strict";
  4933. var $ = __webpack_require__(6518);
  4934. var fails = __webpack_require__(9039);
  4935. var toIndexedObject = __webpack_require__(5397);
  4936. var nativeGetOwnPropertyDescriptor = (__webpack_require__(7347).f);
  4937. var DESCRIPTORS = __webpack_require__(3724);
  4938. var FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });
  4939. // `Object.getOwnPropertyDescriptor` method
  4940. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  4941. $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  4942. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
  4943. return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  4944. }
  4945. });
  4946. /***/ }),
  4947. /***/ 1278:
  4948. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4949. "use strict";
  4950. var $ = __webpack_require__(6518);
  4951. var DESCRIPTORS = __webpack_require__(3724);
  4952. var ownKeys = __webpack_require__(5031);
  4953. var toIndexedObject = __webpack_require__(5397);
  4954. var getOwnPropertyDescriptorModule = __webpack_require__(7347);
  4955. var createProperty = __webpack_require__(2278);
  4956. // `Object.getOwnPropertyDescriptors` method
  4957. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  4958. $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  4959. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  4960. var O = toIndexedObject(object);
  4961. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  4962. var keys = ownKeys(O);
  4963. var result = {};
  4964. var index = 0;
  4965. var key, descriptor;
  4966. while (keys.length > index) {
  4967. descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
  4968. if (descriptor !== undefined) createProperty(result, key, descriptor);
  4969. }
  4970. return result;
  4971. }
  4972. });
  4973. /***/ }),
  4974. /***/ 9773:
  4975. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4976. "use strict";
  4977. var $ = __webpack_require__(6518);
  4978. var NATIVE_SYMBOL = __webpack_require__(4495);
  4979. var fails = __webpack_require__(9039);
  4980. var getOwnPropertySymbolsModule = __webpack_require__(3717);
  4981. var toObject = __webpack_require__(8981);
  4982. // V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  4983. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  4984. var FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); });
  4985. // `Object.getOwnPropertySymbols` method
  4986. // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  4987. $({ target: 'Object', stat: true, forced: FORCED }, {
  4988. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  4989. var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  4990. return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : [];
  4991. }
  4992. });
  4993. /***/ }),
  4994. /***/ 9432:
  4995. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  4996. "use strict";
  4997. var $ = __webpack_require__(6518);
  4998. var toObject = __webpack_require__(8981);
  4999. var nativeKeys = __webpack_require__(1072);
  5000. var fails = __webpack_require__(9039);
  5001. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  5002. // `Object.keys` method
  5003. // https://tc39.es/ecma262/#sec-object.keys
  5004. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  5005. keys: function keys(it) {
  5006. return nativeKeys(toObject(it));
  5007. }
  5008. });
  5009. /***/ }),
  5010. /***/ 6099:
  5011. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5012. "use strict";
  5013. var TO_STRING_TAG_SUPPORT = __webpack_require__(2140);
  5014. var defineBuiltIn = __webpack_require__(6840);
  5015. var toString = __webpack_require__(3179);
  5016. // `Object.prototype.toString` method
  5017. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  5018. if (!TO_STRING_TAG_SUPPORT) {
  5019. defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
  5020. }
  5021. /***/ }),
  5022. /***/ 6499:
  5023. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5024. "use strict";
  5025. var $ = __webpack_require__(6518);
  5026. var call = __webpack_require__(9565);
  5027. var aCallable = __webpack_require__(9306);
  5028. var newPromiseCapabilityModule = __webpack_require__(6043);
  5029. var perform = __webpack_require__(1103);
  5030. var iterate = __webpack_require__(2652);
  5031. var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(537);
  5032. // `Promise.all` method
  5033. // https://tc39.es/ecma262/#sec-promise.all
  5034. $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  5035. all: function all(iterable) {
  5036. var C = this;
  5037. var capability = newPromiseCapabilityModule.f(C);
  5038. var resolve = capability.resolve;
  5039. var reject = capability.reject;
  5040. var result = perform(function () {
  5041. var $promiseResolve = aCallable(C.resolve);
  5042. var values = [];
  5043. var counter = 0;
  5044. var remaining = 1;
  5045. iterate(iterable, function (promise) {
  5046. var index = counter++;
  5047. var alreadyCalled = false;
  5048. remaining++;
  5049. call($promiseResolve, C, promise).then(function (value) {
  5050. if (alreadyCalled) return;
  5051. alreadyCalled = true;
  5052. values[index] = value;
  5053. --remaining || resolve(values);
  5054. }, reject);
  5055. });
  5056. --remaining || resolve(values);
  5057. });
  5058. if (result.error) reject(result.value);
  5059. return capability.promise;
  5060. }
  5061. });
  5062. /***/ }),
  5063. /***/ 2003:
  5064. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5065. "use strict";
  5066. var $ = __webpack_require__(6518);
  5067. var IS_PURE = __webpack_require__(6395);
  5068. var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(916).CONSTRUCTOR);
  5069. var NativePromiseConstructor = __webpack_require__(550);
  5070. var getBuiltIn = __webpack_require__(7751);
  5071. var isCallable = __webpack_require__(4901);
  5072. var defineBuiltIn = __webpack_require__(6840);
  5073. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  5074. // `Promise.prototype.catch` method
  5075. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  5076. $({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, {
  5077. 'catch': function (onRejected) {
  5078. return this.then(undefined, onRejected);
  5079. }
  5080. });
  5081. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  5082. if (!IS_PURE && isCallable(NativePromiseConstructor)) {
  5083. var method = getBuiltIn('Promise').prototype['catch'];
  5084. if (NativePromisePrototype['catch'] !== method) {
  5085. defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
  5086. }
  5087. }
  5088. /***/ }),
  5089. /***/ 436:
  5090. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5091. "use strict";
  5092. var $ = __webpack_require__(6518);
  5093. var IS_PURE = __webpack_require__(6395);
  5094. var IS_NODE = __webpack_require__(8574);
  5095. var globalThis = __webpack_require__(4576);
  5096. var call = __webpack_require__(9565);
  5097. var defineBuiltIn = __webpack_require__(6840);
  5098. var setPrototypeOf = __webpack_require__(2967);
  5099. var setToStringTag = __webpack_require__(687);
  5100. var setSpecies = __webpack_require__(7633);
  5101. var aCallable = __webpack_require__(9306);
  5102. var isCallable = __webpack_require__(4901);
  5103. var isObject = __webpack_require__(34);
  5104. var anInstance = __webpack_require__(679);
  5105. var speciesConstructor = __webpack_require__(2293);
  5106. var task = (__webpack_require__(9225).set);
  5107. var microtask = __webpack_require__(1955);
  5108. var hostReportErrors = __webpack_require__(3138);
  5109. var perform = __webpack_require__(1103);
  5110. var Queue = __webpack_require__(8265);
  5111. var InternalStateModule = __webpack_require__(1181);
  5112. var NativePromiseConstructor = __webpack_require__(550);
  5113. var PromiseConstructorDetection = __webpack_require__(916);
  5114. var newPromiseCapabilityModule = __webpack_require__(6043);
  5115. var PROMISE = 'Promise';
  5116. var FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR;
  5117. var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
  5118. var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
  5119. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  5120. var setInternalState = InternalStateModule.set;
  5121. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  5122. var PromiseConstructor = NativePromiseConstructor;
  5123. var PromisePrototype = NativePromisePrototype;
  5124. var TypeError = globalThis.TypeError;
  5125. var document = globalThis.document;
  5126. var process = globalThis.process;
  5127. var newPromiseCapability = newPromiseCapabilityModule.f;
  5128. var newGenericPromiseCapability = newPromiseCapability;
  5129. var DISPATCH_EVENT = !!(document && document.createEvent && globalThis.dispatchEvent);
  5130. var UNHANDLED_REJECTION = 'unhandledrejection';
  5131. var REJECTION_HANDLED = 'rejectionhandled';
  5132. var PENDING = 0;
  5133. var FULFILLED = 1;
  5134. var REJECTED = 2;
  5135. var HANDLED = 1;
  5136. var UNHANDLED = 2;
  5137. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  5138. // helpers
  5139. var isThenable = function (it) {
  5140. var then;
  5141. return isObject(it) && isCallable(then = it.then) ? then : false;
  5142. };
  5143. var callReaction = function (reaction, state) {
  5144. var value = state.value;
  5145. var ok = state.state === FULFILLED;
  5146. var handler = ok ? reaction.ok : reaction.fail;
  5147. var resolve = reaction.resolve;
  5148. var reject = reaction.reject;
  5149. var domain = reaction.domain;
  5150. var result, then, exited;
  5151. try {
  5152. if (handler) {
  5153. if (!ok) {
  5154. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  5155. state.rejection = HANDLED;
  5156. }
  5157. if (handler === true) result = value;
  5158. else {
  5159. if (domain) domain.enter();
  5160. result = handler(value); // can throw
  5161. if (domain) {
  5162. domain.exit();
  5163. exited = true;
  5164. }
  5165. }
  5166. if (result === reaction.promise) {
  5167. reject(new TypeError('Promise-chain cycle'));
  5168. } else if (then = isThenable(result)) {
  5169. call(then, result, resolve, reject);
  5170. } else resolve(result);
  5171. } else reject(value);
  5172. } catch (error) {
  5173. if (domain && !exited) domain.exit();
  5174. reject(error);
  5175. }
  5176. };
  5177. var notify = function (state, isReject) {
  5178. if (state.notified) return;
  5179. state.notified = true;
  5180. microtask(function () {
  5181. var reactions = state.reactions;
  5182. var reaction;
  5183. while (reaction = reactions.get()) {
  5184. callReaction(reaction, state);
  5185. }
  5186. state.notified = false;
  5187. if (isReject && !state.rejection) onUnhandled(state);
  5188. });
  5189. };
  5190. var dispatchEvent = function (name, promise, reason) {
  5191. var event, handler;
  5192. if (DISPATCH_EVENT) {
  5193. event = document.createEvent('Event');
  5194. event.promise = promise;
  5195. event.reason = reason;
  5196. event.initEvent(name, false, true);
  5197. globalThis.dispatchEvent(event);
  5198. } else event = { promise: promise, reason: reason };
  5199. if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis['on' + name])) handler(event);
  5200. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  5201. };
  5202. var onUnhandled = function (state) {
  5203. call(task, globalThis, function () {
  5204. var promise = state.facade;
  5205. var value = state.value;
  5206. var IS_UNHANDLED = isUnhandled(state);
  5207. var result;
  5208. if (IS_UNHANDLED) {
  5209. result = perform(function () {
  5210. if (IS_NODE) {
  5211. process.emit('unhandledRejection', value, promise);
  5212. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  5213. });
  5214. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  5215. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  5216. if (result.error) throw result.value;
  5217. }
  5218. });
  5219. };
  5220. var isUnhandled = function (state) {
  5221. return state.rejection !== HANDLED && !state.parent;
  5222. };
  5223. var onHandleUnhandled = function (state) {
  5224. call(task, globalThis, function () {
  5225. var promise = state.facade;
  5226. if (IS_NODE) {
  5227. process.emit('rejectionHandled', promise);
  5228. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  5229. });
  5230. };
  5231. var bind = function (fn, state, unwrap) {
  5232. return function (value) {
  5233. fn(state, value, unwrap);
  5234. };
  5235. };
  5236. var internalReject = function (state, value, unwrap) {
  5237. if (state.done) return;
  5238. state.done = true;
  5239. if (unwrap) state = unwrap;
  5240. state.value = value;
  5241. state.state = REJECTED;
  5242. notify(state, true);
  5243. };
  5244. var internalResolve = function (state, value, unwrap) {
  5245. if (state.done) return;
  5246. state.done = true;
  5247. if (unwrap) state = unwrap;
  5248. try {
  5249. if (state.facade === value) throw new TypeError("Promise can't be resolved itself");
  5250. var then = isThenable(value);
  5251. if (then) {
  5252. microtask(function () {
  5253. var wrapper = { done: false };
  5254. try {
  5255. call(then, value,
  5256. bind(internalResolve, wrapper, state),
  5257. bind(internalReject, wrapper, state)
  5258. );
  5259. } catch (error) {
  5260. internalReject(wrapper, error, state);
  5261. }
  5262. });
  5263. } else {
  5264. state.value = value;
  5265. state.state = FULFILLED;
  5266. notify(state, false);
  5267. }
  5268. } catch (error) {
  5269. internalReject({ done: false }, error, state);
  5270. }
  5271. };
  5272. // constructor polyfill
  5273. if (FORCED_PROMISE_CONSTRUCTOR) {
  5274. // 25.4.3.1 Promise(executor)
  5275. PromiseConstructor = function Promise(executor) {
  5276. anInstance(this, PromisePrototype);
  5277. aCallable(executor);
  5278. call(Internal, this);
  5279. var state = getInternalPromiseState(this);
  5280. try {
  5281. executor(bind(internalResolve, state), bind(internalReject, state));
  5282. } catch (error) {
  5283. internalReject(state, error);
  5284. }
  5285. };
  5286. PromisePrototype = PromiseConstructor.prototype;
  5287. // eslint-disable-next-line no-unused-vars -- required for `.length`
  5288. Internal = function Promise(executor) {
  5289. setInternalState(this, {
  5290. type: PROMISE,
  5291. done: false,
  5292. notified: false,
  5293. parent: false,
  5294. reactions: new Queue(),
  5295. rejection: false,
  5296. state: PENDING,
  5297. value: null
  5298. });
  5299. };
  5300. // `Promise.prototype.then` method
  5301. // https://tc39.es/ecma262/#sec-promise.prototype.then
  5302. Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
  5303. var state = getInternalPromiseState(this);
  5304. var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
  5305. state.parent = true;
  5306. reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
  5307. reaction.fail = isCallable(onRejected) && onRejected;
  5308. reaction.domain = IS_NODE ? process.domain : undefined;
  5309. if (state.state === PENDING) state.reactions.add(reaction);
  5310. else microtask(function () {
  5311. callReaction(reaction, state);
  5312. });
  5313. return reaction.promise;
  5314. });
  5315. OwnPromiseCapability = function () {
  5316. var promise = new Internal();
  5317. var state = getInternalPromiseState(promise);
  5318. this.promise = promise;
  5319. this.resolve = bind(internalResolve, state);
  5320. this.reject = bind(internalReject, state);
  5321. };
  5322. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  5323. return C === PromiseConstructor || C === PromiseWrapper
  5324. ? new OwnPromiseCapability(C)
  5325. : newGenericPromiseCapability(C);
  5326. };
  5327. if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
  5328. nativeThen = NativePromisePrototype.then;
  5329. if (!NATIVE_PROMISE_SUBCLASSING) {
  5330. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  5331. defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
  5332. var that = this;
  5333. return new PromiseConstructor(function (resolve, reject) {
  5334. call(nativeThen, that, resolve, reject);
  5335. }).then(onFulfilled, onRejected);
  5336. // https://github.com/zloirock/core-js/issues/640
  5337. }, { unsafe: true });
  5338. }
  5339. // make `.constructor === Promise` work for native promise-based APIs
  5340. try {
  5341. delete NativePromisePrototype.constructor;
  5342. } catch (error) { /* empty */ }
  5343. // make `instanceof Promise` work for native promise-based APIs
  5344. if (setPrototypeOf) {
  5345. setPrototypeOf(NativePromisePrototype, PromisePrototype);
  5346. }
  5347. }
  5348. }
  5349. $({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  5350. Promise: PromiseConstructor
  5351. });
  5352. setToStringTag(PromiseConstructor, PROMISE, false, true);
  5353. setSpecies(PROMISE);
  5354. /***/ }),
  5355. /***/ 9391:
  5356. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5357. "use strict";
  5358. var $ = __webpack_require__(6518);
  5359. var IS_PURE = __webpack_require__(6395);
  5360. var NativePromiseConstructor = __webpack_require__(550);
  5361. var fails = __webpack_require__(9039);
  5362. var getBuiltIn = __webpack_require__(7751);
  5363. var isCallable = __webpack_require__(4901);
  5364. var speciesConstructor = __webpack_require__(2293);
  5365. var promiseResolve = __webpack_require__(3438);
  5366. var defineBuiltIn = __webpack_require__(6840);
  5367. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  5368. // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
  5369. var NON_GENERIC = !!NativePromiseConstructor && fails(function () {
  5370. // eslint-disable-next-line unicorn/no-thenable -- required for testing
  5371. NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
  5372. });
  5373. // `Promise.prototype.finally` method
  5374. // https://tc39.es/ecma262/#sec-promise.prototype.finally
  5375. $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
  5376. 'finally': function (onFinally) {
  5377. var C = speciesConstructor(this, getBuiltIn('Promise'));
  5378. var isFunction = isCallable(onFinally);
  5379. return this.then(
  5380. isFunction ? function (x) {
  5381. return promiseResolve(C, onFinally()).then(function () { return x; });
  5382. } : onFinally,
  5383. isFunction ? function (e) {
  5384. return promiseResolve(C, onFinally()).then(function () { throw e; });
  5385. } : onFinally
  5386. );
  5387. }
  5388. });
  5389. // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
  5390. if (!IS_PURE && isCallable(NativePromiseConstructor)) {
  5391. var method = getBuiltIn('Promise').prototype['finally'];
  5392. if (NativePromisePrototype['finally'] !== method) {
  5393. defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });
  5394. }
  5395. }
  5396. /***/ }),
  5397. /***/ 3362:
  5398. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5399. "use strict";
  5400. // TODO: Remove this module from `core-js@4` since it's split to modules listed below
  5401. __webpack_require__(436);
  5402. __webpack_require__(6499);
  5403. __webpack_require__(2003);
  5404. __webpack_require__(7743);
  5405. __webpack_require__(1481);
  5406. __webpack_require__(280);
  5407. /***/ }),
  5408. /***/ 7743:
  5409. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5410. "use strict";
  5411. var $ = __webpack_require__(6518);
  5412. var call = __webpack_require__(9565);
  5413. var aCallable = __webpack_require__(9306);
  5414. var newPromiseCapabilityModule = __webpack_require__(6043);
  5415. var perform = __webpack_require__(1103);
  5416. var iterate = __webpack_require__(2652);
  5417. var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__(537);
  5418. // `Promise.race` method
  5419. // https://tc39.es/ecma262/#sec-promise.race
  5420. $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  5421. race: function race(iterable) {
  5422. var C = this;
  5423. var capability = newPromiseCapabilityModule.f(C);
  5424. var reject = capability.reject;
  5425. var result = perform(function () {
  5426. var $promiseResolve = aCallable(C.resolve);
  5427. iterate(iterable, function (promise) {
  5428. call($promiseResolve, C, promise).then(capability.resolve, reject);
  5429. });
  5430. });
  5431. if (result.error) reject(result.value);
  5432. return capability.promise;
  5433. }
  5434. });
  5435. /***/ }),
  5436. /***/ 1481:
  5437. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5438. "use strict";
  5439. var $ = __webpack_require__(6518);
  5440. var newPromiseCapabilityModule = __webpack_require__(6043);
  5441. var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(916).CONSTRUCTOR);
  5442. // `Promise.reject` method
  5443. // https://tc39.es/ecma262/#sec-promise.reject
  5444. $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  5445. reject: function reject(r) {
  5446. var capability = newPromiseCapabilityModule.f(this);
  5447. var capabilityReject = capability.reject;
  5448. capabilityReject(r);
  5449. return capability.promise;
  5450. }
  5451. });
  5452. /***/ }),
  5453. /***/ 280:
  5454. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5455. "use strict";
  5456. var $ = __webpack_require__(6518);
  5457. var getBuiltIn = __webpack_require__(7751);
  5458. var IS_PURE = __webpack_require__(6395);
  5459. var NativePromiseConstructor = __webpack_require__(550);
  5460. var FORCED_PROMISE_CONSTRUCTOR = (__webpack_require__(916).CONSTRUCTOR);
  5461. var promiseResolve = __webpack_require__(3438);
  5462. var PromiseConstructorWrapper = getBuiltIn('Promise');
  5463. var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
  5464. // `Promise.resolve` method
  5465. // https://tc39.es/ecma262/#sec-promise.resolve
  5466. $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
  5467. resolve: function resolve(x) {
  5468. return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
  5469. }
  5470. });
  5471. /***/ }),
  5472. /***/ 4864:
  5473. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5474. "use strict";
  5475. var DESCRIPTORS = __webpack_require__(3724);
  5476. var globalThis = __webpack_require__(4576);
  5477. var uncurryThis = __webpack_require__(9504);
  5478. var isForced = __webpack_require__(2796);
  5479. var inheritIfRequired = __webpack_require__(3167);
  5480. var createNonEnumerableProperty = __webpack_require__(6699);
  5481. var create = __webpack_require__(2360);
  5482. var getOwnPropertyNames = (__webpack_require__(8480).f);
  5483. var isPrototypeOf = __webpack_require__(1625);
  5484. var isRegExp = __webpack_require__(788);
  5485. var toString = __webpack_require__(655);
  5486. var getRegExpFlags = __webpack_require__(1034);
  5487. var stickyHelpers = __webpack_require__(8429);
  5488. var proxyAccessor = __webpack_require__(1056);
  5489. var defineBuiltIn = __webpack_require__(6840);
  5490. var fails = __webpack_require__(9039);
  5491. var hasOwn = __webpack_require__(9297);
  5492. var enforceInternalState = (__webpack_require__(1181).enforce);
  5493. var setSpecies = __webpack_require__(7633);
  5494. var wellKnownSymbol = __webpack_require__(8227);
  5495. var UNSUPPORTED_DOT_ALL = __webpack_require__(3635);
  5496. var UNSUPPORTED_NCG = __webpack_require__(8814);
  5497. var MATCH = wellKnownSymbol('match');
  5498. var NativeRegExp = globalThis.RegExp;
  5499. var RegExpPrototype = NativeRegExp.prototype;
  5500. var SyntaxError = globalThis.SyntaxError;
  5501. var exec = uncurryThis(RegExpPrototype.exec);
  5502. var charAt = uncurryThis(''.charAt);
  5503. var replace = uncurryThis(''.replace);
  5504. var stringIndexOf = uncurryThis(''.indexOf);
  5505. var stringSlice = uncurryThis(''.slice);
  5506. // TODO: Use only proper RegExpIdentifierName
  5507. var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
  5508. var re1 = /a/g;
  5509. var re2 = /a/g;
  5510. // "new" should create a new object, old webkit bug
  5511. var CORRECT_NEW = new NativeRegExp(re1) !== re1;
  5512. var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
  5513. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  5514. var BASE_FORCED = DESCRIPTORS &&
  5515. (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () {
  5516. re2[MATCH] = false;
  5517. // RegExp constructor can alter flags and IsRegExp works correct with @@match
  5518. // eslint-disable-next-line sonar/inconsistent-function-call -- required for testing
  5519. return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';
  5520. }));
  5521. var handleDotAll = function (string) {
  5522. var length = string.length;
  5523. var index = 0;
  5524. var result = '';
  5525. var brackets = false;
  5526. var chr;
  5527. for (; index <= length; index++) {
  5528. chr = charAt(string, index);
  5529. if (chr === '\\') {
  5530. result += chr + charAt(string, ++index);
  5531. continue;
  5532. }
  5533. if (!brackets && chr === '.') {
  5534. result += '[\\s\\S]';
  5535. } else {
  5536. if (chr === '[') {
  5537. brackets = true;
  5538. } else if (chr === ']') {
  5539. brackets = false;
  5540. } result += chr;
  5541. }
  5542. } return result;
  5543. };
  5544. var handleNCG = function (string) {
  5545. var length = string.length;
  5546. var index = 0;
  5547. var result = '';
  5548. var named = [];
  5549. var names = create(null);
  5550. var brackets = false;
  5551. var ncg = false;
  5552. var groupid = 0;
  5553. var groupname = '';
  5554. var chr;
  5555. for (; index <= length; index++) {
  5556. chr = charAt(string, index);
  5557. if (chr === '\\') {
  5558. chr += charAt(string, ++index);
  5559. } else if (chr === ']') {
  5560. brackets = false;
  5561. } else if (!brackets) switch (true) {
  5562. case chr === '[':
  5563. brackets = true;
  5564. break;
  5565. case chr === '(':
  5566. result += chr;
  5567. // ignore non-capturing groups
  5568. if (stringSlice(string, index + 1, index + 3) === '?:') {
  5569. continue;
  5570. }
  5571. if (exec(IS_NCG, stringSlice(string, index + 1))) {
  5572. index += 2;
  5573. ncg = true;
  5574. }
  5575. groupid++;
  5576. continue;
  5577. case chr === '>' && ncg:
  5578. if (groupname === '' || hasOwn(names, groupname)) {
  5579. throw new SyntaxError('Invalid capture group name');
  5580. }
  5581. names[groupname] = true;
  5582. named[named.length] = [groupname, groupid];
  5583. ncg = false;
  5584. groupname = '';
  5585. continue;
  5586. }
  5587. if (ncg) groupname += chr;
  5588. else result += chr;
  5589. } return [result, named];
  5590. };
  5591. // `RegExp` constructor
  5592. // https://tc39.es/ecma262/#sec-regexp-constructor
  5593. if (isForced('RegExp', BASE_FORCED)) {
  5594. var RegExpWrapper = function RegExp(pattern, flags) {
  5595. var thisIsRegExp = isPrototypeOf(RegExpPrototype, this);
  5596. var patternIsRegExp = isRegExp(pattern);
  5597. var flagsAreUndefined = flags === undefined;
  5598. var groups = [];
  5599. var rawPattern = pattern;
  5600. var rawFlags, dotAll, sticky, handled, result, state;
  5601. if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
  5602. return pattern;
  5603. }
  5604. if (patternIsRegExp || isPrototypeOf(RegExpPrototype, pattern)) {
  5605. pattern = pattern.source;
  5606. if (flagsAreUndefined) flags = getRegExpFlags(rawPattern);
  5607. }
  5608. pattern = pattern === undefined ? '' : toString(pattern);
  5609. flags = flags === undefined ? '' : toString(flags);
  5610. rawPattern = pattern;
  5611. if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) {
  5612. dotAll = !!flags && stringIndexOf(flags, 's') > -1;
  5613. if (dotAll) flags = replace(flags, /s/g, '');
  5614. }
  5615. rawFlags = flags;
  5616. if (MISSED_STICKY && 'sticky' in re1) {
  5617. sticky = !!flags && stringIndexOf(flags, 'y') > -1;
  5618. if (sticky && UNSUPPORTED_Y) flags = replace(flags, /y/g, '');
  5619. }
  5620. if (UNSUPPORTED_NCG) {
  5621. handled = handleNCG(pattern);
  5622. pattern = handled[0];
  5623. groups = handled[1];
  5624. }
  5625. result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype, RegExpWrapper);
  5626. if (dotAll || sticky || groups.length) {
  5627. state = enforceInternalState(result);
  5628. if (dotAll) {
  5629. state.dotAll = true;
  5630. state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
  5631. }
  5632. if (sticky) state.sticky = true;
  5633. if (groups.length) state.groups = groups;
  5634. }
  5635. if (pattern !== rawPattern) try {
  5636. // fails in old engines, but we have no alternatives for unsupported regex syntax
  5637. createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
  5638. } catch (error) { /* empty */ }
  5639. return result;
  5640. };
  5641. for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {
  5642. proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
  5643. }
  5644. RegExpPrototype.constructor = RegExpWrapper;
  5645. RegExpWrapper.prototype = RegExpPrototype;
  5646. defineBuiltIn(globalThis, 'RegExp', RegExpWrapper, { constructor: true });
  5647. }
  5648. // https://tc39.es/ecma262/#sec-get-regexp-@@species
  5649. setSpecies('RegExp');
  5650. /***/ }),
  5651. /***/ 7465:
  5652. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5653. "use strict";
  5654. var DESCRIPTORS = __webpack_require__(3724);
  5655. var UNSUPPORTED_DOT_ALL = __webpack_require__(3635);
  5656. var classof = __webpack_require__(2195);
  5657. var defineBuiltInAccessor = __webpack_require__(2106);
  5658. var getInternalState = (__webpack_require__(1181).get);
  5659. var RegExpPrototype = RegExp.prototype;
  5660. var $TypeError = TypeError;
  5661. // `RegExp.prototype.dotAll` getter
  5662. // https://tc39.es/ecma262/#sec-get-regexp.prototype.dotall
  5663. if (DESCRIPTORS && UNSUPPORTED_DOT_ALL) {
  5664. defineBuiltInAccessor(RegExpPrototype, 'dotAll', {
  5665. configurable: true,
  5666. get: function dotAll() {
  5667. if (this === RegExpPrototype) return;
  5668. // We can't use InternalStateModule.getterFor because
  5669. // we don't add metadata for regexps created by a literal.
  5670. if (classof(this) === 'RegExp') {
  5671. return !!getInternalState(this).dotAll;
  5672. }
  5673. throw new $TypeError('Incompatible receiver, RegExp required');
  5674. }
  5675. });
  5676. }
  5677. /***/ }),
  5678. /***/ 7495:
  5679. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5680. "use strict";
  5681. var $ = __webpack_require__(6518);
  5682. var exec = __webpack_require__(7323);
  5683. // `RegExp.prototype.exec` method
  5684. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  5685. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  5686. exec: exec
  5687. });
  5688. /***/ }),
  5689. /***/ 7745:
  5690. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5691. "use strict";
  5692. var DESCRIPTORS = __webpack_require__(3724);
  5693. var MISSED_STICKY = (__webpack_require__(8429).MISSED_STICKY);
  5694. var classof = __webpack_require__(2195);
  5695. var defineBuiltInAccessor = __webpack_require__(2106);
  5696. var getInternalState = (__webpack_require__(1181).get);
  5697. var RegExpPrototype = RegExp.prototype;
  5698. var $TypeError = TypeError;
  5699. // `RegExp.prototype.sticky` getter
  5700. // https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky
  5701. if (DESCRIPTORS && MISSED_STICKY) {
  5702. defineBuiltInAccessor(RegExpPrototype, 'sticky', {
  5703. configurable: true,
  5704. get: function sticky() {
  5705. if (this === RegExpPrototype) return;
  5706. // We can't use InternalStateModule.getterFor because
  5707. // we don't add metadata for regexps created by a literal.
  5708. if (classof(this) === 'RegExp') {
  5709. return !!getInternalState(this).sticky;
  5710. }
  5711. throw new $TypeError('Incompatible receiver, RegExp required');
  5712. }
  5713. });
  5714. }
  5715. /***/ }),
  5716. /***/ 906:
  5717. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5718. "use strict";
  5719. // TODO: Remove from `core-js@4` since it's moved to entry points
  5720. __webpack_require__(7495);
  5721. var $ = __webpack_require__(6518);
  5722. var call = __webpack_require__(9565);
  5723. var isCallable = __webpack_require__(4901);
  5724. var anObject = __webpack_require__(8551);
  5725. var toString = __webpack_require__(655);
  5726. var DELEGATES_TO_EXEC = function () {
  5727. var execCalled = false;
  5728. var re = /[ac]/;
  5729. re.exec = function () {
  5730. execCalled = true;
  5731. return /./.exec.apply(this, arguments);
  5732. };
  5733. return re.test('abc') === true && execCalled;
  5734. }();
  5735. var nativeTest = /./.test;
  5736. // `RegExp.prototype.test` method
  5737. // https://tc39.es/ecma262/#sec-regexp.prototype.test
  5738. $({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
  5739. test: function (S) {
  5740. var R = anObject(this);
  5741. var string = toString(S);
  5742. var exec = R.exec;
  5743. if (!isCallable(exec)) return call(nativeTest, R, string);
  5744. var result = call(exec, R, string);
  5745. if (result === null) return false;
  5746. anObject(result);
  5747. return true;
  5748. }
  5749. });
  5750. /***/ }),
  5751. /***/ 8781:
  5752. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5753. "use strict";
  5754. var PROPER_FUNCTION_NAME = (__webpack_require__(350).PROPER);
  5755. var defineBuiltIn = __webpack_require__(6840);
  5756. var anObject = __webpack_require__(8551);
  5757. var $toString = __webpack_require__(655);
  5758. var fails = __webpack_require__(9039);
  5759. var getRegExpFlags = __webpack_require__(1034);
  5760. var TO_STRING = 'toString';
  5761. var RegExpPrototype = RegExp.prototype;
  5762. var nativeToString = RegExpPrototype[TO_STRING];
  5763. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  5764. // FF44- RegExp#toString has a wrong name
  5765. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
  5766. // `RegExp.prototype.toString` method
  5767. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  5768. if (NOT_GENERIC || INCORRECT_NAME) {
  5769. defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
  5770. var R = anObject(this);
  5771. var pattern = $toString(R.source);
  5772. var flags = $toString(getRegExpFlags(R));
  5773. return '/' + pattern + '/' + flags;
  5774. }, { unsafe: true });
  5775. }
  5776. /***/ }),
  5777. /***/ 4298:
  5778. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5779. "use strict";
  5780. var $ = __webpack_require__(6518);
  5781. var createHTML = __webpack_require__(7240);
  5782. var forcedStringHTMLMethod = __webpack_require__(3061);
  5783. // `String.prototype.fixed` method
  5784. // https://tc39.es/ecma262/#sec-string.prototype.fixed
  5785. $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {
  5786. fixed: function fixed() {
  5787. return createHTML(this, 'tt', '', '');
  5788. }
  5789. });
  5790. /***/ }),
  5791. /***/ 7337:
  5792. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5793. "use strict";
  5794. var $ = __webpack_require__(6518);
  5795. var uncurryThis = __webpack_require__(9504);
  5796. var toAbsoluteIndex = __webpack_require__(5610);
  5797. var $RangeError = RangeError;
  5798. var fromCharCode = String.fromCharCode;
  5799. // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing
  5800. var $fromCodePoint = String.fromCodePoint;
  5801. var join = uncurryThis([].join);
  5802. // length should be 1, old FF problem
  5803. var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length !== 1;
  5804. // `String.fromCodePoint` method
  5805. // https://tc39.es/ecma262/#sec-string.fromcodepoint
  5806. $({ target: 'String', stat: true, arity: 1, forced: INCORRECT_LENGTH }, {
  5807. // eslint-disable-next-line no-unused-vars -- required for `.length`
  5808. fromCodePoint: function fromCodePoint(x) {
  5809. var elements = [];
  5810. var length = arguments.length;
  5811. var i = 0;
  5812. var code;
  5813. while (length > i) {
  5814. code = +arguments[i++];
  5815. if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw new $RangeError(code + ' is not a valid code point');
  5816. elements[i] = code < 0x10000
  5817. ? fromCharCode(code)
  5818. : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00);
  5819. } return join(elements, '');
  5820. }
  5821. });
  5822. /***/ }),
  5823. /***/ 1699:
  5824. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5825. "use strict";
  5826. var $ = __webpack_require__(6518);
  5827. var uncurryThis = __webpack_require__(9504);
  5828. var notARegExp = __webpack_require__(5749);
  5829. var requireObjectCoercible = __webpack_require__(7750);
  5830. var toString = __webpack_require__(655);
  5831. var correctIsRegExpLogic = __webpack_require__(1436);
  5832. var stringIndexOf = uncurryThis(''.indexOf);
  5833. // `String.prototype.includes` method
  5834. // https://tc39.es/ecma262/#sec-string.prototype.includes
  5835. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  5836. includes: function includes(searchString /* , position = 0 */) {
  5837. return !!~stringIndexOf(
  5838. toString(requireObjectCoercible(this)),
  5839. toString(notARegExp(searchString)),
  5840. arguments.length > 1 ? arguments[1] : undefined
  5841. );
  5842. }
  5843. });
  5844. /***/ }),
  5845. /***/ 7764:
  5846. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5847. "use strict";
  5848. var charAt = (__webpack_require__(8183).charAt);
  5849. var toString = __webpack_require__(655);
  5850. var InternalStateModule = __webpack_require__(1181);
  5851. var defineIterator = __webpack_require__(1088);
  5852. var createIterResultObject = __webpack_require__(2529);
  5853. var STRING_ITERATOR = 'String Iterator';
  5854. var setInternalState = InternalStateModule.set;
  5855. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  5856. // `String.prototype[@@iterator]` method
  5857. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  5858. defineIterator(String, 'String', function (iterated) {
  5859. setInternalState(this, {
  5860. type: STRING_ITERATOR,
  5861. string: toString(iterated),
  5862. index: 0
  5863. });
  5864. // `%StringIteratorPrototype%.next` method
  5865. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  5866. }, function next() {
  5867. var state = getInternalState(this);
  5868. var string = state.string;
  5869. var index = state.index;
  5870. var point;
  5871. if (index >= string.length) return createIterResultObject(undefined, true);
  5872. point = charAt(string, index);
  5873. state.index += point.length;
  5874. return createIterResultObject(point, false);
  5875. });
  5876. /***/ }),
  5877. /***/ 778:
  5878. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5879. "use strict";
  5880. var $ = __webpack_require__(6518);
  5881. var createHTML = __webpack_require__(7240);
  5882. var forcedStringHTMLMethod = __webpack_require__(3061);
  5883. // `String.prototype.link` method
  5884. // https://tc39.es/ecma262/#sec-string.prototype.link
  5885. $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
  5886. link: function link(url) {
  5887. return createHTML(this, 'a', 'href', url);
  5888. }
  5889. });
  5890. /***/ }),
  5891. /***/ 1761:
  5892. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5893. "use strict";
  5894. var call = __webpack_require__(9565);
  5895. var fixRegExpWellKnownSymbolLogic = __webpack_require__(9228);
  5896. var anObject = __webpack_require__(8551);
  5897. var isNullOrUndefined = __webpack_require__(4117);
  5898. var toLength = __webpack_require__(8014);
  5899. var toString = __webpack_require__(655);
  5900. var requireObjectCoercible = __webpack_require__(7750);
  5901. var getMethod = __webpack_require__(5966);
  5902. var advanceStringIndex = __webpack_require__(7829);
  5903. var regExpExec = __webpack_require__(6682);
  5904. // @@match logic
  5905. fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
  5906. return [
  5907. // `String.prototype.match` method
  5908. // https://tc39.es/ecma262/#sec-string.prototype.match
  5909. function match(regexp) {
  5910. var O = requireObjectCoercible(this);
  5911. var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
  5912. return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
  5913. },
  5914. // `RegExp.prototype[@@match]` method
  5915. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  5916. function (string) {
  5917. var rx = anObject(this);
  5918. var S = toString(string);
  5919. var res = maybeCallNative(nativeMatch, rx, S);
  5920. if (res.done) return res.value;
  5921. if (!rx.global) return regExpExec(rx, S);
  5922. var fullUnicode = rx.unicode;
  5923. rx.lastIndex = 0;
  5924. var A = [];
  5925. var n = 0;
  5926. var result;
  5927. while ((result = regExpExec(rx, S)) !== null) {
  5928. var matchStr = toString(result[0]);
  5929. A[n] = matchStr;
  5930. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  5931. n++;
  5932. }
  5933. return n === 0 ? null : A;
  5934. }
  5935. ];
  5936. });
  5937. /***/ }),
  5938. /***/ 8156:
  5939. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5940. "use strict";
  5941. var $ = __webpack_require__(6518);
  5942. var $padStart = (__webpack_require__(533).start);
  5943. var WEBKIT_BUG = __webpack_require__(3063);
  5944. // `String.prototype.padStart` method
  5945. // https://tc39.es/ecma262/#sec-string.prototype.padstart
  5946. $({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
  5947. padStart: function padStart(maxLength /* , fillString = ' ' */) {
  5948. return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
  5949. }
  5950. });
  5951. /***/ }),
  5952. /***/ 5440:
  5953. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5954. "use strict";
  5955. var apply = __webpack_require__(8745);
  5956. var call = __webpack_require__(9565);
  5957. var uncurryThis = __webpack_require__(9504);
  5958. var fixRegExpWellKnownSymbolLogic = __webpack_require__(9228);
  5959. var fails = __webpack_require__(9039);
  5960. var anObject = __webpack_require__(8551);
  5961. var isCallable = __webpack_require__(4901);
  5962. var isNullOrUndefined = __webpack_require__(4117);
  5963. var toIntegerOrInfinity = __webpack_require__(1291);
  5964. var toLength = __webpack_require__(8014);
  5965. var toString = __webpack_require__(655);
  5966. var requireObjectCoercible = __webpack_require__(7750);
  5967. var advanceStringIndex = __webpack_require__(7829);
  5968. var getMethod = __webpack_require__(5966);
  5969. var getSubstitution = __webpack_require__(2478);
  5970. var regExpExec = __webpack_require__(6682);
  5971. var wellKnownSymbol = __webpack_require__(8227);
  5972. var REPLACE = wellKnownSymbol('replace');
  5973. var max = Math.max;
  5974. var min = Math.min;
  5975. var concat = uncurryThis([].concat);
  5976. var push = uncurryThis([].push);
  5977. var stringIndexOf = uncurryThis(''.indexOf);
  5978. var stringSlice = uncurryThis(''.slice);
  5979. var maybeToString = function (it) {
  5980. return it === undefined ? it : String(it);
  5981. };
  5982. // IE <= 11 replaces $0 with the whole match, as if it was $&
  5983. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  5984. var REPLACE_KEEPS_$0 = (function () {
  5985. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  5986. return 'a'.replace(/./, '$0') === '$0';
  5987. })();
  5988. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  5989. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  5990. if (/./[REPLACE]) {
  5991. return /./[REPLACE]('a', '$0') === '';
  5992. }
  5993. return false;
  5994. })();
  5995. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  5996. var re = /./;
  5997. re.exec = function () {
  5998. var result = [];
  5999. result.groups = { a: '7' };
  6000. return result;
  6001. };
  6002. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  6003. return ''.replace(re, '$<a>') !== '7';
  6004. });
  6005. // @@replace logic
  6006. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  6007. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  6008. return [
  6009. // `String.prototype.replace` method
  6010. // https://tc39.es/ecma262/#sec-string.prototype.replace
  6011. function replace(searchValue, replaceValue) {
  6012. var O = requireObjectCoercible(this);
  6013. var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
  6014. return replacer
  6015. ? call(replacer, searchValue, O, replaceValue)
  6016. : call(nativeReplace, toString(O), searchValue, replaceValue);
  6017. },
  6018. // `RegExp.prototype[@@replace]` method
  6019. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  6020. function (string, replaceValue) {
  6021. var rx = anObject(this);
  6022. var S = toString(string);
  6023. if (
  6024. typeof replaceValue == 'string' &&
  6025. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  6026. stringIndexOf(replaceValue, '$<') === -1
  6027. ) {
  6028. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  6029. if (res.done) return res.value;
  6030. }
  6031. var functionalReplace = isCallable(replaceValue);
  6032. if (!functionalReplace) replaceValue = toString(replaceValue);
  6033. var global = rx.global;
  6034. var fullUnicode;
  6035. if (global) {
  6036. fullUnicode = rx.unicode;
  6037. rx.lastIndex = 0;
  6038. }
  6039. var results = [];
  6040. var result;
  6041. while (true) {
  6042. result = regExpExec(rx, S);
  6043. if (result === null) break;
  6044. push(results, result);
  6045. if (!global) break;
  6046. var matchStr = toString(result[0]);
  6047. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  6048. }
  6049. var accumulatedResult = '';
  6050. var nextSourcePosition = 0;
  6051. for (var i = 0; i < results.length; i++) {
  6052. result = results[i];
  6053. var matched = toString(result[0]);
  6054. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  6055. var captures = [];
  6056. var replacement;
  6057. // NOTE: This is equivalent to
  6058. // captures = result.slice(1).map(maybeToString)
  6059. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  6060. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  6061. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  6062. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  6063. var namedCaptures = result.groups;
  6064. if (functionalReplace) {
  6065. var replacerArgs = concat([matched], captures, position, S);
  6066. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  6067. replacement = toString(apply(replaceValue, undefined, replacerArgs));
  6068. } else {
  6069. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  6070. }
  6071. if (position >= nextSourcePosition) {
  6072. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  6073. nextSourcePosition = position + matched.length;
  6074. }
  6075. }
  6076. return accumulatedResult + stringSlice(S, nextSourcePosition);
  6077. }
  6078. ];
  6079. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  6080. /***/ }),
  6081. /***/ 744:
  6082. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6083. "use strict";
  6084. var call = __webpack_require__(9565);
  6085. var uncurryThis = __webpack_require__(9504);
  6086. var fixRegExpWellKnownSymbolLogic = __webpack_require__(9228);
  6087. var anObject = __webpack_require__(8551);
  6088. var isNullOrUndefined = __webpack_require__(4117);
  6089. var requireObjectCoercible = __webpack_require__(7750);
  6090. var speciesConstructor = __webpack_require__(2293);
  6091. var advanceStringIndex = __webpack_require__(7829);
  6092. var toLength = __webpack_require__(8014);
  6093. var toString = __webpack_require__(655);
  6094. var getMethod = __webpack_require__(5966);
  6095. var regExpExec = __webpack_require__(6682);
  6096. var stickyHelpers = __webpack_require__(8429);
  6097. var fails = __webpack_require__(9039);
  6098. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  6099. var MAX_UINT32 = 0xFFFFFFFF;
  6100. var min = Math.min;
  6101. var push = uncurryThis([].push);
  6102. var stringSlice = uncurryThis(''.slice);
  6103. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  6104. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  6105. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  6106. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  6107. var re = /(?:)/;
  6108. var originalExec = re.exec;
  6109. re.exec = function () { return originalExec.apply(this, arguments); };
  6110. var result = 'ab'.split(re);
  6111. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  6112. });
  6113. var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
  6114. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  6115. 'test'.split(/(?:)/, -1).length !== 4 ||
  6116. 'ab'.split(/(?:ab)*/).length !== 2 ||
  6117. '.'.split(/(.?)(.?)/).length !== 4 ||
  6118. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  6119. '.'.split(/()()/).length > 1 ||
  6120. ''.split(/.?/).length;
  6121. // @@split logic
  6122. fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
  6123. var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
  6124. return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
  6125. } : nativeSplit;
  6126. return [
  6127. // `String.prototype.split` method
  6128. // https://tc39.es/ecma262/#sec-string.prototype.split
  6129. function split(separator, limit) {
  6130. var O = requireObjectCoercible(this);
  6131. var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);
  6132. return splitter
  6133. ? call(splitter, separator, O, limit)
  6134. : call(internalSplit, toString(O), separator, limit);
  6135. },
  6136. // `RegExp.prototype[@@split]` method
  6137. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  6138. //
  6139. // NOTE: This cannot be properly polyfilled in engines that don't support
  6140. // the 'y' flag.
  6141. function (string, limit) {
  6142. var rx = anObject(this);
  6143. var S = toString(string);
  6144. if (!BUGGY) {
  6145. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  6146. if (res.done) return res.value;
  6147. }
  6148. var C = speciesConstructor(rx, RegExp);
  6149. var unicodeMatching = rx.unicode;
  6150. var flags = (rx.ignoreCase ? 'i' : '') +
  6151. (rx.multiline ? 'm' : '') +
  6152. (rx.unicode ? 'u' : '') +
  6153. (UNSUPPORTED_Y ? 'g' : 'y');
  6154. // ^(? + rx + ) is needed, in combination with some S slicing, to
  6155. // simulate the 'y' flag.
  6156. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  6157. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  6158. if (lim === 0) return [];
  6159. if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];
  6160. var p = 0;
  6161. var q = 0;
  6162. var A = [];
  6163. while (q < S.length) {
  6164. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  6165. var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
  6166. var e;
  6167. if (
  6168. z === null ||
  6169. (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  6170. ) {
  6171. q = advanceStringIndex(S, q, unicodeMatching);
  6172. } else {
  6173. push(A, stringSlice(S, p, q));
  6174. if (A.length === lim) return A;
  6175. for (var i = 1; i <= z.length - 1; i++) {
  6176. push(A, z[i]);
  6177. if (A.length === lim) return A;
  6178. }
  6179. q = p = e;
  6180. }
  6181. }
  6182. push(A, stringSlice(S, p));
  6183. return A;
  6184. }
  6185. ];
  6186. }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  6187. /***/ }),
  6188. /***/ 8718:
  6189. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6190. "use strict";
  6191. var $ = __webpack_require__(6518);
  6192. var createHTML = __webpack_require__(7240);
  6193. var forcedStringHTMLMethod = __webpack_require__(3061);
  6194. // `String.prototype.sub` method
  6195. // https://tc39.es/ecma262/#sec-string.prototype.sub
  6196. $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {
  6197. sub: function sub() {
  6198. return createHTML(this, 'sub', '', '');
  6199. }
  6200. });
  6201. /***/ }),
  6202. /***/ 2762:
  6203. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6204. "use strict";
  6205. var $ = __webpack_require__(6518);
  6206. var $trim = (__webpack_require__(3802).trim);
  6207. var forcedStringTrimMethod = __webpack_require__(706);
  6208. // `String.prototype.trim` method
  6209. // https://tc39.es/ecma262/#sec-string.prototype.trim
  6210. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  6211. trim: function trim() {
  6212. return $trim(this);
  6213. }
  6214. });
  6215. /***/ }),
  6216. /***/ 6761:
  6217. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6218. "use strict";
  6219. var $ = __webpack_require__(6518);
  6220. var globalThis = __webpack_require__(4576);
  6221. var call = __webpack_require__(9565);
  6222. var uncurryThis = __webpack_require__(9504);
  6223. var IS_PURE = __webpack_require__(6395);
  6224. var DESCRIPTORS = __webpack_require__(3724);
  6225. var NATIVE_SYMBOL = __webpack_require__(4495);
  6226. var fails = __webpack_require__(9039);
  6227. var hasOwn = __webpack_require__(9297);
  6228. var isPrototypeOf = __webpack_require__(1625);
  6229. var anObject = __webpack_require__(8551);
  6230. var toIndexedObject = __webpack_require__(5397);
  6231. var toPropertyKey = __webpack_require__(6969);
  6232. var $toString = __webpack_require__(655);
  6233. var createPropertyDescriptor = __webpack_require__(6980);
  6234. var nativeObjectCreate = __webpack_require__(2360);
  6235. var objectKeys = __webpack_require__(1072);
  6236. var getOwnPropertyNamesModule = __webpack_require__(8480);
  6237. var getOwnPropertyNamesExternal = __webpack_require__(298);
  6238. var getOwnPropertySymbolsModule = __webpack_require__(3717);
  6239. var getOwnPropertyDescriptorModule = __webpack_require__(7347);
  6240. var definePropertyModule = __webpack_require__(4913);
  6241. var definePropertiesModule = __webpack_require__(6801);
  6242. var propertyIsEnumerableModule = __webpack_require__(8773);
  6243. var defineBuiltIn = __webpack_require__(6840);
  6244. var defineBuiltInAccessor = __webpack_require__(2106);
  6245. var shared = __webpack_require__(5745);
  6246. var sharedKey = __webpack_require__(6119);
  6247. var hiddenKeys = __webpack_require__(421);
  6248. var uid = __webpack_require__(3392);
  6249. var wellKnownSymbol = __webpack_require__(8227);
  6250. var wrappedWellKnownSymbolModule = __webpack_require__(1951);
  6251. var defineWellKnownSymbol = __webpack_require__(511);
  6252. var defineSymbolToPrimitive = __webpack_require__(8242);
  6253. var setToStringTag = __webpack_require__(687);
  6254. var InternalStateModule = __webpack_require__(1181);
  6255. var $forEach = (__webpack_require__(9213).forEach);
  6256. var HIDDEN = sharedKey('hidden');
  6257. var SYMBOL = 'Symbol';
  6258. var PROTOTYPE = 'prototype';
  6259. var setInternalState = InternalStateModule.set;
  6260. var getInternalState = InternalStateModule.getterFor(SYMBOL);
  6261. var ObjectPrototype = Object[PROTOTYPE];
  6262. var $Symbol = globalThis.Symbol;
  6263. var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
  6264. var RangeError = globalThis.RangeError;
  6265. var TypeError = globalThis.TypeError;
  6266. var QObject = globalThis.QObject;
  6267. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  6268. var nativeDefineProperty = definePropertyModule.f;
  6269. var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
  6270. var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
  6271. var push = uncurryThis([].push);
  6272. var AllSymbols = shared('symbols');
  6273. var ObjectPrototypeSymbols = shared('op-symbols');
  6274. var WellKnownSymbolsStore = shared('wks');
  6275. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  6276. var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  6277. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  6278. var fallbackDefineProperty = function (O, P, Attributes) {
  6279. var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  6280. if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  6281. nativeDefineProperty(O, P, Attributes);
  6282. if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
  6283. nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  6284. }
  6285. };
  6286. var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  6287. return nativeObjectCreate(nativeDefineProperty({}, 'a', {
  6288. get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  6289. })).a !== 7;
  6290. }) ? fallbackDefineProperty : nativeDefineProperty;
  6291. var wrap = function (tag, description) {
  6292. var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);
  6293. setInternalState(symbol, {
  6294. type: SYMBOL,
  6295. tag: tag,
  6296. description: description
  6297. });
  6298. if (!DESCRIPTORS) symbol.description = description;
  6299. return symbol;
  6300. };
  6301. var $defineProperty = function defineProperty(O, P, Attributes) {
  6302. if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  6303. anObject(O);
  6304. var key = toPropertyKey(P);
  6305. anObject(Attributes);
  6306. if (hasOwn(AllSymbols, key)) {
  6307. if (!Attributes.enumerable) {
  6308. if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, nativeObjectCreate(null)));
  6309. O[HIDDEN][key] = true;
  6310. } else {
  6311. if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
  6312. Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
  6313. } return setSymbolDescriptor(O, key, Attributes);
  6314. } return nativeDefineProperty(O, key, Attributes);
  6315. };
  6316. var $defineProperties = function defineProperties(O, Properties) {
  6317. anObject(O);
  6318. var properties = toIndexedObject(Properties);
  6319. var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  6320. $forEach(keys, function (key) {
  6321. if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);
  6322. });
  6323. return O;
  6324. };
  6325. var $create = function create(O, Properties) {
  6326. return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
  6327. };
  6328. var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  6329. var P = toPropertyKey(V);
  6330. var enumerable = call(nativePropertyIsEnumerable, this, P);
  6331. if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;
  6332. return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]
  6333. ? enumerable : true;
  6334. };
  6335. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  6336. var it = toIndexedObject(O);
  6337. var key = toPropertyKey(P);
  6338. if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;
  6339. var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  6340. if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {
  6341. descriptor.enumerable = true;
  6342. }
  6343. return descriptor;
  6344. };
  6345. var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  6346. var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  6347. var result = [];
  6348. $forEach(names, function (key) {
  6349. if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);
  6350. });
  6351. return result;
  6352. };
  6353. var $getOwnPropertySymbols = function (O) {
  6354. var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  6355. var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  6356. var result = [];
  6357. $forEach(names, function (key) {
  6358. if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {
  6359. push(result, AllSymbols[key]);
  6360. }
  6361. });
  6362. return result;
  6363. };
  6364. // `Symbol` constructor
  6365. // https://tc39.es/ecma262/#sec-symbol-constructor
  6366. if (!NATIVE_SYMBOL) {
  6367. $Symbol = function Symbol() {
  6368. if (isPrototypeOf(SymbolPrototype, this)) throw new TypeError('Symbol is not a constructor');
  6369. var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
  6370. var tag = uid(description);
  6371. var setter = function (value) {
  6372. var $this = this === undefined ? globalThis : this;
  6373. if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
  6374. if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false;
  6375. var descriptor = createPropertyDescriptor(1, value);
  6376. try {
  6377. setSymbolDescriptor($this, tag, descriptor);
  6378. } catch (error) {
  6379. if (!(error instanceof RangeError)) throw error;
  6380. fallbackDefineProperty($this, tag, descriptor);
  6381. }
  6382. };
  6383. if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
  6384. return wrap(tag, description);
  6385. };
  6386. SymbolPrototype = $Symbol[PROTOTYPE];
  6387. defineBuiltIn(SymbolPrototype, 'toString', function toString() {
  6388. return getInternalState(this).tag;
  6389. });
  6390. defineBuiltIn($Symbol, 'withoutSetter', function (description) {
  6391. return wrap(uid(description), description);
  6392. });
  6393. propertyIsEnumerableModule.f = $propertyIsEnumerable;
  6394. definePropertyModule.f = $defineProperty;
  6395. definePropertiesModule.f = $defineProperties;
  6396. getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  6397. getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  6398. getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
  6399. wrappedWellKnownSymbolModule.f = function (name) {
  6400. return wrap(wellKnownSymbol(name), name);
  6401. };
  6402. if (DESCRIPTORS) {
  6403. // https://github.com/tc39/proposal-Symbol-description
  6404. defineBuiltInAccessor(SymbolPrototype, 'description', {
  6405. configurable: true,
  6406. get: function description() {
  6407. return getInternalState(this).description;
  6408. }
  6409. });
  6410. if (!IS_PURE) {
  6411. defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
  6412. }
  6413. }
  6414. }
  6415. $({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  6416. Symbol: $Symbol
  6417. });
  6418. $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  6419. defineWellKnownSymbol(name);
  6420. });
  6421. $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  6422. useSetter: function () { USE_SETTER = true; },
  6423. useSimple: function () { USE_SETTER = false; }
  6424. });
  6425. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  6426. // `Object.create` method
  6427. // https://tc39.es/ecma262/#sec-object.create
  6428. create: $create,
  6429. // `Object.defineProperty` method
  6430. // https://tc39.es/ecma262/#sec-object.defineproperty
  6431. defineProperty: $defineProperty,
  6432. // `Object.defineProperties` method
  6433. // https://tc39.es/ecma262/#sec-object.defineproperties
  6434. defineProperties: $defineProperties,
  6435. // `Object.getOwnPropertyDescriptor` method
  6436. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  6437. getOwnPropertyDescriptor: $getOwnPropertyDescriptor
  6438. });
  6439. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  6440. // `Object.getOwnPropertyNames` method
  6441. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  6442. getOwnPropertyNames: $getOwnPropertyNames
  6443. });
  6444. // `Symbol.prototype[@@toPrimitive]` method
  6445. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  6446. defineSymbolToPrimitive();
  6447. // `Symbol.prototype[@@toStringTag]` property
  6448. // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
  6449. setToStringTag($Symbol, SYMBOL);
  6450. hiddenKeys[HIDDEN] = true;
  6451. /***/ }),
  6452. /***/ 9463:
  6453. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6454. "use strict";
  6455. // `Symbol.prototype.description` getter
  6456. // https://tc39.es/ecma262/#sec-symbol.prototype.description
  6457. var $ = __webpack_require__(6518);
  6458. var DESCRIPTORS = __webpack_require__(3724);
  6459. var globalThis = __webpack_require__(4576);
  6460. var uncurryThis = __webpack_require__(9504);
  6461. var hasOwn = __webpack_require__(9297);
  6462. var isCallable = __webpack_require__(4901);
  6463. var isPrototypeOf = __webpack_require__(1625);
  6464. var toString = __webpack_require__(655);
  6465. var defineBuiltInAccessor = __webpack_require__(2106);
  6466. var copyConstructorProperties = __webpack_require__(7740);
  6467. var NativeSymbol = globalThis.Symbol;
  6468. var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
  6469. if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
  6470. // Safari 12 bug
  6471. NativeSymbol().description !== undefined
  6472. )) {
  6473. var EmptyStringDescriptionStore = {};
  6474. // wrap Symbol constructor for correct work with undefined description
  6475. var SymbolWrapper = function Symbol() {
  6476. var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
  6477. var result = isPrototypeOf(SymbolPrototype, this)
  6478. // eslint-disable-next-line sonar/inconsistent-function-call -- ok
  6479. ? new NativeSymbol(description)
  6480. // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
  6481. : description === undefined ? NativeSymbol() : NativeSymbol(description);
  6482. if (description === '') EmptyStringDescriptionStore[result] = true;
  6483. return result;
  6484. };
  6485. copyConstructorProperties(SymbolWrapper, NativeSymbol);
  6486. SymbolWrapper.prototype = SymbolPrototype;
  6487. SymbolPrototype.constructor = SymbolWrapper;
  6488. var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
  6489. var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
  6490. var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
  6491. var regexp = /^Symbol\((.*)\)[^)]+$/;
  6492. var replace = uncurryThis(''.replace);
  6493. var stringSlice = uncurryThis(''.slice);
  6494. defineBuiltInAccessor(SymbolPrototype, 'description', {
  6495. configurable: true,
  6496. get: function description() {
  6497. var symbol = thisSymbolValue(this);
  6498. if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
  6499. var string = symbolDescriptiveString(symbol);
  6500. var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
  6501. return desc === '' ? undefined : desc;
  6502. }
  6503. });
  6504. $({ global: true, constructor: true, forced: true }, {
  6505. Symbol: SymbolWrapper
  6506. });
  6507. }
  6508. /***/ }),
  6509. /***/ 1510:
  6510. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6511. "use strict";
  6512. var $ = __webpack_require__(6518);
  6513. var getBuiltIn = __webpack_require__(7751);
  6514. var hasOwn = __webpack_require__(9297);
  6515. var toString = __webpack_require__(655);
  6516. var shared = __webpack_require__(5745);
  6517. var NATIVE_SYMBOL_REGISTRY = __webpack_require__(1296);
  6518. var StringToSymbolRegistry = shared('string-to-symbol-registry');
  6519. var SymbolToStringRegistry = shared('symbol-to-string-registry');
  6520. // `Symbol.for` method
  6521. // https://tc39.es/ecma262/#sec-symbol.for
  6522. $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
  6523. 'for': function (key) {
  6524. var string = toString(key);
  6525. if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
  6526. var symbol = getBuiltIn('Symbol')(string);
  6527. StringToSymbolRegistry[string] = symbol;
  6528. SymbolToStringRegistry[symbol] = string;
  6529. return symbol;
  6530. }
  6531. });
  6532. /***/ }),
  6533. /***/ 2259:
  6534. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6535. "use strict";
  6536. var defineWellKnownSymbol = __webpack_require__(511);
  6537. // `Symbol.iterator` well-known symbol
  6538. // https://tc39.es/ecma262/#sec-symbol.iterator
  6539. defineWellKnownSymbol('iterator');
  6540. /***/ }),
  6541. /***/ 2675:
  6542. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6543. "use strict";
  6544. // TODO: Remove this module from `core-js@4` since it's split to modules listed below
  6545. __webpack_require__(6761);
  6546. __webpack_require__(1510);
  6547. __webpack_require__(7812);
  6548. __webpack_require__(3110);
  6549. __webpack_require__(9773);
  6550. /***/ }),
  6551. /***/ 7812:
  6552. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6553. "use strict";
  6554. var $ = __webpack_require__(6518);
  6555. var hasOwn = __webpack_require__(9297);
  6556. var isSymbol = __webpack_require__(757);
  6557. var tryToString = __webpack_require__(6823);
  6558. var shared = __webpack_require__(5745);
  6559. var NATIVE_SYMBOL_REGISTRY = __webpack_require__(1296);
  6560. var SymbolToStringRegistry = shared('symbol-to-string-registry');
  6561. // `Symbol.keyFor` method
  6562. // https://tc39.es/ecma262/#sec-symbol.keyfor
  6563. $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
  6564. keyFor: function keyFor(sym) {
  6565. if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol');
  6566. if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  6567. }
  6568. });
  6569. /***/ }),
  6570. /***/ 5700:
  6571. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6572. "use strict";
  6573. var defineWellKnownSymbol = __webpack_require__(511);
  6574. var defineSymbolToPrimitive = __webpack_require__(8242);
  6575. // `Symbol.toPrimitive` well-known symbol
  6576. // https://tc39.es/ecma262/#sec-symbol.toprimitive
  6577. defineWellKnownSymbol('toPrimitive');
  6578. // `Symbol.prototype[@@toPrimitive]` method
  6579. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  6580. defineSymbolToPrimitive();
  6581. /***/ }),
  6582. /***/ 3500:
  6583. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6584. "use strict";
  6585. var globalThis = __webpack_require__(4576);
  6586. var DOMIterables = __webpack_require__(7400);
  6587. var DOMTokenListPrototype = __webpack_require__(9296);
  6588. var forEach = __webpack_require__(235);
  6589. var createNonEnumerableProperty = __webpack_require__(6699);
  6590. var handlePrototype = function (CollectionPrototype) {
  6591. // some Chrome versions have non-configurable methods on DOMTokenList
  6592. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  6593. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  6594. } catch (error) {
  6595. CollectionPrototype.forEach = forEach;
  6596. }
  6597. };
  6598. for (var COLLECTION_NAME in DOMIterables) {
  6599. if (DOMIterables[COLLECTION_NAME]) {
  6600. handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype);
  6601. }
  6602. }
  6603. handlePrototype(DOMTokenListPrototype);
  6604. /***/ }),
  6605. /***/ 2953:
  6606. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6607. "use strict";
  6608. var globalThis = __webpack_require__(4576);
  6609. var DOMIterables = __webpack_require__(7400);
  6610. var DOMTokenListPrototype = __webpack_require__(9296);
  6611. var ArrayIteratorMethods = __webpack_require__(3792);
  6612. var createNonEnumerableProperty = __webpack_require__(6699);
  6613. var setToStringTag = __webpack_require__(687);
  6614. var wellKnownSymbol = __webpack_require__(8227);
  6615. var ITERATOR = wellKnownSymbol('iterator');
  6616. var ArrayValues = ArrayIteratorMethods.values;
  6617. var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
  6618. if (CollectionPrototype) {
  6619. // some Chrome versions have non-configurable methods on DOMTokenList
  6620. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  6621. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  6622. } catch (error) {
  6623. CollectionPrototype[ITERATOR] = ArrayValues;
  6624. }
  6625. setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
  6626. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  6627. // some Chrome versions have non-configurable methods on DOMTokenList
  6628. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  6629. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  6630. } catch (error) {
  6631. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  6632. }
  6633. }
  6634. }
  6635. };
  6636. for (var COLLECTION_NAME in DOMIterables) {
  6637. handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype, COLLECTION_NAME);
  6638. }
  6639. handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
  6640. /***/ }),
  6641. /***/ 3611:
  6642. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  6643. "use strict";
  6644. var $ = __webpack_require__(6518);
  6645. var globalThis = __webpack_require__(4576);
  6646. var defineBuiltInAccessor = __webpack_require__(2106);
  6647. var DESCRIPTORS = __webpack_require__(3724);
  6648. var $TypeError = TypeError;
  6649. // eslint-disable-next-line es/no-object-defineproperty -- safe
  6650. var defineProperty = Object.defineProperty;
  6651. var INCORRECT_VALUE = globalThis.self !== globalThis;
  6652. // `self` getter
  6653. // https://html.spec.whatwg.org/multipage/window-object.html#dom-self
  6654. try {
  6655. if (DESCRIPTORS) {
  6656. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  6657. var descriptor = Object.getOwnPropertyDescriptor(globalThis, 'self');
  6658. // some engines have `self`, but with incorrect descriptor
  6659. // https://github.com/denoland/deno/issues/15765
  6660. if (INCORRECT_VALUE || !descriptor || !descriptor.get || !descriptor.enumerable) {
  6661. defineBuiltInAccessor(globalThis, 'self', {
  6662. get: function self() {
  6663. return globalThis;
  6664. },
  6665. set: function self(value) {
  6666. if (this !== globalThis) throw new $TypeError('Illegal invocation');
  6667. defineProperty(globalThis, 'self', {
  6668. value: value,
  6669. writable: true,
  6670. configurable: true,
  6671. enumerable: true
  6672. });
  6673. },
  6674. configurable: true,
  6675. enumerable: true
  6676. });
  6677. }
  6678. } else $({ global: true, simple: true, forced: INCORRECT_VALUE }, {
  6679. self: globalThis
  6680. });
  6681. } catch (error) { /* empty */ }
  6682. /***/ }),
  6683. /***/ 8406:
  6684. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  6685. "use strict";
  6686. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  6687. __webpack_require__(3792);
  6688. __webpack_require__(7337);
  6689. var $ = __webpack_require__(6518);
  6690. var globalThis = __webpack_require__(4576);
  6691. var safeGetBuiltIn = __webpack_require__(3389);
  6692. var getBuiltIn = __webpack_require__(7751);
  6693. var call = __webpack_require__(9565);
  6694. var uncurryThis = __webpack_require__(9504);
  6695. var DESCRIPTORS = __webpack_require__(3724);
  6696. var USE_NATIVE_URL = __webpack_require__(7416);
  6697. var defineBuiltIn = __webpack_require__(6840);
  6698. var defineBuiltInAccessor = __webpack_require__(2106);
  6699. var defineBuiltIns = __webpack_require__(6279);
  6700. var setToStringTag = __webpack_require__(687);
  6701. var createIteratorConstructor = __webpack_require__(3994);
  6702. var InternalStateModule = __webpack_require__(1181);
  6703. var anInstance = __webpack_require__(679);
  6704. var isCallable = __webpack_require__(4901);
  6705. var hasOwn = __webpack_require__(9297);
  6706. var bind = __webpack_require__(6080);
  6707. var classof = __webpack_require__(6955);
  6708. var anObject = __webpack_require__(8551);
  6709. var isObject = __webpack_require__(34);
  6710. var $toString = __webpack_require__(655);
  6711. var create = __webpack_require__(2360);
  6712. var createPropertyDescriptor = __webpack_require__(6980);
  6713. var getIterator = __webpack_require__(81);
  6714. var getIteratorMethod = __webpack_require__(851);
  6715. var createIterResultObject = __webpack_require__(2529);
  6716. var validateArgumentsLength = __webpack_require__(2812);
  6717. var wellKnownSymbol = __webpack_require__(8227);
  6718. var arraySort = __webpack_require__(4488);
  6719. var ITERATOR = wellKnownSymbol('iterator');
  6720. var URL_SEARCH_PARAMS = 'URLSearchParams';
  6721. var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
  6722. var setInternalState = InternalStateModule.set;
  6723. var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
  6724. var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
  6725. var nativeFetch = safeGetBuiltIn('fetch');
  6726. var NativeRequest = safeGetBuiltIn('Request');
  6727. var Headers = safeGetBuiltIn('Headers');
  6728. var RequestPrototype = NativeRequest && NativeRequest.prototype;
  6729. var HeadersPrototype = Headers && Headers.prototype;
  6730. var TypeError = globalThis.TypeError;
  6731. var encodeURIComponent = globalThis.encodeURIComponent;
  6732. var fromCharCode = String.fromCharCode;
  6733. var fromCodePoint = getBuiltIn('String', 'fromCodePoint');
  6734. var $parseInt = parseInt;
  6735. var charAt = uncurryThis(''.charAt);
  6736. var join = uncurryThis([].join);
  6737. var push = uncurryThis([].push);
  6738. var replace = uncurryThis(''.replace);
  6739. var shift = uncurryThis([].shift);
  6740. var splice = uncurryThis([].splice);
  6741. var split = uncurryThis(''.split);
  6742. var stringSlice = uncurryThis(''.slice);
  6743. var exec = uncurryThis(/./.exec);
  6744. var plus = /\+/g;
  6745. var FALLBACK_REPLACER = '\uFFFD';
  6746. var VALID_HEX = /^[0-9a-f]+$/i;
  6747. var parseHexOctet = function (string, start) {
  6748. var substr = stringSlice(string, start, start + 2);
  6749. if (!exec(VALID_HEX, substr)) return NaN;
  6750. return $parseInt(substr, 16);
  6751. };
  6752. var getLeadingOnes = function (octet) {
  6753. var count = 0;
  6754. for (var mask = 0x80; mask > 0 && (octet & mask) !== 0; mask >>= 1) {
  6755. count++;
  6756. }
  6757. return count;
  6758. };
  6759. var utf8Decode = function (octets) {
  6760. var codePoint = null;
  6761. switch (octets.length) {
  6762. case 1:
  6763. codePoint = octets[0];
  6764. break;
  6765. case 2:
  6766. codePoint = (octets[0] & 0x1F) << 6 | (octets[1] & 0x3F);
  6767. break;
  6768. case 3:
  6769. codePoint = (octets[0] & 0x0F) << 12 | (octets[1] & 0x3F) << 6 | (octets[2] & 0x3F);
  6770. break;
  6771. case 4:
  6772. codePoint = (octets[0] & 0x07) << 18 | (octets[1] & 0x3F) << 12 | (octets[2] & 0x3F) << 6 | (octets[3] & 0x3F);
  6773. break;
  6774. }
  6775. return codePoint > 0x10FFFF ? null : codePoint;
  6776. };
  6777. var decode = function (input) {
  6778. input = replace(input, plus, ' ');
  6779. var length = input.length;
  6780. var result = '';
  6781. var i = 0;
  6782. while (i < length) {
  6783. var decodedChar = charAt(input, i);
  6784. if (decodedChar === '%') {
  6785. if (charAt(input, i + 1) === '%' || i + 3 > length) {
  6786. result += '%';
  6787. i++;
  6788. continue;
  6789. }
  6790. var octet = parseHexOctet(input, i + 1);
  6791. // eslint-disable-next-line no-self-compare -- NaN check
  6792. if (octet !== octet) {
  6793. result += decodedChar;
  6794. i++;
  6795. continue;
  6796. }
  6797. i += 2;
  6798. var byteSequenceLength = getLeadingOnes(octet);
  6799. if (byteSequenceLength === 0) {
  6800. decodedChar = fromCharCode(octet);
  6801. } else {
  6802. if (byteSequenceLength === 1 || byteSequenceLength > 4) {
  6803. result += FALLBACK_REPLACER;
  6804. i++;
  6805. continue;
  6806. }
  6807. var octets = [octet];
  6808. var sequenceIndex = 1;
  6809. while (sequenceIndex < byteSequenceLength) {
  6810. i++;
  6811. if (i + 3 > length || charAt(input, i) !== '%') break;
  6812. var nextByte = parseHexOctet(input, i + 1);
  6813. // eslint-disable-next-line no-self-compare -- NaN check
  6814. if (nextByte !== nextByte) {
  6815. i += 3;
  6816. break;
  6817. }
  6818. if (nextByte > 191 || nextByte < 128) break;
  6819. push(octets, nextByte);
  6820. i += 2;
  6821. sequenceIndex++;
  6822. }
  6823. if (octets.length !== byteSequenceLength) {
  6824. result += FALLBACK_REPLACER;
  6825. continue;
  6826. }
  6827. var codePoint = utf8Decode(octets);
  6828. if (codePoint === null) {
  6829. result += FALLBACK_REPLACER;
  6830. } else {
  6831. decodedChar = fromCodePoint(codePoint);
  6832. }
  6833. }
  6834. }
  6835. result += decodedChar;
  6836. i++;
  6837. }
  6838. return result;
  6839. };
  6840. var find = /[!'()~]|%20/g;
  6841. var replacements = {
  6842. '!': '%21',
  6843. "'": '%27',
  6844. '(': '%28',
  6845. ')': '%29',
  6846. '~': '%7E',
  6847. '%20': '+'
  6848. };
  6849. var replacer = function (match) {
  6850. return replacements[match];
  6851. };
  6852. var serialize = function (it) {
  6853. return replace(encodeURIComponent(it), find, replacer);
  6854. };
  6855. var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
  6856. setInternalState(this, {
  6857. type: URL_SEARCH_PARAMS_ITERATOR,
  6858. target: getInternalParamsState(params).entries,
  6859. index: 0,
  6860. kind: kind
  6861. });
  6862. }, URL_SEARCH_PARAMS, function next() {
  6863. var state = getInternalIteratorState(this);
  6864. var target = state.target;
  6865. var index = state.index++;
  6866. if (!target || index >= target.length) {
  6867. state.target = null;
  6868. return createIterResultObject(undefined, true);
  6869. }
  6870. var entry = target[index];
  6871. switch (state.kind) {
  6872. case 'keys': return createIterResultObject(entry.key, false);
  6873. case 'values': return createIterResultObject(entry.value, false);
  6874. } return createIterResultObject([entry.key, entry.value], false);
  6875. }, true);
  6876. var URLSearchParamsState = function (init) {
  6877. this.entries = [];
  6878. this.url = null;
  6879. if (init !== undefined) {
  6880. if (isObject(init)) this.parseObject(init);
  6881. else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));
  6882. }
  6883. };
  6884. URLSearchParamsState.prototype = {
  6885. type: URL_SEARCH_PARAMS,
  6886. bindURL: function (url) {
  6887. this.url = url;
  6888. this.update();
  6889. },
  6890. parseObject: function (object) {
  6891. var entries = this.entries;
  6892. var iteratorMethod = getIteratorMethod(object);
  6893. var iterator, next, step, entryIterator, entryNext, first, second;
  6894. if (iteratorMethod) {
  6895. iterator = getIterator(object, iteratorMethod);
  6896. next = iterator.next;
  6897. while (!(step = call(next, iterator)).done) {
  6898. entryIterator = getIterator(anObject(step.value));
  6899. entryNext = entryIterator.next;
  6900. if (
  6901. (first = call(entryNext, entryIterator)).done ||
  6902. (second = call(entryNext, entryIterator)).done ||
  6903. !call(entryNext, entryIterator).done
  6904. ) throw new TypeError('Expected sequence with length 2');
  6905. push(entries, { key: $toString(first.value), value: $toString(second.value) });
  6906. }
  6907. } else for (var key in object) if (hasOwn(object, key)) {
  6908. push(entries, { key: key, value: $toString(object[key]) });
  6909. }
  6910. },
  6911. parseQuery: function (query) {
  6912. if (query) {
  6913. var entries = this.entries;
  6914. var attributes = split(query, '&');
  6915. var index = 0;
  6916. var attribute, entry;
  6917. while (index < attributes.length) {
  6918. attribute = attributes[index++];
  6919. if (attribute.length) {
  6920. entry = split(attribute, '=');
  6921. push(entries, {
  6922. key: decode(shift(entry)),
  6923. value: decode(join(entry, '='))
  6924. });
  6925. }
  6926. }
  6927. }
  6928. },
  6929. serialize: function () {
  6930. var entries = this.entries;
  6931. var result = [];
  6932. var index = 0;
  6933. var entry;
  6934. while (index < entries.length) {
  6935. entry = entries[index++];
  6936. push(result, serialize(entry.key) + '=' + serialize(entry.value));
  6937. } return join(result, '&');
  6938. },
  6939. update: function () {
  6940. this.entries.length = 0;
  6941. this.parseQuery(this.url.query);
  6942. },
  6943. updateURL: function () {
  6944. if (this.url) this.url.update();
  6945. }
  6946. };
  6947. // `URLSearchParams` constructor
  6948. // https://url.spec.whatwg.org/#interface-urlsearchparams
  6949. var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
  6950. anInstance(this, URLSearchParamsPrototype);
  6951. var init = arguments.length > 0 ? arguments[0] : undefined;
  6952. var state = setInternalState(this, new URLSearchParamsState(init));
  6953. if (!DESCRIPTORS) this.size = state.entries.length;
  6954. };
  6955. var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
  6956. defineBuiltIns(URLSearchParamsPrototype, {
  6957. // `URLSearchParams.prototype.append` method
  6958. // https://url.spec.whatwg.org/#dom-urlsearchparams-append
  6959. append: function append(name, value) {
  6960. var state = getInternalParamsState(this);
  6961. validateArgumentsLength(arguments.length, 2);
  6962. push(state.entries, { key: $toString(name), value: $toString(value) });
  6963. if (!DESCRIPTORS) this.length++;
  6964. state.updateURL();
  6965. },
  6966. // `URLSearchParams.prototype.delete` method
  6967. // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
  6968. 'delete': function (name /* , value */) {
  6969. var state = getInternalParamsState(this);
  6970. var length = validateArgumentsLength(arguments.length, 1);
  6971. var entries = state.entries;
  6972. var key = $toString(name);
  6973. var $value = length < 2 ? undefined : arguments[1];
  6974. var value = $value === undefined ? $value : $toString($value);
  6975. var index = 0;
  6976. while (index < entries.length) {
  6977. var entry = entries[index];
  6978. if (entry.key === key && (value === undefined || entry.value === value)) {
  6979. splice(entries, index, 1);
  6980. if (value !== undefined) break;
  6981. } else index++;
  6982. }
  6983. if (!DESCRIPTORS) this.size = entries.length;
  6984. state.updateURL();
  6985. },
  6986. // `URLSearchParams.prototype.get` method
  6987. // https://url.spec.whatwg.org/#dom-urlsearchparams-get
  6988. get: function get(name) {
  6989. var entries = getInternalParamsState(this).entries;
  6990. validateArgumentsLength(arguments.length, 1);
  6991. var key = $toString(name);
  6992. var index = 0;
  6993. for (; index < entries.length; index++) {
  6994. if (entries[index].key === key) return entries[index].value;
  6995. }
  6996. return null;
  6997. },
  6998. // `URLSearchParams.prototype.getAll` method
  6999. // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
  7000. getAll: function getAll(name) {
  7001. var entries = getInternalParamsState(this).entries;
  7002. validateArgumentsLength(arguments.length, 1);
  7003. var key = $toString(name);
  7004. var result = [];
  7005. var index = 0;
  7006. for (; index < entries.length; index++) {
  7007. if (entries[index].key === key) push(result, entries[index].value);
  7008. }
  7009. return result;
  7010. },
  7011. // `URLSearchParams.prototype.has` method
  7012. // https://url.spec.whatwg.org/#dom-urlsearchparams-has
  7013. has: function has(name /* , value */) {
  7014. var entries = getInternalParamsState(this).entries;
  7015. var length = validateArgumentsLength(arguments.length, 1);
  7016. var key = $toString(name);
  7017. var $value = length < 2 ? undefined : arguments[1];
  7018. var value = $value === undefined ? $value : $toString($value);
  7019. var index = 0;
  7020. while (index < entries.length) {
  7021. var entry = entries[index++];
  7022. if (entry.key === key && (value === undefined || entry.value === value)) return true;
  7023. }
  7024. return false;
  7025. },
  7026. // `URLSearchParams.prototype.set` method
  7027. // https://url.spec.whatwg.org/#dom-urlsearchparams-set
  7028. set: function set(name, value) {
  7029. var state = getInternalParamsState(this);
  7030. validateArgumentsLength(arguments.length, 1);
  7031. var entries = state.entries;
  7032. var found = false;
  7033. var key = $toString(name);
  7034. var val = $toString(value);
  7035. var index = 0;
  7036. var entry;
  7037. for (; index < entries.length; index++) {
  7038. entry = entries[index];
  7039. if (entry.key === key) {
  7040. if (found) splice(entries, index--, 1);
  7041. else {
  7042. found = true;
  7043. entry.value = val;
  7044. }
  7045. }
  7046. }
  7047. if (!found) push(entries, { key: key, value: val });
  7048. if (!DESCRIPTORS) this.size = entries.length;
  7049. state.updateURL();
  7050. },
  7051. // `URLSearchParams.prototype.sort` method
  7052. // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
  7053. sort: function sort() {
  7054. var state = getInternalParamsState(this);
  7055. arraySort(state.entries, function (a, b) {
  7056. return a.key > b.key ? 1 : -1;
  7057. });
  7058. state.updateURL();
  7059. },
  7060. // `URLSearchParams.prototype.forEach` method
  7061. forEach: function forEach(callback /* , thisArg */) {
  7062. var entries = getInternalParamsState(this).entries;
  7063. var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);
  7064. var index = 0;
  7065. var entry;
  7066. while (index < entries.length) {
  7067. entry = entries[index++];
  7068. boundFunction(entry.value, entry.key, this);
  7069. }
  7070. },
  7071. // `URLSearchParams.prototype.keys` method
  7072. keys: function keys() {
  7073. return new URLSearchParamsIterator(this, 'keys');
  7074. },
  7075. // `URLSearchParams.prototype.values` method
  7076. values: function values() {
  7077. return new URLSearchParamsIterator(this, 'values');
  7078. },
  7079. // `URLSearchParams.prototype.entries` method
  7080. entries: function entries() {
  7081. return new URLSearchParamsIterator(this, 'entries');
  7082. }
  7083. }, { enumerable: true });
  7084. // `URLSearchParams.prototype[@@iterator]` method
  7085. defineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });
  7086. // `URLSearchParams.prototype.toString` method
  7087. // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
  7088. defineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {
  7089. return getInternalParamsState(this).serialize();
  7090. }, { enumerable: true });
  7091. // `URLSearchParams.prototype.size` getter
  7092. // https://github.com/whatwg/url/pull/734
  7093. if (DESCRIPTORS) defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
  7094. get: function size() {
  7095. return getInternalParamsState(this).entries.length;
  7096. },
  7097. configurable: true,
  7098. enumerable: true
  7099. });
  7100. setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
  7101. $({ global: true, constructor: true, forced: !USE_NATIVE_URL }, {
  7102. URLSearchParams: URLSearchParamsConstructor
  7103. });
  7104. // Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`
  7105. if (!USE_NATIVE_URL && isCallable(Headers)) {
  7106. var headersHas = uncurryThis(HeadersPrototype.has);
  7107. var headersSet = uncurryThis(HeadersPrototype.set);
  7108. var wrapRequestOptions = function (init) {
  7109. if (isObject(init)) {
  7110. var body = init.body;
  7111. var headers;
  7112. if (classof(body) === URL_SEARCH_PARAMS) {
  7113. headers = init.headers ? new Headers(init.headers) : new Headers();
  7114. if (!headersHas(headers, 'content-type')) {
  7115. headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
  7116. }
  7117. return create(init, {
  7118. body: createPropertyDescriptor(0, $toString(body)),
  7119. headers: createPropertyDescriptor(0, headers)
  7120. });
  7121. }
  7122. } return init;
  7123. };
  7124. if (isCallable(nativeFetch)) {
  7125. $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {
  7126. fetch: function fetch(input /* , init */) {
  7127. return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
  7128. }
  7129. });
  7130. }
  7131. if (isCallable(NativeRequest)) {
  7132. var RequestConstructor = function Request(input /* , init */) {
  7133. anInstance(this, RequestPrototype);
  7134. return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
  7135. };
  7136. RequestPrototype.constructor = RequestConstructor;
  7137. RequestConstructor.prototype = RequestPrototype;
  7138. $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {
  7139. Request: RequestConstructor
  7140. });
  7141. }
  7142. }
  7143. module.exports = {
  7144. URLSearchParams: URLSearchParamsConstructor,
  7145. getState: getInternalParamsState
  7146. };
  7147. /***/ }),
  7148. /***/ 4603:
  7149. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  7150. "use strict";
  7151. var defineBuiltIn = __webpack_require__(6840);
  7152. var uncurryThis = __webpack_require__(9504);
  7153. var toString = __webpack_require__(655);
  7154. var validateArgumentsLength = __webpack_require__(2812);
  7155. var $URLSearchParams = URLSearchParams;
  7156. var URLSearchParamsPrototype = $URLSearchParams.prototype;
  7157. var append = uncurryThis(URLSearchParamsPrototype.append);
  7158. var $delete = uncurryThis(URLSearchParamsPrototype['delete']);
  7159. var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
  7160. var push = uncurryThis([].push);
  7161. var params = new $URLSearchParams('a=1&a=2&b=3');
  7162. params['delete']('a', 1);
  7163. // `undefined` case is a Chromium 117 bug
  7164. // https://bugs.chromium.org/p/v8/issues/detail?id=14222
  7165. params['delete']('b', undefined);
  7166. if (params + '' !== 'a=2') {
  7167. defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) {
  7168. var length = arguments.length;
  7169. var $value = length < 2 ? undefined : arguments[1];
  7170. if (length && $value === undefined) return $delete(this, name);
  7171. var entries = [];
  7172. forEach(this, function (v, k) { // also validates `this`
  7173. push(entries, { key: k, value: v });
  7174. });
  7175. validateArgumentsLength(length, 1);
  7176. var key = toString(name);
  7177. var value = toString($value);
  7178. var index = 0;
  7179. var dindex = 0;
  7180. var found = false;
  7181. var entriesLength = entries.length;
  7182. var entry;
  7183. while (index < entriesLength) {
  7184. entry = entries[index++];
  7185. if (found || entry.key === key) {
  7186. found = true;
  7187. $delete(this, entry.key);
  7188. } else dindex++;
  7189. }
  7190. while (dindex < entriesLength) {
  7191. entry = entries[dindex++];
  7192. if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
  7193. }
  7194. }, { enumerable: true, unsafe: true });
  7195. }
  7196. /***/ }),
  7197. /***/ 7566:
  7198. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  7199. "use strict";
  7200. var defineBuiltIn = __webpack_require__(6840);
  7201. var uncurryThis = __webpack_require__(9504);
  7202. var toString = __webpack_require__(655);
  7203. var validateArgumentsLength = __webpack_require__(2812);
  7204. var $URLSearchParams = URLSearchParams;
  7205. var URLSearchParamsPrototype = $URLSearchParams.prototype;
  7206. var getAll = uncurryThis(URLSearchParamsPrototype.getAll);
  7207. var $has = uncurryThis(URLSearchParamsPrototype.has);
  7208. var params = new $URLSearchParams('a=1');
  7209. // `undefined` case is a Chromium 117 bug
  7210. // https://bugs.chromium.org/p/v8/issues/detail?id=14222
  7211. if (params.has('a', 2) || !params.has('a', undefined)) {
  7212. defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) {
  7213. var length = arguments.length;
  7214. var $value = length < 2 ? undefined : arguments[1];
  7215. if (length && $value === undefined) return $has(this, name);
  7216. var values = getAll(this, name); // also validates `this`
  7217. validateArgumentsLength(length, 1);
  7218. var value = toString($value);
  7219. var index = 0;
  7220. while (index < values.length) {
  7221. if (values[index++] === value) return true;
  7222. } return false;
  7223. }, { enumerable: true, unsafe: true });
  7224. }
  7225. /***/ }),
  7226. /***/ 8408:
  7227. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  7228. "use strict";
  7229. // TODO: Remove this module from `core-js@4` since it's replaced to module below
  7230. __webpack_require__(8406);
  7231. /***/ }),
  7232. /***/ 8721:
  7233. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  7234. "use strict";
  7235. var DESCRIPTORS = __webpack_require__(3724);
  7236. var uncurryThis = __webpack_require__(9504);
  7237. var defineBuiltInAccessor = __webpack_require__(2106);
  7238. var URLSearchParamsPrototype = URLSearchParams.prototype;
  7239. var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
  7240. // `URLSearchParams.prototype.size` getter
  7241. // https://github.com/whatwg/url/pull/734
  7242. if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
  7243. defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
  7244. get: function size() {
  7245. var count = 0;
  7246. forEach(this, function () { count++; });
  7247. return count;
  7248. },
  7249. configurable: true,
  7250. enumerable: true
  7251. });
  7252. }
  7253. /***/ }),
  7254. /***/ 5806:
  7255. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  7256. "use strict";
  7257. // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
  7258. __webpack_require__(7764);
  7259. var $ = __webpack_require__(6518);
  7260. var DESCRIPTORS = __webpack_require__(3724);
  7261. var USE_NATIVE_URL = __webpack_require__(7416);
  7262. var globalThis = __webpack_require__(4576);
  7263. var bind = __webpack_require__(6080);
  7264. var uncurryThis = __webpack_require__(9504);
  7265. var defineBuiltIn = __webpack_require__(6840);
  7266. var defineBuiltInAccessor = __webpack_require__(2106);
  7267. var anInstance = __webpack_require__(679);
  7268. var hasOwn = __webpack_require__(9297);
  7269. var assign = __webpack_require__(4213);
  7270. var arrayFrom = __webpack_require__(7916);
  7271. var arraySlice = __webpack_require__(7680);
  7272. var codeAt = (__webpack_require__(8183).codeAt);
  7273. var toASCII = __webpack_require__(6098);
  7274. var $toString = __webpack_require__(655);
  7275. var setToStringTag = __webpack_require__(687);
  7276. var validateArgumentsLength = __webpack_require__(2812);
  7277. var URLSearchParamsModule = __webpack_require__(8406);
  7278. var InternalStateModule = __webpack_require__(1181);
  7279. var setInternalState = InternalStateModule.set;
  7280. var getInternalURLState = InternalStateModule.getterFor('URL');
  7281. var URLSearchParams = URLSearchParamsModule.URLSearchParams;
  7282. var getInternalSearchParamsState = URLSearchParamsModule.getState;
  7283. var NativeURL = globalThis.URL;
  7284. var TypeError = globalThis.TypeError;
  7285. var parseInt = globalThis.parseInt;
  7286. var floor = Math.floor;
  7287. var pow = Math.pow;
  7288. var charAt = uncurryThis(''.charAt);
  7289. var exec = uncurryThis(/./.exec);
  7290. var join = uncurryThis([].join);
  7291. var numberToString = uncurryThis(1.0.toString);
  7292. var pop = uncurryThis([].pop);
  7293. var push = uncurryThis([].push);
  7294. var replace = uncurryThis(''.replace);
  7295. var shift = uncurryThis([].shift);
  7296. var split = uncurryThis(''.split);
  7297. var stringSlice = uncurryThis(''.slice);
  7298. var toLowerCase = uncurryThis(''.toLowerCase);
  7299. var unshift = uncurryThis([].unshift);
  7300. var INVALID_AUTHORITY = 'Invalid authority';
  7301. var INVALID_SCHEME = 'Invalid scheme';
  7302. var INVALID_HOST = 'Invalid host';
  7303. var INVALID_PORT = 'Invalid port';
  7304. var ALPHA = /[a-z]/i;
  7305. // eslint-disable-next-line regexp/no-obscure-range -- safe
  7306. var ALPHANUMERIC = /[\d+-.a-z]/i;
  7307. var DIGIT = /\d/;
  7308. var HEX_START = /^0x/i;
  7309. var OCT = /^[0-7]+$/;
  7310. var DEC = /^\d+$/;
  7311. var HEX = /^[\da-f]+$/i;
  7312. /* eslint-disable regexp/no-control-character -- safe */
  7313. var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/;
  7314. var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/;
  7315. var LEADING_C0_CONTROL_OR_SPACE = /^[\u0000-\u0020]+/;
  7316. var TRAILING_C0_CONTROL_OR_SPACE = /(^|[^\u0000-\u0020])[\u0000-\u0020]+$/;
  7317. var TAB_AND_NEW_LINE = /[\t\n\r]/g;
  7318. /* eslint-enable regexp/no-control-character -- safe */
  7319. var EOF;
  7320. // https://url.spec.whatwg.org/#ipv4-number-parser
  7321. var parseIPv4 = function (input) {
  7322. var parts = split(input, '.');
  7323. var partsLength, numbers, index, part, radix, number, ipv4;
  7324. if (parts.length && parts[parts.length - 1] === '') {
  7325. parts.length--;
  7326. }
  7327. partsLength = parts.length;
  7328. if (partsLength > 4) return input;
  7329. numbers = [];
  7330. for (index = 0; index < partsLength; index++) {
  7331. part = parts[index];
  7332. if (part === '') return input;
  7333. radix = 10;
  7334. if (part.length > 1 && charAt(part, 0) === '0') {
  7335. radix = exec(HEX_START, part) ? 16 : 8;
  7336. part = stringSlice(part, radix === 8 ? 1 : 2);
  7337. }
  7338. if (part === '') {
  7339. number = 0;
  7340. } else {
  7341. if (!exec(radix === 10 ? DEC : radix === 8 ? OCT : HEX, part)) return input;
  7342. number = parseInt(part, radix);
  7343. }
  7344. push(numbers, number);
  7345. }
  7346. for (index = 0; index < partsLength; index++) {
  7347. number = numbers[index];
  7348. if (index === partsLength - 1) {
  7349. if (number >= pow(256, 5 - partsLength)) return null;
  7350. } else if (number > 255) return null;
  7351. }
  7352. ipv4 = pop(numbers);
  7353. for (index = 0; index < numbers.length; index++) {
  7354. ipv4 += numbers[index] * pow(256, 3 - index);
  7355. }
  7356. return ipv4;
  7357. };
  7358. // https://url.spec.whatwg.org/#concept-ipv6-parser
  7359. // eslint-disable-next-line max-statements -- TODO
  7360. var parseIPv6 = function (input) {
  7361. var address = [0, 0, 0, 0, 0, 0, 0, 0];
  7362. var pieceIndex = 0;
  7363. var compress = null;
  7364. var pointer = 0;
  7365. var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
  7366. var chr = function () {
  7367. return charAt(input, pointer);
  7368. };
  7369. if (chr() === ':') {
  7370. if (charAt(input, 1) !== ':') return;
  7371. pointer += 2;
  7372. pieceIndex++;
  7373. compress = pieceIndex;
  7374. }
  7375. while (chr()) {
  7376. if (pieceIndex === 8) return;
  7377. if (chr() === ':') {
  7378. if (compress !== null) return;
  7379. pointer++;
  7380. pieceIndex++;
  7381. compress = pieceIndex;
  7382. continue;
  7383. }
  7384. value = length = 0;
  7385. while (length < 4 && exec(HEX, chr())) {
  7386. value = value * 16 + parseInt(chr(), 16);
  7387. pointer++;
  7388. length++;
  7389. }
  7390. if (chr() === '.') {
  7391. if (length === 0) return;
  7392. pointer -= length;
  7393. if (pieceIndex > 6) return;
  7394. numbersSeen = 0;
  7395. while (chr()) {
  7396. ipv4Piece = null;
  7397. if (numbersSeen > 0) {
  7398. if (chr() === '.' && numbersSeen < 4) pointer++;
  7399. else return;
  7400. }
  7401. if (!exec(DIGIT, chr())) return;
  7402. while (exec(DIGIT, chr())) {
  7403. number = parseInt(chr(), 10);
  7404. if (ipv4Piece === null) ipv4Piece = number;
  7405. else if (ipv4Piece === 0) return;
  7406. else ipv4Piece = ipv4Piece * 10 + number;
  7407. if (ipv4Piece > 255) return;
  7408. pointer++;
  7409. }
  7410. address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
  7411. numbersSeen++;
  7412. if (numbersSeen === 2 || numbersSeen === 4) pieceIndex++;
  7413. }
  7414. if (numbersSeen !== 4) return;
  7415. break;
  7416. } else if (chr() === ':') {
  7417. pointer++;
  7418. if (!chr()) return;
  7419. } else if (chr()) return;
  7420. address[pieceIndex++] = value;
  7421. }
  7422. if (compress !== null) {
  7423. swaps = pieceIndex - compress;
  7424. pieceIndex = 7;
  7425. while (pieceIndex !== 0 && swaps > 0) {
  7426. swap = address[pieceIndex];
  7427. address[pieceIndex--] = address[compress + swaps - 1];
  7428. address[compress + --swaps] = swap;
  7429. }
  7430. } else if (pieceIndex !== 8) return;
  7431. return address;
  7432. };
  7433. var findLongestZeroSequence = function (ipv6) {
  7434. var maxIndex = null;
  7435. var maxLength = 1;
  7436. var currStart = null;
  7437. var currLength = 0;
  7438. var index = 0;
  7439. for (; index < 8; index++) {
  7440. if (ipv6[index] !== 0) {
  7441. if (currLength > maxLength) {
  7442. maxIndex = currStart;
  7443. maxLength = currLength;
  7444. }
  7445. currStart = null;
  7446. currLength = 0;
  7447. } else {
  7448. if (currStart === null) currStart = index;
  7449. ++currLength;
  7450. }
  7451. }
  7452. return currLength > maxLength ? currStart : maxIndex;
  7453. };
  7454. // https://url.spec.whatwg.org/#host-serializing
  7455. var serializeHost = function (host) {
  7456. var result, index, compress, ignore0;
  7457. // ipv4
  7458. if (typeof host == 'number') {
  7459. result = [];
  7460. for (index = 0; index < 4; index++) {
  7461. unshift(result, host % 256);
  7462. host = floor(host / 256);
  7463. }
  7464. return join(result, '.');
  7465. }
  7466. // ipv6
  7467. if (typeof host == 'object') {
  7468. result = '';
  7469. compress = findLongestZeroSequence(host);
  7470. for (index = 0; index < 8; index++) {
  7471. if (ignore0 && host[index] === 0) continue;
  7472. if (ignore0) ignore0 = false;
  7473. if (compress === index) {
  7474. result += index ? ':' : '::';
  7475. ignore0 = true;
  7476. } else {
  7477. result += numberToString(host[index], 16);
  7478. if (index < 7) result += ':';
  7479. }
  7480. }
  7481. return '[' + result + ']';
  7482. }
  7483. return host;
  7484. };
  7485. var C0ControlPercentEncodeSet = {};
  7486. var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
  7487. ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
  7488. });
  7489. var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
  7490. '#': 1, '?': 1, '{': 1, '}': 1
  7491. });
  7492. var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
  7493. '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
  7494. });
  7495. var percentEncode = function (chr, set) {
  7496. var code = codeAt(chr, 0);
  7497. return code > 0x20 && code < 0x7F && !hasOwn(set, chr) ? chr : encodeURIComponent(chr);
  7498. };
  7499. // https://url.spec.whatwg.org/#special-scheme
  7500. var specialSchemes = {
  7501. ftp: 21,
  7502. file: null,
  7503. http: 80,
  7504. https: 443,
  7505. ws: 80,
  7506. wss: 443
  7507. };
  7508. // https://url.spec.whatwg.org/#windows-drive-letter
  7509. var isWindowsDriveLetter = function (string, normalized) {
  7510. var second;
  7511. return string.length === 2 && exec(ALPHA, charAt(string, 0))
  7512. && ((second = charAt(string, 1)) === ':' || (!normalized && second === '|'));
  7513. };
  7514. // https://url.spec.whatwg.org/#start-with-a-windows-drive-letter
  7515. var startsWithWindowsDriveLetter = function (string) {
  7516. var third;
  7517. return string.length > 1 && isWindowsDriveLetter(stringSlice(string, 0, 2)) && (
  7518. string.length === 2 ||
  7519. ((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#')
  7520. );
  7521. };
  7522. // https://url.spec.whatwg.org/#single-dot-path-segment
  7523. var isSingleDot = function (segment) {
  7524. return segment === '.' || toLowerCase(segment) === '%2e';
  7525. };
  7526. // https://url.spec.whatwg.org/#double-dot-path-segment
  7527. var isDoubleDot = function (segment) {
  7528. segment = toLowerCase(segment);
  7529. return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
  7530. };
  7531. // States:
  7532. var SCHEME_START = {};
  7533. var SCHEME = {};
  7534. var NO_SCHEME = {};
  7535. var SPECIAL_RELATIVE_OR_AUTHORITY = {};
  7536. var PATH_OR_AUTHORITY = {};
  7537. var RELATIVE = {};
  7538. var RELATIVE_SLASH = {};
  7539. var SPECIAL_AUTHORITY_SLASHES = {};
  7540. var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
  7541. var AUTHORITY = {};
  7542. var HOST = {};
  7543. var HOSTNAME = {};
  7544. var PORT = {};
  7545. var FILE = {};
  7546. var FILE_SLASH = {};
  7547. var FILE_HOST = {};
  7548. var PATH_START = {};
  7549. var PATH = {};
  7550. var CANNOT_BE_A_BASE_URL_PATH = {};
  7551. var QUERY = {};
  7552. var FRAGMENT = {};
  7553. var URLState = function (url, isBase, base) {
  7554. var urlString = $toString(url);
  7555. var baseState, failure, searchParams;
  7556. if (isBase) {
  7557. failure = this.parse(urlString);
  7558. if (failure) throw new TypeError(failure);
  7559. this.searchParams = null;
  7560. } else {
  7561. if (base !== undefined) baseState = new URLState(base, true);
  7562. failure = this.parse(urlString, null, baseState);
  7563. if (failure) throw new TypeError(failure);
  7564. searchParams = getInternalSearchParamsState(new URLSearchParams());
  7565. searchParams.bindURL(this);
  7566. this.searchParams = searchParams;
  7567. }
  7568. };
  7569. URLState.prototype = {
  7570. type: 'URL',
  7571. // https://url.spec.whatwg.org/#url-parsing
  7572. // eslint-disable-next-line max-statements -- TODO
  7573. parse: function (input, stateOverride, base) {
  7574. var url = this;
  7575. var state = stateOverride || SCHEME_START;
  7576. var pointer = 0;
  7577. var buffer = '';
  7578. var seenAt = false;
  7579. var seenBracket = false;
  7580. var seenPasswordToken = false;
  7581. var codePoints, chr, bufferCodePoints, failure;
  7582. input = $toString(input);
  7583. if (!stateOverride) {
  7584. url.scheme = '';
  7585. url.username = '';
  7586. url.password = '';
  7587. url.host = null;
  7588. url.port = null;
  7589. url.path = [];
  7590. url.query = null;
  7591. url.fragment = null;
  7592. url.cannotBeABaseURL = false;
  7593. input = replace(input, LEADING_C0_CONTROL_OR_SPACE, '');
  7594. input = replace(input, TRAILING_C0_CONTROL_OR_SPACE, '$1');
  7595. }
  7596. input = replace(input, TAB_AND_NEW_LINE, '');
  7597. codePoints = arrayFrom(input);
  7598. while (pointer <= codePoints.length) {
  7599. chr = codePoints[pointer];
  7600. switch (state) {
  7601. case SCHEME_START:
  7602. if (chr && exec(ALPHA, chr)) {
  7603. buffer += toLowerCase(chr);
  7604. state = SCHEME;
  7605. } else if (!stateOverride) {
  7606. state = NO_SCHEME;
  7607. continue;
  7608. } else return INVALID_SCHEME;
  7609. break;
  7610. case SCHEME:
  7611. if (chr && (exec(ALPHANUMERIC, chr) || chr === '+' || chr === '-' || chr === '.')) {
  7612. buffer += toLowerCase(chr);
  7613. } else if (chr === ':') {
  7614. if (stateOverride && (
  7615. (url.isSpecial() !== hasOwn(specialSchemes, buffer)) ||
  7616. (buffer === 'file' && (url.includesCredentials() || url.port !== null)) ||
  7617. (url.scheme === 'file' && !url.host)
  7618. )) return;
  7619. url.scheme = buffer;
  7620. if (stateOverride) {
  7621. if (url.isSpecial() && specialSchemes[url.scheme] === url.port) url.port = null;
  7622. return;
  7623. }
  7624. buffer = '';
  7625. if (url.scheme === 'file') {
  7626. state = FILE;
  7627. } else if (url.isSpecial() && base && base.scheme === url.scheme) {
  7628. state = SPECIAL_RELATIVE_OR_AUTHORITY;
  7629. } else if (url.isSpecial()) {
  7630. state = SPECIAL_AUTHORITY_SLASHES;
  7631. } else if (codePoints[pointer + 1] === '/') {
  7632. state = PATH_OR_AUTHORITY;
  7633. pointer++;
  7634. } else {
  7635. url.cannotBeABaseURL = true;
  7636. push(url.path, '');
  7637. state = CANNOT_BE_A_BASE_URL_PATH;
  7638. }
  7639. } else if (!stateOverride) {
  7640. buffer = '';
  7641. state = NO_SCHEME;
  7642. pointer = 0;
  7643. continue;
  7644. } else return INVALID_SCHEME;
  7645. break;
  7646. case NO_SCHEME:
  7647. if (!base || (base.cannotBeABaseURL && chr !== '#')) return INVALID_SCHEME;
  7648. if (base.cannotBeABaseURL && chr === '#') {
  7649. url.scheme = base.scheme;
  7650. url.path = arraySlice(base.path);
  7651. url.query = base.query;
  7652. url.fragment = '';
  7653. url.cannotBeABaseURL = true;
  7654. state = FRAGMENT;
  7655. break;
  7656. }
  7657. state = base.scheme === 'file' ? FILE : RELATIVE;
  7658. continue;
  7659. case SPECIAL_RELATIVE_OR_AUTHORITY:
  7660. if (chr === '/' && codePoints[pointer + 1] === '/') {
  7661. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  7662. pointer++;
  7663. } else {
  7664. state = RELATIVE;
  7665. continue;
  7666. } break;
  7667. case PATH_OR_AUTHORITY:
  7668. if (chr === '/') {
  7669. state = AUTHORITY;
  7670. break;
  7671. } else {
  7672. state = PATH;
  7673. continue;
  7674. }
  7675. case RELATIVE:
  7676. url.scheme = base.scheme;
  7677. if (chr === EOF) {
  7678. url.username = base.username;
  7679. url.password = base.password;
  7680. url.host = base.host;
  7681. url.port = base.port;
  7682. url.path = arraySlice(base.path);
  7683. url.query = base.query;
  7684. } else if (chr === '/' || (chr === '\\' && url.isSpecial())) {
  7685. state = RELATIVE_SLASH;
  7686. } else if (chr === '?') {
  7687. url.username = base.username;
  7688. url.password = base.password;
  7689. url.host = base.host;
  7690. url.port = base.port;
  7691. url.path = arraySlice(base.path);
  7692. url.query = '';
  7693. state = QUERY;
  7694. } else if (chr === '#') {
  7695. url.username = base.username;
  7696. url.password = base.password;
  7697. url.host = base.host;
  7698. url.port = base.port;
  7699. url.path = arraySlice(base.path);
  7700. url.query = base.query;
  7701. url.fragment = '';
  7702. state = FRAGMENT;
  7703. } else {
  7704. url.username = base.username;
  7705. url.password = base.password;
  7706. url.host = base.host;
  7707. url.port = base.port;
  7708. url.path = arraySlice(base.path);
  7709. url.path.length--;
  7710. state = PATH;
  7711. continue;
  7712. } break;
  7713. case RELATIVE_SLASH:
  7714. if (url.isSpecial() && (chr === '/' || chr === '\\')) {
  7715. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  7716. } else if (chr === '/') {
  7717. state = AUTHORITY;
  7718. } else {
  7719. url.username = base.username;
  7720. url.password = base.password;
  7721. url.host = base.host;
  7722. url.port = base.port;
  7723. state = PATH;
  7724. continue;
  7725. } break;
  7726. case SPECIAL_AUTHORITY_SLASHES:
  7727. state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
  7728. if (chr !== '/' || charAt(buffer, pointer + 1) !== '/') continue;
  7729. pointer++;
  7730. break;
  7731. case SPECIAL_AUTHORITY_IGNORE_SLASHES:
  7732. if (chr !== '/' && chr !== '\\') {
  7733. state = AUTHORITY;
  7734. continue;
  7735. } break;
  7736. case AUTHORITY:
  7737. if (chr === '@') {
  7738. if (seenAt) buffer = '%40' + buffer;
  7739. seenAt = true;
  7740. bufferCodePoints = arrayFrom(buffer);
  7741. for (var i = 0; i < bufferCodePoints.length; i++) {
  7742. var codePoint = bufferCodePoints[i];
  7743. if (codePoint === ':' && !seenPasswordToken) {
  7744. seenPasswordToken = true;
  7745. continue;
  7746. }
  7747. var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
  7748. if (seenPasswordToken) url.password += encodedCodePoints;
  7749. else url.username += encodedCodePoints;
  7750. }
  7751. buffer = '';
  7752. } else if (
  7753. chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
  7754. (chr === '\\' && url.isSpecial())
  7755. ) {
  7756. if (seenAt && buffer === '') return INVALID_AUTHORITY;
  7757. pointer -= arrayFrom(buffer).length + 1;
  7758. buffer = '';
  7759. state = HOST;
  7760. } else buffer += chr;
  7761. break;
  7762. case HOST:
  7763. case HOSTNAME:
  7764. if (stateOverride && url.scheme === 'file') {
  7765. state = FILE_HOST;
  7766. continue;
  7767. } else if (chr === ':' && !seenBracket) {
  7768. if (buffer === '') return INVALID_HOST;
  7769. failure = url.parseHost(buffer);
  7770. if (failure) return failure;
  7771. buffer = '';
  7772. state = PORT;
  7773. if (stateOverride === HOSTNAME) return;
  7774. } else if (
  7775. chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
  7776. (chr === '\\' && url.isSpecial())
  7777. ) {
  7778. if (url.isSpecial() && buffer === '') return INVALID_HOST;
  7779. if (stateOverride && buffer === '' && (url.includesCredentials() || url.port !== null)) return;
  7780. failure = url.parseHost(buffer);
  7781. if (failure) return failure;
  7782. buffer = '';
  7783. state = PATH_START;
  7784. if (stateOverride) return;
  7785. continue;
  7786. } else {
  7787. if (chr === '[') seenBracket = true;
  7788. else if (chr === ']') seenBracket = false;
  7789. buffer += chr;
  7790. } break;
  7791. case PORT:
  7792. if (exec(DIGIT, chr)) {
  7793. buffer += chr;
  7794. } else if (
  7795. chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
  7796. (chr === '\\' && url.isSpecial()) ||
  7797. stateOverride
  7798. ) {
  7799. if (buffer !== '') {
  7800. var port = parseInt(buffer, 10);
  7801. if (port > 0xFFFF) return INVALID_PORT;
  7802. url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;
  7803. buffer = '';
  7804. }
  7805. if (stateOverride) return;
  7806. state = PATH_START;
  7807. continue;
  7808. } else return INVALID_PORT;
  7809. break;
  7810. case FILE:
  7811. url.scheme = 'file';
  7812. if (chr === '/' || chr === '\\') state = FILE_SLASH;
  7813. else if (base && base.scheme === 'file') {
  7814. switch (chr) {
  7815. case EOF:
  7816. url.host = base.host;
  7817. url.path = arraySlice(base.path);
  7818. url.query = base.query;
  7819. break;
  7820. case '?':
  7821. url.host = base.host;
  7822. url.path = arraySlice(base.path);
  7823. url.query = '';
  7824. state = QUERY;
  7825. break;
  7826. case '#':
  7827. url.host = base.host;
  7828. url.path = arraySlice(base.path);
  7829. url.query = base.query;
  7830. url.fragment = '';
  7831. state = FRAGMENT;
  7832. break;
  7833. default:
  7834. if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
  7835. url.host = base.host;
  7836. url.path = arraySlice(base.path);
  7837. url.shortenPath();
  7838. }
  7839. state = PATH;
  7840. continue;
  7841. }
  7842. } else {
  7843. state = PATH;
  7844. continue;
  7845. } break;
  7846. case FILE_SLASH:
  7847. if (chr === '/' || chr === '\\') {
  7848. state = FILE_HOST;
  7849. break;
  7850. }
  7851. if (base && base.scheme === 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
  7852. if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);
  7853. else url.host = base.host;
  7854. }
  7855. state = PATH;
  7856. continue;
  7857. case FILE_HOST:
  7858. if (chr === EOF || chr === '/' || chr === '\\' || chr === '?' || chr === '#') {
  7859. if (!stateOverride && isWindowsDriveLetter(buffer)) {
  7860. state = PATH;
  7861. } else if (buffer === '') {
  7862. url.host = '';
  7863. if (stateOverride) return;
  7864. state = PATH_START;
  7865. } else {
  7866. failure = url.parseHost(buffer);
  7867. if (failure) return failure;
  7868. if (url.host === 'localhost') url.host = '';
  7869. if (stateOverride) return;
  7870. buffer = '';
  7871. state = PATH_START;
  7872. } continue;
  7873. } else buffer += chr;
  7874. break;
  7875. case PATH_START:
  7876. if (url.isSpecial()) {
  7877. state = PATH;
  7878. if (chr !== '/' && chr !== '\\') continue;
  7879. } else if (!stateOverride && chr === '?') {
  7880. url.query = '';
  7881. state = QUERY;
  7882. } else if (!stateOverride && chr === '#') {
  7883. url.fragment = '';
  7884. state = FRAGMENT;
  7885. } else if (chr !== EOF) {
  7886. state = PATH;
  7887. if (chr !== '/') continue;
  7888. } break;
  7889. case PATH:
  7890. if (
  7891. chr === EOF || chr === '/' ||
  7892. (chr === '\\' && url.isSpecial()) ||
  7893. (!stateOverride && (chr === '?' || chr === '#'))
  7894. ) {
  7895. if (isDoubleDot(buffer)) {
  7896. url.shortenPath();
  7897. if (chr !== '/' && !(chr === '\\' && url.isSpecial())) {
  7898. push(url.path, '');
  7899. }
  7900. } else if (isSingleDot(buffer)) {
  7901. if (chr !== '/' && !(chr === '\\' && url.isSpecial())) {
  7902. push(url.path, '');
  7903. }
  7904. } else {
  7905. if (url.scheme === 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
  7906. if (url.host) url.host = '';
  7907. buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter
  7908. }
  7909. push(url.path, buffer);
  7910. }
  7911. buffer = '';
  7912. if (url.scheme === 'file' && (chr === EOF || chr === '?' || chr === '#')) {
  7913. while (url.path.length > 1 && url.path[0] === '') {
  7914. shift(url.path);
  7915. }
  7916. }
  7917. if (chr === '?') {
  7918. url.query = '';
  7919. state = QUERY;
  7920. } else if (chr === '#') {
  7921. url.fragment = '';
  7922. state = FRAGMENT;
  7923. }
  7924. } else {
  7925. buffer += percentEncode(chr, pathPercentEncodeSet);
  7926. } break;
  7927. case CANNOT_BE_A_BASE_URL_PATH:
  7928. if (chr === '?') {
  7929. url.query = '';
  7930. state = QUERY;
  7931. } else if (chr === '#') {
  7932. url.fragment = '';
  7933. state = FRAGMENT;
  7934. } else if (chr !== EOF) {
  7935. url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);
  7936. } break;
  7937. case QUERY:
  7938. if (!stateOverride && chr === '#') {
  7939. url.fragment = '';
  7940. state = FRAGMENT;
  7941. } else if (chr !== EOF) {
  7942. if (chr === "'" && url.isSpecial()) url.query += '%27';
  7943. else if (chr === '#') url.query += '%23';
  7944. else url.query += percentEncode(chr, C0ControlPercentEncodeSet);
  7945. } break;
  7946. case FRAGMENT:
  7947. if (chr !== EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);
  7948. break;
  7949. }
  7950. pointer++;
  7951. }
  7952. },
  7953. // https://url.spec.whatwg.org/#host-parsing
  7954. parseHost: function (input) {
  7955. var result, codePoints, index;
  7956. if (charAt(input, 0) === '[') {
  7957. if (charAt(input, input.length - 1) !== ']') return INVALID_HOST;
  7958. result = parseIPv6(stringSlice(input, 1, -1));
  7959. if (!result) return INVALID_HOST;
  7960. this.host = result;
  7961. // opaque host
  7962. } else if (!this.isSpecial()) {
  7963. if (exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST;
  7964. result = '';
  7965. codePoints = arrayFrom(input);
  7966. for (index = 0; index < codePoints.length; index++) {
  7967. result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
  7968. }
  7969. this.host = result;
  7970. } else {
  7971. input = toASCII(input);
  7972. if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;
  7973. result = parseIPv4(input);
  7974. if (result === null) return INVALID_HOST;
  7975. this.host = result;
  7976. }
  7977. },
  7978. // https://url.spec.whatwg.org/#cannot-have-a-username-password-port
  7979. cannotHaveUsernamePasswordPort: function () {
  7980. return !this.host || this.cannotBeABaseURL || this.scheme === 'file';
  7981. },
  7982. // https://url.spec.whatwg.org/#include-credentials
  7983. includesCredentials: function () {
  7984. return this.username !== '' || this.password !== '';
  7985. },
  7986. // https://url.spec.whatwg.org/#is-special
  7987. isSpecial: function () {
  7988. return hasOwn(specialSchemes, this.scheme);
  7989. },
  7990. // https://url.spec.whatwg.org/#shorten-a-urls-path
  7991. shortenPath: function () {
  7992. var path = this.path;
  7993. var pathSize = path.length;
  7994. if (pathSize && (this.scheme !== 'file' || pathSize !== 1 || !isWindowsDriveLetter(path[0], true))) {
  7995. path.length--;
  7996. }
  7997. },
  7998. // https://url.spec.whatwg.org/#concept-url-serializer
  7999. serialize: function () {
  8000. var url = this;
  8001. var scheme = url.scheme;
  8002. var username = url.username;
  8003. var password = url.password;
  8004. var host = url.host;
  8005. var port = url.port;
  8006. var path = url.path;
  8007. var query = url.query;
  8008. var fragment = url.fragment;
  8009. var output = scheme + ':';
  8010. if (host !== null) {
  8011. output += '//';
  8012. if (url.includesCredentials()) {
  8013. output += username + (password ? ':' + password : '') + '@';
  8014. }
  8015. output += serializeHost(host);
  8016. if (port !== null) output += ':' + port;
  8017. } else if (scheme === 'file') output += '//';
  8018. output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
  8019. if (query !== null) output += '?' + query;
  8020. if (fragment !== null) output += '#' + fragment;
  8021. return output;
  8022. },
  8023. // https://url.spec.whatwg.org/#dom-url-href
  8024. setHref: function (href) {
  8025. var failure = this.parse(href);
  8026. if (failure) throw new TypeError(failure);
  8027. this.searchParams.update();
  8028. },
  8029. // https://url.spec.whatwg.org/#dom-url-origin
  8030. getOrigin: function () {
  8031. var scheme = this.scheme;
  8032. var port = this.port;
  8033. if (scheme === 'blob') try {
  8034. return new URLConstructor(scheme.path[0]).origin;
  8035. } catch (error) {
  8036. return 'null';
  8037. }
  8038. if (scheme === 'file' || !this.isSpecial()) return 'null';
  8039. return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');
  8040. },
  8041. // https://url.spec.whatwg.org/#dom-url-protocol
  8042. getProtocol: function () {
  8043. return this.scheme + ':';
  8044. },
  8045. setProtocol: function (protocol) {
  8046. this.parse($toString(protocol) + ':', SCHEME_START);
  8047. },
  8048. // https://url.spec.whatwg.org/#dom-url-username
  8049. getUsername: function () {
  8050. return this.username;
  8051. },
  8052. setUsername: function (username) {
  8053. var codePoints = arrayFrom($toString(username));
  8054. if (this.cannotHaveUsernamePasswordPort()) return;
  8055. this.username = '';
  8056. for (var i = 0; i < codePoints.length; i++) {
  8057. this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  8058. }
  8059. },
  8060. // https://url.spec.whatwg.org/#dom-url-password
  8061. getPassword: function () {
  8062. return this.password;
  8063. },
  8064. setPassword: function (password) {
  8065. var codePoints = arrayFrom($toString(password));
  8066. if (this.cannotHaveUsernamePasswordPort()) return;
  8067. this.password = '';
  8068. for (var i = 0; i < codePoints.length; i++) {
  8069. this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
  8070. }
  8071. },
  8072. // https://url.spec.whatwg.org/#dom-url-host
  8073. getHost: function () {
  8074. var host = this.host;
  8075. var port = this.port;
  8076. return host === null ? ''
  8077. : port === null ? serializeHost(host)
  8078. : serializeHost(host) + ':' + port;
  8079. },
  8080. setHost: function (host) {
  8081. if (this.cannotBeABaseURL) return;
  8082. this.parse(host, HOST);
  8083. },
  8084. // https://url.spec.whatwg.org/#dom-url-hostname
  8085. getHostname: function () {
  8086. var host = this.host;
  8087. return host === null ? '' : serializeHost(host);
  8088. },
  8089. setHostname: function (hostname) {
  8090. if (this.cannotBeABaseURL) return;
  8091. this.parse(hostname, HOSTNAME);
  8092. },
  8093. // https://url.spec.whatwg.org/#dom-url-port
  8094. getPort: function () {
  8095. var port = this.port;
  8096. return port === null ? '' : $toString(port);
  8097. },
  8098. setPort: function (port) {
  8099. if (this.cannotHaveUsernamePasswordPort()) return;
  8100. port = $toString(port);
  8101. if (port === '') this.port = null;
  8102. else this.parse(port, PORT);
  8103. },
  8104. // https://url.spec.whatwg.org/#dom-url-pathname
  8105. getPathname: function () {
  8106. var path = this.path;
  8107. return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
  8108. },
  8109. setPathname: function (pathname) {
  8110. if (this.cannotBeABaseURL) return;
  8111. this.path = [];
  8112. this.parse(pathname, PATH_START);
  8113. },
  8114. // https://url.spec.whatwg.org/#dom-url-search
  8115. getSearch: function () {
  8116. var query = this.query;
  8117. return query ? '?' + query : '';
  8118. },
  8119. setSearch: function (search) {
  8120. search = $toString(search);
  8121. if (search === '') {
  8122. this.query = null;
  8123. } else {
  8124. if (charAt(search, 0) === '?') search = stringSlice(search, 1);
  8125. this.query = '';
  8126. this.parse(search, QUERY);
  8127. }
  8128. this.searchParams.update();
  8129. },
  8130. // https://url.spec.whatwg.org/#dom-url-searchparams
  8131. getSearchParams: function () {
  8132. return this.searchParams.facade;
  8133. },
  8134. // https://url.spec.whatwg.org/#dom-url-hash
  8135. getHash: function () {
  8136. var fragment = this.fragment;
  8137. return fragment ? '#' + fragment : '';
  8138. },
  8139. setHash: function (hash) {
  8140. hash = $toString(hash);
  8141. if (hash === '') {
  8142. this.fragment = null;
  8143. return;
  8144. }
  8145. if (charAt(hash, 0) === '#') hash = stringSlice(hash, 1);
  8146. this.fragment = '';
  8147. this.parse(hash, FRAGMENT);
  8148. },
  8149. update: function () {
  8150. this.query = this.searchParams.serialize() || null;
  8151. }
  8152. };
  8153. // `URL` constructor
  8154. // https://url.spec.whatwg.org/#url-class
  8155. var URLConstructor = function URL(url /* , base */) {
  8156. var that = anInstance(this, URLPrototype);
  8157. var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;
  8158. var state = setInternalState(that, new URLState(url, false, base));
  8159. if (!DESCRIPTORS) {
  8160. that.href = state.serialize();
  8161. that.origin = state.getOrigin();
  8162. that.protocol = state.getProtocol();
  8163. that.username = state.getUsername();
  8164. that.password = state.getPassword();
  8165. that.host = state.getHost();
  8166. that.hostname = state.getHostname();
  8167. that.port = state.getPort();
  8168. that.pathname = state.getPathname();
  8169. that.search = state.getSearch();
  8170. that.searchParams = state.getSearchParams();
  8171. that.hash = state.getHash();
  8172. }
  8173. };
  8174. var URLPrototype = URLConstructor.prototype;
  8175. var accessorDescriptor = function (getter, setter) {
  8176. return {
  8177. get: function () {
  8178. return getInternalURLState(this)[getter]();
  8179. },
  8180. set: setter && function (value) {
  8181. return getInternalURLState(this)[setter](value);
  8182. },
  8183. configurable: true,
  8184. enumerable: true
  8185. };
  8186. };
  8187. if (DESCRIPTORS) {
  8188. // `URL.prototype.href` accessors pair
  8189. // https://url.spec.whatwg.org/#dom-url-href
  8190. defineBuiltInAccessor(URLPrototype, 'href', accessorDescriptor('serialize', 'setHref'));
  8191. // `URL.prototype.origin` getter
  8192. // https://url.spec.whatwg.org/#dom-url-origin
  8193. defineBuiltInAccessor(URLPrototype, 'origin', accessorDescriptor('getOrigin'));
  8194. // `URL.prototype.protocol` accessors pair
  8195. // https://url.spec.whatwg.org/#dom-url-protocol
  8196. defineBuiltInAccessor(URLPrototype, 'protocol', accessorDescriptor('getProtocol', 'setProtocol'));
  8197. // `URL.prototype.username` accessors pair
  8198. // https://url.spec.whatwg.org/#dom-url-username
  8199. defineBuiltInAccessor(URLPrototype, 'username', accessorDescriptor('getUsername', 'setUsername'));
  8200. // `URL.prototype.password` accessors pair
  8201. // https://url.spec.whatwg.org/#dom-url-password
  8202. defineBuiltInAccessor(URLPrototype, 'password', accessorDescriptor('getPassword', 'setPassword'));
  8203. // `URL.prototype.host` accessors pair
  8204. // https://url.spec.whatwg.org/#dom-url-host
  8205. defineBuiltInAccessor(URLPrototype, 'host', accessorDescriptor('getHost', 'setHost'));
  8206. // `URL.prototype.hostname` accessors pair
  8207. // https://url.spec.whatwg.org/#dom-url-hostname
  8208. defineBuiltInAccessor(URLPrototype, 'hostname', accessorDescriptor('getHostname', 'setHostname'));
  8209. // `URL.prototype.port` accessors pair
  8210. // https://url.spec.whatwg.org/#dom-url-port
  8211. defineBuiltInAccessor(URLPrototype, 'port', accessorDescriptor('getPort', 'setPort'));
  8212. // `URL.prototype.pathname` accessors pair
  8213. // https://url.spec.whatwg.org/#dom-url-pathname
  8214. defineBuiltInAccessor(URLPrototype, 'pathname', accessorDescriptor('getPathname', 'setPathname'));
  8215. // `URL.prototype.search` accessors pair
  8216. // https://url.spec.whatwg.org/#dom-url-search
  8217. defineBuiltInAccessor(URLPrototype, 'search', accessorDescriptor('getSearch', 'setSearch'));
  8218. // `URL.prototype.searchParams` getter
  8219. // https://url.spec.whatwg.org/#dom-url-searchparams
  8220. defineBuiltInAccessor(URLPrototype, 'searchParams', accessorDescriptor('getSearchParams'));
  8221. // `URL.prototype.hash` accessors pair
  8222. // https://url.spec.whatwg.org/#dom-url-hash
  8223. defineBuiltInAccessor(URLPrototype, 'hash', accessorDescriptor('getHash', 'setHash'));
  8224. }
  8225. // `URL.prototype.toJSON` method
  8226. // https://url.spec.whatwg.org/#dom-url-tojson
  8227. defineBuiltIn(URLPrototype, 'toJSON', function toJSON() {
  8228. return getInternalURLState(this).serialize();
  8229. }, { enumerable: true });
  8230. // `URL.prototype.toString` method
  8231. // https://url.spec.whatwg.org/#URL-stringification-behavior
  8232. defineBuiltIn(URLPrototype, 'toString', function toString() {
  8233. return getInternalURLState(this).serialize();
  8234. }, { enumerable: true });
  8235. if (NativeURL) {
  8236. var nativeCreateObjectURL = NativeURL.createObjectURL;
  8237. var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
  8238. // `URL.createObjectURL` method
  8239. // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
  8240. if (nativeCreateObjectURL) defineBuiltIn(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL));
  8241. // `URL.revokeObjectURL` method
  8242. // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
  8243. if (nativeRevokeObjectURL) defineBuiltIn(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL));
  8244. }
  8245. setToStringTag(URLConstructor, 'URL');
  8246. $({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
  8247. URL: URLConstructor
  8248. });
  8249. /***/ }),
  8250. /***/ 3296:
  8251. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  8252. "use strict";
  8253. // TODO: Remove this module from `core-js@4` since it's replaced to module below
  8254. __webpack_require__(5806);
  8255. /***/ }),
  8256. /***/ 7208:
  8257. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  8258. "use strict";
  8259. var $ = __webpack_require__(6518);
  8260. var call = __webpack_require__(9565);
  8261. // `URL.prototype.toJSON` method
  8262. // https://url.spec.whatwg.org/#dom-url-tojson
  8263. $({ target: 'URL', proto: true, enumerable: true }, {
  8264. toJSON: function toJSON() {
  8265. return call(URL.prototype.toString, this);
  8266. }
  8267. });
  8268. /***/ }),
  8269. /***/ 8251:
  8270. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  8271. __webpack_require__(2675);
  8272. __webpack_require__(9463);
  8273. __webpack_require__(2259);
  8274. __webpack_require__(3792);
  8275. __webpack_require__(6099);
  8276. __webpack_require__(7764);
  8277. __webpack_require__(2953);
  8278. function _typeof(o) {
  8279. "@babel/helpers - typeof";
  8280. return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  8281. return typeof o;
  8282. } : function (o) {
  8283. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  8284. }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
  8285. }
  8286. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  8287. /***/ })
  8288. /******/ });
  8289. /************************************************************************/
  8290. /******/ // The module cache
  8291. /******/ var __webpack_module_cache__ = {};
  8292. /******/
  8293. /******/ // The require function
  8294. /******/ function __webpack_require__(moduleId) {
  8295. /******/ // Check if module is in cache
  8296. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  8297. /******/ if (cachedModule !== undefined) {
  8298. /******/ return cachedModule.exports;
  8299. /******/ }
  8300. /******/ // Create a new module (and put it into the cache)
  8301. /******/ var module = __webpack_module_cache__[moduleId] = {
  8302. /******/ // no module.id needed
  8303. /******/ // no module.loaded needed
  8304. /******/ exports: {}
  8305. /******/ };
  8306. /******/
  8307. /******/ // Execute the module function
  8308. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  8309. /******/
  8310. /******/ // Return the exports of the module
  8311. /******/ return module.exports;
  8312. /******/ }
  8313. /******/
  8314. /************************************************************************/
  8315. /******/ /* webpack/runtime/compat get default export */
  8316. /******/ !function() {
  8317. /******/ // getDefaultExport function for compatibility with non-harmony modules
  8318. /******/ __webpack_require__.n = function(module) {
  8319. /******/ var getter = module && module.__esModule ?
  8320. /******/ function() { return module['default']; } :
  8321. /******/ function() { return module; };
  8322. /******/ __webpack_require__.d(getter, { a: getter });
  8323. /******/ return getter;
  8324. /******/ };
  8325. /******/ }();
  8326. /******/
  8327. /******/ /* webpack/runtime/define property getters */
  8328. /******/ !function() {
  8329. /******/ // define getter functions for harmony exports
  8330. /******/ __webpack_require__.d = function(exports, definition) {
  8331. /******/ for(var key in definition) {
  8332. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  8333. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  8334. /******/ }
  8335. /******/ }
  8336. /******/ };
  8337. /******/ }();
  8338. /******/
  8339. /******/ /* webpack/runtime/global */
  8340. /******/ !function() {
  8341. /******/ __webpack_require__.g = (function() {
  8342. /******/ if (typeof globalThis === 'object') return globalThis;
  8343. /******/ try {
  8344. /******/ return this || new Function('return this')();
  8345. /******/ } catch (e) {
  8346. /******/ if (typeof window === 'object') return window;
  8347. /******/ }
  8348. /******/ })();
  8349. /******/ }();
  8350. /******/
  8351. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  8352. /******/ !function() {
  8353. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  8354. /******/ }();
  8355. /******/
  8356. /******/ /* webpack/runtime/make namespace object */
  8357. /******/ !function() {
  8358. /******/ // define __esModule on exports
  8359. /******/ __webpack_require__.r = function(exports) {
  8360. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  8361. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  8362. /******/ }
  8363. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  8364. /******/ };
  8365. /******/ }();
  8366. /******/
  8367. /******/ /* webpack/runtime/publicPath */
  8368. /******/ !function() {
  8369. /******/ __webpack_require__.p = "";
  8370. /******/ }();
  8371. /******/
  8372. /************************************************************************/
  8373. var __webpack_exports__ = {};
  8374. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  8375. !function() {
  8376. "use strict";
  8377. // ESM COMPAT FLAG
  8378. __webpack_require__.r(__webpack_exports__);
  8379. // EXPORTS
  8380. __webpack_require__.d(__webpack_exports__, {
  8381. Alert: function() { return /* reexport */ Alert; },
  8382. Anchor: function() { return /* reexport */ Anchor; },
  8383. AnchorLink: function() { return /* reexport */ AnchorLink; },
  8384. Avatar: function() { return /* reexport */ Avatar; },
  8385. Badge: function() { return /* reexport */ Badge; },
  8386. Breadcrumb: function() { return /* reexport */ Breadcrumb; },
  8387. BreadcrumbItem: function() { return /* reexport */ BreadcrumbItem; },
  8388. Button: function() { return /* reexport */ Button; },
  8389. ButtonGroup: function() { return /* reexport */ ButtonGroup; },
  8390. Calendar: function() { return /* reexport */ Calendar; },
  8391. Card: function() { return /* reexport */ Card; },
  8392. Carousel: function() { return /* reexport */ Carousel; },
  8393. CarouselItem: function() { return /* reexport */ CarouselItem; },
  8394. Checkbox: function() { return /* reexport */ Checkbox; },
  8395. CheckboxButton: function() { return /* reexport */ CheckboxButton; },
  8396. CheckboxGroup: function() { return /* reexport */ CheckboxGroup; },
  8397. Col: function() { return /* reexport */ Col; },
  8398. Collapse: function() { return /* reexport */ Collapse; },
  8399. CollapsePane: function() { return /* reexport */ CollapsePane; },
  8400. ColorPicker: function() { return /* reexport */ ColorPicker; },
  8401. Countdown: function() { return /* reexport */ Countdown; },
  8402. DatePanel: function() { return /* reexport */ DatePanel; },
  8403. DatePicker: function() { return /* reexport */ DatePicker; },
  8404. DateRangePicker: function() { return /* reexport */ DateRangePicker; },
  8405. Drawer: function() { return /* reexport */ Drawer; },
  8406. DrawerController: function() { return /* reexport */ DrawerController; },
  8407. Form: function() { return /* reexport */ Form; },
  8408. FormGather: function() { return /* reexport */ FormGather; },
  8409. FormGroup: function() { return /* reexport */ FormGroup; },
  8410. FormItem: function() { return /* reexport */ FormItem; },
  8411. GLOBAL_EVENT_KEYS: function() { return /* reexport */ GLOBAL_EVENT_KEYS; },
  8412. Icon: function() { return /* reexport */ Icon; },
  8413. IconPicker: function() { return /* reexport */ IconPicker; },
  8414. Image: function() { return /* reexport */ image_Image; },
  8415. ImageGroup: function() { return /* reexport */ ImageGroup; },
  8416. ImagePreview: function() { return /* reexport */ ImagePreview; },
  8417. Input: function() { return /* reexport */ Input; },
  8418. LayoutAside: function() { return /* reexport */ LayoutAside; },
  8419. LayoutBody: function() { return /* reexport */ LayoutBody; },
  8420. LayoutContainer: function() { return /* reexport */ LayoutContainer; },
  8421. LayoutFooter: function() { return /* reexport */ LayoutFooter; },
  8422. LayoutHeader: function() { return /* reexport */ LayoutHeader; },
  8423. Link: function() { return /* reexport */ Link; },
  8424. List: function() { return /* reexport */ List; },
  8425. Loading: function() { return /* reexport */ Loading; },
  8426. LoadingController: function() { return /* reexport */ LoadingController; },
  8427. Menu: function() { return /* reexport */ Menu; },
  8428. Modal: function() { return /* reexport */ Modal; },
  8429. ModalController: function() { return /* reexport */ ModalController; },
  8430. NoticeBar: function() { return /* reexport */ NoticeBar; },
  8431. NumberInput: function() { return /* reexport */ NumberInput; },
  8432. Optgroup: function() { return /* reexport */ Optgroup; },
  8433. Option: function() { return /* reexport */ Option; },
  8434. Pager: function() { return /* reexport */ Pager; },
  8435. PasswordInput: function() { return /* reexport */ PasswordInput; },
  8436. Print: function() { return /* reexport */ Print; },
  8437. PrintPageBreak: function() { return /* reexport */ PrintPageBreak; },
  8438. Pulldown: function() { return /* reexport */ Pulldown; },
  8439. Radio: function() { return /* reexport */ Radio; },
  8440. RadioButton: function() { return /* reexport */ RadioButton; },
  8441. RadioGroup: function() { return /* reexport */ RadioGroup; },
  8442. Rate: function() { return /* reexport */ Rate; },
  8443. Result: function() { return /* reexport */ Result; },
  8444. Row: function() { return /* reexport */ Row; },
  8445. Select: function() { return /* reexport */ Select; },
  8446. Slider: function() { return /* reexport */ Slider; },
  8447. Split: function() { return /* reexport */ Split; },
  8448. SplitPane: function() { return /* reexport */ SplitPane; },
  8449. Steps: function() { return /* reexport */ Steps; },
  8450. Switch: function() { return /* reexport */ Switch; },
  8451. TabPane: function() { return /* reexport */ TabPane; },
  8452. TableSelect: function() { return /* reexport */ TableSelect; },
  8453. Tabs: function() { return /* reexport */ Tabs; },
  8454. Tag: function() { return /* reexport */ Tag; },
  8455. Text: function() { return /* reexport */ Text; },
  8456. TextEllipsis: function() { return /* reexport */ TextEllipsis; },
  8457. Textarea: function() { return /* reexport */ Textarea; },
  8458. Tip: function() { return /* reexport */ Tip; },
  8459. Tips: function() { return /* reexport */ Tips; },
  8460. Tooltip: function() { return /* reexport */ Tooltip; },
  8461. Tree: function() { return /* reexport */ Tree; },
  8462. TreeSelect: function() { return /* reexport */ TreeSelect; },
  8463. Upload: function() { return /* reexport */ Upload; },
  8464. VxeAlert: function() { return /* reexport */ VxeAlert; },
  8465. VxeAnchor: function() { return /* reexport */ VxeAnchor; },
  8466. VxeAnchorLink: function() { return /* reexport */ VxeAnchorLink; },
  8467. VxeAvatar: function() { return /* reexport */ VxeAvatar; },
  8468. VxeBadge: function() { return /* reexport */ VxeBadge; },
  8469. VxeBreadcrumb: function() { return /* reexport */ VxeBreadcrumb; },
  8470. VxeBreadcrumbItem: function() { return /* reexport */ VxeBreadcrumbItem; },
  8471. VxeButton: function() { return /* reexport */ VxeButton; },
  8472. VxeButtonGroup: function() { return /* reexport */ VxeButtonGroup; },
  8473. VxeCalendar: function() { return /* reexport */ VxeCalendar; },
  8474. VxeCard: function() { return /* reexport */ VxeCard; },
  8475. VxeCarousel: function() { return /* reexport */ VxeCarousel; },
  8476. VxeCarouselItem: function() { return /* reexport */ VxeCarouselItem; },
  8477. VxeCheckbox: function() { return /* reexport */ VxeCheckbox; },
  8478. VxeCheckboxButton: function() { return /* reexport */ VxeCheckboxButton; },
  8479. VxeCheckboxGroup: function() { return /* reexport */ VxeCheckboxGroup; },
  8480. VxeCol: function() { return /* reexport */ VxeCol; },
  8481. VxeCollapse: function() { return /* reexport */ VxeCollapse; },
  8482. VxeCollapsePane: function() { return /* reexport */ VxeCollapsePane; },
  8483. VxeColorPicker: function() { return /* reexport */ VxeColorPicker; },
  8484. VxeCore: function() { return /* reexport */ VxeCore; },
  8485. VxeCountdown: function() { return /* reexport */ VxeCountdown; },
  8486. VxeDatePanel: function() { return /* reexport */ VxeDatePanel; },
  8487. VxeDatePicker: function() { return /* reexport */ VxeDatePicker; },
  8488. VxeDateRangePicker: function() { return /* reexport */ VxeDateRangePicker; },
  8489. VxeDrawer: function() { return /* reexport */ VxeDrawer; },
  8490. VxeForm: function() { return /* reexport */ VxeForm; },
  8491. VxeFormGather: function() { return /* reexport */ VxeFormGather; },
  8492. VxeFormGroup: function() { return /* reexport */ VxeFormGroup; },
  8493. VxeFormItem: function() { return /* reexport */ VxeFormItem; },
  8494. VxeIcon: function() { return /* reexport */ VxeIcon; },
  8495. VxeIconPicker: function() { return /* reexport */ VxeIconPicker; },
  8496. VxeImage: function() { return /* reexport */ VxeImage; },
  8497. VxeImageGroup: function() { return /* reexport */ VxeImageGroup; },
  8498. VxeImagePreview: function() { return /* reexport */ VxeImagePreview; },
  8499. VxeInput: function() { return /* reexport */ VxeInput; },
  8500. VxeLayoutAside: function() { return /* reexport */ VxeLayoutAside; },
  8501. VxeLayoutBody: function() { return /* reexport */ VxeLayoutBody; },
  8502. VxeLayoutContainer: function() { return /* reexport */ VxeLayoutContainer; },
  8503. VxeLayoutFooter: function() { return /* reexport */ VxeLayoutFooter; },
  8504. VxeLayoutHeader: function() { return /* reexport */ VxeLayoutHeader; },
  8505. VxeLink: function() { return /* reexport */ VxeLink; },
  8506. VxeList: function() { return /* reexport */ VxeList; },
  8507. VxeLoading: function() { return /* reexport */ VxeLoading; },
  8508. VxeMenu: function() { return /* reexport */ VxeMenu; },
  8509. VxeModal: function() { return /* reexport */ VxeModal; },
  8510. VxeNoticeBar: function() { return /* reexport */ VxeNoticeBar; },
  8511. VxeNumberInput: function() { return /* reexport */ VxeNumberInput; },
  8512. VxeOptgroup: function() { return /* reexport */ VxeOptgroup; },
  8513. VxeOption: function() { return /* reexport */ VxeOption; },
  8514. VxePager: function() { return /* reexport */ VxePager; },
  8515. VxePasswordInput: function() { return /* reexport */ VxePasswordInput; },
  8516. VxePrint: function() { return /* reexport */ VxePrint; },
  8517. VxePrintPageBreak: function() { return /* reexport */ VxePrintPageBreak; },
  8518. VxePulldown: function() { return /* reexport */ VxePulldown; },
  8519. VxeRadio: function() { return /* reexport */ VxeRadio; },
  8520. VxeRadioButton: function() { return /* reexport */ VxeRadioButton; },
  8521. VxeRadioGroup: function() { return /* reexport */ VxeRadioGroup; },
  8522. VxeRate: function() { return /* reexport */ VxeRate; },
  8523. VxeResult: function() { return /* reexport */ VxeResult; },
  8524. VxeRow: function() { return /* reexport */ VxeRow; },
  8525. VxeSelect: function() { return /* reexport */ VxeSelect; },
  8526. VxeSlider: function() { return /* reexport */ VxeSlider; },
  8527. VxeSplit: function() { return /* reexport */ VxeSplit; },
  8528. VxeSplitPane: function() { return /* reexport */ VxeSplitPane; },
  8529. VxeSteps: function() { return /* reexport */ VxeSteps; },
  8530. VxeSwitch: function() { return /* reexport */ VxeSwitch; },
  8531. VxeTabPane: function() { return /* reexport */ VxeTabPane; },
  8532. VxeTableSelect: function() { return /* reexport */ VxeTableSelect; },
  8533. VxeTabs: function() { return /* reexport */ VxeTabs; },
  8534. VxeTag: function() { return /* reexport */ VxeTag; },
  8535. VxeText: function() { return /* reexport */ VxeText; },
  8536. VxeTextEllipsis: function() { return /* reexport */ VxeTextEllipsis; },
  8537. VxeTextarea: function() { return /* reexport */ VxeTextarea; },
  8538. VxeTip: function() { return /* reexport */ VxeTip; },
  8539. VxeTooltip: function() { return /* reexport */ VxeTooltip; },
  8540. VxeTree: function() { return /* reexport */ VxeTree; },
  8541. VxeTreeSelect: function() { return /* reexport */ VxeTreeSelect; },
  8542. VxeUI: function() { return /* reexport */ index_esm_VxeUI; },
  8543. VxeUpload: function() { return /* reexport */ VxeUpload; },
  8544. VxeWatermark: function() { return /* reexport */ VxeWatermark; },
  8545. Vxeempty: function() { return /* reexport */ Vxeempty; },
  8546. Watermark: function() { return /* reexport */ Watermark; },
  8547. WatermarkController: function() { return /* reexport */ WatermarkController; },
  8548. checkVersion: function() { return /* reexport */ checkVersion; },
  8549. clipboard: function() { return /* reexport */ clipboard; },
  8550. commands: function() { return /* reexport */ commands; },
  8551. component: function() { return /* reexport */ component; },
  8552. config: function() { return /* reexport */ config; },
  8553. coreVersion: function() { return /* reexport */ coreVersion; },
  8554. createEvent: function() { return /* reexport */ createEvent; },
  8555. "default": function() { return /* binding */ entry_lib; },
  8556. drawer: function() { return /* reexport */ components_drawer; },
  8557. empty: function() { return /* reexport */ empty_empty; },
  8558. formats: function() { return /* reexport */ formats; },
  8559. getComponent: function() { return /* reexport */ getComponent; },
  8560. getConfig: function() { return /* reexport */ getConfig; },
  8561. getI18n: function() { return /* reexport */ getI18n; },
  8562. getIcon: function() { return /* reexport */ getIcon; },
  8563. getLanguage: function() { return /* reexport */ getLanguage; },
  8564. getSlotVNs: function() { return /* reexport */ getSlotVNs; },
  8565. getTheme: function() { return /* reexport */ getTheme; },
  8566. globalEvents: function() { return /* reexport */ globalEvents; },
  8567. globalMixins: function() { return /* reexport */ globalMixins; },
  8568. globalResize: function() { return /* reexport */ globalResize; },
  8569. globalStore: function() { return /* reexport */ globalStore; },
  8570. handleCheckInfo: function() { return /* reexport */ handleCheckInfo; },
  8571. hasComponent: function() { return /* reexport */ hasComponent; },
  8572. hasLanguage: function() { return /* reexport */ hasLanguage; },
  8573. install: function() { return /* reexport */ install; },
  8574. interceptor: function() { return /* reexport */ interceptor; },
  8575. loading: function() { return /* reexport */ loading; },
  8576. log: function() { return /* reexport */ log; },
  8577. menus: function() { return /* reexport */ menus; },
  8578. modal: function() { return /* reexport */ components_modal; },
  8579. permission: function() { return /* reexport */ permission; },
  8580. permissionMixin: function() { return /* reexport */ permissionMixin; },
  8581. print: function() { return /* reexport */ components_print; },
  8582. readFile: function() { return /* reexport */ readFile; },
  8583. renderCustomIcon: function() { return /* reexport */ renderCustomIcon; },
  8584. renderEmptyElement: function() { return /* reexport */ renderEmptyElement; },
  8585. renderGlobalIcon: function() { return /* reexport */ renderGlobalIcon; },
  8586. renderer: function() { return /* reexport */ renderer; },
  8587. saveFile: function() { return /* reexport */ saveFile; },
  8588. setConfig: function() { return /* reexport */ setConfig; },
  8589. setI18n: function() { return /* reexport */ setI18n; },
  8590. setIcon: function() { return /* reexport */ setIcon; },
  8591. setLanguage: function() { return /* reexport */ setLanguage; },
  8592. setTheme: function() { return /* reexport */ setTheme; },
  8593. setup: function() { return /* reexport */ setup; },
  8594. sizeMixin: function() { return /* reexport */ sizeMixin; },
  8595. use: function() { return /* reexport */ use; },
  8596. validators: function() { return /* reexport */ validators; },
  8597. version: function() { return /* reexport */ ui_version; },
  8598. watermark: function() { return /* reexport */ components_watermark; }
  8599. });
  8600. // NAMESPACE OBJECT: ./packages/components.ts
  8601. var components_namespaceObject = {};
  8602. __webpack_require__.r(components_namespaceObject);
  8603. __webpack_require__.d(components_namespaceObject, {
  8604. Alert: function() { return Alert; },
  8605. Anchor: function() { return Anchor; },
  8606. AnchorLink: function() { return AnchorLink; },
  8607. Avatar: function() { return Avatar; },
  8608. Badge: function() { return Badge; },
  8609. Breadcrumb: function() { return Breadcrumb; },
  8610. BreadcrumbItem: function() { return BreadcrumbItem; },
  8611. Button: function() { return Button; },
  8612. ButtonGroup: function() { return ButtonGroup; },
  8613. Calendar: function() { return Calendar; },
  8614. Card: function() { return Card; },
  8615. Carousel: function() { return Carousel; },
  8616. CarouselItem: function() { return CarouselItem; },
  8617. Checkbox: function() { return Checkbox; },
  8618. CheckboxButton: function() { return CheckboxButton; },
  8619. CheckboxGroup: function() { return CheckboxGroup; },
  8620. Col: function() { return Col; },
  8621. Collapse: function() { return Collapse; },
  8622. CollapsePane: function() { return CollapsePane; },
  8623. ColorPicker: function() { return ColorPicker; },
  8624. Countdown: function() { return Countdown; },
  8625. DatePanel: function() { return DatePanel; },
  8626. DatePicker: function() { return DatePicker; },
  8627. DateRangePicker: function() { return DateRangePicker; },
  8628. Drawer: function() { return Drawer; },
  8629. DrawerController: function() { return DrawerController; },
  8630. Form: function() { return Form; },
  8631. FormGather: function() { return FormGather; },
  8632. FormGroup: function() { return FormGroup; },
  8633. FormItem: function() { return FormItem; },
  8634. GLOBAL_EVENT_KEYS: function() { return GLOBAL_EVENT_KEYS; },
  8635. Icon: function() { return Icon; },
  8636. IconPicker: function() { return IconPicker; },
  8637. Image: function() { return image_Image; },
  8638. ImageGroup: function() { return ImageGroup; },
  8639. ImagePreview: function() { return ImagePreview; },
  8640. Input: function() { return Input; },
  8641. LayoutAside: function() { return LayoutAside; },
  8642. LayoutBody: function() { return LayoutBody; },
  8643. LayoutContainer: function() { return LayoutContainer; },
  8644. LayoutFooter: function() { return LayoutFooter; },
  8645. LayoutHeader: function() { return LayoutHeader; },
  8646. Link: function() { return Link; },
  8647. List: function() { return List; },
  8648. Loading: function() { return Loading; },
  8649. LoadingController: function() { return LoadingController; },
  8650. Menu: function() { return Menu; },
  8651. Modal: function() { return Modal; },
  8652. ModalController: function() { return ModalController; },
  8653. NoticeBar: function() { return NoticeBar; },
  8654. NumberInput: function() { return NumberInput; },
  8655. Optgroup: function() { return Optgroup; },
  8656. Option: function() { return Option; },
  8657. Pager: function() { return Pager; },
  8658. PasswordInput: function() { return PasswordInput; },
  8659. Print: function() { return Print; },
  8660. PrintPageBreak: function() { return PrintPageBreak; },
  8661. Pulldown: function() { return Pulldown; },
  8662. Radio: function() { return Radio; },
  8663. RadioButton: function() { return RadioButton; },
  8664. RadioGroup: function() { return RadioGroup; },
  8665. Rate: function() { return Rate; },
  8666. Result: function() { return Result; },
  8667. Row: function() { return Row; },
  8668. Select: function() { return Select; },
  8669. Slider: function() { return Slider; },
  8670. Split: function() { return Split; },
  8671. SplitPane: function() { return SplitPane; },
  8672. Steps: function() { return Steps; },
  8673. Switch: function() { return Switch; },
  8674. TabPane: function() { return TabPane; },
  8675. TableSelect: function() { return TableSelect; },
  8676. Tabs: function() { return Tabs; },
  8677. Tag: function() { return Tag; },
  8678. Text: function() { return Text; },
  8679. TextEllipsis: function() { return TextEllipsis; },
  8680. Textarea: function() { return Textarea; },
  8681. Tip: function() { return Tip; },
  8682. Tips: function() { return Tips; },
  8683. Tooltip: function() { return Tooltip; },
  8684. Tree: function() { return Tree; },
  8685. TreeSelect: function() { return TreeSelect; },
  8686. Upload: function() { return Upload; },
  8687. VxeAlert: function() { return VxeAlert; },
  8688. VxeAnchor: function() { return VxeAnchor; },
  8689. VxeAnchorLink: function() { return VxeAnchorLink; },
  8690. VxeAvatar: function() { return VxeAvatar; },
  8691. VxeBadge: function() { return VxeBadge; },
  8692. VxeBreadcrumb: function() { return VxeBreadcrumb; },
  8693. VxeBreadcrumbItem: function() { return VxeBreadcrumbItem; },
  8694. VxeButton: function() { return VxeButton; },
  8695. VxeButtonGroup: function() { return VxeButtonGroup; },
  8696. VxeCalendar: function() { return VxeCalendar; },
  8697. VxeCard: function() { return VxeCard; },
  8698. VxeCarousel: function() { return VxeCarousel; },
  8699. VxeCarouselItem: function() { return VxeCarouselItem; },
  8700. VxeCheckbox: function() { return VxeCheckbox; },
  8701. VxeCheckboxButton: function() { return VxeCheckboxButton; },
  8702. VxeCheckboxGroup: function() { return VxeCheckboxGroup; },
  8703. VxeCol: function() { return VxeCol; },
  8704. VxeCollapse: function() { return VxeCollapse; },
  8705. VxeCollapsePane: function() { return VxeCollapsePane; },
  8706. VxeColorPicker: function() { return VxeColorPicker; },
  8707. VxeCore: function() { return VxeCore; },
  8708. VxeCountdown: function() { return VxeCountdown; },
  8709. VxeDatePanel: function() { return VxeDatePanel; },
  8710. VxeDatePicker: function() { return VxeDatePicker; },
  8711. VxeDateRangePicker: function() { return VxeDateRangePicker; },
  8712. VxeDrawer: function() { return VxeDrawer; },
  8713. VxeForm: function() { return VxeForm; },
  8714. VxeFormGather: function() { return VxeFormGather; },
  8715. VxeFormGroup: function() { return VxeFormGroup; },
  8716. VxeFormItem: function() { return VxeFormItem; },
  8717. VxeIcon: function() { return VxeIcon; },
  8718. VxeIconPicker: function() { return VxeIconPicker; },
  8719. VxeImage: function() { return VxeImage; },
  8720. VxeImageGroup: function() { return VxeImageGroup; },
  8721. VxeImagePreview: function() { return VxeImagePreview; },
  8722. VxeInput: function() { return VxeInput; },
  8723. VxeLayoutAside: function() { return VxeLayoutAside; },
  8724. VxeLayoutBody: function() { return VxeLayoutBody; },
  8725. VxeLayoutContainer: function() { return VxeLayoutContainer; },
  8726. VxeLayoutFooter: function() { return VxeLayoutFooter; },
  8727. VxeLayoutHeader: function() { return VxeLayoutHeader; },
  8728. VxeLink: function() { return VxeLink; },
  8729. VxeList: function() { return VxeList; },
  8730. VxeLoading: function() { return VxeLoading; },
  8731. VxeMenu: function() { return VxeMenu; },
  8732. VxeModal: function() { return VxeModal; },
  8733. VxeNoticeBar: function() { return VxeNoticeBar; },
  8734. VxeNumberInput: function() { return VxeNumberInput; },
  8735. VxeOptgroup: function() { return VxeOptgroup; },
  8736. VxeOption: function() { return VxeOption; },
  8737. VxePager: function() { return VxePager; },
  8738. VxePasswordInput: function() { return VxePasswordInput; },
  8739. VxePrint: function() { return VxePrint; },
  8740. VxePrintPageBreak: function() { return VxePrintPageBreak; },
  8741. VxePulldown: function() { return VxePulldown; },
  8742. VxeRadio: function() { return VxeRadio; },
  8743. VxeRadioButton: function() { return VxeRadioButton; },
  8744. VxeRadioGroup: function() { return VxeRadioGroup; },
  8745. VxeRate: function() { return VxeRate; },
  8746. VxeResult: function() { return VxeResult; },
  8747. VxeRow: function() { return VxeRow; },
  8748. VxeSelect: function() { return VxeSelect; },
  8749. VxeSlider: function() { return VxeSlider; },
  8750. VxeSplit: function() { return VxeSplit; },
  8751. VxeSplitPane: function() { return VxeSplitPane; },
  8752. VxeSteps: function() { return VxeSteps; },
  8753. VxeSwitch: function() { return VxeSwitch; },
  8754. VxeTabPane: function() { return VxeTabPane; },
  8755. VxeTableSelect: function() { return VxeTableSelect; },
  8756. VxeTabs: function() { return VxeTabs; },
  8757. VxeTag: function() { return VxeTag; },
  8758. VxeText: function() { return VxeText; },
  8759. VxeTextEllipsis: function() { return VxeTextEllipsis; },
  8760. VxeTextarea: function() { return VxeTextarea; },
  8761. VxeTip: function() { return VxeTip; },
  8762. VxeTooltip: function() { return VxeTooltip; },
  8763. VxeTree: function() { return VxeTree; },
  8764. VxeTreeSelect: function() { return VxeTreeSelect; },
  8765. VxeUI: function() { return index_esm_VxeUI; },
  8766. VxeUpload: function() { return VxeUpload; },
  8767. VxeWatermark: function() { return VxeWatermark; },
  8768. Vxeempty: function() { return Vxeempty; },
  8769. Watermark: function() { return Watermark; },
  8770. WatermarkController: function() { return WatermarkController; },
  8771. checkVersion: function() { return checkVersion; },
  8772. clipboard: function() { return clipboard; },
  8773. commands: function() { return commands; },
  8774. component: function() { return component; },
  8775. config: function() { return config; },
  8776. coreVersion: function() { return coreVersion; },
  8777. createEvent: function() { return createEvent; },
  8778. drawer: function() { return components_drawer; },
  8779. empty: function() { return empty_empty; },
  8780. formats: function() { return formats; },
  8781. getComponent: function() { return getComponent; },
  8782. getConfig: function() { return getConfig; },
  8783. getI18n: function() { return getI18n; },
  8784. getIcon: function() { return getIcon; },
  8785. getLanguage: function() { return getLanguage; },
  8786. getSlotVNs: function() { return getSlotVNs; },
  8787. getTheme: function() { return getTheme; },
  8788. globalEvents: function() { return globalEvents; },
  8789. globalMixins: function() { return globalMixins; },
  8790. globalResize: function() { return globalResize; },
  8791. globalStore: function() { return globalStore; },
  8792. handleCheckInfo: function() { return handleCheckInfo; },
  8793. hasComponent: function() { return hasComponent; },
  8794. hasLanguage: function() { return hasLanguage; },
  8795. install: function() { return install; },
  8796. interceptor: function() { return interceptor; },
  8797. loading: function() { return loading; },
  8798. log: function() { return log; },
  8799. menus: function() { return menus; },
  8800. modal: function() { return components_modal; },
  8801. permission: function() { return permission; },
  8802. permissionMixin: function() { return permissionMixin; },
  8803. print: function() { return components_print; },
  8804. readFile: function() { return readFile; },
  8805. renderCustomIcon: function() { return renderCustomIcon; },
  8806. renderEmptyElement: function() { return renderEmptyElement; },
  8807. renderGlobalIcon: function() { return renderGlobalIcon; },
  8808. renderer: function() { return renderer; },
  8809. saveFile: function() { return saveFile; },
  8810. setConfig: function() { return setConfig; },
  8811. setI18n: function() { return setI18n; },
  8812. setIcon: function() { return setIcon; },
  8813. setLanguage: function() { return setLanguage; },
  8814. setTheme: function() { return setTheme; },
  8815. setup: function() { return setup; },
  8816. sizeMixin: function() { return sizeMixin; },
  8817. use: function() { return use; },
  8818. validators: function() { return validators; },
  8819. version: function() { return ui_version; },
  8820. watermark: function() { return components_watermark; }
  8821. });
  8822. ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
  8823. /* eslint-disable no-var */
  8824. // This file is imported into lib/wc client bundles.
  8825. if (typeof window !== 'undefined') {
  8826. var currentScript = window.document.currentScript
  8827. if (true) {
  8828. var getCurrentScript = __webpack_require__(1834)
  8829. currentScript = getCurrentScript()
  8830. // for backward compatibility, because previously we directly included the polyfill
  8831. if (!('currentScript' in document)) {
  8832. Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
  8833. }
  8834. }
  8835. var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  8836. if (src) {
  8837. __webpack_require__.p = src[1] // eslint-disable-line
  8838. }
  8839. }
  8840. // Indicate to webpack that this file can be concatenated
  8841. /* harmony default export */ var setPublicPath = (null);
  8842. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
  8843. var es_object_to_string = __webpack_require__(6099);
  8844. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
  8845. var web_dom_collections_for_each = __webpack_require__(3500);
  8846. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
  8847. var es_array_push = __webpack_require__(4114);
  8848. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
  8849. var es_function_name = __webpack_require__(2010);
  8850. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
  8851. var es_object_assign = __webpack_require__(9085);
  8852. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
  8853. var es_regexp_exec = __webpack_require__(7495);
  8854. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
  8855. var es_string_match = __webpack_require__(1761);
  8856. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/core.js
  8857. var coreVersion = "3.2.12";
  8858. var VxeCore = {
  8859. coreVersion: coreVersion,
  8860. uiVersion: '',
  8861. tableVersion: '',
  8862. designVersion: '',
  8863. ganttVersion: ''
  8864. };
  8865. // EXTERNAL MODULE: external {"root":"XEUtils","commonjs":"xe-utils","commonjs2":"xe-utils","amd":"xe-utils"}
  8866. var external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_ = __webpack_require__(8871);
  8867. var external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default = /*#__PURE__*/__webpack_require__.n(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_);
  8868. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
  8869. var es_number_constructor = __webpack_require__(2892);
  8870. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.test.js
  8871. var es_regexp_test = __webpack_require__(906);
  8872. ;// CONCATENATED MODULE: ./node_modules/dom-zindex/es/index.esm.js
  8873. var winDom = null;
  8874. var bodyEl = null;
  8875. var storeEl = null;
  8876. var storeId = 'z-index-manage';
  8877. var styleEl = null;
  8878. var styleId = 'z-index-style';
  8879. var storeMainKey = 'm';
  8880. var storeSubKey = 's';
  8881. var storeData = {
  8882. m: 1000,
  8883. s: 1000
  8884. };
  8885. function getDocument() {
  8886. if (!winDom) {
  8887. if (typeof document !== 'undefined') {
  8888. winDom = document;
  8889. }
  8890. }
  8891. return winDom;
  8892. }
  8893. function getBody() {
  8894. if (winDom && !bodyEl) {
  8895. bodyEl = winDom.body || winDom.getElementsByTagName('body')[0];
  8896. }
  8897. return bodyEl;
  8898. }
  8899. function getDomMaxZIndex() {
  8900. var max = 0;
  8901. var dom = getDocument();
  8902. if (dom) {
  8903. var body = getBody();
  8904. if (body) {
  8905. var allElem = body.getElementsByTagName('*');
  8906. for (var i = 0; i < allElem.length; i++) {
  8907. var elem = allElem[i];
  8908. if (elem && elem.style && elem.nodeType === 1) {
  8909. var zIndex = elem.style.zIndex;
  8910. if (zIndex && /^\d+$/.test(zIndex)) {
  8911. max = Math.max(max, Number(zIndex));
  8912. }
  8913. }
  8914. }
  8915. }
  8916. }
  8917. return max;
  8918. }
  8919. function getStyle() {
  8920. if (!styleEl) {
  8921. var dom = getDocument();
  8922. if (dom) {
  8923. styleEl = dom.getElementById(styleId);
  8924. if (!styleEl) {
  8925. styleEl = dom.createElement('style');
  8926. styleEl.id = styleId;
  8927. dom.getElementsByTagName('head')[0].appendChild(styleEl);
  8928. }
  8929. }
  8930. }
  8931. return styleEl;
  8932. }
  8933. function updateVar() {
  8934. var styEl = getStyle();
  8935. if (styEl) {
  8936. var prefixes = '--dom-';
  8937. var propKey = '-z-index';
  8938. styEl.innerHTML = ':root{' + prefixes + 'main' + propKey + ':' + getCurrent() + ';' + prefixes + 'sub' + propKey + ':' + getSubCurrent() + '}';
  8939. }
  8940. }
  8941. function getStoreDom() {
  8942. if (!storeEl) {
  8943. var dom = getDocument();
  8944. if (dom) {
  8945. storeEl = dom.getElementById(storeId);
  8946. if (!storeEl) {
  8947. var body = getBody();
  8948. if (body) {
  8949. storeEl = dom.createElement('div');
  8950. storeEl.id = storeId;
  8951. storeEl.style.display = 'none';
  8952. body.appendChild(storeEl);
  8953. setCurrent(storeData.m);
  8954. setSubCurrent(storeData.s);
  8955. }
  8956. }
  8957. }
  8958. }
  8959. return storeEl;
  8960. }
  8961. function createSetHandle(key) {
  8962. return function (value) {
  8963. if (value) {
  8964. value = Number(value);
  8965. storeData[key] = value;
  8966. var el = getStoreDom();
  8967. if (el) {
  8968. if (el.dataset) {
  8969. el.dataset[key] = value + '';
  8970. } else {
  8971. el.setAttribute('data-' + key, value + '');
  8972. }
  8973. }
  8974. }
  8975. updateVar();
  8976. return storeData[key];
  8977. };
  8978. }
  8979. var setCurrent = createSetHandle(storeMainKey);
  8980. function createGetHandle(key, nextMethod) {
  8981. return function getCurrent(currZindex) {
  8982. var zIndex;
  8983. var el = getStoreDom();
  8984. if (el) {
  8985. var domVal = el.dataset ? el.dataset[key] : el.getAttribute('data-' + key);
  8986. if (domVal) {
  8987. zIndex = Number(domVal);
  8988. }
  8989. }
  8990. if (!zIndex) {
  8991. zIndex = storeData[key];
  8992. }
  8993. if (currZindex) {
  8994. if (Number(currZindex) < zIndex) {
  8995. return nextMethod();
  8996. }
  8997. return currZindex;
  8998. }
  8999. return zIndex;
  9000. };
  9001. }
  9002. var getCurrent = createGetHandle(storeMainKey, getNext);
  9003. function getNext() {
  9004. return setCurrent(getCurrent() + 1);
  9005. }
  9006. var setSubCurrent = createSetHandle(storeSubKey);
  9007. var _getSubCurrent = createGetHandle(storeSubKey, getSubNext);
  9008. function getSubCurrent() {
  9009. return getCurrent() + _getSubCurrent();
  9010. }
  9011. function getSubNext() {
  9012. setSubCurrent(_getSubCurrent() + 1);
  9013. return getSubCurrent();
  9014. }
  9015. /**
  9016. * Web common z-index style management
  9017. */
  9018. var DomZIndex = {
  9019. setCurrent: setCurrent,
  9020. getCurrent: getCurrent,
  9021. getNext: getNext,
  9022. setSubCurrent: setSubCurrent,
  9023. getSubCurrent: getSubCurrent,
  9024. getSubNext: getSubNext,
  9025. getMax: getDomMaxZIndex
  9026. };
  9027. updateVar();
  9028. /* harmony default export */ var index_esm = (DomZIndex);
  9029. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/configStore.js
  9030. var globalConfigStore = {
  9031. size: '',
  9032. version: 1,
  9033. zIndex: 999,
  9034. resizeInterval: 500
  9035. };
  9036. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/themeStore.js
  9037. var themeConfigStore = {
  9038. theme: ''
  9039. };
  9040. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/theme.js
  9041. function setTheme(name) {
  9042. var theme = !name || name === 'default' ? 'light' : name;
  9043. themeConfigStore.theme = theme;
  9044. if (typeof document !== 'undefined') {
  9045. var documentElement = document.documentElement;
  9046. if (documentElement) {
  9047. documentElement.setAttribute('data-vxe-ui-theme', theme);
  9048. }
  9049. }
  9050. return VxeCore;
  9051. }
  9052. function getTheme() {
  9053. return themeConfigStore.theme;
  9054. }
  9055. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/config.js
  9056. /**
  9057. * 全局参数设置
  9058. */
  9059. function setConfig(options) {
  9060. if (options) {
  9061. if (options.zIndex) {
  9062. index_esm.setCurrent(options.zIndex);
  9063. }
  9064. if (options.theme) {
  9065. setTheme(options.theme);
  9066. }
  9067. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(globalConfigStore, options);
  9068. }
  9069. return VxeCore;
  9070. }
  9071. /**
  9072. * 获取全局参数
  9073. */
  9074. function getConfig(key, defaultValue) {
  9075. return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(globalConfigStore, key, defaultValue) : globalConfigStore;
  9076. }
  9077. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/dataStore.js
  9078. var globalStore = {};
  9079. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/iconStore.js
  9080. var iconConfigStore = {};
  9081. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/vm.js
  9082. function getSlotVNs(vns) {
  9083. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(vns)) {
  9084. return vns;
  9085. }
  9086. return vns ? [vns] : [];
  9087. }
  9088. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/icon.js
  9089. function setIcon(options) {
  9090. if (options) {
  9091. Object.assign(iconConfigStore, options);
  9092. }
  9093. return VxeCore;
  9094. }
  9095. function getIcon(key) {
  9096. return arguments.length ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(iconConfigStore, key) : iconConfigStore;
  9097. }
  9098. function renderGlobalIcon(h, name) {
  9099. var icon = getIcon(name);
  9100. return renderCustomIcon(h, icon, name);
  9101. }
  9102. function renderCustomIcon(h, icon, name) {
  9103. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(icon)) {
  9104. return h('span', {}, getSlotVNs(icon({
  9105. name: name
  9106. })));
  9107. }
  9108. return h('i', {
  9109. class: icon
  9110. });
  9111. }
  9112. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
  9113. var es_error_cause = __webpack_require__(6280);
  9114. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
  9115. function _classCallCheck(a, n) {
  9116. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  9117. }
  9118. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
  9119. var es_symbol = __webpack_require__(2675);
  9120. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
  9121. var es_symbol_description = __webpack_require__(9463);
  9122. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js
  9123. var es_symbol_iterator = __webpack_require__(2259);
  9124. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
  9125. var es_array_iterator = __webpack_require__(3792);
  9126. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
  9127. var es_string_iterator = __webpack_require__(7764);
  9128. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
  9129. var web_dom_collections_iterator = __webpack_require__(2953);
  9130. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
  9131. function _typeof(o) {
  9132. "@babel/helpers - typeof";
  9133. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  9134. return typeof o;
  9135. } : function (o) {
  9136. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  9137. }, _typeof(o);
  9138. }
  9139. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.to-primitive.js
  9140. var es_symbol_to_primitive = __webpack_require__(5700);
  9141. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.date.to-primitive.js
  9142. var es_date_to_primitive = __webpack_require__(9572);
  9143. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
  9144. function toPrimitive(t, r) {
  9145. if ("object" != _typeof(t) || !t) return t;
  9146. var e = t[Symbol.toPrimitive];
  9147. if (void 0 !== e) {
  9148. var i = e.call(t, r || "default");
  9149. if ("object" != _typeof(i)) return i;
  9150. throw new TypeError("@@toPrimitive must return a primitive value.");
  9151. }
  9152. return ("string" === r ? String : Number)(t);
  9153. }
  9154. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
  9155. function toPropertyKey(t) {
  9156. var i = toPrimitive(t, "string");
  9157. return "symbol" == _typeof(i) ? i : i + "";
  9158. }
  9159. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
  9160. function _defineProperties(e, r) {
  9161. for (var t = 0; t < r.length; t++) {
  9162. var o = r[t];
  9163. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
  9164. }
  9165. }
  9166. function _createClass(e, r, t) {
  9167. return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
  9168. writable: !1
  9169. }), e;
  9170. }
  9171. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/event.js
  9172. var GLOBAL_EVENT_KEYS = {
  9173. F2: 'F2',
  9174. ESCAPE: 'Escape',
  9175. ENTER: 'Enter',
  9176. TAB: 'Tab',
  9177. DELETE: 'Delete',
  9178. BACKSPACE: 'Backspace',
  9179. SPACEBAR: ' ',
  9180. CONTEXT_MENU: 'ContextMenu',
  9181. ARROW_UP: 'ArrowUp',
  9182. ARROW_DOWN: 'ArrowDown',
  9183. ARROW_LEFT: 'ArrowLeft',
  9184. ARROW_RIGHT: 'ArrowRight',
  9185. PAGE_UP: 'PageUp',
  9186. PAGE_DOWN: 'PageDown',
  9187. Control: 'Control',
  9188. R: 'R',
  9189. P: 'P',
  9190. Z: 'Z',
  9191. X: 'X',
  9192. C: 'C',
  9193. V: 'V',
  9194. M: 'M'
  9195. };
  9196. var browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
  9197. var convertEventKeys = {
  9198. ' ': 'Spacebar',
  9199. Apps: GLOBAL_EVENT_KEYS.CONTEXT_MENU,
  9200. Del: GLOBAL_EVENT_KEYS.DELETE,
  9201. Up: GLOBAL_EVENT_KEYS.ARROW_UP,
  9202. Down: GLOBAL_EVENT_KEYS.ARROW_DOWN,
  9203. Left: GLOBAL_EVENT_KEYS.ARROW_LEFT,
  9204. Right: GLOBAL_EVENT_KEYS.ARROW_RIGHT
  9205. };
  9206. // 监听全局事件
  9207. var wheelName = browse.firefox ? 'DOMMouseScroll' : 'mousewheel';
  9208. var eventStore = [];
  9209. function triggerEvent(evnt) {
  9210. var isWheel = evnt.type === wheelName;
  9211. eventStore.forEach(function (_ref) {
  9212. var type = _ref.type,
  9213. cb = _ref.cb;
  9214. // 如果被取消冒泡,不再执行
  9215. if (!evnt.cancelBubble) {
  9216. if (type === evnt.type || isWheel && type === 'mousewheel') {
  9217. cb(evnt);
  9218. }
  9219. }
  9220. });
  9221. }
  9222. var VxeComponentEvent = /*#__PURE__*/function () {
  9223. function VxeComponentEvent(evnt, params1, params2) {
  9224. var _this = this;
  9225. _classCallCheck(this, VxeComponentEvent);
  9226. Object.defineProperty(this, "$event", {
  9227. enumerable: true,
  9228. configurable: true,
  9229. writable: true,
  9230. value: void 0
  9231. });
  9232. Object.defineProperty(this, "type", {
  9233. enumerable: true,
  9234. configurable: true,
  9235. writable: true,
  9236. value: ''
  9237. });
  9238. Object.defineProperty(this, "key", {
  9239. enumerable: true,
  9240. configurable: true,
  9241. writable: true,
  9242. value: ''
  9243. });
  9244. Object.defineProperty(this, "code", {
  9245. enumerable: true,
  9246. configurable: true,
  9247. writable: true,
  9248. value: ''
  9249. });
  9250. this.$event = evnt;
  9251. if (evnt) {
  9252. if (evnt.type) {
  9253. this.type = evnt.type;
  9254. }
  9255. if (evnt.key) {
  9256. this.key = evnt.key;
  9257. }
  9258. if (evnt.code) {
  9259. this.code = evnt.code;
  9260. }
  9261. }
  9262. Object.assign(this, params1);
  9263. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(params2, function (val, key) {
  9264. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(val)) {
  9265. var rest = null;
  9266. var isRun = false;
  9267. Object.defineProperty(_this, key, {
  9268. get: function get() {
  9269. if (!isRun) {
  9270. isRun = true;
  9271. rest = val();
  9272. }
  9273. return rest;
  9274. }
  9275. });
  9276. } else {
  9277. _this[key] = val;
  9278. }
  9279. });
  9280. }
  9281. return _createClass(VxeComponentEvent, [{
  9282. key: "stopPropagation",
  9283. value: function stopPropagation() {
  9284. var evnt = this.$event;
  9285. if (evnt) {
  9286. evnt.stopPropagation();
  9287. }
  9288. }
  9289. }, {
  9290. key: "preventDefault",
  9291. value: function preventDefault() {
  9292. var evnt = this.$event;
  9293. if (evnt) {
  9294. evnt.preventDefault();
  9295. }
  9296. }
  9297. }]);
  9298. }();
  9299. var createEvent = function createEvent(evnt, params1, params2) {
  9300. if (evnt instanceof VxeComponentEvent) {
  9301. evnt = evnt.$event;
  9302. }
  9303. return new VxeComponentEvent(evnt, params1, params2);
  9304. };
  9305. var globalEvents = {
  9306. on: function on(comp, type, cb) {
  9307. eventStore.push({
  9308. comp: comp,
  9309. type: type,
  9310. cb: cb
  9311. });
  9312. },
  9313. off: function off(comp, type) {
  9314. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(eventStore, function (item) {
  9315. return item.comp === comp && item.type === type;
  9316. });
  9317. },
  9318. hasKey: function hasKey(evnt, targetKey) {
  9319. var key = evnt.key;
  9320. targetKey = targetKey.toLowerCase();
  9321. return key ? targetKey === key.toLowerCase() || !!(convertEventKeys[key] && convertEventKeys[key].toLowerCase() === targetKey) : false;
  9322. }
  9323. };
  9324. if (browse.isDoc) {
  9325. if (!browse.msie) {
  9326. window.addEventListener('copy', triggerEvent, false);
  9327. window.addEventListener('cut', triggerEvent, false);
  9328. window.addEventListener('paste', triggerEvent, false);
  9329. }
  9330. document.addEventListener('keydown', triggerEvent, false);
  9331. document.addEventListener('contextmenu', triggerEvent, false);
  9332. window.addEventListener('mousedown', triggerEvent, false);
  9333. window.addEventListener('blur', triggerEvent, false);
  9334. window.addEventListener('resize', triggerEvent, false);
  9335. window.addEventListener(wheelName, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().throttle(triggerEvent, 100, {
  9336. leading: true,
  9337. trailing: false
  9338. }), {
  9339. passive: true,
  9340. capture: false
  9341. });
  9342. }
  9343. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/resize.js
  9344. /**
  9345. * 监听 resize 事件
  9346. * 如果项目中已使用了 resize-observer-polyfill,那么只需要将方法定义全局,该组件就会自动使用
  9347. */
  9348. var resizeTimeout;
  9349. /* eslint-disable no-use-before-define */
  9350. var resize_eventStore = [];
  9351. var defaultInterval = 500;
  9352. function eventHandle() {
  9353. if (resize_eventStore.length) {
  9354. resize_eventStore.forEach(function (item) {
  9355. item.tarList.forEach(function (observer) {
  9356. var target = observer.target,
  9357. width = observer.width,
  9358. heighe = observer.heighe;
  9359. var clientWidth = target.clientWidth;
  9360. var clientHeight = target.clientHeight;
  9361. var rWidth = clientWidth && width !== clientWidth;
  9362. var rHeight = clientHeight && heighe !== clientHeight;
  9363. if (rWidth || rHeight) {
  9364. observer.width = clientWidth;
  9365. observer.heighe = clientHeight;
  9366. setTimeout(item.callback);
  9367. }
  9368. });
  9369. });
  9370. /* eslint-disable @typescript-eslint/no-use-before-define */
  9371. eventListener();
  9372. }
  9373. }
  9374. function eventListener() {
  9375. clearTimeout(resizeTimeout);
  9376. resizeTimeout = setTimeout(eventHandle, globalConfigStore.resizeInterval || defaultInterval);
  9377. }
  9378. var XEResizeObserver = /*#__PURE__*/function () {
  9379. function XEResizeObserver(callback) {
  9380. _classCallCheck(this, XEResizeObserver);
  9381. Object.defineProperty(this, "tarList", {
  9382. enumerable: true,
  9383. configurable: true,
  9384. writable: true,
  9385. value: []
  9386. });
  9387. Object.defineProperty(this, "callback", {
  9388. enumerable: true,
  9389. configurable: true,
  9390. writable: true,
  9391. value: void 0
  9392. });
  9393. this.callback = callback;
  9394. }
  9395. return _createClass(XEResizeObserver, [{
  9396. key: "observe",
  9397. value: function observe(target) {
  9398. var _this = this;
  9399. if (target) {
  9400. var tarList = this.tarList;
  9401. if (!tarList.some(function (observer) {
  9402. return observer.target === target;
  9403. })) {
  9404. tarList.push({
  9405. target: target,
  9406. width: target.clientWidth,
  9407. heighe: target.clientHeight
  9408. });
  9409. }
  9410. if (!resize_eventStore.length) {
  9411. eventListener();
  9412. }
  9413. if (!resize_eventStore.some(function (item) {
  9414. return item === _this;
  9415. })) {
  9416. resize_eventStore.push(this);
  9417. }
  9418. }
  9419. }
  9420. }, {
  9421. key: "unobserve",
  9422. value: function unobserve(target) {
  9423. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(resize_eventStore, function (item) {
  9424. return item.tarList.some(function (observer) {
  9425. return observer.target === target;
  9426. });
  9427. });
  9428. }
  9429. }, {
  9430. key: "disconnect",
  9431. value: function disconnect() {
  9432. var _this2 = this;
  9433. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(resize_eventStore, function (item) {
  9434. return item === _this2;
  9435. });
  9436. }
  9437. }]);
  9438. }();
  9439. var globalResize = {
  9440. create: function create(callback) {
  9441. if (window.ResizeObserver) {
  9442. return new window.ResizeObserver(callback);
  9443. }
  9444. return new XEResizeObserver(callback);
  9445. }
  9446. };
  9447. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
  9448. function _defineProperty(e, r, t) {
  9449. return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
  9450. value: t,
  9451. enumerable: !0,
  9452. configurable: !0,
  9453. writable: !0
  9454. }) : e[r] = t, e;
  9455. }
  9456. // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
  9457. var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
  9458. var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
  9459. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/i18nStore.js
  9460. var I18nStore = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
  9461. data: function data() {
  9462. return {
  9463. language: '',
  9464. langMaps: {}
  9465. };
  9466. }
  9467. });
  9468. var i18nConfigStore = new I18nStore();
  9469. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/i18n.js
  9470. var checkInstall = false;
  9471. var cacheMaps = {};
  9472. function getI18n(key, args) {
  9473. var langMaps = i18nConfigStore.langMaps,
  9474. language = i18nConfigStore.language;
  9475. var i18n = globalConfigStore.i18n;
  9476. if (i18n) {
  9477. return "".concat(i18n(key, args) || '');
  9478. }
  9479. if (!checkInstall) {
  9480. if (!langMaps[language]) {
  9481. console.error("[vxe core] \u8BED\u8A00\u5305\u672A\u5B89\u88C5\u3002Language not installed. https://".concat(VxeCore.uiVersion ? 'vxeui.com' : 'vxetable.cn', "/#/start/i18n"));
  9482. }
  9483. checkInstall = true;
  9484. }
  9485. if (!args && cacheMaps[key]) {
  9486. return cacheMaps[key];
  9487. }
  9488. var i18nLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFormatString(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(langMaps[language], key, key), args);
  9489. if (!args) {
  9490. cacheMaps[key] = i18nLabel;
  9491. }
  9492. return i18nLabel;
  9493. }
  9494. function setLanguage(locale) {
  9495. var language = i18nConfigStore.language;
  9496. var targetlang = locale || 'zh-CN';
  9497. if (language !== targetlang) {
  9498. i18nConfigStore.language = targetlang;
  9499. cacheMaps = {};
  9500. }
  9501. return VxeCore;
  9502. }
  9503. function setI18n(locale, data) {
  9504. var langMaps = i18nConfigStore.langMaps;
  9505. i18nConfigStore.langMaps = Object.assign({}, langMaps, _defineProperty({}, locale, Object.assign({}, data)));
  9506. return VxeCore;
  9507. }
  9508. function hasLanguage(language) {
  9509. var langMaps = i18nConfigStore.langMaps;
  9510. return !!langMaps[language];
  9511. }
  9512. function getLanguage() {
  9513. var language = i18nConfigStore.language;
  9514. return language;
  9515. }
  9516. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
  9517. var es_array_concat = __webpack_require__(8706);
  9518. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/log.js
  9519. function createLog(type, name) {
  9520. return function (key, args) {
  9521. var msg = "[vxe ".concat(name || '', "] ").concat(getI18n(key, args));
  9522. console[type](msg);
  9523. return msg;
  9524. };
  9525. }
  9526. var version = "3.2.12";
  9527. var log = {
  9528. create: createLog,
  9529. warn: createLog('warn', "v".concat(version)),
  9530. err: createLog('error', "v".concat(version))
  9531. };
  9532. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/renderer.js
  9533. /**
  9534. * 内置的组件渲染
  9535. */
  9536. var renderMap = {};
  9537. /**
  9538. * 全局渲染器
  9539. */
  9540. var renderer = {
  9541. mixin: function mixin(opts) {
  9542. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(opts, function (options, name) {
  9543. return renderer.add(name, options);
  9544. });
  9545. return renderer;
  9546. },
  9547. get: function get(name) {
  9548. return renderMap[name] || null;
  9549. },
  9550. add: function add(name, options) {
  9551. if (name && options) {
  9552. var renders = renderMap[name];
  9553. if (renders) {
  9554. // 检测是否覆盖
  9555. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (val, key) {
  9556. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(renders[key]) && renders[key] !== val) {
  9557. log.warn('vxe.error.coverProp', ["Renderer.".concat(name), key]);
  9558. }
  9559. });
  9560. Object.assign(renders, options);
  9561. } else {
  9562. renderMap[name] = options;
  9563. }
  9564. }
  9565. return renderer;
  9566. },
  9567. forEach: function forEach(callback) {
  9568. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(renderMap, callback);
  9569. return renderer;
  9570. },
  9571. delete: function _delete(name) {
  9572. delete renderMap[name];
  9573. return renderer;
  9574. }
  9575. };
  9576. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
  9577. var es_array_includes = __webpack_require__(4423);
  9578. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
  9579. var es_string_includes = __webpack_require__(1699);
  9580. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/store.js
  9581. /**
  9582. * 创建数据仓库
  9583. */
  9584. var Store = /*#__PURE__*/function () {
  9585. function Store() {
  9586. _classCallCheck(this, Store);
  9587. Object.defineProperty(this, "store", {
  9588. enumerable: true,
  9589. configurable: true,
  9590. writable: true,
  9591. value: {}
  9592. });
  9593. }
  9594. return _createClass(Store, [{
  9595. key: "mixin",
  9596. value: function mixin(options) {
  9597. var _this = this;
  9598. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
  9599. _this.add(key, item);
  9600. });
  9601. return this;
  9602. }
  9603. }, {
  9604. key: "has",
  9605. value: function has(name) {
  9606. return !!this.get(name);
  9607. }
  9608. }, {
  9609. key: "get",
  9610. value: function get(name) {
  9611. return this.store[name];
  9612. }
  9613. }, {
  9614. key: "add",
  9615. value: function add(name, options) {
  9616. var conf = this.store[name];
  9617. // 检测是否覆盖
  9618. var confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
  9619. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
  9620. if (confKeys.includes(key)) {
  9621. log.warn('vxe.error.coverProp', [name, key]);
  9622. }
  9623. });
  9624. this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, options) : options;
  9625. return this;
  9626. }
  9627. }, {
  9628. key: "delete",
  9629. value: function _delete(name) {
  9630. delete this.store[name];
  9631. }
  9632. }, {
  9633. key: "forEach",
  9634. value: function forEach(callback) {
  9635. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(this.store, callback);
  9636. }
  9637. }]);
  9638. }();
  9639. /* harmony default export */ var store = (Store);
  9640. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/validators.js
  9641. var validators = new store();
  9642. Object.assign(validators, {
  9643. _name: 'Validators'
  9644. });
  9645. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/menus.js
  9646. var VXEMenusStore = /*#__PURE__*/function () {
  9647. function VXEMenusStore() {
  9648. _classCallCheck(this, VXEMenusStore);
  9649. Object.defineProperty(this, "store", {
  9650. enumerable: true,
  9651. configurable: true,
  9652. writable: true,
  9653. value: {}
  9654. });
  9655. }
  9656. return _createClass(VXEMenusStore, [{
  9657. key: "mixin",
  9658. value: function mixin(options) {
  9659. var _this = this;
  9660. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
  9661. _this.add(key, item);
  9662. });
  9663. return this;
  9664. }
  9665. }, {
  9666. key: "has",
  9667. value: function has(name) {
  9668. return !!this.get(name);
  9669. }
  9670. }, {
  9671. key: "get",
  9672. value: function get(name) {
  9673. return this.store[name];
  9674. }
  9675. }, {
  9676. key: "add",
  9677. value: function add(name, render) {
  9678. var conf = this.store[name];
  9679. // 兼容
  9680. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
  9681. log.warn('vxe.error.delProp', ['menus -> callback', 'menuMethod']);
  9682. render = {
  9683. menuMethod: render
  9684. };
  9685. }
  9686. // 检测是否覆盖
  9687. var confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
  9688. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(render, function (item, key) {
  9689. if (confKeys.includes(key)) {
  9690. log.warn('vxe.error.coverProp', [name, key]);
  9691. }
  9692. });
  9693. this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
  9694. return this;
  9695. }
  9696. }, {
  9697. key: "delete",
  9698. value: function _delete(name) {
  9699. delete this.store[name];
  9700. }
  9701. }, {
  9702. key: "forEach",
  9703. value: function forEach(callback) {
  9704. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(this.store, callback);
  9705. }
  9706. }]);
  9707. }();
  9708. var menus = new VXEMenusStore();
  9709. Object.assign(menus, {
  9710. _name: 'Menus'
  9711. });
  9712. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/formats.js
  9713. var VXEFormatsStore = /*#__PURE__*/function () {
  9714. function VXEFormatsStore() {
  9715. _classCallCheck(this, VXEFormatsStore);
  9716. Object.defineProperty(this, "store", {
  9717. enumerable: true,
  9718. configurable: true,
  9719. writable: true,
  9720. value: {}
  9721. });
  9722. }
  9723. return _createClass(VXEFormatsStore, [{
  9724. key: "mixin",
  9725. value: function mixin(options) {
  9726. var _this = this;
  9727. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
  9728. _this.add(key, item);
  9729. });
  9730. return this;
  9731. }
  9732. }, {
  9733. key: "has",
  9734. value: function has(name) {
  9735. return !!this.get(name);
  9736. }
  9737. }, {
  9738. key: "get",
  9739. value: function get(name) {
  9740. return this.store[name];
  9741. }
  9742. }, {
  9743. key: "add",
  9744. value: function add(name, render) {
  9745. var conf = this.store[name];
  9746. // 兼容
  9747. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
  9748. log.warn('vxe.error.delProp', ['formats -> callback', 'cellFormatMethod']);
  9749. render = {
  9750. cellFormatMethod: render
  9751. };
  9752. }
  9753. // 检测是否覆盖
  9754. var confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
  9755. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(render, function (item, key) {
  9756. if (confKeys.includes(key)) {
  9757. log.warn('vxe.error.coverProp', [name, key]);
  9758. }
  9759. });
  9760. this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
  9761. return this;
  9762. }
  9763. }, {
  9764. key: "delete",
  9765. value: function _delete(name) {
  9766. delete this.store[name];
  9767. }
  9768. }, {
  9769. key: "forEach",
  9770. value: function forEach(callback) {
  9771. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(this.store, callback);
  9772. }
  9773. }]);
  9774. }();
  9775. var formats = new VXEFormatsStore();
  9776. Object.assign(formats, {
  9777. _name: 'Formats'
  9778. });
  9779. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/commands.js
  9780. var VXECommandsStore = /*#__PURE__*/function () {
  9781. function VXECommandsStore() {
  9782. _classCallCheck(this, VXECommandsStore);
  9783. Object.defineProperty(this, "store", {
  9784. enumerable: true,
  9785. configurable: true,
  9786. writable: true,
  9787. value: {}
  9788. });
  9789. }
  9790. return _createClass(VXECommandsStore, [{
  9791. key: "mixin",
  9792. value: function mixin(options) {
  9793. var _this = this;
  9794. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
  9795. _this.add(key, item);
  9796. });
  9797. return this;
  9798. }
  9799. }, {
  9800. key: "has",
  9801. value: function has(name) {
  9802. return !!this.get(name);
  9803. }
  9804. }, {
  9805. key: "get",
  9806. value: function get(name) {
  9807. return this.store[name];
  9808. }
  9809. }, {
  9810. key: "add",
  9811. value: function add(name, render) {
  9812. var conf = this.store[name];
  9813. // 兼容
  9814. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
  9815. log.warn('vxe.error.delProp', ['commands -> callback', 'commandMethod']);
  9816. render = {
  9817. commandMethod: render
  9818. };
  9819. }
  9820. // 检测是否覆盖
  9821. var confKeys = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(conf);
  9822. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(render, function (item, key) {
  9823. if (confKeys.includes(key)) {
  9824. log.warn('vxe.error.coverProp', [name, key]);
  9825. }
  9826. });
  9827. this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
  9828. return this;
  9829. }
  9830. }, {
  9831. key: "delete",
  9832. value: function _delete(name) {
  9833. delete this.store[name];
  9834. }
  9835. }, {
  9836. key: "forEach",
  9837. value: function forEach(callback) {
  9838. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(this.store, callback);
  9839. }
  9840. }]);
  9841. }();
  9842. var commands = new VXECommandsStore();
  9843. Object.assign(commands, {
  9844. _name: 'Commands'
  9845. });
  9846. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/interceptor.js
  9847. var storeMap = {};
  9848. var interceptor = {
  9849. mixin: function mixin(options) {
  9850. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (render, type) {
  9851. interceptor.add(type, render);
  9852. });
  9853. return interceptor;
  9854. },
  9855. get: function get(type) {
  9856. return storeMap[type] || [];
  9857. },
  9858. add: function add(type, render) {
  9859. // 兼容
  9860. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
  9861. // log.warn('vxe.error.delProp', ['interceptor -> callback', 'tableInterceptorMethod'])
  9862. render = {
  9863. tableInterceptorMethod: render
  9864. };
  9865. }
  9866. var callback = render.tableInterceptorMethod;
  9867. if (callback) {
  9868. var eList = storeMap[type];
  9869. if (!eList) {
  9870. eList = storeMap[type] = [];
  9871. }
  9872. // 检测重复
  9873. if (eList.indexOf(callback) > -1) {
  9874. log.warn('vxe.error.coverProp', ['Interceptor', type]);
  9875. }
  9876. eList.push(callback);
  9877. }
  9878. return interceptor;
  9879. },
  9880. delete: function _delete(type, render) {
  9881. var eList = storeMap[type];
  9882. if (eList) {
  9883. // 兼容
  9884. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
  9885. render = {
  9886. tableInterceptorMethod: render
  9887. };
  9888. }
  9889. var callback = render ? render.tableInterceptorMethod : null;
  9890. if (callback) {
  9891. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(eList, function (fn) {
  9892. return fn === callback;
  9893. });
  9894. } else {
  9895. delete storeMap[type];
  9896. }
  9897. }
  9898. }
  9899. };
  9900. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/clipboard.js
  9901. var copyElem;
  9902. var clipStore = {
  9903. text: '',
  9904. html: ''
  9905. };
  9906. function handleText(text) {
  9907. if (!copyElem) {
  9908. copyElem = document.createElement('textarea');
  9909. copyElem.id = '$VxeCopy';
  9910. var styles = copyElem.style;
  9911. styles.width = '48px';
  9912. styles.height = '24px';
  9913. styles.position = 'fixed';
  9914. styles.zIndex = '0';
  9915. styles.left = '-500px';
  9916. styles.top = '-500px';
  9917. document.body.appendChild(copyElem);
  9918. }
  9919. copyElem.value = text;
  9920. }
  9921. var clipboard = {
  9922. getStore: function getStore() {
  9923. return clipStore;
  9924. },
  9925. setStore: function setStore(data) {
  9926. Object.assign(clipStore, data || {});
  9927. },
  9928. /**
  9929. * 复制内容到剪贴板
  9930. *
  9931. * @param {String} content Text 内容
  9932. */
  9933. copy: function copy(content) {
  9934. var result = false;
  9935. try {
  9936. var text = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content);
  9937. handleText(text);
  9938. copyElem.select();
  9939. copyElem.setSelectionRange(0, copyElem.value.length);
  9940. result = document.execCommand('copy');
  9941. copyElem.blur();
  9942. clipStore.text = text;
  9943. clipStore.html = '';
  9944. } catch (e) {}
  9945. return result;
  9946. },
  9947. getText: function getText() {
  9948. return clipStore.text || '';
  9949. }
  9950. };
  9951. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/permission.js
  9952. function handleCheckInfo(permissionCode, permissionMethod) {
  9953. var checkVisible = true;
  9954. var checkDisabled = false;
  9955. var checkMethod = permissionMethod || globalConfigStore.permissionMethod;
  9956. if (permissionCode && checkMethod) {
  9957. checkVisible = false;
  9958. checkDisabled = true;
  9959. var vDone = false;
  9960. var dDone = false;
  9961. // 或 使用 | 隔开:任意一个为可视,则可视;任意一个禁用,则禁用
  9962. var codeList = String(permissionCode).split('|');
  9963. for (var i = 0; i < codeList.length; i++) {
  9964. var code = codeList[i];
  9965. var visible = true;
  9966. var disabled = false;
  9967. var rest = checkMethod({
  9968. code: code
  9969. });
  9970. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(rest)) {
  9971. visible = rest;
  9972. } else if (rest) {
  9973. visible = !!rest.visible;
  9974. disabled = !!rest.disabled;
  9975. }
  9976. if (!disabled && !dDone) {
  9977. dDone = true;
  9978. checkDisabled = disabled;
  9979. }
  9980. if (visible && !vDone) {
  9981. vDone = true;
  9982. checkVisible = visible;
  9983. }
  9984. if (vDone && dDone) {
  9985. break;
  9986. }
  9987. }
  9988. }
  9989. var info = {
  9990. code: permissionCode,
  9991. visible: checkVisible,
  9992. disabled: checkDisabled
  9993. };
  9994. return info;
  9995. }
  9996. var permission = {
  9997. getCheckInfo: function getCheckInfo(code) {
  9998. return handleCheckInfo(code);
  9999. },
  10000. checkVisible: function checkVisible(code) {
  10001. var permissionInfo = handleCheckInfo(code);
  10002. return permissionInfo.visible;
  10003. },
  10004. checkDisable: function checkDisable(code) {
  10005. var permissionInfo = handleCheckInfo(code);
  10006. return permissionInfo.disabled;
  10007. }
  10008. };
  10009. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/src/mixins.js
  10010. var sizeMixin = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
  10011. inject: {
  10012. $xeSizeInfo: {
  10013. default: null
  10014. }
  10015. },
  10016. provide: function provide() {
  10017. var _this = this;
  10018. return {
  10019. $xeSizeInfo: {
  10020. getSize: function getSize() {
  10021. return _this.computeSize;
  10022. }
  10023. }
  10024. };
  10025. },
  10026. computed: {
  10027. computeSize: function computeSize() {
  10028. var size = this.size;
  10029. var $xeSizeInfo = this.$xeSizeInfo;
  10030. return size || ($xeSizeInfo ? $xeSizeInfo.getSize() : null);
  10031. }
  10032. }
  10033. });
  10034. var permissionMixin = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
  10035. computed: {
  10036. computePermissionInfo: function computePermissionInfo() {
  10037. return handleCheckInfo(this.permissionCode, this.permissionMethod);
  10038. }
  10039. }
  10040. });
  10041. var globalMixins = {
  10042. sizeMixin: sizeMixin,
  10043. permissionMixin: permissionMixin
  10044. };
  10045. ;// CONCATENATED MODULE: ./node_modules/@vxe-ui/core/es/index.esm.js
  10046. var installedPlugins = [];
  10047. function use(Plugin, options) {
  10048. if (Plugin && Plugin.install) {
  10049. if (installedPlugins.indexOf(Plugin) === -1) {
  10050. Plugin.install(index_esm_VxeUI, options);
  10051. installedPlugins.push(Plugin);
  10052. }
  10053. }
  10054. return index_esm_VxeUI;
  10055. }
  10056. var components = {};
  10057. function getComponent(name) {
  10058. return components[name] || null;
  10059. }
  10060. function component(comp) {
  10061. if (comp && comp.name) {
  10062. components[comp.name] = comp;
  10063. components[external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().kebabCase(comp.name)] = comp;
  10064. }
  10065. }
  10066. function hasComponent(name) {
  10067. return !!components[name];
  10068. }
  10069. function renderEmptyElement(_vm) {
  10070. var _e = _vm._e;
  10071. return _e();
  10072. }
  10073. function checkVersion(version, pVersion, sVersion) {
  10074. if (version) {
  10075. var vRest = "".concat(version).match(/(\d+).(\d+).(\d+)/);
  10076. if (vRest) {
  10077. var pV = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(vRest[1]);
  10078. if (sVersion) {
  10079. var sV = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(vRest[2]);
  10080. return pV >= pVersion && sV >= sVersion;
  10081. }
  10082. return pV >= pVersion;
  10083. }
  10084. }
  10085. return false;
  10086. }
  10087. var index_esm_VxeUI = Object.assign(VxeCore, {
  10088. renderEmptyElement: renderEmptyElement,
  10089. setTheme: setTheme,
  10090. getTheme: getTheme,
  10091. setConfig: setConfig,
  10092. getConfig: getConfig,
  10093. setIcon: setIcon,
  10094. getIcon: getIcon,
  10095. renderGlobalIcon: renderGlobalIcon,
  10096. renderCustomIcon: renderCustomIcon,
  10097. setLanguage: setLanguage,
  10098. hasLanguage: hasLanguage,
  10099. getLanguage: getLanguage,
  10100. setI18n: setI18n,
  10101. getI18n: getI18n,
  10102. globalEvents: globalEvents,
  10103. GLOBAL_EVENT_KEYS: GLOBAL_EVENT_KEYS,
  10104. createEvent: createEvent,
  10105. globalResize: globalResize,
  10106. renderer: renderer,
  10107. validators: validators,
  10108. menus: menus,
  10109. formats: formats,
  10110. commands: commands,
  10111. interceptor: interceptor,
  10112. clipboard: clipboard,
  10113. log: log,
  10114. permission: permission,
  10115. globalStore: globalStore,
  10116. component: component,
  10117. getComponent: getComponent,
  10118. hasComponent: hasComponent,
  10119. globalMixins: globalMixins,
  10120. getSlotVNs: getSlotVNs,
  10121. checkVersion: checkVersion,
  10122. use: use
  10123. });
  10124. setTheme();
  10125. /* harmony default export */ var es_index_esm = ((/* unused pure expression or super */ null && (index_esm_VxeUI)));
  10126. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
  10127. var es_array_map = __webpack_require__(2062);
  10128. ;// CONCATENATED MODULE: ./packages/dynamics/index.ts
  10129. var dynamicContainerElem;
  10130. var DynamicApp = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
  10131. data: function data() {
  10132. var modals = [];
  10133. var drawers = [];
  10134. return {
  10135. modals: modals,
  10136. drawers: drawers,
  10137. globalLoading: null,
  10138. globalWatermark: null
  10139. };
  10140. },
  10141. methods: {
  10142. renderVN: function renderVN(h) {
  10143. var VxeUIModalComponent = index_esm_VxeUI.getComponent('vxe-modal');
  10144. var VxeUIDrawerComponent = index_esm_VxeUI.getComponent('vxe-drawer');
  10145. var VxeUILoadingComponent = index_esm_VxeUI.getComponent('vxe-loading');
  10146. var VxeUIWatermarkComponent = index_esm_VxeUI.getComponent('vxe-watermark');
  10147. var modals = this.modals,
  10148. drawers = this.drawers,
  10149. globalLoading = this.globalLoading,
  10150. globalWatermark = this.globalWatermark;
  10151. return h('div', {}, [modals.length ? h('div', {
  10152. key: 1,
  10153. class: 'vxe-dynamics--modal'
  10154. }, modals.map(function (item) {
  10155. return h(VxeUIModalComponent, {
  10156. key: item.key,
  10157. props: item.props,
  10158. on: item.on
  10159. });
  10160. })) : renderEmptyElement(this), drawers.length ? h('div', {
  10161. key: 2,
  10162. class: 'vxe-dynamics--drawer'
  10163. }, drawers.map(function (item) {
  10164. return h(VxeUIDrawerComponent, {
  10165. key: item.key,
  10166. props: item.props,
  10167. on: item.on
  10168. });
  10169. })) : renderEmptyElement(this), globalWatermark ? h(VxeUIWatermarkComponent, {
  10170. key: 'gw',
  10171. props: globalWatermark
  10172. }) : renderEmptyElement(this), globalLoading ? h(VxeUILoadingComponent, {
  10173. key: 'gl',
  10174. props: globalLoading
  10175. }) : renderEmptyElement(this)]);
  10176. }
  10177. },
  10178. render: function render(h) {
  10179. return this.renderVN(h);
  10180. }
  10181. });
  10182. var dynamicApp = DynamicApp;
  10183. var dynamicStore = new DynamicApp();
  10184. function checkDynamic() {
  10185. if (!dynamicContainerElem) {
  10186. dynamicContainerElem = document.createElement('div');
  10187. dynamicContainerElem.className = 'vxe-dynamics';
  10188. document.body.appendChild(dynamicContainerElem);
  10189. dynamicStore.$mount(dynamicContainerElem);
  10190. }
  10191. }
  10192. ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
  10193. var log_version = "ui v".concat("3.10.6");
  10194. var warnLog = log.create('warn', log_version);
  10195. var errLog = log.create('error', log_version);
  10196. ;// CONCATENATED MODULE: ./packages/ui/index.ts
  10197. var ui_version = "3.10.6";
  10198. index_esm_VxeUI.uiVersion = ui_version;
  10199. index_esm_VxeUI.dynamicApp = dynamicApp;
  10200. function config(options) {
  10201. warnLog('vxe.error.delFunc', ['config', 'setConfig']);
  10202. return setConfig(options);
  10203. }
  10204. function setup(options) {
  10205. warnLog('vxe.error.delFunc', ['setup', 'setConfig']);
  10206. return setConfig(options);
  10207. }
  10208. index_esm_VxeUI.config = config;
  10209. index_esm_VxeUI.setup = setup;
  10210. setConfig({
  10211. alert: {},
  10212. anchor: {},
  10213. anchorLink: {},
  10214. avatar: {},
  10215. badge: {},
  10216. breadcrumb: {
  10217. separator: '/'
  10218. },
  10219. breadcrumbItem: {},
  10220. button: {
  10221. trigger: 'hover',
  10222. // destroyOnClose: false,
  10223. prefixTooltip: {
  10224. enterable: true
  10225. },
  10226. suffixTooltip: {
  10227. enterable: true
  10228. }
  10229. },
  10230. buttonGroup: {},
  10231. calendar: {
  10232. minDate: new Date(1900, 0, 1),
  10233. maxDate: new Date(2100, 0, 1),
  10234. startDay: 1,
  10235. selectDay: 1
  10236. },
  10237. card: {
  10238. border: true,
  10239. padding: true
  10240. },
  10241. carousel: {
  10242. height: 200,
  10243. loop: true,
  10244. interval: 5000
  10245. },
  10246. carouselItem: {},
  10247. checkbox: {},
  10248. checkboxButton: {},
  10249. checkboxGroup: {},
  10250. col: {},
  10251. collapse: {
  10252. padding: true,
  10253. expandConfig: {
  10254. showIcon: true
  10255. }
  10256. },
  10257. collapsePane: {},
  10258. countdown: {},
  10259. colorPicker: {
  10260. type: 'rgb',
  10261. clearable: true,
  10262. showAlpha: true,
  10263. clickToCopy: true,
  10264. showColorExtractor: true,
  10265. showQuick: true
  10266. },
  10267. datePanel: {
  10268. // parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
  10269. // labelFormat: '',
  10270. // valueFormat: '',
  10271. startDate: new Date(1900, 0, 1),
  10272. endDate: new Date(2100, 0, 1),
  10273. startDay: 1,
  10274. selectDay: 1
  10275. },
  10276. datePicker: {
  10277. // size: null,
  10278. // transfer: false,
  10279. shortcutConfig: {
  10280. // position: 'left',
  10281. align: 'left',
  10282. mode: 'text',
  10283. autoClose: true
  10284. },
  10285. startDay: 1,
  10286. selectDay: 1,
  10287. autoClose: true,
  10288. showClearButton: null,
  10289. showConfirmButton: null
  10290. },
  10291. dateRangePicker: {
  10292. // size: null,
  10293. // transfer: false,
  10294. shortcutConfig: {
  10295. // position: 'left',
  10296. align: 'left',
  10297. mode: 'text',
  10298. autoClose: true
  10299. },
  10300. startDay: 1,
  10301. selectDay: 1,
  10302. separator: ' ~ ',
  10303. autoClose: true,
  10304. showClearButton: true,
  10305. showConfirmButton: null
  10306. },
  10307. drawer: {
  10308. // size: null,
  10309. position: 'right',
  10310. showHeader: true,
  10311. lockView: true,
  10312. mask: true,
  10313. showTitleOverflow: true,
  10314. showClose: true,
  10315. padding: true,
  10316. // destroyOnClose: false,
  10317. cancelClosable: true,
  10318. confirmClosable: true
  10319. },
  10320. empty: {},
  10321. form: {
  10322. // preventSubmit: false,
  10323. // size: null,
  10324. // colon: false,
  10325. validConfig: {
  10326. showErrorMessage: true,
  10327. autoPos: true,
  10328. theme: 'beautify'
  10329. },
  10330. tooltipConfig: {
  10331. enterable: true
  10332. },
  10333. titleAsterisk: true,
  10334. titleOverflow: false,
  10335. padding: true
  10336. },
  10337. formDesign: {
  10338. height: 400,
  10339. showHeader: true,
  10340. showPc: true
  10341. },
  10342. formGather: {},
  10343. formGroup: {},
  10344. formItem: {},
  10345. formView: {},
  10346. icon: {},
  10347. iconPicker: {
  10348. icons: ['home', 'company', 'comment', 'setting', 'send', 'envelope', 'envelope-open', 'bell', 'search', 'print', 'pc', 'goods', 'chart-line', 'edit', 'delete', 'save', 'folder', 'microphone', 'flag', 'link', 'location', 'sunny', 'rmb', 'usd', 'user', 'add-user', 'add-users', 'star', 'unlock', 'time', 'text', 'feedback', 'calendar', 'association-form', 'cloud-download', 'cloud-upload', 'file', 'subtable', 'chart-bar-x', 'chart-bar-y', 'chart-line', 'chart-pie', 'chart-radar']
  10349. },
  10350. image: {
  10351. showPreview: true,
  10352. showPrintButton: true,
  10353. maskClosable: true
  10354. },
  10355. imageGroup: {
  10356. showPreview: true,
  10357. showPrintButton: true
  10358. },
  10359. imagePreview: {
  10360. showPrintButton: true
  10361. },
  10362. input: {
  10363. // size: null,
  10364. // transfer: false
  10365. // parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
  10366. // labelFormat: '',
  10367. // valueFormat: '',
  10368. startDate: new Date(1900, 0, 1),
  10369. endDate: new Date(2100, 0, 1),
  10370. startDay: 1,
  10371. selectDay: 1,
  10372. digits: 2,
  10373. controls: true
  10374. },
  10375. layoutAside: {},
  10376. layoutBody: {},
  10377. layoutContainer: {},
  10378. layoutFooter: {},
  10379. layoutHeader: {},
  10380. link: {
  10381. underline: true
  10382. },
  10383. listDesign: {
  10384. height: 400,
  10385. showPc: true
  10386. },
  10387. listView: {},
  10388. list: {
  10389. // size: null,
  10390. virtualYConfig: {
  10391. enabled: true,
  10392. gt: 60
  10393. // oSize: 0
  10394. }
  10395. },
  10396. loading: {
  10397. showIcon: true,
  10398. showText: true
  10399. },
  10400. menu: {},
  10401. modal: {
  10402. // size: null,
  10403. top: 16,
  10404. showHeader: true,
  10405. minWidth: 340,
  10406. minHeight: 140,
  10407. lockView: true,
  10408. mask: true,
  10409. duration: 3000,
  10410. marginSize: 0,
  10411. dblclickZoom: true,
  10412. showTitleOverflow: true,
  10413. animat: true,
  10414. showClose: true,
  10415. padding: true,
  10416. draggable: true,
  10417. showConfirmButton: null,
  10418. cancelClosable: true,
  10419. confirmClosable: true,
  10420. zoomConfig: {
  10421. minimizeMaxSize: 10,
  10422. minimizeVerticalOffset: {
  10423. top: -24,
  10424. left: 0
  10425. },
  10426. minimizeHorizontalOffset: {
  10427. top: 0,
  10428. left: 32
  10429. }
  10430. },
  10431. // destroyOnClose: false,
  10432. // remember: false,
  10433. // storage: false,
  10434. storageKey: 'VXE_MODAL_POSITION'
  10435. },
  10436. noticeBar: {},
  10437. numberInput: {
  10438. // size: null,
  10439. // transfer: false
  10440. digits: 2,
  10441. autoFill: true,
  10442. controlConfig: {
  10443. enabled: true,
  10444. layout: 'right',
  10445. showButton: true,
  10446. isWheel: true,
  10447. isArrow: true
  10448. }
  10449. },
  10450. optgroup: {},
  10451. option: {},
  10452. pager: {
  10453. pageSizePlacement: 'top'
  10454. // size: null,
  10455. // autoHidden: false,
  10456. // perfect: true,
  10457. // pageSize: 10,
  10458. // pagerCount: 7,
  10459. // pageSizes: [10, 15, 20, 50, 100],
  10460. // layouts: ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total']
  10461. },
  10462. print: {
  10463. pageStyle: {}
  10464. },
  10465. passwordInput: {
  10466. controls: true
  10467. },
  10468. printPageBreak: {},
  10469. pulldown: {
  10470. // destroyOnClose: false
  10471. },
  10472. radio: {
  10473. strict: true
  10474. },
  10475. radioButton: {
  10476. strict: true
  10477. },
  10478. radioGroup: {
  10479. strict: true
  10480. },
  10481. rate: {},
  10482. result: {},
  10483. row: {},
  10484. select: {
  10485. multiCharOverflow: 8,
  10486. remoteConfig: {
  10487. enabled: true,
  10488. autoLoad: true
  10489. },
  10490. virtualYConfig: {
  10491. enabled: true,
  10492. gt: 50,
  10493. oSize: 2
  10494. }
  10495. },
  10496. split: {
  10497. resize: true,
  10498. itemConfig: {
  10499. minWidth: 40,
  10500. minHeight: 40
  10501. },
  10502. resizeConfig: {
  10503. // immediate: false,
  10504. showTip: true
  10505. }
  10506. },
  10507. splitPane: {},
  10508. slider: {
  10509. max: 100,
  10510. min: 0
  10511. },
  10512. steps: {},
  10513. switch: {},
  10514. tabPane: {},
  10515. tableSelect: {
  10516. gridConfig: {
  10517. showOverflow: true,
  10518. showHeaderOverflow: true,
  10519. showFooterOverflow: true,
  10520. rowConfig: {
  10521. isHover: true
  10522. },
  10523. virtualXConfig: {
  10524. enabled: true,
  10525. gt: 0
  10526. },
  10527. virtualYConfig: {
  10528. enabled: true,
  10529. gt: 0
  10530. }
  10531. }
  10532. },
  10533. tabs: {
  10534. // destroyOnClose: false
  10535. },
  10536. tag: {},
  10537. textEllipsis: {
  10538. underline: true
  10539. },
  10540. text: {
  10541. copyConfig: {
  10542. showMessage: true
  10543. }
  10544. },
  10545. textarea: {
  10546. resize: 'none'
  10547. },
  10548. tip: {},
  10549. tooltip: {
  10550. // size: null,
  10551. // enterable: false,
  10552. trigger: 'hover',
  10553. theme: 'dark',
  10554. enterDelay: 500,
  10555. leaveDelay: 300,
  10556. isArrow: true
  10557. },
  10558. tree: {
  10559. // autoResize: false,
  10560. indent: 20,
  10561. minHeight: 60,
  10562. radioConfig: {
  10563. strict: true
  10564. },
  10565. virtualYConfig: {
  10566. enabled: true,
  10567. gt: 50,
  10568. oSize: 2
  10569. }
  10570. },
  10571. treeSelect: {
  10572. autoClose: true,
  10573. virtualYConfig: {
  10574. enabled: true,
  10575. gt: 0,
  10576. oSize: 2
  10577. },
  10578. treeConfig: {
  10579. maxHeight: 300,
  10580. radioConfig: {},
  10581. checkboxConfig: {},
  10582. filterConfig: {
  10583. autoExpandAll: true
  10584. }
  10585. }
  10586. },
  10587. upload: {
  10588. mode: 'all',
  10589. imageTypes: ['jpg', 'jpeg', 'png', 'gif'],
  10590. showList: true,
  10591. showUploadButton: true,
  10592. showButtonText: true,
  10593. showRemoveButton: true,
  10594. showButtonIcon: true,
  10595. showPreview: true,
  10596. dragToUpload: true,
  10597. // imageConfig: {},
  10598. showLimitSize: true,
  10599. showLimitCount: true,
  10600. autoSubmit: true,
  10601. maxSimultaneousUploads: 5
  10602. },
  10603. watermark: {
  10604. rotate: -30,
  10605. gap: [100, 100]
  10606. },
  10607. table: {},
  10608. colgroup: {},
  10609. column: {},
  10610. toolbar: {},
  10611. grid: {},
  10612. gantt: {}
  10613. });
  10614. var iconPrefix = 'vxe-icon-';
  10615. setIcon({
  10616. // loading
  10617. LOADING: iconPrefix + 'spinner roll vxe-loading--default-icon',
  10618. // button
  10619. BUTTON_DROPDOWN: iconPrefix + 'arrow-down',
  10620. BUTTON_LOADING: iconPrefix + 'spinner roll',
  10621. BUTTON_TOOLTIP_ICON: iconPrefix + 'question-circle-fill',
  10622. // menu
  10623. MENU_ITEM_EXPAND_OPEN: iconPrefix + 'arrow-down rotate180',
  10624. MENU_ITEM_EXPAND_CLOSE: iconPrefix + 'arrow-down',
  10625. // select
  10626. SELECT_LOADED: iconPrefix + 'spinner roll',
  10627. SELECT_OPEN: iconPrefix + 'caret-down rotate180',
  10628. SELECT_CLOSE: iconPrefix + 'caret-down',
  10629. SELECT_ADD_OPTION: iconPrefix + 'add',
  10630. // icon-picker
  10631. ICON_PICKER_OPEN: iconPrefix + 'caret-down rotate180',
  10632. ICON_PICKER_CLOSE: iconPrefix + 'caret-down',
  10633. // pager
  10634. PAGER_HOME: iconPrefix + 'home-page',
  10635. PAGER_END: iconPrefix + 'end-page',
  10636. PAGER_JUMP_PREV: iconPrefix + 'arrow-double-left',
  10637. PAGER_JUMP_NEXT: iconPrefix + 'arrow-double-right',
  10638. PAGER_PREV_PAGE: iconPrefix + 'arrow-left',
  10639. PAGER_NEXT_PAGE: iconPrefix + 'arrow-right',
  10640. PAGER_JUMP_MORE: iconPrefix + 'ellipsis-h',
  10641. // radio
  10642. RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
  10643. RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
  10644. RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
  10645. // checkbox
  10646. CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
  10647. CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
  10648. CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
  10649. CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
  10650. // input
  10651. INPUT_CLEAR: iconPrefix + 'error-circle-fill',
  10652. INPUT_SEARCH: iconPrefix + 'search',
  10653. INPUT_PLUS_NUM: iconPrefix + 'caret-up',
  10654. INPUT_MINUS_NUM: iconPrefix + 'caret-down',
  10655. // number-picker
  10656. NUMBER_INPUT_MINUS_NUM: iconPrefix + 'minus',
  10657. NUMBER_INPUT_PLUS_NUM: iconPrefix + 'add',
  10658. // date-picker
  10659. DATE_PICKER_DATE: iconPrefix + 'calendar',
  10660. // password-input
  10661. PASSWORD_INPUT_SHOW_PWD: iconPrefix + 'eye-fill-close',
  10662. PASSWORD_INPUT_HIDE_PWD: iconPrefix + 'eye-fill',
  10663. // modal
  10664. MODAL_ZOOM_MIN: iconPrefix + 'minus',
  10665. MODAL_ZOOM_REVERT: iconPrefix + 'recover',
  10666. MODAL_ZOOM_IN: iconPrefix + 'square',
  10667. MODAL_ZOOM_OUT: iconPrefix + 'maximize',
  10668. MODAL_CLOSE: iconPrefix + 'close',
  10669. MODAL_INFO: iconPrefix + 'info-circle-fill',
  10670. MODAL_SUCCESS: iconPrefix + 'success-circle-fill',
  10671. MODAL_WARNING: iconPrefix + 'warning-circle-fill',
  10672. MODAL_ERROR: iconPrefix + 'error-circle-fill',
  10673. MODAL_QUESTION: iconPrefix + 'question-circle-fill',
  10674. MODAL_LOADING: iconPrefix + 'spinner roll',
  10675. // drawer
  10676. DRAWER_CLOSE: iconPrefix + 'close',
  10677. // form
  10678. FORM_PREFIX: iconPrefix + 'question-circle-fill',
  10679. FORM_SUFFIX: iconPrefix + 'question-circle-fill',
  10680. FORM_FOLDING: iconPrefix + 'arrow-up rotate180',
  10681. FORM_UNFOLDING: iconPrefix + 'arrow-up',
  10682. FORM_VALID_ERROR_ICON: iconPrefix + 'warning-circle-fill',
  10683. // form-design
  10684. FORM_DESIGN_STYLE_SETTING: iconPrefix + 'layout',
  10685. FORM_DESIGN_PROPS_PC: iconPrefix + 'pc',
  10686. FORM_DESIGN_PROPS_MOBILE: iconPrefix + 'mobile',
  10687. FORM_DESIGN_PROPS_ADD: iconPrefix + 'add',
  10688. FORM_DESIGN_PROPS_EDIT: iconPrefix + 'edit',
  10689. FORM_DESIGN_WIDGET_ADD: iconPrefix + 'square-plus-fill',
  10690. FORM_DESIGN_WIDGET_COPY: iconPrefix + 'copy',
  10691. FORM_DESIGN_WIDGET_DELETE: iconPrefix + 'delete',
  10692. FORM_DESIGN_WIDGET_SWAP_LR: iconPrefix + 'swap',
  10693. FORM_DESIGN_WIDGET_OPTION_DELETE: iconPrefix + 'delete',
  10694. FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN: iconPrefix + 'square-plus',
  10695. FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE: iconPrefix + 'square-minus',
  10696. // list-design
  10697. LIST_DESIGN_FIELD_SETTING: iconPrefix + 'custom-column',
  10698. LIST_DESIGN_LIST_SETTING: iconPrefix + 'menu',
  10699. LIST_DESIGN_LIST_SETTING_SEARCH_DELETE: iconPrefix + 'delete',
  10700. LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE: iconPrefix + 'delete',
  10701. // upload
  10702. UPLOAD_FILE_ERROR: iconPrefix + 'warning-circle-fill',
  10703. UPLOAD_FILE_ADD: iconPrefix + 'upload',
  10704. UPLOAD_FILE_REMOVE: iconPrefix + 'delete',
  10705. UPLOAD_FILE_DOWNLOAD: iconPrefix + 'download',
  10706. UPLOAD_IMAGE_UPLOAD: iconPrefix + 'upload',
  10707. UPLOAD_IMAGE_RE_UPLOAD: iconPrefix + 'repeat',
  10708. UPLOAD_IMAGE_ADD: iconPrefix + 'add',
  10709. UPLOAD_IMAGE_REMOVE: iconPrefix + 'close',
  10710. UPLOAD_LOADING: iconPrefix + 'spinner roll vxe-loading--default-icon',
  10711. UPLOAD_FILE_TYPE_DEFAULT: iconPrefix + 'file',
  10712. UPLOAD_FILE_TYPE_XLSX: iconPrefix + 'file-excel',
  10713. UPLOAD_FILE_TYPE_XLS: iconPrefix + 'file-excel',
  10714. UPLOAD_FILE_TYPE_PDF: iconPrefix + 'file-pdf',
  10715. UPLOAD_FILE_TYPE_PNG: iconPrefix + 'file-image',
  10716. UPLOAD_FILE_TYPE_GIF: iconPrefix + 'file-image',
  10717. UPLOAD_FILE_TYPE_JPG: iconPrefix + 'file-image',
  10718. UPLOAD_FILE_TYPE_JPEG: iconPrefix + 'file-image',
  10719. UPLOAD_FILE_TYPE_MD: iconPrefix + 'file-markdown',
  10720. UPLOAD_FILE_TYPE_PPD: iconPrefix + 'file-ppt',
  10721. UPLOAD_FILE_TYPE_DOCX: iconPrefix + 'file-word',
  10722. UPLOAD_FILE_TYPE_DOC: iconPrefix + 'file-word',
  10723. UPLOAD_FILE_TYPE_ZIP: iconPrefix + 'file-zip',
  10724. UPLOAD_FILE_TYPE_TXT: iconPrefix + 'file-txt',
  10725. // image-preview
  10726. IMAGE_PREVIEW_CLOSE: iconPrefix + 'close',
  10727. IMAGE_PREVIEW_PREVIOUS: iconPrefix + 'arrow-left',
  10728. IMAGE_PREVIEW_NEXT: iconPrefix + 'arrow-right',
  10729. IMAGE_PREVIEW_PCT_FULL: iconPrefix + 'pct-full',
  10730. IMAGE_PREVIEW_PCT_1_1: iconPrefix + 'pct-1-1',
  10731. IMAGE_PREVIEW_ZOOM_OUT: iconPrefix + 'search-zoom-out',
  10732. IMAGE_PREVIEW_ZOOM_IN: iconPrefix + 'search-zoom-in',
  10733. IMAGE_PREVIEW_ROTATE_LEFT: iconPrefix + 'rotate-left',
  10734. IMAGE_PREVIEW_ROTATE_RIGHT: iconPrefix + 'rotate-right',
  10735. IMAGE_PREVIEW_PRINT: iconPrefix + 'print',
  10736. IMAGE_PREVIEW_DOWNLOAD: iconPrefix + 'download',
  10737. // alert
  10738. ALERT_CLOSE: iconPrefix + 'close',
  10739. ALERT_INFO: iconPrefix + 'info-circle-fill',
  10740. ALERT_SUCCESS: iconPrefix + 'success-circle-fill',
  10741. ALERT_WARNING: iconPrefix + 'warning-circle-fill',
  10742. ALERT_ERROR: iconPrefix + 'error-circle-fill',
  10743. // tree
  10744. TREE_NODE_OPEN: iconPrefix + 'caret-right rotate90',
  10745. TREE_NODE_CLOSE: iconPrefix + 'caret-right',
  10746. TREE_NODE_LOADED: iconPrefix + 'spinner roll',
  10747. // tree-select
  10748. TREE_SELECT_LOADED: iconPrefix + 'spinner roll',
  10749. TREE_SELECT_OPEN: iconPrefix + 'caret-down rotate180',
  10750. TREE_SELECT_CLOSE: iconPrefix + 'caret-down',
  10751. // table-select
  10752. TABLE_SELECT_LOADED: iconPrefix + 'spinner roll',
  10753. TABLE_SELECT_OPEN: iconPrefix + 'caret-down rotate180',
  10754. TABLE_SELECT_CLOSE: iconPrefix + 'caret-down',
  10755. // tabs
  10756. TABS_TAB_BUTTON_TOP: iconPrefix + 'arrow-up',
  10757. TABS_TAB_BUTTON_BOTTOM: iconPrefix + 'arrow-down',
  10758. TABS_TAB_BUTTON_LEFT: iconPrefix + 'arrow-left',
  10759. TABS_TAB_BUTTON_RIGHT: iconPrefix + 'arrow-right',
  10760. TABS_TAB_CLOSE: iconPrefix + 'close',
  10761. TABS_TAB_REFRESH: iconPrefix + 'refresh',
  10762. TABS_TAB_REFRESH_LOADING: iconPrefix + 'refresh roll',
  10763. // text
  10764. TEXT_COPY: iconPrefix + 'copy',
  10765. TEXT_LOADING: iconPrefix + 'spinner roll',
  10766. // tag
  10767. TAG_CLOSE: iconPrefix + 'close',
  10768. TAG_LOADING: iconPrefix + 'spinner roll',
  10769. // carousel
  10770. CAROUSEL_HORIZONTAL_PREVIOUS: iconPrefix + 'arrow-left',
  10771. CAROUSEL_HORIZONTAL_NEXT: iconPrefix + 'arrow-right',
  10772. CAROUSEL_VERTICAL_PREVIOUS: iconPrefix + 'arrow-up',
  10773. CAROUSEL_VERTICAL_NEXT: iconPrefix + 'arrow-down',
  10774. // collapse
  10775. COLLAPSE_OPEN: iconPrefix + 'arrow-right rotate90',
  10776. COLLAPSE_CLOSE: iconPrefix + 'arrow-right',
  10777. // empty
  10778. EMPTY_DEFAULT: iconPrefix + 'empty',
  10779. // result
  10780. RESULT_INFO: iconPrefix + 'info-circle-fill',
  10781. RESULT_SUCCESS: iconPrefix + 'success-circle-fill',
  10782. RESULT_WARNING: iconPrefix + 'warning-circle-fill',
  10783. RESULT_ERROR: iconPrefix + 'error-circle-fill',
  10784. RESULT_QUESTION: iconPrefix + 'question-circle-fill',
  10785. RESULT_LOADING: iconPrefix + 'spinner roll',
  10786. // rate
  10787. RATE_CHECKED: iconPrefix + 'star-fill',
  10788. RATE_UNCHECKED: iconPrefix + 'star',
  10789. // color-picker
  10790. COLOR_PICKER_COLOR_COPY: iconPrefix + 'copy',
  10791. COLOR_PICKER_EYE_DROPPER: iconPrefix + 'dropper',
  10792. COLOR_PICKER_TPTY_OPEN: iconPrefix + 'arrow-down rotate180',
  10793. COLOR_PICKER_TPTY_CLOSE: iconPrefix + 'arrow-down',
  10794. // split
  10795. SPLIT_TOP_ACTION: iconPrefix + 'arrow-up',
  10796. SPLIT_BOTTOM_ACTION: iconPrefix + 'arrow-down',
  10797. SPLIT_LEFT_ACTION: iconPrefix + 'arrow-left',
  10798. SPLIT_RIGHT_ACTION: iconPrefix + 'arrow-right'
  10799. });
  10800. /* harmony default export */ var ui = ((/* unused pure expression or super */ null && (VxeUI)));
  10801. ;// CONCATENATED MODULE: ./packages/language/zh-CN.ts
  10802. /* harmony default export */ var zh_CN = ({
  10803. vxe: {
  10804. base: {
  10805. pleaseInput: '请输入',
  10806. pleaseSelect: '请选择',
  10807. comma: ',',
  10808. fullStop: '。'
  10809. },
  10810. loading: {
  10811. text: '加载中...'
  10812. },
  10813. error: {
  10814. downErr: '下载失败',
  10815. errLargeData: '当绑定的数据量过大时,应该请使用 {0},否则可能会出现卡顿',
  10816. groupFixed: '如果使用分组表头,冻结列必须按组设置',
  10817. groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误',
  10818. groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
  10819. scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
  10820. errConflicts: '参数 "{0}" 与 "{1}" 有冲突',
  10821. modelConflicts: '绑定的字段值 "{0}" 与 "{1}" 存在冲突,将会出现错误',
  10822. notSupportProp: '当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',
  10823. reqSupportProp: '当使用 "{0}" 时,应该设置 "{1}",否则可能会出现错误',
  10824. notConflictProp: '当使用 "{0}" 时,应该设置 "{1}",否则可能会存在功能冲突',
  10825. unableInsert: '无法插入到指定位置,请检查参数是否正确',
  10826. useErr: '安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',
  10827. barUnableLink: '工具栏无法关联表格',
  10828. expandContent: '展开行的插槽应该是 "content",请检查是否正确',
  10829. reqComp: '缺少 "{0}" 组件,请检查是否正确安装。 https://vxeui.com/#/start/useGlobal',
  10830. reqModule: '缺少 "{0}" 模块',
  10831. reqProp: '缺少必要的 "{0}" 参数,这可能会导致出现错误',
  10832. emptyProp: '参数 "{0}" 不允许为空',
  10833. errProp: '不支持的参数 "{0}",可能为 "{1}"',
  10834. colRepet: 'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用',
  10835. notFunc: '方法 "{0}" 不存在',
  10836. errFunc: '参数 "{0}" 不是一个方法',
  10837. notValidators: '全局校验 "{0}" 不存在',
  10838. notFormats: '全局格式化 "{0}" 不存在',
  10839. notCommands: '全局指令 "{0}" 不存在',
  10840. notSlot: '插槽 "{0}" 不存在',
  10841. noTree: '树结构不支持 "{0}"',
  10842. noGroup: '数据分组后不支持 "{0}"',
  10843. notProp: '不支持的参数 "{0}"',
  10844. checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
  10845. coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',
  10846. uniField: '字段名 "{0}" 重复定义,这可能会出现错误',
  10847. repeatKey: '主键重复 {0}="{1}",这可能会出现错误',
  10848. repeatProp: '参数重复 {0}="{1}",这可能会出现错误',
  10849. delFunc: '方法 "{0}" 已废弃,请使用 "{1}"',
  10850. delProp: '参数 "{0}" 已废弃,请使用 "{1}"',
  10851. delEvent: '事件 "{0}" 已废弃,请使用 "{1}"',
  10852. removeProp: '参数 "{0}" 已废弃,不建议使用,这可能会导致出现错误',
  10853. errFormat: '全局的格式化内容应该使用 "VXETable.formats" 定义,挂载 "formatter={0}" 的方式已不建议使用',
  10854. notType: '不支持的文件类型 "{0}"',
  10855. notExp: '该浏览器不支持导入/导出功能',
  10856. impFields: '导入失败,请检查字段名和数据格式是否正确',
  10857. treeNotImp: '树表格不支持导入',
  10858. treeCrossDrag: '只能拖拽第一层级',
  10859. treeDragChild: '父级不能拖拽到自己的子级中',
  10860. reqPlugin: '扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/install',
  10861. errMaxRow: '超过支持的最大数据量 {0} 行,这可能会导致出现错误',
  10862. useNew: '不建议使用 {0},请使用 {1}',
  10863. errorVersion: '版本不匹配,当前版本 {0},最低支持版本为 {1}'
  10864. },
  10865. table: {
  10866. emptyText: '暂无数据',
  10867. allTitle: '全选/取消',
  10868. seqTitle: '序号',
  10869. actionTitle: '操作',
  10870. confirmFilter: '筛选',
  10871. resetFilter: '重置',
  10872. allFilter: '全部',
  10873. sortAsc: '升序:最低到最高',
  10874. sortDesc: '降序:最高到最低',
  10875. filter: '对所选的列启用筛选',
  10876. impSuccess: '成功导入 {0} 条记录',
  10877. expLoading: '正在导出中',
  10878. expSuccess: '导出成功',
  10879. expError: '导出失败',
  10880. expFilename: '导出_{0}',
  10881. expOriginFilename: '导出_源_{0}',
  10882. customTitle: '列设置',
  10883. customAll: '全部',
  10884. customConfirm: '确认',
  10885. customClose: '关闭',
  10886. customCancel: '取消',
  10887. customRestore: '恢复默认',
  10888. maxFixedCol: '最大冻结列的数量不能超过 {0} 个',
  10889. maxGroupCol: '最大分组字段的数量不能超过 {0} 个',
  10890. dragTip: '移动:{0}',
  10891. resizeColTip: '宽:{0} 像素',
  10892. resizeRowTip: '高:{0} 像素',
  10893. rowGroupContentTotal: '{0}({1})'
  10894. },
  10895. grid: {
  10896. selectOneRecord: '请至少选择一条记录!',
  10897. deleteSelectRecord: '您确定要删除所选记录吗?',
  10898. removeSelectRecord: '您确定要移除所选记录吗?',
  10899. dataUnchanged: '数据未改动!',
  10900. delSuccess: '成功删除所选记录!',
  10901. saveSuccess: '保存成功!',
  10902. operError: '发生错误,操作失败!'
  10903. },
  10904. select: {
  10905. clear: '清除',
  10906. allChecked: '全选',
  10907. total: '{0} / {1}',
  10908. search: '搜索',
  10909. loadingText: '加载中',
  10910. emptyText: '暂无数据',
  10911. maxSize: '最大可选择的数量不能超过 {0} 个',
  10912. overSizeErr: '已超出最大可选数量 {0} 个,超出部分将被忽略!',
  10913. searchEmpty: '未匹配到数据!'
  10914. },
  10915. tree: {
  10916. searchEmpty: '未匹配到数据!'
  10917. },
  10918. treeSelect: {
  10919. clearChecked: '清除',
  10920. allChecked: '全选',
  10921. allExpand: '全部展开',
  10922. clearExpand: '全部收起',
  10923. total: '已选 {0}',
  10924. search: '搜索',
  10925. emptyText: '暂无数据'
  10926. },
  10927. pager: {
  10928. goto: '前往',
  10929. gotoTitle: '页数',
  10930. pagesize: '{0}条/页',
  10931. total: '共 {0} 条记录',
  10932. pageClassifier: '页',
  10933. homePage: '首页',
  10934. homePageTitle: '首页',
  10935. prevPage: '上一页',
  10936. prevPageTitle: '上一页',
  10937. nextPage: '下一页',
  10938. nextPageTitle: '下一页',
  10939. prevJump: '向上跳页',
  10940. prevJumpTitle: '向上跳页',
  10941. nextJump: '向下跳页',
  10942. nextJumpTitle: '向下跳页',
  10943. endPage: '末页',
  10944. endPageTitle: '末页'
  10945. },
  10946. alert: {
  10947. title: '系统提示'
  10948. },
  10949. button: {
  10950. confirm: '确认',
  10951. cancel: '取消',
  10952. clear: '清除'
  10953. },
  10954. filter: {
  10955. search: '搜索'
  10956. },
  10957. custom: {
  10958. cstmTitle: '列设置',
  10959. cstmRestore: '恢复默认',
  10960. cstmCancel: '取消',
  10961. cstmConfirm: '确定',
  10962. cstmConfirmRestore: '请确认是否恢复成默认列配置?',
  10963. cstmDragTarget: '移动:{0}',
  10964. setting: {
  10965. colSort: '排序',
  10966. sortHelpTip: '点击并拖动图标可以调整顺序',
  10967. colTitle: '列标题',
  10968. colResizable: '列宽(像素)',
  10969. colVisible: '是否显示',
  10970. colFixed: '冻结列',
  10971. colFixedMax: '冻结列(最多 {0} 列)',
  10972. fixedLeft: '左侧',
  10973. fixedUnset: '不设置',
  10974. fixedRight: '右侧'
  10975. }
  10976. },
  10977. import: {
  10978. modes: {
  10979. covering: '覆盖方式(直接覆盖表格数据)',
  10980. insert: '底部追加(在表格的底部追加新数据)',
  10981. insertTop: '顶部追加(在表格的顶部追加新数据)',
  10982. insertBottom: '底部追加(在表格的底部追加新数据)'
  10983. },
  10984. impTitle: '导入数据',
  10985. impFile: '文件名',
  10986. impSelect: '选择文件',
  10987. impType: '文件类型',
  10988. impOpts: '参数设置',
  10989. impMode: '导入模式',
  10990. impConfirm: '导入',
  10991. impCancel: '取消'
  10992. },
  10993. export: {
  10994. types: {
  10995. csv: 'CSV (逗号分隔)(*.csv)',
  10996. html: '网页(*.html)',
  10997. xml: 'XML 数据(*.xml)',
  10998. txt: '文本文件(制表符分隔)(*.txt)',
  10999. xls: 'Excel 97-2003 工作簿(*.xls)',
  11000. xlsx: 'Excel 工作簿(*.xlsx)',
  11001. pdf: 'PDF (*.pdf)'
  11002. },
  11003. modes: {
  11004. empty: '空数据',
  11005. current: '当前数据(当前页的数据)',
  11006. selected: '选中数据(当前页选中的数据)',
  11007. all: '全量数据(包括所有分页的数据)'
  11008. },
  11009. printTitle: '打印数据',
  11010. expTitle: '导出数据',
  11011. expName: '文件名',
  11012. expNamePlaceholder: '请输入文件名',
  11013. expSheetName: '标题',
  11014. expSheetNamePlaceholder: '请输入标题',
  11015. expType: '保存类型',
  11016. expMode: '选择数据',
  11017. expCurrentColumn: '全部字段',
  11018. expColumn: '选择字段',
  11019. expOpts: '参数设置',
  11020. expOptHeader: '表头',
  11021. expHeaderTitle: '是否需要表头',
  11022. expOptFooter: '表尾',
  11023. expFooterTitle: '是否需要表尾',
  11024. expOptColgroup: '分组表头',
  11025. expOptTitle: '列标题',
  11026. expTitleTitle: '是否为列标题,否则显示为列的字段名',
  11027. expColgroupTitle: '如果存在,则支持带有分组结构的表头',
  11028. expOptMerge: '合并',
  11029. expMergeTitle: '如果存在,则支持带有合并结构的单元格',
  11030. expOptAllExpand: '展开树',
  11031. expAllExpandTitle: '如果存在,则支持将带有层级结构的数据全部展开',
  11032. expOptUseStyle: '样式',
  11033. expUseStyleTitle: '如果存在,则支持带样式的单元格',
  11034. expOptOriginal: '源数据',
  11035. expOriginalTitle: '如果为源数据,则支持导入到表格中',
  11036. expPrint: '打印',
  11037. expConfirm: '导出',
  11038. expCancel: '取消'
  11039. },
  11040. modal: {
  11041. errTitle: '错误提示',
  11042. zoomMin: '最小化',
  11043. zoomIn: '最大化',
  11044. zoomOut: '还原',
  11045. close: '关闭',
  11046. miniMaxSize: '最小化窗口的数量不能超过 {0} 个',
  11047. footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
  11048. },
  11049. drawer: {
  11050. close: '关闭'
  11051. },
  11052. form: {
  11053. folding: '收起',
  11054. unfolding: '展开'
  11055. },
  11056. toolbar: {
  11057. import: '导入',
  11058. export: '导出',
  11059. print: '打印',
  11060. refresh: '刷新',
  11061. zoomIn: '全屏',
  11062. zoomOut: '还原',
  11063. custom: '列设置',
  11064. customAll: '全部',
  11065. customConfirm: '确认',
  11066. customRestore: '重置',
  11067. fixedLeft: '冻结在左侧',
  11068. fixedRight: '冻结在右侧',
  11069. cancelFixed: '取消冻结列'
  11070. },
  11071. datePicker: {
  11072. yearTitle: '{0} 年'
  11073. },
  11074. dateRangePicker: {
  11075. pleaseRange: '请选择开始日期与结束日期'
  11076. },
  11077. input: {
  11078. date: {
  11079. m1: '01 月',
  11080. m2: '02 月',
  11081. m3: '03 月',
  11082. m4: '04 月',
  11083. m5: '05 月',
  11084. m6: '06 月',
  11085. m7: '07 月',
  11086. m8: '08 月',
  11087. m9: '09 月',
  11088. m10: '10 月',
  11089. m11: '11 月',
  11090. m12: '12 月',
  11091. quarterLabel: '{0} 年',
  11092. monthLabel: '{0} 年',
  11093. dayLabel: '{0} 年 {1}',
  11094. labelFormat: {
  11095. date: 'yyyy-MM-dd',
  11096. time: 'HH:mm:ss',
  11097. datetime: 'yyyy-MM-dd HH:mm:ss',
  11098. week: 'yyyy 年第 WW 周',
  11099. month: 'yyyy-MM',
  11100. quarter: 'yyyy 年第 q 季度',
  11101. year: 'yyyy'
  11102. },
  11103. weeks: {
  11104. w: '',
  11105. w0: '周日',
  11106. w1: '周一',
  11107. w2: '周二',
  11108. w3: '周三',
  11109. w4: '周四',
  11110. w5: '周五',
  11111. w6: '周六'
  11112. },
  11113. months: {
  11114. m0: '一月',
  11115. m1: '二月',
  11116. m2: '三月',
  11117. m3: '四月',
  11118. m4: '五月',
  11119. m5: '六月',
  11120. m6: '七月',
  11121. m7: '八月',
  11122. m8: '九月',
  11123. m9: '十月',
  11124. m10: '十一月',
  11125. m11: '十二月'
  11126. },
  11127. quarters: {
  11128. q1: '第一季度',
  11129. q2: '第二季度',
  11130. q3: '第三季度',
  11131. q4: '第四季度'
  11132. }
  11133. }
  11134. },
  11135. numberInput: {
  11136. currencySymbol: '¥'
  11137. },
  11138. imagePreview: {
  11139. popupTitle: '预览',
  11140. operBtn: {
  11141. zoomOut: '缩小',
  11142. zoomIn: '放大',
  11143. pctFull: '等比例缩放',
  11144. pct11: '显示原始尺寸',
  11145. rotateLeft: '向左旋转',
  11146. rotateRight: '向右旋转',
  11147. print: '点击打印图片',
  11148. download: '点击下载图片'
  11149. }
  11150. },
  11151. upload: {
  11152. fileBtnText: '点击或拖拽上传',
  11153. imgBtnText: '点击或拖拽上传',
  11154. dragPlaceholder: '请把文件拖放到这个区域即可上传',
  11155. imgSizeHint: '单张{0}',
  11156. imgCountHint: '最多{0}张',
  11157. fileTypeHint: '支持 {0} 文件类型',
  11158. fileSizeHint: '单个文件大小不超过{0}',
  11159. fileCountHint: '最多可上传{0}个文件',
  11160. uploadTypeErr: '文件类型不匹配!',
  11161. overCountErr: '最多只能选择{0}个文件!',
  11162. overCountExtraErr: '已超出最大数量{0}个,超出的{1}个文件将被忽略!',
  11163. overSizeErr: '文件大小最大不能超过{0}!',
  11164. manualUpload: '点击上传',
  11165. reUpload: '重新上传',
  11166. uploadProgress: '上传中 {0}%',
  11167. uploadErr: '上传失败',
  11168. uploadSuccess: '上传成功',
  11169. moreBtnText: '更多({0})',
  11170. viewItemTitle: '点击查看',
  11171. morePopup: {
  11172. readTitle: '查看列表',
  11173. imageTitle: '上传图片',
  11174. fileTitle: '上传文件'
  11175. }
  11176. },
  11177. empty: {
  11178. defText: '暂无数据'
  11179. },
  11180. colorPicker: {
  11181. clear: '清除',
  11182. confirm: '确认',
  11183. copySuccess: '已复制到剪贴板:{0}',
  11184. hex: '十六进制'
  11185. },
  11186. formDesign: {
  11187. formName: '表单名称',
  11188. defFormTitle: '未命名的表单',
  11189. widgetPropTab: '控件属性',
  11190. widgetFormTab: '表单属性',
  11191. error: {
  11192. wdFormUni: '该类型的控件在表单中只允许添加一个',
  11193. wdSubUni: '该类型的控件在子表中只允许添加一个'
  11194. },
  11195. styleSetting: {
  11196. btn: '样式设置',
  11197. title: '表单的样式设置',
  11198. layoutTitle: '控件布局',
  11199. verticalLayout: '上下布局',
  11200. horizontalLayout: '横向布局',
  11201. styleTitle: '标题样式',
  11202. boldTitle: '标题加粗',
  11203. fontBold: '加粗',
  11204. fontNormal: '常规',
  11205. colonTitle: '显示冒号',
  11206. colonVisible: '显示',
  11207. colonHidden: '隐藏',
  11208. alignTitle: '对齐方式',
  11209. widthTitle: '标题宽度',
  11210. alignLeft: '居左',
  11211. alignRight: '居右',
  11212. unitPx: '像素',
  11213. unitPct: '百分比'
  11214. },
  11215. widget: {
  11216. group: {
  11217. base: '基础控件',
  11218. layout: '布局控件',
  11219. system: '系统控件',
  11220. module: '模块控件',
  11221. chart: '图表控件',
  11222. advanced: '高级控件'
  11223. },
  11224. copyTitle: '副本_{0}',
  11225. component: {
  11226. input: '输入框',
  11227. textarea: '文本域',
  11228. select: '下拉选择',
  11229. row: '一行多列',
  11230. title: '标题',
  11231. text: '文本',
  11232. subtable: '子表',
  11233. VxeSwitch: '是/否',
  11234. VxeInput: '输入框',
  11235. VxeNumberInput: '数字',
  11236. VxeDatePicker: '日期',
  11237. VxeTextarea: '文本域',
  11238. VxeSelect: '下拉选择',
  11239. VxeTreeSelect: '树形选择',
  11240. VxeRadioGroup: '单选框',
  11241. VxeCheckboxGroup: '复选框',
  11242. VxeUploadFile: '文件',
  11243. VxeUploadImage: '图片',
  11244. VxeRate: '评分',
  11245. VxeSlider: '滑块'
  11246. }
  11247. },
  11248. widgetProp: {
  11249. name: '控件名称',
  11250. placeholder: '提示语',
  11251. required: '必填校验',
  11252. multiple: '允许多选',
  11253. displaySetting: {
  11254. name: '显示设置',
  11255. pc: '电脑端',
  11256. mobile: '手机端',
  11257. visible: '显示',
  11258. hidden: '隐藏'
  11259. },
  11260. dataSource: {
  11261. name: '数据源',
  11262. defValue: '选项{0}',
  11263. addOption: '添加选项',
  11264. batchEditOption: '批量编辑',
  11265. batchEditTip: '每行对应一个选项,支持从表格、Excel、WPS 中直接复制粘贴。',
  11266. batchEditSubTip: '每行对应一个选项,如果是分组,子项可以是空格或制表键开头,支持从表格、Excel、WPS 中直接复制粘贴。',
  11267. buildOption: '生成选项'
  11268. },
  11269. rowProp: {
  11270. colSize: '列数',
  11271. col2: '两列',
  11272. col3: '三列',
  11273. col4: '四列',
  11274. col6: '六列',
  11275. layout: '布局'
  11276. },
  11277. textProp: {
  11278. name: '内容',
  11279. alignTitle: '对齐方式',
  11280. alignLeft: '居左',
  11281. alignCenter: '居中',
  11282. alignRight: '居右',
  11283. colorTitle: '字体颜色',
  11284. sizeTitle: '字体大小',
  11285. boldTitle: '字体加粗',
  11286. fontNormal: '常规',
  11287. fontBold: '加粗'
  11288. },
  11289. subtableProp: {
  11290. seqTitle: '序号',
  11291. showSeq: '显示序号',
  11292. showCheckbox: '允许多选',
  11293. errSubDrag: '子表不支持该控件,请使用其他控件',
  11294. colPlace: '将控件拖拽进来'
  11295. },
  11296. uploadProp: {
  11297. limitFileCount: '文件数量限制',
  11298. limitFileSize: '文件大小限制',
  11299. multiFile: '允许上传多个文件',
  11300. limitImgCount: '图片数量限制',
  11301. limitImgSize: '图片大小限制',
  11302. multiImg: '允许上传多张图片'
  11303. }
  11304. }
  11305. },
  11306. listDesign: {
  11307. fieldSettingTab: '字段设置',
  11308. listSettingTab: '参数设置',
  11309. searchTitle: '查询条件',
  11310. listTitle: '列表字段',
  11311. searchField: '查询字段',
  11312. listField: '列表字段',
  11313. activeBtn: {
  11314. ActionButtonUpdate: '编辑',
  11315. ActionButtonDelete: '删除'
  11316. },
  11317. search: {
  11318. addBtn: '编辑',
  11319. emptyText: '未配置查询条件',
  11320. editPopupTitle: '编辑查询字段'
  11321. },
  11322. searchPopup: {
  11323. colTitle: '标题',
  11324. saveBtn: '保存'
  11325. }
  11326. },
  11327. text: {
  11328. copySuccess: '已复制到剪贴板',
  11329. copyError: '当前环境不支持该操作'
  11330. },
  11331. countdown: {
  11332. formats: {
  11333. yyyy: '年',
  11334. MM: '月',
  11335. dd: '天',
  11336. HH: '时',
  11337. mm: '分',
  11338. ss: '秒'
  11339. }
  11340. },
  11341. gantt: {
  11342. tFullFormat: {
  11343. year: '{yy}年',
  11344. quarter: '{yy}年第{q}季度',
  11345. month: '{yy}年{M}月',
  11346. week: '{yy}年第{W}周',
  11347. day: '{yy}年{M}月{E}日',
  11348. date: '{yy}年{M}月{d}日',
  11349. hour: '{yy}年 {M}月{d}日{H}时',
  11350. minute: '{yy}年{M}月{d}日{H}时{m}分'
  11351. },
  11352. tSimpleFormat: {
  11353. year: '{yy}年',
  11354. quarter: '{q}季度',
  11355. month: '{M}月',
  11356. week: '{W}周',
  11357. day: '{d}',
  11358. date: '{d}',
  11359. hour: '{H}时',
  11360. minute: '{m}分'
  11361. },
  11362. dayss: {
  11363. w0: '日',
  11364. w1: '一',
  11365. w2: '二',
  11366. w3: '三',
  11367. w4: '四',
  11368. w5: '五',
  11369. w6: '六'
  11370. }
  11371. },
  11372. plugins: {
  11373. extendCellArea: {
  11374. area: {
  11375. mergeErr: '无法对合并单元格进行该操作',
  11376. multiErr: '无法对多重选择区域进行该操作',
  11377. selectErr: '无法操作指定区域的单元格',
  11378. extendErr: '如果延伸的区域包含被合并的单元格,所有合并的单元格需大小相同',
  11379. pasteMultiErr: '无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作',
  11380. cpInvalidErr: '该操作无法进行,您选择的区域中存在被禁止的列({0})'
  11381. },
  11382. fnr: {
  11383. title: '查找和替换',
  11384. findLabel: '查找',
  11385. replaceLabel: '替换',
  11386. findTitle: '查找内容:',
  11387. replaceTitle: '替换为:',
  11388. tabs: {
  11389. find: '查找',
  11390. replace: '替换'
  11391. },
  11392. filter: {
  11393. re: '正则表达式',
  11394. whole: '全词匹配',
  11395. sensitive: '区分大小写'
  11396. },
  11397. btns: {
  11398. findNext: '查找下一个',
  11399. findAll: '查找全部',
  11400. replace: '替换',
  11401. replaceAll: '替换全部',
  11402. cancel: '取消'
  11403. },
  11404. header: {
  11405. seq: '#',
  11406. cell: '单元格',
  11407. value: '值'
  11408. },
  11409. body: {
  11410. row: '行:{0}',
  11411. col: '列:{0}'
  11412. },
  11413. empty: '(空值)',
  11414. reError: '无效的正则表达式',
  11415. recordCount: '已找到 {0} 个单元格',
  11416. notCell: '找不到匹配的单元格',
  11417. replaceSuccess: '成功替换 {0} 个单元格'
  11418. }
  11419. },
  11420. extendPivotTable: {
  11421. aggregation: {
  11422. grouping: '分组',
  11423. values: '值',
  11424. groupPlaceholder: '拖至此处进行分组',
  11425. valuesPlaceholder: '拖至此处进行聚合',
  11426. dragExistCol: '该列已存在',
  11427. sortHelpTip: '点击并拖动图标可以调整顺序'
  11428. },
  11429. aggFuncs: {
  11430. sum: '求和',
  11431. count: '计数',
  11432. avg: '平均值',
  11433. min: '最小值',
  11434. max: '最大值',
  11435. first: '首个值',
  11436. last: '末尾值'
  11437. }
  11438. },
  11439. filterComplexInput: {
  11440. menus: {
  11441. fixedColumn: '冻结列',
  11442. fixedGroup: '冻结分组',
  11443. cancelFixed: '取消冻结',
  11444. fixedLeft: '冻结左侧',
  11445. fixedRight: '冻结右侧'
  11446. },
  11447. cases: {
  11448. equal: '等于',
  11449. gt: '大于',
  11450. lt: '小于',
  11451. begin: '开头是',
  11452. endin: '结尾是',
  11453. include: '包含',
  11454. isSensitive: '区分大小写'
  11455. }
  11456. },
  11457. filterCombination: {
  11458. menus: {
  11459. sort: '排序',
  11460. clearSort: '清除排序',
  11461. sortAsc: '升序',
  11462. sortDesc: '降序',
  11463. fixedColumn: '冻结列',
  11464. fixedGroup: '冻结分组',
  11465. cancelFixed: '取消冻结',
  11466. fixedLeft: '冻结左侧',
  11467. fixedRight: '冻结右侧',
  11468. clearFilter: '清除筛选',
  11469. textOption: '文本筛选',
  11470. numberOption: '数值筛选'
  11471. },
  11472. popup: {
  11473. title: '自定义筛选的方式',
  11474. currColumnTitle: '当前列:',
  11475. and: '与',
  11476. or: '或',
  11477. describeHtml: '可用 ? 代表单个字符<br/>用 * 代表任意多个字符'
  11478. },
  11479. cases: {
  11480. equal: '等于',
  11481. unequal: '不等于',
  11482. gt: '大于',
  11483. ge: '大于或等于',
  11484. lt: '小于',
  11485. le: '小于或等于',
  11486. begin: '开头是',
  11487. notbegin: '开头不是',
  11488. endin: '结尾是',
  11489. notendin: '结尾不是',
  11490. include: '包含',
  11491. exclude: '不包含',
  11492. between: '介于',
  11493. custom: '自定义筛选',
  11494. insensitive: '不区分大小写',
  11495. isSensitive: '区分大小写'
  11496. },
  11497. empty: '(空白)',
  11498. notData: '无匹配项'
  11499. }
  11500. },
  11501. pro: {
  11502. area: {
  11503. mergeErr: '无法对合并单元格进行该操作',
  11504. multiErr: '无法对多重选择区域进行该操作',
  11505. extendErr: '如果延伸的区域包含被合并的单元格,所有合并的单元格需大小相同',
  11506. pasteMultiErr: '无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作'
  11507. },
  11508. fnr: {
  11509. title: '查找和替换',
  11510. findLabel: '查找',
  11511. replaceLabel: '替换',
  11512. findTitle: '查找内容:',
  11513. replaceTitle: '替换为:',
  11514. tabs: {
  11515. find: '查找',
  11516. replace: '替换'
  11517. },
  11518. filter: {
  11519. re: '正则表达式',
  11520. whole: '全词匹配',
  11521. sensitive: '区分大小写'
  11522. },
  11523. btns: {
  11524. findNext: '查找下一个',
  11525. findAll: '查找全部',
  11526. replace: '替换',
  11527. replaceAll: '替换全部',
  11528. cancel: '取消'
  11529. },
  11530. header: {
  11531. seq: '#',
  11532. cell: '单元格',
  11533. value: '值'
  11534. },
  11535. empty: '(空值)',
  11536. reError: '无效的正则表达式',
  11537. recordCount: '已找到 {0} 个单元格',
  11538. notCell: '找不到匹配的单元格',
  11539. replaceSuccess: '成功替换 {0} 个单元格'
  11540. }
  11541. },
  11542. renderer: {
  11543. search: '搜索',
  11544. cases: {
  11545. equal: '等于',
  11546. unequal: '不等于',
  11547. gt: '大于',
  11548. ge: '大于或等于',
  11549. lt: '小于',
  11550. le: '小于或等于',
  11551. begin: '开头是',
  11552. notbegin: '开头不是',
  11553. endin: '结尾是',
  11554. notendin: '结尾不是',
  11555. include: '包含',
  11556. exclude: '不包含',
  11557. between: '介于',
  11558. custom: '自定义筛选',
  11559. insensitive: '不区分大小写',
  11560. isSensitive: '区分大小写'
  11561. },
  11562. combination: {
  11563. menus: {
  11564. sort: '排序',
  11565. clearSort: '清除排序',
  11566. sortAsc: '升序',
  11567. sortDesc: '降序',
  11568. fixedColumn: '冻结列',
  11569. fixedGroup: '冻结分组',
  11570. cancelFixed: '取消冻结',
  11571. fixedLeft: '冻结到左侧',
  11572. fixedRight: '冻结到右侧',
  11573. clearFilter: '清除筛选',
  11574. textOption: '文本筛选',
  11575. numberOption: '数值筛选'
  11576. },
  11577. popup: {
  11578. title: '自定义筛选的方式',
  11579. currColumnTitle: '当前列:',
  11580. and: '与',
  11581. or: '或',
  11582. describeHtml: '可用 ? 代表单个字符<br/>用 * 代表任意多个字符'
  11583. },
  11584. empty: '(空白)',
  11585. notData: '无匹配项'
  11586. }
  11587. }
  11588. }
  11589. });
  11590. ;// CONCATENATED MODULE: ./packages/ui/src/comp.ts
  11591. var defineVxeComponent = function defineVxeComponent(options) {
  11592. return options;
  11593. };
  11594. ;// CONCATENATED MODULE: ./packages/ui/src/vn.ts
  11595. function getOnName(type) {
  11596. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().kebabCase(type);
  11597. }
  11598. function getModelEvent(renderOpts) {
  11599. switch (renderOpts.name) {
  11600. case 'VxeInput':
  11601. case 'VxeTextarea':
  11602. case 'VxeNumberInput':
  11603. case 'VxePasswordInput':
  11604. case 'VxeSelect':
  11605. case 'VxeTreeSelect':
  11606. case 'VxeTableSelect':
  11607. case 'VxeDatePicker':
  11608. case 'VxeDateRangePicker':
  11609. case 'VxeIconPicker':
  11610. case 'VxeColorPicker':
  11611. case 'VxeSlider':
  11612. case 'VxeUpload':
  11613. return 'modelValue';
  11614. case 'select':
  11615. return 'change';
  11616. }
  11617. return 'input';
  11618. }
  11619. function getChangeEvent(renderOpts) {
  11620. switch (renderOpts.name) {
  11621. case 'input':
  11622. case 'textarea':
  11623. case 'VxeInput':
  11624. case 'VxeTextarea':
  11625. case '$input': // 已废弃
  11626. case '$textarea':
  11627. // 已废弃
  11628. return 'input';
  11629. }
  11630. return 'change';
  11631. }
  11632. function vn_getSlotVNs(vns) {
  11633. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(vns)) {
  11634. return vns;
  11635. }
  11636. return vns ? [vns] : [];
  11637. }
  11638. function getEventCaseName(_vm, name) {
  11639. var caseName = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().camelCase(name);
  11640. if (caseName === name) {
  11641. return name;
  11642. }
  11643. var _events = _vm ? _vm._events : null;
  11644. return _events && _events[caseName] ? caseName : name;
  11645. }
  11646. ;// CONCATENATED MODULE: ./packages/alert/src/alert.ts
  11647. /* harmony default export */ var src_alert = (/* define-vxe-component start */defineVxeComponent({
  11648. name: 'VxeAlert',
  11649. props: {
  11650. title: {
  11651. type: [String, Number],
  11652. default: function _default() {
  11653. return getConfig().alert.title;
  11654. }
  11655. },
  11656. content: [String, Number],
  11657. status: String,
  11658. showIcon: Boolean,
  11659. showClose: Boolean,
  11660. icon: {
  11661. type: String,
  11662. default: function _default() {
  11663. return getConfig().alert.icon;
  11664. }
  11665. }
  11666. },
  11667. data: function data() {
  11668. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  11669. var reactData = {};
  11670. return {
  11671. xID: xID,
  11672. reactData: reactData
  11673. };
  11674. },
  11675. methods: {
  11676. //
  11677. // Method
  11678. //
  11679. dispatchEvent: function dispatchEvent(type, params, evnt) {
  11680. var $xeAlert = this;
  11681. this.$emit(type, createEvent(evnt, {
  11682. $alert: $xeAlert
  11683. }, params));
  11684. },
  11685. closeEvent: function closeEvent(evnt) {
  11686. var $xeAlert = this;
  11687. $xeAlert.dispatchEvent('close', {}, evnt);
  11688. },
  11689. //
  11690. // Render
  11691. //
  11692. renderVN: function renderVN(h) {
  11693. var $xeAlert = this;
  11694. var props = $xeAlert;
  11695. var slots = $xeAlert.$scopedSlots;
  11696. var status = props.status,
  11697. content = props.content,
  11698. icon = props.icon,
  11699. title = props.title,
  11700. showIcon = props.showIcon,
  11701. showClose = props.showClose;
  11702. var defaultSlot = slots.default;
  11703. var titleSlot = slots.title;
  11704. var iconSlot = slots.icon;
  11705. return h('div', {
  11706. ref: 'refElem',
  11707. class: ['vxe-alert', _defineProperty({}, "theme--".concat(status), status)]
  11708. }, [iconSlot || showIcon && status || icon ? h('div', {
  11709. class: 'vxe-alert--icon'
  11710. }, iconSlot ? vn_getSlotVNs(iconSlot({})) : [h('i', {
  11711. class: icon || getIcon()["ALERT_".concat(status === null || status === void 0 ? void 0 : status.toUpperCase())]
  11712. })]) : renderEmptyElement($xeAlert), h('div', {
  11713. class: 'vxe-alert--body'
  11714. }, [titleSlot || title ? h('div', {
  11715. class: 'vxe-alert--title'
  11716. }, titleSlot ? vn_getSlotVNs(titleSlot({})) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(title)) : renderEmptyElement($xeAlert), h('div', {
  11717. class: 'vxe-alert--content'
  11718. }, defaultSlot ? vn_getSlotVNs(defaultSlot({})) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content))]), showClose ? h('div', {
  11719. class: 'vxe-alert--close-btn',
  11720. on: {
  11721. click: $xeAlert.closeEvent
  11722. }
  11723. }, [h('i', {
  11724. class: getIcon().ALERT_CLOSE
  11725. })]) : renderEmptyElement($xeAlert)]);
  11726. }
  11727. },
  11728. render: function render(h) {
  11729. return this.renderVN(h);
  11730. }
  11731. })); /* define-vxe-component end */
  11732. ;// CONCATENATED MODULE: ./packages/alert/index.ts
  11733. var VxeAlert = Object.assign({}, src_alert, {
  11734. install: function install(app) {
  11735. app.component(src_alert.name, src_alert);
  11736. }
  11737. });
  11738. dynamicApp.use(VxeAlert);
  11739. index_esm_VxeUI.component(src_alert);
  11740. var Alert = VxeAlert;
  11741. /* harmony default export */ var packages_alert = (VxeAlert);
  11742. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
  11743. var es_array_join = __webpack_require__(8598);
  11744. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
  11745. var es_string_replace = __webpack_require__(5440);
  11746. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js
  11747. var es_regexp_constructor = __webpack_require__(4864);
  11748. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.dot-all.js
  11749. var es_regexp_dot_all = __webpack_require__(7465);
  11750. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.sticky.js
  11751. var es_regexp_sticky = __webpack_require__(7745);
  11752. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
  11753. var es_regexp_to_string = __webpack_require__(8781);
  11754. ;// CONCATENATED MODULE: ./packages/ui/src/dom.ts
  11755. var tpImgEl;
  11756. function initTpImg() {
  11757. if (!tpImgEl) {
  11758. tpImgEl = new Image();
  11759. tpImgEl.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
  11760. }
  11761. return tpImgEl;
  11762. }
  11763. function getTpImg() {
  11764. if (!tpImgEl) {
  11765. return initTpImg();
  11766. }
  11767. return tpImgEl;
  11768. }
  11769. var reClsMap = {};
  11770. function getClsRE(cls) {
  11771. if (!reClsMap[cls]) {
  11772. reClsMap[cls] = new RegExp("(?:^|\\s)".concat(cls, "(?!\\S)"), 'g');
  11773. }
  11774. return reClsMap[cls];
  11775. }
  11776. function getNodeOffset(elem, container, rest) {
  11777. if (elem) {
  11778. var parentElem = elem.parentNode;
  11779. rest.top += elem.offsetTop;
  11780. rest.left += elem.offsetLeft;
  11781. if (parentElem && parentElem !== document.documentElement && parentElem !== document.body) {
  11782. rest.top -= parentElem.scrollTop;
  11783. rest.left -= parentElem.scrollLeft;
  11784. }
  11785. if (container && (elem === container || elem.offsetParent === container) ? 0 : elem.offsetParent) {
  11786. return getNodeOffset(elem.offsetParent, container, rest);
  11787. }
  11788. }
  11789. return rest;
  11790. }
  11791. function isPx(val) {
  11792. return val && /^\d+(px)?$/.test(val);
  11793. }
  11794. function isScale(val) {
  11795. return val && /^\d+%$/.test(val);
  11796. }
  11797. function hasClass(elem, cls) {
  11798. return !!(elem && elem.className && elem.className.match && elem.className.match(getClsRE(cls)));
  11799. }
  11800. function removeClass(elem, cls) {
  11801. if (elem && hasClass(elem, cls)) {
  11802. elem.className = elem.className.replace(getClsRE(cls), '');
  11803. }
  11804. }
  11805. function addClass(elem, cls) {
  11806. if (elem && !hasClass(elem, cls)) {
  11807. removeClass(elem, cls);
  11808. elem.className = "".concat(elem.className, " ").concat(cls);
  11809. }
  11810. }
  11811. function hasControlKey(evnt) {
  11812. return evnt.ctrlKey || evnt.metaKey;
  11813. }
  11814. function toCssUnit(val) {
  11815. var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'px';
  11816. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val) || /^\d+$/.test("".concat(val))) {
  11817. return "".concat(val).concat(unit);
  11818. }
  11819. return "".concat(val || '');
  11820. }
  11821. function getDomNode() {
  11822. var documentElement = document.documentElement;
  11823. var bodyElem = document.body;
  11824. return {
  11825. scrollTop: documentElement.scrollTop || bodyElem.scrollTop,
  11826. scrollLeft: documentElement.scrollLeft || bodyElem.scrollLeft,
  11827. visibleHeight: documentElement.clientHeight || bodyElem.clientHeight,
  11828. visibleWidth: documentElement.clientWidth || bodyElem.clientWidth
  11829. };
  11830. }
  11831. /**
  11832. * 检查触发源是否属于目标节点
  11833. */
  11834. function getEventTargetNode(evnt, container, queryCls, queryMethod) {
  11835. var targetElem;
  11836. var target = evnt.target.shadowRoot && evnt.composed ? evnt.composedPath()[0] || evnt.target : evnt.target;
  11837. while (target && target.nodeType && target !== document) {
  11838. if (queryCls && hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
  11839. targetElem = target;
  11840. } else if (target === container) {
  11841. return {
  11842. flag: queryCls ? !!targetElem : true,
  11843. container: container,
  11844. targetElem: targetElem
  11845. };
  11846. }
  11847. target = target.parentNode;
  11848. }
  11849. return {
  11850. flag: false
  11851. };
  11852. }
  11853. /**
  11854. * 获取元素相对于 document 的位置
  11855. */
  11856. function getOffsetPos(elem, container) {
  11857. return getNodeOffset(elem, container, {
  11858. left: 0,
  11859. top: 0
  11860. });
  11861. }
  11862. function getAbsolutePos(elem) {
  11863. var bounding = elem.getBoundingClientRect();
  11864. var boundingTop = bounding.top;
  11865. var boundingLeft = bounding.left;
  11866. var _getDomNode = getDomNode(),
  11867. scrollTop = _getDomNode.scrollTop,
  11868. scrollLeft = _getDomNode.scrollLeft,
  11869. visibleHeight = _getDomNode.visibleHeight,
  11870. visibleWidth = _getDomNode.visibleWidth;
  11871. return {
  11872. boundingTop: boundingTop,
  11873. top: scrollTop + boundingTop,
  11874. boundingLeft: boundingLeft,
  11875. left: scrollLeft + boundingLeft,
  11876. visibleHeight: visibleHeight,
  11877. visibleWidth: visibleWidth
  11878. };
  11879. }
  11880. function getPaddingTopBottomSize(elem) {
  11881. if (elem) {
  11882. var computedStyle = getComputedStyle(elem);
  11883. var paddingTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(computedStyle.paddingTop);
  11884. var paddingBottom = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(computedStyle.paddingBottom);
  11885. return paddingTop + paddingBottom;
  11886. }
  11887. return 0;
  11888. }
  11889. function getPaddingLeftRightSize(elem) {
  11890. if (elem) {
  11891. var computedStyle = getComputedStyle(elem);
  11892. var paddingLeft = XEUtils.toNumber(computedStyle.paddingLeft);
  11893. var paddingRight = XEUtils.toNumber(computedStyle.paddingRight);
  11894. return paddingLeft + paddingRight;
  11895. }
  11896. return 0;
  11897. }
  11898. var scrollIntoViewIfNeeded = 'scrollIntoViewIfNeeded';
  11899. var scrollIntoView = 'scrollIntoView';
  11900. function scrollToView(elem) {
  11901. if (elem) {
  11902. if (elem[scrollIntoViewIfNeeded]) {
  11903. elem[scrollIntoViewIfNeeded]();
  11904. } else if (elem[scrollIntoView]) {
  11905. elem[scrollIntoView]();
  11906. }
  11907. }
  11908. }
  11909. function dom_triggerEvent(targetElem, type) {
  11910. if (targetElem) {
  11911. targetElem.dispatchEvent(new Event(type));
  11912. }
  11913. }
  11914. function isNodeElement(elem) {
  11915. return elem && elem.nodeType === 1;
  11916. }
  11917. function updatePanelPlacement(targetElem, panelElem, options) {
  11918. var _Object$assign = Object.assign({
  11919. teleportTo: false,
  11920. marginSize: 18
  11921. }, options),
  11922. placement = _Object$assign.placement,
  11923. teleportTo = _Object$assign.teleportTo,
  11924. marginSize = _Object$assign.marginSize;
  11925. var panelPlacement = 'bottom';
  11926. var top = '';
  11927. var bottom = '';
  11928. var left = '';
  11929. var right = '';
  11930. var minWidth = '';
  11931. var stys = {};
  11932. if (panelElem && targetElem) {
  11933. var documentElement = document.documentElement;
  11934. var bodyElem = document.body;
  11935. var targetHeight = targetElem.offsetHeight;
  11936. var panelHeight = panelElem.offsetHeight;
  11937. var panelWidth = panelElem.offsetWidth;
  11938. var panelRect = panelElem.getBoundingClientRect();
  11939. var targetRect = targetElem.getBoundingClientRect();
  11940. var visibleHeight = documentElement.clientHeight || bodyElem.clientHeight;
  11941. var visibleWidth = documentElement.clientWidth || bodyElem.clientWidth;
  11942. minWidth = targetElem.offsetWidth;
  11943. if (teleportTo) {
  11944. left = targetRect.left;
  11945. top = targetRect.top + targetHeight;
  11946. if (placement === 'top') {
  11947. panelPlacement = 'top';
  11948. top = targetRect.top - panelHeight;
  11949. } else if (!placement) {
  11950. // 如果下面不够放,则向上
  11951. if (top + panelHeight + marginSize > visibleHeight) {
  11952. panelPlacement = 'top';
  11953. top = targetRect.top - panelHeight;
  11954. }
  11955. // 如果上面不够放,则向下(优先)
  11956. if (top < marginSize) {
  11957. panelPlacement = 'bottom';
  11958. top = targetRect.top + targetHeight;
  11959. }
  11960. }
  11961. // 如果溢出右边
  11962. if (left + panelWidth + marginSize > visibleWidth) {
  11963. left -= left + panelWidth + marginSize - visibleWidth;
  11964. }
  11965. // 如果溢出左边
  11966. if (left < marginSize) {
  11967. left = marginSize;
  11968. }
  11969. } else {
  11970. if (placement === 'top') {
  11971. panelPlacement = 'top';
  11972. bottom = targetHeight;
  11973. } else if (!placement) {
  11974. // 如果下面不够放,则向上
  11975. top = targetHeight;
  11976. if (targetRect.top + targetRect.height + marginSize > visibleHeight) {
  11977. // 如果上面不够放,则向下(优先)
  11978. if (targetRect.top - targetHeight - panelHeight > marginSize) {
  11979. panelPlacement = 'top';
  11980. top = '';
  11981. bottom = targetHeight;
  11982. }
  11983. }
  11984. }
  11985. // 是否超出右侧
  11986. if (panelRect.left + panelRect.width + marginSize > visibleWidth) {
  11987. left = -(panelRect.left + panelRect.width + marginSize - visibleWidth);
  11988. }
  11989. }
  11990. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(top)) {
  11991. stys.top = toCssUnit(top);
  11992. }
  11993. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(bottom)) {
  11994. stys.bottom = toCssUnit(bottom);
  11995. }
  11996. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(left)) {
  11997. stys.left = toCssUnit(left);
  11998. }
  11999. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(right)) {
  12000. stys.right = toCssUnit(right);
  12001. }
  12002. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(minWidth)) {
  12003. stys.minWidth = toCssUnit(minWidth);
  12004. }
  12005. }
  12006. return {
  12007. top: top || 0,
  12008. bottom: bottom || 0,
  12009. left: left || 0,
  12010. right: right || 0,
  12011. style: stys,
  12012. placement: panelPlacement
  12013. };
  12014. }
  12015. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
  12016. var es_array_filter = __webpack_require__(2008);
  12017. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
  12018. var es_object_get_own_property_descriptor = __webpack_require__(3851);
  12019. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js
  12020. var es_object_get_own_property_descriptors = __webpack_require__(1278);
  12021. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
  12022. var es_object_keys = __webpack_require__(9432);
  12023. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  12024. function ownKeys(e, r) {
  12025. var t = Object.keys(e);
  12026. if (Object.getOwnPropertySymbols) {
  12027. var o = Object.getOwnPropertySymbols(e);
  12028. r && (o = o.filter(function (r) {
  12029. return Object.getOwnPropertyDescriptor(e, r).enumerable;
  12030. })), t.push.apply(t, o);
  12031. }
  12032. return t;
  12033. }
  12034. function _objectSpread2(e) {
  12035. for (var r = 1; r < arguments.length; r++) {
  12036. var t = null != arguments[r] ? arguments[r] : {};
  12037. r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
  12038. _defineProperty(e, r, t[r]);
  12039. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
  12040. Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
  12041. });
  12042. }
  12043. return e;
  12044. }
  12045. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.sub.js
  12046. var es_string_sub = __webpack_require__(8718);
  12047. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
  12048. var es_array_slice = __webpack_require__(4782);
  12049. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
  12050. var es_array_splice = __webpack_require__(4554);
  12051. ;// CONCATENATED MODULE: ./packages/anchor/src/util.ts
  12052. function assembleAnchorLink($xeAnchor, elem, linkConfig, $xeParentAnchorLink) {
  12053. var staticLinks = $xeAnchor.reactData.staticLinks;
  12054. var parentElem = elem.parentNode;
  12055. var parentLinkConfig = $xeParentAnchorLink ? $xeParentAnchorLink.linkConfig : null;
  12056. var parentLinks = parentLinkConfig ? parentLinkConfig.children : staticLinks;
  12057. if (parentElem && parentLinks) {
  12058. parentLinks.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, linkConfig);
  12059. $xeAnchor.reactData.staticLinks = staticLinks.slice(0);
  12060. }
  12061. }
  12062. function destroyAnchorLink($xeAnchor, linkConfig) {
  12063. var staticLinks = $xeAnchor.reactData.staticLinks;
  12064. var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(staticLinks, function (item) {
  12065. return item.id === linkConfig.id;
  12066. }, {
  12067. children: 'children'
  12068. });
  12069. if (matchObj) {
  12070. matchObj.items.splice(matchObj.index, 1);
  12071. }
  12072. $xeAnchor.reactData.staticLinks = staticLinks.slice(0);
  12073. }
  12074. ;// CONCATENATED MODULE: ./packages/anchor/src/anchor-link.ts
  12075. /* harmony default export */ var anchor_link = (/* define-vxe-component start */defineVxeComponent({
  12076. name: 'VxeAnchorLink',
  12077. props: {
  12078. content: [String, Number],
  12079. title: [String, Number],
  12080. href: String
  12081. },
  12082. inject: {
  12083. $xeAnchor: {
  12084. default: null
  12085. },
  12086. $xeParentAnchorLink: {
  12087. from: '$xeAnchorLink',
  12088. default: null
  12089. }
  12090. },
  12091. provide: function provide() {
  12092. var $xeAnchorLink = this;
  12093. return {
  12094. $xeAnchorLink: $xeAnchorLink
  12095. };
  12096. },
  12097. data: function data() {
  12098. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  12099. var reactData = {};
  12100. var linkConfig = {
  12101. id: xID,
  12102. href: '',
  12103. children: []
  12104. };
  12105. return {
  12106. xID: xID,
  12107. reactData: reactData,
  12108. linkConfig: linkConfig
  12109. };
  12110. },
  12111. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  12112. computeIsActive: function computeIsActive() {
  12113. var $xeAnchorLink = this;
  12114. var props = $xeAnchorLink;
  12115. var $xeAnchor = $xeAnchorLink.$xeAnchor;
  12116. var href = props.href;
  12117. if ($xeAnchor) {
  12118. return $xeAnchor.reactData.activeHref === href;
  12119. }
  12120. return null;
  12121. }
  12122. }),
  12123. watch: {
  12124. href: function href(val) {
  12125. var $xeAnchorLink = this;
  12126. var linkConfig = $xeAnchorLink.linkConfig;
  12127. linkConfig.href = val;
  12128. }
  12129. },
  12130. methods: {
  12131. //
  12132. // Method
  12133. //
  12134. dispatchEvent: function dispatchEvent(type, params, evnt) {
  12135. var $xeAnchorLink = this;
  12136. $xeAnchorLink.$emit(type, createEvent(evnt, {
  12137. $anchorLink: $xeAnchorLink
  12138. }, params));
  12139. },
  12140. clickEvent: function clickEvent(event) {
  12141. var $xeAnchorLink = this;
  12142. var props = $xeAnchorLink;
  12143. var $xeAnchor = $xeAnchorLink.$xeAnchor;
  12144. var href = props.href;
  12145. if ($xeAnchor) {
  12146. $xeAnchor.handleClickLink(event, href);
  12147. }
  12148. },
  12149. //
  12150. // Render
  12151. //
  12152. renderVN: function renderVN(h) {
  12153. var $xeAnchorLink = this;
  12154. var props = $xeAnchorLink;
  12155. var slots = $xeAnchorLink.$scopedSlots;
  12156. var href = props.href,
  12157. content = props.content,
  12158. title = props.title;
  12159. var defaultSlot = slots.default;
  12160. var subSlot = slots.sub;
  12161. var isActive = $xeAnchorLink.computeIsActive;
  12162. return h('div', {
  12163. ref: 'refElem',
  12164. class: ['vxe-anchor-link', {
  12165. 'is--active': isActive
  12166. }]
  12167. }, [h('a', {
  12168. class: 'vxe-anchor-link--item',
  12169. attrs: {
  12170. href: href,
  12171. title: title
  12172. },
  12173. on: {
  12174. click: $xeAnchorLink.clickEvent
  12175. }
  12176. }, defaultSlot ? defaultSlot({}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content)), subSlot ? h('div', {
  12177. class: 'vxe-anchor-link--sub-items'
  12178. }, subSlot({})) : renderEmptyElement($xeAnchorLink)]);
  12179. }
  12180. },
  12181. created: function created() {
  12182. var $xeAnchorLink = this;
  12183. var props = $xeAnchorLink;
  12184. var linkConfig = $xeAnchorLink.linkConfig;
  12185. linkConfig.href = props.href;
  12186. },
  12187. mounted: function mounted() {
  12188. var $xeAnchorLink = this;
  12189. var $xeAnchor = $xeAnchorLink.$xeAnchor;
  12190. var $xeParentAnchorLink = $xeAnchorLink.$xeParentAnchorLink;
  12191. var linkConfig = $xeAnchorLink.linkConfig;
  12192. var elem = $xeAnchorLink.$refs.refElem;
  12193. if ($xeAnchor && elem) {
  12194. assembleAnchorLink($xeAnchor, elem, linkConfig, $xeParentAnchorLink);
  12195. }
  12196. },
  12197. beforeDestroy: function beforeDestroy() {
  12198. var $xeAnchorLink = this;
  12199. var $xeAnchor = $xeAnchorLink.$xeAnchor;
  12200. var linkConfig = $xeAnchorLink.linkConfig;
  12201. if ($xeAnchor) {
  12202. destroyAnchorLink($xeAnchor, linkConfig);
  12203. }
  12204. },
  12205. render: function render(h) {
  12206. return this.renderVN(h);
  12207. }
  12208. })); /* define-vxe-component end */
  12209. ;// CONCATENATED MODULE: ./packages/anchor/src/anchor.ts
  12210. /* harmony default export */ var src_anchor = (/* define-vxe-component start */defineVxeComponent({
  12211. name: 'VxeAnchor',
  12212. props: {
  12213. value: String,
  12214. options: Array,
  12215. container: [String, Object, Function],
  12216. showMarker: {
  12217. type: Boolean,
  12218. default: true
  12219. }
  12220. },
  12221. provide: function provide() {
  12222. var $xeAnchor = this;
  12223. return {
  12224. $xeAnchor: $xeAnchor
  12225. };
  12226. },
  12227. data: function data() {
  12228. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  12229. var reactData = {
  12230. activeHref: null,
  12231. staticLinks: [],
  12232. containerElem: null
  12233. };
  12234. return {
  12235. xID: xID,
  12236. reactData: reactData
  12237. };
  12238. },
  12239. computed: {
  12240. computeAllHrefList: function computeAllHrefList() {
  12241. var $xeAnchor = this;
  12242. var reactData = $xeAnchor.reactData;
  12243. var list = [];
  12244. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(reactData.staticLinks, function (item) {
  12245. list.push(item.href || '');
  12246. }, {
  12247. children: 'children'
  12248. });
  12249. return list;
  12250. }
  12251. },
  12252. watch: {
  12253. value: function value(val) {
  12254. var $xeAnchor = this;
  12255. var reactData = $xeAnchor.reactData;
  12256. reactData.activeHref = val;
  12257. },
  12258. 'reactData.activeHref': function reactDataActiveHref() {
  12259. var $xeAnchor = this;
  12260. $xeAnchor.updateMarkerPos();
  12261. },
  12262. container: function container() {
  12263. var $xeAnchor = this;
  12264. $xeAnchor.removeContainerElemScroll();
  12265. $xeAnchor.updateContainerElem();
  12266. }
  12267. },
  12268. methods: {
  12269. //
  12270. // Method
  12271. //
  12272. dispatchEvent: function dispatchEvent(type, params, evnt) {
  12273. var $xeAnchor = this;
  12274. $xeAnchor.$emit(type, createEvent(evnt, {
  12275. $anchor: $xeAnchor
  12276. }, params));
  12277. },
  12278. getContainerElem: function getContainerElem() {
  12279. var $xeAnchor = this;
  12280. var props = $xeAnchor;
  12281. var container = props.container;
  12282. if (container) {
  12283. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isElement(container)) {
  12284. return container;
  12285. }
  12286. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(container)) {
  12287. return document.querySelector(container);
  12288. }
  12289. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(container)) {
  12290. return container({
  12291. $anchor: $xeAnchor
  12292. });
  12293. }
  12294. }
  12295. return null;
  12296. },
  12297. emitEvent: function emitEvent(value) {
  12298. var $xeAnchor = this;
  12299. var reactData = $xeAnchor.reactData;
  12300. var _events = $xeAnchor._events;
  12301. reactData.activeHref = value;
  12302. $xeAnchor.$emit('input', value);
  12303. if (_events && _events.modelValue) {
  12304. $xeAnchor.$emit('modelValue', value);
  12305. } else {
  12306. $xeAnchor.$emit('model-value', value);
  12307. }
  12308. },
  12309. handleContainerScrollEvent: function handleContainerScrollEvent() {
  12310. var $xeAnchor = this;
  12311. var reactData = $xeAnchor.reactData;
  12312. var allHrefList = $xeAnchor.computeAllHrefList;
  12313. var containerElem = reactData.containerElem;
  12314. if (containerElem) {
  12315. var wrapperElList = containerElem.querySelectorAll(allHrefList.map(function (href) {
  12316. return "".concat(href);
  12317. }).join(','));
  12318. for (var i = 0; i < wrapperElList.length; i++) {
  12319. var wrapperEl = wrapperElList[i];
  12320. var wrapperRect = wrapperEl.getBoundingClientRect();
  12321. if (wrapperRect.top > 0) {
  12322. var href = wrapperEl.id;
  12323. reactData.activeHref = "#".concat(href);
  12324. break;
  12325. }
  12326. }
  12327. }
  12328. },
  12329. removeContainerElemScroll: function removeContainerElemScroll() {
  12330. var $xeAnchor = this;
  12331. var reactData = $xeAnchor.reactData;
  12332. var containerElem = reactData.containerElem;
  12333. if (containerElem) {
  12334. containerElem.removeEventListener('scroll', $xeAnchor.handleContainerScrollEvent);
  12335. }
  12336. },
  12337. updateContainerElem: function updateContainerElem() {
  12338. var $xeAnchor = this;
  12339. var reactData = $xeAnchor.reactData;
  12340. var containerElem = $xeAnchor.getContainerElem();
  12341. reactData.containerElem = containerElem;
  12342. if (containerElem) {
  12343. containerElem.addEventListener('scroll', $xeAnchor.handleContainerScrollEvent, {
  12344. passive: false
  12345. });
  12346. }
  12347. },
  12348. updateMarkerPos: function updateMarkerPos() {
  12349. var $xeAnchor = this;
  12350. var reactData = $xeAnchor.reactData;
  12351. $xeAnchor.$nextTick(function () {
  12352. var activeHref = reactData.activeHref;
  12353. var elem = $xeAnchor.$refs.refElem;
  12354. var markerEl = $xeAnchor.$refs.refMarkerElem;
  12355. if (elem && markerEl) {
  12356. if (activeHref) {
  12357. var linkEl = elem.querySelector("[href=\"".concat(activeHref, "\"]"));
  12358. if (linkEl) {
  12359. var _getOffsetPos = getOffsetPos(linkEl, elem),
  12360. top = _getOffsetPos.top;
  12361. markerEl.style.top = "".concat(top, "px");
  12362. }
  12363. }
  12364. }
  12365. });
  12366. },
  12367. handleClickLink: function handleClickLink(evnt, href) {
  12368. var $xeAnchor = this;
  12369. evnt.preventDefault();
  12370. var targetEl = document.getElementById("".concat(href).replace('#', ''));
  12371. if (targetEl) {
  12372. targetEl.scrollIntoView({
  12373. behavior: 'smooth'
  12374. });
  12375. }
  12376. $xeAnchor.emitEvent(href);
  12377. $xeAnchor.dispatchEvent('click', {
  12378. href: href
  12379. }, evnt);
  12380. },
  12381. //
  12382. // Render
  12383. //
  12384. renderSubItems: function renderSubItems(h, options) {
  12385. var $xeAnchor = this;
  12386. var itemVNs = [];
  12387. if (options) {
  12388. options.forEach(function (item) {
  12389. var subItems = item.children;
  12390. if (subItems && subItems.length) {
  12391. itemVNs.push(h(anchor_link, {
  12392. props: {
  12393. content: item.content,
  12394. title: item.title,
  12395. href: item.href
  12396. },
  12397. scopedSlots: {
  12398. sub: function sub() {
  12399. return $xeAnchor.renderSubItems(h, subItems);
  12400. }
  12401. }
  12402. }));
  12403. } else {
  12404. itemVNs.push(h(anchor_link, {
  12405. props: {
  12406. content: item.content,
  12407. title: item.title,
  12408. href: item.href
  12409. }
  12410. }));
  12411. }
  12412. });
  12413. }
  12414. return itemVNs;
  12415. },
  12416. renderVN: function renderVN(h) {
  12417. var $xeAnchor = this;
  12418. var props = $xeAnchor;
  12419. var slots = $xeAnchor.$scopedSlots;
  12420. var options = props.options,
  12421. showMarker = props.showMarker;
  12422. var defaultSlot = slots.default;
  12423. return h('div', {
  12424. ref: 'refElem',
  12425. class: ['vxe-anchor', {
  12426. 'is--marker': showMarker
  12427. }]
  12428. }, [h('div', {
  12429. class: 'vxe-anchor--list'
  12430. }, defaultSlot ? defaultSlot({}) : $xeAnchor.renderSubItems(h, options)), showMarker ? h('div', {
  12431. ref: 'refMarkerElem',
  12432. class: 'vxe-anchor--marker'
  12433. }) : renderEmptyElement($xeAnchor)]);
  12434. }
  12435. },
  12436. mounted: function mounted() {
  12437. var $xeAnchor = this;
  12438. $xeAnchor.$nextTick(function () {
  12439. $xeAnchor.updateContainerElem();
  12440. });
  12441. },
  12442. beforeDestroy: function beforeDestroy() {
  12443. var $xeAnchor = this;
  12444. $xeAnchor.removeContainerElemScroll();
  12445. },
  12446. render: function render(h) {
  12447. return this.renderVN(h);
  12448. }
  12449. })); /* define-vxe-component end */
  12450. ;// CONCATENATED MODULE: ./packages/anchor/index.ts
  12451. var VxeAnchor = Object.assign({}, src_anchor, {
  12452. install: function install(app) {
  12453. app.component(src_anchor.name, src_anchor);
  12454. }
  12455. });
  12456. dynamicApp.use(VxeAnchor);
  12457. index_esm_VxeUI.component(src_anchor);
  12458. var Anchor = VxeAnchor;
  12459. /* harmony default export */ var packages_anchor = (VxeAnchor);
  12460. ;// CONCATENATED MODULE: ./packages/anchor-link/index.ts
  12461. var VxeAnchorLink = Object.assign({}, anchor_link, {
  12462. install: function install(app) {
  12463. app.component(anchor_link.name, anchor_link);
  12464. }
  12465. });
  12466. dynamicApp.use(VxeAnchorLink);
  12467. index_esm_VxeUI.component(anchor_link);
  12468. var AnchorLink = VxeAnchorLink;
  12469. /* harmony default export */ var packages_anchor_link = (VxeAnchorLink);
  12470. ;// CONCATENATED MODULE: ./packages/avatar/src/avatar.ts
  12471. /* harmony default export */ var avatar = (/* define-vxe-component start */defineVxeComponent({
  12472. name: 'VxeAvatar',
  12473. mixins: [globalMixins.sizeMixin],
  12474. props: {
  12475. count: [String, Number],
  12476. dot: Boolean,
  12477. content: [String, Number],
  12478. icon: String,
  12479. src: String,
  12480. width: [String, Number],
  12481. height: [String, Number],
  12482. circle: {
  12483. type: Boolean,
  12484. default: function _default() {
  12485. return getConfig().avatar.circle;
  12486. }
  12487. },
  12488. status: {
  12489. type: String,
  12490. default: function _default() {
  12491. return getConfig().avatar.status;
  12492. }
  12493. },
  12494. size: {
  12495. type: String,
  12496. default: function _default() {
  12497. return getConfig().avatar.size || getConfig().size;
  12498. }
  12499. }
  12500. },
  12501. data: function data() {
  12502. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  12503. var reactData = {};
  12504. return {
  12505. xID: xID,
  12506. reactData: reactData
  12507. };
  12508. },
  12509. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  12510. computeAvatarStyle: function computeAvatarStyle() {
  12511. var $xeAvatar = this;
  12512. var props = $xeAvatar;
  12513. var width = props.width,
  12514. height = props.height;
  12515. var stys = {};
  12516. if (width) {
  12517. stys.width = toCssUnit(width);
  12518. }
  12519. if (height) {
  12520. stys.height = toCssUnit(height);
  12521. }
  12522. return stys;
  12523. },
  12524. computeCountNum: function computeCountNum() {
  12525. var $xeAvatar = this;
  12526. var props = $xeAvatar;
  12527. var count = props.count;
  12528. return count ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(count) : 0;
  12529. }
  12530. }),
  12531. methods: {
  12532. //
  12533. // Method
  12534. //
  12535. dispatchEvent: function dispatchEvent(type, params, evnt) {
  12536. var $xeAvatar = this;
  12537. $xeAvatar.$emit(type, createEvent(evnt, {
  12538. $avatar: $xeAvatar
  12539. }, params));
  12540. },
  12541. //
  12542. // Render
  12543. //
  12544. renderContent: function renderContent(h) {
  12545. var $xeAvatar = this;
  12546. var props = $xeAvatar;
  12547. var icon = props.icon,
  12548. content = props.content,
  12549. src = props.src;
  12550. if (icon) {
  12551. return h('span', {
  12552. class: 'vxe-avatar--icon'
  12553. }, [h('i', {
  12554. class: icon
  12555. })]);
  12556. }
  12557. if (content) {
  12558. return h('span', {
  12559. class: 'vxe-avatar--content'
  12560. }, "".concat(content));
  12561. }
  12562. if (src) {
  12563. return h('img', {
  12564. class: 'vxe-avatar--img',
  12565. attrs: {
  12566. src: src
  12567. }
  12568. });
  12569. }
  12570. return renderEmptyElement($xeAvatar);
  12571. },
  12572. renderVN: function renderVN(h) {
  12573. var $xeAvatar = this;
  12574. var props = $xeAvatar;
  12575. var circle = props.circle,
  12576. dot = props.dot,
  12577. status = props.status;
  12578. var vSize = $xeAvatar.computeSize;
  12579. var countNum = $xeAvatar.computeCountNum;
  12580. var avatarStyle = $xeAvatar.computeAvatarStyle;
  12581. return h('div', {
  12582. ref: 'refElem',
  12583. class: ['vxe-avatar', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'is--circle', circle), 'is--dot', dot)],
  12584. style: avatarStyle
  12585. }, [$xeAvatar.renderContent(h), countNum ? h('span', {
  12586. class: 'vxe-avatar--count'
  12587. }, countNum > 99 ? '99+' : "".concat(countNum)) : renderEmptyElement($xeAvatar)]);
  12588. }
  12589. },
  12590. render: function render(h) {
  12591. return this.renderVN(h);
  12592. }
  12593. })); /* define-vxe-component end */
  12594. ;// CONCATENATED MODULE: ./packages/avatar/index.ts
  12595. var VxeAvatar = Object.assign({}, avatar, {
  12596. install: function install(app) {
  12597. app.component(avatar.name, avatar);
  12598. }
  12599. });
  12600. dynamicApp.use(VxeAvatar);
  12601. index_esm_VxeUI.component(avatar);
  12602. var Avatar = VxeAvatar;
  12603. /* harmony default export */ var packages_avatar = (VxeAvatar);
  12604. ;// CONCATENATED MODULE: ./packages/badge/src/badge.ts
  12605. /* harmony default export */ var badge = (/* define-vxe-component start */defineVxeComponent({
  12606. name: 'VxeBadge',
  12607. mixins: [globalMixins.sizeMixin],
  12608. props: {
  12609. count: [String, Number],
  12610. dot: Boolean,
  12611. content: [String, Number],
  12612. size: {
  12613. type: String,
  12614. default: function _default() {
  12615. return getConfig().badge.size || getConfig().size;
  12616. }
  12617. }
  12618. },
  12619. data: function data() {
  12620. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  12621. var reactData = {};
  12622. return {
  12623. xID: xID,
  12624. reactData: reactData
  12625. };
  12626. },
  12627. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  12628. computeCountNum: function computeCountNum() {
  12629. var $xeAvatar = this;
  12630. var props = $xeAvatar;
  12631. var count = props.count;
  12632. return count ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(count) : 0;
  12633. }
  12634. }),
  12635. methods: {
  12636. //
  12637. // Method
  12638. //
  12639. dispatchEvent: function dispatchEvent(type, params, evnt) {
  12640. var $xeBadge = this;
  12641. $xeBadge.$emit(type, createEvent(evnt, {
  12642. $badge: $xeBadge
  12643. }, params));
  12644. },
  12645. //
  12646. // Render
  12647. //
  12648. renderVN: function renderVN(h) {
  12649. var $xeBadge = this;
  12650. var props = $xeBadge;
  12651. var slots = $xeBadge.$scopedSlots;
  12652. var dot = props.dot,
  12653. content = props.content;
  12654. var vSize = $xeBadge.computeSize;
  12655. var countNum = $xeBadge.computeCountNum;
  12656. var defaultSlot = slots.default;
  12657. return h('div', {
  12658. ref: 'refElem',
  12659. class: ['vxe-badge', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--dot', dot)]
  12660. }, [defaultSlot || content ? h('div', {
  12661. class: 'vxe-badge--content'
  12662. }, defaultSlot ? defaultSlot({}) : "".concat(content || '')) : [], countNum ? h('span', {
  12663. class: 'vxe-badge--count'
  12664. }, countNum > 99 ? '99+' : "".concat(countNum)) : renderEmptyElement($xeBadge)]);
  12665. }
  12666. },
  12667. render: function render(h) {
  12668. return this.renderVN(h);
  12669. }
  12670. })); /* define-vxe-component end */
  12671. ;// CONCATENATED MODULE: ./packages/badge/index.ts
  12672. var VxeBadge = Object.assign({}, badge, {
  12673. install: function install(app) {
  12674. app.component(badge.name, badge);
  12675. }
  12676. });
  12677. dynamicApp.use(VxeBadge);
  12678. index_esm_VxeUI.component(badge);
  12679. var Badge = VxeBadge;
  12680. /* harmony default export */ var packages_badge = (VxeBadge);
  12681. ;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.ts
  12682. /* harmony default export */ var breadcrumb_item = (/* define-vxe-component start */defineVxeComponent({
  12683. name: 'VxeBreadcrumbItem',
  12684. mixins: [globalMixins.sizeMixin],
  12685. props: {
  12686. title: String,
  12687. routerLink: Object
  12688. },
  12689. inject: {
  12690. $xeBreadcrumb: {
  12691. default: null
  12692. }
  12693. },
  12694. data: function data() {
  12695. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  12696. var reactData = {};
  12697. return {
  12698. xID: xID,
  12699. reactData: reactData
  12700. };
  12701. },
  12702. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  12703. computeSeparator: function computeSeparator() {
  12704. var $xeBreadcrumbItem = this;
  12705. var $xeBreadcrumb = $xeBreadcrumbItem.$xeBreadcrumb;
  12706. if ($xeBreadcrumb) {
  12707. return $xeBreadcrumb.separator;
  12708. }
  12709. return '';
  12710. }
  12711. }),
  12712. methods: {
  12713. //
  12714. // Method
  12715. //
  12716. dispatchEvent: function dispatchEvent(type, params, evnt) {
  12717. var $xeBreadcrumbItem = this;
  12718. $xeBreadcrumbItem.$emit(type, createEvent(evnt, {
  12719. $breadcrumbItem: $xeBreadcrumbItem
  12720. }, params));
  12721. },
  12722. clickEvent: function clickEvent(evnt) {
  12723. var $xeBreadcrumbItem = this;
  12724. var props = $xeBreadcrumbItem;
  12725. var $xeBreadcrumb = $xeBreadcrumbItem.$xeBreadcrumb;
  12726. if ($xeBreadcrumb) {
  12727. var item = {
  12728. title: props.title,
  12729. routerLink: props.routerLink
  12730. };
  12731. $xeBreadcrumb.handleClickLink(evnt, item);
  12732. }
  12733. },
  12734. //
  12735. // Render
  12736. //
  12737. renderVN: function renderVN(h) {
  12738. var $xeBreadcrumbItem = this;
  12739. var props = $xeBreadcrumbItem;
  12740. var slots = $xeBreadcrumbItem.$scopedSlots;
  12741. var title = props.title,
  12742. routerLink = props.routerLink;
  12743. var separator = $xeBreadcrumbItem.computeSeparator;
  12744. var defaultSlot = slots.default;
  12745. return h('span', {
  12746. ref: 'refElem',
  12747. class: 'vxe-breadcrumb-item',
  12748. on: {
  12749. click: $xeBreadcrumbItem.clickEvent
  12750. }
  12751. }, [h('span', {
  12752. class: 'vxe-breadcrumb-item--content'
  12753. }, [routerLink ? h('router-link', {
  12754. class: 'vxe-breadcrumb-item--content-link',
  12755. props: {
  12756. title: title,
  12757. custom: true,
  12758. to: routerLink
  12759. }
  12760. }, [h('span', {
  12761. class: 'vxe-breadcrumb-item--content-text'
  12762. }, defaultSlot ? defaultSlot({}) : "".concat(title || ''))]) : h('span', {
  12763. class: 'vxe-breadcrumb-item--content-text'
  12764. }, defaultSlot ? defaultSlot({}) : "".concat(title || ''))]), separator ? h('span', {
  12765. class: 'vxe-breadcrumb-item--separator'
  12766. }, "".concat(separator)) : renderEmptyElement($xeBreadcrumbItem)]);
  12767. }
  12768. },
  12769. render: function render(h) {
  12770. return this.renderVN(h);
  12771. }
  12772. })); /* define-vxe-component end */
  12773. ;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.ts
  12774. /* harmony default export */ var breadcrumb = (/* define-vxe-component start */defineVxeComponent({
  12775. name: 'VxeBreadcrumb',
  12776. mixins: [globalMixins.sizeMixin],
  12777. props: {
  12778. separator: {
  12779. type: String,
  12780. default: function _default() {
  12781. return getConfig().breadcrumb.separator;
  12782. }
  12783. },
  12784. options: Array
  12785. },
  12786. provide: function provide() {
  12787. var $xeBreadcrumb = this;
  12788. return {
  12789. $xeBreadcrumb: $xeBreadcrumb
  12790. };
  12791. },
  12792. data: function data() {
  12793. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  12794. var reactData = {};
  12795. return {
  12796. xID: xID,
  12797. reactData: reactData
  12798. };
  12799. },
  12800. computed: _objectSpread2({}, {}),
  12801. methods: {
  12802. //
  12803. // Method
  12804. //
  12805. dispatchEvent: function dispatchEvent(type, params, evnt) {
  12806. var $xeBreadcrumb = this;
  12807. $xeBreadcrumb.$emit(type, createEvent(evnt, {
  12808. $breadcrumb: $xeBreadcrumb
  12809. }, params));
  12810. },
  12811. handleClickLink: function handleClickLink(evnt, option) {
  12812. var $xeBreadcrumb = this;
  12813. $xeBreadcrumb.dispatchEvent('click', {
  12814. option: option
  12815. }, evnt);
  12816. },
  12817. //
  12818. // Render
  12819. //
  12820. renderItems: function renderItems(h) {
  12821. var $xeBreadcrumb = this;
  12822. var props = $xeBreadcrumb;
  12823. var options = props.options;
  12824. if (options && options.length) {
  12825. return options.map(function (item) {
  12826. return h(breadcrumb_item, {
  12827. props: {
  12828. title: item.title,
  12829. routerLink: item.routerLink
  12830. }
  12831. });
  12832. });
  12833. }
  12834. return [];
  12835. },
  12836. renderVN: function renderVN(h) {
  12837. var $xeBreadcrumb = this;
  12838. var slots = $xeBreadcrumb.$scopedSlots;
  12839. var defaultSlot = slots.default;
  12840. return h('div', {
  12841. ref: 'refElem',
  12842. class: 'vxe-breadcrumb'
  12843. }, defaultSlot ? defaultSlot({}) : $xeBreadcrumb.renderItems(h));
  12844. }
  12845. },
  12846. render: function render(h) {
  12847. return this.renderVN(h);
  12848. }
  12849. })); /* define-vxe-component end */
  12850. ;// CONCATENATED MODULE: ./packages/breadcrumb/index.ts
  12851. var VxeBreadcrumb = Object.assign({}, breadcrumb, {
  12852. install: function install(app) {
  12853. app.component(breadcrumb.name, breadcrumb);
  12854. }
  12855. });
  12856. dynamicApp.use(VxeBreadcrumb);
  12857. index_esm_VxeUI.component(breadcrumb);
  12858. var Breadcrumb = VxeBreadcrumb;
  12859. /* harmony default export */ var packages_breadcrumb = (VxeBreadcrumb);
  12860. ;// CONCATENATED MODULE: ./packages/breadcrumb-item/index.ts
  12861. var VxeBreadcrumbItem = Object.assign({}, breadcrumb_item, {
  12862. install: function install(app) {
  12863. app.component(breadcrumb_item.name, breadcrumb_item);
  12864. }
  12865. });
  12866. dynamicApp.use(VxeBreadcrumbItem);
  12867. index_esm_VxeUI.component(breadcrumb_item);
  12868. var BreadcrumbItem = VxeBreadcrumbItem;
  12869. /* harmony default export */ var packages_breadcrumb_item = (VxeBreadcrumbItem);
  12870. ;// CONCATENATED MODULE: ./packages/ui/src/utils.ts
  12871. function isEnableConf(conf) {
  12872. return conf && conf.enabled !== false;
  12873. }
  12874. function nextZIndex() {
  12875. return index_esm.getNext();
  12876. }
  12877. function getLastZIndex() {
  12878. return index_esm.getCurrent();
  12879. }
  12880. function nextSubZIndex() {
  12881. return index_esm.getSubNext();
  12882. }
  12883. function getSubLastZIndex() {
  12884. return index_esm.getSubCurrent();
  12885. }
  12886. function getGlobalDefaultConfig(value, globalValue) {
  12887. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(value)) {
  12888. return globalValue;
  12889. }
  12890. return value;
  12891. }
  12892. function getFuncText(content, args) {
  12893. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(content)) {
  12894. return '';
  12895. }
  12896. var translate = getConfig().translate;
  12897. return "".concat(translate ? translate('' + content, args) : content);
  12898. }
  12899. /**
  12900. * 判断值为:'' | null | undefined 时都属于空值
  12901. */
  12902. function eqEmptyValue(cellValue) {
  12903. return cellValue === null || cellValue === undefined || cellValue === '';
  12904. }
  12905. function handleBooleanDefaultValue(value) {
  12906. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(value) ? value : null;
  12907. }
  12908. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
  12909. function _arrayLikeToArray(r, a) {
  12910. (null == a || a > r.length) && (a = r.length);
  12911. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  12912. return n;
  12913. }
  12914. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
  12915. function _arrayWithoutHoles(r) {
  12916. if (Array.isArray(r)) return _arrayLikeToArray(r);
  12917. }
  12918. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
  12919. var es_array_from = __webpack_require__(3418);
  12920. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
  12921. function _iterableToArray(r) {
  12922. if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
  12923. }
  12924. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
  12925. function _unsupportedIterableToArray(r, a) {
  12926. if (r) {
  12927. if ("string" == typeof r) return _arrayLikeToArray(r, a);
  12928. var t = {}.toString.call(r).slice(8, -1);
  12929. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  12930. }
  12931. }
  12932. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
  12933. function _nonIterableSpread() {
  12934. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  12935. }
  12936. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
  12937. function _toConsumableArray(r) {
  12938. return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
  12939. }
  12940. ;// CONCATENATED MODULE: ./packages/tooltip/src/tooltip.ts
  12941. /* harmony default export */ var tooltip = (/* define-vxe-component start */defineVxeComponent({
  12942. name: 'VxeTooltip',
  12943. mixins: [globalMixins.sizeMixin],
  12944. props: {
  12945. value: Boolean,
  12946. size: {
  12947. type: String,
  12948. default: function _default() {
  12949. return getConfig().tooltip.size || getConfig().size;
  12950. }
  12951. },
  12952. selector: String,
  12953. trigger: {
  12954. type: String,
  12955. default: function _default() {
  12956. return getConfig().tooltip.trigger || 'hover';
  12957. }
  12958. },
  12959. theme: {
  12960. type: String,
  12961. default: function _default() {
  12962. return getConfig().tooltip.theme || 'dark';
  12963. }
  12964. },
  12965. content: {
  12966. type: [String, Number],
  12967. default: null
  12968. },
  12969. useHTML: Boolean,
  12970. zIndex: [String, Number],
  12971. popupClassName: [String, Function],
  12972. width: {
  12973. type: [String, Number],
  12974. default: function _default() {
  12975. return getConfig().tooltip.Width;
  12976. }
  12977. },
  12978. height: {
  12979. type: [String, Number],
  12980. default: function _default() {
  12981. return getConfig().tooltip.height;
  12982. }
  12983. },
  12984. minWidth: {
  12985. type: [String, Number],
  12986. default: function _default() {
  12987. return getConfig().tooltip.minWidth;
  12988. }
  12989. },
  12990. minHeight: {
  12991. type: [String, Number],
  12992. default: function _default() {
  12993. return getConfig().tooltip.minHeight;
  12994. }
  12995. },
  12996. maxWidth: {
  12997. type: [String, Number],
  12998. default: function _default() {
  12999. return getConfig().tooltip.maxWidth;
  13000. }
  13001. },
  13002. maxHeight: {
  13003. type: [String, Number],
  13004. default: function _default() {
  13005. return getConfig().tooltip.maxHeight;
  13006. }
  13007. },
  13008. isArrow: {
  13009. type: Boolean,
  13010. default: function _default() {
  13011. return getConfig().tooltip.isArrow;
  13012. }
  13013. },
  13014. enterable: {
  13015. type: Boolean,
  13016. default: function _default() {
  13017. return getConfig().tooltip.enterable;
  13018. }
  13019. },
  13020. enterDelay: {
  13021. type: Number,
  13022. default: function _default() {
  13023. return getConfig().tooltip.enterDelay;
  13024. }
  13025. },
  13026. leaveDelay: {
  13027. type: Number,
  13028. default: function _default() {
  13029. return getConfig().tooltip.leaveDelay;
  13030. }
  13031. }
  13032. },
  13033. data: function data() {
  13034. var reactData = {
  13035. target: null,
  13036. isUpdate: false,
  13037. visible: false,
  13038. tipContent: '',
  13039. tipActive: false,
  13040. tipTarget: null,
  13041. tipZindex: 0,
  13042. tipStore: {
  13043. style: {},
  13044. placement: '',
  13045. arrowStyle: {}
  13046. }
  13047. };
  13048. var internalData = {};
  13049. return {
  13050. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  13051. reactData: reactData,
  13052. internalData: internalData
  13053. };
  13054. },
  13055. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  13056. computeWrapperStyle: function computeWrapperStyle() {
  13057. var $xeTooltip = this;
  13058. var props = $xeTooltip;
  13059. var width = props.width,
  13060. height = props.height,
  13061. minHeight = props.minHeight,
  13062. minWidth = props.minWidth,
  13063. maxHeight = props.maxHeight,
  13064. maxWidth = props.maxWidth;
  13065. var stys = {};
  13066. if (width) {
  13067. stys.width = toCssUnit(width);
  13068. }
  13069. if (height) {
  13070. stys.height = toCssUnit(height);
  13071. }
  13072. if (minWidth) {
  13073. stys.minWidth = toCssUnit(minWidth);
  13074. }
  13075. if (minHeight) {
  13076. stys.minHeight = toCssUnit(minHeight);
  13077. }
  13078. if (maxWidth) {
  13079. stys.maxWidth = toCssUnit(maxWidth);
  13080. }
  13081. if (maxHeight) {
  13082. stys.maxHeight = toCssUnit(maxHeight);
  13083. }
  13084. return stys;
  13085. }
  13086. }),
  13087. methods: {
  13088. //
  13089. // Method
  13090. //
  13091. dispatchEvent: function dispatchEvent(type, params, evnt) {
  13092. var $xeTooltip = this;
  13093. $xeTooltip.$emit(type, createEvent(evnt, {
  13094. $tooltip: $xeTooltip
  13095. }, params));
  13096. },
  13097. emitModel: function emitModel(value) {
  13098. var $xeTooltip = this;
  13099. var _events = $xeTooltip._events;
  13100. $xeTooltip.$emit('input', value);
  13101. if (_events && _events.modelValue) {
  13102. $xeTooltip.$emit('modelValue', value);
  13103. } else {
  13104. $xeTooltip.$emit('model-value', value);
  13105. }
  13106. },
  13107. getSelectorEl: function getSelectorEl() {
  13108. var $xeTooltip = this;
  13109. var props = $xeTooltip;
  13110. var selector = props.selector;
  13111. if (selector) {
  13112. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isElement(selector)) {
  13113. return selector;
  13114. }
  13115. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(selector)) {
  13116. return document.querySelector(selector);
  13117. }
  13118. }
  13119. return null;
  13120. },
  13121. open: function open(target, content) {
  13122. var $xeTooltip = this;
  13123. var reactData = $xeTooltip.reactData;
  13124. return $xeTooltip.handleVisible(target || reactData.target || $xeTooltip.getSelectorEl(), content);
  13125. },
  13126. close: function close() {
  13127. var $xeTooltip = this;
  13128. var reactData = $xeTooltip.reactData;
  13129. reactData.tipTarget = null;
  13130. reactData.tipActive = false;
  13131. Object.assign(reactData.tipStore, {
  13132. style: {},
  13133. placement: '',
  13134. arrowStyle: null
  13135. });
  13136. $xeTooltip.updateValue(false);
  13137. return $xeTooltip.$nextTick();
  13138. },
  13139. toVisible: function toVisible(target, content) {
  13140. var $xeTooltip = this;
  13141. return $xeTooltip.handleVisible(target, content);
  13142. },
  13143. updatePlacement: function updatePlacement() {
  13144. var $xeTooltip = this;
  13145. var reactData = $xeTooltip.reactData;
  13146. return $xeTooltip.$nextTick().then(function () {
  13147. var tipTarget = reactData.tipTarget;
  13148. var el = $xeTooltip.$refs.refElem;
  13149. if (tipTarget && el) {
  13150. $xeTooltip.updateTipStyle();
  13151. return $xeTooltip.$nextTick().then(function () {
  13152. $xeTooltip.updateTipStyle();
  13153. });
  13154. }
  13155. });
  13156. },
  13157. isActived: function isActived() {
  13158. var $xeTooltip = this;
  13159. var reactData = $xeTooltip.reactData;
  13160. return reactData.tipActive;
  13161. },
  13162. setActived: function setActived(active) {
  13163. var $xeTooltip = this;
  13164. var reactData = $xeTooltip.reactData;
  13165. reactData.tipActive = !!active;
  13166. },
  13167. updateTipStyle: function updateTipStyle() {
  13168. var $xeTooltip = this;
  13169. var reactData = $xeTooltip.reactData;
  13170. var tipTarget = reactData.tipTarget,
  13171. tipStore = reactData.tipStore;
  13172. if (tipTarget) {
  13173. var _getDomNode = getDomNode(),
  13174. scrollTop = _getDomNode.scrollTop,
  13175. scrollLeft = _getDomNode.scrollLeft,
  13176. visibleWidth = _getDomNode.visibleWidth;
  13177. var _getAbsolutePos = getAbsolutePos(tipTarget),
  13178. top = _getAbsolutePos.top,
  13179. left = _getAbsolutePos.left;
  13180. var el = $xeTooltip.$refs.refElem;
  13181. var marginSize = 6;
  13182. var offsetHeight = el.offsetHeight;
  13183. var offsetWidth = el.offsetWidth;
  13184. var tipLeft = left;
  13185. var tipTop = top - offsetHeight - marginSize;
  13186. tipLeft = Math.max(marginSize, left + Math.floor((tipTarget.offsetWidth - offsetWidth) / 2));
  13187. if (tipLeft + offsetWidth + marginSize > scrollLeft + visibleWidth) {
  13188. tipLeft = scrollLeft + visibleWidth - offsetWidth - marginSize;
  13189. }
  13190. if (top - offsetHeight < scrollTop + marginSize) {
  13191. tipStore.placement = 'bottom';
  13192. tipTop = top + tipTarget.offsetHeight + marginSize;
  13193. }
  13194. tipStore.style.top = "".concat(tipTop, "px");
  13195. tipStore.style.left = "".concat(tipLeft, "px");
  13196. tipStore.arrowStyle.left = "".concat(left - tipLeft + tipTarget.offsetWidth / 2, "px");
  13197. }
  13198. },
  13199. updateValue: function updateValue(value) {
  13200. var $xeTooltip = this;
  13201. var reactData = $xeTooltip.reactData;
  13202. if (value !== reactData.visible) {
  13203. reactData.visible = value;
  13204. reactData.isUpdate = true;
  13205. $xeTooltip.emitModel(value);
  13206. }
  13207. },
  13208. updateZindex: function updateZindex() {
  13209. var $xeTooltip = this;
  13210. var reactData = $xeTooltip.reactData;
  13211. if (reactData.tipZindex < getLastZIndex()) {
  13212. reactData.tipZindex = nextZIndex();
  13213. }
  13214. },
  13215. clickEvent: function clickEvent() {
  13216. var $xeTooltip = this;
  13217. var props = $xeTooltip;
  13218. var reactData = $xeTooltip.reactData;
  13219. if (reactData.visible) {
  13220. $xeTooltip.close();
  13221. } else {
  13222. $xeTooltip.handleVisible(reactData.target || $xeTooltip.getSelectorEl(), props.content);
  13223. }
  13224. },
  13225. targetMouseenterEvent: function targetMouseenterEvent() {
  13226. var $xeTooltip = this;
  13227. var props = $xeTooltip;
  13228. var reactData = $xeTooltip.reactData;
  13229. $xeTooltip.handleVisible(reactData.target || $xeTooltip.getSelectorEl(), props.content);
  13230. },
  13231. targetMouseleaveEvent: function targetMouseleaveEvent() {
  13232. var $xeTooltip = this;
  13233. var props = $xeTooltip;
  13234. var reactData = $xeTooltip.reactData;
  13235. var trigger = props.trigger,
  13236. enterable = props.enterable,
  13237. leaveDelay = props.leaveDelay;
  13238. reactData.tipActive = false;
  13239. if (enterable && trigger === 'hover') {
  13240. setTimeout(function () {
  13241. if (!reactData.tipActive) {
  13242. $xeTooltip.close();
  13243. }
  13244. }, leaveDelay);
  13245. } else {
  13246. $xeTooltip.close();
  13247. }
  13248. },
  13249. wrapperMouseenterEvent: function wrapperMouseenterEvent() {
  13250. var $xeTooltip = this;
  13251. var reactData = $xeTooltip.reactData;
  13252. reactData.tipActive = true;
  13253. },
  13254. wrapperMouseleaveEvent: function wrapperMouseleaveEvent() {
  13255. var $xeTooltip = this;
  13256. var props = $xeTooltip;
  13257. var reactData = $xeTooltip.reactData;
  13258. var trigger = props.trigger,
  13259. enterable = props.enterable,
  13260. leaveDelay = props.leaveDelay;
  13261. reactData.tipActive = false;
  13262. if (enterable && trigger === 'hover') {
  13263. setTimeout(function () {
  13264. if (!reactData.tipActive) {
  13265. $xeTooltip.close();
  13266. }
  13267. }, leaveDelay);
  13268. }
  13269. },
  13270. showTip: function showTip() {
  13271. var $xeTooltip = this;
  13272. var props = $xeTooltip;
  13273. var reactData = $xeTooltip.reactData;
  13274. var tipStore = reactData.tipStore;
  13275. var el = $xeTooltip.$refs.refElem;
  13276. if (el) {
  13277. var parentNode = el.parentNode;
  13278. if (!parentNode) {
  13279. document.body.appendChild(el);
  13280. }
  13281. }
  13282. $xeTooltip.updateValue(true);
  13283. $xeTooltip.updateZindex();
  13284. tipStore.placement = 'top';
  13285. tipStore.style = {
  13286. width: 'auto',
  13287. left: 0,
  13288. top: 0,
  13289. zIndex: props.zIndex || reactData.tipZindex
  13290. };
  13291. tipStore.arrowStyle = {
  13292. left: '50%'
  13293. };
  13294. return $xeTooltip.updatePlacement();
  13295. },
  13296. handleDelayFn: function handleDelayFn() {
  13297. var $xeTooltip = this;
  13298. var props = $xeTooltip;
  13299. var reactData = $xeTooltip.reactData;
  13300. var internalData = $xeTooltip.internalData;
  13301. internalData.showDelayTip = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(function () {
  13302. if (reactData.tipActive) {
  13303. $xeTooltip.showTip();
  13304. }
  13305. }, props.enterDelay, {
  13306. leading: false,
  13307. trailing: true
  13308. });
  13309. },
  13310. handleVisible: function handleVisible(target, content) {
  13311. var $xeTooltip = this;
  13312. var props = $xeTooltip;
  13313. var slots = $xeTooltip.$scopedSlots;
  13314. var reactData = $xeTooltip.reactData;
  13315. var internalData = $xeTooltip.internalData;
  13316. var contentSlot = slots.content;
  13317. if (!contentSlot && (content === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(content))) {
  13318. return $xeTooltip.$nextTick();
  13319. }
  13320. if (target) {
  13321. var showDelayTip = internalData.showDelayTip;
  13322. var trigger = props.trigger,
  13323. enterDelay = props.enterDelay;
  13324. reactData.tipActive = true;
  13325. reactData.tipTarget = target;
  13326. reactData.tipContent = content;
  13327. if (enterDelay && trigger === 'hover') {
  13328. if (showDelayTip) {
  13329. showDelayTip();
  13330. }
  13331. } else {
  13332. return $xeTooltip.showTip();
  13333. }
  13334. }
  13335. return $xeTooltip.$nextTick();
  13336. },
  13337. wheelEvent: function wheelEvent(evnt) {
  13338. evnt.stopPropagation();
  13339. },
  13340. //
  13341. // Render
  13342. //
  13343. renderContent: function renderContent(h) {
  13344. var $xeTooltip = this;
  13345. var props = $xeTooltip;
  13346. var slots = $xeTooltip.$scopedSlots;
  13347. var reactData = $xeTooltip.reactData;
  13348. var useHTML = props.useHTML;
  13349. var tipContent = reactData.tipContent;
  13350. var wrapperStyle = $xeTooltip.computeWrapperStyle;
  13351. var contentSlot = slots.content;
  13352. var contVNs = [];
  13353. if (contentSlot) {
  13354. contVNs.push(h('div', {
  13355. key: 1
  13356. }, vn_getSlotVNs(contentSlot({}))));
  13357. } else if (useHTML) {
  13358. contVNs.push(h('div', {
  13359. key: 2,
  13360. props: {
  13361. innerHTML: tipContent
  13362. }
  13363. }));
  13364. } else {
  13365. contVNs.push(h('span', {
  13366. key: 3
  13367. }, "".concat(tipContent)));
  13368. }
  13369. return h('div', {
  13370. key: 3,
  13371. ref: 'contentWrapperfElem',
  13372. class: 'vxe-tooltip--content',
  13373. style: wrapperStyle
  13374. }, contVNs);
  13375. },
  13376. renderVN: function renderVN(h) {
  13377. var $xeTooltip = this;
  13378. var props = $xeTooltip;
  13379. var slots = $xeTooltip.$scopedSlots;
  13380. var reactData = $xeTooltip.reactData;
  13381. var popupClassName = props.popupClassName,
  13382. theme = props.theme,
  13383. isArrow = props.isArrow,
  13384. enterable = props.enterable;
  13385. var tipActive = reactData.tipActive,
  13386. visible = reactData.visible,
  13387. tipStore = reactData.tipStore;
  13388. var defaultSlot = slots.default;
  13389. var vSize = $xeTooltip.computeSize;
  13390. var ons;
  13391. if (enterable) {
  13392. ons = {
  13393. mouseenter: $xeTooltip.wrapperMouseenterEvent,
  13394. mouseleave: $xeTooltip.wrapperMouseleaveEvent
  13395. };
  13396. }
  13397. return h('div', {
  13398. ref: 'refElem',
  13399. class: ['vxe-tooltip--wrapper', "theme--".concat(theme), popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  13400. $tooltip: $xeTooltip
  13401. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "placement--".concat(tipStore.placement), tipStore.placement), 'is--enterable', enterable), 'is--visible', visible), 'is--arrow', isArrow), 'is--active', tipActive)],
  13402. style: tipStore.style,
  13403. on: ons
  13404. }, [$xeTooltip.renderContent(h), h('div', {
  13405. class: 'vxe-tooltip--arrow',
  13406. style: tipStore.arrowStyle
  13407. })].concat(_toConsumableArray(defaultSlot ? vn_getSlotVNs(defaultSlot({})) : [])));
  13408. }
  13409. },
  13410. watch: {
  13411. content: function content(val) {
  13412. var $xeTooltip = this;
  13413. var reactData = $xeTooltip.reactData;
  13414. reactData.tipContent = val;
  13415. },
  13416. value: function value(val) {
  13417. var $xeTooltip = this;
  13418. var props = $xeTooltip;
  13419. var reactData = $xeTooltip.reactData;
  13420. if (!reactData.isUpdate) {
  13421. if (val) {
  13422. $xeTooltip.handleVisible(reactData.target || $xeTooltip.getSelectorEl(), props.content);
  13423. } else {
  13424. $xeTooltip.close();
  13425. }
  13426. }
  13427. reactData.isUpdate = false;
  13428. },
  13429. enterDelay: function enterDelay() {
  13430. var $xeTooltip = this;
  13431. $xeTooltip.handleDelayFn();
  13432. }
  13433. },
  13434. created: function created() {
  13435. var $xeTooltip = this;
  13436. $xeTooltip.handleDelayFn();
  13437. },
  13438. mounted: function mounted() {
  13439. var $xeTooltip = this;
  13440. var props = $xeTooltip;
  13441. var reactData = $xeTooltip.reactData;
  13442. var contentWrapperfEl = $xeTooltip.$refs.contentWrapperfElem;
  13443. if (contentWrapperfEl) {
  13444. contentWrapperfEl.addEventListener('wheel', $xeTooltip.wheelEvent, {
  13445. passive: false
  13446. });
  13447. }
  13448. $xeTooltip.$nextTick(function () {
  13449. var trigger = props.trigger,
  13450. content = props.content;
  13451. var wrapperElem = $xeTooltip.$refs.refElem;
  13452. if (wrapperElem) {
  13453. var parentNode = wrapperElem.parentNode;
  13454. if (parentNode) {
  13455. reactData.tipContent = content;
  13456. reactData.tipZindex = nextZIndex();
  13457. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(wrapperElem.children, function (elem, index) {
  13458. if (index > 1) {
  13459. parentNode.insertBefore(elem, wrapperElem);
  13460. if (!reactData.target) {
  13461. reactData.target = elem;
  13462. }
  13463. }
  13464. });
  13465. parentNode.removeChild(wrapperElem);
  13466. var target = reactData.target;
  13467. if (target) {
  13468. if (trigger === 'hover') {
  13469. target.onmouseenter = $xeTooltip.targetMouseenterEvent;
  13470. target.onmouseleave = $xeTooltip.targetMouseleaveEvent;
  13471. } else if (trigger === 'click') {
  13472. target.onclick = $xeTooltip.clickEvent;
  13473. }
  13474. }
  13475. if (props.value) {
  13476. $xeTooltip.handleVisible(target || $xeTooltip.getSelectorEl(), content);
  13477. }
  13478. }
  13479. }
  13480. });
  13481. },
  13482. beforeDestroy: function beforeDestroy() {
  13483. var $xeTooltip = this;
  13484. var reactData = $xeTooltip.reactData;
  13485. var target = reactData.target;
  13486. var wrapperElem = $xeTooltip.$refs.refElem;
  13487. if (target) {
  13488. target.onmouseenter = null;
  13489. target.onmouseleave = null;
  13490. target.onclick = null;
  13491. }
  13492. var contentWrapperfEl = $xeTooltip.$refs.contentWrapperfElem;
  13493. if (contentWrapperfEl) {
  13494. contentWrapperfEl.removeEventListener('wheel', $xeTooltip.wheelEvent);
  13495. }
  13496. if (wrapperElem) {
  13497. var parentNode = wrapperElem.parentNode;
  13498. if (parentNode) {
  13499. parentNode.removeChild(wrapperElem);
  13500. }
  13501. }
  13502. },
  13503. render: function render(h) {
  13504. return this.renderVN(h);
  13505. }
  13506. })); /* define-vxe-component end */
  13507. ;// CONCATENATED MODULE: ./packages/button/src/button.ts
  13508. /* harmony default export */ var src_button = (/* define-vxe-component start */defineVxeComponent({
  13509. name: 'VxeButton',
  13510. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  13511. props: {
  13512. /**
  13513. * 按钮类型
  13514. */
  13515. type: String,
  13516. mode: String,
  13517. className: [String, Function],
  13518. popupClassName: [String, Function],
  13519. /**
  13520. * 按钮尺寸
  13521. */
  13522. size: {
  13523. type: String,
  13524. default: function _default() {
  13525. return getConfig().button.size || getConfig().size;
  13526. }
  13527. },
  13528. zIndex: Number,
  13529. /**
  13530. * 用来标识这一项
  13531. */
  13532. name: [String, Number],
  13533. routerLink: Object,
  13534. /**
  13535. * 权限码
  13536. */
  13537. permissionCode: [String, Number],
  13538. /**
  13539. * 按钮内容
  13540. */
  13541. content: String,
  13542. /**
  13543. * 固定显示下拉面板的方向
  13544. */
  13545. placement: String,
  13546. /**
  13547. * 按钮状态
  13548. */
  13549. status: String,
  13550. /**
  13551. * 标题
  13552. */
  13553. title: String,
  13554. /**
  13555. * 按钮的前缀图标,属于 prefix-icon 的简写
  13556. */
  13557. icon: String,
  13558. iconRender: Object,
  13559. /**
  13560. * 按钮的前缀图标
  13561. */
  13562. prefixIcon: String,
  13563. prefixRender: Object,
  13564. /**
  13565. * 按钮的后缀图标
  13566. */
  13567. suffixIcon: String,
  13568. suffixRender: Object,
  13569. /**
  13570. * 圆角边框
  13571. */
  13572. round: Boolean,
  13573. /**
  13574. * 圆角按钮
  13575. */
  13576. circle: Boolean,
  13577. /**
  13578. * 是否禁用
  13579. */
  13580. disabled: Boolean,
  13581. /**
  13582. * 是否加载中
  13583. */
  13584. loading: Boolean,
  13585. trigger: {
  13586. type: String,
  13587. default: function _default() {
  13588. return getConfig().button.trigger;
  13589. }
  13590. },
  13591. align: String,
  13592. prefixTooltip: Object,
  13593. suffixTooltip: Object,
  13594. options: Array,
  13595. /**
  13596. * 在下拉面板关闭时销毁内容
  13597. */
  13598. destroyOnClose: {
  13599. type: Boolean,
  13600. default: function _default() {
  13601. return getConfig().button.destroyOnClose;
  13602. }
  13603. },
  13604. /**
  13605. * 是否将弹框容器插入于 body 内
  13606. */
  13607. transfer: {
  13608. type: Boolean,
  13609. default: null
  13610. }
  13611. },
  13612. inject: {
  13613. $xeModal: {
  13614. default: null
  13615. },
  13616. $xeDrawer: {
  13617. default: null
  13618. },
  13619. $xeTable: {
  13620. default: null
  13621. },
  13622. $xeForm: {
  13623. default: null
  13624. },
  13625. $xeButtonGroup: {
  13626. default: null
  13627. }
  13628. },
  13629. data: function data() {
  13630. var reactData = {
  13631. initialized: false,
  13632. visiblePanel: false,
  13633. isAniVisible: false,
  13634. isActivated: false,
  13635. panelIndex: 0,
  13636. panelStyle: {},
  13637. panelPlacement: ''
  13638. };
  13639. var internalData = {
  13640. showTime: undefined
  13641. };
  13642. return {
  13643. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  13644. reactData: reactData,
  13645. internalData: internalData
  13646. };
  13647. },
  13648. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  13649. computeBtnTransfer: function computeBtnTransfer() {
  13650. var $xeButton = this;
  13651. var props = $xeButton;
  13652. var transfer = props.transfer;
  13653. var $xeTable = $xeButton.$xeTable;
  13654. var $xeModal = $xeButton.$xeModal;
  13655. var $xeDrawer = $xeButton.$xeDrawer;
  13656. var $xeForm = $xeButton.$xeForm;
  13657. if (transfer === null) {
  13658. var globalTransfer = getConfig().button.transfer;
  13659. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  13660. return globalTransfer;
  13661. }
  13662. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  13663. return true;
  13664. }
  13665. }
  13666. return transfer;
  13667. },
  13668. computeBtnDisabled: function computeBtnDisabled() {
  13669. var $xeButton = this;
  13670. var props = $xeButton;
  13671. var disabled = props.disabled;
  13672. var permissionInfo = $xeButton.computePermissionInfo;
  13673. return disabled || permissionInfo.disabled;
  13674. },
  13675. computeIsFormBtn: function computeIsFormBtn() {
  13676. var $xeButton = this;
  13677. var props = $xeButton;
  13678. var type = props.type;
  13679. if (type) {
  13680. return ['submit', 'reset', 'button'].indexOf(type) > -1;
  13681. }
  13682. return false;
  13683. },
  13684. computeBtnMode: function computeBtnMode() {
  13685. var $xeButton = this;
  13686. var props = $xeButton;
  13687. var type = props.type,
  13688. mode = props.mode;
  13689. var $xeButtonGroup = $xeButton.$xeButtonGroup;
  13690. if (mode === 'text' || type === 'text' || $xeButtonGroup && $xeButtonGroup.mode === 'text') {
  13691. return 'text';
  13692. }
  13693. return 'button';
  13694. },
  13695. computeBtnStatus: function computeBtnStatus() {
  13696. var $xeButton = this;
  13697. var props = $xeButton;
  13698. var status = props.status;
  13699. var $xeButtonGroup = $xeButton.$xeButtonGroup;
  13700. if (status) {
  13701. return status;
  13702. }
  13703. if ($xeButtonGroup) {
  13704. return $xeButtonGroup.status;
  13705. }
  13706. return '';
  13707. },
  13708. computeBtnRound: function computeBtnRound() {
  13709. var $xeButton = this;
  13710. var props = $xeButton;
  13711. var round = props.round;
  13712. var $xeButtonGroup = $xeButton.$xeButtonGroup;
  13713. if (round) {
  13714. return round;
  13715. }
  13716. if ($xeButtonGroup) {
  13717. return $xeButtonGroup.round;
  13718. }
  13719. return false;
  13720. },
  13721. computeBtnAlign: function computeBtnAlign() {
  13722. var $xeButton = this;
  13723. var props = $xeButton;
  13724. var align = props.align;
  13725. var $xeButtonGroup = $xeButton.$xeButtonGroup;
  13726. if (align) {
  13727. return align;
  13728. }
  13729. if ($xeButtonGroup) {
  13730. return $xeButtonGroup.align;
  13731. }
  13732. return false;
  13733. },
  13734. computeBtnCircle: function computeBtnCircle() {
  13735. var $xeButton = this;
  13736. var props = $xeButton;
  13737. var circle = props.circle;
  13738. var $xeButtonGroup = $xeButton.$xeButtonGroup;
  13739. if (circle) {
  13740. return circle;
  13741. }
  13742. if ($xeButtonGroup) {
  13743. return $xeButtonGroup.circle;
  13744. }
  13745. return false;
  13746. },
  13747. computeDownBtnList: function computeDownBtnList() {
  13748. var $xeButton = this;
  13749. var props = $xeButton;
  13750. var options = props.options;
  13751. if (options) {
  13752. return options.filter(function (item) {
  13753. var permissionCode = item.permissionCode;
  13754. return !permissionCode || permission.checkVisible(permissionCode);
  13755. });
  13756. }
  13757. return [];
  13758. },
  13759. computePrefixTipOpts: function computePrefixTipOpts() {
  13760. var $xeButton = this;
  13761. var props = $xeButton;
  13762. return Object.assign({}, getConfig().button.prefixTooltip, props.prefixTooltip);
  13763. },
  13764. computeSuffixTipOpts: function computeSuffixTipOpts() {
  13765. var $xeButton = this;
  13766. var props = $xeButton;
  13767. return Object.assign({}, getConfig().button.suffixTooltip, props.suffixTooltip);
  13768. }
  13769. }),
  13770. methods: {
  13771. //
  13772. // methods
  13773. //
  13774. dispatchEvent: function dispatchEvent(type, params, evnt) {
  13775. var $xeButton = this;
  13776. $xeButton.$emit(getEventCaseName($xeButton, type), createEvent(evnt, {
  13777. $button: $xeButton
  13778. }, params));
  13779. },
  13780. openPanel: function openPanel() {
  13781. var $xeButton = this;
  13782. var props = $xeButton;
  13783. var reactData = $xeButton.reactData;
  13784. var internalData = $xeButton.internalData;
  13785. var trigger = props.trigger;
  13786. var btnTransfer = $xeButton.computeBtnTransfer;
  13787. var panelElem = $xeButton.$refs.refBtnPanel;
  13788. if (panelElem) {
  13789. panelElem.dataset.active = 'Y';
  13790. if (!reactData.initialized) {
  13791. reactData.initialized = true;
  13792. if (btnTransfer) {
  13793. document.body.appendChild(panelElem);
  13794. }
  13795. }
  13796. internalData.showTime = setTimeout(function () {
  13797. if (panelElem.dataset.active === 'Y') {
  13798. $xeButton.mouseenterDropdownEvent();
  13799. } else {
  13800. reactData.isAniVisible = false;
  13801. }
  13802. }, trigger === 'click' ? 50 : 250);
  13803. }
  13804. return $xeButton.$nextTick();
  13805. },
  13806. closePanel: function closePanel() {
  13807. var $xeButton = this;
  13808. return $xeButton.hidePanel();
  13809. },
  13810. hidePanel: function hidePanel() {
  13811. var $xeButton = this;
  13812. var reactData = $xeButton.reactData;
  13813. var internalData = $xeButton.internalData;
  13814. var panelElem = $xeButton.$refs.refBtnPanel;
  13815. clearTimeout(internalData.showTime);
  13816. if (panelElem) {
  13817. panelElem.dataset.active = 'N';
  13818. setTimeout(function () {
  13819. if (panelElem.dataset.active !== 'Y') {
  13820. reactData.visiblePanel = false;
  13821. setTimeout(function () {
  13822. if (panelElem.dataset.active !== 'Y') {
  13823. reactData.isAniVisible = false;
  13824. }
  13825. }, 350);
  13826. }
  13827. }, 100);
  13828. } else {
  13829. reactData.isAniVisible = false;
  13830. reactData.visiblePanel = false;
  13831. }
  13832. return $xeButton.$nextTick();
  13833. },
  13834. focus: function focus() {
  13835. var $xeButton = this;
  13836. var btnElem = $xeButton.$refs.refButton;
  13837. if (btnElem) {
  13838. btnElem.focus();
  13839. }
  13840. return $xeButton.$nextTick();
  13841. },
  13842. blur: function blur() {
  13843. var $xeButton = this;
  13844. var btnElem = $xeButton.$refs.refButton;
  13845. if (btnElem) {
  13846. btnElem.blur();
  13847. }
  13848. return $xeButton.$nextTick();
  13849. },
  13850. //
  13851. // privateMethods
  13852. //
  13853. updateZindex: function updateZindex() {
  13854. var $xeButton = this;
  13855. var props = $xeButton;
  13856. var reactData = $xeButton.reactData;
  13857. var zIndex = props.zIndex;
  13858. if (zIndex) {
  13859. reactData.panelIndex = zIndex;
  13860. } else if (reactData.panelIndex < getLastZIndex()) {
  13861. reactData.panelIndex = nextZIndex();
  13862. }
  13863. },
  13864. updatePlacement: function updatePlacement() {
  13865. var $xeButton = this;
  13866. var props = $xeButton;
  13867. var reactData = $xeButton.reactData;
  13868. var placement = props.placement;
  13869. var panelIndex = reactData.panelIndex;
  13870. var targetElem = $xeButton.$refs.refButton;
  13871. var panelElem = $xeButton.$refs.refBtnPanel;
  13872. var btnTransfer = $xeButton.computeBtnTransfer;
  13873. var handleStyle = function handleStyle() {
  13874. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  13875. placement: placement,
  13876. teleportTo: btnTransfer
  13877. });
  13878. var panelStyle = Object.assign(ppObj.style, {
  13879. zIndex: panelIndex
  13880. });
  13881. reactData.panelStyle = panelStyle;
  13882. reactData.panelPlacement = ppObj.placement;
  13883. };
  13884. handleStyle();
  13885. return $xeButton.$nextTick().then(handleStyle);
  13886. },
  13887. clickEvent: function clickEvent(evnt) {
  13888. var $xeButton = this;
  13889. var props = $xeButton;
  13890. var $xeButtonGroup = $xeButton.$xeButtonGroup;
  13891. if ($xeButtonGroup) {
  13892. $xeButtonGroup.handleClick({
  13893. name: props.name
  13894. }, evnt);
  13895. }
  13896. $xeButton.dispatchEvent('click', {
  13897. $event: evnt
  13898. }, evnt);
  13899. },
  13900. downBtnClickEvent: function downBtnClickEvent(params, option) {
  13901. var $xeButton = this;
  13902. var $event = params.$event;
  13903. $xeButton.hidePanel();
  13904. $xeButton.dispatchEvent('dropdown-click', {
  13905. name: option.name,
  13906. option: option
  13907. }, $event);
  13908. },
  13909. mousedownDropdownEvent: function mousedownDropdownEvent(evnt) {
  13910. var isLeftBtn = evnt.button === 0;
  13911. if (isLeftBtn) {
  13912. evnt.stopPropagation();
  13913. }
  13914. },
  13915. clickDropdownEvent: function clickDropdownEvent(evnt) {
  13916. var $xeButton = this;
  13917. var reactData = $xeButton.reactData;
  13918. var dropdownElem = evnt.currentTarget;
  13919. var panelElem = $xeButton.$refs.refBtnPanel;
  13920. var _getEventTargetNode = getEventTargetNode(evnt, dropdownElem, 'vxe-button'),
  13921. flag = _getEventTargetNode.flag,
  13922. targetElem = _getEventTargetNode.targetElem;
  13923. if (flag) {
  13924. if (panelElem) {
  13925. panelElem.dataset.active = 'N';
  13926. }
  13927. reactData.visiblePanel = false;
  13928. setTimeout(function () {
  13929. if (!panelElem || panelElem.dataset.active !== 'Y') {
  13930. reactData.isAniVisible = false;
  13931. }
  13932. }, 350);
  13933. $xeButton.dispatchEvent('dropdown-click', {
  13934. name: targetElem.getAttribute('name'),
  13935. option: null,
  13936. $event: evnt
  13937. }, evnt);
  13938. }
  13939. },
  13940. mouseenterDropdownEvent: function mouseenterDropdownEvent() {
  13941. var $xeButton = this;
  13942. var reactData = $xeButton.reactData;
  13943. var panelElem = $xeButton.$refs.refBtnPanel;
  13944. if (panelElem) {
  13945. panelElem.dataset.active = 'Y';
  13946. reactData.isAniVisible = true;
  13947. setTimeout(function () {
  13948. if (panelElem.dataset.active === 'Y') {
  13949. reactData.visiblePanel = true;
  13950. $xeButton.updateZindex();
  13951. $xeButton.updatePlacement();
  13952. setTimeout(function () {
  13953. if (reactData.visiblePanel) {
  13954. $xeButton.updatePlacement();
  13955. }
  13956. }, 50);
  13957. }
  13958. }, 20);
  13959. }
  13960. },
  13961. mouseenterTargetEvent: function mouseenterTargetEvent(evnt) {
  13962. var $xeButton = this;
  13963. var props = $xeButton;
  13964. var loading = props.loading;
  13965. var btnDisabled = $xeButton.computeBtnDisabled;
  13966. if (!(btnDisabled || loading)) {
  13967. $xeButton.openPanel();
  13968. $xeButton.mouseenterEvent(evnt);
  13969. }
  13970. },
  13971. mouseleaveTargetEvent: function mouseleaveTargetEvent(evnt) {
  13972. var $xeButton = this;
  13973. $xeButton.hidePanel();
  13974. $xeButton.mouseleaveEvent(evnt);
  13975. },
  13976. mouseenterEvent: function mouseenterEvent(evnt) {
  13977. var $xeButton = this;
  13978. $xeButton.dispatchEvent('mouseenter', {}, evnt);
  13979. },
  13980. mouseleaveEvent: function mouseleaveEvent(evnt) {
  13981. var $xeButton = this;
  13982. $xeButton.dispatchEvent('mouseleave', {}, evnt);
  13983. },
  13984. clickTargetEvent: function clickTargetEvent(evnt) {
  13985. var $xeButton = this;
  13986. var props = $xeButton;
  13987. var reactData = $xeButton.reactData;
  13988. var loading = props.loading;
  13989. var btnDisabled = $xeButton.computeBtnDisabled;
  13990. if (!(btnDisabled || loading)) {
  13991. var trigger = props.trigger;
  13992. if (trigger === 'click') {
  13993. if (reactData.visiblePanel) {
  13994. $xeButton.hidePanel();
  13995. } else {
  13996. $xeButton.openPanel();
  13997. }
  13998. }
  13999. $xeButton.clickEvent(evnt);
  14000. }
  14001. },
  14002. mouseleaveDropdownEvent: function mouseleaveDropdownEvent() {
  14003. var $xeButton = this;
  14004. $xeButton.hidePanel();
  14005. },
  14006. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  14007. var $xeButton = this;
  14008. var reactData = $xeButton.reactData;
  14009. var panelElem = $xeButton.$refs.refBtnPanel;
  14010. if (reactData.visiblePanel && !getEventTargetNode(evnt, panelElem).flag) {
  14011. $xeButton.hidePanel();
  14012. }
  14013. },
  14014. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  14015. var $xeButton = this;
  14016. var reactData = $xeButton.reactData;
  14017. var btnDisabled = $xeButton.computeBtnDisabled;
  14018. var visiblePanel = reactData.visiblePanel;
  14019. if (!btnDisabled) {
  14020. var el = $xeButton.$refs.refElem;
  14021. var panelElem = $xeButton.$refs.refBtnPanel;
  14022. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  14023. if (visiblePanel && !reactData.isActivated) {
  14024. $xeButton.hidePanel();
  14025. }
  14026. }
  14027. },
  14028. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  14029. var $xeButton = this;
  14030. var reactData = $xeButton.reactData;
  14031. var visiblePanel = reactData.visiblePanel;
  14032. if (visiblePanel) {
  14033. $xeButton.updatePlacement();
  14034. }
  14035. },
  14036. //
  14037. // Render
  14038. //
  14039. renderTooltipIcon: function renderTooltipIcon(h, tipOpts, type) {
  14040. return h(tooltip, {
  14041. props: {
  14042. useHTML: tipOpts.useHTML,
  14043. content: tipOpts.content,
  14044. enterable: tipOpts.enterable,
  14045. theme: tipOpts.theme
  14046. },
  14047. scopedSlots: {
  14048. default: function _default() {
  14049. return h('span', {
  14050. class: "vxe-button--item vxe-button--tooltip-".concat(type, "-icon")
  14051. }, [h('i', {
  14052. class: tipOpts.icon || getIcon().BUTTON_TOOLTIP_ICON
  14053. })]);
  14054. }
  14055. }
  14056. });
  14057. },
  14058. renderContent: function renderContent(h) {
  14059. var $xeButton = this;
  14060. var props = $xeButton;
  14061. var slots = $xeButton.$scopedSlots;
  14062. var content = props.content,
  14063. suffixIcon = props.suffixIcon,
  14064. loading = props.loading,
  14065. prefixTooltip = props.prefixTooltip,
  14066. suffixTooltip = props.suffixTooltip,
  14067. suffixRender = props.suffixRender;
  14068. var prefixIcon = props.prefixIcon || props.icon;
  14069. var prefixRender = props.prefixRender || props.iconRender;
  14070. var prefixTipOpts = $xeButton.computePrefixTipOpts;
  14071. var suffixTipOpts = $xeButton.computeSuffixTipOpts;
  14072. var prefixIconSlot = slots.prefix || slots.icon;
  14073. var suffixIconSlot = slots.suffix;
  14074. var defaultSlot = slots.default;
  14075. var contVNs = [];
  14076. if (prefixTooltip) {
  14077. contVNs.push($xeButton.renderTooltipIcon(h, prefixTipOpts, 'prefix'));
  14078. }
  14079. if (loading) {
  14080. contVNs.push(h('i', {
  14081. class: ['vxe-button--item vxe-button--loading-icon', getIcon().BUTTON_LOADING]
  14082. }));
  14083. } else if (prefixIconSlot) {
  14084. contVNs.push(h('span', {
  14085. class: 'vxe-button--item vxe-button--custom-prefix-icon'
  14086. }, prefixIconSlot.call($xeButton, {})));
  14087. } else if (prefixRender) {
  14088. var compConf = renderer.get(prefixRender.name);
  14089. var pIconMethod = compConf ? compConf.renderButtonPrefix : null;
  14090. contVNs.push(h('span', {
  14091. class: ['vxe-button--item vxe-button--custom-prefix-icon']
  14092. }, pIconMethod ? vn_getSlotVNs(pIconMethod.call($xeButton, h, prefixRender, {
  14093. $button: $xeButton
  14094. })) : []));
  14095. } else if (prefixIcon) {
  14096. contVNs.push(h('i', {
  14097. class: ['vxe-button--item vxe-button--prefix-icon', prefixIcon]
  14098. }));
  14099. }
  14100. if (defaultSlot) {
  14101. contVNs.push(h('span', {
  14102. class: 'vxe-button--item vxe-button--content'
  14103. }, defaultSlot.call($xeButton, {})));
  14104. } else if (content) {
  14105. contVNs.push(h('span', {
  14106. class: 'vxe-button--item vxe-button--content'
  14107. }, getFuncText(content)));
  14108. }
  14109. if (suffixIconSlot) {
  14110. contVNs.push(h('span', {
  14111. class: 'vxe-button--item vxe-button--custom-suffix-icon'
  14112. }, suffixIconSlot.call($xeButton, {})));
  14113. } else if (suffixRender) {
  14114. var _compConf = renderer.get(suffixRender.name);
  14115. var sIconMethod = _compConf ? _compConf.renderButtonSuffix : null;
  14116. contVNs.push(h('span', {
  14117. class: ['vxe-button--item vxe-button--custom-suffix-icon']
  14118. }, sIconMethod ? vn_getSlotVNs(sIconMethod.call($xeButton, h, suffixRender, {
  14119. $button: $xeButton
  14120. })) : []));
  14121. } else if (suffixIcon) {
  14122. contVNs.push(h('i', {
  14123. class: ['vxe-button--item vxe-button--suffix-icon', suffixIcon]
  14124. }));
  14125. }
  14126. if (suffixTooltip) {
  14127. contVNs.push($xeButton.renderTooltipIcon(h, suffixTipOpts, 'suffix'));
  14128. }
  14129. return contVNs;
  14130. },
  14131. renderVN: function renderVN(h) {
  14132. var $xeButton = this;
  14133. var props = $xeButton;
  14134. var slots = $xeButton.$scopedSlots;
  14135. var reactData = $xeButton.reactData;
  14136. var className = props.className,
  14137. popupClassName = props.popupClassName,
  14138. trigger = props.trigger,
  14139. title = props.title,
  14140. routerLink = props.routerLink,
  14141. type = props.type,
  14142. destroyOnClose = props.destroyOnClose,
  14143. name = props.name,
  14144. loading = props.loading;
  14145. var initialized = reactData.initialized,
  14146. isAniVisible = reactData.isAniVisible,
  14147. visiblePanel = reactData.visiblePanel;
  14148. var isFormBtn = $xeButton.computeIsFormBtn;
  14149. var btnMode = $xeButton.computeBtnMode;
  14150. var btnStatus = $xeButton.computeBtnStatus;
  14151. var btnRound = $xeButton.computeBtnRound;
  14152. var btnCircle = $xeButton.computeBtnCircle;
  14153. var btnTransfer = $xeButton.computeBtnTransfer;
  14154. var btnAlign = $xeButton.computeBtnAlign;
  14155. var btnDisabled = $xeButton.computeBtnDisabled;
  14156. var permissionInfo = $xeButton.computePermissionInfo;
  14157. var downBtnList = $xeButton.computeDownBtnList;
  14158. var vSize = $xeButton.computeSize;
  14159. var dropdownsSlot = slots.dropdowns;
  14160. if (!permissionInfo.visible) {
  14161. return renderEmptyElement($xeButton);
  14162. }
  14163. if (dropdownsSlot || downBtnList.length) {
  14164. var btnOns = {};
  14165. var panelOns = {};
  14166. if (trigger === 'hover') {
  14167. // hover 触发
  14168. btnOns.mouseenter = $xeButton.mouseenterTargetEvent;
  14169. btnOns.mouseleave = $xeButton.mouseleaveTargetEvent;
  14170. panelOns.mouseenter = $xeButton.mouseenterDropdownEvent;
  14171. panelOns.mouseleave = $xeButton.mouseleaveDropdownEvent;
  14172. }
  14173. return h('div', {
  14174. ref: 'refElem',
  14175. class: ['vxe-button--dropdown', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  14176. $button: $xeButton
  14177. }) : className : '', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--active', visiblePanel)]
  14178. }, [routerLink ? h('router-link', {
  14179. ref: 'refButton',
  14180. class: ['vxe-button', 'vxe-button--link', "type--".concat(btnMode), btnAlign ? "align--".concat(btnAlign) : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  14181. $button: $xeButton
  14182. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(btnStatus), btnStatus), 'is--round', btnRound), 'is--circle', btnCircle), 'is--disabled', btnDisabled || loading), 'is--loading', loading)],
  14183. attrs: {
  14184. title: title,
  14185. name: name,
  14186. type: isFormBtn ? type : 'button',
  14187. disabled: btnDisabled || loading,
  14188. custom: true,
  14189. to: routerLink
  14190. },
  14191. on: _objectSpread2({
  14192. click: $xeButton.clickTargetEvent
  14193. }, btnOns)
  14194. }, $xeButton.renderContent(h).concat([h('i', {
  14195. class: "vxe-button--dropdown-arrow ".concat(getIcon().BUTTON_DROPDOWN)
  14196. })])) : h('button', {
  14197. ref: 'refButton',
  14198. class: ['vxe-button', "type--".concat(btnMode), btnAlign ? "align--".concat(btnAlign) : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  14199. $button: $xeButton
  14200. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(btnStatus), btnStatus), 'is--round', btnRound), 'is--circle', btnCircle), 'is--disabled', btnDisabled || loading), 'is--loading', loading)],
  14201. attrs: {
  14202. title: title,
  14203. name: name,
  14204. type: isFormBtn ? type : 'button',
  14205. disabled: btnDisabled || loading
  14206. },
  14207. on: _objectSpread2({
  14208. click: $xeButton.clickTargetEvent
  14209. }, btnOns)
  14210. }, $xeButton.renderContent(h).concat([h('i', {
  14211. class: "vxe-button--dropdown-arrow ".concat(getIcon().BUTTON_DROPDOWN)
  14212. })])), h('div', {
  14213. ref: 'refBtnPanel',
  14214. class: ['vxe-button--dropdown-panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  14215. $button: $xeButton
  14216. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', isAniVisible), 'ani--enter', visiblePanel)],
  14217. attrs: {
  14218. placement: reactData.panelPlacement
  14219. },
  14220. style: reactData.panelStyle,
  14221. on: panelOns
  14222. }, initialized && (visiblePanel || isAniVisible) ? [dropdownsSlot ? h('div', {
  14223. class: 'vxe-button--dropdown-wrapper',
  14224. on: {
  14225. mousedown: $xeButton.mousedownDropdownEvent,
  14226. click: $xeButton.clickDropdownEvent
  14227. }
  14228. }, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? dropdownsSlot.call($xeButton, {}) : []) : h('div', {
  14229. class: 'vxe-button--dropdown-wrapper'
  14230. }, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? downBtnList.map(function (option, i) {
  14231. return h('vxe-button', {
  14232. key: i,
  14233. props: {
  14234. type: option.type,
  14235. mode: option.mode || btnMode,
  14236. className: option.className,
  14237. name: option.name,
  14238. routerLink: option.routerLink,
  14239. permissionCode: option.permissionCode,
  14240. title: option.title,
  14241. content: option.content,
  14242. status: option.status,
  14243. icon: option.icon,
  14244. round: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.round) ? option.round : btnMode === 'text' ? false : btnRound,
  14245. circle: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.circle) ? option.circle : btnMode === 'text' ? false : btnCircle,
  14246. disabled: option.disabled,
  14247. loading: option.loading,
  14248. align: option.align
  14249. },
  14250. on: {
  14251. click: function click(params) {
  14252. $xeButton.downBtnClickEvent(params, option);
  14253. }
  14254. }
  14255. });
  14256. }) : [])] : [])]);
  14257. }
  14258. if (routerLink) {
  14259. return h('router-link', {
  14260. ref: 'refButton',
  14261. class: ['vxe-button', 'vxe-button--link', "type--".concat(btnMode), btnAlign ? "align--".concat(btnAlign) : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  14262. $button: $xeButton
  14263. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(btnStatus), btnStatus), 'is--round', btnRound), 'is--circle', btnCircle), 'is--disabled', btnDisabled || loading), 'is--loading', loading)],
  14264. props: {
  14265. title: title,
  14266. name: name,
  14267. type: isFormBtn ? type : 'button',
  14268. disabled: btnDisabled || loading,
  14269. custom: true,
  14270. to: routerLink
  14271. },
  14272. on: {
  14273. click: $xeButton.clickEvent,
  14274. mouseenter: $xeButton.mouseenterEvent,
  14275. mouseleave: $xeButton.mouseleaveEvent
  14276. }
  14277. }, $xeButton.renderContent(h));
  14278. }
  14279. return h('button', {
  14280. ref: 'refButton',
  14281. class: ['vxe-button', "type--".concat(btnMode), btnAlign ? "align--".concat(btnAlign) : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  14282. $button: $xeButton
  14283. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(btnStatus), btnStatus), 'is--round', btnRound), 'is--circle', btnCircle), 'is--disabled', btnDisabled || loading), 'is--loading', loading)],
  14284. attrs: {
  14285. title: title,
  14286. name: name,
  14287. type: isFormBtn ? type : 'button',
  14288. disabled: btnDisabled || loading
  14289. },
  14290. on: {
  14291. click: $xeButton.clickEvent,
  14292. mouseenter: $xeButton.mouseenterEvent,
  14293. mouseleave: $xeButton.mouseleaveEvent
  14294. }
  14295. }, $xeButton.renderContent(h));
  14296. }
  14297. },
  14298. mounted: function mounted() {
  14299. var $xeButton = this;
  14300. var props = $xeButton;
  14301. if (props.type === 'text') {
  14302. warnLog('vxe.error.delProp', ['[button] type=text', 'mode=text']);
  14303. }
  14304. globalEvents.on($xeButton, 'mousewheel', $xeButton.handleGlobalMousewheelEvent);
  14305. globalEvents.on($xeButton, 'mousedown', $xeButton.handleGlobalMousedownEvent);
  14306. globalEvents.on($xeButton, 'resize', $xeButton.handleGlobalResizeEvent);
  14307. },
  14308. beforeDestroy: function beforeDestroy() {
  14309. var $xeButton = this;
  14310. var panelElem = $xeButton.$refs.refBtnPanel;
  14311. if (panelElem && panelElem.parentNode) {
  14312. panelElem.parentNode.removeChild(panelElem);
  14313. }
  14314. },
  14315. destroyed: function destroyed() {
  14316. var $xeButton = this;
  14317. globalEvents.off($xeButton, 'mousewheel');
  14318. globalEvents.off($xeButton, 'mousedown');
  14319. globalEvents.off($xeButton, 'resize');
  14320. },
  14321. render: function render(h) {
  14322. return this.renderVN(h);
  14323. }
  14324. })); /* define-vxe-component end */
  14325. ;// CONCATENATED MODULE: ./packages/button/index.ts
  14326. var VxeButton = Object.assign({}, src_button, {
  14327. install: function install(app) {
  14328. app.component(src_button.name, src_button);
  14329. }
  14330. });
  14331. dynamicApp.use(VxeButton);
  14332. index_esm_VxeUI.component(src_button);
  14333. var Button = VxeButton;
  14334. /* harmony default export */ var packages_button = (VxeButton);
  14335. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
  14336. var es_array_find = __webpack_require__(113);
  14337. ;// CONCATENATED MODULE: ./packages/button/src/button-group.ts
  14338. /* harmony default export */ var button_group = (/* define-vxe-component start */defineVxeComponent({
  14339. name: 'VxeButtonGroup',
  14340. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  14341. props: {
  14342. options: Array,
  14343. mode: String,
  14344. status: String,
  14345. round: Boolean,
  14346. vertical: Boolean,
  14347. circle: Boolean,
  14348. align: String,
  14349. className: [String, Function],
  14350. disabled: Boolean,
  14351. permissionCode: [String, Number],
  14352. size: {
  14353. type: String,
  14354. default: function _default() {
  14355. return getConfig().buttonGroup.size || getConfig().size;
  14356. }
  14357. }
  14358. },
  14359. provide: function provide() {
  14360. var $xeButtonGroup = this;
  14361. return {
  14362. $xeButtonGroup: $xeButtonGroup
  14363. };
  14364. },
  14365. data: function data() {
  14366. var reactData = {};
  14367. return {
  14368. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  14369. reactData: reactData
  14370. };
  14371. },
  14372. computed: _objectSpread2({}, {}),
  14373. methods: {
  14374. // Method
  14375. dispatchEvent: function dispatchEvent(type, params, evnt) {
  14376. var $xeButtonGroup = this;
  14377. $xeButtonGroup.$emit(type, createEvent(evnt, {
  14378. $buttonGroup: $xeButtonGroup
  14379. }, params));
  14380. },
  14381. //
  14382. // Private
  14383. //
  14384. handleClick: function handleClick(params, evnt) {
  14385. var $xeButtonGroup = this;
  14386. var props = $xeButtonGroup;
  14387. var options = props.options;
  14388. var name = params.name;
  14389. var option = options ? options.find(function (item) {
  14390. return item.name === name;
  14391. }) : null;
  14392. $xeButtonGroup.dispatchEvent('click', _objectSpread2(_objectSpread2({}, params), {}, {
  14393. option: option
  14394. }), evnt);
  14395. },
  14396. //
  14397. // Render
  14398. //
  14399. renderVN: function renderVN(h) {
  14400. var $xeButtonGroup = this;
  14401. var props = $xeButtonGroup;
  14402. var slots = $xeButtonGroup.$scopedSlots;
  14403. var className = props.className,
  14404. options = props.options,
  14405. vertical = props.vertical;
  14406. var permissionInfo = $xeButtonGroup.computePermissionInfo;
  14407. var defaultSlot = slots.default;
  14408. if (!permissionInfo.visible) {
  14409. return renderEmptyElement($xeButtonGroup);
  14410. }
  14411. return h('div', {
  14412. class: ['vxe-button-group', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  14413. $buttonGroup: $xeButtonGroup
  14414. }) : className : '', {
  14415. 'is--vertical': vertical
  14416. }]
  14417. }, defaultSlot ? defaultSlot({}) : options ? options.map(function (item, index) {
  14418. return h(src_button, {
  14419. key: index,
  14420. props: item
  14421. });
  14422. }) : []);
  14423. }
  14424. },
  14425. render: function render(h) {
  14426. return this.renderVN(h);
  14427. }
  14428. })); /* define-vxe-component end */
  14429. ;// CONCATENATED MODULE: ./packages/button-group/index.ts
  14430. var VxeButtonGroup = Object.assign({}, button_group, {
  14431. install: function install(app) {
  14432. app.component(button_group.name, button_group);
  14433. }
  14434. });
  14435. dynamicApp.use(VxeButtonGroup);
  14436. index_esm_VxeUI.component(button_group);
  14437. var ButtonGroup = VxeButtonGroup;
  14438. /* harmony default export */ var packages_button_group = (VxeButtonGroup);
  14439. ;// CONCATENATED MODULE: ./packages/date-panel/src/util.ts
  14440. function hasTimestampValueType(valueFormat) {
  14441. return valueFormat === 'timestamp';
  14442. }
  14443. function hasDateValueType(valueFormat) {
  14444. return valueFormat === 'date';
  14445. }
  14446. function handleValueFormat(type, valueFormat) {
  14447. if (valueFormat) {
  14448. if (!(hasDateValueType(valueFormat) || hasTimestampValueType(valueFormat))) {
  14449. return valueFormat;
  14450. }
  14451. }
  14452. if (type === 'time') {
  14453. return 'HH:mm:ss';
  14454. }
  14455. if (type === 'datetime') {
  14456. return 'yyyy-MM-dd HH:mm:ss';
  14457. }
  14458. return 'yyyy-MM-dd';
  14459. }
  14460. function toStringTimeDate(str) {
  14461. var rest = new Date(2e3, 0, 1);
  14462. if (str) {
  14463. var h = 0;
  14464. var m = 0;
  14465. var s = 0;
  14466. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(str) || /^[0-9]{11,15}$/.test("".concat(str))) {
  14467. str = new Date(Number(str));
  14468. }
  14469. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDate(str)) {
  14470. h = str.getHours();
  14471. m = str.getMinutes();
  14472. s = str.getSeconds();
  14473. } else {
  14474. str = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(str);
  14475. var parses = str.match(/^(\d{1,2})(:(\d{1,2}))?(:(\d{1,2}))?/);
  14476. if (parses) {
  14477. h = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(parses[1]);
  14478. m = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(parses[3]);
  14479. s = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(parses[5]);
  14480. }
  14481. }
  14482. rest.setHours(h);
  14483. rest.setMinutes(m);
  14484. rest.setSeconds(s);
  14485. return rest;
  14486. }
  14487. return rest;
  14488. }
  14489. function getDateQuarter(date) {
  14490. var month = date.getMonth();
  14491. if (month < 3) {
  14492. return 1;
  14493. } else if (month < 6) {
  14494. return 2;
  14495. } else if (month < 9) {
  14496. return 3;
  14497. }
  14498. return 4;
  14499. }
  14500. var parseDateValue = function parseDateValue(val, type, options) {
  14501. var valueFormat = options.valueFormat;
  14502. if (val) {
  14503. if (type === 'time') {
  14504. return toStringTimeDate(val);
  14505. }
  14506. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val) || /^[0-9]{10,15}$/.test("".concat(val))) {
  14507. return new Date(Number(val));
  14508. }
  14509. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val)) {
  14510. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().last(val.split(',')), valueFormat);
  14511. }
  14512. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(val, valueFormat);
  14513. }
  14514. return null;
  14515. };
  14516. var parseDateString = function parseDateString(val, type, options) {
  14517. var dValue = parseDateValue(val, type, options);
  14518. return dValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, options.valueFormat) : '';
  14519. };
  14520. function parseDateObj(val, type, options) {
  14521. var labelFormat = options.labelFormat,
  14522. firstDay = options.firstDay;
  14523. var dValue = null;
  14524. var dLabel = '';
  14525. if (val) {
  14526. dValue = parseDateValue(val, type, options);
  14527. }
  14528. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(dValue)) {
  14529. dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, labelFormat, {
  14530. firstDay: firstDay
  14531. });
  14532. // 周选择器,由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年,例如
  14533. // '2024-12-31' 'yyyy-MM-dd W' >> '2024-12-31 1'
  14534. // '2025-01-01' 'yyyy-MM-dd W' >> '2025-01-01 1'
  14535. if (labelFormat && type === 'week') {
  14536. var weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(dValue, firstDay);
  14537. var weekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(dValue, 0, weekNum === 1 ? (6 + firstDay) % 7 : firstDay, firstDay);
  14538. var weekFullYear = weekDate.getFullYear();
  14539. if (weekFullYear !== dValue.getFullYear()) {
  14540. var yyIndex = labelFormat.indexOf('yyyy');
  14541. if (yyIndex > -1) {
  14542. var yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
  14543. if (yyNum && !isNaN(yyNum)) {
  14544. dLabel = dLabel.replace("".concat(yyNum), "".concat(weekFullYear));
  14545. }
  14546. }
  14547. }
  14548. }
  14549. } else {
  14550. dValue = null;
  14551. }
  14552. return {
  14553. label: dLabel,
  14554. value: dValue
  14555. };
  14556. }
  14557. function getDateByCode(code, val, type, options) {
  14558. var valueFormat = options.valueFormat,
  14559. firstDay = options.firstDay;
  14560. var dValue = null;
  14561. var value = (code === 'prev' || code === 'next' ? new Date() : val ? parseDateValue(val, type, options) : null) || new Date();
  14562. switch (code) {
  14563. case 'prev':
  14564. case 'next':
  14565. case 'minus':
  14566. case 'plus':
  14567. {
  14568. var offsetNum = code === 'plus' || code === 'next' ? 1 : -1;
  14569. switch (type) {
  14570. case 'date':
  14571. case 'datetime':
  14572. dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(value, offsetNum);
  14573. break;
  14574. case 'week':
  14575. dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(value, offsetNum, firstDay, firstDay);
  14576. break;
  14577. case 'month':
  14578. dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(value, offsetNum);
  14579. break;
  14580. case 'quarter':
  14581. dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(value, offsetNum);
  14582. break;
  14583. case 'year':
  14584. dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(value, offsetNum);
  14585. break;
  14586. }
  14587. break;
  14588. }
  14589. default:
  14590. dValue = new Date();
  14591. break;
  14592. }
  14593. return {
  14594. value: dValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, valueFormat) : ''
  14595. };
  14596. }
  14597. var rangeDateOffsetNumMaps = {
  14598. last180: -180,
  14599. last90: -90,
  14600. last60: -60,
  14601. last30: -30,
  14602. last7: -7,
  14603. last3: -3,
  14604. last1: -1
  14605. };
  14606. function getRangeDateOffsetNum(code) {
  14607. return rangeDateOffsetNumMaps[code] || 0;
  14608. }
  14609. function getRangeDateByCode(code, val, type, options) {
  14610. var valueFormat = options.valueFormat,
  14611. firstDay = options.firstDay;
  14612. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(val)) {
  14613. val = val.join('');
  14614. }
  14615. var value = (val ? parseDateValue(val, type, options) : null) || new Date();
  14616. var sValue = null;
  14617. var eValue = value;
  14618. switch (code) {
  14619. case 'last1':
  14620. case 'last3':
  14621. case 'last7':
  14622. case 'last30':
  14623. case 'last60':
  14624. case 'last90':
  14625. case 'last180':
  14626. {
  14627. var offsetNum = getRangeDateOffsetNum(code);
  14628. switch (type) {
  14629. case 'date':
  14630. case 'datetime':
  14631. sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(value, offsetNum);
  14632. break;
  14633. case 'week':
  14634. sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(value, offsetNum, firstDay, firstDay);
  14635. break;
  14636. case 'month':
  14637. sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(value, offsetNum);
  14638. break;
  14639. case 'quarter':
  14640. sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(value, offsetNum);
  14641. break;
  14642. case 'year':
  14643. sValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(value, offsetNum);
  14644. break;
  14645. }
  14646. break;
  14647. }
  14648. default:
  14649. sValue = new Date();
  14650. break;
  14651. }
  14652. var startValue = sValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(sValue, valueFormat) : '';
  14653. var endValue = eValue ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(eValue, valueFormat) : '';
  14654. return {
  14655. startValue: startValue,
  14656. endValue: endValue
  14657. };
  14658. }
  14659. ;// CONCATENATED MODULE: ./packages/calendar/src/calendar.ts
  14660. /* harmony default export */ var calendar = (/* define-vxe-component start */defineVxeComponent({
  14661. name: 'VxeCalendar',
  14662. mixins: [globalMixins.sizeMixin],
  14663. props: {
  14664. value: [String, Number, Date],
  14665. type: {
  14666. type: String,
  14667. default: 'date'
  14668. },
  14669. className: String,
  14670. size: {
  14671. type: String,
  14672. default: function _default() {
  14673. return getConfig().calendar.size || getConfig().size;
  14674. }
  14675. },
  14676. multiple: Boolean,
  14677. width: [String, Number],
  14678. height: [String, Number],
  14679. // date、week、month、quarter、year
  14680. minDate: {
  14681. type: [String, Number, Date],
  14682. default: function _default() {
  14683. return getConfig().calendar.minDate;
  14684. }
  14685. },
  14686. maxDate: {
  14687. type: [String, Number, Date],
  14688. default: function _default() {
  14689. return getConfig().calendar.maxDate;
  14690. }
  14691. },
  14692. startDay: {
  14693. type: [String, Number],
  14694. default: function _default() {
  14695. return getConfig().calendar.startDay;
  14696. }
  14697. },
  14698. labelFormat: String,
  14699. valueFormat: String,
  14700. festivalMethod: {
  14701. type: Function,
  14702. default: function _default() {
  14703. return getConfig().calendar.festivalMethod;
  14704. }
  14705. },
  14706. disabledMethod: {
  14707. type: Function,
  14708. default: function _default() {
  14709. return getConfig().calendar.disabledMethod;
  14710. }
  14711. },
  14712. // week
  14713. selectDay: {
  14714. type: [String, Number],
  14715. default: function _default() {
  14716. return getConfig().calendar.selectDay;
  14717. }
  14718. }
  14719. },
  14720. data: function data() {
  14721. var reactData = {
  14722. selectValue: null,
  14723. inputValue: null,
  14724. datePanelValue: null,
  14725. datePanelLabel: '',
  14726. datePanelType: 'day',
  14727. selectMonth: null,
  14728. currentDate: null
  14729. };
  14730. var internalData = {
  14731. yearSize: 12,
  14732. monthSize: 20,
  14733. quarterSize: 8
  14734. };
  14735. return {
  14736. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  14737. reactData: reactData,
  14738. internalData: internalData
  14739. };
  14740. },
  14741. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  14742. computeCalendarStyle: function computeCalendarStyle() {
  14743. var $xeCalendar = this;
  14744. var props = $xeCalendar;
  14745. var height = props.height,
  14746. width = props.width;
  14747. var stys = {};
  14748. if (width) {
  14749. stys.width = toCssUnit(width);
  14750. }
  14751. if (height) {
  14752. stys.height = toCssUnit(height);
  14753. }
  14754. return stys;
  14755. },
  14756. computeIsDisabled: function computeIsDisabled() {
  14757. return false;
  14758. },
  14759. computeIsCalendarType: function computeIsCalendarType() {
  14760. var $xeCalendar = this;
  14761. var props = $xeCalendar;
  14762. return ['date', 'week', 'month', 'quarter', 'year'].includes(props.type);
  14763. },
  14764. computeDateStartTime: function computeDateStartTime() {
  14765. var $xeCalendar = this;
  14766. var props = $xeCalendar;
  14767. return props.minDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.minDate) : null;
  14768. },
  14769. computeDateEndTime: function computeDateEndTime() {
  14770. var $xeCalendar = this;
  14771. var props = $xeCalendar;
  14772. return props.maxDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.maxDate) : null;
  14773. },
  14774. computeSupportMultiples: function computeSupportMultiples() {
  14775. var $xeCalendar = this;
  14776. var props = $xeCalendar;
  14777. return ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
  14778. },
  14779. computeDateListValue: function computeDateListValue() {
  14780. var $xeCalendar = this;
  14781. var props = $xeCalendar;
  14782. var reactData = $xeCalendar.reactData;
  14783. var multiple = props.multiple;
  14784. var selectValue = reactData.selectValue;
  14785. var isCalendarType = $xeCalendar.computeIsCalendarType;
  14786. var dateValueFormat = $xeCalendar.computeDateValueFormat;
  14787. if (multiple && selectValue && isCalendarType) {
  14788. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(selectValue).split(',').map(function (item) {
  14789. var date = $xeCalendar.parseDate(item, dateValueFormat);
  14790. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
  14791. return date;
  14792. }
  14793. return date;
  14794. });
  14795. }
  14796. return [];
  14797. },
  14798. computeDateMultipleValue: function computeDateMultipleValue() {
  14799. var $xeCalendar = this;
  14800. var dateListValue = $xeCalendar.computeDateListValue;
  14801. var dateValueFormat = $xeCalendar.computeDateValueFormat;
  14802. return dateListValue.map(function (date) {
  14803. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat);
  14804. });
  14805. },
  14806. computeDateMultipleLabel: function computeDateMultipleLabel() {
  14807. var $xeCalendar = this;
  14808. var dateListValue = $xeCalendar.computeDateListValue;
  14809. var dateLabelFormat = $xeCalendar.computeDateLabelFormat;
  14810. return dateListValue.map(function (date) {
  14811. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateLabelFormat);
  14812. }).join(', ');
  14813. },
  14814. computeDateValueFormat: function computeDateValueFormat() {
  14815. var $xeCalendar = this;
  14816. var props = $xeCalendar;
  14817. var valueFormat = props.valueFormat;
  14818. if (valueFormat) {
  14819. return valueFormat;
  14820. }
  14821. return 'yyyy-MM-dd';
  14822. },
  14823. computeDateValue: function computeDateValue() {
  14824. var $xeCalendar = this;
  14825. var reactData = $xeCalendar.reactData;
  14826. var selectValue = reactData.selectValue;
  14827. var isCalendarType = $xeCalendar.computeIsCalendarType;
  14828. var dateValueFormat = $xeCalendar.computeDateValueFormat;
  14829. var val = null;
  14830. if (selectValue && isCalendarType) {
  14831. var date = $xeCalendar.parseDate(selectValue, dateValueFormat);
  14832. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
  14833. val = date;
  14834. }
  14835. }
  14836. return val;
  14837. },
  14838. computeIsDisabledPrevDateBtn: function computeIsDisabledPrevDateBtn() {
  14839. var $xeCalendar = this;
  14840. var reactData = $xeCalendar.reactData;
  14841. var dateStartTime = $xeCalendar.computeDateStartTime;
  14842. var selectMonth = reactData.selectMonth;
  14843. if (selectMonth && dateStartTime) {
  14844. return selectMonth <= dateStartTime;
  14845. }
  14846. return false;
  14847. },
  14848. computeIsDisabledNextDateBtn: function computeIsDisabledNextDateBtn() {
  14849. var $xeCalendar = this;
  14850. var reactData = $xeCalendar.reactData;
  14851. var dateEndTime = $xeCalendar.computeDateEndTime;
  14852. var selectMonth = reactData.selectMonth;
  14853. if (selectMonth && dateEndTime) {
  14854. return selectMonth >= dateEndTime;
  14855. }
  14856. return false;
  14857. },
  14858. computeDateHMSTime: function computeDateHMSTime() {
  14859. var $xeCalendar = this;
  14860. var dateValue = $xeCalendar.computeDateValue;
  14861. return dateValue ? (dateValue.getHours() * 3600 + dateValue.getMinutes() * 60 + dateValue.getSeconds()) * 1000 : 0;
  14862. },
  14863. computeDateLabelFormat: function computeDateLabelFormat() {
  14864. var $xeCalendar = this;
  14865. var props = $xeCalendar;
  14866. var labelFormat = props.labelFormat;
  14867. var isCalendarType = $xeCalendar.computeIsCalendarType;
  14868. var dateValueFormat = $xeCalendar.computeDateValueFormat;
  14869. if (isCalendarType) {
  14870. return labelFormat || dateValueFormat || getI18n("vxe.input.date.labelFormat.".concat(props.type));
  14871. }
  14872. return '';
  14873. },
  14874. computeYearList: function computeYearList() {
  14875. var $xeCalendar = this;
  14876. var reactData = $xeCalendar.reactData;
  14877. var internalData = $xeCalendar.internalData;
  14878. var selectMonth = reactData.selectMonth,
  14879. currentDate = reactData.currentDate;
  14880. var yearSize = internalData.yearSize;
  14881. var years = [];
  14882. if (selectMonth && currentDate) {
  14883. var currFullYear = currentDate.getFullYear();
  14884. var selectFullYear = selectMonth.getFullYear();
  14885. var startYearDate = new Date(selectFullYear - selectFullYear % yearSize, 0, 1);
  14886. for (var index = -4; index < yearSize + 4; index++) {
  14887. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(startYearDate, index, 'first');
  14888. var itemFullYear = date.getFullYear();
  14889. years.push({
  14890. date: date,
  14891. isCurrent: true,
  14892. isPrev: index < 0,
  14893. isNow: currFullYear === itemFullYear,
  14894. isNext: index >= yearSize,
  14895. year: itemFullYear
  14896. });
  14897. }
  14898. }
  14899. return years;
  14900. },
  14901. computeSelectDatePanelObj: function computeSelectDatePanelObj() {
  14902. var $xeCalendar = this;
  14903. var reactData = $xeCalendar.reactData;
  14904. var isCalendarType = $xeCalendar.computeIsCalendarType;
  14905. var y = '';
  14906. var m = '';
  14907. if (isCalendarType) {
  14908. var datePanelType = reactData.datePanelType,
  14909. selectMonth = reactData.selectMonth;
  14910. var yearList = $xeCalendar.computeYearList;
  14911. var year = '';
  14912. var month;
  14913. if (selectMonth) {
  14914. year = selectMonth.getFullYear();
  14915. month = selectMonth.getMonth() + 1;
  14916. }
  14917. if (datePanelType === 'quarter' || datePanelType === 'month') {
  14918. y = "".concat(year);
  14919. } else if (datePanelType === 'year') {
  14920. y = yearList.length ? "".concat(yearList[0].year, " - ").concat(yearList[yearList.length - 1].year) : '';
  14921. } else {
  14922. y = "".concat(year);
  14923. m = month ? getI18n("vxe.input.date.m".concat(month)) : '-';
  14924. }
  14925. }
  14926. return {
  14927. y: y,
  14928. m: m
  14929. };
  14930. },
  14931. computeFirstDayOfWeek: function computeFirstDayOfWeek() {
  14932. var $xeCalendar = this;
  14933. var props = $xeCalendar;
  14934. var startDay = props.startDay;
  14935. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(startDay);
  14936. },
  14937. computeWeekDatas: function computeWeekDatas() {
  14938. var $xeCalendar = this;
  14939. var weeks = [];
  14940. var isCalendarType = $xeCalendar.computeIsCalendarType;
  14941. if (isCalendarType) {
  14942. var sWeek = $xeCalendar.computeFirstDayOfWeek;
  14943. weeks.push(sWeek);
  14944. for (var index = 0; index < 6; index++) {
  14945. if (sWeek >= 6) {
  14946. sWeek = 0;
  14947. } else {
  14948. sWeek++;
  14949. }
  14950. weeks.push(sWeek);
  14951. }
  14952. }
  14953. return weeks;
  14954. },
  14955. computeDateHeaders: function computeDateHeaders() {
  14956. var $xeCalendar = this;
  14957. var isCalendarType = $xeCalendar.computeIsCalendarType;
  14958. if (isCalendarType) {
  14959. var weekDatas = $xeCalendar.computeWeekDatas;
  14960. return weekDatas.map(function (day) {
  14961. return {
  14962. value: day,
  14963. label: getI18n("vxe.input.date.weeks.w".concat(day))
  14964. };
  14965. });
  14966. }
  14967. return [];
  14968. },
  14969. computeWeekHeaders: function computeWeekHeaders() {
  14970. var $xeCalendar = this;
  14971. var isCalendarType = $xeCalendar.computeIsCalendarType;
  14972. if (isCalendarType) {
  14973. var dateHeaders = $xeCalendar.computeDateHeaders;
  14974. return [{
  14975. label: getI18n('vxe.input.date.weeks.w')
  14976. }].concat(dateHeaders);
  14977. }
  14978. return [];
  14979. },
  14980. computeYearDatas: function computeYearDatas() {
  14981. var $xeCalendar = this;
  14982. var yearList = $xeCalendar.computeYearList;
  14983. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(yearList, 4);
  14984. },
  14985. computeQuarterList: function computeQuarterList() {
  14986. var $xeCalendar = this;
  14987. var reactData = $xeCalendar.reactData;
  14988. var internalData = $xeCalendar.internalData;
  14989. var selectMonth = reactData.selectMonth,
  14990. currentDate = reactData.currentDate;
  14991. var quarterSize = internalData.quarterSize;
  14992. var quarters = [];
  14993. if (selectMonth && currentDate) {
  14994. var currFullYear = currentDate.getFullYear();
  14995. var currQuarter = getDateQuarter(currentDate);
  14996. var firstYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, 'first');
  14997. var selFullYear = firstYear.getFullYear();
  14998. for (var index = -2; index < quarterSize - 2; index++) {
  14999. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(firstYear, index);
  15000. var itemFullYear = date.getFullYear();
  15001. var itemQuarter = getDateQuarter(date);
  15002. var isPrev = itemFullYear < selFullYear;
  15003. quarters.push({
  15004. date: date,
  15005. isPrev: isPrev,
  15006. isCurrent: itemFullYear === selFullYear,
  15007. isNow: itemFullYear === currFullYear && itemQuarter === currQuarter,
  15008. isNext: !isPrev && itemFullYear > selFullYear,
  15009. quarter: itemQuarter
  15010. });
  15011. }
  15012. }
  15013. return quarters;
  15014. },
  15015. computeQuarterDatas: function computeQuarterDatas() {
  15016. var $xeCalendar = this;
  15017. var quarterList = $xeCalendar.computeQuarterList;
  15018. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(quarterList, 2);
  15019. },
  15020. computeMonthList: function computeMonthList() {
  15021. var $xeCalendar = this;
  15022. var reactData = $xeCalendar.reactData;
  15023. var internalData = $xeCalendar.internalData;
  15024. var selectMonth = reactData.selectMonth,
  15025. currentDate = reactData.currentDate;
  15026. var monthSize = internalData.monthSize;
  15027. var months = [];
  15028. if (selectMonth && currentDate) {
  15029. var currFullYear = currentDate.getFullYear();
  15030. var currMonth = currentDate.getMonth();
  15031. var selFullYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, 'first').getFullYear();
  15032. for (var index = -4; index < monthSize - 4; index++) {
  15033. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, index);
  15034. var itemFullYear = date.getFullYear();
  15035. var itemMonth = date.getMonth();
  15036. var isPrev = itemFullYear < selFullYear;
  15037. months.push({
  15038. date: date,
  15039. isPrev: isPrev,
  15040. isCurrent: itemFullYear === selFullYear,
  15041. isNow: itemFullYear === currFullYear && itemMonth === currMonth,
  15042. isNext: !isPrev && itemFullYear > selFullYear,
  15043. month: itemMonth
  15044. });
  15045. }
  15046. }
  15047. return months;
  15048. },
  15049. computeMonthDatas: function computeMonthDatas() {
  15050. var $xeCalendar = this;
  15051. var monthList = $xeCalendar.computeMonthList;
  15052. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(monthList, 4);
  15053. },
  15054. computeDayList: function computeDayList() {
  15055. var $xeCalendar = this;
  15056. var reactData = $xeCalendar.reactData;
  15057. var selectMonth = reactData.selectMonth,
  15058. currentDate = reactData.currentDate;
  15059. var days = [];
  15060. if (selectMonth && currentDate) {
  15061. var dateHMSTime = $xeCalendar.computeDateHMSTime;
  15062. var weekDatas = $xeCalendar.computeWeekDatas;
  15063. var currFullYear = currentDate.getFullYear();
  15064. var currMonth = currentDate.getMonth();
  15065. var currDate = currentDate.getDate();
  15066. var selFullYear = selectMonth.getFullYear();
  15067. var selMonth = selectMonth.getMonth();
  15068. var selDay = selectMonth.getDay();
  15069. var prevOffsetDate = -weekDatas.indexOf(selDay);
  15070. var startDayDate = new Date(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(selectMonth, prevOffsetDate).getTime() + dateHMSTime);
  15071. for (var index = 0; index < 42; index++) {
  15072. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(startDayDate, index);
  15073. var itemFullYear = date.getFullYear();
  15074. var itemMonth = date.getMonth();
  15075. var itemDate = date.getDate();
  15076. var isPrev = date < selectMonth;
  15077. days.push({
  15078. date: date,
  15079. isPrev: isPrev,
  15080. isCurrent: itemFullYear === selFullYear && itemMonth === selMonth,
  15081. isNow: itemFullYear === currFullYear && itemMonth === currMonth && itemDate === currDate,
  15082. isNext: !isPrev && selMonth !== itemMonth,
  15083. label: itemDate
  15084. });
  15085. }
  15086. }
  15087. return days;
  15088. },
  15089. computeDayDatas: function computeDayDatas() {
  15090. var $xeCalendar = this;
  15091. var dayList = $xeCalendar.computeDayList;
  15092. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(dayList, 7);
  15093. },
  15094. computeWeekDates: function computeWeekDates() {
  15095. var $xeCalendar = this;
  15096. var dayDatas = $xeCalendar.computeDayDatas;
  15097. var firstDayOfWeek = $xeCalendar.computeFirstDayOfWeek;
  15098. return dayDatas.map(function (list) {
  15099. var firstItem = list[0];
  15100. var item = {
  15101. date: firstItem.date,
  15102. isWeekNumber: true,
  15103. isPrev: false,
  15104. isCurrent: false,
  15105. isNow: false,
  15106. isNext: false,
  15107. label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(firstItem.date, firstDayOfWeek)
  15108. };
  15109. return [item].concat(list);
  15110. });
  15111. }
  15112. }),
  15113. methods: {
  15114. //
  15115. // Method
  15116. //
  15117. dispatchEvent: function dispatchEvent(type, params, evnt) {
  15118. var $xeCalendar = this;
  15119. $xeCalendar.$emit(type, createEvent(evnt, {
  15120. $input: $xeCalendar
  15121. }, params));
  15122. },
  15123. emitModel: function emitModel(value) {
  15124. var $xeCalendar = this;
  15125. var _events = $xeCalendar._events;
  15126. $xeCalendar.$emit('input', value);
  15127. if (_events && _events.modelValue) {
  15128. $xeCalendar.$emit('modelValue', value);
  15129. } else {
  15130. $xeCalendar.$emit('model-value', value);
  15131. }
  15132. },
  15133. parseDate: function parseDate(value, format) {
  15134. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(value, format);
  15135. },
  15136. handleChange: function handleChange(value, evnt) {
  15137. var $xeCalendar = this;
  15138. var props = $xeCalendar;
  15139. var reactData = $xeCalendar.reactData;
  15140. reactData.inputValue = value;
  15141. $xeCalendar.emitModel(value);
  15142. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(props.value) !== value) {
  15143. $xeCalendar.dispatchEvent('change', {
  15144. value: value
  15145. }, evnt);
  15146. }
  15147. },
  15148. dateParseValue: function dateParseValue(value) {
  15149. var $xeCalendar = this;
  15150. var props = $xeCalendar;
  15151. var reactData = $xeCalendar.reactData;
  15152. var type = props.type;
  15153. var dateLabelFormat = $xeCalendar.computeDateLabelFormat;
  15154. var dateValueFormat = $xeCalendar.computeDateValueFormat;
  15155. var firstDayOfWeek = $xeCalendar.computeFirstDayOfWeek;
  15156. var dValue = null;
  15157. var dLabel = '';
  15158. if (value) {
  15159. dValue = $xeCalendar.parseDate(value, dateValueFormat);
  15160. }
  15161. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(dValue)) {
  15162. dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, dateLabelFormat, {
  15163. firstDay: firstDayOfWeek
  15164. });
  15165. // 由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年
  15166. if (dateLabelFormat && type === 'week') {
  15167. var firstWeekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(dValue, 0, firstDayOfWeek, firstDayOfWeek);
  15168. if (firstWeekDate.getFullYear() < dValue.getFullYear()) {
  15169. var yyIndex = dateLabelFormat.indexOf('yyyy');
  15170. if (yyIndex > -1) {
  15171. var yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
  15172. if (yyNum && !isNaN(yyNum)) {
  15173. dLabel = dLabel.replace("".concat(yyNum), "".concat(yyNum - 1));
  15174. }
  15175. }
  15176. }
  15177. }
  15178. } else {
  15179. dValue = null;
  15180. }
  15181. reactData.datePanelValue = dValue;
  15182. reactData.datePanelLabel = dLabel;
  15183. },
  15184. /**
  15185. * 值变化时处理
  15186. */
  15187. changeValue: function changeValue() {
  15188. var $xeCalendar = this;
  15189. var props = $xeCalendar;
  15190. var reactData = $xeCalendar.reactData;
  15191. var isCalendarType = $xeCalendar.computeIsCalendarType;
  15192. var inputValue = reactData.inputValue;
  15193. if (isCalendarType) {
  15194. $xeCalendar.dateParseValue(inputValue);
  15195. reactData.inputValue = props.multiple ? $xeCalendar.computeDateMultipleLabel : reactData.datePanelLabel;
  15196. }
  15197. },
  15198. /**
  15199. * 检查初始值
  15200. */
  15201. initValue: function initValue() {
  15202. var $xeCalendar = this;
  15203. var isCalendarType = $xeCalendar.computeIsCalendarType;
  15204. if (isCalendarType) {
  15205. $xeCalendar.changeValue();
  15206. }
  15207. },
  15208. dateCheckMonth: function dateCheckMonth(date) {
  15209. var $xeCalendar = this;
  15210. var reactData = $xeCalendar.reactData;
  15211. var month = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(date, 0, 'first');
  15212. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(month, reactData.selectMonth)) {
  15213. reactData.selectMonth = month;
  15214. }
  15215. },
  15216. dateChange: function dateChange(date) {
  15217. var $xeCalendar = this;
  15218. var props = $xeCalendar;
  15219. var reactData = $xeCalendar.reactData;
  15220. var value = props.value,
  15221. multiple = props.multiple;
  15222. var dateValueFormat = $xeCalendar.computeDateValueFormat;
  15223. var firstDayOfWeek = $xeCalendar.computeFirstDayOfWeek;
  15224. if (props.type === 'week') {
  15225. var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.selectDay);
  15226. date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, sWeek, firstDayOfWeek);
  15227. }
  15228. var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat, {
  15229. firstDay: firstDayOfWeek
  15230. });
  15231. $xeCalendar.dateCheckMonth(date);
  15232. reactData.selectValue = date;
  15233. if (multiple) {
  15234. // 如果为多选
  15235. var dateMultipleValue = $xeCalendar.computeDateMultipleValue;
  15236. // 如果是日期类型
  15237. if (dateMultipleValue.some(function (val) {
  15238. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal);
  15239. })) {
  15240. $xeCalendar.handleChange(dateMultipleValue.filter(function (val) {
  15241. return !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal);
  15242. }).join(','), {
  15243. type: 'update'
  15244. });
  15245. } else {
  15246. $xeCalendar.handleChange(dateMultipleValue.concat([inpVal]).join(','), {
  15247. type: 'update'
  15248. });
  15249. }
  15250. } else {
  15251. // 如果为单选
  15252. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(value, inpVal)) {
  15253. $xeCalendar.handleChange(inpVal, {
  15254. type: 'update'
  15255. });
  15256. }
  15257. }
  15258. },
  15259. dateMonthHandle: function dateMonthHandle(date, offsetMonth) {
  15260. var $xeCalendar = this;
  15261. var reactData = $xeCalendar.reactData;
  15262. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(date, offsetMonth, 'first');
  15263. },
  15264. dateNowHandle: function dateNowHandle() {
  15265. var $xeCalendar = this;
  15266. var reactData = $xeCalendar.reactData;
  15267. var currentDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  15268. reactData.currentDate = currentDate;
  15269. $xeCalendar.dateMonthHandle(currentDate, 0);
  15270. },
  15271. dateToggleYearTypeEvent: function dateToggleYearTypeEvent() {
  15272. var $xeCalendar = this;
  15273. var reactData = $xeCalendar.reactData;
  15274. reactData.datePanelType = 'year';
  15275. },
  15276. dateToggleMonthTypeEvent: function dateToggleMonthTypeEvent(evnt) {
  15277. var $xeCalendar = this;
  15278. var reactData = $xeCalendar.reactData;
  15279. var datePanelType = reactData.datePanelType;
  15280. if (datePanelType === 'month' || datePanelType === 'quarter') {
  15281. datePanelType = 'year';
  15282. } else {
  15283. datePanelType = 'month';
  15284. }
  15285. reactData.datePanelType = datePanelType;
  15286. $xeCalendar.changeViewEvent(evnt);
  15287. },
  15288. datePrevEvent: function datePrevEvent(evnt) {
  15289. var $xeCalendar = this;
  15290. var props = $xeCalendar;
  15291. var reactData = $xeCalendar.reactData;
  15292. var internalData = $xeCalendar.internalData;
  15293. var type = props.type;
  15294. var datePanelType = reactData.datePanelType,
  15295. selectMonth = reactData.selectMonth;
  15296. var yearSize = internalData.yearSize;
  15297. var isDisabledPrevDateBtn = $xeCalendar.computeIsDisabledPrevDateBtn;
  15298. if (!isDisabledPrevDateBtn) {
  15299. if (type === 'year') {
  15300. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  15301. } else if (type === 'month' || type === 'quarter') {
  15302. if (datePanelType === 'year') {
  15303. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  15304. } else {
  15305. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -1, 'first');
  15306. }
  15307. } else {
  15308. if (datePanelType === 'year') {
  15309. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  15310. } else if (datePanelType === 'month') {
  15311. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -1, 'first');
  15312. } else {
  15313. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, -1, 'first');
  15314. }
  15315. }
  15316. $xeCalendar.dispatchEvent('date-prev', {
  15317. type: type
  15318. }, evnt);
  15319. $xeCalendar.changeViewEvent(evnt);
  15320. }
  15321. },
  15322. dateTodayMonthEvent: function dateTodayMonthEvent(evnt) {
  15323. var $xeCalendar = this;
  15324. var props = $xeCalendar;
  15325. var reactData = $xeCalendar.reactData;
  15326. $xeCalendar.dateNowHandle();
  15327. if (!props.multiple) {
  15328. $xeCalendar.dateChange(reactData.currentDate);
  15329. }
  15330. $xeCalendar.dispatchEvent('date-today', {
  15331. type: props.type
  15332. }, evnt);
  15333. $xeCalendar.changeViewEvent(evnt);
  15334. },
  15335. dateNextEvent: function dateNextEvent(evnt) {
  15336. var $xeCalendar = this;
  15337. var props = $xeCalendar;
  15338. var reactData = $xeCalendar.reactData;
  15339. var internalData = $xeCalendar.internalData;
  15340. var type = props.type;
  15341. var datePanelType = reactData.datePanelType,
  15342. selectMonth = reactData.selectMonth;
  15343. var yearSize = internalData.yearSize;
  15344. var isDisabledNextDateBtn = $xeCalendar.computeIsDisabledNextDateBtn;
  15345. if (!isDisabledNextDateBtn) {
  15346. if (type === 'year') {
  15347. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  15348. } else if (type === 'month' || type === 'quarter') {
  15349. if (datePanelType === 'year') {
  15350. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  15351. } else {
  15352. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 1, 'first');
  15353. }
  15354. } else {
  15355. if (datePanelType === 'year') {
  15356. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  15357. } else if (datePanelType === 'month') {
  15358. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 1, 'first');
  15359. } else {
  15360. reactData.selectMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, 1, 'first');
  15361. }
  15362. }
  15363. $xeCalendar.dispatchEvent('date-next', {
  15364. type: type
  15365. }, evnt);
  15366. $xeCalendar.changeViewEvent(evnt);
  15367. }
  15368. },
  15369. isDateDisabled: function isDateDisabled(item) {
  15370. var $xeCalendar = this;
  15371. var props = $xeCalendar;
  15372. var reactData = $xeCalendar.reactData;
  15373. var disabledMethod = props.disabledMethod;
  15374. var datePanelType = reactData.datePanelType;
  15375. return disabledMethod && disabledMethod({
  15376. type: datePanelType,
  15377. viewType: datePanelType,
  15378. date: item.date,
  15379. $calendar: $xeCalendar
  15380. });
  15381. },
  15382. changeViewEvent: function changeViewEvent(evnt) {
  15383. var $xeCalendar = this;
  15384. var reactData = $xeCalendar.reactData;
  15385. var datePanelType = reactData.datePanelType;
  15386. var yearDatas = $xeCalendar.computeYearDatas;
  15387. var quarterDatas = $xeCalendar.computeQuarterDatas;
  15388. var monthDatas = $xeCalendar.computeMonthDatas;
  15389. var weekDates = $xeCalendar.computeWeekDates;
  15390. var dayDatas = $xeCalendar.computeDayDatas;
  15391. var viewDates = [];
  15392. var dataList = [];
  15393. switch (datePanelType) {
  15394. case 'year':
  15395. dataList = yearDatas;
  15396. break;
  15397. case 'quarter':
  15398. dataList = quarterDatas;
  15399. break;
  15400. case 'month':
  15401. dataList = monthDatas;
  15402. break;
  15403. case 'week':
  15404. dataList = weekDates;
  15405. break;
  15406. case 'day':
  15407. dataList = dayDatas;
  15408. break;
  15409. }
  15410. dataList.forEach(function (rows) {
  15411. rows.forEach(function (item) {
  15412. viewDates.push(item.date);
  15413. });
  15414. });
  15415. $xeCalendar.dispatchEvent('view-change', {
  15416. viewType: datePanelType,
  15417. viewDates: viewDates
  15418. }, evnt);
  15419. },
  15420. dateSelectItem: function dateSelectItem(date) {
  15421. var $xeCalendar = this;
  15422. var props = $xeCalendar;
  15423. var reactData = $xeCalendar.reactData;
  15424. var type = props.type;
  15425. var datePanelType = reactData.datePanelType;
  15426. if (type === 'month') {
  15427. if (datePanelType === 'year') {
  15428. reactData.datePanelType = 'month';
  15429. $xeCalendar.dateCheckMonth(date);
  15430. $xeCalendar.changeViewEvent(null);
  15431. } else {
  15432. $xeCalendar.dateChange(date);
  15433. }
  15434. } else if (type === 'year') {
  15435. $xeCalendar.dateChange(date);
  15436. } else if (type === 'quarter') {
  15437. if (datePanelType === 'year') {
  15438. reactData.datePanelType = 'quarter';
  15439. $xeCalendar.dateCheckMonth(date);
  15440. $xeCalendar.changeViewEvent(null);
  15441. } else {
  15442. $xeCalendar.dateChange(date);
  15443. }
  15444. } else {
  15445. if (datePanelType === 'month') {
  15446. reactData.datePanelType = type === 'week' ? type : 'day';
  15447. $xeCalendar.dateCheckMonth(date);
  15448. $xeCalendar.changeViewEvent(null);
  15449. } else if (datePanelType === 'year') {
  15450. reactData.datePanelType = 'month';
  15451. $xeCalendar.dateCheckMonth(date);
  15452. $xeCalendar.changeViewEvent(null);
  15453. } else {
  15454. $xeCalendar.dateChange(date);
  15455. }
  15456. }
  15457. },
  15458. dateSelectEvent: function dateSelectEvent(item) {
  15459. var $xeCalendar = this;
  15460. if (!$xeCalendar.isDateDisabled(item)) {
  15461. $xeCalendar.dateSelectItem(item.date);
  15462. }
  15463. },
  15464. dateMoveDay: function dateMoveDay(offsetDay) {
  15465. var $xeCalendar = this;
  15466. if (!$xeCalendar.isDateDisabled({
  15467. date: offsetDay
  15468. })) {
  15469. var dayList = $xeCalendar.computeDayList;
  15470. if (!dayList.some(function (item) {
  15471. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetDay, 'yyyyMMdd');
  15472. })) {
  15473. $xeCalendar.dateCheckMonth(offsetDay);
  15474. }
  15475. $xeCalendar.dateParseValue(offsetDay);
  15476. }
  15477. },
  15478. dateMoveYear: function dateMoveYear(offsetYear) {
  15479. var $xeCalendar = this;
  15480. if (!$xeCalendar.isDateDisabled({
  15481. date: offsetYear
  15482. })) {
  15483. var yearList = $xeCalendar.computeYearList;
  15484. if (!yearList.some(function (item) {
  15485. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetYear, 'yyyy');
  15486. })) {
  15487. $xeCalendar.dateCheckMonth(offsetYear);
  15488. }
  15489. $xeCalendar.dateParseValue(offsetYear);
  15490. }
  15491. },
  15492. dateMoveQuarter: function dateMoveQuarter(offsetQuarter) {
  15493. var $xeCalendar = this;
  15494. if (!$xeCalendar.isDateDisabled({
  15495. date: offsetQuarter
  15496. })) {
  15497. var quarterList = $xeCalendar.computeQuarterList;
  15498. if (!quarterList.some(function (item) {
  15499. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetQuarter, 'yyyyq');
  15500. })) {
  15501. $xeCalendar.dateCheckMonth(offsetQuarter);
  15502. }
  15503. $xeCalendar.dateParseValue(offsetQuarter);
  15504. }
  15505. },
  15506. dateMoveMonth: function dateMoveMonth(offsetMonth) {
  15507. var $xeCalendar = this;
  15508. if (!$xeCalendar.isDateDisabled({
  15509. date: offsetMonth
  15510. })) {
  15511. var monthList = $xeCalendar.computeMonthList;
  15512. if (!monthList.some(function (item) {
  15513. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetMonth, 'yyyyMM');
  15514. })) {
  15515. $xeCalendar.dateCheckMonth(offsetMonth);
  15516. }
  15517. $xeCalendar.dateParseValue(offsetMonth);
  15518. }
  15519. },
  15520. dateMouseenterEvent: function dateMouseenterEvent(item) {
  15521. var $xeCalendar = this;
  15522. var reactData = $xeCalendar.reactData;
  15523. if (!$xeCalendar.isDateDisabled(item)) {
  15524. var datePanelType = reactData.datePanelType;
  15525. if (datePanelType === 'month') {
  15526. $xeCalendar.dateMoveMonth(item.date);
  15527. } else if (datePanelType === 'quarter') {
  15528. $xeCalendar.dateMoveQuarter(item.date);
  15529. } else if (datePanelType === 'year') {
  15530. $xeCalendar.dateMoveYear(item.date);
  15531. } else {
  15532. $xeCalendar.dateMoveDay(item.date);
  15533. }
  15534. }
  15535. },
  15536. dateConfirmEvent: function dateConfirmEvent() {},
  15537. dateOpenPanel: function dateOpenPanel() {
  15538. var $xeCalendar = this;
  15539. var props = $xeCalendar;
  15540. var reactData = $xeCalendar.reactData;
  15541. var type = props.type;
  15542. var dateValue = $xeCalendar.computeDateValue;
  15543. if (['year', 'quarter', 'month', 'week'].indexOf(type) > -1) {
  15544. reactData.datePanelType = type;
  15545. } else {
  15546. reactData.datePanelType = 'day';
  15547. }
  15548. reactData.currentDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  15549. if (dateValue) {
  15550. $xeCalendar.dateMonthHandle(dateValue, 0);
  15551. $xeCalendar.dateParseValue(dateValue);
  15552. } else {
  15553. $xeCalendar.dateNowHandle();
  15554. }
  15555. },
  15556. //
  15557. // Render
  15558. //
  15559. renderDateLabel: function renderDateLabel(h, item, label) {
  15560. var $xeCalendar = this;
  15561. var props = $xeCalendar;
  15562. var reactData = $xeCalendar.reactData;
  15563. var festivalMethod = props.festivalMethod;
  15564. if (festivalMethod) {
  15565. var datePanelType = reactData.datePanelType;
  15566. var festivalRest = festivalMethod({
  15567. type: datePanelType,
  15568. viewType: datePanelType,
  15569. date: item.date,
  15570. $calendar: $xeCalendar
  15571. });
  15572. var festivalItem = festivalRest ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalRest) ? {
  15573. label: festivalRest
  15574. } : festivalRest : {};
  15575. var extraItem = festivalItem.extra ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalItem.extra) ? {
  15576. label: festivalItem.extra
  15577. } : festivalItem.extra : null;
  15578. var labels = [h('span', {
  15579. class: ['vxe-calendar--date-label', {
  15580. 'is-notice': festivalItem.notice
  15581. }]
  15582. }, extraItem && extraItem.label ? [h('span', "".concat(label || '')), h('span', {
  15583. class: ['vxe-calendar--date-label--extra', extraItem.important ? 'is-important' : '', extraItem.className],
  15584. style: extraItem.style
  15585. }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(extraItem.label))] : ["".concat(label || '')])];
  15586. var festivalLabel = festivalItem.label;
  15587. if (festivalLabel) {
  15588. // 默认最多支持3个节日重叠
  15589. var festivalLabels = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(festivalLabel).split(',');
  15590. labels.push(h('span', {
  15591. class: ['vxe-calendar--date-festival', festivalItem.important ? 'is-important' : '', festivalItem.className],
  15592. style: festivalItem.style
  15593. }, [festivalLabels.length > 1 ? h('span', {
  15594. class: ['vxe-calendar--date-festival--overlap', "overlap--".concat(festivalLabels.length)]
  15595. }, festivalLabels.map(function (label) {
  15596. return h('span', label.substring(0, 3));
  15597. })) : h('span', {
  15598. class: 'vxe-calendar--date-festival--label'
  15599. }, festivalLabels[0].substring(0, 3))]));
  15600. }
  15601. return labels;
  15602. }
  15603. return "".concat(label || '');
  15604. },
  15605. renderDateDayTable: function renderDateDayTable(h) {
  15606. var $xeCalendar = this;
  15607. var props = $xeCalendar;
  15608. var reactData = $xeCalendar.reactData;
  15609. var multiple = props.multiple;
  15610. var datePanelType = reactData.datePanelType,
  15611. datePanelValue = reactData.datePanelValue;
  15612. var dateValue = $xeCalendar.computeDateValue;
  15613. var dateHeaders = $xeCalendar.computeDateHeaders;
  15614. var dayDatas = $xeCalendar.computeDayDatas;
  15615. var dateListValue = $xeCalendar.computeDateListValue;
  15616. var matchFormat = 'yyyyMMdd';
  15617. return [h('table', {
  15618. class: "vxe-calendar--date-".concat(datePanelType, "-view"),
  15619. attrs: {
  15620. cellspacing: 0,
  15621. cellpadding: 0,
  15622. border: 0
  15623. }
  15624. }, [h('tr', dateHeaders.map(function (item) {
  15625. return h('th', {
  15626. class: 'vxe-calendar--view-th'
  15627. }, item.label);
  15628. }))].concat(_toConsumableArray(dayDatas.map(function (rows) {
  15629. return h('tr', rows.map(function (item) {
  15630. return h('td', {
  15631. class: ['vxe-calendar--view-td', {
  15632. 'is--prev': item.isPrev,
  15633. 'is--current': item.isCurrent,
  15634. 'is--now': item.isNow,
  15635. 'is--next': item.isNext,
  15636. 'is--disabled': $xeCalendar.isDateDisabled(item),
  15637. 'is--selected': multiple ? dateListValue.some(function (val) {
  15638. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  15639. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  15640. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  15641. }],
  15642. on: {
  15643. click: function click() {
  15644. return $xeCalendar.dateSelectEvent(item);
  15645. },
  15646. mouseenter: function mouseenter() {
  15647. return $xeCalendar.dateMouseenterEvent(item);
  15648. }
  15649. }
  15650. }, $xeCalendar.renderDateLabel(h, item, item.label));
  15651. }));
  15652. }))))];
  15653. },
  15654. renderDateWeekTable: function renderDateWeekTable(h) {
  15655. var $xeCalendar = this;
  15656. var props = $xeCalendar;
  15657. var reactData = $xeCalendar.reactData;
  15658. var multiple = props.multiple;
  15659. var datePanelType = reactData.datePanelType,
  15660. datePanelValue = reactData.datePanelValue;
  15661. var dateValue = $xeCalendar.computeDateValue;
  15662. var weekHeaders = $xeCalendar.computeWeekHeaders;
  15663. var weekDates = $xeCalendar.computeWeekDates;
  15664. var dateListValue = $xeCalendar.computeDateListValue;
  15665. var matchFormat = 'yyyyMMdd';
  15666. return [h('table', {
  15667. class: "vxe-calendar--date-".concat(datePanelType, "-view"),
  15668. attrs: {
  15669. cellspacing: 0,
  15670. cellpadding: 0,
  15671. border: 0
  15672. }
  15673. }, [h('tr', weekHeaders.map(function (item) {
  15674. return h('td', {
  15675. class: 'vxe-calendar--view-th'
  15676. }, item.label);
  15677. }))].concat(_toConsumableArray(weekDates.map(function (rows) {
  15678. var isSelected = multiple ? rows.some(function (item) {
  15679. return dateListValue.some(function (val) {
  15680. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  15681. });
  15682. }) : rows.some(function (item) {
  15683. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
  15684. });
  15685. var isHover = rows.some(function (item) {
  15686. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat);
  15687. });
  15688. return h('tr', rows.map(function (item) {
  15689. return h('td', {
  15690. class: ['vxe-calendar--view-td', {
  15691. 'is--prev': item.isPrev,
  15692. 'is--current': item.isCurrent,
  15693. 'is--now': item.isNow,
  15694. 'is--next': item.isNext,
  15695. 'is--disabled': $xeCalendar.isDateDisabled(item),
  15696. 'is--selected': isSelected,
  15697. 'is--hover': isHover
  15698. }],
  15699. on: {
  15700. click: function click() {
  15701. return $xeCalendar.dateSelectEvent(item);
  15702. },
  15703. mouseenter: function mouseenter() {
  15704. return $xeCalendar.dateMouseenterEvent(item);
  15705. }
  15706. }
  15707. }, $xeCalendar.renderDateLabel(h, item, item.label));
  15708. }));
  15709. }))))];
  15710. },
  15711. renderDateMonthTable: function renderDateMonthTable(h) {
  15712. var $xeCalendar = this;
  15713. var props = $xeCalendar;
  15714. var reactData = $xeCalendar.reactData;
  15715. var multiple = props.multiple;
  15716. var datePanelType = reactData.datePanelType,
  15717. datePanelValue = reactData.datePanelValue;
  15718. var dateValue = $xeCalendar.computeDateValue;
  15719. var monthDatas = $xeCalendar.computeMonthDatas;
  15720. var dateListValue = $xeCalendar.computeDateListValue;
  15721. var matchFormat = 'yyyyMM';
  15722. return [h('table', {
  15723. class: "vxe-calendar--date-".concat(datePanelType, "-view"),
  15724. attrs: {
  15725. cellspacing: 0,
  15726. cellpadding: 0,
  15727. border: 0
  15728. }
  15729. }, [h('tbody', monthDatas.map(function (rows) {
  15730. return h('tr', rows.map(function (item) {
  15731. return h('td', {
  15732. class: ['vxe-calendar--view-td', {
  15733. 'is--prev': item.isPrev,
  15734. 'is--current': item.isCurrent,
  15735. 'is--now': item.isNow,
  15736. 'is--next': item.isNext,
  15737. 'is--disabled': $xeCalendar.isDateDisabled(item),
  15738. 'is--selected': multiple ? dateListValue.some(function (val) {
  15739. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  15740. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  15741. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  15742. }],
  15743. on: {
  15744. click: function click() {
  15745. return $xeCalendar.dateSelectEvent(item);
  15746. },
  15747. mouseenter: function mouseenter() {
  15748. return $xeCalendar.dateMouseenterEvent(item);
  15749. }
  15750. }
  15751. }, $xeCalendar.renderDateLabel(h, item, getI18n("vxe.input.date.months.m".concat(item.month))));
  15752. }));
  15753. }))])];
  15754. },
  15755. renderDateQuarterTable: function renderDateQuarterTable(h) {
  15756. var $xeCalendar = this;
  15757. var props = $xeCalendar;
  15758. var reactData = $xeCalendar.reactData;
  15759. var multiple = props.multiple;
  15760. var datePanelType = reactData.datePanelType,
  15761. datePanelValue = reactData.datePanelValue;
  15762. var dateValue = $xeCalendar.computeDateValue;
  15763. var quarterDatas = $xeCalendar.computeQuarterDatas;
  15764. var dateListValue = $xeCalendar.computeDateListValue;
  15765. var matchFormat = 'yyyyq';
  15766. return [h('table', {
  15767. class: "vxe-calendar--date-".concat(datePanelType, "-view"),
  15768. attrs: {
  15769. cellspacing: 0,
  15770. cellpadding: 0,
  15771. border: 0
  15772. }
  15773. }, [h('tbody', quarterDatas.map(function (rows) {
  15774. return h('tr', rows.map(function (item) {
  15775. return h('td', {
  15776. class: ['vxe-calendar--view-td', {
  15777. 'is--prev': item.isPrev,
  15778. 'is--current': item.isCurrent,
  15779. 'is--now': item.isNow,
  15780. 'is--next': item.isNext,
  15781. 'is--disabled': $xeCalendar.isDateDisabled(item),
  15782. 'is--selected': multiple ? dateListValue.some(function (val) {
  15783. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  15784. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  15785. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  15786. }],
  15787. on: {
  15788. click: function click() {
  15789. return $xeCalendar.dateSelectEvent(item);
  15790. },
  15791. mouseenter: function mouseenter() {
  15792. return $xeCalendar.dateMouseenterEvent(item);
  15793. }
  15794. }
  15795. }, $xeCalendar.renderDateLabel(h, item, getI18n("vxe.input.date.quarters.q".concat(item.quarter))));
  15796. }));
  15797. }))])];
  15798. },
  15799. renderDateYearTable: function renderDateYearTable(h) {
  15800. var $xeCalendar = this;
  15801. var props = $xeCalendar;
  15802. var reactData = $xeCalendar.reactData;
  15803. var multiple = props.multiple;
  15804. var datePanelType = reactData.datePanelType,
  15805. datePanelValue = reactData.datePanelValue;
  15806. var dateValue = $xeCalendar.computeDateValue;
  15807. var yearDatas = $xeCalendar.computeYearDatas;
  15808. var dateListValue = $xeCalendar.computeDateListValue;
  15809. var matchFormat = 'yyyy';
  15810. return [h('table', {
  15811. class: "vxe-calendar--date-".concat(datePanelType, "-view"),
  15812. attrs: {
  15813. cellspacing: 0,
  15814. cellpadding: 0,
  15815. border: 0
  15816. }
  15817. }, [h('tbody', yearDatas.map(function (rows) {
  15818. return h('tr', rows.map(function (item) {
  15819. return h('td', {
  15820. class: ['vxe-calendar--view-td', {
  15821. 'is--prev': item.isPrev,
  15822. 'is--current': item.isCurrent,
  15823. 'is--now': item.isNow,
  15824. 'is--next': item.isNext,
  15825. 'is--disabled': $xeCalendar.isDateDisabled(item),
  15826. 'is--selected': multiple ? dateListValue.some(function (val) {
  15827. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  15828. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  15829. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  15830. }],
  15831. on: {
  15832. click: function click() {
  15833. return $xeCalendar.dateSelectEvent(item);
  15834. },
  15835. mouseenter: function mouseenter() {
  15836. return $xeCalendar.dateMouseenterEvent(item);
  15837. }
  15838. }
  15839. }, $xeCalendar.renderDateLabel(h, item, item.year));
  15840. }));
  15841. }))])];
  15842. },
  15843. renderDateTable: function renderDateTable(h) {
  15844. var $xeCalendar = this;
  15845. var reactData = $xeCalendar.reactData;
  15846. var datePanelType = reactData.datePanelType;
  15847. switch (datePanelType) {
  15848. case 'week':
  15849. return $xeCalendar.renderDateWeekTable(h);
  15850. case 'month':
  15851. return $xeCalendar.renderDateMonthTable(h);
  15852. case 'quarter':
  15853. return $xeCalendar.renderDateQuarterTable(h);
  15854. case 'year':
  15855. return $xeCalendar.renderDateYearTable(h);
  15856. }
  15857. return $xeCalendar.renderDateDayTable(h);
  15858. },
  15859. renderDatePanel: function renderDatePanel(h) {
  15860. var $xeCalendar = this;
  15861. var props = $xeCalendar;
  15862. var reactData = $xeCalendar.reactData;
  15863. var multiple = props.multiple;
  15864. var datePanelType = reactData.datePanelType;
  15865. var isDisabledPrevDateBtn = $xeCalendar.computeIsDisabledPrevDateBtn;
  15866. var isDisabledNextDateBtn = $xeCalendar.computeIsDisabledNextDateBtn;
  15867. var selectDatePanelObj = $xeCalendar.computeSelectDatePanelObj;
  15868. return [h('div', {
  15869. class: 'vxe-calendar--header'
  15870. }, [h('div', {
  15871. class: 'vxe-calendar--type-wrapper'
  15872. }, [datePanelType === 'year' ? h(src_button, {
  15873. props: {
  15874. disabled: datePanelType === 'year',
  15875. content: selectDatePanelObj.y
  15876. }
  15877. }) : h('span', {
  15878. class: 'vxe-calendar--date-picker-btns'
  15879. }, [h(src_button, {
  15880. props: {
  15881. content: selectDatePanelObj.y
  15882. },
  15883. on: {
  15884. click: $xeCalendar.dateToggleYearTypeEvent
  15885. }
  15886. }), selectDatePanelObj.m ? h(src_button, {
  15887. props: {
  15888. content: selectDatePanelObj.m
  15889. },
  15890. on: {
  15891. click: $xeCalendar.dateToggleMonthTypeEvent
  15892. }
  15893. }) : renderEmptyElement($xeCalendar)])]), h('div', {
  15894. class: 'vxe-calendar--btn-wrapper'
  15895. }, [h(src_button, {
  15896. props: {
  15897. disabled: isDisabledPrevDateBtn,
  15898. icon: 'vxe-icon-caret-left'
  15899. },
  15900. on: {
  15901. click: $xeCalendar.datePrevEvent
  15902. }
  15903. }), h(src_button, {
  15904. props: {
  15905. icon: 'vxe-icon-dot'
  15906. },
  15907. on: {
  15908. click: $xeCalendar.dateTodayMonthEvent
  15909. }
  15910. }), h(src_button, {
  15911. props: {
  15912. disabled: isDisabledNextDateBtn,
  15913. icon: 'vxe-icon-caret-right'
  15914. },
  15915. on: {
  15916. click: $xeCalendar.dateNextEvent
  15917. }
  15918. }), multiple && $xeCalendar.computeSupportMultiples ? h('span', {
  15919. class: 'vxe-calendar--btn vxe-calendar--confirm-btn'
  15920. }, [h('button', {
  15921. class: 'vxe-calendar--confirm',
  15922. attrs: {
  15923. type: 'button'
  15924. },
  15925. on: {
  15926. click: $xeCalendar.dateConfirmEvent
  15927. }
  15928. }, getI18n('vxe.button.confirm'))]) : null])]), h('div', {
  15929. class: 'vxe-calendar--body'
  15930. }, $xeCalendar.renderDateTable(h))];
  15931. },
  15932. renderVN: function renderVN(h) {
  15933. var $xeCalendar = this;
  15934. var props = $xeCalendar;
  15935. var className = props.className,
  15936. type = props.type;
  15937. var vSize = $xeCalendar.computeSize;
  15938. var isDisabled = $xeCalendar.computeIsDisabled;
  15939. var calendarStyle = $xeCalendar.computeCalendarStyle;
  15940. return h('div', {
  15941. ref: 'refElem',
  15942. class: ['vxe-calendar', "type--".concat(type), className, _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--disabled', isDisabled)],
  15943. style: calendarStyle
  15944. }, [$xeCalendar.renderDatePanel(h)]);
  15945. }
  15946. },
  15947. watch: {
  15948. value: function value(val) {
  15949. var $xeCalendar = this;
  15950. var reactData = $xeCalendar.reactData;
  15951. reactData.inputValue = val;
  15952. $xeCalendar.changeValue();
  15953. },
  15954. type: function type() {
  15955. var $xeCalendar = this;
  15956. var reactData = $xeCalendar.reactData;
  15957. // 切换类型是重置内置变量
  15958. Object.assign(reactData, {
  15959. selectValue: null,
  15960. inputValue: null,
  15961. datePanelValue: null,
  15962. datePanelLabel: '',
  15963. datePanelType: 'day',
  15964. selectMonth: null,
  15965. currentDate: null
  15966. });
  15967. $xeCalendar.initValue();
  15968. $xeCalendar.dateOpenPanel();
  15969. },
  15970. computeDateLabelFormat: function computeDateLabelFormat() {
  15971. var $xeCalendar = this;
  15972. var props = $xeCalendar;
  15973. var reactData = $xeCalendar.reactData;
  15974. var isCalendarType = $xeCalendar.computeIsCalendarType;
  15975. if (isCalendarType) {
  15976. $xeCalendar.dateParseValue(reactData.datePanelValue);
  15977. reactData.inputValue = props.multiple ? $xeCalendar.computeDateMultipleLabel : reactData.datePanelLabel;
  15978. }
  15979. }
  15980. },
  15981. created: function created() {
  15982. var $xeCalendar = this;
  15983. var props = $xeCalendar;
  15984. var reactData = $xeCalendar.reactData;
  15985. reactData.selectValue = props.value;
  15986. reactData.inputValue = props.value;
  15987. $xeCalendar.initValue();
  15988. },
  15989. mounted: function mounted() {
  15990. var $xeCalendar = this;
  15991. $xeCalendar.dateOpenPanel();
  15992. },
  15993. render: function render(h) {
  15994. return this.renderVN(h);
  15995. }
  15996. })); /* define-vxe-component end */
  15997. ;// CONCATENATED MODULE: ./packages/calendar/index.ts
  15998. var VxeCalendar = Object.assign({}, calendar, {
  15999. install: function install(app) {
  16000. app.component(calendar.name, calendar);
  16001. }
  16002. });
  16003. dynamicApp.use(VxeCalendar);
  16004. index_esm_VxeUI.component(calendar);
  16005. var Calendar = VxeCalendar;
  16006. /* harmony default export */ var packages_calendar = (VxeCalendar);
  16007. ;// CONCATENATED MODULE: ./packages/loading/src/loading.ts
  16008. /* harmony default export */ var src_loading = (/* define-vxe-component start */defineVxeComponent({
  16009. name: 'VxeLoading',
  16010. mixins: [globalMixins.sizeMixin],
  16011. props: {
  16012. value: Boolean,
  16013. icon: {
  16014. type: String,
  16015. default: function _default() {
  16016. return getConfig().loading.icon;
  16017. }
  16018. },
  16019. showIcon: {
  16020. type: Boolean,
  16021. default: function _default() {
  16022. return getConfig().loading.showIcon;
  16023. }
  16024. },
  16025. text: {
  16026. type: String,
  16027. default: function _default() {
  16028. return getConfig().loading.text;
  16029. }
  16030. },
  16031. showText: {
  16032. type: Boolean,
  16033. default: function _default() {
  16034. return getConfig().loading.showText;
  16035. }
  16036. },
  16037. status: String,
  16038. size: {
  16039. type: String,
  16040. default: function _default() {
  16041. return getConfig().loading.size || getConfig().size;
  16042. }
  16043. }
  16044. },
  16045. data: function data() {
  16046. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  16047. var reactData = {
  16048. initialized: false
  16049. };
  16050. return {
  16051. xID: xID,
  16052. reactData: reactData
  16053. };
  16054. },
  16055. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  16056. computeLoadingIcon: function computeLoadingIcon() {
  16057. var $xeLoading = this;
  16058. var props = $xeLoading;
  16059. return props.icon || getIcon().LOADING;
  16060. },
  16061. computeLoadingText: function computeLoadingText() {
  16062. var $xeLoading = this;
  16063. var props = $xeLoading;
  16064. var text = props.text;
  16065. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(text) ? text : getI18n('vxe.loading.text');
  16066. }
  16067. }),
  16068. watch: {
  16069. value: function value() {
  16070. this.handleInit();
  16071. }
  16072. },
  16073. methods: {
  16074. //
  16075. // Method
  16076. //
  16077. dispatchEvent: function dispatchEvent(type, params, evnt) {
  16078. var $xeLoading = this;
  16079. $xeLoading.$emit(type, createEvent(evnt, {
  16080. $loading: $xeLoading
  16081. }, params));
  16082. },
  16083. emitModel: function emitModel(value) {
  16084. var $xeLoading = this;
  16085. var _events = $xeLoading._events;
  16086. $xeLoading.$emit('input', value);
  16087. if (_events && _events.modelValue) {
  16088. $xeLoading.$emit('modelValue', value);
  16089. } else {
  16090. $xeLoading.$emit('model-value', value);
  16091. }
  16092. },
  16093. handleInit: function handleInit() {
  16094. var $xeLoading = this;
  16095. var reactData = $xeLoading.reactData;
  16096. if (!reactData.initialized) {
  16097. reactData.initialized = !!reactData.initialized;
  16098. }
  16099. },
  16100. //
  16101. //
  16102. // Render
  16103. //
  16104. renderVN: function renderVN(h) {
  16105. var $xeLoading = this;
  16106. var props = $xeLoading;
  16107. var slots = $xeLoading.$scopedSlots;
  16108. var reactData = $xeLoading.reactData;
  16109. var value = props.value,
  16110. showIcon = props.showIcon,
  16111. status = props.status;
  16112. var initialized = reactData.initialized;
  16113. var vSize = $xeLoading.computeSize;
  16114. var defaultSlot = slots.default;
  16115. var textSlot = slots.text;
  16116. var iconSlot = slots.icon;
  16117. var loadingIcon = $xeLoading.computeLoadingIcon;
  16118. var loadingText = $xeLoading.computeLoadingText;
  16119. if (!initialized && !value) {
  16120. return renderEmptyElement($xeLoading);
  16121. }
  16122. return h('div', {
  16123. class: ['vxe-loading', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'is--visible', value)]
  16124. }, defaultSlot ? [h('div', {
  16125. class: 'vxe-loading--wrapper'
  16126. }, vn_getSlotVNs(defaultSlot({})))] : [h('div', {
  16127. class: 'vxe-loading--chunk'
  16128. }, [showIcon && (iconSlot || loadingIcon) ? h('div', {
  16129. class: 'vxe-loading--icon'
  16130. }, iconSlot ? vn_getSlotVNs(iconSlot({})) : [h('i', {
  16131. class: loadingIcon
  16132. })]) : h('div', {
  16133. class: 'vxe-loading--spinner'
  16134. }), textSlot || loadingText ? h('div', {
  16135. class: 'vxe-loading--text'
  16136. }, textSlot ? vn_getSlotVNs(textSlot({})) : "".concat(loadingText)) : null])]);
  16137. }
  16138. },
  16139. render: function render(h) {
  16140. return this.renderVN(h);
  16141. }
  16142. })); /* define-vxe-component end */
  16143. ;// CONCATENATED MODULE: ./packages/card/src/card.ts
  16144. /* harmony default export */ var card = (/* define-vxe-component start */defineVxeComponent({
  16145. name: 'VxeCard',
  16146. mixins: [globalMixins.sizeMixin],
  16147. props: {
  16148. title: String,
  16149. showTitleOverflow: {
  16150. type: Boolean,
  16151. default: function _default() {
  16152. return getConfig().card.showTitleOverflow;
  16153. }
  16154. },
  16155. width: [String, Number],
  16156. height: [String, Number],
  16157. border: {
  16158. type: Boolean,
  16159. default: function _default() {
  16160. return getConfig().card.border;
  16161. }
  16162. },
  16163. loading: Boolean,
  16164. shadow: {
  16165. type: Boolean,
  16166. default: function _default() {
  16167. return getConfig().card.shadow;
  16168. }
  16169. },
  16170. padding: {
  16171. type: Boolean,
  16172. default: function _default() {
  16173. return getConfig().card.padding;
  16174. }
  16175. },
  16176. size: {
  16177. type: String,
  16178. default: function _default() {
  16179. return getConfig().card.size || getConfig().size;
  16180. }
  16181. }
  16182. },
  16183. data: function data() {
  16184. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  16185. var reactData = {};
  16186. return {
  16187. xID: xID,
  16188. reactData: reactData
  16189. };
  16190. },
  16191. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  16192. computeCardStyle: function computeCardStyle() {
  16193. var $xeCard = this;
  16194. var props = $xeCard;
  16195. var height = props.height,
  16196. width = props.width;
  16197. var stys = {};
  16198. if (width) {
  16199. stys.width = toCssUnit(width);
  16200. }
  16201. if (height) {
  16202. stys.height = toCssUnit(height);
  16203. }
  16204. return stys;
  16205. }
  16206. }),
  16207. methods: {
  16208. //
  16209. // Method
  16210. //
  16211. dispatchEvent: function dispatchEvent(type, params, evnt) {
  16212. var $xeCard = this;
  16213. $xeCard.$emit(type, createEvent(evnt, {
  16214. $card: $xeCard
  16215. }, params));
  16216. },
  16217. //
  16218. // Render
  16219. //
  16220. renderVN: function renderVN(h) {
  16221. var $xeCard = this;
  16222. var props = $xeCard;
  16223. var slots = $xeCard.$scopedSlots;
  16224. var title = props.title,
  16225. border = props.border,
  16226. shadow = props.shadow,
  16227. padding = props.padding,
  16228. loading = props.loading,
  16229. showTitleOverflow = props.showTitleOverflow;
  16230. var defaultSlot = slots.default;
  16231. var headerSlot = slots.header;
  16232. var titleSlot = slots.title;
  16233. var extraSlot = slots.extra;
  16234. var footerSlot = slots.footer;
  16235. var leftSlot = slots.left;
  16236. var rightSlot = slots.right;
  16237. var vSize = $xeCard.computeSize;
  16238. var cardStyle = $xeCard.computeCardStyle;
  16239. return h('div', {
  16240. ref: 'refElem',
  16241. class: ['vxe-card', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--border', border), 'is--shadow', shadow), 'is--padding', padding)],
  16242. style: cardStyle
  16243. }, [title || titleSlot || headerSlot ? h('div', {
  16244. class: 'vxe-card--header'
  16245. }, headerSlot ? vn_getSlotVNs(headerSlot({})) : [h('div', {
  16246. class: ['vxe-card--header-title', {
  16247. 'is--ellipsis': showTitleOverflow
  16248. }]
  16249. }, titleSlot ? vn_getSlotVNs(titleSlot({})) : "".concat(title || '')), extraSlot ? h('div', {
  16250. class: 'vxe-card--header-extra'
  16251. }, vn_getSlotVNs(extraSlot({}))) : renderEmptyElement($xeCard)]) : renderEmptyElement($xeCard), h('div', {
  16252. class: 'vxe-card--body'
  16253. }, [leftSlot ? h('div', {
  16254. class: 'vxe-card--body-left'
  16255. }, vn_getSlotVNs(leftSlot({}))) : renderEmptyElement($xeCard), h('div', {
  16256. class: 'vxe-card--body-content'
  16257. }, defaultSlot ? vn_getSlotVNs(defaultSlot({})) : []), rightSlot ? h('div', {
  16258. class: 'vxe-card--body-right'
  16259. }, vn_getSlotVNs(rightSlot({}))) : renderEmptyElement($xeCard)]), footerSlot ? h('div', {
  16260. class: 'vxe-card--footer'
  16261. }, vn_getSlotVNs(footerSlot({}))) : renderEmptyElement($xeCard),
  16262. /**
  16263. * 加载中
  16264. */
  16265. h(src_loading, {
  16266. class: 'vxe-card--loading',
  16267. props: {
  16268. value: loading
  16269. }
  16270. })]);
  16271. }
  16272. },
  16273. render: function render(h) {
  16274. return this.renderVN(h);
  16275. }
  16276. })); /* define-vxe-component end */
  16277. ;// CONCATENATED MODULE: ./packages/card/index.ts
  16278. var VxeCard = Object.assign({}, card, {
  16279. install: function install(app) {
  16280. app.component(card.name, card);
  16281. }
  16282. });
  16283. dynamicApp.use(VxeCard);
  16284. index_esm_VxeUI.component(card);
  16285. var Card = VxeCard;
  16286. /* harmony default export */ var packages_card = (VxeCard);
  16287. ;// CONCATENATED MODULE: ./packages/carousel/src/carousel.ts
  16288. /* harmony default export */ var carousel = (/* define-vxe-component start */defineVxeComponent({
  16289. name: 'VxeCarousel',
  16290. mixins: [globalMixins.sizeMixin],
  16291. props: {
  16292. value: [String, Number],
  16293. options: Array,
  16294. loading: Boolean,
  16295. height: {
  16296. type: [Number, String],
  16297. default: function _default() {
  16298. return getConfig().carousel.height;
  16299. }
  16300. },
  16301. width: {
  16302. type: [Number, String],
  16303. default: function _default() {
  16304. return getConfig().carousel.width;
  16305. }
  16306. },
  16307. autoPlay: {
  16308. type: Boolean,
  16309. default: function _default() {
  16310. return getConfig().carousel.autoPlay;
  16311. }
  16312. },
  16313. interval: {
  16314. type: [Number, String],
  16315. default: function _default() {
  16316. return getConfig().carousel.interval;
  16317. }
  16318. },
  16319. loop: {
  16320. type: Boolean,
  16321. default: function _default() {
  16322. return getConfig().carousel.loop;
  16323. }
  16324. },
  16325. vertical: {
  16326. type: Boolean,
  16327. default: function _default() {
  16328. return getConfig().carousel.vertical;
  16329. }
  16330. },
  16331. showIndicators: {
  16332. type: Boolean,
  16333. default: function _default() {
  16334. return getConfig().carousel.showIndicators;
  16335. }
  16336. }
  16337. },
  16338. data: function data() {
  16339. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  16340. var reactData = {
  16341. activeName: '',
  16342. staticItems: [],
  16343. itemWidth: 0,
  16344. itemHeight: 0
  16345. };
  16346. var internalData = {
  16347. apTimeout: undefined,
  16348. stopFlag: false
  16349. };
  16350. return {
  16351. xID: xID,
  16352. reactData: reactData,
  16353. internalData: internalData
  16354. };
  16355. },
  16356. provide: function provide() {
  16357. var $xeCarousel = this;
  16358. return {
  16359. $xeCarousel: $xeCarousel
  16360. };
  16361. },
  16362. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  16363. computeListStyle: function computeListStyle() {
  16364. var $xeCarousel = this;
  16365. var props = $xeCarousel;
  16366. var reactData = $xeCarousel.reactData;
  16367. var vertical = props.vertical,
  16368. options = props.options;
  16369. var activeName = reactData.activeName,
  16370. itemWidth = reactData.itemWidth,
  16371. itemHeight = reactData.itemHeight,
  16372. staticItems = reactData.staticItems;
  16373. var list = (staticItems && staticItems.length ? staticItems : options) || [];
  16374. var activeIndex = Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(list, function (item) {
  16375. return item.name === activeName;
  16376. }));
  16377. var stys = {};
  16378. if (vertical) {
  16379. stys.transform = "translateY(-".concat(activeIndex * itemHeight, "px)");
  16380. } else {
  16381. stys.width = "".concat(itemWidth * list.length, "px");
  16382. stys.transform = "translateX(-".concat(activeIndex * itemWidth, "px)");
  16383. }
  16384. return stys;
  16385. }
  16386. }),
  16387. methods: {
  16388. //
  16389. // Method
  16390. //
  16391. dispatchEvent: function dispatchEvent(type, params, evnt) {
  16392. var $xeCarousel = this;
  16393. $xeCarousel.$emit(type, createEvent(evnt, {
  16394. $carousel: $xeCarousel
  16395. }, params));
  16396. },
  16397. prev: function prev() {
  16398. var $xeCarousel = this;
  16399. if ($xeCarousel.handlePrevNext(false)) {
  16400. $xeCarousel.handleAutoPlay();
  16401. }
  16402. return $xeCarousel.$nextTick();
  16403. },
  16404. next: function next() {
  16405. var $xeCarousel = this;
  16406. if ($xeCarousel.handlePrevNext(true)) {
  16407. $xeCarousel.handleAutoPlay();
  16408. }
  16409. return $xeCarousel.$nextTick();
  16410. },
  16411. updateStyle: function updateStyle() {
  16412. var $xeCarousel = this;
  16413. var reactData = $xeCarousel.reactData;
  16414. $xeCarousel.$nextTick(function () {
  16415. var wrapperElem = $xeCarousel.$refs.refWrapperElem;
  16416. if (wrapperElem) {
  16417. reactData.itemWidth = wrapperElem.clientWidth;
  16418. reactData.itemHeight = wrapperElem.clientHeight;
  16419. }
  16420. });
  16421. },
  16422. clickItemEvent: function clickItemEvent(evnt, item) {
  16423. var $xeCarousel = this;
  16424. var reactData = $xeCarousel.reactData;
  16425. var value = item.name;
  16426. reactData.activeName = item.name;
  16427. $xeCarousel.$emit('input', value);
  16428. $xeCarousel.$emit('change', {
  16429. value: value
  16430. }, evnt);
  16431. $xeCarousel.updateStyle();
  16432. },
  16433. initDefaultActive: function initDefaultActive(list) {
  16434. var $xeCarousel = this;
  16435. var props = $xeCarousel;
  16436. var reactData = $xeCarousel.reactData;
  16437. var activeName = null;
  16438. if (list && list.length) {
  16439. var validVal = false;
  16440. activeName = props.value;
  16441. list.forEach(function (item) {
  16442. if (activeName === item.name) {
  16443. validVal = true;
  16444. }
  16445. });
  16446. if (!validVal) {
  16447. activeName = list[0].name;
  16448. $xeCarousel.$emit('input', activeName);
  16449. }
  16450. }
  16451. reactData.activeName = activeName;
  16452. },
  16453. handlePrevNext: function handlePrevNext(isNext) {
  16454. var $xeCarousel = this;
  16455. var props = $xeCarousel;
  16456. var reactData = $xeCarousel.reactData;
  16457. var options = props.options,
  16458. loop = props.loop;
  16459. var activeName = reactData.activeName,
  16460. staticItems = reactData.staticItems;
  16461. var list = (staticItems && staticItems.length ? staticItems : options) || [];
  16462. var index = Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(list, function (item) {
  16463. return item.name === activeName;
  16464. }));
  16465. if (index > -1) {
  16466. var item = null;
  16467. if (isNext) {
  16468. if (index < list.length - 1) {
  16469. item = list[index + 1];
  16470. } else {
  16471. if (loop) {
  16472. item = list[0];
  16473. }
  16474. }
  16475. } else {
  16476. if (index > 0) {
  16477. item = list[index - 1];
  16478. } else {
  16479. if (loop) {
  16480. item = list[list.length - 1];
  16481. }
  16482. }
  16483. }
  16484. if (item) {
  16485. var name = item.name;
  16486. var value = name;
  16487. reactData.activeName = name;
  16488. $xeCarousel.$emit('input', value);
  16489. return true;
  16490. }
  16491. }
  16492. return false;
  16493. },
  16494. prevEvent: function prevEvent(evnt) {
  16495. var $xeCarousel = this;
  16496. var reactData = $xeCarousel.reactData;
  16497. if ($xeCarousel.handlePrevNext(false)) {
  16498. var value = reactData.activeName;
  16499. $xeCarousel.$emit('change', {
  16500. value: value
  16501. }, evnt);
  16502. }
  16503. },
  16504. nextEvent: function nextEvent(evnt) {
  16505. var $xeCarousel = this;
  16506. var reactData = $xeCarousel.reactData;
  16507. if ($xeCarousel.handlePrevNext(true)) {
  16508. var value = reactData.activeName;
  16509. $xeCarousel.$emit('change', {
  16510. value: value
  16511. }, evnt);
  16512. }
  16513. },
  16514. stopAutoPlay: function stopAutoPlay() {
  16515. var $xeCarousel = this;
  16516. var internalData = $xeCarousel.internalData;
  16517. var apTimeout = internalData.apTimeout;
  16518. internalData.stopFlag = true;
  16519. if (apTimeout) {
  16520. clearTimeout(apTimeout);
  16521. internalData.apTimeout = undefined;
  16522. }
  16523. },
  16524. handleAutoPlay: function handleAutoPlay() {
  16525. var $xeCarousel = this;
  16526. var props = $xeCarousel;
  16527. var internalData = $xeCarousel.internalData;
  16528. var autoPlay = props.autoPlay,
  16529. interval = props.interval;
  16530. var stopFlag = internalData.stopFlag;
  16531. $xeCarousel.stopAutoPlay();
  16532. if (autoPlay) {
  16533. internalData.stopFlag = false;
  16534. internalData.apTimeout = setTimeout(function () {
  16535. if (!stopFlag) {
  16536. $xeCarousel.handlePrevNext(true);
  16537. }
  16538. }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(interval) || 300);
  16539. }
  16540. },
  16541. mouseenterEvent: function mouseenterEvent() {
  16542. var $xeCarousel = this;
  16543. $xeCarousel.stopAutoPlay();
  16544. },
  16545. mouseleaveEvent: function mouseleaveEvent() {
  16546. var $xeCarousel = this;
  16547. $xeCarousel.handleAutoPlay();
  16548. },
  16549. callSlot: function callSlot(slotFunc, params) {
  16550. var $xeCarousel = this;
  16551. var slots = $xeCarousel.$scopedSlots;
  16552. if (slotFunc) {
  16553. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  16554. slotFunc = slots[slotFunc] || null;
  16555. }
  16556. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  16557. return vn_getSlotVNs(slotFunc(params));
  16558. }
  16559. }
  16560. return [];
  16561. },
  16562. //
  16563. // Render
  16564. //
  16565. renderItemWrapper: function renderItemWrapper(h, list) {
  16566. var $xeCarousel = this;
  16567. var props = $xeCarousel;
  16568. var reactData = $xeCarousel.reactData;
  16569. var height = props.height;
  16570. var activeName = reactData.activeName;
  16571. var listStyle = $xeCarousel.computeListStyle;
  16572. return h('div', {
  16573. class: 'vxe-carousel--list',
  16574. style: listStyle
  16575. }, list.map(function (item) {
  16576. var name = item.name,
  16577. url = item.url,
  16578. slots = item.slots;
  16579. var defaultSlot = slots ? slots.default : null;
  16580. return h('div', {
  16581. key: "".concat(name),
  16582. class: ['vxe-carousel--item-inner', {
  16583. 'is--active': activeName === name
  16584. }],
  16585. style: height ? {
  16586. height: toCssUnit(height)
  16587. } : {}
  16588. }, defaultSlot ? $xeCarousel.callSlot(defaultSlot, {}) : [h('img', {
  16589. class: 'vxe-carousel--item-img',
  16590. attrs: {
  16591. src: url
  16592. }
  16593. })]);
  16594. }));
  16595. },
  16596. renderIndicators: function renderIndicators(h, list) {
  16597. var $xeCarousel = this;
  16598. var reactData = $xeCarousel.reactData;
  16599. var activeName = reactData.activeName;
  16600. return h('div', {
  16601. class: 'vxe-carousel--indicators'
  16602. }, list.map(function (item) {
  16603. var name = item.name;
  16604. return h('div', {
  16605. key: "".concat(name),
  16606. class: ['vxe-carousel--indicators-item', {
  16607. 'is--active': activeName === name
  16608. }],
  16609. on: {
  16610. click: function click(evnt) {
  16611. $xeCarousel.clickItemEvent(evnt, item);
  16612. }
  16613. }
  16614. });
  16615. }));
  16616. },
  16617. renderVN: function renderVN(h) {
  16618. var $xeCarousel = this;
  16619. var props = $xeCarousel;
  16620. var slots = $xeCarousel.$scopedSlots;
  16621. var reactData = $xeCarousel.reactData;
  16622. var loading = props.loading,
  16623. height = props.height,
  16624. width = props.width,
  16625. showIndicators = props.showIndicators,
  16626. vertical = props.vertical,
  16627. options = props.options;
  16628. var staticItems = reactData.staticItems;
  16629. var defaultSlot = slots.default;
  16630. var list = (staticItems && staticItems.length ? staticItems : options) || [];
  16631. return h('div', {
  16632. ref: 'refElem',
  16633. class: ['vxe-carousel', "is--".concat(vertical ? 'vertical' : 'horizontal')],
  16634. style: width ? {
  16635. width: toCssUnit(width)
  16636. } : {},
  16637. on: {
  16638. mouseenter: $xeCarousel.mouseenterEvent,
  16639. mouseleave: $xeCarousel.mouseleaveEvent
  16640. }
  16641. }, [h('div', {
  16642. class: 'vxe-carousel--slots'
  16643. }, defaultSlot ? defaultSlot({}) : []), h('div', {
  16644. ref: 'refWrapperElem',
  16645. class: 'vxe-carousel--item-wrapper',
  16646. style: height ? {
  16647. height: toCssUnit(height)
  16648. } : {}
  16649. }, [$xeCarousel.renderItemWrapper(h, list)]), showIndicators ? $xeCarousel.renderIndicators(h, list) : renderEmptyElement($xeCarousel), h('div', {
  16650. class: 'vxe-carousel--btn-wrapper'
  16651. }, [h('div', {
  16652. class: 'vxe-carousel--previous-btn',
  16653. on: {
  16654. click: $xeCarousel.prevEvent
  16655. }
  16656. }, [h('i', {
  16657. class: vertical ? getIcon().CAROUSEL_VERTICAL_PREVIOUS : getIcon().CAROUSEL_HORIZONTAL_PREVIOUS
  16658. })]), h('div', {
  16659. class: 'vxe-carousel--next-btn',
  16660. on: {
  16661. click: $xeCarousel.nextEvent
  16662. }
  16663. }, [h('i', {
  16664. class: vertical ? getIcon().CAROUSEL_VERTICAL_NEXT : getIcon().CAROUSEL_HORIZONTAL_NEXT
  16665. })])]),
  16666. /**
  16667. * 加载中
  16668. */
  16669. h(src_loading, {
  16670. class: 'vxe-carousel--loading',
  16671. props: {
  16672. value: loading
  16673. }
  16674. })]);
  16675. }
  16676. },
  16677. watch: {
  16678. options: function options() {
  16679. var $xeCarousel = this;
  16680. var props = $xeCarousel;
  16681. $xeCarousel.initDefaultActive(props.options);
  16682. },
  16683. 'reactData.staticItems': function reactDataStaticItems() {
  16684. var $xeCarousel = this;
  16685. var reactData = $xeCarousel.reactData;
  16686. $xeCarousel.initDefaultActive(reactData.staticItems);
  16687. },
  16688. autoPlay: function autoPlay() {
  16689. var $xeCarousel = this;
  16690. $xeCarousel.handleAutoPlay();
  16691. }
  16692. },
  16693. created: function created() {
  16694. var $xeCarousel = this;
  16695. var props = $xeCarousel;
  16696. var reactData = $xeCarousel.reactData;
  16697. $xeCarousel.initDefaultActive(reactData.staticItems.length ? reactData.staticItems : props.options);
  16698. },
  16699. mounted: function mounted() {
  16700. var $xeCarousel = this;
  16701. $xeCarousel.handleAutoPlay();
  16702. $xeCarousel.updateStyle();
  16703. },
  16704. beforeDestroy: function beforeDestroy() {
  16705. var $xeCarousel = this;
  16706. $xeCarousel.stopAutoPlay();
  16707. },
  16708. render: function render(h) {
  16709. return this.renderVN(h);
  16710. }
  16711. })); /* define-vxe-component end */
  16712. ;// CONCATENATED MODULE: ./packages/carousel/index.ts
  16713. var VxeCarousel = Object.assign({}, carousel, {
  16714. install: function install(app) {
  16715. app.component(carousel.name, carousel);
  16716. }
  16717. });
  16718. dynamicApp.use(VxeCarousel);
  16719. index_esm_VxeUI.component(carousel);
  16720. var Carousel = VxeCarousel;
  16721. /* harmony default export */ var packages_carousel = (VxeCarousel);
  16722. ;// CONCATENATED MODULE: ./packages/carousel/src/util.ts
  16723. function assembleCarouselItem($xeCarousel, elem, itemConfig) {
  16724. var staticItems = $xeCarousel.reactData.staticItems;
  16725. var parentElem = elem.parentNode;
  16726. if (parentElem) {
  16727. staticItems.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, itemConfig);
  16728. }
  16729. $xeCarousel.reactData.staticItems = staticItems.slice(0);
  16730. }
  16731. function destroyCarouselItem($xeCarousel, itemConfig) {
  16732. var staticItems = $xeCarousel.reactData.staticItems;
  16733. var index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, function (item) {
  16734. return item.id === itemConfig.id;
  16735. });
  16736. if (index > -1) {
  16737. staticItems.splice(index, 1);
  16738. }
  16739. $xeCarousel.reactData.staticItems = staticItems.slice(0);
  16740. }
  16741. ;// CONCATENATED MODULE: ./packages/carousel/src/carousel-item.ts
  16742. /* harmony default export */ var carousel_item = (/* define-vxe-component start */defineVxeComponent({
  16743. name: 'VxeCarouselItem',
  16744. mixins: [globalMixins.sizeMixin],
  16745. props: {
  16746. name: [String, Number],
  16747. className: String,
  16748. url: String
  16749. },
  16750. inject: {
  16751. $xeCarousel: {
  16752. default: null
  16753. }
  16754. },
  16755. data: function data() {
  16756. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  16757. var reactData = {
  16758. currentDate: null
  16759. };
  16760. var itemConfig = {
  16761. id: xID,
  16762. name: '',
  16763. url: '',
  16764. className: '',
  16765. slots: {}
  16766. };
  16767. return {
  16768. xID: xID,
  16769. reactData: reactData,
  16770. itemConfig: itemConfig
  16771. };
  16772. },
  16773. computed: _objectSpread2({}, {}),
  16774. methods: {
  16775. //
  16776. // Method
  16777. //
  16778. dispatchEvent: function dispatchEvent(type, params, evnt) {
  16779. var $xeCarouselItem = this;
  16780. $xeCarouselItem.$emit(type, createEvent(evnt, {
  16781. $carouselItem: $xeCarouselItem
  16782. }, params));
  16783. },
  16784. //
  16785. // Render
  16786. //
  16787. renderVN: function renderVN(h) {
  16788. return h('div', {
  16789. ref: 'refElem'
  16790. });
  16791. }
  16792. },
  16793. watch: {
  16794. name: function name(val) {
  16795. var $xeCarouselItem = this;
  16796. var itemConfig = $xeCarouselItem.itemConfig;
  16797. itemConfig.name = val;
  16798. },
  16799. url: function url(val) {
  16800. var $xeCarouselItem = this;
  16801. var itemConfig = $xeCarouselItem.itemConfig;
  16802. itemConfig.url = val;
  16803. }
  16804. },
  16805. created: function created() {
  16806. var $xeCarouselItem = this;
  16807. var props = $xeCarouselItem;
  16808. var slots = $xeCarouselItem.$scopedSlots;
  16809. var itemConfig = $xeCarouselItem.itemConfig;
  16810. Object.assign(itemConfig, {
  16811. name: props.name,
  16812. url: props.url,
  16813. className: props.className,
  16814. slots: slots
  16815. });
  16816. },
  16817. mounted: function mounted() {
  16818. var $xeCarouselItem = this;
  16819. var slots = $xeCarouselItem.$scopedSlots;
  16820. var itemConfig = $xeCarouselItem.itemConfig;
  16821. var $xeCarousel = $xeCarouselItem.$xeCarousel;
  16822. itemConfig.slots = slots;
  16823. var elem = $xeCarouselItem.$refs.refElem;
  16824. if ($xeCarousel && elem) {
  16825. assembleCarouselItem($xeCarousel, elem, itemConfig);
  16826. }
  16827. },
  16828. beforeDestroy: function beforeDestroy() {
  16829. var $xeCarouselItem = this;
  16830. var itemConfig = $xeCarouselItem.itemConfig;
  16831. var $xeCarousel = $xeCarouselItem.$xeCarousel;
  16832. if ($xeCarousel) {
  16833. destroyCarouselItem($xeCarousel, itemConfig);
  16834. }
  16835. },
  16836. render: function render(h) {
  16837. return this.renderVN(h);
  16838. }
  16839. })); /* define-vxe-component end */
  16840. ;// CONCATENATED MODULE: ./packages/carousel-item/index.ts
  16841. var VxeCarouselItem = Object.assign({}, carousel_item, {
  16842. install: function install(app) {
  16843. app.component(carousel_item.name, carousel_item);
  16844. }
  16845. });
  16846. dynamicApp.use(VxeCarouselItem);
  16847. index_esm_VxeUI.component(carousel_item);
  16848. var CarouselItem = VxeCarouselItem;
  16849. /* harmony default export */ var packages_carousel_item = (VxeCarouselItem);
  16850. ;// CONCATENATED MODULE: ./packages/checkbox/src/checkbox.ts
  16851. /* harmony default export */ var src_checkbox = (/* define-vxe-component start */defineVxeComponent({
  16852. name: 'VxeCheckbox',
  16853. mixins: [globalMixins.sizeMixin],
  16854. props: {
  16855. value: [String, Number, Boolean],
  16856. label: {
  16857. type: [String, Number],
  16858. default: null
  16859. },
  16860. indeterminate: Boolean,
  16861. title: [String, Number],
  16862. checkedValue: {
  16863. type: [String, Number, Boolean],
  16864. default: true
  16865. },
  16866. uncheckedValue: {
  16867. type: [String, Number, Boolean],
  16868. default: false
  16869. },
  16870. content: [String, Number],
  16871. disabled: {
  16872. type: Boolean,
  16873. default: null
  16874. },
  16875. size: {
  16876. type: String,
  16877. default: function _default() {
  16878. return getConfig().checkbox.size || getConfig().size;
  16879. }
  16880. }
  16881. },
  16882. inject: {
  16883. $xeForm: {
  16884. default: null
  16885. },
  16886. formItemInfo: {
  16887. from: 'xeFormItemInfo',
  16888. default: null
  16889. },
  16890. $xeCheckboxGroup: {
  16891. default: null
  16892. }
  16893. },
  16894. data: function data() {
  16895. var reactData = {};
  16896. return {
  16897. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  16898. reactData: reactData
  16899. };
  16900. },
  16901. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  16902. computeIsChecked: function computeIsChecked() {
  16903. var $xeCheckbox = this;
  16904. var props = $xeCheckbox;
  16905. var $xeCheckboxGroup = $xeCheckbox.$xeCheckboxGroup;
  16906. if ($xeCheckboxGroup) {
  16907. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes($xeCheckboxGroup.value, props.label);
  16908. }
  16909. return props.value === props.checkedValue;
  16910. },
  16911. computeIsDisabled: function computeIsDisabled() {
  16912. var $xeCheckbox = this;
  16913. var props = $xeCheckbox;
  16914. var $xeCheckboxGroup = $xeCheckbox.$xeCheckboxGroup;
  16915. var disabled = props.disabled;
  16916. var isChecked = $xeCheckbox.computeIsChecked;
  16917. if (disabled === null) {
  16918. if ($xeCheckboxGroup) {
  16919. var isGroupDisabled = $xeCheckboxGroup.computeIsDisabled;
  16920. var isGroupMaximize = $xeCheckboxGroup.computeIsMaximize;
  16921. return isGroupDisabled || isGroupMaximize && !isChecked;
  16922. }
  16923. }
  16924. return disabled;
  16925. }
  16926. }),
  16927. methods: {
  16928. //
  16929. // Method
  16930. //
  16931. dispatchEvent: function dispatchEvent(type, params, evnt) {
  16932. var $xeCheckbox = this;
  16933. $xeCheckbox.$emit(type, createEvent(evnt, {
  16934. $checkbox: $xeCheckbox
  16935. }, params));
  16936. },
  16937. emitModel: function emitModel(value) {
  16938. var $xeCheckbox = this;
  16939. var _events = $xeCheckbox._events;
  16940. $xeCheckbox.$emit('input', value);
  16941. if (_events && _events.modelValue) {
  16942. $xeCheckbox.$emit('modelValue', value);
  16943. } else {
  16944. $xeCheckbox.$emit('model-value', value);
  16945. }
  16946. },
  16947. changeEvent: function changeEvent(evnt) {
  16948. var $xeCheckbox = this;
  16949. var props = $xeCheckbox;
  16950. var $xeCheckboxGroup = $xeCheckbox.$xeCheckboxGroup;
  16951. var $xeForm = $xeCheckbox.$xeForm;
  16952. var formItemInfo = $xeCheckbox.formItemInfo;
  16953. var checkedValue = props.checkedValue,
  16954. uncheckedValue = props.uncheckedValue;
  16955. var isDisabled = $xeCheckbox.computeIsDisabled;
  16956. if (!isDisabled) {
  16957. var checked = evnt.target.checked;
  16958. var value = checked ? checkedValue : uncheckedValue;
  16959. var params = {
  16960. checked: checked,
  16961. value: value,
  16962. label: props.label
  16963. };
  16964. if ($xeCheckboxGroup) {
  16965. $xeCheckboxGroup.handleChecked(params, evnt);
  16966. } else {
  16967. $xeCheckbox.emitModel(value);
  16968. $xeCheckbox.dispatchEvent('change', params, evnt);
  16969. // 自动更新校验状态
  16970. if ($xeForm && formItemInfo) {
  16971. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  16972. }
  16973. }
  16974. }
  16975. },
  16976. //
  16977. // Render
  16978. //
  16979. renderVN: function renderVN(h) {
  16980. var $xeCheckbox = this;
  16981. var props = $xeCheckbox;
  16982. var slots = $xeCheckbox.$scopedSlots;
  16983. var label = props.label;
  16984. var vSize = $xeCheckbox.computeSize;
  16985. var isDisabled = $xeCheckbox.computeIsDisabled;
  16986. var isChecked = $xeCheckbox.computeIsChecked;
  16987. var indeterminate = !isChecked && props.indeterminate;
  16988. return h('label', {
  16989. key: label,
  16990. class: ['vxe-checkbox vxe-checkbox--default', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--indeterminate', indeterminate), 'is--disabled', isDisabled), 'is--checked', isChecked)],
  16991. attrs: {
  16992. title: props.title
  16993. }
  16994. }, [h('input', {
  16995. class: 'vxe-checkbox--input',
  16996. domProps: {
  16997. checked: isChecked
  16998. },
  16999. attrs: {
  17000. type: 'checkbox',
  17001. disabled: isDisabled
  17002. },
  17003. on: {
  17004. change: $xeCheckbox.changeEvent
  17005. }
  17006. }), h('span', {
  17007. class: ['vxe-checkbox--icon', indeterminate ? getIcon().CHECKBOX_INDETERMINATE : isChecked ? getIcon().CHECKBOX_CHECKED : isDisabled ? getIcon().CHECKBOX_DISABLED_UNCHECKED : getIcon().CHECKBOX_UNCHECKED]
  17008. }), h('span', {
  17009. class: 'vxe-checkbox--label'
  17010. }, slots.default ? slots.default({}) : getFuncText(props.content))]);
  17011. }
  17012. },
  17013. render: function render(h) {
  17014. return this.renderVN(h);
  17015. }
  17016. })); /* define-vxe-component end */
  17017. ;// CONCATENATED MODULE: ./packages/checkbox/index.ts
  17018. var VxeCheckbox = Object.assign(src_checkbox, {
  17019. install: function install(app) {
  17020. app.component(src_checkbox.name, src_checkbox);
  17021. }
  17022. });
  17023. dynamicApp.use(VxeCheckbox);
  17024. index_esm_VxeUI.component(src_checkbox);
  17025. var Checkbox = VxeCheckbox;
  17026. /* harmony default export */ var packages_checkbox = (VxeCheckbox);
  17027. ;// CONCATENATED MODULE: ./packages/checkbox/src/button.ts
  17028. /* harmony default export */ var checkbox_src_button = (/* define-vxe-component start */defineVxeComponent({
  17029. name: 'VxeCheckboxButton',
  17030. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  17031. props: {
  17032. value: [String, Number, Boolean],
  17033. label: {
  17034. type: [String, Number, Boolean],
  17035. default: null
  17036. },
  17037. title: [String, Number],
  17038. checkedValue: {
  17039. type: [String, Number, Boolean],
  17040. default: true
  17041. },
  17042. uncheckedValue: {
  17043. type: [String, Number, Boolean],
  17044. default: false
  17045. },
  17046. content: [String, Number],
  17047. disabled: {
  17048. type: Boolean,
  17049. default: null
  17050. },
  17051. size: {
  17052. type: String,
  17053. default: function _default() {
  17054. return getConfig().checkboxButton.size || getConfig().size;
  17055. }
  17056. }
  17057. },
  17058. inject: {
  17059. $xeForm: {
  17060. default: null
  17061. },
  17062. formItemInfo: {
  17063. from: 'xeFormItemInfo',
  17064. default: null
  17065. },
  17066. $xeCheckboxGroup: {
  17067. default: null
  17068. }
  17069. },
  17070. data: function data() {
  17071. var reactData = {};
  17072. return {
  17073. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  17074. reactData: reactData
  17075. };
  17076. },
  17077. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  17078. computeIsChecked: function computeIsChecked() {
  17079. var $xeCheckbox = this;
  17080. var props = $xeCheckbox;
  17081. var $xeCheckboxGroup = $xeCheckbox.$xeCheckboxGroup;
  17082. if ($xeCheckboxGroup) {
  17083. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes($xeCheckboxGroup.value, props.label);
  17084. }
  17085. return props.value === props.checkedValue;
  17086. },
  17087. computeIsDisabled: function computeIsDisabled() {
  17088. var $xeCheckbox = this;
  17089. var props = $xeCheckbox;
  17090. var $xeCheckboxGroup = $xeCheckbox.$xeCheckboxGroup;
  17091. var disabled = props.disabled;
  17092. var isChecked = $xeCheckbox.computeIsChecked;
  17093. if (disabled === null) {
  17094. if ($xeCheckboxGroup) {
  17095. var isGroupDisabled = $xeCheckboxGroup.computeIsDisabled;
  17096. var isGroupMaximize = $xeCheckboxGroup.computeIsMaximize;
  17097. return isGroupDisabled || isGroupMaximize && !isChecked;
  17098. }
  17099. }
  17100. return disabled;
  17101. }
  17102. }),
  17103. methods: {
  17104. //
  17105. // Method
  17106. //
  17107. dispatchEvent: function dispatchEvent(type, params, evnt) {
  17108. var $xeCheckbox = this;
  17109. $xeCheckbox.$emit(type, createEvent(evnt, {
  17110. $checkbox: $xeCheckbox
  17111. }, params));
  17112. },
  17113. emitModel: function emitModel(value) {
  17114. var $xeCheckbox = this;
  17115. var _events = $xeCheckbox._events;
  17116. $xeCheckbox.$emit('input', value);
  17117. if (_events && _events.modelValue) {
  17118. $xeCheckbox.$emit('modelValue', value);
  17119. } else {
  17120. $xeCheckbox.$emit('model-value', value);
  17121. }
  17122. },
  17123. changeEvent: function changeEvent(evnt) {
  17124. var $xeCheckbox = this;
  17125. var props = $xeCheckbox;
  17126. var $xeCheckboxGroup = $xeCheckbox.$xeCheckboxGroup;
  17127. var $xeForm = $xeCheckbox.$xeForm;
  17128. var formItemInfo = $xeCheckbox.formItemInfo;
  17129. var checkedValue = props.checkedValue,
  17130. uncheckedValue = props.uncheckedValue;
  17131. var isDisabled = $xeCheckbox.computeIsDisabled;
  17132. if (!isDisabled) {
  17133. var checked = evnt.target.checked;
  17134. var value = checked ? checkedValue : uncheckedValue;
  17135. var params = {
  17136. checked: checked,
  17137. value: value,
  17138. label: props.label
  17139. };
  17140. if ($xeCheckboxGroup) {
  17141. $xeCheckboxGroup.handleChecked(params, evnt);
  17142. } else {
  17143. $xeCheckbox.emitModel(value);
  17144. $xeCheckbox.dispatchEvent('change', params, evnt);
  17145. // 自动更新校验状态
  17146. if ($xeForm && formItemInfo) {
  17147. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  17148. }
  17149. }
  17150. }
  17151. },
  17152. //
  17153. // Render
  17154. //
  17155. renderVN: function renderVN(h) {
  17156. var $xeCheckboxButton = this;
  17157. var props = $xeCheckboxButton;
  17158. var slots = $xeCheckboxButton.$scopedSlots;
  17159. var label = props.label;
  17160. var vSize = $xeCheckboxButton.computeSize;
  17161. var isDisabled = $xeCheckboxButton.computeIsDisabled;
  17162. var isChecked = $xeCheckboxButton.computeIsChecked;
  17163. return h('label', {
  17164. key: label,
  17165. class: ['vxe-checkbox vxe-checkbox--button', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--disabled', isDisabled)],
  17166. attrs: {
  17167. title: props.title
  17168. }
  17169. }, [h('input', {
  17170. class: 'vxe-checkbox--input',
  17171. domProps: {
  17172. checked: isChecked
  17173. },
  17174. attrs: {
  17175. type: 'checkbox',
  17176. disabled: isDisabled
  17177. },
  17178. on: {
  17179. change: $xeCheckboxButton.changeEvent
  17180. }
  17181. }), h('span', {
  17182. class: 'vxe-checkbox--label'
  17183. }, slots.default ? slots.default({}) : getFuncText(props.content))]);
  17184. }
  17185. },
  17186. render: function render(h) {
  17187. return this.renderVN(h);
  17188. }
  17189. })); /* define-vxe-component end */
  17190. ;// CONCATENATED MODULE: ./packages/checkbox-button/index.ts
  17191. var VxeCheckboxButton = Object.assign(checkbox_src_button, {
  17192. install: function install(app) {
  17193. app.component(checkbox_src_button.name, checkbox_src_button);
  17194. }
  17195. });
  17196. dynamicApp.use(VxeCheckboxButton);
  17197. index_esm_VxeUI.component(checkbox_src_button);
  17198. var CheckboxButton = VxeCheckboxButton;
  17199. /* harmony default export */ var checkbox_button = (VxeCheckboxButton);
  17200. ;// CONCATENATED MODULE: ./packages/checkbox/src/group.ts
  17201. /* harmony default export */ var group = (/* define-vxe-component start */defineVxeComponent({
  17202. name: 'VxeCheckboxGroup',
  17203. mixins: [globalMixins.sizeMixin],
  17204. props: {
  17205. value: Array,
  17206. options: Array,
  17207. optionProps: Object,
  17208. disabled: {
  17209. type: Boolean,
  17210. default: null
  17211. },
  17212. max: {
  17213. type: [String, Number],
  17214. default: null
  17215. },
  17216. size: {
  17217. type: String,
  17218. default: function _default() {
  17219. return getConfig().checkboxGroup.size || getConfig().size;
  17220. }
  17221. }
  17222. },
  17223. inject: {
  17224. $xeForm: {
  17225. default: null
  17226. },
  17227. formItemInfo: {
  17228. from: 'xeFormItemInfo',
  17229. default: null
  17230. }
  17231. },
  17232. provide: function provide() {
  17233. var $xeCheckboxGroup = this;
  17234. return {
  17235. $xeCheckboxGroup: $xeCheckboxGroup
  17236. };
  17237. },
  17238. data: function data() {
  17239. var reactData = {};
  17240. return {
  17241. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  17242. reactData: reactData
  17243. };
  17244. },
  17245. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  17246. computeIsDisabled: function computeIsDisabled() {
  17247. var $xeCheckboxGroup = this;
  17248. var props = $xeCheckboxGroup;
  17249. var $xeForm = $xeCheckboxGroup.$xeForm;
  17250. var disabled = props.disabled;
  17251. if (disabled === null) {
  17252. if ($xeForm) {
  17253. return $xeForm.readonly || $xeForm.disabled;
  17254. }
  17255. return false;
  17256. }
  17257. return disabled;
  17258. },
  17259. computeIsMaximize: function computeIsMaximize() {
  17260. var $xeCheckboxGroup = this;
  17261. var props = $xeCheckboxGroup;
  17262. var value = props.value,
  17263. max = props.max;
  17264. if (max) {
  17265. return (value ? value.length : 0) >= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(max);
  17266. }
  17267. return false;
  17268. },
  17269. computePropsOpts: function computePropsOpts() {
  17270. var $xeCheckboxGroup = this;
  17271. var props = $xeCheckboxGroup;
  17272. return Object.assign({}, props.optionProps);
  17273. },
  17274. computeLabelField: function computeLabelField() {
  17275. var $xeCheckboxGroup = this;
  17276. var propsOpts = $xeCheckboxGroup.computePropsOpts;
  17277. return propsOpts.label || 'label';
  17278. },
  17279. computeValueField: function computeValueField() {
  17280. var $xeCheckboxGroup = this;
  17281. var propsOpts = $xeCheckboxGroup.computePropsOpts;
  17282. return propsOpts.value || 'value';
  17283. },
  17284. computeDisabledField: function computeDisabledField() {
  17285. var $xeCheckboxGroup = this;
  17286. var propsOpts = $xeCheckboxGroup.computePropsOpts;
  17287. return propsOpts.disabled || 'disabled';
  17288. }
  17289. }),
  17290. methods: {
  17291. //
  17292. // Method
  17293. //
  17294. dispatchEvent: function dispatchEvent(type, params, evnt) {
  17295. var $xeCheckboxGroup = this;
  17296. $xeCheckboxGroup.$emit(type, createEvent(evnt, {
  17297. $checkboxGroup: $xeCheckboxGroup
  17298. }, params));
  17299. },
  17300. emitModel: function emitModel(value) {
  17301. var $xeCheckboxGroup = this;
  17302. var _events = $xeCheckboxGroup._events;
  17303. $xeCheckboxGroup.$emit('input', value);
  17304. if (_events && _events.modelValue) {
  17305. $xeCheckboxGroup.$emit('modelValue', value);
  17306. } else {
  17307. $xeCheckboxGroup.$emit('model-value', value);
  17308. }
  17309. },
  17310. handleChecked: function handleChecked(params, evnt) {
  17311. var $xeCheckboxGroup = this;
  17312. var props = $xeCheckboxGroup;
  17313. var $xeForm = $xeCheckboxGroup.$xeForm;
  17314. var formItemInfo = $xeCheckboxGroup.formItemInfo;
  17315. var checked = params.checked,
  17316. label = params.label;
  17317. var checklist = props.value || [];
  17318. var checkIndex = checklist.indexOf(label);
  17319. if (checked) {
  17320. if (checkIndex === -1) {
  17321. checklist.push(label);
  17322. }
  17323. } else {
  17324. checklist.splice(checkIndex, 1);
  17325. }
  17326. $xeCheckboxGroup.emitModel(checklist);
  17327. $xeCheckboxGroup.dispatchEvent('change', Object.assign({}, params, {
  17328. checklist: checklist,
  17329. value: checklist
  17330. }), evnt);
  17331. // 自动更新校验状态
  17332. if ($xeForm && formItemInfo) {
  17333. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, checklist);
  17334. }
  17335. },
  17336. //
  17337. // Render
  17338. //
  17339. renderVN: function renderVN(h) {
  17340. var $xeCheckboxGroup = this;
  17341. var props = $xeCheckboxGroup;
  17342. var slots = $xeCheckboxGroup.$scopedSlots;
  17343. var options = props.options;
  17344. var defaultSlot = slots.default;
  17345. var valueField = $xeCheckboxGroup.computeValueField;
  17346. var labelField = $xeCheckboxGroup.computeLabelField;
  17347. var disabledField = $xeCheckboxGroup.computeDisabledField;
  17348. return h('div', {
  17349. class: 'vxe-checkbox-group'
  17350. }, defaultSlot ? defaultSlot({}) : options ? options.map(function (item) {
  17351. return h(src_checkbox, {
  17352. key: item[valueField],
  17353. props: {
  17354. label: item[valueField],
  17355. content: item[labelField],
  17356. disabled: item[disabledField]
  17357. }
  17358. });
  17359. }) : []);
  17360. }
  17361. },
  17362. render: function render(h) {
  17363. return this.renderVN(h);
  17364. }
  17365. })); /* define-vxe-component end */
  17366. ;// CONCATENATED MODULE: ./packages/checkbox-group/index.ts
  17367. var VxeCheckboxGroup = Object.assign(group, {
  17368. install: function install(app) {
  17369. app.component(group.name, group);
  17370. }
  17371. });
  17372. dynamicApp.use(VxeCheckboxGroup);
  17373. index_esm_VxeUI.component(group);
  17374. var CheckboxGroup = VxeCheckboxGroup;
  17375. /* harmony default export */ var checkbox_group = (VxeCheckboxGroup);
  17376. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
  17377. function _arrayWithHoles(r) {
  17378. if (Array.isArray(r)) return r;
  17379. }
  17380. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
  17381. function _iterableToArrayLimit(r, l) {
  17382. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  17383. if (null != t) {
  17384. var e,
  17385. n,
  17386. i,
  17387. u,
  17388. a = [],
  17389. f = !0,
  17390. o = !1;
  17391. try {
  17392. if (i = (t = t.call(r)).next, 0 === l) {
  17393. if (Object(t) !== t) return;
  17394. f = !1;
  17395. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
  17396. } catch (r) {
  17397. o = !0, n = r;
  17398. } finally {
  17399. try {
  17400. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  17401. } finally {
  17402. if (o) throw n;
  17403. }
  17404. }
  17405. return a;
  17406. }
  17407. }
  17408. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
  17409. function _nonIterableRest() {
  17410. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  17411. }
  17412. ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
  17413. function _slicedToArray(r, e) {
  17414. return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
  17415. }
  17416. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.fill.js
  17417. var es_array_fill = __webpack_require__(3771);
  17418. ;// CONCATENATED MODULE: ./packages/row/src/col.ts
  17419. /* harmony default export */ var col = (/* define-vxe-component start */defineVxeComponent({
  17420. name: 'VxeCol',
  17421. mixins: [globalMixins.sizeMixin],
  17422. props: {
  17423. span: [Number, String],
  17424. align: String,
  17425. width: [Number, String],
  17426. fill: Boolean,
  17427. ellipsis: Boolean,
  17428. size: {
  17429. type: String,
  17430. default: function _default() {
  17431. return getConfig().col.size || getConfig().size;
  17432. }
  17433. }
  17434. },
  17435. inject: {
  17436. $xeRow: {
  17437. default: null
  17438. }
  17439. },
  17440. data: function data() {
  17441. var reactData = {};
  17442. return {
  17443. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  17444. reactData: reactData
  17445. };
  17446. },
  17447. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  17448. computeRowGutter: function computeRowGutter() {
  17449. var $xeCol = this;
  17450. var $xeRow = $xeCol.$xeRow;
  17451. if ($xeRow) {
  17452. return $xeRow.gutter;
  17453. }
  17454. return null;
  17455. },
  17456. computeRowVertical: function computeRowVertical() {
  17457. var $xeCol = this;
  17458. var $xeRow = $xeCol.$xeRow;
  17459. if ($xeRow) {
  17460. return $xeRow.vertical;
  17461. }
  17462. return null;
  17463. },
  17464. computeColStyle: function computeColStyle() {
  17465. var $xeCol = this;
  17466. var props = $xeCol;
  17467. var width = props.width;
  17468. var rowGutter = $xeCol.computeRowGutter;
  17469. var rowVertical = $xeCol.computeRowVertical;
  17470. var style = {};
  17471. if (rowGutter) {
  17472. var _ref = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rowGutter) ? rowGutter : [rowGutter],
  17473. _ref2 = _slicedToArray(_ref, 2),
  17474. lrGutter = _ref2[0],
  17475. tbGutter = _ref2[1];
  17476. if (rowVertical) {
  17477. tbGutter = lrGutter;
  17478. lrGutter = '';
  17479. }
  17480. if (lrGutter) {
  17481. var padding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(lrGutter) ? toCssUnit(lrGutter / 2) : "calc(".concat(toCssUnit(lrGutter), " / 2)");
  17482. style.paddingLeft = padding;
  17483. style.paddingRight = padding;
  17484. }
  17485. if (tbGutter) {
  17486. var _padding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(tbGutter) ? toCssUnit(tbGutter / 2) : "calc(".concat(toCssUnit(tbGutter), " / 2)");
  17487. style.paddingTop = _padding;
  17488. style.paddingBottom = _padding;
  17489. }
  17490. }
  17491. if (width) {
  17492. style.width = toCssUnit(width);
  17493. }
  17494. return style;
  17495. }
  17496. }),
  17497. methods: {
  17498. //
  17499. // Method
  17500. //
  17501. dispatchEvent: function dispatchEvent(type, params, evnt) {
  17502. var $xeCol = this;
  17503. $xeCol.$emit(type, createEvent(evnt, {
  17504. $col: $xeCol
  17505. }, params));
  17506. },
  17507. //
  17508. // Render
  17509. //
  17510. renderVN: function renderVN(h) {
  17511. var $xeCol = this;
  17512. var props = $xeCol;
  17513. var slots = $xeCol.$scopedSlots;
  17514. var span = props.span,
  17515. fill = props.fill,
  17516. align = props.align,
  17517. width = props.width,
  17518. ellipsis = props.ellipsis;
  17519. var colStyle = $xeCol.computeColStyle;
  17520. var defaultSlot = slots.default;
  17521. return h('div', {
  17522. ref: 'refElem',
  17523. class: ['vxe-col', span ? "span".concat(span) : '', align ? "align--".concat(align) : '', {
  17524. 'is--span': !!span,
  17525. 'is--width': !!width,
  17526. 'is--fill': fill,
  17527. 'is--ellipsis': ellipsis
  17528. }],
  17529. style: colStyle
  17530. }, [h('div', {
  17531. class: 'vxe-col--inner'
  17532. }, defaultSlot ? defaultSlot({}) : [])]);
  17533. }
  17534. },
  17535. render: function render(h) {
  17536. return this.renderVN(h);
  17537. }
  17538. })); /* define-vxe-component end */
  17539. ;// CONCATENATED MODULE: ./packages/col/index.ts
  17540. var VxeCol = Object.assign({}, col, {
  17541. install: function install(app) {
  17542. app.component(col.name, col);
  17543. }
  17544. });
  17545. dynamicApp.use(VxeCol);
  17546. index_esm_VxeUI.component(col);
  17547. var Col = VxeCol;
  17548. /* harmony default export */ var packages_col = (VxeCol);
  17549. ;// CONCATENATED MODULE: ./packages/collapse/src/collapse.ts
  17550. /* harmony default export */ var collapse = (/* define-vxe-component start */defineVxeComponent({
  17551. name: 'VxeCollapse',
  17552. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  17553. props: {
  17554. modelValue: Array,
  17555. options: Array,
  17556. padding: {
  17557. type: Boolean,
  17558. default: function _default() {
  17559. return getConfig().collapse.padding;
  17560. }
  17561. },
  17562. expandConfig: Object,
  17563. size: {
  17564. type: String,
  17565. default: function _default() {
  17566. return getConfig().collapse.size || getConfig().size;
  17567. }
  17568. }
  17569. },
  17570. provide: function provide() {
  17571. var $xeCollapse = this;
  17572. return {
  17573. $xeCollapse: $xeCollapse
  17574. };
  17575. },
  17576. data: function data() {
  17577. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  17578. var reactData = {
  17579. staticPanes: [],
  17580. activeNames: [],
  17581. initNames: [],
  17582. cachePaneMaps: {}
  17583. };
  17584. return {
  17585. xID: xID,
  17586. reactData: reactData
  17587. };
  17588. },
  17589. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  17590. computeItemOptions: function computeItemOptions() {
  17591. var $xeCollapse = this;
  17592. var props = $xeCollapse;
  17593. var options = props.options;
  17594. return (options || []).filter(function (item) {
  17595. return $xeCollapse.handleFilterItem(item);
  17596. });
  17597. },
  17598. computeItemStaticOptions: function computeItemStaticOptions() {
  17599. var $xeCollapse = this;
  17600. var reactData = $xeCollapse.reactData;
  17601. var staticPanes = reactData.staticPanes;
  17602. return staticPanes.filter(function (item) {
  17603. return $xeCollapse.handleFilterItem(item);
  17604. });
  17605. },
  17606. computeExpandOpts: function computeExpandOpts() {
  17607. var $xeCollapse = this;
  17608. var props = $xeCollapse;
  17609. return Object.assign({}, getConfig().collapse.expandConfig, props.expandConfig);
  17610. }
  17611. }),
  17612. methods: {
  17613. //
  17614. // Method
  17615. //
  17616. dispatchEvent: function dispatchEvent(type, params, evnt) {
  17617. var $xeCollapse = this;
  17618. $xeCollapse.$emit(type, createEvent(evnt, {
  17619. $collapse: $xeCollapse
  17620. }, params));
  17621. },
  17622. handleFilterItem: function handleFilterItem(item) {
  17623. var permissionCode = item.permissionCode;
  17624. if (permissionCode) {
  17625. if (!permission.checkVisible(permissionCode)) {
  17626. return false;
  17627. }
  17628. }
  17629. return true;
  17630. },
  17631. addInitName: function addInitName(name) {
  17632. var $xeCollapse = this;
  17633. var reactData = $xeCollapse.reactData;
  17634. var initNames = reactData.initNames;
  17635. if (name && !initNames.includes(name)) {
  17636. initNames.push(name);
  17637. $xeCollapse.dispatchEvent('load', {
  17638. name: name
  17639. }, null);
  17640. return true;
  17641. }
  17642. return false;
  17643. },
  17644. initDefaultName: function initDefaultName(list) {
  17645. var $xeCollapse = this;
  17646. var reactData = $xeCollapse.reactData;
  17647. var activeNames = reactData.activeNames;
  17648. var nameMaps = {};
  17649. if (list && list.length) {
  17650. list.forEach(function (item) {
  17651. var _ref = item || {},
  17652. name = _ref.name,
  17653. preload = _ref.preload;
  17654. if (name) {
  17655. var isActive = activeNames.includes(name);
  17656. nameMaps["".concat(name)] = {
  17657. loading: false
  17658. };
  17659. if (isActive) {
  17660. $xeCollapse.addInitName(name);
  17661. }
  17662. if (preload) {
  17663. if (!isActive) {
  17664. activeNames.push(name);
  17665. }
  17666. }
  17667. }
  17668. });
  17669. }
  17670. reactData.activeNames = activeNames ? activeNames.slice(0) : [];
  17671. reactData.cachePaneMaps = nameMaps;
  17672. },
  17673. callSlot: function callSlot(slotFunc, params, h) {
  17674. var $xeCollapse = this;
  17675. var slots = $xeCollapse.$scopedSlots;
  17676. if (slotFunc) {
  17677. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  17678. slotFunc = slots[slotFunc] || null;
  17679. }
  17680. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  17681. return vn_getSlotVNs(slotFunc.call($xeCollapse, params, h));
  17682. }
  17683. }
  17684. return [];
  17685. },
  17686. handleClickEvent: function handleClickEvent(evnt, item) {
  17687. var $xeCollapse = this;
  17688. var reactData = $xeCollapse.reactData;
  17689. var activeNames = reactData.activeNames;
  17690. var name = item.name;
  17691. if (name) {
  17692. var aIndex = activeNames.indexOf(name);
  17693. var expanded = false;
  17694. if (aIndex === -1) {
  17695. expanded = true;
  17696. activeNames.push(name);
  17697. } else {
  17698. activeNames.splice(aIndex, 1);
  17699. }
  17700. $xeCollapse.addInitName(name);
  17701. $xeCollapse.dispatchEvent('change', {
  17702. value: activeNames,
  17703. name: name
  17704. }, evnt);
  17705. $xeCollapse.dispatchEvent('toggle-expand', {
  17706. value: activeNames,
  17707. name: name,
  17708. expanded: expanded
  17709. }, evnt);
  17710. }
  17711. },
  17712. //
  17713. // Render
  17714. //
  17715. renderList: function renderList(h, itemList) {
  17716. var $xeCollapse = this;
  17717. var reactData = $xeCollapse.reactData;
  17718. var activeNames = reactData.activeNames,
  17719. initNames = reactData.initNames;
  17720. var expandOpts = $xeCollapse.computeExpandOpts;
  17721. return itemList.map(function (item) {
  17722. var icon = item.icon,
  17723. name = item.name,
  17724. title = item.title,
  17725. slots = item.slots;
  17726. var titleSlot = slots ? slots.title : null;
  17727. var defaultSlot = slots ? slots.default : null;
  17728. var isActive = name && activeNames.includes(name);
  17729. return h('div', {
  17730. class: 'vxe-collapse-item'
  17731. }, [h('div', {
  17732. class: 'vxe-collapse--item-header',
  17733. on: {
  17734. click: function click(evnt) {
  17735. $xeCollapse.handleClickEvent(evnt, item);
  17736. }
  17737. }
  17738. }, [expandOpts.showIcon ? h('span', {
  17739. class: 'vxe-collapse--item-switch'
  17740. }, [h('i', {
  17741. class: isActive ? getIcon().COLLAPSE_OPEN : getIcon().COLLAPSE_CLOSE
  17742. })]) : renderEmptyElement($xeCollapse), icon ? h('span', {
  17743. class: 'vxe-collapse--item-icon'
  17744. }, [h('i', {
  17745. class: icon
  17746. })]) : renderEmptyElement($xeCollapse), h('span', {
  17747. class: 'vxe-collapse--item-name'
  17748. }, titleSlot ? $xeCollapse.callSlot(titleSlot, {
  17749. name: name,
  17750. title: title
  17751. }, h) : "".concat(title))]), h('div', {
  17752. class: ['vxe-collapse--item-content', {
  17753. 'is--visible': isActive
  17754. }]
  17755. }, [name && initNames.includes(name) ? h('div', {
  17756. class: 'vxe-collapse--item-inner'
  17757. }, [defaultSlot ? $xeCollapse.callSlot(defaultSlot, {
  17758. name: name,
  17759. title: title
  17760. }, h) : '']) : renderEmptyElement($xeCollapse)])]);
  17761. });
  17762. },
  17763. renderVN: function renderVN(h) {
  17764. var $xeCollapse = this;
  17765. var props = $xeCollapse;
  17766. var slots = $xeCollapse.$scopedSlots;
  17767. var padding = props.padding;
  17768. var vSize = $xeCollapse.computeSize;
  17769. var itemOptions = $xeCollapse.computeItemOptions;
  17770. var itemStaticOptions = $xeCollapse.computeItemStaticOptions;
  17771. var defaultSlot = slots.default;
  17772. var itemList = defaultSlot ? itemStaticOptions : itemOptions;
  17773. return h('div', {
  17774. ref: 'refElem',
  17775. class: ['vxe-collapse', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--padding', padding)]
  17776. }, [h('div', {
  17777. class: 'vxe-collapse-slots'
  17778. }, defaultSlot ? defaultSlot({}) : []), $xeCollapse.renderList(h, itemList)]);
  17779. }
  17780. },
  17781. render: function render(h) {
  17782. return this.renderVN(h);
  17783. }
  17784. })); /* define-vxe-component end */
  17785. ;// CONCATENATED MODULE: ./packages/collapse/index.ts
  17786. var VxeCollapse = Object.assign({}, collapse, {
  17787. install: function install(app) {
  17788. app.component(collapse.name, collapse);
  17789. }
  17790. });
  17791. dynamicApp.use(VxeCollapse);
  17792. index_esm_VxeUI.component(collapse);
  17793. var Collapse = VxeCollapse;
  17794. /* harmony default export */ var packages_collapse = (VxeCollapse);
  17795. ;// CONCATENATED MODULE: ./packages/collapse/src/util.ts
  17796. function assembleCollapseItem($xeCollapse, elem, collapseConfig) {
  17797. var staticPanes = $xeCollapse.reactData.staticPanes;
  17798. var parentElem = elem.parentNode;
  17799. if (parentElem) {
  17800. staticPanes.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, collapseConfig);
  17801. $xeCollapse.reactData.staticPanes = staticPanes.slice(0);
  17802. }
  17803. }
  17804. function destroyCollapseItem($xeCollapse, collapseConfig) {
  17805. var staticPanes = $xeCollapse.reactData.staticPanes;
  17806. var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(staticPanes, function (item) {
  17807. return item.id === collapseConfig.id;
  17808. }, {
  17809. children: 'children'
  17810. });
  17811. if (matchObj) {
  17812. matchObj.items.splice(matchObj.index, 1);
  17813. }
  17814. $xeCollapse.reactData.staticPanes = staticPanes.slice(0);
  17815. }
  17816. ;// CONCATENATED MODULE: ./packages/collapse/src/collapse-pane.ts
  17817. /* harmony default export */ var collapse_pane = (/* define-vxe-component start */defineVxeComponent({
  17818. name: 'VxeCollapsePane',
  17819. props: {
  17820. title: [String, Number],
  17821. name: [String, Number],
  17822. icon: String,
  17823. preload: Boolean,
  17824. permissionCode: [String, Number]
  17825. },
  17826. inject: {
  17827. $xeCollapse: {
  17828. default: null
  17829. }
  17830. },
  17831. data: function data() {
  17832. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  17833. var reactData = {};
  17834. var collapseConfig = {
  17835. id: xID,
  17836. title: '',
  17837. name: '',
  17838. icon: '',
  17839. preload: false,
  17840. permissionCode: '',
  17841. slots: {}
  17842. };
  17843. return {
  17844. xID: xID,
  17845. reactData: reactData,
  17846. collapseConfig: collapseConfig
  17847. };
  17848. },
  17849. computed: _objectSpread2({}, {}),
  17850. methods: {
  17851. //
  17852. // Method
  17853. //
  17854. dispatchEvent: function dispatchEvent(type, params, evnt) {
  17855. var $xeCollapsePane = this;
  17856. $xeCollapsePane.$emit(type, createEvent(evnt, {
  17857. $collapsePane: $xeCollapsePane
  17858. }, params));
  17859. },
  17860. //
  17861. // Render
  17862. //
  17863. renderVN: function renderVN(h) {
  17864. var $xeCollapsePane = this;
  17865. var slots = $xeCollapsePane.$scopedSlots;
  17866. var defaultSlot = slots.default;
  17867. return h('div', {
  17868. ref: 'refElem'
  17869. }, defaultSlot ? defaultSlot({}) : []);
  17870. }
  17871. },
  17872. watch: {
  17873. title: function title(val) {
  17874. var $xeCollapsePane = this;
  17875. var collapseConfig = $xeCollapsePane.collapseConfig;
  17876. collapseConfig.title = val;
  17877. },
  17878. name: function name(val) {
  17879. var $xeCollapsePane = this;
  17880. var collapseConfig = $xeCollapsePane.collapseConfig;
  17881. collapseConfig.name = val;
  17882. },
  17883. icon: function icon(val) {
  17884. var $xeCollapsePane = this;
  17885. var collapseConfig = $xeCollapsePane.collapseConfig;
  17886. collapseConfig.icon = val;
  17887. },
  17888. permissionCode: function permissionCode(val) {
  17889. var $xeCollapsePane = this;
  17890. var collapseConfig = $xeCollapsePane.collapseConfig;
  17891. collapseConfig.permissionCode = val;
  17892. }
  17893. },
  17894. created: function created() {
  17895. var $xeCollapsePane = this;
  17896. var props = $xeCollapsePane;
  17897. var slots = $xeCollapsePane.$scopedSlots;
  17898. var collapseConfig = $xeCollapsePane.collapseConfig;
  17899. Object.assign(collapseConfig, {
  17900. title: props.title,
  17901. name: props.name,
  17902. icon: props.icon,
  17903. preload: props.preload,
  17904. permissionCode: props.permissionCode,
  17905. slots: slots
  17906. });
  17907. },
  17908. mounted: function mounted() {
  17909. var $xeCollapsePane = this;
  17910. var $xeCollapse = $xeCollapsePane.$xeCollapse;
  17911. var slots = $xeCollapsePane.$scopedSlots;
  17912. var collapseConfig = $xeCollapsePane.collapseConfig;
  17913. collapseConfig.slots = slots;
  17914. var elem = $xeCollapsePane.$refs.refElem;
  17915. if ($xeCollapse && elem) {
  17916. assembleCollapseItem($xeCollapse, elem, collapseConfig);
  17917. }
  17918. },
  17919. beforeDestroy: function beforeDestroy() {
  17920. var $xeCollapsePane = this;
  17921. var $xeCollapse = $xeCollapsePane.$xeCollapse;
  17922. var collapseConfig = $xeCollapsePane.collapseConfig;
  17923. if ($xeCollapse) {
  17924. destroyCollapseItem($xeCollapse, collapseConfig);
  17925. }
  17926. },
  17927. render: function render(h) {
  17928. return this.renderVN(h);
  17929. }
  17930. })); /* define-vxe-component end */
  17931. ;// CONCATENATED MODULE: ./packages/collapse-pane/index.ts
  17932. var VxeCollapsePane = Object.assign({}, collapse_pane, {
  17933. install: function install(app) {
  17934. app.component(collapse_pane.name, collapse_pane);
  17935. }
  17936. });
  17937. dynamicApp.use(VxeCollapsePane);
  17938. index_esm_VxeUI.component(collapse_pane);
  17939. var CollapsePane = VxeCollapsePane;
  17940. /* harmony default export */ var packages_collapse_pane = (VxeCollapsePane);
  17941. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
  17942. var es_string_pad_start = __webpack_require__(8156);
  17943. ;// CONCATENATED MODULE: ./packages/color-picker/src/util.ts
  17944. var hexAlphaKeyMaps = {};
  17945. var hexAlphaNumMaps = {};
  17946. 'FF,FC,FA,F7,F5,F2,F0,ED,EB,E8,E6,E3,E0,DE,DB,D9,D6,D4,D1,CF,CC,C9,C7,C4,C2,BF,BD,BA,B8,B5,B3,B0,AD,AB,A8,A6,A3,A1,9E,9C,99,96,94,91,8F,8C,8A,87,85,82,80,7D,7A,78,75,73,70,6E,6B,69,66,63,61,5E,5C,59,57,54,52,4F,4D,4A,47,45,42,40,3D,3B,38,36,33,30,2E,2B,29,26,24,21,1F,1C,1A,17,14,12,0F,0D,0A,08,05,03,00'.split(',').forEach(function (key, i) {
  17947. var num = (100 - i) / 100;
  17948. hexAlphaKeyMaps[key] = num;
  17949. hexAlphaNumMaps[num] = key;
  17950. });
  17951. var rgbRE = /^rgb(a?)\((\d{1,3})[,\s]+(\d{1,3})[,\s]+(\d{1,3})([,//\s]+([0-9.]{1,4})(%?))?\)$/;
  17952. function hasRgb(value) {
  17953. return value && rgbRE.test(value);
  17954. }
  17955. var hexRE = /^(#?)([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;
  17956. function hasHex(value) {
  17957. return value && hexRE.test(value);
  17958. }
  17959. function parseColor(value) {
  17960. var rest = {
  17961. value: '',
  17962. type: '',
  17963. hex: '',
  17964. hexV: '',
  17965. hexA: '',
  17966. r: 0,
  17967. g: 0,
  17968. b: 0,
  17969. a: 1
  17970. };
  17971. if (value) {
  17972. var hexRest = value.match(hexRE);
  17973. if (hexRest) {
  17974. rest.value = value;
  17975. rest.type = 'hex';
  17976. rest.hex = value;
  17977. rest.hexV = hexRest[2];
  17978. rest.hexA = hexRest[3] || '';
  17979. rest.a = (hexRest[3] ? hexAlphaKeyMaps[hexRest[3].toUpperCase()] : 1) || 1;
  17980. }
  17981. var rgbRest = value.match(rgbRE);
  17982. if (rgbRest) {
  17983. rest.value = value;
  17984. rest.type = rgbRest[6] ? 'rgba' : 'rgb';
  17985. rest.r = parseInt(rgbRest[2]);
  17986. rest.g = parseInt(rgbRest[3]);
  17987. rest.b = parseInt(rgbRest[4]);
  17988. rest.a = rgbRest[7] ? parseInt(rgbRest[6]) / 100 : rgbRest[6] ? parseFloat(rgbRest[6]) : 1;
  17989. }
  17990. }
  17991. return rest;
  17992. }
  17993. function updateColorAlpha(value) {
  17994. var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  17995. var colorRest = parseColor(value);
  17996. var type = colorRest.type,
  17997. hexV = colorRest.hexV,
  17998. r = colorRest.r,
  17999. g = colorRest.g,
  18000. b = colorRest.b;
  18001. if (type === 'rgb' || type === 'rgba') {
  18002. return toRgb(r, g, b, alpha);
  18003. }
  18004. if (type === 'hex') {
  18005. return "#".concat(hexV).concat(alpha === 1 ? '' : hexAlphaNumMaps[alpha] || '');
  18006. }
  18007. return '';
  18008. }
  18009. function toRgb(r, g, b, a) {
  18010. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(a)) {
  18011. return "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
  18012. }
  18013. return "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(a, ")");
  18014. }
  18015. function rgbToHex(rgbRest) {
  18016. if (!rgbRest) {
  18017. return '';
  18018. }
  18019. var r = rgbRest.r,
  18020. g = rgbRest.g,
  18021. b = rgbRest.b,
  18022. _rgbRest$a = rgbRest.a,
  18023. a = _rgbRest$a === void 0 ? 1 : _rgbRest$a;
  18024. var hexR = r.toString(16).padStart(2, '0');
  18025. var hexG = g.toString(16).padStart(2, '0');
  18026. var hexB = b.toString(16).padStart(2, '0');
  18027. var hexA = a === 1 ? '' : hexAlphaNumMaps[a] || '';
  18028. // 返回十六进制颜色代码
  18029. return "#".concat(hexR).concat(hexG).concat(hexB).concat(hexA).toUpperCase();
  18030. }
  18031. function rgbToHsv(rgbRest) {
  18032. if (!rgbRest) {
  18033. return null;
  18034. }
  18035. var r = rgbRest.r,
  18036. g = rgbRest.g,
  18037. b = rgbRest.b;
  18038. var rAbs = r / 255;
  18039. var gAbs = g / 255;
  18040. var bAbs = b / 255;
  18041. var h = 0;
  18042. var s = 0;
  18043. var val = Math.max(rAbs, gAbs, bAbs);
  18044. var num = val - Math.min(rAbs, gAbs, bAbs);
  18045. var handleDiff = function handleDiff(c) {
  18046. return (val - c) / 6 / num + 1 / 2;
  18047. };
  18048. if (num === 0) {
  18049. h = s = 0;
  18050. } else {
  18051. s = num / val;
  18052. var rr = handleDiff(rAbs);
  18053. var gg = handleDiff(gAbs);
  18054. var bb = handleDiff(bAbs);
  18055. if (rAbs === val) {
  18056. h = bb - gg;
  18057. } else if (gAbs === val) {
  18058. h = 1 / 3 + rr - bb;
  18059. } else if (bAbs === val) {
  18060. h = 2 / 3 + gg - rr;
  18061. }
  18062. if (h < 0) {
  18063. h += 1;
  18064. } else if (h > 1) {
  18065. h -= 1;
  18066. }
  18067. }
  18068. return {
  18069. h: Math.round(h * 360),
  18070. s: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().round(s, 2),
  18071. v: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().round(val, 2)
  18072. };
  18073. }
  18074. function hsvToRgb(h, s, v) {
  18075. var r = 0;
  18076. var g = 0;
  18077. var b = 0;
  18078. var i = Math.floor(h / 60);
  18079. var f = h / 60 - i;
  18080. var p = v * (1 - s);
  18081. var q = v * (1 - f * s);
  18082. var t = v * (1 - (1 - f) * s);
  18083. switch (i) {
  18084. case 0:
  18085. r = v;
  18086. g = t;
  18087. b = p;
  18088. break;
  18089. case 1:
  18090. r = q;
  18091. g = v;
  18092. b = p;
  18093. break;
  18094. case 2:
  18095. r = p;
  18096. g = v;
  18097. b = t;
  18098. break;
  18099. case 3:
  18100. r = p;
  18101. g = q;
  18102. b = v;
  18103. break;
  18104. case 4:
  18105. r = t;
  18106. g = p;
  18107. b = v;
  18108. break;
  18109. case 5:
  18110. r = v;
  18111. g = p;
  18112. b = q;
  18113. break;
  18114. }
  18115. return {
  18116. r: Math.round(r * 255),
  18117. g: Math.round(g * 255),
  18118. b: Math.round(b * 255)
  18119. };
  18120. }
  18121. function hexToHsv(str) {
  18122. var rgbRest = hexToRgb(str);
  18123. if (rgbRest) {
  18124. return rgbToHsv(rgbRest);
  18125. }
  18126. return null;
  18127. }
  18128. function hexToRgb(str) {
  18129. if (str) {
  18130. var rests = str.match(/^(#?)([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})?$/);
  18131. if (rests) {
  18132. return {
  18133. r: parseInt(rests[2], 16),
  18134. g: parseInt(rests[3], 16),
  18135. b: parseInt(rests[4], 16),
  18136. a: (rests[5] ? hexAlphaKeyMaps[rests[5].toUpperCase()] : 1) || 1
  18137. };
  18138. }
  18139. }
  18140. return null;
  18141. }
  18142. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.to-exponential.js
  18143. var es_number_to_exponential = __webpack_require__(2337);
  18144. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
  18145. var es_promise = __webpack_require__(3362);
  18146. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
  18147. var es_string_trim = __webpack_require__(2762);
  18148. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.to-fixed.js
  18149. var es_number_to_fixed = __webpack_require__(9868);
  18150. ;// CONCATENATED MODULE: ./packages/number-input/src/util.ts
  18151. function handleNumber(val) {
  18152. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val) ? val.replace(/,/g, '') : val;
  18153. }
  18154. function toFloatValueFixed(inputValue, digitsValue) {
  18155. if (/^-/.test('' + inputValue)) {
  18156. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().ceil(inputValue, digitsValue), digitsValue);
  18157. }
  18158. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(inputValue, digitsValue), digitsValue);
  18159. }
  18160. ;// CONCATENATED MODULE: ./packages/input/src/input.ts
  18161. /* harmony default export */ var input = (/* define-vxe-component start */defineVxeComponent({
  18162. name: 'VxeInput',
  18163. mixins: [globalMixins.sizeMixin],
  18164. model: {
  18165. prop: 'value',
  18166. event: 'modelValue'
  18167. },
  18168. props: {
  18169. value: [String, Number, Date],
  18170. immediate: {
  18171. type: Boolean,
  18172. default: true
  18173. },
  18174. name: String,
  18175. title: String,
  18176. type: {
  18177. type: String,
  18178. default: 'text'
  18179. },
  18180. clearable: {
  18181. type: Boolean,
  18182. default: function _default() {
  18183. return getConfig().input.clearable;
  18184. }
  18185. },
  18186. readonly: {
  18187. type: Boolean,
  18188. default: null
  18189. },
  18190. disabled: {
  18191. type: Boolean,
  18192. default: null
  18193. },
  18194. placeholder: {
  18195. type: String,
  18196. default: null
  18197. },
  18198. maxLength: {
  18199. type: [String, Number],
  18200. default: function _default() {
  18201. return getConfig().input.maxLength;
  18202. }
  18203. },
  18204. autoComplete: {
  18205. type: String,
  18206. default: 'off'
  18207. },
  18208. autoFocus: {
  18209. type: Boolean,
  18210. default: null
  18211. },
  18212. align: String,
  18213. form: String,
  18214. className: String,
  18215. size: {
  18216. type: String,
  18217. default: function _default() {
  18218. return getConfig().input.size || getConfig().size;
  18219. }
  18220. },
  18221. multiple: Boolean,
  18222. // text
  18223. showWordCount: Boolean,
  18224. countMethod: Function,
  18225. // number、integer、float
  18226. min: {
  18227. type: [String, Number],
  18228. default: null
  18229. },
  18230. max: {
  18231. type: [String, Number],
  18232. default: null
  18233. },
  18234. step: [String, Number],
  18235. trim: {
  18236. type: Boolean,
  18237. default: function _default() {
  18238. return getConfig().input.trim;
  18239. }
  18240. },
  18241. exponential: {
  18242. type: Boolean,
  18243. default: function _default() {
  18244. return getConfig().input.exponential;
  18245. }
  18246. },
  18247. // number、integer、float、password
  18248. controls: {
  18249. type: Boolean,
  18250. default: function _default() {
  18251. return getConfig().input.controls;
  18252. }
  18253. },
  18254. // float
  18255. digits: {
  18256. type: [String, Number],
  18257. default: function _default() {
  18258. return getConfig().input.digits;
  18259. }
  18260. },
  18261. // date、week、month、quarter、year
  18262. startDate: {
  18263. type: [String, Number, Date],
  18264. default: function _default() {
  18265. return getConfig().input.startDate;
  18266. }
  18267. },
  18268. endDate: {
  18269. type: [String, Number, Date],
  18270. default: function _default() {
  18271. return getConfig().input.endDate;
  18272. }
  18273. },
  18274. minDate: [String, Number, Date],
  18275. maxDate: [String, Number, Date],
  18276. // 已废弃 startWeek,被 startDay 替换
  18277. startWeek: Number,
  18278. startDay: {
  18279. type: [String, Number],
  18280. default: function _default() {
  18281. return getConfig().input.startDay;
  18282. }
  18283. },
  18284. labelFormat: String,
  18285. valueFormat: String,
  18286. editable: {
  18287. type: Boolean,
  18288. default: true
  18289. },
  18290. festivalMethod: {
  18291. type: Function,
  18292. default: function _default() {
  18293. return getConfig().input.festivalMethod;
  18294. }
  18295. },
  18296. disabledMethod: {
  18297. type: Function,
  18298. default: function _default() {
  18299. return getConfig().input.disabledMethod;
  18300. }
  18301. },
  18302. // week
  18303. selectDay: {
  18304. type: [String, Number],
  18305. default: function _default() {
  18306. return getConfig().input.selectDay;
  18307. }
  18308. },
  18309. prefixIcon: String,
  18310. suffixIcon: String,
  18311. placement: String,
  18312. transfer: {
  18313. type: Boolean,
  18314. default: null
  18315. },
  18316. // 已废弃
  18317. maxlength: [String, Number],
  18318. // 已废弃
  18319. autocomplete: String
  18320. },
  18321. inject: {
  18322. $xeSelect: {
  18323. default: null
  18324. },
  18325. $xeTreeSelect: {
  18326. default: null
  18327. },
  18328. $xeModal: {
  18329. default: null
  18330. },
  18331. $xeDrawer: {
  18332. default: null
  18333. },
  18334. $xeTable: {
  18335. default: null
  18336. },
  18337. $xeForm: {
  18338. default: null
  18339. },
  18340. formItemInfo: {
  18341. from: 'xeFormItemInfo',
  18342. default: null
  18343. }
  18344. },
  18345. data: function data() {
  18346. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  18347. var reactData = {
  18348. initialized: false,
  18349. panelIndex: 0,
  18350. showPwd: false,
  18351. visiblePanel: false,
  18352. isAniVisible: false,
  18353. panelStyle: {},
  18354. panelPlacement: '',
  18355. isActivated: false,
  18356. inputValue: '',
  18357. datetimePanelValue: null,
  18358. datePanelValue: null,
  18359. datePanelLabel: '',
  18360. datePanelType: 'day',
  18361. selectMonth: null,
  18362. currentDate: null
  18363. };
  18364. var internalData = {
  18365. yearSize: 12,
  18366. monthSize: 20,
  18367. quarterSize: 8,
  18368. hpTimeout: undefined,
  18369. dnTimeout: undefined
  18370. };
  18371. return {
  18372. xID: xID,
  18373. reactData: reactData,
  18374. internalData: internalData
  18375. };
  18376. },
  18377. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  18378. computeBtnTransfer: function computeBtnTransfer() {
  18379. var $xeInput = this;
  18380. var props = $xeInput;
  18381. var $xeTable = $xeInput.$xeTable;
  18382. var $xeModal = $xeInput.$xeModal;
  18383. var $xeDrawer = $xeInput.$xeDrawer;
  18384. var $xeForm = $xeInput.$xeForm;
  18385. var transfer = props.transfer;
  18386. if (transfer === null) {
  18387. var globalTransfer = getConfig().input.transfer;
  18388. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  18389. return globalTransfer;
  18390. }
  18391. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  18392. return true;
  18393. }
  18394. }
  18395. return transfer;
  18396. },
  18397. computeFormReadonly: function computeFormReadonly() {
  18398. var $xeInput = this;
  18399. var $xeForm = $xeInput.$xeForm;
  18400. if ($xeForm) {
  18401. return $xeForm.readonly;
  18402. }
  18403. return false;
  18404. },
  18405. computeIsReadonly: function computeIsReadonly() {
  18406. var $xeInput = this;
  18407. var props = $xeInput;
  18408. var readonly = props.readonly;
  18409. return readonly;
  18410. },
  18411. computeIsDisabled: function computeIsDisabled() {
  18412. var $xeInput = this;
  18413. var props = $xeInput;
  18414. var $xeForm = $xeInput.$xeForm;
  18415. var disabled = props.disabled;
  18416. if (disabled === null) {
  18417. if ($xeForm) {
  18418. return $xeForm.disabled;
  18419. }
  18420. return false;
  18421. }
  18422. return disabled;
  18423. },
  18424. computeInpMaxLength: function computeInpMaxLength() {
  18425. var $xeInput = this;
  18426. var props = $xeInput;
  18427. var maxLength = props.maxLength,
  18428. maxlength = props.maxlength;
  18429. var maxLen = maxLength || maxlength;
  18430. var isNumType = $xeInput.computeIsNumType;
  18431. // 数值最大长度限制 16 位,包含小数
  18432. if (isNumType) {
  18433. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(maxLen)) {
  18434. return 16;
  18435. }
  18436. }
  18437. return maxLen;
  18438. },
  18439. computeIsDateTimeType: function computeIsDateTimeType() {
  18440. var $xeInput = this;
  18441. var props = $xeInput;
  18442. var type = props.type;
  18443. return type === 'time' || type === 'datetime';
  18444. },
  18445. computeIsNumType: function computeIsNumType() {
  18446. var $xeInput = this;
  18447. var props = $xeInput;
  18448. return ['number', 'integer', 'float'].indexOf(props.type) > -1;
  18449. },
  18450. computeInputCount: function computeInputCount() {
  18451. var $xeInput = this;
  18452. var reactData = $xeInput.reactData;
  18453. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getSize(reactData.inputValue);
  18454. },
  18455. computeIsCountError: function computeIsCountError() {
  18456. var $xeInput = this;
  18457. var inputCount = $xeInput.computeInputCount;
  18458. var inpMaxLength = $xeInput.computeInpMaxLength;
  18459. return inpMaxLength && inputCount > external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inpMaxLength);
  18460. },
  18461. computeIsDatePickerType: function computeIsDatePickerType() {
  18462. var $xeInput = this;
  18463. var props = $xeInput;
  18464. var isDateTimeType = $xeInput.computeIsDateTimeType;
  18465. return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
  18466. },
  18467. computeIsPawdType: function computeIsPawdType() {
  18468. var $xeInput = this;
  18469. var props = $xeInput;
  18470. return props.type === 'password';
  18471. },
  18472. computeIsSearchType: function computeIsSearchType() {
  18473. var $xeInput = this;
  18474. var props = $xeInput;
  18475. return props.type === 'search';
  18476. },
  18477. computeDigitsValue: function computeDigitsValue() {
  18478. var $xeInput = this;
  18479. var props = $xeInput;
  18480. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(props.digits) || 1;
  18481. },
  18482. computeStepValue: function computeStepValue() {
  18483. var $xeInput = this;
  18484. var props = $xeInput;
  18485. var type = props.type;
  18486. var digitsValue = $xeInput.computeDigitsValue;
  18487. var step = props.step;
  18488. if (type === 'integer') {
  18489. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(step) || 1;
  18490. } else if (type === 'float') {
  18491. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(step) || 1 / Math.pow(10, digitsValue);
  18492. }
  18493. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(step) || 1;
  18494. },
  18495. computeIsClearable: function computeIsClearable() {
  18496. var $xeInput = this;
  18497. var props = $xeInput;
  18498. var type = props.type;
  18499. var isNumType = $xeInput.computeIsNumType;
  18500. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18501. var isPawdType = $xeInput.computeIsPawdType;
  18502. return props.clearable && (isPawdType || isNumType || isDatePickerType || type === 'text' || type === 'search');
  18503. },
  18504. computeDateStartTime: function computeDateStartTime() {
  18505. var $xeInput = this;
  18506. var props = $xeInput;
  18507. return props.startDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.startDate) : null;
  18508. },
  18509. computeDateEndTime: function computeDateEndTime() {
  18510. var $xeInput = this;
  18511. var props = $xeInput;
  18512. return props.endDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.endDate) : null;
  18513. },
  18514. computeSupportMultiples: function computeSupportMultiples() {
  18515. var $xeInput = this;
  18516. var props = $xeInput;
  18517. return ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
  18518. },
  18519. computeDateListValue: function computeDateListValue() {
  18520. var $xeInput = this;
  18521. var props = $xeInput;
  18522. var value = props.value,
  18523. multiple = props.multiple;
  18524. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18525. var dateValueFormat = $xeInput.computeDateValueFormat;
  18526. if (multiple && value && isDatePickerType) {
  18527. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(value).split(',').map(function (item) {
  18528. var date = $xeInput.parseDate(item, dateValueFormat);
  18529. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
  18530. return date;
  18531. }
  18532. return date;
  18533. });
  18534. }
  18535. return [];
  18536. },
  18537. computeDateMultipleValue: function computeDateMultipleValue() {
  18538. var $xeInput = this;
  18539. var dateListValue = $xeInput.computeDateListValue;
  18540. var dateValueFormat = $xeInput.computeDateValueFormat;
  18541. return dateListValue.map(function (date) {
  18542. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat);
  18543. });
  18544. },
  18545. computeDateMultipleLabel: function computeDateMultipleLabel() {
  18546. var $xeInput = this;
  18547. var dateListValue = $xeInput.computeDateListValue;
  18548. var dateLabelFormat = $xeInput.computeDateLabelFormat;
  18549. return dateListValue.map(function (date) {
  18550. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateLabelFormat);
  18551. }).join(', ');
  18552. },
  18553. computeDateValueFormat: function computeDateValueFormat() {
  18554. var $xeInput = this;
  18555. var props = $xeInput;
  18556. var type = props.type,
  18557. valueFormat = props.valueFormat;
  18558. if (valueFormat) {
  18559. return valueFormat;
  18560. }
  18561. if (type === 'time') {
  18562. return 'HH:mm:ss';
  18563. }
  18564. if (type === 'datetime') {
  18565. return 'yyyy-MM-dd HH:mm:ss';
  18566. }
  18567. return 'yyyy-MM-dd';
  18568. },
  18569. computeDateValue: function computeDateValue() {
  18570. var $xeInput = this;
  18571. var props = $xeInput;
  18572. var value = props.value;
  18573. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18574. var dateValueFormat = $xeInput.computeDateValueFormat;
  18575. var val = null;
  18576. if (value && isDatePickerType) {
  18577. var date = $xeInput.parseDate(value, dateValueFormat);
  18578. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
  18579. val = date;
  18580. }
  18581. }
  18582. return val;
  18583. },
  18584. computeIsDisabledPrevDateBtn: function computeIsDisabledPrevDateBtn() {
  18585. var $xeInput = this;
  18586. var reactData = $xeInput.reactData;
  18587. var dateStartTime = $xeInput.computeDateStartTime;
  18588. var selectMonth = reactData.selectMonth;
  18589. if (selectMonth && dateStartTime) {
  18590. return selectMonth <= dateStartTime;
  18591. }
  18592. return false;
  18593. },
  18594. computeIsDisabledNextDateBtn: function computeIsDisabledNextDateBtn() {
  18595. var $xeInput = this;
  18596. var reactData = $xeInput.reactData;
  18597. var dateEndTime = $xeInput.computeDateEndTime;
  18598. var selectMonth = reactData.selectMonth;
  18599. if (selectMonth && dateEndTime) {
  18600. return selectMonth >= dateEndTime;
  18601. }
  18602. return false;
  18603. },
  18604. computeDateTimeLabel: function computeDateTimeLabel() {
  18605. var $xeInput = this;
  18606. var reactData = $xeInput.reactData;
  18607. var datetimePanelValue = reactData.datetimePanelValue;
  18608. var hasTimeSecond = $xeInput.computeHasTimeSecond;
  18609. if (datetimePanelValue) {
  18610. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(datetimePanelValue, hasTimeSecond ? 'HH:mm:ss' : 'HH:mm');
  18611. }
  18612. return '';
  18613. },
  18614. computeDateHMSTime: function computeDateHMSTime() {
  18615. var $xeInput = this;
  18616. var dateValue = $xeInput.computeDateValue;
  18617. var isDateTimeType = $xeInput.computeIsDateTimeType;
  18618. return dateValue && isDateTimeType ? (dateValue.getHours() * 3600 + dateValue.getMinutes() * 60 + dateValue.getSeconds()) * 1000 : 0;
  18619. },
  18620. computeDateLabelFormat: function computeDateLabelFormat() {
  18621. var $xeInput = this;
  18622. var props = $xeInput;
  18623. var labelFormat = props.labelFormat;
  18624. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18625. if (isDatePickerType) {
  18626. return labelFormat || getI18n("vxe.input.date.labelFormat.".concat(props.type));
  18627. }
  18628. return '';
  18629. },
  18630. computeYearList: function computeYearList() {
  18631. var $xeInput = this;
  18632. var reactData = $xeInput.reactData;
  18633. var internalData = $xeInput.internalData;
  18634. var selectMonth = reactData.selectMonth,
  18635. currentDate = reactData.currentDate;
  18636. var yearSize = internalData.yearSize;
  18637. var years = [];
  18638. if (selectMonth && currentDate) {
  18639. var currFullYear = currentDate.getFullYear();
  18640. var selectFullYear = selectMonth.getFullYear();
  18641. var startYearDate = new Date(selectFullYear - selectFullYear % yearSize, 0, 1);
  18642. for (var index = -4; index < yearSize + 4; index++) {
  18643. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(startYearDate, index, 'first');
  18644. var itemFullYear = date.getFullYear();
  18645. years.push({
  18646. date: date,
  18647. isCurrent: true,
  18648. isPrev: index < 0,
  18649. isNow: currFullYear === itemFullYear,
  18650. isNext: index >= yearSize,
  18651. year: itemFullYear
  18652. });
  18653. }
  18654. }
  18655. return years;
  18656. },
  18657. computeSelectDatePanelObj: function computeSelectDatePanelObj() {
  18658. var $xeInput = this;
  18659. var reactData = $xeInput.reactData;
  18660. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18661. var y = '';
  18662. var m = '';
  18663. if (isDatePickerType) {
  18664. var datePanelType = reactData.datePanelType,
  18665. selectMonth = reactData.selectMonth;
  18666. var yearList = $xeInput.computeYearList;
  18667. var year = '';
  18668. var month;
  18669. if (selectMonth) {
  18670. year = selectMonth.getFullYear();
  18671. month = selectMonth.getMonth() + 1;
  18672. }
  18673. if (datePanelType === 'quarter' || datePanelType === 'month') {
  18674. y = getI18n('vxe.datePicker.yearTitle', [year]);
  18675. } else if (datePanelType === 'year') {
  18676. y = yearList.length ? "".concat(yearList[0].year, " - ").concat(yearList[yearList.length - 1].year) : '';
  18677. } else {
  18678. y = getI18n('vxe.datePicker.yearTitle', [year]);
  18679. m = month ? getI18n("vxe.input.date.m".concat(month)) : '-';
  18680. }
  18681. }
  18682. return {
  18683. y: y,
  18684. m: m
  18685. };
  18686. },
  18687. computeFirstDayOfWeek: function computeFirstDayOfWeek() {
  18688. var $xeInput = this;
  18689. var props = $xeInput;
  18690. var startDay = props.startDay,
  18691. startWeek = props.startWeek;
  18692. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(startDay) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(startDay) ? startDay : startWeek);
  18693. },
  18694. computeWeekDatas: function computeWeekDatas() {
  18695. var $xeInput = this;
  18696. var weeks = [];
  18697. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18698. if (isDatePickerType) {
  18699. var sWeek = $xeInput.computeFirstDayOfWeek;
  18700. weeks.push(sWeek);
  18701. for (var index = 0; index < 6; index++) {
  18702. if (sWeek >= 6) {
  18703. sWeek = 0;
  18704. } else {
  18705. sWeek++;
  18706. }
  18707. weeks.push(sWeek);
  18708. }
  18709. }
  18710. return weeks;
  18711. },
  18712. computeDateHeaders: function computeDateHeaders() {
  18713. var $xeInput = this;
  18714. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18715. if (isDatePickerType) {
  18716. var weekDatas = $xeInput.computeWeekDatas;
  18717. return weekDatas.map(function (day) {
  18718. return {
  18719. value: day,
  18720. label: getI18n("vxe.input.date.weeks.w".concat(day))
  18721. };
  18722. });
  18723. }
  18724. return [];
  18725. },
  18726. computeWeekHeaders: function computeWeekHeaders() {
  18727. var $xeInput = this;
  18728. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18729. if (isDatePickerType) {
  18730. var dateHeaders = $xeInput.computeDateHeaders;
  18731. return [{
  18732. label: getI18n('vxe.input.date.weeks.w')
  18733. }].concat(dateHeaders);
  18734. }
  18735. return [];
  18736. },
  18737. computeYearDatas: function computeYearDatas() {
  18738. var $xeInput = this;
  18739. var yearList = $xeInput.computeYearList;
  18740. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(yearList, 4);
  18741. },
  18742. computeQuarterList: function computeQuarterList() {
  18743. var $xeInput = this;
  18744. var reactData = $xeInput.reactData;
  18745. var internalData = $xeInput.internalData;
  18746. var selectMonth = reactData.selectMonth,
  18747. currentDate = reactData.currentDate;
  18748. var quarterSize = internalData.quarterSize;
  18749. var quarters = [];
  18750. if (selectMonth && currentDate) {
  18751. var currFullYear = currentDate.getFullYear();
  18752. var currQuarter = getDateQuarter(currentDate);
  18753. var firstYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, 'first');
  18754. var selFullYear = firstYear.getFullYear();
  18755. for (var index = -2; index < quarterSize - 2; index++) {
  18756. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(firstYear, index);
  18757. var itemFullYear = date.getFullYear();
  18758. var itemQuarter = getDateQuarter(date);
  18759. var isPrev = itemFullYear < selFullYear;
  18760. quarters.push({
  18761. date: date,
  18762. isPrev: isPrev,
  18763. isCurrent: itemFullYear === selFullYear,
  18764. isNow: itemFullYear === currFullYear && itemQuarter === currQuarter,
  18765. isNext: !isPrev && itemFullYear > selFullYear,
  18766. quarter: itemQuarter
  18767. });
  18768. }
  18769. }
  18770. return quarters;
  18771. },
  18772. computeQuarterDatas: function computeQuarterDatas() {
  18773. var $xeInput = this;
  18774. var quarterList = $xeInput.computeQuarterList;
  18775. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(quarterList, 2);
  18776. },
  18777. computeMonthList: function computeMonthList() {
  18778. var $xeInput = this;
  18779. var reactData = $xeInput.reactData;
  18780. var internalData = $xeInput.internalData;
  18781. var selectMonth = reactData.selectMonth,
  18782. currentDate = reactData.currentDate;
  18783. var monthSize = internalData.monthSize;
  18784. var months = [];
  18785. if (selectMonth && currentDate) {
  18786. var currFullYear = currentDate.getFullYear();
  18787. var currMonth = currentDate.getMonth();
  18788. var selFullYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, 'first').getFullYear();
  18789. for (var index = -4; index < monthSize - 4; index++) {
  18790. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, index);
  18791. var itemFullYear = date.getFullYear();
  18792. var itemMonth = date.getMonth();
  18793. var isPrev = itemFullYear < selFullYear;
  18794. months.push({
  18795. date: date,
  18796. isPrev: isPrev,
  18797. isCurrent: itemFullYear === selFullYear,
  18798. isNow: itemFullYear === currFullYear && itemMonth === currMonth,
  18799. isNext: !isPrev && itemFullYear > selFullYear,
  18800. month: itemMonth
  18801. });
  18802. }
  18803. }
  18804. return months;
  18805. },
  18806. computeMonthDatas: function computeMonthDatas() {
  18807. var $xeInput = this;
  18808. var monthList = $xeInput.computeMonthList;
  18809. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(monthList, 4);
  18810. },
  18811. computeDayList: function computeDayList() {
  18812. var $xeInput = this;
  18813. var reactData = $xeInput.reactData;
  18814. var selectMonth = reactData.selectMonth,
  18815. currentDate = reactData.currentDate;
  18816. var days = [];
  18817. if (selectMonth && currentDate) {
  18818. var dateHMSTime = $xeInput.computeDateHMSTime;
  18819. var weekDatas = $xeInput.computeWeekDatas;
  18820. var currFullYear = currentDate.getFullYear();
  18821. var currMonth = currentDate.getMonth();
  18822. var currDate = currentDate.getDate();
  18823. var selFullYear = selectMonth.getFullYear();
  18824. var selMonth = selectMonth.getMonth();
  18825. var selDay = selectMonth.getDay();
  18826. var prevOffsetDate = -weekDatas.indexOf(selDay);
  18827. var startDayDate = new Date(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(selectMonth, prevOffsetDate).getTime() + dateHMSTime);
  18828. for (var index = 0; index < 42; index++) {
  18829. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(startDayDate, index);
  18830. var itemFullYear = date.getFullYear();
  18831. var itemMonth = date.getMonth();
  18832. var itemDate = date.getDate();
  18833. var isPrev = date < selectMonth;
  18834. days.push({
  18835. date: date,
  18836. isPrev: isPrev,
  18837. isCurrent: itemFullYear === selFullYear && itemMonth === selMonth,
  18838. isNow: itemFullYear === currFullYear && itemMonth === currMonth && itemDate === currDate,
  18839. isNext: !isPrev && selMonth !== itemMonth,
  18840. label: itemDate
  18841. });
  18842. }
  18843. }
  18844. return days;
  18845. },
  18846. computeDayDatas: function computeDayDatas() {
  18847. var $xeInput = this;
  18848. var dayList = $xeInput.computeDayList;
  18849. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(dayList, 7);
  18850. },
  18851. computeWeekDates: function computeWeekDates() {
  18852. var $xeInput = this;
  18853. var dayDatas = $xeInput.computeDayDatas;
  18854. var firstDayOfWeek = $xeInput.computeFirstDayOfWeek;
  18855. return dayDatas.map(function (list) {
  18856. var firstItem = list[0];
  18857. var item = {
  18858. date: firstItem.date,
  18859. isWeekNumber: true,
  18860. isPrev: false,
  18861. isCurrent: false,
  18862. isNow: false,
  18863. isNext: false,
  18864. label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(firstItem.date, firstDayOfWeek)
  18865. };
  18866. return [item].concat(list);
  18867. });
  18868. },
  18869. computeHourList: function computeHourList() {
  18870. var $xeInput = this;
  18871. var list = [];
  18872. var isDateTimeType = $xeInput.computeIsDateTimeType;
  18873. if (isDateTimeType) {
  18874. for (var index = 0; index < 24; index++) {
  18875. list.push({
  18876. value: index,
  18877. label: ('' + index).padStart(2, '0')
  18878. });
  18879. }
  18880. }
  18881. return list;
  18882. },
  18883. computeMinuteList: function computeMinuteList() {
  18884. var $xeInput = this;
  18885. var list = [];
  18886. var isDateTimeType = $xeInput.computeIsDateTimeType;
  18887. if (isDateTimeType) {
  18888. for (var index = 0; index < 60; index++) {
  18889. list.push({
  18890. value: index,
  18891. label: ('' + index).padStart(2, '0')
  18892. });
  18893. }
  18894. }
  18895. return list;
  18896. },
  18897. computeHasTimeMinute: function computeHasTimeMinute() {
  18898. var $xeInput = this;
  18899. var dateValueFormat = $xeInput.computeDateValueFormat;
  18900. return !/HH/.test(dateValueFormat) || /mm/.test(dateValueFormat);
  18901. },
  18902. computeHasTimeSecond: function computeHasTimeSecond() {
  18903. var $xeInput = this;
  18904. var dateValueFormat = $xeInput.computeDateValueFormat;
  18905. return !/HH/.test(dateValueFormat) || /ss/.test(dateValueFormat);
  18906. },
  18907. computeSecondList: function computeSecondList() {
  18908. var $xeInput = this;
  18909. var minuteList = $xeInput.computeMinuteList;
  18910. return minuteList;
  18911. },
  18912. computeInputReadonly: function computeInputReadonly() {
  18913. var $xeInput = this;
  18914. var props = $xeInput;
  18915. var type = props.type,
  18916. editable = props.editable,
  18917. multiple = props.multiple;
  18918. var isReadonly = $xeInput.computeIsReadonly;
  18919. return isReadonly || multiple || !editable || type === 'week' || type === 'quarter';
  18920. },
  18921. computeInputType: function computeInputType() {
  18922. var $xeInput = this;
  18923. var props = $xeInput;
  18924. var reactData = $xeInput.reactData;
  18925. var type = props.type;
  18926. var showPwd = reactData.showPwd;
  18927. var isNumType = $xeInput.computeIsNumType;
  18928. var isDatePickerType = $xeInput.computeIsDatePickerType;
  18929. var isPawdType = $xeInput.computeIsPawdType;
  18930. if (isDatePickerType || isNumType || isPawdType && showPwd || type === 'number') {
  18931. return 'text';
  18932. }
  18933. return type;
  18934. },
  18935. computeInpPlaceholder: function computeInpPlaceholder() {
  18936. var $xeInput = this;
  18937. var props = $xeInput;
  18938. var placeholder = props.placeholder;
  18939. if (placeholder) {
  18940. return getFuncText(placeholder);
  18941. }
  18942. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(placeholder)) {
  18943. var globalPlaceholder = getConfig().input.placeholder;
  18944. if (globalPlaceholder) {
  18945. return getFuncText(globalPlaceholder);
  18946. }
  18947. return getI18n('vxe.base.pleaseInput');
  18948. }
  18949. return placeholder;
  18950. },
  18951. computeInpImmediate: function computeInpImmediate() {
  18952. var $xeInput = this;
  18953. var props = $xeInput;
  18954. var type = props.type,
  18955. immediate = props.immediate;
  18956. return immediate || !(type === 'text' || type === 'number' || type === 'integer' || type === 'float');
  18957. },
  18958. computeNumValue: function computeNumValue() {
  18959. var $xeInput = this;
  18960. var props = $xeInput;
  18961. var reactData = $xeInput.reactData;
  18962. var type = props.type;
  18963. var inputValue = reactData.inputValue;
  18964. var isNumType = $xeInput.computeIsNumType;
  18965. if (isNumType) {
  18966. return type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(handleNumber(inputValue));
  18967. }
  18968. return 0;
  18969. },
  18970. computeIsDisabledSubtractNumber: function computeIsDisabledSubtractNumber() {
  18971. var $xeInput = this;
  18972. var props = $xeInput;
  18973. var reactData = $xeInput.reactData;
  18974. var min = props.min;
  18975. var inputValue = reactData.inputValue;
  18976. var isNumType = $xeInput.computeIsNumType;
  18977. var numValue = $xeInput.computeNumValue;
  18978. // 当有值时再进行判断
  18979. if ((inputValue || inputValue === 0) && isNumType && min !== null) {
  18980. return numValue <= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(min);
  18981. }
  18982. return false;
  18983. },
  18984. computeIsDisabledAddNumber: function computeIsDisabledAddNumber() {
  18985. var $xeInput = this;
  18986. var props = $xeInput;
  18987. var reactData = $xeInput.reactData;
  18988. var max = props.max;
  18989. var inputValue = reactData.inputValue;
  18990. var isNumType = $xeInput.computeIsNumType;
  18991. var numValue = $xeInput.computeNumValue;
  18992. // 当有值时再进行判断
  18993. if ((inputValue || inputValue === 0) && isNumType && max !== null) {
  18994. return numValue >= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(max);
  18995. }
  18996. return false;
  18997. }
  18998. }),
  18999. methods: {
  19000. //
  19001. // Method
  19002. //
  19003. dispatchEvent: function dispatchEvent(type, params, evnt) {
  19004. var $xeInput = this;
  19005. $xeInput.$emit(type, createEvent(evnt, {
  19006. $input: $xeInput
  19007. }, params));
  19008. },
  19009. emitModel: function emitModel(value) {
  19010. var $xeInput = this;
  19011. var props = $xeInput;
  19012. var trim = props.trim;
  19013. var _events = $xeInput._events;
  19014. if (_events && _events.modelValue) {
  19015. $xeInput.$emit('modelValue', trim ? "".concat(value || '').trim() : value);
  19016. } else {
  19017. $xeInput.$emit('model-value', trim ? "".concat(value || '').trim() : value);
  19018. }
  19019. },
  19020. focus: function focus() {
  19021. var $xeInput = this;
  19022. var reactData = $xeInput.reactData;
  19023. var inputElem = $xeInput.$refs.refInputTarget;
  19024. reactData.isActivated = true;
  19025. inputElem.focus();
  19026. return $xeInput.$nextTick();
  19027. },
  19028. blur: function blur() {
  19029. var $xeInput = this;
  19030. var reactData = $xeInput.reactData;
  19031. var inputElem = $xeInput.$refs.refInputTarget;
  19032. inputElem.blur();
  19033. reactData.isActivated = false;
  19034. return $xeInput.$nextTick();
  19035. },
  19036. select: function select() {
  19037. var $xeInput = this;
  19038. var reactData = $xeInput.reactData;
  19039. var inputElem = $xeInput.$refs.refInputTarget;
  19040. inputElem.select();
  19041. reactData.isActivated = false;
  19042. return $xeInput.$nextTick();
  19043. },
  19044. parseDate: function parseDate(value, format) {
  19045. var $xeInput = this;
  19046. var props = $xeInput;
  19047. var type = props.type;
  19048. if (type === 'time') {
  19049. return toStringTimeDate(value);
  19050. }
  19051. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(value, format);
  19052. },
  19053. getNumberValue: function getNumberValue(val) {
  19054. var $xeInput = this;
  19055. var props = $xeInput;
  19056. var type = props.type,
  19057. exponential = props.exponential;
  19058. var inpMaxLength = $xeInput.computeInpMaxLength;
  19059. var digitsValue = $xeInput.computeDigitsValue;
  19060. var restVal = type === 'float' ? toFloatValueFixed(val, digitsValue) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(val);
  19061. if (exponential && (val === restVal || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(val).toLowerCase() === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(restVal).toExponential())) {
  19062. return val;
  19063. }
  19064. return restVal.slice(0, inpMaxLength);
  19065. },
  19066. triggerEvent: function triggerEvent(evnt) {
  19067. var $xeInput = this;
  19068. var reactData = $xeInput.reactData;
  19069. var inputValue = reactData.inputValue;
  19070. $xeInput.dispatchEvent(evnt.type, {
  19071. value: inputValue
  19072. }, evnt);
  19073. },
  19074. handleChange: function handleChange(value, evnt) {
  19075. var $xeInput = this;
  19076. var props = $xeInput;
  19077. var reactData = $xeInput.reactData;
  19078. var $xeForm = $xeInput.$xeForm;
  19079. var formItemInfo = $xeInput.formItemInfo;
  19080. var $xeSelect = $xeInput.$xeSelect;
  19081. var $xeTreeSelect = $xeInput.$xeTreeSelect;
  19082. if (props.trim) {
  19083. value = "".concat(value || '').trim();
  19084. }
  19085. reactData.inputValue = value;
  19086. $xeInput.emitModel(value);
  19087. $xeInput.dispatchEvent('input', {
  19088. value: value
  19089. }, evnt);
  19090. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(props.value) !== value) {
  19091. $xeInput.dispatchEvent('change', {
  19092. value: value
  19093. }, evnt);
  19094. if (!$xeSelect && !$xeTreeSelect) {
  19095. // 自动更新校验状态
  19096. if ($xeForm && formItemInfo) {
  19097. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  19098. }
  19099. }
  19100. }
  19101. },
  19102. emitInputEvent: function emitInputEvent(value, evnt) {
  19103. var $xeInput = this;
  19104. var reactData = $xeInput.reactData;
  19105. var isDatePickerType = $xeInput.computeIsDatePickerType;
  19106. var inpImmediate = $xeInput.computeInpImmediate;
  19107. reactData.inputValue = value;
  19108. if (!isDatePickerType) {
  19109. if (inpImmediate) {
  19110. $xeInput.handleChange(value, evnt);
  19111. } else {
  19112. $xeInput.dispatchEvent('input', {
  19113. value: value
  19114. }, evnt);
  19115. }
  19116. }
  19117. },
  19118. inputEvent: function inputEvent(evnt) {
  19119. var $xeInput = this;
  19120. var inputElem = evnt.target;
  19121. var value = inputElem.value;
  19122. $xeInput.emitInputEvent(value, evnt);
  19123. },
  19124. changeEvent: function changeEvent(evnt) {
  19125. var $xeInput = this;
  19126. var reactData = $xeInput.reactData;
  19127. var inpImmediate = $xeInput.computeInpImmediate;
  19128. if (!inpImmediate) {
  19129. $xeInput.triggerEvent(evnt);
  19130. }
  19131. $xeInput.dispatchEvent('lazy-change', {
  19132. value: reactData.inputValue
  19133. }, evnt);
  19134. },
  19135. blurEvent: function blurEvent(evnt) {
  19136. var $xeInput = this;
  19137. var reactData = $xeInput.reactData;
  19138. var $xeForm = $xeInput.$xeForm;
  19139. var formItemInfo = $xeInput.formItemInfo;
  19140. var $xeSelect = $xeInput.$xeSelect;
  19141. var $xeTreeSelect = $xeInput.$xeTreeSelect;
  19142. var inputValue = reactData.inputValue;
  19143. var value = inputValue;
  19144. var inpImmediate = $xeInput.computeInpImmediate;
  19145. if (!inpImmediate) {
  19146. $xeInput.handleChange(value, evnt);
  19147. }
  19148. $xeInput.afterCheckValue();
  19149. if (!reactData.visiblePanel) {
  19150. reactData.isActivated = false;
  19151. }
  19152. $xeInput.dispatchEvent('blur', {
  19153. value: value
  19154. }, evnt);
  19155. if (!$xeSelect && !$xeTreeSelect) {
  19156. // 自动更新校验状态
  19157. if ($xeForm && formItemInfo) {
  19158. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  19159. }
  19160. }
  19161. },
  19162. focusEvent: function focusEvent(evnt) {
  19163. var $xeInput = this;
  19164. var reactData = $xeInput.reactData;
  19165. var inputValue = reactData.inputValue;
  19166. var isNumType = $xeInput.computeIsNumType;
  19167. var isDatePickerType = $xeInput.computeIsDatePickerType;
  19168. reactData.isActivated = true;
  19169. if (isNumType) {
  19170. reactData.inputValue = eqEmptyValue(inputValue) ? '' : "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue));
  19171. } else if (isDatePickerType) {
  19172. $xeInput.datePickerOpenEvent(evnt);
  19173. }
  19174. $xeInput.triggerEvent(evnt);
  19175. },
  19176. clickPrefixEvent: function clickPrefixEvent(evnt) {
  19177. var $xeInput = this;
  19178. var reactData = $xeInput.reactData;
  19179. var isDisabled = $xeInput.computeIsDisabled;
  19180. if (!isDisabled) {
  19181. var inputValue = reactData.inputValue;
  19182. $xeInput.dispatchEvent('prefix-click', {
  19183. value: inputValue
  19184. }, evnt);
  19185. }
  19186. },
  19187. hidePanel: function hidePanel() {
  19188. var $xeInput = this;
  19189. var reactData = $xeInput.reactData;
  19190. var internalData = $xeInput.internalData;
  19191. return new Promise(function (resolve) {
  19192. reactData.visiblePanel = false;
  19193. internalData.hpTimeout = setTimeout(function () {
  19194. reactData.isAniVisible = false;
  19195. resolve();
  19196. }, 350);
  19197. });
  19198. },
  19199. clearValueEvent: function clearValueEvent(evnt, value) {
  19200. var $xeInput = this;
  19201. var props = $xeInput;
  19202. var type = props.type,
  19203. autoFocus = props.autoFocus;
  19204. var isNumType = $xeInput.computeIsNumType;
  19205. var isDatePickerType = $xeInput.computeIsDatePickerType;
  19206. if (isDatePickerType) {
  19207. $xeInput.hidePanel();
  19208. }
  19209. if (autoFocus || autoFocus === null) {
  19210. if (isNumType || ['text', 'search', 'password'].indexOf(type) > -1) {
  19211. $xeInput.focus();
  19212. }
  19213. }
  19214. $xeInput.handleChange('', evnt);
  19215. $xeInput.dispatchEvent('clear', {
  19216. value: value
  19217. }, evnt);
  19218. $xeInput.dispatchEvent('lazy-change', {
  19219. value: value
  19220. }, evnt);
  19221. },
  19222. clickSuffixEvent: function clickSuffixEvent(evnt) {
  19223. var $xeInput = this;
  19224. var reactData = $xeInput.reactData;
  19225. var isDisabled = $xeInput.computeIsDisabled;
  19226. if (!isDisabled) {
  19227. var inputValue = reactData.inputValue;
  19228. $xeInput.dispatchEvent('suffix-click', {
  19229. value: inputValue
  19230. }, evnt);
  19231. }
  19232. },
  19233. dateParseValue: function dateParseValue(value) {
  19234. var $xeInput = this;
  19235. var props = $xeInput;
  19236. var reactData = $xeInput.reactData;
  19237. var type = props.type;
  19238. var dateLabelFormat = $xeInput.computeDateLabelFormat;
  19239. var dateValueFormat = $xeInput.computeDateValueFormat;
  19240. var firstDayOfWeek = $xeInput.computeFirstDayOfWeek;
  19241. var dValue = null;
  19242. var dLabel = '';
  19243. if (value) {
  19244. dValue = $xeInput.parseDate(value, dateValueFormat);
  19245. }
  19246. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(dValue)) {
  19247. dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dValue, dateLabelFormat, {
  19248. firstDay: firstDayOfWeek
  19249. });
  19250. // 周选择器,由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年,例如
  19251. // '2024-12-31' 'yyyy-MM-dd W' >> '2024-12-31 1'
  19252. // '2025-01-01' 'yyyy-MM-dd W' >> '2025-01-01 1'
  19253. if (dateLabelFormat && type === 'week') {
  19254. var weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(dValue, firstDayOfWeek);
  19255. var weekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(dValue, 0, weekNum === 1 ? (6 + firstDayOfWeek) % 7 : firstDayOfWeek, firstDayOfWeek);
  19256. var weekFullYear = weekDate.getFullYear();
  19257. if (weekFullYear !== dValue.getFullYear()) {
  19258. var yyIndex = dateLabelFormat.indexOf('yyyy');
  19259. if (yyIndex > -1) {
  19260. var yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
  19261. if (yyNum && !isNaN(yyNum)) {
  19262. dLabel = dLabel.replace("".concat(yyNum), "".concat(weekFullYear));
  19263. }
  19264. }
  19265. }
  19266. }
  19267. } else {
  19268. dValue = null;
  19269. }
  19270. reactData.datePanelValue = dValue;
  19271. reactData.datePanelLabel = dLabel;
  19272. },
  19273. /**
  19274. * 值变化时处理
  19275. */
  19276. changeValue: function changeValue() {
  19277. var $xeInput = this;
  19278. var props = $xeInput;
  19279. var reactData = $xeInput.reactData;
  19280. var isDatePickerType = $xeInput.computeIsDatePickerType;
  19281. var inputValue = reactData.inputValue;
  19282. if (isDatePickerType) {
  19283. $xeInput.dateParseValue(inputValue);
  19284. reactData.inputValue = props.multiple ? $xeInput.computeDateMultipleLabel : reactData.datePanelLabel;
  19285. }
  19286. },
  19287. /**
  19288. * 检查初始值
  19289. */
  19290. initValue: function initValue() {
  19291. var $xeInput = this;
  19292. var props = $xeInput;
  19293. var reactData = $xeInput.reactData;
  19294. var type = props.type;
  19295. var inputValue = reactData.inputValue;
  19296. var isDatePickerType = $xeInput.computeIsDatePickerType;
  19297. var digitsValue = $xeInput.computeDigitsValue;
  19298. if (isDatePickerType) {
  19299. $xeInput.changeValue();
  19300. } else if (type === 'float') {
  19301. if (inputValue) {
  19302. var validValue = toFloatValueFixed(inputValue, digitsValue);
  19303. if (inputValue !== validValue) {
  19304. $xeInput.handleChange(validValue, {
  19305. type: 'init'
  19306. });
  19307. }
  19308. }
  19309. }
  19310. },
  19311. validMaxNum: function validMaxNum(num) {
  19312. var $xeInput = this;
  19313. var props = $xeInput;
  19314. return props.max === null || props.max === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(num) <= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.max);
  19315. },
  19316. validMinNum: function validMinNum(num) {
  19317. var $xeInput = this;
  19318. var props = $xeInput;
  19319. return props.min === null || props.min === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(num) >= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.min);
  19320. },
  19321. dateRevert: function dateRevert() {
  19322. var $xeInput = this;
  19323. var props = $xeInput;
  19324. var reactData = $xeInput.reactData;
  19325. reactData.inputValue = props.multiple ? $xeInput.computeDateMultipleLabel : reactData.datePanelLabel;
  19326. },
  19327. dateCheckMonth: function dateCheckMonth(date) {
  19328. var $xeInput = this;
  19329. var reactData = $xeInput.reactData;
  19330. var firstDayOfWeek = $xeInput.computeFirstDayOfWeek;
  19331. var weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(date, firstDayOfWeek);
  19332. var weekStartDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, firstDayOfWeek, firstDayOfWeek);
  19333. var month = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(weekNum === 1 ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(weekStartDate, 6) : date, 0, 'first');
  19334. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(month, reactData.selectMonth)) {
  19335. reactData.selectMonth = month;
  19336. }
  19337. },
  19338. dateChange: function dateChange(date) {
  19339. var $xeInput = this;
  19340. var props = $xeInput;
  19341. var reactData = $xeInput.reactData;
  19342. var multiple = props.multiple;
  19343. var datetimePanelValue = reactData.datetimePanelValue;
  19344. var isDateTimeType = $xeInput.computeIsDateTimeType;
  19345. var dateValueFormat = $xeInput.computeDateValueFormat;
  19346. var firstDayOfWeek = $xeInput.computeFirstDayOfWeek;
  19347. if (props.type === 'week') {
  19348. var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.selectDay);
  19349. date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, sWeek, firstDayOfWeek);
  19350. } else if (isDateTimeType) {
  19351. date.setHours(datetimePanelValue.getHours());
  19352. date.setMinutes(datetimePanelValue.getMinutes());
  19353. date.setSeconds(datetimePanelValue.getSeconds());
  19354. }
  19355. var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat, {
  19356. firstDay: firstDayOfWeek
  19357. });
  19358. $xeInput.dateCheckMonth(date);
  19359. if (multiple) {
  19360. // 如果为多选
  19361. var dateMultipleValue = $xeInput.computeDateMultipleValue;
  19362. if (isDateTimeType) {
  19363. // 如果是datetime特殊类型
  19364. var dateListValue = _toConsumableArray($xeInput.computeDateListValue);
  19365. var datetimeRest = [];
  19366. var eqIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(dateListValue, function (val) {
  19367. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(date, val, 'yyyyMMdd');
  19368. });
  19369. if (eqIndex === -1) {
  19370. dateListValue.push(date);
  19371. } else {
  19372. dateListValue.splice(eqIndex, 1);
  19373. }
  19374. dateListValue.forEach(function (item) {
  19375. if (item) {
  19376. item.setHours(datetimePanelValue.getHours());
  19377. item.setMinutes(datetimePanelValue.getMinutes());
  19378. item.setSeconds(datetimePanelValue.getSeconds());
  19379. datetimeRest.push(item);
  19380. }
  19381. });
  19382. $xeInput.handleChange(datetimeRest.map(function (date) {
  19383. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat);
  19384. }).join(','), {
  19385. type: 'update'
  19386. });
  19387. } else {
  19388. // 如果是日期类型
  19389. if (dateMultipleValue.some(function (val) {
  19390. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal);
  19391. })) {
  19392. $xeInput.handleChange(dateMultipleValue.filter(function (val) {
  19393. return !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal);
  19394. }).join(','), {
  19395. type: 'update'
  19396. });
  19397. } else {
  19398. $xeInput.handleChange(dateMultipleValue.concat([inpVal]).join(','), {
  19399. type: 'update'
  19400. });
  19401. }
  19402. }
  19403. } else {
  19404. // 如果为单选
  19405. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(props.value, inpVal)) {
  19406. $xeInput.handleChange(inpVal, {
  19407. type: 'update'
  19408. });
  19409. }
  19410. }
  19411. },
  19412. afterCheckValue: function afterCheckValue() {
  19413. var $xeInput = this;
  19414. var props = $xeInput;
  19415. var reactData = $xeInput.reactData;
  19416. var type = props.type,
  19417. min = props.min,
  19418. max = props.max,
  19419. exponential = props.exponential;
  19420. var inputValue = reactData.inputValue,
  19421. datetimePanelValue = reactData.datetimePanelValue;
  19422. var isNumType = $xeInput.computeIsNumType;
  19423. var isDatePickerType = $xeInput.computeIsDatePickerType;
  19424. var dateLabelFormat = $xeInput.computeDateLabelFormat;
  19425. var inputReadonly = $xeInput.computeInputReadonly;
  19426. if (!inputReadonly) {
  19427. if (isNumType) {
  19428. if (inputValue) {
  19429. var inpVal = "".concat(handleNumber(inputValue));
  19430. if (inpVal) {
  19431. var inpNumVal = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(inpVal) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inpVal);
  19432. if (!$xeInput.validMinNum(inpNumVal)) {
  19433. inpNumVal = min;
  19434. } else if (!$xeInput.validMaxNum(inpNumVal)) {
  19435. inpNumVal = max;
  19436. }
  19437. if (exponential) {
  19438. var inpStringVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(inputValue).toLowerCase();
  19439. if (inpStringVal === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inpNumVal).toExponential()) {
  19440. inpNumVal = inpStringVal;
  19441. }
  19442. }
  19443. $xeInput.handleChange($xeInput.getNumberValue(inpNumVal), {
  19444. type: 'check'
  19445. });
  19446. } else {
  19447. // 输入错误字符,清空
  19448. var inpValue = '';
  19449. if (min || min === 0) {
  19450. inpValue = "".concat(min);
  19451. }
  19452. $xeInput.handleChange(inpValue, {
  19453. type: 'check'
  19454. });
  19455. }
  19456. }
  19457. } else if (isDatePickerType) {
  19458. if (inputValue) {
  19459. var inpDateVal = $xeInput.parseDate(inputValue, dateLabelFormat);
  19460. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
  19461. if (type === 'time') {
  19462. inpDateVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat);
  19463. if (inputValue !== inpDateVal) {
  19464. $xeInput.handleChange(inpDateVal, {
  19465. type: 'check'
  19466. });
  19467. }
  19468. reactData.inputValue = inpDateVal;
  19469. } else {
  19470. var isChange = false;
  19471. var firstDayOfWeek = $xeInput.computeFirstDayOfWeek;
  19472. if (type === 'datetime') {
  19473. var dateValue = $xeInput.computeDateValue;
  19474. if (inputValue !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dateValue, dateLabelFormat) || inputValue !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat)) {
  19475. isChange = true;
  19476. datetimePanelValue.setHours(inpDateVal.getHours());
  19477. datetimePanelValue.setMinutes(inpDateVal.getMinutes());
  19478. datetimePanelValue.setSeconds(inpDateVal.getSeconds());
  19479. }
  19480. } else {
  19481. isChange = true;
  19482. }
  19483. reactData.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat, {
  19484. firstDay: firstDayOfWeek
  19485. });
  19486. if (isChange) {
  19487. $xeInput.dateChange(inpDateVal);
  19488. }
  19489. }
  19490. } else {
  19491. $xeInput.dateRevert();
  19492. }
  19493. } else {
  19494. $xeInput.handleChange('', {
  19495. type: 'check'
  19496. });
  19497. }
  19498. }
  19499. }
  19500. },
  19501. // 密码
  19502. passwordToggleEvent: function passwordToggleEvent(evnt) {
  19503. var $xeInput = this;
  19504. var reactData = $xeInput.reactData;
  19505. var showPwd = reactData.showPwd;
  19506. var isDisabled = $xeInput.computeIsDisabled;
  19507. var isReadonly = $xeInput.computeIsReadonly;
  19508. if (!isDisabled && !isReadonly) {
  19509. reactData.showPwd = !showPwd;
  19510. }
  19511. $xeInput.dispatchEvent('toggle-visible', {
  19512. visible: reactData.showPwd
  19513. }, evnt);
  19514. },
  19515. // 搜索
  19516. searchEvent: function searchEvent(evnt) {
  19517. var $xeInput = this;
  19518. $xeInput.dispatchEvent('search-click', {}, evnt);
  19519. },
  19520. // 数值
  19521. numberChange: function numberChange(isPlus, evnt) {
  19522. var $xeInput = this;
  19523. var props = $xeInput;
  19524. var reactData = $xeInput.reactData;
  19525. var min = props.min,
  19526. max = props.max,
  19527. type = props.type;
  19528. var inputValue = reactData.inputValue;
  19529. var stepValue = $xeInput.computeStepValue;
  19530. var numValue = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(handleNumber(inputValue));
  19531. var newValue = isPlus ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().add(numValue, stepValue) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().subtract(numValue, stepValue);
  19532. var restNum;
  19533. if (!$xeInput.validMinNum(newValue)) {
  19534. restNum = min;
  19535. } else if (!$xeInput.validMaxNum(newValue)) {
  19536. restNum = max;
  19537. } else {
  19538. restNum = newValue;
  19539. }
  19540. $xeInput.emitInputEvent($xeInput.getNumberValue(restNum), evnt);
  19541. },
  19542. numberNextEvent: function numberNextEvent(evnt) {
  19543. var $xeInput = this;
  19544. var reactData = $xeInput.reactData;
  19545. var isDisabled = $xeInput.computeIsDisabled;
  19546. var isReadonly = $xeInput.computeIsReadonly;
  19547. var isDisabledSubtractNumber = $xeInput.computeIsDisabledSubtractNumber;
  19548. $xeInput.numberStopDown();
  19549. if (!isDisabled && !isReadonly && !isDisabledSubtractNumber) {
  19550. $xeInput.numberChange(false, evnt);
  19551. }
  19552. $xeInput.dispatchEvent('next-number', {
  19553. value: reactData.inputValue
  19554. }, evnt);
  19555. },
  19556. numberDownNextEvent: function numberDownNextEvent(evnt) {
  19557. var $xeInput = this;
  19558. var internalData = $xeInput.internalData;
  19559. internalData.dnTimeout = setTimeout(function () {
  19560. $xeInput.numberNextEvent(evnt);
  19561. $xeInput.numberDownNextEvent(evnt);
  19562. }, 60);
  19563. },
  19564. numberPrevEvent: function numberPrevEvent(evnt) {
  19565. var $xeInput = this;
  19566. var reactData = $xeInput.reactData;
  19567. var isDisabled = $xeInput.computeIsDisabled;
  19568. var isReadonly = $xeInput.computeIsReadonly;
  19569. var isDisabledAddNumber = $xeInput.computeIsDisabledAddNumber;
  19570. $xeInput.numberStopDown();
  19571. if (!isDisabled && !isReadonly && !isDisabledAddNumber) {
  19572. $xeInput.numberChange(true, evnt);
  19573. }
  19574. $xeInput.dispatchEvent('prev-number', {
  19575. value: reactData.inputValue
  19576. }, evnt);
  19577. },
  19578. numberKeydownEvent: function numberKeydownEvent(evnt) {
  19579. var $xeInput = this;
  19580. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  19581. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  19582. if (isUpArrow || isDwArrow) {
  19583. evnt.preventDefault();
  19584. if (isUpArrow) {
  19585. $xeInput.numberPrevEvent(evnt);
  19586. } else {
  19587. $xeInput.numberNextEvent(evnt);
  19588. }
  19589. }
  19590. },
  19591. keydownEvent: function keydownEvent(evnt) {
  19592. var $xeInput = this;
  19593. var props = $xeInput;
  19594. var type = props.type,
  19595. exponential = props.exponential,
  19596. controls = props.controls;
  19597. var isNumType = $xeInput.computeIsNumType;
  19598. if (isNumType) {
  19599. var isControlKey = hasControlKey(evnt);
  19600. var isShiftKey = evnt.shiftKey;
  19601. var isAltKey = evnt.altKey;
  19602. var keyCode = evnt.keyCode;
  19603. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  19604. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  19605. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  19606. if (!isControlKey && !isShiftKey && !isAltKey) {
  19607. if (globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.SPACEBAR) || type === 'integer' && keyCode === 110 || (!exponential || keyCode !== 69) && keyCode >= 65 && keyCode <= 90 || keyCode >= 186 && keyCode <= 188 || keyCode >= 191) {
  19608. evnt.preventDefault();
  19609. }
  19610. }
  19611. if (isEsc) {
  19612. $xeInput.afterCheckValue();
  19613. } else if (isUpArrow || isDwArrow) {
  19614. if (controls) {
  19615. $xeInput.numberKeydownEvent(evnt);
  19616. }
  19617. }
  19618. }
  19619. $xeInput.triggerEvent(evnt);
  19620. },
  19621. keyupEvent: function keyupEvent(evnt) {
  19622. var $xeInput = this;
  19623. $xeInput.triggerEvent(evnt);
  19624. },
  19625. // 数值
  19626. numberStopDown: function numberStopDown() {
  19627. var $xeInput = this;
  19628. var internalData = $xeInput.internalData;
  19629. var dnTimeout = internalData.dnTimeout;
  19630. if (dnTimeout) {
  19631. clearTimeout(dnTimeout);
  19632. internalData.dnTimeout = undefined;
  19633. }
  19634. },
  19635. numberDownPrevEvent: function numberDownPrevEvent(evnt) {
  19636. var $xeInput = this;
  19637. var internalData = $xeInput.internalData;
  19638. internalData.dnTimeout = setTimeout(function () {
  19639. $xeInput.numberPrevEvent(evnt);
  19640. $xeInput.numberDownPrevEvent(evnt);
  19641. }, 60);
  19642. },
  19643. numberMousedownEvent: function numberMousedownEvent(evnt) {
  19644. var $xeInput = this;
  19645. var internalData = $xeInput.internalData;
  19646. $xeInput.numberStopDown();
  19647. if (evnt.button === 0) {
  19648. var isPrevNumber = hasClass(evnt.currentTarget, 'is--prev');
  19649. if (isPrevNumber) {
  19650. $xeInput.numberPrevEvent(evnt);
  19651. } else {
  19652. $xeInput.numberNextEvent(evnt);
  19653. }
  19654. internalData.dnTimeout = setTimeout(function () {
  19655. if (isPrevNumber) {
  19656. $xeInput.numberDownPrevEvent(evnt);
  19657. } else {
  19658. $xeInput.numberDownNextEvent(evnt);
  19659. }
  19660. }, 500);
  19661. }
  19662. },
  19663. wheelEvent: function wheelEvent(evnt) {
  19664. var $xeInput = this;
  19665. var props = $xeInput;
  19666. var reactData = $xeInput.reactData;
  19667. var isNumType = $xeInput.computeIsNumType;
  19668. if (isNumType && props.controls) {
  19669. if (reactData.isActivated) {
  19670. var delta = evnt.deltaY;
  19671. if (delta > 0) {
  19672. $xeInput.numberNextEvent(evnt);
  19673. } else if (delta < 0) {
  19674. $xeInput.numberPrevEvent(evnt);
  19675. }
  19676. evnt.preventDefault();
  19677. }
  19678. }
  19679. $xeInput.triggerEvent(evnt);
  19680. },
  19681. // 日期
  19682. dateMonthHandle: function dateMonthHandle(date, offsetMonth) {
  19683. var $xeInput = this;
  19684. var reactData = $xeInput.reactData;
  19685. var firstDayOfWeek = $xeInput.computeFirstDayOfWeek;
  19686. var weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(date, firstDayOfWeek);
  19687. var weekStartDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, firstDayOfWeek, firstDayOfWeek);
  19688. var month = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(weekNum === 1 ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(weekStartDate, 6) : date, offsetMonth, 'first');
  19689. reactData.selectMonth = month;
  19690. },
  19691. dateNowHandle: function dateNowHandle() {
  19692. var $xeInput = this;
  19693. var reactData = $xeInput.reactData;
  19694. var currentDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  19695. reactData.currentDate = currentDate;
  19696. $xeInput.dateMonthHandle(currentDate, 0);
  19697. },
  19698. dateToggleYearTypeEvent: function dateToggleYearTypeEvent() {
  19699. var $xeInput = this;
  19700. var reactData = $xeInput.reactData;
  19701. reactData.datePanelType = 'year';
  19702. },
  19703. dateToggleMonthTypeEvent: function dateToggleMonthTypeEvent() {
  19704. var $xeInput = this;
  19705. var reactData = $xeInput.reactData;
  19706. var datePanelType = reactData.datePanelType;
  19707. if (datePanelType === 'month' || datePanelType === 'quarter') {
  19708. datePanelType = 'year';
  19709. } else {
  19710. datePanelType = 'month';
  19711. }
  19712. reactData.datePanelType = datePanelType;
  19713. },
  19714. datePrevEvent: function datePrevEvent(evnt) {
  19715. var $xeInput = this;
  19716. var props = $xeInput;
  19717. var reactData = $xeInput.reactData;
  19718. var internalData = $xeInput.internalData;
  19719. var type = props.type;
  19720. var datePanelType = reactData.datePanelType,
  19721. selectMonth = reactData.selectMonth,
  19722. inputValue = reactData.inputValue;
  19723. var yearSize = internalData.yearSize;
  19724. var value = inputValue;
  19725. var isDisabledPrevDateBtn = $xeInput.computeIsDisabledPrevDateBtn;
  19726. if (!isDisabledPrevDateBtn) {
  19727. var viewDate;
  19728. if (type === 'year') {
  19729. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  19730. } else if (type === 'month' || type === 'quarter') {
  19731. if (datePanelType === 'year') {
  19732. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  19733. } else {
  19734. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -1, 'first');
  19735. }
  19736. } else {
  19737. if (datePanelType === 'year') {
  19738. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  19739. } else if (datePanelType === 'month') {
  19740. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -1, 'first');
  19741. } else {
  19742. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, -1, 'first');
  19743. }
  19744. }
  19745. reactData.selectMonth = viewDate;
  19746. $xeInput.dispatchEvent('date-prev', {
  19747. viewType: datePanelType,
  19748. viewDate: viewDate,
  19749. value: value,
  19750. type: type
  19751. }, evnt);
  19752. }
  19753. },
  19754. dateTodayMonthEvent: function dateTodayMonthEvent(evnt) {
  19755. var $xeInput = this;
  19756. var props = $xeInput;
  19757. var reactData = $xeInput.reactData;
  19758. $xeInput.dateNowHandle();
  19759. if (!props.multiple) {
  19760. $xeInput.dateChange(reactData.currentDate);
  19761. $xeInput.hidePanel();
  19762. }
  19763. $xeInput.dispatchEvent('date-today', {
  19764. type: props.type
  19765. }, evnt);
  19766. },
  19767. dateNextEvent: function dateNextEvent(evnt) {
  19768. var $xeInput = this;
  19769. var props = $xeInput;
  19770. var reactData = $xeInput.reactData;
  19771. var internalData = $xeInput.internalData;
  19772. var type = props.type;
  19773. var datePanelType = reactData.datePanelType,
  19774. selectMonth = reactData.selectMonth,
  19775. inputValue = reactData.inputValue;
  19776. var yearSize = internalData.yearSize;
  19777. var value = inputValue;
  19778. var isDisabledNextDateBtn = $xeInput.computeIsDisabledNextDateBtn;
  19779. if (!isDisabledNextDateBtn) {
  19780. var viewDate;
  19781. if (type === 'year') {
  19782. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  19783. } else if (type === 'month' || type === 'quarter') {
  19784. if (datePanelType === 'year') {
  19785. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  19786. } else {
  19787. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 1, 'first');
  19788. }
  19789. } else {
  19790. if (datePanelType === 'year') {
  19791. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  19792. } else if (datePanelType === 'month') {
  19793. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 1, 'first');
  19794. } else {
  19795. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, 1, 'first');
  19796. }
  19797. }
  19798. reactData.selectMonth = viewDate;
  19799. $xeInput.dispatchEvent('date-next', {
  19800. viewType: datePanelType,
  19801. viewDate: viewDate,
  19802. value: value,
  19803. type: type
  19804. }, evnt);
  19805. }
  19806. },
  19807. isDateDisabled: function isDateDisabled(item) {
  19808. var $xeInput = this;
  19809. var props = $xeInput;
  19810. var reactData = $xeInput.reactData;
  19811. var disabledMethod = props.disabledMethod;
  19812. var datePanelType = reactData.datePanelType;
  19813. var dateStartTime = $xeInput.computeDateStartTime;
  19814. var dateEndTime = $xeInput.computeDateEndTime;
  19815. var date = item.date;
  19816. if (dateStartTime && dateStartTime.getTime() > date.getTime()) {
  19817. return true;
  19818. }
  19819. if (dateEndTime && dateEndTime.getTime() < date.getTime()) {
  19820. return true;
  19821. }
  19822. if (disabledMethod) {
  19823. return disabledMethod({
  19824. type: datePanelType,
  19825. viewType: datePanelType,
  19826. date: date,
  19827. $input: $xeInput
  19828. });
  19829. }
  19830. return false;
  19831. },
  19832. dateSelectItem: function dateSelectItem(date) {
  19833. var $xeInput = this;
  19834. var props = $xeInput;
  19835. var reactData = $xeInput.reactData;
  19836. var type = props.type,
  19837. multiple = props.multiple;
  19838. var datePanelType = reactData.datePanelType;
  19839. if (type === 'month') {
  19840. if (datePanelType === 'year') {
  19841. reactData.datePanelType = 'month';
  19842. $xeInput.dateCheckMonth(date);
  19843. } else {
  19844. $xeInput.dateChange(date);
  19845. if (!multiple) {
  19846. $xeInput.hidePanel();
  19847. }
  19848. }
  19849. } else if (type === 'year') {
  19850. $xeInput.dateChange(date);
  19851. if (!multiple) {
  19852. $xeInput.hidePanel();
  19853. }
  19854. } else if (type === 'quarter') {
  19855. if (datePanelType === 'year') {
  19856. reactData.datePanelType = 'quarter';
  19857. $xeInput.dateCheckMonth(date);
  19858. } else {
  19859. $xeInput.dateChange(date);
  19860. if (!multiple) {
  19861. $xeInput.hidePanel();
  19862. }
  19863. }
  19864. } else {
  19865. if (datePanelType === 'month') {
  19866. reactData.datePanelType = type === 'week' ? type : 'day';
  19867. $xeInput.dateCheckMonth(date);
  19868. } else if (datePanelType === 'year') {
  19869. reactData.datePanelType = 'month';
  19870. $xeInput.dateCheckMonth(date);
  19871. } else {
  19872. $xeInput.dateChange(date);
  19873. if (type === 'datetime') {
  19874. // 日期带时间
  19875. } else {
  19876. if (!multiple) {
  19877. $xeInput.hidePanel();
  19878. }
  19879. }
  19880. }
  19881. }
  19882. },
  19883. dateSelectEvent: function dateSelectEvent(item) {
  19884. var $xeInput = this;
  19885. if (!$xeInput.isDateDisabled(item)) {
  19886. $xeInput.dateSelectItem(item.date);
  19887. }
  19888. },
  19889. dateMoveDay: function dateMoveDay(offsetDay) {
  19890. var $xeInput = this;
  19891. if (!$xeInput.isDateDisabled({
  19892. date: offsetDay
  19893. })) {
  19894. var dayList = $xeInput.computeDayList;
  19895. if (!dayList.some(function (item) {
  19896. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetDay, 'yyyyMMdd');
  19897. })) {
  19898. $xeInput.dateCheckMonth(offsetDay);
  19899. }
  19900. $xeInput.dateParseValue(offsetDay);
  19901. }
  19902. },
  19903. dateMoveYear: function dateMoveYear(offsetYear) {
  19904. var $xeInput = this;
  19905. if (!$xeInput.isDateDisabled({
  19906. date: offsetYear
  19907. })) {
  19908. var yearList = $xeInput.computeYearList;
  19909. if (!yearList.some(function (item) {
  19910. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetYear, 'yyyy');
  19911. })) {
  19912. $xeInput.dateCheckMonth(offsetYear);
  19913. }
  19914. $xeInput.dateParseValue(offsetYear);
  19915. }
  19916. },
  19917. dateMoveQuarter: function dateMoveQuarter(offsetQuarter) {
  19918. var $xeInput = this;
  19919. if (!$xeInput.isDateDisabled({
  19920. date: offsetQuarter
  19921. })) {
  19922. var quarterList = $xeInput.computeQuarterList;
  19923. if (!quarterList.some(function (item) {
  19924. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetQuarter, 'yyyyq');
  19925. })) {
  19926. $xeInput.dateCheckMonth(offsetQuarter);
  19927. }
  19928. $xeInput.dateParseValue(offsetQuarter);
  19929. }
  19930. },
  19931. dateMoveMonth: function dateMoveMonth(offsetMonth) {
  19932. var $xeInput = this;
  19933. if (!$xeInput.isDateDisabled({
  19934. date: offsetMonth
  19935. })) {
  19936. var monthList = $xeInput.computeMonthList;
  19937. if (!monthList.some(function (item) {
  19938. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetMonth, 'yyyyMM');
  19939. })) {
  19940. $xeInput.dateCheckMonth(offsetMonth);
  19941. }
  19942. $xeInput.dateParseValue(offsetMonth);
  19943. }
  19944. },
  19945. dateMouseenterEvent: function dateMouseenterEvent(item) {
  19946. var $xeInput = this;
  19947. var reactData = $xeInput.reactData;
  19948. if (!$xeInput.isDateDisabled(item)) {
  19949. var datePanelType = reactData.datePanelType;
  19950. if (datePanelType === 'month') {
  19951. $xeInput.dateMoveMonth(item.date);
  19952. } else if (datePanelType === 'quarter') {
  19953. $xeInput.dateMoveQuarter(item.date);
  19954. } else if (datePanelType === 'year') {
  19955. $xeInput.dateMoveYear(item.date);
  19956. } else {
  19957. $xeInput.dateMoveDay(item.date);
  19958. }
  19959. }
  19960. },
  19961. updateTimePos: function updateTimePos(liElem) {
  19962. if (liElem) {
  19963. var height = liElem.offsetHeight;
  19964. var ulElem = liElem.parentNode;
  19965. ulElem.scrollTop = liElem.offsetTop - height * 4;
  19966. }
  19967. },
  19968. dateTimeChangeEvent: function dateTimeChangeEvent(evnt) {
  19969. var $xeInput = this;
  19970. var reactData = $xeInput.reactData;
  19971. reactData.datetimePanelValue = new Date(reactData.datetimePanelValue.getTime());
  19972. $xeInput.updateTimePos(evnt.currentTarget);
  19973. },
  19974. dateHourEvent: function dateHourEvent(evnt, item) {
  19975. var $xeInput = this;
  19976. var reactData = $xeInput.reactData;
  19977. reactData.datetimePanelValue.setHours(item.value);
  19978. $xeInput.dateTimeChangeEvent(evnt);
  19979. },
  19980. dateConfirmEvent: function dateConfirmEvent() {
  19981. var $xeInput = this;
  19982. var props = $xeInput;
  19983. var reactData = $xeInput.reactData;
  19984. var multiple = props.multiple;
  19985. var datetimePanelValue = reactData.datetimePanelValue;
  19986. var dateValue = $xeInput.computeDateValue;
  19987. var isDateTimeType = $xeInput.computeIsDateTimeType;
  19988. if (isDateTimeType) {
  19989. var dateValueFormat = $xeInput.computeDateValueFormat;
  19990. if (multiple) {
  19991. // 如果为多选
  19992. var dateMultipleValue = $xeInput.computeDateMultipleValue;
  19993. if (isDateTimeType) {
  19994. // 如果是datetime特殊类型
  19995. var dateListValue = _toConsumableArray($xeInput.computeDateListValue);
  19996. var datetimeRest = [];
  19997. dateListValue.forEach(function (item) {
  19998. if (item) {
  19999. item.setHours(datetimePanelValue.getHours());
  20000. item.setMinutes(datetimePanelValue.getMinutes());
  20001. item.setSeconds(datetimePanelValue.getSeconds());
  20002. datetimeRest.push(item);
  20003. }
  20004. });
  20005. $xeInput.handleChange(datetimeRest.map(function (date) {
  20006. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat);
  20007. }).join(','), {
  20008. type: 'update'
  20009. });
  20010. } else {
  20011. // 如果是日期类型
  20012. $xeInput.handleChange(dateMultipleValue.join(','), {
  20013. type: 'update'
  20014. });
  20015. }
  20016. } else {
  20017. $xeInput.dateChange(dateValue || reactData.currentDate);
  20018. }
  20019. }
  20020. $xeInput.hidePanel();
  20021. },
  20022. dateMinuteEvent: function dateMinuteEvent(evnt, item) {
  20023. var $xeInput = this;
  20024. var reactData = $xeInput.reactData;
  20025. reactData.datetimePanelValue.setMinutes(item.value);
  20026. $xeInput.dateTimeChangeEvent(evnt);
  20027. },
  20028. dateSecondEvent: function dateSecondEvent(evnt, item) {
  20029. var $xeInput = this;
  20030. var reactData = $xeInput.reactData;
  20031. reactData.datetimePanelValue.setSeconds(item.value);
  20032. $xeInput.dateTimeChangeEvent(evnt);
  20033. },
  20034. dateOffsetEvent: function dateOffsetEvent(evnt) {
  20035. var $xeInput = this;
  20036. var reactData = $xeInput.reactData;
  20037. var isActivated = reactData.isActivated,
  20038. datePanelValue = reactData.datePanelValue,
  20039. datePanelType = reactData.datePanelType;
  20040. if (isActivated) {
  20041. evnt.preventDefault();
  20042. var isLeftArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
  20043. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  20044. var isRightArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
  20045. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  20046. if (datePanelType === 'year') {
  20047. var offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(datePanelValue || Date.now(), 0, 'first');
  20048. if (isLeftArrow) {
  20049. offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, -1);
  20050. } else if (isUpArrow) {
  20051. offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, -4);
  20052. } else if (isRightArrow) {
  20053. offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, 1);
  20054. } else if (isDwArrow) {
  20055. offsetYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(offsetYear, 4);
  20056. }
  20057. $xeInput.dateMoveYear(offsetYear);
  20058. } else if (datePanelType === 'quarter') {
  20059. var offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(datePanelValue || Date.now(), 0, 'first');
  20060. if (isLeftArrow) {
  20061. offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, -1);
  20062. } else if (isUpArrow) {
  20063. offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, -2);
  20064. } else if (isRightArrow) {
  20065. offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, 1);
  20066. } else if (isDwArrow) {
  20067. offsetQuarter = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(offsetQuarter, 2);
  20068. }
  20069. $xeInput.dateMoveQuarter(offsetQuarter);
  20070. } else if (datePanelType === 'month') {
  20071. var offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(datePanelValue || Date.now(), 0, 'first');
  20072. if (isLeftArrow) {
  20073. offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, -1);
  20074. } else if (isUpArrow) {
  20075. offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, -4);
  20076. } else if (isRightArrow) {
  20077. offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, 1);
  20078. } else if (isDwArrow) {
  20079. offsetMonth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(offsetMonth, 4);
  20080. }
  20081. $xeInput.dateMoveMonth(offsetMonth);
  20082. } else {
  20083. var offsetDay = datePanelValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  20084. var firstDayOfWeek = $xeInput.computeFirstDayOfWeek;
  20085. if (isLeftArrow) {
  20086. offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(offsetDay, -1);
  20087. } else if (isUpArrow) {
  20088. offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(offsetDay, -1, firstDayOfWeek);
  20089. } else if (isRightArrow) {
  20090. offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(offsetDay, 1);
  20091. } else if (isDwArrow) {
  20092. offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(offsetDay, 1, firstDayOfWeek);
  20093. }
  20094. $xeInput.dateMoveDay(offsetDay);
  20095. }
  20096. }
  20097. },
  20098. datePgOffsetEvent: function datePgOffsetEvent(evnt) {
  20099. var $xeInput = this;
  20100. var reactData = $xeInput.reactData;
  20101. var isActivated = reactData.isActivated;
  20102. if (isActivated) {
  20103. var isPgUp = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.PAGE_UP);
  20104. evnt.preventDefault();
  20105. if (isPgUp) {
  20106. $xeInput.datePrevEvent(evnt);
  20107. } else {
  20108. $xeInput.dateNextEvent(evnt);
  20109. }
  20110. }
  20111. },
  20112. dateOpenPanel: function dateOpenPanel() {
  20113. var $xeInput = this;
  20114. var props = $xeInput;
  20115. var reactData = $xeInput.reactData;
  20116. var type = props.type;
  20117. var isDateTimeType = $xeInput.computeIsDateTimeType;
  20118. var dateValue = $xeInput.computeDateValue;
  20119. if (['year', 'quarter', 'month', 'week'].indexOf(type) > -1) {
  20120. reactData.datePanelType = type;
  20121. } else {
  20122. reactData.datePanelType = 'day';
  20123. }
  20124. reactData.currentDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  20125. if (dateValue) {
  20126. $xeInput.dateMonthHandle(dateValue, 0);
  20127. $xeInput.dateParseValue(dateValue);
  20128. } else {
  20129. $xeInput.dateNowHandle();
  20130. }
  20131. if (isDateTimeType) {
  20132. reactData.datetimePanelValue = reactData.datePanelValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  20133. $xeInput.$nextTick(function () {
  20134. var timeBodyElem = $xeInput.$refs.refInputTimeBody;
  20135. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(timeBodyElem.querySelectorAll('li.is--selected'), function (elem) {
  20136. $xeInput.updateTimePos(elem);
  20137. });
  20138. });
  20139. }
  20140. },
  20141. // 弹出面板
  20142. updateZindex: function updateZindex() {
  20143. var $xeInput = this;
  20144. var reactData = $xeInput.reactData;
  20145. if (reactData.panelIndex < getLastZIndex()) {
  20146. reactData.panelIndex = nextZIndex();
  20147. }
  20148. },
  20149. updatePlacement: function updatePlacement() {
  20150. var $xeInput = this;
  20151. var props = $xeInput;
  20152. var reactData = $xeInput.reactData;
  20153. return $xeInput.$nextTick().then(function () {
  20154. var placement = props.placement;
  20155. var panelIndex = reactData.panelIndex;
  20156. var targetElem = $xeInput.$refs.refInputTarget;
  20157. var panelElem = $xeInput.$refs.refInputPanel;
  20158. var btnTransfer = $xeInput.computeBtnTransfer;
  20159. if (targetElem && panelElem) {
  20160. var targetHeight = targetElem.offsetHeight;
  20161. var targetWidth = targetElem.offsetWidth;
  20162. var panelHeight = panelElem.offsetHeight;
  20163. var panelWidth = panelElem.offsetWidth;
  20164. var marginSize = 5;
  20165. var panelStyle = {
  20166. zIndex: panelIndex
  20167. };
  20168. var _getAbsolutePos = getAbsolutePos(targetElem),
  20169. boundingTop = _getAbsolutePos.boundingTop,
  20170. boundingLeft = _getAbsolutePos.boundingLeft,
  20171. visibleHeight = _getAbsolutePos.visibleHeight,
  20172. visibleWidth = _getAbsolutePos.visibleWidth;
  20173. var panelPlacement = 'bottom';
  20174. if (btnTransfer) {
  20175. var left = boundingLeft;
  20176. var top = boundingTop + targetHeight;
  20177. if (placement === 'top') {
  20178. panelPlacement = 'top';
  20179. top = boundingTop - panelHeight;
  20180. } else if (!placement) {
  20181. // 如果下面不够放,则向上
  20182. if (top + panelHeight + marginSize > visibleHeight) {
  20183. panelPlacement = 'top';
  20184. top = boundingTop - panelHeight;
  20185. }
  20186. // 如果上面不够放,则向下(优先)
  20187. if (top < marginSize) {
  20188. panelPlacement = 'bottom';
  20189. top = boundingTop + targetHeight;
  20190. }
  20191. }
  20192. // 如果溢出右边
  20193. if (left + panelWidth + marginSize > visibleWidth) {
  20194. left -= left + panelWidth + marginSize - visibleWidth;
  20195. }
  20196. // 如果溢出左边
  20197. if (left < marginSize) {
  20198. left = marginSize;
  20199. }
  20200. Object.assign(panelStyle, {
  20201. left: "".concat(left, "px"),
  20202. top: "".concat(top, "px"),
  20203. minWidth: "".concat(targetWidth, "px")
  20204. });
  20205. } else {
  20206. if (placement === 'top') {
  20207. panelPlacement = 'top';
  20208. panelStyle.bottom = "".concat(targetHeight, "px");
  20209. } else if (!placement) {
  20210. // 如果下面不够放,则向上
  20211. panelStyle.top = "".concat(targetHeight, "px");
  20212. if (boundingTop + targetHeight + panelHeight > visibleHeight) {
  20213. // 如果上面不够放,则向下(优先)
  20214. if (boundingTop - targetHeight - panelHeight > marginSize) {
  20215. panelPlacement = 'top';
  20216. panelStyle.top = '';
  20217. panelStyle.bottom = "".concat(targetHeight, "px");
  20218. }
  20219. }
  20220. }
  20221. }
  20222. reactData.panelStyle = panelStyle;
  20223. reactData.panelPlacement = panelPlacement;
  20224. return $xeInput.$nextTick();
  20225. }
  20226. });
  20227. },
  20228. showPanel: function showPanel() {
  20229. var $xeInput = this;
  20230. var reactData = $xeInput.reactData;
  20231. var internalData = $xeInput.internalData;
  20232. var visiblePanel = reactData.visiblePanel;
  20233. var hpTimeout = internalData.hpTimeout;
  20234. var isDisabled = $xeInput.computeIsDisabled;
  20235. var isDatePickerType = $xeInput.computeIsDatePickerType;
  20236. var btnTransfer = $xeInput.computeBtnTransfer;
  20237. if (!isDisabled && !visiblePanel) {
  20238. var panelElem = $xeInput.$refs.refInputPanel;
  20239. if (!reactData.initialized) {
  20240. reactData.initialized = true;
  20241. if (btnTransfer) {
  20242. if (panelElem) {
  20243. document.body.appendChild(panelElem);
  20244. }
  20245. }
  20246. }
  20247. if (hpTimeout) {
  20248. clearTimeout(hpTimeout);
  20249. internalData.hpTimeout = undefined;
  20250. }
  20251. reactData.isActivated = true;
  20252. reactData.isAniVisible = true;
  20253. if (isDatePickerType) {
  20254. $xeInput.dateOpenPanel();
  20255. }
  20256. setTimeout(function () {
  20257. reactData.visiblePanel = true;
  20258. }, 10);
  20259. $xeInput.updateZindex();
  20260. return $xeInput.updatePlacement();
  20261. }
  20262. return $xeInput.$nextTick();
  20263. },
  20264. datePickerOpenEvent: function datePickerOpenEvent(evnt) {
  20265. var $xeInput = this;
  20266. var isReadonly = $xeInput.computeIsReadonly;
  20267. if (!isReadonly) {
  20268. evnt.preventDefault();
  20269. $xeInput.showPanel();
  20270. }
  20271. },
  20272. clickEvent: function clickEvent(evnt) {
  20273. var $xeInput = this;
  20274. $xeInput.triggerEvent(evnt);
  20275. },
  20276. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  20277. var $xeInput = this;
  20278. var reactData = $xeInput.reactData;
  20279. var visiblePanel = reactData.visiblePanel,
  20280. isActivated = reactData.isActivated;
  20281. var isDatePickerType = $xeInput.computeIsDatePickerType;
  20282. var el = $xeInput.$refs.refElem;
  20283. var panelWrapperElem = $xeInput.$refs.refPanelWrapper;
  20284. var isDisabled = $xeInput.computeIsDisabled;
  20285. if (!isDisabled && isActivated) {
  20286. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
  20287. if (!reactData.isActivated) {
  20288. // 如果是日期类型
  20289. if (isDatePickerType) {
  20290. if (visiblePanel) {
  20291. $xeInput.hidePanel();
  20292. $xeInput.afterCheckValue();
  20293. }
  20294. } else {
  20295. $xeInput.afterCheckValue();
  20296. }
  20297. }
  20298. }
  20299. },
  20300. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  20301. var $xeInput = this;
  20302. var props = $xeInput;
  20303. var reactData = $xeInput.reactData;
  20304. var clearable = props.clearable;
  20305. var visiblePanel = reactData.visiblePanel;
  20306. var isDisabled = $xeInput.computeIsDisabled;
  20307. var isDatePickerType = $xeInput.computeIsDatePickerType;
  20308. if (!isDisabled) {
  20309. var isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
  20310. var isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
  20311. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  20312. var isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
  20313. var isLeftArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
  20314. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  20315. var isRightArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
  20316. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  20317. var isPgUp = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.PAGE_UP);
  20318. var isPgDn = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.PAGE_DOWN);
  20319. var operArrow = isLeftArrow || isUpArrow || isRightArrow || isDwArrow;
  20320. var isActivated = reactData.isActivated;
  20321. if (isTab) {
  20322. if (isActivated) {
  20323. $xeInput.afterCheckValue();
  20324. }
  20325. isActivated = false;
  20326. reactData.isActivated = isActivated;
  20327. } else if (operArrow) {
  20328. if (isDatePickerType) {
  20329. if (isActivated) {
  20330. if (visiblePanel) {
  20331. $xeInput.dateOffsetEvent(evnt);
  20332. } else if (isUpArrow || isDwArrow) {
  20333. $xeInput.datePickerOpenEvent(evnt);
  20334. }
  20335. }
  20336. }
  20337. } else if (isEnter) {
  20338. if (isDatePickerType) {
  20339. if (visiblePanel) {
  20340. if (reactData.datePanelValue) {
  20341. $xeInput.dateSelectItem(reactData.datePanelValue);
  20342. } else {
  20343. $xeInput.hidePanel();
  20344. }
  20345. } else if (isActivated) {
  20346. $xeInput.datePickerOpenEvent(evnt);
  20347. }
  20348. }
  20349. } else if (isPgUp || isPgDn) {
  20350. if (isDatePickerType) {
  20351. if (isActivated) {
  20352. $xeInput.datePgOffsetEvent(evnt);
  20353. }
  20354. }
  20355. }
  20356. if (isTab || isEsc) {
  20357. if (visiblePanel) {
  20358. $xeInput.hidePanel();
  20359. }
  20360. } else if (isDel && clearable) {
  20361. if (isActivated) {
  20362. $xeInput.clearValueEvent(evnt, null);
  20363. }
  20364. }
  20365. }
  20366. },
  20367. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  20368. var $xeInput = this;
  20369. var reactData = $xeInput.reactData;
  20370. var visiblePanel = reactData.visiblePanel;
  20371. var isDisabled = $xeInput.computeIsDisabled;
  20372. if (!isDisabled) {
  20373. if (visiblePanel) {
  20374. var panelWrapperElem = $xeInput.$refs.refPanelWrapper;
  20375. if (getEventTargetNode(evnt, panelWrapperElem).flag) {
  20376. $xeInput.updatePlacement();
  20377. } else {
  20378. $xeInput.hidePanel();
  20379. $xeInput.afterCheckValue();
  20380. }
  20381. }
  20382. }
  20383. },
  20384. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  20385. var $xeInput = this;
  20386. var reactData = $xeInput.reactData;
  20387. var isActivated = reactData.isActivated,
  20388. visiblePanel = reactData.visiblePanel;
  20389. if (visiblePanel) {
  20390. $xeInput.hidePanel();
  20391. }
  20392. if (isActivated) {
  20393. reactData.isActivated = false;
  20394. }
  20395. if (isActivated) {
  20396. $xeInput.afterCheckValue();
  20397. var inputElem = $xeInput.$refs.refInputTarget;
  20398. if (inputElem) {
  20399. inputElem.blur();
  20400. }
  20401. }
  20402. },
  20403. //
  20404. // Render
  20405. //
  20406. renderDateLabel: function renderDateLabel(h, item, label) {
  20407. var $xeInput = this;
  20408. var props = $xeInput;
  20409. var reactData = $xeInput.reactData;
  20410. var festivalMethod = props.festivalMethod;
  20411. if (festivalMethod) {
  20412. var datePanelType = reactData.datePanelType;
  20413. var festivalRest = festivalMethod({
  20414. type: datePanelType,
  20415. viewType: datePanelType,
  20416. date: item.date,
  20417. $input: $xeInput
  20418. });
  20419. var festivalItem = festivalRest ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalRest) ? {
  20420. label: festivalRest
  20421. } : festivalRest : {};
  20422. var extraItem = festivalItem.extra ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalItem.extra) ? {
  20423. label: festivalItem.extra
  20424. } : festivalItem.extra : null;
  20425. var labels = [h('span', {
  20426. class: ['vxe-input--date-label', {
  20427. 'is-notice': festivalItem.notice
  20428. }]
  20429. }, extraItem && extraItem.label ? [h('span', "".concat(label || '')), h('span', {
  20430. class: ['vxe-input--date-label--extra', extraItem.important ? 'is-important' : '', extraItem.className],
  20431. style: extraItem.style
  20432. }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(extraItem.label))] : ["".concat(label || '')])];
  20433. var festivalLabel = festivalItem.label;
  20434. if (festivalLabel) {
  20435. // 默认最多支持3个节日重叠
  20436. var festivalLabels = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(festivalLabel).split(',');
  20437. labels.push(h('span', {
  20438. class: ['vxe-input--date-festival', festivalItem.important ? 'is-important' : '', festivalItem.className],
  20439. style: festivalItem.style
  20440. }, [festivalLabels.length > 1 ? h('span', {
  20441. class: ['vxe-input--date-festival--overlap', "overlap--".concat(festivalLabels.length)]
  20442. }, festivalLabels.map(function (label) {
  20443. return h('span', label.substring(0, 3));
  20444. })) : h('span', {
  20445. class: 'vxe-input--date-festival--label'
  20446. }, festivalLabels[0].substring(0, 3))]));
  20447. }
  20448. return labels;
  20449. }
  20450. return ["".concat(label || '')];
  20451. },
  20452. renderDateDayTable: function renderDateDayTable(h) {
  20453. var $xeInput = this;
  20454. var props = $xeInput;
  20455. var reactData = $xeInput.reactData;
  20456. var multiple = props.multiple;
  20457. var datePanelType = reactData.datePanelType,
  20458. datePanelValue = reactData.datePanelValue;
  20459. var dateValue = $xeInput.computeDateValue;
  20460. var dateHeaders = $xeInput.computeDateHeaders;
  20461. var dayDatas = $xeInput.computeDayDatas;
  20462. var dateListValue = $xeInput.computeDateListValue;
  20463. var matchFormat = 'yyyyMMdd';
  20464. return [h('table', {
  20465. class: "vxe-input--date-".concat(datePanelType, "-view"),
  20466. attrs: {
  20467. cellspacing: 0,
  20468. cellpadding: 0,
  20469. border: 0
  20470. }
  20471. }, [h('thead', [h('tr', dateHeaders.map(function (item) {
  20472. return h('th', item.label);
  20473. }))]), h('tbody', dayDatas.map(function (rows) {
  20474. return h('tr', rows.map(function (item) {
  20475. return h('td', {
  20476. class: {
  20477. 'is--prev': item.isPrev,
  20478. 'is--current': item.isCurrent,
  20479. 'is--now': item.isNow,
  20480. 'is--next': item.isNext,
  20481. 'is--disabled': $xeInput.isDateDisabled(item),
  20482. 'is--selected': multiple ? dateListValue.some(function (val) {
  20483. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  20484. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  20485. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  20486. },
  20487. on: {
  20488. click: function click() {
  20489. return $xeInput.dateSelectEvent(item);
  20490. },
  20491. mouseenter: function mouseenter() {
  20492. return $xeInput.dateMouseenterEvent(item);
  20493. }
  20494. }
  20495. }, $xeInput.renderDateLabel(h, item, item.label));
  20496. }));
  20497. }))])];
  20498. },
  20499. renderDateWeekTable: function renderDateWeekTable(h) {
  20500. var $xeInput = this;
  20501. var props = $xeInput;
  20502. var reactData = $xeInput.reactData;
  20503. var multiple = props.multiple;
  20504. var datePanelType = reactData.datePanelType,
  20505. datePanelValue = reactData.datePanelValue;
  20506. var dateValue = $xeInput.computeDateValue;
  20507. var weekHeaders = $xeInput.computeWeekHeaders;
  20508. var weekDates = $xeInput.computeWeekDates;
  20509. var dateListValue = $xeInput.computeDateListValue;
  20510. var matchFormat = 'yyyyMMdd';
  20511. return [h('table', {
  20512. class: "vxe-input--date-".concat(datePanelType, "-view"),
  20513. attrs: {
  20514. cellspacing: 0,
  20515. cellpadding: 0,
  20516. border: 0
  20517. }
  20518. }, [h('thead', [h('tr', weekHeaders.map(function (item) {
  20519. return h('th', item.label);
  20520. }))]), h('tbody', weekDates.map(function (rows) {
  20521. var isSelected = multiple ? rows.some(function (item) {
  20522. return dateListValue.some(function (val) {
  20523. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  20524. });
  20525. }) : rows.some(function (item) {
  20526. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
  20527. });
  20528. var isHover = rows.some(function (item) {
  20529. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat);
  20530. });
  20531. return h('tr', rows.map(function (item) {
  20532. return h('td', {
  20533. class: {
  20534. 'is--prev': item.isPrev,
  20535. 'is--current': item.isCurrent,
  20536. 'is--now': item.isNow,
  20537. 'is--next': item.isNext,
  20538. 'is--disabled': $xeInput.isDateDisabled(item),
  20539. 'is--selected': isSelected,
  20540. 'is--hover': isHover
  20541. },
  20542. on: {
  20543. click: function click() {
  20544. return $xeInput.dateSelectEvent(item);
  20545. },
  20546. mouseenter: function mouseenter() {
  20547. return $xeInput.dateMouseenterEvent(item);
  20548. }
  20549. }
  20550. }, $xeInput.renderDateLabel(h, item, item.label));
  20551. }));
  20552. }))])];
  20553. },
  20554. renderDateMonthTable: function renderDateMonthTable(h) {
  20555. var $xeInput = this;
  20556. var props = $xeInput;
  20557. var reactData = $xeInput.reactData;
  20558. var multiple = props.multiple;
  20559. var datePanelType = reactData.datePanelType,
  20560. datePanelValue = reactData.datePanelValue;
  20561. var dateValue = $xeInput.computeDateValue;
  20562. var monthDatas = $xeInput.computeMonthDatas;
  20563. var dateListValue = $xeInput.computeDateListValue;
  20564. var matchFormat = 'yyyyMM';
  20565. return [h('table', {
  20566. class: "vxe-input--date-".concat(datePanelType, "-view"),
  20567. attrs: {
  20568. cellspacing: 0,
  20569. cellpadding: 0,
  20570. border: 0
  20571. }
  20572. }, [h('tbody', monthDatas.map(function (rows) {
  20573. return h('tr', rows.map(function (item) {
  20574. return h('td', {
  20575. class: {
  20576. 'is--prev': item.isPrev,
  20577. 'is--current': item.isCurrent,
  20578. 'is--now': item.isNow,
  20579. 'is--next': item.isNext,
  20580. 'is--disabled': $xeInput.isDateDisabled(item),
  20581. 'is--selected': multiple ? dateListValue.some(function (val) {
  20582. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  20583. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  20584. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  20585. },
  20586. on: {
  20587. click: function click() {
  20588. return $xeInput.dateSelectEvent(item);
  20589. },
  20590. mouseenter: function mouseenter() {
  20591. return $xeInput.dateMouseenterEvent(item);
  20592. }
  20593. }
  20594. }, $xeInput.renderDateLabel(h, item, getI18n("vxe.input.date.months.m".concat(item.month))));
  20595. }));
  20596. }))])];
  20597. },
  20598. renderDateQuarterTable: function renderDateQuarterTable(h) {
  20599. var $xeInput = this;
  20600. var props = $xeInput;
  20601. var reactData = $xeInput.reactData;
  20602. var multiple = props.multiple;
  20603. var datePanelType = reactData.datePanelType,
  20604. datePanelValue = reactData.datePanelValue;
  20605. var dateValue = $xeInput.computeDateValue;
  20606. var quarterDatas = $xeInput.computeQuarterDatas;
  20607. var dateListValue = $xeInput.computeDateListValue;
  20608. var matchFormat = 'yyyyq';
  20609. return [h('table', {
  20610. class: "vxe-input--date-".concat(datePanelType, "-view"),
  20611. attrs: {
  20612. cellspacing: 0,
  20613. cellpadding: 0,
  20614. border: 0
  20615. }
  20616. }, [h('tbody', quarterDatas.map(function (rows) {
  20617. return h('tr', rows.map(function (item) {
  20618. return h('td', {
  20619. class: {
  20620. 'is--prev': item.isPrev,
  20621. 'is--current': item.isCurrent,
  20622. 'is--now': item.isNow,
  20623. 'is--next': item.isNext,
  20624. 'is--disabled': $xeInput.isDateDisabled(item),
  20625. 'is--selected': multiple ? dateListValue.some(function (val) {
  20626. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  20627. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  20628. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  20629. },
  20630. on: {
  20631. click: function click() {
  20632. return $xeInput.dateSelectEvent(item);
  20633. },
  20634. mouseenter: function mouseenter() {
  20635. return $xeInput.dateMouseenterEvent(item);
  20636. }
  20637. }
  20638. }, $xeInput.renderDateLabel(h, item, getI18n("vxe.input.date.quarters.q".concat(item.quarter))));
  20639. }));
  20640. }))])];
  20641. },
  20642. renderDateYearTable: function renderDateYearTable(h) {
  20643. var $xeInput = this;
  20644. var props = $xeInput;
  20645. var reactData = $xeInput.reactData;
  20646. var multiple = props.multiple;
  20647. var datePanelType = reactData.datePanelType,
  20648. datePanelValue = reactData.datePanelValue;
  20649. var dateValue = $xeInput.computeDateValue;
  20650. var yearDatas = $xeInput.computeYearDatas;
  20651. var dateListValue = $xeInput.computeDateListValue;
  20652. var matchFormat = 'yyyy';
  20653. return [h('table', {
  20654. class: "vxe-input--date-".concat(datePanelType, "-view"),
  20655. attrs: {
  20656. cellspacing: 0,
  20657. cellpadding: 0,
  20658. border: 0
  20659. }
  20660. }, [h('tbody', yearDatas.map(function (rows) {
  20661. return h('tr', rows.map(function (item) {
  20662. return h('td', {
  20663. class: {
  20664. 'is--prev': item.isPrev,
  20665. 'is--current': item.isCurrent,
  20666. 'is--now': item.isNow,
  20667. 'is--next': item.isNext,
  20668. 'is--disabled': $xeInput.isDateDisabled(item),
  20669. 'is--selected': multiple ? dateListValue.some(function (val) {
  20670. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  20671. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat),
  20672. 'is--hover': external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  20673. },
  20674. on: {
  20675. click: function click() {
  20676. return $xeInput.dateSelectEvent(item);
  20677. },
  20678. mouseenter: function mouseenter() {
  20679. return $xeInput.dateMouseenterEvent(item);
  20680. }
  20681. }
  20682. }, $xeInput.renderDateLabel(h, item, item.year));
  20683. }));
  20684. }))])];
  20685. },
  20686. renderDateTable: function renderDateTable(h) {
  20687. var $xeInput = this;
  20688. var reactData = $xeInput.reactData;
  20689. var datePanelType = reactData.datePanelType;
  20690. switch (datePanelType) {
  20691. case 'week':
  20692. return $xeInput.renderDateWeekTable(h);
  20693. case 'month':
  20694. return $xeInput.renderDateMonthTable(h);
  20695. case 'quarter':
  20696. return $xeInput.renderDateQuarterTable(h);
  20697. case 'year':
  20698. return $xeInput.renderDateYearTable(h);
  20699. }
  20700. return $xeInput.renderDateDayTable(h);
  20701. },
  20702. renderDatePanel: function renderDatePanel(h) {
  20703. var $xeInput = this;
  20704. var props = $xeInput;
  20705. var reactData = $xeInput.reactData;
  20706. var multiple = props.multiple;
  20707. var datePanelType = reactData.datePanelType;
  20708. var isDisabledPrevDateBtn = $xeInput.computeIsDisabledPrevDateBtn;
  20709. var isDisabledNextDateBtn = $xeInput.computeIsDisabledNextDateBtn;
  20710. var selectDatePanelObj = $xeInput.computeSelectDatePanelObj;
  20711. return [h('div', {
  20712. class: 'vxe-input--date-picker-header'
  20713. }, [h('div', {
  20714. class: 'vxe-input--date-picker-type-wrapper'
  20715. }, [datePanelType === 'year' ? h('span', {
  20716. class: 'vxe-input--date-picker-label'
  20717. }, selectDatePanelObj.y) : h('span', {
  20718. class: 'vxe-input--date-picker-btns'
  20719. }, [h('span', {
  20720. class: 'vxe-input--date-picker-btn',
  20721. on: {
  20722. click: $xeInput.dateToggleYearTypeEvent
  20723. }
  20724. }, selectDatePanelObj.y), selectDatePanelObj.m ? h('span', {
  20725. class: 'vxe-input--date-picker-btn',
  20726. on: {
  20727. click: $xeInput.dateToggleMonthTypeEvent
  20728. }
  20729. }, selectDatePanelObj.m) : renderEmptyElement($xeInput)])]), h('div', {
  20730. class: 'vxe-input--date-picker-btn-wrapper'
  20731. }, [h('span', {
  20732. class: ['vxe-input--date-picker-btn vxe-input--date-picker-prev-btn', {
  20733. 'is--disabled': isDisabledPrevDateBtn
  20734. }],
  20735. on: {
  20736. click: $xeInput.datePrevEvent
  20737. }
  20738. }, [h('i', {
  20739. class: 'vxe-icon-caret-left'
  20740. })]), h('span', {
  20741. class: 'vxe-input--date-picker-btn vxe-input--date-picker-current-btn',
  20742. on: {
  20743. click: $xeInput.dateTodayMonthEvent
  20744. }
  20745. }, [h('i', {
  20746. class: 'vxe-icon-dot'
  20747. })]), h('span', {
  20748. class: ['vxe-input--date-picker-btn vxe-input--date-picker-next-btn', {
  20749. 'is--disabled': isDisabledNextDateBtn
  20750. }],
  20751. on: {
  20752. click: $xeInput.dateNextEvent
  20753. }
  20754. }, [h('i', {
  20755. class: 'vxe-icon-caret-right'
  20756. })]), multiple && $xeInput.computeSupportMultiples ? h('span', {
  20757. class: 'vxe-input--date-picker-btn vxe-input--date-picker-confirm-btn'
  20758. }, [h('button', {
  20759. class: 'vxe-input--date-picker-confirm',
  20760. attrs: {
  20761. type: 'button'
  20762. },
  20763. on: {
  20764. click: $xeInput.dateConfirmEvent
  20765. }
  20766. }, getI18n('vxe.button.confirm'))]) : null])]), h('div', {
  20767. class: 'vxe-input--date-picker-body'
  20768. }, $xeInput.renderDateTable(h))];
  20769. },
  20770. renderTimePanel: function renderTimePanel(h) {
  20771. var $xeInput = this;
  20772. var reactData = $xeInput.reactData;
  20773. var datetimePanelValue = reactData.datetimePanelValue;
  20774. var dateTimeLabel = $xeInput.computeDateTimeLabel;
  20775. var hourList = $xeInput.computeHourList;
  20776. var hasTimeMinute = $xeInput.computeHasTimeMinute;
  20777. var minuteList = $xeInput.computeMinuteList;
  20778. var hasTimeSecond = $xeInput.computeHasTimeSecond;
  20779. var secondList = $xeInput.computeSecondList;
  20780. return [h('div', {
  20781. class: 'vxe-input--time-picker-header'
  20782. }, [hasTimeMinute ? h('span', {
  20783. class: 'vxe-input--time-picker-title'
  20784. }, dateTimeLabel) : renderEmptyElement($xeInput), h('div', {
  20785. class: 'vxe-input--time-picker-btn'
  20786. }, [h('button', {
  20787. class: 'vxe-input--time-picker-confirm',
  20788. attrs: {
  20789. type: 'button'
  20790. },
  20791. on: {
  20792. click: $xeInput.dateConfirmEvent
  20793. }
  20794. }, getI18n('vxe.button.confirm'))])]), h('div', {
  20795. ref: 'refInputTimeBody',
  20796. class: 'vxe-input--time-picker-body'
  20797. }, [h('ul', {
  20798. class: 'vxe-input--time-picker-hour-list'
  20799. }, hourList.map(function (item, index) {
  20800. return h('li', {
  20801. key: index,
  20802. class: {
  20803. 'is--selected': datetimePanelValue && datetimePanelValue.getHours() === item.value
  20804. },
  20805. on: {
  20806. click: function click(evnt) {
  20807. return $xeInput.dateHourEvent(evnt, item);
  20808. }
  20809. }
  20810. }, item.label);
  20811. })), hasTimeMinute ? h('ul', {
  20812. class: 'vxe-input--time-picker-minute-list'
  20813. }, minuteList.map(function (item, index) {
  20814. return h('li', {
  20815. key: index,
  20816. class: {
  20817. 'is--selected': datetimePanelValue && datetimePanelValue.getMinutes() === item.value
  20818. },
  20819. on: {
  20820. click: function click(evnt) {
  20821. return $xeInput.dateMinuteEvent(evnt, item);
  20822. }
  20823. }
  20824. }, item.label);
  20825. })) : renderEmptyElement($xeInput), hasTimeMinute && hasTimeSecond ? h('ul', {
  20826. class: 'vxe-input--time-picker-second-list'
  20827. }, secondList.map(function (item, index) {
  20828. return h('li', {
  20829. key: index,
  20830. class: {
  20831. 'is--selected': datetimePanelValue && datetimePanelValue.getSeconds() === item.value
  20832. },
  20833. on: {
  20834. click: function click(evnt) {
  20835. return $xeInput.dateSecondEvent(evnt, item);
  20836. }
  20837. }
  20838. }, item.label);
  20839. })) : renderEmptyElement($xeInput)])];
  20840. },
  20841. renderPanel: function renderPanel(h) {
  20842. var $xeInput = this;
  20843. var props = $xeInput;
  20844. var reactData = $xeInput.reactData;
  20845. var type = props.type;
  20846. var initialized = reactData.initialized,
  20847. isAniVisible = reactData.isAniVisible,
  20848. visiblePanel = reactData.visiblePanel,
  20849. panelPlacement = reactData.panelPlacement,
  20850. panelStyle = reactData.panelStyle;
  20851. var vSize = $xeInput.computeSize;
  20852. var btnTransfer = $xeInput.computeBtnTransfer;
  20853. var isDatePickerType = $xeInput.computeIsDatePickerType;
  20854. var renders = [];
  20855. if (isDatePickerType) {
  20856. if (type === 'datetime') {
  20857. renders.push(h('div', {
  20858. key: type,
  20859. ref: 'refPanelWrapper',
  20860. class: 'vxe-input--panel-layout-wrapper'
  20861. }, [h('div', {
  20862. class: 'vxe-input--panel-left-wrapper'
  20863. }, $xeInput.renderDatePanel(h)), h('div', {
  20864. class: 'vxe-input--panel-right-wrapper'
  20865. }, $xeInput.renderTimePanel(h))]));
  20866. } else if (type === 'time') {
  20867. renders.push(h('div', {
  20868. key: type,
  20869. ref: 'refPanelWrapper',
  20870. class: 'vxe-input--panel-wrapper'
  20871. }, $xeInput.renderTimePanel(h)));
  20872. } else {
  20873. renders.push(h('div', {
  20874. key: type || 'default',
  20875. ref: 'refPanelWrapper',
  20876. class: 'vxe-input--panel-wrapper'
  20877. }, $xeInput.renderDatePanel(h)));
  20878. }
  20879. return h('div', {
  20880. ref: 'refInputPanel',
  20881. class: ['vxe-table--ignore-clear vxe-input--panel', "type--".concat(type), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', isAniVisible), 'ani--enter', visiblePanel)],
  20882. attrs: {
  20883. placement: panelPlacement
  20884. },
  20885. style: panelStyle
  20886. }, initialized && (visiblePanel || isAniVisible) ? renders : []);
  20887. }
  20888. return renderEmptyElement($xeInput);
  20889. },
  20890. renderNumberIcon: function renderNumberIcon(h) {
  20891. var $xeInput = this;
  20892. var isDisabledAddNumber = $xeInput.computeIsDisabledAddNumber;
  20893. var isDisabledSubtractNumber = $xeInput.computeIsDisabledSubtractNumber;
  20894. return h('div', {
  20895. class: 'vxe-input--control-icon'
  20896. }, [h('div', {
  20897. class: 'vxe-input--number-icon'
  20898. }, [h('div', {
  20899. class: ['vxe-input--number-btn is--prev', {
  20900. 'is--disabled': isDisabledAddNumber
  20901. }],
  20902. on: {
  20903. mousedown: $xeInput.numberMousedownEvent,
  20904. mouseup: $xeInput.numberStopDown,
  20905. mouseleave: $xeInput.numberStopDown
  20906. }
  20907. }, [h('i', {
  20908. class: getIcon().INPUT_PLUS_NUM
  20909. })]), h('div', {
  20910. class: ['vxe-input--number-btn is--next', {
  20911. 'is--disabled': isDisabledSubtractNumber
  20912. }],
  20913. on: {
  20914. mousedown: $xeInput.numberMousedownEvent,
  20915. mouseup: $xeInput.numberStopDown,
  20916. mouseleave: $xeInput.numberStopDown
  20917. }
  20918. }, [h('i', {
  20919. class: getIcon().INPUT_MINUS_NUM
  20920. })])])]);
  20921. },
  20922. renderDatePickerIcon: function renderDatePickerIcon(h) {
  20923. var $xeInput = this;
  20924. return h('div', {
  20925. class: 'vxe-input--control-icon',
  20926. on: {
  20927. click: $xeInput.datePickerOpenEvent
  20928. }
  20929. }, [h('i', {
  20930. class: ['vxe-input--date-picker-icon', getIcon().DATE_PICKER_DATE]
  20931. })]);
  20932. },
  20933. renderSearchIcon: function renderSearchIcon(h) {
  20934. var $xeInput = this;
  20935. return h('div', {
  20936. class: 'vxe-input--control-icon',
  20937. on: {
  20938. click: $xeInput.searchEvent
  20939. }
  20940. }, [h('i', {
  20941. class: ['vxe-input--search-icon', getIcon().INPUT_SEARCH]
  20942. })]);
  20943. },
  20944. renderPasswordIcon: function renderPasswordIcon(h) {
  20945. var $xeInput = this;
  20946. var reactData = $xeInput.reactData;
  20947. var showPwd = reactData.showPwd;
  20948. return h('div', {
  20949. class: 'vxe-input--control-icon',
  20950. on: {
  20951. click: $xeInput.passwordToggleEvent
  20952. }
  20953. }, [h('i', {
  20954. class: ['vxe-input--password-icon', showPwd ? getIcon().PASSWORD_INPUT_SHOW_PWD : getIcon().PASSWORD_INPUT_HIDE_PWD]
  20955. })]);
  20956. },
  20957. renderPrefixIcon: function renderPrefixIcon(h) {
  20958. var $xeInput = this;
  20959. var props = $xeInput;
  20960. var slots = $xeInput.$scopedSlots;
  20961. var prefixIcon = props.prefixIcon;
  20962. var prefixSlot = slots.prefix;
  20963. return prefixSlot || prefixIcon ? h('div', {
  20964. class: 'vxe-input--prefix',
  20965. on: {
  20966. click: $xeInput.clickPrefixEvent
  20967. }
  20968. }, [h('div', {
  20969. class: 'vxe-input--prefix-icon'
  20970. }, prefixSlot ? vn_getSlotVNs(prefixSlot({})) : [h('i', {
  20971. class: prefixIcon
  20972. })])]) : null;
  20973. },
  20974. renderSuffixIcon: function renderSuffixIcon(h) {
  20975. var $xeInput = this;
  20976. var props = $xeInput;
  20977. var slots = $xeInput.$scopedSlots;
  20978. var reactData = $xeInput.reactData;
  20979. var suffixIcon = props.suffixIcon;
  20980. var inputValue = reactData.inputValue;
  20981. var suffixSlot = slots.suffix;
  20982. var isDisabled = $xeInput.computeIsDisabled;
  20983. var isNumType = $xeInput.computeIsNumType;
  20984. var isDatePickerType = $xeInput.computeIsDatePickerType;
  20985. var isPawdType = $xeInput.computeIsPawdType;
  20986. var isSearchType = $xeInput.computeIsSearchType;
  20987. var isClearable = $xeInput.computeIsClearable;
  20988. var isExtraBtn = isPawdType || isNumType || isDatePickerType || isSearchType;
  20989. return isClearable || suffixSlot || suffixIcon || isExtraBtn ? h('div', {
  20990. class: ['vxe-input--suffix', {
  20991. 'is--clear': isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue))
  20992. }]
  20993. }, [isClearable ? h('div', {
  20994. class: 'vxe-input--clear-icon',
  20995. on: {
  20996. click: $xeInput.clearValueEvent
  20997. }
  20998. }, [h('i', {
  20999. class: getIcon().INPUT_CLEAR
  21000. })]) : renderEmptyElement($xeInput), isExtraBtn ? $xeInput.renderExtraSuffixIcon(h) : renderEmptyElement($xeInput), suffixSlot || suffixIcon ? h('div', {
  21001. class: 'vxe-input--suffix-icon',
  21002. on: {
  21003. click: $xeInput.clickSuffixEvent
  21004. }
  21005. }, suffixSlot ? vn_getSlotVNs(suffixSlot({})) : [h('i', {
  21006. class: suffixIcon
  21007. })]) : renderEmptyElement($xeInput)]) : null;
  21008. },
  21009. renderExtraSuffixIcon: function renderExtraSuffixIcon(h) {
  21010. var $xeInput = this;
  21011. var props = $xeInput;
  21012. var controls = props.controls;
  21013. var isNumType = $xeInput.computeIsNumType;
  21014. var isDatePickerType = $xeInput.computeIsDatePickerType;
  21015. var isPawdType = $xeInput.computeIsPawdType;
  21016. var isSearchType = $xeInput.computeIsSearchType;
  21017. if (isPawdType) {
  21018. return $xeInput.renderPasswordIcon(h);
  21019. }
  21020. if (isNumType) {
  21021. if (controls) {
  21022. return $xeInput.renderNumberIcon(h);
  21023. }
  21024. }
  21025. if (isDatePickerType) {
  21026. return $xeInput.renderDatePickerIcon(h);
  21027. }
  21028. if (isSearchType) {
  21029. return $xeInput.renderSearchIcon(h);
  21030. }
  21031. return renderEmptyElement($xeInput);
  21032. },
  21033. renderVN: function renderVN(h) {
  21034. var $xeInput = this;
  21035. var props = $xeInput;
  21036. var reactData = $xeInput.reactData;
  21037. var className = props.className,
  21038. controls = props.controls,
  21039. type = props.type,
  21040. title = props.title,
  21041. align = props.align,
  21042. showWordCount = props.showWordCount,
  21043. countMethod = props.countMethod,
  21044. name = props.name,
  21045. autoComplete = props.autoComplete,
  21046. autocomplete = props.autocomplete;
  21047. var inputValue = reactData.inputValue,
  21048. visiblePanel = reactData.visiblePanel,
  21049. isActivated = reactData.isActivated;
  21050. var vSize = $xeInput.computeSize;
  21051. var isDisabled = $xeInput.computeIsDisabled;
  21052. var formReadonly = $xeInput.computeFormReadonly;
  21053. if (formReadonly) {
  21054. return h('div', {
  21055. ref: 'refElem',
  21056. class: ['vxe-input--readonly', "type--".concat(type), className]
  21057. }, inputValue);
  21058. }
  21059. var isCountError = $xeInput.computeIsCountError;
  21060. var inputCount = $xeInput.computeInputCount;
  21061. var inputReadonly = $xeInput.computeInputReadonly;
  21062. var inpMaxLength = $xeInput.computeInpMaxLength;
  21063. var inputType = $xeInput.computeInputType;
  21064. var inpPlaceholder = $xeInput.computeInpPlaceholder;
  21065. var isClearable = $xeInput.computeIsClearable;
  21066. var isWordCount = showWordCount && ['text', 'search'].includes(type);
  21067. var prefix = $xeInput.renderPrefixIcon(h);
  21068. var suffix = $xeInput.renderSuffixIcon(h);
  21069. return h('div', {
  21070. ref: 'refElem',
  21071. class: ['vxe-input', "type--".concat(type), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "is--".concat(align), align), 'is--controls', controls), 'is--prefix', !!prefix), 'is--suffix', !!suffix), 'is--visible', visiblePanel), 'is--count', isWordCount), 'is--disabled', isDisabled), 'is--active', isActivated), 'show--clear', isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue)))],
  21072. attrs: {
  21073. spellcheck: false
  21074. }
  21075. }, [prefix || renderEmptyElement($xeInput), h('div', {
  21076. class: 'vxe-input--wrapper',
  21077. attrs: title ? {
  21078. title: title
  21079. } : undefined
  21080. }, [h('input', {
  21081. ref: 'refInputTarget',
  21082. class: 'vxe-input--inner',
  21083. domProps: {
  21084. value: inputValue
  21085. },
  21086. attrs: {
  21087. name: name,
  21088. type: inputType,
  21089. placeholder: inpPlaceholder,
  21090. maxlength: inpMaxLength,
  21091. readonly: inputReadonly,
  21092. disabled: isDisabled,
  21093. autocomplete: autoComplete || autocomplete
  21094. },
  21095. on: {
  21096. keydown: $xeInput.keydownEvent,
  21097. keyup: $xeInput.keyupEvent,
  21098. click: $xeInput.clickEvent,
  21099. input: $xeInput.inputEvent,
  21100. change: $xeInput.changeEvent,
  21101. focus: $xeInput.focusEvent,
  21102. blur: $xeInput.blurEvent
  21103. }
  21104. })]), suffix || renderEmptyElement($xeInput),
  21105. // 下拉面板
  21106. $xeInput.renderPanel(h),
  21107. // 字数统计
  21108. isWordCount ? h('span', {
  21109. class: ['vxe-input--count', {
  21110. 'is--error': isCountError
  21111. }]
  21112. }, countMethod ? "".concat(countMethod({
  21113. value: inputValue
  21114. })) : "".concat(inputCount).concat(inpMaxLength ? "/".concat(inpMaxLength) : '')) : renderEmptyElement($xeInput)]);
  21115. }
  21116. },
  21117. watch: {
  21118. value: function value(val) {
  21119. var $xeInput = this;
  21120. var reactData = $xeInput.reactData;
  21121. reactData.inputValue = val;
  21122. $xeInput.changeValue();
  21123. },
  21124. type: function type() {
  21125. var $xeInput = this;
  21126. var props = $xeInput;
  21127. var reactData = $xeInput.reactData;
  21128. // 切换类型是重置内置变量
  21129. Object.assign(reactData, {
  21130. inputValue: props.value,
  21131. datetimePanelValue: null,
  21132. datePanelValue: null,
  21133. datePanelLabel: '',
  21134. datePanelType: 'day',
  21135. selectMonth: null,
  21136. currentDate: null
  21137. });
  21138. $xeInput.initValue();
  21139. },
  21140. computeDateLabelFormat: function computeDateLabelFormat() {
  21141. var $xeInput = this;
  21142. var props = $xeInput;
  21143. var reactData = $xeInput.reactData;
  21144. var isDatePickerType = $xeInput.computeIsDatePickerType;
  21145. if (isDatePickerType) {
  21146. $xeInput.dateParseValue(reactData.datePanelValue);
  21147. reactData.inputValue = props.multiple ? $xeInput.computeDateMultipleLabel : reactData.datePanelLabel;
  21148. }
  21149. }
  21150. },
  21151. created: function created() {
  21152. var $xeInput = this;
  21153. var props = $xeInput;
  21154. var reactData = $xeInput.reactData;
  21155. reactData.inputValue = props.value;
  21156. $xeInput.initValue();
  21157. },
  21158. mounted: function mounted() {
  21159. var $xeInput = this;
  21160. var props = $xeInput;
  21161. var type = props.type;
  21162. if (['date', 'time', 'datetime', 'week', 'month', 'quarter', 'year'].includes(type)) {
  21163. warnLog('vxe.error.useNew', ["<vxe-input type=\"".concat(type, "\" ... />"), "<vxe-date-picker type=\"".concat(type, "\" ... />")]);
  21164. } else if (['number', 'integer', 'float'].includes(type)) {
  21165. warnLog('vxe.error.useNew', ["<vxe-input type=\"".concat(type, "\" ... />"), "<vxe-number-input type=\"".concat(type, "\" ... />")]);
  21166. } else if (['password'].includes(type)) {
  21167. warnLog('vxe.error.useNew', ["<vxe-input type=\"".concat(type, "\" ... />"), '<vxe-password-input ... />']);
  21168. }
  21169. var inputElem = $xeInput.$refs.refInputTarget;
  21170. if (inputElem) {
  21171. inputElem.addEventListener('wheel', $xeInput.wheelEvent, {
  21172. passive: false
  21173. });
  21174. }
  21175. globalEvents.on($xeInput, 'mousewheel', $xeInput.handleGlobalMousewheelEvent);
  21176. globalEvents.on($xeInput, 'mousedown', $xeInput.handleGlobalMousedownEvent);
  21177. globalEvents.on($xeInput, 'keydown', $xeInput.handleGlobalKeydownEvent);
  21178. globalEvents.on($xeInput, 'blur', $xeInput.handleGlobalBlurEvent);
  21179. },
  21180. beforeDestroy: function beforeDestroy() {
  21181. var $xeInput = this;
  21182. var panelElem = $xeInput.$refs.refInputPanel;
  21183. if (panelElem && panelElem.parentNode) {
  21184. panelElem.parentNode.removeChild(panelElem);
  21185. }
  21186. $xeInput.numberStopDown();
  21187. $xeInput.afterCheckValue();
  21188. var inputElem = $xeInput.$refs.refInputTarget;
  21189. if (inputElem) {
  21190. inputElem.removeEventListener('wheel', $xeInput.wheelEvent);
  21191. }
  21192. globalEvents.off($xeInput, 'mousewheel');
  21193. globalEvents.off($xeInput, 'mousedown');
  21194. globalEvents.off($xeInput, 'keydown');
  21195. globalEvents.off($xeInput, 'blur');
  21196. },
  21197. render: function render(h) {
  21198. return this.renderVN(h);
  21199. }
  21200. })); /* define-vxe-component end */
  21201. ;// CONCATENATED MODULE: ./packages/number-input/src/number-input.ts
  21202. var handleNumberString = function handleNumberString(val) {
  21203. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(val)) {
  21204. return '';
  21205. }
  21206. return "".concat(val);
  21207. };
  21208. /* harmony default export */ var number_input = (/* define-vxe-component start */defineVxeComponent({
  21209. name: 'VxeNumberInput',
  21210. mixins: [globalMixins.sizeMixin],
  21211. model: {
  21212. prop: 'value',
  21213. event: 'modelValue'
  21214. },
  21215. props: {
  21216. value: [String, Number],
  21217. immediate: {
  21218. type: Boolean,
  21219. default: true
  21220. },
  21221. name: String,
  21222. type: {
  21223. type: String,
  21224. default: 'number'
  21225. },
  21226. clearable: {
  21227. type: Boolean,
  21228. default: function _default() {
  21229. return getConfig().numberInput.clearable;
  21230. }
  21231. },
  21232. readonly: {
  21233. type: Boolean,
  21234. default: null
  21235. },
  21236. disabled: {
  21237. type: Boolean,
  21238. default: null
  21239. },
  21240. placeholder: String,
  21241. maxLength: {
  21242. type: [String, Number],
  21243. default: function _default() {
  21244. return getConfig().numberInput.maxLength;
  21245. }
  21246. },
  21247. autoComplete: {
  21248. type: String,
  21249. default: 'off'
  21250. },
  21251. align: String,
  21252. form: String,
  21253. className: String,
  21254. size: {
  21255. type: String,
  21256. default: function _default() {
  21257. return getConfig().numberInput.size || getConfig().size;
  21258. }
  21259. },
  21260. // number、integer、float
  21261. min: {
  21262. type: [String, Number],
  21263. default: null
  21264. },
  21265. max: {
  21266. type: [String, Number],
  21267. default: null
  21268. },
  21269. step: [String, Number],
  21270. exponential: {
  21271. type: Boolean,
  21272. default: function _default() {
  21273. return getConfig().numberInput.exponential;
  21274. }
  21275. },
  21276. showCurrency: {
  21277. type: Boolean,
  21278. default: function _default() {
  21279. return getConfig().numberInput.showCurrency;
  21280. }
  21281. },
  21282. currencySymbol: {
  21283. type: String,
  21284. default: function _default() {
  21285. return getConfig().numberInput.currencySymbol;
  21286. }
  21287. },
  21288. controlConfig: Object,
  21289. // float
  21290. digits: {
  21291. type: [String, Number],
  21292. default: null
  21293. },
  21294. autoFill: {
  21295. type: Boolean,
  21296. default: function _default() {
  21297. return getConfig().numberInput.autoFill;
  21298. }
  21299. },
  21300. editable: {
  21301. type: Boolean,
  21302. default: true
  21303. },
  21304. plusIcon: String,
  21305. minusIcon: String,
  21306. prefixIcon: String,
  21307. suffixIcon: String,
  21308. // 已废弃
  21309. controls: {
  21310. type: Boolean,
  21311. default: null
  21312. },
  21313. // 已废弃
  21314. maxlength: [String, Number],
  21315. // 已废弃
  21316. autocomplete: String
  21317. },
  21318. inject: {
  21319. $xeForm: {
  21320. default: null
  21321. },
  21322. formItemInfo: {
  21323. from: 'xeFormItemInfo',
  21324. default: null
  21325. }
  21326. },
  21327. data: function data() {
  21328. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  21329. var reactData = {
  21330. isFocus: false,
  21331. isActivated: false,
  21332. inputValue: ''
  21333. };
  21334. var internalData = {
  21335. // dnTimeout: undefined,
  21336. // ainTimeout: undefined,
  21337. // isMouseDown: undefined,
  21338. // isUM: undefined
  21339. };
  21340. return {
  21341. xID: xID,
  21342. reactData: reactData,
  21343. internalData: internalData
  21344. };
  21345. },
  21346. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  21347. computeFormReadonly: function computeFormReadonly() {
  21348. var $xeNumberInput = this;
  21349. var props = $xeNumberInput;
  21350. var $xeForm = $xeNumberInput.$xeForm;
  21351. var readonly = props.readonly;
  21352. if (readonly === null) {
  21353. if ($xeForm) {
  21354. return $xeForm.readonly;
  21355. }
  21356. return false;
  21357. }
  21358. return readonly;
  21359. },
  21360. computeIsDisabled: function computeIsDisabled() {
  21361. var $xeNumberInput = this;
  21362. var props = $xeNumberInput;
  21363. var $xeForm = $xeNumberInput.$xeForm;
  21364. var disabled = props.disabled;
  21365. if (disabled === null) {
  21366. if ($xeForm) {
  21367. return $xeForm.disabled;
  21368. }
  21369. return false;
  21370. }
  21371. return disabled;
  21372. },
  21373. computeDigitsValue: function computeDigitsValue() {
  21374. var $xeNumberInput = this;
  21375. var props = $xeNumberInput;
  21376. var type = props.type,
  21377. digits = props.digits;
  21378. var defDigits = digits;
  21379. if (defDigits === null) {
  21380. defDigits = getConfig().numberInput.digits;
  21381. if (defDigits === null) {
  21382. if (type === 'amount') {
  21383. defDigits = 2;
  21384. }
  21385. }
  21386. }
  21387. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(defDigits) || 1;
  21388. },
  21389. computeControlOpts: function computeControlOpts() {
  21390. var $xeNumberInput = this;
  21391. var props = $xeNumberInput;
  21392. return Object.assign({}, getConfig().numberInput.controlConfig, props.controlConfig);
  21393. },
  21394. computeDecimalsType: function computeDecimalsType() {
  21395. var $xeNumberInput = this;
  21396. var props = $xeNumberInput;
  21397. var type = props.type;
  21398. return type === 'float' || type === 'amount';
  21399. },
  21400. computeStepValue: function computeStepValue() {
  21401. var $xeNumberInput = this;
  21402. var props = $xeNumberInput;
  21403. var type = props.type;
  21404. var digitsValue = $xeNumberInput.computeDigitsValue;
  21405. var decimalsType = $xeNumberInput.computeDecimalsType;
  21406. var step = props.step;
  21407. if (type === 'integer') {
  21408. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(step) || 1;
  21409. } else if (decimalsType) {
  21410. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(step) || 1 / Math.pow(10, digitsValue);
  21411. }
  21412. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(step) || 1;
  21413. },
  21414. computeIsClearable: function computeIsClearable() {
  21415. var $xeNumberInput = this;
  21416. var props = $xeNumberInput;
  21417. return props.clearable;
  21418. },
  21419. computeInputReadonly: function computeInputReadonly() {
  21420. var $xeNumberInput = this;
  21421. var props = $xeNumberInput;
  21422. var editable = props.editable;
  21423. var formReadonly = $xeNumberInput.computeFormReadonly;
  21424. return formReadonly || !editable;
  21425. },
  21426. computeInpPlaceholder: function computeInpPlaceholder() {
  21427. var $xeNumberInput = this;
  21428. var props = $xeNumberInput;
  21429. var placeholder = props.placeholder;
  21430. if (placeholder) {
  21431. return getFuncText(placeholder);
  21432. }
  21433. var globalPlaceholder = getConfig().numberInput.placeholder;
  21434. if (globalPlaceholder) {
  21435. return getFuncText(globalPlaceholder);
  21436. }
  21437. return getI18n('vxe.base.pleaseInput');
  21438. },
  21439. computeInpMaxLength: function computeInpMaxLength() {
  21440. var $xeNumberInput = this;
  21441. var props = $xeNumberInput;
  21442. var maxLength = props.maxLength,
  21443. maxlength = props.maxlength;
  21444. // 数值最大长度限制 16 位,包含小数
  21445. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(maxLength || maxlength) || 16;
  21446. },
  21447. computeInpImmediate: function computeInpImmediate() {
  21448. var $xeNumberInput = this;
  21449. var props = $xeNumberInput;
  21450. var immediate = props.immediate;
  21451. return immediate;
  21452. },
  21453. computeNumValue: function computeNumValue() {
  21454. var $xeNumberInput = this;
  21455. var props = $xeNumberInput;
  21456. var reactData = $xeNumberInput.reactData;
  21457. var type = props.type;
  21458. var inputValue = reactData.inputValue;
  21459. return type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(handleNumber(inputValue));
  21460. },
  21461. computeNumLabel: function computeNumLabel() {
  21462. var $xeNumberInput = this;
  21463. var props = $xeNumberInput;
  21464. var reactData = $xeNumberInput.reactData;
  21465. var type = props.type,
  21466. showCurrency = props.showCurrency,
  21467. currencySymbol = props.currencySymbol,
  21468. autoFill = props.autoFill;
  21469. var inputValue = reactData.inputValue;
  21470. var digitsValue = $xeNumberInput.computeDigitsValue;
  21471. if (type === 'amount') {
  21472. var num = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue);
  21473. var amountLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(num, {
  21474. digits: digitsValue
  21475. });
  21476. if (!autoFill) {
  21477. var _amountLabel$split = amountLabel.split('.'),
  21478. _amountLabel$split2 = _slicedToArray(_amountLabel$split, 2),
  21479. iStr = _amountLabel$split2[0],
  21480. dStr = _amountLabel$split2[1];
  21481. if (dStr) {
  21482. var dRest = dStr.replace(/0+$/, '');
  21483. amountLabel = dRest ? [iStr, '.', dRest].join('') : iStr;
  21484. }
  21485. }
  21486. if (showCurrency) {
  21487. return "".concat(currencySymbol || getI18n('vxe.numberInput.currencySymbol') || '').concat(amountLabel);
  21488. }
  21489. return amountLabel;
  21490. }
  21491. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toString(inputValue);
  21492. },
  21493. computeIsDisabledSubtractNumber: function computeIsDisabledSubtractNumber() {
  21494. var $xeNumberInput = this;
  21495. var props = $xeNumberInput;
  21496. var reactData = $xeNumberInput.reactData;
  21497. var min = props.min;
  21498. var inputValue = reactData.inputValue;
  21499. var numValue = $xeNumberInput.computeNumValue;
  21500. // 当有值时再进行判断
  21501. if ((inputValue || inputValue === 0) && min !== null) {
  21502. return numValue <= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(min);
  21503. }
  21504. return false;
  21505. },
  21506. computeIsDisabledAddNumber: function computeIsDisabledAddNumber() {
  21507. var $xeNumberInput = this;
  21508. var props = $xeNumberInput;
  21509. var reactData = $xeNumberInput.reactData;
  21510. var max = props.max;
  21511. var inputValue = reactData.inputValue;
  21512. var numValue = $xeNumberInput.computeNumValue;
  21513. // 当有值时再进行判断
  21514. if ((inputValue || inputValue === 0) && max !== null) {
  21515. return numValue >= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(max);
  21516. }
  21517. return false;
  21518. }
  21519. }),
  21520. methods: {
  21521. //
  21522. // Method
  21523. //
  21524. dispatchEvent: function dispatchEvent(type, params, evnt) {
  21525. var $xeNumberInput = this;
  21526. $xeNumberInput.$emit(type, createEvent(evnt, {
  21527. $numberInput: $xeNumberInput
  21528. }, params));
  21529. },
  21530. emitModel: function emitModel(value) {
  21531. var $xeNumberInput = this;
  21532. var _events = $xeNumberInput._events;
  21533. if (_events && _events.modelValue) {
  21534. $xeNumberInput.$emit('modelValue', value);
  21535. } else {
  21536. $xeNumberInput.$emit('model-value', value);
  21537. }
  21538. },
  21539. focus: function focus() {
  21540. var $xeNumberInput = this;
  21541. var reactData = $xeNumberInput.reactData;
  21542. var inputReadonly = $xeNumberInput.computeInputReadonly;
  21543. if (!inputReadonly) {
  21544. var inputElem = $xeNumberInput.$refs.refInputTarget;
  21545. reactData.isActivated = true;
  21546. inputElem.focus();
  21547. }
  21548. return $xeNumberInput.$nextTick();
  21549. },
  21550. blur: function blur() {
  21551. var $xeNumberInput = this;
  21552. var reactData = $xeNumberInput.reactData;
  21553. var inputElem = $xeNumberInput.$refs.refInputTarget;
  21554. inputElem.blur();
  21555. reactData.isActivated = false;
  21556. return $xeNumberInput.$nextTick();
  21557. },
  21558. select: function select() {
  21559. var $xeNumberInput = this;
  21560. var reactData = $xeNumberInput.reactData;
  21561. var inputElem = $xeNumberInput.$refs.refInputTarget;
  21562. inputElem.select();
  21563. reactData.isActivated = false;
  21564. return $xeNumberInput.$nextTick();
  21565. },
  21566. getNumberValue: function getNumberValue(val) {
  21567. var $xeNumberInput = this;
  21568. var props = $xeNumberInput;
  21569. var exponential = props.exponential,
  21570. autoFill = props.autoFill;
  21571. var inpMaxLength = $xeNumberInput.computeInpMaxLength;
  21572. var digitsValue = $xeNumberInput.computeDigitsValue;
  21573. var decimalsType = $xeNumberInput.computeDecimalsType;
  21574. var restVal = '';
  21575. if (decimalsType) {
  21576. restVal = toFloatValueFixed(val, digitsValue);
  21577. if (!autoFill) {
  21578. restVal = handleNumberString(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(restVal));
  21579. }
  21580. } else {
  21581. restVal = handleNumberString(val);
  21582. }
  21583. if (exponential && (val === restVal || handleNumberString(val).toLowerCase() === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(restVal).toExponential())) {
  21584. return val;
  21585. }
  21586. return restVal.slice(0, inpMaxLength);
  21587. },
  21588. triggerEvent: function triggerEvent(evnt) {
  21589. var $xeNumberInput = this;
  21590. var reactData = $xeNumberInput.reactData;
  21591. var inputValue = reactData.inputValue;
  21592. $xeNumberInput.dispatchEvent(evnt.type, {
  21593. value: inputValue
  21594. }, evnt);
  21595. },
  21596. handleChange: function handleChange(val, inputValue, evnt) {
  21597. var $xeNumberInput = this;
  21598. var props = $xeNumberInput;
  21599. var reactData = $xeNumberInput.reactData;
  21600. var internalData = $xeNumberInput.internalData;
  21601. var $xeForm = $xeNumberInput.$xeForm;
  21602. var formItemInfo = $xeNumberInput.formItemInfo;
  21603. var value = eqEmptyValue(val) ? null : Number(val);
  21604. var isChange = value !== props.value;
  21605. if (isChange) {
  21606. internalData.isUM = true;
  21607. $xeNumberInput.emitModel(value);
  21608. }
  21609. if (reactData.inputValue !== inputValue) {
  21610. $xeNumberInput.$nextTick(function () {
  21611. reactData.inputValue = inputValue || '';
  21612. });
  21613. }
  21614. $xeNumberInput.dispatchEvent('input', {
  21615. value: value
  21616. }, evnt);
  21617. if (isChange) {
  21618. $xeNumberInput.dispatchEvent('change', {
  21619. value: value
  21620. }, evnt);
  21621. // 自动更新校验状态
  21622. if ($xeForm && formItemInfo) {
  21623. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  21624. }
  21625. }
  21626. },
  21627. emitInputEvent: function emitInputEvent(inputValue, evnt) {
  21628. var $xeNumberInput = this;
  21629. var reactData = $xeNumberInput.reactData;
  21630. var inpImmediate = $xeNumberInput.computeInpImmediate;
  21631. var value = inputValue === eqEmptyValue(inputValue) ? null : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue);
  21632. reactData.inputValue = inputValue;
  21633. if (inpImmediate) {
  21634. $xeNumberInput.handleChange(value, inputValue, evnt);
  21635. } else {
  21636. $xeNumberInput.dispatchEvent('input', {
  21637. value: value
  21638. }, evnt);
  21639. }
  21640. },
  21641. inputEvent: function inputEvent(evnt) {
  21642. var $xeNumberInput = this;
  21643. var inputElem = evnt.target;
  21644. var value = inputElem.value;
  21645. $xeNumberInput.emitInputEvent(value, evnt);
  21646. },
  21647. changeEvent: function changeEvent(evnt) {
  21648. var $xeNumberInput = this;
  21649. var reactData = $xeNumberInput.reactData;
  21650. var inpImmediate = $xeNumberInput.computeInpImmediate;
  21651. if (!inpImmediate) {
  21652. $xeNumberInput.triggerEvent(evnt);
  21653. }
  21654. $xeNumberInput.dispatchEvent('lazy-change', {
  21655. value: reactData.inputValue
  21656. }, evnt);
  21657. },
  21658. focusEvent: function focusEvent(evnt) {
  21659. var $xeNumberInput = this;
  21660. var reactData = $xeNumberInput.reactData;
  21661. var inputReadonly = $xeNumberInput.computeInputReadonly;
  21662. if (!inputReadonly) {
  21663. var inputValue = reactData.inputValue;
  21664. reactData.inputValue = eqEmptyValue(inputValue) ? '' : "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue));
  21665. reactData.isFocus = true;
  21666. reactData.isActivated = true;
  21667. $xeNumberInput.triggerEvent(evnt);
  21668. }
  21669. },
  21670. clickPrefixEvent: function clickPrefixEvent(evnt) {
  21671. var $xeNumberInput = this;
  21672. var reactData = $xeNumberInput.reactData;
  21673. var isDisabled = $xeNumberInput.computeIsDisabled;
  21674. if (!isDisabled) {
  21675. var inputValue = reactData.inputValue;
  21676. $xeNumberInput.dispatchEvent('prefix-click', {
  21677. value: inputValue
  21678. }, evnt);
  21679. }
  21680. },
  21681. clearValueEvent: function clearValueEvent(evnt, value) {
  21682. var $xeNumberInput = this;
  21683. $xeNumberInput.focus();
  21684. $xeNumberInput.handleChange(null, '', evnt);
  21685. $xeNumberInput.dispatchEvent('clear', {
  21686. value: value
  21687. }, evnt);
  21688. $xeNumberInput.dispatchEvent('lazy-change', {
  21689. value: value
  21690. }, evnt);
  21691. },
  21692. clickSuffixEvent: function clickSuffixEvent(evnt) {
  21693. var $xeNumberInput = this;
  21694. var reactData = $xeNumberInput.reactData;
  21695. var isDisabled = $xeNumberInput.computeIsDisabled;
  21696. if (!isDisabled) {
  21697. var inputValue = reactData.inputValue;
  21698. $xeNumberInput.dispatchEvent('suffix-click', {
  21699. value: inputValue
  21700. }, evnt);
  21701. }
  21702. },
  21703. updateModel: function updateModel(val) {
  21704. var $xeNumberInput = this;
  21705. var props = $xeNumberInput;
  21706. var reactData = $xeNumberInput.reactData;
  21707. var autoFill = props.autoFill;
  21708. var inputValue = reactData.inputValue;
  21709. var digitsValue = $xeNumberInput.computeDigitsValue;
  21710. var decimalsType = $xeNumberInput.computeDecimalsType;
  21711. if (eqEmptyValue(val)) {
  21712. reactData.inputValue = '';
  21713. } else {
  21714. var textValue = "".concat(val);
  21715. if (decimalsType) {
  21716. textValue = toFloatValueFixed(val, digitsValue);
  21717. if (!autoFill) {
  21718. textValue = "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textValue));
  21719. }
  21720. }
  21721. if (textValue !== inputValue) {
  21722. reactData.inputValue = textValue;
  21723. }
  21724. }
  21725. },
  21726. /**
  21727. * 检查初始值
  21728. */
  21729. initValue: function initValue() {
  21730. var $xeNumberInput = this;
  21731. var props = $xeNumberInput;
  21732. var reactData = $xeNumberInput.reactData;
  21733. var autoFill = props.autoFill;
  21734. var inputValue = reactData.inputValue;
  21735. var digitsValue = $xeNumberInput.computeDigitsValue;
  21736. var decimalsType = $xeNumberInput.computeDecimalsType;
  21737. if (decimalsType) {
  21738. if (inputValue) {
  21739. var textValue = '';
  21740. var validValue = null;
  21741. if (inputValue) {
  21742. textValue = toFloatValueFixed(inputValue, digitsValue);
  21743. validValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textValue);
  21744. if (!autoFill) {
  21745. textValue = "".concat(validValue);
  21746. }
  21747. }
  21748. if (inputValue !== validValue) {
  21749. $xeNumberInput.handleChange(validValue, textValue, {
  21750. type: 'init'
  21751. });
  21752. } else {
  21753. reactData.inputValue = textValue;
  21754. }
  21755. }
  21756. }
  21757. },
  21758. validMaxNum: function validMaxNum(num) {
  21759. var $xeNumberInput = this;
  21760. var props = $xeNumberInput;
  21761. return props.max === null || props.max === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(num) <= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.max);
  21762. },
  21763. validMinNum: function validMinNum(num) {
  21764. var $xeNumberInput = this;
  21765. var props = $xeNumberInput;
  21766. return props.min === null || props.min === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(num) >= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.min);
  21767. },
  21768. afterCheckValue: function afterCheckValue() {
  21769. var $xeNumberInput = this;
  21770. var props = $xeNumberInput;
  21771. var reactData = $xeNumberInput.reactData;
  21772. var type = props.type,
  21773. min = props.min,
  21774. max = props.max,
  21775. exponential = props.exponential;
  21776. var inputValue = reactData.inputValue;
  21777. var inputReadonly = $xeNumberInput.computeInputReadonly;
  21778. if (!inputReadonly) {
  21779. if (eqEmptyValue(inputValue)) {
  21780. var inpNumVal = null;
  21781. var inpValue = inputValue;
  21782. if (min || min === 0) {
  21783. inpNumVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(min);
  21784. inpValue = "".concat(inpNumVal);
  21785. }
  21786. $xeNumberInput.handleChange(inpNumVal, "".concat(inpValue || ''), {
  21787. type: 'check'
  21788. });
  21789. return;
  21790. }
  21791. if (inputValue || min || max) {
  21792. var _inpNumVal = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(handleNumber(inputValue));
  21793. if (!$xeNumberInput.validMinNum(_inpNumVal)) {
  21794. _inpNumVal = min;
  21795. } else if (!$xeNumberInput.validMaxNum(_inpNumVal)) {
  21796. _inpNumVal = max;
  21797. }
  21798. if (exponential) {
  21799. var inpStringVal = handleNumberString(inputValue).toLowerCase();
  21800. if (inpStringVal === external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(_inpNumVal).toExponential()) {
  21801. _inpNumVal = inpStringVal;
  21802. }
  21803. }
  21804. var _inpValue = $xeNumberInput.getNumberValue(_inpNumVal);
  21805. $xeNumberInput.handleChange(eqEmptyValue(_inpValue) ? null : Number(_inpValue), _inpValue, {
  21806. type: 'check'
  21807. });
  21808. }
  21809. }
  21810. },
  21811. blurEvent: function blurEvent(evnt) {
  21812. var $xeNumberInput = this;
  21813. var reactData = $xeNumberInput.reactData;
  21814. var $xeForm = $xeNumberInput.$xeForm;
  21815. var formItemInfo = $xeNumberInput.formItemInfo;
  21816. var inputValue = reactData.inputValue;
  21817. var inpImmediate = $xeNumberInput.computeInpImmediate;
  21818. var value = inputValue ? Number(inputValue) : null;
  21819. if (!inpImmediate) {
  21820. $xeNumberInput.handleChange(value, handleNumberString(inputValue), evnt);
  21821. }
  21822. $xeNumberInput.afterCheckValue();
  21823. reactData.isFocus = false;
  21824. reactData.isActivated = false;
  21825. $xeNumberInput.dispatchEvent('blur', {
  21826. value: value
  21827. }, evnt);
  21828. // 自动更新校验状态
  21829. if ($xeForm && formItemInfo) {
  21830. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  21831. }
  21832. },
  21833. // 数值
  21834. numberChange: function numberChange(isPlus, evnt) {
  21835. var $xeNumberInput = this;
  21836. var props = $xeNumberInput;
  21837. var reactData = $xeNumberInput.reactData;
  21838. var min = props.min,
  21839. max = props.max,
  21840. type = props.type;
  21841. var inputValue = reactData.inputValue;
  21842. var stepValue = $xeNumberInput.computeStepValue;
  21843. var numValue = type === 'integer' ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(handleNumber(inputValue)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(handleNumber(inputValue));
  21844. var newValue = isPlus ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().add(numValue, stepValue) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().subtract(numValue, stepValue);
  21845. var restNum;
  21846. if (!$xeNumberInput.validMinNum(newValue)) {
  21847. restNum = min;
  21848. } else if (!$xeNumberInput.validMaxNum(newValue)) {
  21849. restNum = max;
  21850. } else {
  21851. restNum = newValue;
  21852. }
  21853. $xeNumberInput.emitInputEvent($xeNumberInput.getNumberValue(restNum), evnt);
  21854. },
  21855. numberPlusEvent: function numberPlusEvent(evnt) {
  21856. var $xeNumberInput = this;
  21857. var reactData = $xeNumberInput.reactData;
  21858. var isDisabled = $xeNumberInput.computeIsDisabled;
  21859. var formReadonly = $xeNumberInput.computeFormReadonly;
  21860. var isDisabledAddNumber = $xeNumberInput.computeIsDisabledAddNumber;
  21861. if (!isDisabled && !formReadonly && !isDisabledAddNumber) {
  21862. $xeNumberInput.numberChange(true, evnt);
  21863. }
  21864. reactData.isActivated = true;
  21865. $xeNumberInput.dispatchEvent('plus-number', {
  21866. value: reactData.inputValue
  21867. }, evnt);
  21868. $xeNumberInput.dispatchEvent('lazy-change', {
  21869. value: reactData.inputValue
  21870. }, evnt);
  21871. // 已废弃
  21872. $xeNumberInput.dispatchEvent('next-number', {
  21873. value: reactData.inputValue
  21874. }, evnt);
  21875. },
  21876. numberMinusEvent: function numberMinusEvent(evnt) {
  21877. var $xeNumberInput = this;
  21878. var reactData = $xeNumberInput.reactData;
  21879. var isDisabled = $xeNumberInput.computeIsDisabled;
  21880. var formReadonly = $xeNumberInput.computeFormReadonly;
  21881. var isDisabledSubtractNumber = $xeNumberInput.computeIsDisabledSubtractNumber;
  21882. if (!isDisabled && !formReadonly && !isDisabledSubtractNumber) {
  21883. $xeNumberInput.numberChange(false, evnt);
  21884. }
  21885. reactData.isActivated = true;
  21886. $xeNumberInput.dispatchEvent('minus-number', {
  21887. value: reactData.inputValue
  21888. }, evnt);
  21889. $xeNumberInput.dispatchEvent('lazy-change', {
  21890. value: reactData.inputValue
  21891. }, evnt);
  21892. // 已废弃
  21893. $xeNumberInput.dispatchEvent('prev-number', {
  21894. value: reactData.inputValue
  21895. }, evnt);
  21896. },
  21897. numberKeydownEvent: function numberKeydownEvent(evnt) {
  21898. var $xeNumberInput = this;
  21899. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  21900. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  21901. if (isUpArrow || isDwArrow) {
  21902. evnt.preventDefault();
  21903. if (isUpArrow) {
  21904. $xeNumberInput.numberPlusEvent(evnt);
  21905. } else {
  21906. $xeNumberInput.numberMinusEvent(evnt);
  21907. }
  21908. }
  21909. },
  21910. keydownEvent: function keydownEvent(evnt) {
  21911. var $xeNumberInput = this;
  21912. var props = $xeNumberInput;
  21913. var type = props.type,
  21914. exponential = props.exponential,
  21915. controls = props.controls;
  21916. var controlOpts = $xeNumberInput.computeControlOpts;
  21917. var isArrow = controlOpts.isArrow;
  21918. var inputReadonly = $xeNumberInput.computeInputReadonly;
  21919. var isControlKey = hasControlKey(evnt);
  21920. var isShiftKey = evnt.shiftKey;
  21921. var isAltKey = evnt.altKey;
  21922. var keyCode = evnt.keyCode;
  21923. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  21924. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  21925. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  21926. if (!isControlKey && !isShiftKey && !isAltKey) {
  21927. if (globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.SPACEBAR) || type === 'integer' && keyCode === 110 || (!exponential || keyCode !== 69) && keyCode >= 65 && keyCode <= 90 || keyCode >= 186 && keyCode <= 188 || keyCode >= 191) {
  21928. evnt.preventDefault();
  21929. }
  21930. }
  21931. if (isEsc) {
  21932. $xeNumberInput.afterCheckValue();
  21933. } else if (isUpArrow || isDwArrow) {
  21934. if (isEnableConf(controlOpts) && (controls === false ? controls : isArrow) && !inputReadonly) {
  21935. $xeNumberInput.numberKeydownEvent(evnt);
  21936. }
  21937. }
  21938. $xeNumberInput.triggerEvent(evnt);
  21939. },
  21940. keyupEvent: function keyupEvent(evnt) {
  21941. var $xeNumberInput = this;
  21942. $xeNumberInput.triggerEvent(evnt);
  21943. },
  21944. // 数值
  21945. stopDown: function stopDown() {
  21946. var $xeNumberInput = this;
  21947. var internalData = $xeNumberInput.internalData;
  21948. var dnTimeout = internalData.dnTimeout;
  21949. if (dnTimeout) {
  21950. clearTimeout(dnTimeout);
  21951. internalData.dnTimeout = undefined;
  21952. }
  21953. },
  21954. stopAutoIncrement: function stopAutoIncrement() {
  21955. var $xeNumberInput = this;
  21956. var internalData = $xeNumberInput.internalData;
  21957. var ainTimeout = internalData.ainTimeout;
  21958. if (ainTimeout) {
  21959. clearTimeout(ainTimeout);
  21960. internalData.ainTimeout = undefined;
  21961. }
  21962. },
  21963. numberDownMinusEvent: function numberDownMinusEvent(evnt) {
  21964. var $xeNumberInput = this;
  21965. var internalData = $xeNumberInput.internalData;
  21966. $xeNumberInput.numberStopAll();
  21967. internalData.ainTimeout = setTimeout(function () {
  21968. $xeNumberInput.numberMinusEvent(evnt);
  21969. $xeNumberInput.numberDownMinusEvent(evnt);
  21970. }, 60);
  21971. },
  21972. numberDownPlusEvent: function numberDownPlusEvent(evnt) {
  21973. var $xeNumberInput = this;
  21974. var internalData = $xeNumberInput.internalData;
  21975. $xeNumberInput.numberStopAll();
  21976. internalData.ainTimeout = setTimeout(function () {
  21977. $xeNumberInput.numberPlusEvent(evnt);
  21978. $xeNumberInput.numberDownPlusEvent(evnt);
  21979. }, 60);
  21980. },
  21981. numberStopAll: function numberStopAll() {
  21982. var $xeNumberInput = this;
  21983. $xeNumberInput.stopDown();
  21984. $xeNumberInput.stopAutoIncrement();
  21985. },
  21986. numberClickEvent: function numberClickEvent(evnt) {
  21987. var $xeNumberInput = this;
  21988. var internalData = $xeNumberInput.internalData;
  21989. if (internalData.isMouseDown) {
  21990. internalData.isMouseDown = false;
  21991. } else {
  21992. $xeNumberInput.numberStopAll();
  21993. var isAddNumber = hasClass(evnt.currentTarget, 'is--plus');
  21994. if (isAddNumber) {
  21995. $xeNumberInput.numberPlusEvent(evnt);
  21996. } else {
  21997. $xeNumberInput.numberMinusEvent(evnt);
  21998. }
  21999. }
  22000. },
  22001. numberMousedownEvent: function numberMousedownEvent(evnt) {
  22002. var $xeNumberInput = this;
  22003. var internalData = $xeNumberInput.internalData;
  22004. $xeNumberInput.numberStopAll();
  22005. internalData.isMouseDown = true;
  22006. if (evnt.button === 0) {
  22007. var isAddNumber = hasClass(evnt.currentTarget, 'is--plus');
  22008. if (isAddNumber) {
  22009. $xeNumberInput.numberPlusEvent(evnt);
  22010. } else {
  22011. $xeNumberInput.numberMinusEvent(evnt);
  22012. }
  22013. internalData.dnTimeout = setTimeout(function () {
  22014. if (isAddNumber) {
  22015. $xeNumberInput.numberDownPlusEvent(evnt);
  22016. } else {
  22017. $xeNumberInput.numberDownMinusEvent(evnt);
  22018. }
  22019. }, 500);
  22020. }
  22021. },
  22022. wheelEvent: function wheelEvent(evnt) {
  22023. var $xeNumberInput = this;
  22024. var props = $xeNumberInput;
  22025. var reactData = $xeNumberInput.reactData;
  22026. var controls = props.controls;
  22027. var controlOpts = $xeNumberInput.computeControlOpts;
  22028. var isWheel = controlOpts.isWheel;
  22029. var inputReadonly = $xeNumberInput.computeInputReadonly;
  22030. if (isEnableConf(controlOpts) && (controls === false ? controls : isWheel) && !inputReadonly) {
  22031. if (reactData.isActivated) {
  22032. evnt.stopPropagation();
  22033. evnt.preventDefault();
  22034. var delta = evnt.deltaY;
  22035. if (delta > 0) {
  22036. // 向下
  22037. $xeNumberInput.numberMinusEvent(evnt);
  22038. } else if (delta < 0) {
  22039. // 向上
  22040. $xeNumberInput.numberPlusEvent(evnt);
  22041. }
  22042. }
  22043. }
  22044. $xeNumberInput.triggerEvent(evnt);
  22045. },
  22046. clickEvent: function clickEvent(evnt) {
  22047. var $xeNumberInput = this;
  22048. $xeNumberInput.triggerEvent(evnt);
  22049. },
  22050. // 全局事件
  22051. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  22052. var $xeNumberInput = this;
  22053. var reactData = $xeNumberInput.reactData;
  22054. var isActivated = reactData.isActivated;
  22055. var el = $xeNumberInput.$refs.refElem;
  22056. var panelElem = $xeNumberInput.$refs.refInputPanel;
  22057. var isDisabled = $xeNumberInput.computeIsDisabled;
  22058. var inpImmediate = $xeNumberInput.computeInpImmediate;
  22059. var inputReadonly = $xeNumberInput.computeInputReadonly;
  22060. if (!isDisabled && !inputReadonly && isActivated) {
  22061. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  22062. if (!reactData.isActivated) {
  22063. if (!inpImmediate) {
  22064. var inputValue = reactData.inputValue;
  22065. var value = inputValue ? Number(inputValue) : null;
  22066. $xeNumberInput.handleChange(value, handleNumberString(inputValue), evnt);
  22067. }
  22068. $xeNumberInput.afterCheckValue();
  22069. }
  22070. }
  22071. },
  22072. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  22073. var $xeNumberInput = this;
  22074. var props = $xeNumberInput;
  22075. var reactData = $xeNumberInput.reactData;
  22076. var clearable = props.clearable;
  22077. var isDisabled = $xeNumberInput.computeIsDisabled;
  22078. var inputReadonly = $xeNumberInput.computeInputReadonly;
  22079. if (!isDisabled && !inputReadonly) {
  22080. var isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
  22081. var isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
  22082. var isActivated = reactData.isActivated;
  22083. if (isTab) {
  22084. if (isActivated) {
  22085. $xeNumberInput.afterCheckValue();
  22086. }
  22087. isActivated = false;
  22088. reactData.isActivated = isActivated;
  22089. }
  22090. if (isDel && clearable) {
  22091. if (isActivated) {
  22092. $xeNumberInput.clearValueEvent(evnt, null);
  22093. }
  22094. }
  22095. }
  22096. },
  22097. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  22098. var $xeNumberInput = this;
  22099. var reactData = $xeNumberInput.reactData;
  22100. var isActivated = reactData.isActivated;
  22101. if (isActivated) {
  22102. $xeNumberInput.afterCheckValue();
  22103. }
  22104. },
  22105. //
  22106. // Render
  22107. //
  22108. renderPrefixIcon: function renderPrefixIcon(h) {
  22109. var $xeNumberInput = this;
  22110. var props = $xeNumberInput;
  22111. var slots = $xeNumberInput.$scopedSlots;
  22112. var prefixIcon = props.prefixIcon;
  22113. var prefixSlot = slots.prefix;
  22114. return prefixSlot || prefixIcon ? h('div', {
  22115. class: 'vxe-number-input--prefix',
  22116. on: {
  22117. click: $xeNumberInput.clickPrefixEvent
  22118. }
  22119. }, [h('div', {
  22120. class: 'vxe-number-input--prefix-icon'
  22121. }, prefixSlot ? vn_getSlotVNs(prefixSlot({})) : [h('i', {
  22122. class: prefixIcon
  22123. })])]) : renderEmptyElement($xeNumberInput);
  22124. },
  22125. renderSuffixIcon: function renderSuffixIcon(h) {
  22126. var $xeNumberInput = this;
  22127. var props = $xeNumberInput;
  22128. var reactData = $xeNumberInput.reactData;
  22129. var slots = $xeNumberInput.$scopedSlots;
  22130. var suffixIcon = props.suffixIcon;
  22131. var inputValue = reactData.inputValue;
  22132. var suffixSlot = slots.suffix;
  22133. var isDisabled = $xeNumberInput.computeIsDisabled;
  22134. var isClearable = $xeNumberInput.computeIsClearable;
  22135. return h('div', {
  22136. class: ['vxe-number-input--suffix', {
  22137. 'is--clear': isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue))
  22138. }]
  22139. }, [isClearable ? h('div', {
  22140. class: 'vxe-number-input--clear-icon',
  22141. on: {
  22142. click: $xeNumberInput.clearValueEvent
  22143. }
  22144. }, [h('i', {
  22145. class: getIcon().INPUT_CLEAR
  22146. })]) : renderEmptyElement($xeNumberInput), suffixSlot || suffixIcon ? h('div', {
  22147. class: 'vxe-number-input--suffix-icon',
  22148. on: {
  22149. click: $xeNumberInput.clickSuffixEvent
  22150. }
  22151. }, suffixSlot ? vn_getSlotVNs(suffixSlot({})) : [h('i', {
  22152. class: suffixIcon
  22153. })]) : renderEmptyElement($xeNumberInput)]);
  22154. },
  22155. renderInput: function renderInput(h) {
  22156. var $xeNumberInput = this;
  22157. var props = $xeNumberInput;
  22158. var reactData = $xeNumberInput.reactData;
  22159. var type = props.type,
  22160. name = props.name,
  22161. autocomplete = props.autocomplete,
  22162. autoComplete = props.autoComplete;
  22163. var inputValue = reactData.inputValue,
  22164. isFocus = reactData.isFocus;
  22165. var isDisabled = $xeNumberInput.computeIsDisabled;
  22166. var numLabel = $xeNumberInput.computeNumLabel;
  22167. var inputReadonly = $xeNumberInput.computeInputReadonly;
  22168. var inpMaxLength = $xeNumberInput.computeInpMaxLength;
  22169. var inpPlaceholder = $xeNumberInput.computeInpPlaceholder;
  22170. return h('div', {
  22171. key: 'ni',
  22172. class: 'vxe-number-input--input-wrapper'
  22173. }, [$xeNumberInput.renderPrefixIcon(h), h('div', {
  22174. class: 'vxe-number-input--input-inner'
  22175. }, [h('input', {
  22176. ref: 'refInputTarget',
  22177. class: 'vxe-number-input--input',
  22178. domProps: {
  22179. value: !isFocus && type === 'amount' ? numLabel : inputValue
  22180. },
  22181. attrs: {
  22182. name: name,
  22183. type: 'text',
  22184. placeholder: inpPlaceholder,
  22185. maxlength: inpMaxLength,
  22186. readonly: inputReadonly,
  22187. disabled: isDisabled,
  22188. autocomplete: autoComplete || autocomplete
  22189. },
  22190. on: {
  22191. keydown: $xeNumberInput.keydownEvent,
  22192. keyup: $xeNumberInput.keyupEvent,
  22193. click: $xeNumberInput.clickEvent,
  22194. input: $xeNumberInput.inputEvent,
  22195. change: $xeNumberInput.changeEvent,
  22196. focus: $xeNumberInput.focusEvent,
  22197. blur: $xeNumberInput.blurEvent
  22198. }
  22199. })]), $xeNumberInput.renderSuffixIcon(h)]);
  22200. },
  22201. renderMinusBtn: function renderMinusBtn(h) {
  22202. var $xeNumberInput = this;
  22203. var props = $xeNumberInput;
  22204. var minusIcon = props.minusIcon;
  22205. var isDisabledSubtractNumber = $xeNumberInput.computeIsDisabledSubtractNumber;
  22206. return h('button', {
  22207. key: 'prev',
  22208. class: ['vxe-number-input--minus-btn is--minus', {
  22209. 'is--disabled': isDisabledSubtractNumber
  22210. }],
  22211. attrs: {
  22212. type: 'button'
  22213. },
  22214. on: {
  22215. click: $xeNumberInput.numberClickEvent,
  22216. mousedown: $xeNumberInput.numberMousedownEvent,
  22217. mouseup: $xeNumberInput.numberStopAll,
  22218. mouseleave: $xeNumberInput.numberStopAll
  22219. }
  22220. }, [h('i', {
  22221. class: minusIcon || getIcon().NUMBER_INPUT_MINUS_NUM
  22222. })]);
  22223. },
  22224. renderPlusBtn: function renderPlusBtn(h) {
  22225. var $xeNumberInput = this;
  22226. var props = $xeNumberInput;
  22227. var plusIcon = props.plusIcon;
  22228. var isDisabledAddNumber = $xeNumberInput.computeIsDisabledAddNumber;
  22229. return h('button', {
  22230. key: 'next',
  22231. class: ['vxe-number-input--plus-btn is--plus', {
  22232. 'is--disabled': isDisabledAddNumber
  22233. }],
  22234. attrs: {
  22235. type: 'button'
  22236. },
  22237. on: {
  22238. click: $xeNumberInput.numberClickEvent,
  22239. mousedown: $xeNumberInput.numberMousedownEvent,
  22240. mouseup: $xeNumberInput.numberStopAll,
  22241. mouseleave: $xeNumberInput.numberStopAll
  22242. }
  22243. }, [h('i', {
  22244. class: plusIcon || getIcon().NUMBER_INPUT_PLUS_NUM
  22245. })]);
  22246. },
  22247. renderSideControl: function renderSideControl(h) {
  22248. var $xeNumberInput = this;
  22249. return h('div', {
  22250. key: 'cplr',
  22251. class: 'vxe-number-input--side-control'
  22252. }, [$xeNumberInput.renderPlusBtn(h), $xeNumberInput.renderMinusBtn(h)]);
  22253. },
  22254. renderVN: function renderVN(h) {
  22255. var $xeNumberInput = this;
  22256. var props = $xeNumberInput;
  22257. var reactData = $xeNumberInput.reactData;
  22258. var slots = $xeNumberInput.$scopedSlots;
  22259. var className = props.className,
  22260. controls = props.controls,
  22261. type = props.type,
  22262. align = props.align,
  22263. prefixIcon = props.prefixIcon,
  22264. suffixIcon = props.suffixIcon;
  22265. var inputValue = reactData.inputValue,
  22266. isActivated = reactData.isActivated;
  22267. var vSize = $xeNumberInput.computeSize;
  22268. var controlOpts = $xeNumberInput.computeControlOpts;
  22269. var layout = controlOpts.layout,
  22270. showButton = controlOpts.showButton;
  22271. var isDisabled = $xeNumberInput.computeIsDisabled;
  22272. var formReadonly = $xeNumberInput.computeFormReadonly;
  22273. var numLabel = $xeNumberInput.computeNumLabel;
  22274. var prefixSlot = slots.prefix;
  22275. var suffixSlot = slots.suffix;
  22276. if (formReadonly) {
  22277. return h('div', {
  22278. ref: 'refElem',
  22279. class: ['vxe-number-input--readonly', "type--".concat(type), className]
  22280. }, numLabel);
  22281. }
  22282. var inputReadonly = $xeNumberInput.computeInputReadonly;
  22283. var isClearable = $xeNumberInput.computeIsClearable;
  22284. var isControls = isEnableConf(controlOpts) && (controls === false ? controls : showButton);
  22285. return h('div', {
  22286. ref: 'refElem',
  22287. class: ['vxe-number-input', "type--".concat(type), "ctl--".concat(layout === 'right' || layout === 'left' ? layout : 'default'), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "is--".concat(align), align), 'is--controls', isControls && !inputReadonly), 'is--prefix', !!prefixSlot || prefixIcon), 'is--suffix', !!suffixSlot || suffixIcon), 'is--disabled', isDisabled), 'is--active', isActivated), 'show--clear', isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue)))],
  22288. attrs: {
  22289. spellcheck: false
  22290. }
  22291. }, isControls ? layout === 'right' ? [$xeNumberInput.renderInput(h), $xeNumberInput.renderSideControl(h)] : layout === 'left' ? [$xeNumberInput.renderSideControl(h), $xeNumberInput.renderInput(h)] : [$xeNumberInput.renderMinusBtn(h), $xeNumberInput.renderInput(h), $xeNumberInput.renderPlusBtn(h)] : [$xeNumberInput.renderInput(h)]);
  22292. }
  22293. },
  22294. watch: {
  22295. value: function value(val) {
  22296. var $xeNumberInput = this;
  22297. var internalData = $xeNumberInput.internalData;
  22298. if (!internalData.isUM) {
  22299. this.updateModel(val);
  22300. }
  22301. internalData.isUM = false;
  22302. },
  22303. type: function type() {
  22304. var $xeNumberInput = this;
  22305. var props = $xeNumberInput;
  22306. var reactData = $xeNumberInput.reactData;
  22307. // 切换类型是重置内置变量
  22308. Object.assign(reactData, {
  22309. inputValue: props.value
  22310. });
  22311. $xeNumberInput.initValue();
  22312. }
  22313. },
  22314. created: function created() {
  22315. var $xeNumberInput = this;
  22316. var props = $xeNumberInput;
  22317. var reactData = $xeNumberInput.reactData;
  22318. reactData.inputValue = props.value;
  22319. $xeNumberInput.initValue();
  22320. },
  22321. mounted: function mounted() {
  22322. var $xeNumberInput = this;
  22323. var targetElem = $xeNumberInput.$refs.refInputTarget;
  22324. if (targetElem) {
  22325. targetElem.addEventListener('wheel', $xeNumberInput.wheelEvent, {
  22326. passive: false
  22327. });
  22328. }
  22329. globalEvents.on($xeNumberInput, 'mousedown', $xeNumberInput.handleGlobalMousedownEvent);
  22330. globalEvents.on($xeNumberInput, 'keydown', $xeNumberInput.handleGlobalKeydownEvent);
  22331. globalEvents.on($xeNumberInput, 'blur', $xeNumberInput.handleGlobalBlurEvent);
  22332. },
  22333. beforeDestroy: function beforeDestroy() {
  22334. var $xeNumberInput = this;
  22335. var reactData = $xeNumberInput.reactData;
  22336. reactData.isFocus = false;
  22337. $xeNumberInput.numberStopAll();
  22338. $xeNumberInput.afterCheckValue();
  22339. var targetElem = $xeNumberInput.$refs.refInputTarget;
  22340. if (targetElem) {
  22341. targetElem.removeEventListener('wheel', $xeNumberInput.wheelEvent);
  22342. }
  22343. globalEvents.off($xeNumberInput, 'mousedown');
  22344. globalEvents.off($xeNumberInput, 'keydown');
  22345. globalEvents.off($xeNumberInput, 'blur');
  22346. },
  22347. render: function render(h) {
  22348. return this.renderVN(h);
  22349. }
  22350. })); /* define-vxe-component end */
  22351. ;// CONCATENATED MODULE: ./packages/color-picker/src/color-picker.ts
  22352. var WinEyeDropper = typeof window !== 'undefined' ? window.EyeDropper : null;
  22353. var typeList = [{
  22354. label: 'HEX',
  22355. value: 'hex'
  22356. }, {
  22357. label: 'RGB',
  22358. value: 'rgb'
  22359. }];
  22360. /* harmony default export */ var color_picker = (/* define-vxe-component start */defineVxeComponent({
  22361. name: 'VxeColorPicker',
  22362. mixins: [globalMixins.sizeMixin],
  22363. model: {
  22364. prop: 'value',
  22365. event: 'modelValue'
  22366. },
  22367. props: {
  22368. value: String,
  22369. placeholder: String,
  22370. clearable: {
  22371. type: Boolean,
  22372. default: function _default() {
  22373. return getConfig().colorPicker.clearable;
  22374. }
  22375. },
  22376. type: {
  22377. type: String,
  22378. default: function _default() {
  22379. return getConfig().colorPicker.type;
  22380. }
  22381. },
  22382. size: {
  22383. type: String,
  22384. default: function _default() {
  22385. return getConfig().colorPicker.size || getConfig().size;
  22386. }
  22387. },
  22388. className: [String, Function],
  22389. popupClassName: [String, Function],
  22390. colors: {
  22391. type: Array,
  22392. default: function _default() {
  22393. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().colorPicker.colors, true) || [];
  22394. }
  22395. },
  22396. showAlpha: {
  22397. type: Boolean,
  22398. default: function _default() {
  22399. return getConfig().colorPicker.showAlpha;
  22400. }
  22401. },
  22402. showEyeDropper: {
  22403. type: Boolean,
  22404. default: function _default() {
  22405. return getConfig().colorPicker.showEyeDropper;
  22406. }
  22407. },
  22408. showColorExtractor: {
  22409. type: Boolean,
  22410. default: function _default() {
  22411. return getConfig().colorPicker.showColorExtractor;
  22412. }
  22413. },
  22414. showQuick: {
  22415. type: Boolean,
  22416. default: function _default() {
  22417. return getConfig().colorPicker.showQuick;
  22418. }
  22419. },
  22420. readonly: {
  22421. type: Boolean,
  22422. default: null
  22423. },
  22424. disabled: {
  22425. type: Boolean,
  22426. default: null
  22427. },
  22428. clickToCopy: {
  22429. type: Boolean,
  22430. default: function _default() {
  22431. return getConfig().colorPicker.clickToCopy;
  22432. }
  22433. },
  22434. placement: String,
  22435. transfer: {
  22436. type: Boolean,
  22437. default: null
  22438. }
  22439. },
  22440. inject: {
  22441. $xeModal: {
  22442. default: null
  22443. },
  22444. $xeDrawer: {
  22445. default: null
  22446. },
  22447. $xeTable: {
  22448. default: null
  22449. },
  22450. $xeForm: {
  22451. default: null
  22452. },
  22453. formItemInfo: {
  22454. from: 'xeFormItemInfo',
  22455. default: null
  22456. }
  22457. },
  22458. provide: function provide() {
  22459. var $xeColorPicker = this;
  22460. return {
  22461. $xeColorPicker: $xeColorPicker
  22462. };
  22463. },
  22464. data: function data() {
  22465. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  22466. var reactData = {
  22467. initialized: false,
  22468. selectTyle: 'hex',
  22469. selectColor: '',
  22470. showTypePopup: false,
  22471. panelColor: '',
  22472. hexValue: '',
  22473. rValue: 0,
  22474. gValue: 0,
  22475. bValue: 0,
  22476. aValue: 0,
  22477. panelIndex: 0,
  22478. panelStyle: {},
  22479. panelPlacement: null,
  22480. visiblePanel: false,
  22481. isAniVisible: false,
  22482. isActivated: false
  22483. };
  22484. var internalData = {
  22485. hpTimeout: undefined
  22486. };
  22487. return {
  22488. xID: xID,
  22489. reactData: reactData,
  22490. internalData: internalData
  22491. };
  22492. },
  22493. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  22494. computeFormReadonly: function computeFormReadonly() {
  22495. var $xeColorPicker = this;
  22496. var props = $xeColorPicker;
  22497. var $xeForm = $xeColorPicker.$xeForm;
  22498. var readonly = props.readonly;
  22499. if (readonly === null) {
  22500. if ($xeForm) {
  22501. return $xeForm.readonly;
  22502. }
  22503. return false;
  22504. }
  22505. return readonly;
  22506. },
  22507. computeIsDisabled: function computeIsDisabled() {
  22508. var $xeColorPicker = this;
  22509. var props = $xeColorPicker;
  22510. var $xeForm = $xeColorPicker.$xeForm;
  22511. var disabled = props.disabled;
  22512. if (disabled === null) {
  22513. if ($xeForm) {
  22514. return $xeForm.disabled;
  22515. }
  22516. return false;
  22517. }
  22518. return disabled;
  22519. },
  22520. computeBtnTransfer: function computeBtnTransfer() {
  22521. var $xeColorPicker = this;
  22522. var props = $xeColorPicker;
  22523. var $xeTable = $xeColorPicker.$xeTable;
  22524. var $xeModal = $xeColorPicker.$xeModal;
  22525. var $xeDrawer = $xeColorPicker.$xeDrawer;
  22526. var $xeForm = $xeColorPicker.$xeForm;
  22527. var transfer = props.transfer;
  22528. if (transfer === null) {
  22529. var globalTransfer = getConfig().colorPicker.transfer;
  22530. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  22531. return globalTransfer;
  22532. }
  22533. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  22534. return true;
  22535. }
  22536. }
  22537. return transfer;
  22538. },
  22539. computeColorList: function computeColorList() {
  22540. var $xeColorPicker = this;
  22541. var props = $xeColorPicker;
  22542. var colors = props.colors;
  22543. if (colors) {
  22544. return colors.map(function (item) {
  22545. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(item)) {
  22546. return {
  22547. label: item,
  22548. value: item
  22549. };
  22550. }
  22551. return {
  22552. label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.label) ? item.value : item.label,
  22553. value: item.value
  22554. };
  22555. });
  22556. }
  22557. return [];
  22558. },
  22559. computeIsRgb: function computeIsRgb() {
  22560. var $xeColorPicker = this;
  22561. var reactData = $xeColorPicker.reactData;
  22562. var selectTyle = reactData.selectTyle;
  22563. return selectTyle === 'rgb';
  22564. },
  22565. computeSelectTypeItem: function computeSelectTypeItem() {
  22566. var $xeColorPicker = this;
  22567. var reactData = $xeColorPicker.reactData;
  22568. var selectTyle = reactData.selectTyle;
  22569. return typeList.find(function (item) {
  22570. return item.value === selectTyle;
  22571. });
  22572. }
  22573. }),
  22574. methods: {
  22575. //
  22576. // Method
  22577. //
  22578. dispatchEvent: function dispatchEvent(type, params, evnt) {
  22579. var $xeColorPicker = this;
  22580. $xeColorPicker.$emit(type, createEvent(evnt, {
  22581. $colorPicker: $xeColorPicker
  22582. }, params));
  22583. },
  22584. emitModel: function emitModel(value) {
  22585. var $xeColorPicker = this;
  22586. var _events = $xeColorPicker._events;
  22587. if (_events && _events.modelValue) {
  22588. $xeColorPicker.$emit('modelValue', value);
  22589. } else {
  22590. $xeColorPicker.$emit('model-value', value);
  22591. }
  22592. },
  22593. updateMode: function updateMode() {
  22594. var $xeColorPicker = this;
  22595. var props = $xeColorPicker;
  22596. var reactData = $xeColorPicker.reactData;
  22597. var value = props.value;
  22598. reactData.selectColor = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(value);
  22599. $xeColorPicker.updateModelColor();
  22600. },
  22601. updateType: function updateType() {
  22602. var $xeColorPicker = this;
  22603. var props = $xeColorPicker;
  22604. var reactData = $xeColorPicker.reactData;
  22605. var type = props.type;
  22606. var selectTyle = 'hex';
  22607. if (type === 'rgb' || type === 'rgba') {
  22608. selectTyle = 'rgb';
  22609. }
  22610. reactData.selectTyle = selectTyle;
  22611. $xeColorPicker.updateMode();
  22612. },
  22613. updateModelColor: function updateModelColor() {
  22614. var $xeColorPicker = this;
  22615. var reactData = $xeColorPicker.reactData;
  22616. var selectColor = reactData.selectColor,
  22617. isAniVisible = reactData.isAniVisible;
  22618. var isRgb = $xeColorPicker.computeIsRgb;
  22619. var hueSliderEl = $xeColorPicker.$refs.refHueSliderElem;
  22620. var alphaSliderEl = $xeColorPicker.$refs.refAlphaSliderElem;
  22621. var colorRest = parseColor(selectColor);
  22622. reactData.hexValue = colorRest.hex;
  22623. reactData.rValue = colorRest.r;
  22624. reactData.gValue = colorRest.g;
  22625. reactData.bValue = colorRest.b;
  22626. reactData.aValue = colorRest.a;
  22627. if (colorRest.value) {
  22628. if (isRgb) {
  22629. if (colorRest.type === 'hex') {
  22630. var rgbRest = hexToRgb(colorRest.hex);
  22631. if (rgbRest) {
  22632. reactData.rValue = rgbRest.r;
  22633. reactData.gValue = rgbRest.g;
  22634. reactData.bValue = rgbRest.b;
  22635. reactData.aValue = rgbRest.a;
  22636. }
  22637. }
  22638. } else {
  22639. if (colorRest.type !== 'hex') {
  22640. reactData.hexValue = rgbToHex(colorRest);
  22641. }
  22642. }
  22643. }
  22644. if (isAniVisible) {
  22645. var hsvRest = colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest);
  22646. var colorPanelEl = $xeColorPicker.$refs.refColorPanelElem;
  22647. if (hsvRest) {
  22648. if (colorPanelEl) {
  22649. var offsetTop = colorPanelEl.clientHeight * (1 - hsvRest.v);
  22650. var offsetLeft = colorPanelEl.clientWidth * hsvRest.s;
  22651. $xeColorPicker.handlePanelColor(offsetLeft, offsetTop);
  22652. }
  22653. if (hueSliderEl) {
  22654. $xeColorPicker.handleHueColor(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().ceil((1 - hsvRest.h / 360) * hueSliderEl.clientWidth));
  22655. }
  22656. }
  22657. if (alphaSliderEl) {
  22658. $xeColorPicker.handleAlphaColor(alphaSliderEl.clientWidth * colorRest.a);
  22659. }
  22660. }
  22661. },
  22662. updateZindex: function updateZindex() {
  22663. var $xeColorPicker = this;
  22664. var reactData = $xeColorPicker.reactData;
  22665. if (reactData.panelIndex < getLastZIndex()) {
  22666. reactData.panelIndex = nextZIndex();
  22667. }
  22668. },
  22669. updatePlacement: function updatePlacement() {
  22670. var $xeColorPicker = this;
  22671. var props = $xeColorPicker;
  22672. var reactData = $xeColorPicker.reactData;
  22673. var placement = props.placement;
  22674. var panelIndex = reactData.panelIndex;
  22675. var targetElem = $xeColorPicker.$refs.refElem;
  22676. var panelElem = $xeColorPicker.$refs.refOptionPanel;
  22677. var btnTransfer = $xeColorPicker.computeBtnTransfer;
  22678. var handleStyle = function handleStyle() {
  22679. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  22680. placement: placement,
  22681. teleportTo: btnTransfer
  22682. });
  22683. var panelStyle = Object.assign(ppObj.style, {
  22684. zIndex: panelIndex
  22685. });
  22686. reactData.panelStyle = panelStyle;
  22687. reactData.panelPlacement = ppObj.placement;
  22688. };
  22689. handleStyle();
  22690. return $xeColorPicker.$nextTick().then(handleStyle);
  22691. },
  22692. showOptionPanel: function showOptionPanel() {
  22693. var $xeColorPicker = this;
  22694. var reactData = $xeColorPicker.reactData;
  22695. var internalData = $xeColorPicker.internalData;
  22696. var hpTimeout = internalData.hpTimeout;
  22697. var isDisabled = $xeColorPicker.computeIsDisabled;
  22698. if (!isDisabled) {
  22699. if (hpTimeout) {
  22700. clearTimeout(hpTimeout);
  22701. internalData.hpTimeout = undefined;
  22702. }
  22703. var btnTransfer = $xeColorPicker.computeBtnTransfer;
  22704. var panelElem = $xeColorPicker.$refs.refOptionPanel;
  22705. if (!reactData.initialized) {
  22706. reactData.initialized = true;
  22707. if (btnTransfer) {
  22708. if (panelElem) {
  22709. document.body.appendChild(panelElem);
  22710. }
  22711. }
  22712. }
  22713. reactData.isActivated = true;
  22714. reactData.isAniVisible = true;
  22715. setTimeout(function () {
  22716. $xeColorPicker.updateModelColor();
  22717. reactData.visiblePanel = true;
  22718. }, 10);
  22719. $xeColorPicker.updateZindex();
  22720. $xeColorPicker.updatePlacement();
  22721. }
  22722. },
  22723. hideOptionPanel: function hideOptionPanel() {
  22724. var $xeColorPicker = this;
  22725. var reactData = $xeColorPicker.reactData;
  22726. var internalData = $xeColorPicker.internalData;
  22727. reactData.visiblePanel = false;
  22728. internalData.hpTimeout = setTimeout(function () {
  22729. reactData.isAniVisible = false;
  22730. }, 350);
  22731. },
  22732. changeEvent: function changeEvent(evnt, value) {
  22733. var $xeColorPicker = this;
  22734. var props = $xeColorPicker;
  22735. var reactData = $xeColorPicker.reactData;
  22736. var $xeForm = $xeColorPicker.$xeForm;
  22737. var formItemInfo = $xeColorPicker.formItemInfo;
  22738. reactData.selectColor = value;
  22739. if (value !== props.value) {
  22740. $xeColorPicker.emitModel(value);
  22741. $xeColorPicker.dispatchEvent('change', {
  22742. value: value
  22743. }, evnt);
  22744. // 自动更新校验状态
  22745. if ($xeForm && formItemInfo) {
  22746. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  22747. }
  22748. }
  22749. },
  22750. clearValueEvent: function clearValueEvent(evnt, selectValue) {
  22751. var $xeColorPicker = this;
  22752. $xeColorPicker.changeEvent(evnt, selectValue);
  22753. $xeColorPicker.dispatchEvent('clear', {
  22754. value: selectValue
  22755. }, evnt);
  22756. },
  22757. focusEvent: function focusEvent() {
  22758. var $xeColorPicker = this;
  22759. var reactData = $xeColorPicker.reactData;
  22760. var isDisabled = $xeColorPicker.computeIsDisabled;
  22761. if (!isDisabled) {
  22762. if (!reactData.visiblePanel) {
  22763. $xeColorPicker.showOptionPanel();
  22764. }
  22765. }
  22766. },
  22767. blurEvent: function blurEvent() {
  22768. var $xeColorPicker = this;
  22769. var reactData = $xeColorPicker.reactData;
  22770. reactData.isActivated = false;
  22771. },
  22772. clearEvent: function clearEvent(evnt) {
  22773. var $xeColorPicker = this;
  22774. $xeColorPicker.clearValueEvent(evnt, null);
  22775. $xeColorPicker.hideOptionPanel();
  22776. },
  22777. confirmEvent: function confirmEvent(evnt) {
  22778. var $xeColorPicker = this;
  22779. var reactData = $xeColorPicker.reactData;
  22780. var selectColor = reactData.selectColor;
  22781. $xeColorPicker.changeEvent(evnt, selectColor);
  22782. $xeColorPicker.hideOptionPanel();
  22783. },
  22784. togglePanelEvent: function togglePanelEvent(evnt) {
  22785. var $xeColorPicker = this;
  22786. var reactData = $xeColorPicker.reactData;
  22787. evnt.preventDefault();
  22788. if (reactData.visiblePanel) {
  22789. $xeColorPicker.hideOptionPanel();
  22790. } else {
  22791. $xeColorPicker.showOptionPanel();
  22792. }
  22793. },
  22794. clickEvent: function clickEvent(evnt) {
  22795. var $xeColorPicker = this;
  22796. $xeColorPicker.togglePanelEvent(evnt);
  22797. $xeColorPicker.dispatchEvent('click', {}, evnt);
  22798. },
  22799. handlePanelClickEvent: function handlePanelClickEvent() {
  22800. var $xeColorPicker = this;
  22801. var reactData = $xeColorPicker.reactData;
  22802. reactData.showTypePopup = false;
  22803. },
  22804. toggleTypeVisibleEvent: function toggleTypeVisibleEvent(evnt) {
  22805. var $xeColorPicker = this;
  22806. var reactData = $xeColorPicker.reactData;
  22807. evnt.stopPropagation();
  22808. reactData.showTypePopup = !reactData.showTypePopup;
  22809. },
  22810. handleChangeType: function handleChangeType(type) {
  22811. var $xeColorPicker = this;
  22812. var reactData = $xeColorPicker.reactData;
  22813. var selectTyle = reactData.selectTyle;
  22814. if (type !== selectTyle) {
  22815. reactData.selectTyle = type;
  22816. $xeColorPicker.updateModelColor();
  22817. }
  22818. reactData.showTypePopup = false;
  22819. },
  22820. handleHueColor: function handleHueColor(offsetLeft) {
  22821. var $xeColorPicker = this;
  22822. var reactData = $xeColorPicker.reactData;
  22823. var hueSliderEl = $xeColorPicker.$refs.refHueSliderElem;
  22824. var hueSliderBtnEl = $xeColorPicker.$refs.refHueSliderBtnElem;
  22825. if (hueSliderEl && hueSliderBtnEl) {
  22826. if (offsetLeft < 0) {
  22827. offsetLeft = 0;
  22828. }
  22829. var barWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(hueSliderEl.clientWidth);
  22830. var itemNum = 255;
  22831. var countNum = itemNum * 6;
  22832. var offsetX = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().ceil(countNum / barWidth * offsetLeft);
  22833. var offsetNum = offsetX % itemNum;
  22834. var rNum = 0;
  22835. var gNum = 0;
  22836. var bNum = 0;
  22837. switch (Math.ceil(offsetX / itemNum)) {
  22838. case 1:
  22839. rNum = itemNum;
  22840. bNum = offsetNum;
  22841. break;
  22842. case 2:
  22843. rNum = itemNum - offsetNum;
  22844. bNum = itemNum;
  22845. break;
  22846. case 3:
  22847. gNum = offsetNum;
  22848. bNum = itemNum;
  22849. break;
  22850. case 4:
  22851. gNum = itemNum;
  22852. bNum = itemNum - offsetNum;
  22853. break;
  22854. case 5:
  22855. rNum = offsetNum;
  22856. gNum = itemNum;
  22857. break;
  22858. case 6:
  22859. rNum = itemNum;
  22860. gNum = itemNum - offsetNum;
  22861. break;
  22862. }
  22863. reactData.panelColor = toRgb(rNum, gNum, bNum);
  22864. hueSliderBtnEl.style.left = toCssUnit(offsetLeft);
  22865. }
  22866. },
  22867. handleHueBarEvent: function handleHueBarEvent(evnt) {
  22868. var $xeColorPicker = this;
  22869. var hueSliderEl = $xeColorPicker.$refs.refHueSliderElem;
  22870. var hueSliderBtnEl = $xeColorPicker.$refs.refHueSliderBtnElem;
  22871. if (hueSliderEl && hueSliderBtnEl) {
  22872. var hueSliderRect = hueSliderEl.getBoundingClientRect();
  22873. var barWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(hueSliderEl.clientWidth);
  22874. var offsetLeft = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().ceil(Math.min(barWidth - 1, Math.max(1, evnt.clientX - hueSliderRect.x)));
  22875. $xeColorPicker.handleHueColor(offsetLeft);
  22876. }
  22877. },
  22878. handleHueSliderMousedownEvent: function handleHueSliderMousedownEvent(evnt) {
  22879. var $xeColorPicker = this;
  22880. evnt.preventDefault();
  22881. document.onmousemove = function (evnt) {
  22882. evnt.preventDefault();
  22883. $xeColorPicker.handleHueBarEvent(evnt);
  22884. };
  22885. document.onmouseup = function (evnt) {
  22886. document.onmousemove = null;
  22887. document.onmouseup = null;
  22888. $xeColorPicker.handleHueBarEvent(evnt);
  22889. };
  22890. },
  22891. handleAlphaColor: function handleAlphaColor(offsetLeft) {
  22892. var $xeColorPicker = this;
  22893. var reactData = $xeColorPicker.reactData;
  22894. var selectColor = reactData.selectColor;
  22895. var alphaSliderEl = $xeColorPicker.$refs.refAlphaSliderElem;
  22896. var alphaSliderBtnEl = $xeColorPicker.$refs.refAlphaSliderBtnElem;
  22897. if (alphaSliderEl && alphaSliderBtnEl) {
  22898. var alphaSliderRect = alphaSliderEl.getBoundingClientRect();
  22899. var barWidth = alphaSliderRect.width;
  22900. if (offsetLeft < 0) {
  22901. offsetLeft = 0;
  22902. }
  22903. if (offsetLeft > barWidth) {
  22904. offsetLeft = barWidth;
  22905. }
  22906. var alpha = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().ceil(100 / barWidth * offsetLeft / 100, 2);
  22907. reactData.aValue = alpha;
  22908. alphaSliderBtnEl.style.left = toCssUnit(offsetLeft);
  22909. reactData.selectColor = updateColorAlpha(selectColor, alpha);
  22910. }
  22911. },
  22912. handleAlphaBarEvent: function handleAlphaBarEvent(evnt) {
  22913. var $xeColorPicker = this;
  22914. var alphaSliderEl = $xeColorPicker.$refs.refAlphaSliderElem;
  22915. var alphaSliderBtnEl = $xeColorPicker.$refs.refAlphaSliderBtnElem;
  22916. if (alphaSliderEl && alphaSliderBtnEl) {
  22917. var alphaSliderRect = alphaSliderEl.getBoundingClientRect();
  22918. var barWidth = alphaSliderRect.width;
  22919. var offsetLeft = Math.min(barWidth, Math.max(0, evnt.clientX - alphaSliderRect.x));
  22920. $xeColorPicker.handleAlphaColor(offsetLeft);
  22921. $xeColorPicker.updateModelColor();
  22922. }
  22923. },
  22924. handleAlphaSliderMousedownEvent: function handleAlphaSliderMousedownEvent(evnt) {
  22925. var $xeColorPicker = this;
  22926. evnt.preventDefault();
  22927. document.onmousemove = function (evnt) {
  22928. evnt.preventDefault();
  22929. $xeColorPicker.handleAlphaBarEvent(evnt);
  22930. };
  22931. document.onmouseup = function (evnt) {
  22932. document.onmousemove = null;
  22933. document.onmouseup = null;
  22934. $xeColorPicker.handleAlphaBarEvent(evnt);
  22935. };
  22936. },
  22937. handleInputRgbEvent: function handleInputRgbEvent() {
  22938. var $xeColorPicker = this;
  22939. var reactData = $xeColorPicker.reactData;
  22940. var rValue = reactData.rValue,
  22941. gValue = reactData.gValue,
  22942. bValue = reactData.bValue,
  22943. aValue = reactData.aValue;
  22944. reactData.selectColor = toRgb(rValue, gValue, bValue, aValue);
  22945. $xeColorPicker.updateModelColor();
  22946. },
  22947. handleInputAlphaEvent: function handleInputAlphaEvent() {
  22948. var $xeColorPicker = this;
  22949. var reactData = $xeColorPicker.reactData;
  22950. var aValue = reactData.aValue;
  22951. var alphaSliderEl = $xeColorPicker.$refs.refAlphaSliderElem;
  22952. var alphaSliderBtnEl = $xeColorPicker.$refs.refAlphaSliderBtnElem;
  22953. if (alphaSliderEl && alphaSliderBtnEl) {
  22954. var alphaSliderRect = alphaSliderEl.getBoundingClientRect();
  22955. var barWidth = alphaSliderRect.width;
  22956. var offsetLeft = barWidth * aValue;
  22957. $xeColorPicker.handleAlphaColor(offsetLeft);
  22958. }
  22959. },
  22960. handleQuickEvent: function handleQuickEvent(evnt, item) {
  22961. var $xeColorPicker = this;
  22962. var reactData = $xeColorPicker.reactData;
  22963. var value = item.value;
  22964. reactData.selectColor = value;
  22965. $xeColorPicker.updateModelColor();
  22966. },
  22967. handlePanelColor: function handlePanelColor(offsetLeft, offsetTop) {
  22968. var $xeColorPicker = this;
  22969. var colorActiveEl = $xeColorPicker.$refs.refColorActiveElem;
  22970. if (colorActiveEl) {
  22971. colorActiveEl.style.top = toCssUnit(offsetTop);
  22972. colorActiveEl.style.left = toCssUnit(offsetLeft);
  22973. }
  22974. },
  22975. handleEyeDropperEvent: function handleEyeDropperEvent() {
  22976. var $xeColorPicker = this;
  22977. var reactData = $xeColorPicker.reactData;
  22978. if (WinEyeDropper) {
  22979. try {
  22980. var eyeDropper = new WinEyeDropper();
  22981. eyeDropper.open().then(function (rest) {
  22982. if (rest && rest.sRGBHex) {
  22983. reactData.selectColor = rest.sRGBHex;
  22984. $xeColorPicker.updateModelColor();
  22985. }
  22986. }).catch(function () {});
  22987. } catch (e) {}
  22988. }
  22989. },
  22990. handleSelectColorMousedownEvent: function handleSelectColorMousedownEvent(evnt) {
  22991. var $xeColorPicker = this;
  22992. var props = $xeColorPicker;
  22993. var reactData = $xeColorPicker.reactData;
  22994. var showAlpha = props.showAlpha;
  22995. var panelColor = reactData.panelColor,
  22996. aValue = reactData.aValue;
  22997. var colorPanelEl = $xeColorPicker.$refs.refColorPanelElem;
  22998. var colorActiveEl = $xeColorPicker.$refs.refColorActiveElem;
  22999. if (colorPanelEl && colorActiveEl) {
  23000. var colorPanelRect = colorPanelEl.getBoundingClientRect();
  23001. var offsetTop = evnt.clientY - colorPanelRect.y;
  23002. var offsetLeft = evnt.clientX - colorPanelRect.x;
  23003. var colorRest = parseColor(panelColor);
  23004. if (colorRest) {
  23005. var hsvRest = colorRest.type === 'hex' ? hexToHsv(colorRest.hex) : rgbToHsv(colorRest);
  23006. if (hsvRest) {
  23007. var ragRest = hsvToRgb(hsvRest.h, offsetLeft / colorPanelEl.clientWidth, 1 - offsetTop / colorPanelEl.clientHeight);
  23008. reactData.selectColor = toRgb(ragRest.r, ragRest.g, ragRest.b, showAlpha ? aValue : null);
  23009. $xeColorPicker.handlePanelColor(offsetLeft, offsetTop);
  23010. $xeColorPicker.updateModelColor();
  23011. }
  23012. }
  23013. }
  23014. },
  23015. handleCopyColorEvent: function handleCopyColorEvent() {
  23016. var $xeColorPicker = this;
  23017. var reactData = $xeColorPicker.reactData;
  23018. var selectColor = reactData.selectColor;
  23019. if (selectColor) {
  23020. if (index_esm_VxeUI.clipboard.copy(selectColor)) {
  23021. if (index_esm_VxeUI.modal) {
  23022. index_esm_VxeUI.modal.message({
  23023. content: getI18n('vxe.colorPicker.copySuccess', [selectColor]),
  23024. status: 'success'
  23025. });
  23026. }
  23027. }
  23028. }
  23029. },
  23030. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  23031. var $xeColorPicker = this;
  23032. var reactData = $xeColorPicker.reactData;
  23033. var visiblePanel = reactData.visiblePanel;
  23034. var isDisabled = $xeColorPicker.computeIsDisabled;
  23035. if (!isDisabled) {
  23036. if (visiblePanel) {
  23037. var panelElem = $xeColorPicker.$refs.refOptionPanel;
  23038. if (getEventTargetNode(evnt, panelElem).flag) {
  23039. $xeColorPicker.updatePlacement();
  23040. } else {
  23041. $xeColorPicker.hideOptionPanel();
  23042. }
  23043. }
  23044. }
  23045. },
  23046. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  23047. var $xeColorPicker = this;
  23048. var reactData = $xeColorPicker.reactData;
  23049. var visiblePanel = reactData.visiblePanel;
  23050. var isDisabled = $xeColorPicker.computeIsDisabled;
  23051. if (!isDisabled) {
  23052. var el = $xeColorPicker.$refs.refElem;
  23053. var panelElem = $xeColorPicker.$refs.refOptionPanel;
  23054. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  23055. if (visiblePanel && !reactData.isActivated) {
  23056. $xeColorPicker.hideOptionPanel();
  23057. }
  23058. }
  23059. },
  23060. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  23061. var $xeColorPicker = this;
  23062. var reactData = $xeColorPicker.reactData;
  23063. var visiblePanel = reactData.visiblePanel,
  23064. isActivated = reactData.isActivated;
  23065. if (visiblePanel) {
  23066. $xeColorPicker.hideOptionPanel();
  23067. }
  23068. if (isActivated) {
  23069. reactData.isActivated = false;
  23070. }
  23071. if (visiblePanel || isActivated) {
  23072. var targetElem = $xeColorPicker.$refs.refInputTarget;
  23073. if (targetElem) {
  23074. targetElem.blur();
  23075. }
  23076. }
  23077. },
  23078. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  23079. var $xeColorPicker = this;
  23080. var reactData = $xeColorPicker.reactData;
  23081. var visiblePanel = reactData.visiblePanel;
  23082. if (visiblePanel) {
  23083. $xeColorPicker.updatePlacement();
  23084. }
  23085. },
  23086. //
  23087. // Render
  23088. //
  23089. renderColorWrapper: function renderColorWrapper(h) {
  23090. var $xeColorPicker = this;
  23091. var props = $xeColorPicker;
  23092. var reactData = $xeColorPicker.reactData;
  23093. var showColorExtractor = props.showColorExtractor;
  23094. var panelColor = reactData.panelColor;
  23095. if (showColorExtractor) {
  23096. return h('div', {
  23097. ref: 'refColorPanelElem',
  23098. class: 'vxe-color-picker--color-wrapper',
  23099. on: {
  23100. mousedown: $xeColorPicker.handleSelectColorMousedownEvent
  23101. }
  23102. }, [h('div', {
  23103. class: 'vxe-color-picker--color-bg',
  23104. style: {
  23105. backgroundColor: panelColor
  23106. }
  23107. }), h('div', {
  23108. class: 'vxe-color-picker--white-bg'
  23109. }), h('div', {
  23110. class: 'vxe-color-picker--black-bg'
  23111. }), h('div', {
  23112. ref: 'refColorActiveElem',
  23113. class: 'vxe-color-picker--color-active'
  23114. })]);
  23115. }
  23116. return renderEmptyElement($xeColorPicker);
  23117. },
  23118. renderColorBar: function renderColorBar(h) {
  23119. var $xeColorPicker = this;
  23120. var props = $xeColorPicker;
  23121. var reactData = $xeColorPicker.reactData;
  23122. var showAlpha = props.showAlpha,
  23123. clickToCopy = props.clickToCopy,
  23124. showEyeDropper = props.showEyeDropper;
  23125. var selectTyle = reactData.selectTyle,
  23126. showTypePopup = reactData.showTypePopup,
  23127. hexValue = reactData.hexValue,
  23128. rValue = reactData.rValue,
  23129. gValue = reactData.gValue,
  23130. bValue = reactData.bValue,
  23131. aValue = reactData.aValue,
  23132. selectColor = reactData.selectColor,
  23133. panelColor = reactData.panelColor;
  23134. var isRgb = $xeColorPicker.computeIsRgb;
  23135. var selectTypeItem = $xeColorPicker.computeSelectTypeItem;
  23136. return h('div', {
  23137. class: 'vxe-color-picker--bar-wrapper'
  23138. }, [h('div', {
  23139. class: 'vxe-color-picker--slider-wrapper'
  23140. }, [showEyeDropper && WinEyeDropper ? h('div', {
  23141. class: 'vxe-color-picker--color-dropper'
  23142. }, [h('span', {
  23143. class: 'vxe-color-picker--color-dropper-btn',
  23144. on: {
  23145. click: $xeColorPicker.handleEyeDropperEvent
  23146. }
  23147. }, [h('i', {
  23148. class: getIcon().COLOR_PICKER_EYE_DROPPER
  23149. })])]) : renderEmptyElement($xeColorPicker), h('div', {
  23150. class: 'vxe-color-picker--slider-preview'
  23151. }, [h('div', {
  23152. class: 'vxe-color-picker--preview-btn'
  23153. }, [h('div', {
  23154. class: 'vxe-color-picker--preview-color',
  23155. style: {
  23156. backgroundColor: selectColor
  23157. }
  23158. }, clickToCopy ? [h('span', {
  23159. class: 'vxe-color-picker--preview-copy-btn',
  23160. on: {
  23161. click: $xeColorPicker.handleCopyColorEvent
  23162. }
  23163. }, [h('i', {
  23164. class: getIcon().COLOR_PICKER_COLOR_COPY
  23165. })])] : [])])]), h('div', {
  23166. class: 'vxe-color-picker--slider-handle'
  23167. }, [h('div', {
  23168. ref: 'refHueSliderElem',
  23169. class: 'vxe-color-picker--bar-hue-slider',
  23170. on: {
  23171. click: $xeColorPicker.handleHueBarEvent
  23172. }
  23173. }, [h('div', {
  23174. ref: 'refHueSliderBtnElem',
  23175. class: 'vxe-color-picker--bar-hue-btn',
  23176. on: {
  23177. mousedown: $xeColorPicker.handleHueSliderMousedownEvent
  23178. }
  23179. })]), showAlpha ? h('div', {
  23180. ref: 'refAlphaSliderElem',
  23181. class: 'vxe-color-picker--bar-alpha-slider',
  23182. on: {
  23183. click: $xeColorPicker.handleAlphaBarEvent
  23184. }
  23185. }, [h('div', {
  23186. class: 'vxe-color-picker--bar-alpha-bg',
  23187. style: {
  23188. background: "linear-gradient(to right, rgba(0, 0, 0, 0), ".concat(panelColor, ")")
  23189. }
  23190. }), h('div', {
  23191. ref: 'refAlphaSliderBtnElem',
  23192. class: 'vxe-color-picker--bar-alpha-btn',
  23193. on: {
  23194. mousedown: $xeColorPicker.handleAlphaSliderMousedownEvent
  23195. }
  23196. })]) : renderEmptyElement($xeColorPicker)])]), h('div', {
  23197. class: 'vxe-color-picker--custom-wrapper'
  23198. }, [h('div', {
  23199. class: 'vxe-color-picker--type-switch'
  23200. }, [h('div', {
  23201. class: 'vxe-color-picker--type-label',
  23202. on: {
  23203. click: $xeColorPicker.toggleTypeVisibleEvent
  23204. }
  23205. }, [h('span', "".concat(selectTypeItem ? selectTypeItem.label : selectTyle)), h('span', {
  23206. class: 'vxe-color-picker--type-icon'
  23207. }, [h('i', {
  23208. class: showTypePopup ? getIcon().COLOR_PICKER_TPTY_OPEN : getIcon().COLOR_PICKER_TPTY_CLOSE
  23209. })])]), h('div', {
  23210. class: ['vxe-color-picker--type-popup', {
  23211. 'is--visible': showTypePopup
  23212. }]
  23213. }, typeList.map(function (item) {
  23214. return h('div', {
  23215. class: 'vxe-color-picker--type-item',
  23216. on: {
  23217. click: function click(evnt) {
  23218. evnt.stopPropagation();
  23219. $xeColorPicker.handleChangeType(item.value);
  23220. }
  23221. }
  23222. }, item.label);
  23223. }))]), h('div', {
  23224. class: "vxe-color-picker--".concat(selectTyle, "-wrapper")
  23225. }, isRgb ? [h('div', {
  23226. class: 'vxe-color-picker--input-wrapper'
  23227. }, [h(number_input, {
  23228. props: {
  23229. type: 'integer',
  23230. size: 'mini',
  23231. align: 'center',
  23232. min: 0,
  23233. max: 255,
  23234. maxLength: 3,
  23235. placeholder: '',
  23236. value: rValue,
  23237. controlConfig: {
  23238. showButton: false
  23239. }
  23240. },
  23241. on: {
  23242. 'modelValue': function modelValue(val) {
  23243. reactData.rValue = val;
  23244. },
  23245. change: $xeColorPicker.handleInputRgbEvent
  23246. }
  23247. }), h(number_input, {
  23248. props: {
  23249. type: 'integer',
  23250. size: 'mini',
  23251. align: 'center',
  23252. min: 0,
  23253. max: 255,
  23254. maxLength: 3,
  23255. placeholder: '',
  23256. value: gValue,
  23257. controlConfig: {
  23258. showButton: false
  23259. }
  23260. },
  23261. on: {
  23262. 'modelValue': function modelValue(val) {
  23263. reactData.gValue = val;
  23264. },
  23265. change: $xeColorPicker.handleInputRgbEvent
  23266. }
  23267. }), h(number_input, {
  23268. props: {
  23269. type: 'integer',
  23270. size: 'mini',
  23271. align: 'center',
  23272. min: 0,
  23273. max: 255,
  23274. maxLength: 3,
  23275. placeholder: '',
  23276. value: bValue,
  23277. controlConfig: {
  23278. showButton: false
  23279. }
  23280. },
  23281. on: {
  23282. 'modelValue': function modelValue(val) {
  23283. reactData.bValue = val;
  23284. },
  23285. change: $xeColorPicker.handleInputRgbEvent
  23286. }
  23287. }), h(number_input, {
  23288. props: {
  23289. type: 'number',
  23290. size: 'mini',
  23291. align: 'center',
  23292. min: 0,
  23293. max: 1,
  23294. step: 0.01,
  23295. maxLength: 4,
  23296. placeholder: '',
  23297. value: aValue,
  23298. controlConfig: {
  23299. showButton: false
  23300. }
  23301. },
  23302. on: {
  23303. 'modelValue': function modelValue(val) {
  23304. reactData.aValue = val;
  23305. },
  23306. change: $xeColorPicker.handleInputAlphaEvent
  23307. }
  23308. })]), h('div', {
  23309. class: 'vxe-color-picker--input-title'
  23310. }, [h('span', 'R'), h('span', 'G'), h('span', 'B'), h('span', 'A')])] : [h('div', {
  23311. class: 'vxe-color-picker--input-wrapper'
  23312. }, [h(input, {
  23313. props: {
  23314. type: 'text',
  23315. size: 'mini',
  23316. align: 'center',
  23317. maxLength: 9,
  23318. placeholder: '',
  23319. value: hexValue
  23320. },
  23321. on: {
  23322. 'modelValue': function modelValue(val) {
  23323. reactData.hexValue = val;
  23324. },
  23325. change: function change() {
  23326. var colorRest = parseColor(reactData.hexValue);
  23327. if (colorRest) {
  23328. if (colorRest.value) {
  23329. reactData.selectColor = colorRest.value;
  23330. $xeColorPicker.updateModelColor();
  23331. }
  23332. }
  23333. }
  23334. }
  23335. })]), h('div', {
  23336. class: 'vxe-color-picker--input-title'
  23337. }, getI18n('vxe.colorPicker.hex'))])])]);
  23338. },
  23339. renderQuickWrapper: function renderQuickWrapper(h) {
  23340. var $xeColorPicker = this;
  23341. var props = $xeColorPicker;
  23342. var showQuick = props.showQuick;
  23343. var colorList = $xeColorPicker.computeColorList;
  23344. if (showQuick && colorList.length) {
  23345. return h('div', {
  23346. class: 'vxe-color-picker--quick-wrapper'
  23347. }, colorList.map(function (item, i) {
  23348. return h('div', {
  23349. key: i,
  23350. class: 'vxe-color-picker--quick-item',
  23351. attrs: {
  23352. title: item.label || ''
  23353. },
  23354. style: {
  23355. backgroundColor: item.value
  23356. },
  23357. on: {
  23358. click: function click(evnt) {
  23359. $xeColorPicker.handleQuickEvent(evnt, item);
  23360. }
  23361. }
  23362. });
  23363. }));
  23364. }
  23365. return renderEmptyElement($xeColorPicker);
  23366. },
  23367. renderVN: function renderVN(h) {
  23368. var $xeColorPicker = this;
  23369. var props = $xeColorPicker;
  23370. var reactData = $xeColorPicker.reactData;
  23371. var className = props.className,
  23372. popupClassName = props.popupClassName,
  23373. clearable = props.clearable,
  23374. value = props.value;
  23375. var initialized = reactData.initialized,
  23376. isActivated = reactData.isActivated,
  23377. isAniVisible = reactData.isAniVisible,
  23378. visiblePanel = reactData.visiblePanel;
  23379. var vSize = $xeColorPicker.computeSize;
  23380. var isDisabled = $xeColorPicker.computeIsDisabled;
  23381. var btnTransfer = $xeColorPicker.computeBtnTransfer;
  23382. var formReadonly = $xeColorPicker.computeFormReadonly;
  23383. if (formReadonly) {
  23384. return h('div', {
  23385. ref: 'refElem',
  23386. class: ['vxe-color-picker--readonly', className]
  23387. }, [h('div', {
  23388. class: 'vxe-color-picker--readonly-color',
  23389. style: {
  23390. backgroundColor: value
  23391. }
  23392. })]);
  23393. }
  23394. return h('div', {
  23395. ref: 'refElem',
  23396. class: ['vxe-color-picker', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  23397. $colorPicker: $xeColorPicker
  23398. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--selected', !!value), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--active', isActivated)]
  23399. }, [h('input', {
  23400. ref: 'refInputTarget',
  23401. class: 'vxe-color-picker--input',
  23402. on: {
  23403. focus: $xeColorPicker.focusEvent,
  23404. blur: $xeColorPicker.blurEvent
  23405. }
  23406. }), h('div', {
  23407. class: 'vxe-color-picker--inner',
  23408. on: {
  23409. click: $xeColorPicker.clickEvent
  23410. }
  23411. }, [h('div', {
  23412. class: 'vxe-color-picker--inner-color',
  23413. style: {
  23414. backgroundColor: value
  23415. }
  23416. })]), h('div', {
  23417. ref: 'refOptionPanel',
  23418. class: ['vxe-table--ignore-clear vxe-color-picker--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  23419. $colorPicker: $xeColorPicker
  23420. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', isAniVisible), 'ani--enter', visiblePanel)],
  23421. attrs: {
  23422. placement: reactData.panelPlacement
  23423. },
  23424. style: reactData.panelStyle
  23425. }, [initialized && (visiblePanel || isAniVisible) ? h('div', {
  23426. class: 'vxe-color-picker--panel-wrapper',
  23427. on: {
  23428. click: $xeColorPicker.handlePanelClickEvent
  23429. }
  23430. }, [$xeColorPicker.renderColorWrapper(h), $xeColorPicker.renderColorBar(h), $xeColorPicker.renderQuickWrapper(h), h('div', {
  23431. class: 'vxe-color-picker--footer-wrapper'
  23432. }, [clearable ? h(src_button, {
  23433. props: {
  23434. content: getI18n('vxe.colorPicker.clear'),
  23435. size: 'mini'
  23436. },
  23437. on: {
  23438. click: $xeColorPicker.clearEvent
  23439. }
  23440. }) : renderEmptyElement($xeColorPicker), h(src_button, {
  23441. props: {
  23442. content: getI18n('vxe.colorPicker.confirm'),
  23443. size: 'mini',
  23444. status: 'primary'
  23445. },
  23446. on: {
  23447. click: $xeColorPicker.confirmEvent
  23448. }
  23449. })])]) : renderEmptyElement($xeColorPicker)])]);
  23450. }
  23451. },
  23452. watch: {
  23453. value: function value() {
  23454. var $xeColorPicker = this;
  23455. $xeColorPicker.updateMode();
  23456. },
  23457. type: function type() {
  23458. var $xeColorPicker = this;
  23459. $xeColorPicker.updateType();
  23460. }
  23461. },
  23462. created: function created() {
  23463. var $xeColorPicker = this;
  23464. var props = $xeColorPicker;
  23465. var reactData = $xeColorPicker.reactData;
  23466. reactData.selectColor = "".concat(props.value || '');
  23467. $xeColorPicker.updateType();
  23468. globalEvents.on($xeColorPicker, 'mousewheel', $xeColorPicker.handleGlobalMousewheelEvent);
  23469. globalEvents.on($xeColorPicker, 'mousedown', $xeColorPicker.handleGlobalMousedownEvent);
  23470. globalEvents.on($xeColorPicker, 'blur', $xeColorPicker.handleGlobalBlurEvent);
  23471. globalEvents.on($xeColorPicker, 'resize', $xeColorPicker.handleGlobalResizeEvent);
  23472. },
  23473. beforeDestroy: function beforeDestroy() {
  23474. var $xeColorPicker = this;
  23475. var panelElem = $xeColorPicker.$refs.refOptionPanel;
  23476. if (panelElem && panelElem.parentNode) {
  23477. panelElem.parentNode.removeChild(panelElem);
  23478. }
  23479. globalEvents.off($xeColorPicker, 'mousewheel');
  23480. globalEvents.off($xeColorPicker, 'mousedown');
  23481. globalEvents.off($xeColorPicker, 'blur');
  23482. globalEvents.off($xeColorPicker, 'resize');
  23483. },
  23484. render: function render(h) {
  23485. return this.renderVN(h);
  23486. }
  23487. })); /* define-vxe-component end */
  23488. ;// CONCATENATED MODULE: ./packages/color-picker/index.ts
  23489. var VxeColorPicker = Object.assign({}, color_picker, {
  23490. install: function install(app) {
  23491. app.component(color_picker.name, color_picker);
  23492. }
  23493. });
  23494. dynamicApp.use(VxeColorPicker);
  23495. index_esm_VxeUI.component(color_picker);
  23496. var ColorPicker = VxeColorPicker;
  23497. /* harmony default export */ var packages_color_picker = (VxeColorPicker);
  23498. ;// CONCATENATED MODULE: ./packages/text/src/text.ts
  23499. /* harmony default export */ var src_text = (/* define-vxe-component start */defineVxeComponent({
  23500. name: 'VxeText',
  23501. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  23502. props: {
  23503. status: String,
  23504. title: [String, Number],
  23505. icon: String,
  23506. prefixIcon: String,
  23507. suffixIcon: String,
  23508. loading: Boolean,
  23509. content: [String, Number],
  23510. clickToCopy: {
  23511. type: Boolean,
  23512. default: function _default() {
  23513. return getConfig().text.clickToCopy;
  23514. }
  23515. },
  23516. copyConfig: Object,
  23517. size: {
  23518. type: String,
  23519. default: function _default() {
  23520. return getConfig().text.size || getConfig().size;
  23521. }
  23522. }
  23523. },
  23524. data: function data() {
  23525. var reactData = {};
  23526. return {
  23527. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  23528. reactData: reactData
  23529. };
  23530. },
  23531. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  23532. computeCopyOpts: function computeCopyOpts() {
  23533. var $xeText = this;
  23534. var props = $xeText;
  23535. return Object.assign({}, getConfig().text.copyConfig, props.copyConfig);
  23536. }
  23537. }),
  23538. methods: {
  23539. //
  23540. // Method
  23541. //
  23542. dispatchEvent: function dispatchEvent(type, params, evnt) {
  23543. var $xeText = this;
  23544. $xeText.$emit(type, createEvent(evnt, {
  23545. $text: $xeText
  23546. }, params));
  23547. },
  23548. handleCopy: function handleCopy(evnt) {
  23549. var $xeText = this;
  23550. var props = $xeText;
  23551. var content = props.content;
  23552. var copyOpts = $xeText.computeCopyOpts;
  23553. var showMessage = copyOpts.showMessage;
  23554. var contentEl = $xeText.$refs.refContentElem;
  23555. var copyVal = (contentEl ? contentEl.textContent : '') || content;
  23556. if (copyVal) {
  23557. if (index_esm_VxeUI.clipboard.copy(copyVal)) {
  23558. if (showMessage && index_esm_VxeUI.modal) {
  23559. index_esm_VxeUI.modal.message({
  23560. content: getI18n('vxe.text.copySuccess'),
  23561. status: 'success'
  23562. });
  23563. }
  23564. $xeText.dispatchEvent('copy-success', {}, evnt);
  23565. } else {
  23566. if (showMessage && index_esm_VxeUI.modal) {
  23567. index_esm_VxeUI.modal.message({
  23568. content: getI18n('vxe.text.copyError'),
  23569. status: 'error'
  23570. });
  23571. }
  23572. $xeText.dispatchEvent('copy-error', {}, evnt);
  23573. }
  23574. }
  23575. },
  23576. clickIconEvent: function clickIconEvent(evnt) {
  23577. var $xeText = this;
  23578. var props = $xeText;
  23579. var clickToCopy = props.clickToCopy;
  23580. var copyOpts = $xeText.computeCopyOpts;
  23581. if (clickToCopy && copyOpts.trigger !== 'dblclick') {
  23582. $xeText.handleCopy(evnt);
  23583. }
  23584. },
  23585. dblclickIconEvent: function dblclickIconEvent(evnt) {
  23586. var $xeText = this;
  23587. var props = $xeText;
  23588. var clickToCopy = props.clickToCopy;
  23589. var copyOpts = $xeText.computeCopyOpts;
  23590. if (clickToCopy && copyOpts.trigger === 'dblclick') {
  23591. $xeText.handleCopy(evnt);
  23592. }
  23593. },
  23594. clickEvent: function clickEvent(evnt) {
  23595. var $xeText = this;
  23596. var props = $xeText;
  23597. var loading = props.loading;
  23598. if (!loading) {
  23599. $xeText.dispatchEvent('click', {}, evnt);
  23600. }
  23601. },
  23602. dblclickEvent: function dblclickEvent(evnt) {
  23603. var $xeText = this;
  23604. var props = $xeText;
  23605. var loading = props.loading;
  23606. if (!loading) {
  23607. $xeText.dispatchEvent('dblclick', {}, evnt);
  23608. }
  23609. },
  23610. prefixEvent: function prefixEvent(evnt) {
  23611. var $xeText = this;
  23612. var props = $xeText;
  23613. var loading = props.loading;
  23614. if (!loading) {
  23615. $xeText.dispatchEvent('prefix-click', {}, evnt);
  23616. }
  23617. },
  23618. suffixEvent: function suffixEvent(evnt) {
  23619. var $xeText = this;
  23620. var props = $xeText;
  23621. var loading = props.loading;
  23622. if (!loading) {
  23623. $xeText.dispatchEvent('suffix-click', {}, evnt);
  23624. }
  23625. },
  23626. //
  23627. // Render
  23628. //
  23629. renderCopyIcon: function renderCopyIcon(h) {
  23630. var $xeText = this;
  23631. var copyOpts = $xeText.computeCopyOpts;
  23632. var icon = copyOpts.icon,
  23633. status = copyOpts.status;
  23634. return h('span', {
  23635. key: 'ci',
  23636. class: ['vxe-text--copy-icon', _defineProperty({}, "theme--".concat(status), status)],
  23637. on: {
  23638. click: $xeText.clickIconEvent,
  23639. dblclick: $xeText.dblclickIconEvent
  23640. }
  23641. }, [h('i', {
  23642. class: icon || getIcon().TEXT_COPY
  23643. })]);
  23644. },
  23645. renderContent: function renderContent(h) {
  23646. var $xeText = this;
  23647. var props = $xeText;
  23648. var slots = $xeText.$scopedSlots;
  23649. var loading = props.loading,
  23650. icon = props.icon,
  23651. prefixIcon = props.prefixIcon,
  23652. suffixIcon = props.suffixIcon,
  23653. clickToCopy = props.clickToCopy,
  23654. content = props.content;
  23655. var copyOpts = $xeText.computeCopyOpts;
  23656. var defaultSlot = slots.default;
  23657. var prefixIconSlot = slots.prefixIcon || slots['prefix-icon'] || slots.icon;
  23658. var suffixIconSlot = slots.suffixIcon || slots['suffix-icon'];
  23659. var copyToRight = copyOpts.layout === 'right';
  23660. var contVNs = [];
  23661. if (loading) {
  23662. contVNs.push(h('span', {
  23663. key: 'lg',
  23664. class: 'vxe-text--loading'
  23665. }, [h('i', {
  23666. class: getIcon().TEXT_LOADING
  23667. })]));
  23668. } else if (clickToCopy && !copyToRight) {
  23669. contVNs.push($xeText.renderCopyIcon(h));
  23670. }
  23671. if (prefixIcon || icon) {
  23672. contVNs.push(h('span', {
  23673. key: 'si',
  23674. class: 'vxe-text--prefix-icon',
  23675. on: {
  23676. click: $xeText.prefixEvent
  23677. }
  23678. }, prefixIconSlot ? prefixIconSlot({}) : [h('i', {
  23679. class: prefixIcon || icon
  23680. })]));
  23681. }
  23682. contVNs.push(h('span', {
  23683. key: 'ct',
  23684. ref: 'refContentElem',
  23685. class: 'vxe-text--content',
  23686. on: {
  23687. click: $xeText.clickEvent,
  23688. dblclick: $xeText.dblclickEvent
  23689. }
  23690. }, defaultSlot ? defaultSlot({}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content)));
  23691. if (suffixIcon) {
  23692. contVNs.push(h('span', {
  23693. key: 'si',
  23694. class: 'vxe-text--suffix-icon',
  23695. on: {
  23696. click: $xeText.suffixEvent
  23697. }
  23698. }, suffixIconSlot ? suffixIconSlot({}) : [h('i', {
  23699. class: suffixIcon
  23700. })]));
  23701. }
  23702. if (clickToCopy && copyToRight && !loading) {
  23703. contVNs.push($xeText.renderCopyIcon(h));
  23704. }
  23705. return contVNs;
  23706. },
  23707. renderVN: function renderVN(h) {
  23708. var $xeText = this;
  23709. var props = $xeText;
  23710. var loading = props.loading,
  23711. status = props.status,
  23712. title = props.title,
  23713. clickToCopy = props.clickToCopy;
  23714. var vSize = $xeText.computeSize;
  23715. return h('span', {
  23716. ref: 'refElem',
  23717. class: ['vxe-text', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'is--copy', clickToCopy), 'is--loading', loading)],
  23718. attrs: {
  23719. title: title
  23720. }
  23721. }, $xeText.renderContent(h));
  23722. }
  23723. },
  23724. render: function render(h) {
  23725. return this.renderVN(h);
  23726. }
  23727. })); /* define-vxe-component end */
  23728. ;// CONCATENATED MODULE: ./packages/countdown/src/countdown.ts
  23729. /* harmony default export */ var countdown = (/* define-vxe-component start */defineVxeComponent({
  23730. name: 'VxeCountdown',
  23731. mixins: [globalMixins.sizeMixin],
  23732. props: {
  23733. value: [Number, String],
  23734. format: String,
  23735. prefixConfig: Object,
  23736. suffixConfig: Object,
  23737. size: {
  23738. type: String,
  23739. default: function _default() {
  23740. return getConfig().countdown.size || getConfig().size;
  23741. }
  23742. }
  23743. },
  23744. data: function data() {
  23745. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  23746. var reactData = {
  23747. currNum: 0,
  23748. secondNum: 0
  23749. };
  23750. var internalData = {
  23751. dnTimeout: undefined
  23752. };
  23753. return {
  23754. xID: xID,
  23755. reactData: reactData,
  23756. internalData: internalData
  23757. };
  23758. },
  23759. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  23760. computeTimeFormats: function computeTimeFormats() {
  23761. var $xeCountdown = this;
  23762. var reactData = $xeCountdown.reactData;
  23763. var secondNum = reactData.secondNum;
  23764. if (secondNum >= 31622400000) {
  23765. return ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss'];
  23766. }
  23767. if (secondNum >= 2678400000) {
  23768. return ['MM', 'dd', 'HH', 'mm', 'ss'];
  23769. }
  23770. if (secondNum >= 86400000) {
  23771. return ['dd', 'HH', 'mm', 'ss'];
  23772. }
  23773. if (secondNum >= 3600000) {
  23774. return ['HH', 'mm', 'ss'];
  23775. }
  23776. if (secondNum >= 60000) {
  23777. return ['mm', 'ss'];
  23778. }
  23779. return ['ss'];
  23780. },
  23781. computeDiffConf: function computeDiffConf() {
  23782. var $xeCountdown = this;
  23783. var reactData = $xeCountdown.reactData;
  23784. var currNum = reactData.currNum;
  23785. var diffRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getDateDiff(Date.now(), Date.now() + currNum);
  23786. return Object.assign(diffRest, {
  23787. done: !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(diffRest.status) ? diffRest.status : diffRest.done)
  23788. });
  23789. },
  23790. computeFormatLabel: function computeFormatLabel() {
  23791. var $xeCountdown = this;
  23792. var props = $xeCountdown;
  23793. var format = props.format;
  23794. var diffConf = $xeCountdown.computeDiffConf;
  23795. var rest = '';
  23796. if (format) {
  23797. rest = "".concat(format);
  23798. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(diffConf, function (val, key) {
  23799. rest = rest.replace(new RegExp(key, 'g'), external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(val, key.length, '0'));
  23800. });
  23801. return rest;
  23802. }
  23803. return rest;
  23804. },
  23805. computePrefixOpts: function computePrefixOpts() {
  23806. var $xeCountdown = this;
  23807. var props = $xeCountdown;
  23808. return Object.assign({}, props.prefixConfig, getConfig().countdown.prefixConfig);
  23809. },
  23810. computeSuffixOpts: function computeSuffixOpts() {
  23811. var $xeCountdown = this;
  23812. var props = $xeCountdown;
  23813. return Object.assign({}, props.suffixConfig, getConfig().countdown.suffixConfig);
  23814. }
  23815. }),
  23816. methods: {
  23817. //
  23818. // Method
  23819. //
  23820. dispatchEvent: function dispatchEvent(type, params, evnt) {
  23821. var $xeCountdown = this;
  23822. $xeCountdown.$emit(type, createEvent(evnt, {
  23823. $carousel: $xeCountdown
  23824. }, params));
  23825. },
  23826. updateCount: function updateCount() {
  23827. var $xeCountdown = this;
  23828. var props = $xeCountdown;
  23829. var reactData = $xeCountdown.reactData;
  23830. var secondNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.value || 0);
  23831. reactData.secondNum = secondNum;
  23832. reactData.currNum = secondNum;
  23833. },
  23834. handleTime: function handleTime() {
  23835. var $xeCountdown = this;
  23836. var reactData = $xeCountdown.reactData;
  23837. var internalData = $xeCountdown.internalData;
  23838. var currNum = reactData.currNum;
  23839. if (currNum > 1000) {
  23840. reactData.currNum -= 1000;
  23841. internalData.dnTimeout = setTimeout(function () {
  23842. $xeCountdown.handleTime();
  23843. }, 1000);
  23844. } else {
  23845. reactData.currNum = 0;
  23846. $xeCountdown.handleStop();
  23847. }
  23848. },
  23849. handleStart: function handleStart() {
  23850. var $xeCountdown = this;
  23851. $xeCountdown.dispatchEvent('start', {}, null);
  23852. $xeCountdown.handleTime();
  23853. },
  23854. handleStop: function handleStop() {
  23855. var $xeCountdown = this;
  23856. var internalData = $xeCountdown.internalData;
  23857. var dnTimeout = internalData.dnTimeout;
  23858. if (dnTimeout) {
  23859. clearTimeout(dnTimeout);
  23860. internalData.dnTimeout = undefined;
  23861. $xeCountdown.dispatchEvent('end', {}, null);
  23862. }
  23863. },
  23864. //
  23865. // Render
  23866. //
  23867. renderDefaultContentVNs: function renderDefaultContentVNs(h) {
  23868. var $xeCountdown = this;
  23869. var props = $xeCountdown;
  23870. var format = props.format;
  23871. var timeFormats = $xeCountdown.computeTimeFormats;
  23872. var diffConf = $xeCountdown.computeDiffConf;
  23873. var formatLabel = $xeCountdown.computeFormatLabel;
  23874. if (format) {
  23875. return [h('div', {
  23876. key: 'format',
  23877. class: 'vxe-countdown--content-format'
  23878. }, formatLabel)];
  23879. }
  23880. return timeFormats.map(function (key, index) {
  23881. return h('div', {
  23882. key: index,
  23883. class: 'vxe-countdown--content-item'
  23884. }, [h('div', {
  23885. class: 'vxe-countdown--content-num'
  23886. }, "".concat(diffConf[key] || 0)), h('div', {
  23887. class: 'vxe-countdown--content-unit'
  23888. }, getI18n("vxe.countdown.formats.".concat(key)))]);
  23889. });
  23890. },
  23891. renderVN: function renderVN(h) {
  23892. var $xeCountdown = this;
  23893. var props = $xeCountdown;
  23894. var slots = $xeCountdown.$scopedSlots;
  23895. var reactData = $xeCountdown.reactData;
  23896. var prefixConfig = props.prefixConfig,
  23897. suffixConfig = props.suffixConfig;
  23898. var currNum = reactData.currNum;
  23899. var vSize = $xeCountdown.computeSize;
  23900. var diffConf = $xeCountdown.computeDiffConf;
  23901. var prefixOpts = $xeCountdown.computePrefixOpts;
  23902. var suffixOpts = $xeCountdown.computeSuffixOpts;
  23903. var prefixSlot = slots.prefix;
  23904. var suffixSlot = slots.suffix;
  23905. var defaultSlot = slots.default;
  23906. return h('div', {
  23907. ref: 'refElem',
  23908. class: ['vxe-countdown', diffConf.done ? 'is--progress' : 'is-end', _defineProperty({}, "size--".concat(vSize), vSize)]
  23909. }, [prefixSlot || prefixConfig ? h('div', {
  23910. class: 'vxe-countdown--prefix'
  23911. }, prefixSlot ? vn_getSlotVNs(prefixSlot({
  23912. currentValue: currNum,
  23913. diffConf: diffConf
  23914. })) : [h(src_text, {
  23915. props: {
  23916. content: prefixOpts.content,
  23917. icon: prefixOpts.icon,
  23918. status: prefixOpts.status
  23919. }
  23920. })]) : renderEmptyElement($xeCountdown), h('div', {
  23921. class: 'vxe-countdown--content'
  23922. }, defaultSlot ? vn_getSlotVNs(defaultSlot({
  23923. currentValue: currNum,
  23924. diffConf: diffConf
  23925. })) : $xeCountdown.renderDefaultContentVNs(h)), suffixSlot || suffixConfig ? h('div', {
  23926. class: 'vxe-countdown--suffix'
  23927. }, suffixSlot ? vn_getSlotVNs(suffixSlot({
  23928. currentValue: currNum,
  23929. diffConf: diffConf
  23930. })) : [h(src_text, {
  23931. props: {
  23932. content: suffixOpts.content,
  23933. icon: suffixOpts.icon,
  23934. status: suffixOpts.status
  23935. }
  23936. })]) : renderEmptyElement($xeCountdown)]);
  23937. }
  23938. },
  23939. watch: {
  23940. value: function value() {
  23941. var $xeCountdown = this;
  23942. $xeCountdown.updateCount();
  23943. $xeCountdown.handleStop();
  23944. $xeCountdown.handleStart();
  23945. }
  23946. },
  23947. created: function created() {
  23948. var $xeCountdown = this;
  23949. $xeCountdown.updateCount();
  23950. },
  23951. mounted: function mounted() {
  23952. var $xeCountdown = this;
  23953. $xeCountdown.handleStart();
  23954. },
  23955. beforeDestroy: function beforeDestroy() {
  23956. var $xeCountdown = this;
  23957. $xeCountdown.handleStop();
  23958. },
  23959. render: function render(h) {
  23960. return this.renderVN(h);
  23961. }
  23962. })); /* define-vxe-component end */
  23963. ;// CONCATENATED MODULE: ./packages/countdown/index.ts
  23964. var VxeCountdown = Object.assign({}, countdown, {
  23965. install: function install(app) {
  23966. app.component(countdown.name, countdown);
  23967. }
  23968. });
  23969. dynamicApp.use(VxeCountdown);
  23970. index_esm_VxeUI.component(countdown);
  23971. var Countdown = VxeCountdown;
  23972. /* harmony default export */ var packages_countdown = (VxeCountdown);
  23973. ;// CONCATENATED MODULE: ./packages/date-panel/src/date-panel.ts
  23974. /* harmony default export */ var date_panel = (/* define-vxe-component start */defineVxeComponent({
  23975. name: 'VxeDatePanel',
  23976. mixins: [globalMixins.sizeMixin],
  23977. model: {
  23978. prop: 'value',
  23979. event: 'modelValue'
  23980. },
  23981. props: {
  23982. value: [String, Number, Date],
  23983. type: {
  23984. type: String,
  23985. default: 'date'
  23986. },
  23987. className: String,
  23988. size: {
  23989. type: String,
  23990. default: function _default() {
  23991. return getConfig().datePanel.size || getConfig().size;
  23992. }
  23993. },
  23994. multiple: Boolean,
  23995. limitCount: {
  23996. type: [String, Number],
  23997. default: function _default() {
  23998. return getConfig().datePanel.limitCount;
  23999. }
  24000. },
  24001. // date、week、month、quarter、year
  24002. startDate: {
  24003. type: [String, Number, Date],
  24004. default: function _default() {
  24005. return getConfig().datePanel.startDate;
  24006. }
  24007. },
  24008. endDate: {
  24009. type: [String, Number, Date],
  24010. default: function _default() {
  24011. return getConfig().datePanel.endDate;
  24012. }
  24013. },
  24014. defaultDate: [String, Number, Date],
  24015. minDate: [String, Number, Date],
  24016. maxDate: [String, Number, Date],
  24017. startDay: {
  24018. type: [String, Number],
  24019. default: function _default() {
  24020. return getConfig().datePanel.startDay;
  24021. }
  24022. },
  24023. labelFormat: String,
  24024. valueFormat: String,
  24025. timeFormat: String,
  24026. festivalMethod: {
  24027. type: Function,
  24028. default: function _default() {
  24029. return getConfig().datePanel.festivalMethod;
  24030. }
  24031. },
  24032. disabledMethod: {
  24033. type: Function,
  24034. default: function _default() {
  24035. return getConfig().datePanel.disabledMethod;
  24036. }
  24037. },
  24038. // week
  24039. selectDay: {
  24040. type: [String, Number],
  24041. default: function _default() {
  24042. return getConfig().datePanel.selectDay;
  24043. }
  24044. }
  24045. },
  24046. data: function data() {
  24047. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  24048. var reactData = {
  24049. visiblePanel: false,
  24050. isAniVisible: false,
  24051. isActivated: false,
  24052. inputValue: '',
  24053. inputLabel: '',
  24054. datetimePanelValue: null,
  24055. datePanelValue: null,
  24056. datePanelLabel: '',
  24057. datePanelType: 'day',
  24058. selectMonth: null,
  24059. currentDate: null
  24060. };
  24061. var internalData = {
  24062. yearSize: 12,
  24063. monthSize: 20,
  24064. quarterSize: 8,
  24065. hpTimeout: undefined
  24066. };
  24067. return {
  24068. xID: xID,
  24069. reactData: reactData,
  24070. internalData: internalData
  24071. };
  24072. },
  24073. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  24074. computeIsDateTimeType: function computeIsDateTimeType() {
  24075. var $xeDatePanel = this;
  24076. var props = $xeDatePanel;
  24077. var type = props.type;
  24078. return type === 'time' || type === 'datetime';
  24079. },
  24080. computeIsDatePanelType: function computeIsDatePanelType() {
  24081. var $xeDatePanel = this;
  24082. var props = $xeDatePanel;
  24083. var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
  24084. return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
  24085. },
  24086. computeDateStartTime: function computeDateStartTime() {
  24087. var $xeDatePanel = this;
  24088. var props = $xeDatePanel;
  24089. return props.startDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.startDate) : null;
  24090. },
  24091. computeDateEndTime: function computeDateEndTime() {
  24092. var $xeDatePanel = this;
  24093. var props = $xeDatePanel;
  24094. return props.endDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.endDate) : null;
  24095. },
  24096. computeDateListValue: function computeDateListValue() {
  24097. var $xeDatePanel = this;
  24098. var props = $xeDatePanel;
  24099. var modelValue = props.value,
  24100. multiple = props.multiple;
  24101. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24102. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24103. if (multiple && modelValue && isDatePanelType) {
  24104. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue).split(',').map(function (item) {
  24105. var date = $xeDatePanel.parseDate(item, dateValueFormat);
  24106. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
  24107. return date;
  24108. }
  24109. return date;
  24110. });
  24111. }
  24112. return [];
  24113. },
  24114. computeDateMultipleValue: function computeDateMultipleValue() {
  24115. var $xeDatePanel = this;
  24116. var dateListValue = $xeDatePanel.computeDateListValue;
  24117. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24118. return dateListValue.map(function (date) {
  24119. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat);
  24120. });
  24121. },
  24122. computeDateMultipleLabel: function computeDateMultipleLabel() {
  24123. var $xeDatePanel = this;
  24124. var dateListValue = $xeDatePanel.computeDateListValue;
  24125. var dateLabelFormat = $xeDatePanel.computeDateLabelFormat;
  24126. return dateListValue.map(function (date) {
  24127. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateLabelFormat);
  24128. }).join(', ');
  24129. },
  24130. computeLimitMaxCount: function computeLimitMaxCount() {
  24131. var $xeDatePanel = this;
  24132. var props = $xeDatePanel;
  24133. return props.multiple ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.limitCount) : 0;
  24134. },
  24135. computeOverCount: function computeOverCount() {
  24136. var $xeDatePanel = this;
  24137. var props = $xeDatePanel;
  24138. var multiple = props.multiple;
  24139. var limitMaxCount = $xeDatePanel.computeLimitMaxCount;
  24140. var dateMultipleValue = $xeDatePanel.computeDateMultipleValue;
  24141. if (multiple && limitMaxCount) {
  24142. return dateMultipleValue.length >= limitMaxCount;
  24143. }
  24144. return false;
  24145. },
  24146. computeDateValueFormat: function computeDateValueFormat() {
  24147. var $xeDatePanel = this;
  24148. var props = $xeDatePanel;
  24149. var type = props.type,
  24150. valueFormat = props.valueFormat;
  24151. return handleValueFormat(type, valueFormat);
  24152. },
  24153. computeDateValue: function computeDateValue() {
  24154. var $xeDatePanel = this;
  24155. var props = $xeDatePanel;
  24156. var modelValue = props.value;
  24157. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24158. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24159. var val = null;
  24160. if (modelValue && isDatePanelType) {
  24161. var date = $xeDatePanel.parseDate(modelValue, dateValueFormat);
  24162. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(date)) {
  24163. val = date;
  24164. }
  24165. }
  24166. return val;
  24167. },
  24168. computeIsDisabledPrevDateBtn: function computeIsDisabledPrevDateBtn() {
  24169. var $xeDatePanel = this;
  24170. var reactData = $xeDatePanel.reactData;
  24171. var dateStartTime = $xeDatePanel.computeDateStartTime;
  24172. var selectMonth = reactData.selectMonth;
  24173. if (selectMonth && dateStartTime) {
  24174. return selectMonth <= dateStartTime;
  24175. }
  24176. return false;
  24177. },
  24178. computeIsDisabledNextDateBtn: function computeIsDisabledNextDateBtn() {
  24179. var $xeDatePanel = this;
  24180. var reactData = $xeDatePanel.reactData;
  24181. var dateEndTime = $xeDatePanel.computeDateEndTime;
  24182. var selectMonth = reactData.selectMonth;
  24183. if (selectMonth && dateEndTime) {
  24184. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, 0, 'last') >= dateEndTime;
  24185. }
  24186. return false;
  24187. },
  24188. computeDateTimeLabel: function computeDateTimeLabel() {
  24189. var $xeDatePanel = this;
  24190. var reactData = $xeDatePanel.reactData;
  24191. var datetimePanelValue = reactData.datetimePanelValue;
  24192. var hasTimeSecond = $xeDatePanel.computeHasTimeSecond;
  24193. var hasTimeMinute = $xeDatePanel.computeHasTimeMinute;
  24194. if (datetimePanelValue) {
  24195. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(datetimePanelValue, hasTimeMinute && hasTimeSecond ? 'HH:mm:ss' : hasTimeMinute ? 'HH:mm' : 'HH');
  24196. }
  24197. return '';
  24198. },
  24199. computeDateHMSTime: function computeDateHMSTime() {
  24200. var $xeDatePanel = this;
  24201. var dateValue = $xeDatePanel.computeDateValue;
  24202. var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
  24203. return dateValue && isDateTimeType ? (dateValue.getHours() * 3600 + dateValue.getMinutes() * 60 + dateValue.getSeconds()) * 1000 : 0;
  24204. },
  24205. computeDateLabelFormat: function computeDateLabelFormat() {
  24206. var $xeDatePanel = this;
  24207. var props = $xeDatePanel;
  24208. var labelFormat = props.labelFormat;
  24209. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24210. if (isDatePanelType) {
  24211. return labelFormat || getI18n("vxe.input.date.labelFormat.".concat(props.type));
  24212. }
  24213. return '';
  24214. },
  24215. computeYearList: function computeYearList() {
  24216. var $xeDatePanel = this;
  24217. var reactData = $xeDatePanel.reactData;
  24218. var internalData = $xeDatePanel.internalData;
  24219. var yearSize = internalData.yearSize;
  24220. var selectMonth = reactData.selectMonth,
  24221. currentDate = reactData.currentDate;
  24222. var years = [];
  24223. if (selectMonth && currentDate) {
  24224. var currFullYear = currentDate.getFullYear();
  24225. var selectFullYear = selectMonth.getFullYear();
  24226. var startYearDate = new Date(selectFullYear - selectFullYear % yearSize, 0, 1);
  24227. for (var index = -4; index < yearSize + 4; index++) {
  24228. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(startYearDate, index, 'first');
  24229. var itemFullYear = date.getFullYear();
  24230. years.push({
  24231. date: date,
  24232. isCurrent: true,
  24233. isPrev: index < 0,
  24234. isNow: currFullYear === itemFullYear,
  24235. isNext: index >= yearSize,
  24236. year: itemFullYear
  24237. });
  24238. }
  24239. }
  24240. return years;
  24241. },
  24242. computeSelectDatePanelObj: function computeSelectDatePanelObj() {
  24243. var $xeDatePanel = this;
  24244. var reactData = $xeDatePanel.reactData;
  24245. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24246. var y = '';
  24247. var m = '';
  24248. if (isDatePanelType) {
  24249. var datePanelType = reactData.datePanelType,
  24250. selectMonth = reactData.selectMonth;
  24251. var yearList = $xeDatePanel.computeYearList;
  24252. var year = '';
  24253. var month;
  24254. if (selectMonth) {
  24255. year = selectMonth.getFullYear();
  24256. month = selectMonth.getMonth() + 1;
  24257. }
  24258. if (datePanelType === 'quarter' || datePanelType === 'month') {
  24259. y = getI18n('vxe.datePicker.yearTitle', [year]);
  24260. } else if (datePanelType === 'year') {
  24261. y = yearList.length ? "".concat(yearList[0].year, " - ").concat(yearList[yearList.length - 1].year) : '';
  24262. } else {
  24263. y = getI18n('vxe.datePicker.yearTitle', [year]);
  24264. m = month ? getI18n("vxe.input.date.m".concat(month)) : '-';
  24265. }
  24266. }
  24267. return {
  24268. y: y,
  24269. m: m
  24270. };
  24271. },
  24272. computeFirstDayOfWeek: function computeFirstDayOfWeek() {
  24273. var $xeDatePanel = this;
  24274. var props = $xeDatePanel;
  24275. var startDay = props.startDay;
  24276. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(startDay);
  24277. },
  24278. computeWeekDatas: function computeWeekDatas() {
  24279. var $xeDatePanel = this;
  24280. var weeks = [];
  24281. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24282. if (isDatePanelType) {
  24283. var sWeek = $xeDatePanel.computeFirstDayOfWeek;
  24284. weeks.push(sWeek);
  24285. for (var index = 0; index < 6; index++) {
  24286. if (sWeek >= 6) {
  24287. sWeek = 0;
  24288. } else {
  24289. sWeek++;
  24290. }
  24291. weeks.push(sWeek);
  24292. }
  24293. }
  24294. return weeks;
  24295. },
  24296. computeDateHeaders: function computeDateHeaders() {
  24297. var $xeDatePanel = this;
  24298. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24299. if (isDatePanelType) {
  24300. var weekDatas = $xeDatePanel.computeWeekDatas;
  24301. return weekDatas.map(function (day) {
  24302. return {
  24303. value: day,
  24304. label: getI18n("vxe.input.date.weeks.w".concat(day))
  24305. };
  24306. });
  24307. }
  24308. return [];
  24309. },
  24310. computeWeekHeaders: function computeWeekHeaders() {
  24311. var $xeDatePanel = this;
  24312. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24313. if (isDatePanelType) {
  24314. var dateHeaders = $xeDatePanel.computeDateHeaders;
  24315. return [{
  24316. label: getI18n('vxe.input.date.weeks.w')
  24317. }].concat(dateHeaders);
  24318. }
  24319. return [];
  24320. },
  24321. computeYearDatas: function computeYearDatas() {
  24322. var $xeDatePanel = this;
  24323. var yearList = $xeDatePanel.computeYearList;
  24324. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(yearList, 4);
  24325. },
  24326. computeQuarterList: function computeQuarterList() {
  24327. var $xeDatePanel = this;
  24328. var reactData = $xeDatePanel.reactData;
  24329. var internalData = $xeDatePanel.internalData;
  24330. var quarterSize = internalData.quarterSize;
  24331. var selectMonth = reactData.selectMonth,
  24332. currentDate = reactData.currentDate;
  24333. var quarters = [];
  24334. if (selectMonth && currentDate) {
  24335. var currFullYear = currentDate.getFullYear();
  24336. var currQuarter = getDateQuarter(currentDate);
  24337. var firstYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, 'first');
  24338. var selFullYear = firstYear.getFullYear();
  24339. for (var index = -2; index < quarterSize - 2; index++) {
  24340. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatQuarter(firstYear, index);
  24341. var itemFullYear = date.getFullYear();
  24342. var itemQuarter = getDateQuarter(date);
  24343. var isPrev = itemFullYear < selFullYear;
  24344. quarters.push({
  24345. date: date,
  24346. isPrev: isPrev,
  24347. isCurrent: itemFullYear === selFullYear,
  24348. isNow: itemFullYear === currFullYear && itemQuarter === currQuarter,
  24349. isNext: !isPrev && itemFullYear > selFullYear,
  24350. quarter: itemQuarter
  24351. });
  24352. }
  24353. }
  24354. return quarters;
  24355. },
  24356. computeQuarterDatas: function computeQuarterDatas() {
  24357. var $xeDatePanel = this;
  24358. var quarterList = $xeDatePanel.computeQuarterList;
  24359. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(quarterList, 2);
  24360. },
  24361. computeMonthList: function computeMonthList() {
  24362. var $xeDatePanel = this;
  24363. var reactData = $xeDatePanel.reactData;
  24364. var internalData = $xeDatePanel.internalData;
  24365. var monthSize = internalData.monthSize;
  24366. var selectMonth = reactData.selectMonth,
  24367. currentDate = reactData.currentDate;
  24368. var months = [];
  24369. if (selectMonth && currentDate) {
  24370. var currFullYear = currentDate.getFullYear();
  24371. var currMonth = currentDate.getMonth();
  24372. var selFullYear = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, 'first').getFullYear();
  24373. for (var index = -4; index < monthSize - 4; index++) {
  24374. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 0, index);
  24375. var itemFullYear = date.getFullYear();
  24376. var itemMonth = date.getMonth();
  24377. var isPrev = itemFullYear < selFullYear;
  24378. months.push({
  24379. date: date,
  24380. isPrev: isPrev,
  24381. isCurrent: itemFullYear === selFullYear,
  24382. isNow: itemFullYear === currFullYear && itemMonth === currMonth,
  24383. isNext: !isPrev && itemFullYear > selFullYear,
  24384. month: itemMonth
  24385. });
  24386. }
  24387. }
  24388. return months;
  24389. },
  24390. computeMonthDatas: function computeMonthDatas() {
  24391. var $xeDatePanel = this;
  24392. var monthList = $xeDatePanel.computeMonthList;
  24393. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(monthList, 4);
  24394. },
  24395. computeDayList: function computeDayList() {
  24396. var $xeDatePanel = this;
  24397. var reactData = $xeDatePanel.reactData;
  24398. var selectMonth = reactData.selectMonth,
  24399. currentDate = reactData.currentDate;
  24400. var days = [];
  24401. if (selectMonth && currentDate) {
  24402. var dateHMSTime = $xeDatePanel.computeDateHMSTime;
  24403. var weekDatas = $xeDatePanel.computeWeekDatas;
  24404. var currFullYear = currentDate.getFullYear();
  24405. var currMonth = currentDate.getMonth();
  24406. var currDate = currentDate.getDate();
  24407. var selFullYear = selectMonth.getFullYear();
  24408. var selMonth = selectMonth.getMonth();
  24409. var selDay = selectMonth.getDay();
  24410. var prevOffsetDate = -weekDatas.indexOf(selDay);
  24411. var startDayDate = new Date(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(selectMonth, prevOffsetDate).getTime() + dateHMSTime);
  24412. for (var index = 0; index < 42; index++) {
  24413. var date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(startDayDate, index);
  24414. var itemFullYear = date.getFullYear();
  24415. var itemMonth = date.getMonth();
  24416. var itemDate = date.getDate();
  24417. var isPrev = date < selectMonth;
  24418. days.push({
  24419. date: date,
  24420. isPrev: isPrev,
  24421. isCurrent: itemFullYear === selFullYear && itemMonth === selMonth,
  24422. isNow: itemFullYear === currFullYear && itemMonth === currMonth && itemDate === currDate,
  24423. isNext: !isPrev && selMonth !== itemMonth,
  24424. label: itemDate
  24425. });
  24426. }
  24427. }
  24428. return days;
  24429. },
  24430. computeDayDatas: function computeDayDatas() {
  24431. var $xeDatePanel = this;
  24432. var dayList = $xeDatePanel.computeDayList;
  24433. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(dayList, 7);
  24434. },
  24435. computeWeekDates: function computeWeekDates() {
  24436. var $xeDatePanel = this;
  24437. var dayDatas = $xeDatePanel.computeDayDatas;
  24438. var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
  24439. return dayDatas.map(function (list) {
  24440. var firstItem = list[0];
  24441. var item = {
  24442. date: firstItem.date,
  24443. isWeekNumber: true,
  24444. isPrev: false,
  24445. isCurrent: false,
  24446. isNow: false,
  24447. isNext: false,
  24448. label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(firstItem.date, firstDayOfWeek)
  24449. };
  24450. return [item].concat(list);
  24451. });
  24452. },
  24453. computeHourList: function computeHourList() {
  24454. var $xeDatePanel = this;
  24455. var list = [];
  24456. var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
  24457. if (isDateTimeType) {
  24458. for (var index = 0; index < 24; index++) {
  24459. list.push({
  24460. value: index,
  24461. label: ('' + index).padStart(2, '0')
  24462. });
  24463. }
  24464. }
  24465. return list;
  24466. },
  24467. computeMinuteList: function computeMinuteList() {
  24468. var $xeDatePanel = this;
  24469. var list = [];
  24470. var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
  24471. if (isDateTimeType) {
  24472. for (var index = 0; index < 60; index++) {
  24473. list.push({
  24474. value: index,
  24475. label: ('' + index).padStart(2, '0')
  24476. });
  24477. }
  24478. }
  24479. return list;
  24480. },
  24481. computeHasTimeMinute: function computeHasTimeMinute() {
  24482. var $xeDatePanel = this;
  24483. var props = $xeDatePanel;
  24484. var timeFormat = props.timeFormat;
  24485. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24486. return !/HH/.test(timeFormat || dateValueFormat) || /mm/.test(timeFormat || dateValueFormat);
  24487. },
  24488. computeHasTimeSecond: function computeHasTimeSecond() {
  24489. var $xeDatePanel = this;
  24490. var props = $xeDatePanel;
  24491. var timeFormat = props.timeFormat;
  24492. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24493. return !/HH/.test(timeFormat || dateValueFormat) || /ss/.test(timeFormat || dateValueFormat);
  24494. },
  24495. computeSecondList: function computeSecondList() {
  24496. var $xeDatePanel = this;
  24497. var minuteList = $xeDatePanel.computeMinuteList;
  24498. return minuteList;
  24499. }
  24500. }),
  24501. methods: {
  24502. //
  24503. // Method
  24504. //
  24505. dispatchEvent: function dispatchEvent(type, params, evnt) {
  24506. var $xeDatePanel = this;
  24507. $xeDatePanel.$emit(type, createEvent(evnt, {
  24508. $drawer: $xeDatePanel
  24509. }, params));
  24510. },
  24511. emitModel: function emitModel(value) {
  24512. var $xeDatePanel = this;
  24513. var reactData = $xeDatePanel.reactData;
  24514. var _events = $xeDatePanel._events;
  24515. reactData.inputValue = value;
  24516. if (_events && _events.modelValue) {
  24517. $xeDatePanel.$emit('modelValue', value);
  24518. } else {
  24519. $xeDatePanel.$emit('model-value', value);
  24520. }
  24521. },
  24522. updateModelValue: function updateModelValue(modelValue) {
  24523. var $xeDatePanel = this;
  24524. var props = $xeDatePanel;
  24525. var reactData = $xeDatePanel.reactData;
  24526. var type = props.type;
  24527. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24528. var inpDate = parseDateValue(modelValue, type, {
  24529. valueFormat: dateValueFormat
  24530. });
  24531. reactData.inputValue = inpDate;
  24532. reactData.inputLabel = inpDate;
  24533. $xeDatePanel.dateOpenPanel();
  24534. },
  24535. parseDate: function parseDate(value, format) {
  24536. var $xeDatePanel = this;
  24537. var props = $xeDatePanel;
  24538. var type = props.type,
  24539. multiple = props.multiple;
  24540. if (type === 'time') {
  24541. return toStringTimeDate(value);
  24542. }
  24543. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(value)) {
  24544. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(value[0], format);
  24545. }
  24546. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(value)) {
  24547. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(multiple ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().last(value.split(',')) : value, format);
  24548. }
  24549. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(value, format);
  24550. },
  24551. dateRevert: function dateRevert() {
  24552. var $xeDatePanel = this;
  24553. var props = $xeDatePanel;
  24554. var reactData = $xeDatePanel.reactData;
  24555. reactData.inputLabel = props.multiple ? $xeDatePanel.computeDateMultipleLabel : reactData.datePanelLabel;
  24556. },
  24557. afterCheckValue: function afterCheckValue(inpVal) {
  24558. var $xeDatePanel = this;
  24559. var props = $xeDatePanel;
  24560. var reactData = $xeDatePanel.reactData;
  24561. var type = props.type;
  24562. var inputLabel = reactData.inputLabel,
  24563. datetimePanelValue = reactData.datetimePanelValue;
  24564. var dateLabelFormat = $xeDatePanel.computeDateLabelFormat;
  24565. if (inpVal) {
  24566. var inpDateVal = $xeDatePanel.parseDate(inpVal, dateLabelFormat);
  24567. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
  24568. if (type === 'time') {
  24569. inpDateVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat);
  24570. if (inputLabel !== inpDateVal) {
  24571. $xeDatePanel.handleChange(inpDateVal, {
  24572. type: 'check'
  24573. });
  24574. }
  24575. reactData.inputLabel = inpDateVal;
  24576. } else {
  24577. var isChange = false;
  24578. var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
  24579. if (type === 'datetime') {
  24580. var dateValue = $xeDatePanel.computeDateValue;
  24581. if (inpVal !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(dateValue, dateLabelFormat) || inpVal !== external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat)) {
  24582. isChange = true;
  24583. if (datetimePanelValue) {
  24584. datetimePanelValue.setHours(inpDateVal.getHours());
  24585. datetimePanelValue.setMinutes(inpDateVal.getMinutes());
  24586. datetimePanelValue.setSeconds(inpDateVal.getSeconds());
  24587. }
  24588. }
  24589. } else {
  24590. isChange = true;
  24591. }
  24592. reactData.inputLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(inpDateVal, dateLabelFormat, {
  24593. firstDay: firstDayOfWeek
  24594. });
  24595. if (isChange) {
  24596. $xeDatePanel.dateChange(inpDateVal);
  24597. }
  24598. }
  24599. } else {
  24600. $xeDatePanel.dateRevert();
  24601. }
  24602. } else {
  24603. $xeDatePanel.handleChange('', {
  24604. type: 'check'
  24605. });
  24606. }
  24607. },
  24608. handleChange: function handleChange(value, evnt) {
  24609. var $xeDatePanel = this;
  24610. var props = $xeDatePanel;
  24611. var reactData = $xeDatePanel.reactData;
  24612. var type = props.type,
  24613. modelValue = props.value,
  24614. valueFormat = props.valueFormat;
  24615. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24616. reactData.inputLabel = value;
  24617. if (hasTimestampValueType(valueFormat)) {
  24618. var dateVal = parseDateValue(value, type, {
  24619. valueFormat: dateValueFormat
  24620. });
  24621. var timeNum = dateVal ? dateVal.getTime() : null;
  24622. $xeDatePanel.emitModel(timeNum);
  24623. if (modelValue !== timeNum) {
  24624. $xeDatePanel.dispatchEvent('change', {
  24625. value: timeNum
  24626. }, evnt);
  24627. }
  24628. } else if (hasDateValueType(valueFormat)) {
  24629. var _dateVal = parseDateValue(value, type, {
  24630. valueFormat: dateValueFormat
  24631. });
  24632. $xeDatePanel.emitModel(_dateVal);
  24633. if (modelValue && _dateVal ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(modelValue).getTime() !== _dateVal.getTime() : modelValue !== _dateVal) {
  24634. $xeDatePanel.dispatchEvent('change', {
  24635. value: _dateVal
  24636. }, evnt);
  24637. }
  24638. } else {
  24639. $xeDatePanel.emitModel(value);
  24640. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue) !== value) {
  24641. $xeDatePanel.dispatchEvent('change', {
  24642. value: value
  24643. }, evnt);
  24644. }
  24645. }
  24646. },
  24647. hidePanel: function hidePanel() {
  24648. var $xeDatePanel = this;
  24649. var reactData = $xeDatePanel.reactData;
  24650. var internalData = $xeDatePanel.internalData;
  24651. return new Promise(function (resolve) {
  24652. reactData.visiblePanel = false;
  24653. internalData.hpTimeout = setTimeout(function () {
  24654. reactData.isAniVisible = false;
  24655. resolve();
  24656. }, 350);
  24657. });
  24658. },
  24659. dateParseValue: function dateParseValue(val) {
  24660. var $xeDatePanel = this;
  24661. var props = $xeDatePanel;
  24662. var reactData = $xeDatePanel.reactData;
  24663. var type = props.type;
  24664. var dateLabelFormat = $xeDatePanel.computeDateLabelFormat;
  24665. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24666. var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
  24667. var dateObj = parseDateObj(val, type, {
  24668. valueFormat: dateValueFormat,
  24669. labelFormat: dateLabelFormat,
  24670. firstDay: firstDayOfWeek
  24671. });
  24672. reactData.datePanelValue = dateObj.value;
  24673. reactData.datePanelLabel = dateObj.label;
  24674. },
  24675. /**
  24676. * 值变化时处理
  24677. */
  24678. changeValue: function changeValue() {
  24679. var $xeDatePanel = this;
  24680. var props = $xeDatePanel;
  24681. var reactData = $xeDatePanel.reactData;
  24682. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24683. var inputLabel = reactData.inputLabel;
  24684. if (isDatePanelType) {
  24685. $xeDatePanel.dateParseValue(inputLabel);
  24686. reactData.inputLabel = props.multiple ? $xeDatePanel.computeDateMultipleLabel : reactData.datePanelLabel;
  24687. }
  24688. },
  24689. /**
  24690. * 检查初始值
  24691. */
  24692. initValue: function initValue() {
  24693. var $xeDatePanel = this;
  24694. var props = $xeDatePanel;
  24695. var modelValue = props.value;
  24696. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  24697. $xeDatePanel.updateModelValue(modelValue);
  24698. if (isDatePanelType) {
  24699. $xeDatePanel.changeValue();
  24700. }
  24701. },
  24702. dateCheckMonth: function dateCheckMonth(date) {
  24703. var $xeDatePanel = this;
  24704. var reactData = $xeDatePanel.reactData;
  24705. var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
  24706. var weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(date, firstDayOfWeek);
  24707. var weekStartDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, firstDayOfWeek, firstDayOfWeek);
  24708. var month = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(weekNum === 1 ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(weekStartDate, 6) : date, 0, 'first');
  24709. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(month, reactData.selectMonth)) {
  24710. reactData.selectMonth = month;
  24711. }
  24712. },
  24713. dateChange: function dateChange(date, isReload) {
  24714. var $xeDatePanel = this;
  24715. var props = $xeDatePanel;
  24716. var reactData = $xeDatePanel.reactData;
  24717. var modelValue = props.value,
  24718. multiple = props.multiple;
  24719. var datetimePanelValue = reactData.datetimePanelValue;
  24720. var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
  24721. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  24722. var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
  24723. if (props.type === 'week') {
  24724. var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.selectDay);
  24725. date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, sWeek, firstDayOfWeek);
  24726. } else if (isDateTimeType) {
  24727. if (datetimePanelValue) {
  24728. date.setHours(datetimePanelValue.getHours());
  24729. date.setMinutes(datetimePanelValue.getMinutes());
  24730. date.setSeconds(datetimePanelValue.getSeconds());
  24731. }
  24732. }
  24733. var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat, {
  24734. firstDay: firstDayOfWeek
  24735. });
  24736. $xeDatePanel.dateCheckMonth(date);
  24737. if (multiple) {
  24738. var overCount = $xeDatePanel.computeOverCount;
  24739. // 如果为多选
  24740. if (isDateTimeType) {
  24741. // 如果是datetime特殊类型
  24742. var dateListValue = isReload ? [] : _toConsumableArray($xeDatePanel.computeDateListValue);
  24743. var datetimeRest = [];
  24744. var eqIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(dateListValue, function (val) {
  24745. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(date, val, 'yyyyMMdd');
  24746. });
  24747. if (eqIndex === -1) {
  24748. if (overCount) {
  24749. // 如果超出最大多选数量
  24750. return;
  24751. }
  24752. dateListValue.push(date);
  24753. } else {
  24754. dateListValue.splice(eqIndex, 1);
  24755. }
  24756. dateListValue.forEach(function (item) {
  24757. if (item) {
  24758. if (datetimePanelValue) {
  24759. item.setHours(datetimePanelValue.getHours());
  24760. item.setMinutes(datetimePanelValue.getMinutes());
  24761. item.setSeconds(datetimePanelValue.getSeconds());
  24762. }
  24763. datetimeRest.push(item);
  24764. }
  24765. });
  24766. $xeDatePanel.handleChange(datetimeRest.map(function (date) {
  24767. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat);
  24768. }).join(','), {
  24769. type: 'update'
  24770. });
  24771. } else {
  24772. var dateMultipleValue = isReload ? [] : $xeDatePanel.computeDateMultipleValue;
  24773. // 如果是日期类型
  24774. if (dateMultipleValue.some(function (val) {
  24775. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal);
  24776. })) {
  24777. $xeDatePanel.handleChange(dateMultipleValue.filter(function (val) {
  24778. return !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val, inpVal);
  24779. }).join(','), {
  24780. type: 'update'
  24781. });
  24782. } else {
  24783. if (overCount) {
  24784. // 如果超出最大多选数量
  24785. return;
  24786. }
  24787. $xeDatePanel.handleChange(dateMultipleValue.concat([inpVal]).join(','), {
  24788. type: 'update'
  24789. });
  24790. }
  24791. }
  24792. } else {
  24793. // 如果为单选
  24794. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(modelValue, inpVal)) {
  24795. $xeDatePanel.handleChange(inpVal, {
  24796. type: 'update'
  24797. });
  24798. }
  24799. }
  24800. },
  24801. // 日期
  24802. dateMonthHandle: function dateMonthHandle(date, offsetMonth) {
  24803. var $xeDatePanel = this;
  24804. var reactData = $xeDatePanel.reactData;
  24805. var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
  24806. var weekNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getYearWeek(date, firstDayOfWeek);
  24807. var weekStartDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(date, 0, firstDayOfWeek, firstDayOfWeek);
  24808. var month = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(weekNum === 1 ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(weekStartDate, 6) : date, offsetMonth, 'first');
  24809. reactData.selectMonth = month;
  24810. },
  24811. dateNowHandle: function dateNowHandle() {
  24812. var $xeDatePanel = this;
  24813. var props = $xeDatePanel;
  24814. var reactData = $xeDatePanel.reactData;
  24815. var type = props.type;
  24816. var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
  24817. var currentDate = new Date();
  24818. switch (type) {
  24819. case 'week':
  24820. currentDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatWeek(currentDate, 0, firstDayOfWeek);
  24821. break;
  24822. case 'datetime':
  24823. currentDate = new Date();
  24824. reactData.datetimePanelValue = new Date();
  24825. break;
  24826. default:
  24827. currentDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  24828. break;
  24829. }
  24830. reactData.currentDate = currentDate;
  24831. $xeDatePanel.dateMonthHandle(currentDate, 0);
  24832. },
  24833. dateToggleYearTypeEvent: function dateToggleYearTypeEvent() {
  24834. var $xeDatePanel = this;
  24835. var reactData = $xeDatePanel.reactData;
  24836. reactData.datePanelType = 'year';
  24837. },
  24838. dateToggleMonthTypeEvent: function dateToggleMonthTypeEvent() {
  24839. var $xeDatePanel = this;
  24840. var reactData = $xeDatePanel.reactData;
  24841. var datePanelType = reactData.datePanelType;
  24842. if (datePanelType === 'month' || datePanelType === 'quarter') {
  24843. datePanelType = 'year';
  24844. } else {
  24845. datePanelType = 'month';
  24846. }
  24847. reactData.datePanelType = datePanelType;
  24848. },
  24849. datePrevEvent: function datePrevEvent(evnt) {
  24850. var $xeDatePanel = this;
  24851. var props = $xeDatePanel;
  24852. var reactData = $xeDatePanel.reactData;
  24853. var internalData = $xeDatePanel.internalData;
  24854. var type = props.type;
  24855. var datePanelType = reactData.datePanelType,
  24856. selectMonth = reactData.selectMonth,
  24857. inputLabel = reactData.inputLabel;
  24858. var yearSize = internalData.yearSize;
  24859. var value = inputLabel;
  24860. var isDisabledPrevDateBtn = $xeDatePanel.computeIsDisabledPrevDateBtn;
  24861. if (!isDisabledPrevDateBtn) {
  24862. var viewDate;
  24863. if (type === 'year') {
  24864. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  24865. } else if (type === 'month' || type === 'quarter') {
  24866. if (datePanelType === 'year') {
  24867. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  24868. } else {
  24869. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -1, 'first');
  24870. }
  24871. } else {
  24872. if (datePanelType === 'year') {
  24873. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -yearSize, 'first');
  24874. } else if (datePanelType === 'month') {
  24875. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, -1, 'first');
  24876. } else {
  24877. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, -1, 'first');
  24878. }
  24879. }
  24880. reactData.selectMonth = viewDate;
  24881. $xeDatePanel.dispatchEvent('date-prev', {
  24882. viewType: datePanelType,
  24883. viewDate: viewDate,
  24884. value: value,
  24885. type: type
  24886. }, evnt);
  24887. }
  24888. },
  24889. dateTodayMonthEvent: function dateTodayMonthEvent(evnt) {
  24890. var $xeDatePanel = this;
  24891. var props = $xeDatePanel;
  24892. var reactData = $xeDatePanel.reactData;
  24893. $xeDatePanel.dateNowHandle();
  24894. $xeDatePanel.dateChange(reactData.currentDate, true);
  24895. if (!props.multiple) {
  24896. $xeDatePanel.hidePanel();
  24897. }
  24898. $xeDatePanel.dispatchEvent('date-today', {
  24899. type: props.type
  24900. }, evnt);
  24901. },
  24902. dateNextEvent: function dateNextEvent(evnt) {
  24903. var $xeDatePanel = this;
  24904. var props = $xeDatePanel;
  24905. var reactData = $xeDatePanel.reactData;
  24906. var internalData = $xeDatePanel.internalData;
  24907. var type = props.type;
  24908. var datePanelType = reactData.datePanelType,
  24909. selectMonth = reactData.selectMonth,
  24910. inputLabel = reactData.inputLabel;
  24911. var yearSize = internalData.yearSize;
  24912. var value = inputLabel;
  24913. var isDisabledNextDateBtn = $xeDatePanel.computeIsDisabledNextDateBtn;
  24914. if (!isDisabledNextDateBtn) {
  24915. var viewDate;
  24916. if (type === 'year') {
  24917. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  24918. } else if (type === 'month' || type === 'quarter') {
  24919. if (datePanelType === 'year') {
  24920. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  24921. } else {
  24922. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 1, 'first');
  24923. }
  24924. } else {
  24925. if (datePanelType === 'year') {
  24926. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, yearSize, 'first');
  24927. } else if (datePanelType === 'month') {
  24928. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatYear(selectMonth, 1, 'first');
  24929. } else {
  24930. viewDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, 1, 'first');
  24931. }
  24932. }
  24933. reactData.selectMonth = viewDate;
  24934. $xeDatePanel.dispatchEvent('date-next', {
  24935. viewType: datePanelType,
  24936. value: value,
  24937. type: type
  24938. }, evnt);
  24939. }
  24940. },
  24941. isRangeDisabled: function isRangeDisabled(item) {
  24942. var $xeDatePanel = this;
  24943. var dateStartTime = $xeDatePanel.computeDateStartTime;
  24944. var dateEndTime = $xeDatePanel.computeDateEndTime;
  24945. var date = item.date;
  24946. if (dateStartTime && dateStartTime.getTime() > date.getTime()) {
  24947. return true;
  24948. }
  24949. if (dateEndTime && dateEndTime.getTime() < date.getTime()) {
  24950. return true;
  24951. }
  24952. return false;
  24953. },
  24954. isDateDisabled: function isDateDisabled(item) {
  24955. var $xeDatePanel = this;
  24956. var props = $xeDatePanel;
  24957. var reactData = $xeDatePanel.reactData;
  24958. var disabledMethod = props.disabledMethod;
  24959. var datePanelType = reactData.datePanelType;
  24960. var date = item.date;
  24961. if (disabledMethod) {
  24962. return disabledMethod({
  24963. type: datePanelType,
  24964. viewType: datePanelType,
  24965. date: date,
  24966. $datePanel: $xeDatePanel
  24967. });
  24968. }
  24969. return false;
  24970. },
  24971. hasAllDisabled: function hasAllDisabled(item) {
  24972. var $xeDatePanel = this;
  24973. return $xeDatePanel.isRangeDisabled(item) || $xeDatePanel.isDateDisabled(item);
  24974. },
  24975. dateSelectItem: function dateSelectItem(date) {
  24976. var $xeDatePanel = this;
  24977. var props = $xeDatePanel;
  24978. var reactData = $xeDatePanel.reactData;
  24979. var type = props.type,
  24980. multiple = props.multiple;
  24981. var datePanelType = reactData.datePanelType;
  24982. if (type === 'month') {
  24983. if (datePanelType === 'year') {
  24984. reactData.datePanelType = 'month';
  24985. $xeDatePanel.dateCheckMonth(date);
  24986. } else {
  24987. $xeDatePanel.dateChange(date);
  24988. if (!multiple) {
  24989. $xeDatePanel.hidePanel();
  24990. }
  24991. }
  24992. } else if (type === 'year') {
  24993. $xeDatePanel.dateChange(date);
  24994. if (!multiple) {
  24995. $xeDatePanel.hidePanel();
  24996. }
  24997. } else if (type === 'quarter') {
  24998. if (datePanelType === 'year') {
  24999. reactData.datePanelType = 'quarter';
  25000. $xeDatePanel.dateCheckMonth(date);
  25001. } else {
  25002. $xeDatePanel.dateChange(date);
  25003. if (!multiple) {
  25004. $xeDatePanel.hidePanel();
  25005. }
  25006. }
  25007. } else {
  25008. if (datePanelType === 'month') {
  25009. reactData.datePanelType = type === 'week' ? type : 'day';
  25010. $xeDatePanel.dateCheckMonth(date);
  25011. } else if (datePanelType === 'year') {
  25012. reactData.datePanelType = 'month';
  25013. $xeDatePanel.dateCheckMonth(date);
  25014. } else {
  25015. $xeDatePanel.dateChange(date);
  25016. if (type === 'datetime') {
  25017. // 日期带时间
  25018. } else {
  25019. if (!multiple) {
  25020. $xeDatePanel.hidePanel();
  25021. }
  25022. }
  25023. }
  25024. }
  25025. },
  25026. dateSelectEvent: function dateSelectEvent(item) {
  25027. var $xeDatePanel = this;
  25028. if (!$xeDatePanel.hasAllDisabled(item)) {
  25029. $xeDatePanel.dateSelectItem(item.date);
  25030. }
  25031. },
  25032. dateMoveDay: function dateMoveDay(offsetDay) {
  25033. var $xeDatePanel = this;
  25034. if (!$xeDatePanel.hasAllDisabled({
  25035. date: offsetDay
  25036. })) {
  25037. var dayList = $xeDatePanel.computeDayList;
  25038. if (!dayList.some(function (item) {
  25039. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetDay, 'yyyyMMdd');
  25040. })) {
  25041. $xeDatePanel.dateCheckMonth(offsetDay);
  25042. }
  25043. $xeDatePanel.dateParseValue(offsetDay);
  25044. }
  25045. },
  25046. dateMoveYear: function dateMoveYear(offsetYear) {
  25047. var $xeDatePanel = this;
  25048. if (!$xeDatePanel.hasAllDisabled({
  25049. date: offsetYear
  25050. })) {
  25051. var yearList = $xeDatePanel.computeYearList;
  25052. if (!yearList.some(function (item) {
  25053. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetYear, 'yyyy');
  25054. })) {
  25055. $xeDatePanel.dateCheckMonth(offsetYear);
  25056. }
  25057. $xeDatePanel.dateParseValue(offsetYear);
  25058. }
  25059. },
  25060. dateMoveQuarter: function dateMoveQuarter(offsetQuarter) {
  25061. var $xeDatePanel = this;
  25062. if (!$xeDatePanel.hasAllDisabled({
  25063. date: offsetQuarter
  25064. })) {
  25065. var quarterList = $xeDatePanel.computeQuarterList;
  25066. if (!quarterList.some(function (item) {
  25067. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetQuarter, 'yyyyq');
  25068. })) {
  25069. $xeDatePanel.dateCheckMonth(offsetQuarter);
  25070. }
  25071. $xeDatePanel.dateParseValue(offsetQuarter);
  25072. }
  25073. },
  25074. dateMoveMonth: function dateMoveMonth(offsetMonth) {
  25075. var $xeDatePanel = this;
  25076. if (!$xeDatePanel.hasAllDisabled({
  25077. date: offsetMonth
  25078. })) {
  25079. var monthList = $xeDatePanel.computeMonthList;
  25080. if (!monthList.some(function (item) {
  25081. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(item.date, offsetMonth, 'yyyyMM');
  25082. })) {
  25083. $xeDatePanel.dateCheckMonth(offsetMonth);
  25084. }
  25085. $xeDatePanel.dateParseValue(offsetMonth);
  25086. }
  25087. },
  25088. dateMouseenterEvent: function dateMouseenterEvent(item) {
  25089. var $xeDatePanel = this;
  25090. var reactData = $xeDatePanel.reactData;
  25091. if (!$xeDatePanel.hasAllDisabled(item)) {
  25092. var datePanelType = reactData.datePanelType;
  25093. if (datePanelType === 'month') {
  25094. $xeDatePanel.dateMoveMonth(item.date);
  25095. } else if (datePanelType === 'quarter') {
  25096. $xeDatePanel.dateMoveQuarter(item.date);
  25097. } else if (datePanelType === 'year') {
  25098. $xeDatePanel.dateMoveYear(item.date);
  25099. } else {
  25100. $xeDatePanel.dateMoveDay(item.date);
  25101. }
  25102. }
  25103. },
  25104. dateMouseleaveEvent: function dateMouseleaveEvent() {
  25105. var $xeDatePanel = this;
  25106. var reactData = $xeDatePanel.reactData;
  25107. reactData.datePanelValue = null;
  25108. },
  25109. updateTimePos: function updateTimePos(liElem) {
  25110. if (liElem) {
  25111. var height = liElem.offsetHeight;
  25112. var ulElem = liElem.parentNode;
  25113. ulElem.scrollTop = liElem.offsetTop - height * 4;
  25114. }
  25115. },
  25116. dateTimeChangeEvent: function dateTimeChangeEvent(evnt) {
  25117. var $xeDatePanel = this;
  25118. var reactData = $xeDatePanel.reactData;
  25119. var datetimePanelValue = reactData.datetimePanelValue;
  25120. reactData.datetimePanelValue = datetimePanelValue ? new Date(datetimePanelValue.getTime()) : new Date();
  25121. $xeDatePanel.updateTimePos(evnt.currentTarget);
  25122. },
  25123. dateHourEvent: function dateHourEvent(evnt, item) {
  25124. var $xeDatePanel = this;
  25125. var reactData = $xeDatePanel.reactData;
  25126. var datetimePanelValue = reactData.datetimePanelValue;
  25127. if (datetimePanelValue) {
  25128. datetimePanelValue.setHours(item.value);
  25129. }
  25130. $xeDatePanel.dateTimeChangeEvent(evnt);
  25131. },
  25132. dateConfirmEvent: function dateConfirmEvent(evnt) {
  25133. var $xeDatePanel = this;
  25134. var props = $xeDatePanel;
  25135. var reactData = $xeDatePanel.reactData;
  25136. var multiple = props.multiple;
  25137. var datetimePanelValue = reactData.datetimePanelValue;
  25138. var dateValue = $xeDatePanel.computeDateValue;
  25139. var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
  25140. if (isDateTimeType) {
  25141. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  25142. if (multiple) {
  25143. // 如果为多选
  25144. var dateMultipleValue = $xeDatePanel.computeDateMultipleValue;
  25145. if (isDateTimeType) {
  25146. // 如果是datetime特殊类型
  25147. var dateListValue = _toConsumableArray($xeDatePanel.computeDateListValue);
  25148. var datetimeRest = [];
  25149. dateListValue.forEach(function (item) {
  25150. if (item) {
  25151. if (datetimePanelValue) {
  25152. item.setHours(datetimePanelValue.getHours());
  25153. item.setMinutes(datetimePanelValue.getMinutes());
  25154. item.setSeconds(datetimePanelValue.getSeconds());
  25155. }
  25156. datetimeRest.push(item);
  25157. }
  25158. });
  25159. $xeDatePanel.handleChange(datetimeRest.map(function (date) {
  25160. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toDateString(date, dateValueFormat);
  25161. }).join(','), {
  25162. type: 'update'
  25163. });
  25164. } else {
  25165. // 如果是日期类型
  25166. $xeDatePanel.handleChange(dateMultipleValue.join(','), {
  25167. type: 'update'
  25168. });
  25169. }
  25170. } else {
  25171. $xeDatePanel.dateChange(dateValue || reactData.currentDate);
  25172. }
  25173. }
  25174. $xeDatePanel.hidePanel();
  25175. $xeDatePanel.dispatchEvent('confirm', {}, evnt);
  25176. },
  25177. dateMinuteEvent: function dateMinuteEvent(evnt, item) {
  25178. var $xeDatePanel = this;
  25179. var reactData = $xeDatePanel.reactData;
  25180. var datetimePanelValue = reactData.datetimePanelValue;
  25181. if (datetimePanelValue) {
  25182. datetimePanelValue.setMinutes(item.value);
  25183. }
  25184. $xeDatePanel.dateTimeChangeEvent(evnt);
  25185. },
  25186. dateSecondEvent: function dateSecondEvent(evnt, item) {
  25187. var $xeDatePanel = this;
  25188. var reactData = $xeDatePanel.reactData;
  25189. var datetimePanelValue = reactData.datetimePanelValue;
  25190. if (datetimePanelValue) {
  25191. datetimePanelValue.setSeconds(item.value);
  25192. }
  25193. $xeDatePanel.dateTimeChangeEvent(evnt);
  25194. },
  25195. dateOpenPanel: function dateOpenPanel() {
  25196. var $xeDatePanel = this;
  25197. var props = $xeDatePanel;
  25198. var reactData = $xeDatePanel.reactData;
  25199. var type = props.type,
  25200. defaultDate = props.defaultDate;
  25201. var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
  25202. var dateValueFormat = $xeDatePanel.computeDateValueFormat;
  25203. var dateValue = $xeDatePanel.computeDateValue;
  25204. if (['year', 'quarter', 'month', 'week'].indexOf(type) > -1) {
  25205. reactData.datePanelType = type;
  25206. } else {
  25207. reactData.datePanelType = 'day';
  25208. }
  25209. reactData.currentDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  25210. if (dateValue) {
  25211. $xeDatePanel.dateMonthHandle(dateValue, 0);
  25212. $xeDatePanel.dateParseValue(dateValue);
  25213. } else {
  25214. if (defaultDate) {
  25215. var defDate = $xeDatePanel.parseDate(defaultDate, dateValueFormat);
  25216. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(defDate)) {
  25217. $xeDatePanel.dateMonthHandle(defDate, 0);
  25218. } else {
  25219. $xeDatePanel.dateNowHandle();
  25220. }
  25221. } else {
  25222. $xeDatePanel.dateNowHandle();
  25223. }
  25224. }
  25225. if (isDateTimeType) {
  25226. reactData.datetimePanelValue = reactData.datePanelValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatDay(Date.now(), 0, 'first');
  25227. $xeDatePanel.$nextTick(function () {
  25228. var timeBodyElem = $xeDatePanel.$refs.refInputTimeBody;
  25229. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(timeBodyElem.querySelectorAll('li.is--selected'), function (elem) {
  25230. $xeDatePanel.updateTimePos(elem);
  25231. });
  25232. });
  25233. }
  25234. },
  25235. getModelValue: function getModelValue() {
  25236. var $xeDatePanel = this;
  25237. var reactData = $xeDatePanel.reactData;
  25238. return reactData.inputValue;
  25239. },
  25240. setPanelDate: function setPanelDate(date) {
  25241. var $xeDatePanel = this;
  25242. if (date) {
  25243. $xeDatePanel.dateCheckMonth(date);
  25244. }
  25245. },
  25246. getPanelDate: function getPanelDate() {
  25247. var $xeDatePanel = this;
  25248. var reactData = $xeDatePanel.reactData;
  25249. return reactData.selectMonth;
  25250. },
  25251. checkValue: function checkValue(value) {
  25252. var $xeDatePanel = this;
  25253. $xeDatePanel.afterCheckValue(value);
  25254. },
  25255. confirmByEvent: function confirmByEvent(evnt) {
  25256. var $xeDatePanel = this;
  25257. $xeDatePanel.dateConfirmEvent(evnt);
  25258. },
  25259. //
  25260. // Render
  25261. //
  25262. renderDateLabel: function renderDateLabel(h, item, label) {
  25263. var $xeDatePanel = this;
  25264. var props = $xeDatePanel;
  25265. var reactData = $xeDatePanel.reactData;
  25266. var festivalMethod = props.festivalMethod;
  25267. var labelVNs = [];
  25268. if (festivalMethod) {
  25269. var datePanelType = reactData.datePanelType;
  25270. var festivalRest = festivalMethod({
  25271. type: datePanelType,
  25272. viewType: datePanelType,
  25273. date: item.date,
  25274. $datePanel: $xeDatePanel
  25275. });
  25276. var festivalItem = festivalRest ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalRest) ? {
  25277. label: festivalRest
  25278. } : festivalRest : {};
  25279. var extraItem = festivalItem.extra ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(festivalItem.extra) ? {
  25280. label: festivalItem.extra
  25281. } : festivalItem.extra : null;
  25282. labelVNs.push(h('div', {
  25283. class: ['vxe-date-panel--label', {
  25284. 'is-notice': festivalItem.notice
  25285. }]
  25286. }, extraItem && extraItem.label ? [h('div', "".concat(label)), h('div', {
  25287. class: ['vxe-date-panel--label--extra', extraItem.important ? 'is-important' : '', extraItem.className],
  25288. style: extraItem.style
  25289. }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(extraItem.label))] : "".concat(label)));
  25290. var festivalLabel = festivalItem.label;
  25291. if (festivalLabel) {
  25292. // 默认最多支持3个节日重叠
  25293. var festivalLabels = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(festivalLabel).split(',');
  25294. labelVNs.push(h('div', {
  25295. class: ['vxe-date-panel--festival', festivalItem.important ? 'is-important' : '', festivalItem.className],
  25296. style: festivalItem.style
  25297. }, [festivalLabels.length > 1 ? h('div', {
  25298. class: ['vxe-date-panel--festival--overlap', "overlap--".concat(festivalLabels.length)]
  25299. }, festivalLabels.map(function (label) {
  25300. return h('div', label.substring(0, 3));
  25301. })) : h('div', {
  25302. class: 'vxe-date-panel--festival--label'
  25303. }, festivalLabels[0].substring(0, 3))]));
  25304. }
  25305. }
  25306. return labelVNs;
  25307. },
  25308. renderDateDayTable: function renderDateDayTable(h) {
  25309. var $xeDatePanel = this;
  25310. var props = $xeDatePanel;
  25311. var reactData = $xeDatePanel.reactData;
  25312. var multiple = props.multiple;
  25313. var datePanelType = reactData.datePanelType,
  25314. datePanelValue = reactData.datePanelValue;
  25315. var dateValue = $xeDatePanel.computeDateValue;
  25316. var dateHeaders = $xeDatePanel.computeDateHeaders;
  25317. var dayDatas = $xeDatePanel.computeDayDatas;
  25318. var dateListValue = $xeDatePanel.computeDateListValue;
  25319. var overCount = $xeDatePanel.computeOverCount;
  25320. var matchFormat = 'yyyyMMdd';
  25321. return [h('div', {
  25322. class: ['vxe-date-panel--view-wrapper', "type--".concat(datePanelType)]
  25323. }, [h('div', {
  25324. class: 'vxe-date-panel--view-header'
  25325. }, [h('div', {
  25326. class: 'vxe-date-panel--view-row'
  25327. }, dateHeaders.map(function (item) {
  25328. return h('div', {
  25329. class: 'vxe-date-panel--view-item',
  25330. style: {
  25331. width: "".concat(100 / dateHeaders.length, "%")
  25332. }
  25333. }, [h('div', {
  25334. class: 'vxe-date-panel--view-item-inner'
  25335. }, [h('div', {
  25336. class: 'vxe-date-panel--view-item-label'
  25337. }, item.label)])]);
  25338. }))]), h('div', {
  25339. class: 'vxe-date-panel--view-body'
  25340. }, dayDatas.map(function (rows) {
  25341. return h('div', {
  25342. class: 'vxe-date-panel--view-row',
  25343. style: {
  25344. height: "".concat(100 / dayDatas.length, "%")
  25345. }
  25346. }, rows.map(function (item) {
  25347. var isSelected = multiple ? dateListValue.some(function (val) {
  25348. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  25349. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
  25350. return h('div', {
  25351. class: ['vxe-date-panel--view-item', {
  25352. 'is--prev': item.isPrev,
  25353. 'is--current': item.isCurrent,
  25354. 'is--now': item.isNow,
  25355. 'is--next': item.isNext,
  25356. 'is--range-disabled': $xeDatePanel.isRangeDisabled(item),
  25357. 'is--disabled': $xeDatePanel.isDateDisabled(item),
  25358. 'is--selected': isSelected,
  25359. 'is--over': overCount && !isSelected,
  25360. 'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  25361. }],
  25362. style: {
  25363. width: "".concat(100 / rows.length, "%")
  25364. },
  25365. on: {
  25366. click: function click() {
  25367. return $xeDatePanel.dateSelectEvent(item);
  25368. },
  25369. mouseenter: function mouseenter() {
  25370. return $xeDatePanel.dateMouseenterEvent(item);
  25371. },
  25372. mouseleave: $xeDatePanel.dateMouseleaveEvent
  25373. }
  25374. }, [h('div', {
  25375. class: 'vxe-date-panel--view-item-inner'
  25376. }, $xeDatePanel.renderDateLabel(h, item, item.label))]);
  25377. }));
  25378. }))])];
  25379. },
  25380. renderDateWeekTable: function renderDateWeekTable(h) {
  25381. var $xeDatePanel = this;
  25382. var props = $xeDatePanel;
  25383. var reactData = $xeDatePanel.reactData;
  25384. var multiple = props.multiple;
  25385. var datePanelType = reactData.datePanelType,
  25386. datePanelValue = reactData.datePanelValue;
  25387. var dateValue = $xeDatePanel.computeDateValue;
  25388. var weekHeaders = $xeDatePanel.computeWeekHeaders;
  25389. var weekDates = $xeDatePanel.computeWeekDates;
  25390. var dateListValue = $xeDatePanel.computeDateListValue;
  25391. var overCount = $xeDatePanel.computeOverCount;
  25392. var matchFormat = 'yyyyMMdd';
  25393. return [h('div', {
  25394. class: ['vxe-date-panel--view-wrapper', "type--".concat(datePanelType)]
  25395. }, [h('div', {
  25396. class: 'vxe-date-panel--view-header'
  25397. }, [h('div', {
  25398. class: 'vxe-date-panel--view-row'
  25399. }, weekHeaders.map(function (item, rIndex) {
  25400. return h('div', {
  25401. class: 'vxe-date-panel--view-item',
  25402. style: {
  25403. width: "".concat(rIndex ? 13 : 9, "%")
  25404. }
  25405. }, [h('div', {
  25406. class: 'vxe-date-panel--view-item-inner'
  25407. }, [h('div', {
  25408. class: 'vxe-date-panel--view-item-label'
  25409. }, item.label)])]);
  25410. }))]), h('div', {
  25411. class: 'vxe-date-panel--view-body'
  25412. }, weekDates.map(function (rows) {
  25413. var isSelected = multiple ? rows.some(function (item) {
  25414. return dateListValue.some(function (val) {
  25415. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  25416. });
  25417. }) : rows.some(function (item) {
  25418. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
  25419. });
  25420. var isHover = rows.some(function (item) {
  25421. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat);
  25422. });
  25423. var isNowWeek = rows.some(function (item) {
  25424. return item.isNow;
  25425. });
  25426. return h('div', {
  25427. class: 'vxe-date-panel--view-row',
  25428. style: {
  25429. height: "".concat(100 / weekDates.length, "%")
  25430. }
  25431. }, rows.map(function (item, rIndex) {
  25432. return h('div', {
  25433. class: ['vxe-date-panel--view-item', {
  25434. 'is--prev': item.isPrev,
  25435. 'is--current': item.isCurrent,
  25436. 'is--now': rIndex ? item.isNow : isNowWeek,
  25437. 'is--next': item.isNext,
  25438. 'is--range-disabled': $xeDatePanel.isRangeDisabled(item),
  25439. 'is--disabled': $xeDatePanel.isDateDisabled(item),
  25440. 'is--selected': isSelected,
  25441. 'is--over': overCount && !isSelected,
  25442. 'is--hover': !overCount && isHover
  25443. }],
  25444. style: {
  25445. width: "".concat(rIndex ? 13 : 9, "%")
  25446. },
  25447. on: {
  25448. click: function click() {
  25449. return $xeDatePanel.dateSelectEvent(item);
  25450. },
  25451. mouseenter: function mouseenter() {
  25452. return $xeDatePanel.dateMouseenterEvent(item);
  25453. },
  25454. mouseleave: $xeDatePanel.dateMouseleaveEvent
  25455. }
  25456. }, [h('div', {
  25457. class: 'vxe-date-panel--view-item-inner'
  25458. }, $xeDatePanel.renderDateLabel(h, item, item.label))]);
  25459. }));
  25460. }))])];
  25461. },
  25462. renderDateMonthTable: function renderDateMonthTable(h) {
  25463. var $xeDatePanel = this;
  25464. var props = $xeDatePanel;
  25465. var reactData = $xeDatePanel.reactData;
  25466. var multiple = props.multiple;
  25467. var datePanelType = reactData.datePanelType,
  25468. datePanelValue = reactData.datePanelValue;
  25469. var dateValue = $xeDatePanel.computeDateValue;
  25470. var monthDatas = $xeDatePanel.computeMonthDatas;
  25471. var dateListValue = $xeDatePanel.computeDateListValue;
  25472. var overCount = $xeDatePanel.computeOverCount;
  25473. var matchFormat = 'yyyyMM';
  25474. return [h('div', {
  25475. class: ['vxe-date-panel--view-wrapper', "type--".concat(datePanelType)]
  25476. }, [h('div', {
  25477. class: 'vxe-date-panel--view-body'
  25478. }, monthDatas.map(function (rows) {
  25479. return h('div', {
  25480. class: 'vxe-date-panel--view-row',
  25481. style: {
  25482. height: "".concat(100 / monthDatas.length, "%")
  25483. }
  25484. }, rows.map(function (item) {
  25485. var isSelected = multiple ? dateListValue.some(function (val) {
  25486. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  25487. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
  25488. return h('div', {
  25489. class: ['vxe-date-panel--view-item', {
  25490. 'is--prev': item.isPrev,
  25491. 'is--current': item.isCurrent,
  25492. 'is--now': item.isNow,
  25493. 'is--next': item.isNext,
  25494. 'is--range-disabled': $xeDatePanel.isRangeDisabled(item),
  25495. 'is--disabled': $xeDatePanel.isDateDisabled(item),
  25496. 'is--selected': isSelected,
  25497. 'is--over': overCount && !isSelected,
  25498. 'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  25499. }],
  25500. style: {
  25501. width: "".concat(100 / rows.length, "%")
  25502. },
  25503. on: {
  25504. click: function click() {
  25505. return $xeDatePanel.dateSelectEvent(item);
  25506. },
  25507. mouseenter: function mouseenter() {
  25508. return $xeDatePanel.dateMouseenterEvent(item);
  25509. },
  25510. mouseleave: $xeDatePanel.dateMouseleaveEvent
  25511. }
  25512. }, [h('div', {
  25513. class: 'vxe-date-panel--view-item-inner'
  25514. }, $xeDatePanel.renderDateLabel(h, item, getI18n("vxe.input.date.months.m".concat(item.month))))]);
  25515. }));
  25516. }))])];
  25517. },
  25518. renderDateQuarterTable: function renderDateQuarterTable(h) {
  25519. var $xeDatePanel = this;
  25520. var props = $xeDatePanel;
  25521. var reactData = $xeDatePanel.reactData;
  25522. var multiple = props.multiple;
  25523. var datePanelType = reactData.datePanelType,
  25524. datePanelValue = reactData.datePanelValue;
  25525. var dateValue = $xeDatePanel.computeDateValue;
  25526. var quarterDatas = $xeDatePanel.computeQuarterDatas;
  25527. var dateListValue = $xeDatePanel.computeDateListValue;
  25528. var overCount = $xeDatePanel.computeOverCount;
  25529. var matchFormat = 'yyyyq';
  25530. return [h('div', {
  25531. class: ['vxe-date-panel--view-wrapper', "type--".concat(datePanelType)]
  25532. }, [h('div', {
  25533. class: 'vxe-date-panel--view-body'
  25534. }, quarterDatas.map(function (rows) {
  25535. return h('div', {
  25536. class: 'vxe-date-panel--view-row',
  25537. style: {
  25538. height: "".concat(100 / quarterDatas.length, "%")
  25539. }
  25540. }, rows.map(function (item) {
  25541. var isSelected = multiple ? dateListValue.some(function (val) {
  25542. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  25543. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
  25544. return h('div', {
  25545. class: ['vxe-date-panel--view-item', {
  25546. 'is--prev': item.isPrev,
  25547. 'is--current': item.isCurrent,
  25548. 'is--now': item.isNow,
  25549. 'is--next': item.isNext,
  25550. 'is--range-disabled': $xeDatePanel.isRangeDisabled(item),
  25551. 'is--disabled': $xeDatePanel.isDateDisabled(item),
  25552. 'is--selected': isSelected,
  25553. 'is--over': overCount && !isSelected,
  25554. 'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  25555. }],
  25556. style: {
  25557. width: "".concat(100 / rows.length, "%")
  25558. },
  25559. on: {
  25560. click: function click() {
  25561. return $xeDatePanel.dateSelectEvent(item);
  25562. },
  25563. mouseenter: function mouseenter() {
  25564. return $xeDatePanel.dateMouseenterEvent(item);
  25565. },
  25566. mouseleave: $xeDatePanel.dateMouseleaveEvent
  25567. }
  25568. }, [h('div', {
  25569. class: 'vxe-date-panel--view-item-inner'
  25570. }, $xeDatePanel.renderDateLabel(h, item, getI18n("vxe.input.date.quarters.q".concat(item.quarter))))]);
  25571. }));
  25572. }))])];
  25573. },
  25574. renderDateYearTable: function renderDateYearTable(h) {
  25575. var $xeDatePanel = this;
  25576. var props = $xeDatePanel;
  25577. var reactData = $xeDatePanel.reactData;
  25578. var multiple = props.multiple;
  25579. var datePanelType = reactData.datePanelType,
  25580. datePanelValue = reactData.datePanelValue;
  25581. var dateValue = $xeDatePanel.computeDateValue;
  25582. var yearDatas = $xeDatePanel.computeYearDatas;
  25583. var dateListValue = $xeDatePanel.computeDateListValue;
  25584. var overCount = $xeDatePanel.computeOverCount;
  25585. var matchFormat = 'yyyy';
  25586. return [h('div', {
  25587. class: ['vxe-date-panel--view-wrapper', "type--".concat(datePanelType)]
  25588. }, [h('div', {
  25589. class: 'vxe-date-panel--view-body'
  25590. }, yearDatas.map(function (rows) {
  25591. return h('div', {
  25592. class: 'vxe-date-panel--view-row',
  25593. style: {
  25594. height: "".concat(100 / yearDatas.length, "%")
  25595. }
  25596. }, rows.map(function (item) {
  25597. var isSelected = multiple ? dateListValue.some(function (val) {
  25598. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat);
  25599. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
  25600. return h('div', {
  25601. class: ['vxe-date-panel--view-item', {
  25602. 'is--prev': item.isPrev,
  25603. 'is--current': item.isCurrent,
  25604. 'is--now': item.isNow,
  25605. 'is--next': item.isNext,
  25606. 'is--range-disabled': $xeDatePanel.isRangeDisabled(item),
  25607. 'is--disabled': $xeDatePanel.isDateDisabled(item),
  25608. 'is--selected': isSelected,
  25609. 'is--over': overCount && !isSelected,
  25610. 'is--hover': !overCount && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(datePanelValue, item.date, matchFormat)
  25611. }],
  25612. style: {
  25613. width: "".concat(100 / rows.length, "%")
  25614. },
  25615. on: {
  25616. click: function click() {
  25617. return $xeDatePanel.dateSelectEvent(item);
  25618. },
  25619. mouseenter: function mouseenter() {
  25620. return $xeDatePanel.dateMouseenterEvent(item);
  25621. },
  25622. mouseleave: $xeDatePanel.dateMouseleaveEvent
  25623. }
  25624. }, [h('div', {
  25625. class: 'vxe-date-panel--view-item-inner'
  25626. }, $xeDatePanel.renderDateLabel(h, item, item.year))]);
  25627. }));
  25628. }))])];
  25629. },
  25630. renderDateTable: function renderDateTable(h) {
  25631. var $xeDatePanel = this;
  25632. var reactData = $xeDatePanel.reactData;
  25633. var datePanelType = reactData.datePanelType;
  25634. switch (datePanelType) {
  25635. case 'week':
  25636. return $xeDatePanel.renderDateWeekTable(h);
  25637. case 'month':
  25638. return $xeDatePanel.renderDateMonthTable(h);
  25639. case 'quarter':
  25640. return $xeDatePanel.renderDateQuarterTable(h);
  25641. case 'year':
  25642. return $xeDatePanel.renderDateYearTable(h);
  25643. }
  25644. return $xeDatePanel.renderDateDayTable(h);
  25645. },
  25646. renderDatePanel: function renderDatePanel(h) {
  25647. var $xeDatePanel = this;
  25648. var reactData = $xeDatePanel.reactData;
  25649. var datePanelType = reactData.datePanelType;
  25650. var isDisabledPrevDateBtn = $xeDatePanel.computeIsDisabledPrevDateBtn;
  25651. var isDisabledNextDateBtn = $xeDatePanel.computeIsDisabledNextDateBtn;
  25652. var selectDatePanelObj = $xeDatePanel.computeSelectDatePanelObj;
  25653. return [h('div', {
  25654. class: 'vxe-date-panel--picker-header'
  25655. }, [h('div', {
  25656. class: 'vxe-date-panel--picker-type-wrapper'
  25657. }, [datePanelType === 'year' ? h('span', {
  25658. class: 'vxe-date-panel--picker-label'
  25659. }, selectDatePanelObj.y) : h('span', {
  25660. class: 'vxe-date-panel--picker-btns'
  25661. }, [h('span', {
  25662. class: 'vxe-date-panel--picker-btn',
  25663. on: {
  25664. click: $xeDatePanel.dateToggleYearTypeEvent
  25665. }
  25666. }, selectDatePanelObj.y), selectDatePanelObj.m ? h('span', {
  25667. class: 'vxe-date-panel--picker-btn',
  25668. on: {
  25669. click: $xeDatePanel.dateToggleMonthTypeEvent
  25670. }
  25671. }, selectDatePanelObj.m) : renderEmptyElement($xeDatePanel)])]), h('div', {
  25672. class: 'vxe-date-panel--picker-btn-wrapper'
  25673. }, [h('span', {
  25674. class: ['vxe-date-panel--picker-btn vxe-date-panel--picker-prev-btn', {
  25675. 'is--disabled': isDisabledPrevDateBtn
  25676. }],
  25677. on: {
  25678. click: $xeDatePanel.datePrevEvent
  25679. }
  25680. }, [h('i', {
  25681. class: 'vxe-icon-caret-left'
  25682. })]), h('span', {
  25683. class: 'vxe-date-panel--picker-btn vxe-date-panel--picker-current-btn',
  25684. on: {
  25685. click: $xeDatePanel.dateTodayMonthEvent
  25686. }
  25687. }, [h('i', {
  25688. class: 'vxe-icon-dot'
  25689. })]), h('span', {
  25690. class: ['vxe-date-panel--picker-btn vxe-date-panel--picker-next-btn', {
  25691. 'is--disabled': isDisabledNextDateBtn
  25692. }],
  25693. on: {
  25694. click: $xeDatePanel.dateNextEvent
  25695. }
  25696. }, [h('i', {
  25697. class: 'vxe-icon-caret-right'
  25698. })])])]), h('div', {
  25699. class: 'vxe-date-panel--picker-body'
  25700. }, $xeDatePanel.renderDateTable(h))];
  25701. },
  25702. renderTimePanel: function renderTimePanel(h) {
  25703. var $xeDatePanel = this;
  25704. var props = $xeDatePanel;
  25705. var reactData = $xeDatePanel.reactData;
  25706. var type = props.type;
  25707. var datetimePanelValue = reactData.datetimePanelValue;
  25708. var dateTimeLabel = $xeDatePanel.computeDateTimeLabel;
  25709. var hourList = $xeDatePanel.computeHourList;
  25710. var hasTimeMinute = $xeDatePanel.computeHasTimeMinute;
  25711. var minuteList = $xeDatePanel.computeMinuteList;
  25712. var hasTimeSecond = $xeDatePanel.computeHasTimeSecond;
  25713. var secondList = $xeDatePanel.computeSecondList;
  25714. return [type === 'time' ? renderEmptyElement($xeDatePanel) : h('div', {
  25715. class: 'vxe-date-panel--time-header'
  25716. }, [h('div', {
  25717. class: 'vxe-date-panel--time-title'
  25718. }, dateTimeLabel)]), h('div', {
  25719. ref: 'refInputTimeBody',
  25720. class: 'vxe-date-panel--time-body'
  25721. }, [h('ul', {
  25722. class: 'vxe-date-panel--time-hour-list'
  25723. }, hourList.map(function (item, index) {
  25724. return h('li', {
  25725. key: index,
  25726. class: {
  25727. 'is--selected': datetimePanelValue && datetimePanelValue.getHours() === item.value
  25728. },
  25729. on: {
  25730. click: function click(evnt) {
  25731. return $xeDatePanel.dateHourEvent(evnt, item);
  25732. }
  25733. }
  25734. }, item.label);
  25735. })), hasTimeMinute ? h('ul', {
  25736. class: 'vxe-date-panel--time-minute-list'
  25737. }, minuteList.map(function (item, index) {
  25738. return h('li', {
  25739. key: index,
  25740. class: {
  25741. 'is--selected': datetimePanelValue && datetimePanelValue.getMinutes() === item.value
  25742. },
  25743. on: {
  25744. click: function click(evnt) {
  25745. return $xeDatePanel.dateMinuteEvent(evnt, item);
  25746. }
  25747. }
  25748. }, item.label);
  25749. })) : renderEmptyElement($xeDatePanel), hasTimeMinute && hasTimeSecond ? h('ul', {
  25750. class: 'vxe-date-panel--time-second-list'
  25751. }, secondList.map(function (item, index) {
  25752. return h('li', {
  25753. key: index,
  25754. class: {
  25755. 'is--selected': datetimePanelValue && datetimePanelValue.getSeconds() === item.value
  25756. },
  25757. on: {
  25758. click: function click(evnt) {
  25759. return $xeDatePanel.dateSecondEvent(evnt, item);
  25760. }
  25761. }
  25762. }, item.label);
  25763. })) : renderEmptyElement($xeDatePanel)])];
  25764. },
  25765. renderPickerPanel: function renderPickerPanel(h) {
  25766. var $xeDatePanel = this;
  25767. var props = $xeDatePanel;
  25768. var type = props.type;
  25769. if (type === 'datetime') {
  25770. return h('div', {
  25771. key: type,
  25772. ref: 'refPanelWrapper',
  25773. class: 'vxe-date-panel--time-layout-wrapper'
  25774. }, [h('div', {
  25775. class: 'vxe-date-panel--time-left-wrapper'
  25776. }, $xeDatePanel.renderDatePanel(h)), h('div', {
  25777. class: 'vxe-date-panel--time-right-wrapper'
  25778. }, $xeDatePanel.renderTimePanel(h))]);
  25779. } else if (type === 'time') {
  25780. return h('div', {
  25781. key: type,
  25782. ref: 'refPanelWrapper',
  25783. class: 'vxe-date-panel--wrapper'
  25784. }, $xeDatePanel.renderTimePanel(h));
  25785. }
  25786. return h('div', {
  25787. key: type || 'default',
  25788. ref: 'refPanelWrapper',
  25789. class: 'vxe-date-panel--wrapper'
  25790. }, $xeDatePanel.renderDatePanel(h));
  25791. },
  25792. renderVN: function renderVN(h) {
  25793. var $xeDatePanel = this;
  25794. var props = $xeDatePanel;
  25795. var type = props.type;
  25796. var vSize = $xeDatePanel.computeSize;
  25797. return h('div', {
  25798. class: ['vxe-date-panel', "type--".concat(type), _defineProperty({}, "size--".concat(vSize), vSize)]
  25799. }, [$xeDatePanel.renderPickerPanel(h)]);
  25800. }
  25801. },
  25802. watch: {
  25803. value: function value(val) {
  25804. var $xeDatePanel = this;
  25805. $xeDatePanel.updateModelValue(val);
  25806. $xeDatePanel.changeValue();
  25807. },
  25808. type: function type() {
  25809. var $xeDatePanel = this;
  25810. var reactData = $xeDatePanel.reactData;
  25811. // 切换类型是重置内置变量
  25812. Object.assign(reactData, {
  25813. inputLabel: '',
  25814. datetimePanelValue: null,
  25815. datePanelValue: null,
  25816. datePanelLabel: '',
  25817. datePanelType: 'day',
  25818. selectMonth: null,
  25819. currentDate: null
  25820. });
  25821. $xeDatePanel.initValue();
  25822. },
  25823. computeDateLabelFormat: function computeDateLabelFormat() {
  25824. var $xeDatePanel = this;
  25825. var props = $xeDatePanel;
  25826. var reactData = $xeDatePanel.reactData;
  25827. var isDatePanelType = $xeDatePanel.computeIsDatePanelType;
  25828. if (isDatePanelType) {
  25829. $xeDatePanel.dateParseValue(reactData.datePanelValue);
  25830. reactData.inputLabel = props.multiple ? $xeDatePanel.computeDateMultipleLabel : reactData.datePanelLabel;
  25831. }
  25832. }
  25833. },
  25834. created: function created() {
  25835. var $xeDatePanel = this;
  25836. $xeDatePanel.initValue();
  25837. $xeDatePanel.dateOpenPanel();
  25838. },
  25839. render: function render(h) {
  25840. return this.renderVN(h);
  25841. }
  25842. })); /* define-vxe-component end */
  25843. ;// CONCATENATED MODULE: ./packages/date-panel/index.ts
  25844. var VxeDatePanel = Object.assign({}, date_panel, {
  25845. install: function install(app) {
  25846. app.component(date_panel.name, date_panel);
  25847. }
  25848. });
  25849. dynamicApp.use(VxeDatePanel);
  25850. index_esm_VxeUI.component(date_panel);
  25851. var DatePanel = VxeDatePanel;
  25852. /* harmony default export */ var packages_date_panel = (VxeDatePanel);
  25853. ;// CONCATENATED MODULE: ./packages/date-picker/src/date-picker.ts
  25854. /* harmony default export */ var date_picker = (/* define-vxe-component start */defineVxeComponent({
  25855. name: 'VxeDatePicker',
  25856. mixins: [globalMixins.sizeMixin],
  25857. model: {
  25858. prop: 'value',
  25859. event: 'modelValue'
  25860. },
  25861. props: {
  25862. value: [String, Number, Date],
  25863. immediate: {
  25864. type: Boolean,
  25865. default: true
  25866. },
  25867. name: String,
  25868. type: {
  25869. type: String,
  25870. default: 'date'
  25871. },
  25872. clearable: {
  25873. type: Boolean,
  25874. default: function _default() {
  25875. return getConfig().datePicker.clearable;
  25876. }
  25877. },
  25878. readonly: {
  25879. type: Boolean,
  25880. default: null
  25881. },
  25882. disabled: {
  25883. type: Boolean,
  25884. default: null
  25885. },
  25886. placeholder: String,
  25887. autoComplete: {
  25888. type: String,
  25889. default: 'off'
  25890. },
  25891. form: String,
  25892. className: String,
  25893. zIndex: Number,
  25894. size: {
  25895. type: String,
  25896. default: function _default() {
  25897. return getConfig().datePicker.size || getConfig().size;
  25898. }
  25899. },
  25900. multiple: Boolean,
  25901. limitCount: {
  25902. type: [String, Number],
  25903. default: function _default() {
  25904. return getConfig().datePicker.limitCount;
  25905. }
  25906. },
  25907. // date、week、month、quarter、year
  25908. startDate: {
  25909. type: [String, Number, Date],
  25910. default: function _default() {
  25911. return getConfig().datePicker.startDate;
  25912. }
  25913. },
  25914. endDate: {
  25915. type: [String, Number, Date],
  25916. default: function _default() {
  25917. return getConfig().datePicker.endDate;
  25918. }
  25919. },
  25920. defaultDate: [String, Number, Date],
  25921. minDate: [String, Number, Date],
  25922. maxDate: [String, Number, Date],
  25923. startDay: {
  25924. type: [String, Number],
  25925. default: function _default() {
  25926. return getConfig().datePicker.startDay;
  25927. }
  25928. },
  25929. labelFormat: String,
  25930. valueFormat: String,
  25931. timeFormat: String,
  25932. editable: {
  25933. type: Boolean,
  25934. default: true
  25935. },
  25936. festivalMethod: {
  25937. type: Function,
  25938. default: function _default() {
  25939. return getConfig().datePicker.festivalMethod;
  25940. }
  25941. },
  25942. disabledMethod: {
  25943. type: Function,
  25944. default: function _default() {
  25945. return getConfig().datePicker.disabledMethod;
  25946. }
  25947. },
  25948. // week
  25949. selectDay: {
  25950. type: [String, Number],
  25951. default: function _default() {
  25952. return getConfig().datePicker.selectDay;
  25953. }
  25954. },
  25955. showClearButton: {
  25956. type: Boolean,
  25957. default: function _default() {
  25958. return getConfig().datePicker.showClearButton;
  25959. }
  25960. },
  25961. showConfirmButton: {
  25962. type: Boolean,
  25963. default: function _default() {
  25964. return getConfig().datePicker.showConfirmButton;
  25965. }
  25966. },
  25967. autoClose: {
  25968. type: Boolean,
  25969. default: function _default() {
  25970. return getConfig().datePicker.autoClose;
  25971. }
  25972. },
  25973. prefixIcon: String,
  25974. suffixIcon: String,
  25975. placement: String,
  25976. transfer: {
  25977. type: Boolean,
  25978. default: null
  25979. },
  25980. shortcutConfig: Object,
  25981. // 已废弃 startWeek,被 startDay 替换
  25982. startWeek: Number
  25983. },
  25984. inject: {
  25985. $xeModal: {
  25986. default: null
  25987. },
  25988. $xeDrawer: {
  25989. default: null
  25990. },
  25991. $xeTable: {
  25992. default: null
  25993. },
  25994. $xeForm: {
  25995. default: null
  25996. },
  25997. formItemInfo: {
  25998. from: 'xeFormItemInfo',
  25999. default: null
  26000. }
  26001. },
  26002. provide: function provide() {
  26003. var $xeDatePicker = this;
  26004. return {
  26005. $xeDatePicker: $xeDatePicker
  26006. };
  26007. },
  26008. data: function data() {
  26009. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  26010. var reactData = {
  26011. initialized: false,
  26012. panelIndex: 0,
  26013. visiblePanel: false,
  26014. isAniVisible: false,
  26015. panelStyle: {},
  26016. panelPlacement: '',
  26017. isActivated: false,
  26018. inputValue: '',
  26019. inputLabel: ''
  26020. };
  26021. var internalData = {
  26022. hpTimeout: undefined
  26023. };
  26024. return {
  26025. xID: xID,
  26026. reactData: reactData,
  26027. internalData: internalData
  26028. };
  26029. },
  26030. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  26031. computeBtnTransfer: function computeBtnTransfer() {
  26032. var $xeDatePicker = this;
  26033. var props = $xeDatePicker;
  26034. var $xeTable = $xeDatePicker.$xeTable;
  26035. var $xeModal = $xeDatePicker.$xeModal;
  26036. var $xeDrawer = $xeDatePicker.$xeDrawer;
  26037. var $xeForm = $xeDatePicker.$xeForm;
  26038. var transfer = props.transfer;
  26039. if (transfer === null) {
  26040. var globalTransfer = getConfig().datePicker.transfer;
  26041. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  26042. return globalTransfer;
  26043. }
  26044. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  26045. return true;
  26046. }
  26047. }
  26048. return transfer;
  26049. },
  26050. computeFormReadonly: function computeFormReadonly() {
  26051. var $xeDatePicker = this;
  26052. var props = $xeDatePicker;
  26053. var $xeForm = $xeDatePicker.$xeForm;
  26054. var readonly = props.readonly;
  26055. if (readonly === null) {
  26056. if ($xeForm) {
  26057. return $xeForm.readonly;
  26058. }
  26059. return false;
  26060. }
  26061. return readonly;
  26062. },
  26063. computeIsDisabled: function computeIsDisabled() {
  26064. var $xeDatePicker = this;
  26065. var props = $xeDatePicker;
  26066. var $xeForm = $xeDatePicker.$xeForm;
  26067. var disabled = props.disabled;
  26068. if (disabled === null) {
  26069. if ($xeForm) {
  26070. return $xeForm.disabled;
  26071. }
  26072. return false;
  26073. }
  26074. return disabled;
  26075. },
  26076. computeIsDateTimeType: function computeIsDateTimeType() {
  26077. var $xeDatePicker = this;
  26078. var props = $xeDatePicker;
  26079. var type = props.type;
  26080. return type === 'time' || type === 'datetime';
  26081. },
  26082. computeIsDatePickerType: function computeIsDatePickerType() {
  26083. var $xeDatePicker = this;
  26084. var props = $xeDatePicker;
  26085. var isDateTimeType = $xeDatePicker.computeIsDateTimeType;
  26086. return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
  26087. },
  26088. computeIsClearable: function computeIsClearable() {
  26089. var $xeDatePicker = this;
  26090. var props = $xeDatePicker;
  26091. return props.clearable;
  26092. },
  26093. computeInputReadonly: function computeInputReadonly() {
  26094. var $xeDatePicker = this;
  26095. var props = $xeDatePicker;
  26096. var type = props.type,
  26097. editable = props.editable,
  26098. multiple = props.multiple;
  26099. var formReadonly = $xeDatePicker.computeFormReadonly;
  26100. return formReadonly || multiple || !editable || type === 'week' || type === 'quarter';
  26101. },
  26102. computeInpPlaceholder: function computeInpPlaceholder() {
  26103. var $xeDatePicker = this;
  26104. var props = $xeDatePicker;
  26105. var placeholder = props.placeholder;
  26106. if (placeholder) {
  26107. return getFuncText(placeholder);
  26108. }
  26109. var globalPlaceholder = getConfig().datePicker.placeholder;
  26110. if (globalPlaceholder) {
  26111. return getFuncText(globalPlaceholder);
  26112. }
  26113. return getI18n('vxe.base.pleaseSelect');
  26114. },
  26115. computeInpImmediate: function computeInpImmediate() {
  26116. var $xeDatePicker = this;
  26117. var props = $xeDatePicker;
  26118. var immediate = props.immediate;
  26119. return immediate;
  26120. },
  26121. computeShortcutOpts: function computeShortcutOpts() {
  26122. var $xeDatePicker = this;
  26123. var props = $xeDatePicker;
  26124. return Object.assign({}, getConfig().datePicker.shortcutConfig, props.shortcutConfig);
  26125. },
  26126. computeShortcutList: function computeShortcutList() {
  26127. var $xeDatePicker = this;
  26128. var shortcutOpts = $xeDatePicker.computeShortcutOpts;
  26129. var options = shortcutOpts.options;
  26130. if (options) {
  26131. return options.map(function (option, index) {
  26132. return Object.assign({
  26133. name: "".concat(option.name || option.code || index)
  26134. }, option);
  26135. });
  26136. }
  26137. return [];
  26138. },
  26139. computeDateLabelFormat: function computeDateLabelFormat() {
  26140. var $xeDatePicker = this;
  26141. var props = $xeDatePicker;
  26142. var labelFormat = props.labelFormat;
  26143. return labelFormat || getI18n("vxe.input.date.labelFormat.".concat(props.type));
  26144. },
  26145. computeDateValueFormat: function computeDateValueFormat() {
  26146. var $xeDatePicker = this;
  26147. var props = $xeDatePicker;
  26148. var type = props.type,
  26149. valueFormat = props.valueFormat;
  26150. return handleValueFormat(type, valueFormat);
  26151. },
  26152. computeFirstDayOfWeek: function computeFirstDayOfWeek() {
  26153. var $xeDatePicker = this;
  26154. var props = $xeDatePicker;
  26155. var startDay = props.startDay;
  26156. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(startDay);
  26157. },
  26158. computePanelLabel: function computePanelLabel() {
  26159. var $xeDatePicker = this;
  26160. var props = $xeDatePicker;
  26161. var reactData = $xeDatePicker.reactData;
  26162. var type = props.type,
  26163. multiple = props.multiple;
  26164. var inputValue = reactData.inputValue;
  26165. var dateLabelFormat = $xeDatePicker.computeDateLabelFormat;
  26166. var dateValueFormat = $xeDatePicker.computeDateValueFormat;
  26167. var firstDayOfWeek = $xeDatePicker.computeFirstDayOfWeek;
  26168. var vals = inputValue ? multiple ? inputValue.split(',') : [inputValue] : [];
  26169. return vals.map(function (val) {
  26170. var dateObj = parseDateObj(val, type, {
  26171. valueFormat: dateValueFormat,
  26172. labelFormat: dateLabelFormat,
  26173. firstDay: firstDayOfWeek
  26174. });
  26175. return dateObj.label;
  26176. }).join(', ');
  26177. }
  26178. }),
  26179. methods: {
  26180. //
  26181. // Method
  26182. //
  26183. dispatchEvent: function dispatchEvent(type, params, evnt) {
  26184. var $xeDatePicker = this;
  26185. $xeDatePicker.$emit(type, createEvent(evnt, {
  26186. $drawer: $xeDatePicker
  26187. }, params));
  26188. },
  26189. emitModel: function emitModel(value) {
  26190. var $xeDatePicker = this;
  26191. var _events = $xeDatePicker._events;
  26192. if (_events && _events.modelValue) {
  26193. $xeDatePicker.$emit('modelValue', value);
  26194. } else {
  26195. $xeDatePicker.$emit('model-value', value);
  26196. }
  26197. },
  26198. updateModelValue: function updateModelValue() {
  26199. var $xeDatePicker = this;
  26200. var props = $xeDatePicker;
  26201. var reactData = $xeDatePicker.reactData;
  26202. var modelValue = props.value;
  26203. var val = '';
  26204. if (modelValue) {
  26205. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(modelValue) && /^[0-9]{11,15}$/.test("".concat(modelValue))) {
  26206. val = new Date(modelValue);
  26207. } else {
  26208. val = modelValue;
  26209. }
  26210. }
  26211. reactData.inputValue = val;
  26212. },
  26213. triggerEvent: function triggerEvent(evnt) {
  26214. var $xeDatePicker = this;
  26215. var reactData = $xeDatePicker.reactData;
  26216. var inputValue = reactData.inputValue;
  26217. $xeDatePicker.dispatchEvent(evnt.type, {
  26218. value: inputValue
  26219. }, evnt);
  26220. },
  26221. handleChange: function handleChange(value, evnt) {
  26222. var $xeDatePicker = this;
  26223. var props = $xeDatePicker;
  26224. var reactData = $xeDatePicker.reactData;
  26225. var $xeForm = $xeDatePicker.$xeForm;
  26226. var formItemInfo = $xeDatePicker.formItemInfo;
  26227. var type = props.type,
  26228. modelValue = props.value,
  26229. valueFormat = props.valueFormat;
  26230. var dateValueFormat = $xeDatePicker.computeDateValueFormat;
  26231. reactData.inputValue = value;
  26232. if (hasTimestampValueType(valueFormat)) {
  26233. var dateVal = parseDateValue(value, type, {
  26234. valueFormat: dateValueFormat
  26235. });
  26236. var timeNum = dateVal ? dateVal.getTime() : null;
  26237. $xeDatePicker.emitModel(timeNum);
  26238. if (modelValue !== timeNum) {
  26239. $xeDatePicker.dispatchEvent('change', {
  26240. value: timeNum
  26241. }, evnt);
  26242. // 自动更新校验状态
  26243. if ($xeForm && formItemInfo) {
  26244. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, timeNum);
  26245. }
  26246. }
  26247. } else if (hasDateValueType(valueFormat)) {
  26248. var _dateVal = parseDateValue(value, type, {
  26249. valueFormat: dateValueFormat
  26250. });
  26251. $xeDatePicker.emitModel(_dateVal);
  26252. if (modelValue && _dateVal ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(modelValue).getTime() !== _dateVal.getTime() : modelValue !== _dateVal) {
  26253. $xeDatePicker.dispatchEvent('change', {
  26254. value: _dateVal
  26255. }, evnt);
  26256. // 自动更新校验状态
  26257. if ($xeForm && formItemInfo) {
  26258. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, _dateVal);
  26259. }
  26260. }
  26261. } else {
  26262. $xeDatePicker.emitModel(value);
  26263. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue) !== value) {
  26264. $xeDatePicker.dispatchEvent('change', {
  26265. value: value
  26266. }, evnt);
  26267. // 自动更新校验状态
  26268. if ($xeForm && formItemInfo) {
  26269. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  26270. }
  26271. }
  26272. }
  26273. },
  26274. inputEvent: function inputEvent(evnt) {
  26275. var $xeDatePicker = this;
  26276. var reactData = $xeDatePicker.reactData;
  26277. var inputElem = evnt.target;
  26278. var value = inputElem.value;
  26279. reactData.inputLabel = value;
  26280. $xeDatePicker.dispatchEvent('input', {
  26281. value: value
  26282. }, evnt);
  26283. },
  26284. changeEvent: function changeEvent(evnt) {
  26285. var $xeDatePicker = this;
  26286. var inpImmediate = $xeDatePicker.computeInpImmediate;
  26287. if (!inpImmediate) {
  26288. $xeDatePicker.triggerEvent(evnt);
  26289. }
  26290. },
  26291. focusEvent: function focusEvent(evnt) {
  26292. var $xeDatePicker = this;
  26293. var reactData = $xeDatePicker.reactData;
  26294. reactData.isActivated = true;
  26295. var isDatePickerType = $xeDatePicker.computeIsDatePickerType;
  26296. if (isDatePickerType) {
  26297. $xeDatePicker.datePickerOpenEvent(evnt);
  26298. }
  26299. $xeDatePicker.triggerEvent(evnt);
  26300. },
  26301. clickPrefixEvent: function clickPrefixEvent(evnt) {
  26302. var $xeDatePicker = this;
  26303. var reactData = $xeDatePicker.reactData;
  26304. var isDisabled = $xeDatePicker.computeIsDisabled;
  26305. if (!isDisabled) {
  26306. var inputValue = reactData.inputValue;
  26307. $xeDatePicker.dispatchEvent('prefix-click', {
  26308. value: inputValue
  26309. }, evnt);
  26310. }
  26311. },
  26312. hidePanel: function hidePanel() {
  26313. var $xeDatePicker = this;
  26314. var reactData = $xeDatePicker.reactData;
  26315. var internalData = $xeDatePicker.internalData;
  26316. return new Promise(function (resolve) {
  26317. reactData.visiblePanel = false;
  26318. internalData.hpTimeout = setTimeout(function () {
  26319. reactData.isAniVisible = false;
  26320. resolve();
  26321. }, 350);
  26322. });
  26323. },
  26324. clearValueEvent: function clearValueEvent(evnt, value) {
  26325. var $xeDatePicker = this;
  26326. var isDatePickerType = $xeDatePicker.computeIsDatePickerType;
  26327. if (isDatePickerType) {
  26328. $xeDatePicker.hidePanel();
  26329. }
  26330. $xeDatePicker.handleChange('', evnt);
  26331. $xeDatePicker.dispatchEvent('clear', {
  26332. value: value
  26333. }, evnt);
  26334. },
  26335. clickSuffixEvent: function clickSuffixEvent(evnt) {
  26336. var $xeDatePicker = this;
  26337. var reactData = $xeDatePicker.reactData;
  26338. var isDisabled = $xeDatePicker.computeIsDisabled;
  26339. if (!isDisabled) {
  26340. var inputValue = reactData.inputValue;
  26341. $xeDatePicker.dispatchEvent('suffix-click', {
  26342. value: inputValue
  26343. }, evnt);
  26344. }
  26345. },
  26346. blurEvent: function blurEvent(evnt) {
  26347. var $xeDatePicker = this;
  26348. var reactData = $xeDatePicker.reactData;
  26349. var $xeForm = $xeDatePicker.$xeForm;
  26350. var formItemInfo = $xeDatePicker.formItemInfo;
  26351. var $datePanel = $xeDatePicker.$refs.refDatePanel;
  26352. var inputValue = reactData.inputValue;
  26353. var inpImmediate = $xeDatePicker.computeInpImmediate;
  26354. var value = inputValue;
  26355. if (!inpImmediate) {
  26356. $xeDatePicker.handleChange(value, evnt);
  26357. }
  26358. if (!reactData.visiblePanel) {
  26359. reactData.isActivated = false;
  26360. // 未打开面板时才校验
  26361. if ($datePanel) {
  26362. $datePanel.checkValue(reactData.inputLabel);
  26363. }
  26364. }
  26365. $xeDatePicker.dispatchEvent('blur', {
  26366. value: value
  26367. }, evnt);
  26368. // 自动更新校验状态
  26369. if ($xeForm && formItemInfo) {
  26370. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  26371. }
  26372. },
  26373. keydownEvent: function keydownEvent(evnt) {
  26374. var $xeDatePicker = this;
  26375. $xeDatePicker.triggerEvent(evnt);
  26376. },
  26377. keyupEvent: function keyupEvent(evnt) {
  26378. var $xeDatePicker = this;
  26379. $xeDatePicker.triggerEvent(evnt);
  26380. },
  26381. confirmEvent: function confirmEvent(evnt) {
  26382. var $xeDatePicker = this;
  26383. var $datePanel = $xeDatePicker.$refs.refDatePanel;
  26384. if ($datePanel) {
  26385. $datePanel.confirmByEvent(evnt);
  26386. }
  26387. $xeDatePicker.hidePanel();
  26388. },
  26389. panelChangeEvent: function panelChangeEvent(params) {
  26390. var $xeDatePicker = this;
  26391. var props = $xeDatePicker;
  26392. var multiple = props.multiple,
  26393. autoClose = props.autoClose;
  26394. var value = params.value,
  26395. $event = params.$event;
  26396. var isDateTimeType = $xeDatePicker.computeIsDateTimeType;
  26397. $xeDatePicker.handleChange(value, $event);
  26398. if (!multiple && !isDateTimeType) {
  26399. if (autoClose) {
  26400. $xeDatePicker.hidePanel();
  26401. }
  26402. }
  26403. },
  26404. panelConfirmEvent: function panelConfirmEvent(params) {
  26405. var $xeDatePicker = this;
  26406. var $datePanel = $xeDatePicker.$refs.refDatePanel;
  26407. $datePanel.dispatchEvent('confirm', params, params.$event);
  26408. },
  26409. // 全局事件
  26410. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  26411. var $xeDatePicker = this;
  26412. var reactData = $xeDatePicker.reactData;
  26413. var $datePanel = $xeDatePicker.$refs.refDatePanel;
  26414. var visiblePanel = reactData.visiblePanel,
  26415. isActivated = reactData.isActivated;
  26416. var el = $xeDatePicker.$refs.refElem;
  26417. var panelWrapperElem = $xeDatePicker.$refs.refPanelWrapper;
  26418. var isDisabled = $xeDatePicker.computeIsDisabled;
  26419. if (!isDisabled && isActivated) {
  26420. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
  26421. if (!reactData.isActivated) {
  26422. if (visiblePanel) {
  26423. $xeDatePicker.hidePanel();
  26424. if ($datePanel) {
  26425. $datePanel.checkValue(reactData.inputLabel);
  26426. }
  26427. }
  26428. }
  26429. }
  26430. },
  26431. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  26432. var $xeDatePicker = this;
  26433. var reactData = $xeDatePicker.reactData;
  26434. var visiblePanel = reactData.visiblePanel;
  26435. var isDisabled = $xeDatePicker.computeIsDisabled;
  26436. if (!isDisabled) {
  26437. var isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
  26438. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  26439. if (isTab) {
  26440. reactData.isActivated = false;
  26441. }
  26442. if (visiblePanel) {
  26443. if (isEsc || isTab) {
  26444. $xeDatePicker.hidePanel();
  26445. }
  26446. }
  26447. }
  26448. },
  26449. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  26450. var $xeDatePicker = this;
  26451. var reactData = $xeDatePicker.reactData;
  26452. var visiblePanel = reactData.visiblePanel;
  26453. var isDisabled = $xeDatePicker.computeIsDisabled;
  26454. if (!isDisabled) {
  26455. if (visiblePanel) {
  26456. var panelWrapperElem = $xeDatePicker.$refs.refPanelWrapper;
  26457. if (getEventTargetNode(evnt, panelWrapperElem).flag) {
  26458. $xeDatePicker.updatePlacement();
  26459. } else {
  26460. $xeDatePicker.hidePanel();
  26461. }
  26462. }
  26463. }
  26464. },
  26465. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  26466. var $xeDatePicker = this;
  26467. var reactData = $xeDatePicker.reactData;
  26468. var $datePanel = $xeDatePicker.$refs.refDatePanel;
  26469. var isActivated = reactData.isActivated,
  26470. visiblePanel = reactData.visiblePanel;
  26471. if (visiblePanel) {
  26472. $xeDatePicker.hidePanel();
  26473. }
  26474. if (isActivated) {
  26475. reactData.isActivated = false;
  26476. }
  26477. if (visiblePanel || isActivated) {
  26478. if ($datePanel) {
  26479. $datePanel.checkValue(reactData.inputLabel);
  26480. }
  26481. var targetElem = $xeDatePicker.$refs.refInputTarget;
  26482. if (targetElem) {
  26483. targetElem.blur();
  26484. }
  26485. }
  26486. },
  26487. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  26488. var $xeDatePicker = this;
  26489. var reactData = $xeDatePicker.reactData;
  26490. var visiblePanel = reactData.visiblePanel;
  26491. if (visiblePanel) {
  26492. $xeDatePicker.updatePlacement();
  26493. }
  26494. },
  26495. // 弹出面板
  26496. updateZindex: function updateZindex() {
  26497. var $xeDatePicker = this;
  26498. var props = $xeDatePicker;
  26499. var reactData = $xeDatePicker.reactData;
  26500. var zIndex = props.zIndex;
  26501. if (zIndex) {
  26502. reactData.panelIndex = zIndex;
  26503. } else if (reactData.panelIndex < getLastZIndex()) {
  26504. reactData.panelIndex = nextZIndex();
  26505. }
  26506. },
  26507. updatePlacement: function updatePlacement() {
  26508. var $xeDatePicker = this;
  26509. var props = $xeDatePicker;
  26510. var reactData = $xeDatePicker.reactData;
  26511. var placement = props.placement;
  26512. var panelIndex = reactData.panelIndex;
  26513. var targetElem = $xeDatePicker.$refs.refInputTarget;
  26514. var panelElem = $xeDatePicker.$refs.refInputPanel;
  26515. var btnTransfer = $xeDatePicker.computeBtnTransfer;
  26516. var handleStyle = function handleStyle() {
  26517. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  26518. placement: placement,
  26519. teleportTo: btnTransfer
  26520. });
  26521. var panelStyle = Object.assign(ppObj.style, {
  26522. zIndex: panelIndex
  26523. });
  26524. reactData.panelStyle = panelStyle;
  26525. reactData.panelPlacement = ppObj.placement;
  26526. };
  26527. handleStyle();
  26528. return $xeDatePicker.$nextTick().then(handleStyle);
  26529. },
  26530. showPanel: function showPanel() {
  26531. var $xeDatePicker = this;
  26532. var reactData = $xeDatePicker.reactData;
  26533. var internalData = $xeDatePicker.internalData;
  26534. var visiblePanel = reactData.visiblePanel;
  26535. var isDisabled = $xeDatePicker.computeIsDisabled;
  26536. var btnTransfer = $xeDatePicker.computeBtnTransfer;
  26537. var panelElem = $xeDatePicker.$refs.refInputPanel;
  26538. if (!isDisabled && !visiblePanel) {
  26539. if (!reactData.initialized) {
  26540. reactData.initialized = true;
  26541. if (btnTransfer) {
  26542. if (panelElem) {
  26543. document.body.appendChild(panelElem);
  26544. }
  26545. }
  26546. }
  26547. if (internalData.hpTimeout) {
  26548. clearTimeout(internalData.hpTimeout);
  26549. internalData.hpTimeout = undefined;
  26550. }
  26551. reactData.isActivated = true;
  26552. reactData.isAniVisible = true;
  26553. setTimeout(function () {
  26554. reactData.visiblePanel = true;
  26555. }, 10);
  26556. $xeDatePicker.updateZindex();
  26557. return $xeDatePicker.updatePlacement();
  26558. }
  26559. return $xeDatePicker.$nextTick();
  26560. },
  26561. datePickerOpenEvent: function datePickerOpenEvent(evnt) {
  26562. var $xeDatePicker = this;
  26563. var formReadonly = $xeDatePicker.computeFormReadonly;
  26564. if (!formReadonly) {
  26565. evnt.preventDefault();
  26566. $xeDatePicker.showPanel();
  26567. }
  26568. },
  26569. clickEvent: function clickEvent(evnt) {
  26570. var $xeDatePicker = this;
  26571. $xeDatePicker.triggerEvent(evnt);
  26572. },
  26573. handleShortcutEvent: function handleShortcutEvent(_ref) {
  26574. var option = _ref.option,
  26575. $event = _ref.$event;
  26576. var $xeDatePicker = this;
  26577. var props = $xeDatePicker;
  26578. var reactData = $xeDatePicker.reactData;
  26579. var type = props.type;
  26580. var inputValue = reactData.inputValue;
  26581. var shortcutOpts = $xeDatePicker.computeShortcutOpts;
  26582. var autoClose = shortcutOpts.autoClose;
  26583. var code = option.code,
  26584. clickMethod = option.clickMethod;
  26585. var value = inputValue;
  26586. var shortcutParams = {
  26587. $datePicker: $xeDatePicker,
  26588. option: option,
  26589. value: value,
  26590. code: code
  26591. };
  26592. if (!clickMethod && code) {
  26593. var gCommandOpts = commands.get(code);
  26594. var dpCommandMethod = gCommandOpts ? gCommandOpts.datePickerCommandMethod : null;
  26595. if (dpCommandMethod) {
  26596. dpCommandMethod(shortcutParams);
  26597. } else {
  26598. var dateValueFormat = $xeDatePicker.computeDateValueFormat;
  26599. var firstDayOfWeek = $xeDatePicker.computeFirstDayOfWeek;
  26600. switch (code) {
  26601. case 'now':
  26602. case 'prev':
  26603. case 'next':
  26604. case 'minus':
  26605. case 'plus':
  26606. {
  26607. var restObj = getDateByCode(code, value, type, {
  26608. valueFormat: dateValueFormat,
  26609. firstDay: firstDayOfWeek
  26610. });
  26611. value = restObj.value;
  26612. shortcutParams.value = value;
  26613. $xeDatePicker.handleChange(value, $event);
  26614. break;
  26615. }
  26616. default:
  26617. errLog('vxe.error.notCommands', ["[date-picker] ".concat(code)]);
  26618. break;
  26619. }
  26620. }
  26621. } else {
  26622. var optClickMethod = clickMethod || shortcutOpts.clickMethod;
  26623. if (optClickMethod) {
  26624. optClickMethod(shortcutParams);
  26625. }
  26626. }
  26627. if (autoClose) {
  26628. $xeDatePicker.hidePanel();
  26629. }
  26630. $xeDatePicker.dispatchEvent('shortcut-click', shortcutParams, $event);
  26631. },
  26632. setModelValue: function setModelValue(value) {
  26633. var $xeDatePicker = this;
  26634. var reactData = $xeDatePicker.reactData;
  26635. reactData.inputValue = value;
  26636. $xeDatePicker.emitModel(value);
  26637. },
  26638. setModelValueByEvent: function setModelValueByEvent(evnt, value) {
  26639. var $xeDatePicker = this;
  26640. $xeDatePicker.handleChange(value || '', evnt);
  26641. },
  26642. focus: function focus() {
  26643. var $xeDatePicker = this;
  26644. var reactData = $xeDatePicker.reactData;
  26645. var inputElem = $xeDatePicker.$refs.refInputTarget;
  26646. reactData.isActivated = true;
  26647. inputElem.focus();
  26648. return $xeDatePicker.$nextTick();
  26649. },
  26650. blur: function blur() {
  26651. var $xeDatePicker = this;
  26652. var reactData = $xeDatePicker.reactData;
  26653. var inputElem = $xeDatePicker.$refs.refInputTarget;
  26654. inputElem.blur();
  26655. reactData.isActivated = false;
  26656. return $xeDatePicker.$nextTick();
  26657. },
  26658. select: function select() {
  26659. var $xeDatePicker = this;
  26660. var reactData = $xeDatePicker.reactData;
  26661. var inputElem = $xeDatePicker.$refs.refInputTarget;
  26662. inputElem.select();
  26663. reactData.isActivated = false;
  26664. return $xeDatePicker.$nextTick();
  26665. },
  26666. //
  26667. // Render
  26668. //
  26669. renderShortcutBtn: function renderShortcutBtn(h, pos, isVertical) {
  26670. var $xeDatePicker = this;
  26671. var shortcutOpts = $xeDatePicker.computeShortcutOpts;
  26672. var position = shortcutOpts.position,
  26673. align = shortcutOpts.align,
  26674. mode = shortcutOpts.mode;
  26675. var shortcutList = $xeDatePicker.computeShortcutList;
  26676. if (isEnableConf(shortcutOpts) && shortcutList.length && (position || 'left') === pos) {
  26677. return h('div', {
  26678. class: "vxe-date-picker--layout-".concat(pos, "-wrapper")
  26679. }, [h(button_group, {
  26680. props: {
  26681. options: shortcutList,
  26682. mode: mode,
  26683. align: align,
  26684. vertical: isVertical
  26685. },
  26686. on: {
  26687. click: $xeDatePicker.handleShortcutEvent
  26688. }
  26689. })]);
  26690. }
  26691. return renderEmptyElement($xeDatePicker);
  26692. },
  26693. renderPanel: function renderPanel(h) {
  26694. var $xeDatePicker = this;
  26695. var props = $xeDatePicker;
  26696. var slots = $xeDatePicker.$scopedSlots;
  26697. var reactData = $xeDatePicker.reactData;
  26698. var type = props.type,
  26699. multiple = props.multiple,
  26700. showClearButton = props.showClearButton,
  26701. showConfirmButton = props.showConfirmButton;
  26702. var initialized = reactData.initialized,
  26703. isAniVisible = reactData.isAniVisible,
  26704. visiblePanel = reactData.visiblePanel,
  26705. panelPlacement = reactData.panelPlacement,
  26706. panelStyle = reactData.panelStyle,
  26707. inputValue = reactData.inputValue;
  26708. var vSize = $xeDatePicker.computeSize;
  26709. var btnTransfer = $xeDatePicker.computeBtnTransfer;
  26710. var shortcutOpts = $xeDatePicker.computeShortcutOpts;
  26711. var isClearable = $xeDatePicker.computeIsClearable;
  26712. var isDateTimeType = $xeDatePicker.computeIsDateTimeType;
  26713. var shortcutList = $xeDatePicker.computeShortcutList;
  26714. var position = shortcutOpts.position;
  26715. var headerSlot = slots.header;
  26716. var footerSlot = slots.footer;
  26717. var topSlot = slots.top;
  26718. var bottomSlot = slots.bottom;
  26719. var leftSlot = slots.left;
  26720. var rightSlot = slots.right;
  26721. var hasShortcutBtn = shortcutList.length > 0;
  26722. var showConfirmBtn = showConfirmButton === null ? isDateTimeType || multiple : showConfirmButton;
  26723. var showClearBtn = showClearButton === null ? isClearable && showConfirmBtn && type !== 'time' : showClearButton;
  26724. return h('div', {
  26725. ref: 'refInputPanel',
  26726. class: ['vxe-table--ignore-clear vxe-date-picker--panel', "type--".concat(type), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', isAniVisible), 'ani--enter', visiblePanel), 'show--top', !!(topSlot || headerSlot || hasShortcutBtn && (position === 'top' || position === 'header'))), 'show--bottom', !!(bottomSlot || footerSlot || hasShortcutBtn && (position === 'bottom' || position === 'footer'))), 'show--left', !!(leftSlot || hasShortcutBtn && position === 'left')), 'show--right', !!(rightSlot || hasShortcutBtn && position === 'right'))],
  26727. attrs: {
  26728. placement: panelPlacement
  26729. },
  26730. style: panelStyle
  26731. }, initialized && (visiblePanel || isAniVisible) ? [h('div', {
  26732. ref: 'refPanelWrapper',
  26733. class: ['vxe-date-picker--layout-all-wrapper', "type--".concat(type), _defineProperty({}, "size--".concat(vSize), vSize)]
  26734. }, [topSlot ? h('div', {
  26735. class: 'vxe-date-picker--layout-top-wrapper'
  26736. }, topSlot({})) : $xeDatePicker.renderShortcutBtn(h, 'top'), h('div', {
  26737. class: 'vxe-date-picker--layout-body-layout-wrapper'
  26738. }, [leftSlot ? h('div', {
  26739. class: 'vxe-date-picker--layout-left-wrapper'
  26740. }, leftSlot({})) : $xeDatePicker.renderShortcutBtn(h, 'left', true), h('div', {
  26741. class: 'vxe-date-picker--layout-body-content-wrapper'
  26742. }, [headerSlot ? h('div', {
  26743. class: 'vxe-date-picker--layout-header-wrapper'
  26744. }, headerSlot({})) : $xeDatePicker.renderShortcutBtn(h, 'header'), h('div', {
  26745. class: 'vxe-date-picker--layout-body-wrapper'
  26746. }, [h(date_panel, {
  26747. ref: 'refDatePanel',
  26748. props: {
  26749. value: reactData.inputValue,
  26750. type: props.type,
  26751. className: props.className,
  26752. multiple: props.multiple,
  26753. limitCount: props.limitCount,
  26754. startDate: props.startDate,
  26755. endDate: props.endDate,
  26756. defaultDate: props.defaultDate,
  26757. minDate: props.minDate,
  26758. maxDate: props.maxDate,
  26759. startDay: props.startDay,
  26760. labelFormat: props.labelFormat,
  26761. valueFormat: props.valueFormat,
  26762. timeFormat: props.timeFormat,
  26763. festivalMethod: props.festivalMethod,
  26764. disabledMethod: props.disabledMethod,
  26765. selectDay: props.selectDay
  26766. },
  26767. on: {
  26768. change: $xeDatePicker.panelChangeEvent,
  26769. confirm: $xeDatePicker.panelConfirmEvent
  26770. }
  26771. })]), h('div', {
  26772. class: 'vxe-date-picker--layout-footer-wrapper'
  26773. }, [h('div', {
  26774. class: 'vxe-date-picker--layout-footer-custom'
  26775. }, footerSlot ? footerSlot({}) : [$xeDatePicker.renderShortcutBtn(h, 'footer')]), showClearBtn || showConfirmBtn ? h('div', {
  26776. class: 'vxe-date-picker--layout-footer-btns'
  26777. }, [showClearBtn ? h(src_button, {
  26778. props: {
  26779. size: 'mini',
  26780. disabled: inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue),
  26781. content: getI18n('vxe.button.clear')
  26782. },
  26783. on: {
  26784. click: $xeDatePicker.clearValueEvent
  26785. }
  26786. }) : renderEmptyElement($xeDatePicker), showConfirmBtn ? h(src_button, {
  26787. props: {
  26788. size: 'mini',
  26789. status: 'primary',
  26790. content: getI18n('vxe.button.confirm')
  26791. },
  26792. on: {
  26793. click: $xeDatePicker.confirmEvent
  26794. }
  26795. }) : renderEmptyElement($xeDatePicker)]) : renderEmptyElement($xeDatePicker)])]), rightSlot ? h('div', {
  26796. class: 'vxe-date-picker--layout-right-wrapper'
  26797. }, rightSlot({})) : $xeDatePicker.renderShortcutBtn(h, 'right', true)]), bottomSlot ? h('div', {
  26798. class: 'vxe-date-picker--layout-bottom-wrapper'
  26799. }, bottomSlot({})) : $xeDatePicker.renderShortcutBtn(h, 'bottom')])] : []);
  26800. },
  26801. renderPrefixIcon: function renderPrefixIcon(h) {
  26802. var $xeDatePicker = this;
  26803. var props = $xeDatePicker;
  26804. var slots = $xeDatePicker.$scopedSlots;
  26805. var prefixIcon = props.prefixIcon;
  26806. var prefixSlot = slots.prefix;
  26807. return prefixSlot || prefixIcon ? h('div', {
  26808. class: 'vxe-date-picker--prefix',
  26809. on: {
  26810. click: $xeDatePicker.clickPrefixEvent
  26811. }
  26812. }, [h('div', {
  26813. class: 'vxe-date-picker--prefix-icon'
  26814. }, prefixSlot ? vn_getSlotVNs(prefixSlot({})) : [h('i', {
  26815. class: prefixIcon
  26816. })])]) : null;
  26817. },
  26818. renderSuffixIcon: function renderSuffixIcon(h) {
  26819. var $xeDatePicker = this;
  26820. var props = $xeDatePicker;
  26821. var slots = $xeDatePicker.$scopedSlots;
  26822. var reactData = $xeDatePicker.reactData;
  26823. var suffixIcon = props.suffixIcon;
  26824. var inputValue = reactData.inputValue;
  26825. var suffixSlot = slots.suffix;
  26826. var isDisabled = $xeDatePicker.computeIsDisabled;
  26827. var isClearable = $xeDatePicker.computeIsClearable;
  26828. return h('div', {
  26829. class: ['vxe-date-picker--suffix', {
  26830. 'is--clear': isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue))
  26831. }]
  26832. }, [isClearable ? h('div', {
  26833. class: 'vxe-date-picker--clear-icon',
  26834. on: {
  26835. click: $xeDatePicker.clearValueEvent
  26836. }
  26837. }, [h('i', {
  26838. class: getIcon().INPUT_CLEAR
  26839. })]) : renderEmptyElement($xeDatePicker), $xeDatePicker.renderExtraSuffixIcon(h), suffixSlot || suffixIcon ? h('div', {
  26840. class: 'vxe-date-picker--suffix-icon',
  26841. on: {
  26842. click: $xeDatePicker.clickSuffixEvent
  26843. }
  26844. }, suffixSlot ? vn_getSlotVNs(suffixSlot({})) : [h('i', {
  26845. class: suffixIcon
  26846. })]) : renderEmptyElement($xeDatePicker)]);
  26847. },
  26848. renderExtraSuffixIcon: function renderExtraSuffixIcon(h) {
  26849. var $xeDatePicker = this;
  26850. return h('div', {
  26851. class: 'vxe-date-picker--control-icon',
  26852. on: {
  26853. click: $xeDatePicker.datePickerOpenEvent
  26854. }
  26855. }, [h('i', {
  26856. class: ['vxe-date-picker--date-picker-icon', getIcon().DATE_PICKER_DATE]
  26857. })]);
  26858. },
  26859. renderVN: function renderVN(h) {
  26860. var $xeDatePicker = this;
  26861. var props = $xeDatePicker;
  26862. var reactData = $xeDatePicker.reactData;
  26863. var className = props.className,
  26864. type = props.type,
  26865. name = props.name,
  26866. autoComplete = props.autoComplete;
  26867. var inputValue = reactData.inputValue,
  26868. inputLabel = reactData.inputLabel,
  26869. visiblePanel = reactData.visiblePanel,
  26870. isActivated = reactData.isActivated;
  26871. var vSize = $xeDatePicker.computeSize;
  26872. var isDisabled = $xeDatePicker.computeIsDisabled;
  26873. var formReadonly = $xeDatePicker.computeFormReadonly;
  26874. var panelLabel = $xeDatePicker.computePanelLabel;
  26875. if (formReadonly) {
  26876. return h('div', {
  26877. ref: 'refElem',
  26878. class: ['vxe-date-picker--readonly', "type--".concat(type), className]
  26879. }, panelLabel);
  26880. }
  26881. var inputReadonly = $xeDatePicker.computeInputReadonly;
  26882. var inpPlaceholder = $xeDatePicker.computeInpPlaceholder;
  26883. var isClearable = $xeDatePicker.computeIsClearable;
  26884. var prefix = $xeDatePicker.renderPrefixIcon(h);
  26885. var suffix = $xeDatePicker.renderSuffixIcon(h);
  26886. return h('div', {
  26887. ref: 'refElem',
  26888. class: ['vxe-date-picker', "type--".concat(type), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--prefix', !!prefix), 'is--suffix', !!suffix), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--active', isActivated), 'show--clear', isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue)))],
  26889. attrs: {
  26890. spellcheck: false
  26891. }
  26892. }, [prefix || renderEmptyElement($xeDatePicker), h('div', {
  26893. class: 'vxe-date-picker--wrapper'
  26894. }, [h('input', {
  26895. ref: 'refInputTarget',
  26896. class: 'vxe-date-picker--inner',
  26897. domProps: {
  26898. value: inputLabel
  26899. },
  26900. attrs: {
  26901. name: name,
  26902. type: 'text',
  26903. placeholder: inpPlaceholder,
  26904. readonly: inputReadonly,
  26905. disabled: isDisabled,
  26906. autocomplete: autoComplete
  26907. },
  26908. on: {
  26909. keydown: $xeDatePicker.keydownEvent,
  26910. keyup: $xeDatePicker.keyupEvent,
  26911. click: $xeDatePicker.clickEvent,
  26912. input: $xeDatePicker.inputEvent,
  26913. change: $xeDatePicker.changeEvent,
  26914. focus: $xeDatePicker.focusEvent,
  26915. blur: $xeDatePicker.blurEvent
  26916. }
  26917. })]), suffix || renderEmptyElement($xeDatePicker),
  26918. // 下拉面板
  26919. $xeDatePicker.renderPanel(h)]);
  26920. }
  26921. },
  26922. watch: {
  26923. computePanelLabel: function computePanelLabel(val) {
  26924. var $xeDatePicker = this;
  26925. var reactData = $xeDatePicker.reactData;
  26926. reactData.inputLabel = val;
  26927. },
  26928. value: function value() {
  26929. var $xeDatePicker = this;
  26930. $xeDatePicker.updateModelValue();
  26931. }
  26932. },
  26933. created: function created() {
  26934. var $xeDatePicker = this;
  26935. $xeDatePicker.updateModelValue();
  26936. globalEvents.on($xeDatePicker, 'mousewheel', $xeDatePicker.handleGlobalMousewheelEvent);
  26937. globalEvents.on($xeDatePicker, 'mousedown', $xeDatePicker.handleGlobalMousedownEvent);
  26938. globalEvents.on($xeDatePicker, 'keydown', $xeDatePicker.handleGlobalKeydownEvent);
  26939. globalEvents.on($xeDatePicker, 'blur', $xeDatePicker.handleGlobalBlurEvent);
  26940. globalEvents.on($xeDatePicker, 'resize', $xeDatePicker.handleGlobalResizeEvent);
  26941. },
  26942. beforeDestroy: function beforeDestroy() {
  26943. var $xeDatePicker = this;
  26944. var panelElem = $xeDatePicker.$refs.refInputPanel;
  26945. if (panelElem && panelElem.parentNode) {
  26946. panelElem.parentNode.removeChild(panelElem);
  26947. }
  26948. globalEvents.off($xeDatePicker, 'mousewheel');
  26949. globalEvents.off($xeDatePicker, 'mousedown');
  26950. globalEvents.off($xeDatePicker, 'blur');
  26951. globalEvents.off($xeDatePicker, 'resize');
  26952. },
  26953. render: function render(h) {
  26954. return this.renderVN(h);
  26955. }
  26956. })); /* define-vxe-component end */
  26957. ;// CONCATENATED MODULE: ./packages/date-picker/index.ts
  26958. var VxeDatePicker = Object.assign({}, date_picker, {
  26959. install: function install(app) {
  26960. app.component(date_picker.name, date_picker);
  26961. app.component('VxeDateInput', date_picker);
  26962. }
  26963. });
  26964. dynamicApp.use(VxeDatePicker);
  26965. index_esm_VxeUI.component(date_picker);
  26966. var DatePicker = VxeDatePicker;
  26967. /* harmony default export */ var packages_date_picker = (VxeDatePicker);
  26968. ;// CONCATENATED MODULE: ./packages/date-range-picker/src/date-range-picker.ts
  26969. /* harmony default export */ var date_range_picker = (/* define-vxe-component start */defineVxeComponent({
  26970. name: 'VxeDateRangePicker',
  26971. mixins: [globalMixins.sizeMixin],
  26972. model: {
  26973. prop: 'value',
  26974. event: 'modelValue'
  26975. },
  26976. props: {
  26977. value: [String, Number, Date, Array],
  26978. startValue: [String, Number, Date],
  26979. endValue: [String, Number, Date],
  26980. immediate: {
  26981. type: Boolean,
  26982. default: true
  26983. },
  26984. name: String,
  26985. type: {
  26986. type: String,
  26987. default: 'date'
  26988. },
  26989. clearable: {
  26990. type: Boolean,
  26991. default: function _default() {
  26992. return getConfig().dateRangePicker.clearable;
  26993. }
  26994. },
  26995. readonly: {
  26996. type: Boolean,
  26997. default: null
  26998. },
  26999. disabled: {
  27000. type: Boolean,
  27001. default: null
  27002. },
  27003. placeholder: String,
  27004. autoComplete: {
  27005. type: String,
  27006. default: 'off'
  27007. },
  27008. form: String,
  27009. className: String,
  27010. zIndex: Number,
  27011. size: {
  27012. type: String,
  27013. default: function _default() {
  27014. return getConfig().dateRangePicker.size || getConfig().size;
  27015. }
  27016. },
  27017. // startDate: {
  27018. // type: [String, Number, Date] as PropType<VxeDateRangePickerPropTypes.StartDate>,
  27019. // default: () => getConfig().dateRangePicker.startDate
  27020. // },
  27021. // endDate: {
  27022. // type: [String, Number, Date] as PropType<VxeDateRangePickerPropTypes.EndDate>,
  27023. // default: () => getConfig().dateRangePicker.endDate
  27024. // },
  27025. minDate: [String, Number, Date],
  27026. maxDate: [String, Number, Date],
  27027. defaultDate: [String, Number, Date],
  27028. startDay: {
  27029. type: [String, Number],
  27030. default: function _default() {
  27031. return getConfig().dateRangePicker.startDay;
  27032. }
  27033. },
  27034. labelFormat: String,
  27035. valueFormat: String,
  27036. timeFormat: String,
  27037. valueType: String,
  27038. editable: {
  27039. type: Boolean,
  27040. default: true
  27041. },
  27042. festivalMethod: {
  27043. type: Function,
  27044. default: function _default() {
  27045. return getConfig().dateRangePicker.festivalMethod;
  27046. }
  27047. },
  27048. disabledMethod: {
  27049. type: Function,
  27050. default: function _default() {
  27051. return getConfig().dateRangePicker.disabledMethod;
  27052. }
  27053. },
  27054. separator: {
  27055. type: [String, Number],
  27056. default: function _default() {
  27057. return getConfig().dateRangePicker.separator;
  27058. }
  27059. },
  27060. // week
  27061. selectDay: {
  27062. type: [String, Number],
  27063. default: function _default() {
  27064. return getConfig().dateRangePicker.selectDay;
  27065. }
  27066. },
  27067. showClearButton: {
  27068. type: Boolean,
  27069. default: function _default() {
  27070. return getConfig().dateRangePicker.showClearButton;
  27071. }
  27072. },
  27073. showConfirmButton: {
  27074. type: Boolean,
  27075. default: function _default() {
  27076. return getConfig().dateRangePicker.showConfirmButton;
  27077. }
  27078. },
  27079. autoClose: {
  27080. type: Boolean,
  27081. default: function _default() {
  27082. return getConfig().dateRangePicker.autoClose;
  27083. }
  27084. },
  27085. prefixIcon: String,
  27086. suffixIcon: String,
  27087. placement: String,
  27088. transfer: {
  27089. type: Boolean,
  27090. default: null
  27091. },
  27092. shortcutConfig: Object
  27093. },
  27094. inject: {
  27095. $xeModal: {
  27096. default: null
  27097. },
  27098. $xeDrawer: {
  27099. default: null
  27100. },
  27101. $xeTable: {
  27102. default: null
  27103. },
  27104. $xeForm: {
  27105. default: null
  27106. },
  27107. formItemInfo: {
  27108. from: 'xeFormItemInfo',
  27109. default: null
  27110. }
  27111. },
  27112. provide: function provide() {
  27113. var $xeDateRangePicker = this;
  27114. return {
  27115. $xeDateRangePicker: $xeDateRangePicker
  27116. };
  27117. },
  27118. data: function data() {
  27119. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  27120. var reactData = {
  27121. initialized: false,
  27122. panelIndex: 0,
  27123. visiblePanel: false,
  27124. isAniVisible: false,
  27125. panelStyle: {},
  27126. panelPlacement: '',
  27127. isActivated: false,
  27128. startValue: '',
  27129. endValue: ''
  27130. };
  27131. var internalData = {
  27132. // selectStatus: false
  27133. // hpTimeout: undefined
  27134. };
  27135. return {
  27136. xID: xID,
  27137. reactData: reactData,
  27138. internalData: internalData
  27139. };
  27140. },
  27141. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  27142. computeBtnTransfer: function computeBtnTransfer() {
  27143. var $xeDateRangePicker = this;
  27144. var props = $xeDateRangePicker;
  27145. var $xeTable = $xeDateRangePicker.$xeTable;
  27146. var $xeModal = $xeDateRangePicker.$xeModal;
  27147. var $xeDrawer = $xeDateRangePicker.$xeDrawer;
  27148. var $xeForm = $xeDateRangePicker.$xeForm;
  27149. var transfer = props.transfer;
  27150. if (transfer === null) {
  27151. var globalTransfer = getConfig().dateRangePicker.transfer;
  27152. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  27153. return globalTransfer;
  27154. }
  27155. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  27156. return true;
  27157. }
  27158. }
  27159. return transfer;
  27160. },
  27161. computeFormReadonly: function computeFormReadonly() {
  27162. var $xeDateRangePicker = this;
  27163. var props = $xeDateRangePicker;
  27164. var $xeForm = $xeDateRangePicker.$xeForm;
  27165. var readonly = props.readonly;
  27166. if (readonly === null) {
  27167. if ($xeForm) {
  27168. return $xeForm.readonly;
  27169. }
  27170. return false;
  27171. }
  27172. return readonly;
  27173. },
  27174. computeIsDisabled: function computeIsDisabled() {
  27175. var $xeDateRangePicker = this;
  27176. var props = $xeDateRangePicker;
  27177. var $xeForm = $xeDateRangePicker.$xeForm;
  27178. var disabled = props.disabled;
  27179. if (disabled === null) {
  27180. if ($xeForm) {
  27181. return $xeForm.disabled;
  27182. }
  27183. return false;
  27184. }
  27185. return disabled;
  27186. },
  27187. computeMVal: function computeMVal() {
  27188. var $xeDateRangePicker = this;
  27189. var props = $xeDateRangePicker;
  27190. var startValue = props.startValue,
  27191. endValue = props.endValue;
  27192. return "".concat(startValue || '').concat(endValue || '');
  27193. },
  27194. computeIsDateTimeType: function computeIsDateTimeType() {
  27195. var $xeDateRangePicker = this;
  27196. var props = $xeDateRangePicker;
  27197. var type = props.type;
  27198. return type === 'time' || type === 'datetime';
  27199. },
  27200. computeIsDatePickerType: function computeIsDatePickerType() {
  27201. var $xeDateRangePicker = this;
  27202. var props = $xeDateRangePicker;
  27203. return ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
  27204. },
  27205. computeIsClearable: function computeIsClearable() {
  27206. var $xeDateRangePicker = this;
  27207. var props = $xeDateRangePicker;
  27208. return props.clearable;
  27209. },
  27210. computeInpPlaceholder: function computeInpPlaceholder() {
  27211. var $xeDateRangePicker = this;
  27212. var props = $xeDateRangePicker;
  27213. var placeholder = props.placeholder;
  27214. if (placeholder) {
  27215. return getFuncText(placeholder);
  27216. }
  27217. var globalPlaceholder = getConfig().dateRangePicker.placeholder;
  27218. if (globalPlaceholder) {
  27219. return getFuncText(globalPlaceholder);
  27220. }
  27221. return getI18n('vxe.dateRangePicker.pleaseRange');
  27222. },
  27223. computeInpImmediate: function computeInpImmediate() {
  27224. var $xeDateRangePicker = this;
  27225. var props = $xeDateRangePicker;
  27226. var immediate = props.immediate;
  27227. return immediate;
  27228. },
  27229. computeShortcutOpts: function computeShortcutOpts() {
  27230. var $xeDateRangePicker = this;
  27231. var props = $xeDateRangePicker;
  27232. return Object.assign({}, getConfig().dateRangePicker.shortcutConfig, props.shortcutConfig);
  27233. },
  27234. computeShortcutList: function computeShortcutList() {
  27235. var $xeDateRangePicker = this;
  27236. var shortcutOpts = $xeDateRangePicker.computeShortcutOpts;
  27237. var options = shortcutOpts.options;
  27238. if (options) {
  27239. return options.map(function (option, index) {
  27240. return Object.assign({
  27241. name: "".concat(option.name || option.code || index)
  27242. }, option);
  27243. });
  27244. }
  27245. return [];
  27246. },
  27247. computeDateLabelFormat: function computeDateLabelFormat() {
  27248. var $xeDateRangePicker = this;
  27249. var props = $xeDateRangePicker;
  27250. var labelFormat = props.labelFormat;
  27251. return labelFormat || getI18n("vxe.input.date.labelFormat.".concat(props.type));
  27252. },
  27253. computeDateValueFormat: function computeDateValueFormat() {
  27254. var $xeDateRangePicker = this;
  27255. var props = $xeDateRangePicker;
  27256. var type = props.type,
  27257. valueFormat = props.valueFormat;
  27258. return handleValueFormat(type, valueFormat);
  27259. },
  27260. computeFirstDayOfWeek: function computeFirstDayOfWeek() {
  27261. var $xeDateRangePicker = this;
  27262. var props = $xeDateRangePicker;
  27263. var startDay = props.startDay;
  27264. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(startDay);
  27265. },
  27266. computePanelLabelObj: function computePanelLabelObj() {
  27267. var $xeDateRangePicker = this;
  27268. var reactData = $xeDateRangePicker.reactData;
  27269. var startValue = reactData.startValue,
  27270. endValue = reactData.endValue;
  27271. var vals = startValue || endValue ? [startValue || '', endValue || ''] : [];
  27272. return $xeDateRangePicker.formatRangeLabel(vals);
  27273. },
  27274. computeInputLabel: function computeInputLabel() {
  27275. var $xeDateRangePicker = this;
  27276. var panelLabelObj = $xeDateRangePicker.computePanelLabelObj;
  27277. return panelLabelObj.label;
  27278. }
  27279. }),
  27280. methods: {
  27281. //
  27282. // Method
  27283. //
  27284. dispatchEvent: function dispatchEvent(type, params, evnt) {
  27285. var $xeDateRangePicker = this;
  27286. $xeDateRangePicker.$emit(type, createEvent(evnt, {
  27287. $drawer: $xeDateRangePicker
  27288. }, params));
  27289. },
  27290. emitModel: function emitModel(value) {
  27291. var $xeDateRangePicker = this;
  27292. var _events = $xeDateRangePicker._events;
  27293. if (_events && _events.modelValue) {
  27294. $xeDateRangePicker.$emit('modelValue', value);
  27295. } else {
  27296. $xeDateRangePicker.$emit('model-value', value);
  27297. }
  27298. },
  27299. formatRangeLabel: function formatRangeLabel(vals) {
  27300. var $xeDateRangePicker = this;
  27301. var props = $xeDateRangePicker;
  27302. var type = props.type,
  27303. separator = props.separator;
  27304. var dateLabelFormat = $xeDateRangePicker.computeDateLabelFormat;
  27305. var dateValueFormat = $xeDateRangePicker.computeDateValueFormat;
  27306. var firstDayOfWeek = $xeDateRangePicker.computeFirstDayOfWeek;
  27307. var startRest = vals[0] ? parseDateObj(vals[0], type, {
  27308. valueFormat: dateValueFormat,
  27309. labelFormat: dateLabelFormat,
  27310. firstDay: firstDayOfWeek
  27311. }) : null;
  27312. var endRest = vals[1] ? parseDateObj(vals[1], type, {
  27313. valueFormat: dateValueFormat,
  27314. labelFormat: dateLabelFormat,
  27315. firstDay: firstDayOfWeek
  27316. }) : null;
  27317. var startLabel = startRest ? startRest.label : '';
  27318. var endLabel = endRest ? endRest.label : '';
  27319. return {
  27320. label: (startLabel || endLabel ? [startLabel, endLabel] : []).join("".concat(separator || ' ~ ')),
  27321. startLabel: startLabel,
  27322. endLabel: endLabel
  27323. };
  27324. },
  27325. getRangeValue: function getRangeValue(sValue, eValue) {
  27326. var $xeDateRangePicker = this;
  27327. var props = $xeDateRangePicker;
  27328. var modelValue = props.value,
  27329. valueType = props.valueType;
  27330. var isArr = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue);
  27331. if (valueType) {
  27332. switch (valueType) {
  27333. case 'array':
  27334. isArr = true;
  27335. break;
  27336. case 'string':
  27337. isArr = false;
  27338. break;
  27339. }
  27340. }
  27341. if (sValue || eValue) {
  27342. var rest = [sValue || '', eValue || ''];
  27343. if (isArr) {
  27344. return rest;
  27345. }
  27346. return rest.join(',');
  27347. }
  27348. return isArr ? [] : '';
  27349. },
  27350. paraeUpdateModel: function paraeUpdateModel() {
  27351. var $xeDateRangePicker = this;
  27352. var props = $xeDateRangePicker;
  27353. var type = props.type,
  27354. modelValue = props.value;
  27355. var dateValueFormat = $xeDateRangePicker.computeDateValueFormat;
  27356. var sValue = '';
  27357. var eValue = '';
  27358. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue)) {
  27359. var date1 = parseDateString(modelValue[0], type, {
  27360. valueFormat: dateValueFormat
  27361. });
  27362. var date2 = parseDateString(modelValue[1], type, {
  27363. valueFormat: dateValueFormat
  27364. });
  27365. if (date1 || date2) {
  27366. sValue = date1 || '';
  27367. eValue = date2 || '';
  27368. }
  27369. } else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(modelValue)) {
  27370. var strArr = modelValue.split(',');
  27371. if (strArr[0] || strArr[1]) {
  27372. sValue = strArr[0] || '';
  27373. eValue = strArr[1] || '';
  27374. }
  27375. }
  27376. return {
  27377. sValue: sValue,
  27378. eValue: eValue
  27379. };
  27380. },
  27381. parseUpdateData: function parseUpdateData() {
  27382. var $xeDateRangePicker = this;
  27383. var props = $xeDateRangePicker;
  27384. var type = props.type,
  27385. startValue = props.startValue,
  27386. endValue = props.endValue;
  27387. var dateValueFormat = $xeDateRangePicker.computeDateValueFormat;
  27388. var sValue = '';
  27389. var eValue = '';
  27390. sValue = parseDateString(startValue, type, {
  27391. valueFormat: dateValueFormat
  27392. });
  27393. eValue = parseDateString(endValue, type, {
  27394. valueFormat: dateValueFormat
  27395. });
  27396. return {
  27397. sValue: sValue,
  27398. eValue: eValue
  27399. };
  27400. },
  27401. updateModelValue: function updateModelValue(isModel) {
  27402. var $xeDateRangePicker = this;
  27403. var props = $xeDateRangePicker;
  27404. var reactData = $xeDateRangePicker.reactData;
  27405. var modelValue = props.value,
  27406. startValue = props.startValue,
  27407. endValue = props.endValue;
  27408. var restObj = {
  27409. sValue: '',
  27410. eValue: ''
  27411. };
  27412. if (isModel) {
  27413. if (modelValue) {
  27414. restObj = $xeDateRangePicker.paraeUpdateModel();
  27415. } else {
  27416. restObj = $xeDateRangePicker.parseUpdateData();
  27417. }
  27418. } else {
  27419. if (startValue || endValue) {
  27420. restObj = $xeDateRangePicker.parseUpdateData();
  27421. } else {
  27422. restObj = $xeDateRangePicker.paraeUpdateModel();
  27423. }
  27424. }
  27425. reactData.startValue = restObj.sValue;
  27426. reactData.endValue = restObj.eValue;
  27427. },
  27428. triggerEvent: function triggerEvent(evnt) {
  27429. var $xeDateRangePicker = this;
  27430. var reactData = $xeDateRangePicker.reactData;
  27431. var startValue = reactData.startValue,
  27432. endValue = reactData.endValue;
  27433. var value = $xeDateRangePicker.getRangeValue(startValue, endValue);
  27434. $xeDateRangePicker.dispatchEvent(evnt.type, {
  27435. value: value,
  27436. startValue: startValue,
  27437. endValue: endValue
  27438. }, evnt);
  27439. },
  27440. handleChange: function handleChange(sValue, eValue, evnt) {
  27441. var $xeDateRangePicker = this;
  27442. var props = $xeDateRangePicker;
  27443. var reactData = $xeDateRangePicker.reactData;
  27444. var $xeForm = $xeDateRangePicker.$xeForm;
  27445. var formItemInfo = $xeDateRangePicker.formItemInfo;
  27446. var modelValue = props.value;
  27447. reactData.startValue = sValue;
  27448. reactData.endValue = eValue;
  27449. var value = $xeDateRangePicker.getRangeValue(sValue, eValue);
  27450. $xeDateRangePicker.emitModel(value);
  27451. $xeDateRangePicker.$emit('update:startValue', sValue || '');
  27452. $xeDateRangePicker.$emit('update:endValue', eValue || '');
  27453. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(modelValue) !== value) {
  27454. $xeDateRangePicker.dispatchEvent('change', {
  27455. value: value
  27456. }, evnt);
  27457. // 自动更新校验状态
  27458. if ($xeForm && formItemInfo) {
  27459. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  27460. }
  27461. }
  27462. },
  27463. changeEvent: function changeEvent(evnt) {
  27464. var $xeDateRangePicker = this;
  27465. var inpImmediate = $xeDateRangePicker.computeInpImmediate;
  27466. if (!inpImmediate) {
  27467. $xeDateRangePicker.triggerEvent(evnt);
  27468. }
  27469. },
  27470. focusEvent: function focusEvent(evnt) {
  27471. var $xeDateRangePicker = this;
  27472. var reactData = $xeDateRangePicker.reactData;
  27473. reactData.isActivated = true;
  27474. $xeDateRangePicker.dateRangePickerOpenEvent(evnt);
  27475. $xeDateRangePicker.triggerEvent(evnt);
  27476. },
  27477. clickPrefixEvent: function clickPrefixEvent(evnt) {
  27478. var $xeDateRangePicker = this;
  27479. var reactData = $xeDateRangePicker.reactData;
  27480. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  27481. if (!isDisabled) {
  27482. var startValue = reactData.startValue,
  27483. endValue = reactData.endValue;
  27484. var value = $xeDateRangePicker.getRangeValue(startValue, endValue);
  27485. $xeDateRangePicker.dispatchEvent('prefix-click', {
  27486. value: value,
  27487. startValue: startValue,
  27488. endValue: endValue
  27489. }, evnt);
  27490. }
  27491. },
  27492. hidePanel: function hidePanel() {
  27493. var $xeDateRangePicker = this;
  27494. var reactData = $xeDateRangePicker.reactData;
  27495. var internalData = $xeDateRangePicker.internalData;
  27496. return new Promise(function (resolve) {
  27497. reactData.visiblePanel = false;
  27498. internalData.hpTimeout = setTimeout(function () {
  27499. reactData.isAniVisible = false;
  27500. resolve();
  27501. }, 350);
  27502. });
  27503. },
  27504. clearValueEvent: function clearValueEvent(evnt, value) {
  27505. var $xeDateRangePicker = this;
  27506. var isDatePickerType = $xeDateRangePicker.computeIsDatePickerType;
  27507. if (isDatePickerType) {
  27508. $xeDateRangePicker.hidePanel();
  27509. }
  27510. var startValue = '';
  27511. var endValue = '';
  27512. $xeDateRangePicker.handleChange(startValue, endValue, evnt);
  27513. $xeDateRangePicker.dispatchEvent('clear', {
  27514. value: value,
  27515. startValue: startValue,
  27516. endValue: endValue
  27517. }, evnt);
  27518. },
  27519. checkValue: function checkValue() {
  27520. var $xeDateRangePicker = this;
  27521. var $startDatePanel = $xeDateRangePicker.$refs.refStartDatePanel;
  27522. var $endDatePanel = $xeDateRangePicker.$refs.refEndDatePanel;
  27523. if ($startDatePanel && $endDatePanel) {
  27524. var startValue = $startDatePanel.getModelValue();
  27525. var endValue = $endDatePanel.getModelValue();
  27526. if (!startValue || !endValue) {
  27527. $xeDateRangePicker.handleChange('', '', {
  27528. type: 'check'
  27529. });
  27530. }
  27531. }
  27532. },
  27533. handleSelectClose: function handleSelectClose() {
  27534. var $xeDateRangePicker = this;
  27535. var props = $xeDateRangePicker;
  27536. var reactData = $xeDateRangePicker.reactData;
  27537. var internalData = $xeDateRangePicker.internalData;
  27538. var autoClose = props.autoClose;
  27539. var startValue = reactData.startValue,
  27540. endValue = reactData.endValue;
  27541. var selectStatus = internalData.selectStatus;
  27542. var isDatePickerType = $xeDateRangePicker.computeIsDatePickerType;
  27543. if (autoClose) {
  27544. if (selectStatus && isDatePickerType) {
  27545. if (startValue && endValue) {
  27546. $xeDateRangePicker.hidePanel();
  27547. }
  27548. }
  27549. } else {
  27550. if (startValue && endValue) {
  27551. internalData.selectStatus = false;
  27552. }
  27553. }
  27554. },
  27555. clickSuffixEvent: function clickSuffixEvent(evnt) {
  27556. var $xeDateRangePicker = this;
  27557. var reactData = $xeDateRangePicker.reactData;
  27558. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  27559. if (!isDisabled) {
  27560. var startValue = reactData.startValue,
  27561. endValue = reactData.endValue;
  27562. var value = $xeDateRangePicker.getRangeValue(startValue, endValue);
  27563. $xeDateRangePicker.dispatchEvent('suffix-click', {
  27564. value: value,
  27565. startValue: startValue,
  27566. endValue: endValue
  27567. }, evnt);
  27568. }
  27569. },
  27570. blurEvent: function blurEvent(evnt) {
  27571. var $xeDateRangePicker = this;
  27572. var reactData = $xeDateRangePicker.reactData;
  27573. var $xeForm = $xeDateRangePicker.$xeForm;
  27574. var formItemInfo = $xeDateRangePicker.formItemInfo;
  27575. var startValue = reactData.startValue,
  27576. endValue = reactData.endValue;
  27577. var inpImmediate = $xeDateRangePicker.computeInpImmediate;
  27578. var value = '';
  27579. if (!inpImmediate) {
  27580. $xeDateRangePicker.handleChange(startValue, endValue, evnt);
  27581. }
  27582. if (!reactData.visiblePanel) {
  27583. reactData.isActivated = false;
  27584. }
  27585. $xeDateRangePicker.dispatchEvent('blur', {
  27586. value: value,
  27587. startValue: startValue,
  27588. endValue: endValue
  27589. }, evnt);
  27590. // 自动更新校验状态
  27591. if ($xeForm && formItemInfo) {
  27592. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  27593. }
  27594. },
  27595. keydownEvent: function keydownEvent(evnt) {
  27596. var $xeDateRangePicker = this;
  27597. $xeDateRangePicker.triggerEvent(evnt);
  27598. },
  27599. keyupEvent: function keyupEvent(evnt) {
  27600. var $xeDateRangePicker = this;
  27601. $xeDateRangePicker.triggerEvent(evnt);
  27602. },
  27603. confirmEvent: function confirmEvent(evnt) {
  27604. var $xeDateRangePicker = this;
  27605. var $startDatePanel = $xeDateRangePicker.$refs.refStartDatePanel;
  27606. var $endDatePanel = $xeDateRangePicker.$refs.refEndDatePanel;
  27607. if ($startDatePanel && $endDatePanel) {
  27608. var startValue = $startDatePanel.getModelValue();
  27609. var endValue = $endDatePanel.getModelValue();
  27610. if (startValue && !endValue || !startValue && endValue) {
  27611. $xeDateRangePicker.handleChange('', '', evnt);
  27612. } else {
  27613. $startDatePanel.confirmByEvent(evnt);
  27614. $endDatePanel.confirmByEvent(evnt);
  27615. }
  27616. var value = $xeDateRangePicker.getRangeValue(startValue, endValue);
  27617. $xeDateRangePicker.dispatchEvent('confirm', {
  27618. value: value,
  27619. startValue: startValue,
  27620. endValue: endValue
  27621. }, evnt);
  27622. }
  27623. $xeDateRangePicker.hidePanel();
  27624. },
  27625. startPanelChangeEvent: function startPanelChangeEvent(params) {
  27626. var $xeDateRangePicker = this;
  27627. var reactData = $xeDateRangePicker.reactData;
  27628. var internalData = $xeDateRangePicker.internalData;
  27629. var selectStatus = internalData.selectStatus;
  27630. var value = params.value,
  27631. $event = params.$event;
  27632. var endValue = selectStatus ? reactData.endValue : '';
  27633. $xeDateRangePicker.handleChange(value, endValue, $event);
  27634. $xeDateRangePicker.handleSelectClose();
  27635. if (!selectStatus) {
  27636. internalData.selectStatus = true;
  27637. }
  27638. $xeDateRangePicker.$nextTick(function () {
  27639. var $startDatePanel = $xeDateRangePicker.$refs.refStartDatePanel;
  27640. var $endDatePanel = $xeDateRangePicker.$refs.refEndDatePanel;
  27641. if ($startDatePanel && $endDatePanel) {
  27642. var startValue = $startDatePanel.getModelValue();
  27643. if (!endValue && startValue) {
  27644. $endDatePanel.setPanelDate(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(startValue));
  27645. }
  27646. }
  27647. });
  27648. },
  27649. endPanelChangeEvent: function endPanelChangeEvent(params) {
  27650. var $xeDateRangePicker = this;
  27651. var reactData = $xeDateRangePicker.reactData;
  27652. var internalData = $xeDateRangePicker.internalData;
  27653. var selectStatus = internalData.selectStatus;
  27654. var value = params.value,
  27655. $event = params.$event;
  27656. var startValue = selectStatus ? reactData.startValue : '';
  27657. $xeDateRangePicker.handleChange(startValue, value, $event);
  27658. $xeDateRangePicker.handleSelectClose();
  27659. if (!selectStatus) {
  27660. internalData.selectStatus = true;
  27661. }
  27662. $xeDateRangePicker.$nextTick(function () {
  27663. var $startDatePanel = $xeDateRangePicker.$refs.refStartDatePanel;
  27664. var $endDatePanel = $xeDateRangePicker.$refs.refEndDatePanel;
  27665. if ($startDatePanel && $endDatePanel) {
  27666. var endValue = $endDatePanel.getModelValue();
  27667. if (!startValue && endValue) {
  27668. $startDatePanel.setPanelDate(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(endValue));
  27669. }
  27670. }
  27671. });
  27672. },
  27673. // 全局事件
  27674. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  27675. var $xeDateRangePicker = this;
  27676. var reactData = $xeDateRangePicker.reactData;
  27677. var visiblePanel = reactData.visiblePanel,
  27678. isActivated = reactData.isActivated;
  27679. var el = $xeDateRangePicker.$refs.refElem;
  27680. var panelWrapperElem = $xeDateRangePicker.$refs.refPanelWrapper;
  27681. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  27682. if (!isDisabled && isActivated) {
  27683. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
  27684. if (!reactData.isActivated) {
  27685. if (visiblePanel) {
  27686. $xeDateRangePicker.checkValue();
  27687. $xeDateRangePicker.hidePanel();
  27688. }
  27689. }
  27690. }
  27691. },
  27692. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  27693. var $xeDateRangePicker = this;
  27694. var reactData = $xeDateRangePicker.reactData;
  27695. var visiblePanel = reactData.visiblePanel;
  27696. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  27697. if (!isDisabled) {
  27698. var isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
  27699. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  27700. if (isTab) {
  27701. reactData.isActivated = false;
  27702. }
  27703. if (visiblePanel) {
  27704. if (isEsc || isTab) {
  27705. $xeDateRangePicker.hidePanel();
  27706. }
  27707. }
  27708. }
  27709. },
  27710. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  27711. var $xeDateRangePicker = this;
  27712. var reactData = $xeDateRangePicker.reactData;
  27713. var visiblePanel = reactData.visiblePanel;
  27714. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  27715. if (!isDisabled) {
  27716. if (visiblePanel) {
  27717. var panelWrapperElem = $xeDateRangePicker.$refs.refPanelWrapper;
  27718. if (getEventTargetNode(evnt, panelWrapperElem).flag) {
  27719. $xeDateRangePicker.updatePlacement();
  27720. } else {
  27721. $xeDateRangePicker.hidePanel();
  27722. }
  27723. }
  27724. }
  27725. },
  27726. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  27727. var $xeDateRangePicker = this;
  27728. var reactData = $xeDateRangePicker.reactData;
  27729. var visiblePanel = reactData.visiblePanel,
  27730. isActivated = reactData.isActivated;
  27731. if (visiblePanel) {
  27732. $xeDateRangePicker.hidePanel();
  27733. }
  27734. if (isActivated) {
  27735. reactData.isActivated = false;
  27736. }
  27737. if (visiblePanel || isActivated) {
  27738. var targetElem = $xeDateRangePicker.$refs.refInputTarget;
  27739. if (targetElem) {
  27740. targetElem.blur();
  27741. }
  27742. }
  27743. },
  27744. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  27745. var $xeDateRangePicker = this;
  27746. var reactData = $xeDateRangePicker.reactData;
  27747. var visiblePanel = reactData.visiblePanel;
  27748. if (visiblePanel) {
  27749. $xeDateRangePicker.updatePlacement();
  27750. }
  27751. },
  27752. // 弹出面板
  27753. updateZindex: function updateZindex() {
  27754. var $xeDateRangePicker = this;
  27755. var props = $xeDateRangePicker;
  27756. var reactData = $xeDateRangePicker.reactData;
  27757. var zIndex = props.zIndex;
  27758. if (zIndex) {
  27759. reactData.panelIndex = zIndex;
  27760. } else if (reactData.panelIndex < getLastZIndex()) {
  27761. reactData.panelIndex = nextZIndex();
  27762. }
  27763. },
  27764. updatePlacement: function updatePlacement() {
  27765. var $xeDateRangePicker = this;
  27766. var props = $xeDateRangePicker;
  27767. var reactData = $xeDateRangePicker.reactData;
  27768. var placement = props.placement;
  27769. var panelIndex = reactData.panelIndex;
  27770. var targetElem = $xeDateRangePicker.$refs.refInputTarget;
  27771. var panelElem = $xeDateRangePicker.$refs.refInputPanel;
  27772. var btnTransfer = $xeDateRangePicker.computeBtnTransfer;
  27773. var handleStyle = function handleStyle() {
  27774. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  27775. placement: placement,
  27776. teleportTo: btnTransfer
  27777. });
  27778. var panelStyle = Object.assign(ppObj.style, {
  27779. zIndex: panelIndex
  27780. });
  27781. reactData.panelStyle = panelStyle;
  27782. reactData.panelPlacement = ppObj.placement;
  27783. };
  27784. handleStyle();
  27785. return $xeDateRangePicker.$nextTick().then(handleStyle);
  27786. },
  27787. showPanel: function showPanel() {
  27788. var $xeDateRangePicker = this;
  27789. var reactData = $xeDateRangePicker.reactData;
  27790. var internalData = $xeDateRangePicker.internalData;
  27791. var visiblePanel = reactData.visiblePanel;
  27792. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  27793. var btnTransfer = $xeDateRangePicker.computeBtnTransfer;
  27794. var panelElem = $xeDateRangePicker.$refs.refInputPanel;
  27795. if (!isDisabled && !visiblePanel) {
  27796. if (!reactData.initialized) {
  27797. reactData.initialized = true;
  27798. if (btnTransfer) {
  27799. if (panelElem) {
  27800. document.body.appendChild(panelElem);
  27801. }
  27802. }
  27803. }
  27804. if (internalData.hpTimeout) {
  27805. clearTimeout(internalData.hpTimeout);
  27806. internalData.hpTimeout = undefined;
  27807. }
  27808. internalData.selectStatus = false;
  27809. reactData.isActivated = true;
  27810. reactData.isAniVisible = true;
  27811. setTimeout(function () {
  27812. reactData.visiblePanel = true;
  27813. }, 10);
  27814. $xeDateRangePicker.updateZindex();
  27815. return $xeDateRangePicker.updatePlacement();
  27816. }
  27817. return $xeDateRangePicker.$nextTick();
  27818. },
  27819. dateRangePickerOpenEvent: function dateRangePickerOpenEvent(evnt) {
  27820. var $xeDateRangePicker = this;
  27821. var formReadonly = $xeDateRangePicker.computeFormReadonly;
  27822. if (!formReadonly) {
  27823. evnt.preventDefault();
  27824. $xeDateRangePicker.showPanel();
  27825. }
  27826. },
  27827. clickEvent: function clickEvent(evnt) {
  27828. var $xeDateRangePicker = this;
  27829. $xeDateRangePicker.triggerEvent(evnt);
  27830. },
  27831. handleShortcutEvent: function handleShortcutEvent(_ref) {
  27832. var option = _ref.option,
  27833. $event = _ref.$event;
  27834. var $xeDateRangePicker = this;
  27835. var props = $xeDateRangePicker;
  27836. var reactData = $xeDateRangePicker.reactData;
  27837. var type = props.type;
  27838. var shortcutOpts = $xeDateRangePicker.computeShortcutOpts;
  27839. var autoClose = shortcutOpts.autoClose;
  27840. var code = option.code,
  27841. clickMethod = option.clickMethod;
  27842. var startValue = reactData.startValue;
  27843. var endValue = reactData.endValue;
  27844. var value = $xeDateRangePicker.getRangeValue(startValue, endValue);
  27845. var shortcutParams = {
  27846. $dateRangePicker: $xeDateRangePicker,
  27847. option: option,
  27848. value: value,
  27849. startValue: startValue,
  27850. endValue: endValue,
  27851. code: code
  27852. };
  27853. if (!clickMethod && code) {
  27854. var gCommandOpts = commands.get(code);
  27855. var drpCommandMethod = gCommandOpts ? gCommandOpts.dateRangePickerCommandMethod : null;
  27856. if (drpCommandMethod) {
  27857. drpCommandMethod(shortcutParams);
  27858. } else {
  27859. var dateValueFormat = $xeDateRangePicker.computeDateValueFormat;
  27860. var firstDayOfWeek = $xeDateRangePicker.computeFirstDayOfWeek;
  27861. switch (code) {
  27862. case 'last1':
  27863. case 'last3':
  27864. case 'last7':
  27865. case 'last30':
  27866. case 'last60':
  27867. case 'last90':
  27868. case 'last180':
  27869. {
  27870. var restObj = getRangeDateByCode(code, value, type, {
  27871. valueFormat: dateValueFormat,
  27872. firstDay: firstDayOfWeek
  27873. });
  27874. startValue = restObj.startValue;
  27875. endValue = restObj.endValue;
  27876. value = $xeDateRangePicker.getRangeValue(startValue, endValue);
  27877. shortcutParams.value = value;
  27878. shortcutParams.startValue = startValue;
  27879. shortcutParams.endValue = endValue;
  27880. $xeDateRangePicker.handleChange(startValue, endValue, $event);
  27881. break;
  27882. }
  27883. default:
  27884. errLog('vxe.error.notCommands', ["[date-range-picker] ".concat(code)]);
  27885. break;
  27886. }
  27887. }
  27888. } else {
  27889. var optClickMethod = clickMethod || shortcutOpts.clickMethod;
  27890. if (optClickMethod) {
  27891. optClickMethod(shortcutParams);
  27892. }
  27893. }
  27894. if (autoClose) {
  27895. $xeDateRangePicker.hidePanel();
  27896. }
  27897. $xeDateRangePicker.dispatchEvent('shortcut-click', shortcutParams, $event);
  27898. },
  27899. setModelValue: function setModelValue(startValue, endValue) {
  27900. var $xeDateRangePicker = this;
  27901. var reactData = $xeDateRangePicker.reactData;
  27902. reactData.startValue = startValue || '';
  27903. reactData.endValue = endValue || '';
  27904. var value = $xeDateRangePicker.getRangeValue(startValue, endValue);
  27905. $xeDateRangePicker.emitModel(value);
  27906. },
  27907. setModelValueByEvent: function setModelValueByEvent(evnt, startValue, endValue) {
  27908. var $xeDateRangePicker = this;
  27909. $xeDateRangePicker.handleChange(startValue || '', endValue || '', evnt);
  27910. },
  27911. focus: function focus() {
  27912. var $xeDateRangePicker = this;
  27913. var reactData = $xeDateRangePicker.reactData;
  27914. var inputElem = $xeDateRangePicker.$refs.refInputTarget;
  27915. reactData.isActivated = true;
  27916. inputElem.focus();
  27917. return $xeDateRangePicker.$nextTick();
  27918. },
  27919. blur: function blur() {
  27920. var $xeDateRangePicker = this;
  27921. var reactData = $xeDateRangePicker.reactData;
  27922. var inputElem = $xeDateRangePicker.$refs.refInputTarget;
  27923. inputElem.blur();
  27924. reactData.isActivated = false;
  27925. return $xeDateRangePicker.$nextTick();
  27926. },
  27927. select: function select() {
  27928. var $xeDateRangePicker = this;
  27929. var reactData = $xeDateRangePicker.reactData;
  27930. var inputElem = $xeDateRangePicker.$refs.refInputTarget;
  27931. inputElem.select();
  27932. reactData.isActivated = false;
  27933. return $xeDateRangePicker.$nextTick();
  27934. },
  27935. //
  27936. // Render
  27937. //
  27938. renderShortcutBtn: function renderShortcutBtn(h, pos, isVertical) {
  27939. var $xeDateRangePicker = this;
  27940. var shortcutOpts = $xeDateRangePicker.computeShortcutOpts;
  27941. var position = shortcutOpts.position,
  27942. align = shortcutOpts.align,
  27943. mode = shortcutOpts.mode;
  27944. var shortcutList = $xeDateRangePicker.computeShortcutList;
  27945. if (isEnableConf(shortcutOpts) && shortcutList.length && (position || 'left') === pos) {
  27946. return h('div', {
  27947. class: "vxe-date-range-picker--layout-".concat(pos, "-wrapper")
  27948. }, [h(button_group, {
  27949. props: {
  27950. options: shortcutList,
  27951. mode: mode,
  27952. align: align,
  27953. vertical: isVertical
  27954. },
  27955. on: {
  27956. click: $xeDateRangePicker.handleShortcutEvent
  27957. }
  27958. })]);
  27959. }
  27960. return renderEmptyElement($xeDateRangePicker);
  27961. },
  27962. renderPanel: function renderPanel(h) {
  27963. var $xeDateRangePicker = this;
  27964. var props = $xeDateRangePicker;
  27965. var slots = $xeDateRangePicker.$scopedSlots;
  27966. var reactData = $xeDateRangePicker.reactData;
  27967. var type = props.type,
  27968. separator = props.separator,
  27969. autoClose = props.autoClose,
  27970. showConfirmButton = props.showConfirmButton,
  27971. showClearButton = props.showClearButton;
  27972. var initialized = reactData.initialized,
  27973. isAniVisible = reactData.isAniVisible,
  27974. visiblePanel = reactData.visiblePanel,
  27975. panelPlacement = reactData.panelPlacement,
  27976. panelStyle = reactData.panelStyle,
  27977. startValue = reactData.startValue,
  27978. endValue = reactData.endValue;
  27979. var vSize = $xeDateRangePicker.computeSize;
  27980. var btnTransfer = $xeDateRangePicker.computeBtnTransfer;
  27981. var shortcutOpts = $xeDateRangePicker.computeShortcutOpts;
  27982. var isClearable = $xeDateRangePicker.computeIsClearable;
  27983. var panelLabelObj = $xeDateRangePicker.computePanelLabelObj;
  27984. var shortcutList = $xeDateRangePicker.computeShortcutList;
  27985. var isDateTimeType = $xeDateRangePicker.computeIsDateTimeType;
  27986. var startLabel = panelLabelObj.startLabel,
  27987. endLabel = panelLabelObj.endLabel;
  27988. var position = shortcutOpts.position;
  27989. var headerSlot = slots.header;
  27990. var footerSlot = slots.footer;
  27991. var topSlot = slots.top;
  27992. var bottomSlot = slots.bottom;
  27993. var leftSlot = slots.left;
  27994. var rightSlot = slots.right;
  27995. var hasShortcutBtn = shortcutList.length > 0;
  27996. var showConfirmBtn = showConfirmButton === null ? isDateTimeType || !autoClose : showConfirmButton;
  27997. var showClearBtn = showClearButton === null ? isClearable : showClearButton;
  27998. return h('div', {
  27999. ref: 'refInputPanel',
  28000. class: ['vxe-table--ignore-clear vxe-date-range-picker--panel', "type--".concat(type), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', isAniVisible), 'ani--enter', visiblePanel), 'show--top', !!(topSlot || headerSlot || hasShortcutBtn && (position === 'top' || position === 'header'))), 'show--bottom', !!(bottomSlot || footerSlot || hasShortcutBtn && (position === 'bottom' || position === 'footer'))), 'show--left', !!(leftSlot || hasShortcutBtn && position === 'left')), 'show--right', !!(rightSlot || hasShortcutBtn && position === 'right'))],
  28001. attrs: {
  28002. placement: panelPlacement
  28003. },
  28004. style: panelStyle
  28005. }, initialized && (visiblePanel || isAniVisible) ? [h('div', {
  28006. ref: 'refPanelWrapper',
  28007. class: ['vxe-date-range-picker--layout-all-wrapper', "type--".concat(type), _defineProperty({}, "size--".concat(vSize), vSize)]
  28008. }, [topSlot ? h('div', {
  28009. class: 'vxe-date-range-picker--layout-top-wrapper'
  28010. }, topSlot({})) : $xeDateRangePicker.renderShortcutBtn(h, 'top'), h('div', {
  28011. class: 'vxe-date-range-picker--layout-body-layout-wrapper'
  28012. }, [leftSlot ? h('div', {
  28013. class: 'vxe-date-range-picker--layout-left-wrapper'
  28014. }, leftSlot({})) : $xeDateRangePicker.renderShortcutBtn(h, 'left', true), h('div', {
  28015. class: 'vxe-date-range-picker--layout-body-content-wrapper'
  28016. }, [headerSlot ? h('div', {
  28017. class: 'vxe-date-range-picker--layout-header-wrapper'
  28018. }, headerSlot({})) : $xeDateRangePicker.renderShortcutBtn(h, 'header'), h('div', {
  28019. class: 'vxe-date-range-picker--layout-body-wrapper'
  28020. }, [h(date_panel, {
  28021. ref: 'refStartDatePanel',
  28022. props: {
  28023. value: startValue,
  28024. type: props.type,
  28025. className: props.className,
  28026. minDate: props.minDate,
  28027. maxDate: props.maxDate,
  28028. endDate: endValue,
  28029. startDay: props.startDay,
  28030. labelFormat: props.labelFormat,
  28031. valueFormat: props.valueFormat,
  28032. timeFormat: props.timeFormat,
  28033. festivalMethod: props.festivalMethod,
  28034. disabledMethod: props.disabledMethod,
  28035. selectDay: props.selectDay
  28036. },
  28037. on: {
  28038. change: $xeDateRangePicker.startPanelChangeEvent
  28039. }
  28040. }), h(date_panel, {
  28041. ref: 'refEndDatePanel',
  28042. props: {
  28043. value: endValue,
  28044. type: props.type,
  28045. className: props.className,
  28046. minDate: props.minDate,
  28047. maxDate: props.maxDate,
  28048. startDate: startValue,
  28049. startDay: props.startDay,
  28050. labelFormat: props.labelFormat,
  28051. valueFormat: props.valueFormat,
  28052. timeFormat: props.timeFormat,
  28053. festivalMethod: props.festivalMethod,
  28054. disabledMethod: props.disabledMethod,
  28055. selectDay: props.selectDay
  28056. },
  28057. on: {
  28058. change: $xeDateRangePicker.endPanelChangeEvent
  28059. }
  28060. })]), h('div', {
  28061. class: 'vxe-date-range-picker--layout-footer-wrapper'
  28062. }, [h('div', {
  28063. class: 'vxe-date-range-picker--layout-footer-label'
  28064. }, startLabel || endLabel ? [h('span', startLabel), h('span', "".concat(separator || '')), h('span', endLabel)] : []), h('div', {
  28065. class: 'vxe-date-range-picker--layout-footer-custom'
  28066. }, footerSlot ? footerSlot({}) : [$xeDateRangePicker.renderShortcutBtn(h, 'footer')]), h('div', {
  28067. class: 'vxe-date-range-picker--layout-footer-btns'
  28068. }, [showClearBtn ? h(src_button, {
  28069. props: {
  28070. size: 'mini',
  28071. disabled: !(startValue || endValue),
  28072. content: getI18n('vxe.button.clear')
  28073. },
  28074. on: {
  28075. click: $xeDateRangePicker.clearValueEvent
  28076. }
  28077. }) : renderEmptyElement($xeDateRangePicker), showConfirmBtn ? h(src_button, {
  28078. props: {
  28079. size: 'mini',
  28080. status: 'primary',
  28081. content: getI18n('vxe.button.confirm')
  28082. },
  28083. on: {
  28084. click: $xeDateRangePicker.confirmEvent
  28085. }
  28086. }) : renderEmptyElement($xeDateRangePicker)])])]), rightSlot ? h('div', {
  28087. class: 'vxe-date-range-picker--layout-right-wrapper'
  28088. }, rightSlot({})) : $xeDateRangePicker.renderShortcutBtn(h, 'right', true)]), bottomSlot ? h('div', {
  28089. class: 'vxe-date-range-picker--layout-bottom-wrapper'
  28090. }, bottomSlot({})) : $xeDateRangePicker.renderShortcutBtn(h, 'bottom')])] : []);
  28091. },
  28092. renderPrefixIcon: function renderPrefixIcon(h) {
  28093. var $xeDateRangePicker = this;
  28094. var props = $xeDateRangePicker;
  28095. var slots = $xeDateRangePicker.$scopedSlots;
  28096. var prefixIcon = props.prefixIcon;
  28097. var prefixSlot = slots.prefix;
  28098. return prefixSlot || prefixIcon ? h('div', {
  28099. class: 'vxe-date-range-picker--prefix',
  28100. on: {
  28101. click: $xeDateRangePicker.clickPrefixEvent
  28102. }
  28103. }, [h('div', {
  28104. class: 'vxe-date-range-picker--prefix-icon'
  28105. }, prefixSlot ? vn_getSlotVNs(prefixSlot({})) : [h('i', {
  28106. class: prefixIcon
  28107. })])]) : null;
  28108. },
  28109. renderSuffixIcon: function renderSuffixIcon(h) {
  28110. var $xeDateRangePicker = this;
  28111. var props = $xeDateRangePicker;
  28112. var slots = $xeDateRangePicker.$scopedSlots;
  28113. var reactData = $xeDateRangePicker.reactData;
  28114. var suffixIcon = props.suffixIcon;
  28115. var startValue = reactData.startValue,
  28116. endValue = reactData.endValue;
  28117. var suffixSlot = slots.suffix;
  28118. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  28119. var isClearable = $xeDateRangePicker.computeIsClearable;
  28120. return h('div', {
  28121. class: ['vxe-date-range-picker--suffix', {
  28122. 'is--clear': isClearable && !isDisabled && (startValue || endValue)
  28123. }]
  28124. }, [isClearable ? h('div', {
  28125. class: 'vxe-date-range-picker--clear-icon',
  28126. on: {
  28127. click: $xeDateRangePicker.clearValueEvent
  28128. }
  28129. }, [h('i', {
  28130. class: getIcon().INPUT_CLEAR
  28131. })]) : renderEmptyElement($xeDateRangePicker), $xeDateRangePicker.renderExtraSuffixIcon(h), suffixSlot || suffixIcon ? h('div', {
  28132. class: 'vxe-date-range-picker--suffix-icon',
  28133. on: {
  28134. click: $xeDateRangePicker.clickSuffixEvent
  28135. }
  28136. }, suffixSlot ? vn_getSlotVNs(suffixSlot({})) : [h('i', {
  28137. class: suffixIcon
  28138. })]) : renderEmptyElement($xeDateRangePicker)]);
  28139. },
  28140. renderExtraSuffixIcon: function renderExtraSuffixIcon(h) {
  28141. var $xeDateRangePicker = this;
  28142. return h('div', {
  28143. class: 'vxe-date-range-picker--control-icon',
  28144. on: {
  28145. click: $xeDateRangePicker.dateRangePickerOpenEvent
  28146. }
  28147. }, [h('i', {
  28148. class: ['vxe-date-range-picker--date-picker-icon', getIcon().DATE_PICKER_DATE]
  28149. })]);
  28150. },
  28151. renderVN: function renderVN(h) {
  28152. var $xeDateRangePicker = this;
  28153. var props = $xeDateRangePicker;
  28154. var reactData = $xeDateRangePicker.reactData;
  28155. var className = props.className,
  28156. type = props.type,
  28157. name = props.name,
  28158. autoComplete = props.autoComplete;
  28159. var startValue = reactData.startValue,
  28160. endValue = reactData.endValue,
  28161. visiblePanel = reactData.visiblePanel,
  28162. isActivated = reactData.isActivated;
  28163. var vSize = $xeDateRangePicker.computeSize;
  28164. var isDisabled = $xeDateRangePicker.computeIsDisabled;
  28165. var formReadonly = $xeDateRangePicker.computeFormReadonly;
  28166. var inputLabel = $xeDateRangePicker.computeInputLabel;
  28167. if (formReadonly) {
  28168. return h('div', {
  28169. ref: 'refElem',
  28170. class: ['vxe-date-range-picker--readonly', "type--".concat(type), className]
  28171. }, inputLabel);
  28172. }
  28173. var inpPlaceholder = $xeDateRangePicker.computeInpPlaceholder;
  28174. var isClearable = $xeDateRangePicker.computeIsClearable;
  28175. var prefix = $xeDateRangePicker.renderPrefixIcon(h);
  28176. var suffix = $xeDateRangePicker.renderSuffixIcon(h);
  28177. return h('div', {
  28178. ref: 'refElem',
  28179. class: ['vxe-date-range-picker', "type--".concat(type), className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--prefix', !!prefix), 'is--suffix', !!suffix), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--active', isActivated), 'show--clear', isClearable && !isDisabled && (startValue || endValue))],
  28180. attrs: {
  28181. spellcheck: false
  28182. }
  28183. }, [prefix || renderEmptyElement($xeDateRangePicker), h('div', {
  28184. class: 'vxe-date-range-picker--wrapper'
  28185. }, [h('input', {
  28186. ref: 'refInputTarget',
  28187. class: 'vxe-date-range-picker--inner',
  28188. domProps: {
  28189. value: inputLabel
  28190. },
  28191. attrs: {
  28192. name: name,
  28193. type: 'text',
  28194. placeholder: inpPlaceholder,
  28195. readonly: true,
  28196. disabled: isDisabled,
  28197. autocomplete: autoComplete
  28198. },
  28199. on: {
  28200. keydown: $xeDateRangePicker.keydownEvent,
  28201. keyup: $xeDateRangePicker.keyupEvent,
  28202. click: $xeDateRangePicker.clickEvent,
  28203. change: $xeDateRangePicker.changeEvent,
  28204. focus: $xeDateRangePicker.focusEvent,
  28205. blur: $xeDateRangePicker.blurEvent
  28206. }
  28207. })]), suffix || renderEmptyElement($xeDateRangePicker),
  28208. // 下拉面板
  28209. $xeDateRangePicker.renderPanel(h)]);
  28210. }
  28211. },
  28212. watch: {
  28213. value: function value() {
  28214. var $xeDateRangePicker = this;
  28215. $xeDateRangePicker.updateModelValue(true);
  28216. },
  28217. computeMVal: function computeMVal() {
  28218. var $xeDateRangePicker = this;
  28219. $xeDateRangePicker.updateModelValue(false);
  28220. }
  28221. },
  28222. created: function created() {
  28223. var $xeDateRangePicker = this;
  28224. $xeDateRangePicker.updateModelValue(true);
  28225. globalEvents.on($xeDateRangePicker, 'mousewheel', $xeDateRangePicker.handleGlobalMousewheelEvent);
  28226. globalEvents.on($xeDateRangePicker, 'mousedown', $xeDateRangePicker.handleGlobalMousedownEvent);
  28227. globalEvents.on($xeDateRangePicker, 'keydown', $xeDateRangePicker.handleGlobalKeydownEvent);
  28228. globalEvents.on($xeDateRangePicker, 'blur', $xeDateRangePicker.handleGlobalBlurEvent);
  28229. globalEvents.on($xeDateRangePicker, 'resize', $xeDateRangePicker.handleGlobalResizeEvent);
  28230. },
  28231. deactivated: function deactivated() {
  28232. var $xeDateRangePicker = this;
  28233. $xeDateRangePicker.checkValue();
  28234. },
  28235. beforeDestroy: function beforeDestroy() {
  28236. var $xeDateRangePicker = this;
  28237. var panelElem = $xeDateRangePicker.$refs.refInputPanel;
  28238. if (panelElem && panelElem.parentNode) {
  28239. panelElem.parentNode.removeChild(panelElem);
  28240. }
  28241. $xeDateRangePicker.checkValue();
  28242. globalEvents.off($xeDateRangePicker, 'mousewheel');
  28243. globalEvents.off($xeDateRangePicker, 'mousedown');
  28244. globalEvents.off($xeDateRangePicker, 'blur');
  28245. globalEvents.off($xeDateRangePicker, 'resize');
  28246. },
  28247. render: function render(h) {
  28248. return this.renderVN(h);
  28249. }
  28250. })); /* define-vxe-component end */
  28251. ;// CONCATENATED MODULE: ./packages/date-range-picker/index.ts
  28252. var VxeDateRangePicker = Object.assign({}, date_range_picker, {
  28253. install: function install(app) {
  28254. app.component(date_range_picker.name, date_range_picker);
  28255. }
  28256. });
  28257. dynamicApp.use(VxeDateRangePicker);
  28258. index_esm_VxeUI.component(date_range_picker);
  28259. var DateRangePicker = VxeDateRangePicker;
  28260. /* harmony default export */ var packages_date_range_picker = (VxeDateRangePicker);
  28261. ;// CONCATENATED MODULE: ./packages/loading/index.ts
  28262. var VxeLoading = Object.assign({}, src_loading, {
  28263. install: function install(app) {
  28264. app.component(src_loading.name, src_loading);
  28265. }
  28266. });
  28267. var LoadingController = {
  28268. open: function open(options) {
  28269. var opts = Object.assign({}, options);
  28270. dynamicStore.globalLoading = {
  28271. value: true,
  28272. text: opts.text,
  28273. icon: opts.icon
  28274. };
  28275. checkDynamic();
  28276. },
  28277. close: function close() {
  28278. dynamicStore.globalLoading = null;
  28279. }
  28280. };
  28281. dynamicApp.use(VxeLoading);
  28282. index_esm_VxeUI.component(src_loading);
  28283. index_esm_VxeUI.loading = LoadingController;
  28284. var Loading = VxeLoading;
  28285. /* harmony default export */ var packages_loading = (VxeLoading);
  28286. ;// CONCATENATED MODULE: ./packages/drawer/src/drawer.ts
  28287. var allActiveDrawers = [];
  28288. /* harmony default export */ var drawer = (/* define-vxe-component start */defineVxeComponent({
  28289. name: 'VxeDrawer',
  28290. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  28291. props: {
  28292. value: Boolean,
  28293. id: String,
  28294. title: String,
  28295. loading: {
  28296. type: Boolean,
  28297. default: null
  28298. },
  28299. className: String,
  28300. position: {
  28301. type: [String, Object],
  28302. default: function _default() {
  28303. return getConfig().drawer.position;
  28304. }
  28305. },
  28306. lockView: {
  28307. type: Boolean,
  28308. default: function _default() {
  28309. return getConfig().drawer.lockView;
  28310. }
  28311. },
  28312. lockScroll: Boolean,
  28313. mask: {
  28314. type: Boolean,
  28315. default: function _default() {
  28316. return getConfig().drawer.mask;
  28317. }
  28318. },
  28319. maskClosable: {
  28320. type: Boolean,
  28321. default: function _default() {
  28322. return getConfig().drawer.maskClosable;
  28323. }
  28324. },
  28325. escClosable: {
  28326. type: Boolean,
  28327. default: function _default() {
  28328. return getConfig().drawer.escClosable;
  28329. }
  28330. },
  28331. cancelClosable: {
  28332. type: Boolean,
  28333. default: function _default() {
  28334. return getConfig().drawer.cancelClosable;
  28335. }
  28336. },
  28337. confirmClosable: {
  28338. type: Boolean,
  28339. default: function _default() {
  28340. return getConfig().drawer.confirmClosable;
  28341. }
  28342. },
  28343. showHeader: {
  28344. type: Boolean,
  28345. default: function _default() {
  28346. return getConfig().drawer.showHeader;
  28347. }
  28348. },
  28349. showFooter: {
  28350. type: Boolean,
  28351. default: function _default() {
  28352. return getConfig().drawer.showFooter;
  28353. }
  28354. },
  28355. showClose: {
  28356. type: Boolean,
  28357. default: function _default() {
  28358. return getConfig().drawer.showClose;
  28359. }
  28360. },
  28361. content: [Number, String],
  28362. showCancelButton: {
  28363. type: Boolean,
  28364. default: null
  28365. },
  28366. cancelButtonText: {
  28367. type: String,
  28368. default: function _default() {
  28369. return getConfig().drawer.cancelButtonText;
  28370. }
  28371. },
  28372. showConfirmButton: {
  28373. type: Boolean,
  28374. default: function _default() {
  28375. return getConfig().drawer.showConfirmButton;
  28376. }
  28377. },
  28378. confirmButtonText: {
  28379. type: String,
  28380. default: function _default() {
  28381. return getConfig().drawer.confirmButtonText;
  28382. }
  28383. },
  28384. destroyOnClose: {
  28385. type: Boolean,
  28386. default: function _default() {
  28387. return getConfig().drawer.destroyOnClose;
  28388. }
  28389. },
  28390. showTitleOverflow: {
  28391. type: Boolean,
  28392. default: function _default() {
  28393. return getConfig().drawer.showTitleOverflow;
  28394. }
  28395. },
  28396. width: [Number, String],
  28397. height: [Number, String],
  28398. resize: {
  28399. type: Boolean,
  28400. default: function _default() {
  28401. return getConfig().drawer.resize;
  28402. }
  28403. },
  28404. zIndex: Number,
  28405. transfer: {
  28406. type: Boolean,
  28407. default: function _default() {
  28408. return getConfig().drawer.transfer;
  28409. }
  28410. },
  28411. padding: {
  28412. type: Boolean,
  28413. default: function _default() {
  28414. return getConfig().drawer.padding;
  28415. }
  28416. },
  28417. size: {
  28418. type: String,
  28419. default: function _default() {
  28420. return getConfig().drawer.size || getConfig().size;
  28421. }
  28422. },
  28423. beforeHideMethod: {
  28424. type: Function,
  28425. default: function _default() {
  28426. return getConfig().drawer.beforeHideMethod;
  28427. }
  28428. },
  28429. slots: Object
  28430. },
  28431. inject: {
  28432. $xeModal: {
  28433. default: null
  28434. },
  28435. $xeParentDrawer: {
  28436. from: '$xeDrawer',
  28437. default: null
  28438. },
  28439. $xeTable: {
  28440. default: null
  28441. },
  28442. $xeForm: {
  28443. default: null
  28444. }
  28445. },
  28446. provide: function provide() {
  28447. var $xeDrawer = this;
  28448. return {
  28449. $xeDrawer: $xeDrawer
  28450. };
  28451. },
  28452. data: function data() {
  28453. var reactData = {
  28454. initialized: false,
  28455. visible: false,
  28456. contentVisible: false,
  28457. drawerZIndex: 0,
  28458. resizeFlag: 1
  28459. };
  28460. return {
  28461. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  28462. reactData: reactData
  28463. };
  28464. },
  28465. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  28466. computeBtnTransfer: function computeBtnTransfer() {
  28467. var $xeSelect = this;
  28468. var props = $xeSelect;
  28469. var $xeTable = $xeSelect.$xeTable;
  28470. var $xeModal = $xeSelect.$xeModal;
  28471. var $xeParentDrawer = $xeSelect.$xeParentDrawer;
  28472. var $xeForm = $xeSelect.$xeForm;
  28473. var transfer = props.transfer;
  28474. if (transfer === null) {
  28475. var globalTransfer = getConfig().select.transfer;
  28476. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  28477. return globalTransfer;
  28478. }
  28479. if ($xeTable || $xeModal || $xeParentDrawer || $xeForm) {
  28480. return true;
  28481. }
  28482. }
  28483. return transfer;
  28484. },
  28485. computeDragType: function computeDragType() {
  28486. var $xeDrawer = this;
  28487. var props = $xeDrawer;
  28488. switch (props.position) {
  28489. case 'top':
  28490. return 'sb';
  28491. case 'bottom':
  28492. return 'st';
  28493. case 'left':
  28494. return 'wr';
  28495. }
  28496. return 'wl';
  28497. }
  28498. }),
  28499. methods: {
  28500. //
  28501. // Method
  28502. //
  28503. dispatchEvent: function dispatchEvent(type, params, evnt) {
  28504. var $xeDrawer = this;
  28505. $xeDrawer.$emit(type, createEvent(evnt, {
  28506. $drawer: $xeDrawer
  28507. }, params));
  28508. },
  28509. emitModel: function emitModel(value) {
  28510. var $xeDrawer = this;
  28511. var _events = $xeDrawer._events;
  28512. $xeDrawer.$emit('input', value);
  28513. if (_events && _events.modelValue) {
  28514. $xeDrawer.$emit('modelValue', value);
  28515. } else {
  28516. $xeDrawer.$emit('model-value', value);
  28517. }
  28518. },
  28519. callSlot: function callSlot(slotFunc, params, h) {
  28520. var $xeDrawer = this;
  28521. var slots = $xeDrawer.$scopedSlots;
  28522. if (slotFunc) {
  28523. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  28524. slotFunc = slots[slotFunc] || null;
  28525. }
  28526. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  28527. return vn_getSlotVNs(slotFunc.call($xeDrawer, params, h));
  28528. }
  28529. }
  28530. return [];
  28531. },
  28532. open: function open() {
  28533. var $xeDrawer = this;
  28534. return $xeDrawer.openDrawer();
  28535. },
  28536. close: function close() {
  28537. var $xeDrawer = this;
  28538. return $xeDrawer.closeDrawer('close');
  28539. },
  28540. getBox: function getBox() {
  28541. var $xeDrawer = this;
  28542. var boxElem = $xeDrawer.$refs.refDrawerBox;
  28543. return boxElem;
  28544. },
  28545. recalculate: function recalculate() {
  28546. var $xeDrawer = this;
  28547. var props = $xeDrawer;
  28548. var width = props.width,
  28549. height = props.height;
  28550. var boxElem = $xeDrawer.getBox();
  28551. if (boxElem) {
  28552. boxElem.style.width = toCssUnit(width);
  28553. boxElem.style.height = toCssUnit(height);
  28554. }
  28555. return $xeDrawer.$nextTick();
  28556. },
  28557. updateZindex: function updateZindex() {
  28558. var $xeDrawer = this;
  28559. var props = $xeDrawer;
  28560. var reactData = $xeDrawer.reactData;
  28561. var zIndex = props.zIndex;
  28562. var drawerZIndex = reactData.drawerZIndex;
  28563. if (zIndex) {
  28564. reactData.drawerZIndex = zIndex;
  28565. } else if (drawerZIndex < getLastZIndex()) {
  28566. reactData.drawerZIndex = nextZIndex();
  28567. }
  28568. },
  28569. closeDrawer: function closeDrawer(type) {
  28570. var $xeDrawer = this;
  28571. var props = $xeDrawer;
  28572. var reactData = $xeDrawer.reactData;
  28573. var beforeHideMethod = props.beforeHideMethod;
  28574. var visible = reactData.visible;
  28575. var params = {
  28576. type: type
  28577. };
  28578. if (visible) {
  28579. Promise.resolve(beforeHideMethod ? beforeHideMethod(params) : null).then(function (rest) {
  28580. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(rest)) {
  28581. reactData.contentVisible = false;
  28582. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(allActiveDrawers, function (item) {
  28583. return item === $xeDrawer;
  28584. });
  28585. $xeDrawer.dispatchEvent('before-hide', params, null);
  28586. setTimeout(function () {
  28587. reactData.visible = false;
  28588. $xeDrawer.emitModel(false);
  28589. $xeDrawer.dispatchEvent('hide', params, null);
  28590. }, 200);
  28591. }
  28592. }).catch(function (e) {
  28593. return e;
  28594. });
  28595. }
  28596. return $xeDrawer.$nextTick();
  28597. },
  28598. closeEvent: function closeEvent(evnt) {
  28599. var $xeDrawer = this;
  28600. var type = 'close';
  28601. $xeDrawer.dispatchEvent(type, {
  28602. type: type
  28603. }, evnt);
  28604. $xeDrawer.closeDrawer(type);
  28605. },
  28606. confirmEvent: function confirmEvent(evnt) {
  28607. var $xeDrawer = this;
  28608. var props = $xeDrawer;
  28609. var confirmClosable = props.confirmClosable;
  28610. var type = 'confirm';
  28611. $xeDrawer.dispatchEvent(type, {
  28612. type: type
  28613. }, evnt);
  28614. if (confirmClosable) {
  28615. $xeDrawer.closeDrawer(type);
  28616. }
  28617. },
  28618. cancelEvent: function cancelEvent(evnt) {
  28619. var $xeDrawer = this;
  28620. var props = $xeDrawer;
  28621. var cancelClosable = props.cancelClosable;
  28622. var type = 'cancel';
  28623. $xeDrawer.dispatchEvent(type, {
  28624. type: type
  28625. }, evnt);
  28626. if (cancelClosable) {
  28627. $xeDrawer.closeDrawer(type);
  28628. }
  28629. },
  28630. openDrawer: function openDrawer() {
  28631. var $xeDrawer = this;
  28632. var props = $xeDrawer;
  28633. var reactData = $xeDrawer.reactData;
  28634. var showFooter = props.showFooter;
  28635. var initialized = reactData.initialized,
  28636. visible = reactData.visible;
  28637. var btnTransfer = $xeDrawer.computeBtnTransfer;
  28638. if (!initialized) {
  28639. reactData.initialized = true;
  28640. if (btnTransfer) {
  28641. var panelElem = $xeDrawer.$refs.refElem;
  28642. document.body.appendChild(panelElem);
  28643. }
  28644. }
  28645. if (!visible) {
  28646. reactData.visible = true;
  28647. reactData.contentVisible = false;
  28648. $xeDrawer.updateZindex();
  28649. allActiveDrawers.push($xeDrawer);
  28650. setTimeout(function () {
  28651. $xeDrawer.recalculate();
  28652. reactData.contentVisible = true;
  28653. $xeDrawer.$nextTick(function () {
  28654. if (showFooter) {
  28655. var confirmBtn = $xeDrawer.$refs.refConfirmBtn;
  28656. var cancelBtn = $xeDrawer.$refs.refCancelBtn;
  28657. var operBtn = confirmBtn || cancelBtn;
  28658. if (operBtn) {
  28659. operBtn.focus();
  28660. }
  28661. }
  28662. var type = '';
  28663. var params = {
  28664. type: type
  28665. };
  28666. $xeDrawer.emitModel(true);
  28667. $xeDrawer.dispatchEvent('show', params, null);
  28668. });
  28669. }, 10);
  28670. }
  28671. return $xeDrawer.$nextTick();
  28672. },
  28673. selfClickEvent: function selfClickEvent(evnt) {
  28674. var $xeDrawer = this;
  28675. var props = $xeDrawer;
  28676. var el = $xeDrawer.$refs.refElem;
  28677. if (props.maskClosable && evnt.target === el) {
  28678. var type = 'mask';
  28679. $xeDrawer.closeDrawer(type);
  28680. }
  28681. },
  28682. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  28683. var $xeDrawer = this;
  28684. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  28685. if (isEsc) {
  28686. var lastDrawer = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().max(allActiveDrawers, function (item) {
  28687. return item.reactData.drawerZIndex;
  28688. });
  28689. // 多个时,只关掉最上层的窗口
  28690. if (lastDrawer) {
  28691. setTimeout(function () {
  28692. if (lastDrawer === $xeDrawer && lastDrawer.escClosable) {
  28693. var type = 'exit';
  28694. $xeDrawer.dispatchEvent('close', {
  28695. type: type
  28696. }, evnt);
  28697. $xeDrawer.closeDrawer(type);
  28698. }
  28699. }, 10);
  28700. }
  28701. }
  28702. },
  28703. boxMousedownEvent: function boxMousedownEvent() {
  28704. var $xeDrawer = this;
  28705. var reactData = $xeDrawer.reactData;
  28706. var drawerZIndex = reactData.drawerZIndex;
  28707. if (allActiveDrawers.some(function (comp) {
  28708. return comp.reactData.visible && comp.reactData.drawerZIndex > drawerZIndex;
  28709. })) {
  28710. $xeDrawer.updateZindex();
  28711. }
  28712. },
  28713. dragEvent: function dragEvent(evnt) {
  28714. var $xeModal = this;
  28715. var reactData = $xeModal.reactData;
  28716. evnt.preventDefault();
  28717. var _getDomNode = getDomNode(),
  28718. visibleHeight = _getDomNode.visibleHeight,
  28719. visibleWidth = _getDomNode.visibleWidth;
  28720. var marginSize = 0;
  28721. var targetElem = evnt.target;
  28722. var type = targetElem.getAttribute('type');
  28723. var minWidth = 0;
  28724. var minHeight = 0;
  28725. var maxWidth = visibleWidth;
  28726. var maxHeight = visibleHeight;
  28727. var boxElem = $xeModal.getBox();
  28728. var clientWidth = boxElem.clientWidth;
  28729. var clientHeight = boxElem.clientHeight;
  28730. var disX = evnt.clientX;
  28731. var disY = evnt.clientY;
  28732. var offsetTop = boxElem.offsetTop;
  28733. var offsetLeft = boxElem.offsetLeft;
  28734. var params = {
  28735. type: 'resize'
  28736. };
  28737. document.onmousemove = function (evnt) {
  28738. evnt.preventDefault();
  28739. var dragLeft;
  28740. var dragTop;
  28741. var width;
  28742. var height;
  28743. switch (type) {
  28744. case 'wl':
  28745. dragLeft = disX - evnt.clientX;
  28746. width = dragLeft + clientWidth;
  28747. if (offsetLeft - dragLeft > marginSize) {
  28748. if (width > minWidth) {
  28749. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  28750. }
  28751. }
  28752. break;
  28753. case 'st':
  28754. dragTop = disY - evnt.clientY;
  28755. height = clientHeight + dragTop;
  28756. if (offsetTop - dragTop > marginSize) {
  28757. if (height > minHeight) {
  28758. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  28759. }
  28760. }
  28761. break;
  28762. case 'wr':
  28763. dragLeft = evnt.clientX - disX;
  28764. width = dragLeft + clientWidth;
  28765. if (offsetLeft + width + marginSize < visibleWidth) {
  28766. if (width > minWidth) {
  28767. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  28768. }
  28769. }
  28770. break;
  28771. case 'sb':
  28772. dragTop = evnt.clientY - disY;
  28773. height = dragTop + clientHeight;
  28774. if (offsetTop + height + marginSize < visibleHeight) {
  28775. if (height > minHeight) {
  28776. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  28777. }
  28778. }
  28779. break;
  28780. }
  28781. boxElem.className = boxElem.className.replace(/\s?is--drag/, '') + ' is--drag';
  28782. $xeModal.dispatchEvent('resize', params, evnt);
  28783. reactData.resizeFlag++;
  28784. };
  28785. document.onmouseup = function () {
  28786. document.onmousemove = null;
  28787. document.onmouseup = null;
  28788. reactData.resizeFlag++;
  28789. setTimeout(function () {
  28790. boxElem.className = boxElem.className.replace(/\s?is--drag/, '');
  28791. }, 50);
  28792. };
  28793. },
  28794. //
  28795. // Render
  28796. //
  28797. renderTitles: function renderTitles(h) {
  28798. var $xeDrawer = this;
  28799. var props = $xeDrawer;
  28800. var slots = $xeDrawer.$scopedSlots;
  28801. var _props$slots = props.slots,
  28802. propSlots = _props$slots === void 0 ? {} : _props$slots,
  28803. showClose = props.showClose,
  28804. title = props.title;
  28805. var titleSlot = slots.title || propSlots.title;
  28806. var cornerSlot = slots.corner || propSlots.corner;
  28807. return [h('div', {
  28808. class: 'vxe-drawer--header-title'
  28809. }, titleSlot ? $xeDrawer.callSlot(titleSlot, {
  28810. $drawer: $xeDrawer
  28811. }, h) : title ? getFuncText(title) : getI18n('vxe.alert.title')), h('div', {
  28812. class: 'vxe-drawer--header-right'
  28813. }, [cornerSlot ? h('div', {
  28814. class: 'vxe-drawer--corner-wrapper'
  28815. }, $xeDrawer.callSlot(cornerSlot, {
  28816. $drawer: $xeDrawer
  28817. }, h)) : renderEmptyElement($xeDrawer), showClose ? h('div', {
  28818. class: ['vxe-drawer--close-btn', 'trigger--btn'],
  28819. attrs: {
  28820. title: getI18n('vxe.drawer.close')
  28821. },
  28822. on: {
  28823. click: $xeDrawer.closeEvent
  28824. }
  28825. }, [h('i', {
  28826. class: getIcon().DRAWER_CLOSE
  28827. })]) : renderEmptyElement($xeDrawer)])];
  28828. },
  28829. renderHeader: function renderHeader(h) {
  28830. var $xeDrawer = this;
  28831. var props = $xeDrawer;
  28832. var slots = $xeDrawer.$scopedSlots;
  28833. var _props$slots2 = props.slots,
  28834. propSlots = _props$slots2 === void 0 ? {} : _props$slots2,
  28835. showTitleOverflow = props.showTitleOverflow;
  28836. var headerSlot = slots.header || propSlots.header;
  28837. if (props.showHeader) {
  28838. return h('div', {
  28839. class: ['vxe-drawer--header', {
  28840. 'is--ellipsis': showTitleOverflow
  28841. }]
  28842. }, headerSlot ? $xeDrawer.callSlot(headerSlot, {
  28843. $drawer: $xeDrawer
  28844. }, h) : $xeDrawer.renderTitles(h));
  28845. }
  28846. return renderEmptyElement($xeDrawer);
  28847. },
  28848. renderBody: function renderBody(h) {
  28849. var $xeDrawer = this;
  28850. var props = $xeDrawer;
  28851. var slots = $xeDrawer.$scopedSlots;
  28852. var _props$slots3 = props.slots,
  28853. propSlots = _props$slots3 === void 0 ? {} : _props$slots3,
  28854. content = props.content;
  28855. var defaultSlot = slots.default || propSlots.default;
  28856. var leftSlot = slots.left || propSlots.left;
  28857. var rightSlot = slots.right || propSlots.right;
  28858. return h('div', {
  28859. class: 'vxe-drawer--body'
  28860. }, [leftSlot ? h('div', {
  28861. class: 'vxe-drawer--body-left'
  28862. }, $xeDrawer.callSlot(leftSlot, {
  28863. $drawer: $xeDrawer
  28864. }, h)) : renderEmptyElement($xeDrawer), h('div', {
  28865. class: 'vxe-drawer--body-default'
  28866. }, [h('div', {
  28867. class: 'vxe-drawer--content'
  28868. }, defaultSlot ? $xeDrawer.callSlot(defaultSlot, {
  28869. $drawer: $xeDrawer
  28870. }, h) : getFuncText(content))]), rightSlot ? h('div', {
  28871. class: 'vxe-drawer--body-right'
  28872. }, $xeDrawer.callSlot(rightSlot, {
  28873. $drawer: $xeDrawer
  28874. }, h)) : renderEmptyElement($xeDrawer), h(packages_loading, {
  28875. class: 'vxe-drawer--loading',
  28876. props: {
  28877. value: props.loading
  28878. }
  28879. })]);
  28880. },
  28881. renderDefaultFooter: function renderDefaultFooter(h) {
  28882. var $xeDrawer = this;
  28883. var props = $xeDrawer;
  28884. var slots = $xeDrawer.$scopedSlots;
  28885. var _props$slots4 = props.slots,
  28886. propSlots = _props$slots4 === void 0 ? {} : _props$slots4,
  28887. showCancelButton = props.showCancelButton,
  28888. showConfirmButton = props.showConfirmButton,
  28889. loading = props.loading;
  28890. var lfSlot = slots.leftfoot || propSlots.leftfoot;
  28891. var rfSlot = slots.rightfoot || propSlots.rightfoot;
  28892. var btnVNs = [];
  28893. if (showCancelButton) {
  28894. btnVNs.push(h(src_button, {
  28895. key: 1,
  28896. ref: 'refCancelBtn',
  28897. props: {
  28898. content: props.cancelButtonText || getI18n('vxe.button.cancel')
  28899. },
  28900. on: {
  28901. click: $xeDrawer.cancelEvent
  28902. }
  28903. }));
  28904. }
  28905. if (showConfirmButton) {
  28906. btnVNs.push(h(src_button, {
  28907. key: 2,
  28908. ref: 'refConfirmBtn',
  28909. props: {
  28910. status: 'primary',
  28911. loading: loading,
  28912. content: props.confirmButtonText || getI18n('vxe.button.confirm')
  28913. },
  28914. on: {
  28915. click: $xeDrawer.confirmEvent
  28916. }
  28917. }));
  28918. }
  28919. return h('div', {
  28920. class: 'vxe-drawer--footer-wrapper'
  28921. }, [h('div', {
  28922. class: 'vxe-drawer--footer-left'
  28923. }, lfSlot ? $xeDrawer.callSlot(lfSlot, {
  28924. $drawer: $xeDrawer
  28925. }, h) : []), h('div', {
  28926. class: 'vxe-drawer--footer-right'
  28927. }, rfSlot ? $xeDrawer.callSlot(rfSlot, {
  28928. $drawer: $xeDrawer
  28929. }, h) : btnVNs)]);
  28930. },
  28931. renderFooter: function renderFooter(h) {
  28932. var $xeDrawer = this;
  28933. var props = $xeDrawer;
  28934. var slots = $xeDrawer.$scopedSlots;
  28935. var _props$slots5 = props.slots,
  28936. propSlots = _props$slots5 === void 0 ? {} : _props$slots5;
  28937. var footerSlot = slots.footer || propSlots.footer;
  28938. if (props.showFooter) {
  28939. return h('div', {
  28940. class: 'vxe-drawer--footer'
  28941. }, footerSlot ? $xeDrawer.callSlot(footerSlot, {
  28942. $drawer: $xeDrawer
  28943. }, h) : [$xeDrawer.renderDefaultFooter(h)]);
  28944. }
  28945. return renderEmptyElement($xeDrawer);
  28946. },
  28947. renderVN: function renderVN(h) {
  28948. var $xeDrawer = this;
  28949. var props = $xeDrawer;
  28950. var slots = $xeDrawer.$scopedSlots;
  28951. var reactData = $xeDrawer.reactData;
  28952. var _props$slots6 = props.slots,
  28953. propSlots = _props$slots6 === void 0 ? {} : _props$slots6,
  28954. className = props.className,
  28955. position = props.position,
  28956. loading = props.loading,
  28957. lockScroll = props.lockScroll,
  28958. padding = props.padding,
  28959. lockView = props.lockView,
  28960. mask = props.mask,
  28961. resize = props.resize,
  28962. destroyOnClose = props.destroyOnClose;
  28963. var initialized = reactData.initialized,
  28964. contentVisible = reactData.contentVisible,
  28965. visible = reactData.visible;
  28966. var asideSlot = slots.aside || propSlots.aside;
  28967. var vSize = $xeDrawer.computeSize;
  28968. var dragType = $xeDrawer.computeDragType;
  28969. return h('div', {
  28970. ref: 'refElem',
  28971. class: ['vxe-drawer--wrapper', "pos--".concat(position), className || '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--padding', padding), 'lock--scroll', lockScroll), 'lock--view', lockView), 'is--mask', mask), 'is--visible', contentVisible), 'is--active', visible), 'is--loading', loading)],
  28972. style: {
  28973. zIndex: reactData.drawerZIndex
  28974. },
  28975. on: {
  28976. click: $xeDrawer.selfClickEvent
  28977. }
  28978. }, initialized ? [h('div', {
  28979. ref: 'refDrawerBox',
  28980. class: 'vxe-drawer--box',
  28981. on: {
  28982. mousedown: $xeDrawer.boxMousedownEvent
  28983. }
  28984. }, [asideSlot ? h('div', {
  28985. class: 'vxe-drawer--aside'
  28986. }, $xeDrawer.callSlot(asideSlot, {
  28987. $drawer: $xeDrawer
  28988. }, h)) : renderEmptyElement($xeDrawer), h('div', {
  28989. class: 'vxe-drawer--container'
  28990. }, !reactData.initialized || destroyOnClose && !reactData.visible ? [] : [$xeDrawer.renderHeader(h), $xeDrawer.renderBody(h), $xeDrawer.renderFooter(h), resize ? h('span', {
  28991. class: 'vxe-drawer--resize'
  28992. }, [h('span', {
  28993. class: "".concat(dragType, "-resize"),
  28994. attrs: {
  28995. type: dragType
  28996. },
  28997. on: {
  28998. mousedown: $xeDrawer.dragEvent
  28999. }
  29000. })]) : renderEmptyElement($xeDrawer)])])] : []);
  29001. }
  29002. },
  29003. watch: {
  29004. width: function width() {
  29005. var $xeDrawer = this;
  29006. $xeDrawer.recalculate();
  29007. },
  29008. height: function height() {
  29009. var $xeDrawer = this;
  29010. $xeDrawer.recalculate();
  29011. },
  29012. value: function value(val) {
  29013. var $xeDrawer = this;
  29014. if (val) {
  29015. $xeDrawer.openDrawer();
  29016. } else {
  29017. $xeDrawer.closeDrawer('model');
  29018. }
  29019. }
  29020. },
  29021. mounted: function mounted() {
  29022. var $xeDrawer = this;
  29023. var props = $xeDrawer;
  29024. $xeDrawer.$nextTick(function () {
  29025. if (props.value) {
  29026. $xeDrawer.openDrawer();
  29027. }
  29028. });
  29029. if (props.escClosable) {
  29030. globalEvents.on($xeDrawer, 'keydown', $xeDrawer.handleGlobalKeydownEvent);
  29031. }
  29032. },
  29033. beforeDestroy: function beforeDestroy() {
  29034. var $xeDrawer = this;
  29035. var panelElem = $xeDrawer.$refs.refElem;
  29036. if (panelElem && panelElem.parentNode) {
  29037. panelElem.parentNode.removeChild(panelElem);
  29038. }
  29039. globalEvents.off($xeDrawer, 'keydown');
  29040. },
  29041. render: function render(h) {
  29042. return this.renderVN(h);
  29043. }
  29044. })); /* define-vxe-component end */
  29045. ;// CONCATENATED MODULE: ./packages/drawer/index.ts
  29046. function handleDrawer(options) {
  29047. // 使用动态组件渲染动态弹框
  29048. checkDynamic();
  29049. return new Promise(function (resolve) {
  29050. var opts = Object.assign({}, options);
  29051. if (opts.id && allActiveDrawers.some(function (comp) {
  29052. return comp.id === opts.id;
  29053. })) {
  29054. resolve('exist');
  29055. } else {
  29056. var events = Object.assign({}, opts.events);
  29057. var drawerOpts = {
  29058. key: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  29059. props: Object.assign(opts, {
  29060. value: true
  29061. }),
  29062. on: _objectSpread2(_objectSpread2({}, events), {}, {
  29063. hide: function hide(params) {
  29064. var modalList = dynamicStore.modals;
  29065. if (events.hide) {
  29066. events.hide.call(this, params);
  29067. }
  29068. dynamicStore.modals = modalList.filter(function (item) {
  29069. return item.key !== drawerOpts.key;
  29070. });
  29071. resolve(params.type);
  29072. }
  29073. })
  29074. };
  29075. dynamicStore.drawers.push(drawerOpts);
  29076. }
  29077. });
  29078. }
  29079. function getDrawer(id) {
  29080. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(allActiveDrawers, function ($drawer) {
  29081. return $drawer.id === id;
  29082. });
  29083. }
  29084. /**
  29085. * 全局关闭动态的活动窗口(只能用于关闭动态的创建的活动窗口)
  29086. * 如果传 id 则关闭指定的窗口
  29087. * 如果不传则关闭所有窗口
  29088. */
  29089. function closeDrawer(id) {
  29090. var drawers = id ? [getDrawer(id)] : allActiveDrawers;
  29091. var restPromises = [];
  29092. drawers.forEach(function ($drawer) {
  29093. if ($drawer) {
  29094. restPromises.push($drawer.close());
  29095. }
  29096. });
  29097. return Promise.all(restPromises);
  29098. }
  29099. function openDrawer(options) {
  29100. return handleDrawer(Object.assign({}, options));
  29101. }
  29102. var DrawerController = {
  29103. get: getDrawer,
  29104. close: closeDrawer,
  29105. open: openDrawer
  29106. };
  29107. var VxeDrawer = Object.assign(drawer, {
  29108. install: function install(app) {
  29109. app.component(drawer.name, drawer);
  29110. }
  29111. });
  29112. index_esm_VxeUI.drawer = DrawerController;
  29113. dynamicApp.use(VxeDrawer);
  29114. index_esm_VxeUI.component(drawer);
  29115. var Drawer = VxeDrawer;
  29116. /* harmony default export */ var packages_drawer = (VxeDrawer);
  29117. ;// CONCATENATED MODULE: ./packages/empty/src/empty.ts
  29118. /* harmony default export */ var empty = (/* define-vxe-component start */defineVxeComponent({
  29119. name: 'VxeEmpty',
  29120. props: {
  29121. imageUrl: String,
  29122. imageStyle: Object,
  29123. icon: String,
  29124. status: String,
  29125. content: [String, Number]
  29126. },
  29127. data: function data() {
  29128. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  29129. var reactData = {};
  29130. return {
  29131. xID: xID,
  29132. reactData: reactData
  29133. };
  29134. },
  29135. methods: {
  29136. //
  29137. // Method
  29138. //
  29139. dispatchEvent: function dispatchEvent(type, params, evnt) {
  29140. var $xeEmpty = this;
  29141. $xeEmpty.$emit(type, createEvent(evnt, {
  29142. $empty: $xeEmpty
  29143. }, params));
  29144. },
  29145. //
  29146. // Render
  29147. //
  29148. renderVN: function renderVN(h) {
  29149. var $xeEmpty = this;
  29150. var props = $xeEmpty;
  29151. var imageUrl = props.imageUrl,
  29152. imageStyle = props.imageStyle,
  29153. icon = props.icon,
  29154. status = props.status,
  29155. content = props.content;
  29156. return h('div', {
  29157. ref: 'refElem',
  29158. class: ['vxe-empty', _defineProperty({}, "theme--".concat(status), status)]
  29159. }, [h('div', {
  29160. class: 'vxe-empty--inner'
  29161. }, [imageUrl ? h('div', {
  29162. class: 'vxe-empty--img-wrapper'
  29163. }, [h('img', {
  29164. attrs: {
  29165. src: imageUrl
  29166. },
  29167. style: imageStyle
  29168. })]) : h('div', {
  29169. class: 'vxe-empty--icon-wrapper'
  29170. }, [h('i', {
  29171. class: icon || getIcon().EMPTY_DEFAULT
  29172. })]), h('div', {
  29173. class: 'vxe-empty--content-wrapper'
  29174. }, "".concat(content || getI18n('vxe.empty.defText')))])]);
  29175. }
  29176. },
  29177. render: function render(h) {
  29178. return this.renderVN(h);
  29179. }
  29180. })); /* define-vxe-component end */
  29181. ;// CONCATENATED MODULE: ./packages/empty/index.ts
  29182. var Vxeempty = Object.assign({}, empty, {
  29183. install: function install(app) {
  29184. app.component(empty.name, empty);
  29185. }
  29186. });
  29187. dynamicApp.use(Vxeempty);
  29188. index_esm_VxeUI.component(empty);
  29189. var empty_empty = Vxeempty;
  29190. /* harmony default export */ var packages_empty = (Vxeempty);
  29191. ;// CONCATENATED MODULE: ./packages/form/src/itemInfo.ts
  29192. var ItemInfo = /*#__PURE__*/function () {
  29193. function ItemInfo($xeForm, item) {
  29194. _classCallCheck(this, ItemInfo);
  29195. var field = item.field,
  29196. itemRender = item.itemRender,
  29197. formatter = item.formatter;
  29198. if (formatter) {
  29199. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
  29200. var gFormatOpts = formats.get(formatter);
  29201. if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
  29202. errLog('vxe.error.notFormats', ["[form] ".concat(formatter)]);
  29203. }
  29204. } else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
  29205. var _gFormatOpts = formats.get(formatter[0]);
  29206. if (!_gFormatOpts || !_gFormatOpts.formItemFormatMethod) {
  29207. errLog('vxe.error.notFormats', ["[form] ".concat(formatter[0])]);
  29208. }
  29209. }
  29210. }
  29211. if (field && itemRender) {
  29212. if (itemRender.startField && "".concat(itemRender.startField).indexOf(field) >= 0) {
  29213. errLog('vxe.error.modelConflicts', ["[form] field=".concat(field), "item-render.startField=".concat(itemRender.startField)]);
  29214. }
  29215. if (itemRender.endField && "".concat(itemRender.endField).indexOf(field) >= 0) {
  29216. errLog('vxe.error.modelConflicts', ["[form] field=".concat(field), "item-render.endField=".concat(itemRender.endField)]);
  29217. }
  29218. }
  29219. Object.assign(this, {
  29220. id: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('item_'),
  29221. title: item.title,
  29222. field: field,
  29223. span: item.span,
  29224. align: item.align,
  29225. verticalAlign: item.verticalAlign,
  29226. titleBackground: item.titleBackground,
  29227. titleBold: item.titleBold,
  29228. titleAlign: item.titleAlign,
  29229. titleWidth: item.titleWidth,
  29230. titleColon: item.titleColon,
  29231. vertical: item.vertical,
  29232. padding: item.padding,
  29233. titleAsterisk: item.titleAsterisk,
  29234. titlePrefix: item.titlePrefix,
  29235. titleSuffix: item.titleSuffix,
  29236. titleOverflow: item.titleOverflow,
  29237. showTitle: item.showTitle,
  29238. resetValue: item.resetValue,
  29239. visibleMethod: item.visibleMethod,
  29240. visible: item.visible,
  29241. showContent: item.showContent,
  29242. folding: item.folding,
  29243. collapseNode: item.collapseNode,
  29244. className: item.className,
  29245. contentClassName: item.contentClassName,
  29246. contentStyle: item.contentStyle,
  29247. titleClassName: item.titleClassName,
  29248. titleStyle: item.titleStyle,
  29249. itemRender: itemRender,
  29250. rules: item.rules,
  29251. formatter: item.formatter,
  29252. // 自定义参数
  29253. params: item.params,
  29254. // 渲染属性
  29255. showError: false,
  29256. showIconMsg: false,
  29257. errRule: null,
  29258. slots: item.slots,
  29259. children: []
  29260. });
  29261. }
  29262. return _createClass(ItemInfo, [{
  29263. key: "update",
  29264. value: function update(name, value) {
  29265. this[name] = value;
  29266. }
  29267. }]);
  29268. }();
  29269. ;// CONCATENATED MODULE: ./packages/form/src/util.ts
  29270. function isFormItem(item) {
  29271. return item instanceof ItemInfo;
  29272. }
  29273. function createItem($xeForm, _vm) {
  29274. return isFormItem(_vm) ? _vm : new ItemInfo($xeForm, _vm);
  29275. }
  29276. function handleFieldOrItem($xeForm, fieldOrItem) {
  29277. if (fieldOrItem) {
  29278. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(fieldOrItem) ? $xeForm.getItemByField(fieldOrItem) : fieldOrItem;
  29279. }
  29280. return null;
  29281. }
  29282. function isHiddenItem($xeForm, formItem) {
  29283. var reactData = $xeForm.reactData;
  29284. var collapseAll = reactData.collapseAll;
  29285. var folding = formItem.folding,
  29286. visible = formItem.visible;
  29287. return visible === false || folding && collapseAll;
  29288. }
  29289. function isActiveItem($xeForm, formItem) {
  29290. var $xeGrid = $xeForm.$xeGrid;
  29291. var visibleMethod = formItem.visibleMethod,
  29292. itemRender = formItem.itemRender,
  29293. visible = formItem.visible,
  29294. field = formItem.field;
  29295. if (visible === false) {
  29296. return visible;
  29297. }
  29298. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  29299. var fiVisibleMethod = compConf ? compConf.formItemVisibleMethod || compConf.itemVisibleMethod : null;
  29300. if (!visibleMethod && fiVisibleMethod) {
  29301. visibleMethod = fiVisibleMethod;
  29302. }
  29303. if (!visibleMethod) {
  29304. return true;
  29305. }
  29306. var formProps = $xeForm;
  29307. var data = formProps.data;
  29308. return visibleMethod({
  29309. data: data,
  29310. field: field,
  29311. property: field,
  29312. item: formItem,
  29313. $form: $xeForm,
  29314. $grid: $xeGrid
  29315. });
  29316. }
  29317. function watchItem(_vm, formItemPropKeys, formItem) {
  29318. formItemPropKeys.forEach(function (name) {
  29319. _vm.$watch(name, function (val) {
  29320. formItem.update(name, val);
  29321. });
  29322. });
  29323. }
  29324. function assembleItem($xeForm, el, formItem, formGroup) {
  29325. var reactData = $xeForm.reactData;
  29326. var formProps = $xeForm;
  29327. var customLayout = formProps.customLayout;
  29328. var staticItems = reactData.staticItems;
  29329. if (customLayout) {
  29330. if (!staticItems.some(function (item) {
  29331. return item.id === formItem.id;
  29332. })) {
  29333. staticItems.push(formItem);
  29334. }
  29335. } else {
  29336. if (el) {
  29337. var parentElem = el.parentNode;
  29338. var parentItem = formGroup ? formGroup.formItem : null;
  29339. var parentItems = parentItem ? parentItem.children : staticItems;
  29340. if (parentElem) {
  29341. parentItems.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, el), 0, formItem);
  29342. reactData.staticItems = staticItems.slice(0);
  29343. }
  29344. }
  29345. }
  29346. }
  29347. function destroyItem($xeForm, formItem) {
  29348. var reactData = $xeForm.reactData;
  29349. var staticItems = reactData.staticItems;
  29350. var index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, function (item) {
  29351. return item.id === formItem.id;
  29352. });
  29353. if (index > -1) {
  29354. staticItems.splice(index, 1);
  29355. }
  29356. reactData.staticItems = staticItems.slice(0);
  29357. }
  29358. ;// CONCATENATED MODULE: ./packages/icon/src/icon.ts
  29359. /* harmony default export */ var icon = (/* define-vxe-component start */defineVxeComponent({
  29360. name: 'VxeIcon',
  29361. mixins: [globalMixins.sizeMixin],
  29362. props: {
  29363. name: String,
  29364. className: String,
  29365. roll: Boolean,
  29366. status: String,
  29367. size: {
  29368. type: String,
  29369. default: function _default() {
  29370. return getConfig().icon.size || getConfig().size;
  29371. }
  29372. }
  29373. },
  29374. data: function data() {
  29375. var reactData = {};
  29376. return {
  29377. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  29378. reactData: reactData
  29379. };
  29380. },
  29381. computed: _objectSpread2({}, {}),
  29382. methods: {
  29383. //
  29384. // Method
  29385. //
  29386. dispatchEvent: function dispatchEvent(type, params, evnt) {
  29387. var $xeIcon = this;
  29388. $xeIcon.$emit(type, createEvent(evnt, {
  29389. $icon: $xeIcon
  29390. }, params));
  29391. },
  29392. clickEvent: function clickEvent(evnt) {
  29393. var $xeIcon = this;
  29394. $xeIcon.dispatchEvent('click', {}, evnt);
  29395. },
  29396. //
  29397. // Render
  29398. //
  29399. renderVN: function renderVN(h) {
  29400. var $xeIcon = this;
  29401. var props = $xeIcon;
  29402. var name = props.name,
  29403. roll = props.roll,
  29404. status = props.status,
  29405. className = props.className;
  29406. var vSize = $xeIcon.computeSize;
  29407. return h('i', {
  29408. class: ['vxe-icon', "vxe-icon-".concat(name), "".concat(className || ''), _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), "roll", roll)],
  29409. on: {
  29410. click: $xeIcon.clickEvent
  29411. }
  29412. });
  29413. }
  29414. },
  29415. render: function render(h) {
  29416. return this.renderVN(h);
  29417. }
  29418. })); /* define-vxe-component end */
  29419. ;// CONCATENATED MODULE: ./packages/form/src/render.ts
  29420. function renderPrefixIcon(h, titlePrefix) {
  29421. return h('span', {
  29422. class: 'vxe-form--item-title-tip-prefix'
  29423. }, [h(icon, {
  29424. class: titlePrefix.icon || getIcon().FORM_PREFIX,
  29425. props: {
  29426. status: titlePrefix.iconStatus
  29427. }
  29428. })]);
  29429. }
  29430. function renderSuffixIcon(h, titleSuffix) {
  29431. return h('span', {
  29432. class: 'vxe-form--item-title-tip-suffix'
  29433. }, [h(icon, {
  29434. class: titleSuffix.icon || getIcon().FORM_SUFFIX,
  29435. props: {
  29436. status: titleSuffix.iconStatus
  29437. }
  29438. })]);
  29439. }
  29440. function getItemClass($xeForm, item, isGroup) {
  29441. var _ref;
  29442. var formProps = $xeForm;
  29443. var formReactData = $xeForm.reactData;
  29444. var $xeGrid = $xeForm.$xeGrid;
  29445. var data = formProps.data,
  29446. rules = formProps.rules,
  29447. readonly = formProps.readonly,
  29448. disabled = formProps.disabled,
  29449. allSpan = formProps.span,
  29450. allTitleBackground = formProps.titleBackground,
  29451. allTitleBold = formProps.titleBold,
  29452. allTitleColon = formProps.titleColon,
  29453. allTitleAsterisk = formProps.titleAsterisk,
  29454. allVertical = formProps.vertical,
  29455. allPadding = formProps.padding;
  29456. var collapseAll = formReactData.collapseAll;
  29457. var folding = item.folding,
  29458. field = item.field,
  29459. itemRender = item.itemRender,
  29460. showError = item.showError,
  29461. className = item.className,
  29462. vertical = item.vertical,
  29463. padding = item.padding,
  29464. children = item.children,
  29465. showContent = item.showContent;
  29466. var vSize = $xeForm.computeSize;
  29467. var validOpts = $xeForm.computeValidOpts;
  29468. var showErrorMessage = validOpts.showErrorMessage,
  29469. showMessage = validOpts.showMessage,
  29470. showErrorIcon = validOpts.showErrorIcon;
  29471. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  29472. var itemClassName = compConf ? compConf.formItemClassName || compConf.itemClassName : '';
  29473. var span = item.span || allSpan;
  29474. var itemPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(padding) ? allPadding : padding;
  29475. var itemVertical = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(vertical) ? allVertical : vertical;
  29476. var titleBackground = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleBackground) ? allTitleBackground : item.titleBackground;
  29477. var titleBold = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleBold) ? allTitleBold : item.titleBold;
  29478. var titleColon = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleColon) ? allTitleColon : item.titleColon;
  29479. var titleAsterisk = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk;
  29480. var params = {
  29481. data: data,
  29482. disabled: disabled,
  29483. readonly: readonly,
  29484. field: field,
  29485. property: field,
  29486. item: item,
  29487. $form: $xeForm,
  29488. $grid: $xeGrid
  29489. };
  29490. var hasGroup = children && children.length > 0;
  29491. var isRequired = false;
  29492. var isValid = false;
  29493. if (!readonly && rules) {
  29494. var itemRules = rules[field];
  29495. if (itemRules && itemRules.length) {
  29496. isValid = true;
  29497. isRequired = itemRules.some(function (rule) {
  29498. return rule.required;
  29499. });
  29500. }
  29501. }
  29502. return [isGroup || hasGroup ? 'vxe-form--group' : '', 'vxe-form--item', item.id, span ? "vxe-form--item-col_".concat(span, " is--span") : '', "".concat((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showErrorMessage) ? showErrorMessage : showMessage) ? 'show' : 'hide', "--err-msg"), className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className(params) : className : '', itemClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemClassName) ? itemClassName(params) : itemClassName : '', (_ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "size--".concat(vSize), vSize), 'is--colon', titleColon), 'is--tbg', titleBackground), 'is--bold', titleBold), 'is--padding', itemPadding), 'is--vertical', itemVertical), 'is--asterisk', titleAsterisk), 'hide--content', showContent === false), 'is--valid', isValid), 'is--required', isRequired), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, 'is--hidden', folding && collapseAll), 'is--active', isActiveItem($xeForm, item)), 'err--icon', showErrorIcon), 'is--error', showError))];
  29503. }
  29504. function getItemContentClass($xeForm, item, isGroup) {
  29505. var formProps = $xeForm;
  29506. var $xeGrid = $xeForm.$xeGrid;
  29507. var data = formProps.data,
  29508. readonly = formProps.readonly,
  29509. disabled = formProps.disabled,
  29510. allAlign = formProps.align,
  29511. allVerticalAlign = formProps.verticalAlign;
  29512. var field = item.field,
  29513. itemRender = item.itemRender,
  29514. contentClassName = item.contentClassName,
  29515. children = item.children;
  29516. var hasGroup = children && children.length > 0;
  29517. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  29518. var itemContentClassName = compConf ? compConf.formItemContentClassName || compConf.itemContentClassName : '';
  29519. var align = hasGroup ? item.align : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.align) ? allAlign : item.align;
  29520. var verticalAlign = hasGroup ? item.verticalAlign : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.verticalAlign) ? allVerticalAlign : item.verticalAlign;
  29521. var params = {
  29522. data: data,
  29523. disabled: disabled,
  29524. readonly: readonly,
  29525. field: field,
  29526. property: field,
  29527. item: item,
  29528. $form: $xeForm,
  29529. $grid: $xeGrid
  29530. };
  29531. return [isGroup || hasGroup ? 'vxe-form--group-content vxe-form--item-row' : '', 'vxe-form--item-content', align ? "align--".concat(align) : '', verticalAlign ? "vertical-align--".concat(verticalAlign) : '', itemContentClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentClassName) ? itemContentClassName(params) : itemContentClassName : '', contentClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentClassName) ? contentClassName(params) : contentClassName : ''];
  29532. }
  29533. function renderTitle(h, $xeForm, item, isGroup) {
  29534. var formProps = $xeForm;
  29535. var $xeGrid = $xeForm.$xeGrid;
  29536. var data = formProps.data,
  29537. readonly = formProps.readonly,
  29538. disabled = formProps.disabled,
  29539. allTitleAlign = formProps.titleAlign,
  29540. allTitleWidth = formProps.titleWidth,
  29541. allTitleOverflow = formProps.titleOverflow,
  29542. allVertical = formProps.vertical;
  29543. var slots = item.slots,
  29544. title = item.title,
  29545. field = item.field,
  29546. itemRender = item.itemRender,
  29547. titleOverflow = item.titleOverflow,
  29548. vertical = item.vertical,
  29549. showTitle = item.showTitle,
  29550. titleClassName = item.titleClassName,
  29551. titleStyle = item.titleStyle,
  29552. titlePrefix = item.titlePrefix,
  29553. titleSuffix = item.titleSuffix,
  29554. children = item.children,
  29555. showContent = item.showContent;
  29556. var tooltipOpts = $xeForm.computeTooltipOpts;
  29557. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  29558. var itemTitleClassName = compConf ? compConf.formItemTitleClassName || compConf.itemTitleClassName : '';
  29559. var itemTitleStyle = compConf ? compConf.formItemTitleStyle || compConf.itemTitleStyle : null;
  29560. var itemVertical = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(vertical) ? allVertical : vertical;
  29561. var titleAlign = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign;
  29562. var titleWidth = itemVertical ? null : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleWidth) ? allTitleWidth : item.titleWidth;
  29563. var itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(titleOverflow) ? allTitleOverflow : titleOverflow;
  29564. var ovEllipsis = itemOverflow === 'ellipsis';
  29565. var ovTitle = itemOverflow === 'title';
  29566. var ovTooltip = itemOverflow === true || itemOverflow === 'tooltip';
  29567. var hasEllipsis = ovTitle || ovTooltip || ovEllipsis;
  29568. var params = {
  29569. data: data,
  29570. disabled: disabled,
  29571. readonly: readonly,
  29572. field: field,
  29573. property: field,
  29574. item: item,
  29575. $form: $xeForm,
  29576. $grid: $xeGrid
  29577. };
  29578. var titleSlot = slots ? slots.title : null;
  29579. var prefixSlot = slots ? slots.prefix : null;
  29580. var suffixSlot = slots ? slots.suffix || slots.extra : null;
  29581. var isTitle = showTitle !== false && (title || titleSlot);
  29582. var hasGroup = children && children.length > 0;
  29583. var titVNs = [];
  29584. if (prefixSlot) {
  29585. titVNs.push(h('span', {
  29586. key: 'pt',
  29587. class: 'vxe-form--item-title-prefix'
  29588. }, $xeForm.callSlot(prefixSlot, params, h)));
  29589. }
  29590. if (titlePrefix) {
  29591. titVNs.push(titlePrefix.content || titlePrefix.message ? h(tooltip, {
  29592. key: 'pm',
  29593. props: _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipOpts), titlePrefix), {}, {
  29594. content: getFuncText(titlePrefix.content || titlePrefix.message)
  29595. }),
  29596. scopedSlots: {
  29597. default: function _default() {
  29598. return renderPrefixIcon(h, titlePrefix);
  29599. }
  29600. }
  29601. }) : renderPrefixIcon(h, titlePrefix));
  29602. }
  29603. var rftTitle = compConf ? compConf.renderFormItemTitle || compConf.renderItemTitle : null;
  29604. titVNs.push(h('span', {
  29605. key: 'pl',
  29606. class: 'vxe-form--item-title-label'
  29607. }, titleSlot ? $xeForm.callSlot(titleSlot, params, h) : rftTitle ? vn_getSlotVNs(rftTitle.call($xeForm, h, itemRender, params)) : getFuncText(item.title)));
  29608. var fixVNs = [];
  29609. if (titleSuffix) {
  29610. fixVNs.push(titleSuffix.content || titleSuffix.message ? h(tooltip, {
  29611. key: 'sm',
  29612. props: _objectSpread2(_objectSpread2(_objectSpread2({}, tooltipOpts), titleSuffix), {}, {
  29613. content: getFuncText(titleSuffix.content || titleSuffix.message)
  29614. }),
  29615. scopedSlots: {
  29616. default: function _default() {
  29617. return renderSuffixIcon(h, titleSuffix);
  29618. }
  29619. }
  29620. }) : renderSuffixIcon(h, titleSuffix));
  29621. }
  29622. if (suffixSlot) {
  29623. fixVNs.push(h('span', {
  29624. key: 'st',
  29625. class: 'vxe-form--item-title-suffix'
  29626. }, $xeForm.callSlot(suffixSlot, params, h)));
  29627. }
  29628. var ons = ovTooltip ? {
  29629. onMouseenter: function onMouseenter(evnt) {
  29630. $xeForm.triggerTitleTipEvent(evnt, params);
  29631. },
  29632. onMouseleave: $xeForm.handleTitleTipLeaveEvent
  29633. } : {};
  29634. var itStyle = Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemTitleStyle) ? itemTitleStyle(params) : itemTitleStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(titleStyle) ? titleStyle(params) : titleStyle);
  29635. if (titleWidth && titleWidth !== 'auto' && showContent !== false) {
  29636. itStyle.width = toCssUnit(titleWidth);
  29637. }
  29638. return isTitle ? h('div', {
  29639. class: [isGroup || hasGroup ? 'vxe-form--group-title' : '', 'vxe-form--item-title', titleAlign ? "align--".concat(titleAlign) : '', hasEllipsis ? 'is--ellipsis' : '', itemTitleClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemTitleClassName) ? itemTitleClassName(params) : itemTitleClassName : '', titleClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(titleClassName) ? titleClassName(params) : titleClassName : ''],
  29640. style: itStyle,
  29641. attrs: {
  29642. itemid: item.id,
  29643. title: ovTitle ? getFuncText(title) : null
  29644. },
  29645. on: ons
  29646. }, [h('div', {
  29647. class: 'vxe-form--item-title-content'
  29648. }, titVNs), h('div', {
  29649. class: 'vxe-form--item-title-postfix'
  29650. }, fixVNs)]) : renderEmptyElement($xeForm);
  29651. }
  29652. function renderItemErrorIcon(h, $xeForm, item) {
  29653. var validOpts = $xeForm.computeValidOpts;
  29654. var showErrorIcon = validOpts.showErrorIcon,
  29655. errorIcon = validOpts.errorIcon;
  29656. var errRule = item.errRule,
  29657. showIconMsg = item.showIconMsg;
  29658. if (!showErrorIcon) {
  29659. return renderEmptyElement($xeForm);
  29660. }
  29661. return h('div', {
  29662. key: 'emi',
  29663. class: ['vxe-form-item--valid-error-icon-wrapper', {
  29664. 'is--show': showIconMsg,
  29665. 'is--hide': !showIconMsg
  29666. }]
  29667. }, [h('span', {
  29668. class: 'vxe-form-item--valid-error-icon-btn',
  29669. on: {
  29670. click: function click(evnt) {
  29671. $xeForm.handleValidIconEvent(evnt, {
  29672. item: item
  29673. });
  29674. }
  29675. }
  29676. }, [h('i', {
  29677. class: errorIcon || getIcon().FORM_VALID_ERROR_ICON
  29678. })]), h('div', {
  29679. class: 'vxe-form-item--valid-error-icon-msg-tip'
  29680. }, errRule ? [h('div', {
  29681. class: "vxe-form-item--valid-error-icon-msg vxe-form-item--valid-error-icon-theme-".concat(validOpts.theme || 'normal')
  29682. }, errRule.content || errRule.message)] : [])]);
  29683. }
  29684. function renderItemContent(h, $xeForm, item) {
  29685. var formProps = $xeForm;
  29686. var formReactData = $xeForm.reactData;
  29687. var formInternalData = $xeForm.internalData;
  29688. var $xeGrid = $xeForm.$xeGrid;
  29689. var data = formProps.data,
  29690. readonly = formProps.readonly,
  29691. disabled = formProps.disabled;
  29692. var itemFormatCache = formInternalData.itemFormatCache;
  29693. var collapseAll = formReactData.collapseAll;
  29694. var slots = item.slots,
  29695. field = item.field,
  29696. itemRender = item.itemRender,
  29697. collapseNode = item.collapseNode,
  29698. errRule = item.errRule,
  29699. formatter = item.formatter;
  29700. var defaultSlot = slots ? slots.default : null;
  29701. var validSlot = slots ? slots.valid : null;
  29702. var collapseOpts = $xeForm.computeCollapseOpts;
  29703. var validOpts = $xeForm.computeValidOpts;
  29704. var showErrorMessage = validOpts.showErrorMessage,
  29705. showMessage = validOpts.showMessage;
  29706. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  29707. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  29708. var params = {
  29709. data: data,
  29710. disabled: disabled,
  29711. readonly: readonly,
  29712. field: field,
  29713. property: field,
  29714. item: item,
  29715. itemValue: itemValue,
  29716. $form: $xeForm,
  29717. $grid: $xeGrid
  29718. };
  29719. var contentVNs = [];
  29720. var rftContent = compConf ? compConf.renderFormItemContent || compConf.renderItemContent : null;
  29721. if (defaultSlot) {
  29722. contentVNs = $xeForm.callSlot(defaultSlot, params, h);
  29723. } else if (rftContent) {
  29724. contentVNs = vn_getSlotVNs(rftContent.call($xeForm, h, itemRender, params));
  29725. } else if (field) {
  29726. var itemLabel = itemValue;
  29727. if (formatter) {
  29728. var formatData;
  29729. if (field) {
  29730. var itemRest = itemFormatCache[field];
  29731. if (itemRest) {
  29732. formatData = itemRest.formatData;
  29733. if (formatData) {
  29734. if (formatData.value === itemValue) {
  29735. return formatData.label;
  29736. }
  29737. } else {
  29738. formatData = itemRest.formatData = {};
  29739. }
  29740. } else {
  29741. itemFormatCache[field] = {
  29742. field: field
  29743. };
  29744. }
  29745. }
  29746. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
  29747. var gFormatOpts = formats.get(formatter);
  29748. var fiFormatMethod = gFormatOpts ? gFormatOpts.formItemFormatMethod : null;
  29749. itemLabel = fiFormatMethod ? fiFormatMethod(params) : '';
  29750. } else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
  29751. var _gFormatOpts = formats.get(formatter[0]);
  29752. var _fiFormatMethod = _gFormatOpts ? _gFormatOpts.formItemFormatMethod : null;
  29753. itemLabel = _fiFormatMethod ? _fiFormatMethod.apply(void 0, [params].concat(_toConsumableArray(formatter.slice(1)))) : '';
  29754. } else {
  29755. itemLabel = formatter(params);
  29756. }
  29757. if (formatData) {
  29758. formatData.value = itemValue;
  29759. formatData.label = itemLabel;
  29760. }
  29761. }
  29762. contentVNs = [eqEmptyValue(itemLabel) ? '' : "".concat(itemLabel)];
  29763. }
  29764. if (collapseNode) {
  29765. contentVNs.push(h('div', {
  29766. class: 'vxe-form--item-trigger-node',
  29767. on: {
  29768. click: $xeForm.toggleCollapseEvent
  29769. }
  29770. }, [h('span', {
  29771. class: 'vxe-form--item-trigger-text'
  29772. }, collapseAll ? collapseOpts.unfoldButtonText || getI18n('vxe.form.unfolding') : collapseOpts.foldButtonText || getI18n('vxe.form.folding')), h('i', {
  29773. class: ['vxe-form--item-trigger-icon', collapseAll ? collapseOpts.foldIcon || getIcon().FORM_FOLDING : collapseOpts.unfoldIcon || getIcon().FORM_UNFOLDING]
  29774. })]));
  29775. }
  29776. if (errRule && (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showErrorMessage) ? showErrorMessage : showMessage)) {
  29777. var validParams = _objectSpread2(_objectSpread2({}, params), {}, {
  29778. rule: errRule
  29779. });
  29780. contentVNs.push(h('div', {
  29781. class: 'vxe-form-item--valid-error-tip',
  29782. style: errRule.maxWidth ? {
  29783. width: toCssUnit(errRule.maxWidth)
  29784. } : {}
  29785. }, [h('div', {
  29786. class: "vxe-form-item--valid-error-wrapper vxe-form-item--valid-error-theme-".concat(validOpts.theme || 'normal')
  29787. }, [validSlot ? $xeForm.callSlot(validSlot, validParams, h) : [h('span', {
  29788. class: 'vxe-form--item--valid-error-msg'
  29789. }, errRule.content || errRule.message)]])]));
  29790. }
  29791. return h('div', {
  29792. key: 'ct',
  29793. class: 'vxe-form--item-inner'
  29794. }, contentVNs);
  29795. }
  29796. ;// CONCATENATED MODULE: ./packages/form/src/form-config-item.ts
  29797. var VxeFormConfigItem = defineVxeComponent({
  29798. name: 'VxeFormConfigItem',
  29799. mixins: [globalMixins.sizeMixin],
  29800. props: {
  29801. itemConfig: Object
  29802. },
  29803. inject: {
  29804. $xeForm: {
  29805. default: null
  29806. }
  29807. },
  29808. provide: function provide() {
  29809. var xeFormItemInfo = this;
  29810. return {
  29811. xeFormItemInfo: xeFormItemInfo,
  29812. $xeFormGroup: null
  29813. };
  29814. },
  29815. computed: _objectSpread2({}, {}),
  29816. methods: {
  29817. renderItem: function renderItem(h, $xeForm, item) {
  29818. var $xeFormConfigItem = this;
  29819. var formProps = $xeForm;
  29820. var data = formProps.data,
  29821. readonly = formProps.readonly,
  29822. disabled = formProps.disabled;
  29823. var visible = item.visible,
  29824. field = item.field,
  29825. itemRender = item.itemRender,
  29826. contentStyle = item.contentStyle,
  29827. children = item.children,
  29828. showContent = item.showContent;
  29829. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  29830. var itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
  29831. var itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
  29832. var params = {
  29833. data: data,
  29834. disabled: disabled,
  29835. readonly: readonly,
  29836. field: field,
  29837. property: field,
  29838. item: item,
  29839. $form: $xeForm,
  29840. $grid: $xeForm.$xeGrid
  29841. };
  29842. var hasGroup = children && children.length > 0;
  29843. if (visible === false) {
  29844. return renderEmptyElement($xeFormConfigItem);
  29845. }
  29846. return h('div', {
  29847. key: item.id,
  29848. class: getItemClass($xeForm, item),
  29849. style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle || {},
  29850. attrs: {
  29851. itemid: item.id
  29852. }
  29853. }, [renderTitle(h, $xeForm, item), showContent === false ? renderEmptyElement($xeFormConfigItem) : h('div', {
  29854. class: getItemContentClass($xeForm, item),
  29855. style: Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentStyle) ? contentStyle(params) : contentStyle)
  29856. }, hasGroup ? children.map(function (childItem) {
  29857. return $xeFormConfigItem.renderItem(h, $xeForm, childItem);
  29858. }) : [renderItemContent(h, $xeForm, item), renderItemErrorIcon(h, $xeForm, item)])]);
  29859. },
  29860. renderVN: function renderVN(h) {
  29861. var $xeFormConfigItem = this;
  29862. var props = $xeFormConfigItem;
  29863. var $xeForm = $xeFormConfigItem.$xeForm;
  29864. return $xeFormConfigItem.renderItem(h, $xeForm, props.itemConfig);
  29865. }
  29866. },
  29867. render: function render(h) {
  29868. return this.renderVN(h);
  29869. }
  29870. });
  29871. /* harmony default export */ var form_config_item = (VxeFormConfigItem);
  29872. ;// CONCATENATED MODULE: ./packages/form/render/index.ts
  29873. var componentDefaultModelProp = 'value';
  29874. /**
  29875. * 已废弃
  29876. * @deprecated
  29877. */
  29878. function getOldComponentName(name) {
  29879. return "vxe-".concat("".concat(name || '').replace('$', ''));
  29880. }
  29881. /**
  29882. * 已废弃
  29883. * @deprecated
  29884. */
  29885. function getOldComponent(_ref) {
  29886. var name = _ref.name;
  29887. return getOldComponentName(name);
  29888. }
  29889. function getDefaultComponent(_ref2) {
  29890. var name = _ref2.name;
  29891. return getComponent(name) || name;
  29892. }
  29893. function getNativeAttrs(renderOpts) {
  29894. var name = renderOpts.name,
  29895. attrs = renderOpts.attrs;
  29896. if (name === 'input') {
  29897. attrs = Object.assign({
  29898. type: 'text'
  29899. }, attrs);
  29900. }
  29901. return attrs;
  29902. }
  29903. function getComponentFormItemProps(renderOpts, params, value, defaultProps) {
  29904. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign({}, defaultProps, renderOpts.props, _defineProperty({}, componentDefaultModelProp, value));
  29905. }
  29906. /**
  29907. * 原生事件处理
  29908. * @param renderOpts
  29909. * @param params
  29910. * @param modelFunc
  29911. * @param changeFunc
  29912. */
  29913. function getElementOns(renderOpts, params, modelFunc, changeFunc) {
  29914. var events = renderOpts.events;
  29915. var modelEvent = getModelEvent(renderOpts);
  29916. var changeEvent = getChangeEvent(renderOpts);
  29917. var isSameEvent = changeEvent === modelEvent;
  29918. var ons = {};
  29919. if (events) {
  29920. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, function (func, key) {
  29921. ons[getOnName(key)] = function () {
  29922. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  29923. args[_key] = arguments[_key];
  29924. }
  29925. func.apply(void 0, [params].concat(args));
  29926. };
  29927. });
  29928. }
  29929. if (modelFunc) {
  29930. ons[getOnName(modelEvent)] = function (targetEvnt) {
  29931. modelFunc(targetEvnt);
  29932. if (isSameEvent && changeFunc) {
  29933. changeFunc(targetEvnt);
  29934. }
  29935. if (events && events[modelEvent]) {
  29936. events[modelEvent](params, targetEvnt);
  29937. }
  29938. };
  29939. }
  29940. if (!isSameEvent && changeFunc) {
  29941. ons[getOnName(changeEvent)] = function () {
  29942. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  29943. args[_key2] = arguments[_key2];
  29944. }
  29945. changeFunc.apply(void 0, args);
  29946. if (events && events[changeEvent]) {
  29947. events[changeEvent].apply(events, [params].concat(args));
  29948. }
  29949. };
  29950. }
  29951. return ons;
  29952. }
  29953. /**
  29954. * 组件事件处理
  29955. * @param renderOpts
  29956. * @param params
  29957. * @param modelFunc
  29958. * @param changeFunc
  29959. */
  29960. function getComponentOns(renderOpts, params, eFns, eventOns) {
  29961. var events = renderOpts.events;
  29962. var _ref3 = eFns || {},
  29963. modelFunc = _ref3.model,
  29964. changeFunc = _ref3.change;
  29965. var modelEvent = getModelEvent(renderOpts);
  29966. var changeEvent = getChangeEvent(renderOpts);
  29967. var ons = {};
  29968. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, function (func, key) {
  29969. ons[getOnName(key)] = function () {
  29970. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
  29971. errLog('vxe.error.errFunc', ["[form] ".concat(func)]);
  29972. }
  29973. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  29974. args[_key3] = arguments[_key3];
  29975. }
  29976. func.apply(void 0, [params].concat(args));
  29977. };
  29978. });
  29979. if (modelFunc) {
  29980. ons[getOnName(modelEvent)] = function (targetEvnt) {
  29981. modelFunc(targetEvnt);
  29982. if (events && events[modelEvent]) {
  29983. events[modelEvent](params, targetEvnt);
  29984. }
  29985. };
  29986. }
  29987. if (changeFunc) {
  29988. ons[getOnName(changeEvent)] = function () {
  29989. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  29990. args[_key4] = arguments[_key4];
  29991. }
  29992. changeFunc.apply(void 0, args);
  29993. if (events && events[changeEvent]) {
  29994. events[changeEvent].apply(events, [params].concat(args));
  29995. }
  29996. };
  29997. }
  29998. return eventOns ? Object.assign(ons, eventOns) : ons;
  29999. }
  30000. function getItemOns(renderOpts, params) {
  30001. var $form = params.$form,
  30002. data = params.data,
  30003. field = params.field;
  30004. return getComponentOns(renderOpts, params, {
  30005. model: function model(value) {
  30006. // 处理 model 值双向绑定
  30007. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, field, value);
  30008. },
  30009. change: function change() {
  30010. // 处理 change 事件相关逻辑
  30011. $form.updateStatus(params);
  30012. }
  30013. });
  30014. }
  30015. function getNativeItemOns(renderOpts, params) {
  30016. var $form = params.$form,
  30017. data = params.data,
  30018. field = params.field;
  30019. return getElementOns(renderOpts, params, function (evnt) {
  30020. // 处理 model 值双向绑定
  30021. var itemValue = evnt.target.value;
  30022. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, field, itemValue);
  30023. }, function () {
  30024. // 处理 change 事件相关逻辑
  30025. $form.updateStatus(params);
  30026. });
  30027. }
  30028. function renderNativeOptgroup(h, renderOpts, params, renderOptionsMethods) {
  30029. var optionGroups = renderOpts.optionGroups,
  30030. _renderOpts$optionGro = renderOpts.optionGroupProps,
  30031. optionGroupProps = _renderOpts$optionGro === void 0 ? {} : _renderOpts$optionGro;
  30032. var groupOptions = optionGroupProps.options || 'options';
  30033. var groupLabel = optionGroupProps.label || 'label';
  30034. if (optionGroups) {
  30035. return optionGroups.map(function (group, gIndex) {
  30036. return h('optgroup', {
  30037. key: gIndex,
  30038. attrs: {
  30039. label: group[groupLabel]
  30040. }
  30041. }, renderOptionsMethods(group[groupOptions], renderOpts, params));
  30042. });
  30043. }
  30044. return [];
  30045. }
  30046. /**
  30047. * 渲染表单-项
  30048. * 用于渲染原生的标签
  30049. */
  30050. function nativeItemRender(h, renderOpts, params) {
  30051. var data = params.data,
  30052. field = params.field;
  30053. var name = renderOpts.name;
  30054. var attrs = getNativeAttrs(renderOpts);
  30055. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30056. return [h("".concat(name), {
  30057. class: "vxe-default-".concat(name),
  30058. attrs: attrs,
  30059. domProps: {
  30060. value: attrs && name === 'input' && (attrs.type === 'submit' || attrs.type === 'reset') ? null : itemValue
  30061. },
  30062. on: getNativeItemOns(renderOpts, params)
  30063. })];
  30064. }
  30065. function defaultItemRender(h, renderOpts, params) {
  30066. var data = params.data,
  30067. field = params.field;
  30068. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30069. return [h(getDefaultComponent(renderOpts), {
  30070. props: getComponentFormItemProps(renderOpts, params, itemValue),
  30071. on: getItemOns(renderOpts, params)
  30072. })];
  30073. }
  30074. /**
  30075. * 已废弃
  30076. * @deprecated
  30077. */
  30078. function oldItemRender(h, renderOpts, params) {
  30079. var data = params.data,
  30080. field = params.field;
  30081. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30082. return [h(getOldComponent(renderOpts), {
  30083. props: getComponentFormItemProps(renderOpts, params, itemValue),
  30084. on: getItemOns(renderOpts, params)
  30085. })];
  30086. }
  30087. /**
  30088. * 已废弃
  30089. * @deprecated
  30090. */
  30091. function oldButtonItemRender(h, renderOpts, params) {
  30092. return [h('vxe-button', {
  30093. props: getComponentFormItemProps(renderOpts, params, null),
  30094. on: getComponentOns(renderOpts, params)
  30095. })];
  30096. }
  30097. /**
  30098. * 已废弃
  30099. * @deprecated
  30100. */
  30101. function oldButtonsItemRender(h, renderOpts, params) {
  30102. var children = renderOpts.children;
  30103. return children ? children.map(function (childRenderOpts) {
  30104. return oldButtonItemRender(h, childRenderOpts, params)[0];
  30105. }) : [];
  30106. }
  30107. /**
  30108. * 渲染原生的 select 标签
  30109. */
  30110. function renderNativeFormOptions(h, options, renderOpts, params) {
  30111. var data = params.data,
  30112. field = params.field;
  30113. var _renderOpts$optionPro = renderOpts.optionProps,
  30114. optionProps = _renderOpts$optionPro === void 0 ? {} : _renderOpts$optionPro;
  30115. var labelProp = optionProps.label || 'label';
  30116. var valueProp = optionProps.value || 'value';
  30117. var disabledProp = optionProps.disabled || 'disabled';
  30118. var cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30119. if (options) {
  30120. return options.map(function (item, oIndex) {
  30121. return h('option', {
  30122. key: oIndex,
  30123. props: {
  30124. value: item[valueProp],
  30125. disabled: item[disabledProp],
  30126. /* eslint-disable eqeqeq */
  30127. selected: item[valueProp] == cellValue
  30128. }
  30129. }, item[labelProp]);
  30130. });
  30131. }
  30132. return [];
  30133. }
  30134. /**
  30135. * 渲染表单-项
  30136. */
  30137. function defaultFormItemRender(h, renderOpts, params) {
  30138. var data = params.data,
  30139. field = params.field;
  30140. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30141. return [h(getDefaultComponent(renderOpts), {
  30142. props: getComponentFormItemProps(renderOpts, params, itemValue),
  30143. on: getItemOns(renderOpts, params)
  30144. })];
  30145. }
  30146. function formItemRadioAndCheckboxRender(h, renderOpts, params) {
  30147. var options = renderOpts.options,
  30148. optionProps = renderOpts.optionProps;
  30149. var data = params.data,
  30150. field = params.field;
  30151. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30152. return [h(getDefaultComponent(renderOpts), {
  30153. props: _objectSpread2({
  30154. options: options,
  30155. optionProps: optionProps
  30156. }, getComponentFormItemProps(renderOpts, params, itemValue)),
  30157. on: getItemOns(renderOpts, params)
  30158. })];
  30159. }
  30160. /**
  30161. * 已废弃
  30162. * @deprecated
  30163. */
  30164. function oldFormItemRadioAndCheckboxRender(h, renderOpts, params) {
  30165. var name = renderOpts.name,
  30166. options = renderOpts.options,
  30167. _renderOpts$optionPro2 = renderOpts.optionProps,
  30168. optionProps = _renderOpts$optionPro2 === void 0 ? {} : _renderOpts$optionPro2;
  30169. var data = params.data,
  30170. field = params.field;
  30171. var labelProp = optionProps.label || 'label';
  30172. var valueProp = optionProps.value || 'value';
  30173. var disabledProp = optionProps.disabled || 'disabled';
  30174. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30175. var compName = getOldComponentName(name);
  30176. // 如果是分组
  30177. if (options) {
  30178. return [h("".concat(compName, "-group"), {
  30179. props: getComponentFormItemProps(renderOpts, params, itemValue),
  30180. on: getItemOns(renderOpts, params),
  30181. scopedSlots: {
  30182. default: function _default() {
  30183. return options.map(function (item, index) {
  30184. return h(compName, {
  30185. key: index,
  30186. props: {
  30187. label: item[valueProp],
  30188. content: item[labelProp],
  30189. disabled: item[disabledProp]
  30190. }
  30191. });
  30192. });
  30193. }
  30194. }
  30195. })];
  30196. }
  30197. return [h(compName, {
  30198. props: getComponentFormItemProps(renderOpts, params, itemValue),
  30199. on: getItemOns(renderOpts, params)
  30200. })];
  30201. }
  30202. /**
  30203. * 表单 - 渲染器
  30204. */
  30205. renderer.mixin({
  30206. input: {
  30207. formItemAutoFocus: 'input',
  30208. renderFormItemContent: nativeItemRender
  30209. },
  30210. textarea: {
  30211. formItemAutoFocus: 'textarea',
  30212. renderFormItemContent: nativeItemRender
  30213. },
  30214. select: {
  30215. formItemAutoFocus: 'input',
  30216. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30217. return [h('select', {
  30218. class: 'vxe-default-select',
  30219. attrs: _objectSpread2({}, getNativeAttrs(renderOpts)),
  30220. on: getNativeItemOns(renderOpts, params)
  30221. }, renderOpts.optionGroups ? renderNativeOptgroup(h, renderOpts, params, renderNativeFormOptions) : renderNativeFormOptions(h, renderOpts.options, renderOpts, params))];
  30222. }
  30223. },
  30224. VxeInput: {
  30225. formItemAutoFocus: 'input',
  30226. renderFormItemContent: defaultItemRender
  30227. },
  30228. VxeNumberInput: {
  30229. formItemAutoFocus: 'input',
  30230. renderFormItemContent: defaultItemRender
  30231. },
  30232. VxePasswordInput: {
  30233. formItemAutoFocus: 'input',
  30234. renderFormItemContent: defaultItemRender
  30235. },
  30236. VxeTextarea: {
  30237. formItemAutoFocus: 'textarea',
  30238. renderFormItemContent: defaultItemRender
  30239. },
  30240. VxeDatePicker: {
  30241. formItemAutoFocus: 'input',
  30242. renderFormItemContent: defaultItemRender
  30243. },
  30244. VxeDateRangePicker: {
  30245. formItemAutoFocus: 'input',
  30246. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30247. var startField = renderOpts.startField,
  30248. endField = renderOpts.endField;
  30249. var $form = params.$form,
  30250. data = params.data,
  30251. field = params.field;
  30252. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30253. var seProps = {};
  30254. var seOs = {};
  30255. if (startField && endField) {
  30256. seProps.startValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, startField);
  30257. seProps.endValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, endField);
  30258. seOs['update:startValue'] = function (value) {
  30259. if (startField) {
  30260. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, startField, value);
  30261. }
  30262. };
  30263. seOs['update:endValue'] = function (value) {
  30264. if (endField) {
  30265. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, endField, value);
  30266. }
  30267. };
  30268. }
  30269. return [h(getDefaultComponent(renderOpts), {
  30270. props: getComponentFormItemProps(renderOpts, params, itemValue, seProps),
  30271. on: getComponentOns(renderOpts, params, {
  30272. model: function model(value) {
  30273. // 处理 model 值双向绑定
  30274. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, field, value);
  30275. },
  30276. change: function change() {
  30277. // 处理 change 事件相关逻辑
  30278. $form.updateStatus(params);
  30279. }
  30280. }, seOs)
  30281. })];
  30282. }
  30283. },
  30284. VxeButton: {
  30285. renderFormItemContent: defaultFormItemRender
  30286. },
  30287. VxeButtonGroup: {
  30288. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30289. var options = renderOpts.options;
  30290. var data = params.data,
  30291. field = params.field;
  30292. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30293. return [h(getDefaultComponent(renderOpts), {
  30294. props: _objectSpread2({
  30295. options: options
  30296. }, getComponentFormItemProps(renderOpts, params, itemValue)),
  30297. on: getItemOns(renderOpts, params)
  30298. })];
  30299. }
  30300. },
  30301. VxeSelect: {
  30302. formItemAutoFocus: 'input',
  30303. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30304. var data = params.data,
  30305. field = params.field;
  30306. var options = renderOpts.options,
  30307. optionProps = renderOpts.optionProps,
  30308. optionGroups = renderOpts.optionGroups,
  30309. optionGroupProps = renderOpts.optionGroupProps;
  30310. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30311. return [h(getDefaultComponent(renderOpts), {
  30312. props: getComponentFormItemProps(renderOpts, params, itemValue, {
  30313. options: options,
  30314. optionProps: optionProps,
  30315. optionGroups: optionGroups,
  30316. optionGroupProps: optionGroupProps
  30317. }),
  30318. on: getItemOns(renderOpts, params)
  30319. })];
  30320. }
  30321. },
  30322. VxeTreeSelect: {
  30323. formItemAutoFocus: 'input',
  30324. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30325. var data = params.data,
  30326. field = params.field;
  30327. var options = renderOpts.options,
  30328. optionProps = renderOpts.optionProps;
  30329. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30330. return [h(getDefaultComponent(renderOpts), {
  30331. props: getComponentFormItemProps(renderOpts, params, itemValue, {
  30332. options: options,
  30333. optionProps: optionProps
  30334. }),
  30335. on: getItemOns(renderOpts, params)
  30336. })];
  30337. }
  30338. },
  30339. VxeTableSelect: {
  30340. formItemAutoFocus: 'input',
  30341. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30342. var data = params.data,
  30343. field = params.field;
  30344. var options = renderOpts.options,
  30345. optionProps = renderOpts.optionProps;
  30346. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30347. return [h(getDefaultComponent(renderOpts), {
  30348. props: getComponentFormItemProps(renderOpts, params, itemValue, {
  30349. options: options,
  30350. optionProps: optionProps
  30351. }),
  30352. on: getItemOns(renderOpts, params)
  30353. })];
  30354. }
  30355. },
  30356. VxeColorPicker: {
  30357. formItemAutoFocus: 'input',
  30358. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30359. var data = params.data,
  30360. field = params.field;
  30361. var options = renderOpts.options;
  30362. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30363. return [h(getDefaultComponent(renderOpts), {
  30364. props: getComponentFormItemProps(renderOpts, params, itemValue, {
  30365. colors: options
  30366. }),
  30367. on: getItemOns(renderOpts, params)
  30368. })];
  30369. }
  30370. },
  30371. VxeIconPicker: {
  30372. formItemAutoFocus: 'input',
  30373. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30374. var data = params.data,
  30375. field = params.field;
  30376. var options = renderOpts.options;
  30377. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30378. return [h(getDefaultComponent(renderOpts), {
  30379. props: getComponentFormItemProps(renderOpts, params, itemValue, {
  30380. icons: options
  30381. }),
  30382. on: getItemOns(renderOpts, params)
  30383. })];
  30384. }
  30385. },
  30386. VxeRadio: {
  30387. renderFormItemContent: defaultFormItemRender
  30388. },
  30389. VxeRadioGroup: {
  30390. renderFormItemContent: formItemRadioAndCheckboxRender
  30391. },
  30392. VxeCheckbox: {
  30393. renderFormItemContent: defaultFormItemRender
  30394. },
  30395. VxeCheckboxGroup: {
  30396. renderFormItemContent: formItemRadioAndCheckboxRender
  30397. },
  30398. VxeSwitch: {
  30399. renderFormItemContent: defaultItemRender
  30400. },
  30401. VxeRate: {
  30402. renderFormItemContent: defaultItemRender
  30403. },
  30404. VxeSlider: {
  30405. renderFormItemContent: defaultItemRender
  30406. },
  30407. VxeImage: {
  30408. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30409. var data = params.data,
  30410. field = params.field;
  30411. var props = renderOpts.props;
  30412. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30413. return [h(getDefaultComponent(renderOpts), {
  30414. props: _objectSpread2(_objectSpread2({}, props), {}, {
  30415. src: itemValue
  30416. }),
  30417. on: getItemOns(renderOpts, params)
  30418. })];
  30419. }
  30420. },
  30421. VxeImageGroup: {
  30422. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30423. var data = params.data,
  30424. field = params.field;
  30425. var props = renderOpts.props;
  30426. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30427. return [h(getDefaultComponent(renderOpts), {
  30428. props: _objectSpread2(_objectSpread2({}, props), {}, {
  30429. urlList: itemValue
  30430. }),
  30431. on: getItemOns(renderOpts, params)
  30432. })];
  30433. }
  30434. },
  30435. VxeUpload: {
  30436. renderFormItemContent: defaultItemRender
  30437. },
  30438. // 以下已废弃
  30439. $input: {
  30440. formItemAutoFocus: 'input',
  30441. renderFormItemContent: oldItemRender
  30442. },
  30443. $textarea: {
  30444. formItemAutoFocus: 'textarea',
  30445. renderFormItemContent: oldItemRender
  30446. },
  30447. $button: {
  30448. renderFormItemContent: oldButtonItemRender
  30449. },
  30450. $buttons: {
  30451. renderFormItemContent: oldButtonsItemRender
  30452. },
  30453. $select: {
  30454. formItemAutoFocus: 'input',
  30455. renderFormItemContent: function renderFormItemContent(h, renderOpts, params) {
  30456. var data = params.data,
  30457. field = params.field;
  30458. var options = renderOpts.options,
  30459. optionProps = renderOpts.optionProps,
  30460. optionGroups = renderOpts.optionGroups,
  30461. optionGroupProps = renderOpts.optionGroupProps;
  30462. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30463. return [h(getOldComponent(renderOpts), {
  30464. props: getComponentFormItemProps(renderOpts, params, itemValue, {
  30465. options: options,
  30466. optionProps: optionProps,
  30467. optionGroups: optionGroups,
  30468. optionGroupProps: optionGroupProps
  30469. }),
  30470. on: getItemOns(renderOpts, params)
  30471. })];
  30472. }
  30473. },
  30474. $radio: {
  30475. renderFormItemContent: oldFormItemRadioAndCheckboxRender
  30476. },
  30477. $checkbox: {
  30478. renderFormItemContent: oldFormItemRadioAndCheckboxRender
  30479. },
  30480. $switch: {
  30481. renderFormItemContent: oldItemRender
  30482. }
  30483. // 以上已废弃
  30484. });
  30485. ;// CONCATENATED MODULE: ./packages/form/src/form.ts
  30486. var Rule = /*#__PURE__*/function () {
  30487. function Rule(rule) {
  30488. _classCallCheck(this, Rule);
  30489. Object.assign(this, {
  30490. $options: rule,
  30491. required: rule.required,
  30492. min: rule.min,
  30493. max: rule.min,
  30494. type: rule.type,
  30495. pattern: rule.pattern,
  30496. validator: rule.validator,
  30497. trigger: rule.trigger,
  30498. maxWidth: rule.maxWidth
  30499. });
  30500. }
  30501. return _createClass(Rule, [{
  30502. key: "content",
  30503. get: function get() {
  30504. return getFuncText(this.$options.content || this.$options.message);
  30505. }
  30506. }, {
  30507. key: "message",
  30508. get: function get() {
  30509. return this.content;
  30510. }
  30511. }]);
  30512. }(); // 如果存在 pattern,判断正则
  30513. function validREValue(pattern, val) {
  30514. if (pattern && !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
  30515. return false;
  30516. }
  30517. return true;
  30518. }
  30519. // 如果存在 max,判断最大值
  30520. function validMaxValue(max, num) {
  30521. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(max) && num > external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(max)) {
  30522. return false;
  30523. }
  30524. return true;
  30525. }
  30526. // 如果存在 min,判断最小值
  30527. function validMinValue(min, num) {
  30528. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(min) && num < external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(min)) {
  30529. return false;
  30530. }
  30531. return true;
  30532. }
  30533. function validRuleValue(rule, val, required) {
  30534. var type = rule.type,
  30535. min = rule.min,
  30536. max = rule.max,
  30537. pattern = rule.pattern;
  30538. var isArrType = type === 'array';
  30539. var isNumType = type === 'number';
  30540. var isStrType = type === 'string';
  30541. var strVal = "".concat(val);
  30542. if (!validREValue(pattern, strVal)) {
  30543. return false;
  30544. }
  30545. if (isArrType) {
  30546. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(val)) {
  30547. return false;
  30548. }
  30549. if (required) {
  30550. if (!val.length) {
  30551. return false;
  30552. }
  30553. }
  30554. if (!validMinValue(min, val.length)) {
  30555. return false;
  30556. }
  30557. if (!validMaxValue(max, val.length)) {
  30558. return false;
  30559. }
  30560. } else if (isNumType) {
  30561. var numVal = Number(val);
  30562. if (isNaN(numVal)) {
  30563. return false;
  30564. }
  30565. if (!validMinValue(min, numVal)) {
  30566. return false;
  30567. }
  30568. if (!validMaxValue(max, numVal)) {
  30569. return false;
  30570. }
  30571. } else {
  30572. if (isStrType) {
  30573. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val)) {
  30574. return false;
  30575. }
  30576. }
  30577. if (required) {
  30578. if (!strVal) {
  30579. return false;
  30580. }
  30581. }
  30582. if (!validMinValue(min, strVal.length)) {
  30583. return false;
  30584. }
  30585. if (!validMaxValue(max, strVal.length)) {
  30586. return false;
  30587. }
  30588. }
  30589. return true;
  30590. }
  30591. function checkRuleStatus(rule, val) {
  30592. var required = rule.required;
  30593. var isEmptyVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(val) ? !val.length : eqEmptyValue(val);
  30594. if (required) {
  30595. if (isEmptyVal) {
  30596. return false;
  30597. }
  30598. if (!validRuleValue(rule, val, required)) {
  30599. return false;
  30600. }
  30601. } else {
  30602. if (!isEmptyVal) {
  30603. if (!validRuleValue(rule, val, required)) {
  30604. return false;
  30605. }
  30606. }
  30607. }
  30608. return true;
  30609. }
  30610. function createInternalData() {
  30611. return {
  30612. meTimeout: undefined,
  30613. stTimeout: undefined,
  30614. tooltipStore: {
  30615. item: null,
  30616. visible: false
  30617. },
  30618. itemFormatCache: {}
  30619. };
  30620. }
  30621. /* harmony default export */ var src_form = (/* define-vxe-component start */defineVxeComponent({
  30622. name: 'VxeForm',
  30623. mixins: [globalMixins.sizeMixin],
  30624. props: {
  30625. collapseStatus: {
  30626. type: Boolean,
  30627. default: true
  30628. },
  30629. loading: Boolean,
  30630. data: Object,
  30631. size: {
  30632. type: String,
  30633. default: function _default() {
  30634. return getConfig().form.size || getConfig().size;
  30635. }
  30636. },
  30637. span: {
  30638. type: [String, Number],
  30639. default: function _default() {
  30640. return getConfig().form.span;
  30641. }
  30642. },
  30643. align: {
  30644. type: String,
  30645. default: function _default() {
  30646. return getConfig().form.align;
  30647. }
  30648. },
  30649. verticalAlign: {
  30650. type: String,
  30651. default: function _default() {
  30652. return getConfig().form.verticalAlign;
  30653. }
  30654. },
  30655. border: {
  30656. type: Boolean,
  30657. default: function _default() {
  30658. return getConfig().form.border;
  30659. }
  30660. },
  30661. titleBackground: {
  30662. type: Boolean,
  30663. default: function _default() {
  30664. return getConfig().form.titleBackground;
  30665. }
  30666. },
  30667. titleBold: {
  30668. type: Boolean,
  30669. default: function _default() {
  30670. return getConfig().form.titleBold;
  30671. }
  30672. },
  30673. titleAlign: {
  30674. type: String,
  30675. default: function _default() {
  30676. return getConfig().form.titleAlign;
  30677. }
  30678. },
  30679. titleWidth: {
  30680. type: [String, Number],
  30681. default: function _default() {
  30682. return getConfig().form.titleWidth;
  30683. }
  30684. },
  30685. titleColon: {
  30686. type: Boolean,
  30687. default: function _default() {
  30688. return getConfig().form.titleColon;
  30689. }
  30690. },
  30691. titleAsterisk: {
  30692. type: Boolean,
  30693. default: function _default() {
  30694. return getConfig().form.titleAsterisk;
  30695. }
  30696. },
  30697. titleOverflow: {
  30698. type: [Boolean, String],
  30699. default: function _default() {
  30700. return getConfig().form.titleOverflow;
  30701. }
  30702. },
  30703. vertical: {
  30704. type: Boolean,
  30705. default: function _default() {
  30706. return getConfig().form.vertical;
  30707. }
  30708. },
  30709. padding: {
  30710. type: Boolean,
  30711. default: function _default() {
  30712. return getConfig().form.padding;
  30713. }
  30714. },
  30715. className: [String, Function],
  30716. readonly: Boolean,
  30717. disabled: Boolean,
  30718. items: Array,
  30719. rules: Object,
  30720. preventSubmit: {
  30721. type: Boolean,
  30722. default: function _default() {
  30723. return getConfig().form.preventSubmit;
  30724. }
  30725. },
  30726. validConfig: Object,
  30727. tooltipConfig: Object,
  30728. collapseConfig: Object,
  30729. customLayout: {
  30730. type: Boolean,
  30731. default: function _default() {
  30732. return getConfig().form.customLayout;
  30733. }
  30734. },
  30735. params: Object
  30736. },
  30737. inject: {
  30738. $xeGrid: {
  30739. default: null
  30740. }
  30741. },
  30742. provide: function provide() {
  30743. var $xeForm = this;
  30744. return {
  30745. $xeForm: $xeForm,
  30746. xeFormItemInfo: null,
  30747. $xeFormGroup: null,
  30748. $xeFormItem: null
  30749. };
  30750. },
  30751. data: function data() {
  30752. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  30753. var reactData = {
  30754. collapseAll: false,
  30755. staticItems: [],
  30756. formItems: [],
  30757. itemWidth: 0
  30758. };
  30759. var internalData = createInternalData();
  30760. return {
  30761. xID: xID,
  30762. reactData: reactData,
  30763. internalData: internalData,
  30764. recalcFlag: 0
  30765. };
  30766. },
  30767. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  30768. computeValidOpts: function computeValidOpts() {
  30769. var $xeForm = this;
  30770. var props = $xeForm;
  30771. return Object.assign({}, getConfig().form.validConfig, props.validConfig);
  30772. },
  30773. computeTooltipOpts: function computeTooltipOpts() {
  30774. var $xeForm = this;
  30775. var props = $xeForm;
  30776. return Object.assign({}, getConfig().tooltip, getConfig().form.tooltipConfig, props.tooltipConfig);
  30777. },
  30778. computeCollapseOpts: function computeCollapseOpts() {
  30779. var $xeForm = this;
  30780. var props = $xeForm;
  30781. return Object.assign({}, getConfig().form.collapseConfig, props.collapseConfig);
  30782. },
  30783. computeAutoItemWidthList: function computeAutoItemWidthList() {
  30784. var $xeForm = this;
  30785. var props = $xeForm;
  30786. var reactData = $xeForm.reactData;
  30787. var allTitleWidth = props.titleWidth,
  30788. allVertical = props.vertical;
  30789. var formItems = reactData.formItems;
  30790. var itemList = [];
  30791. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(formItems, function (item) {
  30792. var titleWidth = item.titleWidth,
  30793. vertical = item.vertical;
  30794. if (titleWidth === 'auto') {
  30795. itemList.push(item);
  30796. } else {
  30797. var itemVertical = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(vertical) ? allVertical : vertical;
  30798. var itemTitleWidth = itemVertical ? null : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(titleWidth) ? allTitleWidth : titleWidth;
  30799. if (itemTitleWidth === 'auto' && (!item.children || !item.children.length)) {
  30800. itemList.push(item);
  30801. }
  30802. }
  30803. }, {
  30804. children: 'children'
  30805. });
  30806. return itemList;
  30807. }
  30808. }),
  30809. methods: {
  30810. //
  30811. // Method
  30812. //
  30813. dispatchEvent: function dispatchEvent(type, params, evnt) {
  30814. var $xeForm = this;
  30815. $xeForm.$emit(type, createEvent(evnt, {
  30816. $form: $xeForm
  30817. }, params));
  30818. },
  30819. callSlot: function callSlot(slotFunc, params, h) {
  30820. var $xeForm = this;
  30821. var slots = $xeForm.$scopedSlots;
  30822. if (slotFunc) {
  30823. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  30824. slotFunc = slots[slotFunc] || null;
  30825. }
  30826. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  30827. return vn_getSlotVNs(slotFunc.call($xeForm, params, h));
  30828. }
  30829. }
  30830. return [];
  30831. },
  30832. loadItem: function loadItem(list) {
  30833. var $xeForm = this;
  30834. var slots = $xeForm.$scopedSlots;
  30835. var reactData = $xeForm.reactData;
  30836. var internalData = $xeForm.internalData;
  30837. if (list.length) {
  30838. list.forEach(function (item) {
  30839. if (item.slots) {
  30840. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(item.slots, function (func) {
  30841. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
  30842. if (!slots[func]) {
  30843. errLog('vxe.error.notSlot', ["[form] ".concat(func)]);
  30844. }
  30845. }
  30846. });
  30847. }
  30848. });
  30849. }
  30850. reactData.staticItems = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().mapTree(list, function (item) {
  30851. return createItem($xeForm, item);
  30852. }, {
  30853. children: 'children'
  30854. });
  30855. internalData.itemFormatCache = {};
  30856. return $xeForm.$nextTick().then(function () {
  30857. return $xeForm.recalculate();
  30858. });
  30859. },
  30860. getItems: function getItems() {
  30861. var $xeForm = this;
  30862. var reactData = $xeForm.reactData;
  30863. var itemList = [];
  30864. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(reactData.formItems, function (item) {
  30865. itemList.push(item);
  30866. }, {
  30867. children: 'children'
  30868. });
  30869. return itemList;
  30870. },
  30871. getItemByField: function getItemByField(field) {
  30872. var $xeForm = this;
  30873. var reactData = $xeForm.reactData;
  30874. var rest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(reactData.formItems, function (item) {
  30875. return item.field === field;
  30876. }, {
  30877. children: 'children'
  30878. });
  30879. return rest ? rest.item : null;
  30880. },
  30881. getCollapseStatus: function getCollapseStatus() {
  30882. var $xeForm = this;
  30883. var reactData = $xeForm.reactData;
  30884. return reactData.collapseAll;
  30885. },
  30886. toggleCollapse: function toggleCollapse() {
  30887. var $xeForm = this;
  30888. var reactData = $xeForm.reactData;
  30889. var status = !$xeForm.getCollapseStatus();
  30890. reactData.collapseAll = status;
  30891. $xeForm.$emit('update:collapseStatus', status);
  30892. return $xeForm.$nextTick();
  30893. },
  30894. toggleCollapseEvent: function toggleCollapseEvent(evnt) {
  30895. var $xeForm = this;
  30896. var props = $xeForm;
  30897. var $xeGrid = $xeForm.$xeGrid;
  30898. $xeForm.toggleCollapse();
  30899. var status = $xeForm.getCollapseStatus();
  30900. $xeForm.dispatchEvent('toggle-collapse', {
  30901. status: status,
  30902. collapse: status,
  30903. data: props.data
  30904. }, evnt);
  30905. $xeForm.dispatchEvent('collapse', {
  30906. status: status,
  30907. collapse: status,
  30908. data: props.data
  30909. }, evnt);
  30910. $xeForm.$nextTick(function () {
  30911. $xeForm.recalculate();
  30912. if ($xeGrid) {
  30913. $xeGrid.recalculate();
  30914. }
  30915. });
  30916. },
  30917. clearValidate: function clearValidate(fieldOrItem) {
  30918. var $xeForm = this;
  30919. if (fieldOrItem) {
  30920. var fields = fieldOrItem;
  30921. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
  30922. fields = [fieldOrItem];
  30923. }
  30924. fields.forEach(function (field) {
  30925. if (field) {
  30926. var item = handleFieldOrItem($xeForm, field);
  30927. if (item) {
  30928. item.showError = false;
  30929. item.showIconMsg = false;
  30930. }
  30931. }
  30932. });
  30933. } else {
  30934. $xeForm.getItems().forEach(function (item) {
  30935. item.showError = false;
  30936. item.showIconMsg = false;
  30937. });
  30938. }
  30939. return $xeForm.$nextTick();
  30940. },
  30941. getResetValue: function getResetValue(item, data, itemValue) {
  30942. var $xeForm = this;
  30943. var $xeGrid = $xeForm.$xeGrid;
  30944. var field = item.field,
  30945. resetValue = item.resetValue;
  30946. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(resetValue)) {
  30947. return resetValue({
  30948. field: field,
  30949. item: item,
  30950. data: data,
  30951. $form: $xeForm,
  30952. $grid: $xeGrid
  30953. });
  30954. } else if (resetValue === null) {
  30955. // 默认
  30956. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(itemValue)) {
  30957. return [];
  30958. }
  30959. }
  30960. return resetValue;
  30961. },
  30962. reset: function reset() {
  30963. var $xeForm = this;
  30964. var props = $xeForm;
  30965. var $xeGrid = $xeForm.$xeGrid;
  30966. var internalData = $xeForm.internalData;
  30967. var data = props.data;
  30968. var itemList = $xeForm.getItems();
  30969. if (data) {
  30970. itemList.forEach(function (item) {
  30971. var field = item.field,
  30972. itemRender = item.itemRender;
  30973. if (isEnableConf(itemRender)) {
  30974. var name = itemRender.name,
  30975. startField = itemRender.startField,
  30976. endField = itemRender.endField;
  30977. var compConf = renderer.get(name);
  30978. var fiResetMethod = compConf ? compConf.formItemResetMethod || compConf.itemResetMethod : null;
  30979. if (compConf && fiResetMethod) {
  30980. fiResetMethod({
  30981. data: data,
  30982. field: field,
  30983. property: field,
  30984. item: item,
  30985. $form: $xeForm,
  30986. $grid: $xeGrid
  30987. });
  30988. } else if (field) {
  30989. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field);
  30990. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, field, $xeForm.getResetValue(item, data, itemValue));
  30991. }
  30992. if (startField && endField) {
  30993. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, startField, $xeForm.getResetValue(item, data, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, startField)));
  30994. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, endField, $xeForm.getResetValue(item, data, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, endField)));
  30995. }
  30996. }
  30997. });
  30998. }
  30999. internalData.itemFormatCache = {};
  31000. $xeForm.clearValidate();
  31001. return $xeForm.recalculate();
  31002. },
  31003. resetEvent: function resetEvent(evnt) {
  31004. var $xeForm = this;
  31005. var props = $xeForm;
  31006. evnt.preventDefault();
  31007. $xeForm.reset();
  31008. $xeForm.dispatchEvent('reset', {
  31009. data: props.data
  31010. }, evnt);
  31011. },
  31012. handleFocus: function handleFocus(fields) {
  31013. var $xeForm = this;
  31014. var props = $xeForm;
  31015. var $xeGrid = $xeForm.$xeGrid;
  31016. var el = $xeForm.$refs.refElem;
  31017. if (el) {
  31018. for (var i = 0; i < fields.length; i++) {
  31019. var field = fields[i];
  31020. var item = $xeForm.getItemByField(field);
  31021. if (item && isEnableConf(item.itemRender)) {
  31022. var itemRender = item.itemRender;
  31023. var compConf = renderer.get(itemRender.name);
  31024. // 定位到第一个
  31025. if (!i) {
  31026. scrollToView(el.querySelector(".".concat(item.id)));
  31027. }
  31028. var inputElem = null;
  31029. var autoFocus = itemRender.autoFocus || itemRender.autofocus || (compConf ? compConf.formItemAutoFocus : null);
  31030. // 如果指定了聚焦 class
  31031. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(autoFocus)) {
  31032. inputElem = autoFocus({
  31033. $form: $xeForm,
  31034. $grid: $xeGrid,
  31035. item: item,
  31036. data: props.data,
  31037. field: field
  31038. });
  31039. } else {
  31040. if (autoFocus === true) {
  31041. // 自动匹配模式,会自动匹配第一个可输入元素
  31042. inputElem = el.querySelector(".".concat(item.id, " input,textarea"));
  31043. } else if (autoFocus) {
  31044. inputElem = el.querySelector(".".concat(item.id, " ").concat(autoFocus));
  31045. }
  31046. }
  31047. if (inputElem) {
  31048. inputElem.focus();
  31049. break;
  31050. }
  31051. }
  31052. }
  31053. }
  31054. },
  31055. /**
  31056. * 校验数据
  31057. * 按表格行、列顺序依次校验(同步或异步)
  31058. * 校验规则根据索引顺序依次校验,如果是异步则会等待校验完成才会继续校验下一列
  31059. * 如果校验失败则,触发回调或者 Promise<(ErrMap 校验不通过列的信息)>
  31060. * 如果是传回调方式这返回一个 (ErrMap 校验不通过列的信息)
  31061. *
  31062. * rule 配置:
  31063. * required=Boolean 是否必填
  31064. * min=Number 最小长度
  31065. * max=Number 最大长度
  31066. * validator=Function({ itemValue, rule, rules, data, property }) 自定义校验,接收一个 Promise
  31067. * trigger=change 触发方式
  31068. */
  31069. validItemRules: function validItemRules(validType, fields, val) {
  31070. var $xeForm = this;
  31071. var props = $xeForm;
  31072. var data = props.data,
  31073. formRules = props.rules;
  31074. var errorMaps = {};
  31075. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fields)) {
  31076. fields = [fields];
  31077. }
  31078. return Promise.all(fields.map(function (property) {
  31079. var errorRules = [];
  31080. var syncVailds = [];
  31081. if (property && formRules) {
  31082. var rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(formRules, property);
  31083. if (rules) {
  31084. var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(val) ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, property) : val;
  31085. rules.forEach(function (rule) {
  31086. var trigger = rule.trigger,
  31087. validator = rule.validator;
  31088. if (validType === 'all' || !trigger || validType === trigger) {
  31089. if (validator) {
  31090. var validParams = {
  31091. itemValue: itemValue,
  31092. rule: rule,
  31093. rules: rules,
  31094. data: data,
  31095. field: property,
  31096. property: property,
  31097. $form: $xeForm
  31098. };
  31099. var customValid;
  31100. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
  31101. var gvItem = validators.get(validator);
  31102. if (gvItem) {
  31103. var validatorMethod = gvItem.formItemValidatorMethod || gvItem.itemValidatorMethod;
  31104. if (validatorMethod) {
  31105. customValid = validatorMethod(validParams);
  31106. } else {
  31107. warnLog('vxe.error.notValidators', ["[form] ".concat(validator)]);
  31108. }
  31109. } else {
  31110. errLog('vxe.error.notValidators', ["[form] ".concat(validator)]);
  31111. }
  31112. } else {
  31113. customValid = validator(validParams);
  31114. }
  31115. if (customValid) {
  31116. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(customValid)) {
  31117. errorRules.push(new Rule({
  31118. type: 'custom',
  31119. trigger: trigger,
  31120. content: customValid.message,
  31121. rule: new Rule(rule)
  31122. }));
  31123. } else if (customValid.catch) {
  31124. // 如果为异步校验(注:异步校验是并发无序的)
  31125. syncVailds.push(customValid.catch(function (e) {
  31126. errorRules.push(new Rule({
  31127. type: 'custom',
  31128. trigger: trigger,
  31129. content: e ? e.message : rule.content || rule.message,
  31130. rule: new Rule(rule)
  31131. }));
  31132. }));
  31133. }
  31134. }
  31135. } else {
  31136. if (!checkRuleStatus(rule, itemValue)) {
  31137. errorRules.push(new Rule(rule));
  31138. }
  31139. }
  31140. }
  31141. });
  31142. }
  31143. }
  31144. return Promise.all(syncVailds).then(function () {
  31145. if (errorRules.length) {
  31146. errorMaps[property] = errorRules.map(function (rule) {
  31147. return {
  31148. $form: $xeForm,
  31149. rule: rule,
  31150. data: data,
  31151. field: property,
  31152. property: property
  31153. };
  31154. });
  31155. }
  31156. });
  31157. })).then(function () {
  31158. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEmpty(errorMaps)) {
  31159. return Promise.reject(errorMaps);
  31160. }
  31161. });
  31162. },
  31163. beginValidate: function beginValidate(itemList, type, callback) {
  31164. var $xeForm = this;
  31165. var props = $xeForm;
  31166. var internalData = $xeForm.internalData;
  31167. var data = props.data,
  31168. formRules = props.rules;
  31169. var validOpts = $xeForm.computeValidOpts;
  31170. var validRest = {};
  31171. var validFields = [];
  31172. var itemValids = [];
  31173. clearTimeout(internalData.meTimeout);
  31174. if (data && formRules) {
  31175. itemList.forEach(function (item) {
  31176. var field = item.field;
  31177. if (field && !isHiddenItem($xeForm, item) && isActiveItem($xeForm, item)) {
  31178. itemValids.push($xeForm.validItemRules(type || 'all', field).then(function () {
  31179. item.errRule = null;
  31180. }).catch(function (errorMaps) {
  31181. var rest = errorMaps[field];
  31182. if (!validRest[field]) {
  31183. validRest[field] = [];
  31184. }
  31185. validRest[field].push(rest);
  31186. validFields.push(field);
  31187. item.errRule = rest[0].rule;
  31188. return Promise.reject(rest);
  31189. }));
  31190. }
  31191. });
  31192. return Promise.all(itemValids).then(function () {
  31193. if (callback) {
  31194. callback();
  31195. }
  31196. }).catch(function () {
  31197. return new Promise(function (resolve) {
  31198. internalData.meTimeout = setTimeout(function () {
  31199. itemList.forEach(function (item) {
  31200. if (item.errRule) {
  31201. item.showError = true;
  31202. }
  31203. });
  31204. }, 20);
  31205. if (validOpts.autoPos !== false) {
  31206. $xeForm.$nextTick(function () {
  31207. $xeForm.handleFocus(validFields);
  31208. });
  31209. }
  31210. if (callback) {
  31211. callback(validRest);
  31212. resolve();
  31213. } else {
  31214. resolve(validRest);
  31215. }
  31216. });
  31217. });
  31218. }
  31219. if (callback) {
  31220. callback();
  31221. }
  31222. return Promise.resolve();
  31223. },
  31224. validate: function validate(callback) {
  31225. var $xeForm = this;
  31226. var props = $xeForm;
  31227. var readonly = props.readonly;
  31228. $xeForm.clearValidate();
  31229. if (readonly) {
  31230. return $xeForm.$nextTick();
  31231. }
  31232. return $xeForm.beginValidate($xeForm.getItems(), '', callback).then(function (params) {
  31233. $xeForm.recalculate();
  31234. return params;
  31235. });
  31236. },
  31237. validateField: function validateField(fieldOrItem, callback) {
  31238. var $xeForm = this;
  31239. var props = $xeForm;
  31240. var readonly = props.readonly;
  31241. if (readonly) {
  31242. return $xeForm.$nextTick();
  31243. }
  31244. var fields = [];
  31245. if (fieldOrItem) {
  31246. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
  31247. fields = fieldOrItem;
  31248. } else {
  31249. fields = [fieldOrItem];
  31250. }
  31251. }
  31252. return $xeForm.beginValidate(fields.map(function (field) {
  31253. return handleFieldOrItem($xeForm, field);
  31254. }), '', callback).then(function (params) {
  31255. $xeForm.recalculate();
  31256. return params;
  31257. });
  31258. },
  31259. submitEvent: function submitEvent(evnt) {
  31260. var $xeForm = this;
  31261. var props = $xeForm;
  31262. var readonly = props.readonly;
  31263. evnt.preventDefault();
  31264. if (!props.preventSubmit) {
  31265. $xeForm.clearValidate();
  31266. if (readonly) {
  31267. $xeForm.dispatchEvent('submit', {
  31268. data: props.data
  31269. }, evnt);
  31270. $xeForm.recalculate();
  31271. return;
  31272. }
  31273. $xeForm.beginValidate($xeForm.getItems()).then(function (errMap) {
  31274. if (errMap) {
  31275. $xeForm.dispatchEvent('submit-invalid', {
  31276. data: props.data,
  31277. errMap: errMap
  31278. }, evnt);
  31279. } else {
  31280. $xeForm.dispatchEvent('submit', {
  31281. data: props.data
  31282. }, evnt);
  31283. }
  31284. $xeForm.recalculate();
  31285. });
  31286. }
  31287. },
  31288. closeTooltip: function closeTooltip() {
  31289. var $xeForm = this;
  31290. var internalData = $xeForm.internalData;
  31291. var tooltipStore = internalData.tooltipStore;
  31292. var $tooltip = $xeForm.$refs.refTooltip;
  31293. if (tooltipStore.visible) {
  31294. Object.assign(tooltipStore, {
  31295. item: null,
  31296. visible: false
  31297. });
  31298. if ($tooltip) {
  31299. $tooltip.close();
  31300. }
  31301. }
  31302. return $xeForm.$nextTick();
  31303. },
  31304. triggerTitleTipEvent: function triggerTitleTipEvent(evnt, params) {
  31305. var $xeForm = this;
  31306. var internalData = $xeForm.internalData;
  31307. var item = params.item;
  31308. var tooltipStore = internalData.tooltipStore;
  31309. var $tooltip = $xeForm.$refs.refTooltip;
  31310. var overflowElem = evnt.currentTarget.children[0];
  31311. var content = (overflowElem.textContent || '').trim();
  31312. var isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
  31313. clearTimeout(internalData.stTimeout);
  31314. if (tooltipStore.item !== item) {
  31315. $xeForm.closeTooltip();
  31316. }
  31317. if (content && isCellOverflow) {
  31318. Object.assign(tooltipStore, {
  31319. item: item,
  31320. visible: true
  31321. });
  31322. if ($tooltip) {
  31323. $tooltip.open(overflowElem, content);
  31324. }
  31325. }
  31326. },
  31327. handleTitleTipLeaveEvent: function handleTitleTipLeaveEvent() {
  31328. var $xeForm = this;
  31329. var internalData = $xeForm.internalData;
  31330. var tooltipOpts = $xeForm.computeTooltipOpts;
  31331. var $tooltip = $xeForm.$refs.refTooltip;
  31332. if ($tooltip) {
  31333. $tooltip.setActived(false);
  31334. }
  31335. if (tooltipOpts.enterable) {
  31336. internalData.stTimeout = setTimeout(function () {
  31337. $tooltip = $xeForm.$refs.refTooltip;
  31338. if ($tooltip && !$tooltip.isActived()) {
  31339. $xeForm.closeTooltip();
  31340. }
  31341. }, tooltipOpts.leaveDelay);
  31342. } else {
  31343. $xeForm.closeTooltip();
  31344. }
  31345. },
  31346. handleValidIconEvent: function handleValidIconEvent(evnt, params) {
  31347. var item = params.item;
  31348. item.showIconMsg = !item.showIconMsg;
  31349. },
  31350. triggerItemEvent: function triggerItemEvent(evnt, field, itemValue) {
  31351. var $xeForm = this;
  31352. if (field) {
  31353. return $xeForm.validItemRules(evnt ? ['blur'].includes(evnt.type) ? 'blur' : 'change' : 'all', field, itemValue).then(function () {
  31354. $xeForm.clearValidate(field);
  31355. }).catch(function (errorMaps) {
  31356. var rest = errorMaps[field];
  31357. var item = $xeForm.getItemByField(field);
  31358. if (rest && item) {
  31359. item.showError = true;
  31360. item.errRule = rest[0].rule;
  31361. }
  31362. });
  31363. }
  31364. return $xeForm.$nextTick();
  31365. },
  31366. /**
  31367. * 更新项状态
  31368. * 如果组件值 v-model 发生 change 时,调用改函数用于更新某一项编辑状态
  31369. * 如果单元格配置了校验规则,则会进行校验
  31370. */
  31371. updateStatus: function updateStatus(scope, itemValue) {
  31372. var $xeForm = this;
  31373. var field = scope.field;
  31374. return $xeForm.triggerItemEvent(new Event('change'), field, itemValue);
  31375. },
  31376. recalculate: function recalculate() {
  31377. var $xeForm = this;
  31378. var autoItemWidthList = $xeForm.computeAutoItemWidthList;
  31379. var el = $xeForm.$refs.refElem;
  31380. if (el && autoItemWidthList.length) {
  31381. var itemElList = el.querySelectorAll(autoItemWidthList.map(function (item) {
  31382. return ".vxe-form--item-title[itemid=\"".concat(item.id, "\"]");
  31383. }).join(','));
  31384. var maxItemWidth = 0;
  31385. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(itemElList, function (itemEl) {
  31386. itemEl.style.width = '';
  31387. maxItemWidth = Math.max(maxItemWidth, Math.ceil(itemEl.clientWidth + 2));
  31388. });
  31389. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(itemElList, function (itemEl) {
  31390. itemEl.style.width = "".concat(maxItemWidth, "px");
  31391. });
  31392. }
  31393. return $xeForm.$nextTick();
  31394. },
  31395. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  31396. var $xeForm = this;
  31397. $xeForm.recalculate();
  31398. },
  31399. //
  31400. // Render
  31401. //
  31402. renderVN: function renderVN(h) {
  31403. var $xeForm = this;
  31404. var props = $xeForm;
  31405. var slots = $xeForm.$scopedSlots;
  31406. var reactData = $xeForm.reactData;
  31407. var loading = props.loading,
  31408. border = props.border,
  31409. className = props.className,
  31410. data = props.data,
  31411. customLayout = props.customLayout;
  31412. var formItems = reactData.formItems;
  31413. // const formItems: any[] = []
  31414. var vSize = $xeForm.computeSize;
  31415. var tooltipOpts = $xeForm.computeTooltipOpts;
  31416. var defaultSlot = slots.default;
  31417. return h('form', {
  31418. ref: 'refElem',
  31419. class: ['vxe-form', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  31420. items: formItems,
  31421. data: data,
  31422. $form: $xeForm
  31423. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--border', border), 'custom--layout', customLayout), 'is--loading', loading)],
  31424. on: {
  31425. submit: $xeForm.submitEvent,
  31426. reset: $xeForm.resetEvent
  31427. }
  31428. }, [h('div', {
  31429. class: 'vxe-form--wrapper vxe-form--item-row'
  31430. }, customLayout ? defaultSlot ? defaultSlot({}) : [] : formItems.map(function (item, index) {
  31431. return h(form_config_item, {
  31432. key: index,
  31433. props: {
  31434. itemConfig: item
  31435. }
  31436. });
  31437. })), h('div', {
  31438. class: 'vxe-form-slots',
  31439. ref: 'hideItem'
  31440. }, customLayout ? [] : defaultSlot ? defaultSlot({}) : []),
  31441. /**
  31442. * 加载中
  31443. */
  31444. h(src_loading, {
  31445. class: 'vxe-form--loading',
  31446. props: {
  31447. value: loading
  31448. }
  31449. }),
  31450. /**
  31451. * 工具提示
  31452. */
  31453. h(tooltip, _objectSpread2({
  31454. ref: 'refTooltip'
  31455. }, tooltipOpts))]);
  31456. }
  31457. },
  31458. watch: {
  31459. vertical: function vertical() {
  31460. var $xeForm = this;
  31461. $xeForm.recalcFlag++;
  31462. },
  31463. titleWidth: function titleWidth() {
  31464. var $xeForm = this;
  31465. $xeForm.recalcFlag++;
  31466. },
  31467. recalcFlag: function recalcFlag() {
  31468. var $xeForm = this;
  31469. $xeForm.$nextTick().then(function () {
  31470. $xeForm.recalculate();
  31471. });
  31472. },
  31473. 'reactData.staticItems': function reactDataStaticItems() {
  31474. var $xeForm = this;
  31475. var reactData = $xeForm.reactData;
  31476. reactData.formItems = reactData.staticItems;
  31477. $xeForm.recalcFlag++;
  31478. },
  31479. items: function items() {
  31480. var $xeForm = this;
  31481. var props = $xeForm;
  31482. $xeForm.loadItem(props.items || []);
  31483. },
  31484. collapseStatus: function collapseStatus(val) {
  31485. var $xeForm = this;
  31486. var reactData = $xeForm.reactData;
  31487. reactData.collapseAll = !!val;
  31488. },
  31489. readonly: function readonly() {
  31490. var $xeForm = this;
  31491. $xeForm.clearValidate();
  31492. },
  31493. disabled: function disabled() {
  31494. var $xeForm = this;
  31495. $xeForm.clearValidate();
  31496. }
  31497. },
  31498. created: function created() {
  31499. var $xeForm = this;
  31500. var props = $xeForm;
  31501. var reactData = $xeForm.reactData;
  31502. reactData.collapseAll = !!props.collapseStatus;
  31503. },
  31504. mounted: function mounted() {
  31505. var $xeForm = this;
  31506. var props = $xeForm;
  31507. if (props.items) {
  31508. $xeForm.loadItem(props.items);
  31509. }
  31510. $xeForm.$nextTick(function () {
  31511. if (props.customLayout && props.items) {
  31512. errLog('vxe.error.errConflicts', ['[form] custom-layout', 'items']);
  31513. }
  31514. });
  31515. globalEvents.on($xeForm, 'resize', $xeForm.handleGlobalResizeEvent);
  31516. },
  31517. destroyed: function destroyed() {
  31518. var $xeForm = this;
  31519. var internalData = $xeForm.internalData;
  31520. globalEvents.off($xeForm, 'resize');
  31521. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, createInternalData());
  31522. },
  31523. render: function render(h) {
  31524. return this.renderVN(h);
  31525. }
  31526. })); /* define-vxe-component end */
  31527. ;// CONCATENATED MODULE: ./packages/form/index.ts
  31528. var VxeForm = Object.assign(src_form, {
  31529. install: function install(app) {
  31530. app.component(src_form.name, src_form);
  31531. }
  31532. });
  31533. dynamicApp.use(VxeForm);
  31534. index_esm_VxeUI.component(src_form);
  31535. var Form = VxeForm;
  31536. /* harmony default export */ var packages_form = (VxeForm);
  31537. ;// CONCATENATED MODULE: ./packages/form/src/form-item.ts
  31538. var formItemProps = {
  31539. title: String,
  31540. field: String,
  31541. span: {
  31542. type: [String, Number],
  31543. default: null
  31544. },
  31545. align: {
  31546. type: String,
  31547. default: null
  31548. },
  31549. verticalAlign: {
  31550. type: String,
  31551. default: null
  31552. },
  31553. titleBackground: {
  31554. type: Boolean,
  31555. default: null
  31556. },
  31557. titleBold: {
  31558. type: Boolean,
  31559. default: null
  31560. },
  31561. titleAlign: {
  31562. type: String,
  31563. default: null
  31564. },
  31565. titleWidth: {
  31566. type: [String, Number],
  31567. default: null
  31568. },
  31569. titleColon: {
  31570. type: Boolean,
  31571. default: null
  31572. },
  31573. titleAsterisk: {
  31574. type: Boolean,
  31575. default: null
  31576. },
  31577. showTitle: {
  31578. type: Boolean,
  31579. default: true
  31580. },
  31581. vertical: {
  31582. type: Boolean,
  31583. default: null
  31584. },
  31585. padding: {
  31586. type: Boolean,
  31587. default: null
  31588. },
  31589. formatter: [String, Function],
  31590. className: [String, Function],
  31591. contentClassName: [String, Function],
  31592. contentStyle: [Object, Function],
  31593. titleClassName: [String, Function],
  31594. titleStyle: [Object, Function],
  31595. titleOverflow: {
  31596. type: [Boolean, String],
  31597. default: null
  31598. },
  31599. titlePrefix: Object,
  31600. titleSuffix: Object,
  31601. resetValue: {
  31602. default: null
  31603. },
  31604. visibleMethod: Function,
  31605. visible: {
  31606. type: Boolean,
  31607. default: null
  31608. },
  31609. showContent: {
  31610. type: Boolean,
  31611. default: null
  31612. },
  31613. folding: Boolean,
  31614. collapseNode: Boolean,
  31615. itemRender: Object,
  31616. rules: Array,
  31617. params: Object
  31618. };
  31619. var formItemPropKeys = Object.keys(formItemProps);
  31620. /* harmony default export */ var form_item = (/* define-vxe-component start */defineVxeComponent({
  31621. name: 'VxeFormItem',
  31622. mixins: [globalMixins.sizeMixin],
  31623. props: formItemProps,
  31624. inject: {
  31625. $xeForm: {
  31626. default: null
  31627. },
  31628. $xeFormGroup: {
  31629. default: null
  31630. }
  31631. },
  31632. data: function data() {
  31633. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  31634. var formItem = {};
  31635. var reactData = {};
  31636. return {
  31637. xID: xID,
  31638. formItem: formItem,
  31639. reactData: reactData
  31640. };
  31641. },
  31642. computed: _objectSpread2({}, {}),
  31643. methods: {
  31644. renderItem: function renderItem(h, $xeForm, item) {
  31645. var $xeFormItem = this;
  31646. var formProps = $xeForm;
  31647. var $xeGrid = $xeForm.$xeGrid;
  31648. var data = formProps.data,
  31649. readonly = formProps.readonly,
  31650. disabled = formProps.disabled;
  31651. var visible = item.visible,
  31652. field = item.field,
  31653. itemRender = item.itemRender,
  31654. contentStyle = item.contentStyle,
  31655. showContent = item.showContent;
  31656. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  31657. var itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
  31658. var itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
  31659. var params = {
  31660. data: data,
  31661. disabled: disabled,
  31662. readonly: readonly,
  31663. field: field,
  31664. property: field,
  31665. item: item,
  31666. $form: $xeForm,
  31667. $grid: $xeGrid
  31668. };
  31669. if (visible === false) {
  31670. return renderEmptyElement($xeFormItem);
  31671. }
  31672. return h('div', {
  31673. ref: 'refElem',
  31674. key: item.id,
  31675. class: getItemClass($xeForm, item),
  31676. style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle || {},
  31677. attrs: {
  31678. itemid: item.id
  31679. }
  31680. }, [renderTitle(h, $xeForm, item), showContent === false ? renderEmptyElement($xeFormItem) : h('div', {
  31681. class: getItemContentClass($xeForm, item),
  31682. style: Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentStyle) ? contentStyle(params) : contentStyle)
  31683. }, [renderItemContent(h, $xeForm, item), renderItemErrorIcon(h, $xeForm, item)])]);
  31684. },
  31685. renderVN: function renderVN(h) {
  31686. var $xeFormItem = this;
  31687. var $xeForm = $xeFormItem.$xeForm;
  31688. var formItem = $xeFormItem.formItem;
  31689. var customLayout = $xeForm ? $xeForm.customLayout : false;
  31690. var item = formItem;
  31691. return customLayout ? $xeFormItem.renderItem(h, $xeForm, item) : h('div', {
  31692. ref: 'refElem'
  31693. });
  31694. }
  31695. },
  31696. provide: function provide() {
  31697. var $xeFormItem = this;
  31698. var formItem = $xeFormItem.formItem;
  31699. return {
  31700. $xeFormGroup: null,
  31701. $xeFormItem: $xeFormItem,
  31702. xeFormItemInfo: {
  31703. itemConfig: formItem
  31704. }
  31705. };
  31706. },
  31707. created: function created() {
  31708. var $xeFormItem = this;
  31709. var props = $xeFormItem;
  31710. var $xeForm = $xeFormItem.$xeForm;
  31711. var formItem = createItem($xeForm, props);
  31712. $xeFormItem.formItem = formItem;
  31713. watchItem($xeFormItem, formItemPropKeys, formItem);
  31714. },
  31715. mounted: function mounted() {
  31716. var $xeFormItem = this;
  31717. var slots = $xeFormItem.$scopedSlots;
  31718. var formItem = $xeFormItem.formItem;
  31719. var $xeForm = $xeFormItem.$xeForm;
  31720. var $xeFormGroup = $xeFormItem.$xeFormGroup;
  31721. formItem.slots = slots;
  31722. var elem = $xeFormItem.$refs.refElem;
  31723. assembleItem($xeForm, elem, formItem, $xeFormGroup);
  31724. },
  31725. beforeDestroy: function beforeDestroy() {
  31726. var $xeFormItem = this;
  31727. var formItem = $xeFormItem.formItem;
  31728. var $xeForm = $xeFormItem.$xeForm;
  31729. destroyItem($xeForm, formItem);
  31730. },
  31731. render: function render(h) {
  31732. return this.renderVN(h);
  31733. }
  31734. })); /* define-vxe-component end */
  31735. ;// CONCATENATED MODULE: ./packages/form/src/form-group.ts
  31736. var form_group_formItemPropKeys = Object.keys(formItemProps);
  31737. /* harmony default export */ var form_group = (/* define-vxe-component start */defineVxeComponent({
  31738. name: 'VxeFormGroup',
  31739. mixins: [globalMixins.sizeMixin],
  31740. props: formItemProps,
  31741. inject: {
  31742. $xeForm: {
  31743. default: null
  31744. },
  31745. $xeParentFormGroup: {
  31746. from: '$xeFormGroup',
  31747. default: null
  31748. }
  31749. },
  31750. data: function data() {
  31751. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  31752. var formItem = {};
  31753. var reactData = {};
  31754. return {
  31755. xID: xID,
  31756. formItem: formItem,
  31757. reactData: reactData
  31758. };
  31759. },
  31760. computed: _objectSpread2({}, {}),
  31761. methods: {
  31762. renderVN: function renderVN(h) {
  31763. var $xeFormGroup = this;
  31764. var slots = $xeFormGroup.$scopedSlots;
  31765. var formItem = $xeFormGroup.formItem;
  31766. var $xeForm = $xeFormGroup.$xeForm;
  31767. var formProps = $xeForm;
  31768. var $xeGrid = $xeForm.$xeGrid;
  31769. var item = formItem;
  31770. var data = formProps.data,
  31771. readonly = formProps.readonly,
  31772. disabled = formProps.disabled;
  31773. var visible = item.visible,
  31774. field = item.field,
  31775. itemRender = item.itemRender,
  31776. contentStyle = item.contentStyle;
  31777. var compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
  31778. var itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
  31779. var itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
  31780. var defaultSlot = slots ? slots.default : null;
  31781. var params = {
  31782. data: data,
  31783. disabled: disabled,
  31784. readonly: readonly,
  31785. field: field,
  31786. property: field,
  31787. item: item,
  31788. $form: $xeForm,
  31789. $grid: $xeGrid
  31790. };
  31791. if (visible === false) {
  31792. return renderEmptyElement($xeFormGroup);
  31793. }
  31794. return h('div', {
  31795. ref: 'refElem',
  31796. key: item.id,
  31797. class: getItemClass($xeForm, item, true),
  31798. style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle || {},
  31799. attrs: {
  31800. itemid: item.id
  31801. }
  31802. }, [renderTitle(h, $xeForm, item, true), h('div', {
  31803. class: getItemContentClass($xeForm, item, true),
  31804. style: Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentStyle) ? contentStyle(params) : contentStyle)
  31805. }, defaultSlot ? defaultSlot({}) : [])]);
  31806. }
  31807. },
  31808. provide: function provide() {
  31809. var $xeFormGroup = this;
  31810. var formItem = $xeFormGroup.formItem;
  31811. return {
  31812. $xeFormGroup: $xeFormGroup,
  31813. $xeFormItem: null,
  31814. xeFormItemInfo: {
  31815. itemConfig: formItem
  31816. }
  31817. };
  31818. },
  31819. created: function created() {
  31820. var $xeFormGroup = this;
  31821. var props = $xeFormGroup;
  31822. var $xeForm = $xeFormGroup.$xeForm;
  31823. var formItem = createItem($xeForm, props);
  31824. formItem.children = [];
  31825. $xeFormGroup.formItem = formItem;
  31826. watchItem($xeFormGroup, form_group_formItemPropKeys, formItem);
  31827. },
  31828. mounted: function mounted() {
  31829. var $xeFormGroup = this;
  31830. var formItem = $xeFormGroup.formItem;
  31831. var $xeForm = $xeFormGroup.$xeForm;
  31832. var $xeParentFormGroup = $xeFormGroup.$xeParentFormGroup;
  31833. var elem = $xeFormGroup.$refs.refElem;
  31834. assembleItem($xeForm, elem, formItem, $xeParentFormGroup);
  31835. },
  31836. beforeDestroy: function beforeDestroy() {
  31837. var $xeFormGroup = this;
  31838. var formItem = $xeFormGroup.formItem;
  31839. var $xeForm = $xeFormGroup.$xeForm;
  31840. destroyItem($xeForm, formItem);
  31841. },
  31842. render: function render(h) {
  31843. return this.renderVN(h);
  31844. }
  31845. })); /* define-vxe-component end */
  31846. ;// CONCATENATED MODULE: ./packages/form-gather/index.ts
  31847. var VxeFormGatherComponent = Object.assign({}, form_group, {
  31848. name: 'VxeFormGather'
  31849. });
  31850. var VxeFormGather = Object.assign(VxeFormGatherComponent, {
  31851. install: function install(app) {
  31852. app.component(VxeFormGatherComponent.name, VxeFormGatherComponent);
  31853. }
  31854. });
  31855. dynamicApp.use(VxeFormGather);
  31856. index_esm_VxeUI.component(VxeFormGatherComponent);
  31857. var FormGather = VxeFormGather;
  31858. /* harmony default export */ var form_gather = (VxeFormGather);
  31859. ;// CONCATENATED MODULE: ./packages/form-group/index.ts
  31860. var VxeFormGroup = Object.assign(form_group, {
  31861. install: function install(app) {
  31862. app.component(form_group.name, form_group);
  31863. }
  31864. });
  31865. dynamicApp.use(VxeFormGroup);
  31866. index_esm_VxeUI.component(form_group);
  31867. var FormGroup = VxeFormGroup;
  31868. /* harmony default export */ var packages_form_group = (VxeFormGroup);
  31869. ;// CONCATENATED MODULE: ./packages/form-item/index.ts
  31870. var VxeFormItem = Object.assign(form_item, {
  31871. install: function install(app) {
  31872. app.component(form_item.name, form_item);
  31873. }
  31874. });
  31875. dynamicApp.use(VxeFormItem);
  31876. index_esm_VxeUI.component(form_item);
  31877. var FormItem = VxeFormItem;
  31878. /* harmony default export */ var packages_form_item = (VxeFormItem);
  31879. ;// CONCATENATED MODULE: ./packages/icon/index.ts
  31880. var VxeIcon = Object.assign({}, icon, {
  31881. install: function install(app) {
  31882. app.component(icon.name, icon);
  31883. }
  31884. });
  31885. dynamicApp.use(VxeIcon);
  31886. index_esm_VxeUI.component(icon);
  31887. var Icon = VxeIcon;
  31888. /* harmony default export */ var packages_icon = (VxeIcon);
  31889. ;// CONCATENATED MODULE: ./packages/icon-picker/src/icon-picker.ts
  31890. /* harmony default export */ var icon_picker = (/* define-vxe-component start */defineVxeComponent({
  31891. name: 'VxeIconPicker',
  31892. mixins: [globalMixins.sizeMixin],
  31893. model: {
  31894. prop: 'value',
  31895. event: 'modelValue'
  31896. },
  31897. props: {
  31898. value: String,
  31899. placeholder: String,
  31900. clearable: Boolean,
  31901. size: {
  31902. type: String,
  31903. default: function _default() {
  31904. return getConfig().iconPicker.size || getConfig().size;
  31905. }
  31906. },
  31907. className: [String, Function],
  31908. popupClassName: [String, Function],
  31909. showIconTitle: {
  31910. type: Boolean,
  31911. default: function _default() {
  31912. return getConfig().iconPicker.showIconTitle;
  31913. }
  31914. },
  31915. readonly: {
  31916. type: Boolean,
  31917. default: null
  31918. },
  31919. disabled: {
  31920. type: Boolean,
  31921. default: null
  31922. },
  31923. icons: Array,
  31924. placement: String,
  31925. transfer: {
  31926. type: Boolean,
  31927. default: null
  31928. }
  31929. },
  31930. inject: {
  31931. $xeModal: {
  31932. default: null
  31933. },
  31934. $xeDrawer: {
  31935. default: null
  31936. },
  31937. $xeTable: {
  31938. default: null
  31939. },
  31940. $xeForm: {
  31941. default: null
  31942. },
  31943. formItemInfo: {
  31944. from: 'xeFormItemInfo',
  31945. default: null
  31946. }
  31947. },
  31948. provide: function provide() {
  31949. var $xeIconPicker = this;
  31950. return {
  31951. $xeIconPicker: $xeIconPicker
  31952. };
  31953. },
  31954. data: function data() {
  31955. var reactData = {
  31956. initialized: false,
  31957. selectIcon: '',
  31958. panelIndex: 0,
  31959. panelStyle: {},
  31960. panelPlacement: null,
  31961. visiblePanel: false,
  31962. isAniVisible: false,
  31963. isActivated: false
  31964. };
  31965. var internalData = {
  31966. hpTimeout: undefined
  31967. };
  31968. return {
  31969. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  31970. reactData: reactData,
  31971. internalData: internalData
  31972. };
  31973. },
  31974. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  31975. computeFormReadonly: function computeFormReadonly() {
  31976. var $xeIconPicker = this;
  31977. var props = $xeIconPicker;
  31978. var $xeForm = $xeIconPicker.$xeForm;
  31979. var readonly = props.readonly;
  31980. if (readonly === null) {
  31981. if ($xeForm) {
  31982. return $xeForm.readonly;
  31983. }
  31984. return false;
  31985. }
  31986. return readonly;
  31987. },
  31988. computeIsDisabled: function computeIsDisabled() {
  31989. var $xeIconPicker = this;
  31990. var props = $xeIconPicker;
  31991. var $xeForm = $xeIconPicker.$xeForm;
  31992. var disabled = props.disabled;
  31993. if (disabled === null) {
  31994. if ($xeForm) {
  31995. return $xeForm.disabled;
  31996. }
  31997. return false;
  31998. }
  31999. return disabled;
  32000. },
  32001. computeBtnTransfer: function computeBtnTransfer() {
  32002. var $xeIconPicker = this;
  32003. var props = $xeIconPicker;
  32004. var $xeTable = $xeIconPicker.$xeTable;
  32005. var $xeModal = $xeIconPicker.$xeModal;
  32006. var $xeDrawer = $xeIconPicker.$xeDrawer;
  32007. var $xeForm = $xeIconPicker.$xeForm;
  32008. var transfer = props.transfer;
  32009. if (transfer === null) {
  32010. var globalTransfer = getConfig().iconPicker.transfer;
  32011. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  32012. return globalTransfer;
  32013. }
  32014. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  32015. return true;
  32016. }
  32017. }
  32018. return transfer;
  32019. },
  32020. computeInpPlaceholder: function computeInpPlaceholder() {
  32021. var $xeIconPicker = this;
  32022. var props = $xeIconPicker;
  32023. var placeholder = props.placeholder;
  32024. if (placeholder) {
  32025. return getFuncText(placeholder);
  32026. }
  32027. var globalPlaceholder = getConfig().select.placeholder;
  32028. if (globalPlaceholder) {
  32029. return getFuncText(globalPlaceholder);
  32030. }
  32031. return getI18n('vxe.base.pleaseSelect');
  32032. },
  32033. computeIconList: function computeIconList() {
  32034. var $xeIconPicker = this;
  32035. var props = $xeIconPicker;
  32036. var icons = props.icons;
  32037. if (!icons || !icons.length) {
  32038. icons = getConfig().iconPicker.icons || [];
  32039. }
  32040. return icons.map(function (item) {
  32041. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(item)) {
  32042. return {
  32043. title: item,
  32044. icon: "vxe-icon-".concat("".concat(item || '').replace(/^vxe-icon-/, ''))
  32045. };
  32046. }
  32047. return {
  32048. title: "".concat(item.title || ''),
  32049. icon: item.icon || '',
  32050. iconRender: item.iconRender
  32051. };
  32052. });
  32053. },
  32054. computeIconGroupList: function computeIconGroupList() {
  32055. var $xeIconPicker = this;
  32056. var iconList = $xeIconPicker.computeIconList;
  32057. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().chunk(iconList, 4);
  32058. },
  32059. computeSelectIconItem: function computeSelectIconItem() {
  32060. var $xeIconPicker = this;
  32061. var reactData = $xeIconPicker.reactData;
  32062. var selectIcon = reactData.selectIcon;
  32063. var iconList = $xeIconPicker.computeIconList;
  32064. return selectIcon ? iconList.find(function (item) {
  32065. return item.icon === selectIcon;
  32066. }) : null;
  32067. }
  32068. }),
  32069. methods: {
  32070. //
  32071. // Method
  32072. //
  32073. dispatchEvent: function dispatchEvent(type, params, evnt) {
  32074. var $xeIconPicker = this;
  32075. $xeIconPicker.$emit(type, createEvent(evnt, {
  32076. $iconPicker: $xeIconPicker
  32077. }, params));
  32078. },
  32079. emitModel: function emitModel(value) {
  32080. var $xeIconPicker = this;
  32081. var _events = $xeIconPicker._events;
  32082. if (_events && _events.modelValue) {
  32083. $xeIconPicker.$emit('modelValue', value);
  32084. } else {
  32085. $xeIconPicker.$emit('model-value', value);
  32086. }
  32087. },
  32088. isPanelVisible: function isPanelVisible() {
  32089. var $xeIconPicker = this;
  32090. var reactData = $xeIconPicker.reactData;
  32091. return reactData.visiblePanel;
  32092. },
  32093. togglePanel: function togglePanel() {
  32094. var $xeIconPicker = this;
  32095. var reactData = $xeIconPicker.reactData;
  32096. if (reactData.visiblePanel) {
  32097. $xeIconPicker.hideOptionPanel();
  32098. } else {
  32099. $xeIconPicker.showOptionPanel();
  32100. }
  32101. return $xeIconPicker.$nextTick();
  32102. },
  32103. hidePanel: function hidePanel() {
  32104. var $xeIconPicker = this;
  32105. var reactData = $xeIconPicker.reactData;
  32106. if (reactData.visiblePanel) {
  32107. $xeIconPicker.hideOptionPanel();
  32108. }
  32109. return $xeIconPicker.$nextTick();
  32110. },
  32111. showPanel: function showPanel() {
  32112. var $xeIconPicker = this;
  32113. var reactData = $xeIconPicker.reactData;
  32114. if (!reactData.visiblePanel) {
  32115. $xeIconPicker.showOptionPanel();
  32116. }
  32117. return $xeIconPicker.$nextTick();
  32118. },
  32119. focus: function focus() {
  32120. var $xeIconPicker = this;
  32121. var reactData = $xeIconPicker.reactData;
  32122. var $input = $xeIconPicker.$refs.refInput;
  32123. reactData.isActivated = true;
  32124. $input.blur();
  32125. return $xeIconPicker.$nextTick();
  32126. },
  32127. blur: function blur() {
  32128. var $xeIconPicker = this;
  32129. var reactData = $xeIconPicker.reactData;
  32130. var $input = $xeIconPicker.$refs.refInput;
  32131. $input.blur();
  32132. reactData.isActivated = false;
  32133. return $xeIconPicker.$nextTick();
  32134. },
  32135. updateZindex: function updateZindex() {
  32136. var $xeIconPicker = this;
  32137. var reactData = $xeIconPicker.reactData;
  32138. if (reactData.panelIndex < getLastZIndex()) {
  32139. reactData.panelIndex = nextZIndex();
  32140. }
  32141. },
  32142. updatePlacement: function updatePlacement() {
  32143. var $xeIconPicker = this;
  32144. var props = $xeIconPicker;
  32145. var reactData = $xeIconPicker.reactData;
  32146. return $xeIconPicker.$nextTick().then(function () {
  32147. var placement = props.placement;
  32148. var panelIndex = reactData.panelIndex;
  32149. var el = $xeIconPicker.$refs.refElem;
  32150. var panelElem = $xeIconPicker.$refs.refOptionPanel;
  32151. var btnTransfer = $xeIconPicker.computeBtnTransfer;
  32152. if (panelElem && el) {
  32153. var targetHeight = el.offsetHeight;
  32154. var targetWidth = el.offsetWidth;
  32155. var panelHeight = panelElem.offsetHeight;
  32156. var panelWidth = panelElem.offsetWidth;
  32157. var marginSize = 5;
  32158. var panelStyle = {
  32159. zIndex: panelIndex
  32160. };
  32161. var _getAbsolutePos = getAbsolutePos(el),
  32162. boundingTop = _getAbsolutePos.boundingTop,
  32163. boundingLeft = _getAbsolutePos.boundingLeft,
  32164. visibleHeight = _getAbsolutePos.visibleHeight,
  32165. visibleWidth = _getAbsolutePos.visibleWidth;
  32166. var panelPlacement = 'bottom';
  32167. if (btnTransfer) {
  32168. var left = boundingLeft;
  32169. var top = boundingTop + targetHeight;
  32170. if (placement === 'top') {
  32171. panelPlacement = 'top';
  32172. top = boundingTop - panelHeight;
  32173. } else if (!placement) {
  32174. // 如果下面不够放,则向上
  32175. if (top + panelHeight + marginSize > visibleHeight) {
  32176. panelPlacement = 'top';
  32177. top = boundingTop - panelHeight;
  32178. }
  32179. // 如果上面不够放,则向下(优先)
  32180. if (top < marginSize) {
  32181. panelPlacement = 'bottom';
  32182. top = boundingTop + targetHeight;
  32183. }
  32184. }
  32185. // 如果溢出右边
  32186. if (left + panelWidth + marginSize > visibleWidth) {
  32187. left -= left + panelWidth + marginSize - visibleWidth;
  32188. }
  32189. // 如果溢出左边
  32190. if (left < marginSize) {
  32191. left = marginSize;
  32192. }
  32193. Object.assign(panelStyle, {
  32194. left: "".concat(left, "px"),
  32195. top: "".concat(top, "px"),
  32196. minWidth: "".concat(targetWidth, "px")
  32197. });
  32198. } else {
  32199. if (placement === 'top') {
  32200. panelPlacement = 'top';
  32201. panelStyle.bottom = "".concat(targetHeight, "px");
  32202. } else if (!placement) {
  32203. // 如果下面不够放,则向上
  32204. if (boundingTop + targetHeight + panelHeight > visibleHeight) {
  32205. // 如果上面不够放,则向下(优先)
  32206. if (boundingTop - targetHeight - panelHeight > marginSize) {
  32207. panelPlacement = 'top';
  32208. panelStyle.bottom = "".concat(targetHeight, "px");
  32209. }
  32210. }
  32211. }
  32212. }
  32213. reactData.panelStyle = panelStyle;
  32214. reactData.panelPlacement = panelPlacement;
  32215. return $xeIconPicker.$nextTick();
  32216. }
  32217. });
  32218. },
  32219. showOptionPanel: function showOptionPanel() {
  32220. var $xeIconPicker = this;
  32221. var reactData = $xeIconPicker.reactData;
  32222. var internalData = $xeIconPicker.internalData;
  32223. var hpTimeout = internalData.hpTimeout;
  32224. var isDisabled = $xeIconPicker.computeIsDisabled;
  32225. if (!isDisabled) {
  32226. if (hpTimeout) {
  32227. clearTimeout(hpTimeout);
  32228. internalData.hpTimeout = undefined;
  32229. }
  32230. var btnTransfer = $xeIconPicker.computeBtnTransfer;
  32231. var panelElem = $xeIconPicker.$refs.refOptionPanel;
  32232. if (!reactData.initialized) {
  32233. reactData.initialized = true;
  32234. if (btnTransfer) {
  32235. if (panelElem) {
  32236. document.body.appendChild(panelElem);
  32237. }
  32238. }
  32239. }
  32240. reactData.isActivated = true;
  32241. reactData.isAniVisible = true;
  32242. setTimeout(function () {
  32243. reactData.visiblePanel = true;
  32244. }, 10);
  32245. $xeIconPicker.updateZindex();
  32246. $xeIconPicker.updatePlacement();
  32247. }
  32248. },
  32249. hideOptionPanel: function hideOptionPanel() {
  32250. var $xeIconPicker = this;
  32251. var reactData = $xeIconPicker.reactData;
  32252. var internalData = $xeIconPicker.internalData;
  32253. reactData.visiblePanel = false;
  32254. internalData.hpTimeout = setTimeout(function () {
  32255. reactData.isAniVisible = false;
  32256. }, 350);
  32257. },
  32258. changeEvent: function changeEvent(evnt, selectValue) {
  32259. var $xeIconPicker = this;
  32260. var props = $xeIconPicker;
  32261. var reactData = $xeIconPicker.reactData;
  32262. var $xeForm = $xeIconPicker.$xeForm;
  32263. var formItemInfo = $xeIconPicker.formItemInfo;
  32264. reactData.selectIcon = selectValue;
  32265. if (selectValue !== props.value) {
  32266. $xeIconPicker.emitModel(selectValue);
  32267. $xeIconPicker.dispatchEvent('change', {
  32268. value: selectValue
  32269. }, evnt);
  32270. // 自动更新校验状态
  32271. if ($xeForm && formItemInfo) {
  32272. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
  32273. }
  32274. }
  32275. },
  32276. focusEvent: function focusEvent() {
  32277. var $xeIconPicker = this;
  32278. var reactData = $xeIconPicker.reactData;
  32279. var isDisabled = $xeIconPicker.computeIsDisabled;
  32280. if (!isDisabled) {
  32281. if (!reactData.visiblePanel) {
  32282. $xeIconPicker.showOptionPanel();
  32283. }
  32284. }
  32285. },
  32286. blurEvent: function blurEvent() {
  32287. var $xeIconPicker = this;
  32288. var reactData = $xeIconPicker.reactData;
  32289. reactData.isActivated = false;
  32290. },
  32291. clearValueEvent: function clearValueEvent(evnt, selectValue) {
  32292. var $xeIconPicker = this;
  32293. $xeIconPicker.changeEvent(evnt, selectValue);
  32294. $xeIconPicker.dispatchEvent('clear', {
  32295. value: selectValue
  32296. }, evnt);
  32297. },
  32298. clearEvent: function clearEvent(params, evnt) {
  32299. var $xeIconPicker = this;
  32300. $xeIconPicker.clearValueEvent(evnt, null);
  32301. $xeIconPicker.hideOptionPanel();
  32302. },
  32303. togglePanelEvent: function togglePanelEvent(evnt) {
  32304. var $xeIconPicker = this;
  32305. var reactData = $xeIconPicker.reactData;
  32306. evnt.preventDefault();
  32307. if (reactData.visiblePanel) {
  32308. $xeIconPicker.hideOptionPanel();
  32309. } else {
  32310. $xeIconPicker.showOptionPanel();
  32311. }
  32312. },
  32313. clickEvent: function clickEvent(evnt) {
  32314. var $xeIconPicker = this;
  32315. $xeIconPicker.togglePanelEvent(evnt);
  32316. $xeIconPicker.dispatchEvent('click', {}, evnt);
  32317. },
  32318. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  32319. var $xeIconPicker = this;
  32320. var reactData = $xeIconPicker.reactData;
  32321. var visiblePanel = reactData.visiblePanel;
  32322. var isDisabled = $xeIconPicker.computeIsDisabled;
  32323. if (!isDisabled) {
  32324. if (visiblePanel) {
  32325. var panelElem = $xeIconPicker.$refs.refOptionPanel;
  32326. if (getEventTargetNode(evnt, panelElem).flag) {
  32327. $xeIconPicker.updatePlacement();
  32328. } else {
  32329. $xeIconPicker.hideOptionPanel();
  32330. }
  32331. }
  32332. }
  32333. },
  32334. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  32335. var $xeIconPicker = this;
  32336. var reactData = $xeIconPicker.reactData;
  32337. var visiblePanel = reactData.visiblePanel;
  32338. var isDisabled = $xeIconPicker.computeIsDisabled;
  32339. if (!isDisabled) {
  32340. var el = $xeIconPicker.$refs.refElem;
  32341. var panelElem = $xeIconPicker.$refs.refOptionPanel;
  32342. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  32343. if (visiblePanel && !reactData.isActivated) {
  32344. $xeIconPicker.hideOptionPanel();
  32345. }
  32346. }
  32347. },
  32348. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  32349. var $xeIconPicker = this;
  32350. var props = $xeIconPicker;
  32351. var reactData = $xeIconPicker.reactData;
  32352. var clearable = props.clearable;
  32353. var visiblePanel = reactData.visiblePanel;
  32354. var isDisabled = $xeIconPicker.computeIsDisabled;
  32355. if (!isDisabled) {
  32356. var isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
  32357. var isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
  32358. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  32359. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  32360. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  32361. var isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
  32362. var isSpacebar = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.SPACEBAR);
  32363. if (isTab) {
  32364. reactData.isActivated = false;
  32365. }
  32366. if (visiblePanel) {
  32367. if (isEsc || isTab) {
  32368. $xeIconPicker.hideOptionPanel();
  32369. } else if (isEnter) {
  32370. evnt.preventDefault();
  32371. evnt.stopPropagation();
  32372. // changeOptionEvent(evnt, currentValue, currentOption)
  32373. } else if (isUpArrow || isDwArrow) {
  32374. evnt.preventDefault();
  32375. // let { firstOption, offsetOption } = findOffsetOption(currentValue, isUpArrow)
  32376. // if (!offsetOption && !findVisibleOption(currentValue)) {
  32377. // offsetOption = firstOption
  32378. // }
  32379. // setCurrentOption(offsetOption)
  32380. // scrollToOption(offsetOption, isDwArrow)
  32381. } else if (isSpacebar) {
  32382. evnt.preventDefault();
  32383. }
  32384. } else if ((isUpArrow || isDwArrow || isEnter || isSpacebar) && reactData.isActivated) {
  32385. evnt.preventDefault();
  32386. $xeIconPicker.showOptionPanel();
  32387. }
  32388. if (reactData.isActivated) {
  32389. if (isDel && clearable) {
  32390. $xeIconPicker.clearValueEvent(evnt, null);
  32391. }
  32392. }
  32393. }
  32394. },
  32395. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  32396. var $xeIconPicker = this;
  32397. var reactData = $xeIconPicker.reactData;
  32398. var visiblePanel = reactData.visiblePanel,
  32399. isActivated = reactData.isActivated;
  32400. if (visiblePanel) {
  32401. $xeIconPicker.hideOptionPanel();
  32402. }
  32403. if (isActivated) {
  32404. reactData.isActivated = false;
  32405. }
  32406. if (visiblePanel || isActivated) {
  32407. var $input = $xeIconPicker.$refs.refInput;
  32408. if ($input) {
  32409. $input.blur();
  32410. }
  32411. }
  32412. },
  32413. handleClickIconEvent: function handleClickIconEvent(evnt, item) {
  32414. var $xeIconPicker = this;
  32415. var value = item.icon;
  32416. $xeIconPicker.changeEvent(evnt, value);
  32417. $xeIconPicker.hideOptionPanel();
  32418. },
  32419. //
  32420. // Render
  32421. //
  32422. renderIconWrapper: function renderIconWrapper(h) {
  32423. var $xeIconPicker = this;
  32424. var props = $xeIconPicker;
  32425. var showIconTitle = props.showIconTitle;
  32426. var iconGroupList = $xeIconPicker.computeIconGroupList;
  32427. var isDisabled = $xeIconPicker.computeIsDisabled;
  32428. return h('div', {
  32429. class: 'vxe-ico-picker--list-wrapper'
  32430. }, iconGroupList.map(function (list) {
  32431. return h('div', {
  32432. class: 'vxe-ico-picker--list'
  32433. }, list.map(function (item) {
  32434. var iconRender = item.iconRender;
  32435. var compConf = iconRender ? renderer.get(iconRender.name) : null;
  32436. var oIconMethod = compConf ? compConf.renderIconPickerOptionIcon : null;
  32437. return h('div', {
  32438. class: 'vxe-ico-picker--item',
  32439. on: {
  32440. click: function click(evnt) {
  32441. if (!isDisabled) {
  32442. $xeIconPicker.handleClickIconEvent(evnt, item);
  32443. }
  32444. }
  32445. }
  32446. }, [h('div', {
  32447. class: 'vxe-ico-picker--item-icon'
  32448. }, oIconMethod && iconRender ? vn_getSlotVNs(oIconMethod.call($xeIconPicker, h, iconRender, {
  32449. $iconPicker: $xeIconPicker,
  32450. option: item
  32451. })) : [h('i', {
  32452. class: item.icon || ''
  32453. })]), showIconTitle ? h('div', {
  32454. class: 'vxe-ico-picker--item-title'
  32455. }, "".concat(item.title || '')) : renderEmptyElement($xeIconPicker)]);
  32456. }));
  32457. }));
  32458. },
  32459. renderIconView: function renderIconView(h) {
  32460. var $xeIconPicker = this;
  32461. var reactData = $xeIconPicker.reactData;
  32462. var selectIcon = reactData.selectIcon;
  32463. var selectIconItem = $xeIconPicker.computeSelectIconItem;
  32464. if (selectIconItem) {
  32465. var iconRender = selectIconItem.iconRender;
  32466. var compConf = iconRender ? renderer.get(iconRender.name) : null;
  32467. var oIconMethod = compConf ? compConf.renderIconPickerOptionIcon : null;
  32468. if (oIconMethod && iconRender) {
  32469. return h('div', {
  32470. key: 'inc',
  32471. class: 'vxe-ico-picker--icon'
  32472. }, vn_getSlotVNs(oIconMethod.call($xeIconPicker, h, iconRender, {
  32473. $iconPicker: $xeIconPicker,
  32474. option: selectIconItem
  32475. })));
  32476. }
  32477. }
  32478. return h('div', {
  32479. key: 'ind',
  32480. class: 'vxe-ico-picker--icon'
  32481. }, [h('i', {
  32482. class: selectIcon
  32483. })]);
  32484. },
  32485. renderVN: function renderVN(h) {
  32486. var $xeIconPicker = this;
  32487. var props = $xeIconPicker;
  32488. var reactData = $xeIconPicker.reactData;
  32489. var className = props.className,
  32490. popupClassName = props.popupClassName,
  32491. clearable = props.clearable;
  32492. var initialized = reactData.initialized,
  32493. isActivated = reactData.isActivated,
  32494. isAniVisible = reactData.isAniVisible,
  32495. visiblePanel = reactData.visiblePanel,
  32496. selectIcon = reactData.selectIcon;
  32497. var vSize = $xeIconPicker.computeSize;
  32498. var isDisabled = $xeIconPicker.computeIsDisabled;
  32499. var btnTransfer = $xeIconPicker.computeBtnTransfer;
  32500. var formReadonly = $xeIconPicker.computeFormReadonly;
  32501. var inpPlaceholder = $xeIconPicker.computeInpPlaceholder;
  32502. if (formReadonly) {
  32503. return h('div', {
  32504. ref: 'refElem',
  32505. class: ['vxe-ico-picker--readonly', className]
  32506. }, [h('i', {
  32507. class: selectIcon
  32508. })]);
  32509. }
  32510. return h('div', {
  32511. ref: 'refElem',
  32512. class: ['vxe-ico-picker', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  32513. $iconPicker: $xeIconPicker
  32514. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'show--clear', clearable && !isDisabled && !!selectIcon), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--active', isActivated)]
  32515. }, [h('div', {
  32516. class: 'vxe-ico-picker--inner',
  32517. on: {
  32518. click: $xeIconPicker.clickEvent
  32519. }
  32520. }, [h('input', {
  32521. ref: 'refInput',
  32522. class: 'vxe-ico-picker--input',
  32523. on: {
  32524. focus: $xeIconPicker.focusEvent,
  32525. blur: $xeIconPicker.blurEvent
  32526. }
  32527. }), selectIcon ? $xeIconPicker.renderIconView(h) : h('div', {
  32528. class: 'vxe-ico-picker--placeholder'
  32529. }, inpPlaceholder), h('div', {
  32530. class: 'vxe-ico-picker--suffix'
  32531. }, [h('div', {
  32532. class: 'vxe-ico-picker--clear-icon',
  32533. on: {
  32534. click: $xeIconPicker.clearEvent
  32535. }
  32536. }, [h('i', {
  32537. class: getIcon().INPUT_CLEAR
  32538. })]), h('div', {
  32539. class: 'vxe-ico-picker--suffix-icon'
  32540. }, [h('i', {
  32541. class: visiblePanel ? getIcon().ICON_PICKER_OPEN : getIcon().ICON_PICKER_CLOSE
  32542. })])])]), h('div', {
  32543. ref: 'refOptionPanel',
  32544. class: ['vxe-table--ignore-clear vxe-ico-picker--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  32545. $iconPicker: $xeIconPicker
  32546. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', isAniVisible), 'ani--enter', visiblePanel)],
  32547. attrs: {
  32548. placement: reactData.panelPlacement
  32549. },
  32550. style: reactData.panelStyle
  32551. }, [initialized && (visiblePanel || isAniVisible) ? h('div', {
  32552. class: 'vxe-ico-picker--panel-wrapper'
  32553. }, [$xeIconPicker.renderIconWrapper(h)]) : renderEmptyElement($xeIconPicker)])]);
  32554. }
  32555. },
  32556. watch: {
  32557. value: function value(val) {
  32558. var $xeIconPicker = this;
  32559. var reactData = $xeIconPicker.reactData;
  32560. reactData.selectIcon = "".concat(val || '');
  32561. }
  32562. },
  32563. created: function created() {
  32564. var $xeIconPicker = this;
  32565. var props = $xeIconPicker;
  32566. var reactData = $xeIconPicker.reactData;
  32567. reactData.selectIcon = "".concat(props.value || '');
  32568. globalEvents.on($xeIconPicker, 'mousewheel', $xeIconPicker.handleGlobalMousewheelEvent);
  32569. globalEvents.on($xeIconPicker, 'mousedown', $xeIconPicker.handleGlobalMousedownEvent);
  32570. globalEvents.on($xeIconPicker, 'keydown', $xeIconPicker.handleGlobalKeydownEvent);
  32571. globalEvents.on($xeIconPicker, 'blur', $xeIconPicker.handleGlobalBlurEvent);
  32572. },
  32573. beforeDestroy: function beforeDestroy() {
  32574. var $xeIconPicker = this;
  32575. var panelElem = $xeIconPicker.$refs.refOptionPanel;
  32576. if (panelElem && panelElem.parentNode) {
  32577. panelElem.parentNode.removeChild(panelElem);
  32578. }
  32579. globalEvents.off($xeIconPicker, 'mousewheel');
  32580. globalEvents.off($xeIconPicker, 'mousedown');
  32581. globalEvents.off($xeIconPicker, 'keydown');
  32582. globalEvents.off($xeIconPicker, 'blur');
  32583. },
  32584. render: function render(h) {
  32585. return this.renderVN(h);
  32586. }
  32587. })); /* define-vxe-component end */
  32588. ;// CONCATENATED MODULE: ./packages/icon-picker/index.ts
  32589. var VxeIconPicker = Object.assign(icon_picker, {
  32590. install: function install(app) {
  32591. app.component(icon_picker.name, icon_picker);
  32592. }
  32593. });
  32594. dynamicApp.use(VxeIconPicker);
  32595. index_esm_VxeUI.component(icon_picker);
  32596. var IconPicker = VxeIconPicker;
  32597. /* harmony default export */ var packages_icon_picker = (VxeIconPicker);
  32598. ;// CONCATENATED MODULE: ./packages/image/src/preview.ts
  32599. /* harmony default export */ var preview = (/* define-vxe-component start */defineVxeComponent({
  32600. name: 'VxeImagePreview',
  32601. props: {
  32602. value: Number,
  32603. urlList: Array,
  32604. urlField: {
  32605. type: String,
  32606. default: function _default() {
  32607. return getConfig().imagePreview.urlField;
  32608. }
  32609. },
  32610. maskClosable: {
  32611. type: Boolean,
  32612. default: function _default() {
  32613. return getConfig().imagePreview.maskClosable;
  32614. }
  32615. },
  32616. marginSize: {
  32617. type: String,
  32618. default: function _default() {
  32619. return getConfig().imagePreview.marginSize;
  32620. }
  32621. },
  32622. showPrintButton: {
  32623. type: Boolean,
  32624. default: function _default() {
  32625. return getConfig().imagePreview.showPrintButton;
  32626. }
  32627. },
  32628. showDownloadButton: {
  32629. type: Boolean,
  32630. default: function _default() {
  32631. return getConfig().imagePreview.showDownloadButton;
  32632. }
  32633. },
  32634. zIndex: Number,
  32635. toolbarConfig: Object,
  32636. beforeDownloadMethod: Function,
  32637. downloadMethod: Function
  32638. },
  32639. provide: function provide() {
  32640. var $xeImagePreview = this;
  32641. return {
  32642. $xeImagePreview: $xeImagePreview
  32643. };
  32644. },
  32645. data: function data() {
  32646. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  32647. var reactData = {
  32648. activeIndex: 0,
  32649. offsetPct11: false,
  32650. offsetScale: 0,
  32651. offsetRotate: 0,
  32652. offsetLeft: 0,
  32653. offsetTop: 0
  32654. };
  32655. return {
  32656. xID: xID,
  32657. reactData: reactData
  32658. };
  32659. },
  32660. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  32661. computeUrlProp: function computeUrlProp() {
  32662. var $xeImagePreview = this;
  32663. var props = $xeImagePreview;
  32664. return props.urlField || 'url';
  32665. },
  32666. computeMarginSize: function computeMarginSize() {
  32667. var $xeImagePreview = this;
  32668. var props = $xeImagePreview;
  32669. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.marginSize || 0) || 16;
  32670. },
  32671. computeToolbarOpts: function computeToolbarOpts() {
  32672. var $xeImagePreview = this;
  32673. var props = $xeImagePreview;
  32674. return Object.assign({}, getConfig().imagePreview.toolbarConfig, props.toolbarConfig);
  32675. },
  32676. computeRotateText: function computeRotateText() {
  32677. var $xeImagePreview = this;
  32678. var reactData = $xeImagePreview.reactData;
  32679. var offsetRotate = reactData.offsetRotate;
  32680. if (offsetRotate) {
  32681. return "".concat(offsetRotate, "\xB0");
  32682. }
  32683. return '0°';
  32684. },
  32685. computeScaleText: function computeScaleText() {
  32686. var $xeImagePreview = this;
  32687. var reactData = $xeImagePreview.reactData;
  32688. var offsetScale = reactData.offsetScale;
  32689. if (offsetScale) {
  32690. return "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().ceil((1 + offsetScale) * 100), "%");
  32691. }
  32692. return '100%';
  32693. },
  32694. computeImgList: function computeImgList() {
  32695. var $xeImagePreview = this;
  32696. var props = $xeImagePreview;
  32697. var urlList = props.urlList;
  32698. var urlProp = $xeImagePreview.computeUrlProp;
  32699. if (urlList && urlList.length) {
  32700. return urlList.map(function (item) {
  32701. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(item)) {
  32702. return item;
  32703. }
  32704. if (item[urlProp]) {
  32705. return item[urlProp];
  32706. }
  32707. return '';
  32708. });
  32709. }
  32710. return [];
  32711. },
  32712. computeImgTransform: function computeImgTransform() {
  32713. var $xeImagePreview = this;
  32714. var reactData = $xeImagePreview.reactData;
  32715. var offsetScale = reactData.offsetScale,
  32716. offsetRotate = reactData.offsetRotate,
  32717. offsetLeft = reactData.offsetLeft,
  32718. offsetTop = reactData.offsetTop;
  32719. var stys = [];
  32720. var targetScale = 1;
  32721. if (offsetScale) {
  32722. targetScale = 1 + offsetScale;
  32723. stys.push("scale(".concat(targetScale, ")"));
  32724. }
  32725. if (offsetRotate) {
  32726. stys.push("rotate(".concat(offsetRotate, "deg)"));
  32727. }
  32728. if (offsetLeft || offsetTop) {
  32729. // 缩放与位移
  32730. offsetLeft /= targetScale;
  32731. offsetTop /= targetScale;
  32732. var targetOffsetLeft = offsetLeft;
  32733. var targetOffsetTop = offsetTop;
  32734. if (offsetRotate) {
  32735. // 转向与位移
  32736. switch (offsetRotate % 360) {
  32737. case 90:
  32738. case -270:
  32739. targetOffsetLeft = offsetTop;
  32740. targetOffsetTop = -offsetLeft;
  32741. break;
  32742. case 180:
  32743. case -180:
  32744. targetOffsetLeft = -offsetLeft;
  32745. targetOffsetTop = -offsetTop;
  32746. break;
  32747. case 270:
  32748. case -90:
  32749. targetOffsetLeft = -offsetTop;
  32750. targetOffsetTop = offsetLeft;
  32751. break;
  32752. }
  32753. }
  32754. stys.push("translate(".concat(targetOffsetLeft, "px, ").concat(targetOffsetTop, "px)"));
  32755. }
  32756. return stys.length ? stys.join(' ') : '';
  32757. }
  32758. }),
  32759. methods: {
  32760. //
  32761. // Method
  32762. //
  32763. dispatchEvent: function dispatchEvent(type, params, evnt) {
  32764. var $xeImagePreview = this;
  32765. $xeImagePreview.$emit(type, createEvent(evnt, {
  32766. $imagePreview: $xeImagePreview
  32767. }, params));
  32768. },
  32769. emitModel: function emitModel(value) {
  32770. var $xeImagePreview = this;
  32771. var _events = $xeImagePreview._events;
  32772. $xeImagePreview.$emit('input', value);
  32773. if (_events && _events.modelValue) {
  32774. $xeImagePreview.$emit('modelValue', value);
  32775. } else {
  32776. $xeImagePreview.$emit('model-value', value);
  32777. }
  32778. },
  32779. handleCloseEvent: function handleCloseEvent(evnt) {
  32780. var $xeImagePreview = this;
  32781. $xeImagePreview.dispatchEvent('close', {}, evnt);
  32782. },
  32783. resetStyle: function resetStyle() {
  32784. var $xeImagePreview = this;
  32785. var reactData = $xeImagePreview.reactData;
  32786. var elem = $xeImagePreview.$refs.refElem;
  32787. removeClass(elem, 'is--move');
  32788. Object.assign(reactData, {
  32789. offsetPct11: false,
  32790. offsetScale: 0,
  32791. offsetRotate: 0,
  32792. offsetLeft: 0,
  32793. offsetTop: 0
  32794. });
  32795. },
  32796. getOffsetZoomStep: function getOffsetZoomStep() {
  32797. var $xeImagePreview = this;
  32798. var reactData = $xeImagePreview.reactData;
  32799. var offsetScale = reactData.offsetScale;
  32800. var stepNum = 0.02;
  32801. if (offsetScale >= -0.6) {
  32802. stepNum = 0.04;
  32803. if (offsetScale >= -0.4) {
  32804. stepNum = 0.07;
  32805. if (offsetScale >= 0) {
  32806. stepNum = 0.1;
  32807. if (offsetScale >= 3) {
  32808. stepNum = 0.25;
  32809. if (offsetScale >= 8) {
  32810. stepNum = 0.4;
  32811. if (offsetScale >= 16) {
  32812. stepNum = 0.6;
  32813. if (offsetScale >= 24) {
  32814. stepNum = 0.9;
  32815. if (offsetScale >= 32) {
  32816. stepNum = 1.3;
  32817. if (offsetScale >= 39) {
  32818. stepNum = 1.9;
  32819. if (offsetScale >= 45) {
  32820. stepNum = 2.5;
  32821. }
  32822. }
  32823. }
  32824. }
  32825. }
  32826. }
  32827. }
  32828. }
  32829. }
  32830. }
  32831. return stepNum;
  32832. },
  32833. handleZoom: function handleZoom(isAdd) {
  32834. var $xeImagePreview = this;
  32835. var reactData = $xeImagePreview.reactData;
  32836. var offsetScale = reactData.offsetScale;
  32837. var stepNum = $xeImagePreview.getOffsetZoomStep();
  32838. if (isAdd) {
  32839. reactData.offsetScale = Number(Math.min(49, offsetScale + stepNum).toFixed(2));
  32840. } else {
  32841. reactData.offsetScale = Number(Math.max(-0.9, offsetScale - stepNum).toFixed(2));
  32842. }
  32843. },
  32844. handleChangeEvent: function handleChangeEvent(evnt, isNext) {
  32845. var $xeImagePreview = this;
  32846. var reactData = $xeImagePreview.reactData;
  32847. var activeIndex = reactData.activeIndex || 0;
  32848. var imgList = $xeImagePreview.computeImgList;
  32849. if (isNext) {
  32850. if (activeIndex >= imgList.length - 1) {
  32851. activeIndex = 0;
  32852. } else {
  32853. activeIndex++;
  32854. }
  32855. } else {
  32856. if (activeIndex <= 0) {
  32857. activeIndex = imgList.length - 1;
  32858. } else {
  32859. activeIndex--;
  32860. }
  32861. }
  32862. var imgUrl = imgList[activeIndex || 0];
  32863. reactData.activeIndex = activeIndex;
  32864. $xeImagePreview.resetStyle();
  32865. $xeImagePreview.emitModel(activeIndex);
  32866. $xeImagePreview.dispatchEvent('change', {
  32867. url: imgUrl,
  32868. activeIndex: activeIndex
  32869. }, evnt);
  32870. },
  32871. handleRotateImgEvent: function handleRotateImgEvent(evnt, isRight) {
  32872. var $xeImagePreview = this;
  32873. var reactData = $xeImagePreview.reactData;
  32874. var imgList = $xeImagePreview.computeImgList;
  32875. var activeIndex = reactData.activeIndex;
  32876. var imgUrl = imgList[activeIndex || 0];
  32877. var offsetRotate = reactData.offsetRotate;
  32878. if (isRight) {
  32879. offsetRotate += 90;
  32880. } else {
  32881. offsetRotate -= 90;
  32882. }
  32883. reactData.offsetRotate = offsetRotate;
  32884. $xeImagePreview.dispatchEvent('rotate', {
  32885. url: imgUrl,
  32886. rotateValue: offsetRotate
  32887. }, evnt);
  32888. },
  32889. handlePct11: function handlePct11() {
  32890. var $xeImagePreview = this;
  32891. var reactData = $xeImagePreview.reactData;
  32892. $xeImagePreview.resetStyle();
  32893. reactData.offsetPct11 = true;
  32894. },
  32895. handlePrintImg: function handlePrintImg() {
  32896. var $xeImagePreview = this;
  32897. var reactData = $xeImagePreview.reactData;
  32898. var activeIndex = reactData.activeIndex;
  32899. var imgList = $xeImagePreview.computeImgList;
  32900. var imgUrl = imgList[activeIndex || 0];
  32901. if (index_esm_VxeUI.print) {
  32902. index_esm_VxeUI.print({
  32903. align: 'center',
  32904. pageBreaks: [{
  32905. bodyHtml: "<img src=\"".concat(imgUrl, "\" style=\"max-width:100%;max-height:100%;\">")
  32906. }]
  32907. });
  32908. }
  32909. },
  32910. handleDownloadEvent: function handleDownloadEvent(evnt, imgUrl) {
  32911. var $xeImagePreview = this;
  32912. $xeImagePreview.dispatchEvent('download', {
  32913. url: imgUrl
  32914. }, evnt);
  32915. },
  32916. handleDefaultDownload: function handleDefaultDownload(evnt, imgUrl) {
  32917. var $xeImagePreview = this;
  32918. if (index_esm_VxeUI.saveFile) {
  32919. fetch(imgUrl).then(function (res) {
  32920. return res.blob().then(function (blob) {
  32921. index_esm_VxeUI.saveFile({
  32922. filename: imgUrl,
  32923. content: blob
  32924. });
  32925. $xeImagePreview.handleDownloadEvent(evnt, imgUrl);
  32926. });
  32927. }).catch(function () {
  32928. if (index_esm_VxeUI.modal) {
  32929. index_esm_VxeUI.modal.message({
  32930. content: getI18n('vxe.error.downErr'),
  32931. status: 'error'
  32932. });
  32933. }
  32934. });
  32935. }
  32936. },
  32937. handleDownloadImg: function handleDownloadImg(evnt) {
  32938. var $xeImagePreview = this;
  32939. var props = $xeImagePreview;
  32940. var reactData = $xeImagePreview.reactData;
  32941. var activeIndex = reactData.activeIndex;
  32942. var toolbarOpts = $xeImagePreview.computeToolbarOpts;
  32943. var btnConf = toolbarOpts.download;
  32944. var btnOpts = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(btnConf) ? {} : btnConf ? Object.assign({}, btnConf) : {};
  32945. var imgList = $xeImagePreview.computeImgList;
  32946. var imgUrl = imgList[activeIndex || 0];
  32947. var beforeDownloadFn = props.beforeDownloadMethod || btnOpts.beforeDownloadMethod || getConfig().imagePreview.beforeDownloadMethod;
  32948. var downloadFn = props.downloadMethod || btnOpts.downloadMethod || getConfig().imagePreview.downloadMethod;
  32949. Promise.resolve(beforeDownloadFn ? beforeDownloadFn({
  32950. $imagePreview: $xeImagePreview,
  32951. url: imgUrl,
  32952. index: activeIndex || 0
  32953. }) : true).then(function (status) {
  32954. if (status) {
  32955. if (downloadFn) {
  32956. Promise.resolve(downloadFn({
  32957. $imagePreview: $xeImagePreview,
  32958. url: imgUrl,
  32959. index: activeIndex || 0
  32960. })).then(function () {
  32961. $xeImagePreview.handleDownloadEvent(evnt, imgUrl);
  32962. }).catch(function (e) {
  32963. return e;
  32964. });
  32965. } else {
  32966. $xeImagePreview.handleDefaultDownload(evnt, imgUrl);
  32967. }
  32968. }
  32969. });
  32970. },
  32971. handleOperationBtn: function handleOperationBtn(evnt, code) {
  32972. var $xeImagePreview = this;
  32973. var reactData = $xeImagePreview.reactData;
  32974. var activeIndex = reactData.activeIndex;
  32975. var imgList = $xeImagePreview.computeImgList;
  32976. var imgUrl = imgList[activeIndex || 0];
  32977. if (imgUrl) {
  32978. switch (code) {
  32979. case 'zoomOut':
  32980. $xeImagePreview.handleZoom(false);
  32981. break;
  32982. case 'zoomIn':
  32983. $xeImagePreview.handleZoom(true);
  32984. break;
  32985. case 'pctFull':
  32986. $xeImagePreview.resetStyle();
  32987. break;
  32988. case 'pct11':
  32989. $xeImagePreview.handlePct11();
  32990. break;
  32991. case 'rotateLeft':
  32992. $xeImagePreview.handleRotateImgEvent(evnt, false);
  32993. break;
  32994. case 'rotateRight':
  32995. $xeImagePreview.handleRotateImgEvent(evnt, true);
  32996. break;
  32997. case 'print':
  32998. $xeImagePreview.handlePrintImg();
  32999. break;
  33000. case 'download':
  33001. $xeImagePreview.handleDownloadImg(evnt);
  33002. break;
  33003. }
  33004. }
  33005. },
  33006. wheelEvent: function wheelEvent(evnt) {
  33007. var $xeImagePreview = this;
  33008. var delta = evnt.deltaY;
  33009. if (delta > 0) {
  33010. evnt.preventDefault();
  33011. $xeImagePreview.handleZoom(false);
  33012. } else if (delta < 0) {
  33013. evnt.preventDefault();
  33014. $xeImagePreview.handleZoom(true);
  33015. }
  33016. },
  33017. moveEvent: function moveEvent(evnt) {
  33018. var $xeImagePreview = this;
  33019. var reactData = $xeImagePreview.reactData;
  33020. var offsetTop = reactData.offsetTop,
  33021. offsetLeft = reactData.offsetLeft;
  33022. var elem = $xeImagePreview.$refs.refElem;
  33023. evnt.preventDefault();
  33024. var domMousemove = document.onmousemove;
  33025. var domMouseup = document.onmouseup;
  33026. var startX = evnt.pageX;
  33027. var startY = evnt.pageY;
  33028. var marginSize = $xeImagePreview.computeMarginSize;
  33029. document.onmousemove = function (et) {
  33030. var pageX = et.pageX,
  33031. pageY = et.pageY;
  33032. var _getDomNode = getDomNode(),
  33033. visibleHeight = _getDomNode.visibleHeight,
  33034. visibleWidth = _getDomNode.visibleWidth;
  33035. et.preventDefault();
  33036. addClass(elem, 'is--move');
  33037. // 限制边界值
  33038. if (pageX > marginSize && pageY > marginSize && pageX < visibleWidth - marginSize && pageY < visibleHeight - marginSize) {
  33039. reactData.offsetLeft = offsetLeft + pageX - startX;
  33040. reactData.offsetTop = offsetTop + pageY - startY;
  33041. }
  33042. };
  33043. document.onmouseup = function () {
  33044. document.onmousemove = domMousemove;
  33045. document.onmouseup = domMouseup;
  33046. removeClass(elem, 'is--move');
  33047. };
  33048. },
  33049. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  33050. var $xeImagePreview = this;
  33051. var reactData = $xeImagePreview.reactData;
  33052. var isControlKey = hasControlKey(evnt);
  33053. var hasShiftKey = evnt.shiftKey;
  33054. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  33055. var isDownArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  33056. var isLeftArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
  33057. var isRightArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
  33058. var isR = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.R);
  33059. var isP = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.P);
  33060. if (isUpArrow) {
  33061. evnt.preventDefault();
  33062. if (hasShiftKey) {
  33063. reactData.offsetTop -= 1;
  33064. } else {
  33065. $xeImagePreview.handleZoom(true);
  33066. }
  33067. } else if (isDownArrow) {
  33068. evnt.preventDefault();
  33069. if (hasShiftKey) {
  33070. reactData.offsetTop += 1;
  33071. } else {
  33072. $xeImagePreview.handleZoom(false);
  33073. }
  33074. } else if (isLeftArrow) {
  33075. evnt.preventDefault();
  33076. if (hasShiftKey) {
  33077. reactData.offsetLeft -= 1;
  33078. } else {
  33079. $xeImagePreview.handleChangeEvent(evnt, false);
  33080. }
  33081. } else if (isRightArrow) {
  33082. evnt.preventDefault();
  33083. if (hasShiftKey) {
  33084. reactData.offsetLeft += 1;
  33085. } else {
  33086. $xeImagePreview.handleChangeEvent(evnt, true);
  33087. }
  33088. } else if (isR && isControlKey) {
  33089. evnt.preventDefault();
  33090. if (hasShiftKey) {
  33091. $xeImagePreview.handleRotateImgEvent(evnt, false);
  33092. } else {
  33093. $xeImagePreview.handleRotateImgEvent(evnt, true);
  33094. }
  33095. } else if (isP && isControlKey) {
  33096. evnt.preventDefault();
  33097. $xeImagePreview.handlePrintImg();
  33098. }
  33099. },
  33100. handleClickMaskEvent: function handleClickMaskEvent(evnt) {
  33101. var $xeImagePreview = this;
  33102. var props = $xeImagePreview;
  33103. if (props.maskClosable) {
  33104. if (evnt.target === evnt.currentTarget) {
  33105. $xeImagePreview.dispatchEvent('close', {}, evnt);
  33106. }
  33107. }
  33108. },
  33109. //
  33110. // Render
  33111. //
  33112. renderImgWrapper: function renderImgWrapper(h) {
  33113. var $xeImagePreview = this;
  33114. var reactData = $xeImagePreview.reactData;
  33115. var activeIndex = reactData.activeIndex;
  33116. var imgList = $xeImagePreview.computeImgList;
  33117. var imgTransform = $xeImagePreview.computeImgTransform;
  33118. return h('div', {
  33119. class: 'vxe-image-preview--img-list',
  33120. on: {
  33121. click: $xeImagePreview.handleClickMaskEvent
  33122. }
  33123. }, imgList.map(function (url, index) {
  33124. var isActive = activeIndex === index;
  33125. return h('img', {
  33126. class: ['vxe-image-preview--img-item', {
  33127. 'is--active': isActive
  33128. }],
  33129. style: isActive ? {
  33130. transform: imgTransform
  33131. } : {},
  33132. attrs: {
  33133. src: url
  33134. },
  33135. on: {
  33136. mousedown: function mousedown(evnt) {
  33137. $xeImagePreview.moveEvent(evnt);
  33138. }
  33139. }
  33140. });
  33141. }));
  33142. },
  33143. renderOperationBtn: function renderOperationBtn(h, code, icon) {
  33144. var $xeImagePreview = this;
  33145. var toolbarOpts = $xeImagePreview.computeToolbarOpts;
  33146. var btnConf = toolbarOpts[code];
  33147. var btnOpts = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(btnConf) ? {} : btnConf ? Object.assign({}, btnConf) : {};
  33148. var showBtn = btnConf !== false;
  33149. return showBtn ? h('div', {
  33150. class: 'vxe-image-preview--operation-btn',
  33151. attrs: {
  33152. title: getI18n("vxe.imagePreview.operBtn.".concat(code))
  33153. },
  33154. on: {
  33155. click: function click(evnt) {
  33156. $xeImagePreview.handleOperationBtn(evnt, code);
  33157. }
  33158. }
  33159. }, [h('i', {
  33160. class: btnOpts.icon || getIcon()[icon]
  33161. })]) : renderEmptyElement($xeImagePreview);
  33162. },
  33163. renderBtnWrapper: function renderBtnWrapper(h) {
  33164. var $xeImagePreview = this;
  33165. var props = $xeImagePreview;
  33166. var reactData = $xeImagePreview.reactData;
  33167. var showPrintButton = props.showPrintButton,
  33168. showDownloadButton = props.showDownloadButton;
  33169. var activeIndex = reactData.activeIndex;
  33170. var imgList = $xeImagePreview.computeImgList;
  33171. var rotateText = $xeImagePreview.computeRotateText;
  33172. var scaleText = $xeImagePreview.computeScaleText;
  33173. var toolbarOpts = $xeImagePreview.computeToolbarOpts;
  33174. return h('div', {
  33175. class: 'vxe-image-preview--btn-wrapper'
  33176. }, [h('div', {
  33177. class: 'vxe-image-preview--close-wrapper'
  33178. }, [h('div', {
  33179. class: 'vxe-image-preview--close-btn',
  33180. on: {
  33181. click: $xeImagePreview.handleCloseEvent
  33182. }
  33183. }, [h('i', {
  33184. class: getIcon().IMAGE_PREVIEW_CLOSE
  33185. })]), h('div', {
  33186. class: 'vxe-image-preview--close-bg'
  33187. })]), imgList.length > 1 ? h('div', {
  33188. class: 'vxe-image-preview--previous-btn',
  33189. on: {
  33190. click: function click(evnt) {
  33191. $xeImagePreview.handleChangeEvent(evnt, false);
  33192. }
  33193. }
  33194. }, [h('i', {
  33195. class: getIcon().IMAGE_PREVIEW_PREVIOUS
  33196. })]) : renderEmptyElement($xeImagePreview), imgList.length > 1 ? h('div', {
  33197. class: 'vxe-image-preview--next-btn',
  33198. on: {
  33199. click: function click(evnt) {
  33200. $xeImagePreview.handleChangeEvent(evnt, true);
  33201. }
  33202. }
  33203. }, [h('i', {
  33204. class: getIcon().IMAGE_PREVIEW_NEXT
  33205. })]) : renderEmptyElement($xeImagePreview), h('div', {
  33206. class: 'vxe-image-preview--operation-info'
  33207. }, [h('div', {
  33208. class: 'vxe-image-preview--operation-deg'
  33209. }, rotateText), h('div', {
  33210. class: 'vxe-image-preview--operation-pct'
  33211. }, scaleText)]), h('div', {
  33212. class: 'vxe-image-preview--operation-wrapper'
  33213. }, [h('div', {
  33214. class: 'vxe-image-preview--operation-active-count'
  33215. }, [h('span', {
  33216. class: 'vxe-image-preview--operation-active-current'
  33217. }, "".concat((activeIndex || 0) + 1)), h('span', {
  33218. class: 'vxe-image-preview--operation-active-total'
  33219. }, "/".concat(imgList.length))]), $xeImagePreview.renderOperationBtn(h, 'zoomOut', 'IMAGE_PREVIEW_ZOOM_OUT'), $xeImagePreview.renderOperationBtn(h, 'zoomIn', 'IMAGE_PREVIEW_ZOOM_IN'), $xeImagePreview.renderOperationBtn(h, 'pctFull', 'IMAGE_PREVIEW_PCT_FULL'), $xeImagePreview.renderOperationBtn(h, 'pct11', 'IMAGE_PREVIEW_PCT_1_1'), $xeImagePreview.renderOperationBtn(h, 'rotateLeft', 'IMAGE_PREVIEW_ROTATE_LEFT'), $xeImagePreview.renderOperationBtn(h, 'rotateRight', 'IMAGE_PREVIEW_ROTATE_RIGHT'), showPrintButton || toolbarOpts.print ? $xeImagePreview.renderOperationBtn(h, 'print', 'IMAGE_PREVIEW_PRINT') : renderEmptyElement($xeImagePreview), showDownloadButton || toolbarOpts.download ? $xeImagePreview.renderOperationBtn(h, 'download', 'IMAGE_PREVIEW_DOWNLOAD') : renderEmptyElement($xeImagePreview)])]);
  33220. },
  33221. renderVN: function renderVN(h) {
  33222. var $xeImagePreview = this;
  33223. var reactData = $xeImagePreview.reactData;
  33224. var offsetPct11 = reactData.offsetPct11;
  33225. return h('div', {
  33226. ref: 'refElem',
  33227. class: ['vxe-image-preview', {
  33228. 'is--pct11': offsetPct11
  33229. }]
  33230. }, [$xeImagePreview.renderImgWrapper(h), $xeImagePreview.renderBtnWrapper(h)]);
  33231. }
  33232. },
  33233. watch: {
  33234. value: function value(val) {
  33235. var $xeImagePreview = this;
  33236. var reactData = $xeImagePreview.reactData;
  33237. reactData.activeIndex = val;
  33238. $xeImagePreview.resetStyle();
  33239. }
  33240. },
  33241. created: function created() {
  33242. var $xeImagePreview = this;
  33243. var props = $xeImagePreview;
  33244. var reactData = $xeImagePreview.reactData;
  33245. reactData.activeIndex = props.value || 0;
  33246. },
  33247. mounted: function mounted() {
  33248. var $xeImagePreview = this;
  33249. var elem = $xeImagePreview.$refs.refElem;
  33250. if (elem) {
  33251. elem.addEventListener('wheel', $xeImagePreview.wheelEvent, {
  33252. passive: false
  33253. });
  33254. }
  33255. globalEvents.on($xeImagePreview, 'keydown', $xeImagePreview.handleGlobalKeydownEvent);
  33256. },
  33257. beforeDestroy: function beforeDestroy() {
  33258. var $xeImagePreview = this;
  33259. var elem = $xeImagePreview.$refs.refElem;
  33260. if (elem) {
  33261. elem.removeEventListener('wheel', $xeImagePreview.wheelEvent);
  33262. removeClass(elem, 'is--move');
  33263. }
  33264. globalEvents.off($xeImagePreview, 'keydown');
  33265. },
  33266. render: function render(h) {
  33267. return this.renderVN(h);
  33268. }
  33269. })); /* define-vxe-component end */
  33270. ;// CONCATENATED MODULE: ./packages/image/src/util.ts
  33271. var openPreviewImage = function openPreviewImage(options) {
  33272. if (index_esm_VxeUI.modal) {
  33273. var opts = Object.assign({
  33274. escClosable: true
  33275. }, options);
  33276. var urlList = opts.urlList,
  33277. activeIndex = opts.activeIndex,
  33278. zIndex = opts.zIndex;
  33279. var _ref = opts.events || {},
  33280. _rotate = _ref.rotate,
  33281. _change = _ref.change;
  33282. var modalId = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('image-preview');
  33283. index_esm_VxeUI.modal.open({
  33284. id: modalId,
  33285. title: '预览',
  33286. width: '100%',
  33287. height: '100%',
  33288. showHeader: false,
  33289. showFooter: false,
  33290. padding: false,
  33291. escClosable: opts.escClosable,
  33292. zIndex: zIndex,
  33293. className: 'vxe-image-preview-popup-wrapper',
  33294. slots: {
  33295. default: function _default(params, h) {
  33296. return h(preview, {
  33297. props: {
  33298. value: activeIndex,
  33299. urlList: urlList,
  33300. urlField: opts.urlField,
  33301. marginSize: opts.marginSize,
  33302. maskClosable: opts.maskClosable,
  33303. toolbarConfig: opts.toolbarConfig,
  33304. showPrintButton: opts.showPrintButton,
  33305. showDownloadButton: opts.showDownloadButton,
  33306. beforeDownloadMethod: opts.beforeDownloadMethod,
  33307. downloadMethod: opts.downloadMethod
  33308. },
  33309. on: {
  33310. close: function close() {
  33311. index_esm_VxeUI.modal.close(modalId);
  33312. },
  33313. change: function change(eventParams) {
  33314. if (_change) {
  33315. _change.call(this, eventParams);
  33316. }
  33317. },
  33318. rotate: function rotate(eventParams) {
  33319. if (_rotate) {
  33320. _rotate.call(this, eventParams);
  33321. }
  33322. }
  33323. }
  33324. });
  33325. }
  33326. }
  33327. });
  33328. }
  33329. return Promise.resolve();
  33330. };
  33331. ;// CONCATENATED MODULE: ./packages/image/src/image.ts
  33332. /* harmony default export */ var src_image = (/* define-vxe-component start */defineVxeComponent({
  33333. name: 'VxeImage',
  33334. mixins: [globalMixins.sizeMixin],
  33335. props: {
  33336. src: [String, Array],
  33337. alt: [String, Number],
  33338. loading: String,
  33339. title: [String, Number],
  33340. width: [String, Number],
  33341. height: [String, Number],
  33342. circle: Boolean,
  33343. zIndex: Number,
  33344. maskClosable: {
  33345. type: Boolean,
  33346. default: function _default() {
  33347. return getConfig().image.maskClosable;
  33348. }
  33349. },
  33350. toolbarConfig: Object,
  33351. showPreview: {
  33352. type: Boolean,
  33353. default: function _default() {
  33354. return getConfig().image.showPreview;
  33355. }
  33356. },
  33357. showPrintButton: {
  33358. type: Boolean,
  33359. default: function _default() {
  33360. return getConfig().image.showPrintButton;
  33361. }
  33362. },
  33363. showDownloadButton: {
  33364. type: Boolean,
  33365. default: function _default() {
  33366. return getConfig().image.showDownloadButton;
  33367. }
  33368. },
  33369. size: {
  33370. type: String,
  33371. default: function _default() {
  33372. return getConfig().image.size || getConfig().size;
  33373. }
  33374. },
  33375. getThumbnailUrlMethod: Function
  33376. },
  33377. data: function data() {
  33378. var reactData = {};
  33379. return {
  33380. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  33381. reactData: reactData
  33382. };
  33383. },
  33384. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  33385. computeImgStyle: function computeImgStyle() {
  33386. var $xeImage = this;
  33387. var props = $xeImage;
  33388. var width = props.width,
  33389. height = props.height;
  33390. var style = {};
  33391. if (width && height) {
  33392. style.maxWidth = toCssUnit(width);
  33393. style.maxHeight = toCssUnit(height);
  33394. } else {
  33395. if (width) {
  33396. style.width = toCssUnit(width);
  33397. }
  33398. if (height) {
  33399. style.height = toCssUnit(height);
  33400. }
  33401. }
  33402. return style;
  33403. },
  33404. computeImgList: function computeImgList() {
  33405. var $xeImage = this;
  33406. var props = $xeImage;
  33407. var src = props.src;
  33408. if (src) {
  33409. return (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(src) ? src : [src]).map(function (item) {
  33410. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(item)) {
  33411. return {
  33412. url: item,
  33413. alt: ''
  33414. };
  33415. }
  33416. return {
  33417. url: item.url,
  33418. alt: item.alt
  33419. };
  33420. });
  33421. }
  33422. return [];
  33423. },
  33424. computeImgItem: function computeImgItem() {
  33425. var $xeImage = this;
  33426. var imgList = $xeImage.computeImgList;
  33427. return imgList[0];
  33428. },
  33429. computeImgUrl: function computeImgUrl() {
  33430. var $xeImage = this;
  33431. var imgItem = $xeImage.computeImgItem;
  33432. return imgItem ? "".concat(imgItem.url || '') : '';
  33433. },
  33434. computeImgThumbnailUrl: function computeImgThumbnailUrl() {
  33435. var $xeImage = this;
  33436. var props = $xeImage;
  33437. var getThumbnailUrlFn = props.getThumbnailUrlMethod || getConfig().image.getThumbnailUrlMethod;
  33438. var imgUrl = $xeImage.computeImgUrl;
  33439. return getThumbnailUrlFn ? getThumbnailUrlFn({
  33440. url: imgUrl,
  33441. $image: $xeImage
  33442. }) : '';
  33443. }
  33444. }),
  33445. methods: {
  33446. //
  33447. // Method
  33448. //
  33449. dispatchEvent: function dispatchEvent(type, params, evnt) {
  33450. var $xeImage = this;
  33451. $xeImage.$emit(type, createEvent(evnt, {
  33452. $image: $xeImage
  33453. }, params));
  33454. },
  33455. clickEvent: function clickEvent(evnt) {
  33456. var $xeImage = this;
  33457. var props = $xeImage;
  33458. var $xeImageGroup = $xeImage.$xeImageGroup;
  33459. var showPreview = props.showPreview,
  33460. toolbarConfig = props.toolbarConfig,
  33461. showPrintButton = props.showPrintButton,
  33462. showDownloadButton = props.showDownloadButton,
  33463. maskClosable = props.maskClosable,
  33464. zIndex = props.zIndex;
  33465. var imgList = $xeImage.computeImgList;
  33466. var imgUrl = $xeImage.computeImgUrl;
  33467. if ($xeImageGroup) {
  33468. $xeImageGroup.handleClickImgEvent(evnt, {
  33469. url: imgUrl
  33470. });
  33471. } else {
  33472. if (showPreview && imgUrl) {
  33473. openPreviewImage({
  33474. urlList: imgList,
  33475. toolbarConfig: toolbarConfig,
  33476. showPrintButton: showPrintButton,
  33477. showDownloadButton: showDownloadButton,
  33478. maskClosable: maskClosable,
  33479. zIndex: zIndex,
  33480. events: {
  33481. change: function change(eventParams) {
  33482. $xeImage.dispatchEvent('change', eventParams, eventParams.$event);
  33483. },
  33484. rotate: function rotate(eventParams) {
  33485. $xeImage.dispatchEvent('rotate', eventParams, eventParams.$event);
  33486. }
  33487. }
  33488. });
  33489. }
  33490. $xeImage.dispatchEvent('click', {
  33491. url: imgUrl
  33492. }, evnt);
  33493. }
  33494. },
  33495. //
  33496. // Render
  33497. //
  33498. renderVN: function renderVN(h) {
  33499. var $xeImage = this;
  33500. var props = $xeImage;
  33501. var alt = props.alt,
  33502. loading = props.loading,
  33503. circle = props.circle;
  33504. var imgStyle = $xeImage.computeImgStyle;
  33505. var imgUrl = $xeImage.computeImgUrl;
  33506. var imgThumbnailUrl = $xeImage.computeImgThumbnailUrl;
  33507. var vSize = $xeImage.computeSize;
  33508. return h('img', {
  33509. ref: 'refElem',
  33510. class: ['vxe-image', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--circle', circle)],
  33511. style: imgStyle,
  33512. attrs: {
  33513. src: imgThumbnailUrl || imgUrl,
  33514. alt: alt,
  33515. loading: loading
  33516. },
  33517. on: {
  33518. click: $xeImage.clickEvent
  33519. }
  33520. });
  33521. }
  33522. },
  33523. render: function render(h) {
  33524. return this.renderVN(h);
  33525. }
  33526. })); /* define-vxe-component end */
  33527. ;// CONCATENATED MODULE: ./packages/image/index.ts
  33528. var VxeImage = Object.assign({}, src_image, {
  33529. install: function install(app) {
  33530. app.component(src_image.name, src_image);
  33531. }
  33532. });
  33533. dynamicApp.use(VxeImage);
  33534. index_esm_VxeUI.component(src_image);
  33535. var image_Image = VxeImage;
  33536. /* harmony default export */ var packages_image = (VxeImage);
  33537. ;// CONCATENATED MODULE: ./packages/image/src/group.ts
  33538. /* harmony default export */ var src_group = (/* define-vxe-component start */defineVxeComponent({
  33539. name: 'VxeImageGroup',
  33540. mixins: [globalMixins.sizeMixin],
  33541. props: {
  33542. urlList: [Array, String],
  33543. showPreview: {
  33544. type: Boolean,
  33545. default: function _default() {
  33546. return getConfig().imageGroup.showPreview;
  33547. }
  33548. },
  33549. imageStyle: Object,
  33550. zIndex: Number,
  33551. size: {
  33552. type: String,
  33553. default: function _default() {
  33554. return getConfig().imageGroup.size || getConfig().size;
  33555. }
  33556. },
  33557. toolbarConfig: Object,
  33558. showPrintButton: {
  33559. type: Boolean,
  33560. default: function _default() {
  33561. return getConfig().imageGroup.showPrintButton;
  33562. }
  33563. },
  33564. showDownloadButton: {
  33565. type: Boolean,
  33566. default: function _default() {
  33567. return getConfig().imageGroup.showDownloadButton;
  33568. }
  33569. },
  33570. getThumbnailUrlMethod: Function
  33571. },
  33572. provide: function provide() {
  33573. var $xeImageGroup = this;
  33574. return {
  33575. $xeImageGroup: $xeImageGroup
  33576. };
  33577. },
  33578. data: function data() {
  33579. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  33580. var reactData = {};
  33581. return {
  33582. xID: xID,
  33583. reactData: reactData
  33584. };
  33585. },
  33586. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  33587. computeImgList: function computeImgList() {
  33588. var $xeImageGroup = this;
  33589. var props = $xeImageGroup;
  33590. var urlList = props.urlList;
  33591. if (urlList) {
  33592. return (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(urlList) ? urlList : [urlList]).map(function (item) {
  33593. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(item)) {
  33594. return {
  33595. url: item,
  33596. alt: ''
  33597. };
  33598. }
  33599. return {
  33600. url: item.url,
  33601. alt: item.alt
  33602. };
  33603. });
  33604. }
  33605. return [];
  33606. },
  33607. computeImgStyleOpts: function computeImgStyleOpts() {
  33608. var $xeImageGroup = this;
  33609. var props = $xeImageGroup;
  33610. return Object.assign({}, getConfig().imageGroup.imageStyle, props.imageStyle);
  33611. },
  33612. computeGetThumbnailUrlMethod: function computeGetThumbnailUrlMethod() {
  33613. var $xeImageGroup = this;
  33614. var props = $xeImageGroup;
  33615. return props.getThumbnailUrlMethod || getConfig().imageGroup.getThumbnailUrlMethod;
  33616. }
  33617. }),
  33618. methods: {
  33619. //
  33620. // Method
  33621. //
  33622. dispatchEvent: function dispatchEvent(type, params, evnt) {
  33623. var $xeImageGroup = this;
  33624. $xeImageGroup.$emit(type, createEvent(evnt, {
  33625. $imageGroup: $xeImageGroup
  33626. }, params));
  33627. },
  33628. handleClickImgEvent: function handleClickImgEvent(evnt, params) {
  33629. var $xeImageGroup = this;
  33630. var props = $xeImageGroup;
  33631. var showPreview = props.showPreview,
  33632. toolbarConfig = props.toolbarConfig,
  33633. showPrintButton = props.showPrintButton,
  33634. showDownloadButton = props.showDownloadButton,
  33635. zIndex = props.zIndex;
  33636. var url = params.url;
  33637. var imgList = $xeImageGroup.computeImgList;
  33638. if (showPreview && url) {
  33639. openPreviewImage({
  33640. activeIndex: Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(imgList, function (item) {
  33641. return item.url === url;
  33642. })),
  33643. urlList: imgList,
  33644. toolbarConfig: toolbarConfig,
  33645. showPrintButton: showPrintButton,
  33646. showDownloadButton: showDownloadButton,
  33647. zIndex: zIndex,
  33648. events: {
  33649. change: function change(eventParams) {
  33650. $xeImageGroup.dispatchEvent('change', eventParams, eventParams.$event);
  33651. },
  33652. rotate: function rotate(eventParams) {
  33653. $xeImageGroup.dispatchEvent('rotate', eventParams, eventParams.$event);
  33654. }
  33655. }
  33656. });
  33657. }
  33658. $xeImageGroup.dispatchEvent('click', {
  33659. url: url,
  33660. urlList: imgList
  33661. }, evnt);
  33662. },
  33663. //
  33664. // Render
  33665. //
  33666. renderVN: function renderVN(h) {
  33667. var $xeImageGroup = this;
  33668. var imgList = $xeImageGroup.computeImgList;
  33669. var vSize = $xeImageGroup.computeSize;
  33670. var imgStyleOpts = $xeImageGroup.computeImgStyleOpts;
  33671. var getThumbnailUrlMethod = $xeImageGroup.computeGetThumbnailUrlMethod;
  33672. return h('div', {
  33673. class: ['vxe-image-group', _defineProperty({}, "size--".concat(vSize), vSize)]
  33674. }, imgList ? imgList.map(function (item, index) {
  33675. return h(src_image, {
  33676. key: index,
  33677. props: {
  33678. src: item.url,
  33679. alt: item.alt,
  33680. width: imgStyleOpts.width,
  33681. height: imgStyleOpts.height,
  33682. getThumbnailUrlMethod: getThumbnailUrlMethod
  33683. }
  33684. });
  33685. }) : []);
  33686. }
  33687. },
  33688. render: function render(h) {
  33689. return this.renderVN(h);
  33690. }
  33691. })); /* define-vxe-component end */
  33692. ;// CONCATENATED MODULE: ./packages/image-group/index.ts
  33693. var VxeImageGroup = Object.assign({}, src_group, {
  33694. install: function install(app) {
  33695. app.component(src_group.name, src_group);
  33696. }
  33697. });
  33698. dynamicApp.use(VxeImageGroup);
  33699. index_esm_VxeUI.component(src_group);
  33700. var ImageGroup = VxeImageGroup;
  33701. /* harmony default export */ var image_group = (VxeImageGroup);
  33702. ;// CONCATENATED MODULE: ./packages/image-preview/index.ts
  33703. var VxeImagePreview = Object.assign(preview, {
  33704. install: function install(app) {
  33705. app.component(preview.name, preview);
  33706. }
  33707. });
  33708. index_esm_VxeUI.previewImage = openPreviewImage;
  33709. dynamicApp.use(VxeImagePreview);
  33710. index_esm_VxeUI.component(preview);
  33711. var ImagePreview = VxeImagePreview;
  33712. /* harmony default export */ var image_preview = (VxeImagePreview);
  33713. ;// CONCATENATED MODULE: ./packages/input/index.ts
  33714. var VxeInput = Object.assign(input, {
  33715. install: function install(app) {
  33716. app.component(input.name, input);
  33717. }
  33718. });
  33719. dynamicApp.use(VxeInput);
  33720. index_esm_VxeUI.component(input);
  33721. var Input = VxeInput;
  33722. /* harmony default export */ var packages_input = (VxeInput);
  33723. ;// CONCATENATED MODULE: ./packages/layout-aside/src/layout-aside.ts
  33724. /* harmony default export */ var layout_aside = (/* define-vxe-component start */defineVxeComponent({
  33725. name: 'VxeLayoutAside',
  33726. mixins: [globalMixins.sizeMixin],
  33727. props: {
  33728. width: [String, Number],
  33729. collapsed: Boolean,
  33730. collapseWidth: [String, Number],
  33731. loading: Boolean,
  33732. padding: Boolean,
  33733. size: {
  33734. type: String,
  33735. default: function _default() {
  33736. return getConfig().layoutAside.size || getConfig().size;
  33737. }
  33738. }
  33739. },
  33740. provide: function provide() {
  33741. var $xeLayoutAside = this;
  33742. return {
  33743. $xeLayoutAside: $xeLayoutAside
  33744. };
  33745. },
  33746. data: function data() {
  33747. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  33748. var reactData = {};
  33749. return {
  33750. xID: xID,
  33751. reactData: reactData
  33752. };
  33753. },
  33754. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  33755. computeWrapperWidth: function computeWrapperWidth() {
  33756. var $xeLayoutAside = this;
  33757. var props = $xeLayoutAside;
  33758. var width = props.width,
  33759. collapsed = props.collapsed,
  33760. collapseWidth = props.collapseWidth;
  33761. if (collapsed) {
  33762. if (collapseWidth) {
  33763. return toCssUnit(collapseWidth);
  33764. }
  33765. } else {
  33766. if (width) {
  33767. return toCssUnit(width);
  33768. }
  33769. }
  33770. return '';
  33771. }
  33772. }),
  33773. methods: {
  33774. //
  33775. // Method
  33776. //
  33777. dispatchEvent: function dispatchEvent(type, params, evnt) {
  33778. var $xeLayoutAside = this;
  33779. $xeLayoutAside.$emit(type, createEvent(evnt, {
  33780. $layoutAside: $xeLayoutAside
  33781. }, params));
  33782. },
  33783. //
  33784. // Render
  33785. //
  33786. renderVN: function renderVN(h) {
  33787. var $xeLayoutAside = this;
  33788. var props = $xeLayoutAside;
  33789. var slots = $xeLayoutAside.$scopedSlots;
  33790. var width = props.width,
  33791. collapsed = props.collapsed,
  33792. loading = props.loading,
  33793. padding = props.padding;
  33794. var wrapperWidth = $xeLayoutAside.computeWrapperWidth;
  33795. var vSize = $xeLayoutAside.computeSize;
  33796. var defaultSlot = slots.default;
  33797. return h('aside', {
  33798. class: ['vxe-layout-aside', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--padding', padding), 'is--default-width', !width), 'is--collapse', collapsed), 'is--loading', loading)],
  33799. style: wrapperWidth ? {
  33800. width: wrapperWidth
  33801. } : {}
  33802. }, [h('div', {
  33803. class: 'vxe-layout-aside--inner'
  33804. }, defaultSlot ? defaultSlot({}) : []),
  33805. /**
  33806. * 加载中
  33807. */
  33808. h(src_loading, {
  33809. class: 'vxe-list-view--loading',
  33810. props: {
  33811. value: loading
  33812. }
  33813. })]);
  33814. }
  33815. },
  33816. render: function render(h) {
  33817. return this.renderVN(h);
  33818. }
  33819. })); /* define-vxe-component end */
  33820. ;// CONCATENATED MODULE: ./packages/layout-aside/index.ts
  33821. var VxeLayoutAside = Object.assign({}, layout_aside, {
  33822. install: function install(app) {
  33823. app.component(layout_aside.name, layout_aside);
  33824. }
  33825. });
  33826. dynamicApp.use(VxeLayoutAside);
  33827. index_esm_VxeUI.component(layout_aside);
  33828. var LayoutAside = VxeLayoutAside;
  33829. /* harmony default export */ var packages_layout_aside = (VxeLayoutAside);
  33830. ;// CONCATENATED MODULE: ./packages/layout-body/src/layout-body.ts
  33831. /* harmony default export */ var layout_body = (/* define-vxe-component start */defineVxeComponent({
  33832. name: 'VxeLayoutBody',
  33833. mixins: [globalMixins.sizeMixin],
  33834. props: {
  33835. loading: Boolean,
  33836. padding: Boolean,
  33837. size: {
  33838. type: String,
  33839. default: function _default() {
  33840. return getConfig().layoutBody.size || getConfig().size;
  33841. }
  33842. }
  33843. },
  33844. data: function data() {
  33845. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  33846. var reactData = {};
  33847. return {
  33848. xID: xID,
  33849. reactData: reactData
  33850. };
  33851. },
  33852. computed: _objectSpread2({}, {}),
  33853. methods: {
  33854. //
  33855. // Method
  33856. //
  33857. dispatchEvent: function dispatchEvent(type, params, evnt) {
  33858. var $xeLayoutBody = this;
  33859. $xeLayoutBody.$emit(type, createEvent(evnt, {
  33860. $layoutBody: $xeLayoutBody
  33861. }, params));
  33862. },
  33863. //
  33864. // Render
  33865. //
  33866. renderVN: function renderVN(h) {
  33867. var $xeLayoutBody = this;
  33868. var slots = $xeLayoutBody.$scopedSlots;
  33869. var loading = $xeLayoutBody.loading,
  33870. padding = $xeLayoutBody.padding;
  33871. var vSize = $xeLayoutBody.computeSize;
  33872. var defaultSlot = slots.default;
  33873. return h('div', {
  33874. class: ['vxe-layout-body', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--loading', loading), 'is--padding', padding)]
  33875. }, [h('div', {
  33876. class: 'vxe-layout-body--inner'
  33877. }, defaultSlot ? defaultSlot({}) : []),
  33878. /**
  33879. * 加载中
  33880. */
  33881. h(src_loading, {
  33882. class: 'vxe-list-view--loading',
  33883. props: {
  33884. value: loading
  33885. }
  33886. })]);
  33887. }
  33888. },
  33889. render: function render(h) {
  33890. return this.renderVN(h);
  33891. }
  33892. })); /* define-vxe-component end */
  33893. ;// CONCATENATED MODULE: ./packages/layout-body/index.ts
  33894. var VxeLayoutBody = Object.assign({}, layout_body, {
  33895. install: function install(app) {
  33896. app.component(layout_body.name, layout_body);
  33897. }
  33898. });
  33899. dynamicApp.use(VxeLayoutBody);
  33900. index_esm_VxeUI.component(layout_body);
  33901. var LayoutBody = VxeLayoutBody;
  33902. /* harmony default export */ var packages_layout_body = (VxeLayoutBody);
  33903. ;// CONCATENATED MODULE: ./packages/layout-container/src/layout-container.ts
  33904. /* harmony default export */ var layout_container = (/* define-vxe-component start */defineVxeComponent({
  33905. name: 'VxeLayoutContainer',
  33906. mixins: [globalMixins.sizeMixin],
  33907. props: {
  33908. vertical: Boolean,
  33909. size: {
  33910. type: String,
  33911. default: function _default() {
  33912. return getConfig().layoutContainer.size || getConfig().size;
  33913. }
  33914. }
  33915. },
  33916. data: function data() {
  33917. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  33918. var reactData = {};
  33919. return {
  33920. xID: xID,
  33921. reactData: reactData
  33922. };
  33923. },
  33924. computed: _objectSpread2({}, {}),
  33925. methods: {
  33926. //
  33927. // Method
  33928. //
  33929. dispatchEvent: function dispatchEvent(type, params, evnt) {
  33930. var $xeLayoutContainer = this;
  33931. $xeLayoutContainer.$emit(type, createEvent(evnt, {
  33932. $layoutContainer: $xeLayoutContainer
  33933. }, params));
  33934. },
  33935. //
  33936. // Render
  33937. //
  33938. renderVN: function renderVN(h) {
  33939. var $xeLayoutContainer = this;
  33940. var props = $xeLayoutContainer;
  33941. var slots = $xeLayoutContainer.$scopedSlots;
  33942. var vertical = props.vertical;
  33943. var vSize = $xeLayoutContainer.computeSize;
  33944. var defaultSlot = slots.default;
  33945. return h('div', {
  33946. class: ['vxe-layout-container', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--vertical', vertical)]
  33947. }, defaultSlot ? defaultSlot({}) : []);
  33948. }
  33949. },
  33950. render: function render(h) {
  33951. return this.renderVN(h);
  33952. }
  33953. })); /* define-vxe-component end */
  33954. ;// CONCATENATED MODULE: ./packages/layout-container/index.ts
  33955. var VxeLayoutContainer = Object.assign({}, layout_container, {
  33956. install: function install(app) {
  33957. app.component(layout_container.name, layout_container);
  33958. }
  33959. });
  33960. dynamicApp.use(VxeLayoutContainer);
  33961. index_esm_VxeUI.component(layout_container);
  33962. var LayoutContainer = VxeLayoutContainer;
  33963. /* harmony default export */ var packages_layout_container = (VxeLayoutContainer);
  33964. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fixed.js
  33965. var es_string_fixed = __webpack_require__(4298);
  33966. ;// CONCATENATED MODULE: ./packages/layout-footer/src/layout-footer.ts
  33967. /* harmony default export */ var layout_footer = (/* define-vxe-component start */defineVxeComponent({
  33968. name: 'VxeLayoutFooter',
  33969. props: {
  33970. fixed: Boolean,
  33971. align: String
  33972. },
  33973. data: function data() {
  33974. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  33975. var reactData = {};
  33976. return {
  33977. xID: xID,
  33978. reactData: reactData
  33979. };
  33980. },
  33981. methods: {
  33982. //
  33983. // Method
  33984. //
  33985. dispatchEvent: function dispatchEvent(type, params, evnt) {
  33986. var $xeLayoutFooter = this;
  33987. $xeLayoutFooter.$emit(type, createEvent(evnt, {
  33988. $layoutFooter: $xeLayoutFooter
  33989. }, params));
  33990. },
  33991. //
  33992. // Render
  33993. //
  33994. renderVN: function renderVN(h) {
  33995. var $xeLayoutFooter = this;
  33996. var props = $xeLayoutFooter;
  33997. var slots = $xeLayoutFooter.$scopedSlots;
  33998. var fixed = props.fixed,
  33999. align = props.align;
  34000. var defaultSlot = slots.default;
  34001. return h('footer', {
  34002. class: ['vxe-layout-footer', align ? "align--".concat(align) : '', {
  34003. 'is--fixed': fixed
  34004. }]
  34005. }, defaultSlot ? defaultSlot({}) : []);
  34006. }
  34007. },
  34008. render: function render(h) {
  34009. return this.renderVN(h);
  34010. }
  34011. })); /* define-vxe-component end */
  34012. ;// CONCATENATED MODULE: ./packages/layout-footer/index.ts
  34013. var VxeLayoutFooter = Object.assign({}, layout_footer, {
  34014. install: function install(app) {
  34015. app.component(layout_footer.name, layout_footer);
  34016. }
  34017. });
  34018. dynamicApp.use(VxeLayoutFooter);
  34019. index_esm_VxeUI.component(layout_footer);
  34020. var LayoutFooter = VxeLayoutFooter;
  34021. /* harmony default export */ var packages_layout_footer = (VxeLayoutFooter);
  34022. ;// CONCATENATED MODULE: ./packages/layout-header/src/layout-header.ts
  34023. /* harmony default export */ var layout_header = (/* define-vxe-component start */defineVxeComponent({
  34024. name: 'VxeLayoutHeader',
  34025. props: {
  34026. fixed: Boolean
  34027. },
  34028. data: function data() {
  34029. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  34030. var reactData = {};
  34031. return {
  34032. xID: xID,
  34033. reactData: reactData
  34034. };
  34035. },
  34036. methods: {
  34037. //
  34038. // Method
  34039. //
  34040. dispatchEvent: function dispatchEvent(type, params, evnt) {
  34041. var $xeLayoutHeader = this;
  34042. $xeLayoutHeader.$emit(type, createEvent(evnt, {
  34043. $layoutHeader: $xeLayoutHeader
  34044. }, params));
  34045. },
  34046. //
  34047. // Render
  34048. //
  34049. renderVN: function renderVN(h) {
  34050. var $xeLayoutHeader = this;
  34051. var slots = $xeLayoutHeader.$scopedSlots;
  34052. var fixed = $xeLayoutHeader.fixed;
  34053. var defaultSlot = slots.default;
  34054. return h('header', {
  34055. class: ['vxe-layout-header', {
  34056. 'is--fixed': fixed
  34057. }]
  34058. }, defaultSlot ? defaultSlot({}) : []);
  34059. }
  34060. },
  34061. render: function render(h) {
  34062. return this.renderVN(h);
  34063. }
  34064. })); /* define-vxe-component end */
  34065. ;// CONCATENATED MODULE: ./packages/layout-header/index.ts
  34066. var VxeLayoutHeader = Object.assign({}, layout_header, {
  34067. install: function install(app) {
  34068. app.component(layout_header.name, layout_header);
  34069. }
  34070. });
  34071. dynamicApp.use(VxeLayoutHeader);
  34072. index_esm_VxeUI.component(layout_header);
  34073. var LayoutHeader = VxeLayoutHeader;
  34074. /* harmony default export */ var packages_layout_header = (VxeLayoutHeader);
  34075. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.link.js
  34076. var es_string_link = __webpack_require__(778);
  34077. ;// CONCATENATED MODULE: ./packages/link/src/link.ts
  34078. /* harmony default export */ var src_link = (/* define-vxe-component start */defineVxeComponent({
  34079. name: 'VxeLink',
  34080. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  34081. props: {
  34082. href: String,
  34083. target: String,
  34084. status: String,
  34085. title: [String, Number],
  34086. disabled: Boolean,
  34087. icon: String,
  34088. routerLink: Object,
  34089. underline: {
  34090. type: Boolean,
  34091. default: function _default() {
  34092. return getConfig().link.underline;
  34093. }
  34094. },
  34095. /**
  34096. * 权限码
  34097. */
  34098. permissionCode: [String, Number],
  34099. content: [String, Number],
  34100. size: {
  34101. type: String,
  34102. default: function _default() {
  34103. return getConfig().link.size || getConfig().size;
  34104. }
  34105. }
  34106. },
  34107. data: function data() {
  34108. var reactData = {};
  34109. return {
  34110. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  34111. reactData: reactData
  34112. };
  34113. },
  34114. computed: _objectSpread2({}, {}),
  34115. methods: {
  34116. //
  34117. // Method
  34118. //
  34119. dispatchEvent: function dispatchEvent(type, params, evnt) {
  34120. var $xeLink = this;
  34121. $xeLink.$emit(type, createEvent(evnt, {
  34122. $link: $xeLink
  34123. }, params));
  34124. },
  34125. clickEvent: function clickEvent(evnt) {
  34126. var $xeLink = this;
  34127. var props = $xeLink;
  34128. var disabled = props.disabled;
  34129. if (!disabled) {
  34130. $xeLink.dispatchEvent('click', {}, evnt);
  34131. }
  34132. },
  34133. //
  34134. // Render
  34135. //
  34136. renderContent: function renderContent(h) {
  34137. var $xeLink = this;
  34138. var props = $xeLink;
  34139. var slots = $xeLink.$scopedSlots;
  34140. var icon = props.icon,
  34141. content = props.content;
  34142. var defaultSlot = slots.default;
  34143. var iconSlot = slots.icon;
  34144. var textContent = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content);
  34145. return [iconSlot || icon ? h('span', {
  34146. class: 'vxe-link--icon'
  34147. }, iconSlot ? vn_getSlotVNs(iconSlot({})) : [h('i', {
  34148. class: icon
  34149. })]) : renderEmptyElement($xeLink), defaultSlot || textContent ? h('span', {
  34150. class: 'vxe-link--content'
  34151. }, defaultSlot ? defaultSlot({}) : textContent) : renderEmptyElement($xeLink)];
  34152. },
  34153. renderVN: function renderVN(h) {
  34154. var $xeLink = this;
  34155. var props = $xeLink;
  34156. var status = props.status,
  34157. target = props.target,
  34158. href = props.href,
  34159. title = props.title,
  34160. underline = props.underline,
  34161. disabled = props.disabled,
  34162. routerLink = props.routerLink;
  34163. var permissionInfo = $xeLink.computePermissionInfo;
  34164. var vSize = $xeLink.computeSize;
  34165. if (!permissionInfo.visible) {
  34166. return renderEmptyElement($xeLink);
  34167. }
  34168. if (routerLink && !disabled) {
  34169. return h('router-link', {
  34170. class: ['vxe-link', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'is--disabled', disabled), 'is--underline', underline)],
  34171. props: {
  34172. title: title,
  34173. target: target,
  34174. custom: true,
  34175. to: disabled ? null : routerLink
  34176. },
  34177. on: {
  34178. click: $xeLink.clickEvent
  34179. }
  34180. }, $xeLink.renderContent(h));
  34181. }
  34182. return h('a', {
  34183. ref: 'refElem',
  34184. class: ['vxe-link', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'is--disabled', disabled), 'is--underline', underline)],
  34185. attrs: {
  34186. href: disabled ? null : href,
  34187. target: target,
  34188. title: title
  34189. },
  34190. on: {
  34191. click: $xeLink.clickEvent
  34192. }
  34193. }, $xeLink.renderContent(h));
  34194. }
  34195. },
  34196. render: function render(h) {
  34197. return this.renderVN(h);
  34198. }
  34199. })); /* define-vxe-component end */
  34200. ;// CONCATENATED MODULE: ./packages/link/index.ts
  34201. var VxeLink = Object.assign({}, src_link, {
  34202. install: function install(app) {
  34203. app.component(src_link.name, src_link);
  34204. }
  34205. });
  34206. dynamicApp.use(VxeLink);
  34207. index_esm_VxeUI.component(src_link);
  34208. var Link = VxeLink;
  34209. /* harmony default export */ var packages_link = (VxeLink);
  34210. ;// CONCATENATED MODULE: ./packages/list/src/list.ts
  34211. var browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
  34212. function list_createInternalData() {
  34213. return {
  34214. resizeObserver: undefined,
  34215. fullData: [],
  34216. lastScrollLeft: 0,
  34217. lastScrollTop: 0,
  34218. scrollYStore: {
  34219. startIndex: 0,
  34220. endIndex: 0,
  34221. visibleSize: 0,
  34222. offsetSize: 0,
  34223. rowHeight: 0
  34224. }
  34225. };
  34226. }
  34227. /* harmony default export */ var list = (/* define-vxe-component start */defineVxeComponent({
  34228. name: 'VxeList',
  34229. mixins: [globalMixins.sizeMixin],
  34230. props: {
  34231. data: Array,
  34232. height: [Number, String],
  34233. maxHeight: [Number, String],
  34234. loading: Boolean,
  34235. className: [String, Function],
  34236. size: {
  34237. type: String,
  34238. default: function _default() {
  34239. return getConfig().list.size || getConfig().size;
  34240. }
  34241. },
  34242. autoResize: {
  34243. type: Boolean,
  34244. default: function _default() {
  34245. return getConfig().list.autoResize;
  34246. }
  34247. },
  34248. syncResize: [Boolean, String, Number],
  34249. virtualYConfig: Object,
  34250. scrollY: Object
  34251. },
  34252. data: function data() {
  34253. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  34254. var reactData = {
  34255. scrollYLoad: false,
  34256. bodyHeight: 0,
  34257. customHeight: 0,
  34258. customMaxHeight: 0,
  34259. parentHeight: 0,
  34260. topSpaceHeight: 0,
  34261. items: []
  34262. };
  34263. var internalData = list_createInternalData();
  34264. return {
  34265. xID: xID,
  34266. reactData: reactData,
  34267. internalData: internalData
  34268. };
  34269. },
  34270. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  34271. computeSYOpts: function computeSYOpts() {
  34272. var $xeList = this;
  34273. var props = $xeList;
  34274. return Object.assign({}, getConfig().list.virtualYConfig || getConfig().list.scrollY, props.virtualYConfig || props.scrollY);
  34275. },
  34276. computeStyles: function computeStyles() {
  34277. var $xeList = this;
  34278. var props = $xeList;
  34279. var reactData = $xeList.reactData;
  34280. var height = props.height,
  34281. maxHeight = props.maxHeight;
  34282. var customHeight = reactData.customHeight,
  34283. customMaxHeight = reactData.customMaxHeight;
  34284. var style = {};
  34285. if (height) {
  34286. style.height = "".concat(customHeight, "px");
  34287. } else if (maxHeight) {
  34288. style.height = 'auto';
  34289. style.maxHeight = "".concat(customMaxHeight, "px");
  34290. }
  34291. return style;
  34292. }
  34293. }),
  34294. methods: {
  34295. //
  34296. // Method
  34297. //
  34298. dispatchEvent: function dispatchEvent(type, params, evnt) {
  34299. var $xeList = this;
  34300. $xeList.$emit(type, createEvent(evnt, {
  34301. $list: $xeList
  34302. }, params));
  34303. },
  34304. callSlot: function callSlot(slotFunc, params, h) {
  34305. var $xeList = this;
  34306. var slots = $xeList.$scopedSlots;
  34307. if (slotFunc) {
  34308. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  34309. slotFunc = slots[slotFunc] || null;
  34310. }
  34311. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  34312. return vn_getSlotVNs(slotFunc.call($xeList, params, h));
  34313. }
  34314. }
  34315. return [];
  34316. },
  34317. /**
  34318. * 加载数据
  34319. * @param {Array} datas 数据
  34320. */
  34321. loadData: function loadData(datas) {
  34322. var $xeList = this;
  34323. var reactData = $xeList.reactData;
  34324. var internalData = $xeList.internalData;
  34325. var scrollYStore = internalData.scrollYStore;
  34326. var sYOpts = $xeList.computeSYOpts;
  34327. var fullData = datas || [];
  34328. Object.assign(scrollYStore, {
  34329. startIndex: 0,
  34330. endIndex: 1,
  34331. visibleSize: 0
  34332. });
  34333. internalData.fullData = fullData;
  34334. // 如果gt为0,则总是启用
  34335. reactData.scrollYLoad = !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= fullData.length);
  34336. $xeList.handleData();
  34337. return $xeList.computeScrollLoad().then(function () {
  34338. $xeList.refreshScroll();
  34339. });
  34340. },
  34341. /**
  34342. * 重新加载数据
  34343. * @param {Array} datas 数据
  34344. */
  34345. reloadData: function reloadData(datas) {
  34346. var $xeList = this;
  34347. $xeList.clearScroll();
  34348. return $xeList.loadData(datas);
  34349. },
  34350. calcTableHeight: function calcTableHeight(key) {
  34351. var $xeList = this;
  34352. var props = $xeList;
  34353. var reactData = $xeList.reactData;
  34354. var parentHeight = reactData.parentHeight;
  34355. var val = props[key];
  34356. var num = 0;
  34357. if (val) {
  34358. if (val === '100%' || val === 'auto') {
  34359. num = parentHeight;
  34360. } else {
  34361. if (isScale(val)) {
  34362. num = Math.floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(val) || 1) / 100 * parentHeight);
  34363. } else {
  34364. num = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(val);
  34365. }
  34366. num = Math.max(40, num);
  34367. }
  34368. }
  34369. return num;
  34370. },
  34371. updateHeight: function updateHeight() {
  34372. var $xeList = this;
  34373. var reactData = $xeList.reactData;
  34374. reactData.customHeight = $xeList.calcTableHeight('height');
  34375. reactData.customMaxHeight = $xeList.calcTableHeight('maxHeight');
  34376. },
  34377. updateYSpace: function updateYSpace() {
  34378. var $xeList = this;
  34379. var reactData = $xeList.reactData;
  34380. var internalData = $xeList.internalData;
  34381. var scrollYLoad = reactData.scrollYLoad;
  34382. var scrollYStore = internalData.scrollYStore,
  34383. fullData = internalData.fullData;
  34384. reactData.bodyHeight = scrollYLoad ? fullData.length * scrollYStore.rowHeight : 0;
  34385. reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
  34386. },
  34387. handleData: function handleData() {
  34388. var $xeList = this;
  34389. var reactData = $xeList.reactData;
  34390. var internalData = $xeList.internalData;
  34391. var scrollYLoad = reactData.scrollYLoad;
  34392. var fullData = internalData.fullData,
  34393. scrollYStore = internalData.scrollYStore;
  34394. reactData.items = scrollYLoad ? fullData.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullData.slice(0);
  34395. return $xeList.$nextTick();
  34396. },
  34397. updateYData: function updateYData() {
  34398. var $xeList = this;
  34399. $xeList.handleData();
  34400. $xeList.updateYSpace();
  34401. },
  34402. computeScrollLoad: function computeScrollLoad() {
  34403. var $xeList = this;
  34404. var reactData = $xeList.reactData;
  34405. var internalData = $xeList.internalData;
  34406. return $xeList.$nextTick().then(function () {
  34407. var scrollYLoad = reactData.scrollYLoad;
  34408. var scrollYStore = internalData.scrollYStore;
  34409. var virtualBodyElem = $xeList.$refs.refVirtualBody;
  34410. var sYOpts = $xeList.computeSYOpts;
  34411. var rowHeight = 0;
  34412. var firstItemElem;
  34413. if (virtualBodyElem) {
  34414. if (sYOpts.sItem) {
  34415. firstItemElem = virtualBodyElem.querySelector(sYOpts.sItem);
  34416. }
  34417. if (!firstItemElem) {
  34418. firstItemElem = virtualBodyElem.children[0];
  34419. }
  34420. }
  34421. if (firstItemElem) {
  34422. rowHeight = firstItemElem.offsetHeight;
  34423. }
  34424. rowHeight = Math.max(12, rowHeight);
  34425. scrollYStore.rowHeight = rowHeight;
  34426. // 计算 Y 逻辑
  34427. if (scrollYLoad) {
  34428. var scrollBodyElem = $xeList.$refs.refVirtualWrapper;
  34429. var visibleYSize = Math.max(8, Math.ceil(scrollBodyElem.clientHeight / rowHeight));
  34430. var offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browseObj.edge ? 10 : 0;
  34431. scrollYStore.offsetSize = offsetYSize;
  34432. scrollYStore.visibleSize = visibleYSize;
  34433. scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
  34434. $xeList.updateYData();
  34435. } else {
  34436. $xeList.updateYSpace();
  34437. }
  34438. });
  34439. },
  34440. /**
  34441. * 清除滚动条
  34442. */
  34443. clearScroll: function clearScroll() {
  34444. var $xeList = this;
  34445. var scrollBodyElem = $xeList.$refs.refVirtualWrapper;
  34446. if (scrollBodyElem) {
  34447. scrollBodyElem.scrollTop = 0;
  34448. }
  34449. return $xeList.$nextTick();
  34450. },
  34451. /**
  34452. * 如果有滚动条,则滚动到对应的位置
  34453. */
  34454. scrollTo: function scrollTo(scrollLeft, scrollTop) {
  34455. var $xeList = this;
  34456. var reactData = $xeList.reactData;
  34457. var scrollBodyElem = $xeList.$refs.refVirtualWrapper;
  34458. if (scrollLeft) {
  34459. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
  34460. scrollTop = scrollLeft.top;
  34461. scrollLeft = scrollLeft.left;
  34462. }
  34463. }
  34464. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
  34465. scrollBodyElem.scrollLeft = scrollLeft;
  34466. }
  34467. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollTop)) {
  34468. scrollBodyElem.scrollTop = scrollTop;
  34469. }
  34470. if (reactData.scrollYLoad) {
  34471. return new Promise(function (resolve) {
  34472. setTimeout(function () {
  34473. $xeList.$nextTick(function () {
  34474. resolve();
  34475. });
  34476. }, 50);
  34477. });
  34478. }
  34479. return $xeList.$nextTick();
  34480. },
  34481. /**
  34482. * 刷新滚动条
  34483. */
  34484. refreshScroll: function refreshScroll() {
  34485. var $xeList = this;
  34486. var internalData = $xeList.internalData;
  34487. var lastScrollLeft = internalData.lastScrollLeft,
  34488. lastScrollTop = internalData.lastScrollTop;
  34489. return $xeList.clearScroll().then(function () {
  34490. if (lastScrollLeft || lastScrollTop) {
  34491. internalData.lastScrollLeft = 0;
  34492. internalData.lastScrollTop = 0;
  34493. return scrollTo(lastScrollLeft, lastScrollTop);
  34494. }
  34495. });
  34496. },
  34497. /**
  34498. * 重新计算列表
  34499. */
  34500. recalculate: function recalculate() {
  34501. var $xeList = this;
  34502. var reactData = $xeList.reactData;
  34503. var el = $xeList.$refs.refElem;
  34504. if (el) {
  34505. var parentEl = el.parentElement;
  34506. reactData.parentHeight = parentEl ? parentEl.clientHeight : 0;
  34507. $xeList.updateHeight();
  34508. if (el.clientWidth && el.clientHeight) {
  34509. return $xeList.computeScrollLoad();
  34510. }
  34511. }
  34512. return $xeList.$nextTick();
  34513. },
  34514. loadYData: function loadYData(evnt) {
  34515. var $xeList = this;
  34516. var internalData = $xeList.internalData;
  34517. var scrollYStore = internalData.scrollYStore;
  34518. var startIndex = scrollYStore.startIndex,
  34519. endIndex = scrollYStore.endIndex,
  34520. visibleSize = scrollYStore.visibleSize,
  34521. offsetSize = scrollYStore.offsetSize,
  34522. rowHeight = scrollYStore.rowHeight;
  34523. var scrollBodyElem = evnt.target;
  34524. var scrollTop = scrollBodyElem.scrollTop;
  34525. var toVisibleIndex = Math.floor(scrollTop / rowHeight);
  34526. var offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize);
  34527. var offsetEndIndex = toVisibleIndex + visibleSize + offsetSize;
  34528. if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
  34529. if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
  34530. scrollYStore.startIndex = offsetStartIndex;
  34531. scrollYStore.endIndex = offsetEndIndex;
  34532. $xeList.updateYData();
  34533. }
  34534. }
  34535. },
  34536. scrollEvent: function scrollEvent(evnt) {
  34537. var $xeList = this;
  34538. var reactData = $xeList.reactData;
  34539. var internalData = $xeList.internalData;
  34540. var scrollBodyElem = evnt.target;
  34541. var scrollTop = scrollBodyElem.scrollTop;
  34542. var scrollLeft = scrollBodyElem.scrollLeft;
  34543. var isX = scrollLeft !== internalData.lastScrollLeft;
  34544. var isY = scrollTop !== internalData.lastScrollTop;
  34545. internalData.lastScrollTop = scrollTop;
  34546. internalData.lastScrollLeft = scrollLeft;
  34547. if (reactData.scrollYLoad) {
  34548. $xeList.loadYData(evnt);
  34549. }
  34550. $xeList.dispatchEvent('scroll', {
  34551. scrollLeft: scrollLeft,
  34552. scrollTop: scrollTop,
  34553. isX: isX,
  34554. isY: isY
  34555. }, evnt);
  34556. },
  34557. //
  34558. // Render
  34559. //
  34560. renderVN: function renderVN(h) {
  34561. var $xeList = this;
  34562. var props = $xeList;
  34563. var reactData = $xeList.reactData;
  34564. var slots = $xeList.$scopedSlots;
  34565. var className = props.className,
  34566. loading = props.loading;
  34567. var bodyHeight = reactData.bodyHeight,
  34568. topSpaceHeight = reactData.topSpaceHeight,
  34569. items = reactData.items;
  34570. var defaultSlot = slots.default;
  34571. var vSize = $xeList.computeSize;
  34572. var styles = $xeList.computeStyles;
  34573. return h('div', {
  34574. ref: 'refElem',
  34575. class: ['vxe-list', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  34576. $list: $xeList
  34577. }) : className : '', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--loading', loading)]
  34578. }, [h('div', {
  34579. ref: 'refVirtualWrapper',
  34580. class: 'vxe-list--virtual-wrapper',
  34581. style: styles,
  34582. on: {
  34583. scroll: $xeList.scrollEvent
  34584. }
  34585. }, [h('div', {
  34586. class: 'vxe-list--y-space',
  34587. style: {
  34588. height: bodyHeight ? "".concat(bodyHeight, "px") : ''
  34589. }
  34590. }), h('div', {
  34591. ref: 'refVirtualBody',
  34592. class: 'vxe-list--body',
  34593. style: {
  34594. marginTop: topSpaceHeight ? "".concat(topSpaceHeight, "px") : ''
  34595. }
  34596. }, defaultSlot ? $xeList.callSlot(defaultSlot, {
  34597. items: items
  34598. }, h) : [])]),
  34599. /**
  34600. * 加载中
  34601. */
  34602. h(src_loading, {
  34603. class: 'vxe-list--loading',
  34604. props: {
  34605. value: loading
  34606. }
  34607. })]);
  34608. }
  34609. },
  34610. watch: {
  34611. data: function data() {
  34612. var $xeList = this;
  34613. var props = $xeList;
  34614. $xeList.loadData(props.data || []);
  34615. },
  34616. height: function height() {
  34617. var $xeList = this;
  34618. $xeList.recalculate();
  34619. },
  34620. maxHeight: function maxHeight() {
  34621. var $xeList = this;
  34622. $xeList.recalculate();
  34623. },
  34624. syncResize: function syncResize(val) {
  34625. var $xeList = this;
  34626. if (val) {
  34627. $xeList.recalculate();
  34628. $xeList.$nextTick(function () {
  34629. return setTimeout(function () {
  34630. return $xeList.recalculate();
  34631. });
  34632. });
  34633. }
  34634. }
  34635. },
  34636. created: function created() {
  34637. var $xeList = this;
  34638. var props = $xeList;
  34639. $xeList.loadData(props.data || []);
  34640. },
  34641. mounted: function mounted() {
  34642. var $xeList = this;
  34643. var props = $xeList;
  34644. var internalData = $xeList.internalData;
  34645. $xeList.recalculate();
  34646. if (props.autoResize) {
  34647. var el = $xeList.$refs.refElem;
  34648. var resizeObserver = globalResize.create(function () {
  34649. return $xeList.recalculate();
  34650. });
  34651. resizeObserver.observe(el);
  34652. if (el) {
  34653. resizeObserver.observe(el.parentElement);
  34654. }
  34655. internalData.resizeObserver = resizeObserver;
  34656. }
  34657. globalEvents.on($xeList, 'resize', $xeList.recalculate);
  34658. },
  34659. activated: function activated() {
  34660. var $xeList = this;
  34661. $xeList.recalculate().then(function () {
  34662. return $xeList.refreshScroll();
  34663. });
  34664. },
  34665. beforeDestroy: function beforeDestroy() {
  34666. var $xeList = this;
  34667. var internalData = $xeList.internalData;
  34668. var resizeObserver = internalData.resizeObserver;
  34669. if (resizeObserver) {
  34670. resizeObserver.disconnect();
  34671. }
  34672. globalEvents.off($xeList, 'resize');
  34673. },
  34674. destroyed: function destroyed() {
  34675. var $xeList = this;
  34676. var internalData = $xeList.internalData;
  34677. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, list_createInternalData());
  34678. },
  34679. render: function render(h) {
  34680. return this.renderVN(h);
  34681. }
  34682. })); /* define-vxe-component end */
  34683. ;// CONCATENATED MODULE: ./packages/list/index.ts
  34684. var VxeList = Object.assign(list, {
  34685. install: function install(app) {
  34686. app.component(list.name, list);
  34687. }
  34688. });
  34689. dynamicApp.use(VxeList);
  34690. index_esm_VxeUI.component(list);
  34691. var List = VxeList;
  34692. /* harmony default export */ var packages_list = (VxeList);
  34693. ;// CONCATENATED MODULE: ./packages/menu/src/menu.ts
  34694. /* harmony default export */ var menu = (/* define-vxe-component start */defineVxeComponent({
  34695. name: 'VxeMenu',
  34696. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  34697. props: {
  34698. value: [String, Number],
  34699. expandAll: Boolean,
  34700. accordion: {
  34701. type: Boolean,
  34702. default: function _default() {
  34703. return getConfig().menu.accordion;
  34704. }
  34705. },
  34706. collapsed: {
  34707. type: Boolean,
  34708. default: null
  34709. },
  34710. collapseFixed: Boolean,
  34711. loading: Boolean,
  34712. options: {
  34713. type: Array,
  34714. default: function _default() {
  34715. return [];
  34716. }
  34717. },
  34718. size: {
  34719. type: String,
  34720. default: function _default() {
  34721. return getConfig().menu.size || getConfig().size;
  34722. }
  34723. }
  34724. },
  34725. inject: {
  34726. $xeLayoutAside: {
  34727. default: null
  34728. }
  34729. },
  34730. data: function data() {
  34731. var reactData = {
  34732. initialized: false,
  34733. isEnterCollapse: false,
  34734. collapseStyle: {},
  34735. collapseZindex: 0,
  34736. activeName: null,
  34737. menuList: [],
  34738. itemHeight: 1
  34739. };
  34740. return {
  34741. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  34742. reactData: reactData
  34743. };
  34744. },
  34745. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  34746. computeIsCollapsed: function computeIsCollapsed() {
  34747. var $xeMenu = this;
  34748. var $xeLayoutAside = $xeMenu.$xeLayoutAside;
  34749. var collapsed = $xeMenu.collapsed;
  34750. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(collapsed)) {
  34751. return collapsed;
  34752. }
  34753. if ($xeLayoutAside) {
  34754. return !!$xeLayoutAside.collapsed;
  34755. }
  34756. return false;
  34757. },
  34758. computeCollapseWidth: function computeCollapseWidth() {
  34759. var $xeMenu = this;
  34760. var $xeLayoutAside = $xeMenu.$xeLayoutAside;
  34761. var collapseWidth = '';
  34762. if ($xeLayoutAside) {
  34763. collapseWidth = $xeLayoutAside.collapseWidth || '';
  34764. }
  34765. return collapseWidth;
  34766. },
  34767. computeCollapseEnterWidth: function computeCollapseEnterWidth() {
  34768. var $xeMenu = this;
  34769. var $xeLayoutAside = $xeMenu.$xeLayoutAside;
  34770. var width = '';
  34771. if ($xeLayoutAside) {
  34772. width = $xeLayoutAside.width || '';
  34773. }
  34774. return width;
  34775. }
  34776. }),
  34777. methods: {
  34778. //
  34779. // Method
  34780. //
  34781. dispatchEvent: function dispatchEvent(type, params, evnt) {
  34782. var $xeMenu = this;
  34783. $xeMenu.$emit(type, createEvent(evnt, {
  34784. $menu: $xeMenu
  34785. }, params));
  34786. },
  34787. emitModel: function emitModel(value) {
  34788. var $xeMenu = this;
  34789. var reactData = $xeMenu.reactData;
  34790. var _events = $xeMenu._events;
  34791. reactData.activeName = value;
  34792. $xeMenu.$emit('input', value);
  34793. if (_events && _events.modelValue) {
  34794. $xeMenu.$emit('modelValue', value);
  34795. } else {
  34796. $xeMenu.$emit('model-value', value);
  34797. }
  34798. },
  34799. callSlot: function callSlot(slotFunc, params, h) {
  34800. var $xeMenu = this;
  34801. var slots = $xeMenu.$scopedSlots;
  34802. if (slotFunc) {
  34803. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  34804. slotFunc = slots[slotFunc] || null;
  34805. }
  34806. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  34807. return vn_getSlotVNs(slotFunc.call($xeMenu, params, h));
  34808. }
  34809. }
  34810. return [];
  34811. },
  34812. getMenuTitle: function getMenuTitle(item) {
  34813. return "".concat(item.title || item.name);
  34814. },
  34815. updateZindex: function updateZindex() {
  34816. var $xeMenu = this;
  34817. var reactData = $xeMenu.reactData;
  34818. if (reactData.collapseZindex < getLastZIndex()) {
  34819. reactData.collapseZindex = nextZIndex();
  34820. }
  34821. },
  34822. updateActiveMenu: function updateActiveMenu(isDefExpand) {
  34823. var $xeMenu = this;
  34824. var reactData = $xeMenu.reactData;
  34825. var activeName = reactData.activeName;
  34826. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(reactData.menuList, function (item, index, items, path, parent, nodes) {
  34827. if (item.itemKey === activeName) {
  34828. nodes.forEach(function (obj) {
  34829. obj.isActive = true;
  34830. if (isDefExpand) {
  34831. obj.isExpand = true;
  34832. }
  34833. });
  34834. item.isExactActive = true;
  34835. } else {
  34836. item.isExactActive = false;
  34837. item.isActive = false;
  34838. }
  34839. }, {
  34840. children: 'childList'
  34841. });
  34842. },
  34843. updateMenuConfig: function updateMenuConfig() {
  34844. var $xeMenu = this;
  34845. var props = $xeMenu;
  34846. var reactData = $xeMenu.reactData;
  34847. var options = props.options,
  34848. expandAll = props.expandAll;
  34849. reactData.menuList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().mapTree(options, function (item, index, items, path, parent) {
  34850. var objItem = _objectSpread2(_objectSpread2({}, item), {}, {
  34851. parentKey: parent ? parent.name || path.slice(0, path.length - 1).join(',') : '',
  34852. level: path.length,
  34853. itemKey: item.name || path.join(','),
  34854. isExactActive: false,
  34855. isActive: false,
  34856. isExpand: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(item.expanded) ? item.expanded : !!expandAll,
  34857. hasChild: item.children && item.children.length > 0
  34858. });
  34859. return objItem;
  34860. }, {
  34861. children: 'children',
  34862. mapChildren: 'childList'
  34863. });
  34864. },
  34865. updateCollapseStyle: function updateCollapseStyle() {
  34866. var $xeMenu = this;
  34867. var props = $xeMenu;
  34868. var reactData = $xeMenu.reactData;
  34869. var collapseFixed = props.collapseFixed;
  34870. if (collapseFixed) {
  34871. $xeMenu.$nextTick(function () {
  34872. var isEnterCollapse = reactData.isEnterCollapse;
  34873. var isCollapsed = $xeMenu.computeIsCollapsed;
  34874. var collapseEnterWidth = $xeMenu.computeCollapseEnterWidth;
  34875. var collapseWidth = $xeMenu.computeCollapseWidth;
  34876. var el = $xeMenu.$refs.refElem;
  34877. if (el) {
  34878. var clientRect = el.getBoundingClientRect();
  34879. var parentNode = el.parentNode;
  34880. reactData.collapseStyle = isCollapsed ? {
  34881. top: toCssUnit(clientRect.top),
  34882. left: toCssUnit(clientRect.left),
  34883. height: toCssUnit(parentNode.clientHeight),
  34884. width: isEnterCollapse ? collapseEnterWidth ? toCssUnit(collapseEnterWidth) : '' : collapseWidth ? toCssUnit(collapseWidth) : '',
  34885. zIndex: reactData.collapseZindex
  34886. } : {};
  34887. }
  34888. });
  34889. }
  34890. },
  34891. handleCollapseMenu: function handleCollapseMenu() {
  34892. var $xeMenu = this;
  34893. var props = $xeMenu;
  34894. var reactData = $xeMenu.reactData;
  34895. var collapseFixed = props.collapseFixed;
  34896. if (collapseFixed) {
  34897. var initialized = reactData.initialized;
  34898. var isCollapsed = $xeMenu.computeIsCollapsed;
  34899. if (isCollapsed) {
  34900. if (!initialized) {
  34901. reactData.initialized = true;
  34902. $xeMenu.$nextTick(function () {
  34903. var collapseEl = $xeMenu.$refs.refCollapseElem;
  34904. if (collapseEl) {
  34905. document.body.appendChild(collapseEl);
  34906. }
  34907. });
  34908. }
  34909. }
  34910. reactData.isEnterCollapse = false;
  34911. $xeMenu.updateZindex();
  34912. $xeMenu.updateCollapseStyle();
  34913. }
  34914. },
  34915. handleClickIconCollapse: function handleClickIconCollapse(evnt, item, itemList) {
  34916. var $xeMenu = this;
  34917. var props = $xeMenu;
  34918. var accordion = props.accordion;
  34919. var hasChild = item.hasChild,
  34920. isExpand = item.isExpand;
  34921. if (hasChild) {
  34922. evnt.stopPropagation();
  34923. evnt.preventDefault();
  34924. if (accordion) {
  34925. itemList.forEach(function (obj) {
  34926. if (obj !== item) {
  34927. obj.isExpand = false;
  34928. }
  34929. });
  34930. }
  34931. item.isExpand = !isExpand;
  34932. }
  34933. },
  34934. handleClickMenu: function handleClickMenu(evnt, item, itemList) {
  34935. var $xeMenu = this;
  34936. var itemKey = item.itemKey,
  34937. routerLink = item.routerLink,
  34938. hasChild = item.hasChild;
  34939. if (routerLink) {
  34940. $xeMenu.emitModel(itemKey);
  34941. } else {
  34942. if (hasChild) {
  34943. $xeMenu.handleClickIconCollapse(evnt, item, itemList);
  34944. } else {
  34945. $xeMenu.emitModel(itemKey);
  34946. }
  34947. }
  34948. $xeMenu.dispatchEvent('click', {
  34949. menu: item
  34950. }, evnt);
  34951. },
  34952. handleMenuMouseenter: function handleMenuMouseenter() {
  34953. var $xeMenu = this;
  34954. var reactData = $xeMenu.reactData;
  34955. var collapseStyle = reactData.collapseStyle;
  34956. var collapseEnterWidth = $xeMenu.computeCollapseEnterWidth;
  34957. reactData.collapseStyle = Object.assign({}, collapseStyle, {
  34958. width: collapseEnterWidth ? toCssUnit(collapseEnterWidth) : ''
  34959. });
  34960. reactData.isEnterCollapse = true;
  34961. },
  34962. handleMenuMouseover: function handleMenuMouseover() {
  34963. var $xeMenu = this;
  34964. var reactData = $xeMenu.reactData;
  34965. var isEnterCollapse = reactData.isEnterCollapse;
  34966. if (!isEnterCollapse) {
  34967. $xeMenu.handleMenuMouseenter();
  34968. }
  34969. },
  34970. handleMenuMouseleave: function handleMenuMouseleave() {
  34971. var $xeMenu = this;
  34972. var reactData = $xeMenu.reactData;
  34973. var collapseStyle = reactData.collapseStyle;
  34974. var el = this.$refs.refElem;
  34975. reactData.collapseStyle = Object.assign({}, collapseStyle, {
  34976. width: el ? toCssUnit(el.offsetWidth) : ''
  34977. });
  34978. reactData.isEnterCollapse = false;
  34979. },
  34980. //
  34981. //
  34982. // Render
  34983. //
  34984. renderMenuTitle: function renderMenuTitle(h, item, itemList) {
  34985. var $xeMenu = this;
  34986. var slots = $xeMenu.$scopedSlots;
  34987. var icon = item.icon,
  34988. isExpand = item.isExpand,
  34989. hasChild = item.hasChild;
  34990. var itemSlots = item.slots || {};
  34991. var optionSlot = itemSlots.default || slots.option;
  34992. var titleSlot = itemSlots.title || slots.optionTitle || slots['option-title'];
  34993. var iconSlot = itemSlots.icon || slots.optionIcon || slots['option-icon'];
  34994. var title = $xeMenu.getMenuTitle(item);
  34995. var isCollapsed = $xeMenu.computeIsCollapsed;
  34996. var params = {
  34997. option: item,
  34998. collapsed: isCollapsed
  34999. };
  35000. return [optionSlot ? renderEmptyElement($xeMenu) : h('div', {
  35001. class: 'vxe-menu--item-link-icon'
  35002. }, iconSlot ? $xeMenu.callSlot(iconSlot, params, h) : icon ? [h('i', {
  35003. class: icon
  35004. })] : []), optionSlot ? h('div', {
  35005. class: 'vxe-menu--item-custom-title'
  35006. }, $xeMenu.callSlot(optionSlot, params, h)) : h('div', {
  35007. class: 'vxe-menu--item-link-title',
  35008. attrs: {
  35009. title: title
  35010. }
  35011. }, titleSlot ? $xeMenu.callSlot(titleSlot, params, h) : title), hasChild ? h('div', {
  35012. class: 'vxe-menu--item-link-collapse',
  35013. on: {
  35014. click: function click(evnt) {
  35015. $xeMenu.handleClickIconCollapse(evnt, item, itemList);
  35016. }
  35017. }
  35018. }, [h('i', {
  35019. class: isExpand ? getIcon().MENU_ITEM_EXPAND_OPEN : getIcon().MENU_ITEM_EXPAND_CLOSE
  35020. })]) : renderEmptyElement($xeMenu)];
  35021. },
  35022. renderDefaultChildren: function renderDefaultChildren(h, item, itemList) {
  35023. var $xeMenu = this;
  35024. var reactData = $xeMenu.reactData;
  35025. var itemKey = item.itemKey,
  35026. level = item.level,
  35027. hasChild = item.hasChild,
  35028. isActive = item.isActive,
  35029. isExactActive = item.isExactActive,
  35030. isExpand = item.isExpand,
  35031. routerLink = item.routerLink,
  35032. childList = item.childList;
  35033. var isEnterCollapse = reactData.isEnterCollapse;
  35034. var isCollapsed = $xeMenu.computeIsCollapsed;
  35035. if (item.permissionCode) {
  35036. if (!permission.checkVisible(item.permissionCode)) {
  35037. return renderEmptyElement($xeMenu);
  35038. }
  35039. }
  35040. return h('div', {
  35041. key: itemKey,
  35042. class: ['vxe-menu--item-wrapper', "vxe-menu--item-level".concat(level), {
  35043. 'is--exact-active': isExactActive,
  35044. 'is--active': isActive,
  35045. 'is--expand': (!isCollapsed || isEnterCollapse) && isExpand
  35046. }]
  35047. }, [routerLink ? h('router-link', {
  35048. class: 'vxe-menu--item-link',
  35049. props: {
  35050. custom: true,
  35051. to: routerLink
  35052. },
  35053. on: {
  35054. click: function click(evnt) {
  35055. $xeMenu.handleClickMenu(evnt, item, itemList);
  35056. }
  35057. }
  35058. }, $xeMenu.renderMenuTitle(h, item, itemList)) : h('div', {
  35059. class: 'vxe-menu--item-link',
  35060. on: {
  35061. click: function click(evnt) {
  35062. $xeMenu.handleClickMenu(evnt, item, itemList);
  35063. }
  35064. }
  35065. }, $xeMenu.renderMenuTitle(h, item, itemList)), hasChild ? h('div', {
  35066. class: 'vxe-menu--item-group'
  35067. }, childList.map(function (child) {
  35068. return $xeMenu.renderDefaultChildren(h, child, childList);
  35069. })) : renderEmptyElement($xeMenu)]);
  35070. },
  35071. renderCollapseChildren: function renderCollapseChildren(h, item, itemList) {
  35072. var $xeMenu = this;
  35073. var itemKey = item.itemKey,
  35074. level = item.level,
  35075. hasChild = item.hasChild,
  35076. isActive = item.isActive,
  35077. isExactActive = item.isExactActive,
  35078. routerLink = item.routerLink,
  35079. childList = item.childList;
  35080. if (item.permissionCode) {
  35081. if (!permission.checkVisible(item.permissionCode)) {
  35082. return renderEmptyElement($xeMenu);
  35083. }
  35084. }
  35085. return h('div', {
  35086. key: itemKey,
  35087. class: ['vxe-menu--item-wrapper', "vxe-menu--item-level".concat(level), {
  35088. 'is--exact-active': isExactActive,
  35089. 'is--active': isActive
  35090. }]
  35091. }, [routerLink ? h('router-link', {
  35092. class: 'vxe-menu--item-link',
  35093. props: {
  35094. custom: true,
  35095. to: routerLink
  35096. },
  35097. on: {
  35098. click: function click(evnt) {
  35099. $xeMenu.handleClickMenu(evnt, item, itemList);
  35100. }
  35101. }
  35102. }, $xeMenu.renderMenuTitle(h, item, itemList)) : h('div', {
  35103. class: 'vxe-menu--item-link',
  35104. on: {
  35105. click: function click(evnt) {
  35106. $xeMenu.handleClickMenu(evnt, item, itemList);
  35107. }
  35108. }
  35109. }, $xeMenu.renderMenuTitle(h, item, itemList)), hasChild ? h('div', {
  35110. class: 'vxe-menu--item-group'
  35111. }, childList.map(function (child) {
  35112. return $xeMenu.renderDefaultChildren(h, child, childList);
  35113. })) : renderEmptyElement($xeMenu)]);
  35114. },
  35115. renderVN: function renderVN(h) {
  35116. var $xeMenu = this;
  35117. var props = $xeMenu;
  35118. var reactData = $xeMenu.reactData;
  35119. var loading = props.loading,
  35120. collapseFixed = props.collapseFixed;
  35121. var initialized = reactData.initialized,
  35122. menuList = reactData.menuList,
  35123. collapseStyle = reactData.collapseStyle,
  35124. isEnterCollapse = reactData.isEnterCollapse;
  35125. var vSize = $xeMenu.computeSize;
  35126. var isCollapsed = $xeMenu.computeIsCollapsed;
  35127. var ons = {};
  35128. if (collapseFixed) {
  35129. ons = {
  35130. mouseenter: $xeMenu.handleMenuMouseenter,
  35131. mouseover: $xeMenu.handleMenuMouseover,
  35132. mouseleave: $xeMenu.handleMenuMouseleave
  35133. };
  35134. }
  35135. return h('div', {
  35136. ref: 'refElem',
  35137. class: ['vxe-menu', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--collapsed', isCollapsed), 'is--loading', loading)]
  35138. }, [h('div', {
  35139. class: 'vxe-menu--item-list'
  35140. }, menuList.map(function (child) {
  35141. return isCollapsed ? $xeMenu.renderCollapseChildren(h, child, menuList) : $xeMenu.renderDefaultChildren(h, child, menuList);
  35142. })), initialized ? h('div', {
  35143. ref: 'refCollapseElem',
  35144. class: ['vxe-menu--collapse-wrapper', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--collapsed', isCollapsed), 'is--enter', isEnterCollapse), 'is--loading', loading)],
  35145. style: collapseStyle,
  35146. on: ons
  35147. }, [isCollapsed ? h('div', {
  35148. class: 'vxe-menu--item-list'
  35149. }, menuList.map(function (child) {
  35150. return $xeMenu.renderDefaultChildren(h, child, menuList);
  35151. })) : renderEmptyElement($xeMenu)]) : renderEmptyElement($xeMenu),
  35152. /**
  35153. * 加载中
  35154. */
  35155. h(packages_loading, {
  35156. class: 'vxe-list-view--loading',
  35157. props: {
  35158. value: loading
  35159. }
  35160. })]);
  35161. }
  35162. },
  35163. watch: {
  35164. value: function value(val) {
  35165. var $xeMenu = this;
  35166. var reactData = $xeMenu.reactData;
  35167. reactData.activeName = val;
  35168. },
  35169. options: function options() {
  35170. var $xeMenu = this;
  35171. $xeMenu.updateMenuConfig();
  35172. $xeMenu.updateActiveMenu(true);
  35173. },
  35174. 'reactData.activeName': function reactDataActiveName() {
  35175. var $xeMenu = this;
  35176. $xeMenu.updateActiveMenu(true);
  35177. },
  35178. computeIsCollapsed: function computeIsCollapsed() {
  35179. var $xeMenu = this;
  35180. $xeMenu.handleCollapseMenu();
  35181. }
  35182. },
  35183. mounted: function mounted() {
  35184. var $xeMenu = this;
  35185. globalEvents.on($xeMenu, 'resize', $xeMenu.updateCollapseStyle);
  35186. $xeMenu.updateCollapseStyle();
  35187. },
  35188. beforeDestroy: function beforeDestroy() {
  35189. var $xeMenu = this;
  35190. globalEvents.off($xeMenu, 'resize');
  35191. var collapseEl = $xeMenu.$refs.refCollapseElem;
  35192. if (collapseEl) {
  35193. var parentNode = collapseEl.parentNode;
  35194. if (parentNode) {
  35195. parentNode.removeChild(collapseEl);
  35196. }
  35197. }
  35198. },
  35199. created: function created() {
  35200. var $xeMenu = this;
  35201. var props = $xeMenu;
  35202. var reactData = $xeMenu.reactData;
  35203. reactData.initialized = !!props.collapsed;
  35204. reactData.activeName = props.value;
  35205. $xeMenu.updateMenuConfig();
  35206. $xeMenu.updateActiveMenu(true);
  35207. },
  35208. render: function render(h) {
  35209. return this.renderVN(h);
  35210. }
  35211. })); /* define-vxe-component end */
  35212. ;// CONCATENATED MODULE: ./packages/menu/index.ts
  35213. var VxeMenu = Object.assign({}, menu, {
  35214. install: function install(app) {
  35215. app.component(menu.name, menu);
  35216. }
  35217. });
  35218. dynamicApp.use(VxeMenu);
  35219. index_esm_VxeUI.component(menu);
  35220. var Menu = VxeMenu;
  35221. /* harmony default export */ var packages_menu = (VxeMenu);
  35222. ;// CONCATENATED MODULE: ./packages/modal/src/modal.ts
  35223. var allActiveModals = [];
  35224. var msgQueue = [];
  35225. var notifyQueue = [];
  35226. var lockScrollAttrKey = 'data-vxe-lock-scroll';
  35227. var lockScrollCssWidthKey = '--vxe-ui-modal-lock-scroll-view-width';
  35228. /* harmony default export */ var modal = (/* define-vxe-component start */defineVxeComponent({
  35229. name: 'VxeModal',
  35230. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  35231. props: {
  35232. value: Boolean,
  35233. id: String,
  35234. type: {
  35235. type: String,
  35236. default: 'modal'
  35237. },
  35238. loading: {
  35239. type: Boolean,
  35240. default: null
  35241. },
  35242. status: String,
  35243. iconStatus: String,
  35244. className: String,
  35245. top: {
  35246. type: [Number, String],
  35247. default: function _default() {
  35248. return getConfig().modal.top;
  35249. }
  35250. },
  35251. position: [String, Object],
  35252. title: String,
  35253. duration: {
  35254. type: [Number, String],
  35255. default: function _default() {
  35256. return getConfig().modal.duration;
  35257. }
  35258. },
  35259. content: [Number, String],
  35260. showCancelButton: {
  35261. type: Boolean,
  35262. default: null
  35263. },
  35264. cancelButtonText: {
  35265. type: String,
  35266. default: function _default() {
  35267. return getConfig().modal.cancelButtonText;
  35268. }
  35269. },
  35270. showConfirmButton: {
  35271. type: Boolean,
  35272. default: function _default() {
  35273. return getConfig().modal.showConfirmButton;
  35274. }
  35275. },
  35276. confirmButtonText: {
  35277. type: String,
  35278. default: function _default() {
  35279. return getConfig().modal.confirmButtonText;
  35280. }
  35281. },
  35282. lockView: {
  35283. type: Boolean,
  35284. default: function _default() {
  35285. return getConfig().modal.lockView;
  35286. }
  35287. },
  35288. lockScroll: Boolean,
  35289. mask: {
  35290. type: Boolean,
  35291. default: function _default() {
  35292. return getConfig().modal.mask;
  35293. }
  35294. },
  35295. maskClosable: {
  35296. type: Boolean,
  35297. default: function _default() {
  35298. return getConfig().modal.maskClosable;
  35299. }
  35300. },
  35301. escClosable: {
  35302. type: Boolean,
  35303. default: function _default() {
  35304. return getConfig().modal.escClosable;
  35305. }
  35306. },
  35307. cancelClosable: {
  35308. type: Boolean,
  35309. default: function _default() {
  35310. return getConfig().modal.cancelClosable;
  35311. }
  35312. },
  35313. confirmClosable: {
  35314. type: Boolean,
  35315. default: function _default() {
  35316. return getConfig().modal.confirmClosable;
  35317. }
  35318. },
  35319. resize: Boolean,
  35320. showHeader: {
  35321. type: Boolean,
  35322. default: function _default() {
  35323. return getConfig().modal.showHeader;
  35324. }
  35325. },
  35326. showFooter: {
  35327. type: Boolean,
  35328. default: function _default() {
  35329. return getConfig().modal.showFooter;
  35330. }
  35331. },
  35332. showZoom: Boolean,
  35333. zoomConfig: Object,
  35334. showMaximize: {
  35335. type: Boolean,
  35336. default: function _default() {
  35337. return handleBooleanDefaultValue(getConfig().modal.showMaximize);
  35338. }
  35339. },
  35340. showMinimize: {
  35341. type: Boolean,
  35342. default: function _default() {
  35343. return handleBooleanDefaultValue(getConfig().modal.showMinimize);
  35344. }
  35345. },
  35346. showClose: {
  35347. type: Boolean,
  35348. default: function _default() {
  35349. return getConfig().modal.showClose;
  35350. }
  35351. },
  35352. dblclickZoom: {
  35353. type: Boolean,
  35354. default: function _default() {
  35355. return getConfig().modal.dblclickZoom;
  35356. }
  35357. },
  35358. width: [Number, String],
  35359. height: [Number, String],
  35360. minWidth: {
  35361. type: [Number, String],
  35362. default: function _default() {
  35363. return getConfig().modal.minWidth;
  35364. }
  35365. },
  35366. minHeight: {
  35367. type: [Number, String],
  35368. default: function _default() {
  35369. return getConfig().modal.minHeight;
  35370. }
  35371. },
  35372. zIndex: Number,
  35373. marginSize: {
  35374. type: [Number, String],
  35375. default: function _default() {
  35376. return getConfig().modal.marginSize;
  35377. }
  35378. },
  35379. fullscreen: Boolean,
  35380. draggable: {
  35381. type: Boolean,
  35382. default: function _default() {
  35383. return getConfig().modal.draggable;
  35384. }
  35385. },
  35386. remember: {
  35387. type: Boolean,
  35388. default: function _default() {
  35389. return getConfig().modal.remember;
  35390. }
  35391. },
  35392. destroyOnClose: {
  35393. type: Boolean,
  35394. default: function _default() {
  35395. return getConfig().modal.destroyOnClose;
  35396. }
  35397. },
  35398. showTitleOverflow: {
  35399. type: Boolean,
  35400. default: function _default() {
  35401. return getConfig().modal.showTitleOverflow;
  35402. }
  35403. },
  35404. transfer: {
  35405. type: Boolean,
  35406. default: function _default() {
  35407. return getConfig().modal.transfer;
  35408. }
  35409. },
  35410. storage: {
  35411. type: Boolean,
  35412. default: function _default() {
  35413. return getConfig().modal.storage;
  35414. }
  35415. },
  35416. storageKey: {
  35417. type: String,
  35418. default: function _default() {
  35419. return getConfig().modal.storageKey;
  35420. }
  35421. },
  35422. padding: {
  35423. type: Boolean,
  35424. default: function _default() {
  35425. return getConfig().modal.padding;
  35426. }
  35427. },
  35428. size: {
  35429. type: String,
  35430. default: function _default() {
  35431. return getConfig().modal.size || getConfig().size;
  35432. }
  35433. },
  35434. beforeHideMethod: Function,
  35435. slots: Object,
  35436. /**
  35437. * 已废弃
  35438. * @deprecated
  35439. */
  35440. message: [Number, String],
  35441. /**
  35442. * 已废弃
  35443. * @deprecated
  35444. */
  35445. animat: {
  35446. type: Boolean,
  35447. default: function _default() {
  35448. return getConfig().modal.animat;
  35449. }
  35450. }
  35451. },
  35452. inject: {
  35453. $xeParentModal: {
  35454. from: '$xeModal',
  35455. default: null
  35456. },
  35457. $xeDrawer: {
  35458. default: null
  35459. },
  35460. $xeTable: {
  35461. default: null
  35462. },
  35463. $xeForm: {
  35464. default: null
  35465. }
  35466. },
  35467. provide: function provide() {
  35468. var $xeModal = this;
  35469. return {
  35470. $xeModal: $xeModal
  35471. };
  35472. },
  35473. data: function data() {
  35474. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  35475. var reactData = {
  35476. initialized: false,
  35477. visible: false,
  35478. contentVisible: false,
  35479. modalTop: 0,
  35480. modalZindex: 0,
  35481. prevZoomStatus: '',
  35482. zoomStatus: '',
  35483. revertLocat: null,
  35484. prevLocat: null,
  35485. firstOpen: true,
  35486. resizeFlag: 1
  35487. };
  35488. var internalData = {
  35489. msgTimeout: undefined
  35490. };
  35491. return {
  35492. xID: xID,
  35493. reactData: reactData,
  35494. internalData: internalData
  35495. };
  35496. },
  35497. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  35498. computeBtnTransfer: function computeBtnTransfer() {
  35499. var $xeSelect = this;
  35500. var props = $xeSelect;
  35501. var $xeTable = $xeSelect.$xeTable;
  35502. var $xeParentModal = $xeSelect.$xeParentModal;
  35503. var $xeDrawer = $xeSelect.$xeDrawer;
  35504. var $xeForm = $xeSelect.$xeForm;
  35505. var transfer = props.transfer;
  35506. if (transfer === null) {
  35507. var globalTransfer = getConfig().select.transfer;
  35508. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  35509. return globalTransfer;
  35510. }
  35511. if ($xeTable || $xeParentModal || $xeDrawer || $xeForm) {
  35512. return true;
  35513. }
  35514. }
  35515. return transfer;
  35516. },
  35517. computeIsMsg: function computeIsMsg() {
  35518. var $xeModal = this;
  35519. var props = $xeModal;
  35520. return props.type === 'message' || props.type === 'notification';
  35521. },
  35522. computeIsMinimizeStatus: function computeIsMinimizeStatus() {
  35523. var $xeModal = this;
  35524. var reactData = $xeModal.reactData;
  35525. return reactData.zoomStatus === 'minimize';
  35526. },
  35527. computeIsMaximizeStatus: function computeIsMaximizeStatus() {
  35528. var $xeModal = this;
  35529. var reactData = $xeModal.reactData;
  35530. return reactData.zoomStatus === 'maximize';
  35531. },
  35532. computeZoomOpts: function computeZoomOpts() {
  35533. var $xeModal = this;
  35534. var props = $xeModal;
  35535. return Object.assign({}, getConfig().modal.zoomConfig, props.zoomConfig);
  35536. }
  35537. }),
  35538. watch: {
  35539. width: function width() {
  35540. var $xeModal = this;
  35541. $xeModal.recalculate();
  35542. },
  35543. height: function height() {
  35544. var $xeModal = this;
  35545. $xeModal.recalculate();
  35546. },
  35547. value: function value(val) {
  35548. var $xeModal = this;
  35549. if (val) {
  35550. $xeModal.openModal();
  35551. } else {
  35552. $xeModal.closeModal('model');
  35553. }
  35554. }
  35555. },
  35556. methods: {
  35557. //
  35558. // Method
  35559. //
  35560. dispatchEvent: function dispatchEvent(type, params, evnt) {
  35561. var $xeModal = this;
  35562. $xeModal.$emit(type, createEvent(evnt, {
  35563. $modal: $xeModal
  35564. }, params));
  35565. },
  35566. emitModel: function emitModel(value) {
  35567. var $xeModal = this;
  35568. var _events = $xeModal._events;
  35569. $xeModal.$emit('input', value);
  35570. if (_events && _events.modelValue) {
  35571. $xeModal.$emit('modelValue', value);
  35572. } else {
  35573. $xeModal.$emit('model-value', value);
  35574. }
  35575. },
  35576. callSlot: function callSlot(slotFunc, params, h) {
  35577. var $xeModal = this;
  35578. var slots = $xeModal.$scopedSlots;
  35579. if (slotFunc) {
  35580. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  35581. slotFunc = slots[slotFunc] || null;
  35582. }
  35583. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  35584. return vn_getSlotVNs(slotFunc.call($xeModal, params, h));
  35585. }
  35586. }
  35587. return [];
  35588. },
  35589. open: function open() {
  35590. var $xeModal = this;
  35591. return $xeModal.openModal();
  35592. },
  35593. close: function close() {
  35594. var $xeModal = this;
  35595. return $xeModal.closeModal('close');
  35596. },
  35597. getBox: function getBox() {
  35598. var $xeModal = this;
  35599. var boxElem = $xeModal.$refs.refModalBox;
  35600. return boxElem;
  35601. },
  35602. getPosition: function getPosition() {
  35603. var $xeModal = this;
  35604. var isMsg = $xeModal.computeIsMsg;
  35605. if (!isMsg) {
  35606. var boxElem = $xeModal.getBox();
  35607. if (boxElem) {
  35608. return {
  35609. top: boxElem.offsetTop,
  35610. left: boxElem.offsetLeft
  35611. };
  35612. }
  35613. }
  35614. return null;
  35615. },
  35616. setPosition: function setPosition(top, left) {
  35617. var $xeModal = this;
  35618. var isMsg = $xeModal.computeIsMsg;
  35619. if (!isMsg) {
  35620. var boxElem = $xeModal.getBox();
  35621. if (boxElem) {
  35622. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(top)) {
  35623. boxElem.style.top = "".concat(top, "px");
  35624. }
  35625. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(left)) {
  35626. boxElem.style.left = "".concat(left, "px");
  35627. }
  35628. }
  35629. }
  35630. return $xeModal.$nextTick();
  35631. },
  35632. isMinimized: function isMinimized() {
  35633. var $xeModal = this;
  35634. var reactData = $xeModal.reactData;
  35635. return reactData.zoomStatus === 'minimize';
  35636. },
  35637. isMaximized: function isMaximized() {
  35638. var $xeModal = this;
  35639. var reactData = $xeModal.reactData;
  35640. return reactData.zoomStatus === 'maximize';
  35641. },
  35642. zoom: function zoom() {
  35643. var $xeModal = this;
  35644. return $xeModal.handleZoom();
  35645. },
  35646. minimize: function minimize() {
  35647. var $xeModal = this;
  35648. var reactData = $xeModal.reactData;
  35649. if (!reactData.visible) {
  35650. return Promise.resolve({
  35651. status: false
  35652. });
  35653. }
  35654. return $xeModal.handleMinimize();
  35655. },
  35656. maximize: function maximize() {
  35657. var $xeModal = this;
  35658. var reactData = $xeModal.reactData;
  35659. if (!reactData.visible) {
  35660. return Promise.resolve({
  35661. status: false
  35662. });
  35663. }
  35664. return $xeModal.handleMaximize();
  35665. },
  35666. revert: function revert() {
  35667. var $xeModal = this;
  35668. var reactData = $xeModal.reactData;
  35669. if (!reactData.visible) {
  35670. return Promise.resolve({
  35671. status: false
  35672. });
  35673. }
  35674. return $xeModal.handleRevert();
  35675. },
  35676. recalculate: function recalculate() {
  35677. var $xeModal = this;
  35678. var props = $xeModal;
  35679. var width = props.width,
  35680. height = props.height;
  35681. var boxElem = $xeModal.getBox();
  35682. if (boxElem) {
  35683. boxElem.style.width = width ? toCssUnit(width) : '';
  35684. boxElem.style.height = height ? toCssUnit(height) : '';
  35685. }
  35686. return $xeModal.$nextTick();
  35687. },
  35688. updateZindex: function updateZindex() {
  35689. var $xeModal = this;
  35690. var props = $xeModal;
  35691. var reactData = $xeModal.reactData;
  35692. var zIndex = props.zIndex;
  35693. var modalZindex = reactData.modalZindex;
  35694. if (zIndex) {
  35695. reactData.modalZindex = zIndex;
  35696. } else {
  35697. var isMsg = $xeModal.computeIsMsg;
  35698. if (isMsg) {
  35699. if (modalZindex < getSubLastZIndex()) {
  35700. reactData.modalZindex = nextSubZIndex();
  35701. }
  35702. } else {
  35703. if (modalZindex < getLastZIndex()) {
  35704. reactData.modalZindex = nextZIndex();
  35705. }
  35706. }
  35707. }
  35708. },
  35709. updatePosition: function updatePosition() {
  35710. var $xeModal = this;
  35711. var props = $xeModal;
  35712. return $xeModal.$nextTick().then(function () {
  35713. var position = props.position;
  35714. var marginSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.marginSize);
  35715. var boxElem = $xeModal.getBox();
  35716. if (!boxElem) {
  35717. return;
  35718. }
  35719. var clientVisibleWidth = document.documentElement.clientWidth || document.body.clientWidth;
  35720. var clientVisibleHeight = document.documentElement.clientHeight || document.body.clientHeight;
  35721. var isPosCenter = position === 'center';
  35722. var _ref = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(position) ? {
  35723. top: position,
  35724. left: position
  35725. } : Object.assign({}, position),
  35726. top = _ref.top,
  35727. left = _ref.left;
  35728. var topCenter = isPosCenter || top === 'center';
  35729. var leftCenter = isPosCenter || left === 'center';
  35730. var posTop = '';
  35731. var posLeft = '';
  35732. if (left && !leftCenter) {
  35733. posLeft = isNaN(left) ? left : "".concat(left, "px");
  35734. } else {
  35735. posLeft = "".concat(Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2), "px");
  35736. }
  35737. if (top && !topCenter) {
  35738. posTop = isNaN(top) ? top : "".concat(top, "px");
  35739. } else {
  35740. posTop = "".concat(Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2), "px");
  35741. }
  35742. boxElem.style.top = posTop;
  35743. boxElem.style.left = posLeft;
  35744. });
  35745. },
  35746. updateStyle: function updateStyle() {
  35747. var $xeModal = this;
  35748. var props = $xeModal;
  35749. $xeModal.$nextTick(function () {
  35750. var type = props.type;
  35751. var queueList = type === 'notification' ? notifyQueue : msgQueue;
  35752. var offsetTop = 0;
  35753. queueList.forEach(function (comp) {
  35754. var boxElem = comp.getBox();
  35755. if (boxElem) {
  35756. offsetTop += external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(comp.top);
  35757. comp.reactData.modalTop = offsetTop;
  35758. offsetTop += boxElem.clientHeight;
  35759. }
  35760. });
  35761. });
  35762. },
  35763. removeMsgQueue: function removeMsgQueue() {
  35764. var $xeModal = this;
  35765. var props = $xeModal;
  35766. var type = props.type;
  35767. var queueList = type === 'notification' ? notifyQueue : msgQueue;
  35768. if (queueList.indexOf($xeModal) > -1) {
  35769. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(queueList, function (comp) {
  35770. return comp === $xeModal;
  35771. });
  35772. }
  35773. $xeModal.updateStyle();
  35774. },
  35775. closeModal: function closeModal(type) {
  35776. var $xeModal = this;
  35777. var props = $xeModal;
  35778. var reactData = $xeModal.reactData;
  35779. var remember = props.remember;
  35780. var visible = reactData.visible;
  35781. var isMsg = $xeModal.computeIsMsg;
  35782. var beforeHideFn = props.beforeHideMethod || getConfig().modal.beforeHideMethod;
  35783. var params = {
  35784. type: type
  35785. };
  35786. if (visible) {
  35787. Promise.resolve(beforeHideFn ? beforeHideFn(params) : null).then(function (rest) {
  35788. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(rest)) {
  35789. if (isMsg) {
  35790. $xeModal.removeMsgQueue();
  35791. }
  35792. reactData.contentVisible = false;
  35793. if (!remember) {
  35794. $xeModal.handleRevert();
  35795. }
  35796. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(allActiveModals, function (item) {
  35797. return item === $xeModal;
  35798. });
  35799. $xeModal.dispatchEvent('before-hide', params, null);
  35800. setTimeout(function () {
  35801. reactData.visible = false;
  35802. $xeModal.emitModel(false);
  35803. $xeModal.dispatchEvent('hide', params, null);
  35804. }, 200);
  35805. $xeModal.removeBodyLockScroll();
  35806. }
  35807. }).catch(function (e) {
  35808. return e;
  35809. });
  35810. }
  35811. return $xeModal.$nextTick();
  35812. },
  35813. closeEvent: function closeEvent(evnt) {
  35814. var $xeModal = this;
  35815. var type = 'close';
  35816. $xeModal.dispatchEvent(type, {
  35817. type: type
  35818. }, evnt);
  35819. $xeModal.closeModal(type);
  35820. },
  35821. confirmEvent: function confirmEvent(evnt) {
  35822. var $xeModal = this;
  35823. var props = $xeModal;
  35824. var confirmClosable = props.confirmClosable;
  35825. var type = 'confirm';
  35826. $xeModal.dispatchEvent(type, {
  35827. type: type
  35828. }, evnt);
  35829. if (confirmClosable) {
  35830. $xeModal.closeModal(type);
  35831. }
  35832. },
  35833. cancelEvent: function cancelEvent(evnt) {
  35834. var $xeModal = this;
  35835. var props = $xeModal;
  35836. var cancelClosable = props.cancelClosable;
  35837. var type = 'cancel';
  35838. $xeModal.dispatchEvent(type, {
  35839. type: type
  35840. }, evnt);
  35841. if (cancelClosable) {
  35842. $xeModal.closeModal(type);
  35843. }
  35844. },
  35845. getStorageMap: function getStorageMap(key) {
  35846. var version = getConfig().version;
  35847. var rest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringJSON(localStorage.getItem(key) || '');
  35848. return rest && rest._v === version ? rest : {
  35849. _v: version
  35850. };
  35851. },
  35852. hasPosStorage: function hasPosStorage() {
  35853. var $xeModal = this;
  35854. var props = $xeModal;
  35855. var id = props.id,
  35856. storage = props.storage,
  35857. storageKey = props.storageKey;
  35858. return !!(id && storage && $xeModal.getStorageMap(storageKey)[id]);
  35859. },
  35860. restorePosStorage: function restorePosStorage() {
  35861. var $xeModal = this;
  35862. var props = $xeModal;
  35863. var reactData = $xeModal.reactData;
  35864. var id = props.id,
  35865. storage = props.storage,
  35866. storageKey = props.storageKey;
  35867. if (id && storage) {
  35868. var posStorage = $xeModal.getStorageMap(storageKey)[id];
  35869. if (posStorage) {
  35870. var boxElem = $xeModal.getBox();
  35871. var _posStorage$split = posStorage.split(','),
  35872. _posStorage$split2 = _slicedToArray(_posStorage$split, 8),
  35873. left = _posStorage$split2[0],
  35874. top = _posStorage$split2[1],
  35875. width = _posStorage$split2[2],
  35876. height = _posStorage$split2[3],
  35877. zoomLeft = _posStorage$split2[4],
  35878. zoomTop = _posStorage$split2[5],
  35879. zoomWidth = _posStorage$split2[6],
  35880. zoomHeight = _posStorage$split2[7];
  35881. if (boxElem) {
  35882. if (left) {
  35883. boxElem.style.left = "".concat(left, "px");
  35884. }
  35885. if (top) {
  35886. boxElem.style.top = "".concat(top, "px");
  35887. }
  35888. if (width) {
  35889. boxElem.style.width = "".concat(width, "px");
  35890. }
  35891. if (height) {
  35892. boxElem.style.height = "".concat(height, "px");
  35893. }
  35894. }
  35895. if (zoomLeft && zoomTop) {
  35896. reactData.revertLocat = {
  35897. left: zoomLeft,
  35898. top: zoomTop,
  35899. width: zoomWidth,
  35900. height: zoomHeight
  35901. };
  35902. }
  35903. }
  35904. }
  35905. },
  35906. addMsgQueue: function addMsgQueue() {
  35907. var $xeModal = this;
  35908. var props = $xeModal;
  35909. var type = props.type;
  35910. var queueList = type === 'notification' ? notifyQueue : msgQueue;
  35911. if (queueList.indexOf($xeModal) === -1) {
  35912. queueList.push($xeModal);
  35913. }
  35914. $xeModal.updateStyle();
  35915. },
  35916. savePosStorage: function savePosStorage() {
  35917. var $xeModal = this;
  35918. var props = $xeModal;
  35919. var reactData = $xeModal.reactData;
  35920. var id = props.id,
  35921. storage = props.storage,
  35922. storageKey = props.storageKey;
  35923. var zoomStatus = reactData.zoomStatus,
  35924. revertLocat = reactData.revertLocat;
  35925. if (zoomStatus) {
  35926. return;
  35927. }
  35928. if (id && storage) {
  35929. var boxElem = $xeModal.getBox();
  35930. if (!boxElem) {
  35931. return;
  35932. }
  35933. var posStorageMap = $xeModal.getStorageMap(storageKey);
  35934. posStorageMap[id] = [boxElem.style.left, boxElem.style.top, boxElem.clientWidth, boxElem.clientHeight].concat(revertLocat ? [revertLocat.left, revertLocat.top, revertLocat.width, revertLocat.height] : []).map(function (val) {
  35935. return val ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(val) : '';
  35936. }).join(',');
  35937. localStorage.setItem(storageKey, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(posStorageMap));
  35938. }
  35939. },
  35940. handleMinimize: function handleMinimize() {
  35941. var $xeModal = this;
  35942. var reactData = $xeModal.reactData;
  35943. var zoomOpts = $xeModal.computeZoomOpts;
  35944. var minimizeLayout = zoomOpts.minimizeLayout,
  35945. minimizeMaxSize = zoomOpts.minimizeMaxSize,
  35946. minimizeHorizontalOffset = zoomOpts.minimizeHorizontalOffset,
  35947. minimizeVerticalOffset = zoomOpts.minimizeVerticalOffset,
  35948. minimizeOffsetMethod = zoomOpts.minimizeOffsetMethod;
  35949. var isHorizontalLayout = minimizeLayout === 'horizontal';
  35950. var prevZoomStatus = reactData.zoomStatus;
  35951. var hlMList = [];
  35952. var vlMList = [];
  35953. allActiveModals.forEach(function (item) {
  35954. if (item.xID !== $xeModal.xID && item.type === 'modal' && item.reactData.zoomStatus === 'minimize') {
  35955. var itemZoomOpts = item.computeZoomOpts;
  35956. if (itemZoomOpts.minimizeLayout === 'horizontal') {
  35957. hlMList.push(item);
  35958. } else {
  35959. vlMList.push(item);
  35960. }
  35961. }
  35962. });
  35963. var mList = isHorizontalLayout ? hlMList : vlMList;
  35964. // 如果配置最小化最大数量
  35965. if (minimizeMaxSize && mList.length >= minimizeMaxSize) {
  35966. if (index_esm_VxeUI.modal) {
  35967. index_esm_VxeUI.modal.message({
  35968. status: 'error',
  35969. content: getI18n('vxe.modal.miniMaxSize', [minimizeMaxSize])
  35970. });
  35971. }
  35972. return Promise.resolve({
  35973. status: false
  35974. });
  35975. }
  35976. reactData.prevZoomStatus = prevZoomStatus;
  35977. reactData.zoomStatus = 'minimize';
  35978. return $xeModal.$nextTick().then(function () {
  35979. var boxElem = $xeModal.getBox();
  35980. if (!boxElem) {
  35981. return {
  35982. status: false
  35983. };
  35984. }
  35985. var headerEl = $xeModal.$refs.refHeaderElem;
  35986. if (!headerEl) {
  35987. return {
  35988. status: false
  35989. };
  35990. }
  35991. var _getDomNode = getDomNode(),
  35992. visibleHeight = _getDomNode.visibleHeight;
  35993. // 如果当前处于复原状态
  35994. if (!prevZoomStatus) {
  35995. reactData.revertLocat = {
  35996. top: boxElem.offsetTop,
  35997. left: boxElem.offsetLeft,
  35998. width: boxElem.offsetWidth + (boxElem.style.width ? 0 : 1),
  35999. height: boxElem.offsetHeight + (boxElem.style.height ? 0 : 1)
  36000. };
  36001. }
  36002. var targetModal = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[isHorizontalLayout ? 'max' : 'min'](mList, function ($modal) {
  36003. var boxElem = $modal.getBox();
  36004. return boxElem ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(boxElem.style[isHorizontalLayout ? 'left' : 'top']) : 0;
  36005. });
  36006. var targetTop = visibleHeight - headerEl.offsetHeight - 16;
  36007. var targetLeft = 16;
  36008. if (targetModal) {
  36009. var minBoxElem = targetModal.getBox();
  36010. if (minBoxElem) {
  36011. var boxLeft = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(minBoxElem.style.left);
  36012. var boxTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(minBoxElem.style.top);
  36013. var offsetObj = {};
  36014. if (isHorizontalLayout) {
  36015. offsetObj = Object.assign({}, minimizeHorizontalOffset);
  36016. } else {
  36017. offsetObj = Object.assign({}, minimizeVerticalOffset);
  36018. }
  36019. targetLeft = boxLeft + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(offsetObj.left);
  36020. targetTop = boxTop + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(offsetObj.top);
  36021. if (minimizeOffsetMethod) {
  36022. offsetObj = minimizeOffsetMethod({
  36023. $modal: $xeModal,
  36024. left: targetLeft,
  36025. top: targetTop
  36026. });
  36027. targetLeft = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(offsetObj.left);
  36028. targetTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(offsetObj.top);
  36029. }
  36030. }
  36031. }
  36032. Object.assign(boxElem.style, {
  36033. top: "".concat(targetTop, "px"),
  36034. left: "".concat(targetLeft, "px"),
  36035. width: '200px',
  36036. height: "".concat(headerEl.offsetHeight, "px")
  36037. });
  36038. $xeModal.savePosStorage();
  36039. return {
  36040. status: true
  36041. };
  36042. });
  36043. },
  36044. handleMaximize: function handleMaximize() {
  36045. var $xeModal = this;
  36046. var props = $xeModal;
  36047. var reactData = $xeModal.reactData;
  36048. var prevZoomStatus = reactData.zoomStatus;
  36049. reactData.prevZoomStatus = prevZoomStatus;
  36050. reactData.zoomStatus = 'maximize';
  36051. return $xeModal.$nextTick().then(function () {
  36052. var boxElem = $xeModal.getBox();
  36053. if (boxElem) {
  36054. // 如果当前处于复原状态
  36055. if (!prevZoomStatus) {
  36056. var marginSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.marginSize);
  36057. var clientVisibleWidth = document.documentElement.clientWidth || document.body.clientWidth;
  36058. var clientVisibleHeight = document.documentElement.clientHeight || document.body.clientHeight;
  36059. reactData.revertLocat = {
  36060. top: Math.max(marginSize, clientVisibleHeight / 2 - boxElem.offsetHeight / 2),
  36061. left: Math.max(marginSize, clientVisibleWidth / 2 - boxElem.offsetWidth / 2),
  36062. width: boxElem.offsetWidth + (boxElem.style.width ? 0 : 1),
  36063. height: boxElem.offsetHeight + (boxElem.style.height ? 0 : 1)
  36064. };
  36065. }
  36066. Object.assign(boxElem.style, {
  36067. top: '0',
  36068. left: '0',
  36069. width: '100%',
  36070. height: '100%'
  36071. });
  36072. }
  36073. $xeModal.savePosStorage();
  36074. });
  36075. },
  36076. handleMsgAutoClose: function handleMsgAutoClose() {
  36077. var $xeModal = this;
  36078. var props = $xeModal;
  36079. var internalData = $xeModal.internalData;
  36080. var duration = props.duration;
  36081. if (duration !== -1) {
  36082. internalData.msgTimeout = setTimeout(function () {
  36083. return $xeModal.closeModal('close');
  36084. }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(duration));
  36085. }
  36086. },
  36087. removeBodyLockScroll: function removeBodyLockScroll() {
  36088. var $xeModal = this;
  36089. var xID = $xeModal.xID;
  36090. var htmlElem = document.documentElement;
  36091. var lockData = htmlElem.getAttribute(lockScrollAttrKey);
  36092. if (lockData) {
  36093. var lockList = lockData.split(',').filter(function (key) {
  36094. return key !== xID;
  36095. });
  36096. if (lockList.length) {
  36097. htmlElem.setAttribute(lockScrollAttrKey, lockList.join(','));
  36098. } else {
  36099. htmlElem.removeAttribute(lockScrollAttrKey);
  36100. htmlElem.style.removeProperty(lockScrollCssWidthKey);
  36101. }
  36102. }
  36103. },
  36104. addBodyLockScroll: function addBodyLockScroll() {
  36105. var $xeModal = this;
  36106. var props = $xeModal;
  36107. var xID = $xeModal.xID;
  36108. var lockScroll = props.lockScroll;
  36109. var isMsg = $xeModal.computeIsMsg;
  36110. if (lockScroll && !isMsg) {
  36111. var htmlElem = document.documentElement;
  36112. var clientWidth = document.body.clientWidth;
  36113. var lockData = htmlElem.getAttribute(lockScrollAttrKey);
  36114. var lockList = lockData ? lockData.split(',') : [];
  36115. if (!lockList.includes(xID)) {
  36116. lockList.push(xID);
  36117. htmlElem.setAttribute(lockScrollAttrKey, lockList.join(','));
  36118. }
  36119. htmlElem.style.setProperty(lockScrollCssWidthKey, "".concat(clientWidth, "px"));
  36120. }
  36121. },
  36122. openModal: function openModal() {
  36123. var $xeModal = this;
  36124. var props = $xeModal;
  36125. var reactData = $xeModal.reactData;
  36126. var remember = props.remember,
  36127. showFooter = props.showFooter;
  36128. var initialized = reactData.initialized,
  36129. visible = reactData.visible;
  36130. var isMsg = $xeModal.computeIsMsg;
  36131. var btnTransfer = $xeModal.computeBtnTransfer;
  36132. if (!initialized) {
  36133. reactData.initialized = true;
  36134. if (btnTransfer) {
  36135. var panelElem = $xeModal.$refs.refElem;
  36136. document.body.appendChild(panelElem);
  36137. }
  36138. }
  36139. if (!visible) {
  36140. $xeModal.addBodyLockScroll();
  36141. reactData.visible = true;
  36142. reactData.contentVisible = false;
  36143. $xeModal.updateZindex();
  36144. allActiveModals.push($xeModal);
  36145. setTimeout(function () {
  36146. reactData.contentVisible = true;
  36147. $xeModal.$nextTick(function () {
  36148. if (showFooter) {
  36149. var confirmBtn = $xeModal.$refs.refConfirmBtn;
  36150. var cancelBtn = $xeModal.$refs.refCancelBtn;
  36151. var operBtn = confirmBtn || cancelBtn;
  36152. if (operBtn) {
  36153. operBtn.focus();
  36154. }
  36155. }
  36156. var type = '';
  36157. var params = {
  36158. type: type
  36159. };
  36160. $xeModal.emitModel(true);
  36161. $xeModal.dispatchEvent('show', params, null);
  36162. });
  36163. }, 10);
  36164. if (isMsg) {
  36165. $xeModal.addMsgQueue();
  36166. $xeModal.handleMsgAutoClose();
  36167. } else {
  36168. $xeModal.$nextTick(function () {
  36169. var fullscreen = props.fullscreen;
  36170. var firstOpen = reactData.firstOpen;
  36171. if (firstOpen) {
  36172. reactData.firstOpen = false;
  36173. if ($xeModal.hasPosStorage()) {
  36174. $xeModal.restorePosStorage();
  36175. } else {
  36176. if (fullscreen) {
  36177. $xeModal.$nextTick(function () {
  36178. return $xeModal.handleMaximize();
  36179. });
  36180. } else {
  36181. $xeModal.recalculate();
  36182. $xeModal.updatePosition().then(function () {
  36183. setTimeout(function () {
  36184. return $xeModal.updatePosition();
  36185. }, 20);
  36186. });
  36187. }
  36188. }
  36189. } else {
  36190. if (!remember) {
  36191. $xeModal.recalculate();
  36192. $xeModal.updatePosition().then(function () {
  36193. setTimeout(function () {
  36194. return $xeModal.updatePosition();
  36195. }, 20);
  36196. });
  36197. }
  36198. }
  36199. });
  36200. }
  36201. }
  36202. return $xeModal.$nextTick();
  36203. },
  36204. selfClickEvent: function selfClickEvent(evnt) {
  36205. var $xeModal = this;
  36206. var props = $xeModal;
  36207. var el = $xeModal.$refs.refElem;
  36208. if (props.maskClosable && evnt.target === el) {
  36209. var type = 'mask';
  36210. $xeModal.closeModal(type);
  36211. }
  36212. },
  36213. selfMouseoverEvent: function selfMouseoverEvent() {
  36214. var $xeModal = this;
  36215. var internalData = $xeModal.internalData;
  36216. var msgTimeout = internalData.msgTimeout;
  36217. if (!msgTimeout) {
  36218. return;
  36219. }
  36220. var isMsg = $xeModal.computeIsMsg;
  36221. if (isMsg) {
  36222. clearTimeout(msgTimeout);
  36223. internalData.msgTimeout = undefined;
  36224. }
  36225. },
  36226. selfMouseoutEvent: function selfMouseoutEvent() {
  36227. var $xeModal = this;
  36228. var internalData = $xeModal.internalData;
  36229. var msgTimeout = internalData.msgTimeout;
  36230. if (!msgTimeout) {
  36231. var isMsg = $xeModal.computeIsMsg;
  36232. if (isMsg) {
  36233. $xeModal.handleMsgAutoClose();
  36234. }
  36235. }
  36236. },
  36237. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  36238. var $xeModal = this;
  36239. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  36240. if (isEsc) {
  36241. var lastModal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().max(allActiveModals, function (item) {
  36242. return item.reactData.modalZindex;
  36243. });
  36244. // 多个时,只关掉最上层的窗口
  36245. if (lastModal) {
  36246. setTimeout(function () {
  36247. if (lastModal === $xeModal && lastModal.escClosable) {
  36248. var type = 'exit';
  36249. $xeModal.dispatchEvent('close', {
  36250. type: type
  36251. }, evnt);
  36252. $xeModal.closeModal(type);
  36253. }
  36254. }, 10);
  36255. }
  36256. }
  36257. },
  36258. handleRevert: function handleRevert() {
  36259. var $xeModal = this;
  36260. var reactData = $xeModal.reactData;
  36261. reactData.prevZoomStatus = reactData.zoomStatus;
  36262. reactData.zoomStatus = '';
  36263. return $xeModal.$nextTick().then(function () {
  36264. var revertLocat = reactData.revertLocat;
  36265. if (revertLocat) {
  36266. var boxElem = $xeModal.getBox();
  36267. reactData.revertLocat = null;
  36268. if (boxElem) {
  36269. Object.assign(boxElem.style, {
  36270. top: "".concat(revertLocat.top, "px"),
  36271. left: "".concat(revertLocat.left, "px"),
  36272. width: "".concat(revertLocat.width, "px"),
  36273. height: "".concat(revertLocat.height, "px")
  36274. });
  36275. }
  36276. $xeModal.savePosStorage();
  36277. return $xeModal.$nextTick().then(function () {
  36278. return {
  36279. status: true
  36280. };
  36281. });
  36282. }
  36283. return {
  36284. status: false
  36285. };
  36286. });
  36287. },
  36288. handleZoom: function handleZoom(type) {
  36289. var $xeModal = this;
  36290. var reactData = $xeModal.reactData;
  36291. var zoomStatus = reactData.zoomStatus;
  36292. return new Promise(function (resolve) {
  36293. if (type) {
  36294. if (type === 'maximize') {
  36295. resolve($xeModal.handleMaximize());
  36296. return;
  36297. }
  36298. if (type === 'minimize') {
  36299. resolve($xeModal.handleMinimize());
  36300. return;
  36301. }
  36302. resolve($xeModal.handleRevert());
  36303. return;
  36304. }
  36305. resolve(zoomStatus ? $xeModal.handleRevert() : $xeModal.handleMaximize());
  36306. }).then(function () {
  36307. return reactData.zoomStatus || 'revert';
  36308. });
  36309. },
  36310. toggleZoomMinEvent: function toggleZoomMinEvent(evnt) {
  36311. var $xeModal = this;
  36312. var reactData = $xeModal.reactData;
  36313. var zoomStatus = reactData.zoomStatus,
  36314. prevZoomStatus = reactData.prevZoomStatus;
  36315. return $xeModal.handleZoom(zoomStatus === 'minimize' ? prevZoomStatus || 'revert' : 'minimize').then(function (type) {
  36316. var params = {
  36317. type: type
  36318. };
  36319. $xeModal.dispatchEvent('zoom', params, evnt);
  36320. });
  36321. },
  36322. toggleZoomMaxEvent: function toggleZoomMaxEvent(evnt) {
  36323. var $xeModal = this;
  36324. return $xeModal.handleZoom().then(function (type) {
  36325. var params = {
  36326. type: type
  36327. };
  36328. $xeModal.dispatchEvent('zoom', params, evnt);
  36329. });
  36330. },
  36331. boxMousedownEvent: function boxMousedownEvent() {
  36332. var $xeModal = this;
  36333. var reactData = $xeModal.reactData;
  36334. var modalZindex = reactData.modalZindex;
  36335. if (allActiveModals.some(function (comp) {
  36336. return comp.reactData.visible && comp.reactData.modalZindex > modalZindex;
  36337. })) {
  36338. $xeModal.updateZindex();
  36339. }
  36340. },
  36341. mousedownEvent: function mousedownEvent(evnt) {
  36342. var $xeModal = this;
  36343. var props = $xeModal;
  36344. var reactData = $xeModal.reactData;
  36345. var storage = props.storage;
  36346. var zoomStatus = reactData.zoomStatus;
  36347. var marginSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.marginSize);
  36348. var boxElem = $xeModal.getBox();
  36349. if (!boxElem) {
  36350. return;
  36351. }
  36352. if (zoomStatus !== 'maximize' && evnt.button === 0 && !getEventTargetNode(evnt, boxElem, 'trigger--btn').flag) {
  36353. evnt.preventDefault();
  36354. var disX = evnt.clientX - boxElem.offsetLeft;
  36355. var disY = evnt.clientY - boxElem.offsetTop;
  36356. var _getDomNode2 = getDomNode(),
  36357. visibleHeight = _getDomNode2.visibleHeight,
  36358. visibleWidth = _getDomNode2.visibleWidth;
  36359. document.onmousemove = function (evnt) {
  36360. evnt.preventDefault();
  36361. var offsetWidth = boxElem.offsetWidth;
  36362. var offsetHeight = boxElem.offsetHeight;
  36363. var minX = marginSize;
  36364. var maxX = visibleWidth - offsetWidth - marginSize - 1;
  36365. var minY = marginSize;
  36366. var maxY = visibleHeight - offsetHeight - marginSize - 1;
  36367. var left = evnt.clientX - disX;
  36368. var top = evnt.clientY - disY;
  36369. if (left > maxX) {
  36370. left = maxX;
  36371. }
  36372. if (left < minX) {
  36373. left = minX;
  36374. }
  36375. if (top > maxY) {
  36376. top = maxY;
  36377. }
  36378. if (top < minY) {
  36379. top = minY;
  36380. }
  36381. boxElem.style.left = "".concat(left, "px");
  36382. boxElem.style.top = "".concat(top, "px");
  36383. boxElem.className = boxElem.className.replace(/\s?is--drag/, '') + ' is--drag';
  36384. $xeModal.$emit('move', createEvent(evnt, {
  36385. type: 'move'
  36386. }));
  36387. reactData.resizeFlag++;
  36388. };
  36389. document.onmouseup = function () {
  36390. document.onmousemove = null;
  36391. document.onmouseup = null;
  36392. if (storage) {
  36393. $xeModal.$nextTick(function () {
  36394. $xeModal.savePosStorage();
  36395. });
  36396. }
  36397. reactData.resizeFlag++;
  36398. setTimeout(function () {
  36399. boxElem.className = boxElem.className.replace(/\s?is--drag/, '');
  36400. }, 50);
  36401. };
  36402. }
  36403. },
  36404. dragEvent: function dragEvent(evnt) {
  36405. var $xeModal = this;
  36406. var props = $xeModal;
  36407. var reactData = $xeModal.reactData;
  36408. evnt.preventDefault();
  36409. var storage = props.storage;
  36410. var _getDomNode3 = getDomNode(),
  36411. visibleHeight = _getDomNode3.visibleHeight,
  36412. visibleWidth = _getDomNode3.visibleWidth;
  36413. var marginSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.marginSize);
  36414. var targetElem = evnt.target;
  36415. var type = targetElem.getAttribute('type');
  36416. var minWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.minWidth);
  36417. var minHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.minHeight);
  36418. var maxWidth = visibleWidth;
  36419. var maxHeight = visibleHeight;
  36420. var boxElem = $xeModal.getBox();
  36421. var clientWidth = boxElem.clientWidth;
  36422. var clientHeight = boxElem.clientHeight;
  36423. var disX = evnt.clientX;
  36424. var disY = evnt.clientY;
  36425. var offsetTop = boxElem.offsetTop;
  36426. var offsetLeft = boxElem.offsetLeft;
  36427. var params = {
  36428. type: 'resize'
  36429. };
  36430. document.onmousemove = function (evnt) {
  36431. evnt.preventDefault();
  36432. var dragLeft;
  36433. var dragTop;
  36434. var width;
  36435. var height;
  36436. switch (type) {
  36437. case 'wl':
  36438. dragLeft = disX - evnt.clientX;
  36439. width = dragLeft + clientWidth;
  36440. if (offsetLeft - dragLeft > marginSize) {
  36441. if (width > minWidth) {
  36442. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  36443. boxElem.style.left = "".concat(offsetLeft - dragLeft, "px");
  36444. }
  36445. }
  36446. break;
  36447. case 'swst':
  36448. dragLeft = disX - evnt.clientX;
  36449. dragTop = disY - evnt.clientY;
  36450. width = dragLeft + clientWidth;
  36451. height = dragTop + clientHeight;
  36452. if (offsetLeft - dragLeft > marginSize) {
  36453. if (width > minWidth) {
  36454. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  36455. boxElem.style.left = "".concat(offsetLeft - dragLeft, "px");
  36456. }
  36457. }
  36458. if (offsetTop - dragTop > marginSize) {
  36459. if (height > minHeight) {
  36460. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  36461. boxElem.style.top = "".concat(offsetTop - dragTop, "px");
  36462. }
  36463. }
  36464. break;
  36465. case 'swlb':
  36466. dragLeft = disX - evnt.clientX;
  36467. dragTop = evnt.clientY - disY;
  36468. width = dragLeft + clientWidth;
  36469. height = dragTop + clientHeight;
  36470. if (offsetLeft - dragLeft > marginSize) {
  36471. if (width > minWidth) {
  36472. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  36473. boxElem.style.left = "".concat(offsetLeft - dragLeft, "px");
  36474. }
  36475. }
  36476. if (offsetTop + height + marginSize < visibleHeight) {
  36477. if (height > minHeight) {
  36478. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  36479. }
  36480. }
  36481. break;
  36482. case 'st':
  36483. dragTop = disY - evnt.clientY;
  36484. height = clientHeight + dragTop;
  36485. if (offsetTop - dragTop > marginSize) {
  36486. if (height > minHeight) {
  36487. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  36488. boxElem.style.top = "".concat(offsetTop - dragTop, "px");
  36489. }
  36490. }
  36491. break;
  36492. case 'wr':
  36493. dragLeft = evnt.clientX - disX;
  36494. width = dragLeft + clientWidth;
  36495. if (offsetLeft + width + marginSize < visibleWidth) {
  36496. if (width > minWidth) {
  36497. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  36498. }
  36499. }
  36500. break;
  36501. case 'sest':
  36502. dragLeft = evnt.clientX - disX;
  36503. dragTop = disY - evnt.clientY;
  36504. width = dragLeft + clientWidth;
  36505. height = dragTop + clientHeight;
  36506. if (offsetLeft + width + marginSize < visibleWidth) {
  36507. if (width > minWidth) {
  36508. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  36509. }
  36510. }
  36511. if (offsetTop - dragTop > marginSize) {
  36512. if (height > minHeight) {
  36513. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  36514. boxElem.style.top = "".concat(offsetTop - dragTop, "px");
  36515. }
  36516. }
  36517. break;
  36518. case 'selb':
  36519. dragLeft = evnt.clientX - disX;
  36520. dragTop = evnt.clientY - disY;
  36521. width = dragLeft + clientWidth;
  36522. height = dragTop + clientHeight;
  36523. if (offsetLeft + width + marginSize < visibleWidth) {
  36524. if (width > minWidth) {
  36525. boxElem.style.width = "".concat(width < maxWidth ? width : maxWidth, "px");
  36526. }
  36527. }
  36528. if (offsetTop + height + marginSize < visibleHeight) {
  36529. if (height > minHeight) {
  36530. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  36531. }
  36532. }
  36533. break;
  36534. case 'sb':
  36535. dragTop = evnt.clientY - disY;
  36536. height = dragTop + clientHeight;
  36537. if (offsetTop + height + marginSize < visibleHeight) {
  36538. if (height > minHeight) {
  36539. boxElem.style.height = "".concat(height < maxHeight ? height : maxHeight, "px");
  36540. }
  36541. }
  36542. break;
  36543. }
  36544. boxElem.className = boxElem.className.replace(/\s?is--drag/, '') + ' is--drag';
  36545. if (storage) {
  36546. $xeModal.savePosStorage();
  36547. }
  36548. $xeModal.dispatchEvent('resize', params, evnt);
  36549. };
  36550. document.onmouseup = function () {
  36551. reactData.revertLocat = null;
  36552. document.onmousemove = null;
  36553. document.onmouseup = null;
  36554. setTimeout(function () {
  36555. boxElem.className = boxElem.className.replace(/\s?is--drag/, '');
  36556. }, 50);
  36557. };
  36558. },
  36559. //
  36560. // Render
  36561. //
  36562. renderTitles: function renderTitles(h) {
  36563. var $xeModal = this;
  36564. var props = $xeModal;
  36565. var slots = $xeModal.$scopedSlots;
  36566. var reactData = $xeModal.reactData;
  36567. var _props$slots = props.slots,
  36568. propSlots = _props$slots === void 0 ? {} : _props$slots,
  36569. showClose = props.showClose,
  36570. showZoom = props.showZoom,
  36571. showMaximize = props.showMaximize,
  36572. showMinimize = props.showMinimize,
  36573. title = props.title;
  36574. var zoomStatus = reactData.zoomStatus;
  36575. var titleSlot = slots.title || propSlots.title;
  36576. var cornerSlot = slots.corner || propSlots.corner;
  36577. var isMinimizeStatus = $xeModal.computeIsMinimizeStatus;
  36578. var isMaximizeStatus = $xeModal.computeIsMaximizeStatus;
  36579. return [h('div', {
  36580. class: 'vxe-modal--header-title'
  36581. }, titleSlot ? $xeModal.callSlot(titleSlot, {
  36582. $modal: $xeModal,
  36583. minimized: isMinimizeStatus,
  36584. maximized: isMaximizeStatus
  36585. }, h) : title ? getFuncText(title) : getI18n('vxe.alert.title')), h('div', {
  36586. class: 'vxe-modal--header-right'
  36587. }, [cornerSlot && !isMinimizeStatus ? h('div', {
  36588. class: 'vxe-modal--corner-wrapper'
  36589. }, $xeModal.callSlot(cornerSlot, {
  36590. $modal: $xeModal
  36591. }, h)) : renderEmptyElement($xeModal), (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showMinimize) ? showMinimize : showZoom) ? h('div', {
  36592. class: ['vxe-modal--zoom-btn', 'trigger--btn'],
  36593. attrs: {
  36594. title: getI18n("vxe.modal.zoom".concat(zoomStatus === 'minimize' ? 'Out' : 'Min'))
  36595. },
  36596. on: {
  36597. click: $xeModal.toggleZoomMinEvent
  36598. }
  36599. }, [h('i', {
  36600. class: zoomStatus === 'minimize' ? getIcon().MODAL_ZOOM_REVERT : getIcon().MODAL_ZOOM_MIN
  36601. })]) : renderEmptyElement($xeModal), (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showMaximize) ? showMaximize : showZoom) && zoomStatus !== 'minimize' ? h('div', {
  36602. class: ['vxe-modal--zoom-btn', 'trigger--btn'],
  36603. attrs: {
  36604. title: getI18n("vxe.modal.zoom".concat(zoomStatus === 'maximize' ? 'Out' : 'In'))
  36605. },
  36606. on: {
  36607. click: $xeModal.toggleZoomMaxEvent
  36608. }
  36609. }, [h('i', {
  36610. class: zoomStatus === 'maximize' ? getIcon().MODAL_ZOOM_OUT : getIcon().MODAL_ZOOM_IN
  36611. })]) : renderEmptyElement($xeModal), showClose ? h('div', {
  36612. class: ['vxe-modal--close-btn', 'trigger--btn'],
  36613. attrs: {
  36614. title: getI18n('vxe.modal.close')
  36615. },
  36616. on: {
  36617. click: $xeModal.closeEvent
  36618. }
  36619. }, [h('i', {
  36620. class: getIcon().MODAL_CLOSE
  36621. })]) : renderEmptyElement($xeModal)])];
  36622. },
  36623. renderHeader: function renderHeader(h) {
  36624. var $xeModal = this;
  36625. var props = $xeModal;
  36626. var slots = $xeModal.$scopedSlots;
  36627. var _props$slots2 = props.slots,
  36628. propSlots = _props$slots2 === void 0 ? {} : _props$slots2,
  36629. showZoom = props.showZoom,
  36630. showMaximize = props.showMaximize,
  36631. draggable = props.draggable;
  36632. var headerSlot = slots.header || propSlots.header;
  36633. if (props.showHeader) {
  36634. var headerOns = {};
  36635. if (draggable) {
  36636. headerOns.mousedown = $xeModal.mousedownEvent;
  36637. }
  36638. if ((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showMaximize) ? showMaximize : showZoom) && props.dblclickZoom && props.type === 'modal') {
  36639. headerOns.dblclick = $xeModal.toggleZoomMaxEvent;
  36640. }
  36641. return h('div', {
  36642. ref: 'refHeaderElem',
  36643. class: ['vxe-modal--header', {
  36644. 'is--ellipsis': props.showTitleOverflow
  36645. }],
  36646. on: headerOns
  36647. }, headerSlot ? $xeModal.callSlot(headerSlot, {
  36648. $modal: $xeModal
  36649. }, h) : $xeModal.renderTitles(h));
  36650. }
  36651. return renderEmptyElement($xeModal);
  36652. },
  36653. renderBody: function renderBody(h) {
  36654. var $xeModal = this;
  36655. var props = $xeModal;
  36656. var slots = $xeModal.$scopedSlots;
  36657. var _props$slots3 = props.slots,
  36658. propSlots = _props$slots3 === void 0 ? {} : _props$slots3,
  36659. status = props.status,
  36660. message = props.message,
  36661. iconStatus = props.iconStatus;
  36662. var content = props.content || message;
  36663. var isMsg = $xeModal.computeIsMsg;
  36664. var defaultSlot = slots.default || propSlots.default;
  36665. var leftSlot = slots.left || propSlots.left;
  36666. var rightSlot = slots.right || propSlots.right;
  36667. var contVNs = [];
  36668. if (!isMsg && (status || iconStatus)) {
  36669. contVNs.push(h('div', {
  36670. class: 'vxe-modal--status-wrapper'
  36671. }, [h('i', {
  36672. class: ['vxe-modal--status-icon', iconStatus || getIcon()["MODAL_".concat(status).toLocaleUpperCase()]]
  36673. })]));
  36674. }
  36675. contVNs.push(h('div', {
  36676. class: 'vxe-modal--content'
  36677. }, defaultSlot ? $xeModal.callSlot(defaultSlot, {
  36678. $modal: $xeModal
  36679. }, h) : getFuncText(content)));
  36680. return h('div', {
  36681. class: 'vxe-modal--body'
  36682. }, [leftSlot ? h('div', {
  36683. class: 'vxe-modal--body-left'
  36684. }, $xeModal.callSlot(leftSlot, {
  36685. $modal: $xeModal
  36686. }, h)) : renderEmptyElement($xeModal), h('div', {
  36687. class: 'vxe-modal--body-default'
  36688. }, contVNs), rightSlot ? h('div', {
  36689. class: 'vxe-modal--body-right'
  36690. }, $xeModal.callSlot(rightSlot, {
  36691. $modal: $xeModal
  36692. }, h)) : renderEmptyElement($xeModal), isMsg ? renderEmptyElement($xeModal) : h(packages_loading, {
  36693. class: 'vxe-modal--loading',
  36694. props: {
  36695. value: props.loading
  36696. }
  36697. })]);
  36698. },
  36699. renderDefaultFooter: function renderDefaultFooter(h) {
  36700. var $xeModal = this;
  36701. var props = $xeModal;
  36702. var slots = $xeModal.$scopedSlots;
  36703. var _props$slots4 = props.slots,
  36704. propSlots = _props$slots4 === void 0 ? {} : _props$slots4,
  36705. showCancelButton = props.showCancelButton,
  36706. showConfirmButton = props.showConfirmButton,
  36707. type = props.type,
  36708. loading = props.loading;
  36709. var lfSlot = slots.leftfoot || propSlots.leftfoot;
  36710. var rfSlot = slots.rightfoot || propSlots.rightfoot;
  36711. var btnVNs = [];
  36712. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showCancelButton) ? showCancelButton : type === 'confirm') {
  36713. btnVNs.push(h(src_button, {
  36714. key: 1,
  36715. ref: 'refCancelBtn',
  36716. props: {
  36717. content: props.cancelButtonText || getI18n('vxe.button.cancel')
  36718. },
  36719. on: {
  36720. click: $xeModal.cancelEvent
  36721. }
  36722. }));
  36723. }
  36724. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showConfirmButton) ? showConfirmButton : type === 'confirm' || type === 'alert') {
  36725. btnVNs.push(h(src_button, {
  36726. key: 2,
  36727. ref: 'refConfirmBtn',
  36728. props: {
  36729. status: 'primary',
  36730. loading: loading,
  36731. content: props.confirmButtonText || getI18n('vxe.button.confirm')
  36732. },
  36733. on: {
  36734. click: $xeModal.confirmEvent
  36735. }
  36736. }));
  36737. }
  36738. return h('div', {
  36739. class: 'vxe-modal--footer-wrapper'
  36740. }, [h('div', {
  36741. class: 'vxe-modal--footer-left'
  36742. }, lfSlot ? $xeModal.callSlot(lfSlot, {
  36743. $modal: $xeModal
  36744. }, h) : []), h('div', {
  36745. class: 'vxe-modal--footer-right'
  36746. }, rfSlot ? $xeModal.callSlot(rfSlot, {
  36747. $modal: $xeModal
  36748. }, h) : btnVNs)]);
  36749. },
  36750. renderFooter: function renderFooter(h) {
  36751. var $xeModal = this;
  36752. var props = $xeModal;
  36753. var slots = $xeModal.$scopedSlots;
  36754. var _props$slots5 = props.slots,
  36755. propSlots = _props$slots5 === void 0 ? {} : _props$slots5;
  36756. var footerSlot = slots.footer || propSlots.footer;
  36757. if (props.showFooter) {
  36758. return h('div', {
  36759. class: 'vxe-modal--footer'
  36760. }, footerSlot ? $xeModal.callSlot(footerSlot, {
  36761. $modal: $xeModal
  36762. }, h) : [$xeModal.renderDefaultFooter(h)]);
  36763. }
  36764. return renderEmptyElement($xeModal);
  36765. },
  36766. renderVN: function renderVN(h) {
  36767. var _ref2;
  36768. var $xeModal = this;
  36769. var props = $xeModal;
  36770. var slots = $xeModal.$scopedSlots;
  36771. var reactData = $xeModal.reactData;
  36772. var _props$slots6 = props.slots,
  36773. propSlots = _props$slots6 === void 0 ? {} : _props$slots6,
  36774. className = props.className,
  36775. type = props.type,
  36776. animat = props.animat,
  36777. draggable = props.draggable,
  36778. iconStatus = props.iconStatus,
  36779. position = props.position,
  36780. loading = props.loading,
  36781. destroyOnClose = props.destroyOnClose,
  36782. status = props.status,
  36783. lockScroll = props.lockScroll,
  36784. padding = props.padding,
  36785. lockView = props.lockView,
  36786. mask = props.mask,
  36787. resize = props.resize;
  36788. var initialized = reactData.initialized,
  36789. modalTop = reactData.modalTop,
  36790. contentVisible = reactData.contentVisible,
  36791. visible = reactData.visible,
  36792. zoomStatus = reactData.zoomStatus;
  36793. var asideSlot = slots.aside || propSlots.aside;
  36794. var vSize = $xeModal.computeSize;
  36795. var isMsg = $xeModal.computeIsMsg;
  36796. var isMinimizeStatus = $xeModal.computeIsMinimizeStatus;
  36797. var ons = {};
  36798. if (isMsg) {
  36799. ons.mouseover = $xeModal.selfMouseoverEvent;
  36800. ons.mouseout = $xeModal.selfMouseoutEvent;
  36801. }
  36802. return h('div', {
  36803. ref: 'refElem',
  36804. class: ['vxe-modal--wrapper', "type--".concat(type), "zoom--".concat(zoomStatus || 'revert'), className || '', position ? "pos--".concat(position) : '', (_ref2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "size--".concat(vSize), vSize), "status--".concat(status), status), 'is--padding', padding), 'is--animat', animat), 'lock--scroll', lockScroll), 'lock--view', lockView), 'is--draggable', draggable), 'is--resize', resize), 'is--mask', mask), 'is--visible', contentVisible), _defineProperty(_defineProperty(_ref2, 'is--active', visible), 'is--loading', loading))],
  36805. style: {
  36806. zIndex: reactData.modalZindex,
  36807. top: modalTop ? "".concat(modalTop, "px") : null
  36808. },
  36809. on: _objectSpread2(_objectSpread2({}, ons), {}, {
  36810. click: $xeModal.selfClickEvent
  36811. })
  36812. }, initialized ? [h('div', {
  36813. ref: 'refModalBox',
  36814. class: 'vxe-modal--box',
  36815. on: {
  36816. mousedown: $xeModal.boxMousedownEvent
  36817. }
  36818. }, [(isMsg || asideSlot) && !isMinimizeStatus ? h('div', {
  36819. class: 'vxe-modal--aside'
  36820. }, asideSlot ? $xeModal.callSlot(asideSlot, {
  36821. $modal: $xeModal
  36822. }, h) : [status || iconStatus ? h('div', {
  36823. class: 'vxe-modal--status-wrapper'
  36824. }, [h('i', {
  36825. class: ['vxe-modal--status-icon', iconStatus || getIcon()["MODAL_".concat(status).toLocaleUpperCase()]]
  36826. })]) : renderEmptyElement($xeModal)]) : renderEmptyElement($xeModal), h('div', {
  36827. class: 'vxe-modal--container'
  36828. }, !reactData.initialized || destroyOnClose && !reactData.visible ? [] : [$xeModal.renderHeader(h), $xeModal.renderBody(h), $xeModal.renderFooter(h), !isMsg && resize ? h('span', {
  36829. class: 'vxe-modal--resize'
  36830. }, ['wl', 'wr', 'swst', 'sest', 'st', 'swlb', 'selb', 'sb'].map(function (type) {
  36831. return h('span', {
  36832. class: "".concat(type, "-resize"),
  36833. attrs: {
  36834. type: type
  36835. },
  36836. on: {
  36837. mousedown: $xeModal.dragEvent
  36838. }
  36839. });
  36840. })) : renderEmptyElement($xeModal)])])] : []);
  36841. }
  36842. },
  36843. mounted: function mounted() {
  36844. var $xeModal = this;
  36845. var slots = $xeModal.$scopedSlots;
  36846. var props = $xeModal;
  36847. if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
  36848. warnLog('vxe.modal.footPropErr');
  36849. }
  36850. $xeModal.$nextTick(function () {
  36851. if (props.storage && !props.id) {
  36852. errLog('vxe.error.reqProp', ['[modal] id']);
  36853. }
  36854. if (props.value) {
  36855. $xeModal.openModal();
  36856. }
  36857. $xeModal.recalculate();
  36858. });
  36859. if (props.escClosable) {
  36860. globalEvents.on($xeModal, 'keydown', $xeModal.handleGlobalKeydownEvent);
  36861. }
  36862. },
  36863. beforeDestroy: function beforeDestroy() {
  36864. var $xeModal = this;
  36865. var panelElem = $xeModal.$refs.refElem;
  36866. if (panelElem && panelElem.parentNode) {
  36867. panelElem.parentNode.removeChild(panelElem);
  36868. }
  36869. globalEvents.off($xeModal, 'keydown');
  36870. $xeModal.removeMsgQueue();
  36871. $xeModal.removeBodyLockScroll();
  36872. },
  36873. render: function render(h) {
  36874. return this.renderVN(h);
  36875. }
  36876. })); /* define-vxe-component end */
  36877. ;// CONCATENATED MODULE: ./packages/modal/index.ts
  36878. function handleModal(options) {
  36879. // 使用动态组件渲染动态弹框
  36880. checkDynamic();
  36881. return new Promise(function (resolve) {
  36882. var opts = Object.assign({}, options);
  36883. if (opts.id && allActiveModals.some(function (comp) {
  36884. return comp.id === opts.id;
  36885. })) {
  36886. resolve('exist');
  36887. } else {
  36888. var events = Object.assign({}, opts.events);
  36889. var modalOpts = {
  36890. key: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  36891. props: Object.assign(opts, {
  36892. value: true
  36893. }),
  36894. on: _objectSpread2(_objectSpread2({}, events), {}, {
  36895. hide: function hide(params) {
  36896. var modalList = dynamicStore.modals;
  36897. if (events.hide) {
  36898. events.hide.call(this, params);
  36899. }
  36900. dynamicStore.modals = modalList.filter(function (item) {
  36901. return item.key !== modalOpts.key;
  36902. });
  36903. resolve(params.type);
  36904. }
  36905. })
  36906. };
  36907. dynamicStore.modals.push(modalOpts);
  36908. }
  36909. });
  36910. }
  36911. function getModal(id) {
  36912. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().find(allActiveModals, function ($modal) {
  36913. return $modal.id === id;
  36914. });
  36915. }
  36916. /**
  36917. * 全局关闭动态的活动窗口(只能用于关闭动态的创建的活动窗口)
  36918. * 如果传 id 则关闭指定的窗口
  36919. * 如果不传则关闭所有窗口
  36920. */
  36921. function closeModal(id) {
  36922. var modals = id ? [getModal(id)] : allActiveModals;
  36923. var restPromises = [];
  36924. modals.forEach(function ($modal) {
  36925. if ($modal) {
  36926. restPromises.push($modal.close());
  36927. }
  36928. });
  36929. return Promise.all(restPromises);
  36930. }
  36931. function handleOpen(defOpts, content, title, options) {
  36932. var opts;
  36933. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(content)) {
  36934. opts = content;
  36935. } else {
  36936. opts = {
  36937. content: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content),
  36938. title: title
  36939. };
  36940. }
  36941. return handleModal(_objectSpread2(_objectSpread2(_objectSpread2({}, defOpts), options), opts));
  36942. }
  36943. function openModal(options) {
  36944. return handleOpen({
  36945. type: 'modal'
  36946. }, options);
  36947. }
  36948. function openAlert(content, title, options) {
  36949. return handleOpen({
  36950. type: 'alert',
  36951. lockScroll: true,
  36952. showHeader: true,
  36953. showFooter: true
  36954. }, content, title, options);
  36955. }
  36956. function openConfirm(content, title, options) {
  36957. return handleOpen({
  36958. type: 'confirm',
  36959. status: 'question',
  36960. lockScroll: true,
  36961. showHeader: true,
  36962. showFooter: true
  36963. }, content, title, options);
  36964. }
  36965. function openMessage(content, options) {
  36966. return handleOpen({
  36967. type: 'message',
  36968. mask: false,
  36969. lockView: false,
  36970. lockScroll: false,
  36971. showHeader: false
  36972. }, content, '', options);
  36973. }
  36974. function openNotification(content, title, options) {
  36975. return handleOpen({
  36976. type: 'notification',
  36977. mask: false,
  36978. lockView: false,
  36979. lockScroll: false,
  36980. showHeader: true,
  36981. draggable: false,
  36982. position: 'top-right',
  36983. width: 320
  36984. }, content, title, options);
  36985. }
  36986. var ModalController = {
  36987. get: getModal,
  36988. close: closeModal,
  36989. open: openModal,
  36990. alert: openAlert,
  36991. confirm: openConfirm,
  36992. message: openMessage,
  36993. notification: openNotification
  36994. };
  36995. var VxeModal = Object.assign(modal, {
  36996. install: function install(app) {
  36997. app.component(modal.name, modal);
  36998. // 兼容老版本
  36999. if (!(external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype.$vxe) {
  37000. (external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype.$vxe = {
  37001. modal: ModalController
  37002. };
  37003. } else {
  37004. (external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype.$vxe.modal = ModalController;
  37005. }
  37006. }
  37007. });
  37008. index_esm_VxeUI.modal = ModalController;
  37009. dynamicApp.use(VxeModal);
  37010. index_esm_VxeUI.component(modal);
  37011. var Modal = VxeModal;
  37012. /* harmony default export */ var packages_modal = (VxeModal);
  37013. ;// CONCATENATED MODULE: ./packages/notice-bar/src/notice-bar.ts
  37014. /* harmony default export */ var notice_bar = (/* define-vxe-component start */defineVxeComponent({
  37015. name: 'VxeNoticeBar',
  37016. mixins: [globalMixins.sizeMixin],
  37017. props: {
  37018. duration: [String, Number],
  37019. direction: {
  37020. type: String,
  37021. default: function _default() {
  37022. return getConfig().noticeBar.direction;
  37023. }
  37024. },
  37025. speed: {
  37026. type: String,
  37027. default: function _default() {
  37028. return getConfig().noticeBar.speed;
  37029. }
  37030. },
  37031. content: String,
  37032. vertical: Boolean,
  37033. loop: {
  37034. type: Boolean
  37035. },
  37036. size: {
  37037. type: String,
  37038. default: function _default() {
  37039. return getConfig().noticeBar.size || getConfig().size;
  37040. }
  37041. }
  37042. },
  37043. inject: {
  37044. $xeTabs: {
  37045. from: '$xeTabs',
  37046. default: null
  37047. }
  37048. },
  37049. data: function data() {
  37050. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  37051. var reactData = {
  37052. animationStatus: false,
  37053. animationDuration: 0
  37054. };
  37055. return {
  37056. xID: xID,
  37057. reactData: reactData
  37058. };
  37059. },
  37060. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  37061. computeNoticeText: function computeNoticeText() {
  37062. var $xeNoticeBar = this;
  37063. var props = $xeNoticeBar;
  37064. var content = props.content;
  37065. return "".concat(content || '');
  37066. },
  37067. computeTabsResizeFlag: function computeTabsResizeFlag() {
  37068. var $xeNoticeBar = this;
  37069. var $xeTabs = $xeNoticeBar.$xeTabs;
  37070. return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
  37071. }
  37072. }),
  37073. methods: {
  37074. //
  37075. // Method
  37076. //
  37077. dispatchEvent: function dispatchEvent(type, params, evnt) {
  37078. var $xeNoticeBar = this;
  37079. $xeNoticeBar.$emit(type, createEvent(evnt, {
  37080. $noticeBar: $xeNoticeBar
  37081. }, params));
  37082. },
  37083. updateAnimationStyle: function updateAnimationStyle() {
  37084. var $xeNoticeBar = this;
  37085. var props = $xeNoticeBar;
  37086. var reactData = $xeNoticeBar.reactData;
  37087. var speed = props.speed;
  37088. var contEl = this.$refs.refContentElem;
  37089. if (contEl) {
  37090. var sRate = 46;
  37091. if (speed === 'fast') {
  37092. sRate = 118;
  37093. } else if (speed === 'slow') {
  37094. sRate = 18;
  37095. }
  37096. reactData.animationDuration = Math.ceil(contEl.scrollWidth / sRate);
  37097. }
  37098. },
  37099. animationStartEvent: function animationStartEvent(evnt) {
  37100. var $xeNoticeBar = this;
  37101. var reactData = $xeNoticeBar.reactData;
  37102. reactData.animationStatus = true;
  37103. $xeNoticeBar.dispatchEvent('start', {
  37104. status: true
  37105. }, evnt);
  37106. },
  37107. animationEndEvent: function animationEndEvent(evnt) {
  37108. var $xeNoticeBar = this;
  37109. var reactData = $xeNoticeBar.reactData;
  37110. reactData.animationStatus = false;
  37111. $xeNoticeBar.dispatchEvent('end', {
  37112. status: false
  37113. }, evnt);
  37114. },
  37115. //
  37116. // Render
  37117. //
  37118. renderVN: function renderVN(h) {
  37119. var $xeNoticeBar = this;
  37120. var props = $xeNoticeBar;
  37121. var slots = $xeNoticeBar.$scopedSlots;
  37122. var reactData = $xeNoticeBar.reactData;
  37123. var vertical = props.vertical,
  37124. duration = props.duration,
  37125. direction = props.direction,
  37126. loop = props.loop;
  37127. var animationDuration = reactData.animationDuration,
  37128. animationStatus = reactData.animationStatus;
  37129. var vSize = $xeNoticeBar.computeSize;
  37130. var noticeText = $xeNoticeBar.computeNoticeText;
  37131. var defaultSlot = slots.default;
  37132. var prefixSlot = slots.prefix;
  37133. var suffixSlot = slots.suffix;
  37134. return h('div', {
  37135. ref: 'refElem',
  37136. class: ['vxe-notice-bar', "is--".concat(vertical ? 'vertical' : 'horizontal'), "dir--".concat(direction || 'left'), _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--loop', loop)]
  37137. }, [prefixSlot ? h('div', {
  37138. class: 'vxe-notice-bar--prefix'
  37139. }, prefixSlot({})) : renderEmptyElement($xeNoticeBar), h('div', {
  37140. class: 'vxe-notice-bar--content'
  37141. }, [h('div', {
  37142. ref: 'refContentElem',
  37143. class: 'vxe-notice-bar--inner'
  37144. }, [h('div', {
  37145. class: ['vxe-notice-bar--wrapper', "is--".concat(animationStatus ? 'progress' : 'end')],
  37146. style: {
  37147. animationDuration: duration ? toCssUnit(duration, 's') : "".concat(animationDuration, "s")
  37148. }
  37149. }, defaultSlot ? defaultSlot({}) : noticeText)])]), suffixSlot ? h('div', {
  37150. class: 'vxe-notice-bar--suffix'
  37151. }, suffixSlot({})) : renderEmptyElement($xeNoticeBar)]);
  37152. }
  37153. },
  37154. watch: {
  37155. computeTabsResizeFlag: function computeTabsResizeFlag() {
  37156. var $xeNoticeBar = this;
  37157. $xeNoticeBar.updateAnimationStyle();
  37158. }
  37159. },
  37160. mounted: function mounted() {
  37161. var $xeNoticeBar = this;
  37162. globalEvents.on($xeNoticeBar, 'resize', $xeNoticeBar.updateAnimationStyle);
  37163. $xeNoticeBar.updateAnimationStyle();
  37164. },
  37165. beforeDestroy: function beforeDestroy() {
  37166. var $xeNoticeBar = this;
  37167. globalEvents.off($xeNoticeBar, 'resize');
  37168. },
  37169. render: function render(h) {
  37170. return this.renderVN(h);
  37171. }
  37172. })); /* define-vxe-component end */
  37173. ;// CONCATENATED MODULE: ./packages/notice-bar/index.ts
  37174. var VxeNoticeBar = Object.assign({}, notice_bar, {
  37175. install: function install(app) {
  37176. app.component(notice_bar.name, notice_bar);
  37177. }
  37178. });
  37179. dynamicApp.use(VxeNoticeBar);
  37180. index_esm_VxeUI.component(notice_bar);
  37181. var NoticeBar = VxeNoticeBar;
  37182. /* harmony default export */ var packages_notice_bar = (VxeNoticeBar);
  37183. ;// CONCATENATED MODULE: ./packages/number-input/index.ts
  37184. var VxeNumberInput = Object.assign({}, number_input, {
  37185. install: function install(app) {
  37186. app.component(number_input.name, number_input);
  37187. }
  37188. });
  37189. dynamicApp.use(VxeNumberInput);
  37190. index_esm_VxeUI.component(number_input);
  37191. var NumberInput = VxeNumberInput;
  37192. /* harmony default export */ var packages_number_input = (VxeNumberInput);
  37193. ;// CONCATENATED MODULE: ./packages/select/src/option-info.ts
  37194. var OptionInfo = /*#__PURE__*/function () {
  37195. function OptionInfo($xeselect, _vm) {
  37196. _classCallCheck(this, OptionInfo);
  37197. Object.assign(this, {
  37198. id: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('option_'),
  37199. value: _vm.value,
  37200. label: _vm.label,
  37201. visible: _vm.visible,
  37202. className: _vm.className,
  37203. disabled: _vm.disabled
  37204. });
  37205. }
  37206. return _createClass(OptionInfo, [{
  37207. key: "update",
  37208. value: function update(name, value) {
  37209. this[name] = value;
  37210. }
  37211. }]);
  37212. }();
  37213. ;// CONCATENATED MODULE: ./packages/select/src/util.ts
  37214. function isOption(option) {
  37215. return option instanceof OptionInfo;
  37216. }
  37217. function createOption($xeSelect, _vm) {
  37218. return isOption(_vm) ? _vm : new OptionInfo($xeSelect, _vm);
  37219. }
  37220. function watchOption(_vm, option) {
  37221. var optionPropKeys = ['value', 'label', 'visible', 'className', 'disabled'];
  37222. optionPropKeys.forEach(function (name) {
  37223. _vm.$watch(name, function (val) {
  37224. option.update(name, val);
  37225. });
  37226. });
  37227. }
  37228. function assembleOption($xeSelect, el, option, xeOptgroup) {
  37229. var reactData = $xeSelect.reactData;
  37230. var staticOptions = reactData.staticOptions;
  37231. var parentElem = el.parentNode;
  37232. var parentOption = xeOptgroup ? xeOptgroup.optionConfig : null;
  37233. var parentCols = parentOption ? parentOption.options : staticOptions;
  37234. if (parentElem && parentCols) {
  37235. parentCols.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, el), 0, option);
  37236. reactData.staticOptions = staticOptions.slice(0);
  37237. }
  37238. }
  37239. function destroyOption($xeSelect, option) {
  37240. var reactData = $xeSelect.reactData;
  37241. var staticOptions = reactData.staticOptions;
  37242. var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(staticOptions, function (item) {
  37243. return item.id === option.id;
  37244. }, {
  37245. children: 'options'
  37246. });
  37247. if (matchObj) {
  37248. matchObj.items.splice(matchObj.index, 1);
  37249. }
  37250. reactData.staticOptions = staticOptions.slice(0);
  37251. }
  37252. ;// CONCATENATED MODULE: ./packages/select/src/optgroup.ts
  37253. /* harmony default export */ var optgroup = (/* define-vxe-component start */defineVxeComponent({
  37254. name: 'VxeOptgroup',
  37255. mixins: [globalMixins.sizeMixin],
  37256. props: {
  37257. label: {
  37258. type: [String, Number, Boolean],
  37259. default: ''
  37260. },
  37261. visible: {
  37262. type: Boolean,
  37263. default: null
  37264. },
  37265. className: [String, Function],
  37266. disabled: Boolean
  37267. },
  37268. inject: {
  37269. $xeSelect: {
  37270. default: null
  37271. }
  37272. },
  37273. provide: function provide() {
  37274. var $xeOptgroup = this;
  37275. return {
  37276. $xeOptgroup: $xeOptgroup
  37277. };
  37278. },
  37279. data: function data() {
  37280. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  37281. var reactData = {};
  37282. var optionConfig = {};
  37283. return {
  37284. xID: xID,
  37285. reactData: reactData,
  37286. optionConfig: optionConfig
  37287. };
  37288. },
  37289. computed: _objectSpread2({}, {}),
  37290. methods: {
  37291. //
  37292. // Method
  37293. //
  37294. dispatchEvent: function dispatchEvent(type, params, evnt) {
  37295. var $xeOptgroup = this;
  37296. $xeOptgroup.$emit(type, createEvent(evnt, {
  37297. $optgroup: $xeOptgroup
  37298. }, params));
  37299. },
  37300. //
  37301. // Render
  37302. //
  37303. renderVN: function renderVN(h) {
  37304. var $xeOptgroup = this;
  37305. var slots = $xeOptgroup.$scopedSlots;
  37306. var defaultSlot = slots.default;
  37307. return h('div', {
  37308. ref: 'elem'
  37309. }, defaultSlot ? defaultSlot({}) : []);
  37310. }
  37311. },
  37312. created: function created() {
  37313. var $xeOptgroup = this;
  37314. var props = $xeOptgroup;
  37315. var slots = $xeOptgroup.$scopedSlots;
  37316. var $xeSelect = $xeOptgroup.$xeSelect;
  37317. var optionConfig = createOption($xeSelect, props);
  37318. optionConfig.slots = slots;
  37319. $xeOptgroup.optionConfig = optionConfig;
  37320. watchOption($xeOptgroup, optionConfig);
  37321. },
  37322. mounted: function mounted() {
  37323. var $xeOptgroup = this;
  37324. var optionConfig = $xeOptgroup.optionConfig;
  37325. var $xeSelect = $xeOptgroup.$xeSelect;
  37326. var el = $xeOptgroup.$refs.elem;
  37327. assembleOption($xeSelect, el, optionConfig);
  37328. },
  37329. beforeDestroy: function beforeDestroy() {
  37330. var $xeOptgroup = this;
  37331. var optionConfig = $xeOptgroup.optionConfig;
  37332. var $xeSelect = $xeOptgroup.$xeSelect;
  37333. destroyOption($xeSelect, optionConfig);
  37334. },
  37335. render: function render(h) {
  37336. return this.renderVN(h);
  37337. }
  37338. })); /* define-vxe-component end */
  37339. ;// CONCATENATED MODULE: ./packages/optgroup/index.ts
  37340. var VxeOptgroup = Object.assign(optgroup, {
  37341. install: function install(app) {
  37342. app.component(optgroup.name, optgroup);
  37343. }
  37344. });
  37345. dynamicApp.use(VxeOptgroup);
  37346. index_esm_VxeUI.component(optgroup);
  37347. var Optgroup = VxeOptgroup;
  37348. /* harmony default export */ var packages_optgroup = (VxeOptgroup);
  37349. ;// CONCATENATED MODULE: ./packages/select/src/option.ts
  37350. /* harmony default export */ var src_option = (/* define-vxe-component start */defineVxeComponent({
  37351. name: 'VxeOption',
  37352. mixins: [globalMixins.sizeMixin],
  37353. props: {
  37354. value: [String, Number, Boolean],
  37355. label: {
  37356. type: [String, Number, Boolean],
  37357. default: ''
  37358. },
  37359. visible: {
  37360. type: Boolean,
  37361. default: null
  37362. },
  37363. className: [String, Function],
  37364. disabled: Boolean
  37365. },
  37366. inject: {
  37367. $xeSelect: {
  37368. default: null
  37369. },
  37370. $xeOptgroup: {
  37371. default: null
  37372. }
  37373. },
  37374. data: function data() {
  37375. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  37376. var reactData = {};
  37377. var optionConfig = {};
  37378. return {
  37379. xID: xID,
  37380. reactData: reactData,
  37381. optionConfig: optionConfig
  37382. };
  37383. },
  37384. computed: _objectSpread2({}, {}),
  37385. methods: {
  37386. //
  37387. // Method
  37388. //
  37389. dispatchEvent: function dispatchEvent(type, params, evnt) {
  37390. var $xeOption = this;
  37391. $xeOption.$emit(type, createEvent(evnt, {
  37392. $option: $xeOption
  37393. }, params));
  37394. },
  37395. //
  37396. // Render
  37397. //
  37398. renderVN: function renderVN(h) {
  37399. return h('div', {
  37400. ref: 'elem'
  37401. });
  37402. }
  37403. },
  37404. created: function created() {
  37405. var $xeOption = this;
  37406. var props = $xeOption;
  37407. var $xeSelect = $xeOption.$xeSelect;
  37408. var optionConfig = createOption($xeSelect, props);
  37409. $xeOption.optionConfig = optionConfig;
  37410. watchOption($xeOption, optionConfig);
  37411. },
  37412. mounted: function mounted() {
  37413. var $xeOption = this;
  37414. var slots = $xeOption.$scopedSlots;
  37415. var optionConfig = $xeOption.optionConfig;
  37416. var $xeSelect = $xeOption.$xeSelect;
  37417. var $xeOptgroup = $xeOption.$xeOptgroup;
  37418. optionConfig.slots = slots;
  37419. var el = $xeOption.$refs.elem;
  37420. assembleOption($xeSelect, el, optionConfig, $xeOptgroup);
  37421. },
  37422. beforeDestroy: function beforeDestroy() {
  37423. var $xeOption = this;
  37424. var optionConfig = $xeOption.optionConfig;
  37425. var $xeSelect = $xeOption.$xeSelect;
  37426. destroyOption($xeSelect, optionConfig);
  37427. },
  37428. render: function render(h) {
  37429. return this.renderVN(h);
  37430. }
  37431. })); /* define-vxe-component end */
  37432. ;// CONCATENATED MODULE: ./packages/option/index.ts
  37433. var VxeOption = Object.assign(src_option, {
  37434. install: function install(app) {
  37435. app.component(src_option.name, src_option);
  37436. }
  37437. });
  37438. dynamicApp.use(VxeOption);
  37439. index_esm_VxeUI.component(src_option);
  37440. var Option = VxeOption;
  37441. /* harmony default export */ var packages_option = (VxeOption);
  37442. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
  37443. var es_promise_finally = __webpack_require__(9391);
  37444. ;// CONCATENATED MODULE: ./packages/select/src/select.ts
  37445. function isOptionVisible(option) {
  37446. return option.visible !== false;
  37447. }
  37448. function getOptUniqueId() {
  37449. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('opt_');
  37450. }
  37451. function select_createInternalData() {
  37452. return {
  37453. synchData: [],
  37454. fullData: [],
  37455. afterVisibleList: [],
  37456. optAddMaps: {},
  37457. optGroupKeyMaps: {},
  37458. optFullValMaps: {},
  37459. remoteValMaps: {},
  37460. lastScrollLeft: 0,
  37461. lastScrollTop: 0,
  37462. scrollYStore: {
  37463. startIndex: 0,
  37464. endIndex: 0,
  37465. visibleSize: 0,
  37466. offsetSize: 0,
  37467. rowHeight: 0
  37468. },
  37469. lastScrollTime: 0,
  37470. hpTimeout: undefined
  37471. };
  37472. }
  37473. /* harmony default export */ var src_select = (/* define-vxe-component start */defineVxeComponent({
  37474. name: 'VxeSelect',
  37475. mixins: [globalMixins.sizeMixin],
  37476. model: {
  37477. prop: 'value',
  37478. event: 'modelValue'
  37479. },
  37480. props: {
  37481. value: [String, Number, Boolean, Array],
  37482. defaultConfig: Object,
  37483. clearable: Boolean,
  37484. placeholder: String,
  37485. readonly: {
  37486. type: Boolean,
  37487. default: null
  37488. },
  37489. loading: Boolean,
  37490. disabled: {
  37491. type: Boolean,
  37492. default: null
  37493. },
  37494. multiple: Boolean,
  37495. multiCharOverflow: {
  37496. type: [Number, String],
  37497. default: function _default() {
  37498. return getConfig().select.multiCharOverflow;
  37499. }
  37500. },
  37501. prefixIcon: String,
  37502. allowCreate: {
  37503. type: Boolean,
  37504. default: function _default() {
  37505. return getConfig().select.allowCreate;
  37506. }
  37507. },
  37508. placement: String,
  37509. lazyOptions: Array,
  37510. options: Array,
  37511. optionProps: Object,
  37512. optionGroups: Array,
  37513. optionGroupProps: Object,
  37514. optionConfig: Object,
  37515. className: [String, Function],
  37516. popupClassName: [String, Function],
  37517. max: {
  37518. type: [String, Number],
  37519. default: null
  37520. },
  37521. zIndex: Number,
  37522. size: {
  37523. type: String,
  37524. default: function _default() {
  37525. return getConfig().select.size || getConfig().size;
  37526. }
  37527. },
  37528. filterable: Boolean,
  37529. filterMethod: Function,
  37530. remote: Boolean,
  37531. remoteConfig: Object,
  37532. emptyText: String,
  37533. showTotalButoon: {
  37534. type: Boolean,
  37535. default: function _default() {
  37536. return getConfig().select.showTotalButoon;
  37537. }
  37538. },
  37539. showCheckedButoon: {
  37540. type: Boolean,
  37541. default: function _default() {
  37542. return getConfig().select.showCheckedButoon;
  37543. }
  37544. },
  37545. showClearButton: {
  37546. type: Boolean,
  37547. default: function _default() {
  37548. return getConfig().select.showClearButton;
  37549. }
  37550. },
  37551. transfer: {
  37552. type: Boolean,
  37553. default: null
  37554. },
  37555. virtualYConfig: Object,
  37556. scrollY: Object,
  37557. /**
  37558. * 已废弃,被 remote-config.queryMethod 替换
  37559. * @deprecated
  37560. */
  37561. remoteMethod: Function,
  37562. /**
  37563. * 已废弃,被 option-config.keyField 替换
  37564. * @deprecated
  37565. */
  37566. optionId: {
  37567. type: String,
  37568. default: function _default() {
  37569. return getConfig().select.optionId;
  37570. }
  37571. },
  37572. /**
  37573. * 已废弃,被 option-config.useKey 替换
  37574. * @deprecated
  37575. */
  37576. optionKey: Boolean
  37577. },
  37578. inject: {
  37579. $xeModal: {
  37580. default: null
  37581. },
  37582. $xeDrawer: {
  37583. default: null
  37584. },
  37585. $xeTable: {
  37586. default: null
  37587. },
  37588. $xeForm: {
  37589. default: null
  37590. },
  37591. formItemInfo: {
  37592. from: 'xeFormItemInfo',
  37593. default: null
  37594. }
  37595. },
  37596. provide: function provide() {
  37597. var $xeSelect = this;
  37598. return {
  37599. $xeSelect: $xeSelect
  37600. };
  37601. },
  37602. data: function data() {
  37603. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  37604. var reactData = {
  37605. initialized: false,
  37606. scrollYLoad: false,
  37607. bodyHeight: 0,
  37608. topSpaceHeight: 0,
  37609. optList: [],
  37610. staticOptions: [],
  37611. reactFlag: 1,
  37612. currentOption: null,
  37613. searchValue: '',
  37614. searchLoading: false,
  37615. panelIndex: 0,
  37616. panelStyle: {},
  37617. panelPlacement: null,
  37618. triggerFocusPanel: false,
  37619. visiblePanel: false,
  37620. isAniVisible: false,
  37621. isActivated: false
  37622. };
  37623. var internalData = select_createInternalData();
  37624. return {
  37625. xID: xID,
  37626. reactData: reactData,
  37627. internalData: internalData
  37628. };
  37629. },
  37630. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  37631. computeFormReadonly: function computeFormReadonly() {
  37632. var $xeSelect = this;
  37633. var props = $xeSelect;
  37634. var $xeForm = $xeSelect.$xeForm;
  37635. var readonly = props.readonly;
  37636. if (readonly === null) {
  37637. if ($xeForm) {
  37638. return $xeForm.readonly;
  37639. }
  37640. return false;
  37641. }
  37642. return readonly;
  37643. },
  37644. computeIsDisabled: function computeIsDisabled() {
  37645. var $xeSelect = this;
  37646. var props = $xeSelect;
  37647. var $xeForm = $xeSelect.$xeForm;
  37648. var disabled = props.disabled;
  37649. if (disabled === null) {
  37650. if ($xeForm) {
  37651. return $xeForm.disabled;
  37652. }
  37653. return false;
  37654. }
  37655. return disabled;
  37656. },
  37657. computeBtnTransfer: function computeBtnTransfer() {
  37658. var $xeSelect = this;
  37659. var props = $xeSelect;
  37660. var $xeTable = $xeSelect.$xeTable;
  37661. var $xeModal = $xeSelect.$xeModal;
  37662. var $xeDrawer = $xeSelect.$xeDrawer;
  37663. var $xeForm = $xeSelect.$xeForm;
  37664. var transfer = props.transfer;
  37665. if (transfer === null) {
  37666. var globalTransfer = getConfig().select.transfer;
  37667. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  37668. return globalTransfer;
  37669. }
  37670. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  37671. return true;
  37672. }
  37673. }
  37674. return transfer;
  37675. },
  37676. computeInpPlaceholder: function computeInpPlaceholder() {
  37677. var $xeSelect = this;
  37678. var props = $xeSelect;
  37679. var placeholder = props.placeholder;
  37680. if (placeholder) {
  37681. return getFuncText(placeholder);
  37682. }
  37683. var globalPlaceholder = getConfig().select.placeholder;
  37684. if (globalPlaceholder) {
  37685. return getFuncText(globalPlaceholder);
  37686. }
  37687. return getI18n('vxe.base.pleaseSelect');
  37688. },
  37689. computeDefaultOpts: function computeDefaultOpts() {
  37690. var $xeSelect = this;
  37691. var props = $xeSelect;
  37692. return Object.assign({}, props.defaultConfig);
  37693. },
  37694. computePropsOpts: function computePropsOpts() {
  37695. var $xeSelect = this;
  37696. var props = $xeSelect;
  37697. return Object.assign({}, props.optionProps);
  37698. },
  37699. computeGroupPropsOpts: function computeGroupPropsOpts() {
  37700. var $xeSelect = this;
  37701. var props = $xeSelect;
  37702. return Object.assign({}, props.optionGroupProps);
  37703. },
  37704. computeLabelField: function computeLabelField() {
  37705. var $xeSelect = this;
  37706. var propsOpts = $xeSelect.computePropsOpts;
  37707. return propsOpts.label || 'label';
  37708. },
  37709. computeValueField: function computeValueField() {
  37710. var $xeSelect = this;
  37711. var propsOpts = $xeSelect.computePropsOpts;
  37712. return propsOpts.value || 'value';
  37713. },
  37714. computeGroupLabelField: function computeGroupLabelField() {
  37715. var $xeSelect = this;
  37716. var groupPropsOpts = $xeSelect.computeGroupPropsOpts;
  37717. return groupPropsOpts.label || 'label';
  37718. },
  37719. computeGroupOptionsField: function computeGroupOptionsField() {
  37720. var $xeSelect = this;
  37721. var groupPropsOpts = $xeSelect.computeGroupPropsOpts;
  37722. return groupPropsOpts.options || 'options';
  37723. },
  37724. computeIsMaximize: function computeIsMaximize() {
  37725. var $xeSelect = this;
  37726. var selectVals = $xeSelect.computeSelectVals;
  37727. return $xeSelect.checkMaxLimit(selectVals);
  37728. },
  37729. computeVirtualYOpts: function computeVirtualYOpts() {
  37730. var $xeSelect = this;
  37731. var props = $xeSelect;
  37732. return Object.assign({}, getConfig().select.virtualYConfig || getConfig().select.scrollY, props.virtualYConfig || props.scrollY);
  37733. },
  37734. computeRemoteOpts: function computeRemoteOpts() {
  37735. var $xeSelect = this;
  37736. var props = $xeSelect;
  37737. return Object.assign({}, getConfig().select.remoteConfig, props.remoteConfig);
  37738. },
  37739. computeOptionOpts: function computeOptionOpts() {
  37740. var $xeSelect = this;
  37741. var props = $xeSelect;
  37742. return Object.assign({}, getConfig().select.optionConfig, props.optionConfig);
  37743. },
  37744. computeIsGroup: function computeIsGroup() {
  37745. var $xeSelect = this;
  37746. var reactData = $xeSelect.reactData;
  37747. return reactData.fullGroupList.some(function (item) {
  37748. return item.options && item.options.length;
  37749. });
  37750. },
  37751. computeMultiMaxCharNum: function computeMultiMaxCharNum() {
  37752. var $xeSelect = this;
  37753. var props = $xeSelect;
  37754. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.multiCharOverflow);
  37755. },
  37756. computeSelectVals: function computeSelectVals() {
  37757. var $xeSelect = this;
  37758. var props = $xeSelect;
  37759. var modelValue = props.value,
  37760. multiple = props.multiple;
  37761. var vals = [];
  37762. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue)) {
  37763. vals = modelValue;
  37764. } else {
  37765. if (multiple) {
  37766. if (!eqEmptyValue(modelValue)) {
  37767. vals = "".concat(modelValue).indexOf(',') > -1 ? "".concat(modelValue).split(',') : [modelValue];
  37768. }
  37769. } else {
  37770. vals = modelValue === null || modelValue === undefined ? [] : [modelValue];
  37771. }
  37772. }
  37773. return vals;
  37774. },
  37775. computeFullLabel: function computeFullLabel() {
  37776. var $xeSelect = this;
  37777. var props = $xeSelect;
  37778. var reactData = $xeSelect.reactData;
  37779. var remote = props.remote;
  37780. var reactFlag = reactData.reactFlag;
  37781. var selectVals = $xeSelect.computeSelectVals;
  37782. if (remote && reactFlag) {
  37783. return selectVals.map(function (val) {
  37784. return $xeSelect.getRemoteSelectLabel(val);
  37785. }).join(', ');
  37786. }
  37787. return selectVals.map(function (val) {
  37788. return $xeSelect.getSelectLabel(val);
  37789. }).join(', ');
  37790. },
  37791. computeSelectLabel: function computeSelectLabel() {
  37792. var $xeSelect = this;
  37793. var props = $xeSelect;
  37794. var reactData = $xeSelect.reactData;
  37795. var remote = props.remote,
  37796. multiple = props.multiple;
  37797. var reactFlag = reactData.reactFlag;
  37798. var multiMaxCharNum = $xeSelect.computeMultiMaxCharNum;
  37799. var selectVals = $xeSelect.computeSelectVals;
  37800. if (remote && reactFlag) {
  37801. return selectVals.map(function (val) {
  37802. return $xeSelect.getRemoteSelectLabel(val);
  37803. }).join(', ');
  37804. }
  37805. var labels = selectVals.map(function (val) {
  37806. return $xeSelect.getSelectLabel(val);
  37807. });
  37808. if (multiple && multiMaxCharNum > 0 && labels.length > multiMaxCharNum) {
  37809. return "".concat(labels.slice(0, multiMaxCharNum), "...");
  37810. }
  37811. return labels.join(', ');
  37812. }
  37813. }),
  37814. methods: {
  37815. //
  37816. // Method
  37817. //
  37818. dispatchEvent: function dispatchEvent(type, params, evnt) {
  37819. var $xeSelect = this;
  37820. $xeSelect.$emit(type, createEvent(evnt, {
  37821. $select: $xeSelect
  37822. }, params));
  37823. },
  37824. emitModel: function emitModel(value) {
  37825. var $xeSelect = this;
  37826. var _events = $xeSelect._events;
  37827. if (_events && _events.modelValue) {
  37828. $xeSelect.$emit('modelValue', value);
  37829. } else {
  37830. $xeSelect.$emit('model-value', value);
  37831. }
  37832. },
  37833. isPanelVisible: function isPanelVisible() {
  37834. var $xeSelect = this;
  37835. var reactData = $xeSelect.reactData;
  37836. return reactData.visiblePanel;
  37837. },
  37838. togglePanel: function togglePanel() {
  37839. var $xeSelect = this;
  37840. var reactData = $xeSelect.reactData;
  37841. if (reactData.visiblePanel) {
  37842. $xeSelect.hideOptionPanel();
  37843. } else {
  37844. $xeSelect.showOptionPanel();
  37845. }
  37846. return $xeSelect.$nextTick();
  37847. },
  37848. hidePanel: function hidePanel() {
  37849. var $xeSelect = this;
  37850. var reactData = $xeSelect.reactData;
  37851. if (reactData.visiblePanel) {
  37852. $xeSelect.hideOptionPanel();
  37853. }
  37854. return $xeSelect.$nextTick();
  37855. },
  37856. showPanel: function showPanel() {
  37857. var $xeSelect = this;
  37858. var reactData = $xeSelect.reactData;
  37859. if (!reactData.visiblePanel) {
  37860. $xeSelect.showOptionPanel();
  37861. }
  37862. return $xeSelect.$nextTick();
  37863. },
  37864. focus: function focus() {
  37865. var $xeSelect = this;
  37866. var reactData = $xeSelect.reactData;
  37867. var $input = $xeSelect.$refs.refInput;
  37868. if ($input) {
  37869. $input.blur();
  37870. }
  37871. reactData.isActivated = true;
  37872. return $xeSelect.$nextTick();
  37873. },
  37874. blur: function blur() {
  37875. var $xeSelect = this;
  37876. var reactData = $xeSelect.reactData;
  37877. var $input = $xeSelect.$refs.refInput;
  37878. if ($input) {
  37879. $input.blur();
  37880. }
  37881. reactData.isActivated = false;
  37882. return $xeSelect.$nextTick();
  37883. },
  37884. callSlot: function callSlot(slotFunc, params, h) {
  37885. var $xeSelect = this;
  37886. var slots = $xeSelect.$scopedSlots;
  37887. if (slotFunc) {
  37888. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  37889. slotFunc = slots[slotFunc] || null;
  37890. }
  37891. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  37892. return vn_getSlotVNs(slotFunc.call($xeSelect, params, h));
  37893. }
  37894. }
  37895. return [];
  37896. },
  37897. getOptKey: function getOptKey() {
  37898. var $xeSelect = this;
  37899. var props = $xeSelect;
  37900. var optionOpts = $xeSelect.computeOptionOpts;
  37901. return optionOpts.keyField || props.optionId || '_X_OPTION_KEY';
  37902. },
  37903. getOptId: function getOptId(option) {
  37904. var $xeSelect = this;
  37905. var optid = option[$xeSelect.getOptKey()];
  37906. return optid ? encodeURIComponent(optid) : '';
  37907. },
  37908. checkMaxLimit: function checkMaxLimit(selectVals) {
  37909. var $xeSelect = this;
  37910. var props = $xeSelect;
  37911. var multiple = props.multiple,
  37912. max = props.max;
  37913. if (multiple && max) {
  37914. return selectVals.length >= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(max);
  37915. }
  37916. return false;
  37917. },
  37918. getRemoteSelectLabel: function getRemoteSelectLabel(value) {
  37919. var $xeSelect = this;
  37920. var props = $xeSelect;
  37921. var internalData = $xeSelect.internalData;
  37922. var lazyOptions = props.lazyOptions;
  37923. var remoteValMaps = internalData.remoteValMaps,
  37924. optFullValMaps = internalData.optFullValMaps;
  37925. var valueField = $xeSelect.computeValueField;
  37926. var labelField = $xeSelect.computeLabelField;
  37927. var remoteItem = remoteValMaps[value] || optFullValMaps[value];
  37928. var item = remoteItem ? remoteItem.item : null;
  37929. if (item) {
  37930. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(item[labelField]);
  37931. }
  37932. if (lazyOptions) {
  37933. var lazyItem = lazyOptions.find(function (item) {
  37934. return item[valueField] === value;
  37935. });
  37936. if (lazyItem) {
  37937. return lazyItem[labelField];
  37938. }
  37939. }
  37940. return value;
  37941. },
  37942. getSelectLabel: function getSelectLabel(value) {
  37943. var $xeSelect = this;
  37944. var props = $xeSelect;
  37945. var reactData = $xeSelect.reactData;
  37946. var internalData = $xeSelect.internalData;
  37947. var lazyOptions = props.lazyOptions;
  37948. var optFullValMaps = internalData.optFullValMaps;
  37949. var valueField = $xeSelect.computeValueField;
  37950. var labelField = $xeSelect.computeLabelField;
  37951. var cacheItem = reactData.reactFlag ? optFullValMaps[value] : null;
  37952. if (cacheItem) {
  37953. return cacheItem.item[labelField];
  37954. }
  37955. if (lazyOptions) {
  37956. var lazyItem = lazyOptions.find(function (item) {
  37957. return item[valueField] === value;
  37958. });
  37959. if (lazyItem) {
  37960. return lazyItem[labelField];
  37961. }
  37962. }
  37963. return value;
  37964. },
  37965. getOptkey: function getOptkey() {
  37966. var $xeSelect = this;
  37967. var props = $xeSelect;
  37968. var optionOpts = $xeSelect.computeOptionOpts;
  37969. return optionOpts.keyField || props.optionId || '_X_OPTION_KEY';
  37970. },
  37971. getOptid: function getOptid(option) {
  37972. var $xeSelect = this;
  37973. var optid = option[$xeSelect.getOptkey()];
  37974. return optid ? encodeURIComponent(optid) : '';
  37975. },
  37976. /**
  37977. * 处理选项,当选项被动态显示/隐藏时可能会用到
  37978. */
  37979. handleOption: function handleOption() {
  37980. var $xeSelect = this;
  37981. var props = $xeSelect;
  37982. var reactData = $xeSelect.reactData;
  37983. var internalData = $xeSelect.internalData;
  37984. var value = props.value,
  37985. filterable = props.filterable,
  37986. filterMethod = props.filterMethod;
  37987. var searchValue = reactData.searchValue;
  37988. var fullData = internalData.fullData,
  37989. optFullValMaps = internalData.optFullValMaps;
  37990. var labelField = $xeSelect.computeLabelField;
  37991. var valueField = $xeSelect.computeValueField;
  37992. var searchStr = "".concat(searchValue || '').toLowerCase();
  37993. var avList = [];
  37994. if (filterable && filterMethod) {
  37995. avList = fullData.filter(function (option) {
  37996. return isOptionVisible(option) && filterMethod({
  37997. $select: $xeSelect,
  37998. group: null,
  37999. option: option,
  38000. searchValue: searchValue,
  38001. value: value
  38002. });
  38003. });
  38004. } else if (filterable) {
  38005. avList = fullData.filter(function (option) {
  38006. return isOptionVisible(option) && (!searchStr || "".concat(option[labelField] || option[valueField]).toLowerCase().indexOf(searchStr) > -1);
  38007. });
  38008. } else {
  38009. avList = fullData.filter(isOptionVisible);
  38010. }
  38011. avList.forEach(function (item, index) {
  38012. var cacheItem = optFullValMaps[item[valueField]];
  38013. if (cacheItem) {
  38014. cacheItem._index = index;
  38015. }
  38016. });
  38017. internalData.afterVisibleList = avList;
  38018. return $xeSelect.$nextTick();
  38019. },
  38020. refreshOption: function refreshOption() {
  38021. var $xeSelect = this;
  38022. $xeSelect.handleOption();
  38023. $xeSelect.updateYData();
  38024. return $xeSelect.$nextTick();
  38025. },
  38026. cacheItemMap: function cacheItemMap(datas) {
  38027. var $xeSelect = this;
  38028. var reactData = $xeSelect.reactData;
  38029. var internalData = $xeSelect.internalData;
  38030. var groupOptionsField = $xeSelect.computeGroupOptionsField;
  38031. var valueField = $xeSelect.computeValueField;
  38032. var key = $xeSelect.getOptKey();
  38033. var groupKeyMaps = {};
  38034. var fullKeyMaps = {};
  38035. var list = [];
  38036. var handleOptItem = function handleOptItem(item) {
  38037. list.push(item);
  38038. var optid = $xeSelect.getOptId(item);
  38039. if (!optid) {
  38040. optid = getOptUniqueId();
  38041. item[key] = optid;
  38042. }
  38043. fullKeyMaps[item[valueField]] = {
  38044. key: optid,
  38045. item: item,
  38046. _index: -1
  38047. };
  38048. };
  38049. datas.forEach(function (group) {
  38050. handleOptItem(group);
  38051. if (group[groupOptionsField]) {
  38052. groupKeyMaps[group[key]] = group;
  38053. group[groupOptionsField].forEach(handleOptItem);
  38054. }
  38055. });
  38056. internalData.fullData = list;
  38057. internalData.optGroupKeyMaps = groupKeyMaps;
  38058. internalData.optFullValMaps = fullKeyMaps;
  38059. reactData.reactFlag++;
  38060. $xeSelect.handleOption();
  38061. },
  38062. setCurrentOption: function setCurrentOption(option) {
  38063. var $xeSelect = this;
  38064. var reactData = $xeSelect.reactData;
  38065. if (option) {
  38066. reactData.currentOption = option;
  38067. }
  38068. },
  38069. scrollToOption: function scrollToOption(option, isAlignBottom) {
  38070. var $xeSelect = this;
  38071. return $xeSelect.$nextTick().then(function () {
  38072. if (option) {
  38073. var optWrapperElem = $xeSelect.$refs.refOptionWrapper;
  38074. var panelElem = $xeSelect.$refs.refOptionPanel;
  38075. var optElem = panelElem.querySelector("[optid='".concat($xeSelect.getOptid(option), "']"));
  38076. if (optWrapperElem && optElem) {
  38077. var wrapperHeight = optWrapperElem.offsetHeight;
  38078. var offsetPadding = 5;
  38079. if (isAlignBottom) {
  38080. if (optElem.offsetTop + optElem.offsetHeight - optWrapperElem.scrollTop > wrapperHeight) {
  38081. optWrapperElem.scrollTop = optElem.offsetTop + optElem.offsetHeight - wrapperHeight;
  38082. }
  38083. } else {
  38084. if (optElem.offsetTop + offsetPadding < optWrapperElem.scrollTop || optElem.offsetTop + offsetPadding > optWrapperElem.scrollTop + optWrapperElem.clientHeight) {
  38085. optWrapperElem.scrollTop = optElem.offsetTop - offsetPadding;
  38086. }
  38087. }
  38088. }
  38089. }
  38090. });
  38091. },
  38092. updateZindex: function updateZindex() {
  38093. var $xeSelect = this;
  38094. var props = $xeSelect;
  38095. var reactData = $xeSelect.reactData;
  38096. var zIndex = props.zIndex;
  38097. if (zIndex) {
  38098. reactData.panelIndex = zIndex;
  38099. } else if (reactData.panelIndex < getLastZIndex()) {
  38100. reactData.panelIndex = nextZIndex();
  38101. }
  38102. },
  38103. updateZIndex: function updateZIndex() {
  38104. var $xeSelect = this;
  38105. var reactData = $xeSelect.reactData;
  38106. if (reactData.panelIndex < getLastZIndex()) {
  38107. reactData.panelIndex = nextZIndex();
  38108. }
  38109. },
  38110. updatePlacement: function updatePlacement() {
  38111. var $xeSelect = this;
  38112. var props = $xeSelect;
  38113. var reactData = $xeSelect.reactData;
  38114. var placement = props.placement;
  38115. var panelIndex = reactData.panelIndex;
  38116. var targetElem = $xeSelect.$refs.refElem;
  38117. var panelElem = $xeSelect.$refs.refOptionPanel;
  38118. var btnTransfer = $xeSelect.computeBtnTransfer;
  38119. var handleStyle = function handleStyle() {
  38120. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  38121. placement: placement,
  38122. teleportTo: btnTransfer
  38123. });
  38124. var panelStyle = Object.assign(ppObj.style, {
  38125. zIndex: panelIndex
  38126. });
  38127. reactData.panelStyle = panelStyle;
  38128. reactData.panelPlacement = ppObj.placement;
  38129. };
  38130. handleStyle();
  38131. return $xeSelect.$nextTick().then(handleStyle);
  38132. },
  38133. handleScrollSelect: function handleScrollSelect() {
  38134. var $xeSelect = this;
  38135. var reactData = $xeSelect.reactData;
  38136. var internalData = $xeSelect.internalData;
  38137. $xeSelect.$nextTick(function () {
  38138. var isAniVisible = reactData.isAniVisible,
  38139. visiblePanel = reactData.visiblePanel;
  38140. var optFullValMaps = internalData.optFullValMaps;
  38141. var selectVals = $xeSelect.computeSelectVals;
  38142. if (selectVals.length && isAniVisible && visiblePanel) {
  38143. var cacheItem = reactData.reactFlag ? optFullValMaps["".concat(selectVals[0])] : null;
  38144. if (cacheItem) {
  38145. $xeSelect.handleScrollToOption(cacheItem.item);
  38146. }
  38147. }
  38148. });
  38149. },
  38150. showOptionPanel: function showOptionPanel() {
  38151. var $xeSelect = this;
  38152. var props = $xeSelect;
  38153. var reactData = $xeSelect.reactData;
  38154. var internalData = $xeSelect.internalData;
  38155. var loading = props.loading,
  38156. filterable = props.filterable,
  38157. remote = props.remote;
  38158. var fullData = internalData.fullData,
  38159. hpTimeout = internalData.hpTimeout;
  38160. var isDisabled = $xeSelect.computeIsDisabled;
  38161. var remoteOpts = $xeSelect.computeRemoteOpts;
  38162. if (!loading && !isDisabled) {
  38163. if (hpTimeout) {
  38164. clearTimeout(hpTimeout);
  38165. internalData.hpTimeout = undefined;
  38166. }
  38167. if (!reactData.initialized) {
  38168. reactData.initialized = true;
  38169. var btnTransfer = $xeSelect.computeBtnTransfer;
  38170. var panelElem = $xeSelect.$refs.refOptionPanel;
  38171. if (btnTransfer) {
  38172. if (panelElem) {
  38173. document.body.appendChild(panelElem);
  38174. }
  38175. }
  38176. }
  38177. reactData.isActivated = true;
  38178. reactData.isAniVisible = true;
  38179. if (filterable) {
  38180. if (remote && remoteOpts.enabled && remoteOpts.autoLoad && !fullData.length) {
  38181. $xeSelect.handleSearchEvent();
  38182. } else {
  38183. $xeSelect.handleOption();
  38184. $xeSelect.updateYData();
  38185. }
  38186. }
  38187. setTimeout(function () {
  38188. reactData.visiblePanel = true;
  38189. $xeSelect.handleFocusSearch();
  38190. $xeSelect.recalculate().then(function () {
  38191. $xeSelect.handleScrollSelect();
  38192. $xeSelect.refreshScroll();
  38193. });
  38194. }, 10);
  38195. setTimeout(function () {
  38196. $xeSelect.recalculate().then(function () {
  38197. return $xeSelect.refreshScroll();
  38198. });
  38199. }, 100);
  38200. $xeSelect.updateZIndex();
  38201. $xeSelect.updatePlacement();
  38202. $xeSelect.dispatchEvent('visible-change', {
  38203. visible: true
  38204. }, null);
  38205. }
  38206. },
  38207. hideOptionPanel: function hideOptionPanel() {
  38208. var $xeSelect = this;
  38209. var reactData = $xeSelect.reactData;
  38210. var internalData = $xeSelect.internalData;
  38211. reactData.searchValue = '';
  38212. reactData.searchLoading = false;
  38213. reactData.visiblePanel = false;
  38214. internalData.hpTimeout = setTimeout(function () {
  38215. reactData.isAniVisible = false;
  38216. }, 350);
  38217. $xeSelect.dispatchEvent('visible-change', {
  38218. visible: false
  38219. }, null);
  38220. },
  38221. changeEvent: function changeEvent(evnt, selectValue, option) {
  38222. var $xeSelect = this;
  38223. var props = $xeSelect;
  38224. var $xeForm = $xeSelect.$xeForm;
  38225. var formItemInfo = $xeSelect.formItemInfo;
  38226. $xeSelect.emitModel(selectValue);
  38227. if (selectValue !== props.value) {
  38228. $xeSelect.dispatchEvent('change', {
  38229. value: selectValue,
  38230. option: option
  38231. }, evnt);
  38232. // 自动更新校验状态
  38233. if ($xeForm && formItemInfo) {
  38234. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
  38235. }
  38236. }
  38237. },
  38238. clearValueEvent: function clearValueEvent(evnt, selectValue) {
  38239. var $xeSelect = this;
  38240. var internalData = $xeSelect.internalData;
  38241. internalData.remoteValMaps = {};
  38242. $xeSelect.changeEvent(evnt, selectValue, null);
  38243. $xeSelect.dispatchEvent('clear', {
  38244. value: selectValue
  38245. }, evnt);
  38246. },
  38247. clearEvent: function clearEvent(params) {
  38248. var $xeSelect = this;
  38249. var $event = params.$event;
  38250. $xeSelect.clearValueEvent($event, null);
  38251. $xeSelect.hideOptionPanel();
  38252. },
  38253. allCheckedPanelEvent: function allCheckedPanelEvent(params) {
  38254. var $xeSelect = this;
  38255. var props = $xeSelect;
  38256. var reactData = $xeSelect.reactData;
  38257. var $event = params.$event;
  38258. var multiple = props.multiple;
  38259. var optList = reactData.optList;
  38260. var valueField = $xeSelect.computeValueField;
  38261. if (multiple) {
  38262. var selectVals = $xeSelect.computeSelectVals;
  38263. var currVlas = selectVals.slice(0);
  38264. var _loop = function _loop() {
  38265. var option = optList[i];
  38266. var selectValue = option[valueField];
  38267. // 检测是否超过最大可选数量
  38268. if ($xeSelect.checkMaxLimit(currVlas)) {
  38269. return 1; // break
  38270. }
  38271. if (!currVlas.some(function (val) {
  38272. return val === selectValue;
  38273. })) {
  38274. currVlas.push(selectValue);
  38275. }
  38276. };
  38277. for (var i = 0; i < optList.length; i++) {
  38278. if (_loop()) break;
  38279. }
  38280. $xeSelect.changeEvent($event, currVlas, optList[0]);
  38281. $xeSelect.dispatchEvent('all-change', {
  38282. value: currVlas
  38283. }, $event);
  38284. }
  38285. },
  38286. clearCheckedPanelEvent: function clearCheckedPanelEvent(params) {
  38287. var $xeSelect = this;
  38288. var $event = params.$event;
  38289. $xeSelect.clearValueEvent($event, null);
  38290. $xeSelect.hideOptionPanel();
  38291. },
  38292. changeOptionEvent: function changeOptionEvent(evnt, option) {
  38293. var $xeSelect = this;
  38294. var props = $xeSelect;
  38295. var reactData = $xeSelect.reactData;
  38296. var internalData = $xeSelect.internalData;
  38297. var multiple = props.multiple;
  38298. var remoteValMaps = internalData.remoteValMaps;
  38299. var valueField = $xeSelect.computeValueField;
  38300. var selectValue = option[valueField];
  38301. var remoteItem = remoteValMaps[selectValue];
  38302. if (!reactData.visiblePanel) {
  38303. return;
  38304. }
  38305. if (remoteItem) {
  38306. remoteItem.item = option;
  38307. } else {
  38308. remoteValMaps[selectValue] = {
  38309. key: $xeSelect.getOptId(option),
  38310. item: option,
  38311. _index: -1
  38312. };
  38313. }
  38314. if (multiple) {
  38315. var multipleValue = [];
  38316. var selectVals = $xeSelect.computeSelectVals;
  38317. var index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(selectVals, function (val) {
  38318. return val === selectValue;
  38319. });
  38320. if (index === -1) {
  38321. multipleValue = selectVals.concat([selectValue]);
  38322. } else {
  38323. multipleValue = selectVals.filter(function (val) {
  38324. return val !== selectValue;
  38325. });
  38326. }
  38327. $xeSelect.changeEvent(evnt, multipleValue, option);
  38328. } else {
  38329. $xeSelect.changeEvent(evnt, selectValue, option);
  38330. $xeSelect.hideOptionPanel();
  38331. }
  38332. reactData.reactFlag++;
  38333. },
  38334. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  38335. var $xeSelect = this;
  38336. var reactData = $xeSelect.reactData;
  38337. var visiblePanel = reactData.visiblePanel;
  38338. var isDisabled = $xeSelect.computeIsDisabled;
  38339. if (!isDisabled) {
  38340. if (visiblePanel) {
  38341. var panelElem = $xeSelect.$refs.refOptionPanel;
  38342. if (getEventTargetNode(evnt, panelElem).flag) {
  38343. $xeSelect.updatePlacement();
  38344. } else {
  38345. $xeSelect.hideOptionPanel();
  38346. }
  38347. }
  38348. }
  38349. },
  38350. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  38351. var $xeSelect = this;
  38352. var reactData = $xeSelect.reactData;
  38353. var visiblePanel = reactData.visiblePanel;
  38354. var isDisabled = $xeSelect.computeIsDisabled;
  38355. if (!isDisabled) {
  38356. var el = $xeSelect.$refs.refElem;
  38357. var panelElem = $xeSelect.$refs.refOptionPanel;
  38358. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  38359. if (visiblePanel && !reactData.isActivated) {
  38360. $xeSelect.hideOptionPanel();
  38361. }
  38362. }
  38363. },
  38364. validOffsetOption: function validOffsetOption(option) {
  38365. var $xeSelect = this;
  38366. var isDisabled = option.disabled;
  38367. var optid = $xeSelect.getOptId(option);
  38368. if (!isDisabled && !$xeSelect.hasOptGroupById(optid)) {
  38369. return true;
  38370. }
  38371. return false;
  38372. },
  38373. findOffsetOption: function findOffsetOption(option, isDwArrow) {
  38374. var $xeSelect = this;
  38375. var props = $xeSelect;
  38376. var reactData = $xeSelect.reactData;
  38377. var internalData = $xeSelect.internalData;
  38378. var allowCreate = props.allowCreate;
  38379. var optList = reactData.optList;
  38380. var optFullValMaps = internalData.optFullValMaps,
  38381. optAddMaps = internalData.optAddMaps,
  38382. afterVisibleList = internalData.afterVisibleList;
  38383. var valueField = $xeSelect.computeValueField;
  38384. var fullList = afterVisibleList;
  38385. var offsetAddIndex = 0;
  38386. if (allowCreate && optList.length) {
  38387. var firstItem = optList[0];
  38388. var optid = $xeSelect.getOptId(firstItem);
  38389. if (optAddMaps[optid]) {
  38390. offsetAddIndex = 1;
  38391. fullList = [optAddMaps[optid]].concat(fullList);
  38392. }
  38393. }
  38394. if (!option) {
  38395. if (isDwArrow) {
  38396. for (var i = 0; i < fullList.length; i++) {
  38397. var item = fullList[i];
  38398. if ($xeSelect.validOffsetOption(item)) {
  38399. return item;
  38400. }
  38401. }
  38402. } else {
  38403. for (var len = fullList.length - 1; len >= 0; len--) {
  38404. var _item = fullList[len];
  38405. if ($xeSelect.validOffsetOption(_item)) {
  38406. return _item;
  38407. }
  38408. }
  38409. }
  38410. }
  38411. var avIndex = 0;
  38412. var cacheItem = option ? optFullValMaps[option[valueField]] : null;
  38413. if (cacheItem) {
  38414. avIndex = cacheItem._index + offsetAddIndex;
  38415. }
  38416. if (avIndex > -1) {
  38417. if (isDwArrow) {
  38418. for (var _i = avIndex + 1; _i <= fullList.length - 1; _i++) {
  38419. var _item2 = fullList[_i];
  38420. if ($xeSelect.validOffsetOption(_item2)) {
  38421. return _item2;
  38422. }
  38423. }
  38424. } else {
  38425. if (avIndex > 0) {
  38426. for (var _len = avIndex - 1; _len >= 0; _len--) {
  38427. var _item3 = fullList[_len];
  38428. if ($xeSelect.validOffsetOption(_item3)) {
  38429. return _item3;
  38430. }
  38431. }
  38432. }
  38433. }
  38434. }
  38435. return null;
  38436. },
  38437. handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
  38438. var $xeSelect = this;
  38439. var props = $xeSelect;
  38440. var reactData = $xeSelect.reactData;
  38441. var clearable = props.clearable;
  38442. var visiblePanel = reactData.visiblePanel,
  38443. currentOption = reactData.currentOption;
  38444. var isDisabled = $xeSelect.computeIsDisabled;
  38445. if (!isDisabled) {
  38446. var isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
  38447. var isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
  38448. var isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
  38449. var isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
  38450. var isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
  38451. var isDel = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
  38452. if (isTab) {
  38453. reactData.isActivated = false;
  38454. }
  38455. if (visiblePanel) {
  38456. if (isEsc || isTab) {
  38457. $xeSelect.hideOptionPanel();
  38458. } else if (isEnter) {
  38459. if (currentOption) {
  38460. evnt.preventDefault();
  38461. evnt.stopPropagation();
  38462. $xeSelect.changeOptionEvent(evnt, currentOption);
  38463. }
  38464. } else if (isUpArrow || isDwArrow) {
  38465. evnt.preventDefault();
  38466. var offsetOption = $xeSelect.findOffsetOption(currentOption, isDwArrow);
  38467. // 如果不匹配,默认最接近一个
  38468. if (!offsetOption) {
  38469. offsetOption = $xeSelect.findOffsetOption(null, isDwArrow);
  38470. }
  38471. if (offsetOption) {
  38472. $xeSelect.setCurrentOption(offsetOption);
  38473. $xeSelect.handleScrollToOption(offsetOption, isDwArrow);
  38474. }
  38475. }
  38476. } else if ((isUpArrow || isDwArrow || isEnter) && reactData.isActivated) {
  38477. evnt.preventDefault();
  38478. $xeSelect.showOptionPanel();
  38479. }
  38480. if (reactData.isActivated) {
  38481. if (isDel && clearable) {
  38482. $xeSelect.clearValueEvent(evnt, null);
  38483. }
  38484. }
  38485. }
  38486. },
  38487. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  38488. var $xeSelect = this;
  38489. var reactData = $xeSelect.reactData;
  38490. var visiblePanel = reactData.visiblePanel,
  38491. isActivated = reactData.isActivated;
  38492. if (visiblePanel) {
  38493. $xeSelect.hideOptionPanel();
  38494. }
  38495. if (isActivated) {
  38496. reactData.isActivated = false;
  38497. }
  38498. if (visiblePanel || isActivated) {
  38499. var $input = $xeSelect.$refs.refInput;
  38500. if ($input) {
  38501. $input.blur();
  38502. }
  38503. }
  38504. },
  38505. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  38506. var $xeSelect = this;
  38507. var reactData = $xeSelect.reactData;
  38508. var visiblePanel = reactData.visiblePanel;
  38509. if (visiblePanel) {
  38510. $xeSelect.updatePlacement();
  38511. }
  38512. },
  38513. handleFocusSearch: function handleFocusSearch() {
  38514. var $xeSelect = this;
  38515. var props = $xeSelect;
  38516. if (props.filterable) {
  38517. $xeSelect.$nextTick(function () {
  38518. var inpSearch = $xeSelect.$refs.refInpSearch;
  38519. if (inpSearch) {
  38520. inpSearch.focus();
  38521. }
  38522. });
  38523. }
  38524. },
  38525. focusEvent: function focusEvent(evnt) {
  38526. var $xeSelect = this;
  38527. var reactData = $xeSelect.reactData;
  38528. var isDisabled = $xeSelect.computeIsDisabled;
  38529. if (!isDisabled) {
  38530. if (!reactData.visiblePanel) {
  38531. reactData.triggerFocusPanel = true;
  38532. $xeSelect.showOptionPanel();
  38533. setTimeout(function () {
  38534. reactData.triggerFocusPanel = false;
  38535. }, 500);
  38536. }
  38537. }
  38538. $xeSelect.dispatchEvent('focus', {}, evnt);
  38539. },
  38540. clickEvent: function clickEvent(evnt) {
  38541. var $xeSelect = this;
  38542. var reactData = $xeSelect.reactData;
  38543. $xeSelect.togglePanelEvent(evnt);
  38544. $xeSelect.dispatchEvent('click', {
  38545. triggerButton: false,
  38546. visible: reactData.visiblePanel
  38547. }, evnt);
  38548. },
  38549. blurEvent: function blurEvent(evnt) {
  38550. var $xeSelect = this;
  38551. var reactData = $xeSelect.reactData;
  38552. reactData.isActivated = false;
  38553. $xeSelect.dispatchEvent('blur', {}, evnt);
  38554. },
  38555. suffixClickEvent: function suffixClickEvent(evnt) {
  38556. var $xeSelect = this;
  38557. var reactData = $xeSelect.reactData;
  38558. $xeSelect.togglePanelEvent(evnt);
  38559. $xeSelect.dispatchEvent('click', {
  38560. triggerButton: true,
  38561. visible: reactData.visiblePanel
  38562. }, evnt);
  38563. },
  38564. modelSearchEvent: function modelSearchEvent(value) {
  38565. var $xeSelect = this;
  38566. var reactData = $xeSelect.reactData;
  38567. reactData.searchValue = value;
  38568. },
  38569. focusSearchEvent: function focusSearchEvent() {
  38570. var $xeSelect = this;
  38571. var reactData = $xeSelect.reactData;
  38572. reactData.isActivated = true;
  38573. },
  38574. handleSearchEvent: function handleSearchEvent() {
  38575. var $xeSelect = this;
  38576. var props = $xeSelect;
  38577. var reactData = $xeSelect.reactData;
  38578. var value = props.value,
  38579. remote = props.remote,
  38580. remoteMethod = props.remoteMethod;
  38581. var searchValue = reactData.searchValue;
  38582. var remoteOpts = $xeSelect.computeRemoteOpts;
  38583. var queryMethod = remoteOpts.queryMethod || remoteMethod;
  38584. if (remote && queryMethod && remoteOpts.enabled) {
  38585. reactData.searchLoading = true;
  38586. Promise.resolve(queryMethod({
  38587. $select: $xeSelect,
  38588. searchValue: searchValue,
  38589. value: value
  38590. })).then(function () {
  38591. return $xeSelect.$nextTick();
  38592. }).catch(function () {
  38593. return $xeSelect.$nextTick();
  38594. }).finally(function () {
  38595. reactData.searchLoading = false;
  38596. $xeSelect.handleOption();
  38597. $xeSelect.updateYData();
  38598. });
  38599. } else {
  38600. $xeSelect.handleOption();
  38601. $xeSelect.updateYData();
  38602. }
  38603. },
  38604. triggerSearchEvent: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(function () {
  38605. var $xeSelect = this;
  38606. $xeSelect.handleSearchEvent();
  38607. }, 350, {
  38608. trailing: true
  38609. }),
  38610. togglePanelEvent: function togglePanelEvent(params) {
  38611. var $xeSelect = this;
  38612. var reactData = $xeSelect.reactData;
  38613. var $event = params.$event;
  38614. $event.preventDefault();
  38615. if (reactData.triggerFocusPanel) {
  38616. reactData.triggerFocusPanel = false;
  38617. } else {
  38618. if (reactData.visiblePanel) {
  38619. $xeSelect.hideOptionPanel();
  38620. } else {
  38621. $xeSelect.showOptionPanel();
  38622. }
  38623. }
  38624. },
  38625. checkOptionDisabled: function checkOptionDisabled(isSelected, option) {
  38626. var $xeSelect = this;
  38627. if (option.disabled) {
  38628. return true;
  38629. }
  38630. var isMaximize = $xeSelect.computeIsMaximize;
  38631. if (isMaximize && !isSelected) {
  38632. return true;
  38633. }
  38634. return false;
  38635. },
  38636. updateYSpace: function updateYSpace() {
  38637. var $xeSelect = this;
  38638. var reactData = $xeSelect.reactData;
  38639. var internalData = $xeSelect.internalData;
  38640. var scrollYLoad = reactData.scrollYLoad;
  38641. var scrollYStore = internalData.scrollYStore,
  38642. afterVisibleList = internalData.afterVisibleList;
  38643. reactData.bodyHeight = scrollYLoad ? afterVisibleList.length * scrollYStore.rowHeight : 0;
  38644. reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
  38645. },
  38646. handleData: function handleData() {
  38647. var $xeSelect = this;
  38648. var props = $xeSelect;
  38649. var reactData = $xeSelect.reactData;
  38650. var internalData = $xeSelect.internalData;
  38651. var filterable = props.filterable,
  38652. allowCreate = props.allowCreate;
  38653. var scrollYLoad = reactData.scrollYLoad,
  38654. searchValue = reactData.searchValue;
  38655. var optAddMaps = internalData.optAddMaps,
  38656. scrollYStore = internalData.scrollYStore,
  38657. afterVisibleList = internalData.afterVisibleList;
  38658. var labelField = $xeSelect.computeLabelField;
  38659. var valueField = $xeSelect.computeValueField;
  38660. var restList = scrollYLoad ? afterVisibleList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : afterVisibleList.slice(0);
  38661. if (filterable && allowCreate && searchValue) {
  38662. if (!restList.some(function (option) {
  38663. return option[labelField] === searchValue;
  38664. })) {
  38665. var addItem = optAddMaps[searchValue] || _defineProperty(_defineProperty(_defineProperty({}, $xeSelect.getOptKey(), searchValue), labelField, searchValue), valueField, searchValue);
  38666. optAddMaps[searchValue] = addItem;
  38667. restList.unshift(addItem);
  38668. }
  38669. }
  38670. reactData.optList = restList;
  38671. return $xeSelect.$nextTick();
  38672. },
  38673. updateYData: function updateYData() {
  38674. var $xeSelect = this;
  38675. $xeSelect.handleData();
  38676. $xeSelect.updateYSpace();
  38677. },
  38678. computeScrollLoad: function computeScrollLoad() {
  38679. var $xeSelect = this;
  38680. var reactData = $xeSelect.reactData;
  38681. var internalData = $xeSelect.internalData;
  38682. return $xeSelect.$nextTick().then(function () {
  38683. var scrollYLoad = reactData.scrollYLoad;
  38684. var scrollYStore = internalData.scrollYStore;
  38685. var virtualBodyElem = $xeSelect.$refs.refVirtualBody;
  38686. var virtualYOpts = $xeSelect.computeVirtualYOpts;
  38687. var rowHeight = 0;
  38688. var firstItemElem;
  38689. if (virtualBodyElem) {
  38690. if (!firstItemElem) {
  38691. firstItemElem = virtualBodyElem.children[0];
  38692. }
  38693. }
  38694. if (firstItemElem) {
  38695. rowHeight = firstItemElem.offsetHeight;
  38696. }
  38697. rowHeight = Math.max(20, rowHeight);
  38698. scrollYStore.rowHeight = rowHeight;
  38699. // 计算 Y 逻辑
  38700. if (scrollYLoad) {
  38701. var scrollBodyElem = $xeSelect.$refs.refVirtualWrapper;
  38702. var visibleYSize = Math.max(8, scrollBodyElem ? Math.ceil(scrollBodyElem.clientHeight / rowHeight) : 0);
  38703. var offsetYSize = Math.max(0, Math.min(2, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.oSize)));
  38704. scrollYStore.offsetSize = offsetYSize;
  38705. scrollYStore.visibleSize = visibleYSize;
  38706. scrollYStore.endIndex = Math.max(scrollYStore.startIndex, visibleYSize + offsetYSize, scrollYStore.endIndex);
  38707. $xeSelect.updateYData();
  38708. } else {
  38709. $xeSelect.updateYSpace();
  38710. }
  38711. });
  38712. },
  38713. handleScrollToOption: function handleScrollToOption(option, isDwArrow) {
  38714. var $xeSelect = this;
  38715. var reactData = $xeSelect.reactData;
  38716. var internalData = $xeSelect.internalData;
  38717. var scrollYLoad = reactData.scrollYLoad;
  38718. var optFullValMaps = internalData.optFullValMaps,
  38719. scrollYStore = internalData.scrollYStore;
  38720. var valueField = $xeSelect.computeValueField;
  38721. var cacheItem = optFullValMaps[option[valueField]];
  38722. if (cacheItem) {
  38723. var optid = cacheItem.key;
  38724. var avIndex = cacheItem._index;
  38725. if (avIndex > -1) {
  38726. var optWrapperElem = $xeSelect.$refs.refVirtualWrapper;
  38727. var panelElem = $xeSelect.$refs.refOptionPanel;
  38728. var optElem = panelElem.querySelector("[optid='".concat(optid, "']"));
  38729. if (optWrapperElem) {
  38730. if (optElem) {
  38731. var wrapperHeight = optWrapperElem.offsetHeight;
  38732. var offsetPadding = 1;
  38733. if (isDwArrow) {
  38734. if (optElem.offsetTop + optElem.offsetHeight - optWrapperElem.scrollTop > wrapperHeight) {
  38735. optWrapperElem.scrollTop = optElem.offsetTop + optElem.offsetHeight - wrapperHeight;
  38736. } else if (optElem.offsetTop + offsetPadding < optWrapperElem.scrollTop || optElem.offsetTop + offsetPadding > optWrapperElem.scrollTop + optWrapperElem.clientHeight) {
  38737. optWrapperElem.scrollTop = optElem.offsetTop - offsetPadding;
  38738. }
  38739. } else {
  38740. if (optElem.offsetTop + offsetPadding < optWrapperElem.scrollTop || optElem.offsetTop + offsetPadding > optWrapperElem.scrollTop + optWrapperElem.clientHeight) {
  38741. optWrapperElem.scrollTop = optElem.offsetTop - offsetPadding;
  38742. } else if (optElem.offsetTop + optElem.offsetHeight - optWrapperElem.scrollTop > wrapperHeight) {
  38743. optWrapperElem.scrollTop = optElem.offsetTop + optElem.offsetHeight - wrapperHeight;
  38744. }
  38745. }
  38746. } else if (scrollYLoad) {
  38747. if (isDwArrow) {
  38748. optWrapperElem.scrollTop = avIndex * scrollYStore.rowHeight - optWrapperElem.clientHeight + scrollYStore.rowHeight;
  38749. } else {
  38750. optWrapperElem.scrollTop = avIndex * scrollYStore.rowHeight;
  38751. }
  38752. }
  38753. }
  38754. }
  38755. }
  38756. },
  38757. /**
  38758. * 如果有滚动条,则滚动到对应的位置
  38759. * @param {Number} scrollLeft 左距离
  38760. * @param {Number} scrollTop 上距离
  38761. */
  38762. scrollTo: function scrollTo(scrollLeft, scrollTop) {
  38763. var $xeSelect = this;
  38764. var reactData = $xeSelect.reactData;
  38765. var scrollBodyElem = $xeSelect.$refs.refVirtualWrapper;
  38766. if (scrollBodyElem) {
  38767. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
  38768. scrollBodyElem.scrollLeft = scrollLeft;
  38769. }
  38770. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollTop)) {
  38771. scrollBodyElem.scrollTop = scrollTop;
  38772. }
  38773. }
  38774. if (reactData.scrollYLoad) {
  38775. return new Promise(function (resolve) {
  38776. setTimeout(function () {
  38777. $xeSelect.$nextTick(function () {
  38778. resolve();
  38779. });
  38780. }, 50);
  38781. });
  38782. }
  38783. return $xeSelect.$nextTick();
  38784. },
  38785. /**
  38786. * 刷新滚动条
  38787. */
  38788. refreshScroll: function refreshScroll() {
  38789. var $xeSelect = this;
  38790. var internalData = $xeSelect.internalData;
  38791. var lastScrollLeft = internalData.lastScrollLeft,
  38792. lastScrollTop = internalData.lastScrollTop;
  38793. return $xeSelect.clearScroll().then(function () {
  38794. if (lastScrollLeft || lastScrollTop) {
  38795. internalData.lastScrollLeft = 0;
  38796. internalData.lastScrollTop = 0;
  38797. return $xeSelect.scrollTo(lastScrollLeft, lastScrollTop);
  38798. }
  38799. });
  38800. },
  38801. /**
  38802. * 重新计算列表
  38803. */
  38804. recalculate: function recalculate() {
  38805. var $xeSelect = this;
  38806. var el = $xeSelect.$refs.refElem;
  38807. if (el && el.clientWidth && el.clientHeight) {
  38808. return $xeSelect.computeScrollLoad();
  38809. }
  38810. return Promise.resolve();
  38811. },
  38812. loadYData: function loadYData(evnt) {
  38813. var $xeSelect = this;
  38814. var internalData = $xeSelect.internalData;
  38815. var scrollYStore = internalData.scrollYStore;
  38816. var startIndex = scrollYStore.startIndex,
  38817. endIndex = scrollYStore.endIndex,
  38818. visibleSize = scrollYStore.visibleSize,
  38819. offsetSize = scrollYStore.offsetSize,
  38820. rowHeight = scrollYStore.rowHeight;
  38821. var scrollBodyElem = evnt.target;
  38822. var scrollTop = scrollBodyElem.scrollTop;
  38823. var toVisibleIndex = Math.floor(scrollTop / rowHeight);
  38824. var offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize);
  38825. var offsetEndIndex = toVisibleIndex + visibleSize + offsetSize;
  38826. if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
  38827. if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
  38828. scrollYStore.startIndex = offsetStartIndex;
  38829. scrollYStore.endIndex = offsetEndIndex;
  38830. $xeSelect.updateYData();
  38831. }
  38832. }
  38833. },
  38834. // 滚动、拖动过程中不需要触发
  38835. isVMScrollProcess: function isVMScrollProcess() {
  38836. var $xeSelect = this;
  38837. var internalData = $xeSelect.internalData;
  38838. var delayHover = 250;
  38839. var lastScrollTime = internalData.lastScrollTime;
  38840. return !!(lastScrollTime && Date.now() < lastScrollTime + delayHover);
  38841. },
  38842. scrollEvent: function scrollEvent(evnt) {
  38843. var $xeSelect = this;
  38844. var reactData = $xeSelect.reactData;
  38845. var internalData = $xeSelect.internalData;
  38846. var scrollBodyElem = evnt.target;
  38847. var scrollTop = scrollBodyElem.scrollTop;
  38848. var scrollLeft = scrollBodyElem.scrollLeft;
  38849. var isX = scrollLeft !== internalData.lastScrollLeft;
  38850. var isY = scrollTop !== internalData.lastScrollTop;
  38851. internalData.lastScrollTop = scrollTop;
  38852. internalData.lastScrollLeft = scrollLeft;
  38853. if (reactData.scrollYLoad) {
  38854. $xeSelect.loadYData(evnt);
  38855. }
  38856. internalData.lastScrollTime = Date.now();
  38857. $xeSelect.dispatchEvent('scroll', {
  38858. scrollLeft: scrollLeft,
  38859. scrollTop: scrollTop,
  38860. isX: isX,
  38861. isY: isY
  38862. }, evnt);
  38863. },
  38864. /**
  38865. * 加载数据
  38866. * @param {Array} datas 数据
  38867. */
  38868. loadData: function loadData(datas) {
  38869. var $xeSelect = this;
  38870. var props = $xeSelect;
  38871. var reactData = $xeSelect.reactData;
  38872. var internalData = $xeSelect.internalData;
  38873. $xeSelect.cacheItemMap(datas || []);
  38874. var isLoaded = internalData.isLoaded,
  38875. fullData = internalData.fullData,
  38876. scrollYStore = internalData.scrollYStore;
  38877. var defaultOpts = $xeSelect.computeDefaultOpts;
  38878. var virtualYOpts = $xeSelect.computeVirtualYOpts;
  38879. var valueField = $xeSelect.computeValueField;
  38880. Object.assign(scrollYStore, {
  38881. startIndex: 0,
  38882. endIndex: 1,
  38883. visibleSize: 0
  38884. });
  38885. internalData.synchData = datas || [];
  38886. // 如果gt为0,则总是启用
  38887. reactData.scrollYLoad = !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt <= fullData.length);
  38888. $xeSelect.handleData();
  38889. if (!isLoaded) {
  38890. var selectMode = defaultOpts.selectMode;
  38891. if (datas.length > 0 && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(props.value)) {
  38892. if (selectMode === 'first' || selectMode === 'last') {
  38893. var selectItem = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[selectMode](datas);
  38894. if (selectItem) {
  38895. $xeSelect.$nextTick(function () {
  38896. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(props.value)) {
  38897. $xeSelect.emitModel(selectItem[valueField]);
  38898. }
  38899. });
  38900. }
  38901. }
  38902. internalData.isLoaded = true;
  38903. }
  38904. }
  38905. return $xeSelect.computeScrollLoad().then(function () {
  38906. $xeSelect.refreshScroll();
  38907. });
  38908. },
  38909. reloadData: function reloadData(datas) {
  38910. var $xeSelect = this;
  38911. var internalData = $xeSelect.internalData;
  38912. internalData.isLoaded = false;
  38913. $xeSelect.clearScroll();
  38914. return $xeSelect.loadData(datas);
  38915. },
  38916. clearScroll: function clearScroll() {
  38917. var $xeSelect = this;
  38918. var internalData = $xeSelect.internalData;
  38919. var scrollBodyElem = $xeSelect.$refs.refVirtualWrapper;
  38920. if (scrollBodyElem) {
  38921. scrollBodyElem.scrollTop = 0;
  38922. scrollBodyElem.scrollLeft = 0;
  38923. }
  38924. internalData.lastScrollTop = 0;
  38925. internalData.lastScrollLeft = 0;
  38926. return $xeSelect.$nextTick();
  38927. },
  38928. hasOptGroupById: function hasOptGroupById(optid) {
  38929. var $xeSelect = this;
  38930. var internalData = $xeSelect.internalData;
  38931. var optGroupKeyMaps = internalData.optGroupKeyMaps;
  38932. return !!optGroupKeyMaps[optid];
  38933. },
  38934. //
  38935. // Render
  38936. //
  38937. renderOption: function renderOption(h, list) {
  38938. var $xeSelect = this;
  38939. var props = $xeSelect;
  38940. var slots = $xeSelect.$scopedSlots;
  38941. var reactData = $xeSelect.reactData;
  38942. var internalData = $xeSelect.internalData;
  38943. var allowCreate = props.allowCreate,
  38944. optionKey = props.optionKey;
  38945. var currentOption = reactData.currentOption;
  38946. var optAddMaps = internalData.optAddMaps;
  38947. var optionOpts = $xeSelect.computeOptionOpts;
  38948. var labelField = $xeSelect.computeLabelField;
  38949. var valueField = $xeSelect.computeValueField;
  38950. var groupLabelField = $xeSelect.computeGroupLabelField;
  38951. var selectVals = $xeSelect.computeSelectVals;
  38952. var useKey = optionOpts.useKey,
  38953. height = optionOpts.height;
  38954. var optionSlot = slots.option;
  38955. return list.map(function (option, cIndex) {
  38956. var slots = option.slots,
  38957. className = option.className;
  38958. var optid = $xeSelect.getOptId(option);
  38959. var optionValue = option[valueField];
  38960. var isOptGroup = $xeSelect.hasOptGroupById(optid);
  38961. var isAdd = !!(allowCreate && optAddMaps[optid]);
  38962. var isSelected = !isAdd && selectVals.indexOf(optionValue) > -1;
  38963. var isVisible = isAdd || !isOptGroup || isOptionVisible(option);
  38964. var isDisabled = !isAdd && $xeSelect.checkOptionDisabled(isSelected, option);
  38965. var defaultSlot = slots ? slots.default : null;
  38966. var optParams = {
  38967. option: option,
  38968. group: isOptGroup ? option : null,
  38969. $select: $xeSelect
  38970. };
  38971. var optLabel = '';
  38972. var optVNs = [];
  38973. if (optionSlot) {
  38974. optVNs = $xeSelect.callSlot(optionSlot, optParams, h);
  38975. } else if (defaultSlot) {
  38976. optVNs = $xeSelect.callSlot(defaultSlot, optParams, h);
  38977. } else {
  38978. optLabel = getFuncText(option[isOptGroup ? groupLabelField : labelField] || optionValue);
  38979. optVNs = optLabel;
  38980. }
  38981. return isVisible ? h('div', {
  38982. key: useKey || optionKey ? optid : cIndex,
  38983. class: ['vxe-select-option', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className(optParams) : className : '', {
  38984. 'vxe-select-optgroup': isOptGroup,
  38985. 'is--disabled': isDisabled,
  38986. 'is--selected': isSelected,
  38987. 'is--add': isAdd,
  38988. 'is--hover': currentOption && $xeSelect.getOptId(currentOption) === optid
  38989. }],
  38990. attrs: {
  38991. optid: optid,
  38992. title: optLabel || null
  38993. },
  38994. style: height ? {
  38995. height: toCssUnit(height)
  38996. } : undefined,
  38997. on: {
  38998. mousedown: function mousedown(evnt) {
  38999. var isLeftBtn = evnt.button === 0;
  39000. if (isLeftBtn) {
  39001. evnt.stopPropagation();
  39002. }
  39003. },
  39004. click: function click(evnt) {
  39005. if (!isDisabled && !isOptGroup) {
  39006. $xeSelect.changeOptionEvent(evnt, option);
  39007. }
  39008. },
  39009. mouseenter: function mouseenter() {
  39010. if (!isDisabled && !isOptGroup && !$xeSelect.isVMScrollProcess()) {
  39011. $xeSelect.setCurrentOption(option);
  39012. }
  39013. }
  39014. }
  39015. }, allowCreate ? [h('span', {
  39016. key: 1,
  39017. class: 'vxe-select-option--label'
  39018. }, optVNs), isAdd ? h('span', {
  39019. key: 2,
  39020. class: 'vxe-select-option--add-icon'
  39021. }, [h('i', {
  39022. class: getIcon().SELECT_ADD_OPTION
  39023. })]) : renderEmptyElement($xeSelect)] : optVNs) : renderEmptyElement($xeSelect);
  39024. });
  39025. },
  39026. renderOpts: function renderOpts(h) {
  39027. var $xeSelect = this;
  39028. var props = $xeSelect;
  39029. var reactData = $xeSelect.reactData;
  39030. var optList = reactData.optList,
  39031. searchLoading = reactData.searchLoading;
  39032. if (searchLoading) {
  39033. return [h('div', {
  39034. class: 'vxe-select--search-loading'
  39035. }, [h('i', {
  39036. class: ['vxe-select--search-icon', getIcon().SELECT_LOADED]
  39037. }), h('span', {
  39038. class: 'vxe-select--search-text'
  39039. }, getI18n('vxe.select.loadingText'))])];
  39040. }
  39041. if (optList.length) {
  39042. return $xeSelect.renderOption(h, optList);
  39043. }
  39044. return [h('div', {
  39045. class: 'vxe-select--empty-placeholder'
  39046. }, props.emptyText || getI18n('vxe.select.emptyText'))];
  39047. },
  39048. renderVN: function renderVN(h) {
  39049. var $xeSelect = this;
  39050. var props = $xeSelect;
  39051. var slots = $xeSelect.$scopedSlots;
  39052. var reactData = $xeSelect.reactData;
  39053. var className = props.className,
  39054. popupClassName = props.popupClassName,
  39055. multiple = props.multiple,
  39056. loading = props.loading,
  39057. filterable = props.filterable,
  39058. showTotalButoon = props.showTotalButoon,
  39059. showCheckedButoon = props.showCheckedButoon,
  39060. showClearButton = props.showClearButton;
  39061. var initialized = reactData.initialized,
  39062. isActivated = reactData.isActivated,
  39063. isAniVisible = reactData.isAniVisible,
  39064. optList = reactData.optList,
  39065. visiblePanel = reactData.visiblePanel,
  39066. bodyHeight = reactData.bodyHeight,
  39067. topSpaceHeight = reactData.topSpaceHeight;
  39068. var vSize = $xeSelect.computeSize;
  39069. var isDisabled = $xeSelect.computeIsDisabled;
  39070. var selectLabel = $xeSelect.computeSelectLabel;
  39071. var fullLabel = $xeSelect.computeFullLabel;
  39072. var btnTransfer = $xeSelect.computeBtnTransfer;
  39073. var formReadonly = $xeSelect.computeFormReadonly;
  39074. var inpPlaceholder = $xeSelect.computeInpPlaceholder;
  39075. var defaultSlot = slots.default;
  39076. var headerSlot = slots.header;
  39077. var footerSlot = slots.footer;
  39078. var prefixSlot = slots.prefix;
  39079. if (formReadonly) {
  39080. return h('div', {
  39081. ref: 'refElem',
  39082. class: ['vxe-select--readonly', className]
  39083. }, [h('div', {
  39084. class: 'vxe-select-slots',
  39085. ref: 'hideOption'
  39086. }, defaultSlot ? $xeSelect.callSlot(defaultSlot, {}, h) : []), h('span', {
  39087. class: 'vxe-select-label',
  39088. attrs: {
  39089. fullLabel: fullLabel
  39090. }
  39091. }, selectLabel)]);
  39092. }
  39093. var selectVals = $xeSelect.computeSelectVals;
  39094. return h('div', {
  39095. ref: 'refElem',
  39096. class: ['vxe-select', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  39097. $select: $xeSelect
  39098. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--filter', filterable), 'is--loading', loading), 'is--active', isActivated)]
  39099. }, [h('div', {
  39100. class: 'vxe-select-slots',
  39101. ref: 'hideOption'
  39102. }, defaultSlot ? defaultSlot.call($xeSelect, {}) : []), h(input, {
  39103. ref: 'refInput',
  39104. props: {
  39105. clearable: props.clearable,
  39106. placeholder: inpPlaceholder,
  39107. readonly: true,
  39108. disabled: isDisabled,
  39109. type: 'text',
  39110. prefixIcon: props.prefixIcon,
  39111. suffixIcon: loading ? getIcon().SELECT_LOADED : visiblePanel ? getIcon().SELECT_OPEN : getIcon().SELECT_CLOSE,
  39112. autoFocus: false,
  39113. title: fullLabel,
  39114. value: selectLabel
  39115. },
  39116. on: {
  39117. clear: $xeSelect.clearEvent,
  39118. click: $xeSelect.clickEvent,
  39119. focus: $xeSelect.focusEvent,
  39120. blur: $xeSelect.blurEvent,
  39121. 'suffix-click': $xeSelect.suffixClickEvent
  39122. },
  39123. scopedSlots: prefixSlot ? {
  39124. prefix: function prefix() {
  39125. return prefixSlot({});
  39126. }
  39127. } : {}
  39128. }), h('div', {
  39129. ref: 'refOptionPanel',
  39130. class: ['vxe-table--ignore-clear vxe-select--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  39131. $select: $xeSelect
  39132. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', !loading && isAniVisible), 'ani--enter', !loading && visiblePanel)],
  39133. attrs: {
  39134. placement: reactData.panelPlacement
  39135. },
  39136. style: reactData.panelStyle
  39137. }, initialized && (visiblePanel || isAniVisible) ? [h('div', {
  39138. class: 'vxe-select--panel-wrapper'
  39139. }, [filterable ? h('div', {
  39140. class: 'vxe-select--panel-search'
  39141. }, [h(input, {
  39142. ref: 'refInpSearch',
  39143. class: 'vxe-select-search--input',
  39144. props: {
  39145. value: reactData.searchValue,
  39146. type: 'text',
  39147. clearable: true,
  39148. disabled: false,
  39149. readonly: false,
  39150. placeholder: getI18n('vxe.select.search'),
  39151. prefixIcon: getIcon().INPUT_SEARCH
  39152. },
  39153. on: {
  39154. 'model-value': $xeSelect.modelSearchEvent,
  39155. focus: $xeSelect.focusSearchEvent,
  39156. change: $xeSelect.triggerSearchEvent,
  39157. search: $xeSelect.triggerSearchEvent
  39158. }
  39159. })]) : renderEmptyElement($xeSelect), showTotalButoon || showCheckedButoon && multiple || showClearButton || headerSlot ? h('div', {
  39160. class: 'vxe-select--panel-header'
  39161. }, headerSlot ? $xeSelect.callSlot(headerSlot, {}, h) : [h('div', {
  39162. class: 'vxe-tree-select--header-button'
  39163. }, [showTotalButoon ? h('div', {
  39164. class: 'vxe-tree-select--header-total'
  39165. }, getI18n('vxe.select.total', [selectVals.length, optList.length])) : renderEmptyElement($xeSelect), h('div', {
  39166. class: 'vxe-tree-select--header-btns'
  39167. }, [showCheckedButoon && multiple ? h(src_button, {
  39168. props: {
  39169. content: getI18n('vxe.select.allChecked'),
  39170. mode: 'text'
  39171. },
  39172. on: {
  39173. click: $xeSelect.allCheckedPanelEvent
  39174. }
  39175. }) : renderEmptyElement($xeSelect), showClearButton ? h(src_button, {
  39176. props: {
  39177. content: getI18n('vxe.select.clear'),
  39178. mode: 'text'
  39179. },
  39180. on: {
  39181. click: $xeSelect.clearCheckedPanelEvent
  39182. }
  39183. }) : renderEmptyElement($xeSelect)])])]) : renderEmptyElement($xeSelect), h('div', {
  39184. class: 'vxe-select--panel-body'
  39185. }, [h('div', {
  39186. ref: 'refVirtualWrapper',
  39187. class: 'vxe-select-option--wrapper',
  39188. on: {
  39189. scroll: $xeSelect.scrollEvent
  39190. }
  39191. }, [h('div', {
  39192. class: 'vxe-select--y-space',
  39193. style: {
  39194. height: bodyHeight ? "".concat(bodyHeight, "px") : ''
  39195. }
  39196. }), h('div', {
  39197. ref: 'refVirtualBody',
  39198. class: 'vxe-select--body',
  39199. style: {
  39200. transform: "translateY(".concat(topSpaceHeight, "px)")
  39201. }
  39202. }, $xeSelect.renderOpts(h))])]), footerSlot ? h('div', {
  39203. class: 'vxe-select--panel-footer'
  39204. }, $xeSelect.callSlot(footerSlot, {}, h)) : renderEmptyElement($xeSelect)])] : [])]);
  39205. }
  39206. },
  39207. watch: {
  39208. 'reactData.staticOptions': function reactDataStaticOptions(val) {
  39209. var $xeSelect = this;
  39210. $xeSelect.loadData(val);
  39211. },
  39212. options: function options(val) {
  39213. var $xeSelect = this;
  39214. $xeSelect.loadData(val);
  39215. },
  39216. optionGroups: function optionGroups(val) {
  39217. var $xeSelect = this;
  39218. $xeSelect.loadData(val);
  39219. }
  39220. },
  39221. mounted: function mounted() {
  39222. var $xeSelect = this;
  39223. var props = $xeSelect;
  39224. $xeSelect.$nextTick(function () {
  39225. var options = props.options,
  39226. optionGroups = props.optionGroups;
  39227. if (optionGroups) {
  39228. $xeSelect.loadData(optionGroups);
  39229. } else if (options) {
  39230. $xeSelect.loadData(options);
  39231. }
  39232. });
  39233. globalEvents.on($xeSelect, 'mousewheel', $xeSelect.handleGlobalMousewheelEvent);
  39234. globalEvents.on($xeSelect, 'mousedown', $xeSelect.handleGlobalMousedownEvent);
  39235. globalEvents.on($xeSelect, 'keydown', $xeSelect.handleGlobalKeydownEvent);
  39236. globalEvents.on($xeSelect, 'blur', $xeSelect.handleGlobalBlurEvent);
  39237. globalEvents.on($xeSelect, 'resize', $xeSelect.handleGlobalResizeEvent);
  39238. },
  39239. beforeDestroy: function beforeDestroy() {
  39240. var $xeSelect = this;
  39241. var panelElem = $xeSelect.$refs.refOptionPanel;
  39242. if (panelElem && panelElem.parentNode) {
  39243. panelElem.parentNode.removeChild(panelElem);
  39244. }
  39245. globalEvents.off($xeSelect, 'mousewheel');
  39246. globalEvents.off($xeSelect, 'mousedown');
  39247. globalEvents.off($xeSelect, 'keydown');
  39248. globalEvents.off($xeSelect, 'blur');
  39249. globalEvents.off($xeSelect, 'resize');
  39250. },
  39251. destroyed: function destroyed() {
  39252. var $xeSelect = this;
  39253. var internalData = $xeSelect.internalData;
  39254. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, select_createInternalData());
  39255. },
  39256. render: function render(h) {
  39257. return this.renderVN(h);
  39258. }
  39259. })); /* define-vxe-component end */
  39260. ;// CONCATENATED MODULE: ./packages/pager/src/pager.ts
  39261. /* harmony default export */ var pager = (/* define-vxe-component start */defineVxeComponent({
  39262. name: 'VxePager',
  39263. mixins: [globalMixins.sizeMixin],
  39264. props: {
  39265. size: {
  39266. type: String,
  39267. default: function _default() {
  39268. return getConfig().pager.size || getConfig().size;
  39269. }
  39270. },
  39271. // 自定义布局
  39272. layouts: {
  39273. type: Array,
  39274. default: function _default() {
  39275. return getConfig().pager.layouts || ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total'];
  39276. }
  39277. },
  39278. // 当前页
  39279. currentPage: {
  39280. type: Number,
  39281. default: 1
  39282. },
  39283. // 加载中
  39284. loading: Boolean,
  39285. // 每页大小
  39286. pageSize: {
  39287. type: Number,
  39288. default: function _default() {
  39289. return getConfig().pager.pageSize || 10;
  39290. }
  39291. },
  39292. // 总条数
  39293. total: {
  39294. type: Number,
  39295. default: 0
  39296. },
  39297. // 显示页码按钮的数量
  39298. pagerCount: {
  39299. type: Number,
  39300. default: function _default() {
  39301. return getConfig().pager.pagerCount || 7;
  39302. }
  39303. },
  39304. // 每页大小选项列表
  39305. pageSizes: {
  39306. type: Array,
  39307. default: function _default() {
  39308. return getConfig().pager.pageSizes || [10, 15, 20, 50, 100];
  39309. }
  39310. },
  39311. // 列对齐方式
  39312. align: {
  39313. type: String,
  39314. default: function _default() {
  39315. return getConfig().pager.align;
  39316. }
  39317. },
  39318. // 带边框
  39319. border: {
  39320. type: Boolean,
  39321. default: function _default() {
  39322. return getConfig().pager.border;
  39323. }
  39324. },
  39325. // 带背景颜色
  39326. background: {
  39327. type: Boolean,
  39328. default: function _default() {
  39329. return getConfig().pager.background;
  39330. }
  39331. },
  39332. // 配套的样式
  39333. perfect: {
  39334. type: Boolean,
  39335. default: function _default() {
  39336. return getConfig().pager.perfect;
  39337. }
  39338. },
  39339. // 当只有一页时隐藏
  39340. autoHidden: {
  39341. type: Boolean,
  39342. default: function _default() {
  39343. return getConfig().pager.autoHidden;
  39344. }
  39345. },
  39346. transfer: {
  39347. type: Boolean,
  39348. default: function _default() {
  39349. return getConfig().pager.transfer;
  39350. }
  39351. },
  39352. className: [String, Function],
  39353. pageSizePlacement: {
  39354. type: String,
  39355. default: function _default() {
  39356. return getConfig().pager.pageSizePlacement;
  39357. }
  39358. },
  39359. // 自定义图标
  39360. iconPrevPage: String,
  39361. iconJumpPrev: String,
  39362. iconJumpNext: String,
  39363. iconNextPage: String,
  39364. iconJumpMore: String,
  39365. iconHomePage: String,
  39366. iconEndPage: String
  39367. },
  39368. inject: {
  39369. $xeGrid: {
  39370. default: null
  39371. }
  39372. },
  39373. data: function data() {
  39374. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  39375. var reactData = {
  39376. inpCurrPage: 1
  39377. };
  39378. return {
  39379. xID: xID,
  39380. reactData: reactData
  39381. };
  39382. },
  39383. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  39384. computePageCount: function computePageCount() {
  39385. var $xePager = this;
  39386. var props = $xePager;
  39387. return $xePager.getPageCount(props.total, props.pageSize);
  39388. },
  39389. computeNumList: function computeNumList() {
  39390. var $xePager = this;
  39391. var props = $xePager;
  39392. var pagerCount = props.pagerCount;
  39393. var pageCount = $xePager.computePageCount;
  39394. var len = pageCount > pagerCount ? pagerCount - 2 : pagerCount;
  39395. var rest = [];
  39396. for (var index = 0; index < len; index++) {
  39397. rest.push(index);
  39398. }
  39399. return rest;
  39400. },
  39401. computeOffsetNumber: function computeOffsetNumber() {
  39402. var $xePager = this;
  39403. var props = $xePager;
  39404. return Math.floor((props.pagerCount - 2) / 2);
  39405. },
  39406. computeSizeList: function computeSizeList() {
  39407. var $xePager = this;
  39408. var props = $xePager;
  39409. return props.pageSizes.map(function (item) {
  39410. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(item)) {
  39411. return {
  39412. value: item,
  39413. label: "".concat(getI18n('vxe.pager.pagesize', [item]))
  39414. };
  39415. }
  39416. return _objectSpread2({
  39417. value: '',
  39418. label: ''
  39419. }, item);
  39420. });
  39421. }
  39422. }),
  39423. methods: {
  39424. //
  39425. // Method
  39426. //
  39427. dispatchEvent: function dispatchEvent(type, params, evnt) {
  39428. var $xePager = this;
  39429. $xePager.$emit(type, createEvent(evnt, {
  39430. $pager: $xePager
  39431. }, params));
  39432. },
  39433. setPageSize: function setPageSize(num) {
  39434. var $xePager = this;
  39435. $xePager.pageSizeEvent({
  39436. value: num
  39437. });
  39438. return $xePager.$nextTick();
  39439. },
  39440. setPageSizeByEvent: function setPageSizeByEvent(evnt, num) {
  39441. var $xePager = this;
  39442. $xePager.pageSizeEvent({
  39443. value: num,
  39444. $event: evnt
  39445. });
  39446. },
  39447. homePage: function homePage() {
  39448. var $xePager = this;
  39449. $xePager.handleHomePage();
  39450. return $xePager.$nextTick();
  39451. },
  39452. homePageByEvent: function homePageByEvent(evnt) {
  39453. var $xePager = this;
  39454. $xePager.handleHomePage(evnt);
  39455. },
  39456. endPage: function endPage() {
  39457. var $xePager = this;
  39458. $xePager.handleEndPage();
  39459. return $xePager.$nextTick();
  39460. },
  39461. endPageByEvent: function endPageByEvent(evnt) {
  39462. var $xePager = this;
  39463. $xePager.handleEndPage(evnt);
  39464. },
  39465. prevPage: function prevPage() {
  39466. var $xePager = this;
  39467. $xePager.handlePrevPage();
  39468. return $xePager.$nextTick();
  39469. },
  39470. prevPageByEvent: function prevPageByEvent(evnt) {
  39471. var $xePager = this;
  39472. $xePager.handlePrevPage(evnt);
  39473. },
  39474. nextPage: function nextPage() {
  39475. var $xePager = this;
  39476. $xePager.handleNextPage();
  39477. return $xePager.$nextTick();
  39478. },
  39479. nextPageByEvent: function nextPageByEvent(evnt) {
  39480. var $xePager = this;
  39481. $xePager.handleNextPage(evnt);
  39482. },
  39483. prevJump: function prevJump() {
  39484. var $xePager = this;
  39485. $xePager.handlePrevJump();
  39486. return $xePager.$nextTick();
  39487. },
  39488. prevJumpByEvent: function prevJumpByEvent(evnt) {
  39489. var $xePager = this;
  39490. $xePager.handlePrevJump(evnt);
  39491. },
  39492. nextJump: function nextJump() {
  39493. var $xePager = this;
  39494. $xePager.handleNextJump();
  39495. return $xePager.$nextTick();
  39496. },
  39497. nextJumpByEvent: function nextJumpByEvent(evnt) {
  39498. var $xePager = this;
  39499. $xePager.handleNextJump(evnt);
  39500. },
  39501. setCurrentPage: function setCurrentPage(currentPage) {
  39502. var $xePager = this;
  39503. var reactData = $xePager.reactData;
  39504. var current = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(currentPage) || 1;
  39505. reactData.inpCurrPage = current;
  39506. $xePager.handleChangeCurrentPage(current);
  39507. return $xePager.$nextTick();
  39508. },
  39509. setCurrentPageByEvent: function setCurrentPageByEvent(evnt, currentPage) {
  39510. var $xePager = this;
  39511. var reactData = $xePager.reactData;
  39512. var current = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(currentPage) || 1;
  39513. reactData.inpCurrPage = current;
  39514. $xePager.handleChangeCurrentPage(current, evnt);
  39515. },
  39516. /**
  39517. * 已废弃,被 setCurrentPage 替换
  39518. * @deprecated
  39519. */
  39520. jumpPage: function jumpPage(currentPage) {
  39521. var $xePager = this;
  39522. warnLog('vxe.error.delFunc', ['[pager] jumpPage', 'setCurrentPage']);
  39523. return $xePager.setCurrentPage(currentPage);
  39524. },
  39525. getPageCount: function getPageCount(total, size) {
  39526. return Math.max(Math.ceil(total / size), 1);
  39527. },
  39528. handleJumpPageEvent: function handleJumpPageEvent(evnt, currentPage) {
  39529. var $xePager = this;
  39530. var props = $xePager;
  39531. $xePager.$emit('update:currentPage', currentPage);
  39532. if (evnt && currentPage !== props.currentPage) {
  39533. $xePager.dispatchEvent('page-change', {
  39534. type: 'current',
  39535. pageSize: props.pageSize,
  39536. currentPage: currentPage
  39537. }, evnt);
  39538. }
  39539. },
  39540. handleChangeCurrentPage: function handleChangeCurrentPage(currentPage, evnt) {
  39541. var $xePager = this;
  39542. var props = $xePager;
  39543. $xePager.$emit('update:currentPage', currentPage);
  39544. if (evnt && currentPage !== props.currentPage) {
  39545. $xePager.dispatchEvent('page-change', {
  39546. type: 'current',
  39547. pageSize: props.pageSize,
  39548. currentPage: currentPage
  39549. }, evnt);
  39550. }
  39551. },
  39552. triggerJumpEvent: function triggerJumpEvent(params) {
  39553. var $xePager = this;
  39554. var reactData = $xePager.reactData;
  39555. var $event = params.$event;
  39556. var inputElem = $event.target;
  39557. var inpValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(inputElem.value);
  39558. var pageCount = $xePager.computePageCount.value;
  39559. var current = inpValue <= 0 ? 1 : inpValue >= pageCount ? pageCount : inpValue;
  39560. var currPage = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(current);
  39561. inputElem.value = currPage;
  39562. reactData.inpCurrPage = currPage;
  39563. $xePager.handleChangeCurrentPage(current, $event);
  39564. },
  39565. handleHomePage: function handleHomePage(evnt) {
  39566. var $xePager = this;
  39567. var props = $xePager;
  39568. var currentPage = props.currentPage;
  39569. if (currentPage > 1) {
  39570. $xePager.handleChangeCurrentPage(1, evnt);
  39571. }
  39572. },
  39573. handleEndPage: function handleEndPage(evnt) {
  39574. var $xePager = this;
  39575. var props = $xePager;
  39576. var currentPage = props.currentPage;
  39577. var pageCount = $xePager.computePageCount;
  39578. if (currentPage < pageCount) {
  39579. $xePager.handleChangeCurrentPage(pageCount, evnt);
  39580. }
  39581. },
  39582. handlePrevPage: function handlePrevPage(evnt) {
  39583. var $xePager = this;
  39584. var props = $xePager;
  39585. var currentPage = props.currentPage;
  39586. var pageCount = $xePager.computePageCount;
  39587. if (currentPage > 1) {
  39588. $xePager.handleChangeCurrentPage(Math.min(pageCount, Math.max(currentPage - 1, 1)), evnt);
  39589. }
  39590. },
  39591. handleNextPage: function handleNextPage(evnt) {
  39592. var $xePager = this;
  39593. var props = $xePager;
  39594. var currentPage = props.currentPage;
  39595. var pageCount = $xePager.computePageCount;
  39596. if (currentPage < pageCount) {
  39597. $xePager.handleChangeCurrentPage(Math.min(pageCount, currentPage + 1), evnt);
  39598. }
  39599. },
  39600. handlePrevJump: function handlePrevJump(evnt) {
  39601. var $xePager = this;
  39602. var props = $xePager;
  39603. var numList = $xePager.computeNumList;
  39604. $xePager.handleChangeCurrentPage(Math.max(props.currentPage - numList.length, 1), evnt);
  39605. },
  39606. handleNextJump: function handleNextJump(evnt) {
  39607. var $xePager = this;
  39608. var props = $xePager;
  39609. var pageCount = $xePager.computePageCount;
  39610. var numList = $xePager.computeNumList;
  39611. $xePager.handleChangeCurrentPage(Math.min(props.currentPage + numList.length, pageCount), evnt);
  39612. },
  39613. pageSizeEvent: function pageSizeEvent(params) {
  39614. var $xePager = this;
  39615. var props = $xePager;
  39616. var value = params.value,
  39617. $event = params.$event;
  39618. var pageSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(value);
  39619. var pageCount = $xePager.getPageCount(props.total, pageSize);
  39620. var currentPage = props.currentPage;
  39621. if (currentPage > pageCount) {
  39622. currentPage = pageCount;
  39623. $xePager.$emit('update:currentPage', pageCount);
  39624. }
  39625. $xePager.$emit('update:pageSize', pageSize);
  39626. if ($event) {
  39627. $xePager.dispatchEvent('page-change', {
  39628. type: 'size',
  39629. pageSize: pageSize,
  39630. currentPage: currentPage
  39631. }, $event);
  39632. }
  39633. },
  39634. jumpKeydownEvent: function jumpKeydownEvent(params) {
  39635. var $xePager = this;
  39636. var $event = params.$event;
  39637. if (globalEvents.hasKey($event, GLOBAL_EVENT_KEYS.ENTER)) {
  39638. $xePager.triggerJumpEvent(params);
  39639. } else if (globalEvents.hasKey($event, GLOBAL_EVENT_KEYS.ARROW_UP)) {
  39640. $event.preventDefault();
  39641. $xePager.handleNextPage($event);
  39642. } else if (globalEvents.hasKey($event, GLOBAL_EVENT_KEYS.ARROW_DOWN)) {
  39643. $event.preventDefault();
  39644. $xePager.handlePrevPage($event);
  39645. }
  39646. },
  39647. //
  39648. // Render
  39649. //
  39650. // 第一页
  39651. renderHomePage: function renderHomePage(h) {
  39652. var $xePager = this;
  39653. var props = $xePager;
  39654. var slots = $xePager.$scopedSlots;
  39655. var currentPage = props.currentPage,
  39656. total = props.total;
  39657. var homeSlot = slots.home;
  39658. var pageCount = $xePager.computePageCount;
  39659. if (homeSlot) {
  39660. return h('span', {
  39661. class: 'vxe-pager--custom-home-btn'
  39662. }, homeSlot({
  39663. $pager: $xePager,
  39664. total: total,
  39665. currentPage: currentPage,
  39666. pageCount: pageCount
  39667. }));
  39668. }
  39669. return h('button', {
  39670. class: ['vxe-pager--home-btn', {
  39671. 'is--disabled': currentPage <= 1
  39672. }],
  39673. attrs: {
  39674. type: 'button',
  39675. title: getI18n('vxe.pager.homePageTitle')
  39676. },
  39677. on: {
  39678. click: $xePager.handleHomePage
  39679. }
  39680. }, [h('i', {
  39681. class: ['vxe-pager--btn-icon', props.iconHomePage || getIcon().PAGER_HOME]
  39682. })]);
  39683. },
  39684. // 上一页
  39685. renderPrevPage: function renderPrevPage(h) {
  39686. var $xePager = this;
  39687. var props = $xePager;
  39688. var slots = $xePager.$scopedSlots;
  39689. var currentPage = props.currentPage,
  39690. total = props.total;
  39691. var prevPageSlot = slots.prevPage || slots['prev-page'];
  39692. var pageCount = $xePager.computePageCount;
  39693. if (prevPageSlot) {
  39694. return h('span', {
  39695. class: 'vxe-pager--custom-prev-btn'
  39696. }, prevPageSlot({
  39697. $pager: $xePager,
  39698. total: total,
  39699. currentPage: currentPage,
  39700. pageCount: pageCount
  39701. }));
  39702. }
  39703. return h('button', {
  39704. class: ['vxe-pager--prev-btn', {
  39705. 'is--disabled': currentPage <= 1
  39706. }],
  39707. attrs: {
  39708. type: 'button',
  39709. title: getI18n('vxe.pager.prevPageTitle')
  39710. },
  39711. on: {
  39712. click: $xePager.handlePrevPage
  39713. }
  39714. }, [h('i', {
  39715. class: ['vxe-pager--btn-icon', props.iconPrevPage || getIcon().PAGER_PREV_PAGE]
  39716. })]);
  39717. },
  39718. // 向上翻页
  39719. renderPrevJump: function renderPrevJump(h, tagName) {
  39720. var $xePager = this;
  39721. var props = $xePager;
  39722. var slots = $xePager.$scopedSlots;
  39723. var currentPage = props.currentPage,
  39724. total = props.total;
  39725. var prevJumpSlot = slots.prevJump || slots['prev-jump'];
  39726. var pageCount = $xePager.computePageCount;
  39727. if (prevJumpSlot) {
  39728. return h('span', {
  39729. class: 'vxe-pager--custom-jump-prev'
  39730. }, prevJumpSlot({
  39731. $pager: $xePager,
  39732. total: total,
  39733. currentPage: currentPage,
  39734. pageCount: pageCount
  39735. }));
  39736. }
  39737. return h(tagName || 'button', {
  39738. class: ['vxe-pager--jump-prev', {
  39739. 'is--fixed': !tagName,
  39740. 'is--disabled': currentPage <= 1
  39741. }],
  39742. attrs: {
  39743. type: 'button',
  39744. title: getI18n('vxe.pager.prevJumpTitle')
  39745. },
  39746. on: {
  39747. click: $xePager.handlePrevJump
  39748. }
  39749. }, [tagName ? h('i', {
  39750. class: ['vxe-pager--jump-more-icon', props.iconJumpMore || getIcon().PAGER_JUMP_MORE]
  39751. }) : null, h('i', {
  39752. class: ['vxe-pager--jump-icon', props.iconJumpPrev || getIcon().PAGER_JUMP_PREV]
  39753. })]);
  39754. },
  39755. // 向下翻页
  39756. renderNextJump: function renderNextJump(h, tagName) {
  39757. var $xePager = this;
  39758. var props = $xePager;
  39759. var slots = $xePager.$scopedSlots;
  39760. var currentPage = props.currentPage,
  39761. total = props.total;
  39762. var nextJumpSlot = slots.nextJump || slots['next-jump'];
  39763. var pageCount = $xePager.computePageCount;
  39764. if (nextJumpSlot) {
  39765. return h('span', {
  39766. class: 'vxe-pager--custom-jump-next'
  39767. }, nextJumpSlot({
  39768. $pager: $xePager,
  39769. total: total,
  39770. currentPage: currentPage,
  39771. pageCount: pageCount
  39772. }));
  39773. }
  39774. return h(tagName || 'button', {
  39775. class: ['vxe-pager--jump-next', {
  39776. 'is--fixed': !tagName,
  39777. 'is--disabled': currentPage >= pageCount
  39778. }],
  39779. attrs: {
  39780. type: 'button',
  39781. title: getI18n('vxe.pager.nextJumpTitle')
  39782. },
  39783. on: {
  39784. click: $xePager.handleNextJump
  39785. }
  39786. }, [tagName ? h('i', {
  39787. class: ['vxe-pager--jump-more-icon', props.iconJumpMore || getIcon().PAGER_JUMP_MORE]
  39788. }) : null, h('i', {
  39789. class: ['vxe-pager--jump-icon', props.iconJumpNext || getIcon().PAGER_JUMP_NEXT]
  39790. })]);
  39791. },
  39792. // 下一页
  39793. renderNextPage: function renderNextPage(h) {
  39794. var $xePager = this;
  39795. var props = $xePager;
  39796. var slots = $xePager.$scopedSlots;
  39797. var currentPage = props.currentPage,
  39798. total = props.total;
  39799. var nextPageSlot = slots.nextPage || slots['next-page'];
  39800. var pageCount = $xePager.computePageCount;
  39801. if (nextPageSlot) {
  39802. return h('span', {
  39803. class: 'vxe-pager--custom-next-btn'
  39804. }, nextPageSlot({
  39805. $pager: $xePager,
  39806. total: total,
  39807. currentPage: currentPage,
  39808. pageCount: pageCount
  39809. }));
  39810. }
  39811. return h('button', {
  39812. class: ['vxe-pager--next-btn', {
  39813. 'is--disabled': currentPage >= pageCount
  39814. }],
  39815. attrs: {
  39816. type: 'button',
  39817. title: getI18n('vxe.pager.nextPageTitle')
  39818. },
  39819. on: {
  39820. click: $xePager.handleNextPage
  39821. }
  39822. }, [h('i', {
  39823. class: ['vxe-pager--btn-icon', props.iconNextPage || getIcon().PAGER_NEXT_PAGE]
  39824. })]);
  39825. },
  39826. // 最后一页
  39827. renderEndPage: function renderEndPage(h) {
  39828. var $xePager = this;
  39829. var props = $xePager;
  39830. var slots = $xePager.$scopedSlots;
  39831. var currentPage = props.currentPage,
  39832. total = props.total;
  39833. var endSlot = slots.end;
  39834. var pageCount = $xePager.computePageCount;
  39835. if (endSlot) {
  39836. return h('span', {
  39837. class: 'vxe-pager--custom-end-btn'
  39838. }, endSlot({
  39839. $pager: $xePager,
  39840. total: total,
  39841. currentPage: currentPage,
  39842. pageCount: pageCount
  39843. }));
  39844. }
  39845. return h('button', {
  39846. class: ['vxe-pager--end-btn', {
  39847. 'is--disabled': currentPage >= pageCount
  39848. }],
  39849. attrs: {
  39850. type: 'button',
  39851. title: getI18n('vxe.pager.endPageTitle')
  39852. },
  39853. on: {
  39854. click: $xePager.handleEndPage
  39855. }
  39856. }, [h('i', {
  39857. class: ['vxe-pager--btn-icon', props.iconEndPage || getIcon().PAGER_END]
  39858. })]);
  39859. },
  39860. // 页数
  39861. renderNumber: function renderNumber(h, showJump) {
  39862. var $xePager = this;
  39863. var props = $xePager;
  39864. var slots = $xePager.$scopedSlots;
  39865. var currentPage = props.currentPage,
  39866. total = props.total,
  39867. pagerCount = props.pagerCount;
  39868. var numberSlot = showJump ? slots.numberJump || slots['number-jump'] : slots.number;
  39869. var nums = [];
  39870. var pageCount = $xePager.computePageCount;
  39871. var numList = $xePager.computeNumList;
  39872. var offsetNumber = $xePager.computeOffsetNumber;
  39873. var isOv = pageCount > pagerCount;
  39874. var isLt = isOv && currentPage > offsetNumber + 1;
  39875. var isGt = isOv && currentPage < pageCount - offsetNumber;
  39876. var restList = [];
  39877. var startNumber = 1;
  39878. if (isOv) {
  39879. if (currentPage >= pageCount - offsetNumber) {
  39880. startNumber = Math.max(pageCount - numList.length + 1, 1);
  39881. } else {
  39882. startNumber = Math.max(currentPage - offsetNumber, 1);
  39883. }
  39884. }
  39885. if (showJump && isLt) {
  39886. restList.push(1);
  39887. nums.push(h('button', {
  39888. class: 'vxe-pager--num-btn',
  39889. attrs: {
  39890. type: 'button'
  39891. },
  39892. on: {
  39893. click: function click(evnt) {
  39894. return $xePager.handleJumpPageEvent(evnt, 1);
  39895. }
  39896. }
  39897. }, '1'), $xePager.renderPrevJump(h, 'span'));
  39898. }
  39899. numList.forEach(function (item, index) {
  39900. var number = startNumber + index;
  39901. if (number <= pageCount) {
  39902. restList.push(number);
  39903. nums.push(h('button', {
  39904. key: number,
  39905. class: ['vxe-pager--num-btn', {
  39906. 'is--active': currentPage === number
  39907. }],
  39908. attrs: {
  39909. type: 'button'
  39910. },
  39911. on: {
  39912. click: function click(evnt) {
  39913. return $xePager.handleJumpPageEvent(evnt, number);
  39914. }
  39915. }
  39916. }, "".concat(number)));
  39917. }
  39918. });
  39919. if (showJump && isGt) {
  39920. restList.push(pageCount);
  39921. nums.push($xePager.renderNextJump(h, 'button'), h('button', {
  39922. class: 'vxe-pager--num-btn',
  39923. attrs: {
  39924. type: 'button'
  39925. },
  39926. on: {
  39927. click: function click(evnt) {
  39928. return $xePager.handleJumpPageEvent(evnt, pageCount);
  39929. }
  39930. }
  39931. }, pageCount));
  39932. }
  39933. if (numberSlot) {
  39934. return h('span', {
  39935. class: 'vxe-pager--custom-btn-wrapper'
  39936. }, numberSlot({
  39937. $pager: $xePager,
  39938. total: total,
  39939. numList: restList,
  39940. currentPage: currentPage,
  39941. pageCount: pageCount
  39942. }));
  39943. }
  39944. return h('span', {
  39945. class: 'vxe-pager--btn-wrapper'
  39946. }, nums);
  39947. },
  39948. // jumpNumber
  39949. renderJumpNumber: function renderJumpNumber(h) {
  39950. var $xePager = this;
  39951. return $xePager.renderNumber(h, true);
  39952. },
  39953. // sizes
  39954. renderSizes: function renderSizes(h) {
  39955. var $xePager = this;
  39956. var props = $xePager;
  39957. var slots = $xePager.$scopedSlots;
  39958. var currentPage = props.currentPage,
  39959. total = props.total,
  39960. pageSize = props.pageSize,
  39961. pageSizePlacement = props.pageSizePlacement,
  39962. transfer = props.transfer;
  39963. var sizesSlot = slots.sizes;
  39964. var sizeList = $xePager.computeSizeList;
  39965. var pageCount = $xePager.computePageCount;
  39966. if (sizesSlot) {
  39967. return h('span', {
  39968. class: 'vxe-pager--custom-sizes'
  39969. }, sizesSlot({
  39970. $pager: $xePager,
  39971. total: total,
  39972. currentPage: currentPage,
  39973. pageCount: pageCount,
  39974. pageSize: pageSize,
  39975. options: sizeList
  39976. }));
  39977. }
  39978. return h(src_select, {
  39979. class: 'vxe-pager--sizes',
  39980. props: {
  39981. value: pageSize,
  39982. placement: pageSizePlacement,
  39983. transfer: transfer,
  39984. options: sizeList
  39985. },
  39986. on: {
  39987. change: $xePager.pageSizeEvent
  39988. }
  39989. });
  39990. },
  39991. // Jump
  39992. renderJump: function renderJump(h, isFull) {
  39993. var $xePager = this;
  39994. var props = $xePager;
  39995. var reactData = $xePager.reactData;
  39996. var slots = $xePager.$scopedSlots;
  39997. var total = props.total;
  39998. var inpCurrPage = reactData.inpCurrPage;
  39999. var jumpSlot = isFull ? slots.fullJump || slots['full-jump'] : slots.jump;
  40000. var pageCount = $xePager.computePageCount;
  40001. if (jumpSlot) {
  40002. return h('span', {
  40003. class: 'vxe-pager--custom-jump'
  40004. }, jumpSlot({
  40005. $pager: $xePager,
  40006. total: total,
  40007. currentPage: inpCurrPage,
  40008. pageCount: pageCount
  40009. }));
  40010. }
  40011. return h('span', {
  40012. class: 'vxe-pager--jump'
  40013. }, [isFull ? h('span', {
  40014. class: 'vxe-pager--goto-text'
  40015. }, getI18n('vxe.pager.goto')) : null, h(number_input, {
  40016. class: 'vxe-pager--goto',
  40017. props: {
  40018. value: inpCurrPage,
  40019. placeholder: getI18n('vxe.pager.gotoTitle'),
  40020. align: 'center',
  40021. type: 'integer',
  40022. max: pageCount,
  40023. min: 1,
  40024. controls: false
  40025. },
  40026. on: {
  40027. keydown: $xePager.jumpKeydownEvent,
  40028. blur: $xePager.triggerJumpEvent,
  40029. 'modelValue': function modelValue(val) {
  40030. reactData.inpCurrPage = val;
  40031. }
  40032. }
  40033. }), isFull ? h('span', {
  40034. class: 'vxe-pager--classifier-text'
  40035. }, getI18n('vxe.pager.pageClassifier')) : null]);
  40036. },
  40037. // FullJump
  40038. renderFullJump: function renderFullJump(h) {
  40039. var $xePager = this;
  40040. return $xePager.renderJump(h, true);
  40041. },
  40042. // PageCount
  40043. renderPageCount: function renderPageCount(h) {
  40044. var $xePager = this;
  40045. var props = $xePager;
  40046. var slots = $xePager.$scopedSlots;
  40047. var currentPage = props.currentPage,
  40048. total = props.total;
  40049. var pageCountSlot = slots.pageCount || slots['page-count'];
  40050. var pageCount = $xePager.computePageCount;
  40051. if (pageCountSlot) {
  40052. return h('span', {
  40053. class: 'vxe-pager--custom-count'
  40054. }, pageCountSlot({
  40055. $pager: $xePager,
  40056. total: total,
  40057. currentPage: currentPage,
  40058. pageCount: pageCount
  40059. }));
  40060. }
  40061. return h('span', {
  40062. class: 'vxe-pager--count'
  40063. }, [h('span', {
  40064. class: 'vxe-pager--separator'
  40065. }), h('span', pageCount)]);
  40066. },
  40067. // total
  40068. renderTotal: function renderTotal(h) {
  40069. var $xePager = this;
  40070. var props = $xePager;
  40071. var slots = $xePager.$scopedSlots;
  40072. var total = props.total,
  40073. currentPage = props.currentPage;
  40074. var totalSlot = slots.total;
  40075. var pageCount = $xePager.computePageCount;
  40076. if (totalSlot) {
  40077. return h('span', {
  40078. class: 'vxe-pager--custom-total'
  40079. }, totalSlot({
  40080. $pager: $xePager,
  40081. total: total,
  40082. currentPage: currentPage,
  40083. pageCount: pageCount
  40084. }));
  40085. }
  40086. return h('span', {
  40087. class: 'vxe-pager--total'
  40088. }, getI18n('vxe.pager.total', [total]));
  40089. },
  40090. renderVN: function renderVN(h) {
  40091. var $xePager = this;
  40092. var props = $xePager;
  40093. var slots = $xePager.$scopedSlots;
  40094. var $xeGrid = $xePager.$xeGrid;
  40095. var align = props.align,
  40096. layouts = props.layouts,
  40097. className = props.className;
  40098. var childNodes = [];
  40099. var vSize = $xePager.computeSize;
  40100. var pageCount = $xePager.computePageCount;
  40101. if (slots.left) {
  40102. childNodes.push(h('span', {
  40103. class: 'vxe-pager--left-wrapper'
  40104. }, slots.left({
  40105. $grid: $xeGrid
  40106. })));
  40107. }
  40108. layouts.forEach(function (name) {
  40109. var renderFn;
  40110. switch (name) {
  40111. case 'Home':
  40112. renderFn = $xePager.renderHomePage;
  40113. break;
  40114. case 'PrevJump':
  40115. renderFn = $xePager.renderPrevJump;
  40116. break;
  40117. case 'PrevPage':
  40118. renderFn = $xePager.renderPrevPage;
  40119. break;
  40120. case 'Number':
  40121. renderFn = $xePager.renderNumber;
  40122. break;
  40123. case 'JumpNumber':
  40124. renderFn = $xePager.renderJumpNumber;
  40125. break;
  40126. case 'NextPage':
  40127. renderFn = $xePager.renderNextPage;
  40128. break;
  40129. case 'NextJump':
  40130. renderFn = $xePager.renderNextJump;
  40131. break;
  40132. case 'End':
  40133. renderFn = $xePager.renderEndPage;
  40134. break;
  40135. case 'Sizes':
  40136. renderFn = $xePager.renderSizes;
  40137. break;
  40138. case 'FullJump':
  40139. renderFn = $xePager.renderFullJump;
  40140. break;
  40141. case 'Jump':
  40142. renderFn = $xePager.renderJump;
  40143. break;
  40144. case 'PageCount':
  40145. renderFn = $xePager.renderPageCount;
  40146. break;
  40147. case 'Total':
  40148. renderFn = $xePager.renderTotal;
  40149. break;
  40150. }
  40151. if (renderFn) {
  40152. childNodes.push(renderFn(h));
  40153. } else {
  40154. errLog('vxe.error.notProp', ["[pager] layouts -> ".concat(name)]);
  40155. }
  40156. });
  40157. if (slots.right) {
  40158. childNodes.push(h('span', {
  40159. class: 'vxe-pager--right-wrapper'
  40160. }, slots.right({
  40161. $grid: $xeGrid
  40162. })));
  40163. }
  40164. return h('div', {
  40165. ref: 'refElem',
  40166. class: ['vxe-pager', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  40167. $pager: $xePager
  40168. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "align--".concat(align), align), 'is--border', props.border), 'is--background', props.background), 'is--perfect', props.perfect), 'is--hidden', props.autoHidden && pageCount === 1), 'is--loading', props.loading)]
  40169. }, [h('div', {
  40170. class: 'vxe-pager--wrapper'
  40171. }, childNodes)]);
  40172. }
  40173. },
  40174. watch: {
  40175. currentPage: function currentPage(val) {
  40176. var $xePager = this;
  40177. var reactData = $xePager.reactData;
  40178. reactData.inpCurrPage = val;
  40179. }
  40180. },
  40181. created: function created() {
  40182. var $xePager = this;
  40183. var props = $xePager;
  40184. var reactData = $xePager.reactData;
  40185. reactData.inpCurrPage = props.currentPage;
  40186. },
  40187. render: function render(h) {
  40188. return this.renderVN(h);
  40189. }
  40190. })); /* define-vxe-component end */
  40191. ;// CONCATENATED MODULE: ./packages/pager/index.ts
  40192. var VxePager = Object.assign(pager, {
  40193. install: function install(app) {
  40194. app.component(pager.name, pager);
  40195. }
  40196. });
  40197. dynamicApp.use(VxePager);
  40198. index_esm_VxeUI.component(pager);
  40199. var Pager = VxePager;
  40200. /* harmony default export */ var packages_pager = (VxePager);
  40201. ;// CONCATENATED MODULE: ./packages/password-input/src/password-input.ts
  40202. /* harmony default export */ var password_input = (/* define-vxe-component start */defineVxeComponent({
  40203. name: 'VxePasswordInput',
  40204. mixins: [globalMixins.sizeMixin],
  40205. model: {
  40206. prop: 'value',
  40207. event: 'modelValue'
  40208. },
  40209. props: {
  40210. value: String,
  40211. immediate: {
  40212. type: Boolean,
  40213. default: true
  40214. },
  40215. name: String,
  40216. clearable: {
  40217. type: Boolean,
  40218. default: function _default() {
  40219. return getConfig().passwordInput.clearable;
  40220. }
  40221. },
  40222. readonly: Boolean,
  40223. disabled: Boolean,
  40224. maxLength: [String, Number],
  40225. placeholder: String,
  40226. autoComplete: {
  40227. type: String,
  40228. default: 'off'
  40229. },
  40230. className: String,
  40231. size: {
  40232. type: String,
  40233. default: function _default() {
  40234. return getConfig().passwordInput.size || getConfig().size;
  40235. }
  40236. },
  40237. prefixIcon: String,
  40238. suffixIcon: String,
  40239. controls: {
  40240. type: Boolean,
  40241. default: function _default() {
  40242. return getConfig().passwordInput.controls;
  40243. }
  40244. },
  40245. // 已废弃
  40246. autocomplete: String
  40247. },
  40248. inject: {
  40249. $xeForm: {
  40250. default: null
  40251. },
  40252. formItemInfo: {
  40253. from: 'xeFormItemInfo',
  40254. default: null
  40255. }
  40256. },
  40257. data: function data() {
  40258. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  40259. var reactData = {
  40260. showPwd: false,
  40261. isActivated: false,
  40262. inputValue: ''
  40263. };
  40264. return {
  40265. xID: xID,
  40266. reactData: reactData
  40267. };
  40268. },
  40269. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  40270. computeIsClearable: function computeIsClearable() {
  40271. var $xePasswordInput = this;
  40272. var props = $xePasswordInput;
  40273. return props.clearable;
  40274. },
  40275. computeInpReadonly: function computeInpReadonly() {
  40276. var $xePasswordInput = this;
  40277. var props = $xePasswordInput;
  40278. var readonly = props.readonly;
  40279. return readonly;
  40280. },
  40281. computeInpPlaceholder: function computeInpPlaceholder() {
  40282. var $xePasswordInput = this;
  40283. var props = $xePasswordInput;
  40284. var placeholder = props.placeholder;
  40285. if (placeholder) {
  40286. return getFuncText(placeholder);
  40287. }
  40288. var globalPlaceholder = getConfig().passwordInput.placeholder;
  40289. if (globalPlaceholder) {
  40290. return getFuncText(globalPlaceholder);
  40291. }
  40292. return getI18n('vxe.base.pleaseInput');
  40293. },
  40294. computeInputType: function computeInputType() {
  40295. var $xePasswordInput = this;
  40296. var reactData = $xePasswordInput.reactData;
  40297. var showPwd = reactData.showPwd;
  40298. if (showPwd) {
  40299. return 'text';
  40300. }
  40301. return 'password';
  40302. },
  40303. computeInpImmediate: function computeInpImmediate() {
  40304. var $xePasswordInput = this;
  40305. var props = $xePasswordInput;
  40306. var immediate = props.immediate;
  40307. return immediate;
  40308. }
  40309. }),
  40310. methods: {
  40311. //
  40312. // Method
  40313. //
  40314. dispatchEvent: function dispatchEvent(type, params, evnt) {
  40315. var $xePasswordInput = this;
  40316. $xePasswordInput.$emit(type, createEvent(evnt, {
  40317. $passwordInput: $xePasswordInput
  40318. }, params));
  40319. },
  40320. emitModel: function emitModel(value) {
  40321. var $xePasswordInput = this;
  40322. var _events = $xePasswordInput._events;
  40323. if (_events && _events.modelValue) {
  40324. $xePasswordInput.$emit('modelValue', value);
  40325. } else {
  40326. $xePasswordInput.$emit('model-value', value);
  40327. }
  40328. },
  40329. focus: function focus() {
  40330. var $xePasswordInput = this;
  40331. var reactData = $xePasswordInput.reactData;
  40332. var inputElem = $xePasswordInput.$refs.refInputTarget;
  40333. reactData.isActivated = true;
  40334. inputElem.focus();
  40335. return $xePasswordInput.$nextTick();
  40336. },
  40337. blur: function blur() {
  40338. var $xePasswordInput = this;
  40339. var reactData = $xePasswordInput.reactData;
  40340. var inputElem = $xePasswordInput.$refs.refInputTarget;
  40341. inputElem.blur();
  40342. reactData.isActivated = false;
  40343. return $xePasswordInput.$nextTick();
  40344. },
  40345. select: function select() {
  40346. var $xePasswordInput = this;
  40347. var reactData = $xePasswordInput.reactData;
  40348. var inputElem = $xePasswordInput.$refs.refInputTarget;
  40349. inputElem.select();
  40350. reactData.isActivated = false;
  40351. return $xePasswordInput.$nextTick();
  40352. },
  40353. triggerEvent: function triggerEvent(evnt) {
  40354. var $xePasswordInput = this;
  40355. var reactData = $xePasswordInput.reactData;
  40356. var inputValue = reactData.inputValue;
  40357. $xePasswordInput.dispatchEvent(evnt.type, {
  40358. value: inputValue
  40359. }, evnt);
  40360. },
  40361. emitInputEvent: function emitInputEvent(value, evnt) {
  40362. var $xePasswordInput = this;
  40363. var reactData = $xePasswordInput.reactData;
  40364. var inpImmediate = $xePasswordInput.computeInpImmediate;
  40365. reactData.inputValue = value;
  40366. if (inpImmediate) {
  40367. $xePasswordInput.handleChange(value, evnt);
  40368. } else {
  40369. $xePasswordInput.dispatchEvent('input', {
  40370. value: value
  40371. }, evnt);
  40372. }
  40373. },
  40374. inputEvent: function inputEvent(evnt) {
  40375. var $xePasswordInput = this;
  40376. var inputElem = evnt.target;
  40377. var value = inputElem.value;
  40378. $xePasswordInput.emitInputEvent(value, evnt);
  40379. },
  40380. handleChange: function handleChange(value, evnt) {
  40381. var $xePasswordInput = this;
  40382. var props = $xePasswordInput;
  40383. var reactData = $xePasswordInput.reactData;
  40384. var $xeForm = $xePasswordInput.$xeForm;
  40385. var formItemInfo = $xePasswordInput.formItemInfo;
  40386. reactData.inputValue = value;
  40387. $xePasswordInput.emitModel(value);
  40388. $xePasswordInput.dispatchEvent('input', {
  40389. value: value
  40390. }, evnt);
  40391. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(props.value) !== value) {
  40392. $xePasswordInput.dispatchEvent('change', {
  40393. value: value
  40394. }, evnt);
  40395. // 自动更新校验状态
  40396. if ($xeForm && formItemInfo) {
  40397. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  40398. }
  40399. }
  40400. },
  40401. changeEvent: function changeEvent(evnt) {
  40402. var $xePasswordInput = this;
  40403. var reactData = $xePasswordInput.reactData;
  40404. var $xeForm = $xePasswordInput.$xeForm;
  40405. var formItemInfo = $xePasswordInput.formItemInfo;
  40406. $xePasswordInput.triggerEvent(evnt);
  40407. $xePasswordInput.dispatchEvent('lazy-change', {
  40408. value: reactData.inputValue
  40409. }, evnt);
  40410. // 自动更新校验状态
  40411. if ($xeForm && formItemInfo) {
  40412. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, reactData.inputValue);
  40413. }
  40414. },
  40415. focusEvent: function focusEvent(evnt) {
  40416. var $xePasswordInput = this;
  40417. var reactData = $xePasswordInput.reactData;
  40418. reactData.isActivated = true;
  40419. $xePasswordInput.triggerEvent(evnt);
  40420. },
  40421. blurEvent: function blurEvent(evnt) {
  40422. var $xePasswordInput = this;
  40423. var reactData = $xePasswordInput.reactData;
  40424. var $xeForm = $xePasswordInput.$xeForm;
  40425. var formItemInfo = $xePasswordInput.formItemInfo;
  40426. var inputValue = reactData.inputValue;
  40427. var value = inputValue;
  40428. $xePasswordInput.dispatchEvent('blur', {
  40429. value: value
  40430. }, evnt);
  40431. // 自动更新校验状态
  40432. if ($xeForm && formItemInfo) {
  40433. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  40434. }
  40435. },
  40436. passwordToggleEvent: function passwordToggleEvent(evnt) {
  40437. var $xePasswordInput = this;
  40438. var props = $xePasswordInput;
  40439. var reactData = $xePasswordInput.reactData;
  40440. var readonly = props.readonly,
  40441. disabled = props.disabled;
  40442. var showPwd = reactData.showPwd;
  40443. if (!disabled && !readonly) {
  40444. reactData.showPwd = !showPwd;
  40445. }
  40446. $xePasswordInput.dispatchEvent('toggle-visible', {
  40447. visible: reactData.showPwd
  40448. }, evnt);
  40449. },
  40450. clickEvent: function clickEvent(evnt) {
  40451. var $xePasswordInput = this;
  40452. $xePasswordInput.triggerEvent(evnt);
  40453. },
  40454. clearValueEvent: function clearValueEvent(evnt, value) {
  40455. var $xePasswordInput = this;
  40456. $xePasswordInput.focus();
  40457. $xePasswordInput.handleChange('', evnt);
  40458. $xePasswordInput.dispatchEvent('clear', {
  40459. value: value
  40460. }, evnt);
  40461. $xePasswordInput.dispatchEvent('lazy-change', {
  40462. value: value
  40463. }, evnt);
  40464. },
  40465. clickSuffixEvent: function clickSuffixEvent(evnt) {
  40466. var $xePasswordInput = this;
  40467. var props = $xePasswordInput;
  40468. var reactData = $xePasswordInput.reactData;
  40469. var disabled = props.disabled;
  40470. if (!disabled) {
  40471. var inputValue = reactData.inputValue;
  40472. $xePasswordInput.dispatchEvent('suffix-click', {
  40473. value: inputValue
  40474. }, evnt);
  40475. }
  40476. },
  40477. clickPrefixEvent: function clickPrefixEvent(evnt) {
  40478. var $xePasswordInput = this;
  40479. var props = $xePasswordInput;
  40480. var reactData = $xePasswordInput.reactData;
  40481. var disabled = props.disabled;
  40482. if (!disabled) {
  40483. var inputValue = reactData.inputValue;
  40484. $xePasswordInput.dispatchEvent('prefix-click', {
  40485. value: inputValue
  40486. }, evnt);
  40487. }
  40488. },
  40489. //
  40490. // Render
  40491. //
  40492. renderPasswordIcon: function renderPasswordIcon(h) {
  40493. var $xePasswordInput = this;
  40494. var reactData = $xePasswordInput.reactData;
  40495. var showPwd = reactData.showPwd;
  40496. return h('div', {
  40497. class: 'vxe-password-input--control-icon',
  40498. on: {
  40499. click: $xePasswordInput.passwordToggleEvent
  40500. }
  40501. }, [h('i', {
  40502. class: ['vxe-password-input--password-icon', showPwd ? getIcon().PASSWORD_INPUT_SHOW_PWD : getIcon().PASSWORD_INPUT_HIDE_PWD]
  40503. })]);
  40504. },
  40505. renderPrefixIcon: function renderPrefixIcon(h) {
  40506. var $xePasswordInput = this;
  40507. var props = $xePasswordInput;
  40508. var slots = $xePasswordInput.$scopedSlots;
  40509. var prefixIcon = props.prefixIcon;
  40510. var prefixSlot = slots.prefix;
  40511. return prefixSlot || prefixIcon ? h('div', {
  40512. class: 'vxe-password-input--prefix',
  40513. on: {
  40514. click: $xePasswordInput.clickPrefixEvent
  40515. }
  40516. }, [h('div', {
  40517. class: 'vxe-password-input--prefix-icon'
  40518. }, prefixSlot ? vn_getSlotVNs(prefixSlot({})) : [h('i', {
  40519. class: prefixIcon
  40520. })])]) : null;
  40521. },
  40522. renderSuffixIcon: function renderSuffixIcon(h) {
  40523. var $xePasswordInput = this;
  40524. var props = $xePasswordInput;
  40525. var slots = $xePasswordInput.$scopedSlots;
  40526. var reactData = $xePasswordInput.reactData;
  40527. var disabled = props.disabled,
  40528. suffixIcon = props.suffixIcon,
  40529. controls = props.controls;
  40530. var inputValue = reactData.inputValue;
  40531. var suffixSlot = slots.suffix;
  40532. var isClearable = $xePasswordInput.computeIsClearable;
  40533. return isClearable || controls || suffixSlot || suffixIcon ? h('div', {
  40534. class: ['vxe-password-input--suffix', {
  40535. 'is--clear': isClearable && !disabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue))
  40536. }]
  40537. }, [isClearable ? h('div', {
  40538. class: 'vxe-password-input--clear-icon',
  40539. on: {
  40540. click: $xePasswordInput.clearValueEvent
  40541. }
  40542. }, [h('i', {
  40543. class: getIcon().INPUT_CLEAR
  40544. })]) : renderEmptyElement($xePasswordInput), controls ? $xePasswordInput.renderPasswordIcon(h) : renderEmptyElement($xePasswordInput), suffixSlot || suffixIcon ? h('div', {
  40545. class: 'vxe-password-input--suffix-icon',
  40546. on: {
  40547. click: $xePasswordInput.clickSuffixEvent
  40548. }
  40549. }, suffixSlot ? vn_getSlotVNs(suffixSlot({})) : [h('i', {
  40550. class: suffixIcon
  40551. })]) : renderEmptyElement($xePasswordInput)]) : null;
  40552. },
  40553. renderVN: function renderVN(h) {
  40554. var $xePasswordInput = this;
  40555. var props = $xePasswordInput;
  40556. var reactData = $xePasswordInput.reactData;
  40557. var className = props.className,
  40558. name = props.name,
  40559. disabled = props.disabled,
  40560. readonly = props.readonly,
  40561. autocomplete = props.autocomplete,
  40562. autoComplete = props.autoComplete,
  40563. maxLength = props.maxLength;
  40564. var inputValue = reactData.inputValue,
  40565. isActivated = reactData.isActivated;
  40566. var vSize = $xePasswordInput.computeSize;
  40567. var inpReadonly = $xePasswordInput.computeInpReadonly;
  40568. var inputType = $xePasswordInput.computeInputType;
  40569. var inpPlaceholder = $xePasswordInput.computeInpPlaceholder;
  40570. var isClearable = $xePasswordInput.computeIsClearable;
  40571. var prefix = $xePasswordInput.renderPrefixIcon(h);
  40572. var suffix = $xePasswordInput.renderSuffixIcon(h);
  40573. return h('div', {
  40574. ref: 'refElem',
  40575. class: ['vxe-password-input', className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--prefix', !!prefix), 'is--suffix', !!suffix), 'is--readonly', readonly), 'is--disabled', disabled), 'is--active', isActivated), 'show--clear', isClearable && !disabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue)))],
  40576. attrs: {
  40577. spellcheck: false
  40578. }
  40579. }, [prefix || renderEmptyElement($xePasswordInput), h('div', {
  40580. class: 'vxe-password-input--wrapper'
  40581. }, [h('input', {
  40582. ref: 'refInputTarget',
  40583. class: 'vxe-password-input--inner',
  40584. domProps: {
  40585. value: inputValue
  40586. },
  40587. attrs: {
  40588. name: name,
  40589. type: inputType,
  40590. placeholder: inpPlaceholder,
  40591. readonly: inpReadonly,
  40592. disabled: disabled,
  40593. autocomplete: autocomplete || autoComplete,
  40594. maxlength: maxLength
  40595. },
  40596. on: {
  40597. click: $xePasswordInput.clickEvent,
  40598. input: $xePasswordInput.inputEvent,
  40599. change: $xePasswordInput.changeEvent,
  40600. focus: $xePasswordInput.focusEvent,
  40601. blur: $xePasswordInput.blurEvent
  40602. }
  40603. })]), suffix || renderEmptyElement($xePasswordInput)]);
  40604. }
  40605. },
  40606. watch: {
  40607. value: function value(val) {
  40608. var $xePasswordInput = this;
  40609. var reactData = $xePasswordInput.reactData;
  40610. reactData.inputValue = val;
  40611. }
  40612. },
  40613. created: function created() {
  40614. var $xePasswordInput = this;
  40615. var props = $xePasswordInput;
  40616. var reactData = $xePasswordInput.reactData;
  40617. reactData.inputValue = props.value;
  40618. },
  40619. render: function render(h) {
  40620. return this.renderVN(h);
  40621. }
  40622. })); /* define-vxe-component end */
  40623. ;// CONCATENATED MODULE: ./packages/password-input/index.ts
  40624. var VxePasswordInput = Object.assign({}, password_input, {
  40625. install: function install(app) {
  40626. app.component(password_input.name, password_input);
  40627. }
  40628. });
  40629. dynamicApp.use(VxePasswordInput);
  40630. index_esm_VxeUI.component(password_input);
  40631. var PasswordInput = VxePasswordInput;
  40632. /* harmony default export */ var packages_password_input = (VxePasswordInput);
  40633. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
  40634. var web_url = __webpack_require__(3296);
  40635. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.to-json.js
  40636. var web_url_to_json = __webpack_require__(7208);
  40637. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
  40638. var web_url_search_params = __webpack_require__(8408);
  40639. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js
  40640. var web_url_search_params_delete = __webpack_require__(4603);
  40641. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js
  40642. var web_url_search_params_has = __webpack_require__(7566);
  40643. // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
  40644. var web_url_search_params_size = __webpack_require__(8721);
  40645. ;// CONCATENATED MODULE: ./packages/print/src/util.ts
  40646. var util_browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
  40647. // 打印
  40648. var printFrame;
  40649. // 默认导出或打印的 HTML 样式
  40650. var defaultHtmlStyle = 'body{padding:0;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu}body *{-webkit-box-sizing:border-box;box-sizing:border-box}.vxe-table{border-collapse:collapse;text-align:left;border-spacing:0}.vxe-table:not(.is--print){table-layout:fixed}.vxe-table,.vxe-table th,.vxe-table td,.vxe-table td{border-color:#D0D0D0;border-style:solid;border-width:0}.vxe-table.is--print{width:100%}.border--default,.border--full,.border--outer{border-top-width:1px}.border--default,.border--full,.border--outer{border-left-width:1px}.border--outer,.border--default th,.border--default td,.border--full th,.border--full td,.border--outer th,.border--inner th,.border--inner td{border-bottom-width:1px}.border--default,.border--outer,.border--full th,.border--full td{border-right-width:1px}.border--default th,.border--full th,.border--outer th{background-color:#f8f8f9}.vxe-table td>div,.vxe-table th>div{padding:.5em .4em}.col--center{text-align:center}.col--right{text-align:right}.vxe-table:not(.is--print) .col--ellipsis>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vxe-table--tree-node{text-align:left}.vxe-table--tree-node-wrapper{position:relative}.vxe-table--tree-icon-wrapper{position:absolute;top:50%;width:1em;height:1em;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.vxe-table--tree-unfold-icon,.vxe-table--tree-fold-icon{position:absolute;width:0;height:0;border-style:solid;border-width:.5em;border-right-color:transparent;border-bottom-color:transparent}.vxe-table--tree-unfold-icon{left:.3em;top:0;border-left-color:#939599;border-top-color:transparent}.vxe-table--tree-fold-icon{left:0;top:.3em;border-left-color:transparent;border-top-color:#939599}.vxe-table--tree-cell{display:block;padding-left:1.5em}.vxe-table input[type="checkbox"]{margin:0}.vxe-table input[type="checkbox"],.vxe-table input[type="radio"],.vxe-table input[type="checkbox"]+span,.vxe-table input[type="radio"]+span{vertical-align:middle;padding-left:0.4em}';
  40651. function trimHtml(html) {
  40652. return "".concat(html).replace(/(<!---->)/, '');
  40653. }
  40654. function createPrintFrame() {
  40655. var frame = document.createElement('iframe');
  40656. frame.className = 'vxe-table--print-frame';
  40657. return frame;
  40658. }
  40659. function appendPrintFrame() {
  40660. if (!printFrame.parentNode) {
  40661. document.body.appendChild(printFrame);
  40662. }
  40663. }
  40664. function afterPrintEvent() {
  40665. requestAnimationFrame(removeFrame);
  40666. }
  40667. function removeFrame() {
  40668. if (printFrame) {
  40669. if (printFrame.parentNode) {
  40670. try {
  40671. printFrame.contentDocument.write('');
  40672. } catch (e) {}
  40673. printFrame.parentNode.removeChild(printFrame);
  40674. }
  40675. printFrame = null;
  40676. }
  40677. }
  40678. function getExportBlobByString(str, type) {
  40679. return new Blob([str], {
  40680. type: "text/".concat(type, ";charset=utf-8;")
  40681. });
  40682. }
  40683. var defaultPrintMargin = 50;
  40684. var defaultFontColor = '#000000';
  40685. function parsePageStyle(val) {
  40686. var styOpts = Object.assign({}, val);
  40687. var headStyOpts = Object.assign({}, styOpts.header);
  40688. var titStyOpts = Object.assign({}, styOpts.title);
  40689. var footStyOpts = Object.assign({}, styOpts.footer);
  40690. var pnStyOpts = Object.assign({}, styOpts.pageNumber);
  40691. var mVal = defaultPrintMargin;
  40692. var marginTop = mVal;
  40693. var marginBottom = mVal;
  40694. var marginLeft = mVal;
  40695. var marginRight = mVal;
  40696. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(styOpts.margin) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(styOpts.margin)) {
  40697. mVal = styOpts.margin;
  40698. marginTop = mVal;
  40699. marginBottom = mVal;
  40700. marginLeft = mVal;
  40701. marginRight = mVal;
  40702. }
  40703. return {
  40704. marginTop: toCssUnit(styOpts.marginTop || marginTop),
  40705. marginBottom: toCssUnit(styOpts.marginBottom || marginBottom),
  40706. marginLeft: toCssUnit(styOpts.marginLeft || marginLeft),
  40707. marginRight: toCssUnit(styOpts.marginRight || marginRight),
  40708. fontSize: toCssUnit(styOpts.fontSize),
  40709. color: styOpts.color,
  40710. textAlign: styOpts.textAlign,
  40711. header: {
  40712. height: toCssUnit(headStyOpts.height),
  40713. textAlign: headStyOpts.textAlign
  40714. },
  40715. title: {
  40716. color: titStyOpts.color,
  40717. fontSize: toCssUnit(titStyOpts.fontSize),
  40718. textAlign: titStyOpts.textAlign
  40719. },
  40720. footer: {
  40721. height: toCssUnit(footStyOpts.height),
  40722. textAlign: footStyOpts.textAlign
  40723. },
  40724. pageNumber: {
  40725. color: pnStyOpts.color,
  40726. fontSize: toCssUnit(pnStyOpts.fontSize),
  40727. textAlign: pnStyOpts.textAlign
  40728. }
  40729. };
  40730. }
  40731. function createHtmlPage(opts, printHtml) {
  40732. var pageStyle = opts.pageStyle,
  40733. customStyle = opts.customStyle;
  40734. var pageStyObj = parsePageStyle(pageStyle);
  40735. var headStyOpts = pageStyObj.header;
  40736. var titStyOpts = pageStyObj.title;
  40737. var footStyOpts = pageStyObj.header;
  40738. var pnStyOpts = pageStyObj.pageNumber;
  40739. var isPbMode = opts._pageBreaks || opts.pageBreaks && opts.pageBreaks.length;
  40740. return ['<!DOCTYPE html><html>', '<head>', '<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">', "<title>".concat(opts.title || '', "</title>"), "<style media=\"print\">@page{size:auto;".concat(isPbMode ? 'margin: 0mm;' : '', "}</style>"), "<style>body{font-size:".concat(pageStyObj.fontSize || '14px', ";color:").concat(pageStyObj.color || defaultFontColor, ";text-align:").concat(pageStyObj.textAlign || 'left', ";}</style>"), '<style>', '.vxe-print-slots{display:none;}', '.vxe-print-page-break.align--center{text-align:center;}', '.vxe-print-page-break.align--left{text-align:left;}', '.vxe-print-page-break.align--right{text-align:right;}', '.vxe-print-page-break{break-before:always;page-break-before:always;display:flex;flex-direction:column;height:100vh;overflow:hidden;}', '.vxe-print-page-break--body{display:flex;flex-direction:row;flex-grow:1;overflow:hidden;}', '.vxe-print-page-break--left,.vxe-print-page-break--right{flex-shrink:0;height:100%;}', ".vxe-print-page-break--left{width:".concat(pageStyObj.marginLeft, ";}"), ".vxe-print-page-break--right{width:".concat(pageStyObj.marginRight, ";}"), '.vxe-print-page-break--header,.vxe-print-page-break--footer{display:flex;justify-content:center;flex-direction:column;flex-shrink:0;width:100%;}', ".vxe-print-page-break--header{height:".concat(headStyOpts.height || pageStyObj.marginTop, ";padding:0 ").concat(pageStyObj.marginLeft, " 0 ").concat(pageStyObj.marginRight, ";text-align:").concat(headStyOpts.textAlign || 'left', ";}"), ".vxe-print-page-break--header-title{font-size:".concat(titStyOpts.fontSize || '1.6em', ";color:").concat(titStyOpts.color || defaultFontColor, ";text-align:").concat(opts.headerAlign || pnStyOpts.textAlign || 'center', ";}"), ".vxe-print-page-break--footer{height:".concat(footStyOpts.height || pageStyObj.marginBottom, ";padding:0 ").concat(pageStyObj.marginLeft, " 0 ").concat(pageStyObj.marginRight, ";text-align:").concat(footStyOpts.textAlign || 'left', ";}"), '.vxe-print-page-break--content{flex-grow:1;overflow:hidden;}', ".vxe-print-page-break--footer-page-number{font-size:".concat(pnStyOpts.fontSize || '1.2em', ";color:").concat(pnStyOpts.color || defaultFontColor, ";text-align:").concat(opts.footerAlign || pnStyOpts.textAlign || 'center', ";}"), '</style>', '<style>.vxe-table{white-space:pre;}</style>', "<style>".concat(defaultHtmlStyle, "</style>"), isPbMode ? '<style>body{margin:0;}</style>' : '', customStyle ? "<style>".concat(customStyle, "</style>") : '', '</head>', '<body>', "".concat(printHtml), '</body>', '</html>'].join('');
  40741. }
  40742. function handlePrint(opts) {
  40743. var printHtml = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  40744. var beforeMethod = opts.beforeMethod;
  40745. if (beforeMethod) {
  40746. printHtml = beforeMethod({
  40747. content: printHtml,
  40748. html: printHtml,
  40749. options: opts
  40750. }) || '';
  40751. }
  40752. printHtml = createHtmlPage(opts, printHtml);
  40753. var blob = getExportBlobByString(printHtml, 'html');
  40754. return new Promise(function (resolve) {
  40755. if (util_browseObj.msie) {
  40756. removeFrame();
  40757. printFrame = createPrintFrame();
  40758. appendPrintFrame();
  40759. var contentDocument = printFrame.contentDocument;
  40760. if (contentDocument) {
  40761. contentDocument.write(printHtml);
  40762. contentDocument.execCommand('print');
  40763. }
  40764. setTimeout(function () {
  40765. resolve({
  40766. status: true
  40767. });
  40768. }, 300);
  40769. } else {
  40770. if (!printFrame) {
  40771. printFrame = createPrintFrame();
  40772. printFrame.onload = function (evnt) {
  40773. var frameEl = evnt.target;
  40774. if (frameEl.src) {
  40775. try {
  40776. var contentWindow = frameEl.contentWindow;
  40777. if (contentWindow) {
  40778. contentWindow.onafterprint = afterPrintEvent;
  40779. contentWindow.print();
  40780. }
  40781. } catch (e) {}
  40782. }
  40783. resolve({
  40784. status: true
  40785. });
  40786. };
  40787. printFrame.onerror = function () {
  40788. resolve({
  40789. status: false
  40790. });
  40791. };
  40792. }
  40793. appendPrintFrame();
  40794. printFrame.src = URL.createObjectURL(blob);
  40795. }
  40796. });
  40797. }
  40798. function createPageBreak(opts) {
  40799. var title = opts.title,
  40800. showPageNumber = opts.showPageNumber,
  40801. align = opts.align,
  40802. headerAlign = opts.headerAlign,
  40803. footerAlign = opts.footerAlign,
  40804. showAllPageTitle = opts.showAllPageTitle;
  40805. var pageBreaks = opts.pageBreaks || [];
  40806. var pageCount = pageBreaks.length;
  40807. return pageBreaks.map(function (item, index) {
  40808. var bodyHtml = item.bodyHtml;
  40809. var headerHtml = item.headerHtml || opts.headerHtml;
  40810. var footerHtml = item.footerHtml || opts.footerHtml;
  40811. var leftHtml = item.leftHtml || opts.leftHtml;
  40812. var rightHtml = item.rightHtml || opts.rightHtml;
  40813. var currentPage = index + 1;
  40814. var params = {
  40815. currentPage: currentPage,
  40816. pageCount: pageCount
  40817. };
  40818. return ["<div class=\"".concat(['vxe-print-page-break', align ? "align--".concat(align) : ''].join(' '), "\">"), "<div class=\"".concat(['vxe-print-page-break--header', headerAlign ? "align--".concat(headerAlign) : ''].join(' '), "\">"), headerHtml ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerHtml) ? headerHtml(params) : headerHtml || '') : title && (showAllPageTitle || !index) ? "<div class=\"vxe-print-page-break--header-title\">".concat(title || '', "</div>") : '', '</div>', '<div class="vxe-print-page-break--body">', "<div class=\"vxe-print-page-break--left\">".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(leftHtml) ? leftHtml(params) : leftHtml || '', "</div>"), "<div class=\"vxe-print-page-break--content\">".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(bodyHtml) ? bodyHtml(params) : bodyHtml || '', "</div>"), "<div class=\"vxe-print-page-break--right\">".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rightHtml) ? rightHtml(params) : rightHtml || '', "</div>"), '</div>', "<div class=\"".concat(['vxe-print-page-break--footer', footerAlign ? "align--".concat(footerAlign) : ''].join(' '), "\">"), footerHtml ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerHtml) ? footerHtml(params) : footerHtml || '') : showPageNumber ? "<div class=\"vxe-print-page-break--footer-page-number\">".concat(currentPage, "/").concat(pageCount, "</div>") : '', '</div>', '</div>'].join('');
  40819. }).join('');
  40820. }
  40821. var printHtml = function printHtml(options) {
  40822. var opts = Object.assign({
  40823. _pageBreaks: false,
  40824. customLayout: true
  40825. }, options);
  40826. if (opts.sheetName) {
  40827. opts.title = opts.title || opts.sheetName;
  40828. }
  40829. if (opts.style) {
  40830. opts.customStyle = opts.customStyle || opts.style;
  40831. }
  40832. if (opts.beforePrintMethod) {
  40833. opts.beforeMethod = opts.beforeMethod || opts.beforePrintMethod;
  40834. }
  40835. if (opts.pageBreaks && opts.pageBreaks.length) {
  40836. return handlePrint(opts, createPageBreak(opts));
  40837. }
  40838. var printHtml = opts.html || opts.content;
  40839. return handlePrint(opts, printHtml);
  40840. };
  40841. function assemblePageBreak($xePageBreak, elem, pageBreakConfig) {
  40842. var staticPageBreaks = $xePageBreak.reactData.staticPageBreaks;
  40843. var parentElem = elem.parentNode;
  40844. if (parentElem && staticPageBreaks) {
  40845. staticPageBreaks.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, pageBreakConfig);
  40846. $xePageBreak.reactData.staticPageBreaks = staticPageBreaks.slice(0);
  40847. }
  40848. }
  40849. function destroyPageBreak($xePageBreak, pageBreakConfig) {
  40850. $xePageBreak.reactData.staticPageBreaks = $xePageBreak.reactData.staticPageBreaks.filter(function (item) {
  40851. return item.id !== pageBreakConfig.id;
  40852. });
  40853. }
  40854. ;// CONCATENATED MODULE: ./packages/print/src/page-break.ts
  40855. /* harmony default export */ var page_break = (/* define-vxe-component start */defineVxeComponent({
  40856. name: 'VxePrintPageBreak',
  40857. props: {},
  40858. data: function data() {
  40859. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  40860. var reactData = {};
  40861. var pageBreakConfig = {
  40862. id: xID,
  40863. slots: {}
  40864. };
  40865. return {
  40866. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  40867. reactData: reactData,
  40868. pageBreakConfig: pageBreakConfig
  40869. };
  40870. },
  40871. inject: {
  40872. $xePrint: {
  40873. default: null
  40874. }
  40875. },
  40876. computed: _objectSpread2({}, {}),
  40877. methods: {
  40878. //
  40879. // Method
  40880. //
  40881. dispatchEvent: function dispatchEvent(type, params, evnt) {
  40882. var $xePrintPageBreak = this;
  40883. $xePrintPageBreak.$emit(type, createEvent(evnt, {
  40884. $printPageBreak: $xePrintPageBreak
  40885. }, params));
  40886. },
  40887. //
  40888. // Render
  40889. //
  40890. renderVN: function renderVN(h) {
  40891. return h('div', {
  40892. ref: 'refElem'
  40893. });
  40894. }
  40895. },
  40896. mounted: function mounted() {
  40897. var $xePrintPageBreak = this;
  40898. var slots = $xePrintPageBreak.$scopedSlots;
  40899. var $xePrint = $xePrintPageBreak.$xePrint;
  40900. var pageBreakConfig = $xePrintPageBreak.pageBreakConfig;
  40901. pageBreakConfig.slots = slots;
  40902. var elem = $xePrintPageBreak.$refs.refElem;
  40903. if ($xePrint && elem) {
  40904. assemblePageBreak($xePrint, elem, pageBreakConfig);
  40905. }
  40906. },
  40907. beforeDestroy: function beforeDestroy() {
  40908. var $xePrintPageBreak = this;
  40909. var $xePrint = $xePrintPageBreak.$xePrint;
  40910. var pageBreakConfig = $xePrintPageBreak.pageBreakConfig;
  40911. if ($xePrint) {
  40912. destroyPageBreak($xePrint, pageBreakConfig);
  40913. }
  40914. },
  40915. render: function render(h) {
  40916. return this.renderVN(h);
  40917. }
  40918. })); /* define-vxe-component end */
  40919. ;// CONCATENATED MODULE: ./packages/print-page-break/index.ts
  40920. var VxePrintPageBreak = Object.assign({}, page_break, {
  40921. install: function install(app) {
  40922. app.component(page_break.name, page_break);
  40923. }
  40924. });
  40925. index_esm_VxeUI.component(page_break);
  40926. var PrintPageBreak = VxePrintPageBreak;
  40927. /* harmony default export */ var print_page_break = (VxePrintPageBreak);
  40928. ;// CONCATENATED MODULE: ./packages/print/src/print.ts
  40929. /* harmony default export */ var print = (/* define-vxe-component start */defineVxeComponent({
  40930. name: 'VxePrint',
  40931. props: {
  40932. align: {
  40933. type: String,
  40934. default: function _default() {
  40935. return getConfig().print.align;
  40936. }
  40937. },
  40938. title: String,
  40939. headerAlign: {
  40940. type: String,
  40941. default: function _default() {
  40942. return getConfig().print.headerAlign;
  40943. }
  40944. },
  40945. footerAlign: {
  40946. type: String,
  40947. default: function _default() {
  40948. return getConfig().print.footerAlign;
  40949. }
  40950. },
  40951. showPageNumber: {
  40952. type: Boolean,
  40953. default: function _default() {
  40954. return getConfig().print.showPageNumber;
  40955. }
  40956. },
  40957. customLayout: Boolean,
  40958. pageBreaks: Array,
  40959. content: String,
  40960. html: String,
  40961. headerHtml: String,
  40962. footerHtml: String,
  40963. leftHtml: String,
  40964. rightHtml: String,
  40965. showAllPageTitle: {
  40966. type: Boolean,
  40967. default: function _default() {
  40968. return getConfig().print.showAllPageTitle;
  40969. }
  40970. },
  40971. pageStyle: {
  40972. type: Object,
  40973. default: function _default() {
  40974. return getConfig().print.pageStyle;
  40975. }
  40976. },
  40977. customStyle: {
  40978. type: String,
  40979. default: function _default() {
  40980. return getConfig().print.customStyle;
  40981. }
  40982. },
  40983. beforeMethod: Function
  40984. },
  40985. provide: function provide() {
  40986. var $xePrint = this;
  40987. return {
  40988. $xePrint: $xePrint
  40989. };
  40990. },
  40991. data: function data() {
  40992. var reactData = {
  40993. staticPageBreaks: []
  40994. };
  40995. return {
  40996. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  40997. reactData: reactData
  40998. };
  40999. },
  41000. methods: {
  41001. //
  41002. // Method
  41003. //
  41004. dispatchEvent: function dispatchEvent(type, params, evnt) {
  41005. var $xePrint = this;
  41006. $xePrint.$emit(type, createEvent(evnt, {
  41007. $print: $xePrint
  41008. }, params));
  41009. },
  41010. print: function print() {
  41011. var $xePrint = this;
  41012. var props = $xePrint;
  41013. var reactData = $xePrint.reactData;
  41014. var elem = $xePrint.$refs.refElem;
  41015. return printHtml(Object.assign({}, props, {
  41016. _pageBreaks: !!reactData.staticPageBreaks.length,
  41017. html: trimHtml(elem ? elem.outerHTML : '') || props.html || props.content || ''
  41018. }));
  41019. },
  41020. //
  41021. // Render
  41022. //
  41023. renderPageConfigLayouts: function renderPageConfigLayouts(h) {
  41024. var $xePrint = this;
  41025. var props = $xePrint;
  41026. var title = props.title,
  41027. showPageNumber = props.showPageNumber,
  41028. showAllPageTitle = props.showAllPageTitle,
  41029. align = props.align,
  41030. headerAlign = props.headerAlign,
  41031. footerAlign = props.footerAlign;
  41032. var pageBreaks = props.pageBreaks || [];
  41033. var pageCount = pageBreaks.length;
  41034. return pageBreaks.map(function (item, index) {
  41035. var bodyHtml = item.bodyHtml;
  41036. var headerHtml = item.headerHtml || props.headerHtml;
  41037. var footerHtml = item.footerHtml || props.footerHtml;
  41038. var leftHtml = item.leftHtml || props.leftHtml;
  41039. var rightHtml = item.rightHtml || props.rightHtml;
  41040. var currentPage = index + 1;
  41041. var params = {
  41042. currentPage: currentPage,
  41043. pageCount: pageCount
  41044. };
  41045. return h('div', {
  41046. class: ['vxe-print-page-break', align ? "align--".concat(align) : '']
  41047. }, [h('div', {
  41048. class: ['vxe-print-page-break--header', headerAlign ? "align--".concat(headerAlign) : '']
  41049. }, headerHtml ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(headerHtml) ? headerHtml(params) : headerHtml || '') : [title && (showAllPageTitle || !index) ? h('div', {
  41050. class: 'vxe-print-page-break--header-title'
  41051. }, "".concat(title || '')) : renderEmptyElement($xePrint)]), h('div', {
  41052. class: 'vxe-print-page-break--body'
  41053. }, [h('div', {
  41054. class: 'vxe-print-page-break--left'
  41055. }, "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(leftHtml) ? leftHtml(params) : leftHtml || '')), h('div', {
  41056. class: 'vxe-print-page-break--content'
  41057. }, "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(bodyHtml) ? bodyHtml(params) : bodyHtml || '')), h('div', {
  41058. class: 'vxe-print-page-break--right'
  41059. }, "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rightHtml) ? rightHtml(params) : rightHtml || ''))]), h('div', {
  41060. class: ['vxe-print-page-break--footer', footerAlign ? "align--".concat(footerAlign) : '']
  41061. }, footerHtml ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerHtml) ? footerHtml(params) : footerHtml || '') : [showPageNumber ? h('div', {
  41062. class: 'vxe-print-page-break--footer-page-number'
  41063. }, "".concat(currentPage, "/").concat(pageCount)) : renderEmptyElement($xePrint)])]);
  41064. });
  41065. },
  41066. renderPageStaticLayouts: function renderPageStaticLayouts(h) {
  41067. var $xePrint = this;
  41068. var props = $xePrint;
  41069. var slots = $xePrint.$scopedSlots;
  41070. var reactData = $xePrint.reactData;
  41071. var title = props.title,
  41072. showPageNumber = props.showPageNumber,
  41073. showAllPageTitle = props.showAllPageTitle,
  41074. align = props.align,
  41075. headerAlign = props.headerAlign,
  41076. footerAlign = props.footerAlign;
  41077. var staticPageBreaks = reactData.staticPageBreaks;
  41078. var pageCount = staticPageBreaks.length;
  41079. return staticPageBreaks.map(function (item, index) {
  41080. var itemSlots = item.slots || {};
  41081. var currentPage = index + 1;
  41082. var defaultSlot = itemSlots.default;
  41083. var headerSlot = itemSlots.header || slots.header;
  41084. var footerSlot = itemSlots.footer || slots.footer;
  41085. var leftSlot = itemSlots.left || slots.left;
  41086. var rightSlot = itemSlots.right || slots.right;
  41087. var params = {
  41088. currentPage: currentPage,
  41089. pageCount: pageCount
  41090. };
  41091. return h('div', {
  41092. class: ['vxe-print-page-break', align ? "align--".concat(align) : '']
  41093. }, [h('div', {
  41094. class: ['vxe-print-page-break--header', headerAlign ? "align--".concat(headerAlign) : '']
  41095. }, headerSlot ? vn_getSlotVNs(headerSlot(params)) : [title && (showAllPageTitle || !index) ? h('div', {
  41096. class: 'vxe-print-page-break--header-title'
  41097. }, "".concat(title || '')) : renderEmptyElement($xePrint)]), h('div', {
  41098. class: 'vxe-print-page-break--body'
  41099. }, [h('div', {
  41100. class: 'vxe-print-page-break--left'
  41101. }, leftSlot ? vn_getSlotVNs(leftSlot(params)) : []), h('div', {
  41102. class: 'vxe-print-page-break--content'
  41103. }, defaultSlot ? vn_getSlotVNs(defaultSlot(params)) : []), h('div', {
  41104. class: 'vxe-print-page-break--right'
  41105. }, rightSlot ? vn_getSlotVNs(rightSlot(params)) : [])]), h('div', {
  41106. class: ['vxe-print-page-break--footer', footerAlign ? "align--".concat(footerAlign) : '']
  41107. }, footerSlot ? vn_getSlotVNs(footerSlot(params)) : [showPageNumber ? h('div', {
  41108. class: 'vxe-print-page-break--footer-page-number'
  41109. }, "".concat(currentPage, "/").concat(pageCount)) : renderEmptyElement($xePrint)])]);
  41110. });
  41111. },
  41112. renderVN: function renderVN(h) {
  41113. var $xePrint = this;
  41114. var props = $xePrint;
  41115. var slots = $xePrint.$scopedSlots;
  41116. var reactData = $xePrint.reactData;
  41117. var customLayout = props.customLayout;
  41118. var staticPageBreaks = reactData.staticPageBreaks;
  41119. var defaultSlot = slots.default;
  41120. return h('div', {
  41121. ref: 'refElem',
  41122. class: ['vxe-print']
  41123. }, customLayout ? defaultSlot ? vn_getSlotVNs(defaultSlot({})) : [] : [h('div', {
  41124. key: 'slot',
  41125. class: 'vxe-print-slots'
  41126. }, defaultSlot ? vn_getSlotVNs(defaultSlot({})) : [])].concat(staticPageBreaks.length ? $xePrint.renderPageStaticLayouts(h) : $xePrint.renderPageConfigLayouts(h)));
  41127. }
  41128. },
  41129. render: function render(h) {
  41130. return this.renderVN(h);
  41131. }
  41132. })); /* define-vxe-component end */
  41133. ;// CONCATENATED MODULE: ./packages/print/index.ts
  41134. var VxePrint = Object.assign({}, print, {
  41135. install: function install(app) {
  41136. app.component(print.name, print);
  41137. }
  41138. });
  41139. dynamicApp.use(VxePrint);
  41140. index_esm_VxeUI.component(print);
  41141. index_esm_VxeUI.print = printHtml;
  41142. var Print = VxePrint;
  41143. /* harmony default export */ var packages_print = (VxePrint);
  41144. ;// CONCATENATED MODULE: ./packages/pulldown/src/pulldown.ts
  41145. /* harmony default export */ var pulldown = (/* define-vxe-component start */defineVxeComponent({
  41146. name: 'VxePulldown',
  41147. model: {
  41148. prop: 'value',
  41149. event: 'modelValue'
  41150. },
  41151. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  41152. props: {
  41153. value: Boolean,
  41154. disabled: Boolean,
  41155. placement: String,
  41156. trigger: {
  41157. type: String,
  41158. default: getConfig().pulldown.trigger
  41159. },
  41160. zIndex: Number,
  41161. size: {
  41162. type: String,
  41163. default: function _default() {
  41164. return getConfig().pulldown.size || getConfig().size;
  41165. }
  41166. },
  41167. options: Array,
  41168. className: {
  41169. type: [String, Function],
  41170. default: getConfig().pulldown.className
  41171. },
  41172. popupClassName: [String, Function],
  41173. showPopupShadow: Boolean,
  41174. destroyOnClose: {
  41175. type: Boolean,
  41176. default: getConfig().pulldown.destroyOnClose
  41177. },
  41178. transfer: {
  41179. type: Boolean,
  41180. default: null
  41181. }
  41182. },
  41183. inject: {
  41184. $xeModal: {
  41185. default: null
  41186. },
  41187. $xeDrawer: {
  41188. default: null
  41189. },
  41190. $xeTable: {
  41191. default: null
  41192. },
  41193. $xeForm: {
  41194. default: null
  41195. }
  41196. },
  41197. data: function data() {
  41198. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  41199. var reactData = {
  41200. initialized: false,
  41201. panelIndex: 0,
  41202. panelStyle: {},
  41203. panelPlacement: null,
  41204. visiblePanel: false,
  41205. isAniVisible: false,
  41206. isActivated: false
  41207. };
  41208. var internalData = {
  41209. hpTimeout: undefined
  41210. };
  41211. return {
  41212. xID: xID,
  41213. reactData: reactData,
  41214. internalData: internalData
  41215. };
  41216. },
  41217. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  41218. computeBtnTransfer: function computeBtnTransfer() {
  41219. var $xePulldown = this;
  41220. var props = $xePulldown;
  41221. var $xeModal = $xePulldown.$xeModal;
  41222. var $xeDrawer = $xePulldown.$xeDrawer;
  41223. var $xeTable = $xePulldown.$xeTable;
  41224. var $xeForm = $xePulldown.$xeForm;
  41225. var transfer = props.transfer;
  41226. if (transfer === null) {
  41227. var globalTransfer = getConfig().pulldown.transfer;
  41228. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  41229. return globalTransfer;
  41230. }
  41231. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  41232. return true;
  41233. }
  41234. }
  41235. return transfer;
  41236. }
  41237. }),
  41238. methods: {
  41239. //
  41240. // Method
  41241. //
  41242. dispatchEvent: function dispatchEvent(type, params, evnt) {
  41243. var $xePulldown = this;
  41244. $xePulldown.$emit(type, createEvent(evnt, {
  41245. $pulldown: $xePulldown
  41246. }, params));
  41247. },
  41248. emitModel: function emitModel(value) {
  41249. var $xePulldown = this;
  41250. var _events = $xePulldown._events;
  41251. if (_events && _events.modelValue) {
  41252. $xePulldown.$emit('modelValue', value);
  41253. } else {
  41254. $xePulldown.$emit('model-value', value);
  41255. }
  41256. },
  41257. updateZindex: function updateZindex() {
  41258. var $xePulldown = this;
  41259. var props = $xePulldown;
  41260. var reactData = $xePulldown.reactData;
  41261. var zIndex = props.zIndex;
  41262. if (zIndex) {
  41263. reactData.panelIndex = zIndex;
  41264. } else if (reactData.panelIndex < getLastZIndex()) {
  41265. reactData.panelIndex = nextZIndex();
  41266. }
  41267. },
  41268. isPanelVisible: function isPanelVisible() {
  41269. var $xePulldown = this;
  41270. var reactData = $xePulldown.reactData;
  41271. return reactData.visiblePanel;
  41272. },
  41273. /**
  41274. * 手动更新位置
  41275. */
  41276. updatePlacement: function updatePlacement() {
  41277. var $xePulldown = this;
  41278. var props = $xePulldown;
  41279. var reactData = $xePulldown.reactData;
  41280. var placement = props.placement;
  41281. var panelIndex = reactData.panelIndex;
  41282. var targetElem = $xePulldown.$refs.refPulldownContent;
  41283. var panelElem = $xePulldown.$refs.refPulldownPanel;
  41284. var btnTransfer = $xePulldown.computeBtnTransfer;
  41285. var handleStyle = function handleStyle() {
  41286. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  41287. placement: placement,
  41288. teleportTo: btnTransfer
  41289. });
  41290. var panelStyle = Object.assign(ppObj.style, {
  41291. zIndex: panelIndex
  41292. });
  41293. reactData.panelStyle = panelStyle;
  41294. reactData.panelPlacement = ppObj.placement;
  41295. };
  41296. handleStyle();
  41297. return $xePulldown.$nextTick().then(handleStyle);
  41298. },
  41299. /**
  41300. * 显示下拉面板
  41301. */
  41302. showPanel: function showPanel() {
  41303. var $xePulldown = this;
  41304. var props = $xePulldown;
  41305. var reactData = $xePulldown.reactData;
  41306. var internalData = $xePulldown.internalData;
  41307. var btnTransfer = $xePulldown.computeBtnTransfer;
  41308. var panelElem = $xePulldown.$refs.refPulldownPanel;
  41309. if (!reactData.initialized) {
  41310. reactData.initialized = true;
  41311. if (btnTransfer) {
  41312. if (panelElem) {
  41313. document.body.appendChild(panelElem);
  41314. }
  41315. }
  41316. }
  41317. return new Promise(function (resolve) {
  41318. if (!props.disabled) {
  41319. if (internalData.hpTimeout) {
  41320. clearTimeout(internalData.hpTimeout);
  41321. }
  41322. reactData.isActivated = true;
  41323. reactData.isAniVisible = true;
  41324. setTimeout(function () {
  41325. reactData.visiblePanel = true;
  41326. $xePulldown.emitModel(true);
  41327. $xePulldown.updatePlacement();
  41328. setTimeout(function () {
  41329. resolve($xePulldown.updatePlacement());
  41330. }, 40);
  41331. }, 10);
  41332. $xePulldown.updateZindex();
  41333. $xePulldown.dispatchEvent('visible-change', {
  41334. visible: true
  41335. }, null);
  41336. } else {
  41337. $xePulldown.$nextTick(function () {
  41338. resolve();
  41339. });
  41340. }
  41341. });
  41342. },
  41343. /**
  41344. * 隐藏下拉面板
  41345. */
  41346. hidePanel: function hidePanel() {
  41347. var $xePulldown = this;
  41348. return $xePulldown.hideOptionPanel();
  41349. },
  41350. hideOptionPanel: function hideOptionPanel() {
  41351. var $xePulldown = this;
  41352. var reactData = $xePulldown.reactData;
  41353. var internalData = $xePulldown.internalData;
  41354. reactData.visiblePanel = false;
  41355. $xePulldown.dispatchEvent('visible-change', {
  41356. visible: false
  41357. }, null);
  41358. $xePulldown.emitModel(false);
  41359. return new Promise(function (resolve) {
  41360. if (reactData.isAniVisible) {
  41361. internalData.hpTimeout = setTimeout(function () {
  41362. reactData.isAniVisible = false;
  41363. $xePulldown.$nextTick(function () {
  41364. resolve();
  41365. });
  41366. }, 350);
  41367. } else {
  41368. $xePulldown.$nextTick(function () {
  41369. resolve();
  41370. });
  41371. }
  41372. });
  41373. },
  41374. /**
  41375. * 切换下拉面板
  41376. */
  41377. togglePanel: function togglePanel() {
  41378. var $xePulldown = this;
  41379. var reactData = $xePulldown.reactData;
  41380. if (reactData.visiblePanel) {
  41381. return $xePulldown.hideOptionPanel();
  41382. }
  41383. return $xePulldown.showPanel();
  41384. },
  41385. handleOptionEvent: function handleOptionEvent(evnt, option) {
  41386. var $xePulldown = this;
  41387. var reactData = $xePulldown.reactData;
  41388. if (!option.disabled) {
  41389. if (reactData.visiblePanel) {
  41390. $xePulldown.hideOptionPanel();
  41391. $xePulldown.dispatchEvent('hide-panel', {}, evnt);
  41392. }
  41393. $xePulldown.dispatchEvent('option-click', {
  41394. option: option
  41395. }, evnt);
  41396. }
  41397. },
  41398. clickTargetEvent: function clickTargetEvent(evnt) {
  41399. var $xePulldown = this;
  41400. var props = $xePulldown;
  41401. var reactData = $xePulldown.reactData;
  41402. var trigger = props.trigger;
  41403. if (trigger === 'click') {
  41404. if (reactData.visiblePanel) {
  41405. $xePulldown.hideOptionPanel();
  41406. $xePulldown.dispatchEvent('hide-panel', {}, evnt);
  41407. } else {
  41408. $xePulldown.showPanel();
  41409. $xePulldown.dispatchEvent('show-panel', {}, evnt);
  41410. }
  41411. }
  41412. $xePulldown.dispatchEvent('click', {
  41413. $pulldown: $xePulldown
  41414. }, evnt);
  41415. },
  41416. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  41417. var $xePulldown = this;
  41418. var props = $xePulldown;
  41419. var reactData = $xePulldown.reactData;
  41420. var disabled = props.disabled;
  41421. var visiblePanel = reactData.visiblePanel;
  41422. var panelElem = $xePulldown.$refs.refPulldownPanel;
  41423. if (!disabled) {
  41424. if (visiblePanel) {
  41425. if (getEventTargetNode(evnt, panelElem).flag) {
  41426. $xePulldown.updatePlacement();
  41427. } else {
  41428. $xePulldown.hideOptionPanel();
  41429. $xePulldown.dispatchEvent('hide-panel', {}, evnt);
  41430. }
  41431. }
  41432. }
  41433. },
  41434. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  41435. var $xePulldown = this;
  41436. var props = $xePulldown;
  41437. var reactData = $xePulldown.reactData;
  41438. var disabled = props.disabled;
  41439. var visiblePanel = reactData.visiblePanel;
  41440. var el = $xePulldown.$refs.refElem;
  41441. var panelElem = $xePulldown.$refs.refPulldownPanel;
  41442. if (!disabled) {
  41443. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  41444. if (visiblePanel && !reactData.isActivated) {
  41445. $xePulldown.hideOptionPanel();
  41446. $xePulldown.dispatchEvent('hide-panel', {}, evnt);
  41447. }
  41448. }
  41449. },
  41450. handleGlobalBlurEvent: function handleGlobalBlurEvent(evnt) {
  41451. var $xePulldown = this;
  41452. var reactData = $xePulldown.reactData;
  41453. var visiblePanel = reactData.visiblePanel,
  41454. isActivated = reactData.isActivated;
  41455. if (visiblePanel) {
  41456. $xePulldown.hideOptionPanel();
  41457. $xePulldown.dispatchEvent('hide-panel', {}, evnt);
  41458. }
  41459. if (isActivated) {
  41460. reactData.isActivated = false;
  41461. }
  41462. },
  41463. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  41464. var $xePulldown = this;
  41465. var reactData = $xePulldown.reactData;
  41466. var visiblePanel = reactData.visiblePanel;
  41467. if (visiblePanel) {
  41468. $xePulldown.updatePlacement();
  41469. }
  41470. },
  41471. //
  41472. // Render
  41473. //
  41474. renderDefaultPanel: function renderDefaultPanel(h, options) {
  41475. var $xePulldown = this;
  41476. var slots = $xePulldown.$scopedSlots;
  41477. var optionSlot = slots.option;
  41478. return h('div', {
  41479. class: 'vxe-pulldown--panel-list'
  41480. }, options ? options.map(function (item) {
  41481. return h('div', {
  41482. class: 'vxe-pulldown--panel-item',
  41483. on: {
  41484. click: function click(evnt) {
  41485. $xePulldown.handleOptionEvent(evnt, item);
  41486. }
  41487. }
  41488. }, optionSlot ? optionSlot({
  41489. $pulldown: $xePulldown,
  41490. option: item
  41491. }) : "".concat(item.label || ''));
  41492. }) : []);
  41493. },
  41494. renderVN: function renderVN(h) {
  41495. var $xePulldown = this;
  41496. var props = $xePulldown;
  41497. var slots = $xePulldown.$scopedSlots;
  41498. var reactData = $xePulldown.reactData;
  41499. var className = props.className,
  41500. options = props.options,
  41501. popupClassName = props.popupClassName,
  41502. showPopupShadow = props.showPopupShadow,
  41503. destroyOnClose = props.destroyOnClose,
  41504. disabled = props.disabled;
  41505. var initialized = reactData.initialized,
  41506. isActivated = reactData.isActivated,
  41507. isAniVisible = reactData.isAniVisible,
  41508. visiblePanel = reactData.visiblePanel,
  41509. panelStyle = reactData.panelStyle,
  41510. panelPlacement = reactData.panelPlacement;
  41511. var btnTransfer = $xePulldown.computeBtnTransfer;
  41512. var vSize = $xePulldown.computeSize;
  41513. var defaultSlot = slots.default;
  41514. var headerSlot = slots.header;
  41515. var footerSlot = slots.footer;
  41516. var dropdownSlot = slots.dropdown;
  41517. return h('div', {
  41518. ref: 'refElem',
  41519. class: ['vxe-pulldown', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  41520. $pulldown: $xePulldown
  41521. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--visible', visiblePanel), 'is--disabled', disabled), 'is--active', isActivated)]
  41522. }, [h('div', {
  41523. ref: 'refPulldownContent',
  41524. class: 'vxe-pulldown--content',
  41525. on: {
  41526. click: $xePulldown.clickTargetEvent
  41527. }
  41528. }, defaultSlot ? defaultSlot({
  41529. $pulldown: $xePulldown
  41530. }) : []), h('div', {
  41531. ref: 'refPulldownPanel',
  41532. class: ['vxe-table--ignore-clear vxe-pulldown--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  41533. $pulldown: $xePulldown
  41534. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', isAniVisible), 'ani--enter', visiblePanel)],
  41535. attrs: {
  41536. placement: panelPlacement
  41537. },
  41538. style: panelStyle
  41539. }, initialized ? [h('div', {
  41540. class: ['vxe-pulldown--panel-wrapper', {
  41541. 'is--shadow': showPopupShadow
  41542. }]
  41543. }, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? [headerSlot ? h('div', {
  41544. class: 'vxe-pulldown--panel-header'
  41545. }, headerSlot({
  41546. $pulldown: $xePulldown
  41547. })) : renderEmptyElement($xePulldown), h('div', {
  41548. class: 'vxe-pulldown--panel-body'
  41549. }, dropdownSlot ? dropdownSlot({
  41550. $pulldown: $xePulldown
  41551. }) : [$xePulldown.renderDefaultPanel(h, options)]), footerSlot ? h('div', {
  41552. class: 'vxe-pulldown--panel-footer'
  41553. }, footerSlot({
  41554. $pulldown: $xePulldown
  41555. })) : renderEmptyElement($xePulldown)] : [])] : [])]);
  41556. }
  41557. },
  41558. watch: {
  41559. value: function value(val) {
  41560. var $xePulldown = this;
  41561. var reactData = $xePulldown.reactData;
  41562. reactData.isActivated = !!val;
  41563. if (val) {
  41564. $xePulldown.showPanel();
  41565. } else {
  41566. $xePulldown.hideOptionPanel();
  41567. }
  41568. }
  41569. },
  41570. created: function created() {
  41571. var $xePulldown = this;
  41572. var props = $xePulldown;
  41573. if (props.value) {
  41574. $xePulldown.showPanel();
  41575. }
  41576. globalEvents.on($xePulldown, 'mousewheel', $xePulldown.handleGlobalMousewheelEvent);
  41577. globalEvents.on($xePulldown, 'mousedown', $xePulldown.handleGlobalMousedownEvent);
  41578. globalEvents.on($xePulldown, 'blur', $xePulldown.handleGlobalBlurEvent);
  41579. globalEvents.on($xePulldown, 'resize', $xePulldown.handleGlobalResizeEvent);
  41580. },
  41581. beforeDestroy: function beforeDestroy() {
  41582. var $xePulldown = this;
  41583. var panelElem = $xePulldown.$refs.refPulldownPanel;
  41584. if (panelElem && panelElem.parentNode) {
  41585. panelElem.parentNode.removeChild(panelElem);
  41586. }
  41587. globalEvents.off($xePulldown, 'mousewheel');
  41588. globalEvents.off($xePulldown, 'mousedown');
  41589. globalEvents.off($xePulldown, 'blur');
  41590. globalEvents.off($xePulldown, 'resize');
  41591. },
  41592. render: function render(h) {
  41593. return this.renderVN(h);
  41594. }
  41595. })); /* define-vxe-component end */
  41596. ;// CONCATENATED MODULE: ./packages/pulldown/index.ts
  41597. var VxePulldown = Object.assign(pulldown, {
  41598. install: function install(app) {
  41599. app.component(pulldown.name, pulldown);
  41600. }
  41601. });
  41602. dynamicApp.use(VxePulldown);
  41603. index_esm_VxeUI.component(pulldown);
  41604. var Pulldown = VxePulldown;
  41605. /* harmony default export */ var packages_pulldown = (VxePulldown);
  41606. ;// CONCATENATED MODULE: ./packages/radio/src/radio.ts
  41607. /* harmony default export */ var src_radio = (/* define-vxe-component start */defineVxeComponent({
  41608. name: 'VxeRadio',
  41609. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  41610. props: {
  41611. value: [String, Number, Boolean],
  41612. checkedValue: {
  41613. type: [String, Number, Boolean],
  41614. default: undefined
  41615. },
  41616. title: [String, Number],
  41617. content: [String, Number],
  41618. disabled: {
  41619. type: Boolean,
  41620. default: null
  41621. },
  41622. name: String,
  41623. strict: {
  41624. type: Boolean,
  41625. default: function _default() {
  41626. return getConfig().radio.strict;
  41627. }
  41628. },
  41629. size: {
  41630. type: String,
  41631. default: function _default() {
  41632. return getConfig().radio.size || getConfig().size;
  41633. }
  41634. },
  41635. /**
  41636. * 已废弃,被 checkedValue 替换
  41637. */
  41638. label: {
  41639. type: [String, Number, Boolean],
  41640. default: null
  41641. }
  41642. },
  41643. inject: {
  41644. $xeForm: {
  41645. default: null
  41646. },
  41647. formItemInfo: {
  41648. from: 'xeFormItemInfo',
  41649. default: null
  41650. },
  41651. $xeRadioGroup: {
  41652. default: null
  41653. }
  41654. },
  41655. data: function data() {
  41656. var reactData = {};
  41657. return {
  41658. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  41659. reactData: reactData
  41660. };
  41661. },
  41662. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  41663. computeIsDisabled: function computeIsDisabled() {
  41664. var $xeRadio = this;
  41665. var $xeRadioGroup = $xeRadio.$xeRadioGroup;
  41666. var disabled = $xeRadio.disabled;
  41667. if (disabled === null) {
  41668. if ($xeRadioGroup) {
  41669. var isDisabled = $xeRadioGroup.computeIsDisabled;
  41670. return isDisabled;
  41671. }
  41672. }
  41673. return disabled;
  41674. },
  41675. computeName: function computeName() {
  41676. var $xeRadio = this;
  41677. var props = $xeRadio;
  41678. var $xeRadioGroup = $xeRadio.$xeRadioGroup;
  41679. return $xeRadioGroup ? $xeRadioGroup.name : props.name;
  41680. },
  41681. computeStrict: function computeStrict() {
  41682. var $xeRadio = this;
  41683. var props = $xeRadio;
  41684. var $xeRadioGroup = $xeRadio.$xeRadioGroup;
  41685. return $xeRadioGroup ? $xeRadioGroup.strict : props.strict;
  41686. },
  41687. computeChecked: function computeChecked() {
  41688. var $xeRadio = this;
  41689. var props = $xeRadio;
  41690. var $xeRadioGroup = $xeRadio.$xeRadioGroup;
  41691. var label = props.label,
  41692. checkedValue = props.checkedValue;
  41693. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41694. return $xeRadioGroup ? $xeRadioGroup.value === radioValue : props.value === radioValue;
  41695. }
  41696. }),
  41697. methods: {
  41698. //
  41699. // Method
  41700. //
  41701. dispatchEvent: function dispatchEvent(type, params, evnt) {
  41702. var $xeRadio = this;
  41703. $xeRadio.$emit(type, createEvent(evnt, {
  41704. $radio: $xeRadio
  41705. }, params));
  41706. },
  41707. emitModel: function emitModel(value) {
  41708. var $xeRadio = this;
  41709. var _events = $xeRadio._events;
  41710. $xeRadio.$emit('input', value);
  41711. if (_events && _events.modelValue) {
  41712. $xeRadio.$emit('modelValue', value);
  41713. } else {
  41714. $xeRadio.$emit('model-value', value);
  41715. }
  41716. },
  41717. handleValue: function handleValue(checkedValue, evnt) {
  41718. var $xeRadio = this;
  41719. var formItemInfo = $xeRadio.formItemInfo;
  41720. var $xeForm = $xeRadio.$xeForm;
  41721. var $xeRadioGroup = $xeRadio.$xeRadioGroup;
  41722. if ($xeRadioGroup) {
  41723. $xeRadioGroup.handleChecked({
  41724. label: checkedValue,
  41725. checkedValue: checkedValue
  41726. }, evnt);
  41727. } else {
  41728. $xeRadio.emitModel(checkedValue);
  41729. $xeRadio.dispatchEvent('change', {
  41730. value: checkedValue,
  41731. label: checkedValue
  41732. }, evnt);
  41733. // 自动更新校验状态
  41734. if ($xeForm && formItemInfo) {
  41735. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, checkedValue);
  41736. }
  41737. }
  41738. },
  41739. changeEvent: function changeEvent(evnt) {
  41740. var $xeRadio = this;
  41741. var props = $xeRadio;
  41742. var isDisabled = $xeRadio.computeIsDisabled;
  41743. if (!isDisabled) {
  41744. var label = props.label,
  41745. checkedValue = props.checkedValue;
  41746. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41747. $xeRadio.handleValue(radioValue, evnt);
  41748. }
  41749. },
  41750. clickEvent: function clickEvent(evnt) {
  41751. var $xeRadio = this;
  41752. var props = $xeRadio;
  41753. var $xeRadioGroup = $xeRadio.$xeRadioGroup;
  41754. var isDisabled = $xeRadio.computeIsDisabled;
  41755. var isStrict = $xeRadio.computeStrict;
  41756. if (!isDisabled && !isStrict) {
  41757. var label = props.label,
  41758. checkedValue = props.checkedValue;
  41759. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41760. if (radioValue === ($xeRadioGroup ? $xeRadioGroup.value : props.value)) {
  41761. $xeRadio.handleValue(null, evnt);
  41762. }
  41763. }
  41764. },
  41765. //
  41766. //
  41767. // Render
  41768. //
  41769. renderVN: function renderVN(h) {
  41770. var $xeRadio = this;
  41771. var props = $xeRadio;
  41772. var label = props.label,
  41773. checkedValue = props.checkedValue;
  41774. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41775. var slots = $xeRadio.$scopedSlots;
  41776. var vSize = $xeRadio.computeSize;
  41777. var isDisabled = $xeRadio.computeIsDisabled;
  41778. var name = $xeRadio.computeName;
  41779. var isChecked = $xeRadio.computeChecked;
  41780. return h('label', {
  41781. key: radioValue,
  41782. class: ['vxe-radio vxe-radio--default', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--checked', isChecked), 'is--disabled', isDisabled)],
  41783. attrs: {
  41784. title: props.title
  41785. }
  41786. }, [h('input', {
  41787. class: 'vxe-radio--input',
  41788. domProps: {
  41789. checked: isChecked
  41790. },
  41791. attrs: {
  41792. type: 'radio',
  41793. name: name,
  41794. disabled: isDisabled
  41795. },
  41796. on: {
  41797. change: $xeRadio.changeEvent,
  41798. click: $xeRadio.clickEvent
  41799. }
  41800. }), h('span', {
  41801. class: ['vxe-radio--icon', isChecked ? getIcon().RADIO_CHECKED : isDisabled ? getIcon().RADIO_DISABLED_UNCHECKED : getIcon().RADIO_UNCHECKED]
  41802. }), h('span', {
  41803. class: 'vxe-radio--label'
  41804. }, slots.default ? slots.default({}) : getFuncText(props.content))]);
  41805. }
  41806. },
  41807. render: function render(h) {
  41808. return this.renderVN(h);
  41809. }
  41810. })); /* define-vxe-component end */
  41811. ;// CONCATENATED MODULE: ./packages/radio/index.ts
  41812. var VxeRadio = Object.assign(src_radio, {
  41813. install: function install(app) {
  41814. app.component(src_radio.name, src_radio);
  41815. }
  41816. });
  41817. dynamicApp.use(VxeRadio);
  41818. index_esm_VxeUI.component(src_radio);
  41819. var Radio = VxeRadio;
  41820. /* harmony default export */ var packages_radio = (VxeRadio);
  41821. ;// CONCATENATED MODULE: ./packages/radio/src/button.ts
  41822. /* harmony default export */ var radio_src_button = (/* define-vxe-component start */defineVxeComponent({
  41823. name: 'VxeRadioButton',
  41824. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  41825. props: {
  41826. value: [String, Number, Boolean],
  41827. checkedValue: {
  41828. type: [String, Number, Boolean],
  41829. default: undefined
  41830. },
  41831. title: [String, Number],
  41832. content: [String, Number],
  41833. disabled: {
  41834. type: Boolean,
  41835. default: null
  41836. },
  41837. strict: {
  41838. type: Boolean,
  41839. default: function _default() {
  41840. return getConfig().radioButton.strict;
  41841. }
  41842. },
  41843. size: {
  41844. type: String,
  41845. default: function _default() {
  41846. return getConfig().radioButton.size || getConfig().size;
  41847. }
  41848. },
  41849. /**
  41850. * 已废弃,被 checkedValue 替换
  41851. */
  41852. label: {
  41853. type: [String, Number, Boolean],
  41854. default: null
  41855. }
  41856. },
  41857. inject: {
  41858. $xeForm: {
  41859. default: null
  41860. },
  41861. formItemInfo: {
  41862. from: 'xeFormItemInfo',
  41863. default: null
  41864. },
  41865. $xeRadioGroup: {
  41866. default: null
  41867. }
  41868. },
  41869. data: function data() {
  41870. var reactData = {};
  41871. return {
  41872. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  41873. reactData: reactData
  41874. };
  41875. },
  41876. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  41877. computeIsDisabled: function computeIsDisabled() {
  41878. var $xeRadioButton = this;
  41879. var $xeRadioGroup = $xeRadioButton.$xeRadioGroup;
  41880. var disabled = $xeRadioButton.disabled;
  41881. if (disabled === null) {
  41882. if ($xeRadioGroup) {
  41883. var isDisabled = $xeRadioGroup.computeIsDisabled;
  41884. return isDisabled;
  41885. }
  41886. }
  41887. return disabled;
  41888. },
  41889. computeName: function computeName() {
  41890. var $xeRadioButton = this;
  41891. var $xeRadioGroup = $xeRadioButton.$xeRadioGroup;
  41892. return $xeRadioGroup ? $xeRadioGroup.name : null;
  41893. },
  41894. computeStrict: function computeStrict() {
  41895. var $xeRadioButton = this;
  41896. var props = $xeRadioButton;
  41897. var $xeRadioGroup = $xeRadioButton.$xeRadioGroup;
  41898. return $xeRadioGroup ? $xeRadioGroup.strict : props.strict;
  41899. },
  41900. computeChecked: function computeChecked() {
  41901. var $xeRadioButton = this;
  41902. var props = $xeRadioButton;
  41903. var $xeRadioGroup = $xeRadioButton.$xeRadioGroup;
  41904. var label = props.label,
  41905. checkedValue = props.checkedValue;
  41906. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41907. return $xeRadioGroup ? $xeRadioGroup.value === radioValue : props.value === radioValue;
  41908. }
  41909. }),
  41910. methods: {
  41911. //
  41912. // Method
  41913. //
  41914. dispatchEvent: function dispatchEvent(type, params, evnt) {
  41915. var $xeRadioButton = this;
  41916. $xeRadioButton.$emit(type, createEvent(evnt, {
  41917. $radioButton: $xeRadioButton
  41918. }, params));
  41919. },
  41920. emitModel: function emitModel(value) {
  41921. var $xeRadioButton = this;
  41922. var _events = $xeRadioButton._events;
  41923. $xeRadioButton.$emit('input', value);
  41924. if (_events && _events.modelValue) {
  41925. $xeRadioButton.$emit('modelValue', value);
  41926. } else {
  41927. $xeRadioButton.$emit('model-value', value);
  41928. }
  41929. },
  41930. handleValue: function handleValue(checkedValue, evnt) {
  41931. var $xeRadioButton = this;
  41932. var $xeForm = $xeRadioButton.$xeForm;
  41933. var $xeRadioGroup = $xeRadioButton.$xeRadioGroup;
  41934. var formItemInfo = $xeRadioButton.formItemInfo;
  41935. if ($xeRadioGroup) {
  41936. $xeRadioGroup.handleChecked({
  41937. label: checkedValue,
  41938. checkedValue: checkedValue
  41939. }, evnt);
  41940. } else {
  41941. $xeRadioButton.emitModel(checkedValue);
  41942. $xeRadioButton.dispatchEvent('change', {
  41943. value: checkedValue,
  41944. label: checkedValue
  41945. }, evnt);
  41946. // 自动更新校验状态
  41947. if ($xeForm && formItemInfo) {
  41948. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, checkedValue);
  41949. }
  41950. }
  41951. },
  41952. changeEvent: function changeEvent(evnt) {
  41953. var $xeRadioButton = this;
  41954. var props = $xeRadioButton;
  41955. var isDisabled = $xeRadioButton.computeIsDisabled;
  41956. if (!isDisabled) {
  41957. var label = props.label,
  41958. checkedValue = props.checkedValue;
  41959. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41960. $xeRadioButton.handleValue(radioValue, evnt);
  41961. }
  41962. },
  41963. clickEvent: function clickEvent(evnt) {
  41964. var $xeRadioButton = this;
  41965. var props = $xeRadioButton;
  41966. var $xeRadioGroup = $xeRadioButton.$xeRadioGroup;
  41967. var isDisabled = $xeRadioButton.computeIsDisabled;
  41968. var isStrict = $xeRadioButton.computeStrict;
  41969. if (!isDisabled && !isStrict) {
  41970. var label = props.label,
  41971. checkedValue = props.checkedValue;
  41972. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41973. if (radioValue === ($xeRadioGroup ? $xeRadioGroup.value : props.value)) {
  41974. $xeRadioButton.handleValue(null, evnt);
  41975. }
  41976. }
  41977. },
  41978. //
  41979. // Render
  41980. //
  41981. renderVN: function renderVN(h) {
  41982. var $xeRadioButton = this;
  41983. var props = $xeRadioButton;
  41984. var slots = $xeRadioButton.$scopedSlots;
  41985. var label = props.label,
  41986. checkedValue = props.checkedValue;
  41987. var radioValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(checkedValue) ? label : checkedValue;
  41988. var vSize = $xeRadioButton.computeSize;
  41989. var isDisabled = $xeRadioButton.computeIsDisabled;
  41990. var name = $xeRadioButton.computeName;
  41991. var isChecked = $xeRadioButton.computeChecked;
  41992. return h('label', {
  41993. key: radioValue,
  41994. class: ['vxe-radio vxe-radio--button', _defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--disabled', isDisabled)],
  41995. attrs: {
  41996. title: props.title
  41997. }
  41998. }, [h('input', {
  41999. class: 'vxe-radio--input',
  42000. domProps: {
  42001. checked: isChecked
  42002. },
  42003. attrs: {
  42004. type: 'radio',
  42005. name: name,
  42006. disabled: isDisabled
  42007. },
  42008. on: {
  42009. change: $xeRadioButton.changeEvent,
  42010. click: $xeRadioButton.clickEvent
  42011. }
  42012. }), h('span', {
  42013. class: 'vxe-radio--label'
  42014. }, slots.default ? slots.default({}) : getFuncText(props.content))]);
  42015. }
  42016. },
  42017. render: function render(h) {
  42018. return this.renderVN(h);
  42019. }
  42020. })); /* define-vxe-component end */
  42021. ;// CONCATENATED MODULE: ./packages/radio-button/index.ts
  42022. var VxeRadioButton = Object.assign(radio_src_button, {
  42023. install: function install(app) {
  42024. app.component(radio_src_button.name, radio_src_button);
  42025. }
  42026. });
  42027. dynamicApp.use(VxeRadioButton);
  42028. index_esm_VxeUI.component(radio_src_button);
  42029. var RadioButton = VxeRadioButton;
  42030. /* harmony default export */ var radio_button = (VxeRadioButton);
  42031. ;// CONCATENATED MODULE: ./packages/radio/src/group.ts
  42032. /* harmony default export */ var radio_src_group = (/* define-vxe-component start */defineVxeComponent({
  42033. name: 'VxeRadioGroup',
  42034. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  42035. props: {
  42036. value: [String, Number, Boolean],
  42037. disabled: {
  42038. type: Boolean,
  42039. default: null
  42040. },
  42041. type: String,
  42042. options: Array,
  42043. optionProps: Object,
  42044. strict: {
  42045. type: Boolean,
  42046. default: function _default() {
  42047. return getConfig().radioGroup.strict;
  42048. }
  42049. },
  42050. size: {
  42051. type: String,
  42052. default: function _default() {
  42053. return getConfig().radioGroup.size || getConfig().size;
  42054. }
  42055. }
  42056. },
  42057. inject: {
  42058. $xeForm: {
  42059. default: null
  42060. },
  42061. formItemInfo: {
  42062. from: 'xeFormItemInfo',
  42063. default: null
  42064. }
  42065. },
  42066. provide: function provide() {
  42067. var $xeRadioGroup = this;
  42068. return {
  42069. $xeRadioGroup: $xeRadioGroup
  42070. };
  42071. },
  42072. data: function data() {
  42073. var reactData = {};
  42074. return {
  42075. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  42076. name: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('xe_group_'),
  42077. reactData: reactData
  42078. };
  42079. },
  42080. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  42081. computeIsDisabled: function computeIsDisabled() {
  42082. var $xeRadioGroup = this;
  42083. var props = $xeRadioGroup;
  42084. var $xeForm = $xeRadioGroup.$xeForm;
  42085. var disabled = props.disabled;
  42086. if (disabled === null) {
  42087. if ($xeForm) {
  42088. return $xeForm.readonly || $xeForm.disabled;
  42089. }
  42090. return false;
  42091. }
  42092. return disabled;
  42093. },
  42094. computePropsOpts: function computePropsOpts() {
  42095. var $xeRadioGroup = this;
  42096. var props = $xeRadioGroup;
  42097. return Object.assign({}, props.optionProps);
  42098. },
  42099. computeLabelField: function computeLabelField() {
  42100. var $xeRadioGroup = this;
  42101. var propsOpts = $xeRadioGroup.computePropsOpts;
  42102. return propsOpts.label || 'label';
  42103. },
  42104. computeValueField: function computeValueField() {
  42105. var $xeRadioGroup = this;
  42106. var propsOpts = $xeRadioGroup.computePropsOpts;
  42107. return propsOpts.value || 'value';
  42108. },
  42109. computeDisabledField: function computeDisabledField() {
  42110. var $xeRadioGroup = this;
  42111. var propsOpts = $xeRadioGroup.computePropsOpts;
  42112. return propsOpts.disabled || 'disabled';
  42113. }
  42114. }),
  42115. methods: {
  42116. //
  42117. // Method
  42118. //
  42119. dispatchEvent: function dispatchEvent(type, params, evnt) {
  42120. var $xeRadioGroup = this;
  42121. $xeRadioGroup.$emit(type, createEvent(evnt, {
  42122. $radioGroup: $xeRadioGroup
  42123. }, params));
  42124. },
  42125. emitModel: function emitModel(value) {
  42126. var $xeRadioGroup = this;
  42127. var _events = $xeRadioGroup._events;
  42128. $xeRadioGroup.$emit('input', value);
  42129. if (_events && _events.modelValue) {
  42130. $xeRadioGroup.$emit('modelValue', value);
  42131. } else {
  42132. $xeRadioGroup.$emit('model-value', value);
  42133. }
  42134. },
  42135. handleChecked: function handleChecked(params, evnt) {
  42136. var $xeRadioGroup = this;
  42137. var $xeForm = $xeRadioGroup.$xeForm;
  42138. var formItemInfo = $xeRadioGroup.formItemInfo;
  42139. var value = params.checkedValue;
  42140. $xeRadioGroup.emitModel(value);
  42141. $xeRadioGroup.dispatchEvent('change', {
  42142. value: value,
  42143. label: value,
  42144. checkedValue: value
  42145. }, evnt);
  42146. // 自动更新校验状态
  42147. if ($xeForm && formItemInfo) {
  42148. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  42149. }
  42150. },
  42151. //
  42152. // Render
  42153. //
  42154. renderVN: function renderVN(h) {
  42155. var $xeRadioGroup = this;
  42156. var props = $xeRadioGroup;
  42157. var slots = $xeRadioGroup.$scopedSlots;
  42158. var options = props.options,
  42159. type = props.type;
  42160. var vSize = $xeRadioGroup.computeSize;
  42161. var defaultSlot = slots.default;
  42162. var valueField = $xeRadioGroup.computeValueField;
  42163. var labelField = $xeRadioGroup.computeLabelField;
  42164. var disabledField = $xeRadioGroup.computeDisabledField;
  42165. var btnComp = type === 'button' ? radio_src_button : src_radio;
  42166. return h('div', {
  42167. class: ['vxe-radio-group', _defineProperty({}, "size--".concat(vSize), vSize)]
  42168. }, defaultSlot ? defaultSlot({}) : options ? options.map(function (item) {
  42169. return h(btnComp, {
  42170. key: item[valueField],
  42171. props: {
  42172. checkedValue: item[valueField],
  42173. content: item[labelField],
  42174. disabled: item[disabledField]
  42175. }
  42176. });
  42177. }) : []);
  42178. }
  42179. },
  42180. render: function render(h) {
  42181. return this.renderVN(h);
  42182. }
  42183. })); /* define-vxe-component end */
  42184. ;// CONCATENATED MODULE: ./packages/radio-group/index.ts
  42185. var VxeRadioGroup = Object.assign(radio_src_group, {
  42186. install: function install(app) {
  42187. app.component(radio_src_group.name, radio_src_group);
  42188. }
  42189. });
  42190. dynamicApp.use(VxeRadioGroup);
  42191. index_esm_VxeUI.component(radio_src_group);
  42192. var RadioGroup = VxeRadioGroup;
  42193. /* harmony default export */ var radio_group = (VxeRadioGroup);
  42194. ;// CONCATENATED MODULE: ./packages/rate/src/rate.ts
  42195. /* harmony default export */ var rate = (/* define-vxe-component start */defineVxeComponent({
  42196. name: 'VxeRate',
  42197. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  42198. props: {
  42199. value: [Number, String],
  42200. disabled: {
  42201. type: Boolean,
  42202. default: null
  42203. },
  42204. readonly: {
  42205. type: Boolean,
  42206. default: null
  42207. },
  42208. size: {
  42209. type: String,
  42210. default: function _default() {
  42211. return getConfig().rate.size || getConfig().size;
  42212. }
  42213. },
  42214. status: String
  42215. },
  42216. data: function data() {
  42217. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  42218. var reactData = {
  42219. activeValue: null
  42220. };
  42221. return {
  42222. xID: xID,
  42223. reactData: reactData
  42224. };
  42225. },
  42226. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  42227. computeIsDisabled: function computeIsDisabled() {
  42228. var $xeRate = this;
  42229. var props = $xeRate;
  42230. var $xeForm = $xeRate.$xeForm;
  42231. var disabled = props.disabled;
  42232. if (disabled === null) {
  42233. if ($xeForm) {
  42234. return $xeForm.readonly || $xeForm.disabled;
  42235. }
  42236. return false;
  42237. }
  42238. return disabled;
  42239. },
  42240. computeIsReadonly: function computeIsReadonly() {
  42241. var $xeRate = this;
  42242. var props = $xeRate;
  42243. var $xeForm = $xeRate.$xeForm;
  42244. var readonly = props.readonly;
  42245. if (readonly === null) {
  42246. if ($xeForm) {
  42247. return $xeForm.readonly || $xeForm.disabled;
  42248. }
  42249. return false;
  42250. }
  42251. return readonly;
  42252. },
  42253. computeNumVal: function computeNumVal() {
  42254. var $xeRate = this;
  42255. var props = $xeRate;
  42256. var reactData = $xeRate.reactData;
  42257. var value = props.value;
  42258. var activeValue = reactData.activeValue;
  42259. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(activeValue === null ? value : activeValue);
  42260. },
  42261. computeItemList: function computeItemList() {
  42262. return [1, 2, 3, 4, 5].map(function (num) {
  42263. return {
  42264. value: num,
  42265. label: num
  42266. };
  42267. });
  42268. }
  42269. }),
  42270. methods: {
  42271. //
  42272. // Method
  42273. //
  42274. dispatchEvent: function dispatchEvent(type, params, evnt) {
  42275. var $xeRate = this;
  42276. $xeRate.$emit(type, createEvent(evnt, {
  42277. $rate: $xeRate
  42278. }, params));
  42279. },
  42280. emitModel: function emitModel(value) {
  42281. var $xeRate = this;
  42282. var _events = $xeRate._events;
  42283. $xeRate.$emit('input', value);
  42284. if (_events && _events.modelValue) {
  42285. $xeRate.$emit('modelValue', value);
  42286. } else {
  42287. $xeRate.$emit('model-value', value);
  42288. }
  42289. },
  42290. mouseenterEvent: function mouseenterEvent(evnt, item) {
  42291. var $xeRate = this;
  42292. var reactData = $xeRate.reactData;
  42293. var isDisabled = $xeRate.computeIsDisabled;
  42294. var isReadonly = $xeRate.computeIsReadonly;
  42295. if (!(isDisabled || isReadonly)) {
  42296. var value = item.value;
  42297. reactData.activeValue = value;
  42298. }
  42299. },
  42300. mouseleaveEvent: function mouseleaveEvent() {
  42301. var $xeRate = this;
  42302. var reactData = $xeRate.reactData;
  42303. reactData.activeValue = null;
  42304. },
  42305. clickEvent: function clickEvent(evnt, item) {
  42306. var $xeRate = this;
  42307. var $xeForm = $xeRate.$xeForm;
  42308. var formItemInfo = $xeRate.formItemInfo;
  42309. var isDisabled = $xeRate.computeIsDisabled;
  42310. var isReadonly = $xeRate.computeIsReadonly;
  42311. if (!(isDisabled || isReadonly)) {
  42312. var value = item.value;
  42313. $xeRate.emitModel(value);
  42314. $xeRate.dispatchEvent('change', {
  42315. value: value
  42316. }, evnt);
  42317. // 自动更新校验状态
  42318. if ($xeForm && formItemInfo) {
  42319. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  42320. }
  42321. }
  42322. },
  42323. //
  42324. // Render
  42325. //
  42326. renderVN: function renderVN(h) {
  42327. var $xeRate = this;
  42328. var props = $xeRate;
  42329. var status = props.status;
  42330. var isDisabled = $xeRate.computeIsDisabled;
  42331. var isReadonly = $xeRate.computeIsReadonly;
  42332. var itemList = $xeRate.computeItemList;
  42333. var vSize = $xeRate.computeSize;
  42334. var numVal = $xeRate.computeNumVal;
  42335. return h('div', {
  42336. ref: 'refElem',
  42337. class: ['vxe-rate', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'is--disabled', isDisabled), 'is--readonly', isReadonly)]
  42338. }, itemList.map(function (item) {
  42339. var isChecked = numVal >= item.value;
  42340. return h('div', {
  42341. class: ['vxe-rte--item', {
  42342. 'is--checked': isChecked
  42343. }],
  42344. on: {
  42345. mouseenter: function mouseenter(evnt) {
  42346. if (!(isDisabled || isReadonly)) {
  42347. $xeRate.mouseenterEvent(evnt, item);
  42348. }
  42349. },
  42350. mouseleave: $xeRate.mouseleaveEvent,
  42351. click: function click(evnt) {
  42352. if (!(isDisabled || isReadonly)) {
  42353. $xeRate.clickEvent(evnt, item);
  42354. }
  42355. }
  42356. }
  42357. }, [h('i', {
  42358. class: isChecked ? getIcon().RATE_CHECKED : getIcon().RATE_UNCHECKED
  42359. })]);
  42360. }));
  42361. }
  42362. },
  42363. render: function render(h) {
  42364. return this.renderVN(h);
  42365. }
  42366. })); /* define-vxe-component end */
  42367. ;// CONCATENATED MODULE: ./packages/rate/index.ts
  42368. var VxeRate = Object.assign({}, rate, {
  42369. install: function install(app) {
  42370. app.component(rate.name, rate);
  42371. }
  42372. });
  42373. dynamicApp.use(VxeRate);
  42374. index_esm_VxeUI.component(rate);
  42375. var Rate = VxeRate;
  42376. /* harmony default export */ var packages_rate = (VxeRate);
  42377. ;// CONCATENATED MODULE: ./packages/result/src/result.ts
  42378. /* harmony default export */ var result = (/* define-vxe-component start */defineVxeComponent({
  42379. name: 'VxeResult',
  42380. props: {
  42381. imageUrl: String,
  42382. imageStyle: Object,
  42383. icon: String,
  42384. type: [String, Number],
  42385. status: [String, Number],
  42386. title: [String, Number],
  42387. content: [String, Number]
  42388. },
  42389. data: function data() {
  42390. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  42391. var reactData = {};
  42392. return {
  42393. xID: xID,
  42394. reactData: reactData
  42395. };
  42396. },
  42397. methods: {
  42398. //
  42399. // Method
  42400. //
  42401. dispatchEvent: function dispatchEvent(type, params, evnt) {
  42402. var $xeResult = this;
  42403. $xeResult.$emit(type, createEvent(evnt, {
  42404. $result: $xeResult
  42405. }, params));
  42406. },
  42407. //
  42408. // Render
  42409. //
  42410. renderVN: function renderVN(h) {
  42411. var $xeResult = this;
  42412. var props = $xeResult;
  42413. var slots = $xeResult.$scopedSlots;
  42414. var imageUrl = props.imageUrl,
  42415. imageStyle = props.imageStyle,
  42416. icon = props.icon,
  42417. title = props.title,
  42418. type = props.type,
  42419. content = props.content;
  42420. var status = props.status || type;
  42421. var slotExtra = slots.extra;
  42422. return h('div', {
  42423. ref: 'refElem',
  42424. class: ['vxe-result', _defineProperty({}, "theme--".concat(status), status)]
  42425. }, [h('div', {
  42426. class: 'vxe-result--inner'
  42427. }, [imageUrl ? h('div', {
  42428. class: 'vxe-result--img-wrapper'
  42429. }, [h('img', {
  42430. attrs: {
  42431. src: imageUrl
  42432. },
  42433. style: imageStyle
  42434. })]) : h('div', {
  42435. class: 'vxe-result--icon-wrapper'
  42436. }, [h('i', {
  42437. class: [icon, type ? getIcon()["RESULT_".concat(type).toLocaleUpperCase()] : '']
  42438. })]), h('div', {
  42439. class: 'vxe-result--title-wrapper'
  42440. }, "".concat(title || '')), h('div', {
  42441. class: 'vxe-result--content-wrapper'
  42442. }, "".concat(content || '')), slotExtra ? h('div', {
  42443. class: 'vxe-result--extra-wrapper'
  42444. }, slotExtra({})) : renderEmptyElement($xeResult)])]);
  42445. }
  42446. },
  42447. render: function render(h) {
  42448. return this.renderVN(h);
  42449. }
  42450. })); /* define-vxe-component end */
  42451. ;// CONCATENATED MODULE: ./packages/result/index.ts
  42452. var VxeResult = Object.assign({}, result, {
  42453. install: function install(app) {
  42454. app.component(result.name, result);
  42455. }
  42456. });
  42457. dynamicApp.use(VxeResult);
  42458. index_esm_VxeUI.component(result);
  42459. var Result = VxeResult;
  42460. /* harmony default export */ var packages_result = (VxeResult);
  42461. ;// CONCATENATED MODULE: ./packages/row/src/row.ts
  42462. /* harmony default export */ var row = (/* define-vxe-component start */defineVxeComponent({
  42463. name: 'VxeRow',
  42464. mixins: [globalMixins.sizeMixin],
  42465. props: {
  42466. gutter: [Number, String, Array],
  42467. wrap: {
  42468. type: Boolean,
  42469. default: function _default() {
  42470. return getConfig().row.wrap;
  42471. }
  42472. },
  42473. vertical: Boolean,
  42474. size: {
  42475. type: String,
  42476. default: function _default() {
  42477. return getConfig().row.size || getConfig().size;
  42478. }
  42479. }
  42480. },
  42481. provide: function provide() {
  42482. var $xeRow = this;
  42483. return {
  42484. $xeRow: $xeRow
  42485. };
  42486. },
  42487. data: function data() {
  42488. var reactData = {};
  42489. return {
  42490. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  42491. reactData: reactData
  42492. };
  42493. },
  42494. computed: {
  42495. computeRowStyle: function computeRowStyle() {
  42496. var $xeRow = this;
  42497. var props = $xeRow;
  42498. var gutter = props.gutter,
  42499. vertical = props.vertical;
  42500. var style = {};
  42501. if (gutter) {
  42502. var _ref = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(gutter) ? gutter : [gutter],
  42503. _ref2 = _slicedToArray(_ref, 2),
  42504. lrGutter = _ref2[0],
  42505. tbGutter = _ref2[1];
  42506. if (vertical) {
  42507. tbGutter = lrGutter;
  42508. lrGutter = '';
  42509. }
  42510. if (lrGutter) {
  42511. var offsetSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(lrGutter) ? toCssUnit(-(lrGutter / 2)) : "calc(".concat(toCssUnit(lrGutter), " / 2 * -1)");
  42512. style.marginLeft = offsetSize;
  42513. style.marginRight = offsetSize;
  42514. }
  42515. if (tbGutter) {
  42516. var _offsetSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(tbGutter) ? toCssUnit(-(tbGutter / 2)) : "calc(".concat(toCssUnit(tbGutter), " / 2 * -1)");
  42517. style.marginTop = _offsetSize;
  42518. style.marginBottom = _offsetSize;
  42519. }
  42520. }
  42521. return style;
  42522. }
  42523. },
  42524. methods: {
  42525. //
  42526. // Method
  42527. //
  42528. dispatchEvent: function dispatchEvent(type, params, evnt) {
  42529. var $xeRow = this;
  42530. $xeRow.$emit(type, createEvent(evnt, {
  42531. $row: $xeRow
  42532. }, params));
  42533. },
  42534. clickEvent: function clickEvent(evnt) {
  42535. var $xeRow = this;
  42536. $xeRow.dispatchEvent('click', {}, evnt);
  42537. },
  42538. //
  42539. // Render
  42540. //
  42541. renderVN: function renderVN(h) {
  42542. var $xeRow = this;
  42543. var props = $xeRow;
  42544. var slots = $xeRow.$scopedSlots;
  42545. var vertical = props.vertical,
  42546. wrap = props.wrap;
  42547. var rowStyle = $xeRow.computeRowStyle;
  42548. var defaultSlot = slots.default;
  42549. return h('div', {
  42550. ref: 'refElem',
  42551. class: ['vxe-row', {
  42552. 'is--vertical': vertical,
  42553. 'is--wrap': wrap
  42554. }],
  42555. style: rowStyle,
  42556. on: {
  42557. click: $xeRow.clickEvent
  42558. }
  42559. }, defaultSlot ? defaultSlot({}) : []);
  42560. }
  42561. },
  42562. render: function render(h) {
  42563. return this.renderVN(h);
  42564. }
  42565. })); /* define-vxe-component end */
  42566. ;// CONCATENATED MODULE: ./packages/row/index.ts
  42567. var VxeRow = Object.assign({}, row, {
  42568. install: function install(app) {
  42569. app.component(row.name, row);
  42570. }
  42571. });
  42572. dynamicApp.use(VxeRow);
  42573. index_esm_VxeUI.component(row);
  42574. var Row = VxeRow;
  42575. /* harmony default export */ var packages_row = (VxeRow);
  42576. ;// CONCATENATED MODULE: ./packages/select/index.ts
  42577. var VxeSelect = Object.assign(src_select, {
  42578. install: function install(app) {
  42579. app.component(src_select.name, src_select);
  42580. }
  42581. });
  42582. dynamicApp.use(VxeSelect);
  42583. index_esm_VxeUI.component(src_select);
  42584. var Select = VxeSelect;
  42585. /* harmony default export */ var packages_select = (VxeSelect);
  42586. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
  42587. var es_string_split = __webpack_require__(744);
  42588. ;// CONCATENATED MODULE: ./packages/split/src/split.ts
  42589. /* harmony default export */ var split = (/* define-vxe-component start */defineVxeComponent({
  42590. name: 'VxeSplit',
  42591. mixins: [globalMixins.sizeMixin],
  42592. props: {
  42593. width: [Number, String],
  42594. height: [Number, String],
  42595. vertical: {
  42596. type: Boolean,
  42597. default: function _default() {
  42598. return getConfig().split.vertical;
  42599. }
  42600. },
  42601. border: {
  42602. type: Boolean,
  42603. default: function _default() {
  42604. return getConfig().split.border;
  42605. }
  42606. },
  42607. padding: {
  42608. type: Boolean,
  42609. default: function _default() {
  42610. return getConfig().split.padding;
  42611. }
  42612. },
  42613. resize: {
  42614. type: Boolean,
  42615. default: function _default() {
  42616. return getConfig().split.resize;
  42617. }
  42618. },
  42619. items: Array,
  42620. itemConfig: Object,
  42621. barConfig: Object,
  42622. resizeConfig: Object,
  42623. actionConfig: Object,
  42624. size: {
  42625. type: String,
  42626. default: function _default() {
  42627. return getConfig().split.size || getConfig().size;
  42628. }
  42629. }
  42630. },
  42631. data: function data() {
  42632. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  42633. var reactData = {
  42634. staticItems: [],
  42635. itemList: [],
  42636. barWidth: 0,
  42637. barHeight: 0
  42638. };
  42639. var internalData = {
  42640. wrapperWidth: 0,
  42641. wrapperHeight: 0
  42642. };
  42643. return {
  42644. xID: xID,
  42645. reactData: reactData,
  42646. internalData: internalData,
  42647. reFlag: 0
  42648. };
  42649. },
  42650. provide: function provide() {
  42651. var $xeSplit = this;
  42652. return {
  42653. $xeSplit: $xeSplit
  42654. };
  42655. },
  42656. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  42657. computeItemOpts: function computeItemOpts() {
  42658. var $xeSplit = this;
  42659. var props = $xeSplit;
  42660. return Object.assign({}, getConfig().split.itemConfig, props.itemConfig);
  42661. },
  42662. computeBarOpts: function computeBarOpts() {
  42663. var $xeSplit = this;
  42664. var props = $xeSplit;
  42665. return Object.assign({}, getConfig().split.barConfig, props.barConfig);
  42666. },
  42667. computeResizeOpts: function computeResizeOpts() {
  42668. var $xeSplit = this;
  42669. var props = $xeSplit;
  42670. return Object.assign({}, getConfig().split.resizeConfig, props.resizeConfig);
  42671. },
  42672. computeActionOpts: function computeActionOpts() {
  42673. var $xeSplit = this;
  42674. var props = $xeSplit;
  42675. return Object.assign({}, getConfig().split.actionConfig, props.actionConfig);
  42676. },
  42677. computeIsFoldNext: function computeIsFoldNext() {
  42678. var $xeSplit = this;
  42679. var actionOpts = $xeSplit.computeActionOpts;
  42680. return actionOpts.direction === 'next';
  42681. },
  42682. computeVisibleItems: function computeVisibleItems() {
  42683. var $xeSplit = this;
  42684. var reactData = $xeSplit.reactData;
  42685. return reactData.itemList.filter(function (item) {
  42686. return item.isExpand;
  42687. });
  42688. },
  42689. computeAutoItems: function computeAutoItems() {
  42690. var $xeSplit = this;
  42691. var props = $xeSplit;
  42692. var reactData = $xeSplit.reactData;
  42693. var vertical = props.vertical;
  42694. var autoItems = [];
  42695. reactData.itemList.forEach(vertical ? function (item) {
  42696. if (!item.height) {
  42697. autoItems.push(item);
  42698. }
  42699. } : function (item) {
  42700. if (!item.width) {
  42701. autoItems.push(item);
  42702. }
  42703. });
  42704. return {
  42705. autoItems: autoItems
  42706. };
  42707. },
  42708. computeBarStyle: function computeBarStyle() {
  42709. var $xeSplit = this;
  42710. var barOpts = $xeSplit.computeBarOpts;
  42711. var width = barOpts.width,
  42712. height = barOpts.height;
  42713. var stys = {};
  42714. if (height) {
  42715. stys.height = toCssUnit(height);
  42716. }
  42717. if (width) {
  42718. stys.width = toCssUnit(width);
  42719. }
  42720. return stys;
  42721. },
  42722. computeSItemSize: function computeSItemSize() {
  42723. var $xeSplit = this;
  42724. var reactData = $xeSplit.reactData;
  42725. return reactData.staticItems.length;
  42726. }
  42727. }),
  42728. watch: {
  42729. items: function items(val) {
  42730. var $xeSplit = this;
  42731. $xeSplit.loadItem(val || []);
  42732. },
  42733. computeSItemSize: function computeSItemSize() {
  42734. var $xeSplit = this;
  42735. var props = $xeSplit;
  42736. var reactData = $xeSplit.reactData;
  42737. var actionOpts = $xeSplit.computeActionOpts;
  42738. var showPrevButton = actionOpts.showPrevButton,
  42739. showNextButton = actionOpts.showNextButton;
  42740. if (props.items && props.items.length) {
  42741. errLog('vxe.error.errConflicts', ['<vxe-split-pane ...>', 'items']);
  42742. }
  42743. reactData.itemList = reactData.staticItems || [];
  42744. if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
  42745. errLog('vxe.error.modelConflicts', ['[split] action-config.showPrevButton | action-config.showNextButton', '<vxe-split-pane ...> Only supports 2 panel']);
  42746. }
  42747. reactData.itemList.forEach(function (item) {
  42748. if (item.showAction) {
  42749. warnLog('vxe.error.removeProp', ['[split] show-action']);
  42750. }
  42751. });
  42752. $xeSplit.recalculate();
  42753. }
  42754. },
  42755. methods: {
  42756. //
  42757. // Method
  42758. //
  42759. dispatchEvent: function dispatchEvent(type, params, evnt) {
  42760. var $xeSplit = this;
  42761. $xeSplit.$emit(type, createEvent(evnt, {
  42762. $split: $xeSplit
  42763. }, params));
  42764. },
  42765. callSlot: function callSlot(slotFunc, params) {
  42766. var $xeSplit = this;
  42767. var slots = $xeSplit.$scopedSlots;
  42768. if (slotFunc) {
  42769. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  42770. slotFunc = slots[slotFunc] || null;
  42771. }
  42772. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  42773. return vn_getSlotVNs(slotFunc(params));
  42774. }
  42775. }
  42776. return [];
  42777. },
  42778. reset: function reset() {
  42779. var $xeSplit = this;
  42780. var reactData = $xeSplit.reactData;
  42781. var itemList = reactData.itemList;
  42782. itemList.forEach(function (item) {
  42783. item.isExpand = true;
  42784. item.foldHeight = 0;
  42785. item.foldWidth = 0;
  42786. item.resizeHeight = 0;
  42787. item.resizeWidth = 0;
  42788. });
  42789. return $xeSplit.$nextTick();
  42790. },
  42791. handleLoadItem: function handleLoadItem(list, isReset) {
  42792. var $xeSplit = this;
  42793. var slots = $xeSplit.$scopedSlots;
  42794. var reactData = $xeSplit.reactData;
  42795. var staticItems = reactData.staticItems;
  42796. var itemDef = {
  42797. isExpand: true,
  42798. renderWidth: 0,
  42799. resizeWidth: 0,
  42800. foldWidth: 0,
  42801. renderHeight: 0,
  42802. resizeHeight: 0,
  42803. foldHeight: 0
  42804. };
  42805. reactData.itemList = list.map(function (item) {
  42806. if (item.slots) {
  42807. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(item.slots, function (func) {
  42808. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(func)) {
  42809. if (!slots[func]) {
  42810. errLog('vxe.error.notSlot', ["[split] ".concat(func)]);
  42811. }
  42812. }
  42813. });
  42814. }
  42815. return Object.assign({}, isReset ? null : itemDef, item, isReset ? itemDef : null, {
  42816. id: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId()
  42817. });
  42818. });
  42819. if (staticItems.length) {
  42820. errLog('vxe.error.errConflicts', ['<vxe-split-pane ...>', 'items']);
  42821. }
  42822. return $xeSplit.recalculate();
  42823. },
  42824. loadItem: function loadItem(list) {
  42825. var $xeSplit = this;
  42826. return $xeSplit.handleLoadItem(list || [], false);
  42827. },
  42828. reloadItem: function reloadItem(list) {
  42829. var $xeSplit = this;
  42830. return $xeSplit.handleLoadItem(list || [], true);
  42831. },
  42832. recalculate: function recalculate() {
  42833. var $xeSplit = this;
  42834. var props = $xeSplit;
  42835. var reactData = $xeSplit.reactData;
  42836. var internalData = $xeSplit.internalData;
  42837. return $xeSplit.$nextTick().then(function () {
  42838. var vertical = props.vertical;
  42839. var itemList = reactData.itemList;
  42840. var el = $xeSplit.$refs.refElem;
  42841. var barInfoElem = $xeSplit.$refs.refBarInfoElem;
  42842. if (!el) {
  42843. return;
  42844. }
  42845. var wWidth = el.clientWidth;
  42846. var wHeight = el.clientHeight;
  42847. if (!wWidth || !wHeight) {
  42848. return;
  42849. }
  42850. if (barInfoElem) {
  42851. reactData.barWidth = barInfoElem.offsetWidth;
  42852. reactData.barHeight = barInfoElem.offsetHeight;
  42853. }
  42854. var contentWidth = wWidth - (vertical ? 0 : reactData.barWidth * (itemList.length - 1));
  42855. var contentHeight = wHeight - (vertical ? reactData.barHeight * (itemList.length - 1) : 0);
  42856. var itemOpts = $xeSplit.computeItemOpts;
  42857. var allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
  42858. var allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
  42859. var residueItems = [];
  42860. if (vertical) {
  42861. var countHeight = 0;
  42862. itemList.forEach(function (item) {
  42863. var height = item.height;
  42864. var itemHeight = 0;
  42865. if (height) {
  42866. if (isScale(height)) {
  42867. itemHeight = contentHeight * external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(height) / 100;
  42868. } else {
  42869. itemHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(height);
  42870. }
  42871. item.renderHeight = itemHeight;
  42872. } else {
  42873. residueItems.push(item);
  42874. }
  42875. countHeight += itemHeight;
  42876. });
  42877. if (residueItems.length) {
  42878. var reMeanHeight = (contentHeight - countHeight) / residueItems.length;
  42879. residueItems.forEach(function (item) {
  42880. item.renderHeight = Math.max(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minHeight, allMinHeight)), reMeanHeight);
  42881. });
  42882. }
  42883. } else {
  42884. var countWidth = 0;
  42885. itemList.forEach(function (item) {
  42886. var width = item.width;
  42887. var itemWidth = 0;
  42888. if (width) {
  42889. if (isScale(width)) {
  42890. itemWidth = contentWidth * external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(width) / 100;
  42891. } else {
  42892. itemWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(width);
  42893. }
  42894. item.renderWidth = itemWidth;
  42895. } else {
  42896. residueItems.push(item);
  42897. }
  42898. countWidth += itemWidth;
  42899. });
  42900. if (residueItems.length) {
  42901. var reMeanWidth = (contentWidth - countWidth) / residueItems.length;
  42902. residueItems.forEach(function (item) {
  42903. item.renderWidth = Math.max(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getGlobalDefaultConfig(item.minWidth, allMinWidth)), reMeanWidth);
  42904. });
  42905. }
  42906. }
  42907. internalData.wrapperWidth = contentWidth;
  42908. internalData.wrapperHeight = contentHeight;
  42909. });
  42910. },
  42911. dragEvent: function dragEvent(evnt) {
  42912. var $xeSplit = this;
  42913. var props = $xeSplit;
  42914. var reactData = $xeSplit.reactData;
  42915. var resize = props.resize,
  42916. vertical = props.vertical;
  42917. var itemList = reactData.itemList;
  42918. if (!resize) {
  42919. return;
  42920. }
  42921. evnt.preventDefault();
  42922. var barEl = evnt.currentTarget;
  42923. var handleEl = barEl.parentElement;
  42924. var el = $xeSplit.$refs.refElem;
  42925. if (!el) {
  42926. return;
  42927. }
  42928. var prevEl = handleEl.previousElementSibling;
  42929. var nextEl = handleEl.nextElementSibling;
  42930. if (!prevEl || !nextEl) {
  42931. return;
  42932. }
  42933. var prevId = prevEl.getAttribute('itemid');
  42934. var nextId = nextEl.getAttribute('itemid');
  42935. var prevItem = itemList.find(function (item) {
  42936. return item.id === prevId;
  42937. });
  42938. var nextItem = itemList.find(function (item) {
  42939. return item.id === nextId;
  42940. });
  42941. if (!prevItem || !nextItem) {
  42942. return;
  42943. }
  42944. var containerRect = el.getBoundingClientRect();
  42945. var barRect = barEl.getBoundingClientRect();
  42946. var rsSplitLineEl = $xeSplit.$refs.refResizableSplitTip;
  42947. var rsSplitTipEl = rsSplitLineEl ? rsSplitLineEl.children[0] : null;
  42948. var itemOpts = $xeSplit.computeItemOpts;
  42949. var resizeOpts = $xeSplit.computeResizeOpts;
  42950. var immediate = resizeOpts.immediate;
  42951. var allMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minWidth);
  42952. var allMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(itemOpts.minHeight);
  42953. var barOffsetX = Math.ceil(barRect.width - (evnt.clientX - barRect.left));
  42954. var barOffsetY = Math.ceil(evnt.clientY - barRect.top);
  42955. var prevWidth = prevEl.offsetWidth;
  42956. var nextWidth = nextEl.offsetWidth;
  42957. var prevMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minWidth, allMinWidth) : allMinWidth);
  42958. var nextMinWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(nextItem ? getGlobalDefaultConfig(nextItem.minWidth, allMinWidth) : allMinWidth);
  42959. var minOffsetLeft = prevEl.offsetLeft + prevMinWidth - barOffsetX;
  42960. var maxOffsetLeft = nextEl.offsetLeft + nextEl.offsetWidth - nextMinWidth - barOffsetX;
  42961. var startOffsetLeft = evnt.clientX - containerRect.left;
  42962. var targetOffsetWidth = -1;
  42963. var prevResizeWidth = 0;
  42964. var nextResizeWidth = 0;
  42965. var offsetLeft = startOffsetLeft;
  42966. var prevHeight = prevEl.offsetHeight;
  42967. var nextHeight = nextEl.offsetHeight;
  42968. var prevMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(prevItem ? getGlobalDefaultConfig(prevItem.minHeight, allMinHeight) : allMinHeight);
  42969. var nextMinHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(nextItem ? getGlobalDefaultConfig(nextItem.minHeight, allMinHeight) : allMinHeight);
  42970. var minOffsetTop = prevEl.offsetTop + prevMinHeight + barOffsetY;
  42971. var maxOffsetTop = nextEl.offsetTop + nextEl.offsetHeight - nextMinHeight + barOffsetY;
  42972. var startOffsetTop = evnt.clientY - containerRect.top;
  42973. var targetOffsetHeight = -1;
  42974. var prevResizeHeight = 0;
  42975. var nextResizeHeight = 0;
  42976. var offsetTop = startOffsetTop;
  42977. var handleReStyle = function handleReStyle(evnt) {
  42978. if (!rsSplitLineEl) {
  42979. return;
  42980. }
  42981. var rsNumPrevEl = rsSplitTipEl ? rsSplitTipEl.children[0] : null;
  42982. var rsNumNextEl = rsSplitTipEl ? rsSplitTipEl.children[1] : null;
  42983. if (vertical) {
  42984. var tipWidth = 0;
  42985. if (rsNumPrevEl) {
  42986. if (targetOffsetHeight < 0) {
  42987. rsNumPrevEl.style.display = 'none';
  42988. } else {
  42989. rsNumPrevEl.textContent = "".concat(Math.floor(prevResizeHeight), "px");
  42990. rsNumPrevEl.style.display = 'block';
  42991. tipWidth = rsNumPrevEl.offsetWidth;
  42992. }
  42993. }
  42994. if (rsNumNextEl) {
  42995. if (targetOffsetHeight < 0) {
  42996. rsNumNextEl.textContent = "".concat(Math.floor(nextResizeHeight), "px");
  42997. rsNumNextEl.style.display = 'block';
  42998. tipWidth = rsNumNextEl.offsetWidth;
  42999. } else {
  43000. rsNumNextEl.style.display = 'none';
  43001. }
  43002. }
  43003. var rsLeft = Math.max(1, evnt.clientX - containerRect.left - tipWidth / 2);
  43004. if (rsLeft > containerRect.width - tipWidth - 1) {
  43005. rsLeft = containerRect.width - tipWidth - 1;
  43006. }
  43007. rsSplitLineEl.style.left = '0';
  43008. rsSplitLineEl.style.top = "".concat(offsetTop, "px");
  43009. if (rsSplitTipEl) {
  43010. rsSplitTipEl.style.left = "".concat(rsLeft, "px");
  43011. }
  43012. } else {
  43013. var tipHeight = 0;
  43014. if (rsNumPrevEl) {
  43015. if (targetOffsetWidth < 0) {
  43016. rsNumPrevEl.style.display = 'none';
  43017. } else {
  43018. rsNumPrevEl.textContent = "".concat(Math.floor(prevResizeWidth), "px");
  43019. rsNumPrevEl.style.display = 'block';
  43020. tipHeight = rsNumPrevEl.offsetHeight;
  43021. }
  43022. }
  43023. if (rsNumNextEl) {
  43024. if (targetOffsetWidth < 0) {
  43025. rsNumNextEl.textContent = "".concat(Math.floor(nextResizeWidth), "px");
  43026. rsNumNextEl.style.display = 'block';
  43027. tipHeight = rsNumNextEl.offsetHeight;
  43028. } else {
  43029. rsNumNextEl.style.display = 'none';
  43030. }
  43031. }
  43032. var rsTop = Math.max(1, evnt.clientY - containerRect.top - tipHeight / 2);
  43033. if (rsTop > containerRect.height - tipHeight - 1) {
  43034. rsTop = containerRect.height - tipHeight - 1;
  43035. }
  43036. rsSplitLineEl.style.top = '0';
  43037. rsSplitLineEl.style.left = "".concat(offsetLeft, "px");
  43038. if (rsSplitTipEl) {
  43039. rsSplitTipEl.style.top = "".concat(rsTop, "px");
  43040. }
  43041. }
  43042. };
  43043. var handleUpdate = function handleUpdate() {
  43044. if (vertical) {
  43045. prevItem.resizeHeight = prevResizeHeight;
  43046. nextItem.resizeHeight = nextResizeHeight;
  43047. } else {
  43048. prevItem.resizeWidth = prevResizeWidth;
  43049. nextItem.resizeWidth = nextResizeWidth;
  43050. }
  43051. };
  43052. var handleDrag = function handleDrag(evnt) {
  43053. if (vertical) {
  43054. offsetTop = evnt.clientY - containerRect.top;
  43055. if (offsetTop < minOffsetTop) {
  43056. offsetTop = minOffsetTop;
  43057. }
  43058. if (offsetTop > maxOffsetTop) {
  43059. offsetTop = maxOffsetTop;
  43060. }
  43061. targetOffsetHeight = offsetTop - startOffsetTop;
  43062. prevResizeHeight = prevHeight + targetOffsetHeight;
  43063. nextResizeHeight = nextHeight - targetOffsetHeight;
  43064. } else {
  43065. offsetLeft = evnt.clientX - containerRect.left;
  43066. if (offsetLeft < minOffsetLeft) {
  43067. offsetLeft = minOffsetLeft;
  43068. }
  43069. if (offsetLeft > maxOffsetLeft) {
  43070. offsetLeft = maxOffsetLeft;
  43071. }
  43072. targetOffsetWidth = offsetLeft - startOffsetLeft;
  43073. prevResizeWidth = prevWidth + targetOffsetWidth;
  43074. nextResizeWidth = nextWidth - targetOffsetWidth;
  43075. }
  43076. if (immediate) {
  43077. if (vertical) {
  43078. prevEl.style.height = toCssUnit(prevResizeHeight);
  43079. nextEl.style.height = toCssUnit(nextResizeHeight);
  43080. } else {
  43081. prevEl.style.width = toCssUnit(prevResizeWidth);
  43082. nextEl.style.width = toCssUnit(nextResizeWidth);
  43083. }
  43084. }
  43085. if (rsSplitLineEl) {
  43086. handleReStyle(evnt);
  43087. }
  43088. $xeSplit.dispatchEvent('resize-drag', {
  43089. prevItem: prevItem,
  43090. nextItem: nextItem,
  43091. offsetHeight: targetOffsetHeight,
  43092. offsetWidth: targetOffsetWidth
  43093. }, evnt);
  43094. };
  43095. document.onmousemove = function (evnt) {
  43096. evnt.preventDefault();
  43097. handleDrag(evnt);
  43098. };
  43099. document.onmouseup = function (evnt) {
  43100. document.onmousemove = null;
  43101. document.onmouseup = null;
  43102. if (rsSplitLineEl) {
  43103. rsSplitLineEl.style.display = '';
  43104. }
  43105. handleUpdate();
  43106. removeClass(el, 'is--drag');
  43107. $xeSplit.dispatchEvent('resize-end', {
  43108. prevItem: prevItem,
  43109. nextItem: nextItem,
  43110. offsetHeight: targetOffsetHeight,
  43111. offsetWidth: targetOffsetWidth
  43112. }, evnt);
  43113. $xeSplit.recalculate();
  43114. };
  43115. if (rsSplitLineEl) {
  43116. rsSplitLineEl.style.display = 'block';
  43117. handleReStyle(evnt);
  43118. }
  43119. handleDrag(evnt);
  43120. addClass(el, 'is--drag');
  43121. $xeSplit.dispatchEvent('resize-start', {
  43122. prevItem: prevItem,
  43123. nextItem: nextItem
  43124. }, evnt);
  43125. },
  43126. handleItemActionEvent: function handleItemActionEvent(evnt, prevItem, nextItem, isNext) {
  43127. var $xeSplit = this;
  43128. var props = $xeSplit;
  43129. var vertical = props.vertical;
  43130. var expanded = false;
  43131. var item = prevItem;
  43132. if (isNext) {
  43133. item = nextItem;
  43134. expanded = !nextItem.isExpand;
  43135. nextItem.isExpand = expanded;
  43136. } else {
  43137. expanded = !prevItem.isExpand;
  43138. prevItem.isExpand = expanded;
  43139. }
  43140. if (vertical) {
  43141. if (prevItem.isExpand && nextItem.isExpand) {
  43142. prevItem.foldHeight = 0;
  43143. nextItem.foldHeight = 0;
  43144. } else if (prevItem.isExpand) {
  43145. nextItem.foldHeight = 0;
  43146. prevItem.foldHeight = (prevItem.resizeHeight || prevItem.renderHeight) + (nextItem.resizeHeight || nextItem.renderHeight);
  43147. } else {
  43148. prevItem.foldHeight = 0;
  43149. nextItem.foldHeight = (prevItem.resizeHeight || prevItem.renderHeight) + (nextItem.resizeHeight || nextItem.renderHeight);
  43150. }
  43151. } else {
  43152. if (prevItem.isExpand && nextItem.isExpand) {
  43153. prevItem.foldWidth = 0;
  43154. nextItem.foldWidth = 0;
  43155. } else if (prevItem.isExpand) {
  43156. nextItem.foldWidth = 0;
  43157. prevItem.foldWidth = (prevItem.resizeWidth || prevItem.renderWidth) + (nextItem.resizeWidth || nextItem.renderWidth);
  43158. } else {
  43159. prevItem.foldWidth = 0;
  43160. nextItem.foldWidth = (prevItem.resizeWidth || prevItem.renderWidth) + (nextItem.resizeWidth || nextItem.renderWidth);
  43161. }
  43162. }
  43163. $xeSplit.dispatchEvent('toggle-expand', {
  43164. prevItem: prevItem,
  43165. nextItem: nextItem,
  43166. expanded: expanded,
  43167. item: item
  43168. }, evnt);
  43169. $xeSplit.recalculate();
  43170. },
  43171. handlePrevActionDblclickEvent: function handlePrevActionDblclickEvent(evnt) {
  43172. var $xeSplit = this;
  43173. var reactData = $xeSplit.reactData;
  43174. var itemList = reactData.itemList;
  43175. var actionOpts = $xeSplit.computeActionOpts;
  43176. var btnEl = evnt.currentTarget;
  43177. var btnWrapperEl = btnEl.parentElement;
  43178. var handleEl = btnWrapperEl.parentElement;
  43179. var prevEl = handleEl.previousElementSibling;
  43180. var prevId = prevEl.getAttribute('itemid');
  43181. var prevItem = itemList.find(function (item) {
  43182. return item.id === prevId;
  43183. });
  43184. var nextEl = handleEl.nextElementSibling;
  43185. var nextId = nextEl.getAttribute('itemid');
  43186. var nextItem = itemList.find(function (item) {
  43187. return item.id === nextId;
  43188. });
  43189. if (actionOpts.trigger === 'dblclick') {
  43190. if (prevItem && nextItem && nextItem.isExpand) {
  43191. $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, false);
  43192. }
  43193. }
  43194. $xeSplit.dispatchEvent('action-dblclick', {
  43195. prevItem: prevItem,
  43196. nextItem: nextItem
  43197. }, evnt);
  43198. },
  43199. handlePrevActionClickEvent: function handlePrevActionClickEvent(evnt) {
  43200. var $xeSplit = this;
  43201. var reactData = $xeSplit.reactData;
  43202. var itemList = reactData.itemList;
  43203. var actionOpts = $xeSplit.computeActionOpts;
  43204. var btnEl = evnt.currentTarget;
  43205. var btnWrapperEl = btnEl.parentElement;
  43206. var handleEl = btnWrapperEl.parentElement;
  43207. var prevEl = handleEl.previousElementSibling;
  43208. var prevId = prevEl.getAttribute('itemid');
  43209. var prevItem = itemList.find(function (item) {
  43210. return item.id === prevId;
  43211. });
  43212. var nextEl = handleEl.nextElementSibling;
  43213. var nextId = nextEl.getAttribute('itemid');
  43214. var nextItem = itemList.find(function (item) {
  43215. return item.id === nextId;
  43216. });
  43217. if (actionOpts.trigger !== 'dblclick') {
  43218. if (prevItem && nextItem && nextItem.isExpand) {
  43219. $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, false);
  43220. }
  43221. }
  43222. $xeSplit.dispatchEvent('action-click', {
  43223. prevItem: prevItem,
  43224. nextItem: nextItem
  43225. }, evnt);
  43226. },
  43227. handleNextActionDblclickEvent: function handleNextActionDblclickEvent(evnt) {
  43228. var $xeSplit = this;
  43229. var reactData = $xeSplit.reactData;
  43230. var itemList = reactData.itemList;
  43231. var actionOpts = $xeSplit.computeActionOpts;
  43232. var btnEl = evnt.currentTarget;
  43233. var btnWrapperEl = btnEl.parentElement;
  43234. var handleEl = btnWrapperEl.parentElement;
  43235. var prevEl = handleEl.previousElementSibling;
  43236. var prevId = prevEl.getAttribute('itemid');
  43237. var prevItem = itemList.find(function (item) {
  43238. return item.id === prevId;
  43239. });
  43240. var nextEl = handleEl.nextElementSibling;
  43241. var nextId = nextEl.getAttribute('itemid');
  43242. var nextItem = itemList.find(function (item) {
  43243. return item.id === nextId;
  43244. });
  43245. if (actionOpts.trigger === 'dblclick') {
  43246. if (prevItem && nextItem && prevItem.isExpand) {
  43247. $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, true);
  43248. }
  43249. }
  43250. $xeSplit.dispatchEvent('action-dblclick', {
  43251. prevItem: prevItem,
  43252. nextItem: nextItem
  43253. }, evnt);
  43254. },
  43255. handleNextActionClickEvent: function handleNextActionClickEvent(evnt) {
  43256. var $xeSplit = this;
  43257. var reactData = $xeSplit.reactData;
  43258. var itemList = reactData.itemList;
  43259. var actionOpts = $xeSplit.computeActionOpts;
  43260. var btnEl = evnt.currentTarget;
  43261. var btnWrapperEl = btnEl.parentElement;
  43262. var handleEl = btnWrapperEl.parentElement;
  43263. var prevEl = handleEl.previousElementSibling;
  43264. var prevId = prevEl.getAttribute('itemid');
  43265. var prevItem = itemList.find(function (item) {
  43266. return item.id === prevId;
  43267. });
  43268. var nextEl = handleEl.nextElementSibling;
  43269. var nextId = nextEl.getAttribute('itemid');
  43270. var nextItem = itemList.find(function (item) {
  43271. return item.id === nextId;
  43272. });
  43273. if (actionOpts.trigger !== 'dblclick') {
  43274. if (prevItem && nextItem && prevItem.isExpand) {
  43275. $xeSplit.handleItemActionEvent(evnt, prevItem, nextItem, true);
  43276. }
  43277. }
  43278. $xeSplit.dispatchEvent('action-click', {
  43279. prevItem: prevItem,
  43280. nextItem: nextItem
  43281. }, evnt);
  43282. },
  43283. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  43284. var $xeSplit = this;
  43285. $xeSplit.recalculate();
  43286. },
  43287. getActionIcon: function getActionIcon(prevItem, nextItem, isNext) {
  43288. var $xeSplit = this;
  43289. var props = $xeSplit;
  43290. var vertical = props.vertical;
  43291. var topIcon = 'SPLIT_TOP_ACTION';
  43292. var bottomIcon = 'SPLIT_BOTTOM_ACTION';
  43293. var leftIcon = 'SPLIT_LEFT_ACTION';
  43294. var rightIcon = 'SPLIT_RIGHT_ACTION';
  43295. var iconName = '';
  43296. if (vertical) {
  43297. if (isNext) {
  43298. iconName = nextItem.isExpand ? bottomIcon : topIcon;
  43299. } else {
  43300. iconName = prevItem.isExpand ? topIcon : bottomIcon;
  43301. }
  43302. } else {
  43303. if (isNext) {
  43304. iconName = nextItem.isExpand ? rightIcon : leftIcon;
  43305. } else {
  43306. iconName = prevItem.isExpand ? leftIcon : rightIcon;
  43307. }
  43308. }
  43309. if (iconName) {
  43310. return getIcon()[iconName];
  43311. }
  43312. return '';
  43313. },
  43314. //
  43315. // Render
  43316. //
  43317. renderHandleBar: function renderHandleBar(h, prevItem, nextItem) {
  43318. var $xeSplit = this;
  43319. var props = $xeSplit;
  43320. var reactData = $xeSplit.reactData;
  43321. var border = props.border,
  43322. resize = props.resize,
  43323. vertical = props.vertical;
  43324. var itemList = reactData.itemList;
  43325. var barStyle = $xeSplit.computeBarStyle;
  43326. var actionOpts = $xeSplit.computeActionOpts;
  43327. var direction = actionOpts.direction;
  43328. var showPrevButton = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(actionOpts.showPrevButton) ? actionOpts.showPrevButton : itemList.some(function (item) {
  43329. return item.showAction;
  43330. });
  43331. var showNextButton = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(actionOpts.showNextButton) ? actionOpts.showNextButton : direction === 'next' && itemList.some(function (item) {
  43332. return item.showAction;
  43333. });
  43334. var resizeOpts = $xeSplit.computeResizeOpts;
  43335. var immediate = resizeOpts.immediate;
  43336. return h('div', {
  43337. class: ['vxe-split-pane-handle', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy', {
  43338. 'is--resize': resize,
  43339. 'is--border': border
  43340. }]
  43341. }, [h('div', {
  43342. class: 'vxe-split-pane-handle-bar',
  43343. style: barStyle,
  43344. on: {
  43345. mousedown: $xeSplit.dragEvent
  43346. }
  43347. }), itemList.length === 2 ? h('div', {
  43348. class: 'vxe-split-pane-action-btn-wrapper'
  43349. }, [showPrevButton && nextItem.isExpand ? h('div', {
  43350. class: 'vxe-split-pane-action-btn',
  43351. on: {
  43352. dblclick: $xeSplit.handlePrevActionDblclickEvent,
  43353. click: $xeSplit.handlePrevActionClickEvent
  43354. }
  43355. }, [h('i', {
  43356. class: $xeSplit.getActionIcon(prevItem, nextItem, false)
  43357. })]) : renderEmptyElement($xeSplit), showNextButton && prevItem.isExpand ? h('div', {
  43358. class: 'vxe-split-pane-action-btn',
  43359. on: {
  43360. dblclick: $xeSplit.handleNextActionDblclickEvent,
  43361. click: $xeSplit.handleNextActionClickEvent
  43362. }
  43363. }, [h('i', {
  43364. class: $xeSplit.getActionIcon(prevItem, nextItem, true)
  43365. })]) : renderEmptyElement($xeSplit)]) : renderEmptyElement($xeSplit)]);
  43366. },
  43367. renderItems: function renderItems(h) {
  43368. var $xeSplit = this;
  43369. var props = $xeSplit;
  43370. var reactData = $xeSplit.reactData;
  43371. var border = props.border,
  43372. padding = props.padding,
  43373. resize = props.resize,
  43374. vertical = props.vertical;
  43375. var itemList = reactData.itemList;
  43376. var vSize = $xeSplit.computeSize;
  43377. var resizeOpts = $xeSplit.computeResizeOpts;
  43378. var immediate = resizeOpts.immediate;
  43379. var visibleItems = $xeSplit.computeVisibleItems;
  43380. var autoItems = $xeSplit.computeAutoItems.autoItems;
  43381. var itemVNs = [];
  43382. itemList.forEach(function (prevItem, index) {
  43383. var id = prevItem.id,
  43384. name = prevItem.name,
  43385. slots = prevItem.slots,
  43386. renderHeight = prevItem.renderHeight,
  43387. resizeHeight = prevItem.resizeHeight,
  43388. foldHeight = prevItem.foldHeight,
  43389. renderWidth = prevItem.renderWidth,
  43390. resizeWidth = prevItem.resizeWidth,
  43391. foldWidth = prevItem.foldWidth,
  43392. isExpand = prevItem.isExpand;
  43393. var nextItem = itemList[index + 1];
  43394. var defaultSlot = slots ? slots.default : null;
  43395. var stys = {};
  43396. var itemWidth = isExpand ? foldWidth || resizeWidth || renderWidth : 0;
  43397. var itemHeight = isExpand ? foldHeight || resizeHeight || renderHeight : 0;
  43398. // 至少存在一个自适应
  43399. if (autoItems.length === 1) {
  43400. if (vertical) {
  43401. if (!prevItem.height) {
  43402. itemHeight = 0;
  43403. }
  43404. } else {
  43405. if (!prevItem.width) {
  43406. itemWidth = 0;
  43407. }
  43408. }
  43409. }
  43410. var isFill = true;
  43411. if (vertical) {
  43412. if (itemHeight && visibleItems.length > 1) {
  43413. isFill = false;
  43414. stys.height = toCssUnit(itemHeight);
  43415. }
  43416. } else {
  43417. if (itemWidth && visibleItems.length > 1) {
  43418. isFill = false;
  43419. stys.width = toCssUnit(itemWidth);
  43420. }
  43421. }
  43422. itemVNs.push(h('div', {
  43423. attrs: {
  43424. itemid: id
  43425. },
  43426. class: ['vxe-split-pane', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--resize', resize), 'is--padding', padding), 'is--border', border), 'is--height', itemHeight), 'is--width', itemWidth), 'is--visible', isExpand), 'is--hidden', !isExpand), 'is--fill', isExpand && isFill)],
  43427. style: stys
  43428. }, [h('div', {
  43429. attrs: {
  43430. itemid: id
  43431. },
  43432. class: 'vxe-split-pane--wrapper'
  43433. }, [h('div', {
  43434. class: 'vxe-split-pane--inner'
  43435. }, defaultSlot ? $xeSplit.callSlot(defaultSlot, {
  43436. name: name,
  43437. isExpand: isExpand
  43438. }) : [])])]));
  43439. if (nextItem) {
  43440. itemVNs.push($xeSplit.renderHandleBar(h, prevItem, nextItem));
  43441. }
  43442. });
  43443. return h('div', {
  43444. class: 'vxe-split-wrapper'
  43445. }, itemVNs);
  43446. },
  43447. renderVN: function renderVN(h) {
  43448. var $xeSplit = this;
  43449. var props = $xeSplit;
  43450. var slots = $xeSplit.$scopedSlots;
  43451. var vertical = props.vertical,
  43452. width = props.width,
  43453. height = props.height;
  43454. var vSize = $xeSplit.computeSize;
  43455. var resizeOpts = $xeSplit.computeResizeOpts;
  43456. var immediate = resizeOpts.immediate,
  43457. showTip = resizeOpts.showTip;
  43458. var defaultSlot = slots.default;
  43459. var stys = {};
  43460. if (height) {
  43461. stys.height = toCssUnit(height);
  43462. }
  43463. if (width) {
  43464. stys.width = toCssUnit(width);
  43465. }
  43466. return h('div', {
  43467. ref: 'refElem',
  43468. class: ['vxe-split', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy', _defineProperty({}, "size--".concat(vSize), vSize)],
  43469. style: stys
  43470. }, [h('div', {
  43471. class: 'vxe-split-slots'
  43472. }, defaultSlot ? defaultSlot({}) : []), $xeSplit.renderItems(h), h('div', {
  43473. ref: 'refResizableSplitTip',
  43474. class: ['vxe-split--resizable-split-tip', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy']
  43475. }, showTip ? [h('div', {
  43476. class: 'vxe-split--resizable-split-tip-number'
  43477. }, [h('div', {
  43478. class: 'vxe-split--resizable-split-number-prev'
  43479. }), h('div', {
  43480. class: 'vxe-split--resizable-split-number-next'
  43481. })])] : []), h('div', {
  43482. class: 'vxe-split--render-vars'
  43483. }, [h('div', {
  43484. ref: 'refBarInfoElem',
  43485. class: 'vxe-split--handle-bar-info'
  43486. })])]);
  43487. }
  43488. },
  43489. created: function created() {
  43490. var $xeSplit = this;
  43491. globalEvents.on($xeSplit, 'resize', $xeSplit.handleGlobalResizeEvent);
  43492. },
  43493. mounted: function mounted() {
  43494. var $xeSplit = this;
  43495. var props = $xeSplit;
  43496. var el = $xeSplit.$refs.refElem;
  43497. if (el) {
  43498. var resizeObserver = globalResize.create(function () {
  43499. $xeSplit.recalculate();
  43500. });
  43501. resizeObserver.observe(el);
  43502. this.$resize = resizeObserver;
  43503. }
  43504. if (props.items) {
  43505. $xeSplit.loadItem(props.items);
  43506. }
  43507. var actionOpts = $xeSplit.computeActionOpts;
  43508. if (actionOpts.direction) {
  43509. errLog('vxe.error.delProp', ['[split] action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
  43510. }
  43511. $xeSplit.$nextTick(function () {
  43512. $xeSplit.recalculate();
  43513. });
  43514. },
  43515. beforeDestroy: function beforeDestroy() {
  43516. var $xeSplit = this;
  43517. if (this.$resize) {
  43518. this.$resize.disconnect();
  43519. }
  43520. globalEvents.off($xeSplit, 'resize');
  43521. },
  43522. render: function render(h) {
  43523. return this.renderVN(h);
  43524. }
  43525. })); /* define-vxe-component end */
  43526. ;// CONCATENATED MODULE: ./packages/split/index.ts
  43527. var VxeSplit = Object.assign({}, split, {
  43528. install: function install(app) {
  43529. app.component(split.name, split);
  43530. }
  43531. });
  43532. dynamicApp.use(VxeSplit);
  43533. index_esm_VxeUI.component(split);
  43534. var Split = VxeSplit;
  43535. /* harmony default export */ var packages_split = (VxeSplit);
  43536. ;// CONCATENATED MODULE: ./packages/split/src/util.ts
  43537. function assembleSplitItem($xeSplit, elem, paneConfig) {
  43538. var staticItems = $xeSplit.reactData.staticItems;
  43539. var parentElem = elem.parentNode;
  43540. if (parentElem) {
  43541. staticItems.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, paneConfig);
  43542. $xeSplit.reactData.staticItems = staticItems.slice(0);
  43543. }
  43544. }
  43545. function destroySplitItem($xeSplit, paneConfig) {
  43546. var staticItems = $xeSplit.reactData.staticItems;
  43547. var index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(staticItems, function (item) {
  43548. return item.id === paneConfig.id;
  43549. });
  43550. if (index > -1) {
  43551. staticItems.splice(index, 1);
  43552. }
  43553. $xeSplit.reactData.staticItems = staticItems.slice(0);
  43554. }
  43555. ;// CONCATENATED MODULE: ./packages/split/src/split-pane.ts
  43556. /* harmony default export */ var split_pane = (/* define-vxe-component start */defineVxeComponent({
  43557. name: 'VxeSplitPane',
  43558. mixins: [globalMixins.sizeMixin],
  43559. props: {
  43560. name: [Number, String],
  43561. width: [Number, String],
  43562. height: [Number, String],
  43563. minWidth: {
  43564. type: [Number, String],
  43565. default: function _default() {
  43566. return null;
  43567. }
  43568. },
  43569. minHeight: {
  43570. type: [Number, String],
  43571. default: function _default() {
  43572. return null;
  43573. }
  43574. },
  43575. // 已废弃
  43576. showAction: Boolean
  43577. },
  43578. inject: {
  43579. $xeSplit: {
  43580. default: null
  43581. }
  43582. },
  43583. provide: function provide() {
  43584. var $xeSplitItem = this;
  43585. return {
  43586. $xeSplitItem: $xeSplitItem
  43587. };
  43588. },
  43589. data: function data() {
  43590. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  43591. var reactData = {};
  43592. var paneConfig = {
  43593. id: xID,
  43594. name: '',
  43595. width: 0,
  43596. height: 0,
  43597. minWidth: 0,
  43598. minHeight: 0,
  43599. showAction: false,
  43600. isExpand: true,
  43601. renderWidth: 0,
  43602. resizeWidth: 0,
  43603. foldWidth: 0,
  43604. renderHeight: 0,
  43605. resizeHeight: 0,
  43606. foldHeight: 0,
  43607. slots: {}
  43608. };
  43609. return {
  43610. xID: xID,
  43611. reactData: reactData,
  43612. paneConfig: paneConfig
  43613. };
  43614. },
  43615. computed: _objectSpread2({}, {}),
  43616. watch: {
  43617. name: function name(val) {
  43618. var $xeSplitItem = this;
  43619. var paneConfig = $xeSplitItem.paneConfig;
  43620. paneConfig.name = val;
  43621. },
  43622. width: function width(val) {
  43623. var $xeSplitItem = this;
  43624. var paneConfig = $xeSplitItem.paneConfig;
  43625. paneConfig.width = val;
  43626. },
  43627. height: function height(val) {
  43628. var $xeSplitItem = this;
  43629. var paneConfig = $xeSplitItem.paneConfig;
  43630. paneConfig.height = val;
  43631. },
  43632. minWidth: function minWidth(val) {
  43633. var $xeSplitItem = this;
  43634. var paneConfig = $xeSplitItem.paneConfig;
  43635. paneConfig.minWidth = val;
  43636. },
  43637. minHeight: function minHeight(val) {
  43638. var $xeSplitItem = this;
  43639. var paneConfig = $xeSplitItem.paneConfig;
  43640. paneConfig.minHeight = val;
  43641. },
  43642. showAction: function showAction(val) {
  43643. var $xeSplitItem = this;
  43644. var paneConfig = $xeSplitItem.paneConfig;
  43645. paneConfig.showAction = val;
  43646. }
  43647. },
  43648. methods: {
  43649. //
  43650. // Method
  43651. //
  43652. dispatchEvent: function dispatchEvent(type, params, evnt) {
  43653. var $xeSplitItem = this;
  43654. $xeSplitItem.$emit(type, createEvent(evnt, {
  43655. $splitPane: $xeSplitItem
  43656. }, params));
  43657. },
  43658. //
  43659. // Render
  43660. //
  43661. renderVN: function renderVN(h) {
  43662. return h('div', {
  43663. ref: 'refElem'
  43664. });
  43665. }
  43666. },
  43667. created: function created() {
  43668. var $xeSplitItem = this;
  43669. var props = $xeSplitItem;
  43670. var slots = $xeSplitItem.$scopedSlots;
  43671. var paneConfig = $xeSplitItem.paneConfig;
  43672. Object.assign(paneConfig, {
  43673. name: props.name,
  43674. width: props.width,
  43675. height: props.height,
  43676. minWidth: props.minWidth,
  43677. minHeight: props.minHeight,
  43678. showAction: props.showAction,
  43679. slots: slots
  43680. });
  43681. },
  43682. mounted: function mounted() {
  43683. var $xeSplitItem = this;
  43684. var slots = $xeSplitItem.$scopedSlots;
  43685. var paneConfig = $xeSplitItem.paneConfig;
  43686. var $xeSplit = $xeSplitItem.$xeSplit;
  43687. paneConfig.slots = slots;
  43688. var elem = $xeSplitItem.$refs.refElem;
  43689. if ($xeSplit && elem) {
  43690. assembleSplitItem($xeSplit, elem, paneConfig);
  43691. }
  43692. },
  43693. beforeDestroy: function beforeDestroy() {
  43694. var $xeSplitItem = this;
  43695. var paneConfig = $xeSplitItem.paneConfig;
  43696. var $xeSplit = $xeSplitItem.$xeSplit;
  43697. if ($xeSplit) {
  43698. destroySplitItem($xeSplit, paneConfig);
  43699. }
  43700. },
  43701. render: function render(h) {
  43702. return this.renderVN(h);
  43703. }
  43704. })); /* define-vxe-component end */
  43705. ;// CONCATENATED MODULE: ./packages/split-pane/index.ts
  43706. var VxeSplitPane = Object.assign({}, split_pane, {
  43707. install: function install(app) {
  43708. app.component(split_pane.name, split_pane);
  43709. app.component('VxeSplitItem', split_pane);
  43710. }
  43711. });
  43712. dynamicApp.use(VxeSplitPane);
  43713. index_esm_VxeUI.component(split_pane);
  43714. var SplitPane = VxeSplitPane;
  43715. /* harmony default export */ var packages_split_pane = (VxeSplitPane);
  43716. // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
  43717. var es_array_sort = __webpack_require__(6910);
  43718. ;// CONCATENATED MODULE: ./packages/slider/src/slider.ts
  43719. /* harmony default export */ var slider = (/* define-vxe-component start */defineVxeComponent({
  43720. name: 'VxeSlider',
  43721. model: {
  43722. prop: 'value',
  43723. event: 'modelValue'
  43724. },
  43725. props: {
  43726. value: [String, Number, Array],
  43727. vertical: Boolean,
  43728. max: {
  43729. type: [String, Number],
  43730. default: function _default() {
  43731. return getConfig().slider.max;
  43732. }
  43733. },
  43734. min: {
  43735. type: [String, Number],
  43736. default: function _default() {
  43737. return getConfig().slider.min;
  43738. }
  43739. },
  43740. step: {
  43741. type: [String, Number],
  43742. default: function _default() {
  43743. return getConfig().slider.step;
  43744. }
  43745. },
  43746. size: {
  43747. type: String,
  43748. default: function _default() {
  43749. return getConfig().slider.size || getConfig().size;
  43750. }
  43751. },
  43752. range: {
  43753. type: Boolean,
  43754. default: function _default() {
  43755. return getConfig().slider.range;
  43756. }
  43757. },
  43758. readonly: {
  43759. type: Boolean,
  43760. default: null
  43761. },
  43762. disabled: {
  43763. type: Boolean,
  43764. default: null
  43765. }
  43766. },
  43767. inject: {
  43768. $xeForm: {
  43769. default: null
  43770. },
  43771. formItemInfo: {
  43772. from: 'xeFormItemInfo',
  43773. default: null
  43774. }
  43775. },
  43776. data: function data() {
  43777. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  43778. var reactData = {
  43779. startValue: 0,
  43780. endValue: 0
  43781. };
  43782. return {
  43783. xID: xID,
  43784. reactData: reactData
  43785. };
  43786. },
  43787. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  43788. computeFormReadonly: function computeFormReadonly() {
  43789. var $xeSlider = this;
  43790. var props = $xeSlider;
  43791. var $xeForm = $xeSlider.$xeForm;
  43792. var readonly = props.readonly;
  43793. if (readonly === null) {
  43794. if ($xeForm) {
  43795. return $xeForm.readonly;
  43796. }
  43797. return false;
  43798. }
  43799. return readonly;
  43800. },
  43801. computeIsDisabled: function computeIsDisabled() {
  43802. var $xeSlider = this;
  43803. var props = $xeSlider;
  43804. var $xeForm = $xeSlider.$xeForm;
  43805. var disabled = props.disabled;
  43806. if (disabled === null) {
  43807. if ($xeForm) {
  43808. return $xeForm.disabled;
  43809. }
  43810. return false;
  43811. }
  43812. return disabled;
  43813. },
  43814. computeMaxNum: function computeMaxNum() {
  43815. var $xeSlider = this;
  43816. var props = $xeSlider;
  43817. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.max || 0);
  43818. },
  43819. computeMinNum: function computeMinNum() {
  43820. var $xeSlider = this;
  43821. var props = $xeSlider;
  43822. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.min || 0);
  43823. }
  43824. }),
  43825. methods: {
  43826. //
  43827. // Method
  43828. //
  43829. dispatchEvent: function dispatchEvent(type, params, evnt) {
  43830. var $xeSlider = this;
  43831. $xeSlider.$emit(type, createEvent(evnt, {
  43832. $watermark: $xeSlider
  43833. }, params));
  43834. },
  43835. emitModel: function emitModel(value) {
  43836. var $xeSlider = this;
  43837. var _events = $xeSlider._events;
  43838. if (_events && _events.modelValue) {
  43839. $xeSlider.$emit('modelValue', value);
  43840. } else {
  43841. $xeSlider.$emit('model-value', value);
  43842. }
  43843. },
  43844. getStartPercent: function getStartPercent(startValue) {
  43845. var $xeSlider = this;
  43846. var props = $xeSlider;
  43847. var range = props.range;
  43848. var maxNum = $xeSlider.computeMaxNum;
  43849. var minNum = $xeSlider.computeMinNum;
  43850. return range ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor((startValue - minNum) / external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(maxNum - minNum) * 100) : 0;
  43851. },
  43852. getEndPercent: function getEndPercent(startValue, endValue) {
  43853. var $xeSlider = this;
  43854. var props = $xeSlider;
  43855. var range = props.range;
  43856. var maxNum = $xeSlider.computeMaxNum;
  43857. var minNum = $xeSlider.computeMinNum;
  43858. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor((endValue - (range ? startValue : 0) - minNum) / external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(maxNum - minNum) * 100);
  43859. },
  43860. updateModel: function updateModel() {
  43861. var $xeSlider = this;
  43862. var props = $xeSlider;
  43863. var reactData = $xeSlider.reactData;
  43864. var value = props.value;
  43865. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(value)) {
  43866. var _XEUtils$clone$sort = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(value, true).sort(),
  43867. _XEUtils$clone$sort2 = _slicedToArray(_XEUtils$clone$sort, 2),
  43868. sVal = _XEUtils$clone$sort2[0],
  43869. eVal = _XEUtils$clone$sort2[1];
  43870. reactData.startValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sVal || 0));
  43871. reactData.endValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(eVal || 0));
  43872. } else {
  43873. reactData.startValue = 0;
  43874. reactData.endValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(value || 0));
  43875. }
  43876. },
  43877. updateBarStyle: function updateBarStyle() {
  43878. var $xeSlider = this;
  43879. var reactData = $xeSlider.reactData;
  43880. var startValue = reactData.startValue,
  43881. endValue = reactData.endValue;
  43882. var trackElem = $xeSlider.$refs.refTrackElem;
  43883. var startBtnElem = $xeSlider.$refs.refStartBtnElem;
  43884. var endBtnElem = $xeSlider.$refs.refEndBtnElem;
  43885. var startPercent = 0;
  43886. var endPercent = 0;
  43887. if (startValue > endValue) {
  43888. startPercent = $xeSlider.getStartPercent(endValue);
  43889. endPercent = $xeSlider.getEndPercent(endValue, startValue);
  43890. } else {
  43891. startPercent = $xeSlider.getStartPercent(startValue);
  43892. endPercent = $xeSlider.getEndPercent(startValue, endValue);
  43893. }
  43894. if (trackElem) {
  43895. trackElem.style.left = "".concat(startPercent, "%");
  43896. trackElem.style.width = "".concat(endPercent, "%");
  43897. }
  43898. if (startBtnElem) {
  43899. startBtnElem.style.left = "".concat(startPercent, "%");
  43900. }
  43901. if (endBtnElem) {
  43902. endBtnElem.style.left = "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(startPercent + endPercent), "%");
  43903. }
  43904. },
  43905. changeEvent: function changeEvent(evnt) {
  43906. var $xeSlider = this;
  43907. var props = $xeSlider;
  43908. var reactData = $xeSlider.reactData;
  43909. var $xeForm = $xeSlider.$xeForm;
  43910. var formItemInfo = $xeSlider.formItemInfo;
  43911. var range = props.range;
  43912. var startValue = reactData.startValue,
  43913. endValue = reactData.endValue;
  43914. var value = range ? [startValue, endValue].sort() : endValue;
  43915. $xeSlider.emitModel(value);
  43916. $xeSlider.dispatchEvent('change', {
  43917. value: value
  43918. }, evnt);
  43919. // 自动更新校验状态
  43920. if ($xeForm && formItemInfo) {
  43921. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  43922. }
  43923. },
  43924. handleMousedownEvent: function handleMousedownEvent(evnt, isEnd) {
  43925. var $xeSlider = this;
  43926. var reactData = $xeSlider.reactData;
  43927. var formReadonly = $xeSlider.computeFormReadonly;
  43928. var isDisabled = $xeSlider.computeIsDisabled;
  43929. var maxNum = $xeSlider.computeMaxNum;
  43930. var minNum = $xeSlider.computeMinNum;
  43931. if (!(formReadonly || isDisabled)) {
  43932. evnt.preventDefault();
  43933. document.onmousemove = function (evnt) {
  43934. evnt.preventDefault();
  43935. var barElem = $xeSlider.$refs.refBarElem;
  43936. if (barElem) {
  43937. var barRect = barElem.getBoundingClientRect();
  43938. var trackWidth = (evnt.clientX - barRect.left) / barRect.width;
  43939. if (isEnd) {
  43940. reactData.endValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(Math.max(minNum, Math.min(maxNum, trackWidth * (maxNum - minNum) + minNum)));
  43941. } else {
  43942. reactData.startValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(Math.max(minNum, Math.min(maxNum, trackWidth * (maxNum - minNum))));
  43943. }
  43944. $xeSlider.dispatchEvent('track-dragover', {
  43945. startValue: reactData.startValue,
  43946. endValue: reactData.endValue
  43947. }, evnt);
  43948. }
  43949. $xeSlider.updateBarStyle();
  43950. };
  43951. document.onmouseup = function (evnt) {
  43952. document.onmousemove = null;
  43953. document.onmouseup = null;
  43954. $xeSlider.dispatchEvent('track-dragend', {
  43955. startValue: reactData.startValue,
  43956. endValue: reactData.endValue
  43957. }, evnt);
  43958. $xeSlider.changeEvent(evnt);
  43959. $xeSlider.updateBarStyle();
  43960. };
  43961. $xeSlider.dispatchEvent('track-dragstart', {
  43962. startValue: reactData.startValue,
  43963. endValue: reactData.endValue
  43964. }, evnt);
  43965. }
  43966. },
  43967. handleStartMousedownEvent: function handleStartMousedownEvent(evnt) {
  43968. var $xeSlider = this;
  43969. var endBtnElem = $xeSlider.$refs.refEndBtnElem;
  43970. var startBtnElem = evnt.currentTarget;
  43971. $xeSlider.handleMousedownEvent(evnt, endBtnElem ? endBtnElem.offsetLeft < startBtnElem.offsetLeft : false);
  43972. },
  43973. handleEndMousedownEvent: function handleEndMousedownEvent(evnt) {
  43974. var $xeSlider = this;
  43975. var startBtnElem = $xeSlider.$refs.refStartBtnElem;
  43976. var endBtnElem = evnt.currentTarget;
  43977. $xeSlider.handleMousedownEvent(evnt, startBtnElem ? endBtnElem.offsetLeft > startBtnElem.offsetLeft : true);
  43978. },
  43979. //
  43980. // Render
  43981. //
  43982. renderVN: function renderVN(h) {
  43983. var $xeSlider = this;
  43984. var props = $xeSlider;
  43985. var vertical = props.vertical,
  43986. range = props.range;
  43987. var vSize = $xeSlider.computeSize;
  43988. var formReadonly = $xeSlider.computeFormReadonly;
  43989. var isDisabled = $xeSlider.computeIsDisabled;
  43990. return h('div', {
  43991. ref: 'refElem',
  43992. class: ['vxe-slider', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--vertical', vertical), 'is--readonly', formReadonly), 'is--disabled', isDisabled)]
  43993. }, [h('div', {
  43994. class: 'vxe-slider--inner'
  43995. }, [h('div', {
  43996. ref: 'refBarElem',
  43997. class: 'vxe-slider--bar-wrapper'
  43998. }), h('div', {
  43999. ref: 'refTrackElem',
  44000. class: 'vxe-slider--bar-track'
  44001. }), formReadonly || !range ? renderEmptyElement($xeSlider) : h('div', {
  44002. ref: 'refStartBtnElem',
  44003. class: 'vxe-slider--bar-btn vxe-slider--start-btn',
  44004. on: {
  44005. mousedown: $xeSlider.handleStartMousedownEvent
  44006. }
  44007. }), formReadonly ? renderEmptyElement($xeSlider) : h('div', {
  44008. ref: 'refEndBtnElem',
  44009. class: 'vxe-slider--bar-btn vxe-slider--end-btn',
  44010. on: {
  44011. mousedown: $xeSlider.handleEndMousedownEvent
  44012. }
  44013. })])]);
  44014. }
  44015. },
  44016. watch: {
  44017. value: function value() {
  44018. var $xeSlider = this;
  44019. $xeSlider.updateModel();
  44020. }
  44021. },
  44022. created: function created() {
  44023. var $xeSlider = this;
  44024. $xeSlider.updateModel();
  44025. },
  44026. mounted: function mounted() {
  44027. var $xeSlider = this;
  44028. $xeSlider.updateBarStyle();
  44029. },
  44030. render: function render(h) {
  44031. return this.renderVN(h);
  44032. }
  44033. })); /* define-vxe-component end */
  44034. ;// CONCATENATED MODULE: ./packages/slider/index.ts
  44035. var VxeSlider = Object.assign({}, slider, {
  44036. install: function install(app) {
  44037. app.component(slider.name, slider);
  44038. }
  44039. });
  44040. dynamicApp.use(VxeSlider);
  44041. index_esm_VxeUI.component(slider);
  44042. var Slider = VxeSlider;
  44043. /* harmony default export */ var packages_slider = (VxeSlider);
  44044. ;// CONCATENATED MODULE: ./packages/steps/src/steps.ts
  44045. /* harmony default export */ var steps = (/* define-vxe-component start */defineVxeComponent({
  44046. name: 'VxeSteps',
  44047. props: {},
  44048. data: function data() {
  44049. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  44050. var reactData = {};
  44051. return {
  44052. xID: xID,
  44053. reactData: reactData
  44054. };
  44055. },
  44056. methods: {
  44057. //
  44058. // Method
  44059. //
  44060. dispatchEvent: function dispatchEvent(type, params, evnt) {
  44061. var $xeSteps = this;
  44062. $xeSteps.$emit(type, createEvent(evnt, {
  44063. $steps: $xeSteps
  44064. }, params));
  44065. },
  44066. emitModel: function emitModel(value) {
  44067. var $xeSteps = this;
  44068. var _events = $xeSteps._events;
  44069. if (_events && _events.modelValue) {
  44070. $xeSteps.$emit('modelValue', value);
  44071. } else {
  44072. $xeSteps.$emit('model-value', value);
  44073. }
  44074. },
  44075. //
  44076. // Render
  44077. //
  44078. renderVN: function renderVN(h) {
  44079. var $xeSteps = this;
  44080. var slots = $xeSteps.$scopedSlots;
  44081. var defaultSlot = slots.default;
  44082. return h('div', {
  44083. ref: 'refElem',
  44084. class: 'vxe-steps'
  44085. }, defaultSlot ? defaultSlot({}) : []);
  44086. }
  44087. },
  44088. render: function render(h) {
  44089. return this.renderVN(h);
  44090. }
  44091. })); /* define-vxe-component end */
  44092. ;// CONCATENATED MODULE: ./packages/steps/index.ts
  44093. var VxeSteps = Object.assign({}, steps, {
  44094. install: function install(app) {
  44095. app.component(steps.name, steps);
  44096. }
  44097. });
  44098. dynamicApp.use(VxeSteps);
  44099. index_esm_VxeUI.component(steps);
  44100. var Steps = VxeSteps;
  44101. /* harmony default export */ var packages_steps = (VxeSteps);
  44102. ;// CONCATENATED MODULE: ./packages/switch/src/switch.ts
  44103. /* harmony default export */ var src_switch = (/* define-vxe-component start */defineVxeComponent({
  44104. name: 'VxeSwitch',
  44105. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  44106. props: {
  44107. value: [String, Number, Boolean],
  44108. disabled: {
  44109. type: Boolean,
  44110. default: null
  44111. },
  44112. readonly: {
  44113. type: Boolean,
  44114. default: null
  44115. },
  44116. size: {
  44117. type: String,
  44118. default: function _default() {
  44119. return getConfig().switch.size || getConfig().size;
  44120. }
  44121. },
  44122. openLabel: String,
  44123. closeLabel: String,
  44124. openValue: {
  44125. type: [String, Number, Boolean],
  44126. default: true
  44127. },
  44128. closeValue: {
  44129. type: [String, Number, Boolean],
  44130. default: false
  44131. },
  44132. openIcon: String,
  44133. closeIcon: String,
  44134. openActiveIcon: String,
  44135. closeActiveIcon: String
  44136. },
  44137. inject: {
  44138. $xeForm: {
  44139. default: null
  44140. },
  44141. formItemInfo: {
  44142. from: 'xeFormItemInfo',
  44143. default: null
  44144. }
  44145. },
  44146. data: function data() {
  44147. var reactData = {
  44148. isActivated: false,
  44149. hasAnimat: false,
  44150. offsetLeft: 0
  44151. };
  44152. var internalData = {};
  44153. return {
  44154. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  44155. reactData: reactData,
  44156. internalData: internalData
  44157. };
  44158. },
  44159. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  44160. computeIsDisabled: function computeIsDisabled() {
  44161. var $xeSwitch = this;
  44162. var props = $xeSwitch;
  44163. var $xeForm = $xeSwitch.$xeForm;
  44164. var disabled = props.disabled;
  44165. if (disabled === null) {
  44166. if ($xeForm) {
  44167. return $xeForm.readonly || $xeForm.disabled;
  44168. }
  44169. return false;
  44170. }
  44171. return disabled;
  44172. },
  44173. computeIsReadonly: function computeIsReadonly() {
  44174. var $xeSwitch = this;
  44175. var props = $xeSwitch;
  44176. var $xeForm = $xeSwitch.$xeForm;
  44177. var readonly = props.readonly;
  44178. if (readonly === null) {
  44179. if ($xeForm) {
  44180. return $xeForm.readonly || $xeForm.disabled;
  44181. }
  44182. return false;
  44183. }
  44184. return readonly;
  44185. },
  44186. computeOnShowLabel: function computeOnShowLabel() {
  44187. var $xeSwitch = this;
  44188. var props = $xeSwitch;
  44189. return getFuncText(props.openLabel);
  44190. },
  44191. computeOffShowLabel: function computeOffShowLabel() {
  44192. var $xeSwitch = this;
  44193. var props = $xeSwitch;
  44194. return getFuncText(props.closeLabel);
  44195. },
  44196. computeIsChecked: function computeIsChecked() {
  44197. var $xeSwitch = this;
  44198. var props = $xeSwitch;
  44199. return props.value === props.openValue;
  44200. }
  44201. }),
  44202. methods: {
  44203. //
  44204. // Method
  44205. //
  44206. dispatchEvent: function dispatchEvent(type, params, evnt) {
  44207. var $xeSwitch = this;
  44208. $xeSwitch.$emit(type, createEvent(evnt, {
  44209. $switch: $xeSwitch
  44210. }, params));
  44211. },
  44212. emitModel: function emitModel(value) {
  44213. var $xeSwitch = this;
  44214. var _events = $xeSwitch._events;
  44215. $xeSwitch.$emit('input', value);
  44216. if (_events && _events.modelValue) {
  44217. $xeSwitch.$emit('modelValue', value);
  44218. } else {
  44219. $xeSwitch.$emit('model-value', value);
  44220. }
  44221. },
  44222. focus: function focus() {
  44223. var $xeSwitch = this;
  44224. var reactData = $xeSwitch.reactData;
  44225. var btnElem = $xeSwitch.$refs.refButton;
  44226. reactData.isActivated = true;
  44227. if (btnElem) {
  44228. btnElem.focus();
  44229. }
  44230. return $xeSwitch.$nextTick();
  44231. },
  44232. blur: function blur() {
  44233. var $xeSwitch = this;
  44234. var reactData = $xeSwitch.reactData;
  44235. var btnElem = $xeSwitch.$refs.refButton;
  44236. if (btnElem) {
  44237. btnElem.blur();
  44238. }
  44239. reactData.isActivated = false;
  44240. return $xeSwitch.$nextTick();
  44241. },
  44242. clickEvent: function clickEvent(evnt) {
  44243. var $xeSwitch = this;
  44244. var props = $xeSwitch;
  44245. var reactData = $xeSwitch.reactData;
  44246. var internalData = $xeSwitch.internalData;
  44247. var $xeForm = $xeSwitch.$xeForm;
  44248. var formItemInfo = $xeSwitch.formItemInfo;
  44249. var isDisabled = $xeSwitch.computeIsDisabled;
  44250. var isReadonly = $xeSwitch.computeIsReadonly;
  44251. if (!(isDisabled || isReadonly)) {
  44252. var isChecked = $xeSwitch.computeIsChecked;
  44253. clearTimeout(internalData.atTimeout);
  44254. var value = isChecked ? props.closeValue : props.openValue;
  44255. reactData.hasAnimat = true;
  44256. $xeSwitch.emitModel(value);
  44257. $xeSwitch.dispatchEvent('change', {
  44258. value: value
  44259. }, evnt);
  44260. // 自动更新校验状态
  44261. if ($xeForm && formItemInfo) {
  44262. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  44263. }
  44264. internalData.atTimeout = setTimeout(function () {
  44265. reactData.hasAnimat = false;
  44266. internalData.atTimeout = undefined;
  44267. }, 400);
  44268. }
  44269. },
  44270. focusEvent: function focusEvent(evnt) {
  44271. var $xeSwitch = this;
  44272. var props = $xeSwitch;
  44273. var reactData = $xeSwitch.reactData;
  44274. reactData.isActivated = true;
  44275. $xeSwitch.dispatchEvent('focus', {
  44276. value: props.value
  44277. }, evnt);
  44278. },
  44279. blurEvent: function blurEvent(evnt) {
  44280. var $xeSwitch = this;
  44281. var props = $xeSwitch;
  44282. var reactData = $xeSwitch.reactData;
  44283. reactData.isActivated = false;
  44284. $xeSwitch.dispatchEvent('blur', {
  44285. value: props.value
  44286. }, evnt);
  44287. },
  44288. //
  44289. // Render
  44290. //
  44291. renderVN: function renderVN(h) {
  44292. var $xeSwitch = this;
  44293. var props = $xeSwitch;
  44294. var reactData = $xeSwitch.reactData;
  44295. var openIcon = props.openIcon,
  44296. closeIcon = props.closeIcon,
  44297. openActiveIcon = props.openActiveIcon,
  44298. closeActiveIcon = props.closeActiveIcon;
  44299. var vSize = $xeSwitch.computeSize;
  44300. var isChecked = $xeSwitch.computeIsChecked;
  44301. var onShowLabel = $xeSwitch.computeOnShowLabel;
  44302. var offShowLabel = $xeSwitch.computeOffShowLabel;
  44303. var isDisabled = $xeSwitch.computeIsDisabled;
  44304. var isReadonly = $xeSwitch.computeIsReadonly;
  44305. return h('div', {
  44306. class: ['vxe-switch', isChecked ? 'is--on' : 'is--off', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--disabled', isDisabled), 'is--readonly', isReadonly), 'is--animat', reactData.hasAnimat)]
  44307. }, [h('button', {
  44308. ref: 'refButton',
  44309. class: 'vxe-switch--button',
  44310. attrs: {
  44311. type: 'button',
  44312. disabled: isDisabled || isReadonly
  44313. },
  44314. on: {
  44315. click: $xeSwitch.clickEvent,
  44316. focus: $xeSwitch.focusEvent,
  44317. blur: $xeSwitch.blurEvent
  44318. }
  44319. }, [h('span', {
  44320. class: 'vxe-switch--label vxe-switch--label-on'
  44321. }, [openIcon ? h('i', {
  44322. class: ['vxe-switch--label-icon', openIcon]
  44323. }) : renderEmptyElement($xeSwitch), onShowLabel]), h('span', {
  44324. class: 'vxe-switch--label vxe-switch--label-off'
  44325. }, [closeIcon ? h('i', {
  44326. class: ['vxe-switch--label-icon', closeIcon]
  44327. }) : renderEmptyElement($xeSwitch), offShowLabel]), h('span', {
  44328. class: ['vxe-switch--icon']
  44329. }, openActiveIcon || closeActiveIcon ? [h('i', {
  44330. class: isChecked ? openActiveIcon : closeActiveIcon
  44331. })] : [])])]);
  44332. }
  44333. },
  44334. render: function render(h) {
  44335. return this.renderVN(h);
  44336. }
  44337. })); /* define-vxe-component end */
  44338. ;// CONCATENATED MODULE: ./packages/switch/index.ts
  44339. var VxeSwitch = Object.assign(src_switch, {
  44340. install: function install(app) {
  44341. app.component(src_switch.name, src_switch);
  44342. }
  44343. });
  44344. dynamicApp.use(VxeSwitch);
  44345. index_esm_VxeUI.component(src_switch);
  44346. var Switch = VxeSwitch;
  44347. /* harmony default export */ var packages_switch = (VxeSwitch);
  44348. ;// CONCATENATED MODULE: ./packages/tabs/src/util.ts
  44349. function assembleTabItem($xeTabs, elem, tabConfig) {
  44350. var staticTabs = $xeTabs.reactData.staticTabs;
  44351. var parentElem = elem.parentNode;
  44352. if (parentElem) {
  44353. staticTabs.splice(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayIndexOf(parentElem.children, elem), 0, tabConfig);
  44354. $xeTabs.reactData.staticTabs = staticTabs.slice(0);
  44355. }
  44356. }
  44357. function destroyTabItem($xeTabs, tabConfig) {
  44358. var staticTabs = $xeTabs.reactData.staticTabs;
  44359. var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(staticTabs, function (item) {
  44360. return item.id === tabConfig.id;
  44361. }, {
  44362. children: 'children'
  44363. });
  44364. if (matchObj) {
  44365. matchObj.items.splice(matchObj.index, 1);
  44366. }
  44367. $xeTabs.reactData.staticTabs = staticTabs.slice(0);
  44368. }
  44369. ;// CONCATENATED MODULE: ./packages/tabs/src/tab-pane.ts
  44370. /* harmony default export */ var tab_pane = (/* define-vxe-component start */defineVxeComponent({
  44371. name: 'VxeTabPane',
  44372. props: {
  44373. title: [String, Number],
  44374. name: [String, Number],
  44375. icon: String,
  44376. titleWidth: [String, Number],
  44377. titleAlign: [String, Number],
  44378. preload: Boolean,
  44379. permissionCode: [String, Number]
  44380. },
  44381. inject: {
  44382. $xeTabs: {
  44383. default: null
  44384. }
  44385. },
  44386. data: function data() {
  44387. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  44388. var reactData = {};
  44389. var tabConfig = {
  44390. id: xID,
  44391. title: '',
  44392. name: '',
  44393. icon: '',
  44394. titleWidth: '',
  44395. titleAlign: '',
  44396. preload: false,
  44397. permissionCode: '',
  44398. slots: {}
  44399. };
  44400. return {
  44401. xID: xID,
  44402. reactData: reactData,
  44403. tabConfig: tabConfig
  44404. };
  44405. },
  44406. computed: _objectSpread2({}, {}),
  44407. methods: {
  44408. //
  44409. // Method
  44410. //
  44411. dispatchEvent: function dispatchEvent(type, params, evnt) {
  44412. var $xeTabPane = this;
  44413. $xeTabPane.$emit(type, createEvent(evnt, {
  44414. $tabPane: $xeTabPane
  44415. }, params));
  44416. },
  44417. //
  44418. // Render
  44419. //
  44420. renderVN: function renderVN(h) {
  44421. return h('div', {
  44422. ref: 'refElem'
  44423. }, []);
  44424. }
  44425. },
  44426. watch: {
  44427. title: function title(val) {
  44428. var $xeTabPane = this;
  44429. var tabConfig = $xeTabPane.tabConfig;
  44430. tabConfig.title = val;
  44431. },
  44432. name: function name(val) {
  44433. var $xeTabPane = this;
  44434. var tabConfig = $xeTabPane.tabConfig;
  44435. tabConfig.name = val;
  44436. },
  44437. icon: function icon(val) {
  44438. var $xeTabPane = this;
  44439. var tabConfig = $xeTabPane.tabConfig;
  44440. tabConfig.icon = val;
  44441. },
  44442. permissionCode: function permissionCode(val) {
  44443. var $xeTabPane = this;
  44444. var tabConfig = $xeTabPane.tabConfig;
  44445. tabConfig.permissionCode = val;
  44446. }
  44447. },
  44448. created: function created() {
  44449. var $xeTabPane = this;
  44450. var props = $xeTabPane;
  44451. var slots = $xeTabPane.$scopedSlots;
  44452. var tabConfig = $xeTabPane.tabConfig;
  44453. Object.assign(tabConfig, {
  44454. title: props.title,
  44455. name: props.name,
  44456. icon: props.icon,
  44457. titleWidth: props.titleWidth,
  44458. titleAlign: props.titleAlign,
  44459. preload: props.preload,
  44460. permissionCode: props.permissionCode,
  44461. slots: slots
  44462. });
  44463. },
  44464. mounted: function mounted() {
  44465. var $xeTabPane = this;
  44466. var slots = $xeTabPane.$scopedSlots;
  44467. var $xeTabs = $xeTabPane.$xeTabs;
  44468. var tabConfig = $xeTabPane.tabConfig;
  44469. tabConfig.slots = slots;
  44470. var elem = $xeTabPane.$refs.refElem;
  44471. if ($xeTabs && elem) {
  44472. assembleTabItem($xeTabs, elem, tabConfig);
  44473. }
  44474. },
  44475. beforeDestroy: function beforeDestroy() {
  44476. var $xeTabPane = this;
  44477. var tabConfig = $xeTabPane.tabConfig;
  44478. var $xeTabs = $xeTabPane.$xeTabs;
  44479. if ($xeTabs) {
  44480. destroyTabItem($xeTabs, tabConfig);
  44481. }
  44482. },
  44483. render: function render(h) {
  44484. return this.renderVN(h);
  44485. }
  44486. })); /* define-vxe-component end */
  44487. ;// CONCATENATED MODULE: ./packages/tab-pane/index.ts
  44488. var VxeTabPane = Object.assign({}, tab_pane, {
  44489. install: function install(app) {
  44490. app.component(tab_pane.name, tab_pane);
  44491. }
  44492. });
  44493. dynamicApp.use(VxeTabPane);
  44494. index_esm_VxeUI.component(tab_pane);
  44495. var TabPane = VxeTabPane;
  44496. /* harmony default export */ var packages_tab_pane = (VxeTabPane);
  44497. ;// CONCATENATED MODULE: ./packages/table-select/src/table-select.ts
  44498. function getRowUniqueId() {
  44499. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('row_');
  44500. }
  44501. function table_select_createInternalData() {
  44502. return {
  44503. // hpTimeout: undefined,
  44504. // vpTimeout: undefined,
  44505. fullRowMaps: {}
  44506. };
  44507. }
  44508. /* harmony default export */ var table_select = (/* define-vxe-component start */defineVxeComponent({
  44509. name: 'VxeTableSelect',
  44510. mixins: [globalMixins.sizeMixin],
  44511. model: {
  44512. prop: 'value',
  44513. event: 'modelValue'
  44514. },
  44515. props: {
  44516. value: [String, Number, Array],
  44517. clearable: Boolean,
  44518. placeholder: {
  44519. type: String,
  44520. default: function _default() {
  44521. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(getConfig().tableSelect.placeholder) ? getI18n('vxe.base.pleaseSelect') : getConfig().tableSelect.placeholder;
  44522. }
  44523. },
  44524. readonly: {
  44525. type: Boolean,
  44526. default: null
  44527. },
  44528. loading: Boolean,
  44529. disabled: {
  44530. type: Boolean,
  44531. default: null
  44532. },
  44533. multiple: Boolean,
  44534. className: [String, Function],
  44535. prefixIcon: String,
  44536. placement: String,
  44537. columns: Array,
  44538. options: Array,
  44539. optionProps: Object,
  44540. lazyOptions: Array,
  44541. zIndex: Number,
  44542. size: {
  44543. type: String,
  44544. default: function _default() {
  44545. return getConfig().tableSelect.size || getConfig().size;
  44546. }
  44547. },
  44548. popupConfig: Object,
  44549. gridConfig: Object,
  44550. transfer: {
  44551. type: Boolean,
  44552. default: null
  44553. }
  44554. },
  44555. inject: {
  44556. $xeModal: {
  44557. default: null
  44558. },
  44559. $xeDrawer: {
  44560. default: null
  44561. },
  44562. $xeTable: {
  44563. default: null
  44564. },
  44565. $xeForm: {
  44566. default: null
  44567. },
  44568. formItemInfo: {
  44569. from: 'xeFormItemInfo',
  44570. default: null
  44571. }
  44572. },
  44573. provide: function provide() {
  44574. var $xeTableSelect = this;
  44575. return {
  44576. $xeTableSelect: $xeTableSelect
  44577. };
  44578. },
  44579. data: function data() {
  44580. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  44581. var reactData = {
  44582. initialized: false,
  44583. tableColumns: [],
  44584. fullOptionList: [],
  44585. panelIndex: 0,
  44586. panelStyle: {},
  44587. panelPlacement: null,
  44588. triggerFocusPanel: false,
  44589. visiblePanel: false,
  44590. isAniVisible: false,
  44591. isActivated: false
  44592. };
  44593. var internalData = table_select_createInternalData();
  44594. var gridEvents = {};
  44595. return {
  44596. xID: xID,
  44597. reactData: reactData,
  44598. internalData: internalData,
  44599. gridEvents: gridEvents
  44600. };
  44601. },
  44602. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  44603. computeFormReadonly: function computeFormReadonly() {
  44604. var $xeTableSelect = this;
  44605. var props = $xeTableSelect;
  44606. var $xeForm = $xeTableSelect.$xeForm;
  44607. var readonly = props.readonly;
  44608. if (readonly === null) {
  44609. if ($xeForm) {
  44610. return $xeForm.readonly;
  44611. }
  44612. return false;
  44613. }
  44614. return readonly;
  44615. },
  44616. computeIsDisabled: function computeIsDisabled() {
  44617. var $xeTableSelect = this;
  44618. var props = $xeTableSelect;
  44619. var $xeForm = $xeTableSelect.$xeForm;
  44620. var disabled = props.disabled;
  44621. if (disabled === null) {
  44622. if ($xeForm) {
  44623. return $xeForm.disabled;
  44624. }
  44625. return false;
  44626. }
  44627. return disabled;
  44628. },
  44629. computeBtnTransfer: function computeBtnTransfer() {
  44630. var $xeTableSelect = this;
  44631. var props = $xeTableSelect;
  44632. var $xeForm = $xeTableSelect.$xeForm;
  44633. var $xeTable = $xeTableSelect.$xeTable;
  44634. var $xeModal = $xeTableSelect.$xeModal;
  44635. var $xeDrawer = $xeTableSelect.$xeDrawer;
  44636. var transfer = props.transfer;
  44637. if (transfer === null) {
  44638. var globalTransfer = getConfig().tableSelect.transfer;
  44639. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  44640. return globalTransfer;
  44641. }
  44642. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  44643. return true;
  44644. }
  44645. }
  44646. return transfer;
  44647. },
  44648. computePropsOpts: function computePropsOpts() {
  44649. var $xeTableSelect = this;
  44650. var props = $xeTableSelect;
  44651. return props.optionProps || {};
  44652. },
  44653. computeRowOpts: function computeRowOpts() {
  44654. var $xeTableSelect = this;
  44655. var gridOpts = $xeTableSelect.computeGridOpts;
  44656. return Object.assign({}, gridOpts.rowConfig, {
  44657. isCurrent: true
  44658. });
  44659. },
  44660. computeRowKeyField: function computeRowKeyField() {
  44661. var $xeTableSelect = this;
  44662. var rowOpts = $xeTableSelect.computeRowOpts;
  44663. return rowOpts.keyField || '_X_ROW_KEY';
  44664. },
  44665. computeLabelField: function computeLabelField() {
  44666. var $xeTableSelect = this;
  44667. var propsOpts = $xeTableSelect.computePropsOpts;
  44668. return propsOpts.label || 'label';
  44669. },
  44670. computeValueField: function computeValueField() {
  44671. var $xeTableSelect = this;
  44672. var propsOpts = $xeTableSelect.computePropsOpts;
  44673. return propsOpts.value || 'value';
  44674. },
  44675. computePopupOpts: function computePopupOpts() {
  44676. var $xeTableSelect = this;
  44677. var props = $xeTableSelect;
  44678. return Object.assign({}, getConfig().tableSelect.popupConfig, props.popupConfig);
  44679. },
  44680. computeGridOpts: function computeGridOpts() {
  44681. var $xeTableSelect = this;
  44682. var props = $xeTableSelect;
  44683. return Object.assign({}, getConfig().tableSelect.gridConfig, props.gridConfig, {
  44684. data: undefined
  44685. });
  44686. },
  44687. computeSelectGridOpts: function computeSelectGridOpts() {
  44688. var $xeTableSelect = this;
  44689. var gridOpts = $xeTableSelect.computeGridOpts;
  44690. var pagerConfig = gridOpts.pagerConfig,
  44691. proxyConfig = gridOpts.proxyConfig;
  44692. if (proxyConfig) {
  44693. var proxyAjax = proxyConfig.ajax;
  44694. if (proxyAjax && proxyAjax.query) {
  44695. var newProxyConfig = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(proxyConfig, true);
  44696. var ajaxMethods = proxyAjax.query;
  44697. if (ajaxMethods) {
  44698. var resConfigs = proxyConfig.response || proxyConfig.props || {};
  44699. Object.assign(newProxyConfig.ajax, {
  44700. query: function query(params) {
  44701. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  44702. args[_key - 1] = arguments[_key];
  44703. }
  44704. return Promise.resolve(ajaxMethods.apply(void 0, [params].concat(args))).then(function (rest) {
  44705. var tableData = [];
  44706. if (pagerConfig) {
  44707. var resultProp = resConfigs.result;
  44708. tableData = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(resultProp) ? resultProp({
  44709. data: rest,
  44710. $table: null,
  44711. $grid: null,
  44712. $gantt: null
  44713. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, resultProp || 'result')) || [];
  44714. } else {
  44715. var listProp = resConfigs.list;
  44716. tableData = (listProp ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(listProp) ? listProp({
  44717. data: rest,
  44718. $table: null,
  44719. $grid: null,
  44720. $gantt: null
  44721. }) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(rest, listProp) : rest) || [];
  44722. }
  44723. $xeTableSelect.cacheDataMap(tableData || []);
  44724. return rest;
  44725. });
  44726. }
  44727. });
  44728. }
  44729. return Object.assign({}, gridOpts, {
  44730. proxyConfig: newProxyConfig
  44731. });
  44732. }
  44733. }
  44734. return gridOpts;
  44735. },
  44736. computeSelectLabel: function computeSelectLabel() {
  44737. var $xeTableSelect = this;
  44738. var props = $xeTableSelect;
  44739. var reactData = $xeTableSelect.reactData;
  44740. var internalData = $xeTableSelect.internalData;
  44741. var value = props.value,
  44742. lazyOptions = props.lazyOptions;
  44743. var fullOptionList = reactData.fullOptionList;
  44744. var fullRowMaps = internalData.fullRowMaps;
  44745. var valueField = $xeTableSelect.computeValueField;
  44746. var labelField = $xeTableSelect.computeLabelField;
  44747. if (!fullOptionList) {
  44748. return '';
  44749. }
  44750. return (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(value) ? value : [value]).map(function (val) {
  44751. var cacheItem = fullRowMaps[val];
  44752. if (cacheItem) {
  44753. return cacheItem.item[labelField];
  44754. }
  44755. if (lazyOptions) {
  44756. var lazyItem = lazyOptions.find(function (item) {
  44757. return item[valueField] === val;
  44758. });
  44759. if (lazyItem) {
  44760. return lazyItem[labelField];
  44761. }
  44762. }
  44763. return val;
  44764. }).join(', ');
  44765. },
  44766. computePopupWrapperStyle: function computePopupWrapperStyle() {
  44767. var $xeTableSelect = this;
  44768. var popupOpts = $xeTableSelect.computePopupOpts;
  44769. var height = popupOpts.height,
  44770. width = popupOpts.width;
  44771. var stys = {};
  44772. if (width) {
  44773. stys.width = toCssUnit(width);
  44774. }
  44775. if (height) {
  44776. stys.height = toCssUnit(height);
  44777. }
  44778. return stys;
  44779. }
  44780. }),
  44781. methods: {
  44782. //
  44783. // Method
  44784. //
  44785. dispatchEvent: function dispatchEvent(type, params, evnt) {
  44786. var $xeTableSelect = this;
  44787. $xeTableSelect.$emit(type, createEvent(evnt, {
  44788. $tableSelect: $xeTableSelect
  44789. }, params));
  44790. },
  44791. emitModel: function emitModel(value) {
  44792. var $xeTableSelect = this;
  44793. var _events = $xeTableSelect._events;
  44794. if (_events && _events.modelValue) {
  44795. $xeTableSelect.$emit('modelValue', value);
  44796. } else {
  44797. $xeTableSelect.$emit('model-value', value);
  44798. }
  44799. },
  44800. getRowid: function getRowid(option) {
  44801. var $xeTableSelect = this;
  44802. var nodeKeyField = $xeTableSelect.computeRowKeyField;
  44803. var rowid = option[nodeKeyField];
  44804. return rowid ? encodeURIComponent(rowid) : '';
  44805. },
  44806. getRowsByValue: function getRowsByValue(modelValue) {
  44807. var $xeTableSelect = this;
  44808. var internalData = $xeTableSelect.internalData;
  44809. var fullRowMaps = internalData.fullRowMaps;
  44810. var rows = [];
  44811. var vals = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(modelValue) ? [] : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue) ? modelValue : [modelValue];
  44812. vals.forEach(function (val) {
  44813. var cacheItem = fullRowMaps[val];
  44814. if (cacheItem) {
  44815. rows.push(cacheItem.item);
  44816. }
  44817. });
  44818. return rows;
  44819. },
  44820. updateModel: function updateModel(modelValue) {
  44821. var $xeTableSelect = this;
  44822. var props = $xeTableSelect;
  44823. var multiple = props.multiple;
  44824. $xeTableSelect.$nextTick(function () {
  44825. var $grid = $xeTableSelect.$refs.refGrid;
  44826. if ($grid) {
  44827. var selectList = $xeTableSelect.getRowsByValue(modelValue);
  44828. if (selectList.length) {
  44829. if (multiple) {
  44830. $grid.setCheckboxRow(selectList, true);
  44831. } else {
  44832. $grid.setRadioRow(selectList[0]);
  44833. }
  44834. }
  44835. }
  44836. });
  44837. },
  44838. loadTableColumn: function loadTableColumn(columns) {
  44839. var $xeTableSelect = this;
  44840. var props = $xeTableSelect;
  44841. var reactData = $xeTableSelect.reactData;
  44842. if (!columns || !columns.length) {
  44843. return;
  44844. }
  44845. var multiple = props.multiple;
  44846. var tableCols = [];
  44847. var hasRadioCol = false;
  44848. var hasCheckboxCol = false;
  44849. columns.forEach(function (column) {
  44850. if (!hasRadioCol && column.type === 'radio') {
  44851. hasRadioCol = true;
  44852. } else if (!hasCheckboxCol && column.type === 'checkbox') {
  44853. hasCheckboxCol = true;
  44854. }
  44855. tableCols.push(column);
  44856. });
  44857. if (multiple) {
  44858. if (!hasCheckboxCol) {
  44859. tableCols.unshift({
  44860. type: 'checkbox',
  44861. width: 70
  44862. });
  44863. }
  44864. } else {
  44865. if (!hasRadioCol) {
  44866. tableCols.unshift({
  44867. type: 'radio',
  44868. width: 70
  44869. });
  44870. }
  44871. }
  44872. reactData.tableColumns = tableCols;
  44873. },
  44874. cacheDataMap: function cacheDataMap(dataList) {
  44875. var $xeTableSelect = this;
  44876. var props = $xeTableSelect;
  44877. var reactData = $xeTableSelect.reactData;
  44878. var internalData = $xeTableSelect.internalData;
  44879. var options = props.options;
  44880. var rowKeyField = $xeTableSelect.computeRowKeyField;
  44881. var valueField = $xeTableSelect.computeValueField;
  44882. var gridOpts = $xeTableSelect.computeGridOpts;
  44883. var treeConfig = gridOpts.treeConfig,
  44884. pagerConfig = gridOpts.pagerConfig;
  44885. var rowMaps = {};
  44886. var keyMaps = {};
  44887. if (treeConfig) {
  44888. // x
  44889. } else {
  44890. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(dataList || options || [], function (item, index, items) {
  44891. var rowid = $xeTableSelect.getRowid(item);
  44892. if (!rowid) {
  44893. rowid = getRowUniqueId();
  44894. }
  44895. if (keyMaps[rowid]) {
  44896. errLog('vxe.error.repeatKey', ["[table-select] ".concat(rowKeyField), rowid]);
  44897. }
  44898. keyMaps[rowid] = true;
  44899. var value = item[valueField];
  44900. if (rowMaps[value]) {
  44901. errLog('vxe.error.repeatKey', ["[table-select] ".concat(valueField), value]);
  44902. }
  44903. rowMaps[value] = {
  44904. item: item,
  44905. index: index,
  44906. items: items,
  44907. parent: null,
  44908. nodes: []
  44909. };
  44910. });
  44911. }
  44912. reactData.fullOptionList = dataList || options || [];
  44913. internalData.fullRowMaps = pagerConfig ? Object.assign({}, internalData.fullRowMaps, rowMaps) : rowMaps;
  44914. $xeTableSelect.updateModel(props.value);
  44915. },
  44916. updateZindex: function updateZindex() {
  44917. var $xeTableSelect = this;
  44918. var props = $xeTableSelect;
  44919. var reactData = $xeTableSelect.reactData;
  44920. var zIndex = props.zIndex;
  44921. if (zIndex) {
  44922. reactData.panelIndex = zIndex;
  44923. } else if (reactData.panelIndex < getLastZIndex()) {
  44924. reactData.panelIndex = nextZIndex();
  44925. }
  44926. },
  44927. updatePlacement: function updatePlacement() {
  44928. var $xeTableSelect = this;
  44929. var props = $xeTableSelect;
  44930. var reactData = $xeTableSelect.reactData;
  44931. var placement = props.placement;
  44932. var panelIndex = reactData.panelIndex;
  44933. var targetElem = $xeTableSelect.$refs.refElem;
  44934. var panelElem = $xeTableSelect.$refs.refOptionPanel;
  44935. var btnTransfer = $xeTableSelect.computeBtnTransfer;
  44936. var handleStyle = function handleStyle() {
  44937. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  44938. placement: placement,
  44939. teleportTo: btnTransfer
  44940. });
  44941. var panelStyle = Object.assign(ppObj.style, {
  44942. zIndex: panelIndex
  44943. });
  44944. reactData.panelStyle = panelStyle;
  44945. reactData.panelPlacement = ppObj.placement;
  44946. };
  44947. handleStyle();
  44948. return $xeTableSelect.$nextTick().then(handleStyle);
  44949. },
  44950. showOptionPanel: function showOptionPanel() {
  44951. var $xeTableSelect = this;
  44952. var props = $xeTableSelect;
  44953. var reactData = $xeTableSelect.reactData;
  44954. var internalData = $xeTableSelect.internalData;
  44955. var loading = props.loading;
  44956. var isDisabled = $xeTableSelect.computeIsDisabled;
  44957. if (!loading && !isDisabled) {
  44958. if (internalData.vpTimeout) {
  44959. clearTimeout(internalData.vpTimeout);
  44960. }
  44961. if (internalData.hpTimeout) {
  44962. clearTimeout(internalData.hpTimeout);
  44963. }
  44964. if (!reactData.initialized) {
  44965. reactData.initialized = true;
  44966. var btnTransfer = $xeTableSelect.computeBtnTransfer;
  44967. var panelElem = $xeTableSelect.$refs.refOptionPanel;
  44968. if (btnTransfer) {
  44969. if (panelElem) {
  44970. document.body.appendChild(panelElem);
  44971. }
  44972. }
  44973. }
  44974. reactData.isActivated = true;
  44975. reactData.isAniVisible = true;
  44976. internalData.vpTimeout = setTimeout(function () {
  44977. reactData.visiblePanel = true;
  44978. $xeTableSelect.updateModel(props.value);
  44979. internalData.vpTimeout = undefined;
  44980. }, 10);
  44981. $xeTableSelect.updateZindex();
  44982. $xeTableSelect.updatePlacement();
  44983. }
  44984. },
  44985. hideOptionPanel: function hideOptionPanel() {
  44986. var $xeTableSelect = this;
  44987. var reactData = $xeTableSelect.reactData;
  44988. var internalData = $xeTableSelect.internalData;
  44989. reactData.visiblePanel = false;
  44990. internalData.hpTimeout = setTimeout(function () {
  44991. reactData.isAniVisible = false;
  44992. }, 350);
  44993. },
  44994. changeEvent: function changeEvent(evnt, selectValue, row) {
  44995. var $xeTableSelect = this;
  44996. var props = $xeTableSelect;
  44997. var $xeForm = $xeTableSelect.$xeForm;
  44998. var formItemInfo = $xeTableSelect.formItemInfo;
  44999. $xeTableSelect.emitModel(selectValue);
  45000. if (selectValue !== props.value) {
  45001. $xeTableSelect.dispatchEvent('change', {
  45002. value: selectValue,
  45003. row: row,
  45004. option: row
  45005. }, evnt);
  45006. // 自动更新校验状态
  45007. if ($xeForm && formItemInfo) {
  45008. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
  45009. }
  45010. }
  45011. },
  45012. clearValueEvent: function clearValueEvent(evnt, selectValue) {
  45013. var $xeTableSelect = this;
  45014. $xeTableSelect.changeEvent(evnt, selectValue, null);
  45015. $xeTableSelect.dispatchEvent('clear', {
  45016. value: selectValue
  45017. }, evnt);
  45018. },
  45019. clearEvent: function clearEvent(params, evnt) {
  45020. var $xeTableSelect = this;
  45021. $xeTableSelect.clearValueEvent(evnt, null);
  45022. $xeTableSelect.hideOptionPanel();
  45023. },
  45024. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  45025. var $xeTableSelect = this;
  45026. var reactData = $xeTableSelect.reactData;
  45027. var visiblePanel = reactData.visiblePanel;
  45028. var isDisabled = $xeTableSelect.computeIsDisabled;
  45029. if (!isDisabled) {
  45030. if (visiblePanel) {
  45031. var panelElem = $xeTableSelect.$refs.refOptionPanel;
  45032. if (getEventTargetNode(evnt, panelElem).flag) {
  45033. $xeTableSelect.updatePlacement();
  45034. } else {
  45035. $xeTableSelect.hideOptionPanel();
  45036. }
  45037. }
  45038. }
  45039. },
  45040. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  45041. var $xeTableSelect = this;
  45042. var reactData = $xeTableSelect.reactData;
  45043. var visiblePanel = reactData.visiblePanel;
  45044. var isDisabled = $xeTableSelect.computeIsDisabled;
  45045. if (!isDisabled) {
  45046. var el = $xeTableSelect.$refs.refElem;
  45047. var panelElem = $xeTableSelect.$refs.refOptionPanel;
  45048. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  45049. if (visiblePanel && !reactData.isActivated) {
  45050. $xeTableSelect.hideOptionPanel();
  45051. }
  45052. }
  45053. },
  45054. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  45055. var $xeTableSelect = this;
  45056. var reactData = $xeTableSelect.reactData;
  45057. var visiblePanel = reactData.visiblePanel,
  45058. isActivated = reactData.isActivated;
  45059. if (visiblePanel) {
  45060. $xeTableSelect.hideOptionPanel();
  45061. }
  45062. if (isActivated) {
  45063. reactData.isActivated = false;
  45064. }
  45065. if (visiblePanel || isActivated) {
  45066. var $input = $xeTableSelect.$refs.refInput;
  45067. if ($input) {
  45068. $input.blur();
  45069. }
  45070. }
  45071. },
  45072. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  45073. var $xeTableSelect = this;
  45074. var reactData = $xeTableSelect.reactData;
  45075. var visiblePanel = reactData.visiblePanel;
  45076. if (visiblePanel) {
  45077. $xeTableSelect.updatePlacement();
  45078. }
  45079. },
  45080. focusEvent: function focusEvent(evnt) {
  45081. var $xeTableSelect = this;
  45082. var reactData = $xeTableSelect.reactData;
  45083. var isDisabled = $xeTableSelect.computeIsDisabled;
  45084. if (!isDisabled) {
  45085. if (!reactData.visiblePanel) {
  45086. reactData.triggerFocusPanel = true;
  45087. $xeTableSelect.showOptionPanel();
  45088. setTimeout(function () {
  45089. reactData.triggerFocusPanel = false;
  45090. }, 150);
  45091. }
  45092. }
  45093. $xeTableSelect.dispatchEvent('focus', {}, evnt);
  45094. },
  45095. clickEvent: function clickEvent(evnt) {
  45096. var $xeTableSelect = this;
  45097. $xeTableSelect.togglePanelEvent(evnt);
  45098. $xeTableSelect.dispatchEvent('click', {}, evnt);
  45099. },
  45100. blurEvent: function blurEvent(evnt) {
  45101. var $xeTableSelect = this;
  45102. var reactData = $xeTableSelect.reactData;
  45103. reactData.isActivated = false;
  45104. $xeTableSelect.dispatchEvent('blur', {}, evnt);
  45105. },
  45106. togglePanelEvent: function togglePanelEvent(params) {
  45107. var $xeTableSelect = this;
  45108. var reactData = $xeTableSelect.reactData;
  45109. var $event = params.$event;
  45110. $event.preventDefault();
  45111. if (reactData.triggerFocusPanel) {
  45112. reactData.triggerFocusPanel = false;
  45113. } else {
  45114. if (reactData.visiblePanel) {
  45115. $xeTableSelect.hideOptionPanel();
  45116. } else {
  45117. $xeTableSelect.showOptionPanel();
  45118. }
  45119. }
  45120. },
  45121. radioChangeEvent: function radioChangeEvent(params) {
  45122. var $xeTableSelect = this;
  45123. var $event = params.$event,
  45124. row = params.row;
  45125. var valueField = $xeTableSelect.computeValueField;
  45126. var value = row[valueField];
  45127. $xeTableSelect.changeEvent($event, value, row);
  45128. $xeTableSelect.hideOptionPanel();
  45129. },
  45130. checkboxChangeEvent: function checkboxChangeEvent(params) {
  45131. var $xeTableSelect = this;
  45132. var $grid = params.$grid,
  45133. $event = params.$event,
  45134. row = params.row;
  45135. var valueField = $xeTableSelect.computeValueField;
  45136. if ($grid) {
  45137. var checkboxRecords = $grid.getCheckboxRecords();
  45138. var value = checkboxRecords.map(function (row) {
  45139. return row[valueField];
  45140. });
  45141. $xeTableSelect.changeEvent($event, value, row);
  45142. }
  45143. },
  45144. checkboxAllEvent: function checkboxAllEvent(params) {
  45145. var $xeTableSelect = this;
  45146. $xeTableSelect.checkboxChangeEvent(params);
  45147. },
  45148. //
  45149. // Render
  45150. //
  45151. renderVN: function renderVN(h) {
  45152. var VxeTableGridComponent = index_esm_VxeUI.getComponent('vxe-grid');
  45153. var $xeTableSelect = this;
  45154. var props = $xeTableSelect;
  45155. var slots = $xeTableSelect.$scopedSlots;
  45156. var reactData = $xeTableSelect.reactData;
  45157. var className = props.className,
  45158. options = props.options,
  45159. loading = props.loading;
  45160. var initialized = reactData.initialized,
  45161. isActivated = reactData.isActivated,
  45162. isAniVisible = reactData.isAniVisible,
  45163. visiblePanel = reactData.visiblePanel,
  45164. tableColumns = reactData.tableColumns;
  45165. var vSize = $xeTableSelect.computeSize;
  45166. var isDisabled = $xeTableSelect.computeIsDisabled;
  45167. var selectLabel = $xeTableSelect.computeSelectLabel;
  45168. var btnTransfer = $xeTableSelect.computeBtnTransfer;
  45169. var formReadonly = $xeTableSelect.computeFormReadonly;
  45170. var popupOpts = $xeTableSelect.computePopupOpts;
  45171. var popupClassName = popupOpts.className;
  45172. var selectGridOpts = $xeTableSelect.computeSelectGridOpts;
  45173. var rowOpts = $xeTableSelect.computeRowOpts;
  45174. var popupWrapperStyle = $xeTableSelect.computePopupWrapperStyle;
  45175. var headerSlot = slots.header;
  45176. var footerSlot = slots.footer;
  45177. var prefixSlot = slots.prefix;
  45178. if (formReadonly) {
  45179. return h('div', {
  45180. ref: 'refElem',
  45181. class: ['vxe-table-select--readonly', className]
  45182. }, [h('span', {
  45183. class: 'vxe-table-select-label'
  45184. }, selectLabel)]);
  45185. }
  45186. return h('div', {
  45187. ref: 'refElem',
  45188. class: ['vxe-table-select', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  45189. $tableSelect: $xeTableSelect
  45190. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--loading', loading), 'is--active', isActivated)]
  45191. }, [h(input, {
  45192. ref: 'refInput',
  45193. props: {
  45194. clearable: props.clearable,
  45195. placeholder: props.placeholder,
  45196. readonly: true,
  45197. disabled: isDisabled,
  45198. type: 'text',
  45199. prefixIcon: props.prefixIcon,
  45200. suffixIcon: loading ? getIcon().TABLE_SELECT_LOADED : visiblePanel ? getIcon().TABLE_SELECT_OPEN : getIcon().TABLE_SELECT_CLOSE,
  45201. value: loading ? getI18n('vxe.select.loadingText') : selectLabel
  45202. },
  45203. on: {
  45204. clear: $xeTableSelect.clearEvent,
  45205. click: $xeTableSelect.clickEvent,
  45206. focus: $xeTableSelect.focusEvent,
  45207. blur: $xeTableSelect.blurEvent,
  45208. 'suffix-click': $xeTableSelect.togglePanelEvent
  45209. },
  45210. scopedSlots: prefixSlot ? {
  45211. prefix: function prefix() {
  45212. return prefixSlot({});
  45213. }
  45214. } : {}
  45215. }), h('div', {
  45216. ref: 'refOptionPanel',
  45217. class: ['vxe-table--ignore-clear vxe-table-select--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  45218. $tableSelect: $xeTableSelect
  45219. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', !loading && isAniVisible), 'ani--enter', !loading && visiblePanel)],
  45220. attrs: {
  45221. placement: reactData.panelPlacement
  45222. },
  45223. style: reactData.panelStyle
  45224. }, initialized ? [h('div', {
  45225. class: 'vxe-table-select--panel-wrapper'
  45226. }, [headerSlot ? h('div', {
  45227. class: 'vxe-table-select--panel-header'
  45228. }, headerSlot({})) : renderEmptyElement($xeTableSelect), h('div', {
  45229. class: 'vxe-table-select--panel-body'
  45230. }, [h('div', {
  45231. ref: 'refGridWrapper',
  45232. class: 'vxe-table-select-grid--wrapper',
  45233. style: popupWrapperStyle
  45234. }, [VxeTableGridComponent ? h(VxeTableGridComponent, {
  45235. ref: 'refGrid',
  45236. class: 'vxe-table-select--grid',
  45237. props: _objectSpread2(_objectSpread2({}, selectGridOpts), {}, {
  45238. rowConfig: rowOpts,
  45239. data: options,
  45240. columns: tableColumns.length ? tableColumns : selectGridOpts.columns,
  45241. height: '100%',
  45242. autoResize: true
  45243. }),
  45244. on: _objectSpread2(_objectSpread2({}, $xeTableSelect.gridEvents), {}, {
  45245. 'radio-change': $xeTableSelect.radioChangeEvent,
  45246. 'checkbox-change': $xeTableSelect.checkboxChangeEvent,
  45247. 'checkbox-all': $xeTableSelect.checkboxAllEvent
  45248. }),
  45249. scopedSlots: Object.assign({}, slots, {
  45250. header: undefined,
  45251. footer: undefined,
  45252. prefixSlot: undefined
  45253. })
  45254. }) : renderEmptyElement($xeTableSelect)])]), footerSlot ? h('div', {
  45255. class: 'vxe-table-select--panel-footer'
  45256. }, footerSlot({})) : renderEmptyElement($xeTableSelect)])] : [])]);
  45257. }
  45258. },
  45259. watch: {
  45260. options: function options() {
  45261. var $xeTableSelect = this;
  45262. $xeTableSelect.cacheDataMap();
  45263. },
  45264. columns: function columns(val) {
  45265. var $xeTableSelect = this;
  45266. $xeTableSelect.loadTableColumn(val);
  45267. },
  45268. value: function value(val) {
  45269. var $xeTableSelect = this;
  45270. $xeTableSelect.updateModel(val);
  45271. }
  45272. },
  45273. created: function created() {
  45274. var $xeTableSelect = this;
  45275. var props = $xeTableSelect;
  45276. var gridEventKeys = ['form-submit', 'form-reset', 'form-collapse', 'page-change'];
  45277. var gridEvents = $xeTableSelect.gridEvents;
  45278. gridEventKeys.forEach(function (name) {
  45279. gridEvents[getOnName(name)] = function (params) {
  45280. $xeTableSelect.dispatchEvent(name, params, params.$event);
  45281. };
  45282. });
  45283. $xeTableSelect.loadTableColumn(props.columns);
  45284. $xeTableSelect.cacheDataMap();
  45285. },
  45286. mounted: function mounted() {
  45287. var $xeTableSelect = this;
  45288. var props = $xeTableSelect;
  45289. var reactData = $xeTableSelect.reactData;
  45290. var VxeTableGridComponent = index_esm_VxeUI.getComponent('vxe-grid');
  45291. $xeTableSelect.$nextTick(function () {
  45292. if (!VxeTableGridComponent) {
  45293. errLog('vxe.error.reqComp', ['[table-select] vxe-grid']);
  45294. }
  45295. });
  45296. var gridConfig = props.gridConfig;
  45297. if (gridConfig && gridConfig.proxyConfig) {
  45298. if (gridConfig.proxyConfig.autoLoad !== false) {
  45299. reactData.initialized = true;
  45300. }
  45301. }
  45302. globalEvents.on($xeTableSelect, 'mousewheel', $xeTableSelect.handleGlobalMousewheelEvent);
  45303. globalEvents.on($xeTableSelect, 'mousedown', $xeTableSelect.handleGlobalMousedownEvent);
  45304. globalEvents.on($xeTableSelect, 'blur', $xeTableSelect.handleGlobalBlurEvent);
  45305. globalEvents.on($xeTableSelect, 'resize', $xeTableSelect.handleGlobalResizeEvent);
  45306. },
  45307. beforeDestroy: function beforeDestroy() {
  45308. var $xeTableSelect = this;
  45309. var panelElem = $xeTableSelect.$refs.refOptionPanel;
  45310. if (panelElem && panelElem.parentNode) {
  45311. panelElem.parentNode.removeChild(panelElem);
  45312. }
  45313. globalEvents.off($xeTableSelect, 'mousewheel');
  45314. globalEvents.off($xeTableSelect, 'mousedown');
  45315. globalEvents.off($xeTableSelect, 'blur');
  45316. globalEvents.off($xeTableSelect, 'resize');
  45317. },
  45318. render: function render(h) {
  45319. return this.renderVN(h);
  45320. }
  45321. })); /* define-vxe-component end */
  45322. ;// CONCATENATED MODULE: ./packages/table-select/index.ts
  45323. var VxeTableSelect = Object.assign({}, table_select, {
  45324. install: function install(app) {
  45325. app.component(table_select.name, table_select);
  45326. }
  45327. });
  45328. dynamicApp.use(VxeTableSelect);
  45329. index_esm_VxeUI.component(table_select);
  45330. var TableSelect = VxeTableSelect;
  45331. /* harmony default export */ var packages_table_select = (VxeTableSelect);
  45332. ;// CONCATENATED MODULE: ./packages/tabs/src/tabs.ts
  45333. var scrollbarOffsetSize = 20;
  45334. /* harmony default export */ var tabs = (/* define-vxe-component start */defineVxeComponent({
  45335. name: 'VxeTabs',
  45336. mixins: [globalMixins.sizeMixin],
  45337. props: {
  45338. value: [String, Number, Boolean],
  45339. options: Array,
  45340. width: [String, Number],
  45341. height: [String, Number],
  45342. destroyOnClose: {
  45343. type: Boolean,
  45344. default: function _default() {
  45345. return getConfig().tabs.destroyOnClose;
  45346. }
  45347. },
  45348. titleWidth: [String, Number],
  45349. titleAlign: [String, Number],
  45350. type: {
  45351. type: String,
  45352. default: function _default() {
  45353. return getConfig().tabs.type;
  45354. }
  45355. },
  45356. position: {
  45357. type: String,
  45358. default: function _default() {
  45359. return getConfig().tabs.position;
  45360. }
  45361. },
  45362. showClose: Boolean,
  45363. showBody: {
  45364. type: Boolean,
  45365. default: true
  45366. },
  45367. padding: {
  45368. type: Boolean,
  45369. default: function _default() {
  45370. return getConfig().tabs.padding;
  45371. }
  45372. },
  45373. trigger: String,
  45374. beforeChangeMethod: Function,
  45375. closeConfig: Object,
  45376. refreshConfig: Object,
  45377. size: {
  45378. type: String,
  45379. default: function _default() {
  45380. return getConfig().tabs.size || getConfig().size;
  45381. }
  45382. },
  45383. // 已废弃
  45384. beforeCloseMethod: Function
  45385. },
  45386. inject: {
  45387. $xeParentTabs: {
  45388. from: '$xeTabs',
  45389. default: null
  45390. }
  45391. },
  45392. provide: function provide() {
  45393. var $xeTabs = this;
  45394. return {
  45395. $xeTabs: $xeTabs
  45396. };
  45397. },
  45398. data: function data() {
  45399. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  45400. var reactData = {
  45401. staticTabs: [],
  45402. activeName: null,
  45403. initNames: [],
  45404. lintLeft: 0,
  45405. lintTop: 0,
  45406. lintWidth: 0,
  45407. lintHeight: 0,
  45408. scrollbarWidth: 0,
  45409. scrollbarHeight: 0,
  45410. isTabOver: false,
  45411. resizeFlag: 1,
  45412. cacheTabMaps: {}
  45413. };
  45414. var internalData = {
  45415. slTimeout: undefined
  45416. };
  45417. return {
  45418. xID: xID,
  45419. reactData: reactData,
  45420. internalData: internalData
  45421. };
  45422. },
  45423. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  45424. computeParentTabsResizeFlag: function computeParentTabsResizeFlag() {
  45425. var $xeTabs = this;
  45426. var $xeParentTabs = $xeTabs.$xeParentTabs;
  45427. return $xeParentTabs ? $xeParentTabs.reactData.resizeFlag : null;
  45428. },
  45429. computeTabType: function computeTabType() {
  45430. var $xeTabs = this;
  45431. var props = $xeTabs;
  45432. var type = props.type;
  45433. return type || 'default';
  45434. },
  45435. computeTabPosition: function computeTabPosition() {
  45436. var $xeTabs = this;
  45437. var props = $xeTabs;
  45438. var position = props.position;
  45439. return position || 'top';
  45440. },
  45441. computeLrPosition: function computeLrPosition() {
  45442. var $xeTabs = this;
  45443. var tabPosition = $xeTabs.computeTabPosition;
  45444. return tabPosition === 'left' || tabPosition === 'right';
  45445. },
  45446. computeLineStyle: function computeLineStyle() {
  45447. var $xeTabs = this;
  45448. var reactData = $xeTabs.reactData;
  45449. var lintLeft = reactData.lintLeft,
  45450. lintTop = reactData.lintTop,
  45451. lintWidth = reactData.lintWidth,
  45452. lintHeight = reactData.lintHeight;
  45453. var lrPosition = $xeTabs.computeLrPosition;
  45454. return lrPosition ? {
  45455. top: "".concat(lintTop, "px"),
  45456. height: "".concat(lintHeight, "px")
  45457. } : {
  45458. left: "".concat(lintLeft, "px"),
  45459. width: "".concat(lintWidth, "px")
  45460. };
  45461. },
  45462. computeWrapperStyle: function computeWrapperStyle() {
  45463. var $xeTabs = this;
  45464. var props = $xeTabs;
  45465. var width = props.width,
  45466. height = props.height;
  45467. var stys = {};
  45468. if (width) {
  45469. stys.width = toCssUnit(width);
  45470. }
  45471. if (height) {
  45472. stys.height = toCssUnit(height);
  45473. }
  45474. return stys;
  45475. },
  45476. computeCloseOpts: function computeCloseOpts() {
  45477. var $xeTabs = this;
  45478. var props = $xeTabs;
  45479. return Object.assign({}, getConfig().tabs.closeConfig, props.closeConfig);
  45480. },
  45481. computeRefreshOpts: function computeRefreshOpts() {
  45482. var $xeTabs = this;
  45483. var props = $xeTabs;
  45484. return Object.assign({}, getConfig().tabs.refreshConfig, props.refreshConfig);
  45485. },
  45486. computeTabOptions: function computeTabOptions() {
  45487. var $xeTabs = this;
  45488. var props = $xeTabs;
  45489. var options = props.options;
  45490. return (options || []).filter(function (item) {
  45491. return $xeTabs.handleFilterTab(item);
  45492. });
  45493. },
  45494. computeTabStaticOptions: function computeTabStaticOptions() {
  45495. var $xeTabs = this;
  45496. var reactData = $xeTabs.reactData;
  45497. var staticTabs = reactData.staticTabs;
  45498. return staticTabs.filter(function (item) {
  45499. return $xeTabs.handleFilterTab(item);
  45500. });
  45501. }
  45502. }),
  45503. methods: {
  45504. //
  45505. // Method
  45506. //
  45507. dispatchEvent: function dispatchEvent(type, params, evnt) {
  45508. var $xeTabs = this;
  45509. $xeTabs.$emit(type, createEvent(evnt, {
  45510. $tabs: $xeTabs
  45511. }, params));
  45512. },
  45513. emitModel: function emitModel(value) {
  45514. var $xeTabs = this;
  45515. var _events = $xeTabs._events;
  45516. $xeTabs.$emit('input', value);
  45517. if (_events && _events.modelValue) {
  45518. $xeTabs.$emit('modelValue', value);
  45519. } else {
  45520. $xeTabs.$emit('model-value', value);
  45521. }
  45522. },
  45523. prev: function prev() {
  45524. var $xeTabs = this;
  45525. return $xeTabs.handlePrevNext(false);
  45526. },
  45527. next: function next() {
  45528. var $xeTabs = this;
  45529. return $xeTabs.handlePrevNext(true);
  45530. },
  45531. prevTab: function prevTab() {
  45532. var $xeTabs = this;
  45533. warnLog('vxe.error.delFunc', ['[tabs] prevTab', 'prev']);
  45534. return $xeTabs.prev();
  45535. },
  45536. nextTab: function nextTab() {
  45537. var $xeTabs = this;
  45538. warnLog('vxe.error.delFunc', ['[tabs] nextTab', 'next']);
  45539. return $xeTabs.next();
  45540. },
  45541. handleFilterTab: function handleFilterTab(item) {
  45542. var permissionCode = item.permissionCode;
  45543. if (permissionCode) {
  45544. if (!permission.checkVisible(permissionCode)) {
  45545. return false;
  45546. }
  45547. }
  45548. return true;
  45549. },
  45550. callSlot: function callSlot(slotFunc, params, h) {
  45551. var $xeTabs = this;
  45552. var slots = $xeTabs.$scopedSlots;
  45553. if (slotFunc) {
  45554. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(slotFunc)) {
  45555. slotFunc = slots[slotFunc] || null;
  45556. }
  45557. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(slotFunc)) {
  45558. return vn_getSlotVNs(slotFunc.call($xeTabs, params, h));
  45559. }
  45560. }
  45561. return [];
  45562. },
  45563. checkScrolling: function checkScrolling() {
  45564. var $xeTabs = this;
  45565. var lrPosition = $xeTabs.computeLrPosition;
  45566. var headerWrapperEl = $xeTabs.$refs.refHeadWrapperElem;
  45567. var headPrevEl = $xeTabs.$refs.refHeadPrevElem;
  45568. var headNextEl = $xeTabs.$refs.refHeadNextElem;
  45569. if (headerWrapperEl) {
  45570. var scrollLeft = headerWrapperEl.scrollLeft,
  45571. scrollTop = headerWrapperEl.scrollTop,
  45572. clientWidth = headerWrapperEl.clientWidth,
  45573. clientHeight = headerWrapperEl.clientHeight,
  45574. scrollWidth = headerWrapperEl.scrollWidth,
  45575. scrollHeight = headerWrapperEl.scrollHeight;
  45576. if (headPrevEl) {
  45577. if ((lrPosition ? scrollTop : scrollLeft) > 0) {
  45578. addClass(headPrevEl, 'scrolling--middle');
  45579. } else {
  45580. removeClass(headPrevEl, 'scrolling--middle');
  45581. }
  45582. }
  45583. if (headNextEl) {
  45584. if (lrPosition ? clientHeight < scrollHeight - Math.ceil(scrollTop) : clientWidth < scrollWidth - Math.ceil(scrollLeft)) {
  45585. addClass(headNextEl, 'scrolling--middle');
  45586. } else {
  45587. removeClass(headNextEl, 'scrolling--middle');
  45588. }
  45589. }
  45590. }
  45591. },
  45592. updateTabStyle: function updateTabStyle() {
  45593. var $xeTabs = this;
  45594. var reactData = $xeTabs.reactData;
  45595. var handleStyle = function handleStyle() {
  45596. var activeName = reactData.activeName;
  45597. var tabType = $xeTabs.computeTabType;
  45598. var tabOptions = $xeTabs.computeTabOptions;
  45599. var tabStaticOptions = $xeTabs.computeTabStaticOptions;
  45600. var headerWrapperEl = $xeTabs.$refs.refHeadWrapperElem;
  45601. var lrPosition = $xeTabs.computeLrPosition;
  45602. var lintWidth = 0;
  45603. var lintHeight = 0;
  45604. var lintLeft = 0;
  45605. var lintTop = 0;
  45606. var sBarWidth = 0;
  45607. var sBarHeight = 0;
  45608. var isOver = false;
  45609. if (headerWrapperEl) {
  45610. var index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(tabStaticOptions.length ? tabStaticOptions : tabOptions, function (item) {
  45611. return item.name === activeName;
  45612. });
  45613. var children = headerWrapperEl.children,
  45614. offsetWidth = headerWrapperEl.offsetWidth,
  45615. scrollWidth = headerWrapperEl.scrollWidth,
  45616. offsetHeight = headerWrapperEl.offsetHeight,
  45617. scrollHeight = headerWrapperEl.scrollHeight,
  45618. clientWidth = headerWrapperEl.clientWidth,
  45619. clientHeight = headerWrapperEl.clientHeight;
  45620. sBarWidth = offsetWidth - clientWidth;
  45621. sBarHeight = offsetHeight - clientHeight;
  45622. if (lrPosition) {
  45623. isOver = scrollHeight !== clientHeight;
  45624. if (index > -1) {
  45625. var tabEl = children[index];
  45626. if (tabEl) {
  45627. var tabHeight = tabEl.clientHeight;
  45628. var tabWidth = tabEl.clientWidth;
  45629. if (tabType === 'card') {
  45630. lintWidth = tabWidth;
  45631. lintHeight = tabHeight;
  45632. lintTop = tabEl.offsetTop;
  45633. } else if (tabType === 'border-card') {
  45634. lintWidth = tabWidth;
  45635. lintHeight = tabHeight;
  45636. lintTop = tabEl.offsetTop - 1;
  45637. } else {
  45638. lintHeight = Math.max(4, Math.floor(tabHeight * 0.6));
  45639. lintTop = tabEl.offsetTop + Math.floor((tabHeight - lintHeight) / 2);
  45640. }
  45641. }
  45642. }
  45643. } else {
  45644. isOver = scrollWidth !== clientWidth;
  45645. if (index > -1) {
  45646. var _tabEl = children[index];
  45647. if (_tabEl) {
  45648. var _tabWidth = _tabEl.clientWidth;
  45649. if (tabType === 'card') {
  45650. lintWidth = _tabWidth + 1;
  45651. lintLeft = _tabEl.offsetLeft;
  45652. } else if (tabType === 'border-card') {
  45653. lintWidth = _tabWidth;
  45654. lintLeft = _tabEl.offsetLeft - 1;
  45655. } else {
  45656. lintWidth = Math.max(4, Math.floor(_tabWidth * 0.6));
  45657. lintLeft = _tabEl.offsetLeft + Math.floor((_tabWidth - lintWidth) / 2);
  45658. }
  45659. }
  45660. }
  45661. }
  45662. }
  45663. reactData.scrollbarWidth = sBarWidth;
  45664. reactData.scrollbarHeight = sBarHeight;
  45665. reactData.lintLeft = lintLeft;
  45666. reactData.lintTop = lintTop;
  45667. reactData.lintWidth = lintWidth;
  45668. reactData.lintHeight = lintHeight;
  45669. reactData.isTabOver = isOver;
  45670. $xeTabs.checkScrolling();
  45671. };
  45672. handleStyle();
  45673. $xeTabs.$nextTick(handleStyle);
  45674. },
  45675. addInitName: function addInitName(name, evnt) {
  45676. var $xeTabs = this;
  45677. var reactData = $xeTabs.reactData;
  45678. var initNames = reactData.initNames;
  45679. if (name && !initNames.includes(name)) {
  45680. $xeTabs.dispatchEvent('tab-load', {
  45681. name: name
  45682. }, evnt);
  45683. initNames.push(name);
  45684. return true;
  45685. }
  45686. return false;
  45687. },
  45688. initDefaultName: function initDefaultName(list) {
  45689. var $xeTabs = this;
  45690. var props = $xeTabs;
  45691. var reactData = $xeTabs.reactData;
  45692. var activeName = null;
  45693. var nameMaps = {};
  45694. if (list && list.length) {
  45695. var validVal = false;
  45696. activeName = props.value;
  45697. list.forEach(function (item) {
  45698. var _ref = item || {},
  45699. name = _ref.name,
  45700. preload = _ref.preload;
  45701. if (name) {
  45702. nameMaps["".concat(name)] = {
  45703. loading: false
  45704. };
  45705. if (activeName === name) {
  45706. validVal = true;
  45707. }
  45708. if (preload) {
  45709. $xeTabs.addInitName(name, null);
  45710. }
  45711. }
  45712. });
  45713. if (!validVal) {
  45714. activeName = list[0].name;
  45715. $xeTabs.addInitName(activeName, null);
  45716. $xeTabs.emitModel(activeName);
  45717. }
  45718. }
  45719. reactData.activeName = activeName;
  45720. reactData.cacheTabMaps = nameMaps;
  45721. },
  45722. clickEvent: function clickEvent(evnt, item) {
  45723. var $xeTabs = this;
  45724. var props = $xeTabs;
  45725. var reactData = $xeTabs.reactData;
  45726. var trigger = props.trigger;
  45727. var beforeMethod = props.beforeChangeMethod || getConfig().tabs.beforeChangeMethod;
  45728. var activeName = reactData.activeName;
  45729. var name = item.name;
  45730. var value = name;
  45731. $xeTabs.dispatchEvent('tab-click', {
  45732. name: name
  45733. }, evnt);
  45734. if (trigger === 'manual') {
  45735. return;
  45736. }
  45737. if (name !== activeName) {
  45738. Promise.resolve(!beforeMethod || beforeMethod({
  45739. $tabs: $xeTabs,
  45740. name: name,
  45741. oldName: activeName,
  45742. newName: name,
  45743. option: item
  45744. })).then(function (status) {
  45745. if (status) {
  45746. reactData.activeName = name;
  45747. $xeTabs.emitModel(value);
  45748. $xeTabs.addInitName(name, evnt);
  45749. $xeTabs.dispatchEvent('change', {
  45750. value: value,
  45751. name: name,
  45752. oldName: activeName,
  45753. newName: name,
  45754. option: item
  45755. }, evnt);
  45756. $xeTabs.dispatchEvent('tab-change', {
  45757. value: value,
  45758. name: name,
  45759. oldName: activeName,
  45760. newName: name,
  45761. option: item
  45762. }, evnt);
  45763. } else {
  45764. $xeTabs.dispatchEvent('tab-change-fail', {
  45765. value: value,
  45766. name: name,
  45767. oldName: activeName,
  45768. newName: name,
  45769. option: item
  45770. }, evnt);
  45771. }
  45772. }).catch(function () {
  45773. $xeTabs.dispatchEvent('tab-change-fail', {
  45774. value: value,
  45775. name: name,
  45776. oldName: activeName,
  45777. newName: name,
  45778. option: item
  45779. }, evnt);
  45780. });
  45781. }
  45782. },
  45783. handleRefreshTabEvent: function handleRefreshTabEvent(evnt, item) {
  45784. var $xeTabs = this;
  45785. var reactData = $xeTabs.reactData;
  45786. evnt.stopPropagation();
  45787. var activeName = reactData.activeName,
  45788. cacheTabMaps = reactData.cacheTabMaps;
  45789. var name = item.name;
  45790. var refreshOpts = $xeTabs.computeRefreshOpts;
  45791. var queryMethod = refreshOpts.queryMethod;
  45792. var cacheItem = name ? cacheTabMaps["".concat(name)] : null;
  45793. if (cacheItem) {
  45794. if (cacheItem.loading) {
  45795. return;
  45796. }
  45797. if (queryMethod) {
  45798. cacheItem.loading = true;
  45799. Promise.resolve(queryMethod({
  45800. $tabs: $xeTabs,
  45801. value: activeName,
  45802. name: name,
  45803. option: item
  45804. })).finally(function () {
  45805. cacheItem.loading = false;
  45806. });
  45807. } else {
  45808. errLog('vxe.error.notFunc', ['refresh-config.queryMethod']);
  45809. }
  45810. }
  45811. },
  45812. handleCloseTabEvent: function handleCloseTabEvent(evnt, item, index, list) {
  45813. var $xeTabs = this;
  45814. var props = $xeTabs;
  45815. var reactData = $xeTabs.reactData;
  45816. evnt.stopPropagation();
  45817. var activeName = reactData.activeName;
  45818. var closeOpts = $xeTabs.computeCloseOpts;
  45819. var beforeMethod = closeOpts.beforeMethod || props.beforeCloseMethod || getConfig().tabs.beforeCloseMethod;
  45820. var name = item.name;
  45821. var value = activeName;
  45822. var nextName = value;
  45823. if (activeName === name) {
  45824. var nextItem = index < list.length - 1 ? list[index + 1] : list[index - 1];
  45825. nextName = nextItem ? nextItem.name : null;
  45826. }
  45827. Promise.resolve(!beforeMethod || beforeMethod({
  45828. $tabs: $xeTabs,
  45829. value: value,
  45830. name: name,
  45831. nextName: nextName,
  45832. option: item
  45833. })).then(function (status) {
  45834. if (status) {
  45835. $xeTabs.dispatchEvent('tab-close', {
  45836. value: value,
  45837. name: name,
  45838. nextName: nextName
  45839. }, evnt);
  45840. } else {
  45841. $xeTabs.dispatchEvent('tab-close-fail', {
  45842. value: value,
  45843. name: name,
  45844. nextName: nextName
  45845. }, evnt);
  45846. }
  45847. }).catch(function () {
  45848. $xeTabs.dispatchEvent('tab-close-fail', {
  45849. value: value,
  45850. name: name,
  45851. nextName: nextName
  45852. }, evnt);
  45853. });
  45854. },
  45855. startScrollAnimation: function startScrollAnimation(offsetPos, offsetSize) {
  45856. var $xeTabs = this;
  45857. var internalData = $xeTabs.internalData;
  45858. var slTimeout = internalData.slTimeout;
  45859. var lrPosition = $xeTabs.computeLrPosition;
  45860. var offsetLeft = lrPosition ? 0 : offsetSize;
  45861. var offsetTop = lrPosition ? offsetSize : 0;
  45862. var scrollCount = 6;
  45863. var delayNum = 35;
  45864. if (slTimeout) {
  45865. clearTimeout(slTimeout);
  45866. internalData.slTimeout = undefined;
  45867. }
  45868. var _scrollAnimate = function scrollAnimate() {
  45869. var headerWrapperEl = $xeTabs.$refs.refHeadWrapperElem;
  45870. if (scrollCount > 0) {
  45871. scrollCount--;
  45872. if (headerWrapperEl) {
  45873. var clientWidth = headerWrapperEl.clientWidth,
  45874. clientHeight = headerWrapperEl.clientHeight,
  45875. scrollWidth = headerWrapperEl.scrollWidth,
  45876. scrollHeight = headerWrapperEl.scrollHeight,
  45877. scrollLeft = headerWrapperEl.scrollLeft,
  45878. scrollTop = headerWrapperEl.scrollTop;
  45879. if (lrPosition) {
  45880. offsetTop = Math.floor(offsetTop / 2);
  45881. if (offsetPos > 0) {
  45882. if (clientHeight + scrollTop < scrollHeight) {
  45883. headerWrapperEl.scrollTop += offsetTop;
  45884. delayNum -= 4;
  45885. internalData.slTimeout = setTimeout(_scrollAnimate, delayNum);
  45886. }
  45887. } else {
  45888. if (scrollTop > 0) {
  45889. headerWrapperEl.scrollTop -= offsetTop;
  45890. delayNum -= 4;
  45891. internalData.slTimeout = setTimeout(_scrollAnimate, delayNum);
  45892. }
  45893. }
  45894. } else {
  45895. offsetLeft = Math.floor(offsetLeft / 2);
  45896. if (offsetPos > 0) {
  45897. if (clientWidth + scrollLeft < scrollWidth) {
  45898. headerWrapperEl.scrollLeft += offsetLeft;
  45899. delayNum -= 4;
  45900. internalData.slTimeout = setTimeout(_scrollAnimate, delayNum);
  45901. }
  45902. } else {
  45903. if (scrollLeft > 0) {
  45904. headerWrapperEl.scrollLeft -= offsetLeft;
  45905. delayNum -= 4;
  45906. internalData.slTimeout = setTimeout(_scrollAnimate, delayNum);
  45907. }
  45908. }
  45909. }
  45910. $xeTabs.updateTabStyle();
  45911. }
  45912. }
  45913. };
  45914. _scrollAnimate();
  45915. },
  45916. handleScrollToLeft: function handleScrollToLeft(offsetPos) {
  45917. var $xeTabs = this;
  45918. var lrPosition = $xeTabs.computeLrPosition;
  45919. var headerWrapperEl = $xeTabs.$refs.refHeadWrapperElem;
  45920. if (headerWrapperEl) {
  45921. var clientWidth = headerWrapperEl.clientWidth,
  45922. clientHeight = headerWrapperEl.clientHeight;
  45923. var offsetSize = Math.floor((lrPosition ? clientHeight : clientWidth) * 0.75);
  45924. $xeTabs.startScrollAnimation(offsetPos, offsetSize);
  45925. }
  45926. },
  45927. scrollLeftEvent: function scrollLeftEvent() {
  45928. var $xeTabs = this;
  45929. $xeTabs.handleScrollToLeft(-1);
  45930. },
  45931. scrollRightEvent: function scrollRightEvent() {
  45932. var $xeTabs = this;
  45933. $xeTabs.handleScrollToLeft(1);
  45934. },
  45935. scrollToTab: function scrollToTab(name) {
  45936. var $xeTabs = this;
  45937. var tabOptions = $xeTabs.computeTabOptions;
  45938. var tabStaticOptions = $xeTabs.computeTabStaticOptions;
  45939. var lrPosition = $xeTabs.computeLrPosition;
  45940. return $xeTabs.$nextTick().then(function () {
  45941. var headerWrapperEl = $xeTabs.$refs.refHeadWrapperElem;
  45942. if (headerWrapperEl) {
  45943. var index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(tabStaticOptions.length ? tabStaticOptions : tabOptions, function (item) {
  45944. return item.name === name;
  45945. });
  45946. if (index > -1) {
  45947. var scrollLeft = headerWrapperEl.scrollLeft,
  45948. scrollTop = headerWrapperEl.scrollTop,
  45949. clientWidth = headerWrapperEl.clientWidth,
  45950. clientHeight = headerWrapperEl.clientHeight,
  45951. children = headerWrapperEl.children;
  45952. var tabEl = children[index];
  45953. if (tabEl) {
  45954. if (lrPosition) {
  45955. var tabOffsetTop = tabEl.offsetTop;
  45956. var tabClientHeight = tabEl.clientHeight;
  45957. // 如果顶部被挡
  45958. var overSize = tabOffsetTop + tabClientHeight - (scrollTop + clientHeight);
  45959. if (overSize > 0) {
  45960. headerWrapperEl.scrollTop += overSize;
  45961. }
  45962. // 如果底部被挡,优先
  45963. if (tabOffsetTop < scrollTop) {
  45964. headerWrapperEl.scrollTop = tabOffsetTop;
  45965. }
  45966. } else {
  45967. var tabOffsetLeft = tabEl.offsetLeft;
  45968. var tabClientWidth = tabEl.clientWidth;
  45969. // 如果右侧被挡
  45970. var _overSize = tabOffsetLeft + tabClientWidth - (scrollLeft + clientWidth);
  45971. if (_overSize > 0) {
  45972. headerWrapperEl.scrollLeft += _overSize;
  45973. }
  45974. // 如果左侧被挡,优先
  45975. if (tabOffsetLeft < scrollLeft) {
  45976. headerWrapperEl.scrollLeft = tabOffsetLeft;
  45977. }
  45978. }
  45979. }
  45980. }
  45981. $xeTabs.updateTabStyle();
  45982. }
  45983. });
  45984. },
  45985. handlePrevNext: function handlePrevNext(isNext) {
  45986. var $xeTabs = this;
  45987. var reactData = $xeTabs.reactData;
  45988. var activeName = reactData.activeName;
  45989. var tabOptions = $xeTabs.computeTabOptions;
  45990. var tabStaticOptions = $xeTabs.computeTabStaticOptions;
  45991. var list = tabStaticOptions.length ? tabStaticOptions : tabOptions;
  45992. var index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(list, function (item) {
  45993. return item.name === activeName;
  45994. });
  45995. if (index > -1) {
  45996. var item = null;
  45997. if (isNext) {
  45998. if (index < list.length - 1) {
  45999. item = list[index + 1];
  46000. }
  46001. } else {
  46002. if (index > 0) {
  46003. item = list[index - 1];
  46004. }
  46005. }
  46006. if (item) {
  46007. var name = item.name;
  46008. var value = name;
  46009. reactData.activeName = name;
  46010. $xeTabs.emitModel(value);
  46011. $xeTabs.addInitName(name, null);
  46012. }
  46013. }
  46014. return $xeTabs.$nextTick();
  46015. },
  46016. //
  46017. // Render
  46018. //
  46019. renderTabHeader: function renderTabHeader(h, tabList) {
  46020. var $xeTabs = this;
  46021. var props = $xeTabs;
  46022. var slots = $xeTabs.$scopedSlots;
  46023. var reactData = $xeTabs.reactData;
  46024. var allTitleWidth = props.titleWidth,
  46025. allTitleAlign = props.titleAlign,
  46026. showClose = props.showClose,
  46027. closeConfig = props.closeConfig,
  46028. refreshConfig = props.refreshConfig;
  46029. var activeName = reactData.activeName,
  46030. scrollbarWidth = reactData.scrollbarWidth,
  46031. scrollbarHeight = reactData.scrollbarHeight,
  46032. isTabOver = reactData.isTabOver,
  46033. cacheTabMaps = reactData.cacheTabMaps;
  46034. var tabType = $xeTabs.computeTabType;
  46035. var tabPosition = $xeTabs.computeTabPosition;
  46036. var lrPosition = $xeTabs.computeLrPosition;
  46037. var lineStyle = $xeTabs.computeLineStyle;
  46038. var tabPrefixSlot = slots.tabPrefix || slots['tab-prefix'] || slots.prefix;
  46039. var tabSuffixSlot = slots.tabSuffix || slots['tab-suffix'] || slots.suffix || slots.extra;
  46040. var closeOpts = $xeTabs.computeCloseOpts;
  46041. var closeVisibleMethod = closeOpts.visibleMethod;
  46042. var refreshOpts = $xeTabs.computeRefreshOpts;
  46043. var refreshVisibleMethod = refreshOpts.visibleMethod;
  46044. return h('div', {
  46045. key: 'th',
  46046. class: ['vxe-tabs-header', "type--".concat(tabType), "pos--".concat(tabPosition)]
  46047. }, [tabPrefixSlot ? h('div', {
  46048. class: ['vxe-tabs-header--prefix', "type--".concat(tabType), "pos--".concat(tabPosition)]
  46049. }, $xeTabs.callSlot(tabPrefixSlot, {
  46050. name: activeName
  46051. }, h)) : renderEmptyElement($xeTabs), isTabOver ? h('div', {
  46052. ref: 'refHeadPrevElem',
  46053. class: ['vxe-tabs-header--bar vxe-tabs-header--prev-bar', "type--".concat(tabType), "pos--".concat(tabPosition)],
  46054. on: {
  46055. click: $xeTabs.scrollLeftEvent
  46056. }
  46057. }, [h('span', {
  46058. class: lrPosition ? getIcon().TABS_TAB_BUTTON_TOP : getIcon().TABS_TAB_BUTTON_LEFT
  46059. })]) : renderEmptyElement($xeTabs), h('div', {
  46060. class: ['vxe-tabs-header--wrapper', "type--".concat(tabType), "pos--".concat(tabPosition)]
  46061. }, [h('div', {
  46062. ref: 'refHeadWrapperElem',
  46063. class: 'vxe-tabs-header--item-wrapper',
  46064. style: lrPosition ? {
  46065. marginRight: "-".concat(scrollbarWidth + scrollbarOffsetSize, "px"),
  46066. paddingRight: "".concat(scrollbarOffsetSize, "px")
  46067. } : {
  46068. marginBottom: "-".concat(scrollbarHeight + scrollbarOffsetSize, "px"),
  46069. paddingBottom: "".concat(scrollbarOffsetSize, "px")
  46070. },
  46071. on: {
  46072. scroll: $xeTabs.checkScrolling
  46073. }
  46074. }, tabList.map(function (item, index) {
  46075. var title = item.title,
  46076. titleWidth = item.titleWidth,
  46077. titleAlign = item.titleAlign,
  46078. icon = item.icon,
  46079. name = item.name;
  46080. var itemSlots = item.slots || {};
  46081. var titleSlot = itemSlots.title || itemSlots.tab;
  46082. var titlePrefixSlot = itemSlots.titlePrefix || itemSlots['title-prefix'];
  46083. var titleSuffixSlot = itemSlots.titleSuffix || itemSlots['title-suffix'];
  46084. var itemWidth = titleWidth || allTitleWidth;
  46085. var itemAlign = titleAlign || allTitleAlign;
  46086. var params = {
  46087. $tabs: $xeTabs,
  46088. value: activeName,
  46089. name: name,
  46090. option: item
  46091. };
  46092. var isActive = activeName === name;
  46093. var cacheItem = name ? cacheTabMaps["".concat(name)] : null;
  46094. var isLoading = cacheItem ? cacheItem.loading : false;
  46095. return h('div', {
  46096. key: "".concat(name),
  46097. class: ['vxe-tabs-header--item', "type--".concat(tabType), "pos--".concat(tabPosition), itemAlign ? "align--".concat(itemAlign) : '', {
  46098. 'is--active': isActive
  46099. }],
  46100. style: itemWidth ? {
  46101. width: toCssUnit(itemWidth)
  46102. } : undefined,
  46103. on: {
  46104. click: function click(evnt) {
  46105. $xeTabs.clickEvent(evnt, item);
  46106. }
  46107. }
  46108. }, [h('div', {
  46109. class: 'vxe-tabs-header--item-inner'
  46110. }, [h('div', {
  46111. class: 'vxe-tabs-header--item-content'
  46112. }, [icon ? h('span', {
  46113. class: 'vxe-tabs-header--item-icon'
  46114. }, [h('i', {
  46115. class: icon
  46116. })]) : renderEmptyElement($xeTabs), titlePrefixSlot ? h('span', {
  46117. class: 'vxe-tabs-header--item-prefix'
  46118. }, $xeTabs.callSlot(titlePrefixSlot, {
  46119. name: name,
  46120. title: title
  46121. }, h)) : renderEmptyElement($xeTabs), h('span', {
  46122. class: 'vxe-tabs-header--item-name'
  46123. }, titleSlot ? $xeTabs.callSlot(titleSlot, {
  46124. name: name,
  46125. title: title
  46126. }, h) : "".concat(title)), titleSuffixSlot ? h('span', {
  46127. class: 'vxe-tabs-header--item-suffix'
  46128. }, $xeTabs.callSlot(titleSuffixSlot, {
  46129. name: name,
  46130. title: title
  46131. }, h)) : renderEmptyElement($xeTabs)]), (isEnableConf(refreshConfig) || refreshOpts.enabled) && (refreshVisibleMethod ? refreshVisibleMethod(params) : true) ? h('div', {
  46132. class: ['vxe-tabs-header--refresh-btn', {
  46133. 'is--active': isActive,
  46134. 'is--loading': isLoading,
  46135. 'is--disabled': isLoading
  46136. }],
  46137. on: {
  46138. click: function click(evnt) {
  46139. $xeTabs.handleRefreshTabEvent(evnt, item);
  46140. }
  46141. }
  46142. }, [h('i', {
  46143. class: isLoading ? getIcon().TABS_TAB_REFRESH_LOADING : getIcon().TABS_TAB_REFRESH
  46144. })]) : renderEmptyElement($xeTabs), (showClose || isEnableConf(closeConfig) || closeOpts.enabled) && (!closeVisibleMethod || closeVisibleMethod(params)) ? h('div', {
  46145. class: ['vxe-tabs-header--close-btn', {
  46146. 'is--active': isActive
  46147. }],
  46148. on: {
  46149. click: function click(evnt) {
  46150. $xeTabs.handleCloseTabEvent(evnt, item, index, tabList);
  46151. }
  46152. }
  46153. }, [h('i', {
  46154. class: getIcon().TABS_TAB_CLOSE
  46155. })]) : renderEmptyElement($xeTabs)])]);
  46156. }).concat([h('span', {
  46157. key: 'line',
  46158. class: ['vxe-tabs-header--active-line', "type--".concat(tabType), "pos--".concat(tabPosition)],
  46159. style: lineStyle
  46160. })]))]), isTabOver ? h('div', {
  46161. ref: 'refHeadNextElem',
  46162. class: ['vxe-tabs-header--bar vxe-tabs-header--next-bar', "type--".concat(tabType), "pos--".concat(tabPosition)],
  46163. on: {
  46164. click: $xeTabs.scrollRightEvent
  46165. }
  46166. }, [h('span', {
  46167. class: lrPosition ? getIcon().TABS_TAB_BUTTON_BOTTOM : getIcon().TABS_TAB_BUTTON_RIGHT
  46168. })]) : renderEmptyElement($xeTabs), tabSuffixSlot ? h('div', {
  46169. class: ['vxe-tabs-header--suffix', "type--".concat(tabType), "pos--".concat(tabPosition)]
  46170. }, $xeTabs.callSlot(tabSuffixSlot, {
  46171. name: activeName
  46172. }, h)) : renderEmptyElement($xeTabs)]);
  46173. },
  46174. renderTabPane: function renderTabPane(h, item) {
  46175. var $xeTabs = this;
  46176. var reactData = $xeTabs.reactData;
  46177. var initNames = reactData.initNames,
  46178. activeName = reactData.activeName;
  46179. var name = item.name,
  46180. slots = item.slots;
  46181. var defaultSlot = slots ? slots.default : null;
  46182. return name && initNames.includes(name) ? h('div', {
  46183. key: "".concat(name),
  46184. class: ['vxe-tabs-pane--item', {
  46185. 'is--visible': activeName === name
  46186. }]
  46187. }, defaultSlot ? $xeTabs.callSlot(defaultSlot, {
  46188. name: name
  46189. }, h) : []) : renderEmptyElement($xeTabs);
  46190. },
  46191. renderTabContent: function renderTabContent(h, tabList) {
  46192. var $xeTabs = this;
  46193. var props = $xeTabs;
  46194. var reactData = $xeTabs.reactData;
  46195. var destroyOnClose = props.destroyOnClose;
  46196. var activeName = reactData.activeName;
  46197. if (destroyOnClose) {
  46198. var activeTab = tabList.find(function (item) {
  46199. return item.name === activeName;
  46200. });
  46201. return [activeTab ? $xeTabs.renderTabPane(h, activeTab) : renderEmptyElement($xeTabs)];
  46202. }
  46203. return tabList.map(function (item) {
  46204. return $xeTabs.renderTabPane(h, item);
  46205. });
  46206. },
  46207. rendetTabBody: function rendetTabBody(h, tabList) {
  46208. var $xeTabs = this;
  46209. var props = $xeTabs;
  46210. var slots = $xeTabs.$scopedSlots;
  46211. var reactData = $xeTabs.reactData;
  46212. var height = props.height,
  46213. padding = props.padding,
  46214. showBody = props.showBody;
  46215. var activeName = reactData.activeName,
  46216. cacheTabMaps = reactData.cacheTabMaps;
  46217. var vSize = $xeTabs.computeSize;
  46218. var tabType = $xeTabs.computeTabType;
  46219. var tabPosition = $xeTabs.computeTabPosition;
  46220. var refreshOpts = $xeTabs.computeRefreshOpts;
  46221. var showLoading = refreshOpts.showLoading;
  46222. var headerpSlot = slots.header;
  46223. var footerSlot = slots.footer;
  46224. if (!showBody) {
  46225. return renderEmptyElement($xeTabs);
  46226. }
  46227. var cacheItem = activeName ? cacheTabMaps["".concat(activeName)] : null;
  46228. var isLoading = cacheItem ? cacheItem.loading : false;
  46229. var defParams = {
  46230. name: activeName
  46231. };
  46232. return h('div', {
  46233. key: 'tb',
  46234. class: ['vxe-tabs-pane--wrapper', "type--".concat(tabType), "pos--".concat(tabPosition), {
  46235. 'is--content': showBody
  46236. }]
  46237. }, [headerpSlot ? h('div', {
  46238. class: 'vxe-tabs-pane--header'
  46239. }, $xeTabs.callSlot(headerpSlot, defParams, h)) : renderEmptyElement($xeTabs), h('div', {
  46240. class: ['vxe-tabs-pane--body', "type--".concat(tabType), "pos--".concat(tabPosition), _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--padding', padding), 'is--height', height)]
  46241. }, $xeTabs.renderTabContent(h, tabList)), footerSlot ? h('div', {
  46242. class: 'vxe-tabs-pane--footer'
  46243. }, $xeTabs.callSlot(footerSlot, defParams, h)) : renderEmptyElement($xeTabs), showLoading && isLoading ? renderEmptyElement($xeTabs) : h(src_loading, {
  46244. class: 'vxe-tabs--loading',
  46245. props: {
  46246. value: isLoading
  46247. }
  46248. })]);
  46249. },
  46250. renderVN: function renderVN(h) {
  46251. var $xeTabs = this;
  46252. var props = $xeTabs;
  46253. var slots = $xeTabs.$scopedSlots;
  46254. var reactData = $xeTabs.reactData;
  46255. var height = props.height,
  46256. padding = props.padding,
  46257. trigger = props.trigger;
  46258. var activeName = reactData.activeName;
  46259. var vSize = $xeTabs.computeSize;
  46260. var tabOptions = $xeTabs.computeTabOptions;
  46261. var tabStaticOptions = $xeTabs.computeTabStaticOptions;
  46262. var tabType = $xeTabs.computeTabType;
  46263. var tabPosition = $xeTabs.computeTabPosition;
  46264. var wrapperStyle = $xeTabs.computeWrapperStyle;
  46265. var defaultSlot = slots.default;
  46266. var tabList = defaultSlot ? tabStaticOptions : tabOptions;
  46267. var vns = [h('div', {
  46268. key: 'ts',
  46269. class: 'vxe-tabs-slots'
  46270. }, defaultSlot ? defaultSlot({
  46271. name: activeName
  46272. }) : [])];
  46273. if (tabPosition === 'right' || tabPosition === 'bottom') {
  46274. vns.push($xeTabs.rendetTabBody(h, tabList), $xeTabs.renderTabHeader(h, tabList));
  46275. } else {
  46276. vns.push($xeTabs.renderTabHeader(h, tabList), $xeTabs.rendetTabBody(h, tabList));
  46277. }
  46278. return h('div', {
  46279. ref: 'refElem',
  46280. class: ['vxe-tabs', "pos--".concat(tabPosition), "vxe-tabs--".concat(tabType), "trigger--".concat(trigger === 'manual' ? 'trigger' : 'default'), _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--padding', padding), 'is--height', height)],
  46281. style: wrapperStyle
  46282. }, vns);
  46283. }
  46284. },
  46285. watch: {
  46286. position: function position() {
  46287. var $xeTabs = this;
  46288. var reactData = $xeTabs.reactData;
  46289. reactData.resizeFlag++;
  46290. },
  46291. value: function value(val) {
  46292. var $xeTabs = this;
  46293. var reactData = $xeTabs.reactData;
  46294. $xeTabs.addInitName(val, null);
  46295. reactData.activeName = val;
  46296. },
  46297. 'reactData.activeName': function reactDataActiveName(val) {
  46298. var $xeTabs = this;
  46299. $xeTabs.scrollToTab(val);
  46300. },
  46301. options: function options() {
  46302. var $xeTabs = this;
  46303. var props = $xeTabs;
  46304. var reactData = $xeTabs.reactData;
  46305. $xeTabs.initDefaultName(props.options);
  46306. reactData.resizeFlag++;
  46307. },
  46308. 'reactData.staticTabs': function reactDataStaticTabs() {
  46309. var $xeTabs = this;
  46310. var reactData = $xeTabs.reactData;
  46311. $xeTabs.initDefaultName(reactData.staticTabs);
  46312. reactData.resizeFlag++;
  46313. },
  46314. computeParentTabsResizeFlag: function computeParentTabsResizeFlag() {
  46315. var $xeTabs = this;
  46316. $xeTabs.$nextTick(function () {
  46317. $xeTabs.updateTabStyle();
  46318. });
  46319. }
  46320. },
  46321. created: function created() {
  46322. var $xeTabs = this;
  46323. var props = $xeTabs;
  46324. var reactData = $xeTabs.reactData;
  46325. $xeTabs.addInitName(props.value, null);
  46326. $xeTabs.initDefaultName(reactData.staticTabs.length ? reactData.staticTabs : props.options);
  46327. },
  46328. mounted: function mounted() {
  46329. var $xeTabs = this;
  46330. $xeTabs.updateTabStyle();
  46331. globalEvents.on($xeTabs, 'resize', $xeTabs.updateTabStyle);
  46332. },
  46333. beforeDestroy: function beforeDestroy() {
  46334. var $xeTabs = this;
  46335. globalEvents.off($xeTabs, 'resize');
  46336. },
  46337. render: function render(h) {
  46338. return this.renderVN(h);
  46339. }
  46340. })); /* define-vxe-component end */
  46341. ;// CONCATENATED MODULE: ./packages/tabs/index.ts
  46342. var VxeTabs = Object.assign({}, tabs, {
  46343. install: function install(app) {
  46344. app.component(tabs.name, tabs);
  46345. }
  46346. });
  46347. dynamicApp.use(VxeTabs);
  46348. index_esm_VxeUI.component(tabs);
  46349. var Tabs = VxeTabs;
  46350. /* harmony default export */ var packages_tabs = (VxeTabs);
  46351. ;// CONCATENATED MODULE: ./packages/tag/src/tag.ts
  46352. /* harmony default export */ var tag = (/* define-vxe-component start */defineVxeComponent({
  46353. name: 'VxeTag',
  46354. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  46355. props: {
  46356. border: {
  46357. type: Boolean,
  46358. default: function _default() {
  46359. return getConfig().tag.border;
  46360. }
  46361. },
  46362. visible: {
  46363. type: Boolean,
  46364. default: null
  46365. },
  46366. status: String,
  46367. title: [String, Number],
  46368. icon: String,
  46369. closeIcon: {
  46370. type: String,
  46371. default: function _default() {
  46372. return getConfig().tag.closeIcon;
  46373. }
  46374. },
  46375. content: [String, Number],
  46376. round: Boolean,
  46377. closable: {
  46378. type: Boolean,
  46379. default: function _default() {
  46380. return getConfig().tag.closable;
  46381. }
  46382. },
  46383. color: String,
  46384. loading: Boolean,
  46385. size: {
  46386. type: String,
  46387. default: function _default() {
  46388. return getConfig().tag.size || getConfig().size;
  46389. }
  46390. }
  46391. },
  46392. data: function data() {
  46393. var reactData = {
  46394. showTag: true
  46395. };
  46396. return {
  46397. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  46398. reactData: reactData
  46399. };
  46400. },
  46401. computed: _objectSpread2({}, {}),
  46402. watch: {
  46403. visible: function visible() {
  46404. var $xeTag = this;
  46405. $xeTag.updateVisible();
  46406. }
  46407. },
  46408. methods: {
  46409. //
  46410. // Method
  46411. //
  46412. dispatchEvent: function dispatchEvent(type, params, evnt) {
  46413. var $xeTag = this;
  46414. $xeTag.$emit(type, createEvent(evnt, {
  46415. $tag: $xeTag
  46416. }, params));
  46417. },
  46418. updateVisible: function updateVisible() {
  46419. var $xeTag = this;
  46420. var props = $xeTag;
  46421. var reactData = $xeTag.reactData;
  46422. reactData.showTag = props.visible !== false;
  46423. },
  46424. clickEvent: function clickEvent(evnt) {
  46425. var $xeTag = this;
  46426. var props = $xeTag;
  46427. var loading = props.loading;
  46428. if (!loading) {
  46429. $xeTag.dispatchEvent('click', {}, evnt);
  46430. }
  46431. },
  46432. dblclickEvent: function dblclickEvent(evnt) {
  46433. var $xeTag = this;
  46434. var props = $xeTag;
  46435. var loading = props.loading;
  46436. if (!loading) {
  46437. $xeTag.dispatchEvent('dblclick', {}, evnt);
  46438. }
  46439. },
  46440. closeEvent: function closeEvent(evnt) {
  46441. var $xeTag = this;
  46442. var props = $xeTag;
  46443. var reactData = $xeTag.reactData;
  46444. var loading = props.loading;
  46445. if (!loading) {
  46446. var visible = !reactData.showTag;
  46447. reactData.showTag = visible;
  46448. $xeTag.$emit('update:visible', visible);
  46449. $xeTag.dispatchEvent('close', {
  46450. visible: visible
  46451. }, evnt);
  46452. }
  46453. },
  46454. //
  46455. // Render
  46456. //
  46457. renderContent: function renderContent(h) {
  46458. var $xeTag = this;
  46459. var props = $xeTag;
  46460. var slots = $xeTag.$scopedSlots;
  46461. var icon = props.icon,
  46462. content = props.content,
  46463. closable = props.closable,
  46464. closeIcon = props.closeIcon,
  46465. loading = props.loading;
  46466. var defaultSlot = slots.default;
  46467. var iconSlot = slots.icon;
  46468. var closeIconSlot = slots.closeIcon || slots['close-icon'];
  46469. return [iconSlot || icon ? h('span', {
  46470. class: 'vxe-tag--icon'
  46471. }, iconSlot ? iconSlot({}) : [h('i', {
  46472. class: icon
  46473. })]) : renderEmptyElement($xeTag), h('span', {
  46474. class: 'vxe-tag--content'
  46475. }, defaultSlot ? defaultSlot({}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content)), loading || closable ? h('span', {
  46476. class: loading ? 'vxe-tag--loading' : 'vxe-tag--close',
  46477. on: {
  46478. click: $xeTag.closeEvent
  46479. }
  46480. }, !loading && closeIconSlot ? closeIconSlot({}) : [h('i', {
  46481. class: loading ? getIcon().TAG_LOADING : closeIcon || getIcon().TAG_CLOSE
  46482. })]) : renderEmptyElement($xeTag)];
  46483. },
  46484. renderVN: function renderVN(h) {
  46485. var $xeTag = this;
  46486. var props = $xeTag;
  46487. var reactData = $xeTag.reactData;
  46488. var status = props.status,
  46489. color = props.color,
  46490. title = props.title,
  46491. round = props.round,
  46492. border = props.border,
  46493. loading = props.loading;
  46494. var showTag = reactData.showTag;
  46495. var vSize = $xeTag.computeSize;
  46496. if (!showTag) {
  46497. return renderEmptyElement($xeTag);
  46498. }
  46499. return h('span', {
  46500. ref: 'refElem',
  46501. class: ['vxe-tag', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status && !color), "color--".concat(color), color && !status), 'is--color', color), 'is--round', round), 'is--border', border), 'is--loading', loading)],
  46502. attrs: {
  46503. title: title
  46504. },
  46505. on: {
  46506. click: $xeTag.clickEvent,
  46507. dblclick: $xeTag.dblclickEvent
  46508. }
  46509. }, $xeTag.renderContent(h));
  46510. }
  46511. },
  46512. created: function created() {
  46513. var $xeTag = this;
  46514. $xeTag.updateVisible();
  46515. },
  46516. render: function render(h) {
  46517. return this.renderVN(h);
  46518. }
  46519. })); /* define-vxe-component end */
  46520. ;// CONCATENATED MODULE: ./packages/tag/index.ts
  46521. var VxeTag = Object.assign({}, tag, {
  46522. install: function install(app) {
  46523. app.component(tag.name, tag);
  46524. }
  46525. });
  46526. dynamicApp.use(VxeTag);
  46527. index_esm_VxeUI.component(tag);
  46528. var Tag = VxeTag;
  46529. /* harmony default export */ var packages_tag = (VxeTag);
  46530. ;// CONCATENATED MODULE: ./packages/text-ellipsis/src/text-ellipsis.ts
  46531. /* harmony default export */ var text_ellipsis = (/* define-vxe-component start */defineVxeComponent({
  46532. name: 'VxeTextEllipsis',
  46533. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  46534. props: {
  46535. href: String,
  46536. target: String,
  46537. content: [String, Number],
  46538. lineClamp: [String, Number],
  46539. status: String,
  46540. title: [String, Number],
  46541. loading: Boolean,
  46542. offsetLength: [String, Number],
  46543. routerLink: Object,
  46544. underline: {
  46545. type: Boolean,
  46546. default: function _default() {
  46547. return getConfig().textEllipsis.underline;
  46548. }
  46549. },
  46550. /**
  46551. * 权限码
  46552. */
  46553. permissionCode: [String, Number],
  46554. size: {
  46555. type: String,
  46556. default: function _default() {
  46557. return getConfig().textEllipsis.size || getConfig().size;
  46558. }
  46559. }
  46560. },
  46561. data: function data() {
  46562. var reactData = {
  46563. resizeObserver: null,
  46564. visibleLen: 0
  46565. };
  46566. return {
  46567. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  46568. reactData: reactData
  46569. };
  46570. },
  46571. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  46572. computeTextLineClamp: function computeTextLineClamp() {
  46573. var $xeTextEllipsis = this;
  46574. var props = $xeTextEllipsis;
  46575. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.lineClamp);
  46576. },
  46577. computeTextContent: function computeTextContent() {
  46578. var $xeTextEllipsis = this;
  46579. var props = $xeTextEllipsis;
  46580. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(props.content);
  46581. },
  46582. computeTextOffsetLength: function computeTextOffsetLength() {
  46583. var $xeTextEllipsis = this;
  46584. var props = $xeTextEllipsis;
  46585. return props.offsetLength ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.offsetLength) : 0;
  46586. },
  46587. computeVisibleContent: function computeVisibleContent() {
  46588. var $xeTextEllipsis = this;
  46589. var reactData = $xeTextEllipsis.reactData;
  46590. var visibleLen = reactData.visibleLen;
  46591. var textLineClamp = $xeTextEllipsis.computeTextLineClamp;
  46592. var textContent = $xeTextEllipsis.computeTextContent;
  46593. var textOffsetLength = $xeTextEllipsis.computeTextOffsetLength;
  46594. if (textLineClamp > 1) {
  46595. if (textContent.length > visibleLen) {
  46596. return "".concat(textContent.slice(0, Math.max(1, visibleLen - 3 + textOffsetLength)), "...");
  46597. }
  46598. return textContent;
  46599. }
  46600. return textContent;
  46601. }
  46602. }),
  46603. methods: {
  46604. //
  46605. // Method
  46606. //
  46607. dispatchEvent: function dispatchEvent(type, params, evnt) {
  46608. var $xeTextEllipsis = this;
  46609. $xeTextEllipsis.$emit(type, createEvent(evnt, {
  46610. $text: $xeTextEllipsis
  46611. }, params));
  46612. },
  46613. calculateFont: function calculateFont(targetWidth) {
  46614. var $xeTextEllipsis = this;
  46615. var reactData = $xeTextEllipsis.reactData;
  46616. var el = $xeTextEllipsis.$refs.refElem;
  46617. var ryEl = $xeTextEllipsis.$refs.realityElem;
  46618. if (el && ryEl) {
  46619. var fontSize = 12;
  46620. try {
  46621. fontSize = Math.max(10, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(ryEl).fontSize));
  46622. } catch (e) {}
  46623. var textContent = $xeTextEllipsis.computeTextContent;
  46624. var currIndex = Math.floor(targetWidth / fontSize);
  46625. var currStr = textContent.slice(0, currIndex);
  46626. ryEl.textContent = currStr;
  46627. reactData.visibleLen = currStr.length;
  46628. var maxCount = 0;
  46629. while (targetWidth > ryEl.clientWidth && maxCount < 30) {
  46630. maxCount++;
  46631. var offsetIndex = Math.floor((targetWidth - ryEl.clientWidth) / fontSize);
  46632. if (offsetIndex) {
  46633. currIndex += offsetIndex;
  46634. currStr = textContent.slice(0, currIndex);
  46635. ryEl.textContent = currStr;
  46636. reactData.visibleLen = currStr.length;
  46637. } else {
  46638. break;
  46639. }
  46640. }
  46641. ryEl.textContent = '';
  46642. ryEl.style.display = '';
  46643. ryEl.style.position = '';
  46644. ryEl.style.top = '';
  46645. ryEl.style.left = '';
  46646. }
  46647. },
  46648. updateStyle: function updateStyle() {
  46649. var $xeTextEllipsis = this;
  46650. var reactData = $xeTextEllipsis.reactData;
  46651. var el = $xeTextEllipsis.$refs.refElem;
  46652. var ryEl = $xeTextEllipsis.$refs.realityElem;
  46653. var textContent = $xeTextEllipsis.computeTextContent;
  46654. var textLineClamp = $xeTextEllipsis.computeTextLineClamp;
  46655. if (el && ryEl) {
  46656. var cWidth = el.clientWidth;
  46657. ryEl.style.display = 'block';
  46658. ryEl.style.position = 'absolute';
  46659. ryEl.style.top = '-3000px';
  46660. ryEl.style.left = '-3000px';
  46661. ryEl.textContent = textContent;
  46662. var sWidth = ryEl.offsetWidth;
  46663. var targetWidth = Math.floor(cWidth * textLineClamp);
  46664. if (targetWidth > sWidth) {
  46665. reactData.visibleLen = textContent.length;
  46666. } else {
  46667. $xeTextEllipsis.calculateFont(targetWidth);
  46668. }
  46669. } else {
  46670. reactData.visibleLen = textContent.length;
  46671. }
  46672. },
  46673. clickEvent: function clickEvent() {
  46674. var $xeTextEllipsis = this;
  46675. $xeTextEllipsis.$emit('click', {});
  46676. },
  46677. initObserver: function initObserver() {
  46678. var $xeTextEllipsis = this;
  46679. var reactData = $xeTextEllipsis.reactData;
  46680. var resizeObserver = reactData.resizeObserver;
  46681. var textLineClamp = $xeTextEllipsis.computeTextLineClamp;
  46682. if (!resizeObserver) {
  46683. var el = $xeTextEllipsis.$refs.refElem;
  46684. if (el && textLineClamp > 1) {
  46685. if (window.ResizeObserver) {
  46686. var observerObj = new window.ResizeObserver(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().throttle(function () {
  46687. $xeTextEllipsis.updateStyle();
  46688. }, 300, {
  46689. leading: true,
  46690. trailing: true
  46691. }));
  46692. observerObj.observe(el);
  46693. reactData.resizeObserver = observerObj;
  46694. }
  46695. }
  46696. }
  46697. },
  46698. //
  46699. // Render
  46700. //
  46701. renderContent: function renderContent(h) {
  46702. var $xeTextEllipsis = this;
  46703. var props = $xeTextEllipsis;
  46704. var routerLink = props.routerLink,
  46705. href = props.href,
  46706. target = props.target,
  46707. title = props.title;
  46708. var visibleContent = $xeTextEllipsis.computeVisibleContent;
  46709. if (routerLink) {
  46710. return h('router-link', {
  46711. class: 'vxe-text-ellipsis--link',
  46712. props: {
  46713. title: title,
  46714. target: target,
  46715. custom: true
  46716. }
  46717. }, visibleContent);
  46718. }
  46719. if (href) {
  46720. return h('a', {
  46721. class: 'vxe-text-ellipsis--link',
  46722. attrs: {
  46723. href: href,
  46724. target: target,
  46725. title: title
  46726. }
  46727. }, visibleContent);
  46728. }
  46729. return h('span', {
  46730. class: 'vxe-text-ellipsis--content'
  46731. }, visibleContent);
  46732. },
  46733. renderVN: function renderVN(h) {
  46734. var $xeTextEllipsis = this;
  46735. var props = $xeTextEllipsis;
  46736. var loading = props.loading,
  46737. status = props.status,
  46738. title = props.title,
  46739. underline = props.underline;
  46740. var permissionInfo = $xeTextEllipsis.computePermissionInfo;
  46741. var vSize = $xeTextEllipsis.computeSize;
  46742. var textLineClamp = $xeTextEllipsis.computeTextLineClamp;
  46743. if (!permissionInfo.visible) {
  46744. return renderEmptyElement($xeTextEllipsis);
  46745. }
  46746. return h('div', {
  46747. ref: 'refElem',
  46748. class: ['vxe-text-ellipsis', textLineClamp > 1 ? 'is--multi' : 'is--single', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'is--underline', underline), 'is--loading', loading)],
  46749. attrs: {
  46750. title: title
  46751. },
  46752. on: {
  46753. click: $xeTextEllipsis.clickEvent
  46754. }
  46755. }, [h('span', {
  46756. ref: 'realityElem',
  46757. class: 'vxe-text-ellipsis--reality'
  46758. }), $xeTextEllipsis.renderContent(h)]);
  46759. }
  46760. },
  46761. watch: {
  46762. content: function content() {
  46763. var $xeTextEllipsis = this;
  46764. $xeTextEllipsis.updateStyle();
  46765. },
  46766. lineClamp: function lineClamp() {
  46767. var $xeTextEllipsis = this;
  46768. $xeTextEllipsis.initObserver();
  46769. $xeTextEllipsis.updateStyle();
  46770. }
  46771. },
  46772. mounted: function mounted() {
  46773. var $xeTextEllipsis = this;
  46774. $xeTextEllipsis.initObserver();
  46775. $xeTextEllipsis.updateStyle();
  46776. },
  46777. beforeDestroy: function beforeDestroy() {
  46778. var $xeTextEllipsis = this;
  46779. var reactData = $xeTextEllipsis.reactData;
  46780. var resizeObserver = reactData.resizeObserver;
  46781. var el = $xeTextEllipsis.$refs.refElem;
  46782. var ryEl = $xeTextEllipsis.$refs.realityElem;
  46783. if (ryEl) {
  46784. ryEl.textContent = '';
  46785. }
  46786. if (resizeObserver) {
  46787. if (el) {
  46788. resizeObserver.unobserve(el);
  46789. }
  46790. resizeObserver.disconnect();
  46791. reactData.resizeObserver = null;
  46792. }
  46793. },
  46794. render: function render(h) {
  46795. return this.renderVN(h);
  46796. }
  46797. })); /* define-vxe-component end */
  46798. ;// CONCATENATED MODULE: ./packages/text-ellipsis/index.ts
  46799. var VxeTextEllipsis = Object.assign({}, text_ellipsis, {
  46800. install: function install(app) {
  46801. app.component(text_ellipsis.name, text_ellipsis);
  46802. }
  46803. });
  46804. dynamicApp.use(VxeTextEllipsis);
  46805. index_esm_VxeUI.component(text_ellipsis);
  46806. var TextEllipsis = VxeTextEllipsis;
  46807. /* harmony default export */ var packages_text_ellipsis = (VxeTextEllipsis);
  46808. ;// CONCATENATED MODULE: ./packages/text/index.ts
  46809. var VxeText = Object.assign({}, src_text, {
  46810. install: function install(app) {
  46811. app.component(src_text.name, src_text);
  46812. }
  46813. });
  46814. dynamicApp.use(VxeText);
  46815. index_esm_VxeUI.component(src_text);
  46816. var Text = VxeText;
  46817. /* harmony default export */ var packages_text = (VxeText);
  46818. ;// CONCATENATED MODULE: ./packages/textarea/src/textarea.ts
  46819. var autoTxtElem;
  46820. /* harmony default export */ var src_textarea = (/* define-vxe-component start */defineVxeComponent({
  46821. name: 'VxeTextarea',
  46822. model: {
  46823. prop: 'value',
  46824. event: 'modelValue'
  46825. },
  46826. mixins: [globalMixins.sizeMixin],
  46827. props: {
  46828. value: [String, Number],
  46829. className: String,
  46830. immediate: {
  46831. type: Boolean,
  46832. default: true
  46833. },
  46834. name: String,
  46835. readonly: {
  46836. type: Boolean,
  46837. default: null
  46838. },
  46839. editable: {
  46840. type: Boolean,
  46841. default: true
  46842. },
  46843. disabled: {
  46844. type: Boolean,
  46845. default: null
  46846. },
  46847. placeholder: String,
  46848. maxLength: [String, Number],
  46849. rows: {
  46850. type: [String, Number],
  46851. default: null
  46852. },
  46853. cols: {
  46854. type: [String, Number],
  46855. default: null
  46856. },
  46857. showWordCount: Boolean,
  46858. countMethod: Function,
  46859. autosize: [Boolean, Object],
  46860. form: String,
  46861. resize: {
  46862. type: String,
  46863. default: function _default() {
  46864. return getConfig().textarea.resize;
  46865. }
  46866. },
  46867. size: {
  46868. type: String,
  46869. default: function _default() {
  46870. return getConfig().textarea.size || getConfig().size;
  46871. }
  46872. },
  46873. // 已废弃
  46874. maxlength: [String, Number]
  46875. },
  46876. inject: {
  46877. $xeForm: {
  46878. default: null
  46879. },
  46880. formItemInfo: {
  46881. from: 'xeFormItemInfo',
  46882. default: null
  46883. }
  46884. },
  46885. data: function data() {
  46886. var reactData = {
  46887. inputValue: ''
  46888. };
  46889. return {
  46890. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  46891. reactData: reactData
  46892. };
  46893. },
  46894. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  46895. computeFormReadonly: function computeFormReadonly() {
  46896. var $xeTextarea = this;
  46897. var props = $xeTextarea;
  46898. var $xeForm = $xeTextarea.$xeForm;
  46899. var readonly = props.readonly;
  46900. if (readonly === null) {
  46901. if ($xeForm) {
  46902. return $xeForm.readonly;
  46903. }
  46904. return false;
  46905. }
  46906. return readonly;
  46907. },
  46908. computeIsDisabled: function computeIsDisabled() {
  46909. var $xeTextarea = this;
  46910. var props = $xeTextarea;
  46911. var $xeForm = $xeTextarea.$xeForm;
  46912. var disabled = props.disabled;
  46913. if (disabled === null) {
  46914. if ($xeForm) {
  46915. return $xeForm.disabled;
  46916. }
  46917. return false;
  46918. }
  46919. return disabled;
  46920. },
  46921. computeInputReadonly: function computeInputReadonly() {
  46922. var $xeTextarea = this;
  46923. var props = $xeTextarea;
  46924. var editable = props.editable;
  46925. var formReadonly = $xeTextarea.computeFormReadonly;
  46926. return formReadonly || !editable;
  46927. },
  46928. computeInpPlaceholder: function computeInpPlaceholder() {
  46929. var $xeTextarea = this;
  46930. var props = $xeTextarea;
  46931. var placeholder = props.placeholder;
  46932. if (placeholder) {
  46933. return getFuncText(placeholder);
  46934. }
  46935. var globalPlaceholder = getConfig().textarea.placeholder;
  46936. if (globalPlaceholder) {
  46937. return getFuncText(globalPlaceholder);
  46938. }
  46939. return getI18n('vxe.base.pleaseInput');
  46940. },
  46941. computeInpMaxLength: function computeInpMaxLength() {
  46942. var $xeTextarea = this;
  46943. var props = $xeTextarea;
  46944. var maxLength = props.maxLength,
  46945. maxlength = props.maxlength;
  46946. return maxLength || maxlength;
  46947. },
  46948. computeInputCount: function computeInputCount() {
  46949. var $xeTextarea = this;
  46950. var reactData = $xeTextarea.reactData;
  46951. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getSize(reactData.inputValue);
  46952. },
  46953. computeIsCountError: function computeIsCountError() {
  46954. var $xeTextarea = this;
  46955. var inputCount = $xeTextarea.computeInputCount;
  46956. var inpMaxLength = $xeTextarea.computeInpMaxLength;
  46957. return inpMaxLength && inputCount > external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inpMaxLength);
  46958. },
  46959. computeSizeOpts: function computeSizeOpts() {
  46960. var $xeTextarea = this;
  46961. var props = $xeTextarea;
  46962. return Object.assign({
  46963. minRows: 1,
  46964. maxRows: 10
  46965. }, getConfig().textarea.autosize, props.autosize);
  46966. }
  46967. }),
  46968. methods: {
  46969. //
  46970. // Method
  46971. //
  46972. dispatchEvent: function dispatchEvent(type, params, evnt) {
  46973. var $xeTextarea = this;
  46974. $xeTextarea.$emit(type, createEvent(evnt, {
  46975. $textarea: $xeTextarea
  46976. }, params));
  46977. },
  46978. emitModel: function emitModel(value) {
  46979. var $xeTextarea = this;
  46980. var _events = $xeTextarea._events;
  46981. if (_events && _events.modelValue) {
  46982. $xeTextarea.$emit('modelValue', value);
  46983. } else {
  46984. $xeTextarea.$emit('model-value', value);
  46985. }
  46986. },
  46987. focus: function focus() {
  46988. var $xeTextarea = this;
  46989. var textElem = $xeTextarea.$refs.refTextarea;
  46990. textElem.focus();
  46991. return $xeTextarea.$nextTick();
  46992. },
  46993. blur: function blur() {
  46994. var $xeTextarea = this;
  46995. var textElem = $xeTextarea.$refs.refTextarea;
  46996. textElem.blur();
  46997. return $xeTextarea.$nextTick();
  46998. },
  46999. updateAutoTxt: function updateAutoTxt() {
  47000. var $xeTextarea = this;
  47001. var props = $xeTextarea;
  47002. var reactData = $xeTextarea.reactData;
  47003. var size = props.size,
  47004. autosize = props.autosize;
  47005. var inputValue = reactData.inputValue;
  47006. if (autosize) {
  47007. if (!autoTxtElem) {
  47008. autoTxtElem = document.createElement('div');
  47009. }
  47010. if (!autoTxtElem.parentNode) {
  47011. document.body.appendChild(autoTxtElem);
  47012. }
  47013. var textElem = $xeTextarea.$refs.refTextarea;
  47014. if (!textElem) {
  47015. return;
  47016. }
  47017. var textStyle = getComputedStyle(textElem);
  47018. autoTxtElem.className = ['vxe-textarea--autosize', size ? "size--".concat(size) : ''].join(' ');
  47019. autoTxtElem.style.width = "".concat(textElem.clientWidth, "px");
  47020. autoTxtElem.style.padding = textStyle.padding;
  47021. autoTxtElem.innerText = ('' + (inputValue || ' ')).replace(/\n$/, '\n ');
  47022. }
  47023. },
  47024. handleResize: function handleResize() {
  47025. var $xeTextarea = this;
  47026. var props = $xeTextarea;
  47027. if (props.autosize) {
  47028. $xeTextarea.$nextTick(function () {
  47029. var sizeOpts = $xeTextarea.computeSizeOpts;
  47030. var minRows = sizeOpts.minRows,
  47031. maxRows = sizeOpts.maxRows;
  47032. var textElem = $xeTextarea.$refs.refTextarea;
  47033. if (!textElem) {
  47034. return;
  47035. }
  47036. var sizeHeight = autoTxtElem.clientHeight;
  47037. var textStyle = getComputedStyle(textElem);
  47038. var lineHeight = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textStyle.lineHeight);
  47039. var paddingTop = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textStyle.paddingTop);
  47040. var paddingBottom = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textStyle.paddingBottom);
  47041. var borderTopWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textStyle.borderTopWidth);
  47042. var borderBottomWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(textStyle.borderBottomWidth);
  47043. var intervalHeight = paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;
  47044. var rowNum = (sizeHeight - intervalHeight) / lineHeight;
  47045. var textRows = rowNum && /[0-9]/.test('' + rowNum) ? rowNum : Math.floor(rowNum) + 1;
  47046. var vaildRows = textRows;
  47047. if (textRows < minRows) {
  47048. vaildRows = minRows;
  47049. } else if (textRows > maxRows) {
  47050. vaildRows = maxRows;
  47051. }
  47052. textElem.style.height = "".concat(vaildRows * lineHeight + intervalHeight, "px");
  47053. });
  47054. }
  47055. },
  47056. triggerEvent: function triggerEvent(evnt) {
  47057. var $xeTextarea = this;
  47058. var reactData = $xeTextarea.reactData;
  47059. var value = reactData.inputValue;
  47060. $xeTextarea.dispatchEvent(evnt.type, {
  47061. value: value
  47062. }, evnt);
  47063. },
  47064. handleChange: function handleChange(value, evnt) {
  47065. var $xeTextarea = this;
  47066. var props = $xeTextarea;
  47067. var reactData = $xeTextarea.reactData;
  47068. var $xeForm = $xeTextarea.$xeForm;
  47069. var formItemInfo = $xeTextarea.formItemInfo;
  47070. reactData.inputValue = value;
  47071. $xeTextarea.emitModel(value);
  47072. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(props.value) !== value) {
  47073. $xeTextarea.dispatchEvent('change', {
  47074. value: value
  47075. }, evnt);
  47076. // 自动更新校验状态
  47077. if ($xeForm && formItemInfo) {
  47078. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  47079. }
  47080. }
  47081. },
  47082. inputEvent: function inputEvent(evnt) {
  47083. var $xeTextarea = this;
  47084. var props = $xeTextarea;
  47085. var reactData = $xeTextarea.reactData;
  47086. var immediate = props.immediate;
  47087. var textElem = evnt.target;
  47088. var value = textElem.value;
  47089. reactData.inputValue = value;
  47090. if (immediate) {
  47091. $xeTextarea.handleChange(value, evnt);
  47092. }
  47093. $xeTextarea.dispatchEvent('input', {
  47094. value: value
  47095. }, evnt);
  47096. $xeTextarea.handleResize();
  47097. },
  47098. changeEvent: function changeEvent(evnt) {
  47099. var $xeTextarea = this;
  47100. var props = $xeTextarea;
  47101. var reactData = $xeTextarea.reactData;
  47102. var immediate = props.immediate;
  47103. if (immediate) {
  47104. $xeTextarea.triggerEvent(evnt);
  47105. } else {
  47106. $xeTextarea.handleChange(reactData.inputValue, evnt);
  47107. }
  47108. $xeTextarea.dispatchEvent('lazy-change', {
  47109. value: reactData.inputValue
  47110. }, evnt);
  47111. },
  47112. blurEvent: function blurEvent(evnt) {
  47113. var $xeTextarea = this;
  47114. var props = $xeTextarea;
  47115. var reactData = $xeTextarea.reactData;
  47116. var immediate = props.immediate;
  47117. var inputValue = reactData.inputValue;
  47118. if (!immediate) {
  47119. $xeTextarea.handleChange(inputValue, evnt);
  47120. }
  47121. $xeTextarea.dispatchEvent('blur', {
  47122. value: inputValue
  47123. }, evnt);
  47124. },
  47125. //
  47126. // Render
  47127. //
  47128. renderVN: function renderVN(h) {
  47129. var $xeTextarea = this;
  47130. var props = $xeTextarea;
  47131. var reactData = $xeTextarea.reactData;
  47132. var className = props.className,
  47133. resize = props.resize,
  47134. autosize = props.autosize,
  47135. showWordCount = props.showWordCount,
  47136. countMethod = props.countMethod,
  47137. rows = props.rows,
  47138. cols = props.cols;
  47139. var inputValue = reactData.inputValue;
  47140. var vSize = $xeTextarea.computeSize;
  47141. var isDisabled = $xeTextarea.computeIsDisabled;
  47142. var isCountError = $xeTextarea.computeIsCountError;
  47143. var inputCount = $xeTextarea.computeInputCount;
  47144. var inputReadonly = $xeTextarea.computeInputReadonly;
  47145. var formReadonly = $xeTextarea.computeFormReadonly;
  47146. var inpPlaceholder = $xeTextarea.computeInpPlaceholder;
  47147. var inpMaxLength = $xeTextarea.computeInpMaxLength;
  47148. if (formReadonly) {
  47149. return h('div', {
  47150. ref: 'refElem',
  47151. class: ['vxe-textarea--readonly', className]
  47152. }, inputValue);
  47153. }
  47154. return h('div', {
  47155. ref: 'refElem',
  47156. class: ['vxe-textarea', className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--autosize', autosize), 'is--count', showWordCount), 'is--disabled', isDisabled), 'is--rows', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(rows)), 'is--cols', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(cols))],
  47157. attrs: {
  47158. spellcheck: false
  47159. }
  47160. }, [h('textarea', {
  47161. ref: 'refTextarea',
  47162. class: 'vxe-textarea--inner',
  47163. domProps: {
  47164. value: inputValue
  47165. },
  47166. attrs: {
  47167. name: props.name,
  47168. placeholder: inpPlaceholder,
  47169. maxlength: inpMaxLength,
  47170. readonly: inputReadonly,
  47171. disabled: isDisabled,
  47172. rows: rows,
  47173. cols: cols
  47174. },
  47175. style: resize ? {
  47176. resize: resize
  47177. } : {},
  47178. on: {
  47179. input: $xeTextarea.inputEvent,
  47180. change: $xeTextarea.changeEvent,
  47181. keydown: $xeTextarea.triggerEvent,
  47182. keyup: $xeTextarea.triggerEvent,
  47183. click: $xeTextarea.triggerEvent,
  47184. focus: $xeTextarea.triggerEvent,
  47185. blur: $xeTextarea.blurEvent
  47186. }
  47187. }), showWordCount ? h('span', {
  47188. class: ['vxe-textarea--count', {
  47189. 'is--error': isCountError
  47190. }]
  47191. }, countMethod ? "".concat(countMethod({
  47192. value: inputValue
  47193. })) : "".concat(inputCount).concat(inpMaxLength ? "/".concat(inpMaxLength) : '')) : null]);
  47194. }
  47195. },
  47196. watch: {
  47197. value: function value(val) {
  47198. var $xeTextarea = this;
  47199. var reactData = $xeTextarea.reactData;
  47200. reactData.inputValue = val;
  47201. $xeTextarea.updateAutoTxt();
  47202. },
  47203. computeSizeOpts: function computeSizeOpts() {
  47204. var $xeTextarea = this;
  47205. $xeTextarea.updateAutoTxt();
  47206. $xeTextarea.handleResize();
  47207. }
  47208. },
  47209. created: function created() {
  47210. var $xeTextarea = this;
  47211. var props = $xeTextarea;
  47212. var reactData = $xeTextarea.reactData;
  47213. reactData.inputValue = props.value;
  47214. $xeTextarea.$nextTick(function () {
  47215. var autosize = props.autosize;
  47216. if (autosize) {
  47217. $xeTextarea.updateAutoTxt();
  47218. $xeTextarea.handleResize();
  47219. }
  47220. });
  47221. },
  47222. render: function render(h) {
  47223. return this.renderVN(h);
  47224. }
  47225. })); /* define-vxe-component end */
  47226. ;// CONCATENATED MODULE: ./packages/textarea/index.ts
  47227. var VxeTextarea = Object.assign(src_textarea, {
  47228. install: function install(app) {
  47229. app.component(src_textarea.name, src_textarea);
  47230. }
  47231. });
  47232. dynamicApp.use(VxeTextarea);
  47233. index_esm_VxeUI.component(src_textarea);
  47234. var Textarea = VxeTextarea;
  47235. /* harmony default export */ var packages_textarea = (VxeTextarea);
  47236. ;// CONCATENATED MODULE: ./packages/tip/src/tip.ts
  47237. /* harmony default export */ var tip = (/* define-vxe-component start */defineVxeComponent({
  47238. name: 'VxeTip',
  47239. mixins: [globalMixins.sizeMixin, globalMixins.permissionMixin],
  47240. props: {
  47241. title: {
  47242. type: [String, Number],
  47243. default: function _default() {
  47244. return getConfig().tip.title;
  47245. }
  47246. },
  47247. content: [String, Number],
  47248. status: String,
  47249. icon: {
  47250. type: String,
  47251. default: function _default() {
  47252. return getConfig().tip.icon;
  47253. }
  47254. },
  47255. /**
  47256. * 权限码
  47257. */
  47258. permissionCode: [String, Number],
  47259. size: {
  47260. type: String,
  47261. default: function _default() {
  47262. return getConfig().tip.size || getConfig().size;
  47263. }
  47264. }
  47265. },
  47266. data: function data() {
  47267. var reactData = {};
  47268. return {
  47269. xID: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId(),
  47270. reactData: reactData
  47271. };
  47272. },
  47273. computed: _objectSpread2({}, {}),
  47274. methods: {
  47275. //
  47276. // Method
  47277. //
  47278. dispatchEvent: function dispatchEvent(type, params, evnt) {
  47279. var $xeTip = this;
  47280. $xeTip.$emit(type, createEvent(evnt, {
  47281. $tip: $xeTip
  47282. }, params));
  47283. },
  47284. //
  47285. // Render
  47286. //
  47287. renderVN: function renderVN(h) {
  47288. var $xeTip = this;
  47289. var props = $xeTip;
  47290. var slots = $xeTip.$scopedSlots;
  47291. var status = props.status,
  47292. content = props.content,
  47293. icon = props.icon,
  47294. title = props.title;
  47295. var defaultSlot = slots.default;
  47296. var titleSlot = slots.title;
  47297. var iconSlot = slots.icon;
  47298. var permissionInfo = $xeTip.computePermissionInfo;
  47299. var vSize = $xeTip.computeSize;
  47300. if (!permissionInfo.visible) {
  47301. return renderEmptyElement($xeTip);
  47302. }
  47303. return h('div', {
  47304. ref: 'refElem',
  47305. class: ['vxe-tip', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "theme--".concat(status), status), 'has--title', !!(titleSlot || title))]
  47306. }, [iconSlot || icon ? h('div', {
  47307. class: 'vxe-tip--icon'
  47308. }, iconSlot ? vn_getSlotVNs(iconSlot({})) : [h('i', {
  47309. class: icon
  47310. })]) : renderEmptyElement($xeTip), h('div', {
  47311. class: 'vxe-tip--body'
  47312. }, [titleSlot || title ? h('div', {
  47313. class: 'vxe-tip--title'
  47314. }, titleSlot ? vn_getSlotVNs(titleSlot({})) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(title)) : renderEmptyElement($xeTip), h('div', {
  47315. class: 'vxe-tip--content'
  47316. }, defaultSlot ? vn_getSlotVNs(defaultSlot({})) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content))])]);
  47317. }
  47318. },
  47319. render: function render(h) {
  47320. return this.renderVN(h);
  47321. }
  47322. })); /* define-vxe-component end */
  47323. ;// CONCATENATED MODULE: ./packages/tip/index.ts
  47324. var VxeTip = Object.assign({}, tip, {
  47325. install: function install(app) {
  47326. app.component(tip.name, tip);
  47327. app.component('VxeTipsComponent', tip);
  47328. }
  47329. });
  47330. dynamicApp.use(VxeTip);
  47331. index_esm_VxeUI.component(tip);
  47332. var Tips = VxeTip;
  47333. var Tip = VxeTip;
  47334. /* harmony default export */ var packages_tip = (VxeTip);
  47335. ;// CONCATENATED MODULE: ./packages/tooltip/index.ts
  47336. var VxeTooltip = Object.assign({}, tooltip, {
  47337. install: function install(app) {
  47338. app.component(tooltip.name, tooltip);
  47339. }
  47340. });
  47341. dynamicApp.use(VxeTooltip);
  47342. index_esm_VxeUI.component(tooltip);
  47343. var Tooltip = VxeTooltip;
  47344. /* harmony default export */ var packages_tooltip = (VxeTooltip);
  47345. ;// CONCATENATED MODULE: ./packages/tree/src/util.ts
  47346. function enNodeValue(nodeid) {
  47347. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(nodeid) ? '' : encodeURIComponent("".concat(nodeid));
  47348. }
  47349. function deNodeValue(nodeid) {
  47350. return nodeid ? decodeURIComponent("".concat(nodeid)) : nodeid;
  47351. }
  47352. function countTreeExpand($xeTree, prevNode) {
  47353. var count = 1;
  47354. if (!prevNode) {
  47355. return count;
  47356. }
  47357. var props = $xeTree;
  47358. var transform = props.transform;
  47359. var reactData = $xeTree.reactData;
  47360. var updateExpandedFlag = reactData.updateExpandedFlag;
  47361. var internalData = $xeTree.internalData;
  47362. var treeExpandedMaps = internalData.treeExpandedMaps;
  47363. var childrenField = $xeTree.computeChildrenField;
  47364. var mapChildrenField = $xeTree.computeMapChildrenField;
  47365. var nodeChildren = prevNode[transform ? mapChildrenField : childrenField];
  47366. if (nodeChildren && updateExpandedFlag && treeExpandedMaps[$xeTree.getNodeId(prevNode)]) {
  47367. for (var index = 0; index < nodeChildren.length; index++) {
  47368. count += countTreeExpand($xeTree, nodeChildren[index]);
  47369. }
  47370. }
  47371. return count;
  47372. }
  47373. function calcTreeLine($xeTree, node, prevNode) {
  47374. var internalData = $xeTree.internalData;
  47375. var scrollYStore = internalData.scrollYStore;
  47376. var rowHeight = scrollYStore.rowHeight;
  47377. var expandSize = 1;
  47378. if (prevNode) {
  47379. expandSize = countTreeExpand($xeTree, prevNode);
  47380. }
  47381. return (rowHeight || 28) * expandSize - (prevNode ? 1 : 12);
  47382. }
  47383. ;// CONCATENATED MODULE: ./packages/tree/src/tree.ts
  47384. /**
  47385. * 生成节点的唯一主键
  47386. */
  47387. function getNodeUniqueId() {
  47388. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('node_');
  47389. }
  47390. function handleSetExpand(nodeid, expanded, expandedMaps) {
  47391. if (expanded) {
  47392. if (!expandedMaps[nodeid]) {
  47393. expandedMaps[nodeid] = true;
  47394. }
  47395. } else {
  47396. if (expandedMaps[nodeid]) {
  47397. delete expandedMaps[nodeid];
  47398. }
  47399. }
  47400. }
  47401. function handleScrollTo($xeTree, scrollLeft, scrollTop) {
  47402. var reactData = $xeTree.reactData;
  47403. var scrollBodyElem = $xeTree.$refs.refVirtualWrapper;
  47404. if (scrollLeft) {
  47405. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
  47406. scrollTop = scrollLeft.top;
  47407. scrollLeft = scrollLeft.left;
  47408. }
  47409. }
  47410. if (scrollBodyElem) {
  47411. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)) {
  47412. scrollBodyElem.scrollLeft = scrollLeft;
  47413. }
  47414. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollTop)) {
  47415. scrollBodyElem.scrollTop = scrollTop;
  47416. }
  47417. }
  47418. if (reactData.scrollYLoad) {
  47419. return new Promise(function (resolve) {
  47420. setTimeout(function () {
  47421. $xeTree.$nextTick(function () {
  47422. resolve();
  47423. });
  47424. }, 50);
  47425. });
  47426. }
  47427. return $xeTree.$nextTick();
  47428. }
  47429. function tree_createInternalData() {
  47430. return {
  47431. // initialized: false,
  47432. // lastFilterValue: '',
  47433. treeFullData: [],
  47434. afterTreeList: [],
  47435. afterVisibleList: [],
  47436. nodeMaps: {},
  47437. selectCheckboxMaps: {},
  47438. indeterminateRowMaps: {},
  47439. treeExpandedMaps: {},
  47440. treeExpandLazyLoadedMaps: {},
  47441. lastScrollLeft: 0,
  47442. lastScrollTop: 0,
  47443. scrollYStore: {
  47444. startIndex: 0,
  47445. endIndex: 0,
  47446. visibleSize: 0,
  47447. offsetSize: 0,
  47448. rowHeight: 0
  47449. },
  47450. lastScrollTime: 0
  47451. // hpTimeout: undefined
  47452. };
  47453. }
  47454. /* harmony default export */ var tree = (/* define-vxe-component start */defineVxeComponent({
  47455. name: 'VxeTree',
  47456. mixins: [globalMixins.sizeMixin],
  47457. props: {
  47458. data: Array,
  47459. autoResize: {
  47460. type: Boolean,
  47461. default: function _default() {
  47462. return getConfig().tree.autoResize;
  47463. }
  47464. },
  47465. height: [String, Number],
  47466. maxHeight: {
  47467. type: [String, Number],
  47468. default: function _default() {
  47469. return getConfig().tree.maxHeight;
  47470. }
  47471. },
  47472. minHeight: {
  47473. type: [String, Number],
  47474. default: function _default() {
  47475. return getConfig().tree.minHeight;
  47476. }
  47477. },
  47478. loading: Boolean,
  47479. loadingConfig: Object,
  47480. accordion: {
  47481. type: Boolean,
  47482. default: function _default() {
  47483. return getConfig().tree.accordion;
  47484. }
  47485. },
  47486. childrenField: {
  47487. type: String,
  47488. default: function _default() {
  47489. return getConfig().tree.childrenField;
  47490. }
  47491. },
  47492. valueField: {
  47493. type: String,
  47494. default: function _default() {
  47495. return getConfig().tree.valueField;
  47496. }
  47497. },
  47498. keyField: {
  47499. type: String,
  47500. default: function _default() {
  47501. return getConfig().tree.keyField;
  47502. }
  47503. },
  47504. parentField: {
  47505. type: String,
  47506. default: function _default() {
  47507. return getConfig().tree.parentField;
  47508. }
  47509. },
  47510. titleField: {
  47511. type: String,
  47512. default: function _default() {
  47513. return getConfig().tree.titleField;
  47514. }
  47515. },
  47516. hasChildField: {
  47517. type: String,
  47518. default: function _default() {
  47519. return getConfig().tree.hasChildField;
  47520. }
  47521. },
  47522. mapChildrenField: {
  47523. type: String,
  47524. default: function _default() {
  47525. return getConfig().tree.mapChildrenField;
  47526. }
  47527. },
  47528. transform: Boolean,
  47529. // 已废弃
  47530. isCurrent: Boolean,
  47531. // 已废弃
  47532. isHover: Boolean,
  47533. expandAll: Boolean,
  47534. expandNodeKeys: Array,
  47535. showLine: {
  47536. type: Boolean,
  47537. default: function _default() {
  47538. return getConfig().tree.showLine;
  47539. }
  47540. },
  47541. trigger: String,
  47542. indent: {
  47543. type: Number,
  47544. default: function _default() {
  47545. return getConfig().tree.indent;
  47546. }
  47547. },
  47548. showRadio: {
  47549. type: Boolean,
  47550. default: function _default() {
  47551. return getConfig().tree.showRadio;
  47552. }
  47553. },
  47554. checkNodeKey: {
  47555. type: [String, Number],
  47556. default: function _default() {
  47557. return getConfig().tree.checkNodeKey;
  47558. }
  47559. },
  47560. radioConfig: Object,
  47561. showCheckbox: {
  47562. type: Boolean,
  47563. default: function _default() {
  47564. return getConfig().tree.showCheckbox;
  47565. }
  47566. },
  47567. checkNodeKeys: {
  47568. type: Array,
  47569. default: function _default() {
  47570. return getConfig().tree.checkNodeKeys;
  47571. }
  47572. },
  47573. checkboxConfig: Object,
  47574. nodeConfig: Object,
  47575. lazy: Boolean,
  47576. toggleMethod: Function,
  47577. loadMethod: Function,
  47578. showIcon: {
  47579. type: Boolean,
  47580. default: true
  47581. },
  47582. iconOpen: {
  47583. type: String,
  47584. default: function _default() {
  47585. return getConfig().tree.iconOpen;
  47586. }
  47587. },
  47588. iconClose: {
  47589. type: String,
  47590. default: function _default() {
  47591. return getConfig().tree.iconClose;
  47592. }
  47593. },
  47594. iconLoaded: {
  47595. type: String,
  47596. default: function _default() {
  47597. return getConfig().tree.iconLoaded;
  47598. }
  47599. },
  47600. filterValue: [String, Number],
  47601. filterConfig: Object,
  47602. size: {
  47603. type: String,
  47604. default: function _default() {
  47605. return getConfig().tree.size || getConfig().size;
  47606. }
  47607. },
  47608. virtualYConfig: Object
  47609. },
  47610. data: function data() {
  47611. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  47612. var reactData = {
  47613. parentHeight: 0,
  47614. customHeight: 0,
  47615. customMinHeight: 0,
  47616. customMaxHeight: 0,
  47617. currentNode: null,
  47618. scrollYLoad: false,
  47619. bodyHeight: 0,
  47620. topSpaceHeight: 0,
  47621. selectRadioKey: null,
  47622. treeList: [],
  47623. updateExpandedFlag: 1,
  47624. updateCheckboxFlag: 1
  47625. };
  47626. var internalData = tree_createInternalData();
  47627. return {
  47628. xID: xID,
  47629. reactData: reactData,
  47630. internalData: internalData
  47631. };
  47632. },
  47633. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  47634. computeTitleField: function computeTitleField() {
  47635. var $xeTree = this;
  47636. var props = $xeTree;
  47637. return props.titleField || 'title';
  47638. },
  47639. computeKeyField: function computeKeyField() {
  47640. var $xeTree = this;
  47641. var props = $xeTree;
  47642. return props.keyField || 'id';
  47643. },
  47644. computeValueField: function computeValueField() {
  47645. var $xeTree = this;
  47646. var props = $xeTree;
  47647. var keyField = $xeTree.computeKeyField;
  47648. return props.valueField || keyField;
  47649. },
  47650. computeParentField: function computeParentField() {
  47651. var $xeTree = this;
  47652. var props = $xeTree;
  47653. return props.parentField || 'parentId';
  47654. },
  47655. computeChildrenField: function computeChildrenField() {
  47656. var $xeTree = this;
  47657. var props = $xeTree;
  47658. return props.childrenField || 'children';
  47659. },
  47660. computeMapChildrenField: function computeMapChildrenField() {
  47661. var $xeTree = this;
  47662. var props = $xeTree;
  47663. return props.mapChildrenField || 'mapChildren';
  47664. },
  47665. computeHasChildField: function computeHasChildField() {
  47666. var $xeTree = this;
  47667. var props = $xeTree;
  47668. return props.hasChildField || 'hasChild';
  47669. },
  47670. computeVirtualYOpts: function computeVirtualYOpts() {
  47671. var $xeTree = this;
  47672. var props = $xeTree;
  47673. return Object.assign({}, getConfig().tree.virtualYConfig, props.virtualYConfig);
  47674. },
  47675. computeIsRowCurrent: function computeIsRowCurrent() {
  47676. var $xeTree = this;
  47677. var props = $xeTree;
  47678. var nodeOpts = $xeTree.computeNodeOpts;
  47679. var isCurrent = nodeOpts.isCurrent;
  47680. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(isCurrent)) {
  47681. return isCurrent;
  47682. }
  47683. return props.isCurrent;
  47684. },
  47685. computeIsRowHover: function computeIsRowHover() {
  47686. var $xeTree = this;
  47687. var props = $xeTree;
  47688. var nodeOpts = $xeTree.computeNodeOpts;
  47689. var isHover = nodeOpts.isHover;
  47690. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(isHover)) {
  47691. return isHover;
  47692. }
  47693. return props.isHover;
  47694. },
  47695. computeRadioOpts: function computeRadioOpts() {
  47696. var $xeTree = this;
  47697. var props = $xeTree;
  47698. return Object.assign({
  47699. showIcon: true
  47700. }, getConfig().tree.radioConfig, props.radioConfig);
  47701. },
  47702. computeCheckboxOpts: function computeCheckboxOpts() {
  47703. var $xeTree = this;
  47704. var props = $xeTree;
  47705. return Object.assign({
  47706. showIcon: true
  47707. }, getConfig().tree.checkboxConfig, props.checkboxConfig);
  47708. },
  47709. computeNodeOpts: function computeNodeOpts() {
  47710. var $xeTree = this;
  47711. var props = $xeTree;
  47712. return Object.assign({}, getConfig().tree.nodeConfig, props.nodeConfig);
  47713. },
  47714. computeLoadingOpts: function computeLoadingOpts() {
  47715. var $xeTree = this;
  47716. var props = $xeTree;
  47717. return Object.assign({}, getConfig().tree.loadingConfig, props.loadingConfig);
  47718. },
  47719. computeTreeStyle: function computeTreeStyle() {
  47720. var $xeTree = this;
  47721. var reactData = $xeTree.reactData;
  47722. var customHeight = reactData.customHeight,
  47723. customMinHeight = reactData.customMinHeight,
  47724. customMaxHeight = reactData.customMaxHeight;
  47725. var stys = {};
  47726. if (customHeight) {
  47727. stys.height = toCssUnit(customHeight);
  47728. }
  47729. if (customMinHeight) {
  47730. stys.minHeight = toCssUnit(customMinHeight);
  47731. }
  47732. if (customMaxHeight) {
  47733. stys.maxHeight = toCssUnit(customMaxHeight);
  47734. }
  47735. return stys;
  47736. },
  47737. computeFilterOpts: function computeFilterOpts() {
  47738. var $xeTree = this;
  47739. var props = $xeTree;
  47740. return Object.assign({}, getConfig().tree.filterConfig, props.filterConfig);
  47741. }
  47742. }),
  47743. methods: {
  47744. //
  47745. // Method
  47746. //
  47747. dispatchEvent: function dispatchEvent(type, params, evnt) {
  47748. var $xeTree = this;
  47749. $xeTree.$emit(type, createEvent(evnt, {
  47750. $tree: $xeTree
  47751. }, params));
  47752. },
  47753. getNodeId: function getNodeId(node) {
  47754. var $xeTree = this;
  47755. var valueField = $xeTree.computeValueField;
  47756. var nodeKey = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, valueField);
  47757. return enNodeValue(nodeKey);
  47758. },
  47759. getNodeById: function getNodeById(nodeid) {
  47760. var $xeTree = this;
  47761. var internalData = $xeTree.internalData;
  47762. var nodeMaps = internalData.nodeMaps;
  47763. if (nodeid) {
  47764. var nodeItem = nodeMaps[nodeid];
  47765. if (nodeItem) {
  47766. return nodeItem.item;
  47767. }
  47768. }
  47769. return null;
  47770. },
  47771. isExpandByNode: function isExpandByNode(node) {
  47772. var $xeTree = this;
  47773. var reactData = $xeTree.reactData;
  47774. var internalData = $xeTree.internalData;
  47775. var updateExpandedFlag = reactData.updateExpandedFlag;
  47776. var treeExpandedMaps = internalData.treeExpandedMaps;
  47777. var nodeid = $xeTree.getNodeId(node);
  47778. return !!(updateExpandedFlag && treeExpandedMaps[nodeid]);
  47779. },
  47780. isCheckedByRadioNodeId: function isCheckedByRadioNodeId(nodeid) {
  47781. var $xeTree = this;
  47782. var reactData = $xeTree.reactData;
  47783. var selectRadioKey = reactData.selectRadioKey;
  47784. return selectRadioKey === nodeid;
  47785. },
  47786. isCheckedByRadioNode: function isCheckedByRadioNode(node) {
  47787. var $xeTree = this;
  47788. return $xeTree.isCheckedByRadioNodeId($xeTree.getNodeId(node));
  47789. },
  47790. isCheckedByCheckboxNodeId: function isCheckedByCheckboxNodeId(nodeid) {
  47791. var $xeTree = this;
  47792. var reactData = $xeTree.reactData;
  47793. var internalData = $xeTree.internalData;
  47794. var updateCheckboxFlag = reactData.updateCheckboxFlag;
  47795. var selectCheckboxMaps = internalData.selectCheckboxMaps;
  47796. return !!(updateCheckboxFlag && selectCheckboxMaps[nodeid]);
  47797. },
  47798. isCheckedByCheckboxNode: function isCheckedByCheckboxNode(node) {
  47799. var $xeTree = this;
  47800. return $xeTree.isCheckedByCheckboxNodeId($xeTree.getNodeId(node));
  47801. },
  47802. isIndeterminateByCheckboxNodeid: function isIndeterminateByCheckboxNodeid(nodeid) {
  47803. var $xeTree = this;
  47804. var reactData = $xeTree.reactData;
  47805. var internalData = $xeTree.internalData;
  47806. var updateCheckboxFlag = reactData.updateCheckboxFlag;
  47807. var indeterminateRowMaps = internalData.indeterminateRowMaps;
  47808. return !!(updateCheckboxFlag && indeterminateRowMaps[nodeid]);
  47809. },
  47810. isIndeterminateByCheckboxNode: function isIndeterminateByCheckboxNode(node) {
  47811. var $xeTree = this;
  47812. return $xeTree.isIndeterminateByCheckboxNodeid($xeTree.getNodeId(node));
  47813. },
  47814. emitCheckboxMode: function emitCheckboxMode(value) {
  47815. var $xeTree = this;
  47816. $xeTree.$emit('update:checkNodeKeys', value);
  47817. },
  47818. emitRadioMode: function emitRadioMode(value) {
  47819. var $xeTree = this;
  47820. $xeTree.$emit('update:checkNodeKey', value);
  47821. },
  47822. setRadioNode: function setRadioNode(node) {
  47823. var $xeTree = this;
  47824. var reactData = $xeTree.reactData;
  47825. if (node) {
  47826. var nodeid = $xeTree.getNodeId(node);
  47827. reactData.selectRadioKey = nodeid;
  47828. $xeTree.emitRadioMode(deNodeValue(nodeid));
  47829. } else {
  47830. $xeTree.emitRadioMode(null);
  47831. }
  47832. return $xeTree.$nextTick();
  47833. },
  47834. setCheckboxNode: function setCheckboxNode(nodeList, checked) {
  47835. var $xeTree = this;
  47836. if (nodeList) {
  47837. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(nodeList)) {
  47838. nodeList = [nodeList];
  47839. }
  47840. $xeTree.handleCheckedCheckboxNode(nodeList, checked);
  47841. }
  47842. $xeTree.emitCheckboxMode($xeTree.getCheckboxNodeIds());
  47843. return $xeTree.$nextTick();
  47844. },
  47845. setCheckboxByNodeId: function setCheckboxByNodeId(nodeKeys, checked) {
  47846. var $xeTree = this;
  47847. $xeTree.handleSetCheckboxByNodeId(nodeKeys, checked);
  47848. $xeTree.emitCheckboxMode($xeTree.getCheckboxNodeIds());
  47849. return $xeTree.$nextTick();
  47850. },
  47851. handleSetCheckboxByNodeId: function handleSetCheckboxByNodeId(nodeKeys, checked) {
  47852. var $xeTree = this;
  47853. var internalData = $xeTree.internalData;
  47854. var nodeMaps = internalData.nodeMaps;
  47855. if (nodeKeys) {
  47856. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(nodeKeys)) {
  47857. nodeKeys = [nodeKeys];
  47858. }
  47859. var nodeList = [];
  47860. nodeKeys.forEach(function (nodeKey) {
  47861. var nodeid = enNodeValue(nodeKey);
  47862. var nodeItem = nodeMaps[nodeid];
  47863. if (nodeItem) {
  47864. nodeList.push(nodeItem.item);
  47865. }
  47866. });
  47867. $xeTree.handleCheckedCheckboxNode(nodeList, checked);
  47868. }
  47869. return $xeTree.$nextTick();
  47870. },
  47871. handleCheckedCheckboxNode: function handleCheckedCheckboxNode(nodeList, checked) {
  47872. var $xeTree = this;
  47873. var props = $xeTree;
  47874. var reactData = $xeTree.reactData;
  47875. var internalData = $xeTree.internalData;
  47876. var transform = props.transform;
  47877. var selectCheckboxMaps = internalData.selectCheckboxMaps;
  47878. var mapChildrenField = $xeTree.computeMapChildrenField;
  47879. var childrenField = $xeTree.computeChildrenField;
  47880. var checkboxOpts = $xeTree.computeCheckboxOpts;
  47881. var checkStrictly = checkboxOpts.checkStrictly;
  47882. var handleSelect = function handleSelect(node) {
  47883. var nodeid = $xeTree.getNodeId(node);
  47884. if (checked) {
  47885. if (!selectCheckboxMaps[nodeid]) {
  47886. selectCheckboxMaps[nodeid] = node;
  47887. }
  47888. } else {
  47889. if (selectCheckboxMaps[nodeid]) {
  47890. delete selectCheckboxMaps[nodeid];
  47891. }
  47892. }
  47893. };
  47894. if (checkStrictly) {
  47895. nodeList.forEach(handleSelect);
  47896. } else {
  47897. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(nodeList, handleSelect, {
  47898. children: transform ? mapChildrenField : childrenField
  47899. });
  47900. }
  47901. reactData.updateCheckboxFlag++;
  47902. $xeTree.updateCheckboxStatus();
  47903. },
  47904. updateCheckboxChecked: function updateCheckboxChecked(nodeKeys) {
  47905. var $xeTree = this;
  47906. var internalData = $xeTree.internalData;
  47907. internalData.selectCheckboxMaps = {};
  47908. $xeTree.handleSetCheckboxByNodeId(nodeKeys, true);
  47909. },
  47910. handleSetExpand: function handleSetExpand(nodeid, expanded, expandedMaps) {
  47911. if (expanded) {
  47912. if (!expandedMaps[nodeid]) {
  47913. expandedMaps[nodeid] = true;
  47914. }
  47915. } else {
  47916. if (expandedMaps[nodeid]) {
  47917. delete expandedMaps[nodeid];
  47918. }
  47919. }
  47920. },
  47921. getParentElem: function getParentElem() {
  47922. var $xeTree = this;
  47923. var el = $xeTree.$refs.refElem;
  47924. return el ? el.parentElement : null;
  47925. },
  47926. calcTableHeight: function calcTableHeight(key) {
  47927. var $xeTree = this;
  47928. var props = $xeTree;
  47929. var reactData = $xeTree.reactData;
  47930. var parentHeight = reactData.parentHeight;
  47931. var val = props[key];
  47932. var num = 0;
  47933. if (val) {
  47934. if (val === '100%' || val === 'auto') {
  47935. num = parentHeight;
  47936. } else {
  47937. if (isScale(val)) {
  47938. num = Math.floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toInteger(val) || 1) / 100 * parentHeight);
  47939. } else {
  47940. num = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(val);
  47941. }
  47942. num = Math.max(40, num);
  47943. }
  47944. }
  47945. return num;
  47946. },
  47947. updateHeight: function updateHeight() {
  47948. var $xeTree = this;
  47949. var reactData = $xeTree.reactData;
  47950. reactData.customHeight = $xeTree.calcTableHeight('height');
  47951. reactData.customMinHeight = $xeTree.calcTableHeight('minHeight');
  47952. reactData.customMaxHeight = $xeTree.calcTableHeight('maxHeight');
  47953. // 如果启用虚拟滚动,默认高度
  47954. if (reactData.scrollYLoad && !(reactData.customHeight || reactData.customMinHeight)) {
  47955. reactData.customHeight = 300;
  47956. }
  47957. },
  47958. createNode: function createNode(records) {
  47959. var $xeTree = this;
  47960. var valueField = $xeTree.computeValueField;
  47961. return Promise.resolve(records.map(function (obj) {
  47962. var item = _objectSpread2({}, obj);
  47963. var nodeid = $xeTree.getNodeId(item);
  47964. if (!nodeid) {
  47965. nodeid = getNodeUniqueId();
  47966. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(item, valueField, nodeid);
  47967. }
  47968. return item;
  47969. }));
  47970. },
  47971. cacheNodeMap: function cacheNodeMap() {
  47972. var $xeTree = this;
  47973. var internalData = $xeTree.internalData;
  47974. var treeFullData = internalData.treeFullData;
  47975. var valueField = $xeTree.computeValueField;
  47976. var childrenField = $xeTree.computeChildrenField;
  47977. var keyMaps = {};
  47978. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(treeFullData, function (item, index, items, path, parent, nodes) {
  47979. var nodeid = $xeTree.getNodeId(item);
  47980. if (!nodeid) {
  47981. nodeid = getNodeUniqueId();
  47982. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(item, valueField, nodeid);
  47983. }
  47984. keyMaps[nodeid] = {
  47985. item: item,
  47986. index: index,
  47987. items: items,
  47988. parent: parent,
  47989. nodes: nodes,
  47990. level: nodes.length,
  47991. treeIndex: index,
  47992. lineCount: 0,
  47993. treeLoaded: false
  47994. };
  47995. }, {
  47996. children: childrenField
  47997. });
  47998. internalData.nodeMaps = keyMaps;
  47999. },
  48000. updateAfterDataIndex: function updateAfterDataIndex() {
  48001. var $xeTree = this;
  48002. var props = $xeTree;
  48003. var internalData = $xeTree.internalData;
  48004. var transform = props.transform;
  48005. var afterTreeList = internalData.afterTreeList,
  48006. nodeMaps = internalData.nodeMaps;
  48007. var childrenField = $xeTree.computeChildrenField;
  48008. var mapChildrenField = $xeTree.computeMapChildrenField;
  48009. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeList, function (item, index, items) {
  48010. var nodeid = $xeTree.getNodeId(item);
  48011. var nodeItem = nodeMaps[nodeid];
  48012. if (nodeItem) {
  48013. nodeItem.items = items;
  48014. nodeItem.treeIndex = index;
  48015. } else {
  48016. var rest = {
  48017. item: item,
  48018. index: index,
  48019. items: items,
  48020. parent: parent,
  48021. nodes: [],
  48022. level: 0,
  48023. treeIndex: index,
  48024. lineCount: 0,
  48025. treeLoaded: false
  48026. };
  48027. nodeMaps[nodeid] = rest;
  48028. }
  48029. }, {
  48030. children: transform ? mapChildrenField : childrenField
  48031. });
  48032. },
  48033. updateAfterFullData: function updateAfterFullData() {
  48034. var $xeTree = this;
  48035. var props = $xeTree;
  48036. var internalData = $xeTree.internalData;
  48037. var transform = props.transform,
  48038. filterValue = props.filterValue;
  48039. var treeFullData = internalData.treeFullData,
  48040. lastFilterValue = internalData.lastFilterValue;
  48041. var titleField = $xeTree.computeTitleField;
  48042. var childrenField = $xeTree.computeChildrenField;
  48043. var mapChildrenField = $xeTree.computeMapChildrenField;
  48044. var filterOpts = $xeTree.computeFilterOpts;
  48045. var autoExpandAll = filterOpts.autoExpandAll,
  48046. beforeFilterMethod = filterOpts.beforeFilterMethod,
  48047. filterMethod = filterOpts.filterMethod,
  48048. afterFilterMethod = filterOpts.afterFilterMethod;
  48049. var fullList = treeFullData;
  48050. var treeList = fullList;
  48051. var filterStr = '';
  48052. if (filterValue || filterValue === 0) {
  48053. filterStr = "".concat(filterValue);
  48054. var handleSearch = filterMethod ? function (item) {
  48055. return filterMethod({
  48056. $tree: $xeTree,
  48057. node: item,
  48058. filterValue: filterStr
  48059. });
  48060. } : function (item) {
  48061. return String(item[titleField]).toLowerCase().indexOf(filterStr) > -1;
  48062. };
  48063. var bafParams = {
  48064. $tree: $xeTree,
  48065. filterValue: filterStr
  48066. };
  48067. if (beforeFilterMethod) {
  48068. beforeFilterMethod(bafParams);
  48069. }
  48070. if (transform) {
  48071. treeList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(treeFullData, handleSearch, {
  48072. original: true,
  48073. isEvery: true,
  48074. children: childrenField,
  48075. mapChildren: mapChildrenField
  48076. });
  48077. fullList = treeList;
  48078. } else {
  48079. fullList = treeFullData.filter(handleSearch);
  48080. }
  48081. internalData.lastFilterValue = filterStr;
  48082. $xeTree.$nextTick(function () {
  48083. // 筛选时自动展开
  48084. if (autoExpandAll) {
  48085. $xeTree.setAllExpandNode(true).then(function () {
  48086. if (afterFilterMethod) {
  48087. afterFilterMethod(bafParams);
  48088. }
  48089. });
  48090. } else {
  48091. if (afterFilterMethod) {
  48092. afterFilterMethod(bafParams);
  48093. }
  48094. }
  48095. });
  48096. } else {
  48097. if (transform) {
  48098. treeList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(treeFullData, function () {
  48099. return true;
  48100. }, {
  48101. original: true,
  48102. isEvery: true,
  48103. children: childrenField,
  48104. mapChildren: mapChildrenField
  48105. });
  48106. fullList = treeList;
  48107. if (lastFilterValue) {
  48108. var _bafParams = {
  48109. $tree: $xeTree,
  48110. filterValue: filterStr
  48111. };
  48112. if (beforeFilterMethod) {
  48113. beforeFilterMethod(_bafParams);
  48114. }
  48115. // 取消筛选时自动收起
  48116. $xeTree.$nextTick(function () {
  48117. if (autoExpandAll) {
  48118. $xeTree.clearAllExpandNode().then(function () {
  48119. if (afterFilterMethod) {
  48120. afterFilterMethod(_bafParams);
  48121. }
  48122. });
  48123. } else {
  48124. if (afterFilterMethod) {
  48125. afterFilterMethod(_bafParams);
  48126. }
  48127. }
  48128. });
  48129. }
  48130. }
  48131. internalData.lastFilterValue = '';
  48132. }
  48133. internalData.afterVisibleList = fullList;
  48134. internalData.afterTreeList = treeList;
  48135. $xeTree.updateAfterDataIndex();
  48136. },
  48137. /**
  48138. * 如果为虚拟树、则将树结构拍平
  48139. */
  48140. handleTreeToList: function handleTreeToList() {
  48141. var $xeTree = this;
  48142. var props = $xeTree;
  48143. var internalData = $xeTree.internalData;
  48144. var transform = props.transform;
  48145. var afterTreeList = internalData.afterTreeList,
  48146. treeExpandedMaps = internalData.treeExpandedMaps;
  48147. var mapChildrenField = $xeTree.computeMapChildrenField;
  48148. var expandMaps = {};
  48149. if (transform) {
  48150. var fullData = [];
  48151. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeList, function (item, index, items, path, parentRow) {
  48152. var nodeid = $xeTree.getNodeId(item);
  48153. var parentNodeid = $xeTree.getNodeId(parentRow);
  48154. if (!parentRow || expandMaps[parentNodeid] && treeExpandedMaps[parentNodeid]) {
  48155. expandMaps[nodeid] = 1;
  48156. fullData.push(item);
  48157. }
  48158. }, {
  48159. children: mapChildrenField
  48160. });
  48161. $xeTree.updateScrollYStatus(fullData);
  48162. internalData.afterVisibleList = fullData;
  48163. return fullData;
  48164. }
  48165. return internalData.afterVisibleList;
  48166. },
  48167. handleData: function handleData(force) {
  48168. var $xeTree = this;
  48169. var reactData = $xeTree.reactData;
  48170. var internalData = $xeTree.internalData;
  48171. var scrollYLoad = reactData.scrollYLoad;
  48172. var scrollYStore = internalData.scrollYStore;
  48173. var fullList = internalData.afterVisibleList;
  48174. if (force) {
  48175. // 更新数据,处理筛选和排序
  48176. $xeTree.updateAfterFullData();
  48177. // 如果为虚拟树,将树结构拍平
  48178. fullList = $xeTree.handleTreeToList();
  48179. }
  48180. var treeList = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
  48181. reactData.treeList = treeList;
  48182. },
  48183. triggerSearchEvent: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(function () {
  48184. var $xeSelect = this;
  48185. $xeSelect.handleData(true);
  48186. }, 350, {
  48187. trailing: true
  48188. }),
  48189. loadData: function loadData(list) {
  48190. var $xeTree = this;
  48191. var props = $xeTree;
  48192. var internalData = $xeTree.internalData;
  48193. var expandAll = props.expandAll,
  48194. expandNodeKeys = props.expandNodeKeys,
  48195. transform = props.transform;
  48196. var initialized = internalData.initialized,
  48197. scrollYStore = internalData.scrollYStore;
  48198. var keyField = $xeTree.computeKeyField;
  48199. var parentField = $xeTree.computeParentField;
  48200. var childrenField = $xeTree.computeChildrenField;
  48201. var fullData = transform ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(list, {
  48202. key: keyField,
  48203. parentKey: parentField,
  48204. mapChildren: childrenField
  48205. }) : list ? list.slice(0) : [];
  48206. internalData.treeFullData = fullData;
  48207. Object.assign(scrollYStore, {
  48208. startIndex: 0,
  48209. endIndex: 1,
  48210. visibleSize: 0
  48211. });
  48212. var sYLoad = $xeTree.updateScrollYStatus(fullData);
  48213. $xeTree.cacheNodeMap();
  48214. $xeTree.handleData(true);
  48215. if (sYLoad) {
  48216. if (!(props.height || props.maxHeight)) {
  48217. errLog('vxe.error.reqProp', ['[tree] height | max-height | virtual-y-config.enabled=false']);
  48218. }
  48219. }
  48220. return $xeTree.computeScrollLoad().then(function () {
  48221. if (!initialized) {
  48222. if (list && list.length) {
  48223. internalData.initialized = true;
  48224. if (expandAll) {
  48225. $xeTree.setAllExpandNode(true);
  48226. } else if (expandNodeKeys && expandNodeKeys.length) {
  48227. $xeTree.setExpandByNodeId(expandNodeKeys, true);
  48228. }
  48229. $xeTree.handleSetCheckboxByNodeId(props.checkNodeKeys || [], true);
  48230. }
  48231. }
  48232. $xeTree.updateHeight();
  48233. $xeTree.refreshScroll();
  48234. });
  48235. },
  48236. updateScrollYStatus: function updateScrollYStatus(fullData) {
  48237. var $xeTree = this;
  48238. var props = $xeTree;
  48239. var reactData = $xeTree.reactData;
  48240. var internalData = $xeTree.internalData;
  48241. var transform = props.transform;
  48242. var virtualYOpts = $xeTree.computeVirtualYOpts;
  48243. var allList = fullData || internalData.treeFullData;
  48244. // 如果gt为0,则总是启用
  48245. var scrollYLoad = !!transform && !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length);
  48246. reactData.scrollYLoad = scrollYLoad;
  48247. return scrollYLoad;
  48248. },
  48249. updateYSpace: function updateYSpace() {
  48250. var $xeTree = this;
  48251. var reactData = $xeTree.reactData;
  48252. var internalData = $xeTree.internalData;
  48253. var scrollYLoad = reactData.scrollYLoad;
  48254. var scrollYStore = internalData.scrollYStore,
  48255. afterVisibleList = internalData.afterVisibleList;
  48256. reactData.bodyHeight = scrollYLoad ? afterVisibleList.length * scrollYStore.rowHeight : 0;
  48257. reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
  48258. },
  48259. updateYData: function updateYData() {
  48260. var $xeTree = this;
  48261. $xeTree.handleData();
  48262. $xeTree.updateYSpace();
  48263. },
  48264. computeScrollLoad: function computeScrollLoad() {
  48265. var $xeTree = this;
  48266. var reactData = $xeTree.reactData;
  48267. var internalData = $xeTree.internalData;
  48268. return $xeTree.$nextTick().then(function () {
  48269. var scrollYLoad = reactData.scrollYLoad;
  48270. var scrollYStore = internalData.scrollYStore;
  48271. var virtualBodyElem = $xeTree.$refs.refVirtualBody;
  48272. var virtualYOpts = $xeTree.computeVirtualYOpts;
  48273. var rowHeight = 0;
  48274. var firstItemElem;
  48275. if (virtualBodyElem) {
  48276. if (!firstItemElem) {
  48277. firstItemElem = virtualBodyElem.children[0];
  48278. }
  48279. }
  48280. if (firstItemElem) {
  48281. rowHeight = firstItemElem.offsetHeight;
  48282. }
  48283. rowHeight = Math.max(20, rowHeight);
  48284. scrollYStore.rowHeight = rowHeight;
  48285. // 计算 Y 逻辑
  48286. if (scrollYLoad) {
  48287. var scrollBodyElem = $xeTree.$refs.refVirtualWrapper;
  48288. var visibleYSize = Math.max(8, scrollBodyElem ? Math.ceil(scrollBodyElem.clientHeight / rowHeight) : 0);
  48289. var offsetYSize = Math.max(0, Math.min(2, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualYOpts.oSize)));
  48290. scrollYStore.offsetSize = offsetYSize;
  48291. scrollYStore.visibleSize = visibleYSize;
  48292. scrollYStore.endIndex = Math.max(scrollYStore.startIndex, visibleYSize + offsetYSize, scrollYStore.endIndex);
  48293. $xeTree.updateYData();
  48294. } else {
  48295. $xeTree.updateYSpace();
  48296. }
  48297. });
  48298. },
  48299. /**
  48300. * 如果有滚动条,则滚动到对应的位置
  48301. */
  48302. scrollTo: function scrollTo(scrollLeft, scrollTop) {
  48303. var $xeTree = this;
  48304. return handleScrollTo($xeTree, scrollLeft, scrollTop);
  48305. },
  48306. scrollToNode: function scrollToNode(node) {
  48307. var $xeTree = this;
  48308. return $xeTree.scrollToNodeId($xeTree.getNodeId(node));
  48309. },
  48310. scrollToNodeId: function scrollToNodeId(nodeid) {
  48311. var $xeTree = this;
  48312. var props = $xeTree;
  48313. var internalData = $xeTree.internalData;
  48314. var transform = props.transform;
  48315. var scrollYStore = internalData.scrollYStore,
  48316. afterTreeList = internalData.afterTreeList;
  48317. var childrenField = $xeTree.computeChildrenField;
  48318. var mapChildrenField = $xeTree.computeMapChildrenField;
  48319. var scrollBodyElem = $xeTree.$refs.refVirtualWrapper;
  48320. if (nodeid && scrollBodyElem) {
  48321. if (transform) {
  48322. var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(afterTreeList, function (item) {
  48323. return $xeTree.getNodeId(item) === nodeid;
  48324. }, {
  48325. children: transform ? mapChildrenField : childrenField
  48326. });
  48327. if (matchObj) {
  48328. return $xeTree.setExpandNode(matchObj.nodes, true).then(function () {
  48329. var itemIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(internalData.afterVisibleList, function (item) {
  48330. return $xeTree.getNodeId(item) === nodeid;
  48331. });
  48332. if (itemIndex > -1) {
  48333. var targetTop = Math.max(0, (itemIndex - 1) * scrollYStore.rowHeight);
  48334. return handleScrollTo($xeTree, scrollBodyElem.scrollLeft, targetTop);
  48335. }
  48336. });
  48337. }
  48338. } else {
  48339. var itemEl = scrollBodyElem.querySelector(".vxe-tree--node-wrapper[nodeid=\"".concat(nodeid, "\"]"));
  48340. if (itemEl) {
  48341. return handleScrollTo($xeTree, scrollBodyElem.scrollLeft, itemEl.offsetTop);
  48342. }
  48343. }
  48344. }
  48345. return $xeTree.recalculate();
  48346. },
  48347. /**
  48348. * 刷新滚动条
  48349. */
  48350. refreshScroll: function refreshScroll() {
  48351. var $xeTree = this;
  48352. var internalData = $xeTree.internalData;
  48353. var lastScrollLeft = internalData.lastScrollLeft,
  48354. lastScrollTop = internalData.lastScrollTop;
  48355. return $xeTree.clearScroll().then(function () {
  48356. if (lastScrollLeft || lastScrollTop) {
  48357. internalData.lastScrollLeft = 0;
  48358. internalData.lastScrollTop = 0;
  48359. return scrollTo(lastScrollLeft, lastScrollTop);
  48360. }
  48361. });
  48362. },
  48363. /**
  48364. * 重新计算列表
  48365. */
  48366. recalculate: function recalculate() {
  48367. var $xeTree = this;
  48368. var reactData = $xeTree.reactData;
  48369. var internalData = $xeTree.internalData;
  48370. var scrollYStore = internalData.scrollYStore;
  48371. var rowHeight = scrollYStore.rowHeight;
  48372. var el = $xeTree.$refs.refElem;
  48373. if (el && el.clientWidth && el.clientHeight) {
  48374. var parentEl = $xeTree.getParentElem();
  48375. var headerWrapperEl = $xeTree.$refs.refHeaderWrapperElem;
  48376. var footerWrapperEl = $xeTree.$refs.refFooterWrapperElem;
  48377. var headHeight = headerWrapperEl ? headerWrapperEl.clientHeight : 0;
  48378. var footHeight = footerWrapperEl ? footerWrapperEl.clientHeight : 0;
  48379. if (parentEl) {
  48380. var parentPaddingSize = getPaddingTopBottomSize(parentEl);
  48381. reactData.parentHeight = Math.max(headHeight + footHeight + rowHeight, parentEl.clientHeight - parentPaddingSize - headHeight - footHeight);
  48382. }
  48383. $xeTree.updateHeight();
  48384. return $xeTree.computeScrollLoad().then(function () {
  48385. $xeTree.updateHeight();
  48386. $xeTree.updateYSpace();
  48387. });
  48388. }
  48389. return $xeTree.$nextTick();
  48390. },
  48391. loadYData: function loadYData() {
  48392. var $xeTree = this;
  48393. var internalData = $xeTree.internalData;
  48394. var scrollYStore = internalData.scrollYStore;
  48395. var startIndex = scrollYStore.startIndex,
  48396. endIndex = scrollYStore.endIndex,
  48397. visibleSize = scrollYStore.visibleSize,
  48398. offsetSize = scrollYStore.offsetSize,
  48399. rowHeight = scrollYStore.rowHeight;
  48400. var scrollBodyElem = $xeTree.$refs.refVirtualWrapper;
  48401. if (!scrollBodyElem) {
  48402. return;
  48403. }
  48404. var scrollTop = scrollBodyElem.scrollTop;
  48405. var toVisibleIndex = Math.floor(scrollTop / rowHeight);
  48406. var offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize);
  48407. var offsetEndIndex = toVisibleIndex + visibleSize + offsetSize;
  48408. if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
  48409. if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
  48410. scrollYStore.startIndex = offsetStartIndex;
  48411. scrollYStore.endIndex = offsetEndIndex;
  48412. $xeTree.updateYData();
  48413. }
  48414. }
  48415. },
  48416. scrollEvent: function scrollEvent(evnt) {
  48417. var $xeTree = this;
  48418. var reactData = $xeTree.reactData;
  48419. var internalData = $xeTree.internalData;
  48420. var scrollBodyElem = evnt.target;
  48421. var scrollTop = scrollBodyElem.scrollTop;
  48422. var scrollLeft = scrollBodyElem.scrollLeft;
  48423. var isX = scrollLeft !== internalData.lastScrollLeft;
  48424. var isY = scrollTop !== internalData.lastScrollTop;
  48425. internalData.lastScrollTop = scrollTop;
  48426. internalData.lastScrollLeft = scrollLeft;
  48427. if (reactData.scrollYLoad) {
  48428. $xeTree.loadYData();
  48429. }
  48430. internalData.lastScrollTime = Date.now();
  48431. $xeTree.dispatchEvent('scroll', {
  48432. scrollLeft: scrollLeft,
  48433. scrollTop: scrollTop,
  48434. isX: isX,
  48435. isY: isY
  48436. }, evnt);
  48437. },
  48438. clearScroll: function clearScroll() {
  48439. var $xeTree = this;
  48440. var internalData = $xeTree.internalData;
  48441. var scrollBodyElem = $xeTree.$refs.refVirtualWrapper;
  48442. if (scrollBodyElem) {
  48443. scrollBodyElem.scrollTop = 0;
  48444. scrollBodyElem.scrollLeft = 0;
  48445. }
  48446. internalData.lastScrollTop = 0;
  48447. internalData.lastScrollLeft = 0;
  48448. return $xeTree.$nextTick();
  48449. },
  48450. handleNodeClickEvent: function handleNodeClickEvent(evnt, node) {
  48451. var $xeTree = this;
  48452. var props = $xeTree;
  48453. var reactData = $xeTree.reactData;
  48454. var showRadio = props.showRadio,
  48455. showCheckbox = props.showCheckbox,
  48456. trigger = props.trigger;
  48457. var radioOpts = $xeTree.computeRadioOpts;
  48458. var checkboxOpts = $xeTree.computeCheckboxOpts;
  48459. var isRowCurrent = $xeTree.computeIsRowCurrent;
  48460. var triggerCurrent = false;
  48461. var triggerRadio = false;
  48462. var triggerCheckbox = false;
  48463. var triggerExpand = false;
  48464. if (isRowCurrent) {
  48465. triggerCurrent = true;
  48466. $xeTree.changeCurrentEvent(evnt, node);
  48467. } else if (reactData.currentNode) {
  48468. reactData.currentNode = null;
  48469. }
  48470. if (trigger === 'node') {
  48471. triggerExpand = true;
  48472. $xeTree.toggleExpandEvent(evnt, node);
  48473. }
  48474. if (showRadio && radioOpts.trigger === 'node') {
  48475. triggerRadio = true;
  48476. $xeTree.changeRadioEvent(evnt, node);
  48477. }
  48478. if (showCheckbox && checkboxOpts.trigger === 'node') {
  48479. triggerCheckbox = true;
  48480. $xeTree.changeCheckboxEvent(evnt, node);
  48481. }
  48482. $xeTree.dispatchEvent('node-click', {
  48483. node: node,
  48484. triggerCurrent: triggerCurrent,
  48485. triggerRadio: triggerRadio,
  48486. triggerCheckbox: triggerCheckbox,
  48487. triggerExpand: triggerExpand
  48488. }, evnt);
  48489. },
  48490. handleNodeDblclickEvent: function handleNodeDblclickEvent(evnt, node) {
  48491. var $xeTree = this;
  48492. $xeTree.dispatchEvent('node-dblclick', {
  48493. node: node
  48494. }, evnt);
  48495. },
  48496. handleAsyncTreeExpandChilds: function handleAsyncTreeExpandChilds(node) {
  48497. var $xeTree = this;
  48498. var props = $xeTree;
  48499. var reactData = $xeTree.reactData;
  48500. var internalData = $xeTree.internalData;
  48501. var checkboxOpts = $xeTree.computeCheckboxOpts;
  48502. var loadMethod = props.loadMethod;
  48503. var checkStrictly = checkboxOpts.checkStrictly;
  48504. return new Promise(function (resolve) {
  48505. if (loadMethod) {
  48506. var nodeMaps = internalData.nodeMaps;
  48507. var nodeid = $xeTree.getNodeId(node);
  48508. var nodeItem = nodeMaps[nodeid];
  48509. internalData.treeExpandLazyLoadedMaps[nodeid] = true;
  48510. Promise.resolve(loadMethod({
  48511. $tree: $xeTree,
  48512. node: node
  48513. })).then(function (childRecords) {
  48514. var treeExpandLazyLoadedMaps = internalData.treeExpandLazyLoadedMaps;
  48515. nodeItem.treeLoaded = true;
  48516. if (treeExpandLazyLoadedMaps[nodeid]) {
  48517. treeExpandLazyLoadedMaps[nodeid] = false;
  48518. }
  48519. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(childRecords)) {
  48520. childRecords = [];
  48521. }
  48522. if (childRecords) {
  48523. return $xeTree.loadChildrenNode(node, childRecords).then(function (childRows) {
  48524. var treeExpandedMaps = internalData.treeExpandedMaps;
  48525. if (childRows.length && !treeExpandedMaps[nodeid]) {
  48526. treeExpandedMaps[nodeid] = true;
  48527. }
  48528. reactData.updateExpandedFlag++;
  48529. // 如果当前节点已选中,则展开后子节点也被选中
  48530. if (!checkStrictly && $xeTree.isCheckedByCheckboxNodeId(nodeid)) {
  48531. $xeTree.handleCheckedCheckboxNode(childRows, true);
  48532. }
  48533. $xeTree.dispatchEvent('load-success', {
  48534. node: node,
  48535. data: childRecords
  48536. }, new Event('load-success'));
  48537. return $xeTree.$nextTick();
  48538. });
  48539. } else {
  48540. $xeTree.dispatchEvent('load-success', {
  48541. node: node,
  48542. data: childRecords
  48543. }, new Event('load-success'));
  48544. }
  48545. }).catch(function (e) {
  48546. var treeExpandLazyLoadedMaps = internalData.treeExpandLazyLoadedMaps;
  48547. nodeItem.treeLoaded = false;
  48548. if (treeExpandLazyLoadedMaps[nodeid]) {
  48549. treeExpandLazyLoadedMaps[nodeid] = false;
  48550. }
  48551. $xeTree.dispatchEvent('load-error', {
  48552. node: node,
  48553. data: e
  48554. }, new Event('load-error'));
  48555. }).finally(function () {
  48556. $xeTree.handleTreeToList();
  48557. $xeTree.handleData();
  48558. return $xeTree.recalculate();
  48559. });
  48560. } else {
  48561. resolve();
  48562. }
  48563. });
  48564. },
  48565. /**
  48566. * 展开与收起树节点
  48567. * @param nodeList
  48568. * @param expanded
  48569. * @returns
  48570. */
  48571. handleBaseTreeExpand: function handleBaseTreeExpand(nodeList, expanded) {
  48572. var $xeTree = this;
  48573. var props = $xeTree;
  48574. var reactData = $xeTree.reactData;
  48575. var internalData = $xeTree.internalData;
  48576. var lazy = props.lazy,
  48577. accordion = props.accordion,
  48578. toggleMethod = props.toggleMethod;
  48579. var treeExpandLazyLoadedMaps = internalData.treeExpandLazyLoadedMaps,
  48580. treeExpandedMaps = internalData.treeExpandedMaps;
  48581. var nodeMaps = internalData.nodeMaps;
  48582. var childrenField = $xeTree.computeChildrenField;
  48583. var hasChildField = $xeTree.computeHasChildField;
  48584. var result = [];
  48585. var validNodes = toggleMethod ? nodeList.filter(function (node) {
  48586. return toggleMethod({
  48587. $tree: $xeTree,
  48588. expanded: expanded,
  48589. node: node
  48590. });
  48591. }) : nodeList;
  48592. if (accordion) {
  48593. validNodes = validNodes.length ? [validNodes[validNodes.length - 1]] : [];
  48594. // 同一级只能展开一个
  48595. var nodeid = $xeTree.getNodeId(validNodes[0]);
  48596. var nodeItem = nodeMaps[nodeid];
  48597. if (nodeItem) {
  48598. nodeItem.items.forEach(function (item) {
  48599. var itemNodeId = $xeTree.getNodeId(item);
  48600. if (treeExpandedMaps[itemNodeId]) {
  48601. delete treeExpandedMaps[itemNodeId];
  48602. }
  48603. });
  48604. }
  48605. }
  48606. var expandNodes = [];
  48607. if (expanded) {
  48608. validNodes.forEach(function (item) {
  48609. var itemNodeId = $xeTree.getNodeId(item);
  48610. if (!treeExpandedMaps[itemNodeId]) {
  48611. var _nodeItem = nodeMaps[itemNodeId];
  48612. var isLoad = lazy && item[hasChildField] && !_nodeItem.treeLoaded && !treeExpandLazyLoadedMaps[itemNodeId];
  48613. // 是否使用懒加载
  48614. if (isLoad) {
  48615. result.push($xeTree.handleAsyncTreeExpandChilds(item));
  48616. } else {
  48617. if (item[childrenField] && item[childrenField].length) {
  48618. treeExpandedMaps[itemNodeId] = true;
  48619. expandNodes.push(item);
  48620. }
  48621. }
  48622. }
  48623. });
  48624. } else {
  48625. validNodes.forEach(function (item) {
  48626. var itemNodeId = $xeTree.getNodeId(item);
  48627. if (treeExpandedMaps[itemNodeId]) {
  48628. delete treeExpandedMaps[itemNodeId];
  48629. expandNodes.push(item);
  48630. }
  48631. });
  48632. }
  48633. reactData.updateExpandedFlag++;
  48634. $xeTree.handleTreeToList();
  48635. $xeTree.handleData();
  48636. return Promise.all(result).then(function () {
  48637. return $xeTree.recalculate();
  48638. });
  48639. },
  48640. toggleExpandEvent: function toggleExpandEvent(evnt, node) {
  48641. var $xeTree = this;
  48642. var props = $xeTree;
  48643. var internalData = $xeTree.internalData;
  48644. var lazy = props.lazy;
  48645. var treeExpandedMaps = internalData.treeExpandedMaps,
  48646. treeExpandLazyLoadedMaps = internalData.treeExpandLazyLoadedMaps;
  48647. var nodeid = $xeTree.getNodeId(node);
  48648. var expanded = !treeExpandedMaps[nodeid];
  48649. evnt.stopPropagation();
  48650. if (!lazy || !treeExpandLazyLoadedMaps[nodeid]) {
  48651. $xeTree.handleBaseTreeExpand([node], expanded);
  48652. }
  48653. },
  48654. updateCheckboxStatus: function updateCheckboxStatus() {
  48655. var $xeTree = this;
  48656. var props = $xeTree;
  48657. var reactData = $xeTree.reactData;
  48658. var internalData = $xeTree.internalData;
  48659. var transform = props.transform;
  48660. var selectCheckboxMaps = internalData.selectCheckboxMaps,
  48661. indeterminateRowMaps = internalData.indeterminateRowMaps,
  48662. afterTreeList = internalData.afterTreeList;
  48663. var childrenField = $xeTree.computeChildrenField;
  48664. var mapChildrenField = $xeTree.computeMapChildrenField;
  48665. var checkboxOpts = $xeTree.computeCheckboxOpts;
  48666. var checkStrictly = checkboxOpts.checkStrictly,
  48667. checkMethod = checkboxOpts.checkMethod;
  48668. if (!checkStrictly) {
  48669. var childRowMaps = {};
  48670. var childRowList = [];
  48671. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeList, function (node) {
  48672. var nodeid = $xeTree.getNodeId(node);
  48673. var childList = node[childrenField];
  48674. if (childList && childList.length && !childRowMaps[nodeid]) {
  48675. childRowMaps[nodeid] = 1;
  48676. childRowList.unshift([node, nodeid, childList]);
  48677. }
  48678. }, {
  48679. children: transform ? mapChildrenField : childrenField
  48680. });
  48681. childRowList.forEach(function (vals) {
  48682. var node = vals[0];
  48683. var nodeid = vals[1];
  48684. var childList = vals[2];
  48685. var sLen = 0; // 已选
  48686. var hLen = 0; // 半选
  48687. var vLen = 0; // 有效子行
  48688. var cLen = childList.length; // 子行
  48689. childList.forEach(checkMethod ? function (item) {
  48690. var childNodeid = $xeTree.getNodeId(item);
  48691. var isSelect = selectCheckboxMaps[childNodeid];
  48692. if (checkMethod({
  48693. $tree: $xeTree,
  48694. node: item
  48695. })) {
  48696. if (isSelect) {
  48697. sLen++;
  48698. } else if (indeterminateRowMaps[childNodeid]) {
  48699. hLen++;
  48700. }
  48701. vLen++;
  48702. } else {
  48703. if (isSelect) {
  48704. sLen++;
  48705. } else if (indeterminateRowMaps[childNodeid]) {
  48706. hLen++;
  48707. }
  48708. }
  48709. } : function (item) {
  48710. var childNodeid = $xeTree.getNodeId(item);
  48711. var isSelect = selectCheckboxMaps[childNodeid];
  48712. if (isSelect) {
  48713. sLen++;
  48714. } else if (indeterminateRowMaps[childNodeid]) {
  48715. hLen++;
  48716. }
  48717. vLen++;
  48718. });
  48719. var isSelected = false;
  48720. if (cLen > 0) {
  48721. if (vLen > 0) {
  48722. isSelected = (sLen > 0 || hLen > 0) && sLen >= vLen;
  48723. } else {
  48724. // 如果存在子项禁用
  48725. if (sLen > 0 && sLen >= vLen) {
  48726. isSelected = true;
  48727. } else if (selectCheckboxMaps[nodeid]) {
  48728. isSelected = true;
  48729. } else {
  48730. isSelected = false;
  48731. }
  48732. }
  48733. } else {
  48734. // 如果无子项
  48735. isSelected = selectCheckboxMaps[nodeid];
  48736. }
  48737. var halfSelect = !isSelected && (sLen > 0 || hLen > 0);
  48738. if (isSelected) {
  48739. selectCheckboxMaps[nodeid] = node;
  48740. if (indeterminateRowMaps[nodeid]) {
  48741. delete indeterminateRowMaps[nodeid];
  48742. }
  48743. } else {
  48744. if (selectCheckboxMaps[nodeid]) {
  48745. delete selectCheckboxMaps[nodeid];
  48746. }
  48747. if (halfSelect) {
  48748. indeterminateRowMaps[nodeid] = node;
  48749. } else {
  48750. if (indeterminateRowMaps[nodeid]) {
  48751. delete indeterminateRowMaps[nodeid];
  48752. }
  48753. }
  48754. }
  48755. });
  48756. reactData.updateCheckboxFlag++;
  48757. }
  48758. },
  48759. changeCheckboxEvent: function changeCheckboxEvent(evnt, node) {
  48760. var $xeTree = this;
  48761. var props = $xeTree;
  48762. var reactData = $xeTree.reactData;
  48763. var internalData = $xeTree.internalData;
  48764. evnt.preventDefault();
  48765. evnt.stopPropagation();
  48766. var transform = props.transform;
  48767. var selectCheckboxMaps = internalData.selectCheckboxMaps;
  48768. var childrenField = $xeTree.computeChildrenField;
  48769. var mapChildrenField = $xeTree.computeMapChildrenField;
  48770. var checkboxOpts = $xeTree.computeCheckboxOpts;
  48771. var checkStrictly = checkboxOpts.checkStrictly,
  48772. checkMethod = checkboxOpts.checkMethod;
  48773. var isDisabled = !!checkMethod;
  48774. if (checkMethod) {
  48775. isDisabled = !checkMethod({
  48776. $tree: $xeTree,
  48777. node: node
  48778. });
  48779. }
  48780. if (isDisabled) {
  48781. return;
  48782. }
  48783. var nodeid = $xeTree.getNodeId(node);
  48784. var isChecked = false;
  48785. if (selectCheckboxMaps[nodeid]) {
  48786. delete selectCheckboxMaps[nodeid];
  48787. } else {
  48788. isChecked = true;
  48789. selectCheckboxMaps[nodeid] = node;
  48790. }
  48791. if (!checkStrictly) {
  48792. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, transform ? mapChildrenField : childrenField), function (childNode) {
  48793. var childNodeid = $xeTree.getNodeId(childNode);
  48794. if (isChecked) {
  48795. if (!selectCheckboxMaps[childNodeid]) {
  48796. selectCheckboxMaps[childNodeid] = true;
  48797. }
  48798. } else {
  48799. if (selectCheckboxMaps[childNodeid]) {
  48800. delete selectCheckboxMaps[childNodeid];
  48801. }
  48802. }
  48803. }, {
  48804. children: transform ? mapChildrenField : childrenField
  48805. });
  48806. }
  48807. reactData.updateCheckboxFlag++;
  48808. $xeTree.updateCheckboxStatus();
  48809. var nodeids = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(selectCheckboxMaps);
  48810. var value = nodeids.map(deNodeValue);
  48811. $xeTree.emitCheckboxMode(value);
  48812. $xeTree.dispatchEvent('checkbox-change', {
  48813. node: node,
  48814. value: value,
  48815. checked: isChecked
  48816. }, evnt);
  48817. },
  48818. changeCurrentEvent: function changeCurrentEvent(evnt, node) {
  48819. var $xeTree = this;
  48820. var reactData = $xeTree.reactData;
  48821. evnt.preventDefault();
  48822. var nodeOpts = $xeTree.computeNodeOpts;
  48823. var currentMethod = nodeOpts.currentMethod,
  48824. trigger = nodeOpts.trigger;
  48825. var childrenField = $xeTree.computeChildrenField;
  48826. var childList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, childrenField);
  48827. var hasChild = childList && childList.length;
  48828. var isDisabled = !!currentMethod;
  48829. if (trigger === 'child') {
  48830. if (hasChild) {
  48831. return;
  48832. }
  48833. } else if (trigger === 'parent') {
  48834. if (!hasChild) {
  48835. return;
  48836. }
  48837. }
  48838. if (currentMethod) {
  48839. isDisabled = !currentMethod({
  48840. node: node
  48841. });
  48842. }
  48843. if (isDisabled) {
  48844. return;
  48845. }
  48846. var isChecked = true;
  48847. reactData.currentNode = node;
  48848. $xeTree.dispatchEvent('current-change', {
  48849. node: node,
  48850. checked: isChecked
  48851. }, evnt);
  48852. },
  48853. changeRadioEvent: function changeRadioEvent(evnt, node) {
  48854. var $xeTree = this;
  48855. var reactData = $xeTree.reactData;
  48856. evnt.preventDefault();
  48857. evnt.stopPropagation();
  48858. var radioOpts = $xeTree.computeRadioOpts;
  48859. var checkMethod = radioOpts.checkMethod;
  48860. var isDisabled = !!checkMethod;
  48861. if (checkMethod) {
  48862. isDisabled = !checkMethod({
  48863. $tree: $xeTree,
  48864. node: node
  48865. });
  48866. }
  48867. if (isDisabled) {
  48868. return;
  48869. }
  48870. var isChecked = true;
  48871. var nodeid = $xeTree.getNodeId(node);
  48872. var value = deNodeValue(nodeid);
  48873. reactData.selectRadioKey = nodeid;
  48874. $xeTree.emitRadioMode(value);
  48875. $xeTree.dispatchEvent('radio-change', {
  48876. node: node,
  48877. value: value,
  48878. checked: isChecked
  48879. }, evnt);
  48880. },
  48881. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  48882. var $xeTree = this;
  48883. var el = $xeTree.$refs.refElem;
  48884. if (!el || !el.clientWidth) {
  48885. return;
  48886. }
  48887. $xeTree.recalculate();
  48888. },
  48889. reloadData: function reloadData(data) {
  48890. var $xeTree = this;
  48891. return $xeTree.loadData(data || []);
  48892. },
  48893. clearCurrentNode: function clearCurrentNode() {
  48894. var $xeTree = this;
  48895. var reactData = $xeTree.reactData;
  48896. reactData.currentNode = null;
  48897. return $xeTree.$nextTick();
  48898. },
  48899. getCurrentNodeId: function getCurrentNodeId() {
  48900. var $xeTree = this;
  48901. var reactData = $xeTree.reactData;
  48902. var currentNode = reactData.currentNode;
  48903. if (currentNode) {
  48904. return deNodeValue($xeTree.getNodeId(currentNode));
  48905. }
  48906. return null;
  48907. },
  48908. getCurrentNode: function getCurrentNode() {
  48909. var $xeTree = this;
  48910. var reactData = $xeTree.reactData;
  48911. var internalData = $xeTree.internalData;
  48912. var currentNode = reactData.currentNode;
  48913. var nodeMaps = internalData.nodeMaps;
  48914. if (currentNode) {
  48915. var nodeItem = nodeMaps[$xeTree.getNodeId(currentNode)];
  48916. if (nodeItem) {
  48917. return nodeItem.item;
  48918. }
  48919. }
  48920. return null;
  48921. },
  48922. setCurrentNodeId: function setCurrentNodeId(nodeKey) {
  48923. var $xeTree = this;
  48924. var reactData = $xeTree.reactData;
  48925. var internalData = $xeTree.internalData;
  48926. var nodeMaps = internalData.nodeMaps;
  48927. var nodeItem = nodeMaps[enNodeValue(nodeKey)];
  48928. reactData.currentNode = nodeItem ? nodeItem.item : null;
  48929. return $xeTree.$nextTick();
  48930. },
  48931. setCurrentNode: function setCurrentNode(node) {
  48932. var $xeTree = this;
  48933. var reactData = $xeTree.reactData;
  48934. reactData.currentNode = node;
  48935. return $xeTree.$nextTick();
  48936. },
  48937. clearRadioNode: function clearRadioNode() {
  48938. var $xeTree = this;
  48939. var reactData = $xeTree.reactData;
  48940. reactData.selectRadioKey = null;
  48941. $xeTree.emitRadioMode(null);
  48942. return $xeTree.$nextTick();
  48943. },
  48944. getRadioNodeId: function getRadioNodeId() {
  48945. var $xeTree = this;
  48946. var reactData = $xeTree.reactData;
  48947. return reactData.selectRadioKey || null;
  48948. },
  48949. getRadioNode: function getRadioNode() {
  48950. var $xeTree = this;
  48951. var reactData = $xeTree.reactData;
  48952. var internalData = $xeTree.internalData;
  48953. var selectRadioKey = reactData.selectRadioKey;
  48954. var nodeMaps = internalData.nodeMaps;
  48955. if (selectRadioKey) {
  48956. var nodeItem = nodeMaps[selectRadioKey];
  48957. if (nodeItem) {
  48958. return nodeItem.item;
  48959. }
  48960. }
  48961. return null;
  48962. },
  48963. setRadioNodeId: function setRadioNodeId(nodeKey) {
  48964. var $xeTree = this;
  48965. var reactData = $xeTree.reactData;
  48966. reactData.selectRadioKey = enNodeValue(nodeKey);
  48967. $xeTree.emitRadioMode(nodeKey);
  48968. return $xeTree.$nextTick();
  48969. },
  48970. getCheckboxNodeIds: function getCheckboxNodeIds() {
  48971. var $xeTree = this;
  48972. var internalData = $xeTree.internalData;
  48973. var selectCheckboxMaps = internalData.selectCheckboxMaps;
  48974. var nodeKeys = [];
  48975. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps, function (item, nodeId) {
  48976. nodeKeys.push(deNodeValue(nodeId));
  48977. });
  48978. return nodeKeys;
  48979. },
  48980. getCheckboxNodes: function getCheckboxNodes() {
  48981. var $xeTree = this;
  48982. var internalData = $xeTree.internalData;
  48983. var nodeMaps = internalData.nodeMaps,
  48984. selectCheckboxMaps = internalData.selectCheckboxMaps;
  48985. var list = [];
  48986. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps, function (item, nodeid) {
  48987. var nodeItem = nodeMaps[nodeid];
  48988. if (nodeItem) {
  48989. list.push(nodeItem.item);
  48990. }
  48991. });
  48992. return list;
  48993. },
  48994. clearCheckboxNode: function clearCheckboxNode() {
  48995. var $xeTree = this;
  48996. var reactData = $xeTree.reactData;
  48997. var internalData = $xeTree.internalData;
  48998. internalData.indeterminateRowMaps = {};
  48999. internalData.selectCheckboxMaps = {};
  49000. reactData.updateCheckboxFlag++;
  49001. $xeTree.updateCheckboxStatus();
  49002. $xeTree.emitCheckboxMode([]);
  49003. return $xeTree.$nextTick().then(function () {
  49004. return {
  49005. checkNodeKeys: [],
  49006. checkNodes: []
  49007. };
  49008. });
  49009. },
  49010. setAllCheckboxNode: function setAllCheckboxNode(checked) {
  49011. var $xeTree = this;
  49012. var props = $xeTree;
  49013. var reactData = $xeTree.reactData;
  49014. var internalData = $xeTree.internalData;
  49015. var transform = props.transform;
  49016. var selectMaps = {};
  49017. var childrenField = $xeTree.computeChildrenField;
  49018. var mapChildrenField = $xeTree.computeMapChildrenField;
  49019. var checkKeys = [];
  49020. var checkNodes = [];
  49021. if (checked) {
  49022. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.afterTreeList, function (node) {
  49023. var nodeid = $xeTree.getNodeId(node);
  49024. checkKeys.push(nodeid);
  49025. checkNodes.push(node);
  49026. selectMaps[nodeid] = true;
  49027. }, {
  49028. children: transform ? mapChildrenField : childrenField
  49029. });
  49030. }
  49031. internalData.indeterminateRowMaps = {};
  49032. internalData.selectCheckboxMaps = selectMaps;
  49033. reactData.updateCheckboxFlag++;
  49034. $xeTree.updateCheckboxStatus();
  49035. return $xeTree.$nextTick().then(function () {
  49036. return {
  49037. checkNodeKeys: checkKeys,
  49038. checkNodes: checkNodes
  49039. };
  49040. });
  49041. },
  49042. clearExpandNode: function clearExpandNode() {
  49043. var $xeTree = this;
  49044. return $xeTree.clearAllExpandNode();
  49045. },
  49046. clearAllExpandNode: function clearAllExpandNode() {
  49047. var $xeTree = this;
  49048. var reactData = $xeTree.reactData;
  49049. var internalData = $xeTree.internalData;
  49050. var nodeMaps = internalData.nodeMaps,
  49051. scrollYStore = internalData.scrollYStore;
  49052. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(nodeMaps, function (nodeItem) {
  49053. nodeItem.treeLoaded = false;
  49054. });
  49055. internalData.treeExpandedMaps = {};
  49056. reactData.updateExpandedFlag++;
  49057. reactData.topSpaceHeight = 0;
  49058. scrollYStore.startIndex = 0;
  49059. scrollYStore.endIndex = 1;
  49060. $xeTree.handleTreeToList();
  49061. $xeTree.handleData();
  49062. return $xeTree.recalculate();
  49063. },
  49064. setExpandByNodeId: function setExpandByNodeId(nodeKeys, expanded) {
  49065. var $xeTree = this;
  49066. var reactData = $xeTree.reactData;
  49067. var internalData = $xeTree.internalData;
  49068. var treeExpandedMaps = internalData.treeExpandedMaps;
  49069. if (nodeKeys) {
  49070. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(nodeKeys)) {
  49071. nodeKeys = [nodeKeys];
  49072. }
  49073. nodeKeys.forEach(function (nodeKey) {
  49074. var nodeid = enNodeValue(nodeKey);
  49075. handleSetExpand(nodeid, expanded, treeExpandedMaps);
  49076. });
  49077. reactData.updateExpandedFlag++;
  49078. }
  49079. $xeTree.handleTreeToList();
  49080. $xeTree.handleData();
  49081. return $xeTree.recalculate();
  49082. },
  49083. getExpandNodeIds: function getExpandNodeIds() {
  49084. var $xeTree = this;
  49085. var internalData = $xeTree.internalData;
  49086. var treeExpandedMaps = internalData.treeExpandedMaps;
  49087. var nodeKeys = [];
  49088. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(treeExpandedMaps, function (item, nodeId) {
  49089. nodeKeys.push(deNodeValue(nodeId));
  49090. });
  49091. return nodeKeys;
  49092. },
  49093. getExpandNodes: function getExpandNodes() {
  49094. var $xeTree = this;
  49095. var internalData = $xeTree.internalData;
  49096. var nodeMaps = internalData.nodeMaps,
  49097. treeExpandedMaps = internalData.treeExpandedMaps;
  49098. var list = [];
  49099. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(treeExpandedMaps, function (item, nodeid) {
  49100. var nodeItem = nodeMaps[nodeid];
  49101. if (nodeItem) {
  49102. list.push(nodeItem.item);
  49103. }
  49104. });
  49105. return list;
  49106. },
  49107. setExpandNode: function setExpandNode(nodes, expanded) {
  49108. var $xeTree = this;
  49109. var reactData = $xeTree.reactData;
  49110. var internalData = $xeTree.internalData;
  49111. var treeExpandedMaps = internalData.treeExpandedMaps;
  49112. if (nodes) {
  49113. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(nodes)) {
  49114. nodes = [nodes];
  49115. }
  49116. nodes.forEach(function (node) {
  49117. var nodeid = $xeTree.getNodeId(node);
  49118. handleSetExpand(nodeid, expanded, treeExpandedMaps);
  49119. });
  49120. reactData.updateExpandedFlag++;
  49121. }
  49122. $xeTree.handleTreeToList();
  49123. $xeTree.handleData();
  49124. return $xeTree.recalculate();
  49125. },
  49126. toggleExpandByNodeId: function toggleExpandByNodeId(nodeKeys) {
  49127. var $xeTree = this;
  49128. var reactData = $xeTree.reactData;
  49129. var internalData = $xeTree.internalData;
  49130. var treeExpandedMaps = internalData.treeExpandedMaps;
  49131. if (nodeKeys) {
  49132. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(nodeKeys)) {
  49133. nodeKeys = [nodeKeys];
  49134. }
  49135. nodeKeys.forEach(function (nodeKey) {
  49136. var nodeid = enNodeValue(nodeKey);
  49137. handleSetExpand(nodeid, !treeExpandedMaps["".concat(nodeid)], treeExpandedMaps);
  49138. });
  49139. reactData.updateExpandedFlag++;
  49140. }
  49141. $xeTree.handleTreeToList();
  49142. $xeTree.handleData();
  49143. return $xeTree.recalculate();
  49144. },
  49145. toggleExpandNode: function toggleExpandNode(nodes) {
  49146. var $xeTree = this;
  49147. var reactData = $xeTree.reactData;
  49148. var internalData = $xeTree.internalData;
  49149. var treeExpandedMaps = internalData.treeExpandedMaps;
  49150. if (nodes) {
  49151. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(nodes)) {
  49152. nodes = [nodes];
  49153. }
  49154. nodes.forEach(function (node) {
  49155. var nodeid = $xeTree.getNodeId(node);
  49156. handleSetExpand(nodeid, !treeExpandedMaps[nodeid], treeExpandedMaps);
  49157. });
  49158. reactData.updateExpandedFlag++;
  49159. }
  49160. $xeTree.handleTreeToList();
  49161. $xeTree.handleData();
  49162. return $xeTree.recalculate();
  49163. },
  49164. setAllExpandNode: function setAllExpandNode(expanded) {
  49165. var $xeTree = this;
  49166. var props = $xeTree;
  49167. var reactData = $xeTree.reactData;
  49168. var internalData = $xeTree.internalData;
  49169. var transform = props.transform;
  49170. var scrollYLoad = reactData.scrollYLoad;
  49171. var scrollYStore = internalData.scrollYStore,
  49172. treeExpandedMaps = internalData.treeExpandedMaps;
  49173. var childrenField = $xeTree.computeChildrenField;
  49174. var mapChildrenField = $xeTree.computeMapChildrenField;
  49175. if (expanded) {
  49176. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.afterTreeList, function (node) {
  49177. var childList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, childrenField);
  49178. var hasChild = childList && childList.length;
  49179. if (hasChild) {
  49180. var nodeid = $xeTree.getNodeId(node);
  49181. treeExpandedMaps[nodeid] = true;
  49182. }
  49183. }, {
  49184. children: transform ? mapChildrenField : childrenField
  49185. });
  49186. } else {
  49187. internalData.treeExpandedMaps = {};
  49188. }
  49189. reactData.updateExpandedFlag++;
  49190. reactData.topSpaceHeight = 0;
  49191. scrollYStore.startIndex = 0;
  49192. scrollYStore.endIndex = 1;
  49193. $xeTree.handleTreeToList();
  49194. $xeTree.handleData();
  49195. return $xeTree.recalculate().then(function () {
  49196. if (scrollYLoad) {
  49197. $xeTree.loadYData();
  49198. }
  49199. return $xeTree.recalculate();
  49200. });
  49201. },
  49202. reloadExpandNode: function reloadExpandNode(node) {
  49203. var $xeTree = this;
  49204. var props = $xeTree;
  49205. var lazy = props.lazy;
  49206. if (lazy) {
  49207. $xeTree.clearExpandLoaded(node);
  49208. return $xeTree.handleAsyncTreeExpandChilds(node);
  49209. }
  49210. return $xeTree.recalculate();
  49211. },
  49212. clearExpandLoaded: function clearExpandLoaded(node) {
  49213. var $xeTree = this;
  49214. var props = $xeTree;
  49215. var internalData = $xeTree.internalData;
  49216. var lazy = props.lazy;
  49217. var nodeMaps = internalData.nodeMaps;
  49218. if (lazy) {
  49219. var nodeItem = nodeMaps[$xeTree.getNodeId(node)];
  49220. if (nodeItem) {
  49221. nodeItem.treeLoaded = false;
  49222. }
  49223. }
  49224. return $xeTree.recalculate();
  49225. },
  49226. /**
  49227. * 用于树结构,给行数据加载子节点
  49228. */
  49229. loadChildrenNode: function loadChildrenNode(node, childRecords) {
  49230. var $xeTree = this;
  49231. var props = $xeTree;
  49232. var internalData = $xeTree.internalData;
  49233. var lazy = props.lazy,
  49234. transform = props.transform;
  49235. var nodeMaps = internalData.nodeMaps;
  49236. if (!lazy) {
  49237. return Promise.resolve([]);
  49238. }
  49239. var childrenField = $xeTree.computeChildrenField;
  49240. var mapChildrenField = $xeTree.computeMapChildrenField;
  49241. var parentNodeItem = nodeMaps[$xeTree.getNodeId(node)];
  49242. var parentLevel = parentNodeItem ? parentNodeItem.level : 0;
  49243. var parentNodes = parentNodeItem ? parentNodeItem.nodes : [];
  49244. return $xeTree.createNode(childRecords).then(function (nodeList) {
  49245. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(nodeList, function (childRow, index, items, path, parent, nodes) {
  49246. var itemNodeId = $xeTree.getNodeId(childRow);
  49247. nodeMaps[itemNodeId] = {
  49248. item: childRow,
  49249. index: -1,
  49250. items: items,
  49251. parent: parent || parentNodeItem.item,
  49252. nodes: parentNodes.concat(nodes),
  49253. level: parentLevel + nodes.length,
  49254. treeIndex: -1,
  49255. lineCount: 0,
  49256. treeLoaded: false
  49257. };
  49258. }, {
  49259. children: childrenField
  49260. });
  49261. node[childrenField] = nodeList;
  49262. if (transform) {
  49263. node[mapChildrenField] = nodeList;
  49264. }
  49265. $xeTree.updateAfterDataIndex();
  49266. return nodeList;
  49267. });
  49268. },
  49269. getCheckboxIndeterminateNodes: function getCheckboxIndeterminateNodes() {
  49270. var $xeTree = this;
  49271. var internalData = $xeTree.internalData;
  49272. var nodeMaps = internalData.nodeMaps,
  49273. indeterminateRowMaps = internalData.indeterminateRowMaps;
  49274. var list = [];
  49275. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(indeterminateRowMaps, function (item, nodeid) {
  49276. var nodeItem = nodeMaps[nodeid];
  49277. if (nodeItem) {
  49278. list.push(nodeItem.item);
  49279. }
  49280. });
  49281. return list;
  49282. },
  49283. //
  49284. // Render
  49285. //
  49286. renderRadio: function renderRadio(h, node, nodeid, isChecked) {
  49287. var $xeTree = this;
  49288. var props = $xeTree;
  49289. var showRadio = props.showRadio;
  49290. var radioOpts = $xeTree.computeRadioOpts;
  49291. var showIcon = radioOpts.showIcon,
  49292. checkMethod = radioOpts.checkMethod,
  49293. visibleMethod = radioOpts.visibleMethod;
  49294. var isVisible = !visibleMethod || visibleMethod({
  49295. $tree: $xeTree,
  49296. node: node
  49297. });
  49298. var isDisabled = !!checkMethod;
  49299. if (showRadio && showIcon && isVisible) {
  49300. if (checkMethod) {
  49301. isDisabled = !checkMethod({
  49302. $tree: $xeTree,
  49303. node: node
  49304. });
  49305. }
  49306. return h('div', {
  49307. class: ['vxe-tree--radio-option', {
  49308. 'is--checked': isChecked,
  49309. 'is--disabled': isDisabled
  49310. }],
  49311. on: {
  49312. click: function click(evnt) {
  49313. if (!isDisabled) {
  49314. $xeTree.changeRadioEvent(evnt, node);
  49315. }
  49316. }
  49317. }
  49318. }, [h('span', {
  49319. class: ['vxe-radio--icon', isChecked ? getIcon().RADIO_CHECKED : getIcon().RADIO_UNCHECKED]
  49320. })]);
  49321. }
  49322. return renderEmptyElement($xeTree);
  49323. },
  49324. renderCheckbox: function renderCheckbox(h, node, nodeid, isChecked) {
  49325. var $xeTree = this;
  49326. var props = $xeTree;
  49327. var showCheckbox = props.showCheckbox;
  49328. var checkboxOpts = $xeTree.computeCheckboxOpts;
  49329. var showIcon = checkboxOpts.showIcon,
  49330. checkMethod = checkboxOpts.checkMethod,
  49331. visibleMethod = checkboxOpts.visibleMethod;
  49332. var isIndeterminate = $xeTree.isIndeterminateByCheckboxNodeid(nodeid);
  49333. var isVisible = !visibleMethod || visibleMethod({
  49334. $tree: $xeTree,
  49335. node: node
  49336. });
  49337. var isDisabled = !!checkMethod;
  49338. if (showCheckbox && showIcon && isVisible) {
  49339. if (checkMethod) {
  49340. isDisabled = !checkMethod({
  49341. $tree: $xeTree,
  49342. node: node
  49343. });
  49344. }
  49345. return h('div', {
  49346. class: ['vxe-tree--checkbox-option', {
  49347. 'is--checked': isChecked,
  49348. 'is--indeterminate': isIndeterminate,
  49349. 'is--disabled': isDisabled
  49350. }],
  49351. on: {
  49352. click: function click(evnt) {
  49353. if (!isDisabled) {
  49354. $xeTree.changeCheckboxEvent(evnt, node);
  49355. }
  49356. }
  49357. }
  49358. }, [h('span', {
  49359. class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().CHECKBOX_INDETERMINATE : isChecked ? getIcon().CHECKBOX_CHECKED : getIcon().CHECKBOX_UNCHECKED]
  49360. })]);
  49361. }
  49362. return renderEmptyElement($xeTree);
  49363. },
  49364. renderNode: function renderNode(h, node, nodeid) {
  49365. var $xeTree = this;
  49366. var props = $xeTree;
  49367. var slots = $xeTree.$scopedSlots;
  49368. var reactData = $xeTree.reactData;
  49369. var internalData = $xeTree.internalData;
  49370. var lazy = props.lazy,
  49371. showRadio = props.showRadio,
  49372. showCheckbox = props.showCheckbox,
  49373. showLine = props.showLine,
  49374. indent = props.indent,
  49375. iconOpen = props.iconOpen,
  49376. iconClose = props.iconClose,
  49377. iconLoaded = props.iconLoaded,
  49378. showIcon = props.showIcon;
  49379. var currentNode = reactData.currentNode,
  49380. selectRadioKey = reactData.selectRadioKey,
  49381. updateExpandedFlag = reactData.updateExpandedFlag;
  49382. var afterTreeList = internalData.afterTreeList,
  49383. nodeMaps = internalData.nodeMaps,
  49384. treeExpandedMaps = internalData.treeExpandedMaps,
  49385. treeExpandLazyLoadedMaps = internalData.treeExpandLazyLoadedMaps;
  49386. var childrenField = $xeTree.computeChildrenField;
  49387. var titleField = $xeTree.computeTitleField;
  49388. var hasChildField = $xeTree.computeHasChildField;
  49389. var childList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, childrenField);
  49390. var hasChild = childList && childList.length;
  49391. var iconSlot = slots.icon;
  49392. var titleSlot = slots.title;
  49393. var extraSlot = slots.extra;
  49394. var isExpand = updateExpandedFlag && treeExpandedMaps[nodeid];
  49395. var nodeItem = nodeMaps[nodeid];
  49396. var nodeValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, titleField);
  49397. var isRadioChecked = false;
  49398. if (showRadio) {
  49399. isRadioChecked = nodeid === String(selectRadioKey);
  49400. }
  49401. var isCheckboxChecked = false;
  49402. if (showCheckbox) {
  49403. isCheckboxChecked = $xeTree.isCheckedByCheckboxNodeId(nodeid);
  49404. }
  49405. var hasLazyChilds = false;
  49406. var isLazyLoading = false;
  49407. var isLazyLoaded = false;
  49408. if (lazy) {
  49409. isLazyLoading = !!treeExpandLazyLoadedMaps[nodeid];
  49410. hasLazyChilds = node[hasChildField];
  49411. isLazyLoaded = !!nodeItem.treeLoaded;
  49412. }
  49413. var prevNode = nodeItem.items[nodeItem.treeIndex - 1];
  49414. var nParams = {
  49415. node: node,
  49416. isExpand: isExpand
  49417. };
  49418. return h('div', {
  49419. key: nodeid,
  49420. class: ['vxe-tree--node-wrapper', "node--level-".concat(nodeItem.level)],
  49421. attrs: {
  49422. nodeid: nodeid
  49423. }
  49424. }, [h('div', {
  49425. class: ['vxe-tree--node-item', {
  49426. 'is--current': currentNode && nodeid === $xeTree.getNodeId(currentNode),
  49427. 'is-radio--checked': isRadioChecked,
  49428. 'is-checkbox--checked': isCheckboxChecked
  49429. }],
  49430. style: {
  49431. paddingLeft: "".concat((nodeItem.level - 1) * (indent || 1), "px")
  49432. },
  49433. on: {
  49434. click: function click(evnt) {
  49435. $xeTree.handleNodeClickEvent(evnt, node);
  49436. },
  49437. dblclick: function dblclick(evnt) {
  49438. $xeTree.handleNodeDblclickEvent(evnt, node);
  49439. }
  49440. }
  49441. }, [showLine ? h('div', {
  49442. class: 'vxe-tree--node-line-wrapper'
  49443. }, [h('div', {
  49444. class: 'vxe-tree--node-line',
  49445. style: {
  49446. height: "".concat($xeTree.getNodeId(afterTreeList[0]) === nodeid ? 1 : calcTreeLine($xeTree, node, prevNode), "px")
  49447. }
  49448. })]) : renderEmptyElement($xeTree), h('div', {
  49449. class: 'vxe-tree--node-item-switcher'
  49450. }, showIcon && (lazy ? isLazyLoaded ? hasChild : hasLazyChilds : hasChild) ? [h('div', {
  49451. class: 'vxe-tree--node-item-icon',
  49452. on: {
  49453. click: function click(evnt) {
  49454. $xeTree.toggleExpandEvent(evnt, node);
  49455. }
  49456. }
  49457. }, iconSlot ? vn_getSlotVNs(iconSlot(nParams)) : [h('i', {
  49458. class: isLazyLoading ? iconLoaded || getIcon().TREE_NODE_LOADED : isExpand ? iconOpen || getIcon().TREE_NODE_OPEN : iconClose || getIcon().TREE_NODE_CLOSE
  49459. })])] : []), $xeTree.renderRadio(h, node, nodeid, isRadioChecked), $xeTree.renderCheckbox(h, node, nodeid, isCheckboxChecked), h('div', {
  49460. class: 'vxe-tree--node-item-inner'
  49461. }, [h('div', {
  49462. class: 'vxe-tree--node-item-title'
  49463. }, titleSlot ? vn_getSlotVNs(titleSlot(nParams)) : "".concat(nodeValue)), extraSlot ? h('div', {
  49464. class: 'vxe-tree--node-item-extra'
  49465. }, vn_getSlotVNs(extraSlot(nParams))) : renderEmptyElement($xeTree)])])]);
  49466. },
  49467. renderList: function renderList(h, treeList) {
  49468. var $xeTree = this;
  49469. var props = $xeTree;
  49470. var internalData = $xeTree.internalData;
  49471. var transform = props.transform;
  49472. var treeExpandedMaps = internalData.treeExpandedMaps;
  49473. var childrenField = $xeTree.computeChildrenField;
  49474. if (!treeList.length) {
  49475. return [h('div', {
  49476. class: 'vxe-tree--empty-placeholder'
  49477. }, getI18n('vxe.tree.searchEmpty'))];
  49478. }
  49479. var nodeVNs = [];
  49480. treeList.forEach(transform ? function (node) {
  49481. var nodeid = $xeTree.getNodeId(node);
  49482. nodeVNs.push($xeTree.renderNode(h, node, nodeid));
  49483. } : function (node) {
  49484. var nodeid = $xeTree.getNodeId(node);
  49485. nodeVNs.push($xeTree.renderNode(h, node, nodeid));
  49486. var childList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, childrenField);
  49487. var hasChild = childList && childList.length;
  49488. if (hasChild && treeExpandedMaps[nodeid]) {
  49489. nodeVNs.push.apply(nodeVNs, _toConsumableArray($xeTree.renderList(h, childList)));
  49490. }
  49491. });
  49492. return nodeVNs;
  49493. },
  49494. renderVN: function renderVN(h) {
  49495. var $xeTree = this;
  49496. var props = $xeTree;
  49497. var slots = $xeTree.$scopedSlots;
  49498. var reactData = $xeTree.reactData;
  49499. var loading = props.loading,
  49500. trigger = props.trigger,
  49501. showLine = props.showLine;
  49502. var bodyHeight = reactData.bodyHeight,
  49503. topSpaceHeight = reactData.topSpaceHeight,
  49504. treeList = reactData.treeList;
  49505. var vSize = $xeTree.computeSize;
  49506. var radioOpts = $xeTree.computeRadioOpts;
  49507. var checkboxOpts = $xeTree.computeCheckboxOpts;
  49508. var loadingOpts = $xeTree.computeLoadingOpts;
  49509. var isRowHover = $xeTree.computeIsRowHover;
  49510. var treeStyle = $xeTree.computeTreeStyle;
  49511. var loadingSlot = slots.loading;
  49512. var headerSlot = slots.header;
  49513. var footerSlot = slots.footer;
  49514. return h('div', {
  49515. ref: 'refElem',
  49516. class: ['vxe-tree', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'show--line', showLine), 'checkbox--highlight', checkboxOpts.highlight), 'radio--highlight', radioOpts.highlight), 'node--hover', isRowHover), 'node--trigger', trigger === 'node'), 'is--loading', loading)]
  49517. }, [headerSlot ? h('div', {
  49518. ref: 'refHeaderWrapperElem',
  49519. class: 'vxe-tree--header-wrapper'
  49520. }, headerSlot({
  49521. $tree: $xeTree
  49522. })) : renderEmptyElement($xeTree), h('div', {
  49523. ref: 'refVirtualWrapper',
  49524. class: 'vxe-tree--node-list-wrapper',
  49525. style: treeStyle,
  49526. on: {
  49527. scroll: $xeTree.scrollEvent
  49528. }
  49529. }, [h('div', {
  49530. class: 'vxe-tree--y-space',
  49531. style: {
  49532. height: bodyHeight ? "".concat(bodyHeight, "px") : ''
  49533. }
  49534. }), h('div', {
  49535. ref: 'refVirtualBody',
  49536. class: 'vxe-tree--node-list-body',
  49537. style: {
  49538. transform: "translateY(".concat(topSpaceHeight, "px)")
  49539. }
  49540. }, $xeTree.renderList(h, treeList))]), footerSlot ? h('div', {
  49541. ref: 'refFooterWrapperElem',
  49542. class: 'vxe-tree--footer-wrapper'
  49543. }, footerSlot({
  49544. $tree: $xeTree
  49545. })) : renderEmptyElement($xeTree),
  49546. /**
  49547. * 加载中
  49548. */
  49549. h(src_loading, {
  49550. class: 'vxe-tree--loading',
  49551. props: {
  49552. value: loading,
  49553. icon: loadingOpts.icon,
  49554. text: loadingOpts.text
  49555. },
  49556. scopedSlots: loadingSlot ? {
  49557. default: function _default() {
  49558. return loadingSlot({
  49559. $tree: $xeTree
  49560. });
  49561. }
  49562. } : {}
  49563. })]);
  49564. }
  49565. },
  49566. watch: {
  49567. data: function data(val) {
  49568. var $xeTree = this;
  49569. $xeTree.loadData(val || []);
  49570. },
  49571. checkNodeKey: function checkNodeKey(nodeKey) {
  49572. var $xeTree = this;
  49573. var reactData = $xeTree.reactData;
  49574. reactData.selectRadioKey = enNodeValue(nodeKey);
  49575. },
  49576. checkNodeKeys: function checkNodeKeys() {
  49577. var $xeTree = this;
  49578. var props = $xeTree;
  49579. $xeTree.updateCheckboxChecked(props.checkNodeKeys || []);
  49580. },
  49581. filterValue: function filterValue() {
  49582. var $xeTree = this;
  49583. $xeTree.triggerSearchEvent(new Event('filter'));
  49584. },
  49585. height: function height() {
  49586. var $xeTree = this;
  49587. $xeTree.recalculate();
  49588. },
  49589. minHeight: function minHeight() {
  49590. var $xeTree = this;
  49591. $xeTree.recalculate();
  49592. },
  49593. maxHeight: function maxHeight() {
  49594. var $xeTree = this;
  49595. $xeTree.recalculate();
  49596. }
  49597. },
  49598. created: function created() {
  49599. var $xeTree = this;
  49600. var props = $xeTree;
  49601. var reactData = $xeTree.reactData;
  49602. reactData.selectRadioKey = enNodeValue(props.checkNodeKey);
  49603. $xeTree.loadData(props.data || []);
  49604. },
  49605. mounted: function mounted() {
  49606. var $xeTree = this;
  49607. var props = $xeTree;
  49608. var internalData = $xeTree.internalData;
  49609. if (props.autoResize) {
  49610. var el = $xeTree.$refs.refElem;
  49611. var parentEl = $xeTree.getParentElem();
  49612. var resizeObserver = globalResize.create(function () {
  49613. if (props.autoResize) {
  49614. $xeTree.recalculate();
  49615. }
  49616. });
  49617. if (el) {
  49618. resizeObserver.observe(el);
  49619. }
  49620. if (parentEl) {
  49621. resizeObserver.observe(parentEl);
  49622. }
  49623. internalData.resizeObserver = resizeObserver;
  49624. }
  49625. globalEvents.on($xeTree, 'resize', $xeTree.handleGlobalResizeEvent);
  49626. },
  49627. beforeDestroy: function beforeDestroy() {
  49628. var $xeTree = this;
  49629. var internalData = $xeTree.internalData;
  49630. var resizeObserver = internalData.resizeObserver;
  49631. if (resizeObserver) {
  49632. resizeObserver.disconnect();
  49633. }
  49634. globalEvents.off($xeTree, 'resize');
  49635. },
  49636. destroyed: function destroyed() {
  49637. var $xeTree = this;
  49638. var internalData = $xeTree.internalData;
  49639. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, tree_createInternalData());
  49640. },
  49641. render: function render(h) {
  49642. return this.renderVN(h);
  49643. }
  49644. })); /* define-vxe-component end */
  49645. ;// CONCATENATED MODULE: ./packages/tree/index.ts
  49646. var VxeTree = Object.assign({}, tree, {
  49647. install: function install(app) {
  49648. app.component(tree.name, tree);
  49649. }
  49650. });
  49651. dynamicApp.use(VxeTree);
  49652. index_esm_VxeUI.component(tree);
  49653. var Tree = VxeTree;
  49654. /* harmony default export */ var packages_tree = (VxeTree);
  49655. ;// CONCATENATED MODULE: ./packages/tree-select/src/tree-select.ts
  49656. function tree_select_getOptUniqueId() {
  49657. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('node_');
  49658. }
  49659. function tree_select_createInternalData() {
  49660. return {
  49661. // hpTimeout: undefined,
  49662. fullOptionList: [],
  49663. fullNodeMaps: {}
  49664. };
  49665. }
  49666. /* harmony default export */ var tree_select = (/* define-vxe-component start */defineVxeComponent({
  49667. name: 'VxeTreeSelect',
  49668. mixins: [globalMixins.sizeMixin],
  49669. model: {
  49670. prop: 'value',
  49671. event: 'modelValue'
  49672. },
  49673. props: {
  49674. value: [String, Number, Array],
  49675. clearable: Boolean,
  49676. placeholder: {
  49677. type: String,
  49678. default: function _default() {
  49679. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(getConfig().treeSelect.placeholder) ? getI18n('vxe.base.pleaseSelect') : getConfig().treeSelect.placeholder;
  49680. }
  49681. },
  49682. readonly: {
  49683. type: Boolean,
  49684. default: null
  49685. },
  49686. loading: Boolean,
  49687. disabled: {
  49688. type: Boolean,
  49689. default: null
  49690. },
  49691. filterable: Boolean,
  49692. filterConfig: Object,
  49693. multiple: Boolean,
  49694. className: [String, Function],
  49695. popupClassName: [String, Function],
  49696. prefixIcon: String,
  49697. placement: String,
  49698. lazyOptions: Array,
  49699. options: Array,
  49700. optionProps: Object,
  49701. zIndex: Number,
  49702. size: {
  49703. type: String,
  49704. default: function _default() {
  49705. return getConfig().treeSelect.size || getConfig().size;
  49706. }
  49707. },
  49708. remote: Boolean,
  49709. remoteConfig: Function,
  49710. popupConfig: Object,
  49711. treeConfig: Object,
  49712. virtualYConfig: Object,
  49713. autoClose: {
  49714. type: Boolean,
  49715. default: function _default() {
  49716. return getConfig().treeSelect.autoClose;
  49717. }
  49718. },
  49719. showTotalButoon: {
  49720. type: Boolean,
  49721. default: function _default() {
  49722. return getConfig().treeSelect.showTotalButoon;
  49723. }
  49724. },
  49725. showCheckedButoon: {
  49726. type: Boolean,
  49727. default: function _default() {
  49728. return getConfig().treeSelect.showCheckedButoon;
  49729. }
  49730. },
  49731. showClearButton: {
  49732. type: Boolean,
  49733. default: function _default() {
  49734. return getConfig().treeSelect.showClearButton;
  49735. }
  49736. },
  49737. showExpandButton: {
  49738. type: Boolean,
  49739. default: function _default() {
  49740. return getConfig().treeSelect.showExpandButton;
  49741. }
  49742. },
  49743. transfer: {
  49744. type: Boolean,
  49745. default: null
  49746. },
  49747. /**
  49748. * 已废弃,被 remote-config.queryMethod 替换
  49749. * @deprecated
  49750. */
  49751. remoteMethod: Function
  49752. },
  49753. inject: {
  49754. $xeModal: {
  49755. default: null
  49756. },
  49757. $xeDrawer: {
  49758. default: null
  49759. },
  49760. $xeTable: {
  49761. default: null
  49762. },
  49763. $xeForm: {
  49764. default: null
  49765. },
  49766. formItemInfo: {
  49767. from: 'xeFormItemInfo',
  49768. default: null
  49769. }
  49770. },
  49771. provide: function provide() {
  49772. var $xeTreeSelect = this;
  49773. return {
  49774. $xeTreeSelect: $xeTreeSelect
  49775. };
  49776. },
  49777. data: function data() {
  49778. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  49779. var reactData = {
  49780. initialized: false,
  49781. searchValue: '',
  49782. searchLoading: false,
  49783. panelIndex: 0,
  49784. panelStyle: {},
  49785. panelPlacement: null,
  49786. triggerFocusPanel: false,
  49787. visiblePanel: false,
  49788. isAniVisible: false,
  49789. isActivated: false
  49790. };
  49791. var internalData = tree_select_createInternalData();
  49792. return {
  49793. xID: xID,
  49794. reactData: reactData,
  49795. internalData: internalData
  49796. };
  49797. },
  49798. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  49799. computeFormReadonly: function computeFormReadonly() {
  49800. var $xeTreeSelect = this;
  49801. var props = $xeTreeSelect;
  49802. var $xeForm = $xeTreeSelect.$xeForm;
  49803. var readonly = props.readonly;
  49804. if (readonly === null) {
  49805. if ($xeForm) {
  49806. return $xeForm.readonly;
  49807. }
  49808. return false;
  49809. }
  49810. return readonly;
  49811. },
  49812. computeIsDisabled: function computeIsDisabled() {
  49813. var $xeTreeSelect = this;
  49814. var props = $xeTreeSelect;
  49815. var $xeForm = $xeTreeSelect.$xeForm;
  49816. var disabled = props.disabled;
  49817. if (disabled === null) {
  49818. if ($xeForm) {
  49819. return $xeForm.disabled;
  49820. }
  49821. return false;
  49822. }
  49823. return disabled;
  49824. },
  49825. computeBtnTransfer: function computeBtnTransfer() {
  49826. var $xeTreeSelect = this;
  49827. var props = $xeTreeSelect;
  49828. var $xeTable = $xeTreeSelect.$xeTable;
  49829. var $xeModal = $xeTreeSelect.$xeModal;
  49830. var $xeDrawer = $xeTreeSelect.$xeDrawer;
  49831. var $xeForm = $xeTreeSelect.$xeForm;
  49832. var transfer = props.transfer;
  49833. if (transfer === null) {
  49834. var globalTransfer = getConfig().treeSelect.transfer;
  49835. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
  49836. return globalTransfer;
  49837. }
  49838. if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
  49839. return true;
  49840. }
  49841. }
  49842. return transfer;
  49843. },
  49844. computePopupOpts: function computePopupOpts() {
  49845. var $xeTreeSelect = this;
  49846. var props = $xeTreeSelect;
  49847. return Object.assign({}, getConfig().treeSelect.popupConfig, props.popupConfig);
  49848. },
  49849. computeTreeOpts: function computeTreeOpts() {
  49850. var $xeTreeSelect = this;
  49851. var props = $xeTreeSelect;
  49852. return Object.assign({}, getConfig().treeSelect.treeConfig, props.treeConfig);
  49853. },
  49854. computeTreeNodeOpts: function computeTreeNodeOpts() {
  49855. var $xeTreeSelect = this;
  49856. var treeOpts = $xeTreeSelect.computeTreeOpts;
  49857. return Object.assign({
  49858. isHover: true
  49859. }, treeOpts.nodeConfig);
  49860. },
  49861. computeTreeCheckboxOpts: function computeTreeCheckboxOpts() {
  49862. var $xeTreeSelect = this;
  49863. var treeOpts = $xeTreeSelect.computeTreeOpts;
  49864. return Object.assign({
  49865. showIcon: !!treeOpts.showCheckbox
  49866. }, treeOpts.checkboxConfig, {
  49867. trigger: 'node'
  49868. });
  49869. },
  49870. computeTreeRadioOpts: function computeTreeRadioOpts() {
  49871. var $xeTreeSelect = this;
  49872. var treeOpts = $xeTreeSelect.computeTreeOpts;
  49873. return Object.assign({
  49874. showIcon: !!treeOpts.showRadio
  49875. }, treeOpts.radioConfig, {
  49876. trigger: 'node'
  49877. });
  49878. },
  49879. computePropsOpts: function computePropsOpts() {
  49880. var $xeTreeSelect = this;
  49881. var props = $xeTreeSelect;
  49882. return Object.assign({}, props.optionProps);
  49883. },
  49884. computeNodeKeyField: function computeNodeKeyField() {
  49885. var $xeTreeSelect = this;
  49886. var treeOpts = $xeTreeSelect.computeTreeOpts;
  49887. return treeOpts.keyField || 'id';
  49888. },
  49889. computeLabelField: function computeLabelField() {
  49890. var $xeTreeSelect = this;
  49891. var propsOpts = $xeTreeSelect.computePropsOpts;
  49892. return propsOpts.label || 'label';
  49893. },
  49894. computeValueField: function computeValueField() {
  49895. var $xeTreeSelect = this;
  49896. var propsOpts = $xeTreeSelect.computePropsOpts;
  49897. return propsOpts.value || 'value';
  49898. },
  49899. computeChildrenField: function computeChildrenField() {
  49900. var $xeTreeSelect = this;
  49901. var propsOpts = $xeTreeSelect.computePropsOpts;
  49902. return propsOpts.children || 'children';
  49903. },
  49904. computeParentField: function computeParentField() {
  49905. var $xeTreeSelect = this;
  49906. var propsOpts = $xeTreeSelect.computePropsOpts;
  49907. return propsOpts.parent || 'parentField';
  49908. },
  49909. computeHasChildField: function computeHasChildField() {
  49910. var $xeTreeSelect = this;
  49911. var propsOpts = $xeTreeSelect.computePropsOpts;
  49912. return propsOpts.hasChild || 'hasChild';
  49913. },
  49914. computeVirtualYOpts: function computeVirtualYOpts() {
  49915. var $xeTreeSelect = this;
  49916. var props = $xeTreeSelect;
  49917. return Object.assign({}, getConfig().treeSelect.virtualYConfig, props.virtualYConfig);
  49918. },
  49919. computeRemoteOpts: function computeRemoteOpts() {
  49920. var $xeTreeSelect = this;
  49921. var props = $xeTreeSelect;
  49922. return Object.assign({}, getConfig().treeSelect.remoteConfig, props.remoteConfig);
  49923. },
  49924. computeFilterOpts: function computeFilterOpts() {
  49925. var $xeTreeSelect = this;
  49926. var props = $xeTreeSelect;
  49927. var treeOpts = $xeTreeSelect.computeTreeOpts;
  49928. return Object.assign({}, treeOpts.filterConfig, props.filterConfig);
  49929. },
  49930. computeSelectLabel: function computeSelectLabel() {
  49931. var $xeTreeSelect = this;
  49932. var props = $xeTreeSelect;
  49933. var internalData = $xeTreeSelect.internalData;
  49934. var modelValue = props.value,
  49935. lazyOptions = props.lazyOptions;
  49936. var fullNodeMaps = internalData.fullNodeMaps;
  49937. var valueField = $xeTreeSelect.computeValueField;
  49938. var labelField = $xeTreeSelect.computeLabelField;
  49939. var selectVals = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(modelValue) ? [] : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue) ? modelValue : [modelValue];
  49940. return selectVals.map(function (val) {
  49941. var cacheItem = fullNodeMaps[val];
  49942. if (cacheItem) {
  49943. return cacheItem.item[labelField];
  49944. }
  49945. if (lazyOptions) {
  49946. var lazyItem = lazyOptions.find(function (item) {
  49947. return item[valueField] === val;
  49948. });
  49949. if (lazyItem) {
  49950. return lazyItem[labelField];
  49951. }
  49952. }
  49953. return val;
  49954. }).join(', ');
  49955. },
  49956. computePopupWrapperStyle: function computePopupWrapperStyle() {
  49957. var $xeTreeSelect = this;
  49958. var popupOpts = $xeTreeSelect.computePopupOpts;
  49959. var height = popupOpts.height,
  49960. width = popupOpts.width;
  49961. var stys = {};
  49962. if (width) {
  49963. stys.width = toCssUnit(width);
  49964. }
  49965. if (height) {
  49966. stys.height = toCssUnit(height);
  49967. stys.maxHeight = toCssUnit(height);
  49968. }
  49969. return stys;
  49970. }
  49971. }),
  49972. methods: {
  49973. //
  49974. // Method
  49975. //
  49976. dispatchEvent: function dispatchEvent(type, params, evnt) {
  49977. var $xeTreeSelect = this;
  49978. $xeTreeSelect.$emit(type, createEvent(evnt, {
  49979. $treeSelect: $xeTreeSelect
  49980. }, params));
  49981. },
  49982. emitModel: function emitModel(value) {
  49983. var $xeTreeSelect = this;
  49984. var _events = $xeTreeSelect._events;
  49985. if (_events && _events.modelValue) {
  49986. $xeTreeSelect.$emit('modelValue', value);
  49987. } else {
  49988. $xeTreeSelect.$emit('model-value', value);
  49989. }
  49990. },
  49991. getNodeid: function getNodeid(option) {
  49992. var $xeTreeSelect = this;
  49993. var nodeKeyField = $xeTreeSelect.computeNodeKeyField;
  49994. var nodeid = option[nodeKeyField];
  49995. return nodeid ? encodeURIComponent(nodeid) : '';
  49996. },
  49997. cacheDataMap: function cacheDataMap() {
  49998. var $xeTreeSelect = this;
  49999. var props = $xeTreeSelect;
  50000. var internalData = $xeTreeSelect.internalData;
  50001. var options = props.options;
  50002. var nodeKeyField = $xeTreeSelect.computeNodeKeyField;
  50003. var childrenField = $xeTreeSelect.computeChildrenField;
  50004. var valueField = $xeTreeSelect.computeValueField;
  50005. var nodeMaps = {};
  50006. var keyMaps = {};
  50007. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(options, function (item, index, items, path, parent, nodes) {
  50008. var nodeid = $xeTreeSelect.getNodeid(item);
  50009. if (!nodeid) {
  50010. nodeid = tree_select_getOptUniqueId();
  50011. }
  50012. if (keyMaps[nodeid]) {
  50013. errLog('vxe.error.repeatKey', ["[tree-select] ".concat(nodeKeyField), nodeid]);
  50014. }
  50015. keyMaps[nodeid] = true;
  50016. var value = item[valueField];
  50017. if (nodeMaps[value]) {
  50018. errLog('vxe.error.repeatKey', ["[tree-select] ".concat(valueField), value]);
  50019. }
  50020. nodeMaps[value] = {
  50021. item: item,
  50022. index: index,
  50023. items: items,
  50024. parent: parent,
  50025. nodes: nodes
  50026. };
  50027. }, {
  50028. children: childrenField
  50029. });
  50030. internalData.fullOptionList = options || [];
  50031. internalData.fullNodeMaps = nodeMaps;
  50032. },
  50033. updateZindex: function updateZindex() {
  50034. var $xeTreeSelect = this;
  50035. var props = $xeTreeSelect;
  50036. var reactData = $xeTreeSelect.reactData;
  50037. var zIndex = props.zIndex;
  50038. if (zIndex) {
  50039. reactData.panelIndex = zIndex;
  50040. } else if (reactData.panelIndex < getLastZIndex()) {
  50041. reactData.panelIndex = nextZIndex();
  50042. }
  50043. },
  50044. updatePlacement: function updatePlacement() {
  50045. var $xeTreeSelect = this;
  50046. var props = $xeTreeSelect;
  50047. var reactData = $xeTreeSelect.reactData;
  50048. var placement = props.placement;
  50049. var panelIndex = reactData.panelIndex;
  50050. var targetElem = $xeTreeSelect.$refs.refElem;
  50051. var panelElem = $xeTreeSelect.$refs.refOptionPanel;
  50052. var btnTransfer = $xeTreeSelect.computeBtnTransfer;
  50053. var handleStyle = function handleStyle() {
  50054. var ppObj = updatePanelPlacement(targetElem, panelElem, {
  50055. placement: placement,
  50056. teleportTo: btnTransfer
  50057. });
  50058. var panelStyle = Object.assign(ppObj.style, {
  50059. zIndex: panelIndex
  50060. });
  50061. reactData.panelStyle = panelStyle;
  50062. reactData.panelPlacement = ppObj.placement;
  50063. };
  50064. handleStyle();
  50065. return $xeTreeSelect.$nextTick().then(handleStyle);
  50066. },
  50067. showOptionPanel: function showOptionPanel() {
  50068. var $xeTreeSelect = this;
  50069. var props = $xeTreeSelect;
  50070. var reactData = $xeTreeSelect.reactData;
  50071. var internalData = $xeTreeSelect.internalData;
  50072. var loading = props.loading,
  50073. remote = props.remote,
  50074. filterable = props.filterable;
  50075. var fullOptionList = internalData.fullOptionList;
  50076. var isDisabled = $xeTreeSelect.computeIsDisabled;
  50077. var remoteOpts = $xeTreeSelect.computeRemoteOpts;
  50078. if (!loading && !isDisabled) {
  50079. if (internalData.hpTimeout) {
  50080. clearTimeout(internalData.hpTimeout);
  50081. }
  50082. if (!reactData.initialized) {
  50083. reactData.initialized = true;
  50084. var btnTransfer = $xeTreeSelect.computeBtnTransfer;
  50085. var panelElem = $xeTreeSelect.$refs.refOptionPanel;
  50086. if (btnTransfer) {
  50087. if (panelElem) {
  50088. document.body.appendChild(panelElem);
  50089. }
  50090. }
  50091. }
  50092. reactData.isActivated = true;
  50093. reactData.isAniVisible = true;
  50094. if (filterable) {
  50095. if (remote && remoteOpts.enabled && remoteOpts.autoLoad && !fullOptionList.length) {
  50096. $xeTreeSelect.handleSearchEvent();
  50097. }
  50098. }
  50099. setTimeout(function () {
  50100. reactData.visiblePanel = true;
  50101. $xeTreeSelect.handleFocusSearch();
  50102. }, 10);
  50103. $xeTreeSelect.updateZindex();
  50104. $xeTreeSelect.updatePlacement();
  50105. }
  50106. },
  50107. hideOptionPanel: function hideOptionPanel() {
  50108. var $xeTreeSelect = this;
  50109. var reactData = $xeTreeSelect.reactData;
  50110. var internalData = $xeTreeSelect.internalData;
  50111. reactData.visiblePanel = false;
  50112. internalData.hpTimeout = setTimeout(function () {
  50113. reactData.isAniVisible = false;
  50114. }, 350);
  50115. },
  50116. changeEvent: function changeEvent(evnt, selectValue, node) {
  50117. var $xeTreeSelect = this;
  50118. var props = $xeTreeSelect;
  50119. var $xeForm = $xeTreeSelect.$xeForm;
  50120. var formItemInfo = $xeTreeSelect.formItemInfo;
  50121. var value = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(selectValue) ? selectValue.map(deNodeValue) : deNodeValue(selectValue);
  50122. $xeTreeSelect.emitModel(value);
  50123. if (value !== props.value) {
  50124. $xeTreeSelect.dispatchEvent('change', {
  50125. value: value,
  50126. node: node,
  50127. option: node
  50128. }, evnt);
  50129. // 自动更新校验状态
  50130. if ($xeForm && formItemInfo) {
  50131. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
  50132. }
  50133. }
  50134. },
  50135. clearValueEvent: function clearValueEvent(evnt, selectValue) {
  50136. var $xeTreeSelect = this;
  50137. $xeTreeSelect.changeEvent(evnt, selectValue, null);
  50138. $xeTreeSelect.dispatchEvent('clear', {
  50139. value: selectValue
  50140. }, evnt);
  50141. },
  50142. clearEvent: function clearEvent(params, evnt) {
  50143. var $xeTreeSelect = this;
  50144. $xeTreeSelect.clearValueEvent(evnt, null);
  50145. $xeTreeSelect.hideOptionPanel();
  50146. },
  50147. allCheckedPanelEvent: function allCheckedPanelEvent(params) {
  50148. var $xeTreeSelect = this;
  50149. var props = $xeTreeSelect;
  50150. var $event = params.$event;
  50151. var multiple = props.multiple,
  50152. autoClose = props.autoClose;
  50153. var $tree = $xeTreeSelect.$refs.refTree;
  50154. if (multiple) {
  50155. if ($tree) {
  50156. $tree.setAllCheckboxNode(true).then(function (_ref) {
  50157. var checkNodeKeys = _ref.checkNodeKeys,
  50158. checkNodes = _ref.checkNodes;
  50159. $xeTreeSelect.changeEvent($event, checkNodeKeys, checkNodes[0]);
  50160. $xeTreeSelect.dispatchEvent('all-change', {
  50161. value: checkNodeKeys
  50162. }, $event);
  50163. if (autoClose) {
  50164. $xeTreeSelect.hideOptionPanel();
  50165. }
  50166. });
  50167. }
  50168. }
  50169. },
  50170. clearCheckedPanelEvent: function clearCheckedPanelEvent(params) {
  50171. var $xeTreeSelect = this;
  50172. var props = $xeTreeSelect;
  50173. var $event = params.$event;
  50174. var multiple = props.multiple,
  50175. autoClose = props.autoClose;
  50176. var $tree = $xeTreeSelect.$refs.refTree;
  50177. if ($tree) {
  50178. var value = multiple ? [] : null;
  50179. $tree.clearCheckboxNode().then(function () {
  50180. if (autoClose) {
  50181. $xeTreeSelect.hideOptionPanel();
  50182. }
  50183. });
  50184. $xeTreeSelect.changeEvent($event, value, null);
  50185. $xeTreeSelect.dispatchEvent('clear', {
  50186. value: value
  50187. }, $event);
  50188. }
  50189. },
  50190. allExpandPanelEvent: function allExpandPanelEvent() {
  50191. var $xeTreeSelect = this;
  50192. var $tree = $xeTreeSelect.$refs.refTree;
  50193. if ($tree) {
  50194. $tree.setAllExpandNode(true);
  50195. }
  50196. },
  50197. clearExpandPanelEvent: function clearExpandPanelEvent() {
  50198. var $xeTreeSelect = this;
  50199. var $tree = $xeTreeSelect.$refs.refTree;
  50200. if ($tree) {
  50201. $tree.clearAllExpandNode();
  50202. }
  50203. },
  50204. handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
  50205. var $xeTreeSelect = this;
  50206. var reactData = $xeTreeSelect.reactData;
  50207. var visiblePanel = reactData.visiblePanel;
  50208. var isDisabled = $xeTreeSelect.computeIsDisabled;
  50209. if (!isDisabled) {
  50210. if (visiblePanel) {
  50211. var panelElem = $xeTreeSelect.$refs.refOptionPanel;
  50212. if (getEventTargetNode(evnt, panelElem).flag) {
  50213. $xeTreeSelect.updatePlacement();
  50214. } else {
  50215. $xeTreeSelect.hideOptionPanel();
  50216. }
  50217. }
  50218. }
  50219. },
  50220. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  50221. var $xeTreeSelect = this;
  50222. var reactData = $xeTreeSelect.reactData;
  50223. var visiblePanel = reactData.visiblePanel;
  50224. var isDisabled = $xeTreeSelect.computeIsDisabled;
  50225. if (!isDisabled) {
  50226. var el = $xeTreeSelect.$refs.refElem;
  50227. var panelElem = $xeTreeSelect.$refs.refOptionPanel;
  50228. reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
  50229. if (visiblePanel && !reactData.isActivated) {
  50230. $xeTreeSelect.hideOptionPanel();
  50231. }
  50232. }
  50233. },
  50234. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  50235. var $xeTreeSelect = this;
  50236. var reactData = $xeTreeSelect.reactData;
  50237. var visiblePanel = reactData.visiblePanel,
  50238. isActivated = reactData.isActivated;
  50239. if (visiblePanel) {
  50240. $xeTreeSelect.hideOptionPanel();
  50241. }
  50242. if (isActivated) {
  50243. reactData.isActivated = false;
  50244. }
  50245. if (visiblePanel || isActivated) {
  50246. var $input = $xeTreeSelect.$refs.refInput;
  50247. if ($input) {
  50248. $input.blur();
  50249. }
  50250. }
  50251. },
  50252. handleGlobalResizeEvent: function handleGlobalResizeEvent() {
  50253. var $xeTreeSelect = this;
  50254. var reactData = $xeTreeSelect.reactData;
  50255. var visiblePanel = reactData.visiblePanel;
  50256. if (visiblePanel) {
  50257. $xeTreeSelect.updatePlacement();
  50258. }
  50259. },
  50260. handleFocusSearch: function handleFocusSearch() {
  50261. var $xeSelect = this;
  50262. var props = $xeSelect;
  50263. if (props.filterable) {
  50264. $xeSelect.$nextTick(function () {
  50265. var inpSearch = $xeSelect.$refs.refInpSearch;
  50266. if (inpSearch) {
  50267. inpSearch.focus();
  50268. }
  50269. });
  50270. }
  50271. },
  50272. focusEvent: function focusEvent(evnt) {
  50273. var $xeTreeSelect = this;
  50274. var reactData = $xeTreeSelect.reactData;
  50275. var isDisabled = $xeTreeSelect.computeIsDisabled;
  50276. if (!isDisabled) {
  50277. if (!reactData.visiblePanel) {
  50278. reactData.triggerFocusPanel = true;
  50279. $xeTreeSelect.showOptionPanel();
  50280. setTimeout(function () {
  50281. reactData.triggerFocusPanel = false;
  50282. }, 150);
  50283. }
  50284. }
  50285. $xeTreeSelect.dispatchEvent('focus', {}, evnt);
  50286. },
  50287. clickEvent: function clickEvent(evnt) {
  50288. var $xeTreeSelect = this;
  50289. $xeTreeSelect.togglePanelEvent(evnt);
  50290. $xeTreeSelect.dispatchEvent('click', {}, evnt);
  50291. },
  50292. blurEvent: function blurEvent(evnt) {
  50293. var $xeTreeSelect = this;
  50294. var reactData = $xeTreeSelect.reactData;
  50295. reactData.isActivated = false;
  50296. $xeTreeSelect.dispatchEvent('blur', {}, evnt);
  50297. },
  50298. modelSearchEvent: function modelSearchEvent(value) {
  50299. var $xeTreeSelect = this;
  50300. var reactData = $xeTreeSelect.reactData;
  50301. reactData.searchValue = value;
  50302. },
  50303. handleSearchEvent: function handleSearchEvent() {
  50304. var $xeTreeSelect = this;
  50305. var props = $xeTreeSelect;
  50306. var reactData = $xeTreeSelect.reactData;
  50307. var modelValue = props.value,
  50308. remote = props.remote,
  50309. remoteMethod = props.remoteMethod;
  50310. var searchValue = reactData.searchValue;
  50311. var remoteOpts = $xeTreeSelect.computeRemoteOpts;
  50312. var queryMethod = remoteOpts.queryMethod || remoteMethod;
  50313. if (remote && queryMethod && remoteOpts.enabled) {
  50314. reactData.searchLoading = true;
  50315. Promise.resolve(queryMethod({
  50316. $treeSelect: $xeTreeSelect,
  50317. searchValue: searchValue,
  50318. value: modelValue
  50319. })).then(function () {
  50320. return $xeTreeSelect.$nextTick();
  50321. }).catch(function () {
  50322. return $xeTreeSelect.$nextTick();
  50323. }).finally(function () {
  50324. reactData.searchLoading = false;
  50325. });
  50326. }
  50327. },
  50328. togglePanelEvent: function togglePanelEvent(params) {
  50329. var $xeTreeSelect = this;
  50330. var reactData = $xeTreeSelect.reactData;
  50331. var $event = params.$event;
  50332. $event.preventDefault();
  50333. if (reactData.triggerFocusPanel) {
  50334. reactData.triggerFocusPanel = false;
  50335. } else {
  50336. if (reactData.visiblePanel) {
  50337. $xeTreeSelect.hideOptionPanel();
  50338. } else {
  50339. $xeTreeSelect.showOptionPanel();
  50340. }
  50341. }
  50342. },
  50343. nodeClickEvent: function nodeClickEvent(params) {
  50344. var $xeTreeSelect = this;
  50345. var $event = params.$event;
  50346. $xeTreeSelect.dispatchEvent('node-click', params, $event);
  50347. },
  50348. radioChangeEvent: function radioChangeEvent(params) {
  50349. var $xeTreeSelect = this;
  50350. var value = params.value,
  50351. $event = params.$event,
  50352. node = params.node;
  50353. $xeTreeSelect.changeEvent($event, value, node);
  50354. $xeTreeSelect.hideOptionPanel();
  50355. },
  50356. checkboxChangeEvent: function checkboxChangeEvent(params) {
  50357. var $xeTreeSelect = this;
  50358. var value = params.value,
  50359. $event = params.$event,
  50360. node = params.node;
  50361. $xeTreeSelect.changeEvent($event, value, node);
  50362. },
  50363. loadSuccessEvent: function loadSuccessEvent() {
  50364. var $xeTreeSelect = this;
  50365. $xeTreeSelect.cacheDataMap();
  50366. },
  50367. //
  50368. // Render
  50369. //
  50370. renderVN: function renderVN(h) {
  50371. var $xeTreeSelect = this;
  50372. var props = $xeTreeSelect;
  50373. var slots = $xeTreeSelect.$scopedSlots;
  50374. var reactData = $xeTreeSelect.reactData;
  50375. var className = props.className,
  50376. modelValue = props.value,
  50377. multiple = props.multiple,
  50378. options = props.options,
  50379. loading = props.loading,
  50380. filterable = props.filterable,
  50381. showTotalButoon = props.showTotalButoon,
  50382. showCheckedButoon = props.showCheckedButoon,
  50383. showClearButton = props.showClearButton,
  50384. showExpandButton = props.showExpandButton;
  50385. var initialized = reactData.initialized,
  50386. isActivated = reactData.isActivated,
  50387. isAniVisible = reactData.isAniVisible,
  50388. visiblePanel = reactData.visiblePanel,
  50389. searchValue = reactData.searchValue;
  50390. var vSize = $xeTreeSelect.computeSize;
  50391. var isDisabled = $xeTreeSelect.computeIsDisabled;
  50392. var selectLabel = $xeTreeSelect.computeSelectLabel;
  50393. var btnTransfer = $xeTreeSelect.computeBtnTransfer;
  50394. var formReadonly = $xeTreeSelect.computeFormReadonly;
  50395. var popupWrapperStyle = $xeTreeSelect.computePopupWrapperStyle;
  50396. var headerSlot = slots.header;
  50397. var footerSlot = slots.footer;
  50398. var prefixSlot = slots.prefix;
  50399. var popupOpts = $xeTreeSelect.computePopupOpts;
  50400. var popupClassName = popupOpts.className || props.popupClassName;
  50401. var treeOpts = $xeTreeSelect.computeTreeOpts;
  50402. var treeNodeOpts = $xeTreeSelect.computeTreeNodeOpts;
  50403. var treeCheckboxOpts = $xeTreeSelect.computeTreeCheckboxOpts;
  50404. var treeRadioOpts = $xeTreeSelect.computeTreeRadioOpts;
  50405. var nodeKeyField = $xeTreeSelect.computeNodeKeyField;
  50406. var labelField = $xeTreeSelect.computeLabelField;
  50407. var valueField = $xeTreeSelect.computeValueField;
  50408. var childrenField = $xeTreeSelect.computeChildrenField;
  50409. var parentField = $xeTreeSelect.computeParentField;
  50410. var hasChildField = $xeTreeSelect.computeHasChildField;
  50411. var virtualYOpts = $xeTreeSelect.computeVirtualYOpts;
  50412. var filterOpts = $xeTreeSelect.computeFilterOpts;
  50413. if (formReadonly) {
  50414. return h('div', {
  50415. ref: 'refElem',
  50416. class: ['vxe-tree-select--readonly', className]
  50417. }, [h('span', {
  50418. class: 'vxe-tree-select-label'
  50419. }, selectLabel)]);
  50420. }
  50421. var selectVals = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(modelValue) ? [] : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(modelValue) ? modelValue : [modelValue];
  50422. return h('div', {
  50423. ref: 'refElem',
  50424. class: ['vxe-tree-select', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
  50425. $treeSelect: $xeTreeSelect
  50426. }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--filterable', filterable), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--loading', loading), 'is--active', isActivated)]
  50427. }, [h(input, {
  50428. ref: 'refInput',
  50429. props: {
  50430. clearable: props.clearable,
  50431. placeholder: props.placeholder,
  50432. readonly: true,
  50433. disabled: isDisabled,
  50434. type: 'text',
  50435. prefixIcon: props.prefixIcon,
  50436. suffixIcon: loading ? getIcon().TREE_SELECT_LOADED : visiblePanel ? getIcon().TREE_SELECT_OPEN : getIcon().TREE_SELECT_CLOSE,
  50437. value: loading ? getI18n('vxe.select.loadingText') : selectLabel,
  50438. title: selectLabel
  50439. },
  50440. on: {
  50441. clear: $xeTreeSelect.clearEvent,
  50442. click: $xeTreeSelect.clickEvent,
  50443. focus: $xeTreeSelect.focusEvent,
  50444. blur: $xeTreeSelect.blurEvent,
  50445. 'suffix-click': $xeTreeSelect.togglePanelEvent
  50446. },
  50447. scopedSlots: prefixSlot ? {
  50448. prefix: function prefix() {
  50449. return prefixSlot({});
  50450. }
  50451. } : {}
  50452. }), h('div', {
  50453. ref: 'refOptionPanel',
  50454. class: ['vxe-table--ignore-clear vxe-tree-select--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
  50455. $treeSelect: $xeTreeSelect
  50456. }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', !loading && isAniVisible), 'ani--enter', !loading && visiblePanel)],
  50457. attrs: {
  50458. placement: reactData.panelPlacement
  50459. },
  50460. style: reactData.panelStyle
  50461. }, initialized ? [h('div', {
  50462. class: 'vxe-tree-select--panel-wrapper'
  50463. }, [filterable ? h('div', {
  50464. class: 'vxe-tree-select--panel-search'
  50465. }, [h(input, {
  50466. ref: 'refInpSearch',
  50467. class: 'vxe-tree-select-search--input',
  50468. props: {
  50469. value: searchValue,
  50470. title: selectLabel,
  50471. clearable: true,
  50472. disabled: false,
  50473. readonly: false,
  50474. placeholder: getI18n('vxe.treeSelect.search'),
  50475. prefixIcon: getIcon().INPUT_SEARCH
  50476. },
  50477. on: {
  50478. 'model-value': $xeTreeSelect.modelSearchEvent
  50479. }
  50480. })]) : renderEmptyElement($xeTreeSelect), showTotalButoon || showCheckedButoon && multiple || showClearButton || showExpandButton || headerSlot ? h('div', {
  50481. class: 'vxe-tree-select--panel-header'
  50482. }, headerSlot ? headerSlot({}) : [h('div', {
  50483. class: 'vxe-tree-select--header-button'
  50484. }, [showTotalButoon ? h('div', {
  50485. class: 'vxe-tree-select--header-total'
  50486. }, getI18n('vxe.treeSelect.total', [selectVals.length])) : renderEmptyElement($xeTreeSelect), h('div', {
  50487. class: 'vxe-tree-select--header-btns'
  50488. }, [showCheckedButoon && multiple ? h(src_button, {
  50489. props: {
  50490. content: getI18n('vxe.treeSelect.allChecked'),
  50491. mode: 'text'
  50492. },
  50493. on: {
  50494. click: $xeTreeSelect.allCheckedPanelEvent
  50495. }
  50496. }) : renderEmptyElement($xeTreeSelect), showClearButton ? h(src_button, {
  50497. props: {
  50498. content: getI18n('vxe.treeSelect.clearChecked'),
  50499. mode: 'text'
  50500. },
  50501. on: {
  50502. click: $xeTreeSelect.clearCheckedPanelEvent
  50503. }
  50504. }) : renderEmptyElement($xeTreeSelect), showExpandButton ? h(src_button, {
  50505. props: {
  50506. content: getI18n('vxe.treeSelect.allExpand'),
  50507. mode: 'text'
  50508. },
  50509. on: {
  50510. click: $xeTreeSelect.allExpandPanelEvent
  50511. }
  50512. }) : renderEmptyElement($xeTreeSelect), showExpandButton ? h(src_button, {
  50513. props: {
  50514. content: getI18n('vxe.treeSelect.clearExpand'),
  50515. mode: 'text'
  50516. },
  50517. on: {
  50518. click: $xeTreeSelect.clearExpandPanelEvent
  50519. }
  50520. }) : renderEmptyElement($xeTreeSelect)])])]) : renderEmptyElement($xeTreeSelect), h('div', {
  50521. class: 'vxe-tree-select--panel-body'
  50522. }, [h('div', {
  50523. ref: 'refTreeWrapper',
  50524. class: 'vxe-tree-select-tree--wrapper',
  50525. style: popupWrapperStyle
  50526. }, [h(tree, {
  50527. ref: 'refTree',
  50528. class: 'vxe-tree-select--tree',
  50529. props: {
  50530. data: options,
  50531. height: popupOpts.height ? '100%' : treeOpts.height,
  50532. minHeight: treeOpts.minHeight,
  50533. maxHeight: popupOpts.height ? '' : treeOpts.maxHeight,
  50534. autoResize: true,
  50535. indent: treeOpts.indent,
  50536. showRadio: !multiple,
  50537. radioConfig: treeRadioOpts,
  50538. checkNodeKey: multiple ? null : modelValue,
  50539. showCheckbox: !!multiple,
  50540. checkNodeKeys: multiple ? modelValue : null,
  50541. checkboxConfig: treeCheckboxOpts,
  50542. titleField: labelField,
  50543. valueField: valueField,
  50544. keyField: nodeKeyField,
  50545. childrenField: treeOpts.childrenField || childrenField,
  50546. parentField: treeOpts.parentField || parentField,
  50547. hasChildField: treeOpts.hasChildField || hasChildField,
  50548. accordion: treeOpts.accordion,
  50549. expandAll: treeOpts.expandAll,
  50550. expandNodeKeys: treeOpts.expandNodeKeys,
  50551. nodeConfig: treeNodeOpts,
  50552. lazy: treeOpts.lazy,
  50553. loadMethod: treeOpts.loadMethod,
  50554. toggleMethod: treeOpts.toggleMethod,
  50555. transform: treeOpts.transform,
  50556. trigger: treeOpts.trigger,
  50557. showIcon: treeOpts.showIcon,
  50558. showLine: treeOpts.showLine,
  50559. iconOpen: treeOpts.iconOpen,
  50560. iconLoaded: treeOpts.iconLoaded,
  50561. iconClose: treeOpts.iconClose,
  50562. filterValue: searchValue,
  50563. filterConfig: filterOpts,
  50564. virtualYConfig: virtualYOpts
  50565. },
  50566. on: {
  50567. 'node-click': $xeTreeSelect.nodeClickEvent,
  50568. 'radio-change': $xeTreeSelect.radioChangeEvent,
  50569. 'checkbox-change': $xeTreeSelect.checkboxChangeEvent,
  50570. 'load-success': $xeTreeSelect.loadSuccessEvent
  50571. }
  50572. })])]), footerSlot ? h('div', {
  50573. class: 'vxe-tree-select--panel-footer'
  50574. }, footerSlot({})) : renderEmptyElement($xeTreeSelect)])] : [])]);
  50575. }
  50576. },
  50577. watch: {
  50578. options: function options() {
  50579. var $xeTreeSelect = this;
  50580. $xeTreeSelect.cacheDataMap();
  50581. }
  50582. },
  50583. created: function created() {
  50584. var $xeTreeSelect = this;
  50585. $xeTreeSelect.cacheDataMap();
  50586. },
  50587. mounted: function mounted() {
  50588. var $xeTreeSelect = this;
  50589. globalEvents.on($xeTreeSelect, 'mousewheel', $xeTreeSelect.handleGlobalMousewheelEvent);
  50590. globalEvents.on($xeTreeSelect, 'mousedown', $xeTreeSelect.handleGlobalMousedownEvent);
  50591. globalEvents.on($xeTreeSelect, 'blur', $xeTreeSelect.handleGlobalBlurEvent);
  50592. globalEvents.on($xeTreeSelect, 'resize', $xeTreeSelect.handleGlobalResizeEvent);
  50593. },
  50594. beforeDestroy: function beforeDestroy() {
  50595. var $xeTreeSelect = this;
  50596. var panelElem = $xeTreeSelect.$refs.refOptionPanel;
  50597. if (panelElem && panelElem.parentNode) {
  50598. panelElem.parentNode.removeChild(panelElem);
  50599. }
  50600. globalEvents.off($xeTreeSelect, 'mousewheel');
  50601. globalEvents.off($xeTreeSelect, 'mousedown');
  50602. globalEvents.off($xeTreeSelect, 'blur');
  50603. globalEvents.off($xeTreeSelect, 'resize');
  50604. },
  50605. destroyed: function destroyed() {
  50606. var $xeTreeSelect = this;
  50607. var internalData = $xeTreeSelect.internalData;
  50608. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, tree_select_createInternalData());
  50609. },
  50610. render: function render(h) {
  50611. return this.renderVN(h);
  50612. }
  50613. })); /* define-vxe-component end */
  50614. ;// CONCATENATED MODULE: ./packages/tree-select/index.ts
  50615. var VxeTreeSelect = Object.assign({}, tree_select, {
  50616. install: function install(app) {
  50617. app.component(tree_select.name, tree_select);
  50618. }
  50619. });
  50620. dynamicApp.use(VxeTreeSelect);
  50621. index_esm_VxeUI.component(tree_select);
  50622. var TreeSelect = VxeTreeSelect;
  50623. /* harmony default export */ var packages_tree_select = (VxeTreeSelect);
  50624. ;// CONCATENATED MODULE: ./packages/upload/src/util.ts
  50625. // 导入
  50626. var fileForm = null;
  50627. var fileInput = null;
  50628. function parseFile(file) {
  50629. var name = file.name;
  50630. var tIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastIndexOf(name, '.');
  50631. var type = name.substring(tIndex + 1, name.length).toLowerCase();
  50632. var filename = name.substring(0, tIndex);
  50633. return {
  50634. filename: filename,
  50635. type: type
  50636. };
  50637. }
  50638. /**
  50639. * 读取本地文件
  50640. */
  50641. var readLocalFile = function readLocalFile(options) {
  50642. var opts = Object.assign({}, options);
  50643. return new Promise(function (resolve, reject) {
  50644. if (!fileInput) {
  50645. fileInput = document.createElement('input');
  50646. fileInput.name = 'file';
  50647. fileInput.type = 'file';
  50648. }
  50649. if (!fileForm) {
  50650. fileForm = document.createElement('form');
  50651. fileForm.style.display = 'none';
  50652. fileForm.appendChild(fileInput);
  50653. document.body.appendChild(fileForm);
  50654. }
  50655. var types = opts.types || [];
  50656. var isAllType = !types.length || types.some(function (type) {
  50657. return type === '*';
  50658. });
  50659. fileInput.multiple = !!opts.multiple;
  50660. fileInput.accept = isAllType ? '' : ".".concat(types.join(', .'));
  50661. fileInput.onchange = function (evnt) {
  50662. var eventTarget = evnt.target;
  50663. var files = Array.from(eventTarget.files || []);
  50664. var file = files[0];
  50665. var errType = '';
  50666. // 校验类型
  50667. if (!isAllType) {
  50668. for (var fIndex = 0; fIndex < files.length; fIndex++) {
  50669. var _parseFile = parseFile(files[fIndex]),
  50670. type = _parseFile.type;
  50671. if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(types, type)) {
  50672. errType = type;
  50673. break;
  50674. }
  50675. }
  50676. }
  50677. if (!errType) {
  50678. resolve({
  50679. status: true,
  50680. files: files,
  50681. file: file
  50682. });
  50683. } else {
  50684. if (opts.message !== false) {
  50685. if (index_esm_VxeUI.modal) {
  50686. index_esm_VxeUI.modal.message({
  50687. content: getI18n('vxe.error.notType', [errType]),
  50688. status: 'error'
  50689. });
  50690. }
  50691. }
  50692. var params = {
  50693. status: false,
  50694. files: files,
  50695. file: file
  50696. };
  50697. reject(params);
  50698. }
  50699. };
  50700. fileForm.reset();
  50701. fileInput.click();
  50702. });
  50703. };
  50704. function getExportBlobByContent(content, options) {
  50705. return new Blob([content], {
  50706. type: "text/".concat(options.type, ";charset=utf-8;")
  50707. });
  50708. }
  50709. /**
  50710. * 保存文件到本地
  50711. */
  50712. var saveLocalFile = function saveLocalFile(options) {
  50713. var opts = Object.assign({
  50714. type: ''
  50715. }, options);
  50716. var filename = opts.filename,
  50717. type = opts.type,
  50718. content = opts.content;
  50719. var name = type ? "".concat(filename, ".").concat(type) : "".concat(filename);
  50720. if (window.Blob) {
  50721. var blob = content instanceof Blob ? content : getExportBlobByContent(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content), opts);
  50722. var winNavigator = window.navigator;
  50723. if (winNavigator.msSaveBlob) {
  50724. winNavigator.msSaveBlob(blob, name);
  50725. } else {
  50726. var url = URL.createObjectURL(blob);
  50727. var linkElem = document.createElement('a');
  50728. linkElem.target = '_blank';
  50729. linkElem.download = name;
  50730. linkElem.href = url;
  50731. document.body.appendChild(linkElem);
  50732. linkElem.click();
  50733. requestAnimationFrame(function () {
  50734. if (linkElem.parentNode) {
  50735. linkElem.parentNode.removeChild(linkElem);
  50736. }
  50737. URL.revokeObjectURL(url);
  50738. });
  50739. }
  50740. return Promise.resolve();
  50741. }
  50742. return Promise.reject(new Error(getI18n('vxe.error.notExp')));
  50743. };
  50744. ;// CONCATENATED MODULE: ./packages/upload/src/upload.ts
  50745. function getUniqueKey() {
  50746. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  50747. }
  50748. function handleTransferFiles(items) {
  50749. var files = [];
  50750. external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(items, function (item) {
  50751. var file = item.getAsFile();
  50752. if (file) {
  50753. files.push(file);
  50754. }
  50755. });
  50756. return files;
  50757. }
  50758. function showDropTip($xeUpload, evnt, dragEl, dragPos) {
  50759. var xID = $xeUpload.xID;
  50760. var reactData = $xeUpload.reactData;
  50761. var showMorePopup = reactData.showMorePopup;
  50762. var el = $xeUpload.$refs.refElem;
  50763. var popupEl = document.getElementById("refPopupElem".concat(xID));
  50764. var wrapperEl = showMorePopup ? popupEl : el;
  50765. if (!wrapperEl) {
  50766. return;
  50767. }
  50768. var wrapperRect = wrapperEl.getBoundingClientRect();
  50769. var ddLineEl = $xeUpload.$refs.refDragLineElem;
  50770. var mdLineEl = document.getElementById("refModalDragLineElem".concat(xID));
  50771. var currDLineEl = showMorePopup ? mdLineEl : ddLineEl;
  50772. if (currDLineEl) {
  50773. var dragRect = dragEl.getBoundingClientRect();
  50774. currDLineEl.style.display = 'block';
  50775. currDLineEl.style.top = "".concat(Math.max(1, dragRect.y - wrapperRect.y), "px");
  50776. currDLineEl.style.left = "".concat(Math.max(1, dragRect.x - wrapperRect.x), "px");
  50777. currDLineEl.style.height = "".concat(dragRect.height, "px");
  50778. currDLineEl.style.width = "".concat(dragRect.width - 1, "px");
  50779. currDLineEl.setAttribute('drag-pos', dragPos);
  50780. }
  50781. }
  50782. function hideDropTip($xeUpload) {
  50783. var xID = $xeUpload.xID;
  50784. var ddLineEl = $xeUpload.$refs.refDragLineElem;
  50785. var mdLineEl = document.getElementById("refModalDragLineElem".concat(xID));
  50786. if (ddLineEl) {
  50787. ddLineEl.style.display = '';
  50788. }
  50789. if (mdLineEl) {
  50790. mdLineEl.style.display = '';
  50791. }
  50792. }
  50793. /* harmony default export */ var upload = (/* define-vxe-component start */defineVxeComponent({
  50794. name: 'VxeUpload',
  50795. model: {
  50796. prop: 'value',
  50797. event: 'modelValue'
  50798. },
  50799. mixins: [globalMixins.sizeMixin],
  50800. props: {
  50801. value: [Array, String, Object],
  50802. showList: {
  50803. type: Boolean,
  50804. default: function _default() {
  50805. return getConfig().upload.showList;
  50806. }
  50807. },
  50808. moreConfig: Object,
  50809. readonly: {
  50810. type: Boolean,
  50811. default: null
  50812. },
  50813. disabled: {
  50814. type: Boolean,
  50815. default: null
  50816. },
  50817. autoSubmit: {
  50818. type: Boolean,
  50819. default: function _default() {
  50820. return getConfig().upload.autoSubmit;
  50821. }
  50822. },
  50823. mode: {
  50824. type: String,
  50825. default: function _default() {
  50826. return getConfig().upload.mode;
  50827. }
  50828. },
  50829. imageTypes: {
  50830. type: Array,
  50831. default: function _default() {
  50832. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().upload.imageTypes, true);
  50833. }
  50834. },
  50835. imageConfig: {
  50836. type: Object,
  50837. default: function _default() {
  50838. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().upload.imageConfig, true);
  50839. }
  50840. },
  50841. /**
  50842. * 已废弃,被 image-config 替换
  50843. * @deprecated
  50844. */
  50845. imageStyle: {
  50846. type: Object,
  50847. default: function _default() {
  50848. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().upload.imageStyle, true);
  50849. }
  50850. },
  50851. fileTypes: {
  50852. type: Array,
  50853. default: function _default() {
  50854. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().upload.fileTypes, true);
  50855. }
  50856. },
  50857. dragSort: Boolean,
  50858. dragToUpload: {
  50859. type: Boolean,
  50860. default: function _default() {
  50861. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().upload.dragToUpload, true);
  50862. }
  50863. },
  50864. pasteToUpload: {
  50865. type: Boolean,
  50866. default: function _default() {
  50867. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().upload.pasteToUpload, true);
  50868. }
  50869. },
  50870. keyField: String,
  50871. singleMode: Boolean,
  50872. urlMode: Boolean,
  50873. multiple: Boolean,
  50874. limitSize: {
  50875. type: [String, Number],
  50876. default: function _default() {
  50877. return getConfig().upload.limitSize;
  50878. }
  50879. },
  50880. showLimitSize: {
  50881. type: Boolean,
  50882. default: function _default() {
  50883. return getConfig().upload.showLimitSize;
  50884. }
  50885. },
  50886. limitSizeText: {
  50887. type: [String, Number, Function],
  50888. default: function _default() {
  50889. return getConfig().upload.limitSizeText;
  50890. }
  50891. },
  50892. limitCount: {
  50893. type: [String, Number],
  50894. default: function _default() {
  50895. return getConfig().upload.limitCount;
  50896. }
  50897. },
  50898. showLimitCount: {
  50899. type: Boolean,
  50900. default: function _default() {
  50901. return getConfig().upload.showLimitCount;
  50902. }
  50903. },
  50904. limitCountText: {
  50905. type: [String, Number, Function],
  50906. default: function _default() {
  50907. return getConfig().upload.limitCountText;
  50908. }
  50909. },
  50910. nameField: {
  50911. type: String,
  50912. default: function _default() {
  50913. return getConfig().upload.nameField;
  50914. }
  50915. },
  50916. typeField: {
  50917. type: String,
  50918. default: function _default() {
  50919. return getConfig().upload.typeField;
  50920. }
  50921. },
  50922. urlField: {
  50923. type: String,
  50924. default: function _default() {
  50925. return getConfig().upload.urlField;
  50926. }
  50927. },
  50928. sizeField: {
  50929. type: String,
  50930. default: function _default() {
  50931. return getConfig().upload.sizeField;
  50932. }
  50933. },
  50934. showErrorStatus: {
  50935. type: Boolean,
  50936. default: function _default() {
  50937. return getConfig().upload.showErrorStatus;
  50938. }
  50939. },
  50940. showProgress: {
  50941. type: Boolean,
  50942. default: function _default() {
  50943. return getConfig().upload.showProgress;
  50944. }
  50945. },
  50946. progressText: {
  50947. type: [String, Number, Function],
  50948. default: function _default() {
  50949. return getConfig().upload.progressText;
  50950. }
  50951. },
  50952. showSubmitButton: Boolean,
  50953. autoHiddenButton: {
  50954. type: Boolean,
  50955. default: function _default() {
  50956. return getConfig().upload.autoHiddenButton;
  50957. }
  50958. },
  50959. showUploadButton: {
  50960. type: Boolean,
  50961. default: function _default() {
  50962. return getConfig().upload.showUploadButton;
  50963. }
  50964. },
  50965. buttonText: {
  50966. type: [String, Number, Function],
  50967. default: function _default() {
  50968. return getConfig().upload.buttonText;
  50969. }
  50970. },
  50971. buttonIcon: {
  50972. type: String,
  50973. default: function _default() {
  50974. return getConfig().upload.buttonIcon;
  50975. }
  50976. },
  50977. showButtonText: {
  50978. type: Boolean,
  50979. default: function _default() {
  50980. return getConfig().upload.showButtonText;
  50981. }
  50982. },
  50983. showButtonIcon: {
  50984. type: Boolean,
  50985. default: function _default() {
  50986. return getConfig().upload.showButtonIcon;
  50987. }
  50988. },
  50989. showRemoveButton: {
  50990. type: Boolean,
  50991. default: function _default() {
  50992. return getConfig().upload.showRemoveButton;
  50993. }
  50994. },
  50995. showDownloadButton: {
  50996. type: Boolean,
  50997. default: function _default() {
  50998. return getConfig().upload.showDownloadButton;
  50999. }
  51000. },
  51001. showPreview: {
  51002. type: Boolean,
  51003. default: function _default() {
  51004. return getConfig().upload.showPreview;
  51005. }
  51006. },
  51007. showTip: {
  51008. type: Boolean,
  51009. default: function _default() {
  51010. return getConfig().upload.showTip;
  51011. }
  51012. },
  51013. maxSimultaneousUploads: {
  51014. type: Number,
  51015. default: function _default() {
  51016. return getConfig().upload.maxSimultaneousUploads;
  51017. }
  51018. },
  51019. tipText: [String, Number, Function],
  51020. hintText: String,
  51021. previewMethod: Function,
  51022. uploadMethod: Function,
  51023. beforeRemoveMethod: Function,
  51024. removeMethod: Function,
  51025. beforeDownloadMethod: Function,
  51026. downloadMethod: Function,
  51027. getUrlMethod: Function,
  51028. getThumbnailUrlMethod: Function,
  51029. size: {
  51030. type: String,
  51031. default: function _default() {
  51032. return getConfig().upload.size || getConfig().size;
  51033. }
  51034. }
  51035. },
  51036. inject: {
  51037. $xeForm: {
  51038. default: null
  51039. },
  51040. formItemInfo: {
  51041. from: 'xeFormItemInfo',
  51042. default: null
  51043. },
  51044. $xeTable: {
  51045. default: null
  51046. }
  51047. },
  51048. data: function data() {
  51049. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  51050. var reactData = {
  51051. isDragUploadStatus: false,
  51052. showMorePopup: false,
  51053. isActivated: false,
  51054. fileList: [],
  51055. fileCacheMaps: {},
  51056. isDragMove: false,
  51057. dragIndex: -1,
  51058. dragTipText: ''
  51059. };
  51060. var internalData = {
  51061. imagePreviewTypes: ['jpg', 'jpeg', 'png', 'gif'],
  51062. prevDragIndex: -1
  51063. // prevDragPos: ''
  51064. };
  51065. return {
  51066. xID: xID,
  51067. reactData: reactData,
  51068. internalData: internalData
  51069. };
  51070. },
  51071. computed: _objectSpread2(_objectSpread2({}, {}), {}, {
  51072. computeFormReadonly: function computeFormReadonly() {
  51073. var $xeUpload = this;
  51074. var props = $xeUpload;
  51075. var $xeForm = $xeUpload.$xeForm;
  51076. var readonly = props.readonly;
  51077. if (readonly === null) {
  51078. if ($xeForm) {
  51079. return $xeForm.readonly;
  51080. }
  51081. return false;
  51082. }
  51083. return readonly;
  51084. },
  51085. computeIsDisabled: function computeIsDisabled() {
  51086. var $xeUpload = this;
  51087. var props = $xeUpload;
  51088. var $xeForm = $xeUpload.$xeForm;
  51089. var disabled = props.disabled;
  51090. if (disabled === null) {
  51091. if ($xeForm) {
  51092. return $xeForm.disabled;
  51093. }
  51094. return false;
  51095. }
  51096. return disabled;
  51097. },
  51098. computeKeyField: function computeKeyField() {
  51099. var $xeUpload = this;
  51100. var props = $xeUpload;
  51101. return props.keyField || '_X_KEY';
  51102. },
  51103. computeIsImage: function computeIsImage() {
  51104. var $xeUpload = this;
  51105. var props = $xeUpload;
  51106. return props.mode === 'image';
  51107. },
  51108. computeNameProp: function computeNameProp() {
  51109. var $xeUpload = this;
  51110. var props = $xeUpload;
  51111. return props.nameField || 'name';
  51112. },
  51113. computeTypeProp: function computeTypeProp() {
  51114. var $xeUpload = this;
  51115. var props = $xeUpload;
  51116. return props.typeField || 'type';
  51117. },
  51118. computeUrlProp: function computeUrlProp() {
  51119. var $xeUpload = this;
  51120. var props = $xeUpload;
  51121. return props.urlField || 'url';
  51122. },
  51123. computeSizeProp: function computeSizeProp() {
  51124. var $xeUpload = this;
  51125. var props = $xeUpload;
  51126. return props.sizeField || 'size';
  51127. },
  51128. computeLimitMaxSize: function computeLimitMaxSize() {
  51129. var $xeUpload = this;
  51130. var props = $xeUpload;
  51131. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.limitSize) * 1024 * 1024;
  51132. },
  51133. computeLimitMaxCount: function computeLimitMaxCount() {
  51134. var $xeUpload = this;
  51135. var props = $xeUpload;
  51136. return props.multiple ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.limitCount) : 1;
  51137. },
  51138. computeOverCount: function computeOverCount() {
  51139. var $xeUpload = this;
  51140. var props = $xeUpload;
  51141. var reactData = $xeUpload.reactData;
  51142. var multiple = props.multiple;
  51143. var fileList = reactData.fileList;
  51144. var limitMaxCount = $xeUpload.computeLimitMaxCount;
  51145. if (multiple) {
  51146. if (limitMaxCount) {
  51147. return fileList.length >= limitMaxCount;
  51148. }
  51149. return true;
  51150. }
  51151. return fileList.length >= 1;
  51152. },
  51153. computeLimitSizeUnit: function computeLimitSizeUnit() {
  51154. var $xeUpload = this;
  51155. var props = $xeUpload;
  51156. var limitSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(props.limitSize);
  51157. if (limitSize) {
  51158. if (limitSize > 1048576) {
  51159. return "".concat(limitSize / 1048576, "T");
  51160. }
  51161. if (limitSize > 1024) {
  51162. return "".concat(limitSize / 1024, "G");
  51163. }
  51164. return "".concat(limitSize, "M");
  51165. }
  51166. return '';
  51167. },
  51168. computedShowTipText: function computedShowTipText() {
  51169. var $xeUpload = this;
  51170. var props = $xeUpload;
  51171. var showTip = props.showTip,
  51172. tipText = props.tipText;
  51173. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(showTip)) {
  51174. return showTip;
  51175. }
  51176. var defShowTip = getConfig().upload.showTip;
  51177. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(defShowTip)) {
  51178. return defShowTip;
  51179. }
  51180. if (tipText) {
  51181. return true;
  51182. }
  51183. return false;
  51184. },
  51185. computedDefTipText: function computedDefTipText() {
  51186. var $xeUpload = this;
  51187. var props = $xeUpload;
  51188. var limitSize = props.limitSize,
  51189. fileTypes = props.fileTypes,
  51190. multiple = props.multiple,
  51191. limitCount = props.limitCount;
  51192. var tipText = props.tipText || props.hintText;
  51193. var isImage = $xeUpload.computeIsImage;
  51194. var limitSizeUnit = $xeUpload.computeLimitSizeUnit;
  51195. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(tipText)) {
  51196. return tipText;
  51197. }
  51198. if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(tipText)) {
  51199. return "".concat(tipText({}));
  51200. }
  51201. var defTips = [];
  51202. if (isImage) {
  51203. if (multiple && limitCount) {
  51204. defTips.push(getI18n('vxe.upload.imgCountHint', [limitCount]));
  51205. }
  51206. if (limitSize && limitSizeUnit) {
  51207. defTips.push(getI18n('vxe.upload.imgSizeHint', [limitSizeUnit]));
  51208. }
  51209. } else {
  51210. if (fileTypes && fileTypes.length) {
  51211. defTips.push(getI18n('vxe.upload.fileTypeHint', [fileTypes.join('/')]));
  51212. }
  51213. if (limitSize && limitSizeUnit) {
  51214. defTips.push(getI18n('vxe.upload.fileSizeHint', [limitSizeUnit]));
  51215. }
  51216. if (multiple && limitCount) {
  51217. defTips.push(getI18n('vxe.upload.fileCountHint', [limitCount]));
  51218. }
  51219. }
  51220. return defTips.join(getI18n('vxe.base.comma'));
  51221. },
  51222. computeImageOpts: function computeImageOpts() {
  51223. var $xeUpload = this;
  51224. var props = $xeUpload;
  51225. return Object.assign({}, props.imageConfig || props.imageStyle);
  51226. },
  51227. computeImgStyle: function computeImgStyle() {
  51228. var $xeUpload = this;
  51229. var imageOpts = $xeUpload.computeImageOpts;
  51230. var width = imageOpts.width,
  51231. height = imageOpts.height;
  51232. var stys = {};
  51233. if (width) {
  51234. stys.width = toCssUnit(width);
  51235. }
  51236. if (height) {
  51237. stys.height = toCssUnit(height);
  51238. }
  51239. return stys;
  51240. },
  51241. computeMoreOpts: function computeMoreOpts() {
  51242. var $xeUpload = this;
  51243. var props = $xeUpload;
  51244. return Object.assign({
  51245. showMoreButton: true
  51246. }, props.moreConfig);
  51247. }
  51248. }),
  51249. watch: {
  51250. value: function value() {
  51251. var $xeUpload = this;
  51252. $xeUpload.updateFileList();
  51253. }
  51254. },
  51255. methods: {
  51256. //
  51257. // Method
  51258. //
  51259. dispatchEvent: function dispatchEvent(type, params, evnt) {
  51260. var $xeUpload = this;
  51261. $xeUpload.$emit(type, createEvent(evnt, {
  51262. $upload: $xeUpload
  51263. }, params));
  51264. },
  51265. emitModel: function emitModel(value) {
  51266. var $xeUpload = this;
  51267. $xeUpload.$emit('modelValue', value);
  51268. },
  51269. choose: function choose() {
  51270. var $xeUpload = this;
  51271. return $xeUpload.handleChoose(null);
  51272. },
  51273. submit: function submit(isFull) {
  51274. var $xeUpload = this;
  51275. var props = $xeUpload;
  51276. var reactData = $xeUpload.reactData;
  51277. var maxSimultaneousUploads = props.maxSimultaneousUploads;
  51278. var msNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(maxSimultaneousUploads || 1) || 1;
  51279. var fileList = reactData.fileList,
  51280. fileCacheMaps = reactData.fileCacheMaps;
  51281. var allPendingList = fileList.filter(function (item) {
  51282. var fileKey = $xeUpload.getFieldKey(item);
  51283. var cacheItem = fileCacheMaps[fileKey];
  51284. return cacheItem && (cacheItem.status === 'pending' || isFull && cacheItem.status === 'error');
  51285. });
  51286. var handleSubmit = function handleSubmit(item) {
  51287. var fileKey = $xeUpload.getFieldKey(item);
  51288. var cacheItem = fileCacheMaps[fileKey];
  51289. if (cacheItem) {
  51290. var file = cacheItem.file;
  51291. if (file && (cacheItem.status === 'pending' || isFull && cacheItem.status === 'error')) {
  51292. cacheItem.loading = true;
  51293. cacheItem.percent = 0;
  51294. return $xeUpload.handleUploadResult(item, file).then(_handleNextSubmit);
  51295. }
  51296. }
  51297. return _handleNextSubmit();
  51298. };
  51299. var _handleNextSubmit = function handleNextSubmit() {
  51300. if (allPendingList.length) {
  51301. var item = allPendingList[0];
  51302. allPendingList.splice(0, 1);
  51303. return handleSubmit(item).then(_handleNextSubmit);
  51304. }
  51305. return Promise.resolve();
  51306. };
  51307. return Promise.all(allPendingList.splice(0, msNum).map(handleSubmit)).then(function () {
  51308. // 完成
  51309. });
  51310. },
  51311. getFieldKey: function getFieldKey(item) {
  51312. var $xeUpload = this;
  51313. var keyField = $xeUpload.computeKeyField;
  51314. return item[keyField];
  51315. },
  51316. updateFileList: function updateFileList() {
  51317. var $xeUpload = this;
  51318. var props = $xeUpload;
  51319. var reactData = $xeUpload.reactData;
  51320. var value = props.value,
  51321. multiple = props.multiple;
  51322. var formReadonly = $xeUpload.computeFormReadonly;
  51323. var keyField = $xeUpload.computeKeyField;
  51324. var nameProp = $xeUpload.computeNameProp;
  51325. var typeProp = $xeUpload.computeTypeProp;
  51326. var urlProp = $xeUpload.computeUrlProp;
  51327. var sizeProp = $xeUpload.computeSizeProp;
  51328. var fileList = value ? (value ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(value) ? value : [value] : []).map(function (item) {
  51329. if (!item || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(item)) {
  51330. var url = "".concat(item || '');
  51331. var urlObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().parseUrl(item);
  51332. var _name = (urlObj ? urlObj.searchQuery[nameProp] : '') || $xeUpload.parseFileName(url);
  51333. return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, nameProp, _name), typeProp, (urlObj ? urlObj.searchQuery[typeProp] : '') || $xeUpload.parseFileType(_name)), urlProp, url), sizeProp, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(urlObj ? urlObj.searchQuery[sizeProp] : 0) || 0), keyField, getUniqueKey());
  51334. }
  51335. var name = item[nameProp] || '';
  51336. item[nameProp] = name;
  51337. item[typeProp] = item[typeProp] || $xeUpload.parseFileType(name);
  51338. item[urlProp] = item[urlProp] || '';
  51339. item[sizeProp] = item[sizeProp] || 0;
  51340. item[keyField] = item[keyField] || getUniqueKey();
  51341. return item;
  51342. }) : [];
  51343. reactData.fileList = formReadonly || multiple ? fileList : fileList.slice(0, 1);
  51344. },
  51345. parseFileName: function parseFileName(url) {
  51346. return decodeURIComponent("".concat(url || '')).split('/').pop() || '';
  51347. },
  51348. parseFileType: function parseFileType(name) {
  51349. var index = name.lastIndexOf('.');
  51350. if (index > 0) {
  51351. return name.substring(index + 1).toLowerCase();
  51352. }
  51353. return '';
  51354. },
  51355. handleChange: function handleChange(value) {
  51356. var $xeUpload = this;
  51357. var props = $xeUpload;
  51358. var singleMode = props.singleMode,
  51359. urlMode = props.urlMode;
  51360. var urlProp = $xeUpload.computeUrlProp;
  51361. var nameProp = $xeUpload.computeNameProp;
  51362. var restList = value ? value.slice(0) : [];
  51363. if (urlMode) {
  51364. restList = restList.map(function (item) {
  51365. var url = item[urlProp];
  51366. if (url) {
  51367. var urlObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().parseUrl(url);
  51368. if (!urlObj.searchQuery[nameProp]) {
  51369. if (url.indexOf('blob:') === -1) {
  51370. return "".concat(url).concat(url.indexOf('?') === -1 ? '?' : '&').concat(encodeURIComponent(item[nameProp] || ''));
  51371. }
  51372. }
  51373. }
  51374. return url;
  51375. });
  51376. }
  51377. $xeUpload.emitModel(singleMode ? restList[0] || null : restList);
  51378. },
  51379. getThumbnailFileUrl: function getThumbnailFileUrl(item) {
  51380. var $xeUpload = this;
  51381. var props = $xeUpload;
  51382. var getThumbnailUrlFn = props.getThumbnailUrlMethod || getConfig().upload.getThumbnailUrlMethod;
  51383. if (getThumbnailUrlFn) {
  51384. return getThumbnailUrlFn({
  51385. $upload: $xeUpload,
  51386. option: item
  51387. });
  51388. }
  51389. return $xeUpload.getFileUrl(item);
  51390. },
  51391. getFileUrl: function getFileUrl(item) {
  51392. var $xeUpload = this;
  51393. var props = $xeUpload;
  51394. var getUrlFn = props.getUrlMethod || getConfig().upload.getUrlMethod;
  51395. var urlProp = $xeUpload.computeUrlProp;
  51396. return getUrlFn ? getUrlFn({
  51397. $upload: $xeUpload,
  51398. option: item
  51399. }) : item[urlProp];
  51400. },
  51401. handleDefaultFilePreview: function handleDefaultFilePreview(item) {
  51402. var $xeUpload = this;
  51403. var props = $xeUpload;
  51404. var internalData = $xeUpload.internalData;
  51405. var imageTypes = props.imageTypes,
  51406. showDownloadButton = props.showDownloadButton;
  51407. var typeProp = $xeUpload.computeTypeProp;
  51408. var beforeDownloadFn = props.beforeDownloadMethod || getConfig().upload.beforeDownloadMethod;
  51409. var imagePreviewTypes = internalData.imagePreviewTypes;
  51410. // 如果是预览图片
  51411. if (imagePreviewTypes.concat(imageTypes || []).some(function (type) {
  51412. return "".concat(type).toLowerCase() === "".concat(item[typeProp]).toLowerCase();
  51413. })) {
  51414. if (index_esm_VxeUI.previewImage) {
  51415. index_esm_VxeUI.previewImage({
  51416. urlList: [$xeUpload.getFileUrl(item)],
  51417. showDownloadButton: showDownloadButton,
  51418. beforeDownloadMethod: beforeDownloadFn ? function () {
  51419. return beforeDownloadFn({
  51420. $upload: $xeUpload,
  51421. option: item
  51422. });
  51423. } : undefined
  51424. });
  51425. }
  51426. }
  51427. },
  51428. handlePreviewFileEvent: function handlePreviewFileEvent(evnt, item) {
  51429. var $xeUpload = this;
  51430. var props = $xeUpload;
  51431. var previewFn = props.previewMethod || getConfig().upload.previewMethod;
  51432. if (props.showPreview) {
  51433. if (previewFn) {
  51434. previewFn({
  51435. $upload: $xeUpload,
  51436. option: item
  51437. });
  51438. } else {
  51439. $xeUpload.handleDefaultFilePreview(item);
  51440. }
  51441. }
  51442. },
  51443. handlePreviewImageEvent: function handlePreviewImageEvent(evnt, item, index) {
  51444. var $xeUpload = this;
  51445. var props = $xeUpload;
  51446. var reactData = $xeUpload.reactData;
  51447. var showDownloadButton = props.showDownloadButton;
  51448. var fileList = reactData.fileList;
  51449. var beforeDownloadFn = props.beforeDownloadMethod || getConfig().upload.beforeDownloadMethod;
  51450. if (props.showPreview) {
  51451. if (index_esm_VxeUI.previewImage) {
  51452. index_esm_VxeUI.previewImage({
  51453. urlList: fileList.map(function (item) {
  51454. return $xeUpload.getFileUrl(item);
  51455. }),
  51456. activeIndex: index,
  51457. showDownloadButton: showDownloadButton,
  51458. beforeDownloadMethod: beforeDownloadFn ? function (_ref2) {
  51459. var index = _ref2.index;
  51460. return beforeDownloadFn({
  51461. $upload: $xeUpload,
  51462. option: fileList[index]
  51463. });
  51464. } : undefined
  51465. });
  51466. }
  51467. }
  51468. },
  51469. handleUploadResult: function handleUploadResult(item, file) {
  51470. var $xeUpload = this;
  51471. var props = $xeUpload;
  51472. var reactData = $xeUpload.reactData;
  51473. var showErrorStatus = props.showErrorStatus;
  51474. var fileKey = $xeUpload.getFieldKey(item);
  51475. var uploadFn = props.uploadMethod || getConfig().upload.uploadMethod;
  51476. if (uploadFn) {
  51477. return Promise.resolve(uploadFn({
  51478. $upload: $xeUpload,
  51479. file: file,
  51480. option: item,
  51481. updateProgress: function updateProgress(percentNum) {
  51482. var fileCacheMaps = reactData.fileCacheMaps;
  51483. var cacheItem = fileCacheMaps[$xeUpload.getFieldKey(item)];
  51484. if (cacheItem) {
  51485. cacheItem.percent = Math.max(0, Math.min(99, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(percentNum)));
  51486. }
  51487. }
  51488. })).then(function (res) {
  51489. var fileCacheMaps = reactData.fileCacheMaps;
  51490. var cacheItem = fileCacheMaps[fileKey];
  51491. if (cacheItem) {
  51492. cacheItem.percent = 100;
  51493. cacheItem.status = 'success';
  51494. }
  51495. Object.assign(item, res);
  51496. $xeUpload.dispatchEvent('upload-success', {
  51497. option: item,
  51498. data: res
  51499. }, null);
  51500. }).catch(function (res) {
  51501. var fileCacheMaps = reactData.fileCacheMaps;
  51502. var cacheItem = fileCacheMaps[fileKey];
  51503. if (cacheItem) {
  51504. cacheItem.status = 'error';
  51505. }
  51506. if (showErrorStatus) {
  51507. Object.assign(item, res);
  51508. } else {
  51509. reactData.fileList = reactData.fileList.filter(function (obj) {
  51510. return $xeUpload.getFieldKey(obj) !== fileKey;
  51511. });
  51512. }
  51513. $xeUpload.dispatchEvent('upload-error', {
  51514. option: item,
  51515. data: res
  51516. }, null);
  51517. }).finally(function () {
  51518. var fileCacheMaps = reactData.fileCacheMaps;
  51519. var cacheItem = fileCacheMaps[fileKey];
  51520. if (cacheItem) {
  51521. cacheItem.loading = false;
  51522. }
  51523. });
  51524. } else {
  51525. var fileCacheMaps = reactData.fileCacheMaps;
  51526. var cacheItem = fileCacheMaps[fileKey];
  51527. if (cacheItem) {
  51528. cacheItem.loading = false;
  51529. }
  51530. }
  51531. return Promise.resolve();
  51532. },
  51533. handleReUpload: function handleReUpload(item) {
  51534. var $xeUpload = this;
  51535. var props = $xeUpload;
  51536. var reactData = $xeUpload.reactData;
  51537. var uploadMethod = props.uploadMethod,
  51538. urlMode = props.urlMode;
  51539. var fileCacheMaps = reactData.fileCacheMaps;
  51540. var fileKey = $xeUpload.getFieldKey(item);
  51541. var cacheItem = fileCacheMaps[fileKey];
  51542. var uploadFn = uploadMethod || getConfig().upload.uploadMethod;
  51543. if (uploadFn && cacheItem) {
  51544. var file = cacheItem.file;
  51545. cacheItem.loading = true;
  51546. cacheItem.status = 'pending';
  51547. cacheItem.percent = 0;
  51548. $xeUpload.handleUploadResult(item, file).then(function () {
  51549. if (urlMode) {
  51550. $xeUpload.handleChange(reactData.fileList);
  51551. }
  51552. });
  51553. }
  51554. },
  51555. handleUploadFile: function handleUploadFile(files, evnt) {
  51556. var $xeUpload = this;
  51557. var props = $xeUpload;
  51558. var reactData = $xeUpload.reactData;
  51559. var $xeForm = $xeUpload.$xeForm;
  51560. var formItemInfo = $xeUpload.formItemInfo;
  51561. var multiple = props.multiple,
  51562. urlMode = props.urlMode,
  51563. showLimitSize = props.showLimitSize,
  51564. limitSizeText = props.limitSizeText,
  51565. showLimitCount = props.showLimitCount,
  51566. limitCountText = props.limitCountText,
  51567. autoSubmit = props.autoSubmit;
  51568. var fileList = reactData.fileList;
  51569. var uploadFn = props.uploadMethod || getConfig().upload.uploadMethod;
  51570. var keyField = $xeUpload.computeKeyField;
  51571. var nameProp = $xeUpload.computeNameProp;
  51572. var typeProp = $xeUpload.computeTypeProp;
  51573. var urlProp = $xeUpload.computeUrlProp;
  51574. var sizeProp = $xeUpload.computeSizeProp;
  51575. var limitMaxSize = $xeUpload.computeLimitMaxSize;
  51576. var limitMaxCount = $xeUpload.computeLimitMaxCount;
  51577. var limitSizeUnit = $xeUpload.computeLimitSizeUnit;
  51578. var selectFiles = files;
  51579. if (multiple && limitMaxCount) {
  51580. // 校验文件数量
  51581. if (showLimitCount && fileList.length >= limitMaxCount) {
  51582. if (index_esm_VxeUI.modal) {
  51583. index_esm_VxeUI.modal.notification({
  51584. title: getI18n('vxe.modal.errTitle'),
  51585. status: 'error',
  51586. content: limitCountText ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(limitCountText) ? limitCountText({
  51587. maxCount: limitMaxCount
  51588. }) : limitCountText) : getI18n('vxe.upload.overCountErr', [limitMaxCount])
  51589. });
  51590. }
  51591. return;
  51592. }
  51593. var overNum = selectFiles.length - (limitMaxCount - fileList.length);
  51594. if (showLimitCount && overNum > 0) {
  51595. var overExtraList = selectFiles.slice(limitMaxCount - fileList.length);
  51596. if (limitCountText) {
  51597. index_esm_VxeUI.modal.notification({
  51598. title: getI18n('vxe.modal.errTitle'),
  51599. status: 'error',
  51600. content: "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(limitCountText) ? limitCountText({
  51601. maxCount: limitMaxCount
  51602. }) : limitCountText)
  51603. });
  51604. } else if (index_esm_VxeUI.modal) {
  51605. index_esm_VxeUI.modal.notification({
  51606. title: getI18n('vxe.modal.errTitle'),
  51607. status: 'error',
  51608. slots: {
  51609. default: function _default(params, h) {
  51610. return h('div', {
  51611. class: 'vxe-upload--file-message-over-error'
  51612. }, [h('div', {}, getI18n('vxe.upload.overCountExtraErr', [limitMaxCount, overNum])), h('div', {
  51613. class: 'vxe-upload--file-message-over-extra'
  51614. }, overExtraList.map(function (file, index) {
  51615. return h('div', {
  51616. key: index,
  51617. class: 'vxe-upload--file-message-over-extra-item'
  51618. }, file.name);
  51619. }))]);
  51620. }
  51621. }
  51622. });
  51623. }
  51624. }
  51625. selectFiles = selectFiles.slice(0, limitMaxCount - fileList.length);
  51626. }
  51627. // 校验文件大小
  51628. if (showLimitSize && limitMaxSize) {
  51629. for (var i = 0; i < files.length; i++) {
  51630. var file = files[0];
  51631. if (file.size > limitMaxSize) {
  51632. if (index_esm_VxeUI.modal) {
  51633. index_esm_VxeUI.modal.notification({
  51634. title: getI18n('vxe.modal.errTitle'),
  51635. status: 'error',
  51636. content: limitSizeText ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(limitSizeText) ? limitSizeText({
  51637. maxSize: limitMaxSize
  51638. }) : limitSizeText) : getI18n('vxe.upload.overSizeErr', [limitSizeUnit])
  51639. });
  51640. }
  51641. return;
  51642. }
  51643. }
  51644. }
  51645. var cacheMaps = Object.assign({}, reactData.fileCacheMaps);
  51646. var newFileList = multiple ? fileList : [];
  51647. var uploadPromiseRests = [];
  51648. reactData.fileList = newFileList;
  51649. reactData.fileCacheMaps = cacheMaps;
  51650. selectFiles.forEach(function (file) {
  51651. var name = file.name;
  51652. var fileKey = getUniqueKey();
  51653. var fileObj = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, nameProp, name), typeProp, $xeUpload.parseFileType(name)), sizeProp, file.size), urlProp, URL.createObjectURL(file)), keyField, fileKey);
  51654. if (uploadFn) {
  51655. cacheMaps[fileKey] = {
  51656. file: file,
  51657. loading: !!autoSubmit,
  51658. status: 'pending',
  51659. percent: 0
  51660. };
  51661. }
  51662. var item = fileObj;
  51663. if (uploadFn && autoSubmit) {
  51664. uploadPromiseRests.push($xeUpload.handleUploadResult(item, file));
  51665. }
  51666. newFileList.push(item);
  51667. $xeUpload.dispatchEvent('add', {
  51668. option: item
  51669. }, evnt);
  51670. });
  51671. Promise.all(urlMode ? uploadPromiseRests : []).then(function () {
  51672. $xeUpload.handleChange(newFileList);
  51673. // 自动更新校验状态
  51674. if ($xeForm && formItemInfo) {
  51675. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, newFileList);
  51676. }
  51677. });
  51678. },
  51679. handleChoose: function handleChoose(evnt) {
  51680. var $xeUpload = this;
  51681. var props = $xeUpload;
  51682. var multiple = props.multiple,
  51683. imageTypes = props.imageTypes,
  51684. fileTypes = props.fileTypes;
  51685. var isDisabled = $xeUpload.computeIsDisabled;
  51686. var isImage = $xeUpload.computeIsImage;
  51687. if (isDisabled) {
  51688. return Promise.resolve({
  51689. status: false,
  51690. files: [],
  51691. file: null
  51692. });
  51693. }
  51694. return readLocalFile({
  51695. multiple: multiple,
  51696. types: isImage ? imageTypes : fileTypes
  51697. }).then(function (params) {
  51698. $xeUpload.handleUploadFile(params.files, evnt);
  51699. return params;
  51700. });
  51701. },
  51702. clickEvent: function clickEvent(evnt) {
  51703. var $xeUpload = this;
  51704. $xeUpload.handleChoose(evnt).catch(function () {
  51705. // 错误文件类型
  51706. });
  51707. },
  51708. handleRemoveEvent: function handleRemoveEvent(evnt, item, index) {
  51709. var $xeUpload = this;
  51710. var reactData = $xeUpload.reactData;
  51711. var $xeForm = $xeUpload.$xeForm;
  51712. var formItemInfo = $xeUpload.formItemInfo;
  51713. var fileList = reactData.fileList;
  51714. fileList.splice(index, 1);
  51715. $xeUpload.handleChange(fileList);
  51716. // 自动更新校验状态
  51717. if ($xeForm && formItemInfo) {
  51718. $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, fileList);
  51719. }
  51720. $xeUpload.dispatchEvent('remove', {
  51721. option: item
  51722. }, evnt);
  51723. },
  51724. removeFileEvent: function removeFileEvent(evnt, item, index) {
  51725. var $xeUpload = this;
  51726. var props = $xeUpload;
  51727. var beforeRemoveFn = props.beforeRemoveMethod || getConfig().upload.beforeRemoveMethod;
  51728. var removeFn = props.removeMethod || getConfig().upload.removeMethod;
  51729. Promise.resolve(beforeRemoveFn ? beforeRemoveFn({
  51730. $upload: $xeUpload,
  51731. option: item
  51732. }) : true).then(function (status) {
  51733. if (status) {
  51734. if (removeFn) {
  51735. Promise.resolve(removeFn({
  51736. $upload: $xeUpload,
  51737. option: item
  51738. })).then(function () {
  51739. $xeUpload.handleRemoveEvent(evnt, item, index);
  51740. }).catch(function (e) {
  51741. return e;
  51742. });
  51743. } else {
  51744. $xeUpload.handleRemoveEvent(evnt, item, index);
  51745. }
  51746. } else {
  51747. $xeUpload.dispatchEvent('remove-fail', {
  51748. option: item
  51749. }, evnt);
  51750. }
  51751. });
  51752. },
  51753. handleDownloadEvent: function handleDownloadEvent(evnt, item) {
  51754. var $xeUpload = this;
  51755. $xeUpload.dispatchEvent('download', {
  51756. option: item
  51757. }, evnt);
  51758. },
  51759. downloadFileEvent: function downloadFileEvent(evnt, item) {
  51760. var $xeUpload = this;
  51761. var props = $xeUpload;
  51762. var beforeDownloadFn = props.beforeDownloadMethod || getConfig().upload.beforeDownloadMethod;
  51763. var downloadFn = props.downloadMethod || getConfig().upload.downloadMethod;
  51764. Promise.resolve(beforeDownloadFn ? beforeDownloadFn({
  51765. $upload: $xeUpload,
  51766. option: item
  51767. }) : true).then(function (status) {
  51768. if (status) {
  51769. if (downloadFn) {
  51770. Promise.resolve(downloadFn({
  51771. $upload: $xeUpload,
  51772. option: item
  51773. })).then(function () {
  51774. $xeUpload.handleDownloadEvent(evnt, item);
  51775. }).catch(function (e) {
  51776. return e;
  51777. });
  51778. } else {
  51779. $xeUpload.handleDownloadEvent(evnt, item);
  51780. }
  51781. } else {
  51782. $xeUpload.dispatchEvent('download-fail', {
  51783. option: item
  51784. }, evnt);
  51785. }
  51786. });
  51787. },
  51788. handleUploadDragleaveEvent: function handleUploadDragleaveEvent(evnt) {
  51789. var $xeUpload = this;
  51790. var reactData = $xeUpload.reactData;
  51791. var targetElem = evnt.currentTarget;
  51792. var clientX = evnt.clientX,
  51793. clientY = evnt.clientY;
  51794. if (targetElem) {
  51795. var _targetElem$getBoundi = targetElem.getBoundingClientRect(),
  51796. targetX = _targetElem$getBoundi.x,
  51797. targetY = _targetElem$getBoundi.y,
  51798. targetHeight = _targetElem$getBoundi.height,
  51799. targetWidth = _targetElem$getBoundi.width;
  51800. if (clientX < targetX || clientX > targetX + targetWidth || clientY < targetY || clientY > targetY + targetHeight) {
  51801. reactData.isDragUploadStatus = false;
  51802. }
  51803. }
  51804. },
  51805. handleUploadDragoverEvent: function handleUploadDragoverEvent(evnt) {
  51806. var $xeUpload = this;
  51807. var reactData = $xeUpload.reactData;
  51808. var dataTransfer = evnt.dataTransfer;
  51809. if (dataTransfer) {
  51810. var items = dataTransfer.items;
  51811. if (items && items.length) {
  51812. evnt.preventDefault();
  51813. reactData.isDragUploadStatus = true;
  51814. }
  51815. }
  51816. },
  51817. uploadTransferFileEvent: function uploadTransferFileEvent(evnt, files) {
  51818. var $xeUpload = this;
  51819. var props = $xeUpload;
  51820. var internalData = $xeUpload.internalData;
  51821. var imageTypes = props.imageTypes,
  51822. fileTypes = props.fileTypes;
  51823. var imagePreviewTypes = internalData.imagePreviewTypes;
  51824. var isImage = $xeUpload.computeIsImage;
  51825. if (isImage) {
  51826. var pasteImgTypes = imagePreviewTypes.concat(imageTypes && imageTypes.length ? imageTypes : []);
  51827. files = files.filter(function (file) {
  51828. var fileType = "".concat(file.type.split('/')[1] || '').toLowerCase();
  51829. if (pasteImgTypes.some(function (type) {
  51830. return "".concat(type).toLowerCase() === fileType;
  51831. })) {
  51832. return true;
  51833. }
  51834. return false;
  51835. });
  51836. } else {
  51837. if (fileTypes && fileTypes.length) {
  51838. var errTypes = [];
  51839. files.forEach(function (file) {
  51840. var fileType = $xeUpload.parseFileType(file.name);
  51841. if (!fileTypes.some(function (type) {
  51842. return "".concat(type).toLowerCase() === fileType;
  51843. })) {
  51844. errTypes.push(fileType);
  51845. }
  51846. });
  51847. if (errTypes.length) {
  51848. if (index_esm_VxeUI.modal) {
  51849. index_esm_VxeUI.modal.message({
  51850. content: getI18n('vxe.error.notType', [errTypes.join(', ')]),
  51851. status: 'error'
  51852. });
  51853. }
  51854. return;
  51855. }
  51856. }
  51857. }
  51858. // 如果全部不满足条件
  51859. if (!files.length) {
  51860. if (index_esm_VxeUI.modal) {
  51861. index_esm_VxeUI.modal.notification({
  51862. title: getI18n('vxe.modal.errTitle'),
  51863. status: 'error',
  51864. content: getI18n('vxe.upload.uploadTypeErr')
  51865. });
  51866. }
  51867. return;
  51868. }
  51869. $xeUpload.handleUploadFile(files, evnt);
  51870. },
  51871. handleUploadDropEvent: function handleUploadDropEvent(evnt) {
  51872. var $xeUpload = this;
  51873. var reactData = $xeUpload.reactData;
  51874. var dataTransfer = evnt.dataTransfer;
  51875. if (dataTransfer) {
  51876. var items = dataTransfer.items;
  51877. if (items && items.length) {
  51878. evnt.preventDefault();
  51879. var files = handleTransferFiles(items);
  51880. if (files.length) {
  51881. $xeUpload.uploadTransferFileEvent(evnt, files);
  51882. }
  51883. }
  51884. }
  51885. reactData.isDragUploadStatus = false;
  51886. },
  51887. handleMoreEvent: function handleMoreEvent() {
  51888. var $xeUpload = this;
  51889. var props = $xeUpload;
  51890. var reactData = $xeUpload.reactData;
  51891. var xID = $xeUpload.xID;
  51892. var formReadonly = $xeUpload.computeFormReadonly;
  51893. var isImage = $xeUpload.computeIsImage;
  51894. if (index_esm_VxeUI.modal) {
  51895. index_esm_VxeUI.modal.open({
  51896. title: formReadonly ? getI18n('vxe.upload.morePopup.readTitle') : getI18n("vxe.upload.morePopup.".concat(isImage ? 'imageTitle' : 'fileTitle')),
  51897. width: 660,
  51898. height: 500,
  51899. escClosable: true,
  51900. showMaximize: true,
  51901. resize: true,
  51902. maskClosable: true,
  51903. slots: {
  51904. default: function _default(params, h) {
  51905. var showErrorStatus = props.showErrorStatus,
  51906. dragToUpload = props.dragToUpload,
  51907. dragSort = props.dragSort;
  51908. var isActivated = reactData.isActivated,
  51909. isDragMove = reactData.isDragMove,
  51910. isDragUploadStatus = reactData.isDragUploadStatus,
  51911. dragIndex = reactData.dragIndex;
  51912. var fileList = reactData.fileList;
  51913. var isDisabled = $xeUpload.computeIsDisabled;
  51914. var ons = {};
  51915. if (dragToUpload && dragIndex === -1) {
  51916. ons.dragover = $xeUpload.handleUploadDragoverEvent;
  51917. ons.dragleave = $xeUpload.handleUploadDragleaveEvent;
  51918. ons.drop = $xeUpload.handleUploadDropEvent;
  51919. }
  51920. return h('div', {
  51921. attrs: {
  51922. id: "refPopupElem".concat(xID)
  51923. },
  51924. class: ['vxe-upload--more-popup', {
  51925. 'is--readonly': formReadonly,
  51926. 'is--disabled': isDisabled,
  51927. 'is--active': isActivated,
  51928. 'show--error': showErrorStatus,
  51929. 'is--drag': isDragUploadStatus
  51930. }],
  51931. on: ons
  51932. }, [isImage ? dragSort ? h('transition-group', {
  51933. props: {
  51934. name: "vxe-upload--drag-list".concat(isDragMove ? '' : '-disabled'),
  51935. tag: 'div'
  51936. },
  51937. class: 'vxe-upload--image-more-list'
  51938. }, $xeUpload.renderImageItemList(h, fileList, true).concat($xeUpload.renderImageAction(h, true))) : h('div', {
  51939. class: 'vxe-upload--image-more-list'
  51940. }, $xeUpload.renderImageItemList(h, fileList, true).concat($xeUpload.renderImageAction(h, true))) : h('div', {
  51941. class: 'vxe-upload--file-more-list'
  51942. }, [$xeUpload.renderFileAction(h, true), dragSort ? h('transition-group', {
  51943. props: {
  51944. name: "vxe-upload--drag-list".concat(isDragMove ? '' : '-disabled'),
  51945. tag: 'div'
  51946. },
  51947. class: 'vxe-upload--file-list'
  51948. }, $xeUpload.renderFileItemList(h, fileList, true)) : h('div', {
  51949. class: 'vxe-upload--file-list'
  51950. }, $xeUpload.renderFileItemList(h, fileList, true))]), dragSort ? h('div', {
  51951. attrs: {
  51952. id: "refModalDragLineElem".concat(xID)
  51953. },
  51954. class: 'vxe-upload--drag-line'
  51955. }) : renderEmptyElement($xeUpload), isDragUploadStatus ? h('div', {
  51956. class: 'vxe-upload--drag-placeholder'
  51957. }, getI18n('vxe.upload.dragPlaceholder')) : renderEmptyElement($xeUpload)]);
  51958. }
  51959. },
  51960. events: {
  51961. show: function show() {
  51962. reactData.showMorePopup = true;
  51963. },
  51964. hide: function hide() {
  51965. reactData.showMorePopup = false;
  51966. }
  51967. }
  51968. });
  51969. }
  51970. },
  51971. // 拖拽
  51972. handleDragSortDragstartEvent: function handleDragSortDragstartEvent(evnt) {
  51973. var $xeUpload = this;
  51974. var reactData = $xeUpload.reactData;
  51975. evnt.stopPropagation();
  51976. if (evnt.dataTransfer) {
  51977. evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
  51978. }
  51979. var dragEl = evnt.currentTarget;
  51980. var parentEl = dragEl.parentElement;
  51981. var dragIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(Array.from(parentEl.children), function (item) {
  51982. return dragEl === item;
  51983. });
  51984. reactData.isDragMove = true;
  51985. reactData.dragIndex = dragIndex;
  51986. setTimeout(function () {
  51987. reactData.isDragMove = false;
  51988. }, 500);
  51989. },
  51990. handleDragSortDragoverEvent: function handleDragSortDragoverEvent(evnt) {
  51991. var $xeUpload = this;
  51992. var reactData = $xeUpload.reactData;
  51993. var internalData = $xeUpload.internalData;
  51994. evnt.stopPropagation();
  51995. evnt.preventDefault();
  51996. var dragIndex = reactData.dragIndex;
  51997. if (dragIndex === -1) {
  51998. return;
  51999. }
  52000. var isImage = $xeUpload.computeIsImage;
  52001. var dragEl = evnt.currentTarget;
  52002. var parentEl = dragEl.parentElement;
  52003. var currIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(Array.from(parentEl.children), function (item) {
  52004. return dragEl === item;
  52005. });
  52006. var dragPos = '';
  52007. if (isImage) {
  52008. var offsetX = evnt.clientX - dragEl.getBoundingClientRect().x;
  52009. dragPos = offsetX < dragEl.clientWidth / 2 ? 'left' : 'right';
  52010. } else {
  52011. var offsetY = evnt.clientY - dragEl.getBoundingClientRect().y;
  52012. dragPos = offsetY < dragEl.clientHeight / 2 ? 'top' : 'bottom';
  52013. }
  52014. if (dragIndex === currIndex) {
  52015. showDropTip($xeUpload, evnt, dragEl, dragPos);
  52016. return;
  52017. }
  52018. showDropTip($xeUpload, evnt, dragEl, dragPos);
  52019. internalData.prevDragIndex = currIndex;
  52020. internalData.prevDragPos = dragPos;
  52021. },
  52022. handleDragSortDragendEvent: function handleDragSortDragendEvent(evnt) {
  52023. var $xeUpload = this;
  52024. var reactData = $xeUpload.reactData;
  52025. var internalData = $xeUpload.internalData;
  52026. var fileList = reactData.fileList,
  52027. dragIndex = reactData.dragIndex;
  52028. var prevDragIndex = internalData.prevDragIndex,
  52029. prevDragPos = internalData.prevDragPos;
  52030. var oldIndex = dragIndex;
  52031. var targetIndex = prevDragIndex;
  52032. var dragOffsetIndex = prevDragPos === 'bottom' || prevDragPos === 'right' ? 1 : 0;
  52033. var oldItem = fileList[oldIndex];
  52034. var newItem = fileList[targetIndex];
  52035. if (oldItem && newItem) {
  52036. fileList.splice(oldIndex, 1);
  52037. var ptfIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(fileList, function (item) {
  52038. return newItem === item;
  52039. });
  52040. var nIndex = ptfIndex + dragOffsetIndex;
  52041. fileList.splice(nIndex, 0, oldItem);
  52042. $xeUpload.dispatchEvent('sort-dragend', {
  52043. oldItem: oldItem,
  52044. newItem: newItem,
  52045. dragPos: prevDragPos,
  52046. offsetIndex: dragOffsetIndex,
  52047. _index: {
  52048. newIndex: nIndex,
  52049. oldIndex: oldIndex
  52050. }
  52051. }, evnt);
  52052. }
  52053. hideDropTip($xeUpload);
  52054. reactData.dragIndex = -1;
  52055. },
  52056. handleItemMousedownEvent: function handleItemMousedownEvent(evnt) {
  52057. var $xeUpload = this;
  52058. var $xeTable = $xeUpload.$xeTable;
  52059. var reactData = $xeUpload.reactData;
  52060. if ($xeTable) {
  52061. evnt.stopPropagation();
  52062. }
  52063. reactData.isActivated = true;
  52064. },
  52065. handleGlobalPasteEvent: function handleGlobalPasteEvent(evnt) {
  52066. var $xeUpload = this;
  52067. var props = $xeUpload;
  52068. var reactData = $xeUpload.reactData;
  52069. var pasteToUpload = props.pasteToUpload;
  52070. var isActivated = reactData.isActivated;
  52071. if (!isActivated || !pasteToUpload) {
  52072. return;
  52073. }
  52074. var clipboardData = evnt.clipboardData || evnt.originalEvent.clipboardData;
  52075. if (!clipboardData) {
  52076. return;
  52077. }
  52078. var items = clipboardData.items;
  52079. if (!items) {
  52080. return;
  52081. }
  52082. var files = handleTransferFiles(items);
  52083. if (files.length) {
  52084. evnt.preventDefault();
  52085. $xeUpload.uploadTransferFileEvent(evnt, files);
  52086. }
  52087. },
  52088. handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
  52089. var $xeUpload = this;
  52090. var reactData = $xeUpload.reactData;
  52091. var el = $xeUpload.$refs.refElem;
  52092. var popupEl = $xeUpload.$refs.refPopupElem;
  52093. var isActivated = getEventTargetNode(evnt, el).flag;
  52094. if (!isActivated && popupEl) {
  52095. var parentEl = popupEl.parentElement || popupEl;
  52096. var modalEl = parentEl ? parentEl.parentElement : parentEl;
  52097. isActivated = getEventTargetNode(evnt, modalEl).flag;
  52098. }
  52099. reactData.isActivated = isActivated;
  52100. },
  52101. handleGlobalBlurEvent: function handleGlobalBlurEvent() {
  52102. var $xeUpload = this;
  52103. var reactData = $xeUpload.reactData;
  52104. reactData.isActivated = false;
  52105. },
  52106. //
  52107. // Render
  52108. //
  52109. renderFileItemList: function renderFileItemList(h, currList, isMoreView) {
  52110. var $xeUpload = this;
  52111. var props = $xeUpload;
  52112. var slots = $xeUpload.$scopedSlots;
  52113. var reactData = $xeUpload.reactData;
  52114. var showRemoveButton = props.showRemoveButton,
  52115. showDownloadButton = props.showDownloadButton,
  52116. showProgress = props.showProgress,
  52117. progressText = props.progressText,
  52118. showPreview = props.showPreview,
  52119. showErrorStatus = props.showErrorStatus,
  52120. dragSort = props.dragSort,
  52121. autoSubmit = props.autoSubmit,
  52122. showSubmitButton = props.showSubmitButton;
  52123. var fileCacheMaps = reactData.fileCacheMaps;
  52124. var isDisabled = $xeUpload.computeIsDisabled;
  52125. var formReadonly = $xeUpload.computeFormReadonly;
  52126. var nameProp = $xeUpload.computeNameProp;
  52127. var typeProp = $xeUpload.computeTypeProp;
  52128. var cornerSlot = slots.corner;
  52129. var ons = {};
  52130. if (dragSort && currList.length > 1) {
  52131. ons.dragstart = $xeUpload.handleDragSortDragstartEvent;
  52132. ons.dragover = $xeUpload.handleDragSortDragoverEvent;
  52133. ons.dragend = $xeUpload.handleDragSortDragendEvent;
  52134. }
  52135. return currList.map(function (item, index) {
  52136. var fileKey = $xeUpload.getFieldKey(item);
  52137. var cacheItem = fileCacheMaps[fileKey];
  52138. var isLoading = false;
  52139. var isError = false;
  52140. var isPending = false;
  52141. var fileName = "".concat(item[nameProp] || '');
  52142. if (cacheItem) {
  52143. isLoading = cacheItem.loading;
  52144. isError = cacheItem.status === 'error';
  52145. isPending = cacheItem.status === 'pending';
  52146. }
  52147. return h('div', {
  52148. key: dragSort ? fileKey : index,
  52149. class: ['vxe-upload--file-item', {
  52150. 'is--preview': showPreview,
  52151. 'is--loading': isLoading,
  52152. 'is--pending': isPending,
  52153. 'is--error': isError
  52154. }],
  52155. attrs: {
  52156. fileid: fileKey,
  52157. draggable: dragSort ? true : null
  52158. },
  52159. on: ons
  52160. }, [h('div', {
  52161. class: 'vxe-upload--file-item-icon'
  52162. }, [h('i', {
  52163. class: getIcon()["UPLOAD_FILE_TYPE_".concat("".concat(item[typeProp]).toLocaleUpperCase())] || getIcon().UPLOAD_FILE_TYPE_DEFAULT
  52164. })]), h('div', {
  52165. class: 'vxe-upload--file-item-name',
  52166. attrs: {
  52167. title: fileName
  52168. },
  52169. on: {
  52170. click: function click(evnt) {
  52171. if (!isLoading && !isError) {
  52172. $xeUpload.handlePreviewFileEvent(evnt, item);
  52173. }
  52174. }
  52175. }
  52176. }, fileName), isLoading ? h('div', {
  52177. class: 'vxe-upload--file-item-loading-icon'
  52178. }, [h('i', {
  52179. class: getIcon().UPLOAD_LOADING
  52180. })]) : renderEmptyElement($xeUpload), showProgress && isLoading && cacheItem ? h('div', {
  52181. class: 'vxe-upload--file-item-loading-text'
  52182. }, progressText ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFormatString("".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(progressText) ? progressText({}) : progressText), {
  52183. percent: cacheItem.percent
  52184. }) : getI18n('vxe.upload.uploadProgress', [cacheItem.percent])) : renderEmptyElement($xeUpload), !isLoading && (isError && showErrorStatus || isPending && showSubmitButton && !autoSubmit) ? h('div', {
  52185. class: 'vxe-upload--file-item-rebtn'
  52186. }, [h(src_button, {
  52187. props: {
  52188. icon: isError ? getIcon().UPLOAD_IMAGE_RE_UPLOAD : getIcon().UPLOAD_IMAGE_UPLOAD,
  52189. mode: 'text',
  52190. status: 'primary',
  52191. content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
  52192. },
  52193. on: {
  52194. click: function click() {
  52195. $xeUpload.handleReUpload(item);
  52196. }
  52197. }
  52198. })]) : renderEmptyElement($xeUpload), h('div', {
  52199. class: 'vxe-upload--file-item-btn-wrapper'
  52200. }, [cornerSlot ? h('div', {
  52201. class: 'vxe-upload--file-item-corner'
  52202. }, vn_getSlotVNs(cornerSlot({
  52203. option: item,
  52204. isMoreView: isMoreView,
  52205. readonly: formReadonly
  52206. }))) : renderEmptyElement($xeUpload), showDownloadButton && !isLoading ? h('div', {
  52207. class: 'vxe-upload--file-item-download-btn',
  52208. on: {
  52209. click: function click(evnt) {
  52210. $xeUpload.downloadFileEvent(evnt, item);
  52211. }
  52212. }
  52213. }, [h('i', {
  52214. class: getIcon().UPLOAD_FILE_DOWNLOAD
  52215. })]) : renderEmptyElement($xeUpload), showRemoveButton && !formReadonly && !isDisabled && !isLoading ? h('div', {
  52216. class: 'vxe-upload--file-item-remove-btn',
  52217. on: {
  52218. click: function click(evnt) {
  52219. $xeUpload.removeFileEvent(evnt, item, index);
  52220. }
  52221. }
  52222. }, [h('i', {
  52223. class: getIcon().UPLOAD_FILE_REMOVE
  52224. })]) : renderEmptyElement($xeUpload)])]);
  52225. });
  52226. },
  52227. renderFileAction: function renderFileAction(h, isMoreView) {
  52228. var $xeUpload = this;
  52229. var props = $xeUpload;
  52230. var slots = $xeUpload.$scopedSlots;
  52231. var showUploadButton = props.showUploadButton,
  52232. buttonText = props.buttonText,
  52233. buttonIcon = props.buttonIcon,
  52234. showButtonText = props.showButtonText,
  52235. showButtonIcon = props.showButtonIcon,
  52236. autoHiddenButton = props.autoHiddenButton;
  52237. var isDisabled = $xeUpload.computeIsDisabled;
  52238. var formReadonly = $xeUpload.computeFormReadonly;
  52239. var showTipText = $xeUpload.computedShowTipText;
  52240. var defTipText = $xeUpload.computedDefTipText;
  52241. var overCount = $xeUpload.computeOverCount;
  52242. var defaultSlot = slots.default;
  52243. var tipSlot = slots.tip || slots.hint;
  52244. if (formReadonly || !showUploadButton) {
  52245. return renderEmptyElement($xeUpload);
  52246. }
  52247. return h('div', {
  52248. class: 'vxe-upload--file-action'
  52249. }, [autoHiddenButton && overCount ? renderEmptyElement($xeUpload) : h('div', {
  52250. class: 'vxe-upload--file-action-btn',
  52251. on: {
  52252. click: $xeUpload.clickEvent
  52253. }
  52254. }, defaultSlot ? vn_getSlotVNs(defaultSlot({
  52255. $upload: $xeUpload
  52256. })) : [h(src_button, {
  52257. class: 'vxe-upload--file-action-button',
  52258. props: {
  52259. content: isMoreView || showButtonText ? buttonText ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(buttonText) ? buttonText({}) : buttonText) : getI18n('vxe.upload.fileBtnText') : '',
  52260. icon: showButtonIcon ? buttonIcon || getIcon().UPLOAD_FILE_ADD : '',
  52261. disabled: isDisabled
  52262. }
  52263. })]), showTipText && (defTipText || tipSlot) ? h('div', {
  52264. class: 'vxe-upload--file-action-tip'
  52265. }, tipSlot ? vn_getSlotVNs(tipSlot({
  52266. $upload: $xeUpload
  52267. })) : "".concat(defTipText)) : renderEmptyElement($xeUpload)]);
  52268. },
  52269. renderAllMode: function renderAllMode(h) {
  52270. var $xeUpload = this;
  52271. var props = $xeUpload;
  52272. var reactData = $xeUpload.reactData;
  52273. var showList = props.showList,
  52274. moreConfig = props.moreConfig,
  52275. dragSort = props.dragSort;
  52276. var fileList = reactData.fileList,
  52277. isDragMove = reactData.isDragMove;
  52278. var moreOpts = $xeUpload.computeMoreOpts;
  52279. var maxCount = moreOpts.maxCount,
  52280. showMoreButton = moreOpts.showMoreButton,
  52281. layout = moreOpts.layout;
  52282. var isHorizontal = layout === 'horizontal';
  52283. var currList = fileList;
  52284. var overMaxNum = 0;
  52285. if (maxCount && fileList.length > maxCount) {
  52286. overMaxNum = fileList.length - maxCount;
  52287. currList = fileList.slice(0, maxCount);
  52288. }
  52289. return h('div', {
  52290. key: 'all',
  52291. class: 'vxe-upload--file-wrapper'
  52292. }, showList ? [showMoreButton && moreConfig && isHorizontal ? renderEmptyElement($xeUpload) : $xeUpload.renderFileAction(h, true), currList.length || showMoreButton && isHorizontal ? h('div', {
  52293. class: ['vxe-upload--file-list-wrapper', {
  52294. 'is--horizontal': isHorizontal
  52295. }]
  52296. }, [currList.length ? dragSort ? h('transition-group', {
  52297. attrs: {
  52298. name: "vxe-upload--drag-list".concat(isDragMove ? '' : '-disabled'),
  52299. tag: 'div'
  52300. },
  52301. class: 'vxe-upload--file-list'
  52302. }, $xeUpload.renderFileItemList(h, currList, false)) : h('div', {
  52303. class: 'vxe-upload--file-list'
  52304. }, $xeUpload.renderFileItemList(h, currList, false)) : renderEmptyElement($xeUpload), showMoreButton && overMaxNum ? h('div', {
  52305. class: 'vxe-upload--file-over-more'
  52306. }, [h(src_button, {
  52307. props: {
  52308. mode: 'text',
  52309. content: getI18n('vxe.upload.moreBtnText', [fileList.length]),
  52310. status: 'primary'
  52311. },
  52312. on: {
  52313. click: $xeUpload.handleMoreEvent
  52314. }
  52315. })]) : renderEmptyElement($xeUpload), showMoreButton && moreConfig && isHorizontal ? $xeUpload.renderFileAction(h, false) : renderEmptyElement($xeUpload)]) : renderEmptyElement($xeUpload)] : [$xeUpload.renderFileAction(h, false)]);
  52316. },
  52317. renderImageItemList: function renderImageItemList(h, currList, isMoreView) {
  52318. var $xeUpload = this;
  52319. var props = $xeUpload;
  52320. var slots = $xeUpload.$scopedSlots;
  52321. var reactData = $xeUpload.reactData;
  52322. var showRemoveButton = props.showRemoveButton,
  52323. showProgress = props.showProgress,
  52324. progressText = props.progressText,
  52325. showPreview = props.showPreview,
  52326. showErrorStatus = props.showErrorStatus,
  52327. dragSort = props.dragSort,
  52328. autoSubmit = props.autoSubmit,
  52329. showSubmitButton = props.showSubmitButton;
  52330. var fileCacheMaps = reactData.fileCacheMaps;
  52331. var isDisabled = $xeUpload.computeIsDisabled;
  52332. var formReadonly = $xeUpload.computeFormReadonly;
  52333. var imageOpts = $xeUpload.computeImageOpts;
  52334. var imgStyle = $xeUpload.computeImgStyle;
  52335. var cornerSlot = slots.corner;
  52336. var ons = {};
  52337. if (dragSort && currList.length > 1) {
  52338. ons.dragstart = $xeUpload.handleDragSortDragstartEvent;
  52339. ons.dragover = $xeUpload.handleDragSortDragoverEvent;
  52340. ons.dragend = $xeUpload.handleDragSortDragendEvent;
  52341. }
  52342. return currList.map(function (item, index) {
  52343. var fileKey = $xeUpload.getFieldKey(item);
  52344. var cacheItem = fileCacheMaps[fileKey];
  52345. var isLoading = false;
  52346. var isError = false;
  52347. var isPending = false;
  52348. if (cacheItem) {
  52349. isLoading = cacheItem.loading;
  52350. isError = cacheItem.status === 'error';
  52351. isPending = cacheItem.status === 'pending';
  52352. }
  52353. return h('div', {
  52354. key: dragSort ? fileKey : index,
  52355. class: ['vxe-upload--image-item', {
  52356. 'is--preview': showPreview,
  52357. 'is--circle': imageOpts.circle,
  52358. 'is--loading': isLoading,
  52359. 'is--pending': isPending,
  52360. 'is--error': isError
  52361. }],
  52362. attrs: {
  52363. fileid: fileKey,
  52364. draggable: dragSort ? true : null
  52365. },
  52366. on: ons
  52367. }, [h('div', {
  52368. class: 'vxe-upload--image-item-box',
  52369. style: isMoreView ? {} : imgStyle,
  52370. on: {
  52371. click: function click(evnt) {
  52372. if (!isLoading && !isError) {
  52373. $xeUpload.handlePreviewImageEvent(evnt, item, index);
  52374. }
  52375. }
  52376. }
  52377. }, [isLoading && cacheItem ? h('div', {
  52378. class: 'vxe-upload--image-item-loading'
  52379. }, [h('div', {
  52380. class: 'vxe-upload--image-item-loading-icon'
  52381. }, [h('i', {
  52382. class: getIcon().UPLOAD_LOADING
  52383. })]), showProgress ? h('div', {
  52384. class: 'vxe-upload--image-item-loading-text'
  52385. }, progressText ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFormatString("".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(progressText) ? progressText({}) : progressText), {
  52386. percent: cacheItem.percent
  52387. }) : getI18n('vxe.upload.uploadProgress', [cacheItem.percent])) : renderEmptyElement($xeUpload)]) : renderEmptyElement($xeUpload), h('div', {
  52388. class: 'vxe-upload--image-item-img-wrapper',
  52389. attrs: {
  52390. title: getI18n('vxe.upload.viewItemTitle')
  52391. }
  52392. }, [h('img', {
  52393. class: 'vxe-upload--image-item-img',
  52394. attrs: {
  52395. src: $xeUpload.getThumbnailFileUrl(item)
  52396. }
  52397. })]), !isLoading && (isError && showErrorStatus || isPending && showSubmitButton && !autoSubmit) ? h('div', {
  52398. class: 'vxe-upload--image-item-rebtn'
  52399. }, [h(src_button, {
  52400. props: {
  52401. icon: isError ? getIcon().UPLOAD_IMAGE_RE_UPLOAD : getIcon().UPLOAD_IMAGE_UPLOAD,
  52402. mode: 'text',
  52403. status: 'primary',
  52404. content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
  52405. },
  52406. on: {
  52407. click: function click() {
  52408. $xeUpload.handleReUpload(item);
  52409. }
  52410. }
  52411. })]) : renderEmptyElement($xeUpload), h('div', {
  52412. class: 'vxe-upload--image-item-btn-wrapper',
  52413. on: {
  52414. click: function click(evnt) {
  52415. evnt.stopPropagation();
  52416. }
  52417. }
  52418. }, [cornerSlot ? h('div', {
  52419. class: 'vxe-upload--file-item-corner'
  52420. }, vn_getSlotVNs(cornerSlot({
  52421. option: item,
  52422. isMoreView: isMoreView,
  52423. readonly: formReadonly
  52424. }))) : renderEmptyElement($xeUpload), showRemoveButton && !formReadonly && !isDisabled && !isLoading ? h('div', {
  52425. class: 'vxe-upload--image-item-remove-btn',
  52426. on: {
  52427. click: function click(evnt) {
  52428. evnt.stopPropagation();
  52429. $xeUpload.removeFileEvent(evnt, item, index);
  52430. }
  52431. }
  52432. }, [h('i', {
  52433. class: getIcon().UPLOAD_IMAGE_REMOVE
  52434. })]) : renderEmptyElement($xeUpload)])])]);
  52435. });
  52436. },
  52437. renderImageAction: function renderImageAction(h, isMoreView) {
  52438. var $xeUpload = this;
  52439. var props = $xeUpload;
  52440. var slots = $xeUpload.$scopedSlots;
  52441. var showUploadButton = props.showUploadButton,
  52442. buttonText = props.buttonText,
  52443. buttonIcon = props.buttonIcon,
  52444. showButtonText = props.showButtonText,
  52445. showButtonIcon = props.showButtonIcon,
  52446. autoHiddenButton = props.autoHiddenButton;
  52447. var formReadonly = $xeUpload.computeFormReadonly;
  52448. var showTipText = $xeUpload.computedShowTipText;
  52449. var defTipText = $xeUpload.computedDefTipText;
  52450. var overCount = $xeUpload.computeOverCount;
  52451. var imgStyle = $xeUpload.computeImgStyle;
  52452. var defaultSlot = slots.default;
  52453. var tipSlot = slots.tip || slots.hint;
  52454. if (formReadonly || !showUploadButton || autoHiddenButton && overCount) {
  52455. return renderEmptyElement($xeUpload);
  52456. }
  52457. return h('div', {
  52458. key: 'action',
  52459. class: 'vxe-upload--image-action'
  52460. }, [h('div', {
  52461. class: 'vxe-upload--image-action-btn',
  52462. on: {
  52463. click: $xeUpload.clickEvent
  52464. }
  52465. }, defaultSlot ? defaultSlot({
  52466. $upload: $xeUpload
  52467. }) : [h('div', {
  52468. class: 'vxe-upload--image-action-box',
  52469. style: isMoreView ? {} : imgStyle
  52470. }, [showButtonIcon ? h('div', {
  52471. class: 'vxe-upload--image-action-icon'
  52472. }, [h('i', {
  52473. class: buttonIcon || getIcon().UPLOAD_IMAGE_ADD
  52474. })]) : renderEmptyElement($xeUpload), isMoreView || showButtonText ? h('div', {
  52475. class: 'vxe-upload--image-action-content'
  52476. }, buttonText ? "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(buttonText) ? buttonText({}) : buttonText) : getI18n('vxe.upload.imgBtnText')) : renderEmptyElement($xeUpload), showTipText && (defTipText || tipSlot) ? h('div', {
  52477. class: 'vxe-upload--image-action-hint'
  52478. }, tipSlot ? vn_getSlotVNs(tipSlot({
  52479. $upload: $xeUpload
  52480. })) : "".concat(defTipText)) : renderEmptyElement($xeUpload)])])]);
  52481. },
  52482. renderImageMode: function renderImageMode(h) {
  52483. var $xeUpload = this;
  52484. var props = $xeUpload;
  52485. var reactData = $xeUpload.reactData;
  52486. var showList = props.showList,
  52487. dragSort = props.dragSort;
  52488. var fileList = reactData.fileList,
  52489. isDragMove = reactData.isDragMove;
  52490. var moreOpts = $xeUpload.computeMoreOpts;
  52491. var maxCount = moreOpts.maxCount,
  52492. showMoreButton = moreOpts.showMoreButton;
  52493. var currList = fileList;
  52494. var overMaxNum = 0;
  52495. if (maxCount && fileList.length > maxCount) {
  52496. overMaxNum = fileList.length - maxCount;
  52497. currList = fileList.slice(0, maxCount);
  52498. }
  52499. return h('div', {
  52500. key: 'image',
  52501. class: 'vxe-upload--image-wrapper'
  52502. }, showList ? [dragSort ? h('transition-group', {
  52503. attrs: {
  52504. name: "vxe-upload--drag-list".concat(isDragMove ? '' : '-disabled'),
  52505. tag: 'div'
  52506. },
  52507. class: 'vxe-upload--image-list'
  52508. }, $xeUpload.renderImageItemList(h, currList, false).concat([showMoreButton && overMaxNum ? h('div', {
  52509. key: 'om',
  52510. class: 'vxe-upload--image-over-more'
  52511. }, [h(src_button, {
  52512. props: {
  52513. mode: 'text',
  52514. content: getI18n('vxe.upload.moreBtnText', [fileList.length]),
  52515. status: 'primary'
  52516. },
  52517. on: {
  52518. click: $xeUpload.handleMoreEvent
  52519. }
  52520. })]) : renderEmptyElement($xeUpload), $xeUpload.renderImageAction(h, false)])) : h('div', {
  52521. class: 'vxe-upload--image-list'
  52522. }, $xeUpload.renderImageItemList(h, currList, false).concat([showMoreButton && overMaxNum ? h('div', {
  52523. class: 'vxe-upload--image-over-more'
  52524. }, [h(src_button, {
  52525. props: {
  52526. mode: 'text',
  52527. content: getI18n('vxe.upload.moreBtnText', [fileList.length]),
  52528. status: 'primary'
  52529. },
  52530. on: {
  52531. click: $xeUpload.handleMoreEvent
  52532. }
  52533. })]) : renderEmptyElement($xeUpload), $xeUpload.renderImageAction(h, false)]))] : [h('div', {
  52534. class: 'vxe-upload--image-list'
  52535. }, [$xeUpload.renderImageAction(h, false)])]);
  52536. },
  52537. renderVN: function renderVN(h) {
  52538. var $xeUpload = this;
  52539. var props = $xeUpload;
  52540. var reactData = $xeUpload.reactData;
  52541. var showErrorStatus = props.showErrorStatus,
  52542. dragToUpload = props.dragToUpload,
  52543. pasteToUpload = props.pasteToUpload,
  52544. dragSort = props.dragSort;
  52545. var isDragUploadStatus = reactData.isDragUploadStatus,
  52546. showMorePopup = reactData.showMorePopup,
  52547. isActivated = reactData.isActivated,
  52548. dragIndex = reactData.dragIndex;
  52549. var vSize = $xeUpload.computeSize;
  52550. var isDisabled = $xeUpload.computeIsDisabled;
  52551. var formReadonly = $xeUpload.computeFormReadonly;
  52552. var isImage = $xeUpload.computeIsImage;
  52553. var ons = {};
  52554. if (dragToUpload && dragIndex === -1) {
  52555. ons.dragover = $xeUpload.handleUploadDragoverEvent;
  52556. ons.dragleave = $xeUpload.handleUploadDragleaveEvent;
  52557. ons.drop = $xeUpload.handleUploadDropEvent;
  52558. }
  52559. return h('div', {
  52560. ref: 'refElem',
  52561. class: ['vxe-upload', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--active', isActivated), 'is--readonly', formReadonly), 'is--disabled', isDisabled), 'is--paste', pasteToUpload), 'show--error', showErrorStatus), 'is--drag', isDragUploadStatus)],
  52562. on: ons
  52563. }, [isImage ? $xeUpload.renderImageMode(h) : $xeUpload.renderAllMode(h), dragSort ? h('div', {
  52564. ref: 'refDragLineElem',
  52565. class: 'vxe-upload--drag-line'
  52566. }) : renderEmptyElement($xeUpload), isDragUploadStatus && !showMorePopup ? h('div', {
  52567. class: 'vxe-upload--drag-placeholder'
  52568. }, getI18n('vxe.upload.dragPlaceholder')) : renderEmptyElement($xeUpload)]);
  52569. }
  52570. },
  52571. created: function created() {
  52572. var $xeUpload = this;
  52573. $xeUpload.updateFileList();
  52574. },
  52575. mounted: function mounted() {
  52576. var $xeUpload = this;
  52577. var props = $xeUpload;
  52578. if (props.multiple && props.singleMode) {
  52579. errLog('vxe.error.errConflicts', ['[upload] multiple', 'single-mode']);
  52580. }
  52581. if (props.imageStyle) {
  52582. warnLog('vxe.error.delProp', ['[upload] image-style', 'image-config']);
  52583. }
  52584. if (props.dragSort) {
  52585. initTpImg();
  52586. }
  52587. globalEvents.on($xeUpload, 'paste', $xeUpload.handleGlobalPasteEvent);
  52588. globalEvents.on($xeUpload, 'mousedown', $xeUpload.handleGlobalMousedownEvent);
  52589. globalEvents.on($xeUpload, 'blur', $xeUpload.handleGlobalBlurEvent);
  52590. },
  52591. beforeDestroy: function beforeDestroy() {
  52592. var $xeUpload = this;
  52593. var reactData = $xeUpload.reactData;
  52594. reactData.isDragUploadStatus = false;
  52595. globalEvents.off($xeUpload, 'paste');
  52596. globalEvents.off($xeUpload, 'mousedown');
  52597. globalEvents.off($xeUpload, 'blur');
  52598. },
  52599. render: function render(h) {
  52600. return this.renderVN(h);
  52601. }
  52602. })); /* define-vxe-component end */
  52603. ;// CONCATENATED MODULE: ./packages/upload/index.ts
  52604. var VxeUpload = Object.assign({}, upload, {
  52605. install: function install(app) {
  52606. app.component(upload.name, upload);
  52607. }
  52608. });
  52609. dynamicApp.use(VxeUpload);
  52610. index_esm_VxeUI.component(upload);
  52611. index_esm_VxeUI.saveFile = saveLocalFile;
  52612. index_esm_VxeUI.readFile = readLocalFile;
  52613. var Upload = VxeUpload;
  52614. /* harmony default export */ var packages_upload = (VxeUpload);
  52615. ;// CONCATENATED MODULE: ./packages/watermark/src/util.ts
  52616. var canvasEl = null;
  52617. var fontEl = null;
  52618. var fontCacheMaps = {};
  52619. function getMarkCanvas() {
  52620. if (!canvasEl) {
  52621. canvasEl = document.createElement('canvas');
  52622. canvasEl.style.position = 'absolute';
  52623. canvasEl.style.top = '0';
  52624. canvasEl.style.left = '0';
  52625. }
  52626. return canvasEl;
  52627. }
  52628. function removeMarkElement(elem) {
  52629. if (elem) {
  52630. var parentEl = elem.parentNode;
  52631. if (parentEl) {
  52632. parentEl.removeChild(elem);
  52633. }
  52634. }
  52635. }
  52636. function calcFontWH(text, fontSize) {
  52637. var fKey = "".concat(fontSize, "_").concat(text);
  52638. if (!fontCacheMaps[fKey]) {
  52639. if (!fontEl) {
  52640. fontEl = document.createElement('span');
  52641. }
  52642. if (!fontEl.parentNode) {
  52643. document.body.append(fontEl);
  52644. }
  52645. fontEl.textContent = text;
  52646. fontEl.style.fontSize = toCssUnit(fontSize);
  52647. var width = fontEl.offsetWidth;
  52648. var height = fontEl.offsetHeight;
  52649. fontCacheMaps[fKey] = {
  52650. width: width,
  52651. height: height
  52652. };
  52653. }
  52654. return fontCacheMaps[fKey];
  52655. }
  52656. function calcContentWH(contList) {
  52657. var contentWidth = 0;
  52658. var contentHeight = 0;
  52659. contList.forEach(function (item) {
  52660. contentWidth = Math.max(item.width, contentWidth);
  52661. contentHeight = Math.max(item.height, contentHeight);
  52662. });
  52663. return {
  52664. contentWidth: contentWidth,
  52665. contentHeight: contentHeight
  52666. };
  52667. }
  52668. function calcCanvasWH(contentWidth, opts) {
  52669. var gap = opts.gap;
  52670. var _ref = gap ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(gap) ? gap : [gap, gap] : [],
  52671. _ref2 = _slicedToArray(_ref, 2),
  52672. _ref2$ = _ref2[0],
  52673. gapX = _ref2$ === void 0 ? 0 : _ref2$,
  52674. _ref2$2 = _ref2[1],
  52675. gapY = _ref2$2 === void 0 ? 0 : _ref2$2;
  52676. var canvasWidth = contentWidth + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(gapX);
  52677. var canvasHeight = contentWidth + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(gapY);
  52678. return {
  52679. canvasWidth: canvasWidth,
  52680. canvasHeight: canvasHeight
  52681. };
  52682. }
  52683. function getFontConf(item, key, opts) {
  52684. return (item.font ? item.font[key] : '') || (opts.font ? opts.font[key] : '');
  52685. }
  52686. function createMarkFont(contConf, defaultFontSize, opts) {
  52687. var offset = opts.offset;
  52688. var text = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(contConf.textContent);
  52689. var fontSize = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getFontConf(contConf, 'fontSize', opts) || defaultFontSize) || 14;
  52690. var _ref3 = offset ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(offset) ? offset : [offset, offset] : [],
  52691. _ref4 = _slicedToArray(_ref3, 2),
  52692. _ref4$ = _ref4[0],
  52693. offsetX = _ref4$ === void 0 ? 0 : _ref4$,
  52694. _ref4$2 = _ref4[1],
  52695. offsetY = _ref4$2 === void 0 ? 0 : _ref4$2;
  52696. var _calcFontWH = calcFontWH(text, fontSize),
  52697. width = _calcFontWH.width,
  52698. height = _calcFontWH.height;
  52699. return {
  52700. text: text,
  52701. fontSize: fontSize,
  52702. font: contConf.font,
  52703. width: width + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(offsetX),
  52704. height: height + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(offsetY)
  52705. };
  52706. }
  52707. function drayFont(ctx, item, opts) {
  52708. var fontWeight = getFontConf(item, 'fontWeight', opts);
  52709. ctx.fillStyle = "".concat(getFontConf(item, 'color', opts) || 'rgba(0, 0, 0, 0.15)');
  52710. ctx.font = [getFontConf(item, 'fontStyle', opts) || 'normal', fontWeight === 'bold' || fontWeight === 'bolder' ? 'bold' : '', toCssUnit(item.fontSize), getFontConf(item, 'fontFamily', opts) || 'sans-serif'].join(' ');
  52711. }
  52712. function getContentUrl(content, defaultFontSize, options) {
  52713. var opts = Object.assign({}, options);
  52714. var rotate = opts.rotate;
  52715. var deg = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(rotate);
  52716. var contList = (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(content) ? content : [content]).map(function (item) {
  52717. if (item) {
  52718. if (item.textContent) {
  52719. return createMarkFont(item, defaultFontSize, opts);
  52720. }
  52721. return createMarkFont({
  52722. textContent: "".concat(item)
  52723. }, defaultFontSize, opts);
  52724. }
  52725. return createMarkFont({
  52726. textContent: ''
  52727. }, defaultFontSize, opts);
  52728. });
  52729. removeMarkElement(fontEl);
  52730. return new Promise(function (resolve) {
  52731. var canvasEl = getMarkCanvas();
  52732. if (!canvasEl.parentNode) {
  52733. document.body.append(canvasEl);
  52734. }
  52735. var ctx = canvasEl.getContext('2d');
  52736. if (ctx && contList.length) {
  52737. var _calcContentWH = calcContentWH(contList),
  52738. contentWidth = _calcContentWH.contentWidth,
  52739. contentHeight = _calcContentWH.contentHeight;
  52740. var _calcCanvasWH = calcCanvasWH(contentWidth, opts),
  52741. canvasWidth = _calcCanvasWH.canvasWidth,
  52742. canvasHeight = _calcCanvasWH.canvasHeight;
  52743. canvasEl.width = canvasWidth;
  52744. canvasEl.height = canvasHeight;
  52745. var x = (canvasWidth - contentWidth) / 2;
  52746. var y = (canvasHeight - contentHeight) / 2;
  52747. var drayX = x + contentWidth / 2;
  52748. var drayY = y + contentHeight / 2;
  52749. ctx.save();
  52750. ctx.translate(drayX, drayY);
  52751. ctx.rotate(deg * Math.PI / 180);
  52752. ctx.translate(-drayX, -drayY);
  52753. var offsetHeight = 0;
  52754. contList.forEach(function (item) {
  52755. var align = getFontConf(item, 'align', opts);
  52756. drayFont(ctx, item, opts);
  52757. ctx.fillText(item.text, x + (align === 'center' ? (contentWidth - item.width) / 2 : 0), y + (contentHeight + contentHeight) / 2 + offsetHeight, contentWidth);
  52758. offsetHeight += item.height;
  52759. });
  52760. ctx.restore();
  52761. resolve(canvasEl.toDataURL());
  52762. removeMarkElement(canvasEl);
  52763. } else {
  52764. resolve('');
  52765. removeMarkElement(canvasEl);
  52766. }
  52767. });
  52768. }
  52769. ;// CONCATENATED MODULE: ./packages/watermark/src/watermark.ts
  52770. /* harmony default export */ var watermark = (/* define-vxe-component start */defineVxeComponent({
  52771. name: 'VxeWatermark',
  52772. props: {
  52773. width: String,
  52774. height: String,
  52775. imageUrl: String,
  52776. rotate: {
  52777. type: [Number, String],
  52778. default: function _default() {
  52779. return getConfig().watermark.rotate;
  52780. }
  52781. },
  52782. gap: {
  52783. type: [Array, Number, String],
  52784. default: function _default() {
  52785. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().watermark.gap, true);
  52786. }
  52787. },
  52788. content: [String, Array],
  52789. font: Object,
  52790. offset: Object,
  52791. zIndex: [String, Number]
  52792. },
  52793. data: function data() {
  52794. var xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
  52795. var reactData = {
  52796. markUrl: ''
  52797. };
  52798. return {
  52799. xID: xID,
  52800. reactData: reactData
  52801. };
  52802. },
  52803. computed: {
  52804. computeFontOpts: function computeFontOpts() {
  52805. var $xeWatermark = this;
  52806. var props = $xeWatermark;
  52807. return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(getConfig().watermark.font, true), props.font);
  52808. },
  52809. computeWrapperStyle: function computeWrapperStyle() {
  52810. var $xeWatermark = this;
  52811. var props = $xeWatermark;
  52812. var reactData = $xeWatermark.reactData;
  52813. var width = props.width,
  52814. height = props.height,
  52815. zIndex = props.zIndex;
  52816. var markUrl = reactData.markUrl;
  52817. var stys = {};
  52818. if (width) {
  52819. stys.width = toCssUnit(width);
  52820. }
  52821. if (height) {
  52822. stys.height = toCssUnit(height);
  52823. }
  52824. if (markUrl) {
  52825. stys.backgroundImage = "url(".concat(markUrl, ")");
  52826. }
  52827. if (zIndex) {
  52828. stys.zIndex = zIndex;
  52829. }
  52830. return stys;
  52831. }
  52832. },
  52833. methods: {
  52834. //
  52835. // Method
  52836. //
  52837. dispatchEvent: function dispatchEvent(type, params, evnt) {
  52838. var $xeWatermark = this;
  52839. $xeWatermark.$emit(type, createEvent(evnt, {
  52840. $watermark: $xeWatermark
  52841. }, params));
  52842. },
  52843. updateMarkStyle: function updateMarkStyle() {
  52844. var $xeWatermark = this;
  52845. var props = $xeWatermark;
  52846. var reactData = $xeWatermark.reactData;
  52847. var content = props.content,
  52848. gap = props.gap,
  52849. rotate = props.rotate,
  52850. offset = props.offset;
  52851. var el = $xeWatermark.$refs.refElem;
  52852. var fontOpts = $xeWatermark.computeFontOpts;
  52853. if (el) {
  52854. if (content) {
  52855. getContentUrl(content, getComputedStyle(el).fontSize, {
  52856. font: fontOpts,
  52857. rotate: rotate,
  52858. gap: gap,
  52859. offset: offset
  52860. }).then(function (url) {
  52861. reactData.markUrl = url;
  52862. });
  52863. }
  52864. }
  52865. },
  52866. //
  52867. // Render
  52868. //
  52869. renderVN: function renderVN(h) {
  52870. var $xeWatermark = this;
  52871. var wrapperStyle = $xeWatermark.computeWrapperStyle;
  52872. return h('div', {
  52873. ref: 'refElem',
  52874. class: 'vxe-watermark',
  52875. style: wrapperStyle
  52876. });
  52877. }
  52878. },
  52879. watch: {
  52880. imageUrl: function imageUrl() {
  52881. var $xeWatermark = this;
  52882. $xeWatermark.updateMarkStyle();
  52883. },
  52884. content: function content() {
  52885. var $xeWatermark = this;
  52886. $xeWatermark.updateMarkStyle();
  52887. },
  52888. gap: function gap() {
  52889. var $xeWatermark = this;
  52890. $xeWatermark.updateMarkStyle();
  52891. },
  52892. rotate: function rotate() {
  52893. var $xeWatermark = this;
  52894. $xeWatermark.updateMarkStyle();
  52895. },
  52896. width: function width() {
  52897. var $xeWatermark = this;
  52898. $xeWatermark.updateMarkStyle();
  52899. },
  52900. height: function height() {
  52901. var $xeWatermark = this;
  52902. $xeWatermark.updateMarkStyle();
  52903. },
  52904. font: function font() {
  52905. var $xeWatermark = this;
  52906. $xeWatermark.updateMarkStyle();
  52907. }
  52908. },
  52909. mounted: function mounted() {
  52910. var $xeWatermark = this;
  52911. $xeWatermark.updateMarkStyle();
  52912. globalEvents.on($xeWatermark, 'resize', external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().throttle(function () {
  52913. $xeWatermark.updateMarkStyle();
  52914. }, 300, {
  52915. trailing: true,
  52916. leading: true
  52917. }));
  52918. },
  52919. beforeDestroy: function beforeDestroy() {
  52920. var $xeWatermark = this;
  52921. globalEvents.off($xeWatermark, 'resize');
  52922. },
  52923. render: function render(h) {
  52924. return this.renderVN(h);
  52925. }
  52926. })); /* define-vxe-component end */
  52927. ;// CONCATENATED MODULE: ./packages/watermark/index.ts
  52928. var VxeWatermark = Object.assign({}, watermark, {
  52929. install: function install(app) {
  52930. app.component(watermark.name, watermark);
  52931. }
  52932. });
  52933. dynamicApp.use(VxeWatermark);
  52934. index_esm_VxeUI.component(watermark);
  52935. var WatermarkController = {
  52936. load: function load(options) {
  52937. checkDynamic();
  52938. dynamicStore.globalWatermark = Object.assign({}, options);
  52939. return Promise.resolve();
  52940. },
  52941. clear: function clear() {
  52942. dynamicStore.globalWatermark = null;
  52943. return Promise.resolve();
  52944. }
  52945. };
  52946. index_esm_VxeUI.watermark = WatermarkController;
  52947. var Watermark = VxeWatermark;
  52948. /* harmony default export */ var packages_watermark = (VxeWatermark);
  52949. ;// CONCATENATED MODULE: ./packages/components.ts
  52950. var components_setI18n = index_esm_VxeUI.setI18n,
  52951. components_setLanguage = index_esm_VxeUI.setLanguage,
  52952. components_setTheme = index_esm_VxeUI.setTheme,
  52953. components_setConfig = index_esm_VxeUI.setConfig;
  52954. var components_components = [packages_alert, packages_anchor, packages_anchor_link, packages_avatar, packages_badge, packages_breadcrumb, packages_breadcrumb_item, packages_button, packages_button_group, packages_calendar, packages_card, packages_carousel, packages_carousel_item, packages_checkbox, checkbox_button, checkbox_group, packages_col, packages_collapse, packages_collapse_pane, packages_color_picker, packages_countdown, packages_date_panel, packages_date_picker, packages_date_range_picker, packages_drawer, packages_empty, packages_form, form_gather, packages_form_group, packages_form_item, packages_icon, packages_icon_picker, packages_image, image_group, image_preview, packages_input, packages_layout_aside, packages_layout_body, packages_layout_container, packages_layout_footer, packages_layout_header, packages_link, packages_list, packages_loading, packages_menu, packages_modal, packages_notice_bar, packages_number_input, packages_optgroup, packages_option, packages_pager, packages_password_input, print_page_break, packages_print, packages_pulldown, packages_radio, radio_button, radio_group, packages_rate, packages_result, packages_row, packages_select, packages_split, packages_split_pane, packages_slider, packages_steps, packages_switch, packages_tab_pane, packages_table_select, packages_tabs, packages_tag, packages_text_ellipsis, packages_text, packages_textarea, packages_tip, packages_tooltip, packages_tree, packages_tree_select, packages_upload, packages_watermark];
  52955. function install(app, options) {
  52956. components_setConfig(options);
  52957. components_components.forEach(function (component) {
  52958. return app.use(component);
  52959. });
  52960. }
  52961. // 默认中文
  52962. var defaultLanguage = 'zh-CN';
  52963. components_setI18n(defaultLanguage, zh_CN);
  52964. components_setLanguage(defaultLanguage);
  52965. components_setTheme('light');
  52966. // 兼容老版本
  52967. var loading = LoadingController;
  52968. var components_modal = ModalController;
  52969. var components_drawer = DrawerController;
  52970. var components_watermark = WatermarkController;
  52971. var components_print = printHtml;
  52972. var saveFile = saveLocalFile;
  52973. var readFile = readLocalFile;
  52974. // Components
  52975. ;// CONCATENATED MODULE: ./index.ts
  52976. if (typeof window !== 'undefined') {
  52977. if (window.VxeUI && !window.VxeUIAll) {
  52978. window.VxeUIAll = components_namespaceObject;
  52979. }
  52980. if (window.Vue) {
  52981. window.Vue.use(components_namespaceObject);
  52982. }
  52983. }
  52984. /* harmony default export */ var index = (components_namespaceObject);
  52985. ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
  52986. /* harmony default export */ var entry_lib = (index);
  52987. }();
  52988. /******/ return __webpack_exports__;
  52989. /******/ })()
  52990. ;
  52991. });