vendor.js 492 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739
  1. "use strict";
  2. const _export_sfc = (sfc, props2) => {
  3. const target = sfc.__vccOpts || sfc;
  4. for (const [key, val] of props2) {
  5. target[key] = val;
  6. }
  7. return target;
  8. };
  9. function makeMap(str, expectsLowerCase) {
  10. const map2 = /* @__PURE__ */ Object.create(null);
  11. const list = str.split(",");
  12. for (let i = 0; i < list.length; i++) {
  13. map2[list[i]] = true;
  14. }
  15. return expectsLowerCase ? (val) => !!map2[val.toLowerCase()] : (val) => !!map2[val];
  16. }
  17. function normalizeStyle(value2) {
  18. if (isArray$2(value2)) {
  19. const res = {};
  20. for (let i = 0; i < value2.length; i++) {
  21. const item = value2[i];
  22. const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle(item);
  23. if (normalized) {
  24. for (const key in normalized) {
  25. res[key] = normalized[key];
  26. }
  27. }
  28. }
  29. return res;
  30. } else if (isString$1(value2)) {
  31. return value2;
  32. } else if (isObject$2(value2)) {
  33. return value2;
  34. }
  35. }
  36. const listDelimiterRE = /;(?![^(]*\))/g;
  37. const propertyDelimiterRE = /:([^]+)/;
  38. const styleCommentRE = /\/\*.*?\*\//gs;
  39. function parseStringStyle(cssText) {
  40. const ret = {};
  41. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  42. if (item) {
  43. const tmp = item.split(propertyDelimiterRE);
  44. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  45. }
  46. });
  47. return ret;
  48. }
  49. function normalizeClass(value2) {
  50. let res = "";
  51. if (isString$1(value2)) {
  52. res = value2;
  53. } else if (isArray$2(value2)) {
  54. for (let i = 0; i < value2.length; i++) {
  55. const normalized = normalizeClass(value2[i]);
  56. if (normalized) {
  57. res += normalized + " ";
  58. }
  59. }
  60. } else if (isObject$2(value2)) {
  61. for (const name in value2) {
  62. if (value2[name]) {
  63. res += name + " ";
  64. }
  65. }
  66. }
  67. return res.trim();
  68. }
  69. const toDisplayString = (val) => {
  70. return isString$1(val) ? val : val == null ? "" : isArray$2(val) || isObject$2(val) && (val.toString === objectToString || !isFunction$1(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
  71. };
  72. const replacer = (_key, val) => {
  73. if (val && val.__v_isRef) {
  74. return replacer(_key, val.value);
  75. } else if (isMap(val)) {
  76. return {
  77. [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
  78. entries[`${key} =>`] = val2;
  79. return entries;
  80. }, {})
  81. };
  82. } else if (isSet(val)) {
  83. return {
  84. [`Set(${val.size})`]: [...val.values()]
  85. };
  86. } else if (isObject$2(val) && !isArray$2(val) && !isPlainObject$1(val)) {
  87. return String(val);
  88. }
  89. return val;
  90. };
  91. const EMPTY_OBJ = Object.freeze({});
  92. const EMPTY_ARR = Object.freeze([]);
  93. const NOOP = () => {
  94. };
  95. const NO = () => false;
  96. const onRE = /^on[^a-z]/;
  97. const isOn = (key) => onRE.test(key);
  98. const isModelListener = (key) => key.startsWith("onUpdate:");
  99. const extend$1 = Object.assign;
  100. const remove = (arr, el) => {
  101. const i = arr.indexOf(el);
  102. if (i > -1) {
  103. arr.splice(i, 1);
  104. }
  105. };
  106. const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  107. const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
  108. const isArray$2 = Array.isArray;
  109. const isMap = (val) => toTypeString(val) === "[object Map]";
  110. const isSet = (val) => toTypeString(val) === "[object Set]";
  111. const isFunction$1 = (val) => typeof val === "function";
  112. const isString$1 = (val) => typeof val === "string";
  113. const isSymbol = (val) => typeof val === "symbol";
  114. const isObject$2 = (val) => val !== null && typeof val === "object";
  115. const isPromise = (val) => {
  116. return isObject$2(val) && isFunction$1(val.then) && isFunction$1(val.catch);
  117. };
  118. const objectToString = Object.prototype.toString;
  119. const toTypeString = (value2) => objectToString.call(value2);
  120. const toRawType = (value2) => {
  121. return toTypeString(value2).slice(8, -1);
  122. };
  123. const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]";
  124. const isIntegerKey = (key) => isString$1(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  125. const isReservedProp = /* @__PURE__ */ makeMap(
  126. // the leading comma is intentional so empty string "" is also included
  127. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  128. );
  129. const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
  130. const cacheStringFunction = (fn) => {
  131. const cache = /* @__PURE__ */ Object.create(null);
  132. return (str) => {
  133. const hit = cache[str];
  134. return hit || (cache[str] = fn(str));
  135. };
  136. };
  137. const camelizeRE = /-(\w)/g;
  138. const camelize = cacheStringFunction((str) => {
  139. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  140. });
  141. const hyphenateRE = /\B([A-Z])/g;
  142. const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
  143. const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
  144. const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
  145. const hasChanged = (value2, oldValue) => !Object.is(value2, oldValue);
  146. const invokeArrayFns$1 = (fns, arg) => {
  147. for (let i = 0; i < fns.length; i++) {
  148. fns[i](arg);
  149. }
  150. };
  151. const def = (obj, key, value2) => {
  152. Object.defineProperty(obj, key, {
  153. configurable: true,
  154. enumerable: false,
  155. value: value2
  156. });
  157. };
  158. const looseToNumber = (val) => {
  159. const n2 = parseFloat(val);
  160. return isNaN(n2) ? val : n2;
  161. };
  162. const LINEFEED = "\n";
  163. const SLOT_DEFAULT_NAME = "d";
  164. const ON_SHOW = "onShow";
  165. const ON_HIDE = "onHide";
  166. const ON_LAUNCH = "onLaunch";
  167. const ON_ERROR = "onError";
  168. const ON_THEME_CHANGE = "onThemeChange";
  169. const ON_PAGE_NOT_FOUND = "onPageNotFound";
  170. const ON_UNHANDLE_REJECTION = "onUnhandledRejection";
  171. const ON_LOAD = "onLoad";
  172. const ON_READY = "onReady";
  173. const ON_UNLOAD = "onUnload";
  174. const ON_INIT = "onInit";
  175. const ON_SAVE_EXIT_STATE = "onSaveExitState";
  176. const ON_RESIZE = "onResize";
  177. const ON_BACK_PRESS = "onBackPress";
  178. const ON_PAGE_SCROLL = "onPageScroll";
  179. const ON_TAB_ITEM_TAP = "onTabItemTap";
  180. const ON_REACH_BOTTOM = "onReachBottom";
  181. const ON_PULL_DOWN_REFRESH = "onPullDownRefresh";
  182. const ON_SHARE_TIMELINE = "onShareTimeline";
  183. const ON_ADD_TO_FAVORITES = "onAddToFavorites";
  184. const ON_SHARE_APP_MESSAGE = "onShareAppMessage";
  185. const ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap";
  186. const ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = "onNavigationBarSearchInputClicked";
  187. const ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = "onNavigationBarSearchInputChanged";
  188. const ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = "onNavigationBarSearchInputConfirmed";
  189. const ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = "onNavigationBarSearchInputFocusChanged";
  190. const customizeRE = /:/g;
  191. function customizeEvent(str) {
  192. return camelize(str.replace(customizeRE, "-"));
  193. }
  194. function hasLeadingSlash(str) {
  195. return str.indexOf("/") === 0;
  196. }
  197. function addLeadingSlash(str) {
  198. return hasLeadingSlash(str) ? str : "/" + str;
  199. }
  200. const invokeArrayFns = (fns, arg) => {
  201. let ret;
  202. for (let i = 0; i < fns.length; i++) {
  203. ret = fns[i](arg);
  204. }
  205. return ret;
  206. };
  207. function once(fn, ctx = null) {
  208. let res;
  209. return (...args) => {
  210. if (fn) {
  211. res = fn.apply(ctx, args);
  212. fn = null;
  213. }
  214. return res;
  215. };
  216. }
  217. function getValueByDataPath(obj, path) {
  218. if (!isString$1(path)) {
  219. return;
  220. }
  221. path = path.replace(/\[(\d+)\]/g, ".$1");
  222. const parts = path.split(".");
  223. let key = parts[0];
  224. if (!obj) {
  225. obj = {};
  226. }
  227. if (parts.length === 1) {
  228. return obj[key];
  229. }
  230. return getValueByDataPath(obj[key], parts.slice(1).join("."));
  231. }
  232. function sortObject(obj) {
  233. let sortObj = {};
  234. if (isPlainObject$1(obj)) {
  235. Object.keys(obj).sort().forEach((key) => {
  236. const _key = key;
  237. sortObj[_key] = obj[_key];
  238. });
  239. }
  240. return !Object.keys(sortObj) ? obj : sortObj;
  241. }
  242. const encode$1 = encodeURIComponent;
  243. function stringifyQuery(obj, encodeStr = encode$1) {
  244. const res = obj ? Object.keys(obj).map((key) => {
  245. let val = obj[key];
  246. if (typeof val === void 0 || val === null) {
  247. val = "";
  248. } else if (isPlainObject$1(val)) {
  249. val = JSON.stringify(val);
  250. }
  251. return encodeStr(key) + "=" + encodeStr(val);
  252. }).filter((x) => x.length > 0).join("&") : null;
  253. return res ? `?${res}` : "";
  254. }
  255. const PAGE_HOOKS = [
  256. ON_INIT,
  257. ON_LOAD,
  258. ON_SHOW,
  259. ON_HIDE,
  260. ON_UNLOAD,
  261. ON_BACK_PRESS,
  262. ON_PAGE_SCROLL,
  263. ON_TAB_ITEM_TAP,
  264. ON_REACH_BOTTOM,
  265. ON_PULL_DOWN_REFRESH,
  266. ON_SHARE_TIMELINE,
  267. ON_SHARE_APP_MESSAGE,
  268. ON_ADD_TO_FAVORITES,
  269. ON_SAVE_EXIT_STATE,
  270. ON_NAVIGATION_BAR_BUTTON_TAP,
  271. ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,
  272. ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,
  273. ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,
  274. ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
  275. ];
  276. function isRootHook(name) {
  277. return PAGE_HOOKS.indexOf(name) > -1;
  278. }
  279. const UniLifecycleHooks = [
  280. ON_SHOW,
  281. ON_HIDE,
  282. ON_LAUNCH,
  283. ON_ERROR,
  284. ON_THEME_CHANGE,
  285. ON_PAGE_NOT_FOUND,
  286. ON_UNHANDLE_REJECTION,
  287. ON_INIT,
  288. ON_LOAD,
  289. ON_READY,
  290. ON_UNLOAD,
  291. ON_RESIZE,
  292. ON_BACK_PRESS,
  293. ON_PAGE_SCROLL,
  294. ON_TAB_ITEM_TAP,
  295. ON_REACH_BOTTOM,
  296. ON_PULL_DOWN_REFRESH,
  297. ON_SHARE_TIMELINE,
  298. ON_ADD_TO_FAVORITES,
  299. ON_SHARE_APP_MESSAGE,
  300. ON_SAVE_EXIT_STATE,
  301. ON_NAVIGATION_BAR_BUTTON_TAP,
  302. ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED,
  303. ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED,
  304. ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED,
  305. ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
  306. ];
  307. const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /* @__PURE__ */ (() => {
  308. return {
  309. onPageScroll: 1,
  310. onShareAppMessage: 1 << 1,
  311. onShareTimeline: 1 << 2
  312. };
  313. })();
  314. function isUniLifecycleHook(name, value2, checkType = true) {
  315. if (checkType && !isFunction$1(value2)) {
  316. return false;
  317. }
  318. if (UniLifecycleHooks.indexOf(name) > -1) {
  319. return true;
  320. } else if (name.indexOf("on") === 0) {
  321. return true;
  322. }
  323. return false;
  324. }
  325. let vueApp;
  326. const createVueAppHooks = [];
  327. function onCreateVueApp(hook) {
  328. if (vueApp) {
  329. return hook(vueApp);
  330. }
  331. createVueAppHooks.push(hook);
  332. }
  333. function invokeCreateVueAppHook(app) {
  334. vueApp = app;
  335. createVueAppHooks.forEach((hook) => hook(app));
  336. }
  337. const invokeCreateErrorHandler = once((app, createErrorHandler2) => {
  338. if (isFunction$1(app._component.onError)) {
  339. return createErrorHandler2(app);
  340. }
  341. });
  342. const E = function() {
  343. };
  344. E.prototype = {
  345. on: function(name, callback, ctx) {
  346. var e2 = this.e || (this.e = {});
  347. (e2[name] || (e2[name] = [])).push({
  348. fn: callback,
  349. ctx
  350. });
  351. return this;
  352. },
  353. once: function(name, callback, ctx) {
  354. var self = this;
  355. function listener() {
  356. self.off(name, listener);
  357. callback.apply(ctx, arguments);
  358. }
  359. listener._ = callback;
  360. return this.on(name, listener, ctx);
  361. },
  362. emit: function(name) {
  363. var data = [].slice.call(arguments, 1);
  364. var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
  365. var i = 0;
  366. var len = evtArr.length;
  367. for (i; i < len; i++) {
  368. evtArr[i].fn.apply(evtArr[i].ctx, data);
  369. }
  370. return this;
  371. },
  372. off: function(name, callback) {
  373. var e2 = this.e || (this.e = {});
  374. var evts = e2[name];
  375. var liveEvents = [];
  376. if (evts && callback) {
  377. for (var i = 0, len = evts.length; i < len; i++) {
  378. if (evts[i].fn !== callback && evts[i].fn._ !== callback)
  379. liveEvents.push(evts[i]);
  380. }
  381. }
  382. liveEvents.length ? e2[name] = liveEvents : delete e2[name];
  383. return this;
  384. }
  385. };
  386. var E$1 = E;
  387. const LOCALE_ZH_HANS = "zh-Hans";
  388. const LOCALE_ZH_HANT = "zh-Hant";
  389. const LOCALE_EN = "en";
  390. const LOCALE_FR = "fr";
  391. const LOCALE_ES = "es";
  392. function include(str, parts) {
  393. return !!parts.find((part) => str.indexOf(part) !== -1);
  394. }
  395. function startsWith(str, parts) {
  396. return parts.find((part) => str.indexOf(part) === 0);
  397. }
  398. function normalizeLocale$1(locale2, messages3) {
  399. if (!locale2) {
  400. return;
  401. }
  402. locale2 = locale2.trim().replace(/_/g, "-");
  403. if (messages3 && messages3[locale2]) {
  404. return locale2;
  405. }
  406. locale2 = locale2.toLowerCase();
  407. if (locale2 === "chinese") {
  408. return LOCALE_ZH_HANS;
  409. }
  410. if (locale2.indexOf("zh") === 0) {
  411. if (locale2.indexOf("-hans") > -1) {
  412. return LOCALE_ZH_HANS;
  413. }
  414. if (locale2.indexOf("-hant") > -1) {
  415. return LOCALE_ZH_HANT;
  416. }
  417. if (include(locale2, ["-tw", "-hk", "-mo", "-cht"])) {
  418. return LOCALE_ZH_HANT;
  419. }
  420. return LOCALE_ZH_HANS;
  421. }
  422. let locales2 = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  423. if (messages3 && Object.keys(messages3).length > 0) {
  424. locales2 = Object.keys(messages3);
  425. }
  426. const lang2 = startsWith(locale2, locales2);
  427. if (lang2) {
  428. return lang2;
  429. }
  430. }
  431. function getBaseSystemInfo() {
  432. return wx.getSystemInfoSync();
  433. }
  434. function validateProtocolFail(name, msg) {
  435. console.warn(`${name}: ${msg}`);
  436. }
  437. function validateProtocol(name, data, protocol, onFail) {
  438. if (!onFail) {
  439. onFail = validateProtocolFail;
  440. }
  441. for (const key in protocol) {
  442. const errMsg = validateProp$1(key, data[key], protocol[key], !hasOwn(data, key));
  443. if (isString$1(errMsg)) {
  444. onFail(name, errMsg);
  445. }
  446. }
  447. }
  448. function validateProtocols(name, args, protocol, onFail) {
  449. if (!protocol) {
  450. return;
  451. }
  452. if (!isArray$2(protocol)) {
  453. return validateProtocol(name, args[0] || /* @__PURE__ */ Object.create(null), protocol, onFail);
  454. }
  455. const len = protocol.length;
  456. const argsLen = args.length;
  457. for (let i = 0; i < len; i++) {
  458. const opts = protocol[i];
  459. const data = /* @__PURE__ */ Object.create(null);
  460. if (argsLen > i) {
  461. data[opts.name] = args[i];
  462. }
  463. validateProtocol(name, data, { [opts.name]: opts }, onFail);
  464. }
  465. }
  466. function validateProp$1(name, value2, prop, isAbsent) {
  467. if (!isPlainObject$1(prop)) {
  468. prop = { type: prop };
  469. }
  470. const { type: type2, required: required2, validator } = prop;
  471. if (required2 && isAbsent) {
  472. return 'Missing required args: "' + name + '"';
  473. }
  474. if (value2 == null && !required2) {
  475. return;
  476. }
  477. if (type2 != null) {
  478. let isValid2 = false;
  479. const types2 = isArray$2(type2) ? type2 : [type2];
  480. const expectedTypes = [];
  481. for (let i = 0; i < types2.length && !isValid2; i++) {
  482. const { valid, expectedType } = assertType$1(value2, types2[i]);
  483. expectedTypes.push(expectedType || "");
  484. isValid2 = valid;
  485. }
  486. if (!isValid2) {
  487. return getInvalidTypeMessage$1(name, value2, expectedTypes);
  488. }
  489. }
  490. if (validator) {
  491. return validator(value2);
  492. }
  493. }
  494. const isSimpleType$1 = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol");
  495. function assertType$1(value2, type2) {
  496. let valid;
  497. const expectedType = getType$1(type2);
  498. if (isSimpleType$1(expectedType)) {
  499. const t2 = typeof value2;
  500. valid = t2 === expectedType.toLowerCase();
  501. if (!valid && t2 === "object") {
  502. valid = value2 instanceof type2;
  503. }
  504. } else if (expectedType === "Object") {
  505. valid = isObject$2(value2);
  506. } else if (expectedType === "Array") {
  507. valid = isArray$2(value2);
  508. } else {
  509. {
  510. valid = value2 instanceof type2;
  511. }
  512. }
  513. return {
  514. valid,
  515. expectedType
  516. };
  517. }
  518. function getInvalidTypeMessage$1(name, value2, expectedTypes) {
  519. let message = `Invalid args: type check failed for args "${name}". Expected ${expectedTypes.map(capitalize).join(", ")}`;
  520. const expectedType = expectedTypes[0];
  521. const receivedType = toRawType(value2);
  522. const expectedValue = styleValue$1(value2, expectedType);
  523. const receivedValue = styleValue$1(value2, receivedType);
  524. if (expectedTypes.length === 1 && isExplicable$1(expectedType) && !isBoolean$1(expectedType, receivedType)) {
  525. message += ` with value ${expectedValue}`;
  526. }
  527. message += `, got ${receivedType} `;
  528. if (isExplicable$1(receivedType)) {
  529. message += `with value ${receivedValue}.`;
  530. }
  531. return message;
  532. }
  533. function getType$1(ctor) {
  534. const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
  535. return match ? match[1] : "";
  536. }
  537. function styleValue$1(value2, type2) {
  538. if (type2 === "String") {
  539. return `"${value2}"`;
  540. } else if (type2 === "Number") {
  541. return `${Number(value2)}`;
  542. } else {
  543. return `${value2}`;
  544. }
  545. }
  546. function isExplicable$1(type2) {
  547. const explicitTypes = ["string", "number", "boolean"];
  548. return explicitTypes.some((elem) => type2.toLowerCase() === elem);
  549. }
  550. function isBoolean$1(...args) {
  551. return args.some((elem) => elem.toLowerCase() === "boolean");
  552. }
  553. function tryCatch(fn) {
  554. return function() {
  555. try {
  556. return fn.apply(fn, arguments);
  557. } catch (e2) {
  558. console.error(e2);
  559. }
  560. };
  561. }
  562. let invokeCallbackId = 1;
  563. const invokeCallbacks = {};
  564. function addInvokeCallback(id, name, callback, keepAlive = false) {
  565. invokeCallbacks[id] = {
  566. name,
  567. keepAlive,
  568. callback
  569. };
  570. return id;
  571. }
  572. function invokeCallback(id, res, extras) {
  573. if (typeof id === "number") {
  574. const opts = invokeCallbacks[id];
  575. if (opts) {
  576. if (!opts.keepAlive) {
  577. delete invokeCallbacks[id];
  578. }
  579. return opts.callback(res, extras);
  580. }
  581. }
  582. return res;
  583. }
  584. const API_SUCCESS = "success";
  585. const API_FAIL = "fail";
  586. const API_COMPLETE = "complete";
  587. function getApiCallbacks(args) {
  588. const apiCallbacks = {};
  589. for (const name in args) {
  590. const fn = args[name];
  591. if (isFunction$1(fn)) {
  592. apiCallbacks[name] = tryCatch(fn);
  593. delete args[name];
  594. }
  595. }
  596. return apiCallbacks;
  597. }
  598. function normalizeErrMsg$1(errMsg, name) {
  599. if (!errMsg || errMsg.indexOf(":fail") === -1) {
  600. return name + ":ok";
  601. }
  602. return name + errMsg.substring(errMsg.indexOf(":fail"));
  603. }
  604. function createAsyncApiCallback(name, args = {}, { beforeAll, beforeSuccess } = {}) {
  605. if (!isPlainObject$1(args)) {
  606. args = {};
  607. }
  608. const { success, fail, complete } = getApiCallbacks(args);
  609. const hasSuccess = isFunction$1(success);
  610. const hasFail = isFunction$1(fail);
  611. const hasComplete = isFunction$1(complete);
  612. const callbackId = invokeCallbackId++;
  613. addInvokeCallback(callbackId, name, (res) => {
  614. res = res || {};
  615. res.errMsg = normalizeErrMsg$1(res.errMsg, name);
  616. isFunction$1(beforeAll) && beforeAll(res);
  617. if (res.errMsg === name + ":ok") {
  618. isFunction$1(beforeSuccess) && beforeSuccess(res, args);
  619. hasSuccess && success(res);
  620. } else {
  621. hasFail && fail(res);
  622. }
  623. hasComplete && complete(res);
  624. });
  625. return callbackId;
  626. }
  627. const HOOK_SUCCESS = "success";
  628. const HOOK_FAIL = "fail";
  629. const HOOK_COMPLETE = "complete";
  630. const globalInterceptors = {};
  631. const scopedInterceptors = {};
  632. function wrapperHook(hook, params) {
  633. return function(data) {
  634. return hook(data, params) || data;
  635. };
  636. }
  637. function queue$1(hooks2, data, params) {
  638. let promise2 = false;
  639. for (let i = 0; i < hooks2.length; i++) {
  640. const hook = hooks2[i];
  641. if (promise2) {
  642. promise2 = Promise.resolve(wrapperHook(hook, params));
  643. } else {
  644. const res = hook(data, params);
  645. if (isPromise(res)) {
  646. promise2 = Promise.resolve(res);
  647. }
  648. if (res === false) {
  649. return {
  650. then() {
  651. },
  652. catch() {
  653. }
  654. };
  655. }
  656. }
  657. }
  658. return promise2 || {
  659. then(callback) {
  660. return callback(data);
  661. },
  662. catch() {
  663. }
  664. };
  665. }
  666. function wrapperOptions(interceptors2, options = {}) {
  667. [HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
  668. const hooks2 = interceptors2[name];
  669. if (!isArray$2(hooks2)) {
  670. return;
  671. }
  672. const oldCallback = options[name];
  673. options[name] = function callbackInterceptor(res) {
  674. queue$1(hooks2, res, options).then((res2) => {
  675. return isFunction$1(oldCallback) && oldCallback(res2) || res2;
  676. });
  677. };
  678. });
  679. return options;
  680. }
  681. function wrapperReturnValue(method3, returnValue) {
  682. const returnValueHooks = [];
  683. if (isArray$2(globalInterceptors.returnValue)) {
  684. returnValueHooks.push(...globalInterceptors.returnValue);
  685. }
  686. const interceptor = scopedInterceptors[method3];
  687. if (interceptor && isArray$2(interceptor.returnValue)) {
  688. returnValueHooks.push(...interceptor.returnValue);
  689. }
  690. returnValueHooks.forEach((hook) => {
  691. returnValue = hook(returnValue) || returnValue;
  692. });
  693. return returnValue;
  694. }
  695. function getApiInterceptorHooks(method3) {
  696. const interceptor = /* @__PURE__ */ Object.create(null);
  697. Object.keys(globalInterceptors).forEach((hook) => {
  698. if (hook !== "returnValue") {
  699. interceptor[hook] = globalInterceptors[hook].slice();
  700. }
  701. });
  702. const scopedInterceptor = scopedInterceptors[method3];
  703. if (scopedInterceptor) {
  704. Object.keys(scopedInterceptor).forEach((hook) => {
  705. if (hook !== "returnValue") {
  706. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  707. }
  708. });
  709. }
  710. return interceptor;
  711. }
  712. function invokeApi(method3, api, options, params) {
  713. const interceptor = getApiInterceptorHooks(method3);
  714. if (interceptor && Object.keys(interceptor).length) {
  715. if (isArray$2(interceptor.invoke)) {
  716. const res = queue$1(interceptor.invoke, options);
  717. return res.then((options2) => {
  718. return api(wrapperOptions(getApiInterceptorHooks(method3), options2), ...params);
  719. });
  720. } else {
  721. return api(wrapperOptions(interceptor, options), ...params);
  722. }
  723. }
  724. return api(options, ...params);
  725. }
  726. function hasCallback(args) {
  727. if (isPlainObject$1(args) && [API_SUCCESS, API_FAIL, API_COMPLETE].find((cb) => isFunction$1(args[cb]))) {
  728. return true;
  729. }
  730. return false;
  731. }
  732. function handlePromise(promise2) {
  733. return promise2;
  734. }
  735. function promisify$1(name, fn) {
  736. return (args = {}, ...rest) => {
  737. if (hasCallback(args)) {
  738. return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
  739. }
  740. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  741. invokeApi(name, fn, extend$1(args, { success: resolve2, fail: reject }), rest);
  742. })));
  743. };
  744. }
  745. function formatApiArgs(args, options) {
  746. const params = args[0];
  747. if (!options || !isPlainObject$1(options.formatArgs) && isPlainObject$1(params)) {
  748. return;
  749. }
  750. const formatArgs = options.formatArgs;
  751. const keys2 = Object.keys(formatArgs);
  752. for (let i = 0; i < keys2.length; i++) {
  753. const name = keys2[i];
  754. const formatterOrDefaultValue = formatArgs[name];
  755. if (isFunction$1(formatterOrDefaultValue)) {
  756. const errMsg = formatterOrDefaultValue(args[0][name], params);
  757. if (isString$1(errMsg)) {
  758. return errMsg;
  759. }
  760. } else {
  761. if (!hasOwn(params, name)) {
  762. params[name] = formatterOrDefaultValue;
  763. }
  764. }
  765. }
  766. }
  767. function invokeSuccess(id, name, res) {
  768. return invokeCallback(id, extend$1(res || {}, { errMsg: name + ":ok" }));
  769. }
  770. function invokeFail(id, name, errMsg, errRes) {
  771. return invokeCallback(id, extend$1({ errMsg: name + ":fail" + (errMsg ? " " + errMsg : "") }, errRes));
  772. }
  773. function beforeInvokeApi(name, args, protocol, options) {
  774. {
  775. validateProtocols(name, args, protocol);
  776. }
  777. if (options && options.beforeInvoke) {
  778. const errMsg2 = options.beforeInvoke(args);
  779. if (isString$1(errMsg2)) {
  780. return errMsg2;
  781. }
  782. }
  783. const errMsg = formatApiArgs(args, options);
  784. if (errMsg) {
  785. return errMsg;
  786. }
  787. }
  788. function normalizeErrMsg(errMsg) {
  789. if (!errMsg || isString$1(errMsg)) {
  790. return errMsg;
  791. }
  792. if (errMsg.stack) {
  793. console.error(errMsg.message + LINEFEED + errMsg.stack);
  794. return errMsg.message;
  795. }
  796. return errMsg;
  797. }
  798. function wrapperTaskApi(name, fn, protocol, options) {
  799. return (args) => {
  800. const id = createAsyncApiCallback(name, args, options);
  801. const errMsg = beforeInvokeApi(name, [args], protocol, options);
  802. if (errMsg) {
  803. return invokeFail(id, name, errMsg);
  804. }
  805. return fn(args, {
  806. resolve: (res) => invokeSuccess(id, name, res),
  807. reject: (errMsg2, errRes) => invokeFail(id, name, normalizeErrMsg(errMsg2), errRes)
  808. });
  809. };
  810. }
  811. function wrapperSyncApi(name, fn, protocol, options) {
  812. return (...args) => {
  813. const errMsg = beforeInvokeApi(name, args, protocol, options);
  814. if (errMsg) {
  815. throw new Error(errMsg);
  816. }
  817. return fn.apply(null, args);
  818. };
  819. }
  820. function wrapperAsyncApi(name, fn, protocol, options) {
  821. return wrapperTaskApi(name, fn, protocol, options);
  822. }
  823. function defineSyncApi(name, fn, protocol, options) {
  824. return wrapperSyncApi(name, fn, protocol, options);
  825. }
  826. function defineAsyncApi(name, fn, protocol, options) {
  827. return promisify$1(name, wrapperAsyncApi(name, fn, protocol, options));
  828. }
  829. const API_UPX2PX = "upx2px";
  830. const Upx2pxProtocol = [
  831. {
  832. name: "upx",
  833. type: [Number, String],
  834. required: true
  835. }
  836. ];
  837. const EPS = 1e-4;
  838. const BASE_DEVICE_WIDTH = 750;
  839. let isIOS = false;
  840. let deviceWidth = 0;
  841. let deviceDPR = 0;
  842. function checkDeviceWidth() {
  843. const { platform: platform2, pixelRatio, windowWidth } = getBaseSystemInfo();
  844. deviceWidth = windowWidth;
  845. deviceDPR = pixelRatio;
  846. isIOS = platform2 === "ios";
  847. }
  848. const upx2px = defineSyncApi(API_UPX2PX, (number3, newDeviceWidth) => {
  849. if (deviceWidth === 0) {
  850. checkDeviceWidth();
  851. }
  852. number3 = Number(number3);
  853. if (number3 === 0) {
  854. return 0;
  855. }
  856. let width = newDeviceWidth || deviceWidth;
  857. let result = number3 / BASE_DEVICE_WIDTH * width;
  858. if (result < 0) {
  859. result = -result;
  860. }
  861. result = Math.floor(result + EPS);
  862. if (result === 0) {
  863. if (deviceDPR === 1 || !isIOS) {
  864. result = 1;
  865. } else {
  866. result = 0.5;
  867. }
  868. }
  869. return number3 < 0 ? -result : result;
  870. }, Upx2pxProtocol);
  871. const API_ADD_INTERCEPTOR = "addInterceptor";
  872. const API_REMOVE_INTERCEPTOR = "removeInterceptor";
  873. const AddInterceptorProtocol = [
  874. {
  875. name: "method",
  876. type: [String, Object],
  877. required: true
  878. }
  879. ];
  880. const RemoveInterceptorProtocol = AddInterceptorProtocol;
  881. function mergeInterceptorHook(interceptors2, interceptor) {
  882. Object.keys(interceptor).forEach((hook) => {
  883. if (isFunction$1(interceptor[hook])) {
  884. interceptors2[hook] = mergeHook(interceptors2[hook], interceptor[hook]);
  885. }
  886. });
  887. }
  888. function removeInterceptorHook(interceptors2, interceptor) {
  889. if (!interceptors2 || !interceptor) {
  890. return;
  891. }
  892. Object.keys(interceptor).forEach((name) => {
  893. const hooks2 = interceptors2[name];
  894. const hook = interceptor[name];
  895. if (isArray$2(hooks2) && isFunction$1(hook)) {
  896. remove(hooks2, hook);
  897. }
  898. });
  899. }
  900. function mergeHook(parentVal, childVal) {
  901. const res = childVal ? parentVal ? parentVal.concat(childVal) : isArray$2(childVal) ? childVal : [childVal] : parentVal;
  902. return res ? dedupeHooks(res) : res;
  903. }
  904. function dedupeHooks(hooks2) {
  905. const res = [];
  906. for (let i = 0; i < hooks2.length; i++) {
  907. if (res.indexOf(hooks2[i]) === -1) {
  908. res.push(hooks2[i]);
  909. }
  910. }
  911. return res;
  912. }
  913. const addInterceptor = defineSyncApi(API_ADD_INTERCEPTOR, (method3, interceptor) => {
  914. if (isString$1(method3) && isPlainObject$1(interceptor)) {
  915. mergeInterceptorHook(scopedInterceptors[method3] || (scopedInterceptors[method3] = {}), interceptor);
  916. } else if (isPlainObject$1(method3)) {
  917. mergeInterceptorHook(globalInterceptors, method3);
  918. }
  919. }, AddInterceptorProtocol);
  920. const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method3, interceptor) => {
  921. if (isString$1(method3)) {
  922. if (isPlainObject$1(interceptor)) {
  923. removeInterceptorHook(scopedInterceptors[method3], interceptor);
  924. } else {
  925. delete scopedInterceptors[method3];
  926. }
  927. } else if (isPlainObject$1(method3)) {
  928. removeInterceptorHook(globalInterceptors, method3);
  929. }
  930. }, RemoveInterceptorProtocol);
  931. const interceptors = {};
  932. const API_ON = "$on";
  933. const OnProtocol = [
  934. {
  935. name: "event",
  936. type: String,
  937. required: true
  938. },
  939. {
  940. name: "callback",
  941. type: Function,
  942. required: true
  943. }
  944. ];
  945. const API_ONCE = "$once";
  946. const OnceProtocol = OnProtocol;
  947. const API_OFF = "$off";
  948. const OffProtocol = [
  949. {
  950. name: "event",
  951. type: [String, Array]
  952. },
  953. {
  954. name: "callback",
  955. type: Function
  956. }
  957. ];
  958. const API_EMIT = "$emit";
  959. const EmitProtocol = [
  960. {
  961. name: "event",
  962. type: String,
  963. required: true
  964. }
  965. ];
  966. const emitter = new E$1();
  967. const $on = defineSyncApi(API_ON, (name, callback) => {
  968. emitter.on(name, callback);
  969. return () => emitter.off(name, callback);
  970. }, OnProtocol);
  971. const $once = defineSyncApi(API_ONCE, (name, callback) => {
  972. emitter.once(name, callback);
  973. return () => emitter.off(name, callback);
  974. }, OnceProtocol);
  975. const $off = defineSyncApi(API_OFF, (name, callback) => {
  976. if (!name) {
  977. emitter.e = {};
  978. return;
  979. }
  980. if (!isArray$2(name))
  981. name = [name];
  982. name.forEach((n2) => emitter.off(n2, callback));
  983. }, OffProtocol);
  984. const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
  985. emitter.emit(name, ...args);
  986. }, EmitProtocol);
  987. let cid;
  988. let cidErrMsg;
  989. let enabled;
  990. function normalizePushMessage(message) {
  991. try {
  992. return JSON.parse(message);
  993. } catch (e2) {
  994. }
  995. return message;
  996. }
  997. function invokePushCallback(args) {
  998. if (args.type === "enabled") {
  999. enabled = true;
  1000. } else if (args.type === "clientId") {
  1001. cid = args.cid;
  1002. cidErrMsg = args.errMsg;
  1003. invokeGetPushCidCallbacks(cid, args.errMsg);
  1004. } else if (args.type === "pushMsg") {
  1005. const message = {
  1006. type: "receive",
  1007. data: normalizePushMessage(args.message)
  1008. };
  1009. for (let i = 0; i < onPushMessageCallbacks.length; i++) {
  1010. const callback = onPushMessageCallbacks[i];
  1011. callback(message);
  1012. if (message.stopped) {
  1013. break;
  1014. }
  1015. }
  1016. } else if (args.type === "click") {
  1017. onPushMessageCallbacks.forEach((callback) => {
  1018. callback({
  1019. type: "click",
  1020. data: normalizePushMessage(args.message)
  1021. });
  1022. });
  1023. }
  1024. }
  1025. const getPushCidCallbacks = [];
  1026. function invokeGetPushCidCallbacks(cid2, errMsg) {
  1027. getPushCidCallbacks.forEach((callback) => {
  1028. callback(cid2, errMsg);
  1029. });
  1030. getPushCidCallbacks.length = 0;
  1031. }
  1032. const API_GET_PUSH_CLIENT_ID = "getPushClientId";
  1033. const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
  1034. Promise.resolve().then(() => {
  1035. if (typeof enabled === "undefined") {
  1036. enabled = false;
  1037. cid = "";
  1038. cidErrMsg = "uniPush is not enabled";
  1039. }
  1040. getPushCidCallbacks.push((cid2, errMsg) => {
  1041. if (cid2) {
  1042. resolve2({ cid: cid2 });
  1043. } else {
  1044. reject(errMsg);
  1045. }
  1046. });
  1047. if (typeof cid !== "undefined") {
  1048. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1049. }
  1050. });
  1051. });
  1052. const onPushMessageCallbacks = [];
  1053. const onPushMessage = (fn) => {
  1054. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1055. onPushMessageCallbacks.push(fn);
  1056. }
  1057. };
  1058. const offPushMessage = (fn) => {
  1059. if (!fn) {
  1060. onPushMessageCallbacks.length = 0;
  1061. } else {
  1062. const index2 = onPushMessageCallbacks.indexOf(fn);
  1063. if (index2 > -1) {
  1064. onPushMessageCallbacks.splice(index2, 1);
  1065. }
  1066. }
  1067. };
  1068. const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getDeviceInfo|getAppBaseInfo|getWindowInfo|getSystemSetting|getAppAuthorizeSetting/;
  1069. const CONTEXT_API_RE = /^create|Manager$/;
  1070. const CONTEXT_API_RE_EXC = ["createBLEConnection"];
  1071. const ASYNC_API = ["createBLEConnection"];
  1072. const CALLBACK_API_RE = /^on|^off/;
  1073. function isContextApi(name) {
  1074. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1075. }
  1076. function isSyncApi(name) {
  1077. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1078. }
  1079. function isCallbackApi(name) {
  1080. return CALLBACK_API_RE.test(name) && name !== "onPush";
  1081. }
  1082. function shouldPromise(name) {
  1083. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1084. return false;
  1085. }
  1086. return true;
  1087. }
  1088. if (!Promise.prototype.finally) {
  1089. Promise.prototype.finally = function(onfinally) {
  1090. const promise2 = this.constructor;
  1091. return this.then((value2) => promise2.resolve(onfinally && onfinally()).then(() => value2), (reason) => promise2.resolve(onfinally && onfinally()).then(() => {
  1092. throw reason;
  1093. }));
  1094. };
  1095. }
  1096. function promisify(name, api) {
  1097. if (!shouldPromise(name)) {
  1098. return api;
  1099. }
  1100. if (!isFunction$1(api)) {
  1101. return api;
  1102. }
  1103. return function promiseApi(options = {}, ...rest) {
  1104. if (isFunction$1(options.success) || isFunction$1(options.fail) || isFunction$1(options.complete)) {
  1105. return wrapperReturnValue(name, invokeApi(name, api, options, rest));
  1106. }
  1107. return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
  1108. invokeApi(name, api, extend$1({}, options, {
  1109. success: resolve2,
  1110. fail: reject
  1111. }), rest);
  1112. })));
  1113. };
  1114. }
  1115. const CALLBACKS = ["success", "fail", "cancel", "complete"];
  1116. function initWrapper(protocols2) {
  1117. function processCallback(methodName, method3, returnValue) {
  1118. return function(res) {
  1119. return method3(processReturnValue(methodName, res, returnValue));
  1120. };
  1121. }
  1122. function processArgs(methodName, fromArgs, argsOption = {}, returnValue = {}, keepFromArgs = false) {
  1123. if (isPlainObject$1(fromArgs)) {
  1124. const toArgs = keepFromArgs === true ? fromArgs : {};
  1125. if (isFunction$1(argsOption)) {
  1126. argsOption = argsOption(fromArgs, toArgs) || {};
  1127. }
  1128. for (const key in fromArgs) {
  1129. if (hasOwn(argsOption, key)) {
  1130. let keyOption = argsOption[key];
  1131. if (isFunction$1(keyOption)) {
  1132. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1133. }
  1134. if (!keyOption) {
  1135. console.warn(`微信小程序 ${methodName} 暂不支持 ${key}`);
  1136. } else if (isString$1(keyOption)) {
  1137. toArgs[keyOption] = fromArgs[key];
  1138. } else if (isPlainObject$1(keyOption)) {
  1139. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1140. }
  1141. } else if (CALLBACKS.indexOf(key) !== -1) {
  1142. const callback = fromArgs[key];
  1143. if (isFunction$1(callback)) {
  1144. toArgs[key] = processCallback(methodName, callback, returnValue);
  1145. }
  1146. } else {
  1147. if (!keepFromArgs && !hasOwn(toArgs, key)) {
  1148. toArgs[key] = fromArgs[key];
  1149. }
  1150. }
  1151. }
  1152. return toArgs;
  1153. } else if (isFunction$1(fromArgs)) {
  1154. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1155. }
  1156. return fromArgs;
  1157. }
  1158. function processReturnValue(methodName, res, returnValue, keepReturnValue = false) {
  1159. if (isFunction$1(protocols2.returnValue)) {
  1160. res = protocols2.returnValue(methodName, res);
  1161. }
  1162. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1163. }
  1164. return function wrapper(methodName, method3) {
  1165. if (!hasOwn(protocols2, methodName)) {
  1166. return method3;
  1167. }
  1168. const protocol = protocols2[methodName];
  1169. if (!protocol) {
  1170. return function() {
  1171. console.error(`微信小程序 暂不支持${methodName}`);
  1172. };
  1173. }
  1174. return function(arg1, arg2) {
  1175. let options = protocol;
  1176. if (isFunction$1(protocol)) {
  1177. options = protocol(arg1);
  1178. }
  1179. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1180. const args = [arg1];
  1181. if (typeof arg2 !== "undefined") {
  1182. args.push(arg2);
  1183. }
  1184. const returnValue = wx[options.name || methodName].apply(wx, args);
  1185. if (isSyncApi(methodName)) {
  1186. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1187. }
  1188. return returnValue;
  1189. };
  1190. };
  1191. }
  1192. const getLocale$1 = () => {
  1193. const app = isFunction$1(getApp) && getApp({ allowDefault: true });
  1194. if (app && app.$vm) {
  1195. return app.$vm.$locale;
  1196. }
  1197. return normalizeLocale$1(wx.getSystemInfoSync().language) || LOCALE_EN;
  1198. };
  1199. const setLocale = (locale2) => {
  1200. const app = isFunction$1(getApp) && getApp();
  1201. if (!app) {
  1202. return false;
  1203. }
  1204. const oldLocale = app.$vm.$locale;
  1205. if (oldLocale !== locale2) {
  1206. app.$vm.$locale = locale2;
  1207. onLocaleChangeCallbacks.forEach((fn) => fn({ locale: locale2 }));
  1208. return true;
  1209. }
  1210. return false;
  1211. };
  1212. const onLocaleChangeCallbacks = [];
  1213. const onLocaleChange = (fn) => {
  1214. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1215. onLocaleChangeCallbacks.push(fn);
  1216. }
  1217. };
  1218. if (typeof global !== "undefined") {
  1219. global.getLocale = getLocale$1;
  1220. }
  1221. const UUID_KEY = "__DC_STAT_UUID";
  1222. let deviceId;
  1223. function useDeviceId(global2 = wx) {
  1224. return function addDeviceId(_, toRes) {
  1225. deviceId = deviceId || global2.getStorageSync(UUID_KEY);
  1226. if (!deviceId) {
  1227. deviceId = Date.now() + "" + Math.floor(Math.random() * 1e7);
  1228. wx.setStorage({
  1229. key: UUID_KEY,
  1230. data: deviceId
  1231. });
  1232. }
  1233. toRes.deviceId = deviceId;
  1234. };
  1235. }
  1236. function addSafeAreaInsets(fromRes, toRes) {
  1237. if (fromRes.safeArea) {
  1238. const safeArea = fromRes.safeArea;
  1239. toRes.safeAreaInsets = {
  1240. top: safeArea.top,
  1241. left: safeArea.left,
  1242. right: fromRes.windowWidth - safeArea.right,
  1243. bottom: fromRes.screenHeight - safeArea.bottom
  1244. };
  1245. }
  1246. }
  1247. function populateParameters(fromRes, toRes) {
  1248. const { brand = "", model = "", system = "", language = "", theme, version: version2, platform: platform2, fontSizeSetting, SDKVersion, pixelRatio, deviceOrientation } = fromRes;
  1249. let osName = "";
  1250. let osVersion = "";
  1251. {
  1252. osName = system.split(" ")[0] || "";
  1253. osVersion = system.split(" ")[1] || "";
  1254. }
  1255. let hostVersion = version2;
  1256. let deviceType = getGetDeviceType(fromRes, model);
  1257. let deviceBrand = getDeviceBrand(brand);
  1258. let _hostName = getHostName(fromRes);
  1259. let _deviceOrientation = deviceOrientation;
  1260. let _devicePixelRatio = pixelRatio;
  1261. let _SDKVersion = SDKVersion;
  1262. const hostLanguage = language.replace(/_/g, "-");
  1263. const parameters = {
  1264. appId: "__UNI__EEB6DFC",
  1265. appName: "car_applet",
  1266. appVersion: "1.0.0",
  1267. appVersionCode: "100",
  1268. appLanguage: getAppLanguage(hostLanguage),
  1269. uniCompileVersion: "3.8.7",
  1270. uniRuntimeVersion: "3.8.7",
  1271. uniPlatform: "mp-weixin",
  1272. deviceBrand,
  1273. deviceModel: model,
  1274. deviceType,
  1275. devicePixelRatio: _devicePixelRatio,
  1276. deviceOrientation: _deviceOrientation,
  1277. osName: osName.toLocaleLowerCase(),
  1278. osVersion,
  1279. hostTheme: theme,
  1280. hostVersion,
  1281. hostLanguage,
  1282. hostName: _hostName,
  1283. hostSDKVersion: _SDKVersion,
  1284. hostFontSizeSetting: fontSizeSetting,
  1285. windowTop: 0,
  1286. windowBottom: 0,
  1287. // TODO
  1288. osLanguage: void 0,
  1289. osTheme: void 0,
  1290. ua: void 0,
  1291. hostPackageName: void 0,
  1292. browserName: void 0,
  1293. browserVersion: void 0
  1294. };
  1295. extend$1(toRes, parameters);
  1296. }
  1297. function getGetDeviceType(fromRes, model) {
  1298. let deviceType = fromRes.deviceType || "phone";
  1299. {
  1300. const deviceTypeMaps = {
  1301. ipad: "pad",
  1302. windows: "pc",
  1303. mac: "pc"
  1304. };
  1305. const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  1306. const _model = model.toLocaleLowerCase();
  1307. for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) {
  1308. const _m = deviceTypeMapsKeys[index2];
  1309. if (_model.indexOf(_m) !== -1) {
  1310. deviceType = deviceTypeMaps[_m];
  1311. break;
  1312. }
  1313. }
  1314. }
  1315. return deviceType;
  1316. }
  1317. function getDeviceBrand(brand) {
  1318. let deviceBrand = brand;
  1319. if (deviceBrand) {
  1320. deviceBrand = deviceBrand.toLocaleLowerCase();
  1321. }
  1322. return deviceBrand;
  1323. }
  1324. function getAppLanguage(defaultLanguage) {
  1325. return getLocale$1 ? getLocale$1() : defaultLanguage;
  1326. }
  1327. function getHostName(fromRes) {
  1328. const _platform = "WeChat";
  1329. let _hostName = fromRes.hostName || _platform;
  1330. {
  1331. if (fromRes.environment) {
  1332. _hostName = fromRes.environment;
  1333. } else if (fromRes.host && fromRes.host.env) {
  1334. _hostName = fromRes.host.env;
  1335. }
  1336. }
  1337. return _hostName;
  1338. }
  1339. const getSystemInfo = {
  1340. returnValue: (fromRes, toRes) => {
  1341. addSafeAreaInsets(fromRes, toRes);
  1342. useDeviceId()(fromRes, toRes);
  1343. populateParameters(fromRes, toRes);
  1344. }
  1345. };
  1346. const getSystemInfoSync = getSystemInfo;
  1347. const redirectTo = {};
  1348. const previewImage = {
  1349. args(fromArgs, toArgs) {
  1350. let currentIndex = parseInt(fromArgs.current);
  1351. if (isNaN(currentIndex)) {
  1352. return;
  1353. }
  1354. const urls = fromArgs.urls;
  1355. if (!isArray$2(urls)) {
  1356. return;
  1357. }
  1358. const len = urls.length;
  1359. if (!len) {
  1360. return;
  1361. }
  1362. if (currentIndex < 0) {
  1363. currentIndex = 0;
  1364. } else if (currentIndex >= len) {
  1365. currentIndex = len - 1;
  1366. }
  1367. if (currentIndex > 0) {
  1368. toArgs.current = urls[currentIndex];
  1369. toArgs.urls = urls.filter((item, index2) => index2 < currentIndex ? item !== urls[currentIndex] : true);
  1370. } else {
  1371. toArgs.current = urls[0];
  1372. }
  1373. return {
  1374. indicator: false,
  1375. loop: false
  1376. };
  1377. }
  1378. };
  1379. const showActionSheet = {
  1380. args(fromArgs, toArgs) {
  1381. toArgs.alertText = fromArgs.title;
  1382. }
  1383. };
  1384. const getDeviceInfo = {
  1385. returnValue: (fromRes, toRes) => {
  1386. const { brand, model } = fromRes;
  1387. let deviceType = getGetDeviceType(fromRes, model);
  1388. let deviceBrand = getDeviceBrand(brand);
  1389. useDeviceId()(fromRes, toRes);
  1390. toRes = sortObject(extend$1(toRes, {
  1391. deviceType,
  1392. deviceBrand,
  1393. deviceModel: model
  1394. }));
  1395. }
  1396. };
  1397. const getAppBaseInfo = {
  1398. returnValue: (fromRes, toRes) => {
  1399. const { version: version2, language, SDKVersion, theme } = fromRes;
  1400. let _hostName = getHostName(fromRes);
  1401. let hostLanguage = language.replace(/_/g, "-");
  1402. toRes = sortObject(extend$1(toRes, {
  1403. hostVersion: version2,
  1404. hostLanguage,
  1405. hostName: _hostName,
  1406. hostSDKVersion: SDKVersion,
  1407. hostTheme: theme,
  1408. appId: "__UNI__EEB6DFC",
  1409. appName: "car_applet",
  1410. appVersion: "1.0.0",
  1411. appVersionCode: "100",
  1412. appLanguage: getAppLanguage(hostLanguage)
  1413. }));
  1414. }
  1415. };
  1416. const getWindowInfo = {
  1417. returnValue: (fromRes, toRes) => {
  1418. addSafeAreaInsets(fromRes, toRes);
  1419. toRes = sortObject(extend$1(toRes, {
  1420. windowTop: 0,
  1421. windowBottom: 0
  1422. }));
  1423. }
  1424. };
  1425. const getAppAuthorizeSetting = {
  1426. returnValue: function(fromRes, toRes) {
  1427. const { locationReducedAccuracy } = fromRes;
  1428. toRes.locationAccuracy = "unsupported";
  1429. if (locationReducedAccuracy === true) {
  1430. toRes.locationAccuracy = "reduced";
  1431. } else if (locationReducedAccuracy === false) {
  1432. toRes.locationAccuracy = "full";
  1433. }
  1434. }
  1435. };
  1436. const baseApis = {
  1437. $on,
  1438. $off,
  1439. $once,
  1440. $emit,
  1441. upx2px,
  1442. interceptors,
  1443. addInterceptor,
  1444. removeInterceptor,
  1445. onCreateVueApp,
  1446. invokeCreateVueAppHook,
  1447. getLocale: getLocale$1,
  1448. setLocale,
  1449. onLocaleChange,
  1450. getPushClientId,
  1451. onPushMessage,
  1452. offPushMessage,
  1453. invokePushCallback
  1454. };
  1455. function initUni(api, protocols2, platform2 = wx) {
  1456. const wrapper = initWrapper(protocols2);
  1457. const UniProxyHandlers = {
  1458. get(target, key) {
  1459. if (hasOwn(target, key)) {
  1460. return target[key];
  1461. }
  1462. if (hasOwn(api, key)) {
  1463. return promisify(key, api[key]);
  1464. }
  1465. if (hasOwn(baseApis, key)) {
  1466. return promisify(key, baseApis[key]);
  1467. }
  1468. return promisify(key, wrapper(key, platform2[key]));
  1469. }
  1470. };
  1471. return new Proxy({}, UniProxyHandlers);
  1472. }
  1473. function initGetProvider(providers) {
  1474. return function getProvider2({ service, success, fail, complete }) {
  1475. let res;
  1476. if (providers[service]) {
  1477. res = {
  1478. errMsg: "getProvider:ok",
  1479. service,
  1480. provider: providers[service]
  1481. };
  1482. isFunction$1(success) && success(res);
  1483. } else {
  1484. res = {
  1485. errMsg: "getProvider:fail:服务[" + service + "]不存在"
  1486. };
  1487. isFunction$1(fail) && fail(res);
  1488. }
  1489. isFunction$1(complete) && complete(res);
  1490. };
  1491. }
  1492. const objectKeys = [
  1493. "qy",
  1494. "env",
  1495. "error",
  1496. "version",
  1497. "lanDebug",
  1498. "cloud",
  1499. "serviceMarket",
  1500. "router",
  1501. "worklet",
  1502. "__webpack_require_UNI_MP_PLUGIN__"
  1503. ];
  1504. const singlePageDisableKey = ["lanDebug", "router", "worklet"];
  1505. const launchOption = wx.getLaunchOptionsSync ? wx.getLaunchOptionsSync() : null;
  1506. function isWxKey(key) {
  1507. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  1508. return false;
  1509. }
  1510. return objectKeys.indexOf(key) > -1 || typeof wx[key] === "function";
  1511. }
  1512. function initWx() {
  1513. const newWx = {};
  1514. for (const key in wx) {
  1515. if (isWxKey(key)) {
  1516. newWx[key] = wx[key];
  1517. }
  1518. }
  1519. if (typeof globalThis !== "undefined" && typeof requireMiniProgram === "undefined") {
  1520. globalThis.wx = newWx;
  1521. }
  1522. return newWx;
  1523. }
  1524. const mocks$1 = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  1525. const getProvider = initGetProvider({
  1526. oauth: ["weixin"],
  1527. share: ["weixin"],
  1528. payment: ["wxpay"],
  1529. push: ["weixin"]
  1530. });
  1531. function initComponentMocks(component) {
  1532. const res = /* @__PURE__ */ Object.create(null);
  1533. mocks$1.forEach((name) => {
  1534. res[name] = component[name];
  1535. });
  1536. return res;
  1537. }
  1538. function createSelectorQuery() {
  1539. const query = wx$2.createSelectorQuery();
  1540. const oldIn = query.in;
  1541. query.in = function newIn(component) {
  1542. return oldIn.call(this, initComponentMocks(component));
  1543. };
  1544. return query;
  1545. }
  1546. const wx$2 = initWx();
  1547. let baseInfo = wx$2.getAppBaseInfo && wx$2.getAppBaseInfo();
  1548. if (!baseInfo) {
  1549. baseInfo = wx$2.getSystemInfoSync();
  1550. }
  1551. const host = baseInfo ? baseInfo.host : null;
  1552. const shareVideoMessage = host && host.env === "SAAASDK" ? wx$2.miniapp.shareVideoMessage : wx$2.shareVideoMessage;
  1553. var shims = /* @__PURE__ */ Object.freeze({
  1554. __proto__: null,
  1555. createSelectorQuery,
  1556. getProvider,
  1557. shareVideoMessage
  1558. });
  1559. const compressImage = {
  1560. args(fromArgs, toArgs) {
  1561. if (fromArgs.compressedHeight && !toArgs.compressHeight) {
  1562. toArgs.compressHeight = fromArgs.compressedHeight;
  1563. }
  1564. if (fromArgs.compressedWidth && !toArgs.compressWidth) {
  1565. toArgs.compressWidth = fromArgs.compressedWidth;
  1566. }
  1567. }
  1568. };
  1569. var protocols = /* @__PURE__ */ Object.freeze({
  1570. __proto__: null,
  1571. compressImage,
  1572. getAppAuthorizeSetting,
  1573. getAppBaseInfo,
  1574. getDeviceInfo,
  1575. getSystemInfo,
  1576. getSystemInfoSync,
  1577. getWindowInfo,
  1578. previewImage,
  1579. redirectTo,
  1580. showActionSheet
  1581. });
  1582. const wx$1 = initWx();
  1583. var index$1 = initUni(shims, protocols, wx$1);
  1584. function warn$1(msg, ...args) {
  1585. console.warn(`[Vue warn] ${msg}`, ...args);
  1586. }
  1587. let activeEffectScope;
  1588. class EffectScope {
  1589. constructor(detached = false) {
  1590. this.detached = detached;
  1591. this._active = true;
  1592. this.effects = [];
  1593. this.cleanups = [];
  1594. this.parent = activeEffectScope;
  1595. if (!detached && activeEffectScope) {
  1596. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
  1597. }
  1598. }
  1599. get active() {
  1600. return this._active;
  1601. }
  1602. run(fn) {
  1603. if (this._active) {
  1604. const currentEffectScope = activeEffectScope;
  1605. try {
  1606. activeEffectScope = this;
  1607. return fn();
  1608. } finally {
  1609. activeEffectScope = currentEffectScope;
  1610. }
  1611. } else {
  1612. warn$1(`cannot run an inactive effect scope.`);
  1613. }
  1614. }
  1615. /**
  1616. * This should only be called on non-detached scopes
  1617. * @internal
  1618. */
  1619. on() {
  1620. activeEffectScope = this;
  1621. }
  1622. /**
  1623. * This should only be called on non-detached scopes
  1624. * @internal
  1625. */
  1626. off() {
  1627. activeEffectScope = this.parent;
  1628. }
  1629. stop(fromParent) {
  1630. if (this._active) {
  1631. let i, l;
  1632. for (i = 0, l = this.effects.length; i < l; i++) {
  1633. this.effects[i].stop();
  1634. }
  1635. for (i = 0, l = this.cleanups.length; i < l; i++) {
  1636. this.cleanups[i]();
  1637. }
  1638. if (this.scopes) {
  1639. for (i = 0, l = this.scopes.length; i < l; i++) {
  1640. this.scopes[i].stop(true);
  1641. }
  1642. }
  1643. if (!this.detached && this.parent && !fromParent) {
  1644. const last = this.parent.scopes.pop();
  1645. if (last && last !== this) {
  1646. this.parent.scopes[this.index] = last;
  1647. last.index = this.index;
  1648. }
  1649. }
  1650. this.parent = void 0;
  1651. this._active = false;
  1652. }
  1653. }
  1654. }
  1655. function recordEffectScope(effect, scope = activeEffectScope) {
  1656. if (scope && scope.active) {
  1657. scope.effects.push(effect);
  1658. }
  1659. }
  1660. function getCurrentScope() {
  1661. return activeEffectScope;
  1662. }
  1663. const createDep = (effects) => {
  1664. const dep = new Set(effects);
  1665. dep.w = 0;
  1666. dep.n = 0;
  1667. return dep;
  1668. };
  1669. const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
  1670. const newTracked = (dep) => (dep.n & trackOpBit) > 0;
  1671. const initDepMarkers = ({ deps }) => {
  1672. if (deps.length) {
  1673. for (let i = 0; i < deps.length; i++) {
  1674. deps[i].w |= trackOpBit;
  1675. }
  1676. }
  1677. };
  1678. const finalizeDepMarkers = (effect) => {
  1679. const { deps } = effect;
  1680. if (deps.length) {
  1681. let ptr = 0;
  1682. for (let i = 0; i < deps.length; i++) {
  1683. const dep = deps[i];
  1684. if (wasTracked(dep) && !newTracked(dep)) {
  1685. dep.delete(effect);
  1686. } else {
  1687. deps[ptr++] = dep;
  1688. }
  1689. dep.w &= ~trackOpBit;
  1690. dep.n &= ~trackOpBit;
  1691. }
  1692. deps.length = ptr;
  1693. }
  1694. };
  1695. const targetMap = /* @__PURE__ */ new WeakMap();
  1696. let effectTrackDepth = 0;
  1697. let trackOpBit = 1;
  1698. const maxMarkerBits = 30;
  1699. let activeEffect;
  1700. const ITERATE_KEY = Symbol("iterate");
  1701. const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate");
  1702. class ReactiveEffect {
  1703. constructor(fn, scheduler = null, scope) {
  1704. this.fn = fn;
  1705. this.scheduler = scheduler;
  1706. this.active = true;
  1707. this.deps = [];
  1708. this.parent = void 0;
  1709. recordEffectScope(this, scope);
  1710. }
  1711. run() {
  1712. if (!this.active) {
  1713. return this.fn();
  1714. }
  1715. let parent = activeEffect;
  1716. let lastShouldTrack = shouldTrack;
  1717. while (parent) {
  1718. if (parent === this) {
  1719. return;
  1720. }
  1721. parent = parent.parent;
  1722. }
  1723. try {
  1724. this.parent = activeEffect;
  1725. activeEffect = this;
  1726. shouldTrack = true;
  1727. trackOpBit = 1 << ++effectTrackDepth;
  1728. if (effectTrackDepth <= maxMarkerBits) {
  1729. initDepMarkers(this);
  1730. } else {
  1731. cleanupEffect(this);
  1732. }
  1733. return this.fn();
  1734. } finally {
  1735. if (effectTrackDepth <= maxMarkerBits) {
  1736. finalizeDepMarkers(this);
  1737. }
  1738. trackOpBit = 1 << --effectTrackDepth;
  1739. activeEffect = this.parent;
  1740. shouldTrack = lastShouldTrack;
  1741. this.parent = void 0;
  1742. if (this.deferStop) {
  1743. this.stop();
  1744. }
  1745. }
  1746. }
  1747. stop() {
  1748. if (activeEffect === this) {
  1749. this.deferStop = true;
  1750. } else if (this.active) {
  1751. cleanupEffect(this);
  1752. if (this.onStop) {
  1753. this.onStop();
  1754. }
  1755. this.active = false;
  1756. }
  1757. }
  1758. }
  1759. function cleanupEffect(effect) {
  1760. const { deps } = effect;
  1761. if (deps.length) {
  1762. for (let i = 0; i < deps.length; i++) {
  1763. deps[i].delete(effect);
  1764. }
  1765. deps.length = 0;
  1766. }
  1767. }
  1768. let shouldTrack = true;
  1769. const trackStack = [];
  1770. function pauseTracking() {
  1771. trackStack.push(shouldTrack);
  1772. shouldTrack = false;
  1773. }
  1774. function resetTracking() {
  1775. const last = trackStack.pop();
  1776. shouldTrack = last === void 0 ? true : last;
  1777. }
  1778. function track(target, type2, key) {
  1779. if (shouldTrack && activeEffect) {
  1780. let depsMap = targetMap.get(target);
  1781. if (!depsMap) {
  1782. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  1783. }
  1784. let dep = depsMap.get(key);
  1785. if (!dep) {
  1786. depsMap.set(key, dep = createDep());
  1787. }
  1788. const eventInfo = { effect: activeEffect, target, type: type2, key };
  1789. trackEffects(dep, eventInfo);
  1790. }
  1791. }
  1792. function trackEffects(dep, debuggerEventExtraInfo) {
  1793. let shouldTrack2 = false;
  1794. if (effectTrackDepth <= maxMarkerBits) {
  1795. if (!newTracked(dep)) {
  1796. dep.n |= trackOpBit;
  1797. shouldTrack2 = !wasTracked(dep);
  1798. }
  1799. } else {
  1800. shouldTrack2 = !dep.has(activeEffect);
  1801. }
  1802. if (shouldTrack2) {
  1803. dep.add(activeEffect);
  1804. activeEffect.deps.push(dep);
  1805. if (activeEffect.onTrack) {
  1806. activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
  1807. }
  1808. }
  1809. }
  1810. function trigger(target, type2, key, newValue, oldValue, oldTarget) {
  1811. const depsMap = targetMap.get(target);
  1812. if (!depsMap) {
  1813. return;
  1814. }
  1815. let deps = [];
  1816. if (type2 === "clear") {
  1817. deps = [...depsMap.values()];
  1818. } else if (key === "length" && isArray$2(target)) {
  1819. const newLength = Number(newValue);
  1820. depsMap.forEach((dep, key2) => {
  1821. if (key2 === "length" || key2 >= newLength) {
  1822. deps.push(dep);
  1823. }
  1824. });
  1825. } else {
  1826. if (key !== void 0) {
  1827. deps.push(depsMap.get(key));
  1828. }
  1829. switch (type2) {
  1830. case "add":
  1831. if (!isArray$2(target)) {
  1832. deps.push(depsMap.get(ITERATE_KEY));
  1833. if (isMap(target)) {
  1834. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  1835. }
  1836. } else if (isIntegerKey(key)) {
  1837. deps.push(depsMap.get("length"));
  1838. }
  1839. break;
  1840. case "delete":
  1841. if (!isArray$2(target)) {
  1842. deps.push(depsMap.get(ITERATE_KEY));
  1843. if (isMap(target)) {
  1844. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  1845. }
  1846. }
  1847. break;
  1848. case "set":
  1849. if (isMap(target)) {
  1850. deps.push(depsMap.get(ITERATE_KEY));
  1851. }
  1852. break;
  1853. }
  1854. }
  1855. const eventInfo = { target, type: type2, key, newValue, oldValue, oldTarget };
  1856. if (deps.length === 1) {
  1857. if (deps[0]) {
  1858. {
  1859. triggerEffects(deps[0], eventInfo);
  1860. }
  1861. }
  1862. } else {
  1863. const effects = [];
  1864. for (const dep of deps) {
  1865. if (dep) {
  1866. effects.push(...dep);
  1867. }
  1868. }
  1869. {
  1870. triggerEffects(createDep(effects), eventInfo);
  1871. }
  1872. }
  1873. }
  1874. function triggerEffects(dep, debuggerEventExtraInfo) {
  1875. const effects = isArray$2(dep) ? dep : [...dep];
  1876. for (const effect of effects) {
  1877. if (effect.computed) {
  1878. triggerEffect(effect, debuggerEventExtraInfo);
  1879. }
  1880. }
  1881. for (const effect of effects) {
  1882. if (!effect.computed) {
  1883. triggerEffect(effect, debuggerEventExtraInfo);
  1884. }
  1885. }
  1886. }
  1887. function triggerEffect(effect, debuggerEventExtraInfo) {
  1888. if (effect !== activeEffect || effect.allowRecurse) {
  1889. if (effect.onTrigger) {
  1890. effect.onTrigger(extend$1({ effect }, debuggerEventExtraInfo));
  1891. }
  1892. if (effect.scheduler) {
  1893. effect.scheduler();
  1894. } else {
  1895. effect.run();
  1896. }
  1897. }
  1898. }
  1899. const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
  1900. const builtInSymbols = new Set(
  1901. /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  1902. );
  1903. const get$1$1 = /* @__PURE__ */ createGetter();
  1904. const shallowGet = /* @__PURE__ */ createGetter(false, true);
  1905. const readonlyGet = /* @__PURE__ */ createGetter(true);
  1906. const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
  1907. const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
  1908. function createArrayInstrumentations() {
  1909. const instrumentations = {};
  1910. ["includes", "indexOf", "lastIndexOf"].forEach((key) => {
  1911. instrumentations[key] = function(...args) {
  1912. const arr = toRaw(this);
  1913. for (let i = 0, l = this.length; i < l; i++) {
  1914. track(arr, "get", i + "");
  1915. }
  1916. const res = arr[key](...args);
  1917. if (res === -1 || res === false) {
  1918. return arr[key](...args.map(toRaw));
  1919. } else {
  1920. return res;
  1921. }
  1922. };
  1923. });
  1924. ["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
  1925. instrumentations[key] = function(...args) {
  1926. pauseTracking();
  1927. const res = toRaw(this)[key].apply(this, args);
  1928. resetTracking();
  1929. return res;
  1930. };
  1931. });
  1932. return instrumentations;
  1933. }
  1934. function hasOwnProperty(key) {
  1935. const obj = toRaw(this);
  1936. track(obj, "has", key);
  1937. return obj.hasOwnProperty(key);
  1938. }
  1939. function createGetter(isReadonly2 = false, shallow = false) {
  1940. return function get2(target, key, receiver) {
  1941. if (key === "__v_isReactive") {
  1942. return !isReadonly2;
  1943. } else if (key === "__v_isReadonly") {
  1944. return isReadonly2;
  1945. } else if (key === "__v_isShallow") {
  1946. return shallow;
  1947. } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
  1948. return target;
  1949. }
  1950. const targetIsArray = isArray$2(target);
  1951. if (!isReadonly2) {
  1952. if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
  1953. return Reflect.get(arrayInstrumentations, key, receiver);
  1954. }
  1955. if (key === "hasOwnProperty") {
  1956. return hasOwnProperty;
  1957. }
  1958. }
  1959. const res = Reflect.get(target, key, receiver);
  1960. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  1961. return res;
  1962. }
  1963. if (!isReadonly2) {
  1964. track(target, "get", key);
  1965. }
  1966. if (shallow) {
  1967. return res;
  1968. }
  1969. if (isRef(res)) {
  1970. return targetIsArray && isIntegerKey(key) ? res : res.value;
  1971. }
  1972. if (isObject$2(res)) {
  1973. return isReadonly2 ? readonly(res) : reactive(res);
  1974. }
  1975. return res;
  1976. };
  1977. }
  1978. const set$1$1 = /* @__PURE__ */ createSetter();
  1979. const shallowSet = /* @__PURE__ */ createSetter(true);
  1980. function createSetter(shallow = false) {
  1981. return function set2(target, key, value2, receiver) {
  1982. let oldValue = target[key];
  1983. if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value2)) {
  1984. return false;
  1985. }
  1986. if (!shallow) {
  1987. if (!isShallow(value2) && !isReadonly(value2)) {
  1988. oldValue = toRaw(oldValue);
  1989. value2 = toRaw(value2);
  1990. }
  1991. if (!isArray$2(target) && isRef(oldValue) && !isRef(value2)) {
  1992. oldValue.value = value2;
  1993. return true;
  1994. }
  1995. }
  1996. const hadKey = isArray$2(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  1997. const result = Reflect.set(target, key, value2, receiver);
  1998. if (target === toRaw(receiver)) {
  1999. if (!hadKey) {
  2000. trigger(target, "add", key, value2);
  2001. } else if (hasChanged(value2, oldValue)) {
  2002. trigger(target, "set", key, value2, oldValue);
  2003. }
  2004. }
  2005. return result;
  2006. };
  2007. }
  2008. function deleteProperty(target, key) {
  2009. const hadKey = hasOwn(target, key);
  2010. const oldValue = target[key];
  2011. const result = Reflect.deleteProperty(target, key);
  2012. if (result && hadKey) {
  2013. trigger(target, "delete", key, void 0, oldValue);
  2014. }
  2015. return result;
  2016. }
  2017. function has$1(target, key) {
  2018. const result = Reflect.has(target, key);
  2019. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  2020. track(target, "has", key);
  2021. }
  2022. return result;
  2023. }
  2024. function ownKeys(target) {
  2025. track(target, "iterate", isArray$2(target) ? "length" : ITERATE_KEY);
  2026. return Reflect.ownKeys(target);
  2027. }
  2028. const mutableHandlers = {
  2029. get: get$1$1,
  2030. set: set$1$1,
  2031. deleteProperty,
  2032. has: has$1,
  2033. ownKeys
  2034. };
  2035. const readonlyHandlers = {
  2036. get: readonlyGet,
  2037. set(target, key) {
  2038. {
  2039. warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
  2040. }
  2041. return true;
  2042. },
  2043. deleteProperty(target, key) {
  2044. {
  2045. warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
  2046. }
  2047. return true;
  2048. }
  2049. };
  2050. const shallowReactiveHandlers = /* @__PURE__ */ extend$1({}, mutableHandlers, {
  2051. get: shallowGet,
  2052. set: shallowSet
  2053. });
  2054. const shallowReadonlyHandlers = /* @__PURE__ */ extend$1({}, readonlyHandlers, {
  2055. get: shallowReadonlyGet
  2056. });
  2057. const toShallow = (value2) => value2;
  2058. const getProto = (v) => Reflect.getPrototypeOf(v);
  2059. function get$3(target, key, isReadonly2 = false, isShallow2 = false) {
  2060. target = target[
  2061. "__v_raw"
  2062. /* ReactiveFlags.RAW */
  2063. ];
  2064. const rawTarget = toRaw(target);
  2065. const rawKey = toRaw(key);
  2066. if (!isReadonly2) {
  2067. if (key !== rawKey) {
  2068. track(rawTarget, "get", key);
  2069. }
  2070. track(rawTarget, "get", rawKey);
  2071. }
  2072. const { has: has2 } = getProto(rawTarget);
  2073. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2074. if (has2.call(rawTarget, key)) {
  2075. return wrap(target.get(key));
  2076. } else if (has2.call(rawTarget, rawKey)) {
  2077. return wrap(target.get(rawKey));
  2078. } else if (target !== rawTarget) {
  2079. target.get(key);
  2080. }
  2081. }
  2082. function has(key, isReadonly2 = false) {
  2083. const target = this[
  2084. "__v_raw"
  2085. /* ReactiveFlags.RAW */
  2086. ];
  2087. const rawTarget = toRaw(target);
  2088. const rawKey = toRaw(key);
  2089. if (!isReadonly2) {
  2090. if (key !== rawKey) {
  2091. track(rawTarget, "has", key);
  2092. }
  2093. track(rawTarget, "has", rawKey);
  2094. }
  2095. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  2096. }
  2097. function size(target, isReadonly2 = false) {
  2098. target = target[
  2099. "__v_raw"
  2100. /* ReactiveFlags.RAW */
  2101. ];
  2102. !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  2103. return Reflect.get(target, "size", target);
  2104. }
  2105. function add$2(value2) {
  2106. value2 = toRaw(value2);
  2107. const target = toRaw(this);
  2108. const proto2 = getProto(target);
  2109. const hadKey = proto2.has.call(target, value2);
  2110. if (!hadKey) {
  2111. target.add(value2);
  2112. trigger(target, "add", value2, value2);
  2113. }
  2114. return this;
  2115. }
  2116. function set$2(key, value2) {
  2117. value2 = toRaw(value2);
  2118. const target = toRaw(this);
  2119. const { has: has2, get: get2 } = getProto(target);
  2120. let hadKey = has2.call(target, key);
  2121. if (!hadKey) {
  2122. key = toRaw(key);
  2123. hadKey = has2.call(target, key);
  2124. } else {
  2125. checkIdentityKeys(target, has2, key);
  2126. }
  2127. const oldValue = get2.call(target, key);
  2128. target.set(key, value2);
  2129. if (!hadKey) {
  2130. trigger(target, "add", key, value2);
  2131. } else if (hasChanged(value2, oldValue)) {
  2132. trigger(target, "set", key, value2, oldValue);
  2133. }
  2134. return this;
  2135. }
  2136. function deleteEntry(key) {
  2137. const target = toRaw(this);
  2138. const { has: has2, get: get2 } = getProto(target);
  2139. let hadKey = has2.call(target, key);
  2140. if (!hadKey) {
  2141. key = toRaw(key);
  2142. hadKey = has2.call(target, key);
  2143. } else {
  2144. checkIdentityKeys(target, has2, key);
  2145. }
  2146. const oldValue = get2 ? get2.call(target, key) : void 0;
  2147. const result = target.delete(key);
  2148. if (hadKey) {
  2149. trigger(target, "delete", key, void 0, oldValue);
  2150. }
  2151. return result;
  2152. }
  2153. function clear() {
  2154. const target = toRaw(this);
  2155. const hadItems = target.size !== 0;
  2156. const oldTarget = isMap(target) ? new Map(target) : new Set(target);
  2157. const result = target.clear();
  2158. if (hadItems) {
  2159. trigger(target, "clear", void 0, void 0, oldTarget);
  2160. }
  2161. return result;
  2162. }
  2163. function createForEach(isReadonly2, isShallow2) {
  2164. return function forEach3(callback, thisArg) {
  2165. const observed = this;
  2166. const target = observed[
  2167. "__v_raw"
  2168. /* ReactiveFlags.RAW */
  2169. ];
  2170. const rawTarget = toRaw(target);
  2171. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2172. !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  2173. return target.forEach((value2, key) => {
  2174. return callback.call(thisArg, wrap(value2), wrap(key), observed);
  2175. });
  2176. };
  2177. }
  2178. function createIterableMethod(method3, isReadonly2, isShallow2) {
  2179. return function(...args) {
  2180. const target = this[
  2181. "__v_raw"
  2182. /* ReactiveFlags.RAW */
  2183. ];
  2184. const rawTarget = toRaw(target);
  2185. const targetIsMap = isMap(rawTarget);
  2186. const isPair = method3 === "entries" || method3 === Symbol.iterator && targetIsMap;
  2187. const isKeyOnly = method3 === "keys" && targetIsMap;
  2188. const innerIterator = target[method3](...args);
  2189. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  2190. !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
  2191. return {
  2192. // iterator protocol
  2193. next() {
  2194. const { value: value2, done } = innerIterator.next();
  2195. return done ? { value: value2, done } : {
  2196. value: isPair ? [wrap(value2[0]), wrap(value2[1])] : wrap(value2),
  2197. done
  2198. };
  2199. },
  2200. // iterable protocol
  2201. [Symbol.iterator]() {
  2202. return this;
  2203. }
  2204. };
  2205. };
  2206. }
  2207. function createReadonlyMethod(type2) {
  2208. return function(...args) {
  2209. {
  2210. const key = args[0] ? `on key "${args[0]}" ` : ``;
  2211. console.warn(`${capitalize(type2)} operation ${key}failed: target is readonly.`, toRaw(this));
  2212. }
  2213. return type2 === "delete" ? false : this;
  2214. };
  2215. }
  2216. function createInstrumentations() {
  2217. const mutableInstrumentations2 = {
  2218. get(key) {
  2219. return get$3(this, key);
  2220. },
  2221. get size() {
  2222. return size(this);
  2223. },
  2224. has,
  2225. add: add$2,
  2226. set: set$2,
  2227. delete: deleteEntry,
  2228. clear,
  2229. forEach: createForEach(false, false)
  2230. };
  2231. const shallowInstrumentations2 = {
  2232. get(key) {
  2233. return get$3(this, key, false, true);
  2234. },
  2235. get size() {
  2236. return size(this);
  2237. },
  2238. has,
  2239. add: add$2,
  2240. set: set$2,
  2241. delete: deleteEntry,
  2242. clear,
  2243. forEach: createForEach(false, true)
  2244. };
  2245. const readonlyInstrumentations2 = {
  2246. get(key) {
  2247. return get$3(this, key, true);
  2248. },
  2249. get size() {
  2250. return size(this, true);
  2251. },
  2252. has(key) {
  2253. return has.call(this, key, true);
  2254. },
  2255. add: createReadonlyMethod(
  2256. "add"
  2257. /* TriggerOpTypes.ADD */
  2258. ),
  2259. set: createReadonlyMethod(
  2260. "set"
  2261. /* TriggerOpTypes.SET */
  2262. ),
  2263. delete: createReadonlyMethod(
  2264. "delete"
  2265. /* TriggerOpTypes.DELETE */
  2266. ),
  2267. clear: createReadonlyMethod(
  2268. "clear"
  2269. /* TriggerOpTypes.CLEAR */
  2270. ),
  2271. forEach: createForEach(true, false)
  2272. };
  2273. const shallowReadonlyInstrumentations2 = {
  2274. get(key) {
  2275. return get$3(this, key, true, true);
  2276. },
  2277. get size() {
  2278. return size(this, true);
  2279. },
  2280. has(key) {
  2281. return has.call(this, key, true);
  2282. },
  2283. add: createReadonlyMethod(
  2284. "add"
  2285. /* TriggerOpTypes.ADD */
  2286. ),
  2287. set: createReadonlyMethod(
  2288. "set"
  2289. /* TriggerOpTypes.SET */
  2290. ),
  2291. delete: createReadonlyMethod(
  2292. "delete"
  2293. /* TriggerOpTypes.DELETE */
  2294. ),
  2295. clear: createReadonlyMethod(
  2296. "clear"
  2297. /* TriggerOpTypes.CLEAR */
  2298. ),
  2299. forEach: createForEach(true, true)
  2300. };
  2301. const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
  2302. iteratorMethods.forEach((method3) => {
  2303. mutableInstrumentations2[method3] = createIterableMethod(method3, false, false);
  2304. readonlyInstrumentations2[method3] = createIterableMethod(method3, true, false);
  2305. shallowInstrumentations2[method3] = createIterableMethod(method3, false, true);
  2306. shallowReadonlyInstrumentations2[method3] = createIterableMethod(method3, true, true);
  2307. });
  2308. return [
  2309. mutableInstrumentations2,
  2310. readonlyInstrumentations2,
  2311. shallowInstrumentations2,
  2312. shallowReadonlyInstrumentations2
  2313. ];
  2314. }
  2315. const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations();
  2316. function createInstrumentationGetter(isReadonly2, shallow) {
  2317. const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
  2318. return (target, key, receiver) => {
  2319. if (key === "__v_isReactive") {
  2320. return !isReadonly2;
  2321. } else if (key === "__v_isReadonly") {
  2322. return isReadonly2;
  2323. } else if (key === "__v_raw") {
  2324. return target;
  2325. }
  2326. return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
  2327. };
  2328. }
  2329. const mutableCollectionHandlers = {
  2330. get: /* @__PURE__ */ createInstrumentationGetter(false, false)
  2331. };
  2332. const shallowCollectionHandlers = {
  2333. get: /* @__PURE__ */ createInstrumentationGetter(false, true)
  2334. };
  2335. const readonlyCollectionHandlers = {
  2336. get: /* @__PURE__ */ createInstrumentationGetter(true, false)
  2337. };
  2338. const shallowReadonlyCollectionHandlers = {
  2339. get: /* @__PURE__ */ createInstrumentationGetter(true, true)
  2340. };
  2341. function checkIdentityKeys(target, has2, key) {
  2342. const rawKey = toRaw(key);
  2343. if (rawKey !== key && has2.call(target, rawKey)) {
  2344. const type2 = toRawType(target);
  2345. console.warn(`Reactive ${type2} contains both the raw and reactive versions of the same object${type2 === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
  2346. }
  2347. }
  2348. const reactiveMap = /* @__PURE__ */ new WeakMap();
  2349. const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  2350. const readonlyMap = /* @__PURE__ */ new WeakMap();
  2351. const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  2352. function targetTypeMap(rawType) {
  2353. switch (rawType) {
  2354. case "Object":
  2355. case "Array":
  2356. return 1;
  2357. case "Map":
  2358. case "Set":
  2359. case "WeakMap":
  2360. case "WeakSet":
  2361. return 2;
  2362. default:
  2363. return 0;
  2364. }
  2365. }
  2366. function getTargetType(value2) {
  2367. return value2[
  2368. "__v_skip"
  2369. /* ReactiveFlags.SKIP */
  2370. ] || !Object.isExtensible(value2) ? 0 : targetTypeMap(toRawType(value2));
  2371. }
  2372. function reactive(target) {
  2373. if (isReadonly(target)) {
  2374. return target;
  2375. }
  2376. return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
  2377. }
  2378. function shallowReactive(target) {
  2379. return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
  2380. }
  2381. function readonly(target) {
  2382. return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
  2383. }
  2384. function shallowReadonly(target) {
  2385. return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
  2386. }
  2387. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  2388. if (!isObject$2(target)) {
  2389. {
  2390. console.warn(`value cannot be made reactive: ${String(target)}`);
  2391. }
  2392. return target;
  2393. }
  2394. if (target[
  2395. "__v_raw"
  2396. /* ReactiveFlags.RAW */
  2397. ] && !(isReadonly2 && target[
  2398. "__v_isReactive"
  2399. /* ReactiveFlags.IS_REACTIVE */
  2400. ])) {
  2401. return target;
  2402. }
  2403. const existingProxy = proxyMap.get(target);
  2404. if (existingProxy) {
  2405. return existingProxy;
  2406. }
  2407. const targetType = getTargetType(target);
  2408. if (targetType === 0) {
  2409. return target;
  2410. }
  2411. const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
  2412. proxyMap.set(target, proxy);
  2413. return proxy;
  2414. }
  2415. function isReactive(value2) {
  2416. if (isReadonly(value2)) {
  2417. return isReactive(value2[
  2418. "__v_raw"
  2419. /* ReactiveFlags.RAW */
  2420. ]);
  2421. }
  2422. return !!(value2 && value2[
  2423. "__v_isReactive"
  2424. /* ReactiveFlags.IS_REACTIVE */
  2425. ]);
  2426. }
  2427. function isReadonly(value2) {
  2428. return !!(value2 && value2[
  2429. "__v_isReadonly"
  2430. /* ReactiveFlags.IS_READONLY */
  2431. ]);
  2432. }
  2433. function isShallow(value2) {
  2434. return !!(value2 && value2[
  2435. "__v_isShallow"
  2436. /* ReactiveFlags.IS_SHALLOW */
  2437. ]);
  2438. }
  2439. function isProxy(value2) {
  2440. return isReactive(value2) || isReadonly(value2);
  2441. }
  2442. function toRaw(observed) {
  2443. const raw = observed && observed[
  2444. "__v_raw"
  2445. /* ReactiveFlags.RAW */
  2446. ];
  2447. return raw ? toRaw(raw) : observed;
  2448. }
  2449. function markRaw(value2) {
  2450. def(value2, "__v_skip", true);
  2451. return value2;
  2452. }
  2453. const toReactive = (value2) => isObject$2(value2) ? reactive(value2) : value2;
  2454. const toReadonly = (value2) => isObject$2(value2) ? readonly(value2) : value2;
  2455. function trackRefValue(ref2) {
  2456. if (shouldTrack && activeEffect) {
  2457. ref2 = toRaw(ref2);
  2458. {
  2459. trackEffects(ref2.dep || (ref2.dep = createDep()), {
  2460. target: ref2,
  2461. type: "get",
  2462. key: "value"
  2463. });
  2464. }
  2465. }
  2466. }
  2467. function triggerRefValue(ref2, newVal) {
  2468. ref2 = toRaw(ref2);
  2469. const dep = ref2.dep;
  2470. if (dep) {
  2471. {
  2472. triggerEffects(dep, {
  2473. target: ref2,
  2474. type: "set",
  2475. key: "value",
  2476. newValue: newVal
  2477. });
  2478. }
  2479. }
  2480. }
  2481. function isRef(r) {
  2482. return !!(r && r.__v_isRef === true);
  2483. }
  2484. function ref(value2) {
  2485. return createRef(value2, false);
  2486. }
  2487. function createRef(rawValue, shallow) {
  2488. if (isRef(rawValue)) {
  2489. return rawValue;
  2490. }
  2491. return new RefImpl(rawValue, shallow);
  2492. }
  2493. class RefImpl {
  2494. constructor(value2, __v_isShallow) {
  2495. this.__v_isShallow = __v_isShallow;
  2496. this.dep = void 0;
  2497. this.__v_isRef = true;
  2498. this._rawValue = __v_isShallow ? value2 : toRaw(value2);
  2499. this._value = __v_isShallow ? value2 : toReactive(value2);
  2500. }
  2501. get value() {
  2502. trackRefValue(this);
  2503. return this._value;
  2504. }
  2505. set value(newVal) {
  2506. const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
  2507. newVal = useDirectValue ? newVal : toRaw(newVal);
  2508. if (hasChanged(newVal, this._rawValue)) {
  2509. this._rawValue = newVal;
  2510. this._value = useDirectValue ? newVal : toReactive(newVal);
  2511. triggerRefValue(this, newVal);
  2512. }
  2513. }
  2514. }
  2515. function unref(ref2) {
  2516. return isRef(ref2) ? ref2.value : ref2;
  2517. }
  2518. const shallowUnwrapHandlers = {
  2519. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  2520. set: (target, key, value2, receiver) => {
  2521. const oldValue = target[key];
  2522. if (isRef(oldValue) && !isRef(value2)) {
  2523. oldValue.value = value2;
  2524. return true;
  2525. } else {
  2526. return Reflect.set(target, key, value2, receiver);
  2527. }
  2528. }
  2529. };
  2530. function proxyRefs(objectWithRefs) {
  2531. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  2532. }
  2533. var _a;
  2534. class ComputedRefImpl {
  2535. constructor(getter, _setter, isReadonly2, isSSR) {
  2536. this._setter = _setter;
  2537. this.dep = void 0;
  2538. this.__v_isRef = true;
  2539. this[_a] = false;
  2540. this._dirty = true;
  2541. this.effect = new ReactiveEffect(getter, () => {
  2542. if (!this._dirty) {
  2543. this._dirty = true;
  2544. triggerRefValue(this);
  2545. }
  2546. });
  2547. this.effect.computed = this;
  2548. this.effect.active = this._cacheable = !isSSR;
  2549. this[
  2550. "__v_isReadonly"
  2551. /* ReactiveFlags.IS_READONLY */
  2552. ] = isReadonly2;
  2553. }
  2554. get value() {
  2555. const self = toRaw(this);
  2556. trackRefValue(self);
  2557. if (self._dirty || !self._cacheable) {
  2558. self._dirty = false;
  2559. self._value = self.effect.run();
  2560. }
  2561. return self._value;
  2562. }
  2563. set value(newValue) {
  2564. this._setter(newValue);
  2565. }
  2566. }
  2567. _a = "__v_isReadonly";
  2568. function computed$1(getterOrOptions, debugOptions, isSSR = false) {
  2569. let getter;
  2570. let setter;
  2571. const onlyGetter = isFunction$1(getterOrOptions);
  2572. if (onlyGetter) {
  2573. getter = getterOrOptions;
  2574. setter = () => {
  2575. console.warn("Write operation failed: computed value is readonly");
  2576. };
  2577. } else {
  2578. getter = getterOrOptions.get;
  2579. setter = getterOrOptions.set;
  2580. }
  2581. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  2582. if (debugOptions && !isSSR) {
  2583. cRef.effect.onTrack = debugOptions.onTrack;
  2584. cRef.effect.onTrigger = debugOptions.onTrigger;
  2585. }
  2586. return cRef;
  2587. }
  2588. const stack = [];
  2589. function pushWarningContext(vnode) {
  2590. stack.push(vnode);
  2591. }
  2592. function popWarningContext() {
  2593. stack.pop();
  2594. }
  2595. function warn$2(msg, ...args) {
  2596. pauseTracking();
  2597. const instance = stack.length ? stack[stack.length - 1].component : null;
  2598. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  2599. const trace = getComponentTrace();
  2600. if (appWarnHandler) {
  2601. callWithErrorHandling(appWarnHandler, instance, 11, [
  2602. msg + args.join(""),
  2603. instance && instance.proxy,
  2604. trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
  2605. trace
  2606. ]);
  2607. } else {
  2608. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  2609. if (trace.length && // avoid spamming console during tests
  2610. true) {
  2611. warnArgs.push(`
  2612. `, ...formatTrace(trace));
  2613. }
  2614. console.warn(...warnArgs);
  2615. }
  2616. resetTracking();
  2617. }
  2618. function getComponentTrace() {
  2619. let currentVNode = stack[stack.length - 1];
  2620. if (!currentVNode) {
  2621. return [];
  2622. }
  2623. const normalizedStack = [];
  2624. while (currentVNode) {
  2625. const last = normalizedStack[0];
  2626. if (last && last.vnode === currentVNode) {
  2627. last.recurseCount++;
  2628. } else {
  2629. normalizedStack.push({
  2630. vnode: currentVNode,
  2631. recurseCount: 0
  2632. });
  2633. }
  2634. const parentInstance = currentVNode.component && currentVNode.component.parent;
  2635. currentVNode = parentInstance && parentInstance.vnode;
  2636. }
  2637. return normalizedStack;
  2638. }
  2639. function formatTrace(trace) {
  2640. const logs = [];
  2641. trace.forEach((entry, i) => {
  2642. logs.push(...i === 0 ? [] : [`
  2643. `], ...formatTraceEntry(entry));
  2644. });
  2645. return logs;
  2646. }
  2647. function formatTraceEntry({ vnode, recurseCount }) {
  2648. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  2649. const isRoot = vnode.component ? vnode.component.parent == null : false;
  2650. const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
  2651. const close = `>` + postfix;
  2652. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  2653. }
  2654. function formatProps(props2) {
  2655. const res = [];
  2656. const keys2 = Object.keys(props2);
  2657. keys2.slice(0, 3).forEach((key) => {
  2658. res.push(...formatProp(key, props2[key]));
  2659. });
  2660. if (keys2.length > 3) {
  2661. res.push(` ...`);
  2662. }
  2663. return res;
  2664. }
  2665. function formatProp(key, value2, raw) {
  2666. if (isString$1(value2)) {
  2667. value2 = JSON.stringify(value2);
  2668. return raw ? value2 : [`${key}=${value2}`];
  2669. } else if (typeof value2 === "number" || typeof value2 === "boolean" || value2 == null) {
  2670. return raw ? value2 : [`${key}=${value2}`];
  2671. } else if (isRef(value2)) {
  2672. value2 = formatProp(key, toRaw(value2.value), true);
  2673. return raw ? value2 : [`${key}=Ref<`, value2, `>`];
  2674. } else if (isFunction$1(value2)) {
  2675. return [`${key}=fn${value2.name ? `<${value2.name}>` : ``}`];
  2676. } else {
  2677. value2 = toRaw(value2);
  2678. return raw ? value2 : [`${key}=`, value2];
  2679. }
  2680. }
  2681. const ErrorTypeStrings = {
  2682. [
  2683. "sp"
  2684. /* LifecycleHooks.SERVER_PREFETCH */
  2685. ]: "serverPrefetch hook",
  2686. [
  2687. "bc"
  2688. /* LifecycleHooks.BEFORE_CREATE */
  2689. ]: "beforeCreate hook",
  2690. [
  2691. "c"
  2692. /* LifecycleHooks.CREATED */
  2693. ]: "created hook",
  2694. [
  2695. "bm"
  2696. /* LifecycleHooks.BEFORE_MOUNT */
  2697. ]: "beforeMount hook",
  2698. [
  2699. "m"
  2700. /* LifecycleHooks.MOUNTED */
  2701. ]: "mounted hook",
  2702. [
  2703. "bu"
  2704. /* LifecycleHooks.BEFORE_UPDATE */
  2705. ]: "beforeUpdate hook",
  2706. [
  2707. "u"
  2708. /* LifecycleHooks.UPDATED */
  2709. ]: "updated",
  2710. [
  2711. "bum"
  2712. /* LifecycleHooks.BEFORE_UNMOUNT */
  2713. ]: "beforeUnmount hook",
  2714. [
  2715. "um"
  2716. /* LifecycleHooks.UNMOUNTED */
  2717. ]: "unmounted hook",
  2718. [
  2719. "a"
  2720. /* LifecycleHooks.ACTIVATED */
  2721. ]: "activated hook",
  2722. [
  2723. "da"
  2724. /* LifecycleHooks.DEACTIVATED */
  2725. ]: "deactivated hook",
  2726. [
  2727. "ec"
  2728. /* LifecycleHooks.ERROR_CAPTURED */
  2729. ]: "errorCaptured hook",
  2730. [
  2731. "rtc"
  2732. /* LifecycleHooks.RENDER_TRACKED */
  2733. ]: "renderTracked hook",
  2734. [
  2735. "rtg"
  2736. /* LifecycleHooks.RENDER_TRIGGERED */
  2737. ]: "renderTriggered hook",
  2738. [
  2739. 0
  2740. /* ErrorCodes.SETUP_FUNCTION */
  2741. ]: "setup function",
  2742. [
  2743. 1
  2744. /* ErrorCodes.RENDER_FUNCTION */
  2745. ]: "render function",
  2746. [
  2747. 2
  2748. /* ErrorCodes.WATCH_GETTER */
  2749. ]: "watcher getter",
  2750. [
  2751. 3
  2752. /* ErrorCodes.WATCH_CALLBACK */
  2753. ]: "watcher callback",
  2754. [
  2755. 4
  2756. /* ErrorCodes.WATCH_CLEANUP */
  2757. ]: "watcher cleanup function",
  2758. [
  2759. 5
  2760. /* ErrorCodes.NATIVE_EVENT_HANDLER */
  2761. ]: "native event handler",
  2762. [
  2763. 6
  2764. /* ErrorCodes.COMPONENT_EVENT_HANDLER */
  2765. ]: "component event handler",
  2766. [
  2767. 7
  2768. /* ErrorCodes.VNODE_HOOK */
  2769. ]: "vnode hook",
  2770. [
  2771. 8
  2772. /* ErrorCodes.DIRECTIVE_HOOK */
  2773. ]: "directive hook",
  2774. [
  2775. 9
  2776. /* ErrorCodes.TRANSITION_HOOK */
  2777. ]: "transition hook",
  2778. [
  2779. 10
  2780. /* ErrorCodes.APP_ERROR_HANDLER */
  2781. ]: "app errorHandler",
  2782. [
  2783. 11
  2784. /* ErrorCodes.APP_WARN_HANDLER */
  2785. ]: "app warnHandler",
  2786. [
  2787. 12
  2788. /* ErrorCodes.FUNCTION_REF */
  2789. ]: "ref function",
  2790. [
  2791. 13
  2792. /* ErrorCodes.ASYNC_COMPONENT_LOADER */
  2793. ]: "async component loader",
  2794. [
  2795. 14
  2796. /* ErrorCodes.SCHEDULER */
  2797. ]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
  2798. };
  2799. function callWithErrorHandling(fn, instance, type2, args) {
  2800. let res;
  2801. try {
  2802. res = args ? fn(...args) : fn();
  2803. } catch (err) {
  2804. handleError(err, instance, type2);
  2805. }
  2806. return res;
  2807. }
  2808. function callWithAsyncErrorHandling(fn, instance, type2, args) {
  2809. if (isFunction$1(fn)) {
  2810. const res = callWithErrorHandling(fn, instance, type2, args);
  2811. if (res && isPromise(res)) {
  2812. res.catch((err) => {
  2813. handleError(err, instance, type2);
  2814. });
  2815. }
  2816. return res;
  2817. }
  2818. const values = [];
  2819. for (let i = 0; i < fn.length; i++) {
  2820. values.push(callWithAsyncErrorHandling(fn[i], instance, type2, args));
  2821. }
  2822. return values;
  2823. }
  2824. function handleError(err, instance, type2, throwInDev = true) {
  2825. const contextVNode = instance ? instance.vnode : null;
  2826. if (instance) {
  2827. let cur = instance.parent;
  2828. const exposedInstance = instance.proxy;
  2829. const errorInfo = ErrorTypeStrings[type2] || type2;
  2830. while (cur) {
  2831. const errorCapturedHooks = cur.ec;
  2832. if (errorCapturedHooks) {
  2833. for (let i = 0; i < errorCapturedHooks.length; i++) {
  2834. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  2835. return;
  2836. }
  2837. }
  2838. }
  2839. cur = cur.parent;
  2840. }
  2841. const appErrorHandler = instance.appContext.config.errorHandler;
  2842. if (appErrorHandler) {
  2843. callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]);
  2844. return;
  2845. }
  2846. }
  2847. logError(err, type2, contextVNode, throwInDev);
  2848. }
  2849. function logError(err, type2, contextVNode, throwInDev = true) {
  2850. {
  2851. const info = ErrorTypeStrings[type2] || type2;
  2852. if (contextVNode) {
  2853. pushWarningContext(contextVNode);
  2854. }
  2855. warn$2(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  2856. if (contextVNode) {
  2857. popWarningContext();
  2858. }
  2859. if (throwInDev) {
  2860. console.error(err);
  2861. } else {
  2862. console.error(err);
  2863. }
  2864. }
  2865. }
  2866. let isFlushing = false;
  2867. let isFlushPending = false;
  2868. const queue = [];
  2869. let flushIndex = 0;
  2870. const pendingPostFlushCbs = [];
  2871. let activePostFlushCbs = null;
  2872. let postFlushIndex = 0;
  2873. const resolvedPromise = /* @__PURE__ */ Promise.resolve();
  2874. let currentFlushPromise = null;
  2875. const RECURSION_LIMIT = 100;
  2876. function nextTick$1(fn) {
  2877. const p2 = currentFlushPromise || resolvedPromise;
  2878. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  2879. }
  2880. function findInsertionIndex(id) {
  2881. let start = flushIndex + 1;
  2882. let end = queue.length;
  2883. while (start < end) {
  2884. const middle = start + end >>> 1;
  2885. const middleJobId = getId(queue[middle]);
  2886. middleJobId < id ? start = middle + 1 : end = middle;
  2887. }
  2888. return start;
  2889. }
  2890. function queueJob(job) {
  2891. if (!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
  2892. if (job.id == null) {
  2893. queue.push(job);
  2894. } else {
  2895. queue.splice(findInsertionIndex(job.id), 0, job);
  2896. }
  2897. queueFlush();
  2898. }
  2899. }
  2900. function queueFlush() {
  2901. if (!isFlushing && !isFlushPending) {
  2902. isFlushPending = true;
  2903. currentFlushPromise = resolvedPromise.then(flushJobs);
  2904. }
  2905. }
  2906. function hasQueueJob(job) {
  2907. return queue.indexOf(job) > -1;
  2908. }
  2909. function invalidateJob(job) {
  2910. const i = queue.indexOf(job);
  2911. if (i > flushIndex) {
  2912. queue.splice(i, 1);
  2913. }
  2914. }
  2915. function queuePostFlushCb(cb) {
  2916. if (!isArray$2(cb)) {
  2917. if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
  2918. pendingPostFlushCbs.push(cb);
  2919. }
  2920. } else {
  2921. pendingPostFlushCbs.push(...cb);
  2922. }
  2923. queueFlush();
  2924. }
  2925. function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
  2926. {
  2927. seen = seen || /* @__PURE__ */ new Map();
  2928. }
  2929. for (; i < queue.length; i++) {
  2930. const cb = queue[i];
  2931. if (cb && cb.pre) {
  2932. if (checkRecursiveUpdates(seen, cb)) {
  2933. continue;
  2934. }
  2935. queue.splice(i, 1);
  2936. i--;
  2937. cb();
  2938. }
  2939. }
  2940. }
  2941. function flushPostFlushCbs(seen) {
  2942. if (pendingPostFlushCbs.length) {
  2943. const deduped = [...new Set(pendingPostFlushCbs)];
  2944. pendingPostFlushCbs.length = 0;
  2945. if (activePostFlushCbs) {
  2946. activePostFlushCbs.push(...deduped);
  2947. return;
  2948. }
  2949. activePostFlushCbs = deduped;
  2950. {
  2951. seen = seen || /* @__PURE__ */ new Map();
  2952. }
  2953. activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
  2954. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  2955. if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  2956. continue;
  2957. }
  2958. activePostFlushCbs[postFlushIndex]();
  2959. }
  2960. activePostFlushCbs = null;
  2961. postFlushIndex = 0;
  2962. }
  2963. }
  2964. const getId = (job) => job.id == null ? Infinity : job.id;
  2965. const comparator = (a, b) => {
  2966. const diff2 = getId(a) - getId(b);
  2967. if (diff2 === 0) {
  2968. if (a.pre && !b.pre)
  2969. return -1;
  2970. if (b.pre && !a.pre)
  2971. return 1;
  2972. }
  2973. return diff2;
  2974. };
  2975. function flushJobs(seen) {
  2976. isFlushPending = false;
  2977. isFlushing = true;
  2978. {
  2979. seen = seen || /* @__PURE__ */ new Map();
  2980. }
  2981. queue.sort(comparator);
  2982. const check = (job) => checkRecursiveUpdates(seen, job);
  2983. try {
  2984. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  2985. const job = queue[flushIndex];
  2986. if (job && job.active !== false) {
  2987. if (check(job)) {
  2988. continue;
  2989. }
  2990. callWithErrorHandling(
  2991. job,
  2992. null,
  2993. 14
  2994. /* ErrorCodes.SCHEDULER */
  2995. );
  2996. }
  2997. }
  2998. } finally {
  2999. flushIndex = 0;
  3000. queue.length = 0;
  3001. flushPostFlushCbs(seen);
  3002. isFlushing = false;
  3003. currentFlushPromise = null;
  3004. if (queue.length || pendingPostFlushCbs.length) {
  3005. flushJobs(seen);
  3006. }
  3007. }
  3008. }
  3009. function checkRecursiveUpdates(seen, fn) {
  3010. if (!seen.has(fn)) {
  3011. seen.set(fn, 1);
  3012. } else {
  3013. const count = seen.get(fn);
  3014. if (count > RECURSION_LIMIT) {
  3015. const instance = fn.ownerInstance;
  3016. const componentName = instance && getComponentName(instance.type);
  3017. warn$2(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`);
  3018. return true;
  3019. } else {
  3020. seen.set(fn, count + 1);
  3021. }
  3022. }
  3023. }
  3024. let devtools;
  3025. let buffer = [];
  3026. let devtoolsNotInstalled = false;
  3027. function emit$1(event, ...args) {
  3028. if (devtools) {
  3029. devtools.emit(event, ...args);
  3030. } else if (!devtoolsNotInstalled) {
  3031. buffer.push({ event, args });
  3032. }
  3033. }
  3034. function setDevtoolsHook(hook, target) {
  3035. var _a2, _b;
  3036. devtools = hook;
  3037. if (devtools) {
  3038. devtools.enabled = true;
  3039. buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
  3040. buffer = [];
  3041. } else if (
  3042. // handle late devtools injection - only do this if we are in an actual
  3043. // browser environment to avoid the timer handle stalling test runner exit
  3044. // (#4815)
  3045. typeof window !== "undefined" && // some envs mock window but not fully
  3046. // eslint-disable-next-line no-restricted-globals
  3047. window.HTMLElement && // also exclude jsdom
  3048. // eslint-disable-next-line no-restricted-globals
  3049. !((_b = (_a2 = window.navigator) === null || _a2 === void 0 ? void 0 : _a2.userAgent) === null || _b === void 0 ? void 0 : _b.includes("jsdom"))
  3050. ) {
  3051. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  3052. replay.push((newHook) => {
  3053. setDevtoolsHook(newHook, target);
  3054. });
  3055. setTimeout(() => {
  3056. if (!devtools) {
  3057. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  3058. devtoolsNotInstalled = true;
  3059. buffer = [];
  3060. }
  3061. }, 3e3);
  3062. } else {
  3063. devtoolsNotInstalled = true;
  3064. buffer = [];
  3065. }
  3066. }
  3067. function devtoolsInitApp(app, version2) {
  3068. emit$1("app:init", app, version2, {
  3069. Fragment,
  3070. Text: Text$1,
  3071. Comment,
  3072. Static
  3073. });
  3074. }
  3075. const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
  3076. "component:added"
  3077. /* DevtoolsHooks.COMPONENT_ADDED */
  3078. );
  3079. const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(
  3080. "component:updated"
  3081. /* DevtoolsHooks.COMPONENT_UPDATED */
  3082. );
  3083. const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
  3084. "component:removed"
  3085. /* DevtoolsHooks.COMPONENT_REMOVED */
  3086. );
  3087. const devtoolsComponentRemoved = (component) => {
  3088. if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  3089. !devtools.cleanupBuffer(component)) {
  3090. _devtoolsComponentRemoved(component);
  3091. }
  3092. };
  3093. function createDevtoolsComponentHook(hook) {
  3094. return (component) => {
  3095. emit$1(
  3096. hook,
  3097. component.appContext.app,
  3098. component.uid,
  3099. // fixed by xxxxxx
  3100. // 为 0 是 App,无 parent 是 Page 指向 App
  3101. component.uid === 0 ? void 0 : component.parent ? component.parent.uid : 0,
  3102. component
  3103. );
  3104. };
  3105. }
  3106. const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3107. "perf:start"
  3108. /* DevtoolsHooks.PERFORMANCE_START */
  3109. );
  3110. const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
  3111. "perf:end"
  3112. /* DevtoolsHooks.PERFORMANCE_END */
  3113. );
  3114. function createDevtoolsPerformanceHook(hook) {
  3115. return (component, type2, time) => {
  3116. emit$1(hook, component.appContext.app, component.uid, component, type2, time);
  3117. };
  3118. }
  3119. function devtoolsComponentEmit(component, event, params) {
  3120. emit$1("component:emit", component.appContext.app, component, event, params);
  3121. }
  3122. function emit(instance, event, ...rawArgs) {
  3123. if (instance.isUnmounted)
  3124. return;
  3125. const props2 = instance.vnode.props || EMPTY_OBJ;
  3126. {
  3127. const { emitsOptions, propsOptions: [propsOptions] } = instance;
  3128. if (emitsOptions) {
  3129. if (!(event in emitsOptions) && true) {
  3130. if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
  3131. warn$2(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`);
  3132. }
  3133. } else {
  3134. const validator = emitsOptions[event];
  3135. if (isFunction$1(validator)) {
  3136. const isValid2 = validator(...rawArgs);
  3137. if (!isValid2) {
  3138. warn$2(`Invalid event arguments: event validation failed for event "${event}".`);
  3139. }
  3140. }
  3141. }
  3142. }
  3143. }
  3144. let args = rawArgs;
  3145. const isModelListener2 = event.startsWith("update:");
  3146. const modelArg = isModelListener2 && event.slice(7);
  3147. if (modelArg && modelArg in props2) {
  3148. const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
  3149. const { number: number3, trim: trim2 } = props2[modifiersKey] || EMPTY_OBJ;
  3150. if (trim2) {
  3151. args = rawArgs.map((a) => isString$1(a) ? a.trim() : a);
  3152. }
  3153. if (number3) {
  3154. args = rawArgs.map(looseToNumber);
  3155. }
  3156. }
  3157. {
  3158. devtoolsComponentEmit(instance, event, args);
  3159. }
  3160. {
  3161. const lowerCaseEvent = event.toLowerCase();
  3162. if (lowerCaseEvent !== event && props2[toHandlerKey(lowerCaseEvent)]) {
  3163. warn$2(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`);
  3164. }
  3165. }
  3166. let handlerName;
  3167. let handler = props2[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  3168. props2[handlerName = toHandlerKey(camelize(event))];
  3169. if (!handler && isModelListener2) {
  3170. handler = props2[handlerName = toHandlerKey(hyphenate(event))];
  3171. }
  3172. if (handler) {
  3173. callWithAsyncErrorHandling(handler, instance, 6, args);
  3174. }
  3175. const onceHandler = props2[handlerName + `Once`];
  3176. if (onceHandler) {
  3177. if (!instance.emitted) {
  3178. instance.emitted = {};
  3179. } else if (instance.emitted[handlerName]) {
  3180. return;
  3181. }
  3182. instance.emitted[handlerName] = true;
  3183. callWithAsyncErrorHandling(onceHandler, instance, 6, args);
  3184. }
  3185. }
  3186. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  3187. const cache = appContext.emitsCache;
  3188. const cached = cache.get(comp);
  3189. if (cached !== void 0) {
  3190. return cached;
  3191. }
  3192. const raw = comp.emits;
  3193. let normalized = {};
  3194. let hasExtends = false;
  3195. if (!isFunction$1(comp)) {
  3196. const extendEmits = (raw2) => {
  3197. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  3198. if (normalizedFromExtend) {
  3199. hasExtends = true;
  3200. extend$1(normalized, normalizedFromExtend);
  3201. }
  3202. };
  3203. if (!asMixin && appContext.mixins.length) {
  3204. appContext.mixins.forEach(extendEmits);
  3205. }
  3206. if (comp.extends) {
  3207. extendEmits(comp.extends);
  3208. }
  3209. if (comp.mixins) {
  3210. comp.mixins.forEach(extendEmits);
  3211. }
  3212. }
  3213. if (!raw && !hasExtends) {
  3214. if (isObject$2(comp)) {
  3215. cache.set(comp, null);
  3216. }
  3217. return null;
  3218. }
  3219. if (isArray$2(raw)) {
  3220. raw.forEach((key) => normalized[key] = null);
  3221. } else {
  3222. extend$1(normalized, raw);
  3223. }
  3224. if (isObject$2(comp)) {
  3225. cache.set(comp, normalized);
  3226. }
  3227. return normalized;
  3228. }
  3229. function isEmitListener(options, key) {
  3230. if (!options || !isOn(key)) {
  3231. return false;
  3232. }
  3233. key = key.slice(2).replace(/Once$/, "");
  3234. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  3235. }
  3236. let currentRenderingInstance = null;
  3237. function setCurrentRenderingInstance(instance) {
  3238. const prev = currentRenderingInstance;
  3239. currentRenderingInstance = instance;
  3240. instance && instance.type.__scopeId || null;
  3241. return prev;
  3242. }
  3243. function provide(key, value2) {
  3244. if (!currentInstance) {
  3245. {
  3246. warn$2(`provide() can only be used inside setup().`);
  3247. }
  3248. } else {
  3249. let provides = currentInstance.provides;
  3250. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  3251. if (parentProvides === provides) {
  3252. provides = currentInstance.provides = Object.create(parentProvides);
  3253. }
  3254. provides[key] = value2;
  3255. if (currentInstance.type.mpType === "app") {
  3256. currentInstance.appContext.app.provide(key, value2);
  3257. }
  3258. }
  3259. }
  3260. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  3261. const instance = currentInstance || currentRenderingInstance;
  3262. if (instance) {
  3263. const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides;
  3264. if (provides && key in provides) {
  3265. return provides[key];
  3266. } else if (arguments.length > 1) {
  3267. return treatDefaultAsFactory && isFunction$1(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue;
  3268. } else {
  3269. warn$2(`injection "${String(key)}" not found.`);
  3270. }
  3271. } else {
  3272. warn$2(`inject() can only be used inside setup() or functional components.`);
  3273. }
  3274. }
  3275. const INITIAL_WATCHER_VALUE = {};
  3276. function watch(source, cb, options) {
  3277. if (!isFunction$1(cb)) {
  3278. warn$2(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`);
  3279. }
  3280. return doWatch(source, cb, options);
  3281. }
  3282. function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
  3283. if (!cb) {
  3284. if (immediate !== void 0) {
  3285. warn$2(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
  3286. }
  3287. if (deep !== void 0) {
  3288. warn$2(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
  3289. }
  3290. }
  3291. const warnInvalidSource = (s2) => {
  3292. warn$2(`Invalid watch source: `, s2, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`);
  3293. };
  3294. const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
  3295. let getter;
  3296. let forceTrigger = false;
  3297. let isMultiSource = false;
  3298. if (isRef(source)) {
  3299. getter = () => source.value;
  3300. forceTrigger = isShallow(source);
  3301. } else if (isReactive(source)) {
  3302. getter = () => source;
  3303. deep = true;
  3304. } else if (isArray$2(source)) {
  3305. isMultiSource = true;
  3306. forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2));
  3307. getter = () => source.map((s2) => {
  3308. if (isRef(s2)) {
  3309. return s2.value;
  3310. } else if (isReactive(s2)) {
  3311. return traverse(s2);
  3312. } else if (isFunction$1(s2)) {
  3313. return callWithErrorHandling(
  3314. s2,
  3315. instance,
  3316. 2
  3317. /* ErrorCodes.WATCH_GETTER */
  3318. );
  3319. } else {
  3320. warnInvalidSource(s2);
  3321. }
  3322. });
  3323. } else if (isFunction$1(source)) {
  3324. if (cb) {
  3325. getter = () => callWithErrorHandling(
  3326. source,
  3327. instance,
  3328. 2
  3329. /* ErrorCodes.WATCH_GETTER */
  3330. );
  3331. } else {
  3332. getter = () => {
  3333. if (instance && instance.isUnmounted) {
  3334. return;
  3335. }
  3336. if (cleanup) {
  3337. cleanup();
  3338. }
  3339. return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]);
  3340. };
  3341. }
  3342. } else {
  3343. getter = NOOP;
  3344. warnInvalidSource(source);
  3345. }
  3346. if (cb && deep) {
  3347. const baseGetter = getter;
  3348. getter = () => traverse(baseGetter());
  3349. }
  3350. let cleanup;
  3351. let onCleanup = (fn) => {
  3352. cleanup = effect.onStop = () => {
  3353. callWithErrorHandling(
  3354. fn,
  3355. instance,
  3356. 4
  3357. /* ErrorCodes.WATCH_CLEANUP */
  3358. );
  3359. };
  3360. };
  3361. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  3362. const job = () => {
  3363. if (!effect.active) {
  3364. return;
  3365. }
  3366. if (cb) {
  3367. const newValue = effect.run();
  3368. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
  3369. if (cleanup) {
  3370. cleanup();
  3371. }
  3372. callWithAsyncErrorHandling(cb, instance, 3, [
  3373. newValue,
  3374. // pass undefined as the old value when it's changed for the first time
  3375. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  3376. onCleanup
  3377. ]);
  3378. oldValue = newValue;
  3379. }
  3380. } else {
  3381. effect.run();
  3382. }
  3383. };
  3384. job.allowRecurse = !!cb;
  3385. let scheduler;
  3386. if (flush === "sync") {
  3387. scheduler = job;
  3388. } else if (flush === "post") {
  3389. scheduler = () => queuePostRenderEffect$1(job, instance && instance.suspense);
  3390. } else {
  3391. job.pre = true;
  3392. if (instance)
  3393. job.id = instance.uid;
  3394. scheduler = () => queueJob(job);
  3395. }
  3396. const effect = new ReactiveEffect(getter, scheduler);
  3397. {
  3398. effect.onTrack = onTrack;
  3399. effect.onTrigger = onTrigger;
  3400. }
  3401. if (cb) {
  3402. if (immediate) {
  3403. job();
  3404. } else {
  3405. oldValue = effect.run();
  3406. }
  3407. } else if (flush === "post") {
  3408. queuePostRenderEffect$1(effect.run.bind(effect), instance && instance.suspense);
  3409. } else {
  3410. effect.run();
  3411. }
  3412. const unwatch = () => {
  3413. effect.stop();
  3414. if (instance && instance.scope) {
  3415. remove(instance.scope.effects, effect);
  3416. }
  3417. };
  3418. return unwatch;
  3419. }
  3420. function instanceWatch(source, value2, options) {
  3421. const publicThis = this.proxy;
  3422. const getter = isString$1(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  3423. let cb;
  3424. if (isFunction$1(value2)) {
  3425. cb = value2;
  3426. } else {
  3427. cb = value2.handler;
  3428. options = value2;
  3429. }
  3430. const cur = currentInstance;
  3431. setCurrentInstance(this);
  3432. const res = doWatch(getter, cb.bind(publicThis), options);
  3433. if (cur) {
  3434. setCurrentInstance(cur);
  3435. } else {
  3436. unsetCurrentInstance();
  3437. }
  3438. return res;
  3439. }
  3440. function createPathGetter(ctx, path) {
  3441. const segments = path.split(".");
  3442. return () => {
  3443. let cur = ctx;
  3444. for (let i = 0; i < segments.length && cur; i++) {
  3445. cur = cur[segments[i]];
  3446. }
  3447. return cur;
  3448. };
  3449. }
  3450. function traverse(value2, seen) {
  3451. if (!isObject$2(value2) || value2[
  3452. "__v_skip"
  3453. /* ReactiveFlags.SKIP */
  3454. ]) {
  3455. return value2;
  3456. }
  3457. seen = seen || /* @__PURE__ */ new Set();
  3458. if (seen.has(value2)) {
  3459. return value2;
  3460. }
  3461. seen.add(value2);
  3462. if (isRef(value2)) {
  3463. traverse(value2.value, seen);
  3464. } else if (isArray$2(value2)) {
  3465. for (let i = 0; i < value2.length; i++) {
  3466. traverse(value2[i], seen);
  3467. }
  3468. } else if (isSet(value2) || isMap(value2)) {
  3469. value2.forEach((v) => {
  3470. traverse(v, seen);
  3471. });
  3472. } else if (isPlainObject$1(value2)) {
  3473. for (const key in value2) {
  3474. traverse(value2[key], seen);
  3475. }
  3476. }
  3477. return value2;
  3478. }
  3479. function defineComponent(options) {
  3480. return isFunction$1(options) ? { setup: options, name: options.name } : options;
  3481. }
  3482. const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  3483. function onActivated(hook, target) {
  3484. registerKeepAliveHook(hook, "a", target);
  3485. }
  3486. function onDeactivated(hook, target) {
  3487. registerKeepAliveHook(hook, "da", target);
  3488. }
  3489. function registerKeepAliveHook(hook, type2, target = currentInstance) {
  3490. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  3491. let current = target;
  3492. while (current) {
  3493. if (current.isDeactivated) {
  3494. return;
  3495. }
  3496. current = current.parent;
  3497. }
  3498. return hook();
  3499. });
  3500. injectHook(type2, wrappedHook, target);
  3501. if (target) {
  3502. let current = target.parent;
  3503. while (current && current.parent) {
  3504. if (isKeepAlive(current.parent.vnode)) {
  3505. injectToKeepAliveRoot(wrappedHook, type2, target, current);
  3506. }
  3507. current = current.parent;
  3508. }
  3509. }
  3510. }
  3511. function injectToKeepAliveRoot(hook, type2, target, keepAliveRoot) {
  3512. const injected = injectHook(
  3513. type2,
  3514. hook,
  3515. keepAliveRoot,
  3516. true
  3517. /* prepend */
  3518. );
  3519. onUnmounted(() => {
  3520. remove(keepAliveRoot[type2], injected);
  3521. }, target);
  3522. }
  3523. function injectHook(type2, hook, target = currentInstance, prepend = false) {
  3524. if (target) {
  3525. if (isRootHook(type2)) {
  3526. target = target.root;
  3527. }
  3528. const hooks2 = target[type2] || (target[type2] = []);
  3529. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  3530. if (target.isUnmounted) {
  3531. return;
  3532. }
  3533. pauseTracking();
  3534. setCurrentInstance(target);
  3535. const res = callWithAsyncErrorHandling(hook, target, type2, args);
  3536. unsetCurrentInstance();
  3537. resetTracking();
  3538. return res;
  3539. });
  3540. if (prepend) {
  3541. hooks2.unshift(wrappedHook);
  3542. } else {
  3543. hooks2.push(wrappedHook);
  3544. }
  3545. return wrappedHook;
  3546. } else {
  3547. const apiName = toHandlerKey((ErrorTypeStrings[type2] || type2.replace(/^on/, "")).replace(/ hook$/, ""));
  3548. warn$2(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().`);
  3549. }
  3550. }
  3551. const createHook$1 = (lifecycle) => (hook, target = currentInstance) => (
  3552. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  3553. (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
  3554. );
  3555. const onBeforeMount = createHook$1(
  3556. "bm"
  3557. /* LifecycleHooks.BEFORE_MOUNT */
  3558. );
  3559. const onMounted = createHook$1(
  3560. "m"
  3561. /* LifecycleHooks.MOUNTED */
  3562. );
  3563. const onBeforeUpdate = createHook$1(
  3564. "bu"
  3565. /* LifecycleHooks.BEFORE_UPDATE */
  3566. );
  3567. const onUpdated = createHook$1(
  3568. "u"
  3569. /* LifecycleHooks.UPDATED */
  3570. );
  3571. const onBeforeUnmount = createHook$1(
  3572. "bum"
  3573. /* LifecycleHooks.BEFORE_UNMOUNT */
  3574. );
  3575. const onUnmounted = createHook$1(
  3576. "um"
  3577. /* LifecycleHooks.UNMOUNTED */
  3578. );
  3579. const onServerPrefetch = createHook$1(
  3580. "sp"
  3581. /* LifecycleHooks.SERVER_PREFETCH */
  3582. );
  3583. const onRenderTriggered = createHook$1(
  3584. "rtg"
  3585. /* LifecycleHooks.RENDER_TRIGGERED */
  3586. );
  3587. const onRenderTracked = createHook$1(
  3588. "rtc"
  3589. /* LifecycleHooks.RENDER_TRACKED */
  3590. );
  3591. function onErrorCaptured(hook, target = currentInstance) {
  3592. injectHook("ec", hook, target);
  3593. }
  3594. function validateDirectiveName(name) {
  3595. if (isBuiltInDirective(name)) {
  3596. warn$2("Do not use built-in directive ids as custom directive id: " + name);
  3597. }
  3598. }
  3599. const COMPONENTS = "components";
  3600. function resolveComponent(name, maybeSelfReference) {
  3601. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  3602. }
  3603. function resolveAsset(type2, name, warnMissing = true, maybeSelfReference = false) {
  3604. const instance = currentRenderingInstance || currentInstance;
  3605. if (instance) {
  3606. const Component2 = instance.type;
  3607. if (type2 === COMPONENTS) {
  3608. const selfName = getComponentName(
  3609. Component2,
  3610. false
  3611. /* do not include inferred name to avoid breaking existing code */
  3612. );
  3613. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  3614. return Component2;
  3615. }
  3616. }
  3617. const res = (
  3618. // local registration
  3619. // check instance[type] first which is resolved for options API
  3620. resolve(instance[type2] || Component2[type2], name) || // global registration
  3621. resolve(instance.appContext[type2], name)
  3622. );
  3623. if (!res && maybeSelfReference) {
  3624. return Component2;
  3625. }
  3626. if (warnMissing && !res) {
  3627. const extra = type2 === COMPONENTS ? `
  3628. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  3629. warn$2(`Failed to resolve ${type2.slice(0, -1)}: ${name}${extra}`);
  3630. }
  3631. return res;
  3632. } else {
  3633. warn$2(`resolve${capitalize(type2.slice(0, -1))} can only be used in render() or setup().`);
  3634. }
  3635. }
  3636. function resolve(registry, name) {
  3637. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  3638. }
  3639. const getPublicInstance = (i) => {
  3640. if (!i)
  3641. return null;
  3642. if (isStatefulComponent(i))
  3643. return getExposeProxy(i) || i.proxy;
  3644. return getPublicInstance(i.parent);
  3645. };
  3646. const publicPropertiesMap = (
  3647. // Move PURE marker to new line to workaround compiler discarding it
  3648. // due to type annotation
  3649. /* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), {
  3650. $: (i) => i,
  3651. // fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的
  3652. // $el: i => i.vnode.el,
  3653. $el: (i) => i.__$el || (i.__$el = {}),
  3654. $data: (i) => i.data,
  3655. $props: (i) => shallowReadonly(i.props),
  3656. $attrs: (i) => shallowReadonly(i.attrs),
  3657. $slots: (i) => shallowReadonly(i.slots),
  3658. $refs: (i) => shallowReadonly(i.refs),
  3659. $parent: (i) => getPublicInstance(i.parent),
  3660. $root: (i) => getPublicInstance(i.root),
  3661. $emit: (i) => i.emit,
  3662. $options: (i) => resolveMergedOptions(i),
  3663. $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
  3664. // $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy!)),// fixed by xxxxxx
  3665. $watch: (i) => instanceWatch.bind(i)
  3666. })
  3667. );
  3668. const isReservedPrefix = (key) => key === "_" || key === "$";
  3669. const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  3670. const PublicInstanceProxyHandlers = {
  3671. get({ _: instance }, key) {
  3672. const { ctx, setupState, data, props: props2, accessCache, type: type2, appContext } = instance;
  3673. if (key === "__isVue") {
  3674. return true;
  3675. }
  3676. let normalizedProps;
  3677. if (key[0] !== "$") {
  3678. const n2 = accessCache[key];
  3679. if (n2 !== void 0) {
  3680. switch (n2) {
  3681. case 1:
  3682. return setupState[key];
  3683. case 2:
  3684. return data[key];
  3685. case 4:
  3686. return ctx[key];
  3687. case 3:
  3688. return props2[key];
  3689. }
  3690. } else if (hasSetupBinding(setupState, key)) {
  3691. accessCache[key] = 1;
  3692. return setupState[key];
  3693. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3694. accessCache[key] = 2;
  3695. return data[key];
  3696. } else if (
  3697. // only cache other properties when instance has declared (thus stable)
  3698. // props
  3699. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  3700. ) {
  3701. accessCache[key] = 3;
  3702. return props2[key];
  3703. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3704. accessCache[key] = 4;
  3705. return ctx[key];
  3706. } else if (shouldCacheAccess) {
  3707. accessCache[key] = 0;
  3708. }
  3709. }
  3710. const publicGetter = publicPropertiesMap[key];
  3711. let cssModule, globalProperties;
  3712. if (publicGetter) {
  3713. if (key === "$attrs") {
  3714. track(instance, "get", key);
  3715. }
  3716. return publicGetter(instance);
  3717. } else if (
  3718. // css module (injected by vue-loader)
  3719. (cssModule = type2.__cssModules) && (cssModule = cssModule[key])
  3720. ) {
  3721. return cssModule;
  3722. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  3723. accessCache[key] = 4;
  3724. return ctx[key];
  3725. } else if (
  3726. // global properties
  3727. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  3728. ) {
  3729. {
  3730. return globalProperties[key];
  3731. }
  3732. } else if (currentRenderingInstance && (!isString$1(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  3733. // to infinite warning loop
  3734. key.indexOf("__v") !== 0)) {
  3735. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  3736. warn$2(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`);
  3737. } else if (instance === currentRenderingInstance) {
  3738. warn$2(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`);
  3739. }
  3740. }
  3741. },
  3742. set({ _: instance }, key, value2) {
  3743. const { data, setupState, ctx } = instance;
  3744. if (hasSetupBinding(setupState, key)) {
  3745. setupState[key] = value2;
  3746. return true;
  3747. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  3748. warn$2(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  3749. return false;
  3750. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  3751. data[key] = value2;
  3752. return true;
  3753. } else if (hasOwn(instance.props, key)) {
  3754. warn$2(`Attempting to mutate prop "${key}". Props are readonly.`);
  3755. return false;
  3756. }
  3757. if (key[0] === "$" && key.slice(1) in instance) {
  3758. warn$2(`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`);
  3759. return false;
  3760. } else {
  3761. if (key in instance.appContext.config.globalProperties) {
  3762. Object.defineProperty(ctx, key, {
  3763. enumerable: true,
  3764. configurable: true,
  3765. value: value2
  3766. });
  3767. } else {
  3768. ctx[key] = value2;
  3769. }
  3770. }
  3771. return true;
  3772. },
  3773. has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
  3774. let normalizedProps;
  3775. return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
  3776. },
  3777. defineProperty(target, key, descriptor) {
  3778. if (descriptor.get != null) {
  3779. target._.accessCache[key] = 0;
  3780. } else if (hasOwn(descriptor, "value")) {
  3781. this.set(target, key, descriptor.value, null);
  3782. }
  3783. return Reflect.defineProperty(target, key, descriptor);
  3784. }
  3785. };
  3786. {
  3787. PublicInstanceProxyHandlers.ownKeys = (target) => {
  3788. warn$2(`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`);
  3789. return Reflect.ownKeys(target);
  3790. };
  3791. }
  3792. function createDevRenderContext(instance) {
  3793. const target = {};
  3794. Object.defineProperty(target, `_`, {
  3795. configurable: true,
  3796. enumerable: false,
  3797. get: () => instance
  3798. });
  3799. Object.keys(publicPropertiesMap).forEach((key) => {
  3800. Object.defineProperty(target, key, {
  3801. configurable: true,
  3802. enumerable: false,
  3803. get: () => publicPropertiesMap[key](instance),
  3804. // intercepted by the proxy so no need for implementation,
  3805. // but needed to prevent set errors
  3806. set: NOOP
  3807. });
  3808. });
  3809. return target;
  3810. }
  3811. function exposePropsOnRenderContext(instance) {
  3812. const { ctx, propsOptions: [propsOptions] } = instance;
  3813. if (propsOptions) {
  3814. Object.keys(propsOptions).forEach((key) => {
  3815. Object.defineProperty(ctx, key, {
  3816. enumerable: true,
  3817. configurable: true,
  3818. get: () => instance.props[key],
  3819. set: NOOP
  3820. });
  3821. });
  3822. }
  3823. }
  3824. function exposeSetupStateOnRenderContext(instance) {
  3825. const { ctx, setupState } = instance;
  3826. Object.keys(toRaw(setupState)).forEach((key) => {
  3827. if (!setupState.__isScriptSetup) {
  3828. if (isReservedPrefix(key[0])) {
  3829. warn$2(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);
  3830. return;
  3831. }
  3832. Object.defineProperty(ctx, key, {
  3833. enumerable: true,
  3834. configurable: true,
  3835. get: () => setupState[key],
  3836. set: NOOP
  3837. });
  3838. }
  3839. });
  3840. }
  3841. function createDuplicateChecker() {
  3842. const cache = /* @__PURE__ */ Object.create(null);
  3843. return (type2, key) => {
  3844. if (cache[key]) {
  3845. warn$2(`${type2} property "${key}" is already defined in ${cache[key]}.`);
  3846. } else {
  3847. cache[key] = type2;
  3848. }
  3849. };
  3850. }
  3851. let shouldCacheAccess = true;
  3852. function applyOptions$1(instance) {
  3853. const options = resolveMergedOptions(instance);
  3854. const publicThis = instance.proxy;
  3855. const ctx = instance.ctx;
  3856. shouldCacheAccess = false;
  3857. if (options.beforeCreate) {
  3858. callHook$1(
  3859. options.beforeCreate,
  3860. instance,
  3861. "bc"
  3862. /* LifecycleHooks.BEFORE_CREATE */
  3863. );
  3864. }
  3865. const {
  3866. // state
  3867. data: dataOptions,
  3868. computed: computedOptions,
  3869. methods,
  3870. watch: watchOptions,
  3871. provide: provideOptions,
  3872. inject: injectOptions,
  3873. // lifecycle
  3874. created,
  3875. beforeMount,
  3876. mounted,
  3877. beforeUpdate,
  3878. updated,
  3879. activated,
  3880. deactivated,
  3881. beforeDestroy,
  3882. beforeUnmount,
  3883. destroyed,
  3884. unmounted,
  3885. render,
  3886. renderTracked,
  3887. renderTriggered,
  3888. errorCaptured,
  3889. serverPrefetch,
  3890. // public API
  3891. expose,
  3892. inheritAttrs,
  3893. // assets
  3894. components,
  3895. directives,
  3896. filters
  3897. } = options;
  3898. const checkDuplicateProperties = createDuplicateChecker();
  3899. {
  3900. const [propsOptions] = instance.propsOptions;
  3901. if (propsOptions) {
  3902. for (const key in propsOptions) {
  3903. checkDuplicateProperties("Props", key);
  3904. }
  3905. }
  3906. }
  3907. if (injectOptions) {
  3908. resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);
  3909. }
  3910. if (methods) {
  3911. for (const key in methods) {
  3912. const methodHandler = methods[key];
  3913. if (isFunction$1(methodHandler)) {
  3914. {
  3915. Object.defineProperty(ctx, key, {
  3916. value: methodHandler.bind(publicThis),
  3917. configurable: true,
  3918. enumerable: true,
  3919. writable: true
  3920. });
  3921. }
  3922. {
  3923. checkDuplicateProperties("Methods", key);
  3924. }
  3925. } else {
  3926. warn$2(`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`);
  3927. }
  3928. }
  3929. }
  3930. if (dataOptions) {
  3931. if (!isFunction$1(dataOptions)) {
  3932. warn$2(`The data option must be a function. Plain object usage is no longer supported.`);
  3933. }
  3934. const data = dataOptions.call(publicThis, publicThis);
  3935. if (isPromise(data)) {
  3936. warn$2(`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`);
  3937. }
  3938. if (!isObject$2(data)) {
  3939. warn$2(`data() should return an object.`);
  3940. } else {
  3941. instance.data = reactive(data);
  3942. {
  3943. for (const key in data) {
  3944. checkDuplicateProperties("Data", key);
  3945. if (!isReservedPrefix(key[0])) {
  3946. Object.defineProperty(ctx, key, {
  3947. configurable: true,
  3948. enumerable: true,
  3949. get: () => data[key],
  3950. set: NOOP
  3951. });
  3952. }
  3953. }
  3954. }
  3955. }
  3956. }
  3957. shouldCacheAccess = true;
  3958. if (computedOptions) {
  3959. for (const key in computedOptions) {
  3960. const opt = computedOptions[key];
  3961. const get2 = isFunction$1(opt) ? opt.bind(publicThis, publicThis) : isFunction$1(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  3962. if (get2 === NOOP) {
  3963. warn$2(`Computed property "${key}" has no getter.`);
  3964. }
  3965. const set2 = !isFunction$1(opt) && isFunction$1(opt.set) ? opt.set.bind(publicThis) : () => {
  3966. warn$2(`Write operation failed: computed property "${key}" is readonly.`);
  3967. };
  3968. const c = computed({
  3969. get: get2,
  3970. set: set2
  3971. });
  3972. Object.defineProperty(ctx, key, {
  3973. enumerable: true,
  3974. configurable: true,
  3975. get: () => c.value,
  3976. set: (v) => c.value = v
  3977. });
  3978. {
  3979. checkDuplicateProperties("Computed", key);
  3980. }
  3981. }
  3982. }
  3983. if (watchOptions) {
  3984. for (const key in watchOptions) {
  3985. createWatcher(watchOptions[key], ctx, publicThis, key);
  3986. }
  3987. }
  3988. {
  3989. if (provideOptions) {
  3990. const provides = isFunction$1(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  3991. Reflect.ownKeys(provides).forEach((key) => {
  3992. provide(key, provides[key]);
  3993. });
  3994. }
  3995. }
  3996. {
  3997. if (created) {
  3998. callHook$1(
  3999. created,
  4000. instance,
  4001. "c"
  4002. /* LifecycleHooks.CREATED */
  4003. );
  4004. }
  4005. }
  4006. function registerLifecycleHook(register2, hook) {
  4007. if (isArray$2(hook)) {
  4008. hook.forEach((_hook) => register2(_hook.bind(publicThis)));
  4009. } else if (hook) {
  4010. register2(hook.bind(publicThis));
  4011. }
  4012. }
  4013. registerLifecycleHook(onBeforeMount, beforeMount);
  4014. registerLifecycleHook(onMounted, mounted);
  4015. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  4016. registerLifecycleHook(onUpdated, updated);
  4017. registerLifecycleHook(onActivated, activated);
  4018. registerLifecycleHook(onDeactivated, deactivated);
  4019. registerLifecycleHook(onErrorCaptured, errorCaptured);
  4020. registerLifecycleHook(onRenderTracked, renderTracked);
  4021. registerLifecycleHook(onRenderTriggered, renderTriggered);
  4022. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  4023. registerLifecycleHook(onUnmounted, unmounted);
  4024. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  4025. if (isArray$2(expose)) {
  4026. if (expose.length) {
  4027. const exposed = instance.exposed || (instance.exposed = {});
  4028. expose.forEach((key) => {
  4029. Object.defineProperty(exposed, key, {
  4030. get: () => publicThis[key],
  4031. set: (val) => publicThis[key] = val
  4032. });
  4033. });
  4034. } else if (!instance.exposed) {
  4035. instance.exposed = {};
  4036. }
  4037. }
  4038. if (render && instance.render === NOOP) {
  4039. instance.render = render;
  4040. }
  4041. if (inheritAttrs != null) {
  4042. instance.inheritAttrs = inheritAttrs;
  4043. }
  4044. if (components)
  4045. instance.components = components;
  4046. if (directives)
  4047. instance.directives = directives;
  4048. if (instance.ctx.$onApplyOptions) {
  4049. instance.ctx.$onApplyOptions(options, instance, publicThis);
  4050. }
  4051. }
  4052. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) {
  4053. if (isArray$2(injectOptions)) {
  4054. injectOptions = normalizeInject(injectOptions);
  4055. }
  4056. for (const key in injectOptions) {
  4057. const opt = injectOptions[key];
  4058. let injected;
  4059. if (isObject$2(opt)) {
  4060. if ("default" in opt) {
  4061. injected = inject(
  4062. opt.from || key,
  4063. opt.default,
  4064. true
  4065. /* treat default function as factory */
  4066. );
  4067. } else {
  4068. injected = inject(opt.from || key);
  4069. }
  4070. } else {
  4071. injected = inject(opt);
  4072. }
  4073. if (isRef(injected)) {
  4074. if (unwrapRef) {
  4075. Object.defineProperty(ctx, key, {
  4076. enumerable: true,
  4077. configurable: true,
  4078. get: () => injected.value,
  4079. set: (v) => injected.value = v
  4080. });
  4081. } else {
  4082. {
  4083. warn$2(`injected property "${key}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`);
  4084. }
  4085. ctx[key] = injected;
  4086. }
  4087. } else {
  4088. ctx[key] = injected;
  4089. }
  4090. {
  4091. checkDuplicateProperties("Inject", key);
  4092. }
  4093. }
  4094. }
  4095. function callHook$1(hook, instance, type2) {
  4096. callWithAsyncErrorHandling(isArray$2(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), instance, type2);
  4097. }
  4098. function createWatcher(raw, ctx, publicThis, key) {
  4099. const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  4100. if (isString$1(raw)) {
  4101. const handler = ctx[raw];
  4102. if (isFunction$1(handler)) {
  4103. watch(getter, handler);
  4104. } else {
  4105. warn$2(`Invalid watch handler specified by key "${raw}"`, handler);
  4106. }
  4107. } else if (isFunction$1(raw)) {
  4108. watch(getter, raw.bind(publicThis));
  4109. } else if (isObject$2(raw)) {
  4110. if (isArray$2(raw)) {
  4111. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  4112. } else {
  4113. const handler = isFunction$1(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  4114. if (isFunction$1(handler)) {
  4115. watch(getter, handler, raw);
  4116. } else {
  4117. warn$2(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  4118. }
  4119. }
  4120. } else {
  4121. warn$2(`Invalid watch option: "${key}"`, raw);
  4122. }
  4123. }
  4124. function resolveMergedOptions(instance) {
  4125. const base = instance.type;
  4126. const { mixins, extends: extendsOptions } = base;
  4127. const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
  4128. const cached = cache.get(base);
  4129. let resolved;
  4130. if (cached) {
  4131. resolved = cached;
  4132. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  4133. {
  4134. resolved = base;
  4135. }
  4136. } else {
  4137. resolved = {};
  4138. if (globalMixins.length) {
  4139. globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
  4140. }
  4141. mergeOptions(resolved, base, optionMergeStrategies);
  4142. }
  4143. if (isObject$2(base)) {
  4144. cache.set(base, resolved);
  4145. }
  4146. return resolved;
  4147. }
  4148. function mergeOptions(to2, from2, strats, asMixin = false) {
  4149. const { mixins, extends: extendsOptions } = from2;
  4150. if (extendsOptions) {
  4151. mergeOptions(to2, extendsOptions, strats, true);
  4152. }
  4153. if (mixins) {
  4154. mixins.forEach((m) => mergeOptions(to2, m, strats, true));
  4155. }
  4156. for (const key in from2) {
  4157. if (asMixin && key === "expose") {
  4158. warn$2(`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`);
  4159. } else {
  4160. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  4161. to2[key] = strat ? strat(to2[key], from2[key]) : from2[key];
  4162. }
  4163. }
  4164. return to2;
  4165. }
  4166. const internalOptionMergeStrats = {
  4167. data: mergeDataFn,
  4168. props: mergeObjectOptions,
  4169. emits: mergeObjectOptions,
  4170. // objects
  4171. methods: mergeObjectOptions,
  4172. computed: mergeObjectOptions,
  4173. // lifecycle
  4174. beforeCreate: mergeAsArray$1,
  4175. created: mergeAsArray$1,
  4176. beforeMount: mergeAsArray$1,
  4177. mounted: mergeAsArray$1,
  4178. beforeUpdate: mergeAsArray$1,
  4179. updated: mergeAsArray$1,
  4180. beforeDestroy: mergeAsArray$1,
  4181. beforeUnmount: mergeAsArray$1,
  4182. destroyed: mergeAsArray$1,
  4183. unmounted: mergeAsArray$1,
  4184. activated: mergeAsArray$1,
  4185. deactivated: mergeAsArray$1,
  4186. errorCaptured: mergeAsArray$1,
  4187. serverPrefetch: mergeAsArray$1,
  4188. // assets
  4189. components: mergeObjectOptions,
  4190. directives: mergeObjectOptions,
  4191. // watch
  4192. watch: mergeWatchOptions,
  4193. // provide / inject
  4194. provide: mergeDataFn,
  4195. inject: mergeInject
  4196. };
  4197. function mergeDataFn(to2, from2) {
  4198. if (!from2) {
  4199. return to2;
  4200. }
  4201. if (!to2) {
  4202. return from2;
  4203. }
  4204. return function mergedDataFn() {
  4205. return extend$1(isFunction$1(to2) ? to2.call(this, this) : to2, isFunction$1(from2) ? from2.call(this, this) : from2);
  4206. };
  4207. }
  4208. function mergeInject(to2, from2) {
  4209. return mergeObjectOptions(normalizeInject(to2), normalizeInject(from2));
  4210. }
  4211. function normalizeInject(raw) {
  4212. if (isArray$2(raw)) {
  4213. const res = {};
  4214. for (let i = 0; i < raw.length; i++) {
  4215. res[raw[i]] = raw[i];
  4216. }
  4217. return res;
  4218. }
  4219. return raw;
  4220. }
  4221. function mergeAsArray$1(to2, from2) {
  4222. return to2 ? [...new Set([].concat(to2, from2))] : from2;
  4223. }
  4224. function mergeObjectOptions(to2, from2) {
  4225. return to2 ? extend$1(extend$1(/* @__PURE__ */ Object.create(null), to2), from2) : from2;
  4226. }
  4227. function mergeWatchOptions(to2, from2) {
  4228. if (!to2)
  4229. return from2;
  4230. if (!from2)
  4231. return to2;
  4232. const merged = extend$1(/* @__PURE__ */ Object.create(null), to2);
  4233. for (const key in from2) {
  4234. merged[key] = mergeAsArray$1(to2[key], from2[key]);
  4235. }
  4236. return merged;
  4237. }
  4238. function initProps$1(instance, rawProps, isStateful, isSSR = false) {
  4239. const props2 = {};
  4240. const attrs = {};
  4241. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  4242. setFullProps(instance, rawProps, props2, attrs);
  4243. for (const key in instance.propsOptions[0]) {
  4244. if (!(key in props2)) {
  4245. props2[key] = void 0;
  4246. }
  4247. }
  4248. {
  4249. validateProps(rawProps || {}, props2, instance);
  4250. }
  4251. if (isStateful) {
  4252. instance.props = isSSR ? props2 : shallowReactive(props2);
  4253. } else {
  4254. if (!instance.type.props) {
  4255. instance.props = attrs;
  4256. } else {
  4257. instance.props = props2;
  4258. }
  4259. }
  4260. instance.attrs = attrs;
  4261. }
  4262. function isInHmrContext(instance) {
  4263. while (instance) {
  4264. if (instance.type.__hmrId)
  4265. return true;
  4266. instance = instance.parent;
  4267. }
  4268. }
  4269. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  4270. const { props: props2, attrs, vnode: { patchFlag } } = instance;
  4271. const rawCurrentProps = toRaw(props2);
  4272. const [options] = instance.propsOptions;
  4273. let hasAttrsChanged = false;
  4274. if (
  4275. // always force full diff in dev
  4276. // - #1942 if hmr is enabled with sfc component
  4277. // - vite#872 non-sfc component used by sfc component
  4278. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  4279. ) {
  4280. if (patchFlag & 8) {
  4281. const propsToUpdate = instance.vnode.dynamicProps;
  4282. for (let i = 0; i < propsToUpdate.length; i++) {
  4283. let key = propsToUpdate[i];
  4284. if (isEmitListener(instance.emitsOptions, key)) {
  4285. continue;
  4286. }
  4287. const value2 = rawProps[key];
  4288. if (options) {
  4289. if (hasOwn(attrs, key)) {
  4290. if (value2 !== attrs[key]) {
  4291. attrs[key] = value2;
  4292. hasAttrsChanged = true;
  4293. }
  4294. } else {
  4295. const camelizedKey = camelize(key);
  4296. props2[camelizedKey] = resolvePropValue(
  4297. options,
  4298. rawCurrentProps,
  4299. camelizedKey,
  4300. value2,
  4301. instance,
  4302. false
  4303. /* isAbsent */
  4304. );
  4305. }
  4306. } else {
  4307. if (value2 !== attrs[key]) {
  4308. attrs[key] = value2;
  4309. hasAttrsChanged = true;
  4310. }
  4311. }
  4312. }
  4313. }
  4314. } else {
  4315. if (setFullProps(instance, rawProps, props2, attrs)) {
  4316. hasAttrsChanged = true;
  4317. }
  4318. let kebabKey;
  4319. for (const key in rawCurrentProps) {
  4320. if (!rawProps || // for camelCase
  4321. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  4322. // and converted to camelCase (#955)
  4323. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  4324. if (options) {
  4325. if (rawPrevProps && // for camelCase
  4326. (rawPrevProps[key] !== void 0 || // for kebab-case
  4327. rawPrevProps[kebabKey] !== void 0)) {
  4328. props2[key] = resolvePropValue(
  4329. options,
  4330. rawCurrentProps,
  4331. key,
  4332. void 0,
  4333. instance,
  4334. true
  4335. /* isAbsent */
  4336. );
  4337. }
  4338. } else {
  4339. delete props2[key];
  4340. }
  4341. }
  4342. }
  4343. if (attrs !== rawCurrentProps) {
  4344. for (const key in attrs) {
  4345. if (!rawProps || !hasOwn(rawProps, key) && true) {
  4346. delete attrs[key];
  4347. hasAttrsChanged = true;
  4348. }
  4349. }
  4350. }
  4351. }
  4352. if (hasAttrsChanged) {
  4353. trigger(instance, "set", "$attrs");
  4354. }
  4355. {
  4356. validateProps(rawProps || {}, props2, instance);
  4357. }
  4358. }
  4359. function setFullProps(instance, rawProps, props2, attrs) {
  4360. const [options, needCastKeys] = instance.propsOptions;
  4361. let hasAttrsChanged = false;
  4362. let rawCastValues;
  4363. if (rawProps) {
  4364. for (let key in rawProps) {
  4365. if (isReservedProp(key)) {
  4366. continue;
  4367. }
  4368. const value2 = rawProps[key];
  4369. let camelKey;
  4370. if (options && hasOwn(options, camelKey = camelize(key))) {
  4371. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  4372. props2[camelKey] = value2;
  4373. } else {
  4374. (rawCastValues || (rawCastValues = {}))[camelKey] = value2;
  4375. }
  4376. } else if (!isEmitListener(instance.emitsOptions, key)) {
  4377. if (!(key in attrs) || value2 !== attrs[key]) {
  4378. attrs[key] = value2;
  4379. hasAttrsChanged = true;
  4380. }
  4381. }
  4382. }
  4383. }
  4384. if (needCastKeys) {
  4385. const rawCurrentProps = toRaw(props2);
  4386. const castValues = rawCastValues || EMPTY_OBJ;
  4387. for (let i = 0; i < needCastKeys.length; i++) {
  4388. const key = needCastKeys[i];
  4389. props2[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));
  4390. }
  4391. }
  4392. return hasAttrsChanged;
  4393. }
  4394. function resolvePropValue(options, props2, key, value2, instance, isAbsent) {
  4395. const opt = options[key];
  4396. if (opt != null) {
  4397. const hasDefault = hasOwn(opt, "default");
  4398. if (hasDefault && value2 === void 0) {
  4399. const defaultValue = opt.default;
  4400. if (opt.type !== Function && isFunction$1(defaultValue)) {
  4401. const { propsDefaults } = instance;
  4402. if (key in propsDefaults) {
  4403. value2 = propsDefaults[key];
  4404. } else {
  4405. setCurrentInstance(instance);
  4406. value2 = propsDefaults[key] = defaultValue.call(null, props2);
  4407. unsetCurrentInstance();
  4408. }
  4409. } else {
  4410. value2 = defaultValue;
  4411. }
  4412. }
  4413. if (opt[
  4414. 0
  4415. /* BooleanFlags.shouldCast */
  4416. ]) {
  4417. if (isAbsent && !hasDefault) {
  4418. value2 = false;
  4419. } else if (opt[
  4420. 1
  4421. /* BooleanFlags.shouldCastTrue */
  4422. ] && (value2 === "" || value2 === hyphenate(key))) {
  4423. value2 = true;
  4424. }
  4425. }
  4426. }
  4427. return value2;
  4428. }
  4429. function normalizePropsOptions(comp, appContext, asMixin = false) {
  4430. const cache = appContext.propsCache;
  4431. const cached = cache.get(comp);
  4432. if (cached) {
  4433. return cached;
  4434. }
  4435. const raw = comp.props;
  4436. const normalized = {};
  4437. const needCastKeys = [];
  4438. let hasExtends = false;
  4439. if (!isFunction$1(comp)) {
  4440. const extendProps = (raw2) => {
  4441. hasExtends = true;
  4442. const [props2, keys2] = normalizePropsOptions(raw2, appContext, true);
  4443. extend$1(normalized, props2);
  4444. if (keys2)
  4445. needCastKeys.push(...keys2);
  4446. };
  4447. if (!asMixin && appContext.mixins.length) {
  4448. appContext.mixins.forEach(extendProps);
  4449. }
  4450. if (comp.extends) {
  4451. extendProps(comp.extends);
  4452. }
  4453. if (comp.mixins) {
  4454. comp.mixins.forEach(extendProps);
  4455. }
  4456. }
  4457. if (!raw && !hasExtends) {
  4458. if (isObject$2(comp)) {
  4459. cache.set(comp, EMPTY_ARR);
  4460. }
  4461. return EMPTY_ARR;
  4462. }
  4463. if (isArray$2(raw)) {
  4464. for (let i = 0; i < raw.length; i++) {
  4465. if (!isString$1(raw[i])) {
  4466. warn$2(`props must be strings when using array syntax.`, raw[i]);
  4467. }
  4468. const normalizedKey = camelize(raw[i]);
  4469. if (validatePropName(normalizedKey)) {
  4470. normalized[normalizedKey] = EMPTY_OBJ;
  4471. }
  4472. }
  4473. } else if (raw) {
  4474. if (!isObject$2(raw)) {
  4475. warn$2(`invalid props options`, raw);
  4476. }
  4477. for (const key in raw) {
  4478. const normalizedKey = camelize(key);
  4479. if (validatePropName(normalizedKey)) {
  4480. const opt = raw[key];
  4481. const prop = normalized[normalizedKey] = isArray$2(opt) || isFunction$1(opt) ? { type: opt } : Object.assign({}, opt);
  4482. if (prop) {
  4483. const booleanIndex = getTypeIndex(Boolean, prop.type);
  4484. const stringIndex = getTypeIndex(String, prop.type);
  4485. prop[
  4486. 0
  4487. /* BooleanFlags.shouldCast */
  4488. ] = booleanIndex > -1;
  4489. prop[
  4490. 1
  4491. /* BooleanFlags.shouldCastTrue */
  4492. ] = stringIndex < 0 || booleanIndex < stringIndex;
  4493. if (booleanIndex > -1 || hasOwn(prop, "default")) {
  4494. needCastKeys.push(normalizedKey);
  4495. }
  4496. }
  4497. }
  4498. }
  4499. }
  4500. const res = [normalized, needCastKeys];
  4501. if (isObject$2(comp)) {
  4502. cache.set(comp, res);
  4503. }
  4504. return res;
  4505. }
  4506. function validatePropName(key) {
  4507. if (key[0] !== "$") {
  4508. return true;
  4509. } else {
  4510. warn$2(`Invalid prop name: "${key}" is a reserved property.`);
  4511. }
  4512. return false;
  4513. }
  4514. function getType(ctor) {
  4515. const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
  4516. return match ? match[2] : ctor === null ? "null" : "";
  4517. }
  4518. function isSameType(a, b) {
  4519. return getType(a) === getType(b);
  4520. }
  4521. function getTypeIndex(type2, expectedTypes) {
  4522. if (isArray$2(expectedTypes)) {
  4523. return expectedTypes.findIndex((t2) => isSameType(t2, type2));
  4524. } else if (isFunction$1(expectedTypes)) {
  4525. return isSameType(expectedTypes, type2) ? 0 : -1;
  4526. }
  4527. return -1;
  4528. }
  4529. function validateProps(rawProps, props2, instance) {
  4530. const resolvedValues = toRaw(props2);
  4531. const options = instance.propsOptions[0];
  4532. for (const key in options) {
  4533. let opt = options[key];
  4534. if (opt == null)
  4535. continue;
  4536. validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)));
  4537. }
  4538. }
  4539. function validateProp(name, value2, prop, isAbsent) {
  4540. const { type: type2, required: required2, validator } = prop;
  4541. if (required2 && isAbsent) {
  4542. warn$2('Missing required prop: "' + name + '"');
  4543. return;
  4544. }
  4545. if (value2 == null && !prop.required) {
  4546. return;
  4547. }
  4548. if (type2 != null && type2 !== true) {
  4549. let isValid2 = false;
  4550. const types2 = isArray$2(type2) ? type2 : [type2];
  4551. const expectedTypes = [];
  4552. for (let i = 0; i < types2.length && !isValid2; i++) {
  4553. const { valid, expectedType } = assertType(value2, types2[i]);
  4554. expectedTypes.push(expectedType || "");
  4555. isValid2 = valid;
  4556. }
  4557. if (!isValid2) {
  4558. warn$2(getInvalidTypeMessage(name, value2, expectedTypes));
  4559. return;
  4560. }
  4561. }
  4562. if (validator && !validator(value2)) {
  4563. warn$2('Invalid prop: custom validator check failed for prop "' + name + '".');
  4564. }
  4565. }
  4566. const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
  4567. function assertType(value2, type2) {
  4568. let valid;
  4569. const expectedType = getType(type2);
  4570. if (isSimpleType(expectedType)) {
  4571. const t2 = typeof value2;
  4572. valid = t2 === expectedType.toLowerCase();
  4573. if (!valid && t2 === "object") {
  4574. valid = value2 instanceof type2;
  4575. }
  4576. } else if (expectedType === "Object") {
  4577. valid = isObject$2(value2);
  4578. } else if (expectedType === "Array") {
  4579. valid = isArray$2(value2);
  4580. } else if (expectedType === "null") {
  4581. valid = value2 === null;
  4582. } else {
  4583. valid = value2 instanceof type2;
  4584. }
  4585. return {
  4586. valid,
  4587. expectedType
  4588. };
  4589. }
  4590. function getInvalidTypeMessage(name, value2, expectedTypes) {
  4591. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  4592. const expectedType = expectedTypes[0];
  4593. const receivedType = toRawType(value2);
  4594. const expectedValue = styleValue(value2, expectedType);
  4595. const receivedValue = styleValue(value2, receivedType);
  4596. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  4597. message += ` with value ${expectedValue}`;
  4598. }
  4599. message += `, got ${receivedType} `;
  4600. if (isExplicable(receivedType)) {
  4601. message += `with value ${receivedValue}.`;
  4602. }
  4603. return message;
  4604. }
  4605. function styleValue(value2, type2) {
  4606. if (type2 === "String") {
  4607. return `"${value2}"`;
  4608. } else if (type2 === "Number") {
  4609. return `${Number(value2)}`;
  4610. } else {
  4611. return `${value2}`;
  4612. }
  4613. }
  4614. function isExplicable(type2) {
  4615. const explicitTypes = ["string", "number", "boolean"];
  4616. return explicitTypes.some((elem) => type2.toLowerCase() === elem);
  4617. }
  4618. function isBoolean(...args) {
  4619. return args.some((elem) => elem.toLowerCase() === "boolean");
  4620. }
  4621. function createAppContext() {
  4622. return {
  4623. app: null,
  4624. config: {
  4625. isNativeTag: NO,
  4626. performance: false,
  4627. globalProperties: {},
  4628. optionMergeStrategies: {},
  4629. errorHandler: void 0,
  4630. warnHandler: void 0,
  4631. compilerOptions: {}
  4632. },
  4633. mixins: [],
  4634. components: {},
  4635. directives: {},
  4636. provides: /* @__PURE__ */ Object.create(null),
  4637. optionsCache: /* @__PURE__ */ new WeakMap(),
  4638. propsCache: /* @__PURE__ */ new WeakMap(),
  4639. emitsCache: /* @__PURE__ */ new WeakMap()
  4640. };
  4641. }
  4642. let uid$1 = 0;
  4643. function createAppAPI(render, hydrate) {
  4644. return function createApp2(rootComponent, rootProps = null) {
  4645. if (!isFunction$1(rootComponent)) {
  4646. rootComponent = Object.assign({}, rootComponent);
  4647. }
  4648. if (rootProps != null && !isObject$2(rootProps)) {
  4649. warn$2(`root props passed to app.mount() must be an object.`);
  4650. rootProps = null;
  4651. }
  4652. const context = createAppContext();
  4653. const installedPlugins = /* @__PURE__ */ new Set();
  4654. const app = context.app = {
  4655. _uid: uid$1++,
  4656. _component: rootComponent,
  4657. _props: rootProps,
  4658. _container: null,
  4659. _context: context,
  4660. _instance: null,
  4661. version: version$1,
  4662. get config() {
  4663. return context.config;
  4664. },
  4665. set config(v) {
  4666. {
  4667. warn$2(`app.config cannot be replaced. Modify individual options instead.`);
  4668. }
  4669. },
  4670. use(plugin2, ...options) {
  4671. if (installedPlugins.has(plugin2)) {
  4672. warn$2(`Plugin has already been applied to target app.`);
  4673. } else if (plugin2 && isFunction$1(plugin2.install)) {
  4674. installedPlugins.add(plugin2);
  4675. plugin2.install(app, ...options);
  4676. } else if (isFunction$1(plugin2)) {
  4677. installedPlugins.add(plugin2);
  4678. plugin2(app, ...options);
  4679. } else {
  4680. warn$2(`A plugin must either be a function or an object with an "install" function.`);
  4681. }
  4682. return app;
  4683. },
  4684. mixin(mixin2) {
  4685. {
  4686. if (!context.mixins.includes(mixin2)) {
  4687. context.mixins.push(mixin2);
  4688. } else {
  4689. warn$2("Mixin has already been applied to target app" + (mixin2.name ? `: ${mixin2.name}` : ""));
  4690. }
  4691. }
  4692. return app;
  4693. },
  4694. component(name, component) {
  4695. {
  4696. validateComponentName(name, context.config);
  4697. }
  4698. if (!component) {
  4699. return context.components[name];
  4700. }
  4701. if (context.components[name]) {
  4702. warn$2(`Component "${name}" has already been registered in target app.`);
  4703. }
  4704. context.components[name] = component;
  4705. return app;
  4706. },
  4707. directive(name, directive) {
  4708. {
  4709. validateDirectiveName(name);
  4710. }
  4711. if (!directive) {
  4712. return context.directives[name];
  4713. }
  4714. if (context.directives[name]) {
  4715. warn$2(`Directive "${name}" has already been registered in target app.`);
  4716. }
  4717. context.directives[name] = directive;
  4718. return app;
  4719. },
  4720. // fixed by xxxxxx
  4721. mount() {
  4722. },
  4723. // fixed by xxxxxx
  4724. unmount() {
  4725. },
  4726. provide(key, value2) {
  4727. if (key in context.provides) {
  4728. warn$2(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
  4729. }
  4730. context.provides[key] = value2;
  4731. return app;
  4732. }
  4733. };
  4734. return app;
  4735. };
  4736. }
  4737. let supported;
  4738. let perf;
  4739. function startMeasure(instance, type2) {
  4740. if (instance.appContext.config.performance && isSupported()) {
  4741. perf.mark(`vue-${type2}-${instance.uid}`);
  4742. }
  4743. {
  4744. devtoolsPerfStart(instance, type2, isSupported() ? perf.now() : Date.now());
  4745. }
  4746. }
  4747. function endMeasure(instance, type2) {
  4748. if (instance.appContext.config.performance && isSupported()) {
  4749. const startTag = `vue-${type2}-${instance.uid}`;
  4750. const endTag = startTag + `:end`;
  4751. perf.mark(endTag);
  4752. perf.measure(`<${formatComponentName(instance, instance.type)}> ${type2}`, startTag, endTag);
  4753. perf.clearMarks(startTag);
  4754. perf.clearMarks(endTag);
  4755. }
  4756. {
  4757. devtoolsPerfEnd(instance, type2, isSupported() ? perf.now() : Date.now());
  4758. }
  4759. }
  4760. function isSupported() {
  4761. if (supported !== void 0) {
  4762. return supported;
  4763. }
  4764. if (typeof window !== "undefined" && window.performance) {
  4765. supported = true;
  4766. perf = window.performance;
  4767. } else {
  4768. supported = false;
  4769. }
  4770. return supported;
  4771. }
  4772. const queuePostRenderEffect$1 = queuePostFlushCb;
  4773. const Fragment = Symbol("Fragment");
  4774. const Text$1 = Symbol("Text");
  4775. const Comment = Symbol("Comment");
  4776. const Static = Symbol("Static");
  4777. function isVNode(value2) {
  4778. return value2 ? value2.__v_isVNode === true : false;
  4779. }
  4780. const InternalObjectKey = `__vInternal`;
  4781. function guardReactiveProps(props2) {
  4782. if (!props2)
  4783. return null;
  4784. return isProxy(props2) || InternalObjectKey in props2 ? extend$1({}, props2) : props2;
  4785. }
  4786. const emptyAppContext = createAppContext();
  4787. let uid = 0;
  4788. function createComponentInstance(vnode, parent, suspense) {
  4789. const type2 = vnode.type;
  4790. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  4791. const instance = {
  4792. uid: uid++,
  4793. vnode,
  4794. type: type2,
  4795. parent,
  4796. appContext,
  4797. root: null,
  4798. next: null,
  4799. subTree: null,
  4800. effect: null,
  4801. update: null,
  4802. scope: new EffectScope(
  4803. true
  4804. /* detached */
  4805. ),
  4806. render: null,
  4807. proxy: null,
  4808. exposed: null,
  4809. exposeProxy: null,
  4810. withProxy: null,
  4811. provides: parent ? parent.provides : Object.create(appContext.provides),
  4812. accessCache: null,
  4813. renderCache: [],
  4814. // local resolved assets
  4815. components: null,
  4816. directives: null,
  4817. // resolved props and emits options
  4818. propsOptions: normalizePropsOptions(type2, appContext),
  4819. emitsOptions: normalizeEmitsOptions(type2, appContext),
  4820. // emit
  4821. emit: null,
  4822. emitted: null,
  4823. // props default value
  4824. propsDefaults: EMPTY_OBJ,
  4825. // inheritAttrs
  4826. inheritAttrs: type2.inheritAttrs,
  4827. // state
  4828. ctx: EMPTY_OBJ,
  4829. data: EMPTY_OBJ,
  4830. props: EMPTY_OBJ,
  4831. attrs: EMPTY_OBJ,
  4832. slots: EMPTY_OBJ,
  4833. refs: EMPTY_OBJ,
  4834. setupState: EMPTY_OBJ,
  4835. setupContext: null,
  4836. // suspense related
  4837. suspense,
  4838. suspenseId: suspense ? suspense.pendingId : 0,
  4839. asyncDep: null,
  4840. asyncResolved: false,
  4841. // lifecycle hooks
  4842. // not using enums here because it results in computed properties
  4843. isMounted: false,
  4844. isUnmounted: false,
  4845. isDeactivated: false,
  4846. bc: null,
  4847. c: null,
  4848. bm: null,
  4849. m: null,
  4850. bu: null,
  4851. u: null,
  4852. um: null,
  4853. bum: null,
  4854. da: null,
  4855. a: null,
  4856. rtg: null,
  4857. rtc: null,
  4858. ec: null,
  4859. sp: null
  4860. };
  4861. {
  4862. instance.ctx = createDevRenderContext(instance);
  4863. }
  4864. instance.root = parent ? parent.root : instance;
  4865. instance.emit = emit.bind(null, instance);
  4866. if (vnode.ce) {
  4867. vnode.ce(instance);
  4868. }
  4869. return instance;
  4870. }
  4871. let currentInstance = null;
  4872. const getCurrentInstance = () => currentInstance || currentRenderingInstance;
  4873. const setCurrentInstance = (instance) => {
  4874. currentInstance = instance;
  4875. instance.scope.on();
  4876. };
  4877. const unsetCurrentInstance = () => {
  4878. currentInstance && currentInstance.scope.off();
  4879. currentInstance = null;
  4880. };
  4881. const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
  4882. function validateComponentName(name, config2) {
  4883. const appIsNativeTag = config2.isNativeTag || NO;
  4884. if (isBuiltInTag(name) || appIsNativeTag(name)) {
  4885. warn$2("Do not use built-in or reserved HTML elements as component id: " + name);
  4886. }
  4887. }
  4888. function isStatefulComponent(instance) {
  4889. return instance.vnode.shapeFlag & 4;
  4890. }
  4891. let isInSSRComponentSetup = false;
  4892. function setupComponent(instance, isSSR = false) {
  4893. isInSSRComponentSetup = isSSR;
  4894. const {
  4895. props: props2
  4896. /*, children*/
  4897. } = instance.vnode;
  4898. const isStateful = isStatefulComponent(instance);
  4899. initProps$1(instance, props2, isStateful, isSSR);
  4900. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  4901. isInSSRComponentSetup = false;
  4902. return setupResult;
  4903. }
  4904. function setupStatefulComponent(instance, isSSR) {
  4905. const Component2 = instance.type;
  4906. {
  4907. if (Component2.name) {
  4908. validateComponentName(Component2.name, instance.appContext.config);
  4909. }
  4910. if (Component2.components) {
  4911. const names = Object.keys(Component2.components);
  4912. for (let i = 0; i < names.length; i++) {
  4913. validateComponentName(names[i], instance.appContext.config);
  4914. }
  4915. }
  4916. if (Component2.directives) {
  4917. const names = Object.keys(Component2.directives);
  4918. for (let i = 0; i < names.length; i++) {
  4919. validateDirectiveName(names[i]);
  4920. }
  4921. }
  4922. if (Component2.compilerOptions && isRuntimeOnly()) {
  4923. warn$2(`"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`);
  4924. }
  4925. }
  4926. instance.accessCache = /* @__PURE__ */ Object.create(null);
  4927. instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
  4928. {
  4929. exposePropsOnRenderContext(instance);
  4930. }
  4931. const { setup } = Component2;
  4932. if (setup) {
  4933. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  4934. setCurrentInstance(instance);
  4935. pauseTracking();
  4936. const setupResult = callWithErrorHandling(setup, instance, 0, [shallowReadonly(instance.props), setupContext]);
  4937. resetTracking();
  4938. unsetCurrentInstance();
  4939. if (isPromise(setupResult)) {
  4940. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  4941. {
  4942. warn$2(`setup() returned a Promise, but the version of Vue you are using does not support it yet.`);
  4943. }
  4944. } else {
  4945. handleSetupResult(instance, setupResult, isSSR);
  4946. }
  4947. } else {
  4948. finishComponentSetup(instance, isSSR);
  4949. }
  4950. }
  4951. function handleSetupResult(instance, setupResult, isSSR) {
  4952. if (isFunction$1(setupResult)) {
  4953. {
  4954. instance.render = setupResult;
  4955. }
  4956. } else if (isObject$2(setupResult)) {
  4957. if (isVNode(setupResult)) {
  4958. warn$2(`setup() should not return VNodes directly - return a render function instead.`);
  4959. }
  4960. {
  4961. instance.devtoolsRawSetupState = setupResult;
  4962. }
  4963. instance.setupState = proxyRefs(setupResult);
  4964. {
  4965. exposeSetupStateOnRenderContext(instance);
  4966. }
  4967. } else if (setupResult !== void 0) {
  4968. warn$2(`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`);
  4969. }
  4970. finishComponentSetup(instance, isSSR);
  4971. }
  4972. let compile;
  4973. const isRuntimeOnly = () => !compile;
  4974. function finishComponentSetup(instance, isSSR, skipOptions) {
  4975. const Component2 = instance.type;
  4976. if (!instance.render) {
  4977. instance.render = Component2.render || NOOP;
  4978. }
  4979. {
  4980. setCurrentInstance(instance);
  4981. pauseTracking();
  4982. applyOptions$1(instance);
  4983. resetTracking();
  4984. unsetCurrentInstance();
  4985. }
  4986. if (!Component2.render && instance.render === NOOP && !isSSR) {
  4987. if (Component2.template) {
  4988. warn$2(
  4989. `Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  4990. /* should not happen */
  4991. );
  4992. } else {
  4993. warn$2(`Component is missing template or render function.`);
  4994. }
  4995. }
  4996. }
  4997. function createAttrsProxy(instance) {
  4998. return new Proxy(
  4999. instance.attrs,
  5000. {
  5001. get(target, key) {
  5002. track(instance, "get", "$attrs");
  5003. return target[key];
  5004. },
  5005. set() {
  5006. warn$2(`setupContext.attrs is readonly.`);
  5007. return false;
  5008. },
  5009. deleteProperty() {
  5010. warn$2(`setupContext.attrs is readonly.`);
  5011. return false;
  5012. }
  5013. }
  5014. );
  5015. }
  5016. function createSetupContext(instance) {
  5017. const expose = (exposed) => {
  5018. {
  5019. if (instance.exposed) {
  5020. warn$2(`expose() should be called only once per setup().`);
  5021. }
  5022. if (exposed != null) {
  5023. let exposedType = typeof exposed;
  5024. if (exposedType === "object") {
  5025. if (isArray$2(exposed)) {
  5026. exposedType = "array";
  5027. } else if (isRef(exposed)) {
  5028. exposedType = "ref";
  5029. }
  5030. }
  5031. if (exposedType !== "object") {
  5032. warn$2(`expose() should be passed a plain object, received ${exposedType}.`);
  5033. }
  5034. }
  5035. }
  5036. instance.exposed = exposed || {};
  5037. };
  5038. let attrs;
  5039. {
  5040. return Object.freeze({
  5041. get attrs() {
  5042. return attrs || (attrs = createAttrsProxy(instance));
  5043. },
  5044. get slots() {
  5045. return shallowReadonly(instance.slots);
  5046. },
  5047. get emit() {
  5048. return (event, ...args) => instance.emit(event, ...args);
  5049. },
  5050. expose
  5051. });
  5052. }
  5053. }
  5054. function getExposeProxy(instance) {
  5055. if (instance.exposed) {
  5056. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  5057. get(target, key) {
  5058. if (key in target) {
  5059. return target[key];
  5060. }
  5061. return instance.proxy[key];
  5062. },
  5063. has(target, key) {
  5064. return key in target || key in publicPropertiesMap;
  5065. }
  5066. }));
  5067. }
  5068. }
  5069. const classifyRE = /(?:^|[-_])(\w)/g;
  5070. const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  5071. function getComponentName(Component2, includeInferred = true) {
  5072. return isFunction$1(Component2) ? Component2.displayName || Component2.name : Component2.name || includeInferred && Component2.__name;
  5073. }
  5074. function formatComponentName(instance, Component2, isRoot = false) {
  5075. let name = getComponentName(Component2);
  5076. if (!name && Component2.__file) {
  5077. const match = Component2.__file.match(/([^/\\]+)\.\w+$/);
  5078. if (match) {
  5079. name = match[1];
  5080. }
  5081. }
  5082. if (!name && instance && instance.parent) {
  5083. const inferFromRegistry = (registry) => {
  5084. for (const key in registry) {
  5085. if (registry[key] === Component2) {
  5086. return key;
  5087. }
  5088. }
  5089. };
  5090. name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
  5091. }
  5092. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  5093. }
  5094. const computed = (getterOrOptions, debugOptions) => {
  5095. return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
  5096. };
  5097. const version$1 = "3.2.47";
  5098. function unwrapper(target) {
  5099. return unref(target);
  5100. }
  5101. const ARRAYTYPE = "[object Array]";
  5102. const OBJECTTYPE = "[object Object]";
  5103. function diff$1(current, pre) {
  5104. const result = {};
  5105. syncKeys(current, pre);
  5106. _diff(current, pre, "", result);
  5107. return result;
  5108. }
  5109. function syncKeys(current, pre) {
  5110. current = unwrapper(current);
  5111. if (current === pre)
  5112. return;
  5113. const rootCurrentType = toTypeString(current);
  5114. const rootPreType = toTypeString(pre);
  5115. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  5116. for (let key in pre) {
  5117. const currentValue = current[key];
  5118. if (currentValue === void 0) {
  5119. current[key] = null;
  5120. } else {
  5121. syncKeys(currentValue, pre[key]);
  5122. }
  5123. }
  5124. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  5125. if (current.length >= pre.length) {
  5126. pre.forEach((item, index2) => {
  5127. syncKeys(current[index2], item);
  5128. });
  5129. }
  5130. }
  5131. }
  5132. function _diff(current, pre, path, result) {
  5133. current = unwrapper(current);
  5134. if (current === pre)
  5135. return;
  5136. const rootCurrentType = toTypeString(current);
  5137. const rootPreType = toTypeString(pre);
  5138. if (rootCurrentType == OBJECTTYPE) {
  5139. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  5140. setResult(result, path, current);
  5141. } else {
  5142. for (let key in current) {
  5143. const currentValue = unwrapper(current[key]);
  5144. const preValue = pre[key];
  5145. const currentType = toTypeString(currentValue);
  5146. const preType = toTypeString(preValue);
  5147. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  5148. if (currentValue != preValue) {
  5149. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5150. }
  5151. } else if (currentType == ARRAYTYPE) {
  5152. if (preType != ARRAYTYPE) {
  5153. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5154. } else {
  5155. if (currentValue.length < preValue.length) {
  5156. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5157. } else {
  5158. currentValue.forEach((item, index2) => {
  5159. _diff(item, preValue[index2], (path == "" ? "" : path + ".") + key + "[" + index2 + "]", result);
  5160. });
  5161. }
  5162. }
  5163. } else if (currentType == OBJECTTYPE) {
  5164. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  5165. setResult(result, (path == "" ? "" : path + ".") + key, currentValue);
  5166. } else {
  5167. for (let subKey in currentValue) {
  5168. _diff(currentValue[subKey], preValue[subKey], (path == "" ? "" : path + ".") + key + "." + subKey, result);
  5169. }
  5170. }
  5171. }
  5172. }
  5173. }
  5174. } else if (rootCurrentType == ARRAYTYPE) {
  5175. if (rootPreType != ARRAYTYPE) {
  5176. setResult(result, path, current);
  5177. } else {
  5178. if (current.length < pre.length) {
  5179. setResult(result, path, current);
  5180. } else {
  5181. current.forEach((item, index2) => {
  5182. _diff(item, pre[index2], path + "[" + index2 + "]", result);
  5183. });
  5184. }
  5185. }
  5186. } else {
  5187. setResult(result, path, current);
  5188. }
  5189. }
  5190. function setResult(result, k, v) {
  5191. result[k] = v;
  5192. }
  5193. function hasComponentEffect(instance) {
  5194. return queue.includes(instance.update);
  5195. }
  5196. function flushCallbacks(instance) {
  5197. const ctx = instance.ctx;
  5198. const callbacks = ctx.__next_tick_callbacks;
  5199. if (callbacks && callbacks.length) {
  5200. const copies = callbacks.slice(0);
  5201. callbacks.length = 0;
  5202. for (let i = 0; i < copies.length; i++) {
  5203. copies[i]();
  5204. }
  5205. }
  5206. }
  5207. function nextTick(instance, fn) {
  5208. const ctx = instance.ctx;
  5209. if (!ctx.__next_tick_pending && !hasComponentEffect(instance)) {
  5210. return nextTick$1(fn && fn.bind(instance.proxy));
  5211. }
  5212. let _resolve;
  5213. if (!ctx.__next_tick_callbacks) {
  5214. ctx.__next_tick_callbacks = [];
  5215. }
  5216. ctx.__next_tick_callbacks.push(() => {
  5217. if (fn) {
  5218. callWithErrorHandling(
  5219. fn.bind(instance.proxy),
  5220. instance,
  5221. 14
  5222. /* ErrorCodes.SCHEDULER */
  5223. );
  5224. } else if (_resolve) {
  5225. _resolve(instance.proxy);
  5226. }
  5227. });
  5228. return new Promise((resolve2) => {
  5229. _resolve = resolve2;
  5230. });
  5231. }
  5232. function clone$3(src, seen) {
  5233. src = unwrapper(src);
  5234. const type2 = typeof src;
  5235. if (type2 === "object" && src !== null) {
  5236. let copy = seen.get(src);
  5237. if (typeof copy !== "undefined") {
  5238. return copy;
  5239. }
  5240. if (isArray$2(src)) {
  5241. const len = src.length;
  5242. copy = new Array(len);
  5243. seen.set(src, copy);
  5244. for (let i = 0; i < len; i++) {
  5245. copy[i] = clone$3(src[i], seen);
  5246. }
  5247. } else {
  5248. copy = {};
  5249. seen.set(src, copy);
  5250. for (const name in src) {
  5251. if (hasOwn(src, name)) {
  5252. copy[name] = clone$3(src[name], seen);
  5253. }
  5254. }
  5255. }
  5256. return copy;
  5257. }
  5258. if (type2 !== "symbol") {
  5259. return src;
  5260. }
  5261. }
  5262. function deepCopy(src) {
  5263. return clone$3(src, typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : /* @__PURE__ */ new Map());
  5264. }
  5265. function getMPInstanceData(instance, keys2) {
  5266. const data = instance.data;
  5267. const ret = /* @__PURE__ */ Object.create(null);
  5268. keys2.forEach((key) => {
  5269. ret[key] = data[key];
  5270. });
  5271. return ret;
  5272. }
  5273. function patch(instance, data, oldData) {
  5274. if (!data) {
  5275. return;
  5276. }
  5277. data = deepCopy(data);
  5278. const ctx = instance.ctx;
  5279. const mpType = ctx.mpType;
  5280. if (mpType === "page" || mpType === "component") {
  5281. data.r0 = 1;
  5282. const mpInstance = ctx.$scope;
  5283. const keys2 = Object.keys(data);
  5284. const diffData = diff$1(data, oldData || getMPInstanceData(mpInstance, keys2));
  5285. if (Object.keys(diffData).length) {
  5286. ctx.__next_tick_pending = true;
  5287. mpInstance.setData(diffData, () => {
  5288. ctx.__next_tick_pending = false;
  5289. flushCallbacks(instance);
  5290. });
  5291. flushPreFlushCbs();
  5292. } else {
  5293. flushCallbacks(instance);
  5294. }
  5295. }
  5296. }
  5297. function initAppConfig(appConfig) {
  5298. appConfig.globalProperties.$nextTick = function $nextTick(fn) {
  5299. return nextTick(this.$, fn);
  5300. };
  5301. }
  5302. function onApplyOptions(options, instance, publicThis) {
  5303. instance.appContext.config.globalProperties.$applyOptions(options, instance, publicThis);
  5304. const computedOptions = options.computed;
  5305. if (computedOptions) {
  5306. const keys2 = Object.keys(computedOptions);
  5307. if (keys2.length) {
  5308. const ctx = instance.ctx;
  5309. if (!ctx.$computedKeys) {
  5310. ctx.$computedKeys = [];
  5311. }
  5312. ctx.$computedKeys.push(...keys2);
  5313. }
  5314. }
  5315. delete instance.ctx.$onApplyOptions;
  5316. }
  5317. function setRef$1(instance, isUnmount = false) {
  5318. const { setupState, $templateRefs, ctx: { $scope, $mpPlatform } } = instance;
  5319. if ($mpPlatform === "mp-alipay") {
  5320. return;
  5321. }
  5322. if (!$templateRefs || !$scope) {
  5323. return;
  5324. }
  5325. if (isUnmount) {
  5326. return $templateRefs.forEach((templateRef) => setTemplateRef(templateRef, null, setupState));
  5327. }
  5328. const check = $mpPlatform === "mp-baidu" || $mpPlatform === "mp-toutiao";
  5329. const doSetByRefs = (refs) => {
  5330. const mpComponents = (
  5331. // 字节小程序 selectAllComponents 可能返回 null
  5332. // https://github.com/dcloudio/uni-app/issues/3954
  5333. ($scope.selectAllComponents(".r") || []).concat($scope.selectAllComponents(".r-i-f") || [])
  5334. );
  5335. return refs.filter((templateRef) => {
  5336. const refValue = findComponentPublicInstance(mpComponents, templateRef.i);
  5337. if (check && refValue === null) {
  5338. return true;
  5339. }
  5340. setTemplateRef(templateRef, refValue, setupState);
  5341. return false;
  5342. });
  5343. };
  5344. const doSet = () => {
  5345. const refs = doSetByRefs($templateRefs);
  5346. if (refs.length && instance.proxy && instance.proxy.$scope) {
  5347. instance.proxy.$scope.setData({ r1: 1 }, () => {
  5348. doSetByRefs(refs);
  5349. });
  5350. }
  5351. };
  5352. if ($scope._$setRef) {
  5353. $scope._$setRef(doSet);
  5354. } else {
  5355. nextTick(instance, doSet);
  5356. }
  5357. }
  5358. function toSkip(value2) {
  5359. if (isObject$2(value2)) {
  5360. markRaw(value2);
  5361. }
  5362. return value2;
  5363. }
  5364. function findComponentPublicInstance(mpComponents, id) {
  5365. const mpInstance = mpComponents.find((com) => com && (com.properties || com.props).uI === id);
  5366. if (mpInstance) {
  5367. const vm = mpInstance.$vm;
  5368. if (vm) {
  5369. return getExposeProxy(vm.$) || vm;
  5370. }
  5371. return toSkip(mpInstance);
  5372. }
  5373. return null;
  5374. }
  5375. function setTemplateRef({ r, f: f2 }, refValue, setupState) {
  5376. if (isFunction$1(r)) {
  5377. r(refValue, {});
  5378. } else {
  5379. const _isString = isString$1(r);
  5380. const _isRef = isRef(r);
  5381. if (_isString || _isRef) {
  5382. if (f2) {
  5383. if (!_isRef) {
  5384. return;
  5385. }
  5386. if (!isArray$2(r.value)) {
  5387. r.value = [];
  5388. }
  5389. const existing = r.value;
  5390. if (existing.indexOf(refValue) === -1) {
  5391. existing.push(refValue);
  5392. if (!refValue) {
  5393. return;
  5394. }
  5395. onBeforeUnmount(() => remove(existing, refValue), refValue.$);
  5396. }
  5397. } else if (_isString) {
  5398. if (hasOwn(setupState, r)) {
  5399. setupState[r] = refValue;
  5400. }
  5401. } else if (isRef(r)) {
  5402. r.value = refValue;
  5403. } else {
  5404. warnRef(r);
  5405. }
  5406. } else {
  5407. warnRef(r);
  5408. }
  5409. }
  5410. }
  5411. function warnRef(ref2) {
  5412. warn$2("Invalid template ref type:", ref2, `(${typeof ref2})`);
  5413. }
  5414. var MPType;
  5415. (function(MPType2) {
  5416. MPType2["APP"] = "app";
  5417. MPType2["PAGE"] = "page";
  5418. MPType2["COMPONENT"] = "component";
  5419. })(MPType || (MPType = {}));
  5420. const queuePostRenderEffect = queuePostFlushCb;
  5421. function mountComponent(initialVNode, options) {
  5422. const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null);
  5423. {
  5424. instance.ctx.$onApplyOptions = onApplyOptions;
  5425. instance.ctx.$children = [];
  5426. }
  5427. if (options.mpType === "app") {
  5428. instance.render = NOOP;
  5429. }
  5430. if (options.onBeforeSetup) {
  5431. options.onBeforeSetup(instance, options);
  5432. }
  5433. {
  5434. pushWarningContext(initialVNode);
  5435. startMeasure(instance, `mount`);
  5436. }
  5437. {
  5438. startMeasure(instance, `init`);
  5439. }
  5440. setupComponent(instance);
  5441. {
  5442. endMeasure(instance, `init`);
  5443. }
  5444. {
  5445. if (options.parentComponent && instance.proxy) {
  5446. options.parentComponent.ctx.$children.push(getExposeProxy(instance) || instance.proxy);
  5447. }
  5448. }
  5449. setupRenderEffect(instance);
  5450. {
  5451. popWarningContext();
  5452. endMeasure(instance, `mount`);
  5453. }
  5454. return instance.proxy;
  5455. }
  5456. const getFunctionalFallthrough = (attrs) => {
  5457. let res;
  5458. for (const key in attrs) {
  5459. if (key === "class" || key === "style" || isOn(key)) {
  5460. (res || (res = {}))[key] = attrs[key];
  5461. }
  5462. }
  5463. return res;
  5464. };
  5465. function renderComponentRoot(instance) {
  5466. const { type: Component2, vnode, proxy, withProxy, props: props2, propsOptions: [propsOptions], slots, attrs, emit: emit2, render, renderCache, data, setupState, ctx, uid: uid2, appContext: { app: { config: { globalProperties: { pruneComponentPropsCache: pruneComponentPropsCache2 } } } }, inheritAttrs } = instance;
  5467. instance.$templateRefs = [];
  5468. instance.$ei = 0;
  5469. pruneComponentPropsCache2(uid2);
  5470. instance.__counter = instance.__counter === 0 ? 1 : 0;
  5471. let result;
  5472. const prev = setCurrentRenderingInstance(instance);
  5473. try {
  5474. if (vnode.shapeFlag & 4) {
  5475. fallthroughAttrs(inheritAttrs, props2, propsOptions, attrs);
  5476. const proxyToUse = withProxy || proxy;
  5477. result = render.call(proxyToUse, proxyToUse, renderCache, props2, setupState, data, ctx);
  5478. } else {
  5479. fallthroughAttrs(inheritAttrs, props2, propsOptions, Component2.props ? attrs : getFunctionalFallthrough(attrs));
  5480. const render2 = Component2;
  5481. result = render2.length > 1 ? render2(props2, { attrs, slots, emit: emit2 }) : render2(
  5482. props2,
  5483. null
  5484. /* we know it doesn't need it */
  5485. );
  5486. }
  5487. } catch (err) {
  5488. handleError(
  5489. err,
  5490. instance,
  5491. 1
  5492. /* ErrorCodes.RENDER_FUNCTION */
  5493. );
  5494. result = false;
  5495. }
  5496. setRef$1(instance);
  5497. setCurrentRenderingInstance(prev);
  5498. return result;
  5499. }
  5500. function fallthroughAttrs(inheritAttrs, props2, propsOptions, fallthroughAttrs2) {
  5501. if (props2 && fallthroughAttrs2 && inheritAttrs !== false) {
  5502. const keys2 = Object.keys(fallthroughAttrs2).filter((key) => key !== "class" && key !== "style");
  5503. if (!keys2.length) {
  5504. return;
  5505. }
  5506. if (propsOptions && keys2.some(isModelListener)) {
  5507. keys2.forEach((key) => {
  5508. if (!isModelListener(key) || !(key.slice(9) in propsOptions)) {
  5509. props2[key] = fallthroughAttrs2[key];
  5510. }
  5511. });
  5512. } else {
  5513. keys2.forEach((key) => props2[key] = fallthroughAttrs2[key]);
  5514. }
  5515. }
  5516. }
  5517. const updateComponentPreRender = (instance) => {
  5518. pauseTracking();
  5519. flushPreFlushCbs();
  5520. resetTracking();
  5521. };
  5522. function componentUpdateScopedSlotsFn() {
  5523. const scopedSlotsData = this.$scopedSlotsData;
  5524. if (!scopedSlotsData || scopedSlotsData.length === 0) {
  5525. return;
  5526. }
  5527. const mpInstance = this.ctx.$scope;
  5528. const oldData = mpInstance.data;
  5529. const diffData = /* @__PURE__ */ Object.create(null);
  5530. scopedSlotsData.forEach(({ path, index: index2, data }) => {
  5531. const oldScopedSlotData = getValueByDataPath(oldData, path);
  5532. const diffPath = isString$1(index2) ? `${path}.${index2}` : `${path}[${index2}]`;
  5533. if (typeof oldScopedSlotData === "undefined" || typeof oldScopedSlotData[index2] === "undefined") {
  5534. diffData[diffPath] = data;
  5535. } else {
  5536. const diffScopedSlotData = diff$1(data, oldScopedSlotData[index2]);
  5537. Object.keys(diffScopedSlotData).forEach((name) => {
  5538. diffData[diffPath + "." + name] = diffScopedSlotData[name];
  5539. });
  5540. }
  5541. });
  5542. scopedSlotsData.length = 0;
  5543. if (Object.keys(diffData).length) {
  5544. mpInstance.setData(diffData);
  5545. }
  5546. }
  5547. function toggleRecurse({ effect, update }, allowed) {
  5548. effect.allowRecurse = update.allowRecurse = allowed;
  5549. }
  5550. function setupRenderEffect(instance) {
  5551. const updateScopedSlots = componentUpdateScopedSlotsFn.bind(instance);
  5552. instance.$updateScopedSlots = () => nextTick$1(() => queueJob(updateScopedSlots));
  5553. const componentUpdateFn = () => {
  5554. if (!instance.isMounted) {
  5555. onBeforeUnmount(() => {
  5556. setRef$1(instance, true);
  5557. }, instance);
  5558. {
  5559. startMeasure(instance, `patch`);
  5560. }
  5561. patch(instance, renderComponentRoot(instance));
  5562. {
  5563. endMeasure(instance, `patch`);
  5564. }
  5565. {
  5566. devtoolsComponentAdded(instance);
  5567. }
  5568. } else {
  5569. const { next, bu, u } = instance;
  5570. {
  5571. pushWarningContext(next || instance.vnode);
  5572. }
  5573. toggleRecurse(instance, false);
  5574. updateComponentPreRender();
  5575. if (bu) {
  5576. invokeArrayFns$1(bu);
  5577. }
  5578. toggleRecurse(instance, true);
  5579. {
  5580. startMeasure(instance, `patch`);
  5581. }
  5582. patch(instance, renderComponentRoot(instance));
  5583. {
  5584. endMeasure(instance, `patch`);
  5585. }
  5586. if (u) {
  5587. queuePostRenderEffect(u);
  5588. }
  5589. {
  5590. devtoolsComponentUpdated(instance);
  5591. }
  5592. {
  5593. popWarningContext();
  5594. }
  5595. }
  5596. };
  5597. const effect = instance.effect = new ReactiveEffect(
  5598. componentUpdateFn,
  5599. () => queueJob(instance.update),
  5600. instance.scope
  5601. // track it in component's effect scope
  5602. );
  5603. const update = instance.update = effect.run.bind(effect);
  5604. update.id = instance.uid;
  5605. toggleRecurse(instance, true);
  5606. {
  5607. effect.onTrack = instance.rtc ? (e2) => invokeArrayFns$1(instance.rtc, e2) : void 0;
  5608. effect.onTrigger = instance.rtg ? (e2) => invokeArrayFns$1(instance.rtg, e2) : void 0;
  5609. update.ownerInstance = instance;
  5610. }
  5611. update();
  5612. }
  5613. function unmountComponent(instance) {
  5614. const { bum, scope, update, um } = instance;
  5615. if (bum) {
  5616. invokeArrayFns$1(bum);
  5617. }
  5618. scope.stop();
  5619. if (update) {
  5620. update.active = false;
  5621. }
  5622. if (um) {
  5623. queuePostRenderEffect(um);
  5624. }
  5625. queuePostRenderEffect(() => {
  5626. instance.isUnmounted = true;
  5627. });
  5628. {
  5629. devtoolsComponentRemoved(instance);
  5630. }
  5631. }
  5632. const oldCreateApp = createAppAPI();
  5633. function getTarget() {
  5634. if (typeof window !== "undefined") {
  5635. return window;
  5636. }
  5637. if (typeof globalThis !== "undefined") {
  5638. return globalThis;
  5639. }
  5640. if (typeof global !== "undefined") {
  5641. return global;
  5642. }
  5643. if (typeof my !== "undefined") {
  5644. return my;
  5645. }
  5646. }
  5647. function createVueApp(rootComponent, rootProps = null) {
  5648. const target = getTarget();
  5649. target.__VUE__ = true;
  5650. {
  5651. setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  5652. }
  5653. const app = oldCreateApp(rootComponent, rootProps);
  5654. const appContext = app._context;
  5655. initAppConfig(appContext.config);
  5656. const createVNode = (initialVNode) => {
  5657. initialVNode.appContext = appContext;
  5658. initialVNode.shapeFlag = 6;
  5659. return initialVNode;
  5660. };
  5661. const createComponent2 = function createComponent3(initialVNode, options) {
  5662. return mountComponent(createVNode(initialVNode), options);
  5663. };
  5664. const destroyComponent = function destroyComponent2(component) {
  5665. return component && unmountComponent(component.$);
  5666. };
  5667. app.mount = function mount() {
  5668. rootComponent.render = NOOP;
  5669. const instance = mountComponent(createVNode({ type: rootComponent }), {
  5670. mpType: MPType.APP,
  5671. mpInstance: null,
  5672. parentComponent: null,
  5673. slots: [],
  5674. props: null
  5675. });
  5676. app._instance = instance.$;
  5677. {
  5678. devtoolsInitApp(app, version$1);
  5679. }
  5680. instance.$app = app;
  5681. instance.$createComponent = createComponent2;
  5682. instance.$destroyComponent = destroyComponent;
  5683. appContext.$appInstance = instance;
  5684. return instance;
  5685. };
  5686. app.unmount = function unmount() {
  5687. warn$2(`Cannot unmount an app.`);
  5688. };
  5689. return app;
  5690. }
  5691. function injectLifecycleHook(name, hook, publicThis, instance) {
  5692. if (isFunction$1(hook)) {
  5693. injectHook(name, hook.bind(publicThis), instance);
  5694. }
  5695. }
  5696. function initHooks$1(options, instance, publicThis) {
  5697. const mpType = options.mpType || publicThis.$mpType;
  5698. if (!mpType || mpType === "component") {
  5699. return;
  5700. }
  5701. Object.keys(options).forEach((name) => {
  5702. if (isUniLifecycleHook(name, options[name], false)) {
  5703. const hooks2 = options[name];
  5704. if (isArray$2(hooks2)) {
  5705. hooks2.forEach((hook) => injectLifecycleHook(name, hook, publicThis, instance));
  5706. } else {
  5707. injectLifecycleHook(name, hooks2, publicThis, instance);
  5708. }
  5709. }
  5710. });
  5711. }
  5712. function applyOptions$2(options, instance, publicThis) {
  5713. initHooks$1(options, instance, publicThis);
  5714. }
  5715. function set$3(target, key, val) {
  5716. return target[key] = val;
  5717. }
  5718. function createErrorHandler(app) {
  5719. return function errorHandler(err, instance, _info) {
  5720. if (!instance) {
  5721. throw err;
  5722. }
  5723. const appInstance = app._instance;
  5724. if (!appInstance || !appInstance.proxy) {
  5725. throw err;
  5726. }
  5727. {
  5728. appInstance.proxy.$callHook(ON_ERROR, err);
  5729. }
  5730. };
  5731. }
  5732. function mergeAsArray(to2, from2) {
  5733. return to2 ? [...new Set([].concat(to2, from2))] : from2;
  5734. }
  5735. function initOptionMergeStrategies(optionMergeStrategies) {
  5736. UniLifecycleHooks.forEach((name) => {
  5737. optionMergeStrategies[name] = mergeAsArray;
  5738. });
  5739. }
  5740. let realAtob;
  5741. const b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  5742. const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  5743. if (typeof atob !== "function") {
  5744. realAtob = function(str) {
  5745. str = String(str).replace(/[\t\n\f\r ]+/g, "");
  5746. if (!b64re.test(str)) {
  5747. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  5748. }
  5749. str += "==".slice(2 - (str.length & 3));
  5750. var bitmap;
  5751. var result = "";
  5752. var r1;
  5753. var r2;
  5754. var i = 0;
  5755. for (; i < str.length; ) {
  5756. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  5757. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  5758. }
  5759. return result;
  5760. };
  5761. } else {
  5762. realAtob = atob;
  5763. }
  5764. function b64DecodeUnicode(str) {
  5765. return decodeURIComponent(realAtob(str).split("").map(function(c) {
  5766. return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
  5767. }).join(""));
  5768. }
  5769. function getCurrentUserInfo() {
  5770. const token2 = index$1.getStorageSync("uni_id_token") || "";
  5771. const tokenArr = token2.split(".");
  5772. if (!token2 || tokenArr.length !== 3) {
  5773. return {
  5774. uid: null,
  5775. role: [],
  5776. permission: [],
  5777. tokenExpired: 0
  5778. };
  5779. }
  5780. let userInfo;
  5781. try {
  5782. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  5783. } catch (error2) {
  5784. throw new Error("获取当前用户信息出错,详细错误信息为:" + error2.message);
  5785. }
  5786. userInfo.tokenExpired = userInfo.exp * 1e3;
  5787. delete userInfo.exp;
  5788. delete userInfo.iat;
  5789. return userInfo;
  5790. }
  5791. function uniIdMixin(globalProperties) {
  5792. globalProperties.uniIDHasRole = function(roleId) {
  5793. const { role } = getCurrentUserInfo();
  5794. return role.indexOf(roleId) > -1;
  5795. };
  5796. globalProperties.uniIDHasPermission = function(permissionId) {
  5797. const { permission } = getCurrentUserInfo();
  5798. return this.uniIDHasRole("admin") || permission.indexOf(permissionId) > -1;
  5799. };
  5800. globalProperties.uniIDTokenValid = function() {
  5801. const { tokenExpired } = getCurrentUserInfo();
  5802. return tokenExpired > Date.now();
  5803. };
  5804. }
  5805. function initApp(app) {
  5806. const appConfig = app._context.config;
  5807. appConfig.errorHandler = invokeCreateErrorHandler(app, createErrorHandler);
  5808. initOptionMergeStrategies(appConfig.optionMergeStrategies);
  5809. const globalProperties = appConfig.globalProperties;
  5810. {
  5811. uniIdMixin(globalProperties);
  5812. }
  5813. {
  5814. globalProperties.$set = set$3;
  5815. globalProperties.$applyOptions = applyOptions$2;
  5816. }
  5817. {
  5818. index$1.invokeCreateVueAppHook(app);
  5819. }
  5820. }
  5821. const propsCaches = /* @__PURE__ */ Object.create(null);
  5822. function renderProps(props2) {
  5823. const { uid: uid2, __counter } = getCurrentInstance();
  5824. const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props2)) - 1;
  5825. return uid2 + "," + propsId + "," + __counter;
  5826. }
  5827. function pruneComponentPropsCache(uid2) {
  5828. delete propsCaches[uid2];
  5829. }
  5830. function findComponentPropsData(up) {
  5831. if (!up) {
  5832. return;
  5833. }
  5834. const [uid2, propsId] = up.split(",");
  5835. if (!propsCaches[uid2]) {
  5836. return;
  5837. }
  5838. return propsCaches[uid2][parseInt(propsId)];
  5839. }
  5840. var plugin = {
  5841. install(app) {
  5842. initApp(app);
  5843. app.config.globalProperties.pruneComponentPropsCache = pruneComponentPropsCache;
  5844. const oldMount = app.mount;
  5845. app.mount = function mount(rootContainer) {
  5846. const instance = oldMount.call(app, rootContainer);
  5847. const createApp2 = getCreateApp();
  5848. if (createApp2) {
  5849. createApp2(instance);
  5850. } else {
  5851. if (typeof createMiniProgramApp !== "undefined") {
  5852. createMiniProgramApp(instance);
  5853. }
  5854. }
  5855. return instance;
  5856. };
  5857. }
  5858. };
  5859. function getCreateApp() {
  5860. const method3 = "createApp";
  5861. if (typeof global !== "undefined") {
  5862. return global[method3];
  5863. } else if (typeof my !== "undefined") {
  5864. return my[method3];
  5865. }
  5866. }
  5867. function vOn(value2, key) {
  5868. const instance = getCurrentInstance();
  5869. const ctx = instance.ctx;
  5870. const extraKey = typeof key !== "undefined" && (ctx.$mpPlatform === "mp-weixin" || ctx.$mpPlatform === "mp-qq") && (isString$1(key) || typeof key === "number") ? "_" + key : "";
  5871. const name = "e" + instance.$ei++ + extraKey;
  5872. const mpInstance = ctx.$scope;
  5873. if (!value2) {
  5874. delete mpInstance[name];
  5875. return name;
  5876. }
  5877. const existingInvoker = mpInstance[name];
  5878. if (existingInvoker) {
  5879. existingInvoker.value = value2;
  5880. } else {
  5881. mpInstance[name] = createInvoker(value2, instance);
  5882. }
  5883. return name;
  5884. }
  5885. function createInvoker(initialValue, instance) {
  5886. const invoker = (e2) => {
  5887. patchMPEvent(e2);
  5888. let args = [e2];
  5889. if (e2.detail && e2.detail.__args__) {
  5890. args = e2.detail.__args__;
  5891. }
  5892. const eventValue = invoker.value;
  5893. const invoke = () => callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, eventValue), instance, 5, args);
  5894. const eventTarget = e2.target;
  5895. const eventSync = eventTarget ? eventTarget.dataset ? String(eventTarget.dataset.eventsync) === "true" : false : false;
  5896. if (bubbles.includes(e2.type) && !eventSync) {
  5897. setTimeout(invoke);
  5898. } else {
  5899. const res = invoke();
  5900. if (e2.type === "input" && (isArray$2(res) || isPromise(res))) {
  5901. return;
  5902. }
  5903. return res;
  5904. }
  5905. };
  5906. invoker.value = initialValue;
  5907. return invoker;
  5908. }
  5909. const bubbles = [
  5910. // touch事件暂不做延迟,否则在 Android 上会影响性能,比如一些拖拽跟手手势等
  5911. // 'touchstart',
  5912. // 'touchmove',
  5913. // 'touchcancel',
  5914. // 'touchend',
  5915. "tap",
  5916. "longpress",
  5917. "longtap",
  5918. "transitionend",
  5919. "animationstart",
  5920. "animationiteration",
  5921. "animationend",
  5922. "touchforcechange"
  5923. ];
  5924. function patchMPEvent(event) {
  5925. if (event.type && event.target) {
  5926. event.preventDefault = NOOP;
  5927. event.stopPropagation = NOOP;
  5928. event.stopImmediatePropagation = NOOP;
  5929. if (!hasOwn(event, "detail")) {
  5930. event.detail = {};
  5931. }
  5932. if (hasOwn(event, "markerId")) {
  5933. event.detail = typeof event.detail === "object" ? event.detail : {};
  5934. event.detail.markerId = event.markerId;
  5935. }
  5936. if (isPlainObject$1(event.detail) && hasOwn(event.detail, "checked") && !hasOwn(event.detail, "value")) {
  5937. event.detail.value = event.detail.checked;
  5938. }
  5939. if (isPlainObject$1(event.detail)) {
  5940. event.target = extend$1({}, event.target, event.detail);
  5941. }
  5942. }
  5943. }
  5944. function patchStopImmediatePropagation(e2, value2) {
  5945. if (isArray$2(value2)) {
  5946. const originalStop = e2.stopImmediatePropagation;
  5947. e2.stopImmediatePropagation = () => {
  5948. originalStop && originalStop.call(e2);
  5949. e2._stopped = true;
  5950. };
  5951. return value2.map((fn) => (e3) => !e3._stopped && fn(e3));
  5952. } else {
  5953. return value2;
  5954. }
  5955. }
  5956. function vFor(source, renderItem) {
  5957. let ret;
  5958. if (isArray$2(source) || isString$1(source)) {
  5959. ret = new Array(source.length);
  5960. for (let i = 0, l = source.length; i < l; i++) {
  5961. ret[i] = renderItem(source[i], i, i);
  5962. }
  5963. } else if (typeof source === "number") {
  5964. if (!Number.isInteger(source)) {
  5965. warn$2(`The v-for range expect an integer value but got ${source}.`);
  5966. return [];
  5967. }
  5968. ret = new Array(source);
  5969. for (let i = 0; i < source; i++) {
  5970. ret[i] = renderItem(i + 1, i, i);
  5971. }
  5972. } else if (isObject$2(source)) {
  5973. if (source[Symbol.iterator]) {
  5974. ret = Array.from(source, (item, i) => renderItem(item, i, i));
  5975. } else {
  5976. const keys2 = Object.keys(source);
  5977. ret = new Array(keys2.length);
  5978. for (let i = 0, l = keys2.length; i < l; i++) {
  5979. const key = keys2[i];
  5980. ret[i] = renderItem(source[key], key, i);
  5981. }
  5982. }
  5983. } else {
  5984. ret = [];
  5985. }
  5986. return ret;
  5987. }
  5988. function stringifyStyle(value2) {
  5989. if (isString$1(value2)) {
  5990. return value2;
  5991. }
  5992. return stringify(normalizeStyle(value2));
  5993. }
  5994. function stringify(styles) {
  5995. let ret = "";
  5996. if (!styles || isString$1(styles)) {
  5997. return ret;
  5998. }
  5999. for (const key in styles) {
  6000. ret += `${key.startsWith(`--`) ? key : hyphenate(key)}:${styles[key]};`;
  6001. }
  6002. return ret;
  6003. }
  6004. function setRef(ref2, id, opts = {}) {
  6005. const { $templateRefs } = getCurrentInstance();
  6006. $templateRefs.push({ i: id, r: ref2, k: opts.k, f: opts.f });
  6007. }
  6008. const o = (value2, key) => vOn(value2, key);
  6009. const f = (source, renderItem) => vFor(source, renderItem);
  6010. const s = (value2) => stringifyStyle(value2);
  6011. const e = (target, ...sources) => extend$1(target, ...sources);
  6012. const n = (value2) => normalizeClass(value2);
  6013. const t = (val) => toDisplayString(val);
  6014. const p = (props2) => renderProps(props2);
  6015. const sr = (ref2, id, opts) => setRef(ref2, id, opts);
  6016. function createApp$1(rootComponent, rootProps = null) {
  6017. rootComponent && (rootComponent.mpType = "app");
  6018. return createVueApp(rootComponent, rootProps).use(plugin);
  6019. }
  6020. const createSSRApp = createApp$1;
  6021. const MP_METHODS = [
  6022. "createSelectorQuery",
  6023. "createIntersectionObserver",
  6024. "selectAllComponents",
  6025. "selectComponent"
  6026. ];
  6027. function createEmitFn(oldEmit, ctx) {
  6028. return function emit2(event, ...args) {
  6029. const scope = ctx.$scope;
  6030. if (scope && event) {
  6031. const detail = { __args__: args };
  6032. {
  6033. scope.triggerEvent(event, detail);
  6034. }
  6035. }
  6036. return oldEmit.apply(this, [event, ...args]);
  6037. };
  6038. }
  6039. function initBaseInstance(instance, options) {
  6040. const ctx = instance.ctx;
  6041. ctx.mpType = options.mpType;
  6042. ctx.$mpType = options.mpType;
  6043. ctx.$mpPlatform = "mp-weixin";
  6044. ctx.$scope = options.mpInstance;
  6045. ctx.$mp = {};
  6046. {
  6047. ctx._self = {};
  6048. }
  6049. instance.slots = {};
  6050. if (isArray$2(options.slots) && options.slots.length) {
  6051. options.slots.forEach((name) => {
  6052. instance.slots[name] = true;
  6053. });
  6054. if (instance.slots[SLOT_DEFAULT_NAME]) {
  6055. instance.slots.default = true;
  6056. }
  6057. }
  6058. ctx.getOpenerEventChannel = function() {
  6059. {
  6060. return options.mpInstance.getOpenerEventChannel();
  6061. }
  6062. };
  6063. ctx.$hasHook = hasHook;
  6064. ctx.$callHook = callHook;
  6065. instance.emit = createEmitFn(instance.emit, ctx);
  6066. }
  6067. function initComponentInstance(instance, options) {
  6068. initBaseInstance(instance, options);
  6069. const ctx = instance.ctx;
  6070. MP_METHODS.forEach((method3) => {
  6071. ctx[method3] = function(...args) {
  6072. const mpInstance = ctx.$scope;
  6073. if (mpInstance && mpInstance[method3]) {
  6074. return mpInstance[method3].apply(mpInstance, args);
  6075. }
  6076. };
  6077. });
  6078. }
  6079. function initMocks(instance, mpInstance, mocks2) {
  6080. const ctx = instance.ctx;
  6081. mocks2.forEach((mock) => {
  6082. if (hasOwn(mpInstance, mock)) {
  6083. instance[mock] = ctx[mock] = mpInstance[mock];
  6084. }
  6085. });
  6086. }
  6087. function hasHook(name) {
  6088. const hooks2 = this.$[name];
  6089. if (hooks2 && hooks2.length) {
  6090. return true;
  6091. }
  6092. return false;
  6093. }
  6094. function callHook(name, args) {
  6095. if (name === "mounted") {
  6096. callHook.call(this, "bm");
  6097. this.$.isMounted = true;
  6098. name = "m";
  6099. }
  6100. const hooks2 = this.$[name];
  6101. return hooks2 && invokeArrayFns(hooks2, args);
  6102. }
  6103. const PAGE_INIT_HOOKS = [
  6104. ON_LOAD,
  6105. ON_SHOW,
  6106. ON_HIDE,
  6107. ON_UNLOAD,
  6108. ON_RESIZE,
  6109. ON_TAB_ITEM_TAP,
  6110. ON_REACH_BOTTOM,
  6111. ON_PULL_DOWN_REFRESH,
  6112. ON_ADD_TO_FAVORITES
  6113. // 'onReady', // lifetimes.ready
  6114. // 'onPageScroll', // 影响性能,开发者手动注册
  6115. // 'onShareTimeline', // 右上角菜单,开发者手动注册
  6116. // 'onShareAppMessage' // 右上角菜单,开发者手动注册
  6117. ];
  6118. function findHooks(vueOptions, hooks2 = /* @__PURE__ */ new Set()) {
  6119. if (vueOptions) {
  6120. Object.keys(vueOptions).forEach((name) => {
  6121. if (isUniLifecycleHook(name, vueOptions[name])) {
  6122. hooks2.add(name);
  6123. }
  6124. });
  6125. {
  6126. const { extends: extendsOptions, mixins } = vueOptions;
  6127. if (mixins) {
  6128. mixins.forEach((mixin2) => findHooks(mixin2, hooks2));
  6129. }
  6130. if (extendsOptions) {
  6131. findHooks(extendsOptions, hooks2);
  6132. }
  6133. }
  6134. }
  6135. return hooks2;
  6136. }
  6137. function initHook(mpOptions, hook, excludes) {
  6138. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  6139. mpOptions[hook] = function(args) {
  6140. return this.$vm && this.$vm.$callHook(hook, args);
  6141. };
  6142. }
  6143. }
  6144. const EXCLUDE_HOOKS = [ON_READY];
  6145. function initHooks(mpOptions, hooks2, excludes = EXCLUDE_HOOKS) {
  6146. hooks2.forEach((hook) => initHook(mpOptions, hook, excludes));
  6147. }
  6148. function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
  6149. findHooks(vueOptions).forEach((hook) => initHook(mpOptions, hook, excludes));
  6150. }
  6151. function initRuntimeHooks(mpOptions, runtimeHooks) {
  6152. if (!runtimeHooks) {
  6153. return;
  6154. }
  6155. const hooks2 = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6156. hooks2.forEach((hook) => {
  6157. if (runtimeHooks & MINI_PROGRAM_PAGE_RUNTIME_HOOKS[hook]) {
  6158. initHook(mpOptions, hook, []);
  6159. }
  6160. });
  6161. }
  6162. const findMixinRuntimeHooks = /* @__PURE__ */ once(() => {
  6163. const runtimeHooks = [];
  6164. const app = isFunction$1(getApp) && getApp({ allowDefault: true });
  6165. if (app && app.$vm && app.$vm.$) {
  6166. const mixins = app.$vm.$.appContext.mixins;
  6167. if (isArray$2(mixins)) {
  6168. const hooks2 = Object.keys(MINI_PROGRAM_PAGE_RUNTIME_HOOKS);
  6169. mixins.forEach((mixin2) => {
  6170. hooks2.forEach((hook) => {
  6171. if (hasOwn(mixin2, hook) && !runtimeHooks.includes(hook)) {
  6172. runtimeHooks.push(hook);
  6173. }
  6174. });
  6175. });
  6176. }
  6177. }
  6178. return runtimeHooks;
  6179. });
  6180. function initMixinRuntimeHooks(mpOptions) {
  6181. initHooks(mpOptions, findMixinRuntimeHooks());
  6182. }
  6183. const HOOKS = [
  6184. ON_SHOW,
  6185. ON_HIDE,
  6186. ON_ERROR,
  6187. ON_THEME_CHANGE,
  6188. ON_PAGE_NOT_FOUND,
  6189. ON_UNHANDLE_REJECTION
  6190. ];
  6191. function parseApp(instance, parseAppOptions) {
  6192. const internalInstance = instance.$;
  6193. const appOptions = {
  6194. globalData: instance.$options && instance.$options.globalData || {},
  6195. $vm: instance,
  6196. onLaunch(options) {
  6197. this.$vm = instance;
  6198. const ctx = internalInstance.ctx;
  6199. if (this.$vm && ctx.$scope) {
  6200. return;
  6201. }
  6202. initBaseInstance(internalInstance, {
  6203. mpType: "app",
  6204. mpInstance: this,
  6205. slots: []
  6206. });
  6207. ctx.globalData = this.globalData;
  6208. instance.$callHook(ON_LAUNCH, options);
  6209. }
  6210. };
  6211. initLocale(instance);
  6212. const vueOptions = instance.$.type;
  6213. initHooks(appOptions, HOOKS);
  6214. initUnknownHooks(appOptions, vueOptions);
  6215. {
  6216. const methods = vueOptions.methods;
  6217. methods && extend$1(appOptions, methods);
  6218. }
  6219. if (parseAppOptions) {
  6220. parseAppOptions.parse(appOptions);
  6221. }
  6222. return appOptions;
  6223. }
  6224. function initCreateApp(parseAppOptions) {
  6225. return function createApp2(vm) {
  6226. return App(parseApp(vm, parseAppOptions));
  6227. };
  6228. }
  6229. function initCreateSubpackageApp(parseAppOptions) {
  6230. return function createApp2(vm) {
  6231. const appOptions = parseApp(vm, parseAppOptions);
  6232. const app = isFunction$1(getApp) && getApp({
  6233. allowDefault: true
  6234. });
  6235. if (!app)
  6236. return;
  6237. vm.$.ctx.$scope = app;
  6238. const globalData = app.globalData;
  6239. if (globalData) {
  6240. Object.keys(appOptions.globalData).forEach((name) => {
  6241. if (!hasOwn(globalData, name)) {
  6242. globalData[name] = appOptions.globalData[name];
  6243. }
  6244. });
  6245. }
  6246. Object.keys(appOptions).forEach((name) => {
  6247. if (!hasOwn(app, name)) {
  6248. app[name] = appOptions[name];
  6249. }
  6250. });
  6251. initAppLifecycle(appOptions, vm);
  6252. };
  6253. }
  6254. function initAppLifecycle(appOptions, vm) {
  6255. if (isFunction$1(appOptions.onLaunch)) {
  6256. const args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  6257. appOptions.onLaunch(args);
  6258. }
  6259. if (isFunction$1(appOptions.onShow) && wx.onAppShow) {
  6260. wx.onAppShow((args) => {
  6261. vm.$callHook("onShow", args);
  6262. });
  6263. }
  6264. if (isFunction$1(appOptions.onHide) && wx.onAppHide) {
  6265. wx.onAppHide((args) => {
  6266. vm.$callHook("onHide", args);
  6267. });
  6268. }
  6269. }
  6270. function initLocale(appVm) {
  6271. const locale2 = ref(normalizeLocale$1(wx.getSystemInfoSync().language) || LOCALE_EN);
  6272. Object.defineProperty(appVm, "$locale", {
  6273. get() {
  6274. return locale2.value;
  6275. },
  6276. set(v) {
  6277. locale2.value = v;
  6278. }
  6279. });
  6280. }
  6281. function initVueIds(vueIds, mpInstance) {
  6282. if (!vueIds) {
  6283. return;
  6284. }
  6285. const ids = vueIds.split(",");
  6286. const len = ids.length;
  6287. if (len === 1) {
  6288. mpInstance._$vueId = ids[0];
  6289. } else if (len === 2) {
  6290. mpInstance._$vueId = ids[0];
  6291. mpInstance._$vuePid = ids[1];
  6292. }
  6293. }
  6294. const EXTRAS = ["externalClasses"];
  6295. function initExtraOptions(miniProgramComponentOptions, vueOptions) {
  6296. EXTRAS.forEach((name) => {
  6297. if (hasOwn(vueOptions, name)) {
  6298. miniProgramComponentOptions[name] = vueOptions[name];
  6299. }
  6300. });
  6301. }
  6302. const WORKLET_RE = /_(.*)_worklet_factory_/;
  6303. function initWorkletMethods(mpMethods, vueMethods) {
  6304. if (vueMethods) {
  6305. Object.keys(vueMethods).forEach((name) => {
  6306. const matches = name.match(WORKLET_RE);
  6307. if (matches) {
  6308. const workletName = matches[1];
  6309. mpMethods[name] = vueMethods[name];
  6310. mpMethods[workletName] = vueMethods[workletName];
  6311. }
  6312. });
  6313. }
  6314. }
  6315. function initWxsCallMethods(methods, wxsCallMethods) {
  6316. if (!isArray$2(wxsCallMethods)) {
  6317. return;
  6318. }
  6319. wxsCallMethods.forEach((callMethod) => {
  6320. methods[callMethod] = function(args) {
  6321. return this.$vm[callMethod](args);
  6322. };
  6323. });
  6324. }
  6325. function selectAllComponents(mpInstance, selector, $refs) {
  6326. const components = mpInstance.selectAllComponents(selector);
  6327. components.forEach((component) => {
  6328. const ref2 = component.properties.uR;
  6329. $refs[ref2] = component.$vm || component;
  6330. });
  6331. }
  6332. function initRefs(instance, mpInstance) {
  6333. Object.defineProperty(instance, "refs", {
  6334. get() {
  6335. const $refs = {};
  6336. selectAllComponents(mpInstance, ".r", $refs);
  6337. const forComponents = mpInstance.selectAllComponents(".r-i-f");
  6338. forComponents.forEach((component) => {
  6339. const ref2 = component.properties.uR;
  6340. if (!ref2) {
  6341. return;
  6342. }
  6343. if (!$refs[ref2]) {
  6344. $refs[ref2] = [];
  6345. }
  6346. $refs[ref2].push(component.$vm || component);
  6347. });
  6348. return $refs;
  6349. }
  6350. });
  6351. }
  6352. function findVmByVueId(instance, vuePid) {
  6353. const $children = instance.$children;
  6354. for (let i = $children.length - 1; i >= 0; i--) {
  6355. const childVm = $children[i];
  6356. if (childVm.$scope._$vueId === vuePid) {
  6357. return childVm;
  6358. }
  6359. }
  6360. let parentVm;
  6361. for (let i = $children.length - 1; i >= 0; i--) {
  6362. parentVm = findVmByVueId($children[i], vuePid);
  6363. if (parentVm) {
  6364. return parentVm;
  6365. }
  6366. }
  6367. }
  6368. const builtInProps = [
  6369. // 百度小程序,快手小程序自定义组件不支持绑定动态事件,动态dataset,故通过props传递事件信息
  6370. // event-opts
  6371. "eO",
  6372. // 组件 ref
  6373. "uR",
  6374. // 组件 ref-in-for
  6375. "uRIF",
  6376. // 组件 id
  6377. "uI",
  6378. // 组件类型 m: 小程序组件
  6379. "uT",
  6380. // 组件 props
  6381. "uP",
  6382. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  6383. "uS"
  6384. ];
  6385. function initDefaultProps(options, isBehavior = false) {
  6386. const properties = {};
  6387. if (!isBehavior) {
  6388. builtInProps.forEach((name) => {
  6389. properties[name] = {
  6390. type: null,
  6391. value: ""
  6392. };
  6393. });
  6394. properties.uS = {
  6395. type: null,
  6396. value: [],
  6397. observer: function(newVal) {
  6398. const $slots = /* @__PURE__ */ Object.create(null);
  6399. newVal && newVal.forEach((slotName) => {
  6400. $slots[slotName] = true;
  6401. });
  6402. this.setData({
  6403. $slots
  6404. });
  6405. }
  6406. };
  6407. }
  6408. if (options.behaviors) {
  6409. if (options.behaviors.includes("wx://form-field")) {
  6410. if (!options.properties || !options.properties.name) {
  6411. properties.name = {
  6412. type: null,
  6413. value: ""
  6414. };
  6415. }
  6416. if (!options.properties || !options.properties.value) {
  6417. properties.value = {
  6418. type: null,
  6419. value: ""
  6420. };
  6421. }
  6422. }
  6423. }
  6424. return properties;
  6425. }
  6426. function initVirtualHostProps(options) {
  6427. const properties = {};
  6428. {
  6429. if (options && options.virtualHost) {
  6430. properties.virtualHostStyle = {
  6431. type: null,
  6432. value: ""
  6433. };
  6434. properties.virtualHostClass = {
  6435. type: null,
  6436. value: ""
  6437. };
  6438. }
  6439. }
  6440. return properties;
  6441. }
  6442. function initProps(mpComponentOptions) {
  6443. if (!mpComponentOptions.properties) {
  6444. mpComponentOptions.properties = {};
  6445. }
  6446. extend$1(mpComponentOptions.properties, initDefaultProps(mpComponentOptions), initVirtualHostProps(mpComponentOptions.options));
  6447. }
  6448. const PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  6449. function parsePropType(type2, defaultValue) {
  6450. if (isArray$2(type2) && type2.length === 1) {
  6451. return type2[0];
  6452. }
  6453. return type2;
  6454. }
  6455. function normalizePropType(type2, defaultValue) {
  6456. const res = parsePropType(type2);
  6457. return PROP_TYPES.indexOf(res) !== -1 ? res : null;
  6458. }
  6459. function initPageProps({ properties }, rawProps) {
  6460. if (isArray$2(rawProps)) {
  6461. rawProps.forEach((key) => {
  6462. properties[key] = {
  6463. type: String,
  6464. value: ""
  6465. };
  6466. });
  6467. } else if (isPlainObject$1(rawProps)) {
  6468. Object.keys(rawProps).forEach((key) => {
  6469. const opts = rawProps[key];
  6470. if (isPlainObject$1(opts)) {
  6471. let value2 = opts.default;
  6472. if (isFunction$1(value2)) {
  6473. value2 = value2();
  6474. }
  6475. const type2 = opts.type;
  6476. opts.type = normalizePropType(type2);
  6477. properties[key] = {
  6478. type: opts.type,
  6479. value: value2
  6480. };
  6481. } else {
  6482. properties[key] = {
  6483. type: normalizePropType(opts)
  6484. };
  6485. }
  6486. });
  6487. }
  6488. }
  6489. function findPropsData(properties, isPage2) {
  6490. return (isPage2 ? findPagePropsData(properties) : findComponentPropsData(properties.uP)) || {};
  6491. }
  6492. function findPagePropsData(properties) {
  6493. const propsData = {};
  6494. if (isPlainObject$1(properties)) {
  6495. Object.keys(properties).forEach((name) => {
  6496. if (builtInProps.indexOf(name) === -1) {
  6497. propsData[name] = properties[name];
  6498. }
  6499. });
  6500. }
  6501. return propsData;
  6502. }
  6503. function initFormField(vm) {
  6504. const vueOptions = vm.$options;
  6505. if (isArray$2(vueOptions.behaviors) && vueOptions.behaviors.includes("uni://form-field")) {
  6506. vm.$watch("modelValue", () => {
  6507. vm.$scope && vm.$scope.setData({
  6508. name: vm.name,
  6509. value: vm.modelValue
  6510. });
  6511. }, {
  6512. immediate: true
  6513. });
  6514. }
  6515. }
  6516. function initData(_) {
  6517. return {};
  6518. }
  6519. function initPropsObserver(componentOptions) {
  6520. const observe = function observe2() {
  6521. const up = this.properties.uP;
  6522. if (!up) {
  6523. return;
  6524. }
  6525. if (this.$vm) {
  6526. updateComponentProps(up, this.$vm.$);
  6527. } else if (this.properties.uT === "m") {
  6528. updateMiniProgramComponentProperties(up, this);
  6529. }
  6530. };
  6531. {
  6532. if (!componentOptions.observers) {
  6533. componentOptions.observers = {};
  6534. }
  6535. componentOptions.observers.uP = observe;
  6536. }
  6537. }
  6538. function updateMiniProgramComponentProperties(up, mpInstance) {
  6539. const prevProps = mpInstance.properties;
  6540. const nextProps = findComponentPropsData(up) || {};
  6541. if (hasPropsChanged(prevProps, nextProps, false)) {
  6542. mpInstance.setData(nextProps);
  6543. }
  6544. }
  6545. function updateComponentProps(up, instance) {
  6546. const prevProps = toRaw(instance.props);
  6547. const nextProps = findComponentPropsData(up) || {};
  6548. if (hasPropsChanged(prevProps, nextProps)) {
  6549. updateProps(instance, nextProps, prevProps, false);
  6550. if (hasQueueJob(instance.update)) {
  6551. invalidateJob(instance.update);
  6552. }
  6553. {
  6554. instance.update();
  6555. }
  6556. }
  6557. }
  6558. function hasPropsChanged(prevProps, nextProps, checkLen = true) {
  6559. const nextKeys = Object.keys(nextProps);
  6560. if (checkLen && nextKeys.length !== Object.keys(prevProps).length) {
  6561. return true;
  6562. }
  6563. for (let i = 0; i < nextKeys.length; i++) {
  6564. const key = nextKeys[i];
  6565. if (nextProps[key] !== prevProps[key]) {
  6566. return true;
  6567. }
  6568. }
  6569. return false;
  6570. }
  6571. function initBehaviors(vueOptions) {
  6572. const vueBehaviors = vueOptions.behaviors;
  6573. let vueProps = vueOptions.props;
  6574. if (!vueProps) {
  6575. vueOptions.props = vueProps = [];
  6576. }
  6577. const behaviors = [];
  6578. if (isArray$2(vueBehaviors)) {
  6579. vueBehaviors.forEach((behavior) => {
  6580. behaviors.push(behavior.replace("uni://", "wx://"));
  6581. if (behavior === "uni://form-field") {
  6582. if (isArray$2(vueProps)) {
  6583. vueProps.push("name");
  6584. vueProps.push("modelValue");
  6585. } else {
  6586. vueProps.name = {
  6587. type: String,
  6588. default: ""
  6589. };
  6590. vueProps.modelValue = {
  6591. type: [String, Number, Boolean, Array, Object, Date],
  6592. default: ""
  6593. };
  6594. }
  6595. }
  6596. });
  6597. }
  6598. return behaviors;
  6599. }
  6600. function applyOptions(componentOptions, vueOptions) {
  6601. componentOptions.data = initData();
  6602. componentOptions.behaviors = initBehaviors(vueOptions);
  6603. }
  6604. function parseComponent(vueOptions, { parse, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 }) {
  6605. vueOptions = vueOptions.default || vueOptions;
  6606. const options = {
  6607. multipleSlots: true,
  6608. // styleIsolation: 'apply-shared',
  6609. addGlobalClass: true,
  6610. pureDataPattern: /^uP$/
  6611. };
  6612. if (isArray$2(vueOptions.mixins)) {
  6613. vueOptions.mixins.forEach((item) => {
  6614. if (isObject$2(item.options)) {
  6615. extend$1(options, item.options);
  6616. }
  6617. });
  6618. }
  6619. if (vueOptions.options) {
  6620. extend$1(options, vueOptions.options);
  6621. }
  6622. const mpComponentOptions = {
  6623. options,
  6624. lifetimes: initLifetimes2({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }),
  6625. pageLifetimes: {
  6626. show() {
  6627. this.$vm && this.$vm.$callHook("onPageShow");
  6628. },
  6629. hide() {
  6630. this.$vm && this.$vm.$callHook("onPageHide");
  6631. },
  6632. resize(size2) {
  6633. this.$vm && this.$vm.$callHook("onPageResize", size2);
  6634. }
  6635. },
  6636. methods: {
  6637. __l: handleLink2
  6638. }
  6639. };
  6640. {
  6641. applyOptions(mpComponentOptions, vueOptions);
  6642. }
  6643. initProps(mpComponentOptions);
  6644. initPropsObserver(mpComponentOptions);
  6645. initExtraOptions(mpComponentOptions, vueOptions);
  6646. initWxsCallMethods(mpComponentOptions.methods, vueOptions.wxsCallMethods);
  6647. {
  6648. initWorkletMethods(mpComponentOptions.methods, vueOptions.methods);
  6649. }
  6650. if (parse) {
  6651. parse(mpComponentOptions, { handleLink: handleLink2 });
  6652. }
  6653. return mpComponentOptions;
  6654. }
  6655. function initCreateComponent(parseOptions2) {
  6656. return function createComponent2(vueComponentOptions) {
  6657. return Component(parseComponent(vueComponentOptions, parseOptions2));
  6658. };
  6659. }
  6660. let $createComponentFn;
  6661. let $destroyComponentFn;
  6662. function getAppVm() {
  6663. return getApp().$vm;
  6664. }
  6665. function $createComponent(initialVNode, options) {
  6666. if (!$createComponentFn) {
  6667. $createComponentFn = getAppVm().$createComponent;
  6668. }
  6669. const proxy = $createComponentFn(initialVNode, options);
  6670. return getExposeProxy(proxy.$) || proxy;
  6671. }
  6672. function $destroyComponent(instance) {
  6673. if (!$destroyComponentFn) {
  6674. $destroyComponentFn = getAppVm().$destroyComponent;
  6675. }
  6676. return $destroyComponentFn(instance);
  6677. }
  6678. function parsePage(vueOptions, parseOptions2) {
  6679. const { parse, mocks: mocks2, isPage: isPage2, initRelation: initRelation2, handleLink: handleLink2, initLifetimes: initLifetimes2 } = parseOptions2;
  6680. const miniProgramPageOptions = parseComponent(vueOptions, {
  6681. mocks: mocks2,
  6682. isPage: isPage2,
  6683. initRelation: initRelation2,
  6684. handleLink: handleLink2,
  6685. initLifetimes: initLifetimes2
  6686. });
  6687. initPageProps(miniProgramPageOptions, (vueOptions.default || vueOptions).props);
  6688. const methods = miniProgramPageOptions.methods;
  6689. methods.onLoad = function(query) {
  6690. this.options = query;
  6691. this.$page = {
  6692. fullPath: addLeadingSlash(this.route + stringifyQuery(query))
  6693. };
  6694. return this.$vm && this.$vm.$callHook(ON_LOAD, query);
  6695. };
  6696. initHooks(methods, PAGE_INIT_HOOKS);
  6697. {
  6698. initUnknownHooks(methods, vueOptions);
  6699. }
  6700. initRuntimeHooks(methods, vueOptions.__runtimeHooks);
  6701. initMixinRuntimeHooks(methods);
  6702. parse && parse(miniProgramPageOptions, { handleLink: handleLink2 });
  6703. return miniProgramPageOptions;
  6704. }
  6705. function initCreatePage(parseOptions2) {
  6706. return function createPage2(vuePageOptions) {
  6707. return Component(parsePage(vuePageOptions, parseOptions2));
  6708. };
  6709. }
  6710. function initCreatePluginApp(parseAppOptions) {
  6711. return function createApp2(vm) {
  6712. initAppLifecycle(parseApp(vm, parseAppOptions), vm);
  6713. };
  6714. }
  6715. const MPPage = Page;
  6716. const MPComponent = Component;
  6717. function initTriggerEvent(mpInstance) {
  6718. const oldTriggerEvent = mpInstance.triggerEvent;
  6719. const newTriggerEvent = function(event, ...args) {
  6720. return oldTriggerEvent.apply(mpInstance, [customizeEvent(event), ...args]);
  6721. };
  6722. try {
  6723. mpInstance.triggerEvent = newTriggerEvent;
  6724. } catch (error2) {
  6725. mpInstance._triggerEvent = newTriggerEvent;
  6726. }
  6727. }
  6728. function initMiniProgramHook(name, options, isComponent) {
  6729. const oldHook = options[name];
  6730. if (!oldHook) {
  6731. options[name] = function() {
  6732. initTriggerEvent(this);
  6733. };
  6734. } else {
  6735. options[name] = function(...args) {
  6736. initTriggerEvent(this);
  6737. return oldHook.apply(this, args);
  6738. };
  6739. }
  6740. }
  6741. Page = function(options) {
  6742. initMiniProgramHook(ON_LOAD, options);
  6743. return MPPage(options);
  6744. };
  6745. Component = function(options) {
  6746. initMiniProgramHook("created", options);
  6747. const isVueComponent = options.properties && options.properties.uP;
  6748. if (!isVueComponent) {
  6749. initProps(options);
  6750. initPropsObserver(options);
  6751. }
  6752. return MPComponent(options);
  6753. };
  6754. function initLifetimes({ mocks: mocks2, isPage: isPage2, initRelation: initRelation2, vueOptions }) {
  6755. return {
  6756. attached() {
  6757. let properties = this.properties;
  6758. initVueIds(properties.uI, this);
  6759. const relationOptions = {
  6760. vuePid: this._$vuePid
  6761. };
  6762. initRelation2(this, relationOptions);
  6763. const mpInstance = this;
  6764. const isMiniProgramPage = isPage2(mpInstance);
  6765. let propsData = properties;
  6766. this.$vm = $createComponent({
  6767. type: vueOptions,
  6768. props: findPropsData(propsData, isMiniProgramPage)
  6769. }, {
  6770. mpType: isMiniProgramPage ? "page" : "component",
  6771. mpInstance,
  6772. slots: properties.uS || {},
  6773. parentComponent: relationOptions.parent && relationOptions.parent.$,
  6774. onBeforeSetup(instance, options) {
  6775. initRefs(instance, mpInstance);
  6776. initMocks(instance, mpInstance, mocks2);
  6777. initComponentInstance(instance, options);
  6778. }
  6779. });
  6780. if (!isMiniProgramPage) {
  6781. initFormField(this.$vm);
  6782. }
  6783. },
  6784. ready() {
  6785. if (this.$vm) {
  6786. {
  6787. this.$vm.$callHook("mounted");
  6788. this.$vm.$callHook(ON_READY);
  6789. }
  6790. }
  6791. },
  6792. detached() {
  6793. if (this.$vm) {
  6794. pruneComponentPropsCache(this.$vm.$.uid);
  6795. $destroyComponent(this.$vm);
  6796. }
  6797. }
  6798. };
  6799. }
  6800. const mocks = ["__route__", "__wxExparserNodeId__", "__wxWebviewId__"];
  6801. function isPage(mpInstance) {
  6802. return !!mpInstance.route;
  6803. }
  6804. function initRelation(mpInstance, detail) {
  6805. mpInstance.triggerEvent("__l", detail);
  6806. }
  6807. function handleLink(event) {
  6808. const detail = event.detail || event.value;
  6809. const vuePid = detail.vuePid;
  6810. let parentVm;
  6811. if (vuePid) {
  6812. parentVm = findVmByVueId(this.$vm, vuePid);
  6813. }
  6814. if (!parentVm) {
  6815. parentVm = this.$vm;
  6816. }
  6817. detail.parent = parentVm;
  6818. }
  6819. var parseOptions = /* @__PURE__ */ Object.freeze({
  6820. __proto__: null,
  6821. handleLink,
  6822. initLifetimes,
  6823. initRelation,
  6824. isPage,
  6825. mocks
  6826. });
  6827. const createApp = initCreateApp();
  6828. const createPage = initCreatePage(parseOptions);
  6829. const createComponent = initCreateComponent(parseOptions);
  6830. const createPluginApp = initCreatePluginApp();
  6831. const createSubpackageApp = initCreateSubpackageApp();
  6832. {
  6833. wx.createApp = global.createApp = createApp;
  6834. wx.createPage = createPage;
  6835. wx.createComponent = createComponent;
  6836. wx.createPluginApp = global.createPluginApp = createPluginApp;
  6837. wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
  6838. }
  6839. const mixin = {
  6840. // 定义每个组件都可能需要用到的外部样式以及类名
  6841. props: {
  6842. // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
  6843. customStyle: {
  6844. type: [Object, String],
  6845. default: () => ({})
  6846. },
  6847. customClass: {
  6848. type: String,
  6849. default: ""
  6850. },
  6851. // 跳转的页面路径
  6852. url: {
  6853. type: String,
  6854. default: ""
  6855. },
  6856. // 页面跳转的类型
  6857. linkType: {
  6858. type: String,
  6859. default: "navigateTo"
  6860. }
  6861. },
  6862. data() {
  6863. return {};
  6864. },
  6865. onLoad() {
  6866. this.$u.getRect = this.$uGetRect;
  6867. },
  6868. created() {
  6869. this.$u.getRect = this.$uGetRect;
  6870. },
  6871. computed: {
  6872. // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式
  6873. // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx
  6874. // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大)
  6875. $u() {
  6876. return index$1.$u.deepMerge(index$1.$u, {
  6877. props: void 0,
  6878. http: void 0,
  6879. mixin: void 0
  6880. });
  6881. },
  6882. /**
  6883. * 生成bem规则类名
  6884. * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
  6885. * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
  6886. * @param {String} name 组件名称
  6887. * @param {Array} fixed 一直会存在的类名
  6888. * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
  6889. * @returns {Array|string}
  6890. */
  6891. bem() {
  6892. return function(name, fixed, change) {
  6893. const prefix = `u-${name}--`;
  6894. const classes = {};
  6895. if (fixed) {
  6896. fixed.map((item) => {
  6897. classes[prefix + this[item]] = true;
  6898. });
  6899. }
  6900. if (change) {
  6901. change.map((item) => {
  6902. this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
  6903. });
  6904. }
  6905. return Object.keys(classes);
  6906. };
  6907. }
  6908. },
  6909. methods: {
  6910. // 跳转某一个页面
  6911. openPage(urlKey = "url") {
  6912. const url3 = this[urlKey];
  6913. if (url3) {
  6914. this.$u.route({ type: this.linkType, url: url3 });
  6915. }
  6916. },
  6917. // 查询节点信息
  6918. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  6919. // 解决办法为在组件根部再套一个没有任何作用的view元素
  6920. $uGetRect(selector, all) {
  6921. return new Promise((resolve2) => {
  6922. index$1.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
  6923. if (all && Array.isArray(rect) && rect.length) {
  6924. resolve2(rect);
  6925. }
  6926. if (!all && rect) {
  6927. resolve2(rect);
  6928. }
  6929. }).exec();
  6930. });
  6931. },
  6932. getParentData(parentName = "") {
  6933. if (!this.parent)
  6934. this.parent = {};
  6935. this.parent = index$1.$u.$parent.call(this, parentName);
  6936. if (this.parent.children) {
  6937. this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
  6938. }
  6939. if (this.parent && this.parentData) {
  6940. Object.keys(this.parentData).map((key) => {
  6941. this.parentData[key] = this.parent[key];
  6942. });
  6943. }
  6944. },
  6945. // 阻止事件冒泡
  6946. preventEvent(e2) {
  6947. e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation();
  6948. },
  6949. // 空操作
  6950. noop(e2) {
  6951. this.preventEvent(e2);
  6952. }
  6953. },
  6954. onReachBottom() {
  6955. index$1.$emit("uOnReachBottom");
  6956. },
  6957. beforeDestroy() {
  6958. if (this.parent && index$1.$u.test.array(this.parent.children)) {
  6959. const childrenList = this.parent.children;
  6960. childrenList.map((child, index2) => {
  6961. if (child === this) {
  6962. childrenList.splice(index2, 1);
  6963. }
  6964. });
  6965. }
  6966. }
  6967. };
  6968. const mpMixin = {
  6969. // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
  6970. options: {
  6971. virtualHost: true
  6972. }
  6973. };
  6974. const { toString: toString$1 } = Object.prototype;
  6975. function isArray$1(val) {
  6976. return toString$1.call(val) === "[object Array]";
  6977. }
  6978. function isObject$1(val) {
  6979. return val !== null && typeof val === "object";
  6980. }
  6981. function isDate$1(val) {
  6982. return toString$1.call(val) === "[object Date]";
  6983. }
  6984. function isURLSearchParams(val) {
  6985. return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams;
  6986. }
  6987. function forEach(obj, fn) {
  6988. if (obj === null || typeof obj === "undefined") {
  6989. return;
  6990. }
  6991. if (typeof obj !== "object") {
  6992. obj = [obj];
  6993. }
  6994. if (isArray$1(obj)) {
  6995. for (let i = 0, l = obj.length; i < l; i++) {
  6996. fn.call(null, obj[i], i, obj);
  6997. }
  6998. } else {
  6999. for (const key in obj) {
  7000. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  7001. fn.call(null, obj[key], key, obj);
  7002. }
  7003. }
  7004. }
  7005. }
  7006. function isPlainObject(obj) {
  7007. return Object.prototype.toString.call(obj) === "[object Object]";
  7008. }
  7009. function deepMerge$2() {
  7010. const result = {};
  7011. function assignValue(val, key) {
  7012. if (typeof result[key] === "object" && typeof val === "object") {
  7013. result[key] = deepMerge$2(result[key], val);
  7014. } else if (typeof val === "object") {
  7015. result[key] = deepMerge$2({}, val);
  7016. } else {
  7017. result[key] = val;
  7018. }
  7019. }
  7020. for (let i = 0, l = arguments.length; i < l; i++) {
  7021. forEach(arguments[i], assignValue);
  7022. }
  7023. return result;
  7024. }
  7025. function isUndefined$1(val) {
  7026. return typeof val === "undefined";
  7027. }
  7028. function encode(val) {
  7029. return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  7030. }
  7031. function buildURL(url3, params) {
  7032. if (!params) {
  7033. return url3;
  7034. }
  7035. let serializedParams;
  7036. if (isURLSearchParams(params)) {
  7037. serializedParams = params.toString();
  7038. } else {
  7039. const parts = [];
  7040. forEach(params, (val, key) => {
  7041. if (val === null || typeof val === "undefined") {
  7042. return;
  7043. }
  7044. if (isArray$1(val)) {
  7045. key = `${key}[]`;
  7046. } else {
  7047. val = [val];
  7048. }
  7049. forEach(val, (v) => {
  7050. if (isDate$1(v)) {
  7051. v = v.toISOString();
  7052. } else if (isObject$1(v)) {
  7053. v = JSON.stringify(v);
  7054. }
  7055. parts.push(`${encode(key)}=${encode(v)}`);
  7056. });
  7057. });
  7058. serializedParams = parts.join("&");
  7059. }
  7060. if (serializedParams) {
  7061. const hashmarkIndex = url3.indexOf("#");
  7062. if (hashmarkIndex !== -1) {
  7063. url3 = url3.slice(0, hashmarkIndex);
  7064. }
  7065. url3 += (url3.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  7066. }
  7067. return url3;
  7068. }
  7069. function isAbsoluteURL(url3) {
  7070. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url3);
  7071. }
  7072. function combineURLs(baseURL, relativeURL) {
  7073. return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL;
  7074. }
  7075. function buildFullPath(baseURL, requestedURL) {
  7076. if (baseURL && !isAbsoluteURL(requestedURL)) {
  7077. return combineURLs(baseURL, requestedURL);
  7078. }
  7079. return requestedURL;
  7080. }
  7081. function settle(resolve2, reject, response) {
  7082. const { validateStatus: validateStatus2 } = response.config;
  7083. const status = response.statusCode;
  7084. if (status && (!validateStatus2 || validateStatus2(status))) {
  7085. resolve2(response);
  7086. } else {
  7087. reject(response);
  7088. }
  7089. }
  7090. const mergeKeys$1 = (keys2, config2) => {
  7091. const config3 = {};
  7092. keys2.forEach((prop) => {
  7093. if (!isUndefined$1(config2[prop])) {
  7094. config3[prop] = config2[prop];
  7095. }
  7096. });
  7097. return config3;
  7098. };
  7099. const adapter = (config2) => new Promise((resolve2, reject) => {
  7100. const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params);
  7101. const _config = {
  7102. url: fullPath,
  7103. header: config2.header,
  7104. complete: (response) => {
  7105. config2.fullPath = fullPath;
  7106. response.config = config2;
  7107. try {
  7108. if (typeof response.data === "string") {
  7109. response.data = JSON.parse(response.data);
  7110. }
  7111. } catch (e2) {
  7112. }
  7113. settle(resolve2, reject, response);
  7114. }
  7115. };
  7116. let requestTask;
  7117. if (config2.method === "UPLOAD") {
  7118. delete _config.header["content-type"];
  7119. delete _config.header["Content-Type"];
  7120. const otherConfig = {
  7121. filePath: config2.filePath,
  7122. name: config2.name
  7123. };
  7124. const optionalKeys = [
  7125. "formData"
  7126. ];
  7127. requestTask = index$1.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) });
  7128. } else if (config2.method === "DOWNLOAD") {
  7129. requestTask = index$1.downloadFile(_config);
  7130. } else {
  7131. const optionalKeys = [
  7132. "data",
  7133. "method",
  7134. "timeout",
  7135. "dataType",
  7136. "responseType"
  7137. ];
  7138. requestTask = index$1.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) });
  7139. }
  7140. if (config2.getTask) {
  7141. config2.getTask(requestTask, config2);
  7142. }
  7143. });
  7144. const dispatchRequest = (config2) => adapter(config2);
  7145. function InterceptorManager() {
  7146. this.handlers = [];
  7147. }
  7148. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  7149. this.handlers.push({
  7150. fulfilled,
  7151. rejected
  7152. });
  7153. return this.handlers.length - 1;
  7154. };
  7155. InterceptorManager.prototype.eject = function eject(id) {
  7156. if (this.handlers[id]) {
  7157. this.handlers[id] = null;
  7158. }
  7159. };
  7160. InterceptorManager.prototype.forEach = function forEach2(fn) {
  7161. this.handlers.forEach((h) => {
  7162. if (h !== null) {
  7163. fn(h);
  7164. }
  7165. });
  7166. };
  7167. const mergeKeys = (keys2, globalsConfig, config2) => {
  7168. const config3 = {};
  7169. keys2.forEach((prop) => {
  7170. if (!isUndefined$1(config2[prop])) {
  7171. config3[prop] = config2[prop];
  7172. } else if (!isUndefined$1(globalsConfig[prop])) {
  7173. config3[prop] = globalsConfig[prop];
  7174. }
  7175. });
  7176. return config3;
  7177. };
  7178. const mergeConfig = (globalsConfig, config2 = {}) => {
  7179. const method3 = config2.method || globalsConfig.method || "GET";
  7180. let config3 = {
  7181. baseURL: globalsConfig.baseURL || "",
  7182. method: method3,
  7183. url: config2.url || "",
  7184. params: config2.params || {},
  7185. custom: { ...globalsConfig.custom || {}, ...config2.custom || {} },
  7186. header: deepMerge$2(globalsConfig.header || {}, config2.header || {})
  7187. };
  7188. const defaultToConfig2Keys = ["getTask", "validateStatus"];
  7189. config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) };
  7190. if (method3 === "DOWNLOAD")
  7191. ;
  7192. else if (method3 === "UPLOAD") {
  7193. delete config3.header["content-type"];
  7194. delete config3.header["Content-Type"];
  7195. const uploadKeys = [
  7196. "filePath",
  7197. "name",
  7198. "formData"
  7199. ];
  7200. uploadKeys.forEach((prop) => {
  7201. if (!isUndefined$1(config2[prop])) {
  7202. config3[prop] = config2[prop];
  7203. }
  7204. });
  7205. } else {
  7206. const defaultsKeys = [
  7207. "data",
  7208. "timeout",
  7209. "dataType",
  7210. "responseType"
  7211. ];
  7212. config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) };
  7213. }
  7214. return config3;
  7215. };
  7216. const defaults$1 = {
  7217. baseURL: "",
  7218. header: {},
  7219. method: "GET",
  7220. dataType: "json",
  7221. responseType: "text",
  7222. custom: {},
  7223. timeout: 6e4,
  7224. validateStatus: function validateStatus(status) {
  7225. return status >= 200 && status < 300;
  7226. }
  7227. };
  7228. var clone$2 = function() {
  7229. function _instanceof(obj, type2) {
  7230. return type2 != null && obj instanceof type2;
  7231. }
  7232. var nativeMap;
  7233. try {
  7234. nativeMap = Map;
  7235. } catch (_) {
  7236. nativeMap = function() {
  7237. };
  7238. }
  7239. var nativeSet;
  7240. try {
  7241. nativeSet = Set;
  7242. } catch (_) {
  7243. nativeSet = function() {
  7244. };
  7245. }
  7246. var nativePromise;
  7247. try {
  7248. nativePromise = Promise;
  7249. } catch (_) {
  7250. nativePromise = function() {
  7251. };
  7252. }
  7253. function clone2(parent, circular, depth, prototype, includeNonEnumerable) {
  7254. if (typeof circular === "object") {
  7255. depth = circular.depth;
  7256. prototype = circular.prototype;
  7257. includeNonEnumerable = circular.includeNonEnumerable;
  7258. circular = circular.circular;
  7259. }
  7260. var allParents = [];
  7261. var allChildren = [];
  7262. var useBuffer = typeof Buffer != "undefined";
  7263. if (typeof circular == "undefined")
  7264. circular = true;
  7265. if (typeof depth == "undefined")
  7266. depth = Infinity;
  7267. function _clone(parent2, depth2) {
  7268. if (parent2 === null)
  7269. return null;
  7270. if (depth2 === 0)
  7271. return parent2;
  7272. var child;
  7273. var proto2;
  7274. if (typeof parent2 != "object") {
  7275. return parent2;
  7276. }
  7277. if (_instanceof(parent2, nativeMap)) {
  7278. child = new nativeMap();
  7279. } else if (_instanceof(parent2, nativeSet)) {
  7280. child = new nativeSet();
  7281. } else if (_instanceof(parent2, nativePromise)) {
  7282. child = new nativePromise(function(resolve2, reject) {
  7283. parent2.then(function(value2) {
  7284. resolve2(_clone(value2, depth2 - 1));
  7285. }, function(err) {
  7286. reject(_clone(err, depth2 - 1));
  7287. });
  7288. });
  7289. } else if (clone2.__isArray(parent2)) {
  7290. child = [];
  7291. } else if (clone2.__isRegExp(parent2)) {
  7292. child = new RegExp(parent2.source, __getRegExpFlags(parent2));
  7293. if (parent2.lastIndex)
  7294. child.lastIndex = parent2.lastIndex;
  7295. } else if (clone2.__isDate(parent2)) {
  7296. child = new Date(parent2.getTime());
  7297. } else if (useBuffer && Buffer.isBuffer(parent2)) {
  7298. if (Buffer.from) {
  7299. child = Buffer.from(parent2);
  7300. } else {
  7301. child = new Buffer(parent2.length);
  7302. parent2.copy(child);
  7303. }
  7304. return child;
  7305. } else if (_instanceof(parent2, Error)) {
  7306. child = Object.create(parent2);
  7307. } else {
  7308. if (typeof prototype == "undefined") {
  7309. proto2 = Object.getPrototypeOf(parent2);
  7310. child = Object.create(proto2);
  7311. } else {
  7312. child = Object.create(prototype);
  7313. proto2 = prototype;
  7314. }
  7315. }
  7316. if (circular) {
  7317. var index2 = allParents.indexOf(parent2);
  7318. if (index2 != -1) {
  7319. return allChildren[index2];
  7320. }
  7321. allParents.push(parent2);
  7322. allChildren.push(child);
  7323. }
  7324. if (_instanceof(parent2, nativeMap)) {
  7325. parent2.forEach(function(value2, key) {
  7326. var keyChild = _clone(key, depth2 - 1);
  7327. var valueChild = _clone(value2, depth2 - 1);
  7328. child.set(keyChild, valueChild);
  7329. });
  7330. }
  7331. if (_instanceof(parent2, nativeSet)) {
  7332. parent2.forEach(function(value2) {
  7333. var entryChild = _clone(value2, depth2 - 1);
  7334. child.add(entryChild);
  7335. });
  7336. }
  7337. for (var i in parent2) {
  7338. var attrs = Object.getOwnPropertyDescriptor(parent2, i);
  7339. if (attrs) {
  7340. child[i] = _clone(parent2[i], depth2 - 1);
  7341. }
  7342. try {
  7343. var objProperty = Object.getOwnPropertyDescriptor(parent2, i);
  7344. if (objProperty.set === "undefined") {
  7345. continue;
  7346. }
  7347. child[i] = _clone(parent2[i], depth2 - 1);
  7348. } catch (e2) {
  7349. if (e2 instanceof TypeError) {
  7350. continue;
  7351. } else if (e2 instanceof ReferenceError) {
  7352. continue;
  7353. }
  7354. }
  7355. }
  7356. if (Object.getOwnPropertySymbols) {
  7357. var symbols = Object.getOwnPropertySymbols(parent2);
  7358. for (var i = 0; i < symbols.length; i++) {
  7359. var symbol = symbols[i];
  7360. var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
  7361. if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
  7362. continue;
  7363. }
  7364. child[symbol] = _clone(parent2[symbol], depth2 - 1);
  7365. Object.defineProperty(child, symbol, descriptor);
  7366. }
  7367. }
  7368. if (includeNonEnumerable) {
  7369. var allPropertyNames = Object.getOwnPropertyNames(parent2);
  7370. for (var i = 0; i < allPropertyNames.length; i++) {
  7371. var propertyName = allPropertyNames[i];
  7372. var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
  7373. if (descriptor && descriptor.enumerable) {
  7374. continue;
  7375. }
  7376. child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
  7377. Object.defineProperty(child, propertyName, descriptor);
  7378. }
  7379. }
  7380. return child;
  7381. }
  7382. return _clone(parent, depth);
  7383. }
  7384. clone2.clonePrototype = function clonePrototype(parent) {
  7385. if (parent === null)
  7386. return null;
  7387. var c = function() {
  7388. };
  7389. c.prototype = parent;
  7390. return new c();
  7391. };
  7392. function __objToStr(o2) {
  7393. return Object.prototype.toString.call(o2);
  7394. }
  7395. clone2.__objToStr = __objToStr;
  7396. function __isDate(o2) {
  7397. return typeof o2 === "object" && __objToStr(o2) === "[object Date]";
  7398. }
  7399. clone2.__isDate = __isDate;
  7400. function __isArray(o2) {
  7401. return typeof o2 === "object" && __objToStr(o2) === "[object Array]";
  7402. }
  7403. clone2.__isArray = __isArray;
  7404. function __isRegExp(o2) {
  7405. return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]";
  7406. }
  7407. clone2.__isRegExp = __isRegExp;
  7408. function __getRegExpFlags(re) {
  7409. var flags = "";
  7410. if (re.global)
  7411. flags += "g";
  7412. if (re.ignoreCase)
  7413. flags += "i";
  7414. if (re.multiline)
  7415. flags += "m";
  7416. return flags;
  7417. }
  7418. clone2.__getRegExpFlags = __getRegExpFlags;
  7419. return clone2;
  7420. }();
  7421. class Request {
  7422. /**
  7423. * @param {Object} arg - 全局配置
  7424. * @param {String} arg.baseURL - 全局根路径
  7425. * @param {Object} arg.header - 全局header
  7426. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  7427. * @param {String} arg.dataType = [json] - 全局默认的dataType
  7428. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持
  7429. * @param {Object} arg.custom - 全局默认的自定义参数
  7430. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序
  7431. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  7432. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  7433. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  7434. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  7435. */
  7436. constructor(arg = {}) {
  7437. if (!isPlainObject(arg)) {
  7438. arg = {};
  7439. console.warn("设置全局参数必须接收一个Object");
  7440. }
  7441. this.config = clone$2({ ...defaults$1, ...arg });
  7442. this.interceptors = {
  7443. request: new InterceptorManager(),
  7444. response: new InterceptorManager()
  7445. };
  7446. }
  7447. /**
  7448. * @Function
  7449. * @param {Request~setConfigCallback} f - 设置全局默认配置
  7450. */
  7451. setConfig(f2) {
  7452. this.config = f2(this.config);
  7453. }
  7454. middleware(config2) {
  7455. config2 = mergeConfig(this.config, config2);
  7456. const chain = [dispatchRequest, void 0];
  7457. let promise2 = Promise.resolve(config2);
  7458. this.interceptors.request.forEach((interceptor) => {
  7459. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  7460. });
  7461. this.interceptors.response.forEach((interceptor) => {
  7462. chain.push(interceptor.fulfilled, interceptor.rejected);
  7463. });
  7464. while (chain.length) {
  7465. promise2 = promise2.then(chain.shift(), chain.shift());
  7466. }
  7467. return promise2;
  7468. }
  7469. /**
  7470. * @Function
  7471. * @param {Object} config - 请求配置项
  7472. * @prop {String} options.url - 请求路径
  7473. * @prop {Object} options.data - 请求参数
  7474. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  7475. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  7476. * @prop {Object} [options.header = config.header] - 请求header
  7477. * @prop {Object} [options.method = config.method] - 请求方法
  7478. * @returns {Promise<unknown>}
  7479. */
  7480. request(config2 = {}) {
  7481. return this.middleware(config2);
  7482. }
  7483. get(url3, options = {}) {
  7484. return this.middleware({
  7485. url: url3,
  7486. method: "GET",
  7487. ...options
  7488. });
  7489. }
  7490. post(url3, data, options = {}) {
  7491. return this.middleware({
  7492. url: url3,
  7493. data,
  7494. method: "POST",
  7495. ...options
  7496. });
  7497. }
  7498. put(url3, data, options = {}) {
  7499. return this.middleware({
  7500. url: url3,
  7501. data,
  7502. method: "PUT",
  7503. ...options
  7504. });
  7505. }
  7506. delete(url3, data, options = {}) {
  7507. return this.middleware({
  7508. url: url3,
  7509. data,
  7510. method: "DELETE",
  7511. ...options
  7512. });
  7513. }
  7514. connect(url3, data, options = {}) {
  7515. return this.middleware({
  7516. url: url3,
  7517. data,
  7518. method: "CONNECT",
  7519. ...options
  7520. });
  7521. }
  7522. head(url3, data, options = {}) {
  7523. return this.middleware({
  7524. url: url3,
  7525. data,
  7526. method: "HEAD",
  7527. ...options
  7528. });
  7529. }
  7530. options(url3, data, options = {}) {
  7531. return this.middleware({
  7532. url: url3,
  7533. data,
  7534. method: "OPTIONS",
  7535. ...options
  7536. });
  7537. }
  7538. trace(url3, data, options = {}) {
  7539. return this.middleware({
  7540. url: url3,
  7541. data,
  7542. method: "TRACE",
  7543. ...options
  7544. });
  7545. }
  7546. upload(url3, config2 = {}) {
  7547. config2.url = url3;
  7548. config2.method = "UPLOAD";
  7549. return this.middleware(config2);
  7550. }
  7551. download(url3, config2 = {}) {
  7552. config2.url = url3;
  7553. config2.method = "DOWNLOAD";
  7554. return this.middleware(config2);
  7555. }
  7556. }
  7557. class Router {
  7558. constructor() {
  7559. this.config = {
  7560. type: "navigateTo",
  7561. url: "",
  7562. delta: 1,
  7563. // navigateBack页面后退时,回退的层数
  7564. params: {},
  7565. // 传递的参数
  7566. animationType: "pop-in",
  7567. // 窗口动画,只在APP有效
  7568. animationDuration: 300,
  7569. // 窗口动画持续时间,单位毫秒,只在APP有效
  7570. intercept: false
  7571. // 是否需要拦截
  7572. };
  7573. this.route = this.route.bind(this);
  7574. }
  7575. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  7576. addRootPath(url3) {
  7577. return url3[0] === "/" ? url3 : `/${url3}`;
  7578. }
  7579. // 整合路由参数
  7580. mixinParam(url3, params) {
  7581. url3 = url3 && this.addRootPath(url3);
  7582. let query = "";
  7583. if (/.*\/.*\?.*=.*/.test(url3)) {
  7584. query = index$1.$u.queryParams(params, false);
  7585. return url3 += `&${query}`;
  7586. }
  7587. query = index$1.$u.queryParams(params);
  7588. return url3 += query;
  7589. }
  7590. // 对外的方法名称
  7591. async route(options = {}, params = {}) {
  7592. let mergeConfig2 = {};
  7593. if (typeof options === "string") {
  7594. mergeConfig2.url = this.mixinParam(options, params);
  7595. mergeConfig2.type = "navigateTo";
  7596. } else {
  7597. mergeConfig2 = index$1.$u.deepMerge(this.config, options);
  7598. mergeConfig2.url = this.mixinParam(options.url, options.params);
  7599. }
  7600. if (mergeConfig2.url === index$1.$u.page())
  7601. return;
  7602. if (params.intercept) {
  7603. this.config.intercept = params.intercept;
  7604. }
  7605. mergeConfig2.params = params;
  7606. mergeConfig2 = index$1.$u.deepMerge(this.config, mergeConfig2);
  7607. if (typeof index$1.$u.routeIntercept === "function") {
  7608. const isNext = await new Promise((resolve2, reject) => {
  7609. index$1.$u.routeIntercept(mergeConfig2, resolve2);
  7610. });
  7611. isNext && this.openPage(mergeConfig2);
  7612. } else {
  7613. this.openPage(mergeConfig2);
  7614. }
  7615. }
  7616. // 执行路由跳转
  7617. openPage(config2) {
  7618. const {
  7619. url: url3,
  7620. type: type2,
  7621. delta,
  7622. animationType,
  7623. animationDuration
  7624. } = config2;
  7625. if (config2.type == "navigateTo" || config2.type == "to") {
  7626. index$1.navigateTo({
  7627. url: url3,
  7628. animationType,
  7629. animationDuration
  7630. });
  7631. }
  7632. if (config2.type == "redirectTo" || config2.type == "redirect") {
  7633. index$1.redirectTo({
  7634. url: url3
  7635. });
  7636. }
  7637. if (config2.type == "switchTab" || config2.type == "tab") {
  7638. index$1.switchTab({
  7639. url: url3
  7640. });
  7641. }
  7642. if (config2.type == "reLaunch" || config2.type == "launch") {
  7643. index$1.reLaunch({
  7644. url: url3
  7645. });
  7646. }
  7647. if (config2.type == "navigateBack" || config2.type == "back") {
  7648. index$1.navigateBack({
  7649. delta
  7650. });
  7651. }
  7652. }
  7653. }
  7654. const route = new Router().route;
  7655. function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
  7656. const startRGB = hexToRgb(startColor, false);
  7657. const startR = startRGB[0];
  7658. const startG = startRGB[1];
  7659. const startB = startRGB[2];
  7660. const endRGB = hexToRgb(endColor, false);
  7661. const endR = endRGB[0];
  7662. const endG = endRGB[1];
  7663. const endB = endRGB[2];
  7664. const sR = (endR - startR) / step;
  7665. const sG = (endG - startG) / step;
  7666. const sB = (endB - startB) / step;
  7667. const colorArr = [];
  7668. for (let i = 0; i < step; i++) {
  7669. let hex2 = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
  7670. if (i === 0)
  7671. hex2 = rgbToHex(startColor);
  7672. if (i === step - 1)
  7673. hex2 = rgbToHex(endColor);
  7674. colorArr.push(hex2);
  7675. }
  7676. return colorArr;
  7677. }
  7678. function hexToRgb(sColor, str = true) {
  7679. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  7680. sColor = String(sColor).toLowerCase();
  7681. if (sColor && reg.test(sColor)) {
  7682. if (sColor.length === 4) {
  7683. let sColorNew = "#";
  7684. for (let i = 1; i < 4; i += 1) {
  7685. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  7686. }
  7687. sColor = sColorNew;
  7688. }
  7689. const sColorChange = [];
  7690. for (let i = 1; i < 7; i += 2) {
  7691. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  7692. }
  7693. if (!str) {
  7694. return sColorChange;
  7695. }
  7696. return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
  7697. }
  7698. if (/^(rgb|RGB)/.test(sColor)) {
  7699. const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  7700. return arr.map((val) => Number(val));
  7701. }
  7702. return sColor;
  7703. }
  7704. function rgbToHex(rgb) {
  7705. const _this = rgb;
  7706. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  7707. if (/^(rgb|RGB)/.test(_this)) {
  7708. const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  7709. let strHex = "#";
  7710. for (let i = 0; i < aColor.length; i++) {
  7711. let hex2 = Number(aColor[i]).toString(16);
  7712. hex2 = String(hex2).length == 1 ? `${0}${hex2}` : hex2;
  7713. if (hex2 === "0") {
  7714. hex2 += hex2;
  7715. }
  7716. strHex += hex2;
  7717. }
  7718. if (strHex.length !== 7) {
  7719. strHex = _this;
  7720. }
  7721. return strHex;
  7722. }
  7723. if (reg.test(_this)) {
  7724. const aNum = _this.replace(/#/, "").split("");
  7725. if (aNum.length === 6) {
  7726. return _this;
  7727. }
  7728. if (aNum.length === 3) {
  7729. let numHex = "#";
  7730. for (let i = 0; i < aNum.length; i += 1) {
  7731. numHex += aNum[i] + aNum[i];
  7732. }
  7733. return numHex;
  7734. }
  7735. } else {
  7736. return _this;
  7737. }
  7738. }
  7739. function colorToRgba(color2, alpha) {
  7740. color2 = rgbToHex(color2);
  7741. const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  7742. let sColor = String(color2).toLowerCase();
  7743. if (sColor && reg.test(sColor)) {
  7744. if (sColor.length === 4) {
  7745. let sColorNew = "#";
  7746. for (let i = 1; i < 4; i += 1) {
  7747. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  7748. }
  7749. sColor = sColorNew;
  7750. }
  7751. const sColorChange = [];
  7752. for (let i = 1; i < 7; i += 2) {
  7753. sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
  7754. }
  7755. return `rgba(${sColorChange.join(",")},${alpha})`;
  7756. }
  7757. return sColor;
  7758. }
  7759. const colorGradient$1 = {
  7760. colorGradient,
  7761. hexToRgb,
  7762. rgbToHex,
  7763. colorToRgba
  7764. };
  7765. function email(value2) {
  7766. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2);
  7767. }
  7768. function mobile(value2) {
  7769. return /^1[23456789]\d{9}$/.test(value2);
  7770. }
  7771. function url(value2) {
  7772. return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value2);
  7773. }
  7774. function date$1(value2) {
  7775. if (!value2)
  7776. return false;
  7777. if (number$1(value2))
  7778. value2 = +value2;
  7779. return !/Invalid|NaN/.test(new Date(value2).toString());
  7780. }
  7781. function dateISO(value2) {
  7782. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2);
  7783. }
  7784. function number$1(value2) {
  7785. return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2);
  7786. }
  7787. function string$1(value2) {
  7788. return typeof value2 === "string";
  7789. }
  7790. function digits(value2) {
  7791. return /^\d+$/.test(value2);
  7792. }
  7793. function idCard(value2) {
  7794. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  7795. value2
  7796. );
  7797. }
  7798. function carNo(value2) {
  7799. const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  7800. const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  7801. if (value2.length === 7) {
  7802. return creg.test(value2);
  7803. }
  7804. if (value2.length === 8) {
  7805. return xreg.test(value2);
  7806. }
  7807. return false;
  7808. }
  7809. function amount(value2) {
  7810. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2);
  7811. }
  7812. function chinese(value2) {
  7813. const reg = /^[\u4e00-\u9fa5]+$/gi;
  7814. return reg.test(value2);
  7815. }
  7816. function letter(value2) {
  7817. return /^[a-zA-Z]*$/.test(value2);
  7818. }
  7819. function enOrNum(value2) {
  7820. const reg = /^[0-9a-zA-Z]*$/g;
  7821. return reg.test(value2);
  7822. }
  7823. function contains(value2, param) {
  7824. return value2.indexOf(param) >= 0;
  7825. }
  7826. function range$2(value2, param) {
  7827. return value2 >= param[0] && value2 <= param[1];
  7828. }
  7829. function rangeLength(value2, param) {
  7830. return value2.length >= param[0] && value2.length <= param[1];
  7831. }
  7832. function landline(value2) {
  7833. const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  7834. return reg.test(value2);
  7835. }
  7836. function empty(value2) {
  7837. switch (typeof value2) {
  7838. case "undefined":
  7839. return true;
  7840. case "string":
  7841. if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
  7842. return true;
  7843. break;
  7844. case "boolean":
  7845. if (!value2)
  7846. return true;
  7847. break;
  7848. case "number":
  7849. if (value2 === 0 || isNaN(value2))
  7850. return true;
  7851. break;
  7852. case "object":
  7853. if (value2 === null || value2.length === 0)
  7854. return true;
  7855. for (const i in value2) {
  7856. return false;
  7857. }
  7858. return true;
  7859. }
  7860. return false;
  7861. }
  7862. function jsonString(value2) {
  7863. if (typeof value2 === "string") {
  7864. try {
  7865. const obj = JSON.parse(value2);
  7866. if (typeof obj === "object" && obj) {
  7867. return true;
  7868. }
  7869. return false;
  7870. } catch (e2) {
  7871. return false;
  7872. }
  7873. }
  7874. return false;
  7875. }
  7876. function array$1(value2) {
  7877. if (typeof Array.isArray === "function") {
  7878. return Array.isArray(value2);
  7879. }
  7880. return Object.prototype.toString.call(value2) === "[object Array]";
  7881. }
  7882. function object$1(value2) {
  7883. return Object.prototype.toString.call(value2) === "[object Object]";
  7884. }
  7885. function code(value2, len = 6) {
  7886. return new RegExp(`^\\d{${len}}$`).test(value2);
  7887. }
  7888. function func(value2) {
  7889. return typeof value2 === "function";
  7890. }
  7891. function promise(value2) {
  7892. return object$1(value2) && func(value2.then) && func(value2.catch);
  7893. }
  7894. function image(value2) {
  7895. const newValue = value2.split("?")[0];
  7896. const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
  7897. return IMAGE_REGEXP.test(newValue);
  7898. }
  7899. function video(value2) {
  7900. const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
  7901. return VIDEO_REGEXP.test(value2);
  7902. }
  7903. function regExp(o2) {
  7904. return o2 && Object.prototype.toString.call(o2) === "[object RegExp]";
  7905. }
  7906. const test = {
  7907. email,
  7908. mobile,
  7909. url,
  7910. date: date$1,
  7911. dateISO,
  7912. number: number$1,
  7913. digits,
  7914. idCard,
  7915. carNo,
  7916. amount,
  7917. chinese,
  7918. letter,
  7919. enOrNum,
  7920. contains,
  7921. range: range$2,
  7922. rangeLength,
  7923. empty,
  7924. isEmpty: empty,
  7925. jsonString,
  7926. landline,
  7927. object: object$1,
  7928. array: array$1,
  7929. code,
  7930. func,
  7931. promise,
  7932. video,
  7933. image,
  7934. regExp,
  7935. string: string$1
  7936. };
  7937. let timeout = null;
  7938. function debounce(func2, wait = 500, immediate = false) {
  7939. if (timeout !== null)
  7940. clearTimeout(timeout);
  7941. if (immediate) {
  7942. const callNow = !timeout;
  7943. timeout = setTimeout(() => {
  7944. timeout = null;
  7945. }, wait);
  7946. if (callNow)
  7947. typeof func2 === "function" && func2();
  7948. } else {
  7949. timeout = setTimeout(() => {
  7950. typeof func2 === "function" && func2();
  7951. }, wait);
  7952. }
  7953. }
  7954. let flag;
  7955. function throttle(func2, wait = 500, immediate = true) {
  7956. if (immediate) {
  7957. if (!flag) {
  7958. flag = true;
  7959. typeof func2 === "function" && func2();
  7960. setTimeout(() => {
  7961. flag = false;
  7962. }, wait);
  7963. }
  7964. } else if (!flag) {
  7965. flag = true;
  7966. setTimeout(() => {
  7967. flag = false;
  7968. typeof func2 === "function" && func2();
  7969. }, wait);
  7970. }
  7971. }
  7972. function strip(num, precision = 15) {
  7973. return +parseFloat(Number(num).toPrecision(precision));
  7974. }
  7975. function digitLength(num) {
  7976. const eSplit = num.toString().split(/[eE]/);
  7977. const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
  7978. return len > 0 ? len : 0;
  7979. }
  7980. function float2Fixed(num) {
  7981. if (num.toString().indexOf("e") === -1) {
  7982. return Number(num.toString().replace(".", ""));
  7983. }
  7984. const dLen = digitLength(num);
  7985. return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
  7986. }
  7987. function checkBoundary(num) {
  7988. {
  7989. if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
  7990. console.warn(`${num} 超出了精度限制,结果可能不正确`);
  7991. }
  7992. }
  7993. }
  7994. function iteratorOperation(arr, operation) {
  7995. const [num1, num2, ...others] = arr;
  7996. let res = operation(num1, num2);
  7997. others.forEach((num) => {
  7998. res = operation(res, num);
  7999. });
  8000. return res;
  8001. }
  8002. function times(...nums) {
  8003. if (nums.length > 2) {
  8004. return iteratorOperation(nums, times);
  8005. }
  8006. const [num1, num2] = nums;
  8007. const num1Changed = float2Fixed(num1);
  8008. const num2Changed = float2Fixed(num2);
  8009. const baseNum = digitLength(num1) + digitLength(num2);
  8010. const leftValue = num1Changed * num2Changed;
  8011. checkBoundary(leftValue);
  8012. return leftValue / Math.pow(10, baseNum);
  8013. }
  8014. function divide(...nums) {
  8015. if (nums.length > 2) {
  8016. return iteratorOperation(nums, divide);
  8017. }
  8018. const [num1, num2] = nums;
  8019. const num1Changed = float2Fixed(num1);
  8020. const num2Changed = float2Fixed(num2);
  8021. checkBoundary(num1Changed);
  8022. checkBoundary(num2Changed);
  8023. return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
  8024. }
  8025. function round$1(num, ratio) {
  8026. const base = Math.pow(10, ratio);
  8027. let result = divide(Math.round(Math.abs(times(num, base))), base);
  8028. if (num < 0 && result !== 0) {
  8029. result = times(result, -1);
  8030. }
  8031. return result;
  8032. }
  8033. function range$1(min2 = 0, max2 = 0, value2 = 0) {
  8034. return Math.max(min2, Math.min(max2, Number(value2)));
  8035. }
  8036. function getPx(value2, unit = false) {
  8037. if (test.number(value2)) {
  8038. return unit ? `${value2}px` : Number(value2);
  8039. }
  8040. if (/(rpx|upx)$/.test(value2)) {
  8041. return unit ? `${index$1.upx2px(parseInt(value2))}px` : Number(index$1.upx2px(parseInt(value2)));
  8042. }
  8043. return unit ? `${parseInt(value2)}px` : parseInt(value2);
  8044. }
  8045. function sleep(value2 = 30) {
  8046. return new Promise((resolve2) => {
  8047. setTimeout(() => {
  8048. resolve2();
  8049. }, value2);
  8050. });
  8051. }
  8052. function os() {
  8053. return index$1.getSystemInfoSync().platform.toLowerCase();
  8054. }
  8055. function sys() {
  8056. return index$1.getSystemInfoSync();
  8057. }
  8058. function random(min2, max2) {
  8059. if (min2 >= 0 && max2 > 0 && max2 >= min2) {
  8060. const gab = max2 - min2 + 1;
  8061. return Math.floor(Math.random() * gab + min2);
  8062. }
  8063. return 0;
  8064. }
  8065. function guid(len = 32, firstU = true, radix = null) {
  8066. const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  8067. const uuid = [];
  8068. radix = radix || chars.length;
  8069. if (len) {
  8070. for (let i = 0; i < len; i++)
  8071. uuid[i] = chars[0 | Math.random() * radix];
  8072. } else {
  8073. let r;
  8074. uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
  8075. uuid[14] = "4";
  8076. for (let i = 0; i < 36; i++) {
  8077. if (!uuid[i]) {
  8078. r = 0 | Math.random() * 16;
  8079. uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
  8080. }
  8081. }
  8082. }
  8083. if (firstU) {
  8084. uuid.shift();
  8085. return `u${uuid.join("")}`;
  8086. }
  8087. return uuid.join("");
  8088. }
  8089. function $parent(name = void 0) {
  8090. let parent = this.$parent;
  8091. while (parent) {
  8092. if (parent.$options && parent.$options.name !== name) {
  8093. parent = parent.$parent;
  8094. } else {
  8095. return parent;
  8096. }
  8097. }
  8098. return false;
  8099. }
  8100. function addStyle(customStyle, target = "object") {
  8101. if (test.empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
  8102. return customStyle;
  8103. }
  8104. if (target === "object") {
  8105. customStyle = trim(customStyle);
  8106. const styleArray = customStyle.split(";");
  8107. const style = {};
  8108. for (let i = 0; i < styleArray.length; i++) {
  8109. if (styleArray[i]) {
  8110. const item = styleArray[i].split(":");
  8111. style[trim(item[0])] = trim(item[1]);
  8112. }
  8113. }
  8114. return style;
  8115. }
  8116. let string2 = "";
  8117. for (const i in customStyle) {
  8118. const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
  8119. string2 += `${key}:${customStyle[i]};`;
  8120. }
  8121. return trim(string2);
  8122. }
  8123. function addUnit(value2 = "auto", unit = "") {
  8124. if (!unit) {
  8125. unit = index$1.$u.config.unit || "px";
  8126. }
  8127. value2 = String(value2);
  8128. return test.number(value2) ? `${value2}${unit}` : value2;
  8129. }
  8130. function deepClone(obj) {
  8131. if ([null, void 0, NaN, false].includes(obj))
  8132. return obj;
  8133. if (typeof obj !== "object" && typeof obj !== "function") {
  8134. return obj;
  8135. }
  8136. const o2 = test.array(obj) ? [] : {};
  8137. for (const i in obj) {
  8138. if (obj.hasOwnProperty(i)) {
  8139. o2[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  8140. }
  8141. }
  8142. return o2;
  8143. }
  8144. function deepMerge$1(target = {}, source = {}) {
  8145. target = deepClone(target);
  8146. if (typeof target !== "object" || typeof source !== "object")
  8147. return false;
  8148. for (const prop in source) {
  8149. if (!source.hasOwnProperty(prop))
  8150. continue;
  8151. if (prop in target) {
  8152. if (source[prop] == null) {
  8153. target[prop] = source[prop];
  8154. } else if (typeof target[prop] !== "object") {
  8155. target[prop] = source[prop];
  8156. } else if (typeof source[prop] !== "object") {
  8157. target[prop] = source[prop];
  8158. } else if (target[prop].concat && source[prop].concat) {
  8159. target[prop] = target[prop].concat(source[prop]);
  8160. } else {
  8161. target[prop] = deepMerge$1(target[prop], source[prop]);
  8162. }
  8163. } else {
  8164. target[prop] = source[prop];
  8165. }
  8166. }
  8167. return target;
  8168. }
  8169. function error(err) {
  8170. {
  8171. console.error(`uView提示:${err}`);
  8172. }
  8173. }
  8174. function randomArray(array3 = []) {
  8175. return array3.sort(() => Math.random() - 0.5);
  8176. }
  8177. if (!String.prototype.padStart) {
  8178. String.prototype.padStart = function(maxLength, fillString = " ") {
  8179. if (Object.prototype.toString.call(fillString) !== "[object String]") {
  8180. throw new TypeError(
  8181. "fillString must be String"
  8182. );
  8183. }
  8184. const str = this;
  8185. if (str.length >= maxLength)
  8186. return String(str);
  8187. const fillLength = maxLength - str.length;
  8188. let times2 = Math.ceil(fillLength / fillString.length);
  8189. while (times2 >>= 1) {
  8190. fillString += fillString;
  8191. if (times2 === 1) {
  8192. fillString += fillString;
  8193. }
  8194. }
  8195. return fillString.slice(0, fillLength) + str;
  8196. };
  8197. }
  8198. function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
  8199. let date3;
  8200. if (!dateTime) {
  8201. date3 = /* @__PURE__ */ new Date();
  8202. } else if (/^\d{10}$/.test(dateTime.toString().trim())) {
  8203. date3 = new Date(dateTime * 1e3);
  8204. } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
  8205. date3 = new Date(Number(dateTime));
  8206. } else {
  8207. date3 = new Date(
  8208. typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime
  8209. );
  8210. }
  8211. const timeSource = {
  8212. "y": date3.getFullYear().toString(),
  8213. // 年
  8214. "m": (date3.getMonth() + 1).toString().padStart(2, "0"),
  8215. // 月
  8216. "d": date3.getDate().toString().padStart(2, "0"),
  8217. // 日
  8218. "h": date3.getHours().toString().padStart(2, "0"),
  8219. // 时
  8220. "M": date3.getMinutes().toString().padStart(2, "0"),
  8221. // 分
  8222. "s": date3.getSeconds().toString().padStart(2, "0")
  8223. // 秒
  8224. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  8225. };
  8226. for (const key in timeSource) {
  8227. const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
  8228. if (ret) {
  8229. const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
  8230. formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
  8231. }
  8232. }
  8233. return formatStr;
  8234. }
  8235. function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") {
  8236. if (timestamp == null)
  8237. timestamp = Number(/* @__PURE__ */ new Date());
  8238. timestamp = parseInt(timestamp);
  8239. if (timestamp.toString().length == 10)
  8240. timestamp *= 1e3;
  8241. let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
  8242. timer = parseInt(timer / 1e3);
  8243. let tips = "";
  8244. switch (true) {
  8245. case timer < 300:
  8246. tips = "刚刚";
  8247. break;
  8248. case (timer >= 300 && timer < 3600):
  8249. tips = `${parseInt(timer / 60)}分钟前`;
  8250. break;
  8251. case (timer >= 3600 && timer < 86400):
  8252. tips = `${parseInt(timer / 3600)}小时前`;
  8253. break;
  8254. case (timer >= 86400 && timer < 2592e3):
  8255. tips = `${parseInt(timer / 86400)}天前`;
  8256. break;
  8257. default:
  8258. if (format2 === false) {
  8259. if (timer >= 2592e3 && timer < 365 * 86400) {
  8260. tips = `${parseInt(timer / (86400 * 30))}个月前`;
  8261. } else {
  8262. tips = `${parseInt(timer / (86400 * 365))}年前`;
  8263. }
  8264. } else {
  8265. tips = timeFormat(timestamp, format2);
  8266. }
  8267. }
  8268. return tips;
  8269. }
  8270. function trim(str, pos = "both") {
  8271. str = String(str);
  8272. if (pos == "both") {
  8273. return str.replace(/^\s+|\s+$/g, "");
  8274. }
  8275. if (pos == "left") {
  8276. return str.replace(/^\s*/, "");
  8277. }
  8278. if (pos == "right") {
  8279. return str.replace(/(\s*$)/g, "");
  8280. }
  8281. if (pos == "all") {
  8282. return str.replace(/\s+/g, "");
  8283. }
  8284. return str;
  8285. }
  8286. function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
  8287. const prefix = isPrefix ? "?" : "";
  8288. const _result = [];
  8289. if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
  8290. arrayFormat = "brackets";
  8291. for (const key in data) {
  8292. const value2 = data[key];
  8293. if (["", void 0, null].indexOf(value2) >= 0) {
  8294. continue;
  8295. }
  8296. if (value2.constructor === Array) {
  8297. switch (arrayFormat) {
  8298. case "indices":
  8299. for (let i = 0; i < value2.length; i++) {
  8300. _result.push(`${key}[${i}]=${value2[i]}`);
  8301. }
  8302. break;
  8303. case "brackets":
  8304. value2.forEach((_value) => {
  8305. _result.push(`${key}[]=${_value}`);
  8306. });
  8307. break;
  8308. case "repeat":
  8309. value2.forEach((_value) => {
  8310. _result.push(`${key}=${_value}`);
  8311. });
  8312. break;
  8313. case "comma":
  8314. let commaStr = "";
  8315. value2.forEach((_value) => {
  8316. commaStr += (commaStr ? "," : "") + _value;
  8317. });
  8318. _result.push(`${key}=${commaStr}`);
  8319. break;
  8320. default:
  8321. value2.forEach((_value) => {
  8322. _result.push(`${key}[]=${_value}`);
  8323. });
  8324. }
  8325. } else {
  8326. _result.push(`${key}=${value2}`);
  8327. }
  8328. }
  8329. return _result.length ? prefix + _result.join("&") : "";
  8330. }
  8331. function toast(title, duration = 2e3) {
  8332. index$1.showToast({
  8333. title: String(title),
  8334. icon: "none",
  8335. duration
  8336. });
  8337. }
  8338. function type2icon(type2 = "success", fill = false) {
  8339. if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1)
  8340. type2 = "success";
  8341. let iconName = "";
  8342. switch (type2) {
  8343. case "primary":
  8344. iconName = "info-circle";
  8345. break;
  8346. case "info":
  8347. iconName = "info-circle";
  8348. break;
  8349. case "error":
  8350. iconName = "close-circle";
  8351. break;
  8352. case "warning":
  8353. iconName = "error-circle";
  8354. break;
  8355. case "success":
  8356. iconName = "checkmark-circle";
  8357. break;
  8358. default:
  8359. iconName = "checkmark-circle";
  8360. }
  8361. if (fill)
  8362. iconName += "-fill";
  8363. return iconName;
  8364. }
  8365. function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
  8366. number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, "");
  8367. const n2 = !isFinite(+number3) ? 0 : +number3;
  8368. const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
  8369. const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
  8370. const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
  8371. let s2 = "";
  8372. s2 = (prec ? round$1(n2, prec) + "" : `${Math.round(n2)}`).split(".");
  8373. const re = /(-?\d+)(\d{3})/;
  8374. while (re.test(s2[0])) {
  8375. s2[0] = s2[0].replace(re, `$1${sep}$2`);
  8376. }
  8377. if ((s2[1] || "").length < prec) {
  8378. s2[1] = s2[1] || "";
  8379. s2[1] += new Array(prec - s2[1].length + 1).join("0");
  8380. }
  8381. return s2.join(dec);
  8382. }
  8383. function getDuration(value2, unit = true) {
  8384. const valueNum = parseInt(value2);
  8385. if (unit) {
  8386. if (/s$/.test(value2))
  8387. return value2;
  8388. return value2 > 30 ? `${value2}ms` : `${value2}s`;
  8389. }
  8390. if (/ms$/.test(value2))
  8391. return valueNum;
  8392. if (/s$/.test(value2))
  8393. return valueNum > 30 ? valueNum : valueNum * 1e3;
  8394. return valueNum;
  8395. }
  8396. function padZero(value2) {
  8397. return `00${value2}`.slice(-2);
  8398. }
  8399. function formValidate(instance, event) {
  8400. const formItem = index$1.$u.$parent.call(instance, "u-form-item");
  8401. const form = index$1.$u.$parent.call(instance, "u-form");
  8402. if (formItem && form) {
  8403. form.validateField(formItem.prop, () => {
  8404. }, event);
  8405. }
  8406. }
  8407. function getProperty(obj, key) {
  8408. if (!obj) {
  8409. return;
  8410. }
  8411. if (typeof key !== "string" || key === "") {
  8412. return "";
  8413. }
  8414. if (key.indexOf(".") !== -1) {
  8415. const keys2 = key.split(".");
  8416. let firstObj = obj[keys2[0]] || {};
  8417. for (let i = 1; i < keys2.length; i++) {
  8418. if (firstObj) {
  8419. firstObj = firstObj[keys2[i]];
  8420. }
  8421. }
  8422. return firstObj;
  8423. }
  8424. return obj[key];
  8425. }
  8426. function setProperty(obj, key, value2) {
  8427. if (!obj) {
  8428. return;
  8429. }
  8430. const inFn = function(_obj, keys2, v) {
  8431. if (keys2.length === 1) {
  8432. _obj[keys2[0]] = v;
  8433. return;
  8434. }
  8435. while (keys2.length > 1) {
  8436. const k = keys2[0];
  8437. if (!_obj[k] || typeof _obj[k] !== "object") {
  8438. _obj[k] = {};
  8439. }
  8440. keys2.shift();
  8441. inFn(_obj[k], keys2, v);
  8442. }
  8443. };
  8444. if (typeof key !== "string" || key === "")
  8445. ;
  8446. else if (key.indexOf(".") !== -1) {
  8447. const keys2 = key.split(".");
  8448. inFn(obj, keys2, value2);
  8449. } else {
  8450. obj[key] = value2;
  8451. }
  8452. }
  8453. function page() {
  8454. const pages2 = getCurrentPages();
  8455. return `/${pages2[pages2.length - 1].route || ""}`;
  8456. }
  8457. function pages() {
  8458. const pages2 = getCurrentPages();
  8459. return pages2;
  8460. }
  8461. function setConfig({
  8462. props: props2 = {},
  8463. config: config2 = {},
  8464. color: color2 = {},
  8465. zIndex: zIndex2 = {}
  8466. }) {
  8467. const {
  8468. deepMerge: deepMerge2
  8469. } = index$1.$u;
  8470. index$1.$u.config = deepMerge2(index$1.$u.config, config2);
  8471. index$1.$u.props = deepMerge2(index$1.$u.props, props2);
  8472. index$1.$u.color = deepMerge2(index$1.$u.color, color2);
  8473. index$1.$u.zIndex = deepMerge2(index$1.$u.zIndex, zIndex2);
  8474. }
  8475. const index = {
  8476. range: range$1,
  8477. getPx,
  8478. sleep,
  8479. os,
  8480. sys,
  8481. random,
  8482. guid,
  8483. $parent,
  8484. addStyle,
  8485. addUnit,
  8486. deepClone,
  8487. deepMerge: deepMerge$1,
  8488. error,
  8489. randomArray,
  8490. timeFormat,
  8491. timeFrom,
  8492. trim,
  8493. queryParams,
  8494. toast,
  8495. type2icon,
  8496. priceFormat,
  8497. getDuration,
  8498. padZero,
  8499. formValidate,
  8500. getProperty,
  8501. setProperty,
  8502. page,
  8503. pages,
  8504. setConfig
  8505. };
  8506. const version = "3";
  8507. {
  8508. console.log(`
  8509. %c uview-plus V${version} %c https://ijry.github.io/uview-plus/
  8510. `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;");
  8511. }
  8512. const config = {
  8513. v: version,
  8514. version,
  8515. // 主题名称
  8516. type: [
  8517. "primary",
  8518. "success",
  8519. "info",
  8520. "error",
  8521. "warning"
  8522. ],
  8523. // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持
  8524. color: {
  8525. "u-primary": "#2979ff",
  8526. "u-warning": "#ff9900",
  8527. "u-success": "#19be6b",
  8528. "u-error": "#fa3534",
  8529. "u-info": "#909399",
  8530. "u-main-color": "#303133",
  8531. "u-content-color": "#606266",
  8532. "u-tips-color": "#909399",
  8533. "u-light-color": "#c0c4cc"
  8534. },
  8535. // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx
  8536. unit: "px"
  8537. };
  8538. const ActionSheet = {
  8539. // action-sheet组件
  8540. actionSheet: {
  8541. show: false,
  8542. title: "",
  8543. description: "",
  8544. actions: () => [],
  8545. index: "",
  8546. cancelText: "",
  8547. closeOnClickAction: true,
  8548. safeAreaInsetBottom: true,
  8549. openType: "",
  8550. closeOnClickOverlay: true,
  8551. round: 0
  8552. }
  8553. };
  8554. const Album = {
  8555. // album 组件
  8556. album: {
  8557. urls: () => [],
  8558. keyName: "",
  8559. singleSize: 180,
  8560. multipleSize: 70,
  8561. space: 6,
  8562. singleMode: "scaleToFill",
  8563. multipleMode: "aspectFill",
  8564. maxCount: 9,
  8565. previewFullImage: true,
  8566. rowCount: 3,
  8567. showMore: true
  8568. }
  8569. };
  8570. const Alert = {
  8571. // alert警告组件
  8572. alert: {
  8573. title: "",
  8574. type: "warning",
  8575. description: "",
  8576. closable: false,
  8577. showIcon: false,
  8578. effect: "light",
  8579. center: false,
  8580. fontSize: 14
  8581. }
  8582. };
  8583. const Avatar = {
  8584. // avatar 组件
  8585. avatar: {
  8586. src: "",
  8587. shape: "circle",
  8588. size: 40,
  8589. mode: "scaleToFill",
  8590. text: "",
  8591. bgColor: "#c0c4cc",
  8592. color: "#ffffff",
  8593. fontSize: 18,
  8594. icon: "",
  8595. mpAvatar: false,
  8596. randomBgColor: false,
  8597. defaultUrl: "",
  8598. colorIndex: "",
  8599. name: ""
  8600. }
  8601. };
  8602. const AvatarGroup = {
  8603. // avatarGroup 组件
  8604. avatarGroup: {
  8605. urls: () => [],
  8606. maxCount: 5,
  8607. shape: "circle",
  8608. mode: "scaleToFill",
  8609. showMore: true,
  8610. size: 40,
  8611. keyName: "",
  8612. gap: 0.5,
  8613. extraValue: 0
  8614. }
  8615. };
  8616. const Backtop = {
  8617. // backtop组件
  8618. backtop: {
  8619. mode: "circle",
  8620. icon: "arrow-upward",
  8621. text: "",
  8622. duration: 100,
  8623. scrollTop: 0,
  8624. top: 400,
  8625. bottom: 100,
  8626. right: 20,
  8627. zIndex: 9,
  8628. iconStyle: () => ({
  8629. color: "#909399",
  8630. fontSize: "19px"
  8631. })
  8632. }
  8633. };
  8634. const Badge = {
  8635. // 徽标数组件
  8636. badge: {
  8637. isDot: false,
  8638. value: "",
  8639. show: true,
  8640. max: 999,
  8641. type: "error",
  8642. showZero: false,
  8643. bgColor: null,
  8644. color: null,
  8645. shape: "circle",
  8646. numberType: "overflow",
  8647. offset: () => [],
  8648. inverted: false,
  8649. absolute: false
  8650. }
  8651. };
  8652. const Button = {
  8653. // button组件
  8654. button: {
  8655. hairline: false,
  8656. type: "info",
  8657. size: "normal",
  8658. shape: "square",
  8659. plain: false,
  8660. disabled: false,
  8661. loading: false,
  8662. loadingText: "",
  8663. loadingMode: "spinner",
  8664. loadingSize: 15,
  8665. openType: "",
  8666. formType: "",
  8667. appParameter: "",
  8668. hoverStopPropagation: true,
  8669. lang: "en",
  8670. sessionFrom: "",
  8671. sendMessageTitle: "",
  8672. sendMessagePath: "",
  8673. sendMessageImg: "",
  8674. showMessageCard: false,
  8675. dataName: "",
  8676. throttleTime: 0,
  8677. hoverStartTime: 0,
  8678. hoverStayTime: 200,
  8679. text: "",
  8680. icon: "",
  8681. iconColor: "",
  8682. color: ""
  8683. }
  8684. };
  8685. const Calendar = {
  8686. // calendar 组件
  8687. calendar: {
  8688. title: "日期选择",
  8689. showTitle: true,
  8690. showSubtitle: true,
  8691. mode: "single",
  8692. startText: "开始",
  8693. endText: "结束",
  8694. customList: () => [],
  8695. color: "#3c9cff",
  8696. minDate: 0,
  8697. maxDate: 0,
  8698. defaultDate: null,
  8699. maxCount: Number.MAX_SAFE_INTEGER,
  8700. // Infinity
  8701. rowHeight: 56,
  8702. formatter: null,
  8703. showLunar: false,
  8704. showMark: true,
  8705. confirmText: "确定",
  8706. confirmDisabledText: "确定",
  8707. show: false,
  8708. closeOnClickOverlay: false,
  8709. readonly: false,
  8710. showConfirm: true,
  8711. maxRange: Number.MAX_SAFE_INTEGER,
  8712. // Infinity
  8713. rangePrompt: "",
  8714. showRangePrompt: true,
  8715. allowSameDay: false,
  8716. round: 0,
  8717. monthNum: 3
  8718. }
  8719. };
  8720. const CarKeyboard = {
  8721. // 车牌号键盘
  8722. carKeyboard: {
  8723. random: false
  8724. }
  8725. };
  8726. const Cell = {
  8727. // cell组件的props
  8728. cell: {
  8729. customClass: "",
  8730. title: "",
  8731. label: "",
  8732. value: "",
  8733. icon: "",
  8734. disabled: false,
  8735. border: true,
  8736. center: false,
  8737. url: "",
  8738. linkType: "navigateTo",
  8739. clickable: false,
  8740. isLink: false,
  8741. required: false,
  8742. arrowDirection: "",
  8743. iconStyle: {},
  8744. rightIconStyle: {},
  8745. rightIcon: "arrow-right",
  8746. titleStyle: {},
  8747. size: "",
  8748. stop: true,
  8749. name: ""
  8750. }
  8751. };
  8752. const CellGroup = {
  8753. // cell-group组件的props
  8754. cellGroup: {
  8755. title: "",
  8756. border: true,
  8757. customStyle: {}
  8758. }
  8759. };
  8760. const Checkbox = {
  8761. // checkbox组件
  8762. checkbox: {
  8763. name: "",
  8764. shape: "",
  8765. size: "",
  8766. checkbox: false,
  8767. disabled: "",
  8768. activeColor: "",
  8769. inactiveColor: "",
  8770. iconSize: "",
  8771. iconColor: "",
  8772. label: "",
  8773. labelSize: "",
  8774. labelColor: "",
  8775. labelDisabled: ""
  8776. }
  8777. };
  8778. const CheckboxGroup = {
  8779. // checkbox-group组件
  8780. checkboxGroup: {
  8781. name: "",
  8782. value: () => [],
  8783. shape: "square",
  8784. disabled: false,
  8785. activeColor: "#2979ff",
  8786. inactiveColor: "#c8c9cc",
  8787. size: 18,
  8788. placement: "row",
  8789. labelSize: 14,
  8790. labelColor: "#303133",
  8791. labelDisabled: false,
  8792. iconColor: "#ffffff",
  8793. iconSize: 12,
  8794. iconPlacement: "left",
  8795. borderBottom: false
  8796. }
  8797. };
  8798. const CircleProgress = {
  8799. // circleProgress 组件
  8800. circleProgress: {
  8801. percentage: 30
  8802. }
  8803. };
  8804. const Code = {
  8805. // code 组件
  8806. code: {
  8807. seconds: 60,
  8808. startText: "获取验证码",
  8809. changeText: "X秒重新获取",
  8810. endText: "重新获取",
  8811. keepRunning: false,
  8812. uniqueKey: ""
  8813. }
  8814. };
  8815. const CodeInput = {
  8816. // codeInput 组件
  8817. codeInput: {
  8818. adjustPosition: true,
  8819. maxlength: 6,
  8820. dot: false,
  8821. mode: "box",
  8822. hairline: false,
  8823. space: 10,
  8824. value: "",
  8825. focus: false,
  8826. bold: false,
  8827. color: "#606266",
  8828. fontSize: 18,
  8829. size: 35,
  8830. disabledKeyboard: false,
  8831. borderColor: "#c9cacc",
  8832. disabledDot: true
  8833. }
  8834. };
  8835. const Col = {
  8836. // col 组件
  8837. col: {
  8838. span: 12,
  8839. offset: 0,
  8840. justify: "start",
  8841. align: "stretch",
  8842. textAlign: "left"
  8843. }
  8844. };
  8845. const Collapse = {
  8846. // collapse 组件
  8847. collapse: {
  8848. value: null,
  8849. accordion: false,
  8850. border: true
  8851. }
  8852. };
  8853. const CollapseItem = {
  8854. // collapseItem 组件
  8855. collapseItem: {
  8856. title: "",
  8857. value: "",
  8858. label: "",
  8859. disabled: false,
  8860. isLink: true,
  8861. clickable: true,
  8862. border: true,
  8863. align: "left",
  8864. name: "",
  8865. icon: "",
  8866. duration: 300
  8867. }
  8868. };
  8869. const ColumnNotice = {
  8870. // columnNotice 组件
  8871. columnNotice: {
  8872. text: "",
  8873. icon: "volume",
  8874. mode: "",
  8875. color: "#f9ae3d",
  8876. bgColor: "#fdf6ec",
  8877. fontSize: 14,
  8878. speed: 80,
  8879. step: false,
  8880. duration: 1500,
  8881. disableTouch: true
  8882. }
  8883. };
  8884. const CountDown = {
  8885. // u-count-down 计时器组件
  8886. countDown: {
  8887. time: 0,
  8888. format: "HH:mm:ss",
  8889. autoStart: true,
  8890. millisecond: false
  8891. }
  8892. };
  8893. const CountTo = {
  8894. // countTo 组件
  8895. countTo: {
  8896. startVal: 0,
  8897. endVal: 0,
  8898. duration: 2e3,
  8899. autoplay: true,
  8900. decimals: 0,
  8901. useEasing: true,
  8902. decimal: ".",
  8903. color: "#606266",
  8904. fontSize: 22,
  8905. bold: false,
  8906. separator: ""
  8907. }
  8908. };
  8909. const DatetimePicker = {
  8910. // datetimePicker 组件
  8911. datetimePicker: {
  8912. show: false,
  8913. popupMode: "bottom",
  8914. showToolbar: true,
  8915. value: "",
  8916. title: "",
  8917. mode: "datetime",
  8918. maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(),
  8919. minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(),
  8920. minHour: 0,
  8921. maxHour: 23,
  8922. minMinute: 0,
  8923. maxMinute: 59,
  8924. filter: null,
  8925. formatter: null,
  8926. loading: false,
  8927. itemHeight: 44,
  8928. cancelText: "取消",
  8929. confirmText: "确认",
  8930. cancelColor: "#909193",
  8931. confirmColor: "#3c9cff",
  8932. visibleItemCount: 5,
  8933. closeOnClickOverlay: false,
  8934. defaultIndex: () => []
  8935. }
  8936. };
  8937. const Divider = {
  8938. // divider组件
  8939. divider: {
  8940. dashed: false,
  8941. hairline: true,
  8942. dot: false,
  8943. textPosition: "center",
  8944. text: "",
  8945. textSize: 14,
  8946. textColor: "#909399",
  8947. lineColor: "#dcdfe6"
  8948. }
  8949. };
  8950. const Empty = {
  8951. // empty组件
  8952. empty: {
  8953. icon: "",
  8954. text: "",
  8955. textColor: "#c0c4cc",
  8956. textSize: 14,
  8957. iconColor: "#c0c4cc",
  8958. iconSize: 90,
  8959. mode: "data",
  8960. width: 160,
  8961. height: 160,
  8962. show: true,
  8963. marginTop: 0
  8964. }
  8965. };
  8966. const Form = {
  8967. // form 组件
  8968. form: {
  8969. model: () => ({}),
  8970. rules: () => ({}),
  8971. errorType: "message",
  8972. borderBottom: true,
  8973. labelPosition: "left",
  8974. labelWidth: 45,
  8975. labelAlign: "left",
  8976. labelStyle: () => ({})
  8977. }
  8978. };
  8979. const GormItem = {
  8980. // formItem 组件
  8981. formItem: {
  8982. label: "",
  8983. prop: "",
  8984. borderBottom: "",
  8985. labelWidth: "",
  8986. rightIcon: "",
  8987. leftIcon: "",
  8988. required: false,
  8989. leftIconStyle: ""
  8990. }
  8991. };
  8992. const Gap = {
  8993. // gap组件
  8994. gap: {
  8995. bgColor: "transparent",
  8996. height: 20,
  8997. marginTop: 0,
  8998. marginBottom: 0,
  8999. customStyle: {}
  9000. }
  9001. };
  9002. const Grid = {
  9003. // grid组件
  9004. grid: {
  9005. col: 3,
  9006. border: false,
  9007. align: "left"
  9008. }
  9009. };
  9010. const GridItem = {
  9011. // grid-item组件
  9012. gridItem: {
  9013. name: null,
  9014. bgColor: "transparent"
  9015. }
  9016. };
  9017. const {
  9018. color: color$3
  9019. } = config;
  9020. const Icon = {
  9021. // icon组件
  9022. icon: {
  9023. name: "",
  9024. color: color$3["u-content-color"],
  9025. size: "16px",
  9026. bold: false,
  9027. index: "",
  9028. hoverClass: "",
  9029. customPrefix: "uicon",
  9030. label: "",
  9031. labelPos: "right",
  9032. labelSize: "15px",
  9033. labelColor: color$3["u-content-color"],
  9034. space: "3px",
  9035. imgMode: "",
  9036. width: "",
  9037. height: "",
  9038. top: 0,
  9039. stop: false
  9040. }
  9041. };
  9042. const Image = {
  9043. // image组件
  9044. image: {
  9045. src: "",
  9046. mode: "aspectFill",
  9047. width: "300",
  9048. height: "225",
  9049. shape: "square",
  9050. radius: 0,
  9051. lazyLoad: true,
  9052. showMenuByLongpress: true,
  9053. loadingIcon: "photo",
  9054. errorIcon: "error-circle",
  9055. showLoading: true,
  9056. showError: true,
  9057. fade: true,
  9058. webp: false,
  9059. duration: 500,
  9060. bgColor: "#f3f4f6"
  9061. }
  9062. };
  9063. const IndexAnchor = {
  9064. // indexAnchor 组件
  9065. indexAnchor: {
  9066. text: "",
  9067. color: "#606266",
  9068. size: 14,
  9069. bgColor: "#dedede",
  9070. height: 32
  9071. }
  9072. };
  9073. const IndexList = {
  9074. // indexList 组件
  9075. indexList: {
  9076. inactiveColor: "#606266",
  9077. activeColor: "#5677fc",
  9078. indexList: () => [],
  9079. sticky: true,
  9080. customNavHeight: 0
  9081. }
  9082. };
  9083. const Input = {
  9084. // index 组件
  9085. input: {
  9086. value: "",
  9087. type: "text",
  9088. fixed: false,
  9089. disabled: false,
  9090. disabledColor: "#f5f7fa",
  9091. clearable: false,
  9092. password: false,
  9093. maxlength: -1,
  9094. placeholder: null,
  9095. placeholderClass: "input-placeholder",
  9096. placeholderStyle: "color: #c0c4cc",
  9097. showWordLimit: false,
  9098. confirmType: "done",
  9099. confirmHold: false,
  9100. holdKeyboard: false,
  9101. focus: false,
  9102. autoBlur: false,
  9103. disableDefaultPadding: false,
  9104. cursor: -1,
  9105. cursorSpacing: 30,
  9106. selectionStart: -1,
  9107. selectionEnd: -1,
  9108. adjustPosition: true,
  9109. inputAlign: "left",
  9110. fontSize: "15px",
  9111. color: "#303133",
  9112. prefixIcon: "",
  9113. prefixIconStyle: "",
  9114. suffixIcon: "",
  9115. suffixIconStyle: "",
  9116. border: "surround",
  9117. readonly: false,
  9118. shape: "square",
  9119. formatter: null
  9120. }
  9121. };
  9122. const Keyboard = {
  9123. // 键盘组件
  9124. keyboard: {
  9125. mode: "number",
  9126. dotDisabled: false,
  9127. tooltip: true,
  9128. showTips: true,
  9129. tips: "",
  9130. showCancel: true,
  9131. showConfirm: true,
  9132. random: false,
  9133. safeAreaInsetBottom: true,
  9134. closeOnClickOverlay: true,
  9135. show: false,
  9136. overlay: true,
  9137. zIndex: 10075,
  9138. cancelText: "取消",
  9139. confirmText: "确定",
  9140. autoChange: false
  9141. }
  9142. };
  9143. const Line = {
  9144. // line组件
  9145. line: {
  9146. color: "#d6d7d9",
  9147. length: "100%",
  9148. direction: "row",
  9149. hairline: true,
  9150. margin: 0,
  9151. dashed: false
  9152. }
  9153. };
  9154. const LineProgress = {
  9155. // lineProgress 组件
  9156. lineProgress: {
  9157. activeColor: "#19be6b",
  9158. inactiveColor: "#ececec",
  9159. percentage: 0,
  9160. showText: true,
  9161. height: 12
  9162. }
  9163. };
  9164. const {
  9165. color: color$2
  9166. } = config;
  9167. const Link = {
  9168. // link超链接组件props参数
  9169. link: {
  9170. color: color$2["u-primary"],
  9171. fontSize: 15,
  9172. underLine: false,
  9173. href: "",
  9174. mpTips: "链接已复制,请在浏览器打开",
  9175. lineColor: "",
  9176. text: ""
  9177. }
  9178. };
  9179. const List = {
  9180. // list 组件
  9181. list: {
  9182. showScrollbar: false,
  9183. lowerThreshold: 50,
  9184. upperThreshold: 0,
  9185. scrollTop: 0,
  9186. offsetAccuracy: 10,
  9187. enableFlex: false,
  9188. pagingEnabled: false,
  9189. scrollable: true,
  9190. scrollIntoView: "",
  9191. scrollWithAnimation: false,
  9192. enableBackToTop: false,
  9193. height: 0,
  9194. width: 0,
  9195. preLoadScreen: 1
  9196. }
  9197. };
  9198. const ListItem = {
  9199. // listItem 组件
  9200. listItem: {
  9201. anchor: ""
  9202. }
  9203. };
  9204. const {
  9205. color: color$1
  9206. } = config;
  9207. const LoadingIcon = {
  9208. // loading-icon加载中图标组件
  9209. loadingIcon: {
  9210. show: true,
  9211. color: color$1["u-tips-color"],
  9212. textColor: color$1["u-tips-color"],
  9213. vertical: false,
  9214. mode: "spinner",
  9215. size: 24,
  9216. textSize: 15,
  9217. text: "",
  9218. timingFunction: "ease-in-out",
  9219. duration: 1200,
  9220. inactiveColor: ""
  9221. }
  9222. };
  9223. const LoadingPage = {
  9224. // loading-page组件
  9225. loadingPage: {
  9226. loadingText: "正在加载",
  9227. image: "",
  9228. loadingMode: "circle",
  9229. loading: false,
  9230. bgColor: "#ffffff",
  9231. color: "#C8C8C8",
  9232. fontSize: 19,
  9233. iconSize: 28,
  9234. loadingColor: "#C8C8C8"
  9235. }
  9236. };
  9237. const Loadmore = {
  9238. // loadmore 组件
  9239. loadmore: {
  9240. status: "loadmore",
  9241. bgColor: "transparent",
  9242. icon: true,
  9243. fontSize: 14,
  9244. iconSize: 17,
  9245. color: "#606266",
  9246. loadingIcon: "spinner",
  9247. loadmoreText: "加载更多",
  9248. loadingText: "正在加载...",
  9249. nomoreText: "没有更多了",
  9250. isDot: false,
  9251. iconColor: "#b7b7b7",
  9252. marginTop: 10,
  9253. marginBottom: 10,
  9254. height: "auto",
  9255. line: false,
  9256. lineColor: "#E6E8EB",
  9257. dashed: false
  9258. }
  9259. };
  9260. const Modal = {
  9261. // modal 组件
  9262. modal: {
  9263. show: false,
  9264. title: "",
  9265. content: "",
  9266. confirmText: "确认",
  9267. cancelText: "取消",
  9268. showConfirmButton: true,
  9269. showCancelButton: false,
  9270. confirmColor: "#2979ff",
  9271. cancelColor: "#606266",
  9272. buttonReverse: false,
  9273. zoom: true,
  9274. asyncClose: false,
  9275. closeOnClickOverlay: false,
  9276. negativeTop: 0,
  9277. width: "650rpx",
  9278. confirmButtonShape: ""
  9279. }
  9280. };
  9281. const color = {
  9282. primary: "#3c9cff",
  9283. info: "#909399",
  9284. default: "#909399",
  9285. warning: "#f9ae3d",
  9286. error: "#f56c6c",
  9287. success: "#5ac725",
  9288. mainColor: "#303133",
  9289. contentColor: "#606266",
  9290. tipsColor: "#909399",
  9291. lightColor: "#c0c4cc",
  9292. borderColor: "#e4e7ed"
  9293. };
  9294. const Navbar = {
  9295. // navbar 组件
  9296. navbar: {
  9297. safeAreaInsetTop: true,
  9298. placeholder: false,
  9299. fixed: true,
  9300. border: false,
  9301. leftIcon: "arrow-left",
  9302. leftText: "",
  9303. rightText: "",
  9304. rightIcon: "",
  9305. title: "",
  9306. bgColor: "#ffffff",
  9307. titleWidth: "400rpx",
  9308. height: "44px",
  9309. leftIconSize: 20,
  9310. leftIconColor: color.mainColor,
  9311. autoBack: false,
  9312. titleStyle: ""
  9313. }
  9314. };
  9315. const NoNetwork = {
  9316. // noNetwork
  9317. noNetwork: {
  9318. tips: "哎呀,网络信号丢失",
  9319. zIndex: "",
  9320. image: "data:image/png;base64,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"
  9321. }
  9322. };
  9323. const NoticeBar = {
  9324. // noticeBar
  9325. noticeBar: {
  9326. text: () => [],
  9327. direction: "row",
  9328. step: false,
  9329. icon: "volume",
  9330. mode: "",
  9331. color: "#f9ae3d",
  9332. bgColor: "#fdf6ec",
  9333. speed: 80,
  9334. fontSize: 14,
  9335. duration: 2e3,
  9336. disableTouch: true,
  9337. url: "",
  9338. linkType: "navigateTo"
  9339. }
  9340. };
  9341. const Notify = {
  9342. // notify组件
  9343. notify: {
  9344. top: 0,
  9345. type: "primary",
  9346. color: "#ffffff",
  9347. bgColor: "",
  9348. message: "",
  9349. duration: 3e3,
  9350. fontSize: 15,
  9351. safeAreaInsetTop: false
  9352. }
  9353. };
  9354. const NumberBox = {
  9355. // 步进器组件
  9356. numberBox: {
  9357. name: "",
  9358. value: 0,
  9359. min: 1,
  9360. max: Number.MAX_SAFE_INTEGER,
  9361. step: 1,
  9362. integer: false,
  9363. disabled: false,
  9364. disabledInput: false,
  9365. asyncChange: false,
  9366. inputWidth: 35,
  9367. showMinus: true,
  9368. showPlus: true,
  9369. decimalLength: null,
  9370. longPress: true,
  9371. color: "#323233",
  9372. buttonSize: 30,
  9373. bgColor: "#EBECEE",
  9374. cursorSpacing: 100,
  9375. disableMinus: false,
  9376. disablePlus: false,
  9377. iconStyle: ""
  9378. }
  9379. };
  9380. const NumberKeyboard = {
  9381. // 数字键盘
  9382. numberKeyboard: {
  9383. mode: "number",
  9384. dotDisabled: false,
  9385. random: false
  9386. }
  9387. };
  9388. const Overlay = {
  9389. // overlay组件
  9390. overlay: {
  9391. show: false,
  9392. zIndex: 10070,
  9393. duration: 300,
  9394. opacity: 0.5
  9395. }
  9396. };
  9397. const Parse = {
  9398. // parse
  9399. parse: {
  9400. copyLink: true,
  9401. errorImg: "",
  9402. lazyLoad: false,
  9403. loadingImg: "",
  9404. pauseVideo: true,
  9405. previewImg: true,
  9406. setTitle: true,
  9407. showImgMenu: true
  9408. }
  9409. };
  9410. const Picker = {
  9411. // picker
  9412. picker: {
  9413. show: false,
  9414. popupMode: "bottom",
  9415. showToolbar: true,
  9416. title: "",
  9417. columns: () => [],
  9418. loading: false,
  9419. itemHeight: 44,
  9420. cancelText: "取消",
  9421. confirmText: "确定",
  9422. cancelColor: "#909193",
  9423. confirmColor: "#3c9cff",
  9424. visibleItemCount: 5,
  9425. keyName: "text",
  9426. closeOnClickOverlay: false,
  9427. defaultIndex: () => [],
  9428. immediateChange: false
  9429. }
  9430. };
  9431. const Popup = {
  9432. // popup组件
  9433. popup: {
  9434. show: false,
  9435. overlay: true,
  9436. mode: "bottom",
  9437. duration: 300,
  9438. closeable: false,
  9439. overlayStyle: () => {
  9440. },
  9441. closeOnClickOverlay: true,
  9442. zIndex: 10075,
  9443. safeAreaInsetBottom: true,
  9444. safeAreaInsetTop: false,
  9445. closeIconPos: "top-right",
  9446. round: 0,
  9447. zoom: true,
  9448. bgColor: "",
  9449. overlayOpacity: 0.5
  9450. }
  9451. };
  9452. const Radio = {
  9453. // radio组件
  9454. radio: {
  9455. name: "",
  9456. shape: "",
  9457. disabled: "",
  9458. labelDisabled: "",
  9459. activeColor: "",
  9460. inactiveColor: "",
  9461. iconSize: "",
  9462. labelSize: "",
  9463. label: "",
  9464. labelColor: "",
  9465. size: "",
  9466. iconColor: "",
  9467. placement: ""
  9468. }
  9469. };
  9470. const RadioGroup = {
  9471. // radio-group组件
  9472. radioGroup: {
  9473. value: "",
  9474. disabled: false,
  9475. shape: "circle",
  9476. activeColor: "#2979ff",
  9477. inactiveColor: "#c8c9cc",
  9478. name: "",
  9479. size: 18,
  9480. placement: "row",
  9481. label: "",
  9482. labelColor: "#303133",
  9483. labelSize: 14,
  9484. labelDisabled: false,
  9485. iconColor: "#ffffff",
  9486. iconSize: 12,
  9487. borderBottom: false,
  9488. iconPlacement: "left"
  9489. }
  9490. };
  9491. const Rate = {
  9492. // rate组件
  9493. rate: {
  9494. value: 1,
  9495. count: 5,
  9496. disabled: false,
  9497. size: 18,
  9498. inactiveColor: "#b2b2b2",
  9499. activeColor: "#FA3534",
  9500. gutter: 4,
  9501. minCount: 1,
  9502. allowHalf: false,
  9503. activeIcon: "star-fill",
  9504. inactiveIcon: "star",
  9505. touchable: true
  9506. }
  9507. };
  9508. const ReadMore = {
  9509. // readMore
  9510. readMore: {
  9511. showHeight: 400,
  9512. toggle: false,
  9513. closeText: "展开阅读全文",
  9514. openText: "收起",
  9515. color: "#2979ff",
  9516. fontSize: 14,
  9517. textIndent: "2em",
  9518. name: ""
  9519. }
  9520. };
  9521. const Row = {
  9522. // row
  9523. row: {
  9524. gutter: 0,
  9525. justify: "start",
  9526. align: "center"
  9527. }
  9528. };
  9529. const RowNotice = {
  9530. // rowNotice
  9531. rowNotice: {
  9532. text: "",
  9533. icon: "volume",
  9534. mode: "",
  9535. color: "#f9ae3d",
  9536. bgColor: "#fdf6ec",
  9537. fontSize: 14,
  9538. speed: 80
  9539. }
  9540. };
  9541. const ScrollList = {
  9542. // scrollList
  9543. scrollList: {
  9544. indicatorWidth: 50,
  9545. indicatorBarWidth: 20,
  9546. indicator: true,
  9547. indicatorColor: "#f2f2f2",
  9548. indicatorActiveColor: "#3c9cff",
  9549. indicatorStyle: ""
  9550. }
  9551. };
  9552. const Search = {
  9553. // search
  9554. search: {
  9555. shape: "round",
  9556. bgColor: "#f2f2f2",
  9557. placeholder: "请输入关键字",
  9558. clearabled: true,
  9559. focus: false,
  9560. showAction: true,
  9561. actionStyle: () => ({}),
  9562. actionText: "搜索",
  9563. inputAlign: "left",
  9564. inputStyle: () => ({}),
  9565. disabled: false,
  9566. borderColor: "transparent",
  9567. searchIconColor: "#909399",
  9568. searchIconSize: 22,
  9569. color: "#606266",
  9570. placeholderColor: "#909399",
  9571. searchIcon: "search",
  9572. margin: "0",
  9573. animation: false,
  9574. value: "",
  9575. maxlength: "-1",
  9576. height: 32,
  9577. label: null
  9578. }
  9579. };
  9580. const Section = {
  9581. // u-section组件
  9582. section: {
  9583. title: "",
  9584. subTitle: "更多",
  9585. right: true,
  9586. fontSize: 15,
  9587. bold: true,
  9588. color: "#303133",
  9589. subColor: "#909399",
  9590. showLine: true,
  9591. lineColor: "",
  9592. arrow: true
  9593. }
  9594. };
  9595. const Skeleton = {
  9596. // skeleton
  9597. skeleton: {
  9598. loading: true,
  9599. animate: true,
  9600. rows: 0,
  9601. rowsWidth: "100%",
  9602. rowsHeight: 18,
  9603. title: true,
  9604. titleWidth: "50%",
  9605. titleHeight: 18,
  9606. avatar: false,
  9607. avatarSize: 32,
  9608. avatarShape: "circle"
  9609. }
  9610. };
  9611. const Slider = {
  9612. // slider组件
  9613. slider: {
  9614. value: 0,
  9615. blockSize: 18,
  9616. min: 0,
  9617. max: 100,
  9618. step: 1,
  9619. activeColor: "#2979ff",
  9620. inactiveColor: "#c0c4cc",
  9621. blockColor: "#ffffff",
  9622. showValue: false,
  9623. disabled: false,
  9624. blockStyle: () => {
  9625. }
  9626. }
  9627. };
  9628. const StatusBar = {
  9629. // statusBar
  9630. statusBar: {
  9631. bgColor: "transparent"
  9632. }
  9633. };
  9634. const Steps = {
  9635. // steps组件
  9636. steps: {
  9637. direction: "row",
  9638. current: 0,
  9639. activeColor: "#3c9cff",
  9640. inactiveColor: "#969799",
  9641. activeIcon: "",
  9642. inactiveIcon: "",
  9643. dot: false
  9644. }
  9645. };
  9646. const StepsItem = {
  9647. // steps-item组件
  9648. stepsItem: {
  9649. title: "",
  9650. desc: "",
  9651. iconSize: 17,
  9652. error: false
  9653. }
  9654. };
  9655. const Sticky = {
  9656. // sticky组件
  9657. sticky: {
  9658. offsetTop: 0,
  9659. customNavHeight: 0,
  9660. disabled: false,
  9661. bgColor: "transparent",
  9662. zIndex: "",
  9663. index: ""
  9664. }
  9665. };
  9666. const Subsection = {
  9667. // subsection组件
  9668. subsection: {
  9669. list: [],
  9670. current: 0,
  9671. activeColor: "#3c9cff",
  9672. inactiveColor: "#303133",
  9673. mode: "button",
  9674. fontSize: 12,
  9675. bold: true,
  9676. bgColor: "#eeeeef",
  9677. keyName: "name"
  9678. }
  9679. };
  9680. const SwipeAction = {
  9681. // swipe-action组件
  9682. swipeAction: {
  9683. autoClose: true
  9684. }
  9685. };
  9686. const SwipeActionItem = {
  9687. // swipeActionItem 组件
  9688. swipeActionItem: {
  9689. show: false,
  9690. name: "",
  9691. disabled: false,
  9692. threshold: 20,
  9693. autoClose: true,
  9694. options: [],
  9695. duration: 300
  9696. }
  9697. };
  9698. const Swiper = {
  9699. // swiper 组件
  9700. swiper: {
  9701. list: () => [],
  9702. indicator: false,
  9703. indicatorActiveColor: "#FFFFFF",
  9704. indicatorInactiveColor: "rgba(255, 255, 255, 0.35)",
  9705. indicatorStyle: "",
  9706. indicatorMode: "line",
  9707. autoplay: true,
  9708. current: 0,
  9709. currentItemId: "",
  9710. interval: 3e3,
  9711. duration: 300,
  9712. circular: false,
  9713. previousMargin: 0,
  9714. nextMargin: 0,
  9715. acceleration: false,
  9716. displayMultipleItems: 1,
  9717. easingFunction: "default",
  9718. keyName: "url",
  9719. imgMode: "aspectFill",
  9720. height: 130,
  9721. bgColor: "#f3f4f6",
  9722. radius: 4,
  9723. loading: false,
  9724. showTitle: false
  9725. }
  9726. };
  9727. const SwipterIndicator = {
  9728. // swiperIndicator 组件
  9729. swiperIndicator: {
  9730. length: 0,
  9731. current: 0,
  9732. indicatorActiveColor: "",
  9733. indicatorInactiveColor: "",
  9734. indicatorMode: "line"
  9735. }
  9736. };
  9737. const Switch = {
  9738. // switch
  9739. switch: {
  9740. loading: false,
  9741. disabled: false,
  9742. size: 25,
  9743. activeColor: "#2979ff",
  9744. inactiveColor: "#ffffff",
  9745. value: false,
  9746. activeValue: true,
  9747. inactiveValue: false,
  9748. asyncChange: false,
  9749. space: 0
  9750. }
  9751. };
  9752. const Tabbar = {
  9753. // tabbar
  9754. tabbar: {
  9755. value: null,
  9756. safeAreaInsetBottom: true,
  9757. border: true,
  9758. zIndex: 1,
  9759. activeColor: "#1989fa",
  9760. inactiveColor: "#7d7e80",
  9761. fixed: true,
  9762. placeholder: true
  9763. }
  9764. };
  9765. const TabbarItem = {
  9766. //
  9767. tabbarItem: {
  9768. name: null,
  9769. icon: "",
  9770. badge: null,
  9771. dot: false,
  9772. text: "",
  9773. badgeStyle: "top: 6px;right:2px;"
  9774. }
  9775. };
  9776. const Tabs = {
  9777. //
  9778. tabs: {
  9779. duration: 300,
  9780. list: () => [],
  9781. lineColor: "#3c9cff",
  9782. activeStyle: () => ({
  9783. color: "#303133"
  9784. }),
  9785. inactiveStyle: () => ({
  9786. color: "#606266"
  9787. }),
  9788. lineWidth: 20,
  9789. lineHeight: 3,
  9790. lineBgSize: "cover",
  9791. itemStyle: () => ({
  9792. height: "44px"
  9793. }),
  9794. scrollable: true,
  9795. current: 0,
  9796. keyName: "name"
  9797. }
  9798. };
  9799. const Tag = {
  9800. // tag 组件
  9801. tag: {
  9802. type: "primary",
  9803. disabled: false,
  9804. size: "medium",
  9805. shape: "square",
  9806. text: "",
  9807. bgColor: "",
  9808. color: "",
  9809. borderColor: "",
  9810. closeColor: "#C6C7CB",
  9811. name: "",
  9812. plainFill: false,
  9813. plain: false,
  9814. closable: false,
  9815. show: true,
  9816. icon: ""
  9817. }
  9818. };
  9819. const Text = {
  9820. // text 组件
  9821. text: {
  9822. type: "",
  9823. show: true,
  9824. text: "",
  9825. prefixIcon: "",
  9826. suffixIcon: "",
  9827. mode: "",
  9828. href: "",
  9829. format: "",
  9830. call: false,
  9831. openType: "",
  9832. bold: false,
  9833. block: false,
  9834. lines: "",
  9835. color: "#303133",
  9836. size: 15,
  9837. iconStyle: () => ({
  9838. fontSize: "15px"
  9839. }),
  9840. decoration: "none",
  9841. margin: 0,
  9842. lineHeight: "",
  9843. align: "left",
  9844. wordWrap: "normal"
  9845. }
  9846. };
  9847. const Textarea = {
  9848. // textarea 组件
  9849. textarea: {
  9850. value: "",
  9851. placeholder: "",
  9852. placeholderClass: "textarea-placeholder",
  9853. placeholderStyle: "color: #c0c4cc",
  9854. height: 70,
  9855. confirmType: "done",
  9856. disabled: false,
  9857. count: false,
  9858. focus: false,
  9859. autoHeight: false,
  9860. fixed: false,
  9861. cursorSpacing: 0,
  9862. cursor: "",
  9863. showConfirmBar: true,
  9864. selectionStart: -1,
  9865. selectionEnd: -1,
  9866. adjustPosition: true,
  9867. disableDefaultPadding: false,
  9868. holdKeyboard: false,
  9869. maxlength: 140,
  9870. border: "surround",
  9871. formatter: null
  9872. }
  9873. };
  9874. const Toast = {
  9875. // toast组件
  9876. toast: {
  9877. zIndex: 10090,
  9878. loading: false,
  9879. text: "",
  9880. icon: "",
  9881. type: "",
  9882. loadingMode: "",
  9883. show: "",
  9884. overlay: false,
  9885. position: "center",
  9886. params: () => {
  9887. },
  9888. duration: 2e3,
  9889. isTab: false,
  9890. url: "",
  9891. callback: null,
  9892. back: false
  9893. }
  9894. };
  9895. const Toolbar = {
  9896. // toolbar 组件
  9897. toolbar: {
  9898. show: true,
  9899. cancelText: "取消",
  9900. confirmText: "确认",
  9901. cancelColor: "#909193",
  9902. confirmColor: "#3c9cff",
  9903. title: ""
  9904. }
  9905. };
  9906. const Tooltip = {
  9907. // tooltip 组件
  9908. tooltip: {
  9909. text: "",
  9910. copyText: "",
  9911. size: 14,
  9912. color: "#606266",
  9913. bgColor: "transparent",
  9914. direction: "top",
  9915. zIndex: 10071,
  9916. showCopy: true,
  9917. buttons: () => [],
  9918. overlay: true,
  9919. showToast: true
  9920. }
  9921. };
  9922. const Transition = {
  9923. // transition动画组件的props
  9924. transition: {
  9925. show: false,
  9926. mode: "fade",
  9927. duration: "300",
  9928. timingFunction: "ease-out"
  9929. }
  9930. };
  9931. const Upload = {
  9932. // upload组件
  9933. upload: {
  9934. accept: "image",
  9935. capture: () => ["album", "camera"],
  9936. compressed: true,
  9937. camera: "back",
  9938. maxDuration: 60,
  9939. uploadIcon: "camera-fill",
  9940. uploadIconColor: "#D3D4D6",
  9941. useBeforeRead: false,
  9942. previewFullImage: true,
  9943. maxCount: 52,
  9944. disabled: false,
  9945. imageMode: "aspectFill",
  9946. name: "",
  9947. sizeType: () => ["original", "compressed"],
  9948. multiple: false,
  9949. deletable: true,
  9950. maxSize: Number.MAX_VALUE,
  9951. fileList: () => [],
  9952. uploadText: "",
  9953. width: 80,
  9954. height: 80,
  9955. previewImage: true
  9956. }
  9957. };
  9958. const defprops = {
  9959. ...ActionSheet,
  9960. ...Album,
  9961. ...Alert,
  9962. ...Avatar,
  9963. ...AvatarGroup,
  9964. ...Backtop,
  9965. ...Badge,
  9966. ...Button,
  9967. ...Calendar,
  9968. ...CarKeyboard,
  9969. ...Cell,
  9970. ...CellGroup,
  9971. ...Checkbox,
  9972. ...CheckboxGroup,
  9973. ...CircleProgress,
  9974. ...Code,
  9975. ...CodeInput,
  9976. ...Col,
  9977. ...Collapse,
  9978. ...CollapseItem,
  9979. ...ColumnNotice,
  9980. ...CountDown,
  9981. ...CountTo,
  9982. ...DatetimePicker,
  9983. ...Divider,
  9984. ...Empty,
  9985. ...Form,
  9986. ...GormItem,
  9987. ...Gap,
  9988. ...Grid,
  9989. ...GridItem,
  9990. ...Icon,
  9991. ...Image,
  9992. ...IndexAnchor,
  9993. ...IndexList,
  9994. ...Input,
  9995. ...Keyboard,
  9996. ...Line,
  9997. ...LineProgress,
  9998. ...Link,
  9999. ...List,
  10000. ...ListItem,
  10001. ...LoadingIcon,
  10002. ...LoadingPage,
  10003. ...Loadmore,
  10004. ...Modal,
  10005. ...Navbar,
  10006. ...NoNetwork,
  10007. ...NoticeBar,
  10008. ...Notify,
  10009. ...NumberBox,
  10010. ...NumberKeyboard,
  10011. ...Overlay,
  10012. ...Parse,
  10013. ...Picker,
  10014. ...Popup,
  10015. ...Radio,
  10016. ...RadioGroup,
  10017. ...Rate,
  10018. ...ReadMore,
  10019. ...Row,
  10020. ...RowNotice,
  10021. ...ScrollList,
  10022. ...Search,
  10023. ...Section,
  10024. ...Skeleton,
  10025. ...Slider,
  10026. ...StatusBar,
  10027. ...Steps,
  10028. ...StepsItem,
  10029. ...Sticky,
  10030. ...Subsection,
  10031. ...SwipeAction,
  10032. ...SwipeActionItem,
  10033. ...Swiper,
  10034. ...SwipterIndicator,
  10035. ...Switch,
  10036. ...Tabbar,
  10037. ...TabbarItem,
  10038. ...Tabs,
  10039. ...Tag,
  10040. ...Text,
  10041. ...Textarea,
  10042. ...Toast,
  10043. ...Toolbar,
  10044. ...Tooltip,
  10045. ...Transition,
  10046. ...Upload
  10047. };
  10048. const zIndex = {
  10049. toast: 10090,
  10050. noNetwork: 10080,
  10051. // popup包含popup,actionsheet,keyboard,picker的值
  10052. popup: 10075,
  10053. mask: 10070,
  10054. navbar: 980,
  10055. topTips: 975,
  10056. sticky: 970,
  10057. indexListSticky: 965
  10058. };
  10059. let platform = "none";
  10060. platform = "vue3";
  10061. platform = "mp";
  10062. platform = "weixin";
  10063. const platform$1 = platform;
  10064. const $u = {
  10065. route,
  10066. date: index.timeFormat,
  10067. // 另名date
  10068. colorGradient: colorGradient$1.colorGradient,
  10069. hexToRgb: colorGradient$1.hexToRgb,
  10070. rgbToHex: colorGradient$1.rgbToHex,
  10071. colorToRgba: colorGradient$1.colorToRgba,
  10072. test,
  10073. type: ["primary", "success", "error", "warning", "info"],
  10074. http: new Request(),
  10075. config,
  10076. // uView配置信息相关,比如版本号
  10077. zIndex,
  10078. debounce,
  10079. throttle,
  10080. mixin,
  10081. mpMixin,
  10082. props: defprops,
  10083. ...index,
  10084. color,
  10085. platform: platform$1
  10086. };
  10087. index$1.$u = $u;
  10088. const install = (Vue) => {
  10089. Vue.config.globalProperties.$u = $u;
  10090. Vue.config.globalProperties.$nextTick = (cb) => {
  10091. cb();
  10092. };
  10093. Vue.mixin(mixin);
  10094. };
  10095. const uviewPlus = {
  10096. install
  10097. };
  10098. const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
  10099. !isInSSRComponentSetup && injectHook(lifecycle, hook, target);
  10100. };
  10101. const onShow = /* @__PURE__ */ createHook(ON_SHOW);
  10102. const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
  10103. const onPullDownRefresh = /* @__PURE__ */ createHook(ON_PULL_DOWN_REFRESH);
  10104. //! moment.js
  10105. //! version : 2.30.1
  10106. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  10107. //! license : MIT
  10108. //! momentjs.com
  10109. var hookCallback;
  10110. function hooks() {
  10111. return hookCallback.apply(null, arguments);
  10112. }
  10113. function setHookCallback(callback) {
  10114. hookCallback = callback;
  10115. }
  10116. function isArray(input) {
  10117. return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]";
  10118. }
  10119. function isObject(input) {
  10120. return input != null && Object.prototype.toString.call(input) === "[object Object]";
  10121. }
  10122. function hasOwnProp(a, b) {
  10123. return Object.prototype.hasOwnProperty.call(a, b);
  10124. }
  10125. function isObjectEmpty(obj) {
  10126. if (Object.getOwnPropertyNames) {
  10127. return Object.getOwnPropertyNames(obj).length === 0;
  10128. } else {
  10129. var k;
  10130. for (k in obj) {
  10131. if (hasOwnProp(obj, k)) {
  10132. return false;
  10133. }
  10134. }
  10135. return true;
  10136. }
  10137. }
  10138. function isUndefined(input) {
  10139. return input === void 0;
  10140. }
  10141. function isNumber(input) {
  10142. return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]";
  10143. }
  10144. function isDate(input) {
  10145. return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
  10146. }
  10147. function map(arr, fn) {
  10148. var res = [], i, arrLen = arr.length;
  10149. for (i = 0; i < arrLen; ++i) {
  10150. res.push(fn(arr[i], i));
  10151. }
  10152. return res;
  10153. }
  10154. function extend(a, b) {
  10155. for (var i in b) {
  10156. if (hasOwnProp(b, i)) {
  10157. a[i] = b[i];
  10158. }
  10159. }
  10160. if (hasOwnProp(b, "toString")) {
  10161. a.toString = b.toString;
  10162. }
  10163. if (hasOwnProp(b, "valueOf")) {
  10164. a.valueOf = b.valueOf;
  10165. }
  10166. return a;
  10167. }
  10168. function createUTC(input, format2, locale2, strict) {
  10169. return createLocalOrUTC(input, format2, locale2, strict, true).utc();
  10170. }
  10171. function defaultParsingFlags() {
  10172. return {
  10173. empty: false,
  10174. unusedTokens: [],
  10175. unusedInput: [],
  10176. overflow: -2,
  10177. charsLeftOver: 0,
  10178. nullInput: false,
  10179. invalidEra: null,
  10180. invalidMonth: null,
  10181. invalidFormat: false,
  10182. userInvalidated: false,
  10183. iso: false,
  10184. parsedDateParts: [],
  10185. era: null,
  10186. meridiem: null,
  10187. rfc2822: false,
  10188. weekdayMismatch: false
  10189. };
  10190. }
  10191. function getParsingFlags(m) {
  10192. if (m._pf == null) {
  10193. m._pf = defaultParsingFlags();
  10194. }
  10195. return m._pf;
  10196. }
  10197. var some;
  10198. if (Array.prototype.some) {
  10199. some = Array.prototype.some;
  10200. } else {
  10201. some = function(fun) {
  10202. var t2 = Object(this), len = t2.length >>> 0, i;
  10203. for (i = 0; i < len; i++) {
  10204. if (i in t2 && fun.call(this, t2[i], i, t2)) {
  10205. return true;
  10206. }
  10207. }
  10208. return false;
  10209. };
  10210. }
  10211. function isValid(m) {
  10212. var flags = null, parsedParts = false, isNowValid = m._d && !isNaN(m._d.getTime());
  10213. if (isNowValid) {
  10214. flags = getParsingFlags(m);
  10215. parsedParts = some.call(flags.parsedDateParts, function(i) {
  10216. return i != null;
  10217. });
  10218. isNowValid = flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
  10219. if (m._strict) {
  10220. isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0;
  10221. }
  10222. }
  10223. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  10224. m._isValid = isNowValid;
  10225. } else {
  10226. return isNowValid;
  10227. }
  10228. return m._isValid;
  10229. }
  10230. function createInvalid(flags) {
  10231. var m = createUTC(NaN);
  10232. if (flags != null) {
  10233. extend(getParsingFlags(m), flags);
  10234. } else {
  10235. getParsingFlags(m).userInvalidated = true;
  10236. }
  10237. return m;
  10238. }
  10239. var momentProperties = hooks.momentProperties = [], updateInProgress = false;
  10240. function copyConfig(to2, from2) {
  10241. var i, prop, val, momentPropertiesLen = momentProperties.length;
  10242. if (!isUndefined(from2._isAMomentObject)) {
  10243. to2._isAMomentObject = from2._isAMomentObject;
  10244. }
  10245. if (!isUndefined(from2._i)) {
  10246. to2._i = from2._i;
  10247. }
  10248. if (!isUndefined(from2._f)) {
  10249. to2._f = from2._f;
  10250. }
  10251. if (!isUndefined(from2._l)) {
  10252. to2._l = from2._l;
  10253. }
  10254. if (!isUndefined(from2._strict)) {
  10255. to2._strict = from2._strict;
  10256. }
  10257. if (!isUndefined(from2._tzm)) {
  10258. to2._tzm = from2._tzm;
  10259. }
  10260. if (!isUndefined(from2._isUTC)) {
  10261. to2._isUTC = from2._isUTC;
  10262. }
  10263. if (!isUndefined(from2._offset)) {
  10264. to2._offset = from2._offset;
  10265. }
  10266. if (!isUndefined(from2._pf)) {
  10267. to2._pf = getParsingFlags(from2);
  10268. }
  10269. if (!isUndefined(from2._locale)) {
  10270. to2._locale = from2._locale;
  10271. }
  10272. if (momentPropertiesLen > 0) {
  10273. for (i = 0; i < momentPropertiesLen; i++) {
  10274. prop = momentProperties[i];
  10275. val = from2[prop];
  10276. if (!isUndefined(val)) {
  10277. to2[prop] = val;
  10278. }
  10279. }
  10280. }
  10281. return to2;
  10282. }
  10283. function Moment(config2) {
  10284. copyConfig(this, config2);
  10285. this._d = new Date(config2._d != null ? config2._d.getTime() : NaN);
  10286. if (!this.isValid()) {
  10287. this._d = /* @__PURE__ */ new Date(NaN);
  10288. }
  10289. if (updateInProgress === false) {
  10290. updateInProgress = true;
  10291. hooks.updateOffset(this);
  10292. updateInProgress = false;
  10293. }
  10294. }
  10295. function isMoment(obj) {
  10296. return obj instanceof Moment || obj != null && obj._isAMomentObject != null;
  10297. }
  10298. function warn(msg) {
  10299. if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) {
  10300. console.warn("Deprecation warning: " + msg);
  10301. }
  10302. }
  10303. function deprecate(msg, fn) {
  10304. var firstTime = true;
  10305. return extend(function() {
  10306. if (hooks.deprecationHandler != null) {
  10307. hooks.deprecationHandler(null, msg);
  10308. }
  10309. if (firstTime) {
  10310. var args = [], arg, i, key, argLen = arguments.length;
  10311. for (i = 0; i < argLen; i++) {
  10312. arg = "";
  10313. if (typeof arguments[i] === "object") {
  10314. arg += "\n[" + i + "] ";
  10315. for (key in arguments[0]) {
  10316. if (hasOwnProp(arguments[0], key)) {
  10317. arg += key + ": " + arguments[0][key] + ", ";
  10318. }
  10319. }
  10320. arg = arg.slice(0, -2);
  10321. } else {
  10322. arg = arguments[i];
  10323. }
  10324. args.push(arg);
  10325. }
  10326. warn(
  10327. msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + new Error().stack
  10328. );
  10329. firstTime = false;
  10330. }
  10331. return fn.apply(this, arguments);
  10332. }, fn);
  10333. }
  10334. var deprecations = {};
  10335. function deprecateSimple(name, msg) {
  10336. if (hooks.deprecationHandler != null) {
  10337. hooks.deprecationHandler(name, msg);
  10338. }
  10339. if (!deprecations[name]) {
  10340. warn(msg);
  10341. deprecations[name] = true;
  10342. }
  10343. }
  10344. hooks.suppressDeprecationWarnings = false;
  10345. hooks.deprecationHandler = null;
  10346. function isFunction(input) {
  10347. return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]";
  10348. }
  10349. function set(config2) {
  10350. var prop, i;
  10351. for (i in config2) {
  10352. if (hasOwnProp(config2, i)) {
  10353. prop = config2[i];
  10354. if (isFunction(prop)) {
  10355. this[i] = prop;
  10356. } else {
  10357. this["_" + i] = prop;
  10358. }
  10359. }
  10360. }
  10361. this._config = config2;
  10362. this._dayOfMonthOrdinalParseLenient = new RegExp(
  10363. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
  10364. );
  10365. }
  10366. function mergeConfigs(parentConfig, childConfig) {
  10367. var res = extend({}, parentConfig), prop;
  10368. for (prop in childConfig) {
  10369. if (hasOwnProp(childConfig, prop)) {
  10370. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  10371. res[prop] = {};
  10372. extend(res[prop], parentConfig[prop]);
  10373. extend(res[prop], childConfig[prop]);
  10374. } else if (childConfig[prop] != null) {
  10375. res[prop] = childConfig[prop];
  10376. } else {
  10377. delete res[prop];
  10378. }
  10379. }
  10380. }
  10381. for (prop in parentConfig) {
  10382. if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {
  10383. res[prop] = extend({}, res[prop]);
  10384. }
  10385. }
  10386. return res;
  10387. }
  10388. function Locale(config2) {
  10389. if (config2 != null) {
  10390. this.set(config2);
  10391. }
  10392. }
  10393. var keys;
  10394. if (Object.keys) {
  10395. keys = Object.keys;
  10396. } else {
  10397. keys = function(obj) {
  10398. var i, res = [];
  10399. for (i in obj) {
  10400. if (hasOwnProp(obj, i)) {
  10401. res.push(i);
  10402. }
  10403. }
  10404. return res;
  10405. };
  10406. }
  10407. var defaultCalendar = {
  10408. sameDay: "[Today at] LT",
  10409. nextDay: "[Tomorrow at] LT",
  10410. nextWeek: "dddd [at] LT",
  10411. lastDay: "[Yesterday at] LT",
  10412. lastWeek: "[Last] dddd [at] LT",
  10413. sameElse: "L"
  10414. };
  10415. function calendar(key, mom, now2) {
  10416. var output = this._calendar[key] || this._calendar["sameElse"];
  10417. return isFunction(output) ? output.call(mom, now2) : output;
  10418. }
  10419. function zeroFill(number3, targetLength, forceSign) {
  10420. var absNumber = "" + Math.abs(number3), zerosToFill = targetLength - absNumber.length, sign2 = number3 >= 0;
  10421. return (sign2 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
  10422. }
  10423. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {};
  10424. function addFormatToken(token2, padded, ordinal2, callback) {
  10425. var func2 = callback;
  10426. if (typeof callback === "string") {
  10427. func2 = function() {
  10428. return this[callback]();
  10429. };
  10430. }
  10431. if (token2) {
  10432. formatTokenFunctions[token2] = func2;
  10433. }
  10434. if (padded) {
  10435. formatTokenFunctions[padded[0]] = function() {
  10436. return zeroFill(func2.apply(this, arguments), padded[1], padded[2]);
  10437. };
  10438. }
  10439. if (ordinal2) {
  10440. formatTokenFunctions[ordinal2] = function() {
  10441. return this.localeData().ordinal(
  10442. func2.apply(this, arguments),
  10443. token2
  10444. );
  10445. };
  10446. }
  10447. }
  10448. function removeFormattingTokens(input) {
  10449. if (input.match(/\[[\s\S]/)) {
  10450. return input.replace(/^\[|\]$/g, "");
  10451. }
  10452. return input.replace(/\\/g, "");
  10453. }
  10454. function makeFormatFunction(format2) {
  10455. var array3 = format2.match(formattingTokens), i, length;
  10456. for (i = 0, length = array3.length; i < length; i++) {
  10457. if (formatTokenFunctions[array3[i]]) {
  10458. array3[i] = formatTokenFunctions[array3[i]];
  10459. } else {
  10460. array3[i] = removeFormattingTokens(array3[i]);
  10461. }
  10462. }
  10463. return function(mom) {
  10464. var output = "", i2;
  10465. for (i2 = 0; i2 < length; i2++) {
  10466. output += isFunction(array3[i2]) ? array3[i2].call(mom, format2) : array3[i2];
  10467. }
  10468. return output;
  10469. };
  10470. }
  10471. function formatMoment(m, format2) {
  10472. if (!m.isValid()) {
  10473. return m.localeData().invalidDate();
  10474. }
  10475. format2 = expandFormat(format2, m.localeData());
  10476. formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2);
  10477. return formatFunctions[format2](m);
  10478. }
  10479. function expandFormat(format2, locale2) {
  10480. var i = 5;
  10481. function replaceLongDateFormatTokens(input) {
  10482. return locale2.longDateFormat(input) || input;
  10483. }
  10484. localFormattingTokens.lastIndex = 0;
  10485. while (i >= 0 && localFormattingTokens.test(format2)) {
  10486. format2 = format2.replace(
  10487. localFormattingTokens,
  10488. replaceLongDateFormatTokens
  10489. );
  10490. localFormattingTokens.lastIndex = 0;
  10491. i -= 1;
  10492. }
  10493. return format2;
  10494. }
  10495. var defaultLongDateFormat = {
  10496. LTS: "h:mm:ss A",
  10497. LT: "h:mm A",
  10498. L: "MM/DD/YYYY",
  10499. LL: "MMMM D, YYYY",
  10500. LLL: "MMMM D, YYYY h:mm A",
  10501. LLLL: "dddd, MMMM D, YYYY h:mm A"
  10502. };
  10503. function longDateFormat(key) {
  10504. var format2 = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()];
  10505. if (format2 || !formatUpper) {
  10506. return format2;
  10507. }
  10508. this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function(tok) {
  10509. if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") {
  10510. return tok.slice(1);
  10511. }
  10512. return tok;
  10513. }).join("");
  10514. return this._longDateFormat[key];
  10515. }
  10516. var defaultInvalidDate = "Invalid date";
  10517. function invalidDate() {
  10518. return this._invalidDate;
  10519. }
  10520. var defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  10521. function ordinal(number3) {
  10522. return this._ordinal.replace("%d", number3);
  10523. }
  10524. var defaultRelativeTime = {
  10525. future: "in %s",
  10526. past: "%s ago",
  10527. s: "a few seconds",
  10528. ss: "%d seconds",
  10529. m: "a minute",
  10530. mm: "%d minutes",
  10531. h: "an hour",
  10532. hh: "%d hours",
  10533. d: "a day",
  10534. dd: "%d days",
  10535. w: "a week",
  10536. ww: "%d weeks",
  10537. M: "a month",
  10538. MM: "%d months",
  10539. y: "a year",
  10540. yy: "%d years"
  10541. };
  10542. function relativeTime(number3, withoutSuffix, string2, isFuture) {
  10543. var output = this._relativeTime[string2];
  10544. return isFunction(output) ? output(number3, withoutSuffix, string2, isFuture) : output.replace(/%d/i, number3);
  10545. }
  10546. function pastFuture(diff2, output) {
  10547. var format2 = this._relativeTime[diff2 > 0 ? "future" : "past"];
  10548. return isFunction(format2) ? format2(output) : format2.replace(/%s/i, output);
  10549. }
  10550. var aliases = {
  10551. D: "date",
  10552. dates: "date",
  10553. date: "date",
  10554. d: "day",
  10555. days: "day",
  10556. day: "day",
  10557. e: "weekday",
  10558. weekdays: "weekday",
  10559. weekday: "weekday",
  10560. E: "isoWeekday",
  10561. isoweekdays: "isoWeekday",
  10562. isoweekday: "isoWeekday",
  10563. DDD: "dayOfYear",
  10564. dayofyears: "dayOfYear",
  10565. dayofyear: "dayOfYear",
  10566. h: "hour",
  10567. hours: "hour",
  10568. hour: "hour",
  10569. ms: "millisecond",
  10570. milliseconds: "millisecond",
  10571. millisecond: "millisecond",
  10572. m: "minute",
  10573. minutes: "minute",
  10574. minute: "minute",
  10575. M: "month",
  10576. months: "month",
  10577. month: "month",
  10578. Q: "quarter",
  10579. quarters: "quarter",
  10580. quarter: "quarter",
  10581. s: "second",
  10582. seconds: "second",
  10583. second: "second",
  10584. gg: "weekYear",
  10585. weekyears: "weekYear",
  10586. weekyear: "weekYear",
  10587. GG: "isoWeekYear",
  10588. isoweekyears: "isoWeekYear",
  10589. isoweekyear: "isoWeekYear",
  10590. w: "week",
  10591. weeks: "week",
  10592. week: "week",
  10593. W: "isoWeek",
  10594. isoweeks: "isoWeek",
  10595. isoweek: "isoWeek",
  10596. y: "year",
  10597. years: "year",
  10598. year: "year"
  10599. };
  10600. function normalizeUnits(units) {
  10601. return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0;
  10602. }
  10603. function normalizeObjectUnits(inputObject) {
  10604. var normalizedInput = {}, normalizedProp, prop;
  10605. for (prop in inputObject) {
  10606. if (hasOwnProp(inputObject, prop)) {
  10607. normalizedProp = normalizeUnits(prop);
  10608. if (normalizedProp) {
  10609. normalizedInput[normalizedProp] = inputObject[prop];
  10610. }
  10611. }
  10612. }
  10613. return normalizedInput;
  10614. }
  10615. var priorities = {
  10616. date: 9,
  10617. day: 11,
  10618. weekday: 11,
  10619. isoWeekday: 11,
  10620. dayOfYear: 4,
  10621. hour: 13,
  10622. millisecond: 16,
  10623. minute: 14,
  10624. month: 8,
  10625. quarter: 7,
  10626. second: 15,
  10627. weekYear: 1,
  10628. isoWeekYear: 1,
  10629. week: 5,
  10630. isoWeek: 5,
  10631. year: 1
  10632. };
  10633. function getPrioritizedUnits(unitsObj) {
  10634. var units = [], u;
  10635. for (u in unitsObj) {
  10636. if (hasOwnProp(unitsObj, u)) {
  10637. units.push({ unit: u, priority: priorities[u] });
  10638. }
  10639. }
  10640. units.sort(function(a, b) {
  10641. return a.priority - b.priority;
  10642. });
  10643. return units;
  10644. }
  10645. var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, match1to2NoLeadingZero = /^[1-9]\d?/, match1to2HasZero = /^([1-9]\d|\d)/, regexes;
  10646. regexes = {};
  10647. function addRegexToken(token2, regex, strictRegex) {
  10648. regexes[token2] = isFunction(regex) ? regex : function(isStrict, localeData2) {
  10649. return isStrict && strictRegex ? strictRegex : regex;
  10650. };
  10651. }
  10652. function getParseRegexForToken(token2, config2) {
  10653. if (!hasOwnProp(regexes, token2)) {
  10654. return new RegExp(unescapeFormat(token2));
  10655. }
  10656. return regexes[token2](config2._strict, config2._locale);
  10657. }
  10658. function unescapeFormat(s2) {
  10659. return regexEscape(
  10660. s2.replace("\\", "").replace(
  10661. /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
  10662. function(matched, p1, p2, p3, p4) {
  10663. return p1 || p2 || p3 || p4;
  10664. }
  10665. )
  10666. );
  10667. }
  10668. function regexEscape(s2) {
  10669. return s2.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
  10670. }
  10671. function absFloor(number3) {
  10672. if (number3 < 0) {
  10673. return Math.ceil(number3) || 0;
  10674. } else {
  10675. return Math.floor(number3);
  10676. }
  10677. }
  10678. function toInt(argumentForCoercion) {
  10679. var coercedNumber = +argumentForCoercion, value2 = 0;
  10680. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  10681. value2 = absFloor(coercedNumber);
  10682. }
  10683. return value2;
  10684. }
  10685. var tokens = {};
  10686. function addParseToken(token2, callback) {
  10687. var i, func2 = callback, tokenLen;
  10688. if (typeof token2 === "string") {
  10689. token2 = [token2];
  10690. }
  10691. if (isNumber(callback)) {
  10692. func2 = function(input, array3) {
  10693. array3[callback] = toInt(input);
  10694. };
  10695. }
  10696. tokenLen = token2.length;
  10697. for (i = 0; i < tokenLen; i++) {
  10698. tokens[token2[i]] = func2;
  10699. }
  10700. }
  10701. function addWeekParseToken(token2, callback) {
  10702. addParseToken(token2, function(input, array3, config2, token3) {
  10703. config2._w = config2._w || {};
  10704. callback(input, config2._w, config2, token3);
  10705. });
  10706. }
  10707. function addTimeToArrayFromToken(token2, input, config2) {
  10708. if (input != null && hasOwnProp(tokens, token2)) {
  10709. tokens[token2](input, config2._a, config2, token2);
  10710. }
  10711. }
  10712. function isLeapYear(year) {
  10713. return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
  10714. }
  10715. var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8;
  10716. addFormatToken("Y", 0, 0, function() {
  10717. var y = this.year();
  10718. return y <= 9999 ? zeroFill(y, 4) : "+" + y;
  10719. });
  10720. addFormatToken(0, ["YY", 2], 0, function() {
  10721. return this.year() % 100;
  10722. });
  10723. addFormatToken(0, ["YYYY", 4], 0, "year");
  10724. addFormatToken(0, ["YYYYY", 5], 0, "year");
  10725. addFormatToken(0, ["YYYYYY", 6, true], 0, "year");
  10726. addRegexToken("Y", matchSigned);
  10727. addRegexToken("YY", match1to2, match2);
  10728. addRegexToken("YYYY", match1to4, match4);
  10729. addRegexToken("YYYYY", match1to6, match6);
  10730. addRegexToken("YYYYYY", match1to6, match6);
  10731. addParseToken(["YYYYY", "YYYYYY"], YEAR);
  10732. addParseToken("YYYY", function(input, array3) {
  10733. array3[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  10734. });
  10735. addParseToken("YY", function(input, array3) {
  10736. array3[YEAR] = hooks.parseTwoDigitYear(input);
  10737. });
  10738. addParseToken("Y", function(input, array3) {
  10739. array3[YEAR] = parseInt(input, 10);
  10740. });
  10741. function daysInYear(year) {
  10742. return isLeapYear(year) ? 366 : 365;
  10743. }
  10744. hooks.parseTwoDigitYear = function(input) {
  10745. return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3);
  10746. };
  10747. var getSetYear = makeGetSet("FullYear", true);
  10748. function getIsLeapYear() {
  10749. return isLeapYear(this.year());
  10750. }
  10751. function makeGetSet(unit, keepTime) {
  10752. return function(value2) {
  10753. if (value2 != null) {
  10754. set$1(this, unit, value2);
  10755. hooks.updateOffset(this, keepTime);
  10756. return this;
  10757. } else {
  10758. return get(this, unit);
  10759. }
  10760. };
  10761. }
  10762. function get(mom, unit) {
  10763. if (!mom.isValid()) {
  10764. return NaN;
  10765. }
  10766. var d = mom._d, isUTC = mom._isUTC;
  10767. switch (unit) {
  10768. case "Milliseconds":
  10769. return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
  10770. case "Seconds":
  10771. return isUTC ? d.getUTCSeconds() : d.getSeconds();
  10772. case "Minutes":
  10773. return isUTC ? d.getUTCMinutes() : d.getMinutes();
  10774. case "Hours":
  10775. return isUTC ? d.getUTCHours() : d.getHours();
  10776. case "Date":
  10777. return isUTC ? d.getUTCDate() : d.getDate();
  10778. case "Day":
  10779. return isUTC ? d.getUTCDay() : d.getDay();
  10780. case "Month":
  10781. return isUTC ? d.getUTCMonth() : d.getMonth();
  10782. case "FullYear":
  10783. return isUTC ? d.getUTCFullYear() : d.getFullYear();
  10784. default:
  10785. return NaN;
  10786. }
  10787. }
  10788. function set$1(mom, unit, value2) {
  10789. var d, isUTC, year, month, date3;
  10790. if (!mom.isValid() || isNaN(value2)) {
  10791. return;
  10792. }
  10793. d = mom._d;
  10794. isUTC = mom._isUTC;
  10795. switch (unit) {
  10796. case "Milliseconds":
  10797. return void (isUTC ? d.setUTCMilliseconds(value2) : d.setMilliseconds(value2));
  10798. case "Seconds":
  10799. return void (isUTC ? d.setUTCSeconds(value2) : d.setSeconds(value2));
  10800. case "Minutes":
  10801. return void (isUTC ? d.setUTCMinutes(value2) : d.setMinutes(value2));
  10802. case "Hours":
  10803. return void (isUTC ? d.setUTCHours(value2) : d.setHours(value2));
  10804. case "Date":
  10805. return void (isUTC ? d.setUTCDate(value2) : d.setDate(value2));
  10806. case "FullYear":
  10807. break;
  10808. default:
  10809. return;
  10810. }
  10811. year = value2;
  10812. month = mom.month();
  10813. date3 = mom.date();
  10814. date3 = date3 === 29 && month === 1 && !isLeapYear(year) ? 28 : date3;
  10815. void (isUTC ? d.setUTCFullYear(year, month, date3) : d.setFullYear(year, month, date3));
  10816. }
  10817. function stringGet(units) {
  10818. units = normalizeUnits(units);
  10819. if (isFunction(this[units])) {
  10820. return this[units]();
  10821. }
  10822. return this;
  10823. }
  10824. function stringSet(units, value2) {
  10825. if (typeof units === "object") {
  10826. units = normalizeObjectUnits(units);
  10827. var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length;
  10828. for (i = 0; i < prioritizedLen; i++) {
  10829. this[prioritized[i].unit](units[prioritized[i].unit]);
  10830. }
  10831. } else {
  10832. units = normalizeUnits(units);
  10833. if (isFunction(this[units])) {
  10834. return this[units](value2);
  10835. }
  10836. }
  10837. return this;
  10838. }
  10839. function mod(n2, x) {
  10840. return (n2 % x + x) % x;
  10841. }
  10842. var indexOf;
  10843. if (Array.prototype.indexOf) {
  10844. indexOf = Array.prototype.indexOf;
  10845. } else {
  10846. indexOf = function(o2) {
  10847. var i;
  10848. for (i = 0; i < this.length; ++i) {
  10849. if (this[i] === o2) {
  10850. return i;
  10851. }
  10852. }
  10853. return -1;
  10854. };
  10855. }
  10856. function daysInMonth(year, month) {
  10857. if (isNaN(year) || isNaN(month)) {
  10858. return NaN;
  10859. }
  10860. var modMonth = mod(month, 12);
  10861. year += (month - modMonth) / 12;
  10862. return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;
  10863. }
  10864. addFormatToken("M", ["MM", 2], "Mo", function() {
  10865. return this.month() + 1;
  10866. });
  10867. addFormatToken("MMM", 0, 0, function(format2) {
  10868. return this.localeData().monthsShort(this, format2);
  10869. });
  10870. addFormatToken("MMMM", 0, 0, function(format2) {
  10871. return this.localeData().months(this, format2);
  10872. });
  10873. addRegexToken("M", match1to2, match1to2NoLeadingZero);
  10874. addRegexToken("MM", match1to2, match2);
  10875. addRegexToken("MMM", function(isStrict, locale2) {
  10876. return locale2.monthsShortRegex(isStrict);
  10877. });
  10878. addRegexToken("MMMM", function(isStrict, locale2) {
  10879. return locale2.monthsRegex(isStrict);
  10880. });
  10881. addParseToken(["M", "MM"], function(input, array3) {
  10882. array3[MONTH] = toInt(input) - 1;
  10883. });
  10884. addParseToken(["MMM", "MMMM"], function(input, array3, config2, token2) {
  10885. var month = config2._locale.monthsParse(input, token2, config2._strict);
  10886. if (month != null) {
  10887. array3[MONTH] = month;
  10888. } else {
  10889. getParsingFlags(config2).invalidMonth = input;
  10890. }
  10891. });
  10892. var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split(
  10893. "_"
  10894. ), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord;
  10895. function localeMonths(m, format2) {
  10896. if (!m) {
  10897. return isArray(this._months) ? this._months : this._months["standalone"];
  10898. }
  10899. return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m.month()];
  10900. }
  10901. function localeMonthsShort(m, format2) {
  10902. if (!m) {
  10903. return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"];
  10904. }
  10905. return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m.month()];
  10906. }
  10907. function handleStrictParse(monthName, format2, strict) {
  10908. var i, ii, mom, llc = monthName.toLocaleLowerCase();
  10909. if (!this._monthsParse) {
  10910. this._monthsParse = [];
  10911. this._longMonthsParse = [];
  10912. this._shortMonthsParse = [];
  10913. for (i = 0; i < 12; ++i) {
  10914. mom = createUTC([2e3, i]);
  10915. this._shortMonthsParse[i] = this.monthsShort(
  10916. mom,
  10917. ""
  10918. ).toLocaleLowerCase();
  10919. this._longMonthsParse[i] = this.months(mom, "").toLocaleLowerCase();
  10920. }
  10921. }
  10922. if (strict) {
  10923. if (format2 === "MMM") {
  10924. ii = indexOf.call(this._shortMonthsParse, llc);
  10925. return ii !== -1 ? ii : null;
  10926. } else {
  10927. ii = indexOf.call(this._longMonthsParse, llc);
  10928. return ii !== -1 ? ii : null;
  10929. }
  10930. } else {
  10931. if (format2 === "MMM") {
  10932. ii = indexOf.call(this._shortMonthsParse, llc);
  10933. if (ii !== -1) {
  10934. return ii;
  10935. }
  10936. ii = indexOf.call(this._longMonthsParse, llc);
  10937. return ii !== -1 ? ii : null;
  10938. } else {
  10939. ii = indexOf.call(this._longMonthsParse, llc);
  10940. if (ii !== -1) {
  10941. return ii;
  10942. }
  10943. ii = indexOf.call(this._shortMonthsParse, llc);
  10944. return ii !== -1 ? ii : null;
  10945. }
  10946. }
  10947. }
  10948. function localeMonthsParse(monthName, format2, strict) {
  10949. var i, mom, regex;
  10950. if (this._monthsParseExact) {
  10951. return handleStrictParse.call(this, monthName, format2, strict);
  10952. }
  10953. if (!this._monthsParse) {
  10954. this._monthsParse = [];
  10955. this._longMonthsParse = [];
  10956. this._shortMonthsParse = [];
  10957. }
  10958. for (i = 0; i < 12; i++) {
  10959. mom = createUTC([2e3, i]);
  10960. if (strict && !this._longMonthsParse[i]) {
  10961. this._longMonthsParse[i] = new RegExp(
  10962. "^" + this.months(mom, "").replace(".", "") + "$",
  10963. "i"
  10964. );
  10965. this._shortMonthsParse[i] = new RegExp(
  10966. "^" + this.monthsShort(mom, "").replace(".", "") + "$",
  10967. "i"
  10968. );
  10969. }
  10970. if (!strict && !this._monthsParse[i]) {
  10971. regex = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, "");
  10972. this._monthsParse[i] = new RegExp(regex.replace(".", ""), "i");
  10973. }
  10974. if (strict && format2 === "MMMM" && this._longMonthsParse[i].test(monthName)) {
  10975. return i;
  10976. } else if (strict && format2 === "MMM" && this._shortMonthsParse[i].test(monthName)) {
  10977. return i;
  10978. } else if (!strict && this._monthsParse[i].test(monthName)) {
  10979. return i;
  10980. }
  10981. }
  10982. }
  10983. function setMonth(mom, value2) {
  10984. if (!mom.isValid()) {
  10985. return mom;
  10986. }
  10987. if (typeof value2 === "string") {
  10988. if (/^\d+$/.test(value2)) {
  10989. value2 = toInt(value2);
  10990. } else {
  10991. value2 = mom.localeData().monthsParse(value2);
  10992. if (!isNumber(value2)) {
  10993. return mom;
  10994. }
  10995. }
  10996. }
  10997. var month = value2, date3 = mom.date();
  10998. date3 = date3 < 29 ? date3 : Math.min(date3, daysInMonth(mom.year(), month));
  10999. void (mom._isUTC ? mom._d.setUTCMonth(month, date3) : mom._d.setMonth(month, date3));
  11000. return mom;
  11001. }
  11002. function getSetMonth(value2) {
  11003. if (value2 != null) {
  11004. setMonth(this, value2);
  11005. hooks.updateOffset(this, true);
  11006. return this;
  11007. } else {
  11008. return get(this, "Month");
  11009. }
  11010. }
  11011. function getDaysInMonth() {
  11012. return daysInMonth(this.year(), this.month());
  11013. }
  11014. function monthsShortRegex(isStrict) {
  11015. if (this._monthsParseExact) {
  11016. if (!hasOwnProp(this, "_monthsRegex")) {
  11017. computeMonthsParse.call(this);
  11018. }
  11019. if (isStrict) {
  11020. return this._monthsShortStrictRegex;
  11021. } else {
  11022. return this._monthsShortRegex;
  11023. }
  11024. } else {
  11025. if (!hasOwnProp(this, "_monthsShortRegex")) {
  11026. this._monthsShortRegex = defaultMonthsShortRegex;
  11027. }
  11028. return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;
  11029. }
  11030. }
  11031. function monthsRegex(isStrict) {
  11032. if (this._monthsParseExact) {
  11033. if (!hasOwnProp(this, "_monthsRegex")) {
  11034. computeMonthsParse.call(this);
  11035. }
  11036. if (isStrict) {
  11037. return this._monthsStrictRegex;
  11038. } else {
  11039. return this._monthsRegex;
  11040. }
  11041. } else {
  11042. if (!hasOwnProp(this, "_monthsRegex")) {
  11043. this._monthsRegex = defaultMonthsRegex;
  11044. }
  11045. return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;
  11046. }
  11047. }
  11048. function computeMonthsParse() {
  11049. function cmpLenRev(a, b) {
  11050. return b.length - a.length;
  11051. }
  11052. var shortPieces = [], longPieces = [], mixedPieces = [], i, mom, shortP, longP;
  11053. for (i = 0; i < 12; i++) {
  11054. mom = createUTC([2e3, i]);
  11055. shortP = regexEscape(this.monthsShort(mom, ""));
  11056. longP = regexEscape(this.months(mom, ""));
  11057. shortPieces.push(shortP);
  11058. longPieces.push(longP);
  11059. mixedPieces.push(longP);
  11060. mixedPieces.push(shortP);
  11061. }
  11062. shortPieces.sort(cmpLenRev);
  11063. longPieces.sort(cmpLenRev);
  11064. mixedPieces.sort(cmpLenRev);
  11065. this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
  11066. this._monthsShortRegex = this._monthsRegex;
  11067. this._monthsStrictRegex = new RegExp(
  11068. "^(" + longPieces.join("|") + ")",
  11069. "i"
  11070. );
  11071. this._monthsShortStrictRegex = new RegExp(
  11072. "^(" + shortPieces.join("|") + ")",
  11073. "i"
  11074. );
  11075. }
  11076. function createDate(y, m, d, h, M, s2, ms) {
  11077. var date3;
  11078. if (y < 100 && y >= 0) {
  11079. date3 = new Date(y + 400, m, d, h, M, s2, ms);
  11080. if (isFinite(date3.getFullYear())) {
  11081. date3.setFullYear(y);
  11082. }
  11083. } else {
  11084. date3 = new Date(y, m, d, h, M, s2, ms);
  11085. }
  11086. return date3;
  11087. }
  11088. function createUTCDate(y) {
  11089. var date3, args;
  11090. if (y < 100 && y >= 0) {
  11091. args = Array.prototype.slice.call(arguments);
  11092. args[0] = y + 400;
  11093. date3 = new Date(Date.UTC.apply(null, args));
  11094. if (isFinite(date3.getUTCFullYear())) {
  11095. date3.setUTCFullYear(y);
  11096. }
  11097. } else {
  11098. date3 = new Date(Date.UTC.apply(null, arguments));
  11099. }
  11100. return date3;
  11101. }
  11102. function firstWeekOffset(year, dow, doy) {
  11103. var fwd = 7 + dow - doy, fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  11104. return -fwdlw + fwd - 1;
  11105. }
  11106. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  11107. var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear;
  11108. if (dayOfYear <= 0) {
  11109. resYear = year - 1;
  11110. resDayOfYear = daysInYear(resYear) + dayOfYear;
  11111. } else if (dayOfYear > daysInYear(year)) {
  11112. resYear = year + 1;
  11113. resDayOfYear = dayOfYear - daysInYear(year);
  11114. } else {
  11115. resYear = year;
  11116. resDayOfYear = dayOfYear;
  11117. }
  11118. return {
  11119. year: resYear,
  11120. dayOfYear: resDayOfYear
  11121. };
  11122. }
  11123. function weekOfYear(mom, dow, doy) {
  11124. var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear;
  11125. if (week < 1) {
  11126. resYear = mom.year() - 1;
  11127. resWeek = week + weeksInYear(resYear, dow, doy);
  11128. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  11129. resWeek = week - weeksInYear(mom.year(), dow, doy);
  11130. resYear = mom.year() + 1;
  11131. } else {
  11132. resYear = mom.year();
  11133. resWeek = week;
  11134. }
  11135. return {
  11136. week: resWeek,
  11137. year: resYear
  11138. };
  11139. }
  11140. function weeksInYear(year, dow, doy) {
  11141. var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  11142. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  11143. }
  11144. addFormatToken("w", ["ww", 2], "wo", "week");
  11145. addFormatToken("W", ["WW", 2], "Wo", "isoWeek");
  11146. addRegexToken("w", match1to2, match1to2NoLeadingZero);
  11147. addRegexToken("ww", match1to2, match2);
  11148. addRegexToken("W", match1to2, match1to2NoLeadingZero);
  11149. addRegexToken("WW", match1to2, match2);
  11150. addWeekParseToken(
  11151. ["w", "ww", "W", "WW"],
  11152. function(input, week, config2, token2) {
  11153. week[token2.substr(0, 1)] = toInt(input);
  11154. }
  11155. );
  11156. function localeWeek(mom) {
  11157. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  11158. }
  11159. var defaultLocaleWeek = {
  11160. dow: 0,
  11161. // Sunday is the first day of the week.
  11162. doy: 6
  11163. // The week that contains Jan 6th is the first week of the year.
  11164. };
  11165. function localeFirstDayOfWeek() {
  11166. return this._week.dow;
  11167. }
  11168. function localeFirstDayOfYear() {
  11169. return this._week.doy;
  11170. }
  11171. function getSetWeek(input) {
  11172. var week = this.localeData().week(this);
  11173. return input == null ? week : this.add((input - week) * 7, "d");
  11174. }
  11175. function getSetISOWeek(input) {
  11176. var week = weekOfYear(this, 1, 4).week;
  11177. return input == null ? week : this.add((input - week) * 7, "d");
  11178. }
  11179. addFormatToken("d", 0, "do", "day");
  11180. addFormatToken("dd", 0, 0, function(format2) {
  11181. return this.localeData().weekdaysMin(this, format2);
  11182. });
  11183. addFormatToken("ddd", 0, 0, function(format2) {
  11184. return this.localeData().weekdaysShort(this, format2);
  11185. });
  11186. addFormatToken("dddd", 0, 0, function(format2) {
  11187. return this.localeData().weekdays(this, format2);
  11188. });
  11189. addFormatToken("e", 0, 0, "weekday");
  11190. addFormatToken("E", 0, 0, "isoWeekday");
  11191. addRegexToken("d", match1to2);
  11192. addRegexToken("e", match1to2);
  11193. addRegexToken("E", match1to2);
  11194. addRegexToken("dd", function(isStrict, locale2) {
  11195. return locale2.weekdaysMinRegex(isStrict);
  11196. });
  11197. addRegexToken("ddd", function(isStrict, locale2) {
  11198. return locale2.weekdaysShortRegex(isStrict);
  11199. });
  11200. addRegexToken("dddd", function(isStrict, locale2) {
  11201. return locale2.weekdaysRegex(isStrict);
  11202. });
  11203. addWeekParseToken(["dd", "ddd", "dddd"], function(input, week, config2, token2) {
  11204. var weekday = config2._locale.weekdaysParse(input, token2, config2._strict);
  11205. if (weekday != null) {
  11206. week.d = weekday;
  11207. } else {
  11208. getParsingFlags(config2).invalidWeekday = input;
  11209. }
  11210. });
  11211. addWeekParseToken(["d", "e", "E"], function(input, week, config2, token2) {
  11212. week[token2] = toInt(input);
  11213. });
  11214. function parseWeekday(input, locale2) {
  11215. if (typeof input !== "string") {
  11216. return input;
  11217. }
  11218. if (!isNaN(input)) {
  11219. return parseInt(input, 10);
  11220. }
  11221. input = locale2.weekdaysParse(input);
  11222. if (typeof input === "number") {
  11223. return input;
  11224. }
  11225. return null;
  11226. }
  11227. function parseIsoWeekday(input, locale2) {
  11228. if (typeof input === "string") {
  11229. return locale2.weekdaysParse(input) % 7 || 7;
  11230. }
  11231. return isNaN(input) ? null : input;
  11232. }
  11233. function shiftWeekdays(ws, n2) {
  11234. return ws.slice(n2, 7).concat(ws.slice(0, n2));
  11235. }
  11236. var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
  11237. function localeWeekdays(m, format2) {
  11238. var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"];
  11239. return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;
  11240. }
  11241. function localeWeekdaysShort(m) {
  11242. return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;
  11243. }
  11244. function localeWeekdaysMin(m) {
  11245. return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;
  11246. }
  11247. function handleStrictParse$1(weekdayName, format2, strict) {
  11248. var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
  11249. if (!this._weekdaysParse) {
  11250. this._weekdaysParse = [];
  11251. this._shortWeekdaysParse = [];
  11252. this._minWeekdaysParse = [];
  11253. for (i = 0; i < 7; ++i) {
  11254. mom = createUTC([2e3, 1]).day(i);
  11255. this._minWeekdaysParse[i] = this.weekdaysMin(
  11256. mom,
  11257. ""
  11258. ).toLocaleLowerCase();
  11259. this._shortWeekdaysParse[i] = this.weekdaysShort(
  11260. mom,
  11261. ""
  11262. ).toLocaleLowerCase();
  11263. this._weekdaysParse[i] = this.weekdays(mom, "").toLocaleLowerCase();
  11264. }
  11265. }
  11266. if (strict) {
  11267. if (format2 === "dddd") {
  11268. ii = indexOf.call(this._weekdaysParse, llc);
  11269. return ii !== -1 ? ii : null;
  11270. } else if (format2 === "ddd") {
  11271. ii = indexOf.call(this._shortWeekdaysParse, llc);
  11272. return ii !== -1 ? ii : null;
  11273. } else {
  11274. ii = indexOf.call(this._minWeekdaysParse, llc);
  11275. return ii !== -1 ? ii : null;
  11276. }
  11277. } else {
  11278. if (format2 === "dddd") {
  11279. ii = indexOf.call(this._weekdaysParse, llc);
  11280. if (ii !== -1) {
  11281. return ii;
  11282. }
  11283. ii = indexOf.call(this._shortWeekdaysParse, llc);
  11284. if (ii !== -1) {
  11285. return ii;
  11286. }
  11287. ii = indexOf.call(this._minWeekdaysParse, llc);
  11288. return ii !== -1 ? ii : null;
  11289. } else if (format2 === "ddd") {
  11290. ii = indexOf.call(this._shortWeekdaysParse, llc);
  11291. if (ii !== -1) {
  11292. return ii;
  11293. }
  11294. ii = indexOf.call(this._weekdaysParse, llc);
  11295. if (ii !== -1) {
  11296. return ii;
  11297. }
  11298. ii = indexOf.call(this._minWeekdaysParse, llc);
  11299. return ii !== -1 ? ii : null;
  11300. } else {
  11301. ii = indexOf.call(this._minWeekdaysParse, llc);
  11302. if (ii !== -1) {
  11303. return ii;
  11304. }
  11305. ii = indexOf.call(this._weekdaysParse, llc);
  11306. if (ii !== -1) {
  11307. return ii;
  11308. }
  11309. ii = indexOf.call(this._shortWeekdaysParse, llc);
  11310. return ii !== -1 ? ii : null;
  11311. }
  11312. }
  11313. }
  11314. function localeWeekdaysParse(weekdayName, format2, strict) {
  11315. var i, mom, regex;
  11316. if (this._weekdaysParseExact) {
  11317. return handleStrictParse$1.call(this, weekdayName, format2, strict);
  11318. }
  11319. if (!this._weekdaysParse) {
  11320. this._weekdaysParse = [];
  11321. this._minWeekdaysParse = [];
  11322. this._shortWeekdaysParse = [];
  11323. this._fullWeekdaysParse = [];
  11324. }
  11325. for (i = 0; i < 7; i++) {
  11326. mom = createUTC([2e3, 1]).day(i);
  11327. if (strict && !this._fullWeekdaysParse[i]) {
  11328. this._fullWeekdaysParse[i] = new RegExp(
  11329. "^" + this.weekdays(mom, "").replace(".", "\\.?") + "$",
  11330. "i"
  11331. );
  11332. this._shortWeekdaysParse[i] = new RegExp(
  11333. "^" + this.weekdaysShort(mom, "").replace(".", "\\.?") + "$",
  11334. "i"
  11335. );
  11336. this._minWeekdaysParse[i] = new RegExp(
  11337. "^" + this.weekdaysMin(mom, "").replace(".", "\\.?") + "$",
  11338. "i"
  11339. );
  11340. }
  11341. if (!this._weekdaysParse[i]) {
  11342. regex = "^" + this.weekdays(mom, "") + "|^" + this.weekdaysShort(mom, "") + "|^" + this.weekdaysMin(mom, "");
  11343. this._weekdaysParse[i] = new RegExp(regex.replace(".", ""), "i");
  11344. }
  11345. if (strict && format2 === "dddd" && this._fullWeekdaysParse[i].test(weekdayName)) {
  11346. return i;
  11347. } else if (strict && format2 === "ddd" && this._shortWeekdaysParse[i].test(weekdayName)) {
  11348. return i;
  11349. } else if (strict && format2 === "dd" && this._minWeekdaysParse[i].test(weekdayName)) {
  11350. return i;
  11351. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  11352. return i;
  11353. }
  11354. }
  11355. }
  11356. function getSetDayOfWeek(input) {
  11357. if (!this.isValid()) {
  11358. return input != null ? this : NaN;
  11359. }
  11360. var day = get(this, "Day");
  11361. if (input != null) {
  11362. input = parseWeekday(input, this.localeData());
  11363. return this.add(input - day, "d");
  11364. } else {
  11365. return day;
  11366. }
  11367. }
  11368. function getSetLocaleDayOfWeek(input) {
  11369. if (!this.isValid()) {
  11370. return input != null ? this : NaN;
  11371. }
  11372. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  11373. return input == null ? weekday : this.add(input - weekday, "d");
  11374. }
  11375. function getSetISODayOfWeek(input) {
  11376. if (!this.isValid()) {
  11377. return input != null ? this : NaN;
  11378. }
  11379. if (input != null) {
  11380. var weekday = parseIsoWeekday(input, this.localeData());
  11381. return this.day(this.day() % 7 ? weekday : weekday - 7);
  11382. } else {
  11383. return this.day() || 7;
  11384. }
  11385. }
  11386. function weekdaysRegex(isStrict) {
  11387. if (this._weekdaysParseExact) {
  11388. if (!hasOwnProp(this, "_weekdaysRegex")) {
  11389. computeWeekdaysParse.call(this);
  11390. }
  11391. if (isStrict) {
  11392. return this._weekdaysStrictRegex;
  11393. } else {
  11394. return this._weekdaysRegex;
  11395. }
  11396. } else {
  11397. if (!hasOwnProp(this, "_weekdaysRegex")) {
  11398. this._weekdaysRegex = defaultWeekdaysRegex;
  11399. }
  11400. return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;
  11401. }
  11402. }
  11403. function weekdaysShortRegex(isStrict) {
  11404. if (this._weekdaysParseExact) {
  11405. if (!hasOwnProp(this, "_weekdaysRegex")) {
  11406. computeWeekdaysParse.call(this);
  11407. }
  11408. if (isStrict) {
  11409. return this._weekdaysShortStrictRegex;
  11410. } else {
  11411. return this._weekdaysShortRegex;
  11412. }
  11413. } else {
  11414. if (!hasOwnProp(this, "_weekdaysShortRegex")) {
  11415. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  11416. }
  11417. return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  11418. }
  11419. }
  11420. function weekdaysMinRegex(isStrict) {
  11421. if (this._weekdaysParseExact) {
  11422. if (!hasOwnProp(this, "_weekdaysRegex")) {
  11423. computeWeekdaysParse.call(this);
  11424. }
  11425. if (isStrict) {
  11426. return this._weekdaysMinStrictRegex;
  11427. } else {
  11428. return this._weekdaysMinRegex;
  11429. }
  11430. } else {
  11431. if (!hasOwnProp(this, "_weekdaysMinRegex")) {
  11432. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  11433. }
  11434. return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  11435. }
  11436. }
  11437. function computeWeekdaysParse() {
  11438. function cmpLenRev(a, b) {
  11439. return b.length - a.length;
  11440. }
  11441. var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp;
  11442. for (i = 0; i < 7; i++) {
  11443. mom = createUTC([2e3, 1]).day(i);
  11444. minp = regexEscape(this.weekdaysMin(mom, ""));
  11445. shortp = regexEscape(this.weekdaysShort(mom, ""));
  11446. longp = regexEscape(this.weekdays(mom, ""));
  11447. minPieces.push(minp);
  11448. shortPieces.push(shortp);
  11449. longPieces.push(longp);
  11450. mixedPieces.push(minp);
  11451. mixedPieces.push(shortp);
  11452. mixedPieces.push(longp);
  11453. }
  11454. minPieces.sort(cmpLenRev);
  11455. shortPieces.sort(cmpLenRev);
  11456. longPieces.sort(cmpLenRev);
  11457. mixedPieces.sort(cmpLenRev);
  11458. this._weekdaysRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
  11459. this._weekdaysShortRegex = this._weekdaysRegex;
  11460. this._weekdaysMinRegex = this._weekdaysRegex;
  11461. this._weekdaysStrictRegex = new RegExp(
  11462. "^(" + longPieces.join("|") + ")",
  11463. "i"
  11464. );
  11465. this._weekdaysShortStrictRegex = new RegExp(
  11466. "^(" + shortPieces.join("|") + ")",
  11467. "i"
  11468. );
  11469. this._weekdaysMinStrictRegex = new RegExp(
  11470. "^(" + minPieces.join("|") + ")",
  11471. "i"
  11472. );
  11473. }
  11474. function hFormat() {
  11475. return this.hours() % 12 || 12;
  11476. }
  11477. function kFormat() {
  11478. return this.hours() || 24;
  11479. }
  11480. addFormatToken("H", ["HH", 2], 0, "hour");
  11481. addFormatToken("h", ["hh", 2], 0, hFormat);
  11482. addFormatToken("k", ["kk", 2], 0, kFormat);
  11483. addFormatToken("hmm", 0, 0, function() {
  11484. return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  11485. });
  11486. addFormatToken("hmmss", 0, 0, function() {
  11487. return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
  11488. });
  11489. addFormatToken("Hmm", 0, 0, function() {
  11490. return "" + this.hours() + zeroFill(this.minutes(), 2);
  11491. });
  11492. addFormatToken("Hmmss", 0, 0, function() {
  11493. return "" + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
  11494. });
  11495. function meridiem(token2, lowercase) {
  11496. addFormatToken(token2, 0, 0, function() {
  11497. return this.localeData().meridiem(
  11498. this.hours(),
  11499. this.minutes(),
  11500. lowercase
  11501. );
  11502. });
  11503. }
  11504. meridiem("a", true);
  11505. meridiem("A", false);
  11506. function matchMeridiem(isStrict, locale2) {
  11507. return locale2._meridiemParse;
  11508. }
  11509. addRegexToken("a", matchMeridiem);
  11510. addRegexToken("A", matchMeridiem);
  11511. addRegexToken("H", match1to2, match1to2HasZero);
  11512. addRegexToken("h", match1to2, match1to2NoLeadingZero);
  11513. addRegexToken("k", match1to2, match1to2NoLeadingZero);
  11514. addRegexToken("HH", match1to2, match2);
  11515. addRegexToken("hh", match1to2, match2);
  11516. addRegexToken("kk", match1to2, match2);
  11517. addRegexToken("hmm", match3to4);
  11518. addRegexToken("hmmss", match5to6);
  11519. addRegexToken("Hmm", match3to4);
  11520. addRegexToken("Hmmss", match5to6);
  11521. addParseToken(["H", "HH"], HOUR);
  11522. addParseToken(["k", "kk"], function(input, array3, config2) {
  11523. var kInput = toInt(input);
  11524. array3[HOUR] = kInput === 24 ? 0 : kInput;
  11525. });
  11526. addParseToken(["a", "A"], function(input, array3, config2) {
  11527. config2._isPm = config2._locale.isPM(input);
  11528. config2._meridiem = input;
  11529. });
  11530. addParseToken(["h", "hh"], function(input, array3, config2) {
  11531. array3[HOUR] = toInt(input);
  11532. getParsingFlags(config2).bigHour = true;
  11533. });
  11534. addParseToken("hmm", function(input, array3, config2) {
  11535. var pos = input.length - 2;
  11536. array3[HOUR] = toInt(input.substr(0, pos));
  11537. array3[MINUTE] = toInt(input.substr(pos));
  11538. getParsingFlags(config2).bigHour = true;
  11539. });
  11540. addParseToken("hmmss", function(input, array3, config2) {
  11541. var pos1 = input.length - 4, pos2 = input.length - 2;
  11542. array3[HOUR] = toInt(input.substr(0, pos1));
  11543. array3[MINUTE] = toInt(input.substr(pos1, 2));
  11544. array3[SECOND] = toInt(input.substr(pos2));
  11545. getParsingFlags(config2).bigHour = true;
  11546. });
  11547. addParseToken("Hmm", function(input, array3, config2) {
  11548. var pos = input.length - 2;
  11549. array3[HOUR] = toInt(input.substr(0, pos));
  11550. array3[MINUTE] = toInt(input.substr(pos));
  11551. });
  11552. addParseToken("Hmmss", function(input, array3, config2) {
  11553. var pos1 = input.length - 4, pos2 = input.length - 2;
  11554. array3[HOUR] = toInt(input.substr(0, pos1));
  11555. array3[MINUTE] = toInt(input.substr(pos1, 2));
  11556. array3[SECOND] = toInt(input.substr(pos2));
  11557. });
  11558. function localeIsPM(input) {
  11559. return (input + "").toLowerCase().charAt(0) === "p";
  11560. }
  11561. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, getSetHour = makeGetSet("Hours", true);
  11562. function localeMeridiem(hours2, minutes2, isLower) {
  11563. if (hours2 > 11) {
  11564. return isLower ? "pm" : "PM";
  11565. } else {
  11566. return isLower ? "am" : "AM";
  11567. }
  11568. }
  11569. var baseConfig = {
  11570. calendar: defaultCalendar,
  11571. longDateFormat: defaultLongDateFormat,
  11572. invalidDate: defaultInvalidDate,
  11573. ordinal: defaultOrdinal,
  11574. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  11575. relativeTime: defaultRelativeTime,
  11576. months: defaultLocaleMonths,
  11577. monthsShort: defaultLocaleMonthsShort,
  11578. week: defaultLocaleWeek,
  11579. weekdays: defaultLocaleWeekdays,
  11580. weekdaysMin: defaultLocaleWeekdaysMin,
  11581. weekdaysShort: defaultLocaleWeekdaysShort,
  11582. meridiemParse: defaultLocaleMeridiemParse
  11583. };
  11584. var locales = {}, localeFamilies = {}, globalLocale;
  11585. function commonPrefix(arr1, arr2) {
  11586. var i, minl = Math.min(arr1.length, arr2.length);
  11587. for (i = 0; i < minl; i += 1) {
  11588. if (arr1[i] !== arr2[i]) {
  11589. return i;
  11590. }
  11591. }
  11592. return minl;
  11593. }
  11594. function normalizeLocale(key) {
  11595. return key ? key.toLowerCase().replace("_", "-") : key;
  11596. }
  11597. function chooseLocale(names) {
  11598. var i = 0, j, next, locale2, split;
  11599. while (i < names.length) {
  11600. split = normalizeLocale(names[i]).split("-");
  11601. j = split.length;
  11602. next = normalizeLocale(names[i + 1]);
  11603. next = next ? next.split("-") : null;
  11604. while (j > 0) {
  11605. locale2 = loadLocale(split.slice(0, j).join("-"));
  11606. if (locale2) {
  11607. return locale2;
  11608. }
  11609. if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {
  11610. break;
  11611. }
  11612. j--;
  11613. }
  11614. i++;
  11615. }
  11616. return globalLocale;
  11617. }
  11618. function isLocaleNameSane(name) {
  11619. return !!(name && name.match("^[^/\\\\]*$"));
  11620. }
  11621. function loadLocale(name) {
  11622. var oldLocale = null, aliasedRequire;
  11623. if (locales[name] === void 0 && typeof module !== "undefined" && module && module.exports && isLocaleNameSane(name)) {
  11624. try {
  11625. oldLocale = globalLocale._abbr;
  11626. aliasedRequire = require;
  11627. aliasedRequire("./locale/" + name);
  11628. getSetGlobalLocale(oldLocale);
  11629. } catch (e2) {
  11630. locales[name] = null;
  11631. }
  11632. }
  11633. return locales[name];
  11634. }
  11635. function getSetGlobalLocale(key, values) {
  11636. var data;
  11637. if (key) {
  11638. if (isUndefined(values)) {
  11639. data = getLocale(key);
  11640. } else {
  11641. data = defineLocale(key, values);
  11642. }
  11643. if (data) {
  11644. globalLocale = data;
  11645. } else {
  11646. if (typeof console !== "undefined" && console.warn) {
  11647. console.warn(
  11648. "Locale " + key + " not found. Did you forget to load it?"
  11649. );
  11650. }
  11651. }
  11652. }
  11653. return globalLocale._abbr;
  11654. }
  11655. function defineLocale(name, config2) {
  11656. if (config2 !== null) {
  11657. var locale2, parentConfig = baseConfig;
  11658. config2.abbr = name;
  11659. if (locales[name] != null) {
  11660. deprecateSimple(
  11661. "defineLocaleOverride",
  11662. "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
  11663. );
  11664. parentConfig = locales[name]._config;
  11665. } else if (config2.parentLocale != null) {
  11666. if (locales[config2.parentLocale] != null) {
  11667. parentConfig = locales[config2.parentLocale]._config;
  11668. } else {
  11669. locale2 = loadLocale(config2.parentLocale);
  11670. if (locale2 != null) {
  11671. parentConfig = locale2._config;
  11672. } else {
  11673. if (!localeFamilies[config2.parentLocale]) {
  11674. localeFamilies[config2.parentLocale] = [];
  11675. }
  11676. localeFamilies[config2.parentLocale].push({
  11677. name,
  11678. config: config2
  11679. });
  11680. return null;
  11681. }
  11682. }
  11683. }
  11684. locales[name] = new Locale(mergeConfigs(parentConfig, config2));
  11685. if (localeFamilies[name]) {
  11686. localeFamilies[name].forEach(function(x) {
  11687. defineLocale(x.name, x.config);
  11688. });
  11689. }
  11690. getSetGlobalLocale(name);
  11691. return locales[name];
  11692. } else {
  11693. delete locales[name];
  11694. return null;
  11695. }
  11696. }
  11697. function updateLocale(name, config2) {
  11698. if (config2 != null) {
  11699. var locale2, tmpLocale, parentConfig = baseConfig;
  11700. if (locales[name] != null && locales[name].parentLocale != null) {
  11701. locales[name].set(mergeConfigs(locales[name]._config, config2));
  11702. } else {
  11703. tmpLocale = loadLocale(name);
  11704. if (tmpLocale != null) {
  11705. parentConfig = tmpLocale._config;
  11706. }
  11707. config2 = mergeConfigs(parentConfig, config2);
  11708. if (tmpLocale == null) {
  11709. config2.abbr = name;
  11710. }
  11711. locale2 = new Locale(config2);
  11712. locale2.parentLocale = locales[name];
  11713. locales[name] = locale2;
  11714. }
  11715. getSetGlobalLocale(name);
  11716. } else {
  11717. if (locales[name] != null) {
  11718. if (locales[name].parentLocale != null) {
  11719. locales[name] = locales[name].parentLocale;
  11720. if (name === getSetGlobalLocale()) {
  11721. getSetGlobalLocale(name);
  11722. }
  11723. } else if (locales[name] != null) {
  11724. delete locales[name];
  11725. }
  11726. }
  11727. }
  11728. return locales[name];
  11729. }
  11730. function getLocale(key) {
  11731. var locale2;
  11732. if (key && key._locale && key._locale._abbr) {
  11733. key = key._locale._abbr;
  11734. }
  11735. if (!key) {
  11736. return globalLocale;
  11737. }
  11738. if (!isArray(key)) {
  11739. locale2 = loadLocale(key);
  11740. if (locale2) {
  11741. return locale2;
  11742. }
  11743. key = [key];
  11744. }
  11745. return chooseLocale(key);
  11746. }
  11747. function listLocales() {
  11748. return keys(locales);
  11749. }
  11750. function checkOverflow(m) {
  11751. var overflow, a = m._a;
  11752. if (a && getParsingFlags(m).overflow === -2) {
  11753. overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;
  11754. if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  11755. overflow = DATE;
  11756. }
  11757. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  11758. overflow = WEEK;
  11759. }
  11760. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  11761. overflow = WEEKDAY;
  11762. }
  11763. getParsingFlags(m).overflow = overflow;
  11764. }
  11765. return m;
  11766. }
  11767. var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [
  11768. ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
  11769. ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
  11770. ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
  11771. ["GGGG-[W]WW", /\d{4}-W\d\d/, false],
  11772. ["YYYY-DDD", /\d{4}-\d{3}/],
  11773. ["YYYY-MM", /\d{4}-\d\d/, false],
  11774. ["YYYYYYMMDD", /[+-]\d{10}/],
  11775. ["YYYYMMDD", /\d{8}/],
  11776. ["GGGG[W]WWE", /\d{4}W\d{3}/],
  11777. ["GGGG[W]WW", /\d{4}W\d{2}/, false],
  11778. ["YYYYDDD", /\d{7}/],
  11779. ["YYYYMM", /\d{6}/, false],
  11780. ["YYYY", /\d{4}/, false]
  11781. ], isoTimes = [
  11782. ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
  11783. ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
  11784. ["HH:mm:ss", /\d\d:\d\d:\d\d/],
  11785. ["HH:mm", /\d\d:\d\d/],
  11786. ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
  11787. ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
  11788. ["HHmmss", /\d\d\d\d\d\d/],
  11789. ["HHmm", /\d\d\d\d/],
  11790. ["HH", /\d\d/]
  11791. ], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, obsOffsets = {
  11792. UT: 0,
  11793. GMT: 0,
  11794. EDT: -4 * 60,
  11795. EST: -5 * 60,
  11796. CDT: -5 * 60,
  11797. CST: -6 * 60,
  11798. MDT: -6 * 60,
  11799. MST: -7 * 60,
  11800. PDT: -7 * 60,
  11801. PST: -8 * 60
  11802. };
  11803. function configFromISO(config2) {
  11804. var i, l, string2 = config2._i, match = extendedIsoRegex.exec(string2) || basicIsoRegex.exec(string2), allowTime, dateFormat, timeFormat2, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
  11805. if (match) {
  11806. getParsingFlags(config2).iso = true;
  11807. for (i = 0, l = isoDatesLen; i < l; i++) {
  11808. if (isoDates[i][1].exec(match[1])) {
  11809. dateFormat = isoDates[i][0];
  11810. allowTime = isoDates[i][2] !== false;
  11811. break;
  11812. }
  11813. }
  11814. if (dateFormat == null) {
  11815. config2._isValid = false;
  11816. return;
  11817. }
  11818. if (match[3]) {
  11819. for (i = 0, l = isoTimesLen; i < l; i++) {
  11820. if (isoTimes[i][1].exec(match[3])) {
  11821. timeFormat2 = (match[2] || " ") + isoTimes[i][0];
  11822. break;
  11823. }
  11824. }
  11825. if (timeFormat2 == null) {
  11826. config2._isValid = false;
  11827. return;
  11828. }
  11829. }
  11830. if (!allowTime && timeFormat2 != null) {
  11831. config2._isValid = false;
  11832. return;
  11833. }
  11834. if (match[4]) {
  11835. if (tzRegex.exec(match[4])) {
  11836. tzFormat = "Z";
  11837. } else {
  11838. config2._isValid = false;
  11839. return;
  11840. }
  11841. }
  11842. config2._f = dateFormat + (timeFormat2 || "") + (tzFormat || "");
  11843. configFromStringAndFormat(config2);
  11844. } else {
  11845. config2._isValid = false;
  11846. }
  11847. }
  11848. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  11849. var result = [
  11850. untruncateYear(yearStr),
  11851. defaultLocaleMonthsShort.indexOf(monthStr),
  11852. parseInt(dayStr, 10),
  11853. parseInt(hourStr, 10),
  11854. parseInt(minuteStr, 10)
  11855. ];
  11856. if (secondStr) {
  11857. result.push(parseInt(secondStr, 10));
  11858. }
  11859. return result;
  11860. }
  11861. function untruncateYear(yearStr) {
  11862. var year = parseInt(yearStr, 10);
  11863. if (year <= 49) {
  11864. return 2e3 + year;
  11865. } else if (year <= 999) {
  11866. return 1900 + year;
  11867. }
  11868. return year;
  11869. }
  11870. function preprocessRFC2822(s2) {
  11871. return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
  11872. }
  11873. function checkWeekday(weekdayStr, parsedInput, config2) {
  11874. if (weekdayStr) {
  11875. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(
  11876. parsedInput[0],
  11877. parsedInput[1],
  11878. parsedInput[2]
  11879. ).getDay();
  11880. if (weekdayProvided !== weekdayActual) {
  11881. getParsingFlags(config2).weekdayMismatch = true;
  11882. config2._isValid = false;
  11883. return false;
  11884. }
  11885. }
  11886. return true;
  11887. }
  11888. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  11889. if (obsOffset) {
  11890. return obsOffsets[obsOffset];
  11891. } else if (militaryOffset) {
  11892. return 0;
  11893. } else {
  11894. var hm = parseInt(numOffset, 10), m = hm % 100, h = (hm - m) / 100;
  11895. return h * 60 + m;
  11896. }
  11897. }
  11898. function configFromRFC2822(config2) {
  11899. var match = rfc2822.exec(preprocessRFC2822(config2._i)), parsedArray;
  11900. if (match) {
  11901. parsedArray = extractFromRFC2822Strings(
  11902. match[4],
  11903. match[3],
  11904. match[2],
  11905. match[5],
  11906. match[6],
  11907. match[7]
  11908. );
  11909. if (!checkWeekday(match[1], parsedArray, config2)) {
  11910. return;
  11911. }
  11912. config2._a = parsedArray;
  11913. config2._tzm = calculateOffset(match[8], match[9], match[10]);
  11914. config2._d = createUTCDate.apply(null, config2._a);
  11915. config2._d.setUTCMinutes(config2._d.getUTCMinutes() - config2._tzm);
  11916. getParsingFlags(config2).rfc2822 = true;
  11917. } else {
  11918. config2._isValid = false;
  11919. }
  11920. }
  11921. function configFromString(config2) {
  11922. var matched = aspNetJsonRegex.exec(config2._i);
  11923. if (matched !== null) {
  11924. config2._d = /* @__PURE__ */ new Date(+matched[1]);
  11925. return;
  11926. }
  11927. configFromISO(config2);
  11928. if (config2._isValid === false) {
  11929. delete config2._isValid;
  11930. } else {
  11931. return;
  11932. }
  11933. configFromRFC2822(config2);
  11934. if (config2._isValid === false) {
  11935. delete config2._isValid;
  11936. } else {
  11937. return;
  11938. }
  11939. if (config2._strict) {
  11940. config2._isValid = false;
  11941. } else {
  11942. hooks.createFromInputFallback(config2);
  11943. }
  11944. }
  11945. hooks.createFromInputFallback = deprecate(
  11946. "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
  11947. function(config2) {
  11948. config2._d = /* @__PURE__ */ new Date(config2._i + (config2._useUTC ? " UTC" : ""));
  11949. }
  11950. );
  11951. function defaults(a, b, c) {
  11952. if (a != null) {
  11953. return a;
  11954. }
  11955. if (b != null) {
  11956. return b;
  11957. }
  11958. return c;
  11959. }
  11960. function currentDateArray(config2) {
  11961. var nowValue = new Date(hooks.now());
  11962. if (config2._useUTC) {
  11963. return [
  11964. nowValue.getUTCFullYear(),
  11965. nowValue.getUTCMonth(),
  11966. nowValue.getUTCDate()
  11967. ];
  11968. }
  11969. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  11970. }
  11971. function configFromArray(config2) {
  11972. var i, date3, input = [], currentDate, expectedWeekday, yearToUse;
  11973. if (config2._d) {
  11974. return;
  11975. }
  11976. currentDate = currentDateArray(config2);
  11977. if (config2._w && config2._a[DATE] == null && config2._a[MONTH] == null) {
  11978. dayOfYearFromWeekInfo(config2);
  11979. }
  11980. if (config2._dayOfYear != null) {
  11981. yearToUse = defaults(config2._a[YEAR], currentDate[YEAR]);
  11982. if (config2._dayOfYear > daysInYear(yearToUse) || config2._dayOfYear === 0) {
  11983. getParsingFlags(config2)._overflowDayOfYear = true;
  11984. }
  11985. date3 = createUTCDate(yearToUse, 0, config2._dayOfYear);
  11986. config2._a[MONTH] = date3.getUTCMonth();
  11987. config2._a[DATE] = date3.getUTCDate();
  11988. }
  11989. for (i = 0; i < 3 && config2._a[i] == null; ++i) {
  11990. config2._a[i] = input[i] = currentDate[i];
  11991. }
  11992. for (; i < 7; i++) {
  11993. config2._a[i] = input[i] = config2._a[i] == null ? i === 2 ? 1 : 0 : config2._a[i];
  11994. }
  11995. if (config2._a[HOUR] === 24 && config2._a[MINUTE] === 0 && config2._a[SECOND] === 0 && config2._a[MILLISECOND] === 0) {
  11996. config2._nextDay = true;
  11997. config2._a[HOUR] = 0;
  11998. }
  11999. config2._d = (config2._useUTC ? createUTCDate : createDate).apply(
  12000. null,
  12001. input
  12002. );
  12003. expectedWeekday = config2._useUTC ? config2._d.getUTCDay() : config2._d.getDay();
  12004. if (config2._tzm != null) {
  12005. config2._d.setUTCMinutes(config2._d.getUTCMinutes() - config2._tzm);
  12006. }
  12007. if (config2._nextDay) {
  12008. config2._a[HOUR] = 24;
  12009. }
  12010. if (config2._w && typeof config2._w.d !== "undefined" && config2._w.d !== expectedWeekday) {
  12011. getParsingFlags(config2).weekdayMismatch = true;
  12012. }
  12013. }
  12014. function dayOfYearFromWeekInfo(config2) {
  12015. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
  12016. w = config2._w;
  12017. if (w.GG != null || w.W != null || w.E != null) {
  12018. dow = 1;
  12019. doy = 4;
  12020. weekYear = defaults(
  12021. w.GG,
  12022. config2._a[YEAR],
  12023. weekOfYear(createLocal(), 1, 4).year
  12024. );
  12025. week = defaults(w.W, 1);
  12026. weekday = defaults(w.E, 1);
  12027. if (weekday < 1 || weekday > 7) {
  12028. weekdayOverflow = true;
  12029. }
  12030. } else {
  12031. dow = config2._locale._week.dow;
  12032. doy = config2._locale._week.doy;
  12033. curWeek = weekOfYear(createLocal(), dow, doy);
  12034. weekYear = defaults(w.gg, config2._a[YEAR], curWeek.year);
  12035. week = defaults(w.w, curWeek.week);
  12036. if (w.d != null) {
  12037. weekday = w.d;
  12038. if (weekday < 0 || weekday > 6) {
  12039. weekdayOverflow = true;
  12040. }
  12041. } else if (w.e != null) {
  12042. weekday = w.e + dow;
  12043. if (w.e < 0 || w.e > 6) {
  12044. weekdayOverflow = true;
  12045. }
  12046. } else {
  12047. weekday = dow;
  12048. }
  12049. }
  12050. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  12051. getParsingFlags(config2)._overflowWeeks = true;
  12052. } else if (weekdayOverflow != null) {
  12053. getParsingFlags(config2)._overflowWeekday = true;
  12054. } else {
  12055. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  12056. config2._a[YEAR] = temp.year;
  12057. config2._dayOfYear = temp.dayOfYear;
  12058. }
  12059. }
  12060. hooks.ISO_8601 = function() {
  12061. };
  12062. hooks.RFC_2822 = function() {
  12063. };
  12064. function configFromStringAndFormat(config2) {
  12065. if (config2._f === hooks.ISO_8601) {
  12066. configFromISO(config2);
  12067. return;
  12068. }
  12069. if (config2._f === hooks.RFC_2822) {
  12070. configFromRFC2822(config2);
  12071. return;
  12072. }
  12073. config2._a = [];
  12074. getParsingFlags(config2).empty = true;
  12075. var string2 = "" + config2._i, i, parsedInput, tokens2, token2, skipped, stringLength = string2.length, totalParsedInputLength = 0, era, tokenLen;
  12076. tokens2 = expandFormat(config2._f, config2._locale).match(formattingTokens) || [];
  12077. tokenLen = tokens2.length;
  12078. for (i = 0; i < tokenLen; i++) {
  12079. token2 = tokens2[i];
  12080. parsedInput = (string2.match(getParseRegexForToken(token2, config2)) || [])[0];
  12081. if (parsedInput) {
  12082. skipped = string2.substr(0, string2.indexOf(parsedInput));
  12083. if (skipped.length > 0) {
  12084. getParsingFlags(config2).unusedInput.push(skipped);
  12085. }
  12086. string2 = string2.slice(
  12087. string2.indexOf(parsedInput) + parsedInput.length
  12088. );
  12089. totalParsedInputLength += parsedInput.length;
  12090. }
  12091. if (formatTokenFunctions[token2]) {
  12092. if (parsedInput) {
  12093. getParsingFlags(config2).empty = false;
  12094. } else {
  12095. getParsingFlags(config2).unusedTokens.push(token2);
  12096. }
  12097. addTimeToArrayFromToken(token2, parsedInput, config2);
  12098. } else if (config2._strict && !parsedInput) {
  12099. getParsingFlags(config2).unusedTokens.push(token2);
  12100. }
  12101. }
  12102. getParsingFlags(config2).charsLeftOver = stringLength - totalParsedInputLength;
  12103. if (string2.length > 0) {
  12104. getParsingFlags(config2).unusedInput.push(string2);
  12105. }
  12106. if (config2._a[HOUR] <= 12 && getParsingFlags(config2).bigHour === true && config2._a[HOUR] > 0) {
  12107. getParsingFlags(config2).bigHour = void 0;
  12108. }
  12109. getParsingFlags(config2).parsedDateParts = config2._a.slice(0);
  12110. getParsingFlags(config2).meridiem = config2._meridiem;
  12111. config2._a[HOUR] = meridiemFixWrap(
  12112. config2._locale,
  12113. config2._a[HOUR],
  12114. config2._meridiem
  12115. );
  12116. era = getParsingFlags(config2).era;
  12117. if (era !== null) {
  12118. config2._a[YEAR] = config2._locale.erasConvertYear(era, config2._a[YEAR]);
  12119. }
  12120. configFromArray(config2);
  12121. checkOverflow(config2);
  12122. }
  12123. function meridiemFixWrap(locale2, hour, meridiem2) {
  12124. var isPm;
  12125. if (meridiem2 == null) {
  12126. return hour;
  12127. }
  12128. if (locale2.meridiemHour != null) {
  12129. return locale2.meridiemHour(hour, meridiem2);
  12130. } else if (locale2.isPM != null) {
  12131. isPm = locale2.isPM(meridiem2);
  12132. if (isPm && hour < 12) {
  12133. hour += 12;
  12134. }
  12135. if (!isPm && hour === 12) {
  12136. hour = 0;
  12137. }
  12138. return hour;
  12139. } else {
  12140. return hour;
  12141. }
  12142. }
  12143. function configFromStringAndArray(config2) {
  12144. var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config2._f.length;
  12145. if (configfLen === 0) {
  12146. getParsingFlags(config2).invalidFormat = true;
  12147. config2._d = /* @__PURE__ */ new Date(NaN);
  12148. return;
  12149. }
  12150. for (i = 0; i < configfLen; i++) {
  12151. currentScore = 0;
  12152. validFormatFound = false;
  12153. tempConfig = copyConfig({}, config2);
  12154. if (config2._useUTC != null) {
  12155. tempConfig._useUTC = config2._useUTC;
  12156. }
  12157. tempConfig._f = config2._f[i];
  12158. configFromStringAndFormat(tempConfig);
  12159. if (isValid(tempConfig)) {
  12160. validFormatFound = true;
  12161. }
  12162. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  12163. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  12164. getParsingFlags(tempConfig).score = currentScore;
  12165. if (!bestFormatIsValid) {
  12166. if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {
  12167. scoreToBeat = currentScore;
  12168. bestMoment = tempConfig;
  12169. if (validFormatFound) {
  12170. bestFormatIsValid = true;
  12171. }
  12172. }
  12173. } else {
  12174. if (currentScore < scoreToBeat) {
  12175. scoreToBeat = currentScore;
  12176. bestMoment = tempConfig;
  12177. }
  12178. }
  12179. }
  12180. extend(config2, bestMoment || tempConfig);
  12181. }
  12182. function configFromObject(config2) {
  12183. if (config2._d) {
  12184. return;
  12185. }
  12186. var i = normalizeObjectUnits(config2._i), dayOrDate = i.day === void 0 ? i.date : i.day;
  12187. config2._a = map(
  12188. [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
  12189. function(obj) {
  12190. return obj && parseInt(obj, 10);
  12191. }
  12192. );
  12193. configFromArray(config2);
  12194. }
  12195. function createFromConfig(config2) {
  12196. var res = new Moment(checkOverflow(prepareConfig(config2)));
  12197. if (res._nextDay) {
  12198. res.add(1, "d");
  12199. res._nextDay = void 0;
  12200. }
  12201. return res;
  12202. }
  12203. function prepareConfig(config2) {
  12204. var input = config2._i, format2 = config2._f;
  12205. config2._locale = config2._locale || getLocale(config2._l);
  12206. if (input === null || format2 === void 0 && input === "") {
  12207. return createInvalid({ nullInput: true });
  12208. }
  12209. if (typeof input === "string") {
  12210. config2._i = input = config2._locale.preparse(input);
  12211. }
  12212. if (isMoment(input)) {
  12213. return new Moment(checkOverflow(input));
  12214. } else if (isDate(input)) {
  12215. config2._d = input;
  12216. } else if (isArray(format2)) {
  12217. configFromStringAndArray(config2);
  12218. } else if (format2) {
  12219. configFromStringAndFormat(config2);
  12220. } else {
  12221. configFromInput(config2);
  12222. }
  12223. if (!isValid(config2)) {
  12224. config2._d = null;
  12225. }
  12226. return config2;
  12227. }
  12228. function configFromInput(config2) {
  12229. var input = config2._i;
  12230. if (isUndefined(input)) {
  12231. config2._d = new Date(hooks.now());
  12232. } else if (isDate(input)) {
  12233. config2._d = new Date(input.valueOf());
  12234. } else if (typeof input === "string") {
  12235. configFromString(config2);
  12236. } else if (isArray(input)) {
  12237. config2._a = map(input.slice(0), function(obj) {
  12238. return parseInt(obj, 10);
  12239. });
  12240. configFromArray(config2);
  12241. } else if (isObject(input)) {
  12242. configFromObject(config2);
  12243. } else if (isNumber(input)) {
  12244. config2._d = new Date(input);
  12245. } else {
  12246. hooks.createFromInputFallback(config2);
  12247. }
  12248. }
  12249. function createLocalOrUTC(input, format2, locale2, strict, isUTC) {
  12250. var c = {};
  12251. if (format2 === true || format2 === false) {
  12252. strict = format2;
  12253. format2 = void 0;
  12254. }
  12255. if (locale2 === true || locale2 === false) {
  12256. strict = locale2;
  12257. locale2 = void 0;
  12258. }
  12259. if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {
  12260. input = void 0;
  12261. }
  12262. c._isAMomentObject = true;
  12263. c._useUTC = c._isUTC = isUTC;
  12264. c._l = locale2;
  12265. c._i = input;
  12266. c._f = format2;
  12267. c._strict = strict;
  12268. return createFromConfig(c);
  12269. }
  12270. function createLocal(input, format2, locale2, strict) {
  12271. return createLocalOrUTC(input, format2, locale2, strict, false);
  12272. }
  12273. var prototypeMin = deprecate(
  12274. "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
  12275. function() {
  12276. var other = createLocal.apply(null, arguments);
  12277. if (this.isValid() && other.isValid()) {
  12278. return other < this ? this : other;
  12279. } else {
  12280. return createInvalid();
  12281. }
  12282. }
  12283. ), prototypeMax = deprecate(
  12284. "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
  12285. function() {
  12286. var other = createLocal.apply(null, arguments);
  12287. if (this.isValid() && other.isValid()) {
  12288. return other > this ? this : other;
  12289. } else {
  12290. return createInvalid();
  12291. }
  12292. }
  12293. );
  12294. function pickBy(fn, moments) {
  12295. var res, i;
  12296. if (moments.length === 1 && isArray(moments[0])) {
  12297. moments = moments[0];
  12298. }
  12299. if (!moments.length) {
  12300. return createLocal();
  12301. }
  12302. res = moments[0];
  12303. for (i = 1; i < moments.length; ++i) {
  12304. if (!moments[i].isValid() || moments[i][fn](res)) {
  12305. res = moments[i];
  12306. }
  12307. }
  12308. return res;
  12309. }
  12310. function min() {
  12311. var args = [].slice.call(arguments, 0);
  12312. return pickBy("isBefore", args);
  12313. }
  12314. function max() {
  12315. var args = [].slice.call(arguments, 0);
  12316. return pickBy("isAfter", args);
  12317. }
  12318. var now = function() {
  12319. return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
  12320. };
  12321. var ordering = [
  12322. "year",
  12323. "quarter",
  12324. "month",
  12325. "week",
  12326. "day",
  12327. "hour",
  12328. "minute",
  12329. "second",
  12330. "millisecond"
  12331. ];
  12332. function isDurationValid(m) {
  12333. var key, unitHasDecimal = false, i, orderLen = ordering.length;
  12334. for (key in m) {
  12335. if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
  12336. return false;
  12337. }
  12338. }
  12339. for (i = 0; i < orderLen; ++i) {
  12340. if (m[ordering[i]]) {
  12341. if (unitHasDecimal) {
  12342. return false;
  12343. }
  12344. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  12345. unitHasDecimal = true;
  12346. }
  12347. }
  12348. }
  12349. return true;
  12350. }
  12351. function isValid$1() {
  12352. return this._isValid;
  12353. }
  12354. function createInvalid$1() {
  12355. return createDuration(NaN);
  12356. }
  12357. function Duration(duration) {
  12358. var normalizedInput = normalizeObjectUnits(duration), years2 = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months2 = normalizedInput.month || 0, weeks2 = normalizedInput.week || normalizedInput.isoWeek || 0, days2 = normalizedInput.day || 0, hours2 = normalizedInput.hour || 0, minutes2 = normalizedInput.minute || 0, seconds2 = normalizedInput.second || 0, milliseconds2 = normalizedInput.millisecond || 0;
  12359. this._isValid = isDurationValid(normalizedInput);
  12360. this._milliseconds = +milliseconds2 + seconds2 * 1e3 + // 1000
  12361. minutes2 * 6e4 + // 1000 * 60
  12362. hours2 * 1e3 * 60 * 60;
  12363. this._days = +days2 + weeks2 * 7;
  12364. this._months = +months2 + quarters * 3 + years2 * 12;
  12365. this._data = {};
  12366. this._locale = getLocale();
  12367. this._bubble();
  12368. }
  12369. function isDuration(obj) {
  12370. return obj instanceof Duration;
  12371. }
  12372. function absRound(number3) {
  12373. if (number3 < 0) {
  12374. return Math.round(-1 * number3) * -1;
  12375. } else {
  12376. return Math.round(number3);
  12377. }
  12378. }
  12379. function compareArrays(array1, array22, dontConvert) {
  12380. var len = Math.min(array1.length, array22.length), lengthDiff = Math.abs(array1.length - array22.length), diffs = 0, i;
  12381. for (i = 0; i < len; i++) {
  12382. if (dontConvert && array1[i] !== array22[i] || !dontConvert && toInt(array1[i]) !== toInt(array22[i])) {
  12383. diffs++;
  12384. }
  12385. }
  12386. return diffs + lengthDiff;
  12387. }
  12388. function offset(token2, separator) {
  12389. addFormatToken(token2, 0, 0, function() {
  12390. var offset2 = this.utcOffset(), sign2 = "+";
  12391. if (offset2 < 0) {
  12392. offset2 = -offset2;
  12393. sign2 = "-";
  12394. }
  12395. return sign2 + zeroFill(~~(offset2 / 60), 2) + separator + zeroFill(~~offset2 % 60, 2);
  12396. });
  12397. }
  12398. offset("Z", ":");
  12399. offset("ZZ", "");
  12400. addRegexToken("Z", matchShortOffset);
  12401. addRegexToken("ZZ", matchShortOffset);
  12402. addParseToken(["Z", "ZZ"], function(input, array3, config2) {
  12403. config2._useUTC = true;
  12404. config2._tzm = offsetFromString(matchShortOffset, input);
  12405. });
  12406. var chunkOffset = /([\+\-]|\d\d)/gi;
  12407. function offsetFromString(matcher, string2) {
  12408. var matches = (string2 || "").match(matcher), chunk, parts, minutes2;
  12409. if (matches === null) {
  12410. return null;
  12411. }
  12412. chunk = matches[matches.length - 1] || [];
  12413. parts = (chunk + "").match(chunkOffset) || ["-", 0, 0];
  12414. minutes2 = +(parts[1] * 60) + toInt(parts[2]);
  12415. return minutes2 === 0 ? 0 : parts[0] === "+" ? minutes2 : -minutes2;
  12416. }
  12417. function cloneWithOffset(input, model) {
  12418. var res, diff2;
  12419. if (model._isUTC) {
  12420. res = model.clone();
  12421. diff2 = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
  12422. res._d.setTime(res._d.valueOf() + diff2);
  12423. hooks.updateOffset(res, false);
  12424. return res;
  12425. } else {
  12426. return createLocal(input).local();
  12427. }
  12428. }
  12429. function getDateOffset(m) {
  12430. return -Math.round(m._d.getTimezoneOffset());
  12431. }
  12432. hooks.updateOffset = function() {
  12433. };
  12434. function getSetOffset(input, keepLocalTime, keepMinutes) {
  12435. var offset2 = this._offset || 0, localAdjust;
  12436. if (!this.isValid()) {
  12437. return input != null ? this : NaN;
  12438. }
  12439. if (input != null) {
  12440. if (typeof input === "string") {
  12441. input = offsetFromString(matchShortOffset, input);
  12442. if (input === null) {
  12443. return this;
  12444. }
  12445. } else if (Math.abs(input) < 16 && !keepMinutes) {
  12446. input = input * 60;
  12447. }
  12448. if (!this._isUTC && keepLocalTime) {
  12449. localAdjust = getDateOffset(this);
  12450. }
  12451. this._offset = input;
  12452. this._isUTC = true;
  12453. if (localAdjust != null) {
  12454. this.add(localAdjust, "m");
  12455. }
  12456. if (offset2 !== input) {
  12457. if (!keepLocalTime || this._changeInProgress) {
  12458. addSubtract(
  12459. this,
  12460. createDuration(input - offset2, "m"),
  12461. 1,
  12462. false
  12463. );
  12464. } else if (!this._changeInProgress) {
  12465. this._changeInProgress = true;
  12466. hooks.updateOffset(this, true);
  12467. this._changeInProgress = null;
  12468. }
  12469. }
  12470. return this;
  12471. } else {
  12472. return this._isUTC ? offset2 : getDateOffset(this);
  12473. }
  12474. }
  12475. function getSetZone(input, keepLocalTime) {
  12476. if (input != null) {
  12477. if (typeof input !== "string") {
  12478. input = -input;
  12479. }
  12480. this.utcOffset(input, keepLocalTime);
  12481. return this;
  12482. } else {
  12483. return -this.utcOffset();
  12484. }
  12485. }
  12486. function setOffsetToUTC(keepLocalTime) {
  12487. return this.utcOffset(0, keepLocalTime);
  12488. }
  12489. function setOffsetToLocal(keepLocalTime) {
  12490. if (this._isUTC) {
  12491. this.utcOffset(0, keepLocalTime);
  12492. this._isUTC = false;
  12493. if (keepLocalTime) {
  12494. this.subtract(getDateOffset(this), "m");
  12495. }
  12496. }
  12497. return this;
  12498. }
  12499. function setOffsetToParsedOffset() {
  12500. if (this._tzm != null) {
  12501. this.utcOffset(this._tzm, false, true);
  12502. } else if (typeof this._i === "string") {
  12503. var tZone = offsetFromString(matchOffset, this._i);
  12504. if (tZone != null) {
  12505. this.utcOffset(tZone);
  12506. } else {
  12507. this.utcOffset(0, true);
  12508. }
  12509. }
  12510. return this;
  12511. }
  12512. function hasAlignedHourOffset(input) {
  12513. if (!this.isValid()) {
  12514. return false;
  12515. }
  12516. input = input ? createLocal(input).utcOffset() : 0;
  12517. return (this.utcOffset() - input) % 60 === 0;
  12518. }
  12519. function isDaylightSavingTime() {
  12520. return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
  12521. }
  12522. function isDaylightSavingTimeShifted() {
  12523. if (!isUndefined(this._isDSTShifted)) {
  12524. return this._isDSTShifted;
  12525. }
  12526. var c = {}, other;
  12527. copyConfig(c, this);
  12528. c = prepareConfig(c);
  12529. if (c._a) {
  12530. other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  12531. this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;
  12532. } else {
  12533. this._isDSTShifted = false;
  12534. }
  12535. return this._isDSTShifted;
  12536. }
  12537. function isLocal() {
  12538. return this.isValid() ? !this._isUTC : false;
  12539. }
  12540. function isUtcOffset() {
  12541. return this.isValid() ? this._isUTC : false;
  12542. }
  12543. function isUtc() {
  12544. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  12545. }
  12546. var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  12547. function createDuration(input, key) {
  12548. var duration = input, match = null, sign2, ret, diffRes;
  12549. if (isDuration(input)) {
  12550. duration = {
  12551. ms: input._milliseconds,
  12552. d: input._days,
  12553. M: input._months
  12554. };
  12555. } else if (isNumber(input) || !isNaN(+input)) {
  12556. duration = {};
  12557. if (key) {
  12558. duration[key] = +input;
  12559. } else {
  12560. duration.milliseconds = +input;
  12561. }
  12562. } else if (match = aspNetRegex.exec(input)) {
  12563. sign2 = match[1] === "-" ? -1 : 1;
  12564. duration = {
  12565. y: 0,
  12566. d: toInt(match[DATE]) * sign2,
  12567. h: toInt(match[HOUR]) * sign2,
  12568. m: toInt(match[MINUTE]) * sign2,
  12569. s: toInt(match[SECOND]) * sign2,
  12570. ms: toInt(absRound(match[MILLISECOND] * 1e3)) * sign2
  12571. // the millisecond decimal point is included in the match
  12572. };
  12573. } else if (match = isoRegex.exec(input)) {
  12574. sign2 = match[1] === "-" ? -1 : 1;
  12575. duration = {
  12576. y: parseIso(match[2], sign2),
  12577. M: parseIso(match[3], sign2),
  12578. w: parseIso(match[4], sign2),
  12579. d: parseIso(match[5], sign2),
  12580. h: parseIso(match[6], sign2),
  12581. m: parseIso(match[7], sign2),
  12582. s: parseIso(match[8], sign2)
  12583. };
  12584. } else if (duration == null) {
  12585. duration = {};
  12586. } else if (typeof duration === "object" && ("from" in duration || "to" in duration)) {
  12587. diffRes = momentsDifference(
  12588. createLocal(duration.from),
  12589. createLocal(duration.to)
  12590. );
  12591. duration = {};
  12592. duration.ms = diffRes.milliseconds;
  12593. duration.M = diffRes.months;
  12594. }
  12595. ret = new Duration(duration);
  12596. if (isDuration(input) && hasOwnProp(input, "_locale")) {
  12597. ret._locale = input._locale;
  12598. }
  12599. if (isDuration(input) && hasOwnProp(input, "_isValid")) {
  12600. ret._isValid = input._isValid;
  12601. }
  12602. return ret;
  12603. }
  12604. createDuration.fn = Duration.prototype;
  12605. createDuration.invalid = createInvalid$1;
  12606. function parseIso(inp, sign2) {
  12607. var res = inp && parseFloat(inp.replace(",", "."));
  12608. return (isNaN(res) ? 0 : res) * sign2;
  12609. }
  12610. function positiveMomentsDifference(base, other) {
  12611. var res = {};
  12612. res.months = other.month() - base.month() + (other.year() - base.year()) * 12;
  12613. if (base.clone().add(res.months, "M").isAfter(other)) {
  12614. --res.months;
  12615. }
  12616. res.milliseconds = +other - +base.clone().add(res.months, "M");
  12617. return res;
  12618. }
  12619. function momentsDifference(base, other) {
  12620. var res;
  12621. if (!(base.isValid() && other.isValid())) {
  12622. return { milliseconds: 0, months: 0 };
  12623. }
  12624. other = cloneWithOffset(other, base);
  12625. if (base.isBefore(other)) {
  12626. res = positiveMomentsDifference(base, other);
  12627. } else {
  12628. res = positiveMomentsDifference(other, base);
  12629. res.milliseconds = -res.milliseconds;
  12630. res.months = -res.months;
  12631. }
  12632. return res;
  12633. }
  12634. function createAdder(direction, name) {
  12635. return function(val, period) {
  12636. var dur, tmp;
  12637. if (period !== null && !isNaN(+period)) {
  12638. deprecateSimple(
  12639. name,
  12640. "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
  12641. );
  12642. tmp = val;
  12643. val = period;
  12644. period = tmp;
  12645. }
  12646. dur = createDuration(val, period);
  12647. addSubtract(this, dur, direction);
  12648. return this;
  12649. };
  12650. }
  12651. function addSubtract(mom, duration, isAdding, updateOffset) {
  12652. var milliseconds2 = duration._milliseconds, days2 = absRound(duration._days), months2 = absRound(duration._months);
  12653. if (!mom.isValid()) {
  12654. return;
  12655. }
  12656. updateOffset = updateOffset == null ? true : updateOffset;
  12657. if (months2) {
  12658. setMonth(mom, get(mom, "Month") + months2 * isAdding);
  12659. }
  12660. if (days2) {
  12661. set$1(mom, "Date", get(mom, "Date") + days2 * isAdding);
  12662. }
  12663. if (milliseconds2) {
  12664. mom._d.setTime(mom._d.valueOf() + milliseconds2 * isAdding);
  12665. }
  12666. if (updateOffset) {
  12667. hooks.updateOffset(mom, days2 || months2);
  12668. }
  12669. }
  12670. var add = createAdder(1, "add"), subtract = createAdder(-1, "subtract");
  12671. function isString(input) {
  12672. return typeof input === "string" || input instanceof String;
  12673. }
  12674. function isMomentInput(input) {
  12675. return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0;
  12676. }
  12677. function isMomentInputObject(input) {
  12678. var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [
  12679. "years",
  12680. "year",
  12681. "y",
  12682. "months",
  12683. "month",
  12684. "M",
  12685. "days",
  12686. "day",
  12687. "d",
  12688. "dates",
  12689. "date",
  12690. "D",
  12691. "hours",
  12692. "hour",
  12693. "h",
  12694. "minutes",
  12695. "minute",
  12696. "m",
  12697. "seconds",
  12698. "second",
  12699. "s",
  12700. "milliseconds",
  12701. "millisecond",
  12702. "ms"
  12703. ], i, property, propertyLen = properties.length;
  12704. for (i = 0; i < propertyLen; i += 1) {
  12705. property = properties[i];
  12706. propertyTest = propertyTest || hasOwnProp(input, property);
  12707. }
  12708. return objectTest && propertyTest;
  12709. }
  12710. function isNumberOrStringArray(input) {
  12711. var arrayTest = isArray(input), dataTypeTest = false;
  12712. if (arrayTest) {
  12713. dataTypeTest = input.filter(function(item) {
  12714. return !isNumber(item) && isString(input);
  12715. }).length === 0;
  12716. }
  12717. return arrayTest && dataTypeTest;
  12718. }
  12719. function isCalendarSpec(input) {
  12720. var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [
  12721. "sameDay",
  12722. "nextDay",
  12723. "lastDay",
  12724. "nextWeek",
  12725. "lastWeek",
  12726. "sameElse"
  12727. ], i, property;
  12728. for (i = 0; i < properties.length; i += 1) {
  12729. property = properties[i];
  12730. propertyTest = propertyTest || hasOwnProp(input, property);
  12731. }
  12732. return objectTest && propertyTest;
  12733. }
  12734. function getCalendarFormat(myMoment, now2) {
  12735. var diff2 = myMoment.diff(now2, "days", true);
  12736. return diff2 < -6 ? "sameElse" : diff2 < -1 ? "lastWeek" : diff2 < 0 ? "lastDay" : diff2 < 1 ? "sameDay" : diff2 < 2 ? "nextDay" : diff2 < 7 ? "nextWeek" : "sameElse";
  12737. }
  12738. function calendar$1(time, formats) {
  12739. if (arguments.length === 1) {
  12740. if (!arguments[0]) {
  12741. time = void 0;
  12742. formats = void 0;
  12743. } else if (isMomentInput(arguments[0])) {
  12744. time = arguments[0];
  12745. formats = void 0;
  12746. } else if (isCalendarSpec(arguments[0])) {
  12747. formats = arguments[0];
  12748. time = void 0;
  12749. }
  12750. }
  12751. var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction(formats[format2]) ? formats[format2].call(this, now2) : formats[format2]);
  12752. return this.format(
  12753. output || this.localeData().calendar(format2, this, createLocal(now2))
  12754. );
  12755. }
  12756. function clone() {
  12757. return new Moment(this);
  12758. }
  12759. function isAfter(input, units) {
  12760. var localInput = isMoment(input) ? input : createLocal(input);
  12761. if (!(this.isValid() && localInput.isValid())) {
  12762. return false;
  12763. }
  12764. units = normalizeUnits(units) || "millisecond";
  12765. if (units === "millisecond") {
  12766. return this.valueOf() > localInput.valueOf();
  12767. } else {
  12768. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  12769. }
  12770. }
  12771. function isBefore(input, units) {
  12772. var localInput = isMoment(input) ? input : createLocal(input);
  12773. if (!(this.isValid() && localInput.isValid())) {
  12774. return false;
  12775. }
  12776. units = normalizeUnits(units) || "millisecond";
  12777. if (units === "millisecond") {
  12778. return this.valueOf() < localInput.valueOf();
  12779. } else {
  12780. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  12781. }
  12782. }
  12783. function isBetween(from2, to2, units, inclusivity) {
  12784. var localFrom = isMoment(from2) ? from2 : createLocal(from2), localTo = isMoment(to2) ? to2 : createLocal(to2);
  12785. if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
  12786. return false;
  12787. }
  12788. inclusivity = inclusivity || "()";
  12789. return (inclusivity[0] === "(" ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ")" ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));
  12790. }
  12791. function isSame(input, units) {
  12792. var localInput = isMoment(input) ? input : createLocal(input), inputMs;
  12793. if (!(this.isValid() && localInput.isValid())) {
  12794. return false;
  12795. }
  12796. units = normalizeUnits(units) || "millisecond";
  12797. if (units === "millisecond") {
  12798. return this.valueOf() === localInput.valueOf();
  12799. } else {
  12800. inputMs = localInput.valueOf();
  12801. return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
  12802. }
  12803. }
  12804. function isSameOrAfter(input, units) {
  12805. return this.isSame(input, units) || this.isAfter(input, units);
  12806. }
  12807. function isSameOrBefore(input, units) {
  12808. return this.isSame(input, units) || this.isBefore(input, units);
  12809. }
  12810. function diff(input, units, asFloat) {
  12811. var that, zoneDelta, output;
  12812. if (!this.isValid()) {
  12813. return NaN;
  12814. }
  12815. that = cloneWithOffset(input, this);
  12816. if (!that.isValid()) {
  12817. return NaN;
  12818. }
  12819. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  12820. units = normalizeUnits(units);
  12821. switch (units) {
  12822. case "year":
  12823. output = monthDiff(this, that) / 12;
  12824. break;
  12825. case "month":
  12826. output = monthDiff(this, that);
  12827. break;
  12828. case "quarter":
  12829. output = monthDiff(this, that) / 3;
  12830. break;
  12831. case "second":
  12832. output = (this - that) / 1e3;
  12833. break;
  12834. case "minute":
  12835. output = (this - that) / 6e4;
  12836. break;
  12837. case "hour":
  12838. output = (this - that) / 36e5;
  12839. break;
  12840. case "day":
  12841. output = (this - that - zoneDelta) / 864e5;
  12842. break;
  12843. case "week":
  12844. output = (this - that - zoneDelta) / 6048e5;
  12845. break;
  12846. default:
  12847. output = this - that;
  12848. }
  12849. return asFloat ? output : absFloor(output);
  12850. }
  12851. function monthDiff(a, b) {
  12852. if (a.date() < b.date()) {
  12853. return -monthDiff(b, a);
  12854. }
  12855. var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
  12856. if (b - anchor < 0) {
  12857. anchor2 = a.clone().add(wholeMonthDiff - 1, "months");
  12858. adjust = (b - anchor) / (anchor - anchor2);
  12859. } else {
  12860. anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
  12861. adjust = (b - anchor) / (anchor2 - anchor);
  12862. }
  12863. return -(wholeMonthDiff + adjust) || 0;
  12864. }
  12865. hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
  12866. hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
  12867. function toString() {
  12868. return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
  12869. }
  12870. function toISOString(keepOffset) {
  12871. if (!this.isValid()) {
  12872. return null;
  12873. }
  12874. var utc = keepOffset !== true, m = utc ? this.clone().utc() : this;
  12875. if (m.year() < 0 || m.year() > 9999) {
  12876. return formatMoment(
  12877. m,
  12878. utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
  12879. );
  12880. }
  12881. if (isFunction(Date.prototype.toISOString)) {
  12882. if (utc) {
  12883. return this.toDate().toISOString();
  12884. } else {
  12885. return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m, "Z"));
  12886. }
  12887. }
  12888. return formatMoment(
  12889. m,
  12890. utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
  12891. );
  12892. }
  12893. function inspect() {
  12894. if (!this.isValid()) {
  12895. return "moment.invalid(/* " + this._i + " */)";
  12896. }
  12897. var func2 = "moment", zone = "", prefix, year, datetime, suffix;
  12898. if (!this.isLocal()) {
  12899. func2 = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone";
  12900. zone = "Z";
  12901. }
  12902. prefix = "[" + func2 + '("]';
  12903. year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY";
  12904. datetime = "-MM-DD[T]HH:mm:ss.SSS";
  12905. suffix = zone + '[")]';
  12906. return this.format(prefix + year + datetime + suffix);
  12907. }
  12908. function format$1(inputString) {
  12909. if (!inputString) {
  12910. inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
  12911. }
  12912. var output = formatMoment(this, inputString);
  12913. return this.localeData().postformat(output);
  12914. }
  12915. function from(time, withoutSuffix) {
  12916. if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
  12917. return createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix);
  12918. } else {
  12919. return this.localeData().invalidDate();
  12920. }
  12921. }
  12922. function fromNow(withoutSuffix) {
  12923. return this.from(createLocal(), withoutSuffix);
  12924. }
  12925. function to(time, withoutSuffix) {
  12926. if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
  12927. return createDuration({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix);
  12928. } else {
  12929. return this.localeData().invalidDate();
  12930. }
  12931. }
  12932. function toNow(withoutSuffix) {
  12933. return this.to(createLocal(), withoutSuffix);
  12934. }
  12935. function locale(key) {
  12936. var newLocaleData;
  12937. if (key === void 0) {
  12938. return this._locale._abbr;
  12939. } else {
  12940. newLocaleData = getLocale(key);
  12941. if (newLocaleData != null) {
  12942. this._locale = newLocaleData;
  12943. }
  12944. return this;
  12945. }
  12946. }
  12947. var lang = deprecate(
  12948. "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
  12949. function(key) {
  12950. if (key === void 0) {
  12951. return this.localeData();
  12952. } else {
  12953. return this.locale(key);
  12954. }
  12955. }
  12956. );
  12957. function localeData() {
  12958. return this._locale;
  12959. }
  12960. var MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
  12961. function mod$1(dividend, divisor) {
  12962. return (dividend % divisor + divisor) % divisor;
  12963. }
  12964. function localStartOfDate(y, m, d) {
  12965. if (y < 100 && y >= 0) {
  12966. return new Date(y + 400, m, d) - MS_PER_400_YEARS;
  12967. } else {
  12968. return new Date(y, m, d).valueOf();
  12969. }
  12970. }
  12971. function utcStartOfDate(y, m, d) {
  12972. if (y < 100 && y >= 0) {
  12973. return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
  12974. } else {
  12975. return Date.UTC(y, m, d);
  12976. }
  12977. }
  12978. function startOf(units) {
  12979. var time, startOfDate;
  12980. units = normalizeUnits(units);
  12981. if (units === void 0 || units === "millisecond" || !this.isValid()) {
  12982. return this;
  12983. }
  12984. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  12985. switch (units) {
  12986. case "year":
  12987. time = startOfDate(this.year(), 0, 1);
  12988. break;
  12989. case "quarter":
  12990. time = startOfDate(
  12991. this.year(),
  12992. this.month() - this.month() % 3,
  12993. 1
  12994. );
  12995. break;
  12996. case "month":
  12997. time = startOfDate(this.year(), this.month(), 1);
  12998. break;
  12999. case "week":
  13000. time = startOfDate(
  13001. this.year(),
  13002. this.month(),
  13003. this.date() - this.weekday()
  13004. );
  13005. break;
  13006. case "isoWeek":
  13007. time = startOfDate(
  13008. this.year(),
  13009. this.month(),
  13010. this.date() - (this.isoWeekday() - 1)
  13011. );
  13012. break;
  13013. case "day":
  13014. case "date":
  13015. time = startOfDate(this.year(), this.month(), this.date());
  13016. break;
  13017. case "hour":
  13018. time = this._d.valueOf();
  13019. time -= mod$1(
  13020. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  13021. MS_PER_HOUR
  13022. );
  13023. break;
  13024. case "minute":
  13025. time = this._d.valueOf();
  13026. time -= mod$1(time, MS_PER_MINUTE);
  13027. break;
  13028. case "second":
  13029. time = this._d.valueOf();
  13030. time -= mod$1(time, MS_PER_SECOND);
  13031. break;
  13032. }
  13033. this._d.setTime(time);
  13034. hooks.updateOffset(this, true);
  13035. return this;
  13036. }
  13037. function endOf(units) {
  13038. var time, startOfDate;
  13039. units = normalizeUnits(units);
  13040. if (units === void 0 || units === "millisecond" || !this.isValid()) {
  13041. return this;
  13042. }
  13043. startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
  13044. switch (units) {
  13045. case "year":
  13046. time = startOfDate(this.year() + 1, 0, 1) - 1;
  13047. break;
  13048. case "quarter":
  13049. time = startOfDate(
  13050. this.year(),
  13051. this.month() - this.month() % 3 + 3,
  13052. 1
  13053. ) - 1;
  13054. break;
  13055. case "month":
  13056. time = startOfDate(this.year(), this.month() + 1, 1) - 1;
  13057. break;
  13058. case "week":
  13059. time = startOfDate(
  13060. this.year(),
  13061. this.month(),
  13062. this.date() - this.weekday() + 7
  13063. ) - 1;
  13064. break;
  13065. case "isoWeek":
  13066. time = startOfDate(
  13067. this.year(),
  13068. this.month(),
  13069. this.date() - (this.isoWeekday() - 1) + 7
  13070. ) - 1;
  13071. break;
  13072. case "day":
  13073. case "date":
  13074. time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
  13075. break;
  13076. case "hour":
  13077. time = this._d.valueOf();
  13078. time += MS_PER_HOUR - mod$1(
  13079. time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
  13080. MS_PER_HOUR
  13081. ) - 1;
  13082. break;
  13083. case "minute":
  13084. time = this._d.valueOf();
  13085. time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
  13086. break;
  13087. case "second":
  13088. time = this._d.valueOf();
  13089. time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
  13090. break;
  13091. }
  13092. this._d.setTime(time);
  13093. hooks.updateOffset(this, true);
  13094. return this;
  13095. }
  13096. function valueOf() {
  13097. return this._d.valueOf() - (this._offset || 0) * 6e4;
  13098. }
  13099. function unix() {
  13100. return Math.floor(this.valueOf() / 1e3);
  13101. }
  13102. function toDate() {
  13103. return new Date(this.valueOf());
  13104. }
  13105. function toArray() {
  13106. var m = this;
  13107. return [
  13108. m.year(),
  13109. m.month(),
  13110. m.date(),
  13111. m.hour(),
  13112. m.minute(),
  13113. m.second(),
  13114. m.millisecond()
  13115. ];
  13116. }
  13117. function toObject() {
  13118. var m = this;
  13119. return {
  13120. years: m.year(),
  13121. months: m.month(),
  13122. date: m.date(),
  13123. hours: m.hours(),
  13124. minutes: m.minutes(),
  13125. seconds: m.seconds(),
  13126. milliseconds: m.milliseconds()
  13127. };
  13128. }
  13129. function toJSON() {
  13130. return this.isValid() ? this.toISOString() : null;
  13131. }
  13132. function isValid$2() {
  13133. return isValid(this);
  13134. }
  13135. function parsingFlags() {
  13136. return extend({}, getParsingFlags(this));
  13137. }
  13138. function invalidAt() {
  13139. return getParsingFlags(this).overflow;
  13140. }
  13141. function creationData() {
  13142. return {
  13143. input: this._i,
  13144. format: this._f,
  13145. locale: this._locale,
  13146. isUTC: this._isUTC,
  13147. strict: this._strict
  13148. };
  13149. }
  13150. addFormatToken("N", 0, 0, "eraAbbr");
  13151. addFormatToken("NN", 0, 0, "eraAbbr");
  13152. addFormatToken("NNN", 0, 0, "eraAbbr");
  13153. addFormatToken("NNNN", 0, 0, "eraName");
  13154. addFormatToken("NNNNN", 0, 0, "eraNarrow");
  13155. addFormatToken("y", ["y", 1], "yo", "eraYear");
  13156. addFormatToken("y", ["yy", 2], 0, "eraYear");
  13157. addFormatToken("y", ["yyy", 3], 0, "eraYear");
  13158. addFormatToken("y", ["yyyy", 4], 0, "eraYear");
  13159. addRegexToken("N", matchEraAbbr);
  13160. addRegexToken("NN", matchEraAbbr);
  13161. addRegexToken("NNN", matchEraAbbr);
  13162. addRegexToken("NNNN", matchEraName);
  13163. addRegexToken("NNNNN", matchEraNarrow);
  13164. addParseToken(
  13165. ["N", "NN", "NNN", "NNNN", "NNNNN"],
  13166. function(input, array3, config2, token2) {
  13167. var era = config2._locale.erasParse(input, token2, config2._strict);
  13168. if (era) {
  13169. getParsingFlags(config2).era = era;
  13170. } else {
  13171. getParsingFlags(config2).invalidEra = input;
  13172. }
  13173. }
  13174. );
  13175. addRegexToken("y", matchUnsigned);
  13176. addRegexToken("yy", matchUnsigned);
  13177. addRegexToken("yyy", matchUnsigned);
  13178. addRegexToken("yyyy", matchUnsigned);
  13179. addRegexToken("yo", matchEraYearOrdinal);
  13180. addParseToken(["y", "yy", "yyy", "yyyy"], YEAR);
  13181. addParseToken(["yo"], function(input, array3, config2, token2) {
  13182. var match;
  13183. if (config2._locale._eraYearOrdinalRegex) {
  13184. match = input.match(config2._locale._eraYearOrdinalRegex);
  13185. }
  13186. if (config2._locale.eraYearOrdinalParse) {
  13187. array3[YEAR] = config2._locale.eraYearOrdinalParse(input, match);
  13188. } else {
  13189. array3[YEAR] = parseInt(input, 10);
  13190. }
  13191. });
  13192. function localeEras(m, format2) {
  13193. var i, l, date3, eras = this._eras || getLocale("en")._eras;
  13194. for (i = 0, l = eras.length; i < l; ++i) {
  13195. switch (typeof eras[i].since) {
  13196. case "string":
  13197. date3 = hooks(eras[i].since).startOf("day");
  13198. eras[i].since = date3.valueOf();
  13199. break;
  13200. }
  13201. switch (typeof eras[i].until) {
  13202. case "undefined":
  13203. eras[i].until = Infinity;
  13204. break;
  13205. case "string":
  13206. date3 = hooks(eras[i].until).startOf("day").valueOf();
  13207. eras[i].until = date3.valueOf();
  13208. break;
  13209. }
  13210. }
  13211. return eras;
  13212. }
  13213. function localeErasParse(eraName, format2, strict) {
  13214. var i, l, eras = this.eras(), name, abbr, narrow;
  13215. eraName = eraName.toUpperCase();
  13216. for (i = 0, l = eras.length; i < l; ++i) {
  13217. name = eras[i].name.toUpperCase();
  13218. abbr = eras[i].abbr.toUpperCase();
  13219. narrow = eras[i].narrow.toUpperCase();
  13220. if (strict) {
  13221. switch (format2) {
  13222. case "N":
  13223. case "NN":
  13224. case "NNN":
  13225. if (abbr === eraName) {
  13226. return eras[i];
  13227. }
  13228. break;
  13229. case "NNNN":
  13230. if (name === eraName) {
  13231. return eras[i];
  13232. }
  13233. break;
  13234. case "NNNNN":
  13235. if (narrow === eraName) {
  13236. return eras[i];
  13237. }
  13238. break;
  13239. }
  13240. } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
  13241. return eras[i];
  13242. }
  13243. }
  13244. }
  13245. function localeErasConvertYear(era, year) {
  13246. var dir = era.since <= era.until ? 1 : -1;
  13247. if (year === void 0) {
  13248. return hooks(era.since).year();
  13249. } else {
  13250. return hooks(era.since).year() + (year - era.offset) * dir;
  13251. }
  13252. }
  13253. function getEraName() {
  13254. var i, l, val, eras = this.localeData().eras();
  13255. for (i = 0, l = eras.length; i < l; ++i) {
  13256. val = this.clone().startOf("day").valueOf();
  13257. if (eras[i].since <= val && val <= eras[i].until) {
  13258. return eras[i].name;
  13259. }
  13260. if (eras[i].until <= val && val <= eras[i].since) {
  13261. return eras[i].name;
  13262. }
  13263. }
  13264. return "";
  13265. }
  13266. function getEraNarrow() {
  13267. var i, l, val, eras = this.localeData().eras();
  13268. for (i = 0, l = eras.length; i < l; ++i) {
  13269. val = this.clone().startOf("day").valueOf();
  13270. if (eras[i].since <= val && val <= eras[i].until) {
  13271. return eras[i].narrow;
  13272. }
  13273. if (eras[i].until <= val && val <= eras[i].since) {
  13274. return eras[i].narrow;
  13275. }
  13276. }
  13277. return "";
  13278. }
  13279. function getEraAbbr() {
  13280. var i, l, val, eras = this.localeData().eras();
  13281. for (i = 0, l = eras.length; i < l; ++i) {
  13282. val = this.clone().startOf("day").valueOf();
  13283. if (eras[i].since <= val && val <= eras[i].until) {
  13284. return eras[i].abbr;
  13285. }
  13286. if (eras[i].until <= val && val <= eras[i].since) {
  13287. return eras[i].abbr;
  13288. }
  13289. }
  13290. return "";
  13291. }
  13292. function getEraYear() {
  13293. var i, l, dir, val, eras = this.localeData().eras();
  13294. for (i = 0, l = eras.length; i < l; ++i) {
  13295. dir = eras[i].since <= eras[i].until ? 1 : -1;
  13296. val = this.clone().startOf("day").valueOf();
  13297. if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {
  13298. return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;
  13299. }
  13300. }
  13301. return this.year();
  13302. }
  13303. function erasNameRegex(isStrict) {
  13304. if (!hasOwnProp(this, "_erasNameRegex")) {
  13305. computeErasParse.call(this);
  13306. }
  13307. return isStrict ? this._erasNameRegex : this._erasRegex;
  13308. }
  13309. function erasAbbrRegex(isStrict) {
  13310. if (!hasOwnProp(this, "_erasAbbrRegex")) {
  13311. computeErasParse.call(this);
  13312. }
  13313. return isStrict ? this._erasAbbrRegex : this._erasRegex;
  13314. }
  13315. function erasNarrowRegex(isStrict) {
  13316. if (!hasOwnProp(this, "_erasNarrowRegex")) {
  13317. computeErasParse.call(this);
  13318. }
  13319. return isStrict ? this._erasNarrowRegex : this._erasRegex;
  13320. }
  13321. function matchEraAbbr(isStrict, locale2) {
  13322. return locale2.erasAbbrRegex(isStrict);
  13323. }
  13324. function matchEraName(isStrict, locale2) {
  13325. return locale2.erasNameRegex(isStrict);
  13326. }
  13327. function matchEraNarrow(isStrict, locale2) {
  13328. return locale2.erasNarrowRegex(isStrict);
  13329. }
  13330. function matchEraYearOrdinal(isStrict, locale2) {
  13331. return locale2._eraYearOrdinalRegex || matchUnsigned;
  13332. }
  13333. function computeErasParse() {
  13334. var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i, l, erasName, erasAbbr, erasNarrow, eras = this.eras();
  13335. for (i = 0, l = eras.length; i < l; ++i) {
  13336. erasName = regexEscape(eras[i].name);
  13337. erasAbbr = regexEscape(eras[i].abbr);
  13338. erasNarrow = regexEscape(eras[i].narrow);
  13339. namePieces.push(erasName);
  13340. abbrPieces.push(erasAbbr);
  13341. narrowPieces.push(erasNarrow);
  13342. mixedPieces.push(erasName);
  13343. mixedPieces.push(erasAbbr);
  13344. mixedPieces.push(erasNarrow);
  13345. }
  13346. this._erasRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
  13347. this._erasNameRegex = new RegExp("^(" + namePieces.join("|") + ")", "i");
  13348. this._erasAbbrRegex = new RegExp("^(" + abbrPieces.join("|") + ")", "i");
  13349. this._erasNarrowRegex = new RegExp(
  13350. "^(" + narrowPieces.join("|") + ")",
  13351. "i"
  13352. );
  13353. }
  13354. addFormatToken(0, ["gg", 2], 0, function() {
  13355. return this.weekYear() % 100;
  13356. });
  13357. addFormatToken(0, ["GG", 2], 0, function() {
  13358. return this.isoWeekYear() % 100;
  13359. });
  13360. function addWeekYearFormatToken(token2, getter) {
  13361. addFormatToken(0, [token2, token2.length], 0, getter);
  13362. }
  13363. addWeekYearFormatToken("gggg", "weekYear");
  13364. addWeekYearFormatToken("ggggg", "weekYear");
  13365. addWeekYearFormatToken("GGGG", "isoWeekYear");
  13366. addWeekYearFormatToken("GGGGG", "isoWeekYear");
  13367. addRegexToken("G", matchSigned);
  13368. addRegexToken("g", matchSigned);
  13369. addRegexToken("GG", match1to2, match2);
  13370. addRegexToken("gg", match1to2, match2);
  13371. addRegexToken("GGGG", match1to4, match4);
  13372. addRegexToken("gggg", match1to4, match4);
  13373. addRegexToken("GGGGG", match1to6, match6);
  13374. addRegexToken("ggggg", match1to6, match6);
  13375. addWeekParseToken(
  13376. ["gggg", "ggggg", "GGGG", "GGGGG"],
  13377. function(input, week, config2, token2) {
  13378. week[token2.substr(0, 2)] = toInt(input);
  13379. }
  13380. );
  13381. addWeekParseToken(["gg", "GG"], function(input, week, config2, token2) {
  13382. week[token2] = hooks.parseTwoDigitYear(input);
  13383. });
  13384. function getSetWeekYear(input) {
  13385. return getSetWeekYearHelper.call(
  13386. this,
  13387. input,
  13388. this.week(),
  13389. this.weekday() + this.localeData()._week.dow,
  13390. this.localeData()._week.dow,
  13391. this.localeData()._week.doy
  13392. );
  13393. }
  13394. function getSetISOWeekYear(input) {
  13395. return getSetWeekYearHelper.call(
  13396. this,
  13397. input,
  13398. this.isoWeek(),
  13399. this.isoWeekday(),
  13400. 1,
  13401. 4
  13402. );
  13403. }
  13404. function getISOWeeksInYear() {
  13405. return weeksInYear(this.year(), 1, 4);
  13406. }
  13407. function getISOWeeksInISOWeekYear() {
  13408. return weeksInYear(this.isoWeekYear(), 1, 4);
  13409. }
  13410. function getWeeksInYear() {
  13411. var weekInfo = this.localeData()._week;
  13412. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  13413. }
  13414. function getWeeksInWeekYear() {
  13415. var weekInfo = this.localeData()._week;
  13416. return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
  13417. }
  13418. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  13419. var weeksTarget;
  13420. if (input == null) {
  13421. return weekOfYear(this, dow, doy).year;
  13422. } else {
  13423. weeksTarget = weeksInYear(input, dow, doy);
  13424. if (week > weeksTarget) {
  13425. week = weeksTarget;
  13426. }
  13427. return setWeekAll.call(this, input, week, weekday, dow, doy);
  13428. }
  13429. }
  13430. function setWeekAll(weekYear, week, weekday, dow, doy) {
  13431. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date3 = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  13432. this.year(date3.getUTCFullYear());
  13433. this.month(date3.getUTCMonth());
  13434. this.date(date3.getUTCDate());
  13435. return this;
  13436. }
  13437. addFormatToken("Q", 0, "Qo", "quarter");
  13438. addRegexToken("Q", match1);
  13439. addParseToken("Q", function(input, array3) {
  13440. array3[MONTH] = (toInt(input) - 1) * 3;
  13441. });
  13442. function getSetQuarter(input) {
  13443. return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
  13444. }
  13445. addFormatToken("D", ["DD", 2], "Do", "date");
  13446. addRegexToken("D", match1to2, match1to2NoLeadingZero);
  13447. addRegexToken("DD", match1to2, match2);
  13448. addRegexToken("Do", function(isStrict, locale2) {
  13449. return isStrict ? locale2._dayOfMonthOrdinalParse || locale2._ordinalParse : locale2._dayOfMonthOrdinalParseLenient;
  13450. });
  13451. addParseToken(["D", "DD"], DATE);
  13452. addParseToken("Do", function(input, array3) {
  13453. array3[DATE] = toInt(input.match(match1to2)[0]);
  13454. });
  13455. var getSetDayOfMonth = makeGetSet("Date", true);
  13456. addFormatToken("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
  13457. addRegexToken("DDD", match1to3);
  13458. addRegexToken("DDDD", match3);
  13459. addParseToken(["DDD", "DDDD"], function(input, array3, config2) {
  13460. config2._dayOfYear = toInt(input);
  13461. });
  13462. function getSetDayOfYear(input) {
  13463. var dayOfYear = Math.round(
  13464. (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
  13465. ) + 1;
  13466. return input == null ? dayOfYear : this.add(input - dayOfYear, "d");
  13467. }
  13468. addFormatToken("m", ["mm", 2], 0, "minute");
  13469. addRegexToken("m", match1to2, match1to2HasZero);
  13470. addRegexToken("mm", match1to2, match2);
  13471. addParseToken(["m", "mm"], MINUTE);
  13472. var getSetMinute = makeGetSet("Minutes", false);
  13473. addFormatToken("s", ["ss", 2], 0, "second");
  13474. addRegexToken("s", match1to2, match1to2HasZero);
  13475. addRegexToken("ss", match1to2, match2);
  13476. addParseToken(["s", "ss"], SECOND);
  13477. var getSetSecond = makeGetSet("Seconds", false);
  13478. addFormatToken("S", 0, 0, function() {
  13479. return ~~(this.millisecond() / 100);
  13480. });
  13481. addFormatToken(0, ["SS", 2], 0, function() {
  13482. return ~~(this.millisecond() / 10);
  13483. });
  13484. addFormatToken(0, ["SSS", 3], 0, "millisecond");
  13485. addFormatToken(0, ["SSSS", 4], 0, function() {
  13486. return this.millisecond() * 10;
  13487. });
  13488. addFormatToken(0, ["SSSSS", 5], 0, function() {
  13489. return this.millisecond() * 100;
  13490. });
  13491. addFormatToken(0, ["SSSSSS", 6], 0, function() {
  13492. return this.millisecond() * 1e3;
  13493. });
  13494. addFormatToken(0, ["SSSSSSS", 7], 0, function() {
  13495. return this.millisecond() * 1e4;
  13496. });
  13497. addFormatToken(0, ["SSSSSSSS", 8], 0, function() {
  13498. return this.millisecond() * 1e5;
  13499. });
  13500. addFormatToken(0, ["SSSSSSSSS", 9], 0, function() {
  13501. return this.millisecond() * 1e6;
  13502. });
  13503. addRegexToken("S", match1to3, match1);
  13504. addRegexToken("SS", match1to3, match2);
  13505. addRegexToken("SSS", match1to3, match3);
  13506. var token, getSetMillisecond;
  13507. for (token = "SSSS"; token.length <= 9; token += "S") {
  13508. addRegexToken(token, matchUnsigned);
  13509. }
  13510. function parseMs(input, array3) {
  13511. array3[MILLISECOND] = toInt(("0." + input) * 1e3);
  13512. }
  13513. for (token = "S"; token.length <= 9; token += "S") {
  13514. addParseToken(token, parseMs);
  13515. }
  13516. getSetMillisecond = makeGetSet("Milliseconds", false);
  13517. addFormatToken("z", 0, 0, "zoneAbbr");
  13518. addFormatToken("zz", 0, 0, "zoneName");
  13519. function getZoneAbbr() {
  13520. return this._isUTC ? "UTC" : "";
  13521. }
  13522. function getZoneName() {
  13523. return this._isUTC ? "Coordinated Universal Time" : "";
  13524. }
  13525. var proto = Moment.prototype;
  13526. proto.add = add;
  13527. proto.calendar = calendar$1;
  13528. proto.clone = clone;
  13529. proto.diff = diff;
  13530. proto.endOf = endOf;
  13531. proto.format = format$1;
  13532. proto.from = from;
  13533. proto.fromNow = fromNow;
  13534. proto.to = to;
  13535. proto.toNow = toNow;
  13536. proto.get = stringGet;
  13537. proto.invalidAt = invalidAt;
  13538. proto.isAfter = isAfter;
  13539. proto.isBefore = isBefore;
  13540. proto.isBetween = isBetween;
  13541. proto.isSame = isSame;
  13542. proto.isSameOrAfter = isSameOrAfter;
  13543. proto.isSameOrBefore = isSameOrBefore;
  13544. proto.isValid = isValid$2;
  13545. proto.lang = lang;
  13546. proto.locale = locale;
  13547. proto.localeData = localeData;
  13548. proto.max = prototypeMax;
  13549. proto.min = prototypeMin;
  13550. proto.parsingFlags = parsingFlags;
  13551. proto.set = stringSet;
  13552. proto.startOf = startOf;
  13553. proto.subtract = subtract;
  13554. proto.toArray = toArray;
  13555. proto.toObject = toObject;
  13556. proto.toDate = toDate;
  13557. proto.toISOString = toISOString;
  13558. proto.inspect = inspect;
  13559. if (typeof Symbol !== "undefined" && Symbol.for != null) {
  13560. proto[Symbol.for("nodejs.util.inspect.custom")] = function() {
  13561. return "Moment<" + this.format() + ">";
  13562. };
  13563. }
  13564. proto.toJSON = toJSON;
  13565. proto.toString = toString;
  13566. proto.unix = unix;
  13567. proto.valueOf = valueOf;
  13568. proto.creationData = creationData;
  13569. proto.eraName = getEraName;
  13570. proto.eraNarrow = getEraNarrow;
  13571. proto.eraAbbr = getEraAbbr;
  13572. proto.eraYear = getEraYear;
  13573. proto.year = getSetYear;
  13574. proto.isLeapYear = getIsLeapYear;
  13575. proto.weekYear = getSetWeekYear;
  13576. proto.isoWeekYear = getSetISOWeekYear;
  13577. proto.quarter = proto.quarters = getSetQuarter;
  13578. proto.month = getSetMonth;
  13579. proto.daysInMonth = getDaysInMonth;
  13580. proto.week = proto.weeks = getSetWeek;
  13581. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  13582. proto.weeksInYear = getWeeksInYear;
  13583. proto.weeksInWeekYear = getWeeksInWeekYear;
  13584. proto.isoWeeksInYear = getISOWeeksInYear;
  13585. proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
  13586. proto.date = getSetDayOfMonth;
  13587. proto.day = proto.days = getSetDayOfWeek;
  13588. proto.weekday = getSetLocaleDayOfWeek;
  13589. proto.isoWeekday = getSetISODayOfWeek;
  13590. proto.dayOfYear = getSetDayOfYear;
  13591. proto.hour = proto.hours = getSetHour;
  13592. proto.minute = proto.minutes = getSetMinute;
  13593. proto.second = proto.seconds = getSetSecond;
  13594. proto.millisecond = proto.milliseconds = getSetMillisecond;
  13595. proto.utcOffset = getSetOffset;
  13596. proto.utc = setOffsetToUTC;
  13597. proto.local = setOffsetToLocal;
  13598. proto.parseZone = setOffsetToParsedOffset;
  13599. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  13600. proto.isDST = isDaylightSavingTime;
  13601. proto.isLocal = isLocal;
  13602. proto.isUtcOffset = isUtcOffset;
  13603. proto.isUtc = isUtc;
  13604. proto.isUTC = isUtc;
  13605. proto.zoneAbbr = getZoneAbbr;
  13606. proto.zoneName = getZoneName;
  13607. proto.dates = deprecate(
  13608. "dates accessor is deprecated. Use date instead.",
  13609. getSetDayOfMonth
  13610. );
  13611. proto.months = deprecate(
  13612. "months accessor is deprecated. Use month instead",
  13613. getSetMonth
  13614. );
  13615. proto.years = deprecate(
  13616. "years accessor is deprecated. Use year instead",
  13617. getSetYear
  13618. );
  13619. proto.zone = deprecate(
  13620. "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
  13621. getSetZone
  13622. );
  13623. proto.isDSTShifted = deprecate(
  13624. "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
  13625. isDaylightSavingTimeShifted
  13626. );
  13627. function createUnix(input) {
  13628. return createLocal(input * 1e3);
  13629. }
  13630. function createInZone() {
  13631. return createLocal.apply(null, arguments).parseZone();
  13632. }
  13633. function preParsePostFormat(string2) {
  13634. return string2;
  13635. }
  13636. var proto$1 = Locale.prototype;
  13637. proto$1.calendar = calendar;
  13638. proto$1.longDateFormat = longDateFormat;
  13639. proto$1.invalidDate = invalidDate;
  13640. proto$1.ordinal = ordinal;
  13641. proto$1.preparse = preParsePostFormat;
  13642. proto$1.postformat = preParsePostFormat;
  13643. proto$1.relativeTime = relativeTime;
  13644. proto$1.pastFuture = pastFuture;
  13645. proto$1.set = set;
  13646. proto$1.eras = localeEras;
  13647. proto$1.erasParse = localeErasParse;
  13648. proto$1.erasConvertYear = localeErasConvertYear;
  13649. proto$1.erasAbbrRegex = erasAbbrRegex;
  13650. proto$1.erasNameRegex = erasNameRegex;
  13651. proto$1.erasNarrowRegex = erasNarrowRegex;
  13652. proto$1.months = localeMonths;
  13653. proto$1.monthsShort = localeMonthsShort;
  13654. proto$1.monthsParse = localeMonthsParse;
  13655. proto$1.monthsRegex = monthsRegex;
  13656. proto$1.monthsShortRegex = monthsShortRegex;
  13657. proto$1.week = localeWeek;
  13658. proto$1.firstDayOfYear = localeFirstDayOfYear;
  13659. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  13660. proto$1.weekdays = localeWeekdays;
  13661. proto$1.weekdaysMin = localeWeekdaysMin;
  13662. proto$1.weekdaysShort = localeWeekdaysShort;
  13663. proto$1.weekdaysParse = localeWeekdaysParse;
  13664. proto$1.weekdaysRegex = weekdaysRegex;
  13665. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  13666. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  13667. proto$1.isPM = localeIsPM;
  13668. proto$1.meridiem = localeMeridiem;
  13669. function get$1(format2, index2, field, setter) {
  13670. var locale2 = getLocale(), utc = createUTC().set(setter, index2);
  13671. return locale2[field](utc, format2);
  13672. }
  13673. function listMonthsImpl(format2, index2, field) {
  13674. if (isNumber(format2)) {
  13675. index2 = format2;
  13676. format2 = void 0;
  13677. }
  13678. format2 = format2 || "";
  13679. if (index2 != null) {
  13680. return get$1(format2, index2, field, "month");
  13681. }
  13682. var i, out = [];
  13683. for (i = 0; i < 12; i++) {
  13684. out[i] = get$1(format2, i, field, "month");
  13685. }
  13686. return out;
  13687. }
  13688. function listWeekdaysImpl(localeSorted, format2, index2, field) {
  13689. if (typeof localeSorted === "boolean") {
  13690. if (isNumber(format2)) {
  13691. index2 = format2;
  13692. format2 = void 0;
  13693. }
  13694. format2 = format2 || "";
  13695. } else {
  13696. format2 = localeSorted;
  13697. index2 = format2;
  13698. localeSorted = false;
  13699. if (isNumber(format2)) {
  13700. index2 = format2;
  13701. format2 = void 0;
  13702. }
  13703. format2 = format2 || "";
  13704. }
  13705. var locale2 = getLocale(), shift = localeSorted ? locale2._week.dow : 0, i, out = [];
  13706. if (index2 != null) {
  13707. return get$1(format2, (index2 + shift) % 7, field, "day");
  13708. }
  13709. for (i = 0; i < 7; i++) {
  13710. out[i] = get$1(format2, (i + shift) % 7, field, "day");
  13711. }
  13712. return out;
  13713. }
  13714. function listMonths(format2, index2) {
  13715. return listMonthsImpl(format2, index2, "months");
  13716. }
  13717. function listMonthsShort(format2, index2) {
  13718. return listMonthsImpl(format2, index2, "monthsShort");
  13719. }
  13720. function listWeekdays(localeSorted, format2, index2) {
  13721. return listWeekdaysImpl(localeSorted, format2, index2, "weekdays");
  13722. }
  13723. function listWeekdaysShort(localeSorted, format2, index2) {
  13724. return listWeekdaysImpl(localeSorted, format2, index2, "weekdaysShort");
  13725. }
  13726. function listWeekdaysMin(localeSorted, format2, index2) {
  13727. return listWeekdaysImpl(localeSorted, format2, index2, "weekdaysMin");
  13728. }
  13729. getSetGlobalLocale("en", {
  13730. eras: [
  13731. {
  13732. since: "0001-01-01",
  13733. until: Infinity,
  13734. offset: 1,
  13735. name: "Anno Domini",
  13736. narrow: "AD",
  13737. abbr: "AD"
  13738. },
  13739. {
  13740. since: "0000-12-31",
  13741. until: -Infinity,
  13742. offset: 1,
  13743. name: "Before Christ",
  13744. narrow: "BC",
  13745. abbr: "BC"
  13746. }
  13747. ],
  13748. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  13749. ordinal: function(number3) {
  13750. var b = number3 % 10, output = toInt(number3 % 100 / 10) === 1 ? "th" : b === 1 ? "st" : b === 2 ? "nd" : b === 3 ? "rd" : "th";
  13751. return number3 + output;
  13752. }
  13753. });
  13754. hooks.lang = deprecate(
  13755. "moment.lang is deprecated. Use moment.locale instead.",
  13756. getSetGlobalLocale
  13757. );
  13758. hooks.langData = deprecate(
  13759. "moment.langData is deprecated. Use moment.localeData instead.",
  13760. getLocale
  13761. );
  13762. var mathAbs = Math.abs;
  13763. function abs() {
  13764. var data = this._data;
  13765. this._milliseconds = mathAbs(this._milliseconds);
  13766. this._days = mathAbs(this._days);
  13767. this._months = mathAbs(this._months);
  13768. data.milliseconds = mathAbs(data.milliseconds);
  13769. data.seconds = mathAbs(data.seconds);
  13770. data.minutes = mathAbs(data.minutes);
  13771. data.hours = mathAbs(data.hours);
  13772. data.months = mathAbs(data.months);
  13773. data.years = mathAbs(data.years);
  13774. return this;
  13775. }
  13776. function addSubtract$1(duration, input, value2, direction) {
  13777. var other = createDuration(input, value2);
  13778. duration._milliseconds += direction * other._milliseconds;
  13779. duration._days += direction * other._days;
  13780. duration._months += direction * other._months;
  13781. return duration._bubble();
  13782. }
  13783. function add$1(input, value2) {
  13784. return addSubtract$1(this, input, value2, 1);
  13785. }
  13786. function subtract$1(input, value2) {
  13787. return addSubtract$1(this, input, value2, -1);
  13788. }
  13789. function absCeil(number3) {
  13790. if (number3 < 0) {
  13791. return Math.floor(number3);
  13792. } else {
  13793. return Math.ceil(number3);
  13794. }
  13795. }
  13796. function bubble() {
  13797. var milliseconds2 = this._milliseconds, days2 = this._days, months2 = this._months, data = this._data, seconds2, minutes2, hours2, years2, monthsFromDays;
  13798. if (!(milliseconds2 >= 0 && days2 >= 0 && months2 >= 0 || milliseconds2 <= 0 && days2 <= 0 && months2 <= 0)) {
  13799. milliseconds2 += absCeil(monthsToDays(months2) + days2) * 864e5;
  13800. days2 = 0;
  13801. months2 = 0;
  13802. }
  13803. data.milliseconds = milliseconds2 % 1e3;
  13804. seconds2 = absFloor(milliseconds2 / 1e3);
  13805. data.seconds = seconds2 % 60;
  13806. minutes2 = absFloor(seconds2 / 60);
  13807. data.minutes = minutes2 % 60;
  13808. hours2 = absFloor(minutes2 / 60);
  13809. data.hours = hours2 % 24;
  13810. days2 += absFloor(hours2 / 24);
  13811. monthsFromDays = absFloor(daysToMonths(days2));
  13812. months2 += monthsFromDays;
  13813. days2 -= absCeil(monthsToDays(monthsFromDays));
  13814. years2 = absFloor(months2 / 12);
  13815. months2 %= 12;
  13816. data.days = days2;
  13817. data.months = months2;
  13818. data.years = years2;
  13819. return this;
  13820. }
  13821. function daysToMonths(days2) {
  13822. return days2 * 4800 / 146097;
  13823. }
  13824. function monthsToDays(months2) {
  13825. return months2 * 146097 / 4800;
  13826. }
  13827. function as(units) {
  13828. if (!this.isValid()) {
  13829. return NaN;
  13830. }
  13831. var days2, months2, milliseconds2 = this._milliseconds;
  13832. units = normalizeUnits(units);
  13833. if (units === "month" || units === "quarter" || units === "year") {
  13834. days2 = this._days + milliseconds2 / 864e5;
  13835. months2 = this._months + daysToMonths(days2);
  13836. switch (units) {
  13837. case "month":
  13838. return months2;
  13839. case "quarter":
  13840. return months2 / 3;
  13841. case "year":
  13842. return months2 / 12;
  13843. }
  13844. } else {
  13845. days2 = this._days + Math.round(monthsToDays(this._months));
  13846. switch (units) {
  13847. case "week":
  13848. return days2 / 7 + milliseconds2 / 6048e5;
  13849. case "day":
  13850. return days2 + milliseconds2 / 864e5;
  13851. case "hour":
  13852. return days2 * 24 + milliseconds2 / 36e5;
  13853. case "minute":
  13854. return days2 * 1440 + milliseconds2 / 6e4;
  13855. case "second":
  13856. return days2 * 86400 + milliseconds2 / 1e3;
  13857. case "millisecond":
  13858. return Math.floor(days2 * 864e5) + milliseconds2;
  13859. default:
  13860. throw new Error("Unknown unit " + units);
  13861. }
  13862. }
  13863. }
  13864. function makeAs(alias) {
  13865. return function() {
  13866. return this.as(alias);
  13867. };
  13868. }
  13869. var asMilliseconds = makeAs("ms"), asSeconds = makeAs("s"), asMinutes = makeAs("m"), asHours = makeAs("h"), asDays = makeAs("d"), asWeeks = makeAs("w"), asMonths = makeAs("M"), asQuarters = makeAs("Q"), asYears = makeAs("y"), valueOf$1 = asMilliseconds;
  13870. function clone$1() {
  13871. return createDuration(this);
  13872. }
  13873. function get$2(units) {
  13874. units = normalizeUnits(units);
  13875. return this.isValid() ? this[units + "s"]() : NaN;
  13876. }
  13877. function makeGetter(name) {
  13878. return function() {
  13879. return this.isValid() ? this._data[name] : NaN;
  13880. };
  13881. }
  13882. var milliseconds = makeGetter("milliseconds"), seconds = makeGetter("seconds"), minutes = makeGetter("minutes"), hours = makeGetter("hours"), days = makeGetter("days"), months = makeGetter("months"), years = makeGetter("years");
  13883. function weeks() {
  13884. return absFloor(this.days() / 7);
  13885. }
  13886. var round = Math.round, thresholds = {
  13887. ss: 44,
  13888. // a few seconds to seconds
  13889. s: 45,
  13890. // seconds to minute
  13891. m: 45,
  13892. // minutes to hour
  13893. h: 22,
  13894. // hours to day
  13895. d: 26,
  13896. // days to month/week
  13897. w: null,
  13898. // weeks to month
  13899. M: 11
  13900. // months to year
  13901. };
  13902. function substituteTimeAgo(string2, number3, withoutSuffix, isFuture, locale2) {
  13903. return locale2.relativeTime(number3 || 1, !!withoutSuffix, string2, isFuture);
  13904. }
  13905. function relativeTime$1(posNegDuration, withoutSuffix, thresholds2, locale2) {
  13906. var duration = createDuration(posNegDuration).abs(), seconds2 = round(duration.as("s")), minutes2 = round(duration.as("m")), hours2 = round(duration.as("h")), days2 = round(duration.as("d")), months2 = round(duration.as("M")), weeks2 = round(duration.as("w")), years2 = round(duration.as("y")), a = seconds2 <= thresholds2.ss && ["s", seconds2] || seconds2 < thresholds2.s && ["ss", seconds2] || minutes2 <= 1 && ["m"] || minutes2 < thresholds2.m && ["mm", minutes2] || hours2 <= 1 && ["h"] || hours2 < thresholds2.h && ["hh", hours2] || days2 <= 1 && ["d"] || days2 < thresholds2.d && ["dd", days2];
  13907. if (thresholds2.w != null) {
  13908. a = a || weeks2 <= 1 && ["w"] || weeks2 < thresholds2.w && ["ww", weeks2];
  13909. }
  13910. a = a || months2 <= 1 && ["M"] || months2 < thresholds2.M && ["MM", months2] || years2 <= 1 && ["y"] || ["yy", years2];
  13911. a[2] = withoutSuffix;
  13912. a[3] = +posNegDuration > 0;
  13913. a[4] = locale2;
  13914. return substituteTimeAgo.apply(null, a);
  13915. }
  13916. function getSetRelativeTimeRounding(roundingFunction) {
  13917. if (roundingFunction === void 0) {
  13918. return round;
  13919. }
  13920. if (typeof roundingFunction === "function") {
  13921. round = roundingFunction;
  13922. return true;
  13923. }
  13924. return false;
  13925. }
  13926. function getSetRelativeTimeThreshold(threshold, limit) {
  13927. if (thresholds[threshold] === void 0) {
  13928. return false;
  13929. }
  13930. if (limit === void 0) {
  13931. return thresholds[threshold];
  13932. }
  13933. thresholds[threshold] = limit;
  13934. if (threshold === "s") {
  13935. thresholds.ss = limit - 1;
  13936. }
  13937. return true;
  13938. }
  13939. function humanize(argWithSuffix, argThresholds) {
  13940. if (!this.isValid()) {
  13941. return this.localeData().invalidDate();
  13942. }
  13943. var withSuffix = false, th = thresholds, locale2, output;
  13944. if (typeof argWithSuffix === "object") {
  13945. argThresholds = argWithSuffix;
  13946. argWithSuffix = false;
  13947. }
  13948. if (typeof argWithSuffix === "boolean") {
  13949. withSuffix = argWithSuffix;
  13950. }
  13951. if (typeof argThresholds === "object") {
  13952. th = Object.assign({}, thresholds, argThresholds);
  13953. if (argThresholds.s != null && argThresholds.ss == null) {
  13954. th.ss = argThresholds.s - 1;
  13955. }
  13956. }
  13957. locale2 = this.localeData();
  13958. output = relativeTime$1(this, !withSuffix, th, locale2);
  13959. if (withSuffix) {
  13960. output = locale2.pastFuture(+this, output);
  13961. }
  13962. return locale2.postformat(output);
  13963. }
  13964. var abs$1 = Math.abs;
  13965. function sign(x) {
  13966. return (x > 0) - (x < 0) || +x;
  13967. }
  13968. function toISOString$1() {
  13969. if (!this.isValid()) {
  13970. return this.localeData().invalidDate();
  13971. }
  13972. var seconds2 = abs$1(this._milliseconds) / 1e3, days2 = abs$1(this._days), months2 = abs$1(this._months), minutes2, hours2, years2, s2, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign;
  13973. if (!total) {
  13974. return "P0D";
  13975. }
  13976. minutes2 = absFloor(seconds2 / 60);
  13977. hours2 = absFloor(minutes2 / 60);
  13978. seconds2 %= 60;
  13979. minutes2 %= 60;
  13980. years2 = absFloor(months2 / 12);
  13981. months2 %= 12;
  13982. s2 = seconds2 ? seconds2.toFixed(3).replace(/\.?0+$/, "") : "";
  13983. totalSign = total < 0 ? "-" : "";
  13984. ymSign = sign(this._months) !== sign(total) ? "-" : "";
  13985. daysSign = sign(this._days) !== sign(total) ? "-" : "";
  13986. hmsSign = sign(this._milliseconds) !== sign(total) ? "-" : "";
  13987. return totalSign + "P" + (years2 ? ymSign + years2 + "Y" : "") + (months2 ? ymSign + months2 + "M" : "") + (days2 ? daysSign + days2 + "D" : "") + (hours2 || minutes2 || seconds2 ? "T" : "") + (hours2 ? hmsSign + hours2 + "H" : "") + (minutes2 ? hmsSign + minutes2 + "M" : "") + (seconds2 ? hmsSign + s2 + "S" : "");
  13988. }
  13989. var proto$2 = Duration.prototype;
  13990. proto$2.isValid = isValid$1;
  13991. proto$2.abs = abs;
  13992. proto$2.add = add$1;
  13993. proto$2.subtract = subtract$1;
  13994. proto$2.as = as;
  13995. proto$2.asMilliseconds = asMilliseconds;
  13996. proto$2.asSeconds = asSeconds;
  13997. proto$2.asMinutes = asMinutes;
  13998. proto$2.asHours = asHours;
  13999. proto$2.asDays = asDays;
  14000. proto$2.asWeeks = asWeeks;
  14001. proto$2.asMonths = asMonths;
  14002. proto$2.asQuarters = asQuarters;
  14003. proto$2.asYears = asYears;
  14004. proto$2.valueOf = valueOf$1;
  14005. proto$2._bubble = bubble;
  14006. proto$2.clone = clone$1;
  14007. proto$2.get = get$2;
  14008. proto$2.milliseconds = milliseconds;
  14009. proto$2.seconds = seconds;
  14010. proto$2.minutes = minutes;
  14011. proto$2.hours = hours;
  14012. proto$2.days = days;
  14013. proto$2.weeks = weeks;
  14014. proto$2.months = months;
  14015. proto$2.years = years;
  14016. proto$2.humanize = humanize;
  14017. proto$2.toISOString = toISOString$1;
  14018. proto$2.toString = toISOString$1;
  14019. proto$2.toJSON = toISOString$1;
  14020. proto$2.locale = locale;
  14021. proto$2.localeData = localeData;
  14022. proto$2.toIsoString = deprecate(
  14023. "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
  14024. toISOString$1
  14025. );
  14026. proto$2.lang = lang;
  14027. addFormatToken("X", 0, 0, "unix");
  14028. addFormatToken("x", 0, 0, "valueOf");
  14029. addRegexToken("x", matchSigned);
  14030. addRegexToken("X", matchTimestamp);
  14031. addParseToken("X", function(input, array3, config2) {
  14032. config2._d = new Date(parseFloat(input) * 1e3);
  14033. });
  14034. addParseToken("x", function(input, array3, config2) {
  14035. config2._d = new Date(toInt(input));
  14036. });
  14037. //! moment.js
  14038. hooks.version = "2.30.1";
  14039. setHookCallback(createLocal);
  14040. hooks.fn = proto;
  14041. hooks.min = min;
  14042. hooks.max = max;
  14043. hooks.now = now;
  14044. hooks.utc = createUTC;
  14045. hooks.unix = createUnix;
  14046. hooks.months = listMonths;
  14047. hooks.isDate = isDate;
  14048. hooks.locale = getSetGlobalLocale;
  14049. hooks.invalid = createInvalid;
  14050. hooks.duration = createDuration;
  14051. hooks.isMoment = isMoment;
  14052. hooks.weekdays = listWeekdays;
  14053. hooks.parseZone = createInZone;
  14054. hooks.localeData = getLocale;
  14055. hooks.isDuration = isDuration;
  14056. hooks.monthsShort = listMonthsShort;
  14057. hooks.weekdaysMin = listWeekdaysMin;
  14058. hooks.defineLocale = defineLocale;
  14059. hooks.updateLocale = updateLocale;
  14060. hooks.locales = listLocales;
  14061. hooks.weekdaysShort = listWeekdaysShort;
  14062. hooks.normalizeUnits = normalizeUnits;
  14063. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  14064. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  14065. hooks.calendarFormat = getCalendarFormat;
  14066. hooks.prototype = proto;
  14067. hooks.HTML5_FMT = {
  14068. DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
  14069. // <input type="datetime-local" />
  14070. DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
  14071. // <input type="datetime-local" step="1" />
  14072. DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
  14073. // <input type="datetime-local" step="0.001" />
  14074. DATE: "YYYY-MM-DD",
  14075. // <input type="date" />
  14076. TIME: "HH:mm",
  14077. // <input type="time" />
  14078. TIME_SECONDS: "HH:mm:ss",
  14079. // <input type="time" step="1" />
  14080. TIME_MS: "HH:mm:ss.SSS",
  14081. // <input type="time" step="0.001" />
  14082. WEEK: "GGGG-[W]WW",
  14083. // <input type="week" />
  14084. MONTH: "YYYY-MM"
  14085. // <input type="month" />
  14086. };
  14087. const props$l = {
  14088. props: {
  14089. // 搜索框形状,round-圆形,square-方形
  14090. shape: {
  14091. type: String,
  14092. default: defprops.search.shape
  14093. },
  14094. // 搜索框背景色,默认值#f2f2f2
  14095. bgColor: {
  14096. type: String,
  14097. default: defprops.search.bgColor
  14098. },
  14099. // 占位提示文字
  14100. placeholder: {
  14101. type: String,
  14102. default: defprops.search.placeholder
  14103. },
  14104. // 是否启用清除控件
  14105. clearabled: {
  14106. type: Boolean,
  14107. default: defprops.search.clearabled
  14108. },
  14109. // 是否自动聚焦
  14110. focus: {
  14111. type: Boolean,
  14112. default: defprops.search.focus
  14113. },
  14114. // 是否在搜索框右侧显示取消按钮
  14115. showAction: {
  14116. type: Boolean,
  14117. default: defprops.search.showAction
  14118. },
  14119. // 右边控件的样式
  14120. actionStyle: {
  14121. type: Object,
  14122. default: defprops.search.actionStyle
  14123. },
  14124. // 取消按钮文字
  14125. actionText: {
  14126. type: String,
  14127. default: defprops.search.actionText
  14128. },
  14129. // 输入框内容对齐方式,可选值为 left|center|right
  14130. inputAlign: {
  14131. type: String,
  14132. default: defprops.search.inputAlign
  14133. },
  14134. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  14135. inputStyle: {
  14136. type: Object,
  14137. default: defprops.search.inputStyle
  14138. },
  14139. // 是否启用输入框
  14140. disabled: {
  14141. type: Boolean,
  14142. default: defprops.search.disabled
  14143. },
  14144. // 边框颜色
  14145. borderColor: {
  14146. type: String,
  14147. default: defprops.search.borderColor
  14148. },
  14149. // 搜索图标的颜色,默认同输入框字体颜色
  14150. searchIconColor: {
  14151. type: String,
  14152. default: defprops.search.searchIconColor
  14153. },
  14154. // 输入框字体颜色
  14155. color: {
  14156. type: String,
  14157. default: defprops.search.color
  14158. },
  14159. // placeholder的颜色
  14160. placeholderColor: {
  14161. type: String,
  14162. default: defprops.search.placeholderColor
  14163. },
  14164. // 左边输入框的图标,可以为uView图标名称或图片路径
  14165. searchIcon: {
  14166. type: String,
  14167. default: defprops.search.searchIcon
  14168. },
  14169. searchIconSize: {
  14170. type: [Number, String],
  14171. default: defprops.search.searchIconSize
  14172. },
  14173. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  14174. margin: {
  14175. type: String,
  14176. default: defprops.search.margin
  14177. },
  14178. // 开启showAction时,是否在input获取焦点时才显示
  14179. animation: {
  14180. type: Boolean,
  14181. default: defprops.search.animation
  14182. },
  14183. // 输入框的初始化内容
  14184. modelValue: {
  14185. type: String,
  14186. default: defprops.search.value
  14187. },
  14188. value: {
  14189. type: String,
  14190. default: defprops.search.value
  14191. },
  14192. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  14193. maxlength: {
  14194. type: [String, Number],
  14195. default: defprops.search.maxlength
  14196. },
  14197. // 搜索框高度,单位px
  14198. height: {
  14199. type: [String, Number],
  14200. default: defprops.search.height
  14201. },
  14202. // 搜索框左侧文本
  14203. label: {
  14204. type: [String, Number, null],
  14205. default: defprops.search.label
  14206. }
  14207. }
  14208. };
  14209. const props$k = {
  14210. props: {
  14211. // 头像图片路径(不能为相对路径)
  14212. src: {
  14213. type: String,
  14214. default: defprops.avatar.src
  14215. },
  14216. // 头像形状,circle-圆形,square-方形
  14217. shape: {
  14218. type: String,
  14219. default: defprops.avatar.shape
  14220. },
  14221. // 头像尺寸
  14222. size: {
  14223. type: [String, Number],
  14224. default: defprops.avatar.size
  14225. },
  14226. // 裁剪模式
  14227. mode: {
  14228. type: String,
  14229. default: defprops.avatar.mode
  14230. },
  14231. // 显示的文字
  14232. text: {
  14233. type: String,
  14234. default: defprops.avatar.text
  14235. },
  14236. // 背景色
  14237. bgColor: {
  14238. type: String,
  14239. default: defprops.avatar.bgColor
  14240. },
  14241. // 文字颜色
  14242. color: {
  14243. type: String,
  14244. default: defprops.avatar.color
  14245. },
  14246. // 文字大小
  14247. fontSize: {
  14248. type: [String, Number],
  14249. default: defprops.avatar.fontSize
  14250. },
  14251. // 显示的图标
  14252. icon: {
  14253. type: String,
  14254. default: defprops.avatar.icon
  14255. },
  14256. // 显示小程序头像,只对百度,微信,QQ小程序有效
  14257. mpAvatar: {
  14258. type: Boolean,
  14259. default: defprops.avatar.mpAvatar
  14260. },
  14261. // 是否使用随机背景色
  14262. randomBgColor: {
  14263. type: Boolean,
  14264. default: defprops.avatar.randomBgColor
  14265. },
  14266. // 加载失败的默认头像(组件有内置默认图片)
  14267. defaultUrl: {
  14268. type: String,
  14269. default: defprops.avatar.defaultUrl
  14270. },
  14271. // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
  14272. colorIndex: {
  14273. type: [String, Number],
  14274. // 校验参数规则,索引在0-19之间
  14275. validator(n2) {
  14276. return index$1.$u.test.range(n2, [0, 19]) || n2 === "";
  14277. },
  14278. default: defprops.avatar.colorIndex
  14279. },
  14280. // 组件标识符
  14281. name: {
  14282. type: String,
  14283. default: defprops.avatar.name
  14284. }
  14285. }
  14286. };
  14287. const icons = {
  14288. "uicon-level": "",
  14289. "uicon-column-line": "",
  14290. "uicon-checkbox-mark": "",
  14291. "uicon-folder": "",
  14292. "uicon-movie": "",
  14293. "uicon-star-fill": "",
  14294. "uicon-star": "",
  14295. "uicon-phone-fill": "",
  14296. "uicon-phone": "",
  14297. "uicon-apple-fill": "",
  14298. "uicon-chrome-circle-fill": "",
  14299. "uicon-backspace": "",
  14300. "uicon-attach": "",
  14301. "uicon-cut": "",
  14302. "uicon-empty-car": "",
  14303. "uicon-empty-coupon": "",
  14304. "uicon-empty-address": "",
  14305. "uicon-empty-favor": "",
  14306. "uicon-empty-permission": "",
  14307. "uicon-empty-news": "",
  14308. "uicon-empty-search": "",
  14309. "uicon-github-circle-fill": "",
  14310. "uicon-rmb": "",
  14311. "uicon-person-delete-fill": "",
  14312. "uicon-reload": "",
  14313. "uicon-order": "",
  14314. "uicon-server-man": "",
  14315. "uicon-search": "",
  14316. "uicon-fingerprint": "",
  14317. "uicon-more-dot-fill": "",
  14318. "uicon-scan": "",
  14319. "uicon-share-square": "",
  14320. "uicon-map": "",
  14321. "uicon-map-fill": "",
  14322. "uicon-tags": "",
  14323. "uicon-tags-fill": "",
  14324. "uicon-bookmark-fill": "",
  14325. "uicon-bookmark": "",
  14326. "uicon-eye": "",
  14327. "uicon-eye-fill": "",
  14328. "uicon-mic": "",
  14329. "uicon-mic-off": "",
  14330. "uicon-calendar": "",
  14331. "uicon-calendar-fill": "",
  14332. "uicon-trash": "",
  14333. "uicon-trash-fill": "",
  14334. "uicon-play-left": "",
  14335. "uicon-play-right": "",
  14336. "uicon-minus": "",
  14337. "uicon-plus": "",
  14338. "uicon-info": "",
  14339. "uicon-info-circle": "",
  14340. "uicon-info-circle-fill": "",
  14341. "uicon-question": "",
  14342. "uicon-error": "",
  14343. "uicon-close": "",
  14344. "uicon-checkmark": "",
  14345. "uicon-android-circle-fill": "",
  14346. "uicon-android-fill": "",
  14347. "uicon-ie": "",
  14348. "uicon-IE-circle-fill": "",
  14349. "uicon-google": "",
  14350. "uicon-google-circle-fill": "",
  14351. "uicon-setting-fill": "",
  14352. "uicon-setting": "",
  14353. "uicon-minus-square-fill": "",
  14354. "uicon-plus-square-fill": "",
  14355. "uicon-heart": "",
  14356. "uicon-heart-fill": "",
  14357. "uicon-camera": "",
  14358. "uicon-camera-fill": "",
  14359. "uicon-more-circle": "",
  14360. "uicon-more-circle-fill": "",
  14361. "uicon-chat": "",
  14362. "uicon-chat-fill": "",
  14363. "uicon-bag-fill": "",
  14364. "uicon-bag": "",
  14365. "uicon-error-circle-fill": "",
  14366. "uicon-error-circle": "",
  14367. "uicon-close-circle": "",
  14368. "uicon-close-circle-fill": "",
  14369. "uicon-checkmark-circle": "",
  14370. "uicon-checkmark-circle-fill": "",
  14371. "uicon-question-circle-fill": "",
  14372. "uicon-question-circle": "",
  14373. "uicon-share": "",
  14374. "uicon-share-fill": "",
  14375. "uicon-shopping-cart": "",
  14376. "uicon-shopping-cart-fill": "",
  14377. "uicon-bell": "",
  14378. "uicon-bell-fill": "",
  14379. "uicon-list": "",
  14380. "uicon-list-dot": "",
  14381. "uicon-zhihu": "",
  14382. "uicon-zhihu-circle-fill": "",
  14383. "uicon-zhifubao": "",
  14384. "uicon-zhifubao-circle-fill": "",
  14385. "uicon-weixin-circle-fill": "",
  14386. "uicon-weixin-fill": "",
  14387. "uicon-twitter-circle-fill": "",
  14388. "uicon-twitter": "",
  14389. "uicon-taobao-circle-fill": "",
  14390. "uicon-taobao": "",
  14391. "uicon-weibo-circle-fill": "",
  14392. "uicon-weibo": "",
  14393. "uicon-qq-fill": "",
  14394. "uicon-qq-circle-fill": "",
  14395. "uicon-moments-circel-fill": "",
  14396. "uicon-moments": "",
  14397. "uicon-qzone": "",
  14398. "uicon-qzone-circle-fill": "",
  14399. "uicon-baidu-circle-fill": "",
  14400. "uicon-baidu": "",
  14401. "uicon-facebook-circle-fill": "",
  14402. "uicon-facebook": "",
  14403. "uicon-car": "",
  14404. "uicon-car-fill": "",
  14405. "uicon-warning-fill": "",
  14406. "uicon-warning": "",
  14407. "uicon-clock-fill": "",
  14408. "uicon-clock": "",
  14409. "uicon-edit-pen": "",
  14410. "uicon-edit-pen-fill": "",
  14411. "uicon-email": "",
  14412. "uicon-email-fill": "",
  14413. "uicon-minus-circle": "",
  14414. "uicon-minus-circle-fill": "",
  14415. "uicon-plus-circle": "",
  14416. "uicon-plus-circle-fill": "",
  14417. "uicon-file-text": "",
  14418. "uicon-file-text-fill": "",
  14419. "uicon-pushpin": "",
  14420. "uicon-pushpin-fill": "",
  14421. "uicon-grid": "",
  14422. "uicon-grid-fill": "",
  14423. "uicon-play-circle": "",
  14424. "uicon-play-circle-fill": "",
  14425. "uicon-pause-circle-fill": "",
  14426. "uicon-pause": "",
  14427. "uicon-pause-circle": "",
  14428. "uicon-eye-off": "",
  14429. "uicon-eye-off-outline": "",
  14430. "uicon-gift-fill": "",
  14431. "uicon-gift": "",
  14432. "uicon-rmb-circle-fill": "",
  14433. "uicon-rmb-circle": "",
  14434. "uicon-kefu-ermai": "",
  14435. "uicon-server-fill": "",
  14436. "uicon-coupon-fill": "",
  14437. "uicon-coupon": "",
  14438. "uicon-integral": "",
  14439. "uicon-integral-fill": "",
  14440. "uicon-home-fill": "",
  14441. "uicon-home": "",
  14442. "uicon-hourglass-half-fill": "",
  14443. "uicon-hourglass": "",
  14444. "uicon-account": "",
  14445. "uicon-plus-people-fill": "",
  14446. "uicon-minus-people-fill": "",
  14447. "uicon-account-fill": "",
  14448. "uicon-thumb-down-fill": "",
  14449. "uicon-thumb-down": "",
  14450. "uicon-thumb-up": "",
  14451. "uicon-thumb-up-fill": "",
  14452. "uicon-lock-fill": "",
  14453. "uicon-lock-open": "",
  14454. "uicon-lock-opened-fill": "",
  14455. "uicon-lock": "",
  14456. "uicon-red-packet-fill": "",
  14457. "uicon-photo-fill": "",
  14458. "uicon-photo": "",
  14459. "uicon-volume-off-fill": "",
  14460. "uicon-volume-off": "",
  14461. "uicon-volume-fill": "",
  14462. "uicon-volume": "",
  14463. "uicon-red-packet": "",
  14464. "uicon-download": "",
  14465. "uicon-arrow-up-fill": "",
  14466. "uicon-arrow-down-fill": "",
  14467. "uicon-play-left-fill": "",
  14468. "uicon-play-right-fill": "",
  14469. "uicon-rewind-left-fill": "",
  14470. "uicon-rewind-right-fill": "",
  14471. "uicon-arrow-downward": "",
  14472. "uicon-arrow-leftward": "",
  14473. "uicon-arrow-rightward": "",
  14474. "uicon-arrow-upward": "",
  14475. "uicon-arrow-down": "",
  14476. "uicon-arrow-right": "",
  14477. "uicon-arrow-left": "",
  14478. "uicon-arrow-up": "",
  14479. "uicon-skip-back-left": "",
  14480. "uicon-skip-forward-right": "",
  14481. "uicon-rewind-right": "",
  14482. "uicon-rewind-left": "",
  14483. "uicon-arrow-right-double": "",
  14484. "uicon-arrow-left-double": "",
  14485. "uicon-wifi-off": "",
  14486. "uicon-wifi": "",
  14487. "uicon-empty-data": "",
  14488. "uicon-empty-history": "",
  14489. "uicon-empty-list": "",
  14490. "uicon-empty-page": "",
  14491. "uicon-empty-order": "",
  14492. "uicon-man": "",
  14493. "uicon-woman": "",
  14494. "uicon-man-add": "",
  14495. "uicon-man-add-fill": "",
  14496. "uicon-man-delete": "",
  14497. "uicon-man-delete-fill": "",
  14498. "uicon-zh": "",
  14499. "uicon-en": ""
  14500. };
  14501. const props$j = {
  14502. props: {
  14503. // 图标类名
  14504. name: {
  14505. type: String,
  14506. default: defprops.icon.name
  14507. },
  14508. // 图标颜色,可接受主题色
  14509. color: {
  14510. type: String,
  14511. default: defprops.icon.color
  14512. },
  14513. // 字体大小,单位px
  14514. size: {
  14515. type: [String, Number],
  14516. default: defprops.icon.size
  14517. },
  14518. // 是否显示粗体
  14519. bold: {
  14520. type: Boolean,
  14521. default: defprops.icon.bold
  14522. },
  14523. // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
  14524. index: {
  14525. type: [String, Number],
  14526. default: defprops.icon.index
  14527. },
  14528. // 触摸图标时的类名
  14529. hoverClass: {
  14530. type: String,
  14531. default: defprops.icon.hoverClass
  14532. },
  14533. // 自定义扩展前缀,方便用户扩展自己的图标库
  14534. customPrefix: {
  14535. type: String,
  14536. default: defprops.icon.customPrefix
  14537. },
  14538. // 图标右边或者下面的文字
  14539. label: {
  14540. type: [String, Number],
  14541. default: defprops.icon.label
  14542. },
  14543. // label的位置,只能右边或者下边
  14544. labelPos: {
  14545. type: String,
  14546. default: defprops.icon.labelPos
  14547. },
  14548. // label的大小
  14549. labelSize: {
  14550. type: [String, Number],
  14551. default: defprops.icon.labelSize
  14552. },
  14553. // label的颜色
  14554. labelColor: {
  14555. type: String,
  14556. default: defprops.icon.labelColor
  14557. },
  14558. // label与图标的距离
  14559. space: {
  14560. type: [String, Number],
  14561. default: defprops.icon.space
  14562. },
  14563. // 图片的mode
  14564. imgMode: {
  14565. type: String,
  14566. default: defprops.icon.imgMode
  14567. },
  14568. // 用于显示图片小图标时,图片的宽度
  14569. width: {
  14570. type: [String, Number],
  14571. default: defprops.icon.width
  14572. },
  14573. // 用于显示图片小图标时,图片的高度
  14574. height: {
  14575. type: [String, Number],
  14576. default: defprops.icon.height
  14577. },
  14578. // 用于解决某些情况下,让图标垂直居中的用途
  14579. top: {
  14580. type: [String, Number],
  14581. default: defprops.icon.top
  14582. },
  14583. // 是否阻止事件传播
  14584. stop: {
  14585. type: Boolean,
  14586. default: defprops.icon.stop
  14587. }
  14588. }
  14589. };
  14590. const props$i = {
  14591. props: {
  14592. // 列表锚点文本内容
  14593. text: {
  14594. type: [String, Number],
  14595. default: defprops.indexAnchor.text
  14596. },
  14597. // 列表锚点文字颜色
  14598. color: {
  14599. type: String,
  14600. default: defprops.indexAnchor.color
  14601. },
  14602. // 列表锚点文字大小,单位默认px
  14603. size: {
  14604. type: [String, Number],
  14605. default: defprops.indexAnchor.size
  14606. },
  14607. // 列表锚点背景颜色
  14608. bgColor: {
  14609. type: String,
  14610. default: defprops.indexAnchor.bgColor
  14611. },
  14612. // 列表锚点高度,单位默认px
  14613. height: {
  14614. type: [String, Number],
  14615. default: defprops.indexAnchor.height
  14616. }
  14617. }
  14618. };
  14619. const props$h = {
  14620. props: {}
  14621. };
  14622. const props$g = {
  14623. props: {
  14624. // 右边锚点非激活的颜色
  14625. inactiveColor: {
  14626. type: String,
  14627. default: defprops.indexList.inactiveColor
  14628. },
  14629. // 右边锚点激活的颜色
  14630. activeColor: {
  14631. type: String,
  14632. default: defprops.indexList.activeColor
  14633. },
  14634. // 索引字符列表,数组形式
  14635. indexList: {
  14636. type: Array,
  14637. default: defprops.indexList.indexList
  14638. },
  14639. // 是否开启锚点自动吸顶
  14640. sticky: {
  14641. type: Boolean,
  14642. default: defprops.indexList.sticky
  14643. },
  14644. // 自定义导航栏的高度
  14645. customNavHeight: {
  14646. type: [String, Number],
  14647. default: defprops.indexList.customNavHeight
  14648. }
  14649. }
  14650. };
  14651. const props$f = {
  14652. props: {
  14653. // 显示的内容,数组
  14654. text: {
  14655. type: [Array, String],
  14656. default: defprops.noticeBar.text
  14657. },
  14658. // 通告滚动模式,row-横向滚动,column-竖向滚动
  14659. direction: {
  14660. type: String,
  14661. default: defprops.noticeBar.direction
  14662. },
  14663. // direction = row时,是否使用步进形式滚动
  14664. step: {
  14665. type: Boolean,
  14666. default: defprops.noticeBar.step
  14667. },
  14668. // 是否显示左侧的音量图标
  14669. icon: {
  14670. type: String,
  14671. default: defprops.noticeBar.icon
  14672. },
  14673. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  14674. mode: {
  14675. type: String,
  14676. default: defprops.noticeBar.mode
  14677. },
  14678. // 文字颜色,各图标也会使用文字颜色
  14679. color: {
  14680. type: String,
  14681. default: defprops.noticeBar.color
  14682. },
  14683. // 背景颜色
  14684. bgColor: {
  14685. type: String,
  14686. default: defprops.noticeBar.bgColor
  14687. },
  14688. // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
  14689. speed: {
  14690. type: [String, Number],
  14691. default: defprops.noticeBar.speed
  14692. },
  14693. // 字体大小
  14694. fontSize: {
  14695. type: [String, Number],
  14696. default: defprops.noticeBar.fontSize
  14697. },
  14698. // 滚动一个周期的时间长,单位ms
  14699. duration: {
  14700. type: [String, Number],
  14701. default: defprops.noticeBar.duration
  14702. },
  14703. // 是否禁止用手滑动切换
  14704. // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
  14705. disableTouch: {
  14706. type: Boolean,
  14707. default: defprops.noticeBar.disableTouch
  14708. },
  14709. // 跳转的页面路径
  14710. url: {
  14711. type: String,
  14712. default: defprops.noticeBar.url
  14713. },
  14714. // 页面跳转的类型
  14715. linkType: {
  14716. type: String,
  14717. default: defprops.noticeBar.linkType
  14718. }
  14719. }
  14720. };
  14721. const props$e = {
  14722. props: {
  14723. // 是否虚线
  14724. dashed: {
  14725. type: Boolean,
  14726. default: defprops.divider.dashed
  14727. },
  14728. // 是否细线
  14729. hairline: {
  14730. type: Boolean,
  14731. default: defprops.divider.hairline
  14732. },
  14733. // 是否以点替代文字,优先于text字段起作用
  14734. dot: {
  14735. type: Boolean,
  14736. default: defprops.divider.dot
  14737. },
  14738. // 内容文本的位置,left-左边,center-中间,right-右边
  14739. textPosition: {
  14740. type: String,
  14741. default: defprops.divider.textPosition
  14742. },
  14743. // 文本内容
  14744. text: {
  14745. type: [String, Number],
  14746. default: defprops.divider.text
  14747. },
  14748. // 文本大小
  14749. textSize: {
  14750. type: [String, Number],
  14751. default: defprops.divider.textSize
  14752. },
  14753. // 文本颜色
  14754. textColor: {
  14755. type: String,
  14756. default: defprops.divider.textColor
  14757. },
  14758. // 线条颜色
  14759. lineColor: {
  14760. type: String,
  14761. default: defprops.divider.lineColor
  14762. }
  14763. }
  14764. };
  14765. const props$d = {
  14766. props: {
  14767. // input的label提示语
  14768. label: {
  14769. type: String,
  14770. default: defprops.formItem.label
  14771. },
  14772. // 绑定的值
  14773. prop: {
  14774. type: String,
  14775. default: defprops.formItem.prop
  14776. },
  14777. // 是否显示表单域的下划线边框
  14778. borderBottom: {
  14779. type: [String, Boolean],
  14780. default: defprops.formItem.borderBottom
  14781. },
  14782. // label的宽度,单位px
  14783. labelWidth: {
  14784. type: [String, Number],
  14785. default: defprops.formItem.labelWidth
  14786. },
  14787. // 右侧图标
  14788. rightIcon: {
  14789. type: String,
  14790. default: defprops.formItem.rightIcon
  14791. },
  14792. // 左侧图标
  14793. leftIcon: {
  14794. type: String,
  14795. default: defprops.formItem.leftIcon
  14796. },
  14797. // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
  14798. required: {
  14799. type: Boolean,
  14800. default: defprops.formItem.required
  14801. },
  14802. leftIconStyle: {
  14803. type: [String, Object],
  14804. default: defprops.formItem.leftIconStyle
  14805. }
  14806. }
  14807. };
  14808. const props$c = {
  14809. props: {
  14810. // 当前form的需要验证字段的集合
  14811. model: {
  14812. type: Object,
  14813. default: defprops.form.model
  14814. },
  14815. // 验证规则
  14816. rules: {
  14817. type: [Object, Function, Array],
  14818. default: defprops.form.rules
  14819. },
  14820. // 有错误时的提示方式,message-提示信息,toast-进行toast提示
  14821. // border-bottom-下边框呈现红色,none-无提示
  14822. errorType: {
  14823. type: String,
  14824. default: defprops.form.errorType
  14825. },
  14826. // 是否显示表单域的下划线边框
  14827. borderBottom: {
  14828. type: Boolean,
  14829. default: defprops.form.borderBottom
  14830. },
  14831. // label的位置,left-左边,top-上边
  14832. labelPosition: {
  14833. type: String,
  14834. default: defprops.form.labelPosition
  14835. },
  14836. // label的宽度,单位px
  14837. labelWidth: {
  14838. type: [String, Number],
  14839. default: defprops.form.labelWidth
  14840. },
  14841. // lable字体的对齐方式
  14842. labelAlign: {
  14843. type: String,
  14844. default: defprops.form.labelAlign
  14845. },
  14846. // lable的样式,对象形式
  14847. labelStyle: {
  14848. type: Object,
  14849. default: defprops.form.labelStyle
  14850. }
  14851. }
  14852. };
  14853. const formatRegExp = /%[sdj%]/g;
  14854. let warning = function warning2() {
  14855. };
  14856. if (typeof process !== "undefined" && process.env && true && typeof window !== "undefined" && typeof document !== "undefined") {
  14857. warning = function warning3(type2, errors) {
  14858. if (typeof console !== "undefined" && console.warn) {
  14859. if (errors.every((e2) => typeof e2 === "string")) {
  14860. console.warn(type2, errors);
  14861. }
  14862. }
  14863. };
  14864. }
  14865. function convertFieldsError(errors) {
  14866. if (!errors || !errors.length)
  14867. return null;
  14868. const fields = {};
  14869. errors.forEach((error2) => {
  14870. const { field } = error2;
  14871. fields[field] = fields[field] || [];
  14872. fields[field].push(error2);
  14873. });
  14874. return fields;
  14875. }
  14876. function format() {
  14877. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  14878. args[_key] = arguments[_key];
  14879. }
  14880. let i = 1;
  14881. const f2 = args[0];
  14882. const len = args.length;
  14883. if (typeof f2 === "function") {
  14884. return f2.apply(null, args.slice(1));
  14885. }
  14886. if (typeof f2 === "string") {
  14887. let str = String(f2).replace(formatRegExp, (x) => {
  14888. if (x === "%%") {
  14889. return "%";
  14890. }
  14891. if (i >= len) {
  14892. return x;
  14893. }
  14894. switch (x) {
  14895. case "%s":
  14896. return String(args[i++]);
  14897. case "%d":
  14898. return Number(args[i++]);
  14899. case "%j":
  14900. try {
  14901. return JSON.stringify(args[i++]);
  14902. } catch (_) {
  14903. return "[Circular]";
  14904. }
  14905. break;
  14906. default:
  14907. return x;
  14908. }
  14909. });
  14910. for (let arg = args[i]; i < len; arg = args[++i]) {
  14911. str += ` ${arg}`;
  14912. }
  14913. return str;
  14914. }
  14915. return f2;
  14916. }
  14917. function isNativeStringType(type2) {
  14918. return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern";
  14919. }
  14920. function isEmptyValue(value2, type2) {
  14921. if (value2 === void 0 || value2 === null) {
  14922. return true;
  14923. }
  14924. if (type2 === "array" && Array.isArray(value2) && !value2.length) {
  14925. return true;
  14926. }
  14927. if (isNativeStringType(type2) && typeof value2 === "string" && !value2) {
  14928. return true;
  14929. }
  14930. return false;
  14931. }
  14932. function asyncParallelArray(arr, func2, callback) {
  14933. const results = [];
  14934. let total = 0;
  14935. const arrLength = arr.length;
  14936. function count(errors) {
  14937. results.push.apply(results, errors);
  14938. total++;
  14939. if (total === arrLength) {
  14940. callback(results);
  14941. }
  14942. }
  14943. arr.forEach((a) => {
  14944. func2(a, count);
  14945. });
  14946. }
  14947. function asyncSerialArray(arr, func2, callback) {
  14948. let index2 = 0;
  14949. const arrLength = arr.length;
  14950. function next(errors) {
  14951. if (errors && errors.length) {
  14952. callback(errors);
  14953. return;
  14954. }
  14955. const original = index2;
  14956. index2 += 1;
  14957. if (original < arrLength) {
  14958. func2(arr[original], next);
  14959. } else {
  14960. callback([]);
  14961. }
  14962. }
  14963. next([]);
  14964. }
  14965. function flattenObjArr(objArr) {
  14966. const ret = [];
  14967. Object.keys(objArr).forEach((k) => {
  14968. ret.push.apply(ret, objArr[k]);
  14969. });
  14970. return ret;
  14971. }
  14972. function asyncMap(objArr, option, func2, callback) {
  14973. if (option.first) {
  14974. const _pending = new Promise((resolve2, reject) => {
  14975. const next = function next2(errors) {
  14976. callback(errors);
  14977. return errors.length ? reject({
  14978. errors,
  14979. fields: convertFieldsError(errors)
  14980. }) : resolve2();
  14981. };
  14982. const flattenArr = flattenObjArr(objArr);
  14983. asyncSerialArray(flattenArr, func2, next);
  14984. });
  14985. _pending.catch((e2) => e2);
  14986. return _pending;
  14987. }
  14988. let firstFields = option.firstFields || [];
  14989. if (firstFields === true) {
  14990. firstFields = Object.keys(objArr);
  14991. }
  14992. const objArrKeys = Object.keys(objArr);
  14993. const objArrLength = objArrKeys.length;
  14994. let total = 0;
  14995. const results = [];
  14996. const pending = new Promise((resolve2, reject) => {
  14997. const next = function next2(errors) {
  14998. results.push.apply(results, errors);
  14999. total++;
  15000. if (total === objArrLength) {
  15001. callback(results);
  15002. return results.length ? reject({
  15003. errors: results,
  15004. fields: convertFieldsError(results)
  15005. }) : resolve2();
  15006. }
  15007. };
  15008. if (!objArrKeys.length) {
  15009. callback(results);
  15010. resolve2();
  15011. }
  15012. objArrKeys.forEach((key) => {
  15013. const arr = objArr[key];
  15014. if (firstFields.indexOf(key) !== -1) {
  15015. asyncSerialArray(arr, func2, next);
  15016. } else {
  15017. asyncParallelArray(arr, func2, next);
  15018. }
  15019. });
  15020. });
  15021. pending.catch((e2) => e2);
  15022. return pending;
  15023. }
  15024. function complementError(rule) {
  15025. return function(oe) {
  15026. if (oe && oe.message) {
  15027. oe.field = oe.field || rule.fullField;
  15028. return oe;
  15029. }
  15030. return {
  15031. message: typeof oe === "function" ? oe() : oe,
  15032. field: oe.field || rule.fullField
  15033. };
  15034. };
  15035. }
  15036. function deepMerge(target, source) {
  15037. if (source) {
  15038. for (const s2 in source) {
  15039. if (source.hasOwnProperty(s2)) {
  15040. const value2 = source[s2];
  15041. if (typeof value2 === "object" && typeof target[s2] === "object") {
  15042. target[s2] = { ...target[s2], ...value2 };
  15043. } else {
  15044. target[s2] = value2;
  15045. }
  15046. }
  15047. }
  15048. }
  15049. return target;
  15050. }
  15051. function required(rule, value2, source, errors, options, type2) {
  15052. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) {
  15053. errors.push(format(options.messages.required, rule.fullField));
  15054. }
  15055. }
  15056. function whitespace(rule, value2, source, errors, options) {
  15057. if (/^\s+$/.test(value2) || value2 === "") {
  15058. errors.push(format(options.messages.whitespace, rule.fullField));
  15059. }
  15060. }
  15061. const pattern = {
  15062. // http://emailregex.com/
  15063. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  15064. url: new RegExp(
  15065. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  15066. "i"
  15067. ),
  15068. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
  15069. };
  15070. var types = {
  15071. integer: function integer(value2) {
  15072. return /^(-)?\d+$/.test(value2);
  15073. },
  15074. float: function float(value2) {
  15075. return /^(-)?\d+(\.\d+)?$/.test(value2);
  15076. },
  15077. array: function array(value2) {
  15078. return Array.isArray(value2);
  15079. },
  15080. regexp: function regexp(value2) {
  15081. if (value2 instanceof RegExp) {
  15082. return true;
  15083. }
  15084. try {
  15085. return !!new RegExp(value2);
  15086. } catch (e2) {
  15087. return false;
  15088. }
  15089. },
  15090. date: function date(value2) {
  15091. return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function";
  15092. },
  15093. number: function number(value2) {
  15094. if (isNaN(value2)) {
  15095. return false;
  15096. }
  15097. return typeof +value2 === "number";
  15098. },
  15099. object: function object(value2) {
  15100. return typeof value2 === "object" && !types.array(value2);
  15101. },
  15102. method: function method(value2) {
  15103. return typeof value2 === "function";
  15104. },
  15105. email: function email2(value2) {
  15106. return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255;
  15107. },
  15108. url: function url2(value2) {
  15109. return typeof value2 === "string" && !!value2.match(pattern.url);
  15110. },
  15111. hex: function hex(value2) {
  15112. return typeof value2 === "string" && !!value2.match(pattern.hex);
  15113. }
  15114. };
  15115. function type(rule, value2, source, errors, options) {
  15116. if (rule.required && value2 === void 0) {
  15117. required(rule, value2, source, errors, options);
  15118. return;
  15119. }
  15120. const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
  15121. const ruleType = rule.type;
  15122. if (custom.indexOf(ruleType) > -1) {
  15123. if (!types[ruleType](value2)) {
  15124. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  15125. }
  15126. } else if (ruleType && typeof value2 !== rule.type) {
  15127. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  15128. }
  15129. }
  15130. function range(rule, value2, source, errors, options) {
  15131. const len = typeof rule.len === "number";
  15132. const min2 = typeof rule.min === "number";
  15133. const max2 = typeof rule.max === "number";
  15134. const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  15135. let val = value2;
  15136. let key = null;
  15137. const num = typeof value2 === "number";
  15138. const str = typeof value2 === "string";
  15139. const arr = Array.isArray(value2);
  15140. if (num) {
  15141. key = "number";
  15142. } else if (str) {
  15143. key = "string";
  15144. } else if (arr) {
  15145. key = "array";
  15146. }
  15147. if (!key) {
  15148. return false;
  15149. }
  15150. if (arr) {
  15151. val = value2.length;
  15152. }
  15153. if (str) {
  15154. val = value2.replace(spRegexp, "_").length;
  15155. }
  15156. if (len) {
  15157. if (val !== rule.len) {
  15158. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  15159. }
  15160. } else if (min2 && !max2 && val < rule.min) {
  15161. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  15162. } else if (max2 && !min2 && val > rule.max) {
  15163. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  15164. } else if (min2 && max2 && (val < rule.min || val > rule.max)) {
  15165. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  15166. }
  15167. }
  15168. const ENUM = "enum";
  15169. function enumerable(rule, value2, source, errors, options) {
  15170. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  15171. if (rule[ENUM].indexOf(value2) === -1) {
  15172. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(", ")));
  15173. }
  15174. }
  15175. function pattern$1(rule, value2, source, errors, options) {
  15176. if (rule.pattern) {
  15177. if (rule.pattern instanceof RegExp) {
  15178. rule.pattern.lastIndex = 0;
  15179. if (!rule.pattern.test(value2)) {
  15180. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  15181. }
  15182. } else if (typeof rule.pattern === "string") {
  15183. const _pattern = new RegExp(rule.pattern);
  15184. if (!_pattern.test(value2)) {
  15185. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value2, rule.pattern));
  15186. }
  15187. }
  15188. }
  15189. }
  15190. const rules = {
  15191. required,
  15192. whitespace,
  15193. type,
  15194. range,
  15195. enum: enumerable,
  15196. pattern: pattern$1
  15197. };
  15198. function string(rule, value2, callback, source, options) {
  15199. const errors = [];
  15200. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15201. if (validate2) {
  15202. if (isEmptyValue(value2, "string") && !rule.required) {
  15203. return callback();
  15204. }
  15205. rules.required(rule, value2, source, errors, options, "string");
  15206. if (!isEmptyValue(value2, "string")) {
  15207. rules.type(rule, value2, source, errors, options);
  15208. rules.range(rule, value2, source, errors, options);
  15209. rules.pattern(rule, value2, source, errors, options);
  15210. if (rule.whitespace === true) {
  15211. rules.whitespace(rule, value2, source, errors, options);
  15212. }
  15213. }
  15214. }
  15215. callback(errors);
  15216. }
  15217. function method2(rule, value2, callback, source, options) {
  15218. const errors = [];
  15219. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15220. if (validate2) {
  15221. if (isEmptyValue(value2) && !rule.required) {
  15222. return callback();
  15223. }
  15224. rules.required(rule, value2, source, errors, options);
  15225. if (value2 !== void 0) {
  15226. rules.type(rule, value2, source, errors, options);
  15227. }
  15228. }
  15229. callback(errors);
  15230. }
  15231. function number2(rule, value2, callback, source, options) {
  15232. const errors = [];
  15233. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15234. if (validate2) {
  15235. if (value2 === "") {
  15236. value2 = void 0;
  15237. }
  15238. if (isEmptyValue(value2) && !rule.required) {
  15239. return callback();
  15240. }
  15241. rules.required(rule, value2, source, errors, options);
  15242. if (value2 !== void 0) {
  15243. rules.type(rule, value2, source, errors, options);
  15244. rules.range(rule, value2, source, errors, options);
  15245. }
  15246. }
  15247. callback(errors);
  15248. }
  15249. function _boolean(rule, value2, callback, source, options) {
  15250. const errors = [];
  15251. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15252. if (validate2) {
  15253. if (isEmptyValue(value2) && !rule.required) {
  15254. return callback();
  15255. }
  15256. rules.required(rule, value2, source, errors, options);
  15257. if (value2 !== void 0) {
  15258. rules.type(rule, value2, source, errors, options);
  15259. }
  15260. }
  15261. callback(errors);
  15262. }
  15263. function regexp2(rule, value2, callback, source, options) {
  15264. const errors = [];
  15265. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15266. if (validate2) {
  15267. if (isEmptyValue(value2) && !rule.required) {
  15268. return callback();
  15269. }
  15270. rules.required(rule, value2, source, errors, options);
  15271. if (!isEmptyValue(value2)) {
  15272. rules.type(rule, value2, source, errors, options);
  15273. }
  15274. }
  15275. callback(errors);
  15276. }
  15277. function integer2(rule, value2, callback, source, options) {
  15278. const errors = [];
  15279. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15280. if (validate2) {
  15281. if (isEmptyValue(value2) && !rule.required) {
  15282. return callback();
  15283. }
  15284. rules.required(rule, value2, source, errors, options);
  15285. if (value2 !== void 0) {
  15286. rules.type(rule, value2, source, errors, options);
  15287. rules.range(rule, value2, source, errors, options);
  15288. }
  15289. }
  15290. callback(errors);
  15291. }
  15292. function floatFn(rule, value2, callback, source, options) {
  15293. const errors = [];
  15294. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15295. if (validate2) {
  15296. if (isEmptyValue(value2) && !rule.required) {
  15297. return callback();
  15298. }
  15299. rules.required(rule, value2, source, errors, options);
  15300. if (value2 !== void 0) {
  15301. rules.type(rule, value2, source, errors, options);
  15302. rules.range(rule, value2, source, errors, options);
  15303. }
  15304. }
  15305. callback(errors);
  15306. }
  15307. function array2(rule, value2, callback, source, options) {
  15308. const errors = [];
  15309. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15310. if (validate2) {
  15311. if (isEmptyValue(value2, "array") && !rule.required) {
  15312. return callback();
  15313. }
  15314. rules.required(rule, value2, source, errors, options, "array");
  15315. if (!isEmptyValue(value2, "array")) {
  15316. rules.type(rule, value2, source, errors, options);
  15317. rules.range(rule, value2, source, errors, options);
  15318. }
  15319. }
  15320. callback(errors);
  15321. }
  15322. function object2(rule, value2, callback, source, options) {
  15323. const errors = [];
  15324. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15325. if (validate2) {
  15326. if (isEmptyValue(value2) && !rule.required) {
  15327. return callback();
  15328. }
  15329. rules.required(rule, value2, source, errors, options);
  15330. if (value2 !== void 0) {
  15331. rules.type(rule, value2, source, errors, options);
  15332. }
  15333. }
  15334. callback(errors);
  15335. }
  15336. const ENUM$1 = "enum";
  15337. function enumerable$1(rule, value2, callback, source, options) {
  15338. const errors = [];
  15339. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15340. if (validate2) {
  15341. if (isEmptyValue(value2) && !rule.required) {
  15342. return callback();
  15343. }
  15344. rules.required(rule, value2, source, errors, options);
  15345. if (value2 !== void 0) {
  15346. rules[ENUM$1](rule, value2, source, errors, options);
  15347. }
  15348. }
  15349. callback(errors);
  15350. }
  15351. function pattern$2(rule, value2, callback, source, options) {
  15352. const errors = [];
  15353. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15354. if (validate2) {
  15355. if (isEmptyValue(value2, "string") && !rule.required) {
  15356. return callback();
  15357. }
  15358. rules.required(rule, value2, source, errors, options);
  15359. if (!isEmptyValue(value2, "string")) {
  15360. rules.pattern(rule, value2, source, errors, options);
  15361. }
  15362. }
  15363. callback(errors);
  15364. }
  15365. function date2(rule, value2, callback, source, options) {
  15366. const errors = [];
  15367. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15368. if (validate2) {
  15369. if (isEmptyValue(value2) && !rule.required) {
  15370. return callback();
  15371. }
  15372. rules.required(rule, value2, source, errors, options);
  15373. if (!isEmptyValue(value2)) {
  15374. let dateObject;
  15375. if (typeof value2 === "number") {
  15376. dateObject = new Date(value2);
  15377. } else {
  15378. dateObject = value2;
  15379. }
  15380. rules.type(rule, dateObject, source, errors, options);
  15381. if (dateObject) {
  15382. rules.range(rule, dateObject.getTime(), source, errors, options);
  15383. }
  15384. }
  15385. }
  15386. callback(errors);
  15387. }
  15388. function required$1(rule, value2, callback, source, options) {
  15389. const errors = [];
  15390. const type2 = Array.isArray(value2) ? "array" : typeof value2;
  15391. rules.required(rule, value2, source, errors, options, type2);
  15392. callback(errors);
  15393. }
  15394. function type$1(rule, value2, callback, source, options) {
  15395. const ruleType = rule.type;
  15396. const errors = [];
  15397. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15398. if (validate2) {
  15399. if (isEmptyValue(value2, ruleType) && !rule.required) {
  15400. return callback();
  15401. }
  15402. rules.required(rule, value2, source, errors, options, ruleType);
  15403. if (!isEmptyValue(value2, ruleType)) {
  15404. rules.type(rule, value2, source, errors, options);
  15405. }
  15406. }
  15407. callback(errors);
  15408. }
  15409. function any(rule, value2, callback, source, options) {
  15410. const errors = [];
  15411. const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  15412. if (validate2) {
  15413. if (isEmptyValue(value2) && !rule.required) {
  15414. return callback();
  15415. }
  15416. rules.required(rule, value2, source, errors, options);
  15417. }
  15418. callback(errors);
  15419. }
  15420. const validators = {
  15421. string,
  15422. method: method2,
  15423. number: number2,
  15424. boolean: _boolean,
  15425. regexp: regexp2,
  15426. integer: integer2,
  15427. float: floatFn,
  15428. array: array2,
  15429. object: object2,
  15430. enum: enumerable$1,
  15431. pattern: pattern$2,
  15432. date: date2,
  15433. url: type$1,
  15434. hex: type$1,
  15435. email: type$1,
  15436. required: required$1,
  15437. any
  15438. };
  15439. function newMessages() {
  15440. return {
  15441. default: "Validation error on field %s",
  15442. required: "%s is required",
  15443. enum: "%s must be one of %s",
  15444. whitespace: "%s cannot be empty",
  15445. date: {
  15446. format: "%s date %s is invalid for format %s",
  15447. parse: "%s date could not be parsed, %s is invalid ",
  15448. invalid: "%s date %s is invalid"
  15449. },
  15450. types: {
  15451. string: "%s is not a %s",
  15452. method: "%s is not a %s (function)",
  15453. array: "%s is not an %s",
  15454. object: "%s is not an %s",
  15455. number: "%s is not a %s",
  15456. date: "%s is not a %s",
  15457. boolean: "%s is not a %s",
  15458. integer: "%s is not an %s",
  15459. float: "%s is not a %s",
  15460. regexp: "%s is not a valid %s",
  15461. email: "%s is not a valid %s",
  15462. url: "%s is not a valid %s",
  15463. hex: "%s is not a valid %s"
  15464. },
  15465. string: {
  15466. len: "%s must be exactly %s characters",
  15467. min: "%s must be at least %s characters",
  15468. max: "%s cannot be longer than %s characters",
  15469. range: "%s must be between %s and %s characters"
  15470. },
  15471. number: {
  15472. len: "%s must equal %s",
  15473. min: "%s cannot be less than %s",
  15474. max: "%s cannot be greater than %s",
  15475. range: "%s must be between %s and %s"
  15476. },
  15477. array: {
  15478. len: "%s must be exactly %s in length",
  15479. min: "%s cannot be less than %s in length",
  15480. max: "%s cannot be greater than %s in length",
  15481. range: "%s must be between %s and %s in length"
  15482. },
  15483. pattern: {
  15484. mismatch: "%s value %s does not match pattern %s"
  15485. },
  15486. clone: function clone2() {
  15487. const cloned = JSON.parse(JSON.stringify(this));
  15488. cloned.clone = this.clone;
  15489. return cloned;
  15490. }
  15491. };
  15492. }
  15493. const messages = newMessages();
  15494. function Schema(descriptor) {
  15495. this.rules = null;
  15496. this._messages = messages;
  15497. this.define(descriptor);
  15498. }
  15499. Schema.prototype = {
  15500. messages: function messages2(_messages) {
  15501. if (_messages) {
  15502. this._messages = deepMerge(newMessages(), _messages);
  15503. }
  15504. return this._messages;
  15505. },
  15506. define: function define(rules2) {
  15507. if (!rules2) {
  15508. throw new Error("Cannot configure a schema with no rules");
  15509. }
  15510. if (typeof rules2 !== "object" || Array.isArray(rules2)) {
  15511. throw new Error("Rules must be an object");
  15512. }
  15513. this.rules = {};
  15514. let z;
  15515. let item;
  15516. for (z in rules2) {
  15517. if (rules2.hasOwnProperty(z)) {
  15518. item = rules2[z];
  15519. this.rules[z] = Array.isArray(item) ? item : [item];
  15520. }
  15521. }
  15522. },
  15523. validate: function validate(source_, o2, oc) {
  15524. const _this = this;
  15525. if (o2 === void 0) {
  15526. o2 = {};
  15527. }
  15528. if (oc === void 0) {
  15529. oc = function oc2() {
  15530. };
  15531. }
  15532. let source = source_;
  15533. let options = o2;
  15534. let callback = oc;
  15535. if (typeof options === "function") {
  15536. callback = options;
  15537. options = {};
  15538. }
  15539. if (!this.rules || Object.keys(this.rules).length === 0) {
  15540. if (callback) {
  15541. callback();
  15542. }
  15543. return Promise.resolve();
  15544. }
  15545. function complete(results) {
  15546. let i;
  15547. let errors = [];
  15548. let fields = {};
  15549. function add2(e2) {
  15550. if (Array.isArray(e2)) {
  15551. let _errors;
  15552. errors = (_errors = errors).concat.apply(_errors, e2);
  15553. } else {
  15554. errors.push(e2);
  15555. }
  15556. }
  15557. for (i = 0; i < results.length; i++) {
  15558. add2(results[i]);
  15559. }
  15560. if (!errors.length) {
  15561. errors = null;
  15562. fields = null;
  15563. } else {
  15564. fields = convertFieldsError(errors);
  15565. }
  15566. callback(errors, fields);
  15567. }
  15568. if (options.messages) {
  15569. let messages$1 = this.messages();
  15570. if (messages$1 === messages) {
  15571. messages$1 = newMessages();
  15572. }
  15573. deepMerge(messages$1, options.messages);
  15574. options.messages = messages$1;
  15575. } else {
  15576. options.messages = this.messages();
  15577. }
  15578. let arr;
  15579. let value2;
  15580. const series = {};
  15581. const keys2 = options.keys || Object.keys(this.rules);
  15582. keys2.forEach((z) => {
  15583. arr = _this.rules[z];
  15584. value2 = source[z];
  15585. arr.forEach((r) => {
  15586. let rule = r;
  15587. if (typeof rule.transform === "function") {
  15588. if (source === source_) {
  15589. source = { ...source };
  15590. }
  15591. value2 = source[z] = rule.transform(value2);
  15592. }
  15593. if (typeof rule === "function") {
  15594. rule = {
  15595. validator: rule
  15596. };
  15597. } else {
  15598. rule = { ...rule };
  15599. }
  15600. rule.validator = _this.getValidationMethod(rule);
  15601. rule.field = z;
  15602. rule.fullField = rule.fullField || z;
  15603. rule.type = _this.getType(rule);
  15604. if (!rule.validator) {
  15605. return;
  15606. }
  15607. series[z] = series[z] || [];
  15608. series[z].push({
  15609. rule,
  15610. value: value2,
  15611. source,
  15612. field: z
  15613. });
  15614. });
  15615. });
  15616. const errorFields = {};
  15617. return asyncMap(series, options, (data, doIt) => {
  15618. const { rule } = data;
  15619. let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
  15620. deep = deep && (rule.required || !rule.required && data.value);
  15621. rule.field = data.field;
  15622. function addFullfield(key, schema) {
  15623. return { ...schema, fullField: `${rule.fullField}.${key}` };
  15624. }
  15625. function cb(e2) {
  15626. if (e2 === void 0) {
  15627. e2 = [];
  15628. }
  15629. let errors = e2;
  15630. if (!Array.isArray(errors)) {
  15631. errors = [errors];
  15632. }
  15633. if (!options.suppressWarning && errors.length) {
  15634. Schema.warning("async-validator:", errors);
  15635. }
  15636. if (errors.length && rule.message) {
  15637. errors = [].concat(rule.message);
  15638. }
  15639. errors = errors.map(complementError(rule));
  15640. if (options.first && errors.length) {
  15641. errorFields[rule.field] = 1;
  15642. return doIt(errors);
  15643. }
  15644. if (!deep) {
  15645. doIt(errors);
  15646. } else {
  15647. if (rule.required && !data.value) {
  15648. if (rule.message) {
  15649. errors = [].concat(rule.message).map(complementError(rule));
  15650. } else if (options.error) {
  15651. errors = [options.error(rule, format(options.messages.required, rule.field))];
  15652. } else {
  15653. errors = [];
  15654. }
  15655. return doIt(errors);
  15656. }
  15657. let fieldsSchema = {};
  15658. if (rule.defaultField) {
  15659. for (const k in data.value) {
  15660. if (data.value.hasOwnProperty(k)) {
  15661. fieldsSchema[k] = rule.defaultField;
  15662. }
  15663. }
  15664. }
  15665. fieldsSchema = { ...fieldsSchema, ...data.rule.fields };
  15666. for (const f2 in fieldsSchema) {
  15667. if (fieldsSchema.hasOwnProperty(f2)) {
  15668. const fieldSchema = Array.isArray(fieldsSchema[f2]) ? fieldsSchema[f2] : [fieldsSchema[f2]];
  15669. fieldsSchema[f2] = fieldSchema.map(addFullfield.bind(null, f2));
  15670. }
  15671. }
  15672. const schema = new Schema(fieldsSchema);
  15673. schema.messages(options.messages);
  15674. if (data.rule.options) {
  15675. data.rule.options.messages = options.messages;
  15676. data.rule.options.error = options.error;
  15677. }
  15678. schema.validate(data.value, data.rule.options || options, (errs) => {
  15679. const finalErrors = [];
  15680. if (errors && errors.length) {
  15681. finalErrors.push.apply(finalErrors, errors);
  15682. }
  15683. if (errs && errs.length) {
  15684. finalErrors.push.apply(finalErrors, errs);
  15685. }
  15686. doIt(finalErrors.length ? finalErrors : null);
  15687. });
  15688. }
  15689. }
  15690. let res;
  15691. if (rule.asyncValidator) {
  15692. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  15693. } else if (rule.validator) {
  15694. res = rule.validator(rule, data.value, cb, data.source, options);
  15695. if (res === true) {
  15696. cb();
  15697. } else if (res === false) {
  15698. cb(rule.message || `${rule.field} fails`);
  15699. } else if (res instanceof Array) {
  15700. cb(res);
  15701. } else if (res instanceof Error) {
  15702. cb(res.message);
  15703. }
  15704. }
  15705. if (res && res.then) {
  15706. res.then(() => cb(), (e2) => cb(e2));
  15707. }
  15708. }, (results) => {
  15709. complete(results);
  15710. });
  15711. },
  15712. getType: function getType2(rule) {
  15713. if (rule.type === void 0 && rule.pattern instanceof RegExp) {
  15714. rule.type = "pattern";
  15715. }
  15716. if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
  15717. throw new Error(format("Unknown rule type %s", rule.type));
  15718. }
  15719. return rule.type || "string";
  15720. },
  15721. getValidationMethod: function getValidationMethod(rule) {
  15722. if (typeof rule.validator === "function") {
  15723. return rule.validator;
  15724. }
  15725. const keys2 = Object.keys(rule);
  15726. const messageIndex = keys2.indexOf("message");
  15727. if (messageIndex !== -1) {
  15728. keys2.splice(messageIndex, 1);
  15729. }
  15730. if (keys2.length === 1 && keys2[0] === "required") {
  15731. return validators.required;
  15732. }
  15733. return validators[this.getType(rule)] || false;
  15734. }
  15735. };
  15736. Schema.register = function register(type2, validator) {
  15737. if (typeof validator !== "function") {
  15738. throw new Error("Cannot register a validator by type, validator is not a function");
  15739. }
  15740. validators[type2] = validator;
  15741. };
  15742. Schema.warning = warning;
  15743. Schema.messages = messages;
  15744. const props$b = {
  15745. props: {
  15746. // tab的数据
  15747. list: {
  15748. type: Array,
  15749. default: defprops.subsection.list
  15750. },
  15751. // 当前活动的tab的index
  15752. current: {
  15753. type: [String, Number],
  15754. default: defprops.subsection.current
  15755. },
  15756. // 激活的颜色
  15757. activeColor: {
  15758. type: String,
  15759. default: defprops.subsection.activeColor
  15760. },
  15761. // 未激活的颜色
  15762. inactiveColor: {
  15763. type: String,
  15764. default: defprops.subsection.inactiveColor
  15765. },
  15766. // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
  15767. mode: {
  15768. type: String,
  15769. default: defprops.subsection.mode
  15770. },
  15771. // 字体大小
  15772. fontSize: {
  15773. type: [String, Number],
  15774. default: defprops.subsection.fontSize
  15775. },
  15776. // 激活tab的字体是否加粗
  15777. bold: {
  15778. type: Boolean,
  15779. default: defprops.subsection.bold
  15780. },
  15781. // mode = button时,组件背景颜色
  15782. bgColor: {
  15783. type: String,
  15784. default: defprops.subsection.bgColor
  15785. },
  15786. // 从list元素对象中读取的键名
  15787. keyName: {
  15788. type: String,
  15789. default: defprops.subsection.keyName
  15790. }
  15791. }
  15792. };
  15793. const button = {
  15794. props: {
  15795. lang: String,
  15796. sessionFrom: String,
  15797. sendMessageTitle: String,
  15798. sendMessagePath: String,
  15799. sendMessageImg: String,
  15800. showMessageCard: Boolean,
  15801. appParameter: String,
  15802. formType: String,
  15803. openType: String
  15804. }
  15805. };
  15806. const openType = {
  15807. props: {
  15808. openType: String
  15809. },
  15810. methods: {
  15811. onGetUserInfo(event) {
  15812. this.$emit("getuserinfo", event.detail);
  15813. },
  15814. onContact(event) {
  15815. this.$emit("contact", event.detail);
  15816. },
  15817. onGetPhoneNumber(event) {
  15818. this.$emit("getphonenumber", event.detail);
  15819. },
  15820. onError(event) {
  15821. this.$emit("error", event.detail);
  15822. },
  15823. onLaunchApp(event) {
  15824. this.$emit("launchapp", event.detail);
  15825. },
  15826. onOpenSetting(event) {
  15827. this.$emit("opensetting", event.detail);
  15828. }
  15829. }
  15830. };
  15831. const props$a = {
  15832. props: {
  15833. // 是否细边框
  15834. hairline: {
  15835. type: Boolean,
  15836. default: defprops.button.hairline
  15837. },
  15838. // 按钮的预置样式,info,primary,error,warning,success
  15839. type: {
  15840. type: String,
  15841. default: defprops.button.type
  15842. },
  15843. // 按钮尺寸,large,normal,small,mini
  15844. size: {
  15845. type: String,
  15846. default: defprops.button.size
  15847. },
  15848. // 按钮形状,circle(两边为半圆),square(带圆角)
  15849. shape: {
  15850. type: String,
  15851. default: defprops.button.shape
  15852. },
  15853. // 按钮是否镂空
  15854. plain: {
  15855. type: Boolean,
  15856. default: defprops.button.plain
  15857. },
  15858. // 是否禁止状态
  15859. disabled: {
  15860. type: Boolean,
  15861. default: defprops.button.disabled
  15862. },
  15863. // 是否加载中
  15864. loading: {
  15865. type: Boolean,
  15866. default: defprops.button.loading
  15867. },
  15868. // 加载中提示文字
  15869. loadingText: {
  15870. type: [String, Number],
  15871. default: defprops.button.loadingText
  15872. },
  15873. // 加载状态图标类型
  15874. loadingMode: {
  15875. type: String,
  15876. default: defprops.button.loadingMode
  15877. },
  15878. // 加载图标大小
  15879. loadingSize: {
  15880. type: [String, Number],
  15881. default: defprops.button.loadingSize
  15882. },
  15883. // 开放能力,具体请看uniapp稳定关于button组件部分说明
  15884. // https://uniapp.dcloud.io/component/button
  15885. openType: {
  15886. type: String,
  15887. default: defprops.button.openType
  15888. },
  15889. // 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
  15890. // 取值为submit(提交表单),reset(重置表单)
  15891. formType: {
  15892. type: String,
  15893. default: defprops.button.formType
  15894. },
  15895. // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
  15896. // 只微信小程序、QQ小程序有效
  15897. appParameter: {
  15898. type: String,
  15899. default: defprops.button.appParameter
  15900. },
  15901. // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
  15902. hoverStopPropagation: {
  15903. type: Boolean,
  15904. default: defprops.button.hoverStopPropagation
  15905. },
  15906. // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
  15907. lang: {
  15908. type: String,
  15909. default: defprops.button.lang
  15910. },
  15911. // 会话来源,open-type="contact"时有效。只微信小程序有效
  15912. sessionFrom: {
  15913. type: String,
  15914. default: defprops.button.sessionFrom
  15915. },
  15916. // 会话内消息卡片标题,open-type="contact"时有效
  15917. // 默认当前标题,只微信小程序有效
  15918. sendMessageTitle: {
  15919. type: String,
  15920. default: defprops.button.sendMessageTitle
  15921. },
  15922. // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
  15923. // 默认当前分享路径,只微信小程序有效
  15924. sendMessagePath: {
  15925. type: String,
  15926. default: defprops.button.sendMessagePath
  15927. },
  15928. // 会话内消息卡片图片,open-type="contact"时有效
  15929. // 默认当前页面截图,只微信小程序有效
  15930. sendMessageImg: {
  15931. type: String,
  15932. default: defprops.button.sendMessageImg
  15933. },
  15934. // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
  15935. // 用户点击后可以快速发送小程序消息,open-type="contact"时有效
  15936. showMessageCard: {
  15937. type: Boolean,
  15938. default: defprops.button.showMessageCard
  15939. },
  15940. // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
  15941. dataName: {
  15942. type: String,
  15943. default: defprops.button.dataName
  15944. },
  15945. // 节流,一定时间内只能触发一次
  15946. throttleTime: {
  15947. type: [String, Number],
  15948. default: defprops.button.throttleTime
  15949. },
  15950. // 按住后多久出现点击态,单位毫秒
  15951. hoverStartTime: {
  15952. type: [String, Number],
  15953. default: defprops.button.hoverStartTime
  15954. },
  15955. // 手指松开后点击态保留时间,单位毫秒
  15956. hoverStayTime: {
  15957. type: [String, Number],
  15958. default: defprops.button.hoverStayTime
  15959. },
  15960. // 按钮文字,之所以通过props传入,是因为slot传入的话
  15961. // nvue中无法控制文字的样式
  15962. text: {
  15963. type: [String, Number],
  15964. default: defprops.button.text
  15965. },
  15966. // 按钮图标
  15967. icon: {
  15968. type: String,
  15969. default: defprops.button.icon
  15970. },
  15971. // 按钮图标
  15972. iconColor: {
  15973. type: String,
  15974. default: defprops.button.icon
  15975. },
  15976. // 按钮颜色,支持传入linear-gradient渐变色
  15977. color: {
  15978. type: String,
  15979. default: defprops.button.color
  15980. }
  15981. }
  15982. };
  15983. const props$9 = {
  15984. props: {
  15985. // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
  15986. list: {
  15987. type: Array,
  15988. default: defprops.swiper.list
  15989. },
  15990. // 是否显示面板指示器
  15991. indicator: {
  15992. type: Boolean,
  15993. default: defprops.swiper.indicator
  15994. },
  15995. // 指示器非激活颜色
  15996. indicatorActiveColor: {
  15997. type: String,
  15998. default: defprops.swiper.indicatorActiveColor
  15999. },
  16000. // 指示器的激活颜色
  16001. indicatorInactiveColor: {
  16002. type: String,
  16003. default: defprops.swiper.indicatorInactiveColor
  16004. },
  16005. // 指示器样式,可通过bottom,left,right进行定位
  16006. indicatorStyle: {
  16007. type: [String, Object],
  16008. default: defprops.swiper.indicatorStyle
  16009. },
  16010. // 指示器模式,line-线型,dot-点型
  16011. indicatorMode: {
  16012. type: String,
  16013. default: defprops.swiper.indicatorMode
  16014. },
  16015. // 是否自动切换
  16016. autoplay: {
  16017. type: Boolean,
  16018. default: defprops.swiper.autoplay
  16019. },
  16020. // 当前所在滑块的 index
  16021. current: {
  16022. type: [String, Number],
  16023. default: defprops.swiper.current
  16024. },
  16025. // 当前所在滑块的 item-id ,不能与 current 被同时指定
  16026. currentItemId: {
  16027. type: String,
  16028. default: defprops.swiper.currentItemId
  16029. },
  16030. // 滑块自动切换时间间隔
  16031. interval: {
  16032. type: [String, Number],
  16033. default: defprops.swiper.interval
  16034. },
  16035. // 滑块切换过程所需时间
  16036. duration: {
  16037. type: [String, Number],
  16038. default: defprops.swiper.duration
  16039. },
  16040. // 播放到末尾后是否重新回到开头
  16041. circular: {
  16042. type: Boolean,
  16043. default: defprops.swiper.circular
  16044. },
  16045. // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
  16046. previousMargin: {
  16047. type: [String, Number],
  16048. default: defprops.swiper.previousMargin
  16049. },
  16050. // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
  16051. nextMargin: {
  16052. type: [String, Number],
  16053. default: defprops.swiper.nextMargin
  16054. },
  16055. // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
  16056. acceleration: {
  16057. type: Boolean,
  16058. default: defprops.swiper.acceleration
  16059. },
  16060. // 同时显示的滑块数量,nvue、支付宝小程序不支持
  16061. displayMultipleItems: {
  16062. type: Number,
  16063. default: defprops.swiper.displayMultipleItems
  16064. },
  16065. // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
  16066. // 只对微信小程序有效
  16067. easingFunction: {
  16068. type: String,
  16069. default: defprops.swiper.easingFunction
  16070. },
  16071. // list数组中指定对象的目标属性名
  16072. keyName: {
  16073. type: String,
  16074. default: defprops.swiper.keyName
  16075. },
  16076. // 图片的裁剪模式
  16077. imgMode: {
  16078. type: String,
  16079. default: defprops.swiper.imgMode
  16080. },
  16081. // 组件高度
  16082. height: {
  16083. type: [String, Number],
  16084. default: defprops.swiper.height
  16085. },
  16086. // 背景颜色
  16087. bgColor: {
  16088. type: String,
  16089. default: defprops.swiper.bgColor
  16090. },
  16091. // 组件圆角,数值或带单位的字符串
  16092. radius: {
  16093. type: [String, Number],
  16094. default: defprops.swiper.radius
  16095. },
  16096. // 是否加载中
  16097. loading: {
  16098. type: Boolean,
  16099. default: defprops.swiper.loading
  16100. },
  16101. // 是否显示标题,要求数组对象中有title属性
  16102. showTitle: {
  16103. type: Boolean,
  16104. default: defprops.swiper.showTitle
  16105. }
  16106. }
  16107. };
  16108. const props$8 = {
  16109. props: {
  16110. color: {
  16111. type: String,
  16112. default: defprops.line.color
  16113. },
  16114. // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
  16115. length: {
  16116. type: [String, Number],
  16117. default: defprops.line.length
  16118. },
  16119. // 线条方向,col-竖向,row-横向
  16120. direction: {
  16121. type: String,
  16122. default: defprops.line.direction
  16123. },
  16124. // 是否显示细边框
  16125. hairline: {
  16126. type: Boolean,
  16127. default: defprops.line.hairline
  16128. },
  16129. // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
  16130. margin: {
  16131. type: [String, Number],
  16132. default: defprops.line.margin
  16133. },
  16134. // 是否虚线,true-虚线,false-实线
  16135. dashed: {
  16136. type: Boolean,
  16137. default: defprops.line.dashed
  16138. }
  16139. }
  16140. };
  16141. const props$7 = {
  16142. props: {
  16143. // 图片地址,Array<String>|Array<Object>形式
  16144. urls: {
  16145. type: Array,
  16146. default: defprops.album.urls
  16147. },
  16148. // 指定从数组的对象元素中读取哪个属性作为图片地址
  16149. keyName: {
  16150. type: String,
  16151. default: defprops.album.keyName
  16152. },
  16153. // 单图时,图片长边的长度
  16154. singleSize: {
  16155. type: [String, Number],
  16156. default: defprops.album.singleSize
  16157. },
  16158. // 多图时,图片边长
  16159. multipleSize: {
  16160. type: [String, Number],
  16161. default: defprops.album.multipleSize
  16162. },
  16163. // 多图时,图片水平和垂直之间的间隔
  16164. space: {
  16165. type: [String, Number],
  16166. default: defprops.album.space
  16167. },
  16168. // 单图时,图片缩放裁剪的模式
  16169. singleMode: {
  16170. type: String,
  16171. default: defprops.album.singleMode
  16172. },
  16173. // 多图时,图片缩放裁剪的模式
  16174. multipleMode: {
  16175. type: String,
  16176. default: defprops.album.multipleMode
  16177. },
  16178. // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
  16179. maxCount: {
  16180. type: [String, Number],
  16181. default: defprops.album.maxCount
  16182. },
  16183. // 是否可以预览图片
  16184. previewFullImage: {
  16185. type: Boolean,
  16186. default: defprops.album.previewFullImage
  16187. },
  16188. // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
  16189. rowCount: {
  16190. type: [String, Number],
  16191. default: defprops.album.rowCount
  16192. },
  16193. // 超出maxCount时是否显示查看更多的提示
  16194. showMore: {
  16195. type: Boolean,
  16196. default: defprops.album.showMore
  16197. }
  16198. }
  16199. };
  16200. const value = {
  16201. computed: {
  16202. // 经处理后需要显示的值
  16203. value() {
  16204. const {
  16205. text,
  16206. mode,
  16207. format: format2,
  16208. href
  16209. } = this;
  16210. if (mode === "price") {
  16211. if (!/^\d+(\.\d+)?$/.test(text)) {
  16212. index$1.$u.error("金额模式下,text参数需要为金额格式");
  16213. }
  16214. if (index$1.$u.test.func(format2)) {
  16215. return format2(text);
  16216. }
  16217. return index$1.$u.priceFormat(text, 2);
  16218. }
  16219. if (mode === "date") {
  16220. !index$1.$u.test.date(text) && index$1.$u.error("日期模式下,text参数需要为日期或时间戳格式");
  16221. if (index$1.$u.test.func(format2)) {
  16222. return format2(text);
  16223. }
  16224. if (format2) {
  16225. return index$1.$u.timeFormat(text, format2);
  16226. }
  16227. return index$1.$u.timeFormat(text, "yyyy-mm-dd");
  16228. }
  16229. if (mode === "phone") {
  16230. if (index$1.$u.test.func(format2)) {
  16231. return format2(text);
  16232. }
  16233. if (format2 === "encrypt") {
  16234. return `${text.substr(0, 3)}****${text.substr(7)}`;
  16235. }
  16236. return text;
  16237. }
  16238. if (mode === "name") {
  16239. !(typeof text === "string") && index$1.$u.error("姓名模式下,text参数需要为字符串格式");
  16240. if (index$1.$u.test.func(format2)) {
  16241. return format2(text);
  16242. }
  16243. if (format2 === "encrypt") {
  16244. return this.formatName(text);
  16245. }
  16246. return text;
  16247. }
  16248. if (mode === "link") {
  16249. !index$1.$u.test.url(href) && index$1.$u.error("超链接模式下,href参数需要为URL格式");
  16250. return text;
  16251. }
  16252. return text;
  16253. }
  16254. },
  16255. methods: {
  16256. // 默认的姓名脱敏规则
  16257. formatName(name) {
  16258. let value2 = "";
  16259. if (name.length === 2) {
  16260. value2 = name.substr(0, 1) + "*";
  16261. } else if (name.length > 2) {
  16262. let char = "";
  16263. for (let i = 0, len = name.length - 2; i < len; i++) {
  16264. char += "*";
  16265. }
  16266. value2 = name.substr(0, 1) + char + name.substr(-1, 1);
  16267. } else {
  16268. value2 = name;
  16269. }
  16270. return value2;
  16271. }
  16272. }
  16273. };
  16274. const props$6 = {
  16275. props: {
  16276. // 主题颜色
  16277. type: {
  16278. type: String,
  16279. default: defprops.text.type
  16280. },
  16281. // 是否显示
  16282. show: {
  16283. type: Boolean,
  16284. default: defprops.text.show
  16285. },
  16286. // 显示的值
  16287. text: {
  16288. type: [String, Number],
  16289. default: defprops.text.text
  16290. },
  16291. // 前置图标
  16292. prefixIcon: {
  16293. type: String,
  16294. default: defprops.text.prefixIcon
  16295. },
  16296. // 后置图标
  16297. suffixIcon: {
  16298. type: String,
  16299. default: defprops.text.suffixIcon
  16300. },
  16301. // 文本处理的匹配模式
  16302. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  16303. mode: {
  16304. type: String,
  16305. default: defprops.text.mode
  16306. },
  16307. // mode=link下,配置的链接
  16308. href: {
  16309. type: String,
  16310. default: defprops.text.href
  16311. },
  16312. // 格式化规则
  16313. format: {
  16314. type: [String, Function],
  16315. default: defprops.text.format
  16316. },
  16317. // mode=phone时,点击文本是否拨打电话
  16318. call: {
  16319. type: Boolean,
  16320. default: defprops.text.call
  16321. },
  16322. // 小程序的打开方式
  16323. openType: {
  16324. type: String,
  16325. default: defprops.text.openType
  16326. },
  16327. // 是否粗体,默认normal
  16328. bold: {
  16329. type: Boolean,
  16330. default: defprops.text.bold
  16331. },
  16332. // 是否块状
  16333. block: {
  16334. type: Boolean,
  16335. default: defprops.text.block
  16336. },
  16337. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  16338. lines: {
  16339. type: [String, Number],
  16340. default: defprops.text.lines
  16341. },
  16342. // 文本颜色
  16343. color: {
  16344. type: String,
  16345. default: defprops.text.color
  16346. },
  16347. // 字体大小
  16348. size: {
  16349. type: [String, Number],
  16350. default: defprops.text.size
  16351. },
  16352. // 图标的样式
  16353. iconStyle: {
  16354. type: [Object, String],
  16355. default: defprops.text.iconStyle
  16356. },
  16357. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  16358. decoration: {
  16359. tepe: String,
  16360. default: defprops.text.decoration
  16361. },
  16362. // 外边距,对象、字符串,数值形式均可
  16363. margin: {
  16364. type: [Object, String, Number],
  16365. default: defprops.text.margin
  16366. },
  16367. // 文本行高
  16368. lineHeight: {
  16369. type: [String, Number],
  16370. default: defprops.text.lineHeight
  16371. },
  16372. // 文本对齐方式,可选值left|center|right
  16373. align: {
  16374. type: String,
  16375. default: defprops.text.align
  16376. },
  16377. // 文字换行,可选值break-word|normal|anywhere
  16378. wordWrap: {
  16379. type: String,
  16380. default: defprops.text.wordWrap
  16381. }
  16382. }
  16383. };
  16384. const props$5 = {
  16385. props: {
  16386. // 是否展示组件
  16387. show: {
  16388. type: Boolean,
  16389. default: defprops.transition.show
  16390. },
  16391. // 使用的动画模式
  16392. mode: {
  16393. type: String,
  16394. default: defprops.transition.mode
  16395. },
  16396. // 动画的执行时间,单位ms
  16397. duration: {
  16398. type: [String, Number],
  16399. default: defprops.transition.duration
  16400. },
  16401. // 使用的动画过渡函数
  16402. timingFunction: {
  16403. type: String,
  16404. default: defprops.transition.timingFunction
  16405. }
  16406. }
  16407. };
  16408. const getClassNames = (name) => ({
  16409. enter: `u-${name}-enter u-${name}-enter-active`,
  16410. "enter-to": `u-${name}-enter-to u-${name}-enter-active`,
  16411. leave: `u-${name}-leave u-${name}-leave-active`,
  16412. "leave-to": `u-${name}-leave-to u-${name}-leave-active`
  16413. });
  16414. const transition = {
  16415. methods: {
  16416. // 组件被点击发出事件
  16417. clickHandler() {
  16418. this.$emit("click");
  16419. },
  16420. // vue版本的组件进场处理
  16421. async vueEnter() {
  16422. const classNames = getClassNames(this.mode);
  16423. this.status = "enter";
  16424. this.$emit("beforeEnter");
  16425. this.inited = true;
  16426. this.display = true;
  16427. this.classes = classNames.enter;
  16428. await nextTick$1();
  16429. {
  16430. this.$emit("enter");
  16431. this.transitionEnded = false;
  16432. this.$emit("afterEnter");
  16433. this.classes = classNames["enter-to"];
  16434. }
  16435. },
  16436. // 动画离场处理
  16437. async vueLeave() {
  16438. if (!this.display)
  16439. return;
  16440. const classNames = getClassNames(this.mode);
  16441. this.status = "leave";
  16442. this.$emit("beforeLeave");
  16443. this.classes = classNames.leave;
  16444. await nextTick$1();
  16445. {
  16446. this.transitionEnded = false;
  16447. this.$emit("leave");
  16448. setTimeout(this.onTransitionEnd, this.duration);
  16449. this.classes = classNames["leave-to"];
  16450. }
  16451. },
  16452. // 完成过渡后触发
  16453. onTransitionEnd() {
  16454. if (this.transitionEnded)
  16455. return;
  16456. this.transitionEnded = true;
  16457. this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter");
  16458. if (!this.show && this.display) {
  16459. this.display = false;
  16460. this.inited = false;
  16461. }
  16462. }
  16463. }
  16464. };
  16465. const props$4 = {
  16466. props: {
  16467. // 显示的内容,字符串
  16468. text: {
  16469. type: [Array],
  16470. default: defprops.columnNotice.text
  16471. },
  16472. // 是否显示左侧的音量图标
  16473. icon: {
  16474. type: String,
  16475. default: defprops.columnNotice.icon
  16476. },
  16477. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  16478. mode: {
  16479. type: String,
  16480. default: defprops.columnNotice.mode
  16481. },
  16482. // 文字颜色,各图标也会使用文字颜色
  16483. color: {
  16484. type: String,
  16485. default: defprops.columnNotice.color
  16486. },
  16487. // 背景颜色
  16488. bgColor: {
  16489. type: String,
  16490. default: defprops.columnNotice.bgColor
  16491. },
  16492. // 字体大小,单位px
  16493. fontSize: {
  16494. type: [String, Number],
  16495. default: defprops.columnNotice.fontSize
  16496. },
  16497. // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
  16498. speed: {
  16499. type: [String, Number],
  16500. default: defprops.columnNotice.speed
  16501. },
  16502. // direction = row时,是否使用步进形式滚动
  16503. step: {
  16504. type: Boolean,
  16505. default: defprops.columnNotice.step
  16506. },
  16507. // 滚动一个周期的时间长,单位ms
  16508. duration: {
  16509. type: [String, Number],
  16510. default: defprops.columnNotice.duration
  16511. },
  16512. // 是否禁止用手滑动切换
  16513. // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
  16514. disableTouch: {
  16515. type: Boolean,
  16516. default: defprops.columnNotice.disableTouch
  16517. }
  16518. }
  16519. };
  16520. const props$3 = {
  16521. props: {
  16522. // 显示的内容,字符串
  16523. text: {
  16524. type: String,
  16525. default: defprops.rowNotice.text
  16526. },
  16527. // 是否显示左侧的音量图标
  16528. icon: {
  16529. type: String,
  16530. default: defprops.rowNotice.icon
  16531. },
  16532. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  16533. mode: {
  16534. type: String,
  16535. default: defprops.rowNotice.mode
  16536. },
  16537. // 文字颜色,各图标也会使用文字颜色
  16538. color: {
  16539. type: String,
  16540. default: defprops.rowNotice.color
  16541. },
  16542. // 背景颜色
  16543. bgColor: {
  16544. type: String,
  16545. default: defprops.rowNotice.bgColor
  16546. },
  16547. // 字体大小,单位px
  16548. fontSize: {
  16549. type: [String, Number],
  16550. default: defprops.rowNotice.fontSize
  16551. },
  16552. // 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度
  16553. speed: {
  16554. type: [String, Number],
  16555. default: defprops.rowNotice.speed
  16556. }
  16557. }
  16558. };
  16559. const props$2 = {
  16560. props: {
  16561. // 是否显示组件
  16562. show: {
  16563. type: Boolean,
  16564. default: defprops.loadingIcon.show
  16565. },
  16566. // 颜色
  16567. color: {
  16568. type: String,
  16569. default: defprops.loadingIcon.color
  16570. },
  16571. // 提示文字颜色
  16572. textColor: {
  16573. type: String,
  16574. default: defprops.loadingIcon.textColor
  16575. },
  16576. // 文字和图标是否垂直排列
  16577. vertical: {
  16578. type: Boolean,
  16579. default: defprops.loadingIcon.vertical
  16580. },
  16581. // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
  16582. mode: {
  16583. type: String,
  16584. default: defprops.loadingIcon.mode
  16585. },
  16586. // 图标大小,单位默认px
  16587. size: {
  16588. type: [String, Number],
  16589. default: defprops.loadingIcon.size
  16590. },
  16591. // 文字大小
  16592. textSize: {
  16593. type: [String, Number],
  16594. default: defprops.loadingIcon.textSize
  16595. },
  16596. // 文字内容
  16597. text: {
  16598. type: [String, Number],
  16599. default: defprops.loadingIcon.text
  16600. },
  16601. // 动画模式
  16602. timingFunction: {
  16603. type: String,
  16604. default: defprops.loadingIcon.timingFunction
  16605. },
  16606. // 动画执行周期时间
  16607. duration: {
  16608. type: [String, Number],
  16609. default: defprops.loadingIcon.duration
  16610. },
  16611. // mode=circle时的暗边颜色
  16612. inactiveColor: {
  16613. type: String,
  16614. default: defprops.loadingIcon.inactiveColor
  16615. }
  16616. }
  16617. };
  16618. const props$1 = {
  16619. props: {
  16620. // 轮播的长度
  16621. length: {
  16622. type: [String, Number],
  16623. default: defprops.swiperIndicator.length
  16624. },
  16625. // 当前处于活动状态的轮播的索引
  16626. current: {
  16627. type: [String, Number],
  16628. default: defprops.swiperIndicator.current
  16629. },
  16630. // 指示器非激活颜色
  16631. indicatorActiveColor: {
  16632. type: String,
  16633. default: defprops.swiperIndicator.indicatorActiveColor
  16634. },
  16635. // 指示器的激活颜色
  16636. indicatorInactiveColor: {
  16637. type: String,
  16638. default: defprops.swiperIndicator.indicatorInactiveColor
  16639. },
  16640. // 指示器模式,line-线型,dot-点型
  16641. indicatorMode: {
  16642. type: String,
  16643. default: defprops.swiperIndicator.indicatorMode
  16644. }
  16645. }
  16646. };
  16647. const props = {
  16648. props: {
  16649. // 文字颜色
  16650. color: {
  16651. type: String,
  16652. default: defprops.link.color
  16653. },
  16654. // 字体大小,单位px
  16655. fontSize: {
  16656. type: [String, Number],
  16657. default: defprops.link.fontSize
  16658. },
  16659. // 是否显示下划线
  16660. underLine: {
  16661. type: Boolean,
  16662. default: defprops.link.underLine
  16663. },
  16664. // 要跳转的链接
  16665. href: {
  16666. type: String,
  16667. default: defprops.link.href
  16668. },
  16669. // 小程序中复制到粘贴板的提示语
  16670. mpTips: {
  16671. type: String,
  16672. default: defprops.link.mpTips
  16673. },
  16674. // 下划线颜色
  16675. lineColor: {
  16676. type: String,
  16677. default: defprops.link.lineColor
  16678. },
  16679. // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
  16680. text: {
  16681. type: String,
  16682. default: defprops.link.text
  16683. }
  16684. }
  16685. };
  16686. exports.Schema = Schema;
  16687. exports._export_sfc = _export_sfc;
  16688. exports.button = button;
  16689. exports.computed = computed;
  16690. exports.createSSRApp = createSSRApp;
  16691. exports.defineComponent = defineComponent;
  16692. exports.e = e;
  16693. exports.f = f;
  16694. exports.getCurrentInstance = getCurrentInstance;
  16695. exports.hooks = hooks;
  16696. exports.icons = icons;
  16697. exports.index = index$1;
  16698. exports.mixin = mixin;
  16699. exports.mpMixin = mpMixin;
  16700. exports.n = n;
  16701. exports.o = o;
  16702. exports.onLoad = onLoad;
  16703. exports.onPullDownRefresh = onPullDownRefresh;
  16704. exports.onShow = onShow;
  16705. exports.openType = openType;
  16706. exports.p = p;
  16707. exports.props = props$l;
  16708. exports.props$1 = props$k;
  16709. exports.props$10 = props$b;
  16710. exports.props$11 = props$a;
  16711. exports.props$12 = props$9;
  16712. exports.props$13 = props$8;
  16713. exports.props$14 = props$7;
  16714. exports.props$15 = props$6;
  16715. exports.props$16 = props$5;
  16716. exports.props$17 = props$4;
  16717. exports.props$18 = props$3;
  16718. exports.props$19 = props$2;
  16719. exports.props$2 = props$j;
  16720. exports.props$20 = props$1;
  16721. exports.props$21 = props;
  16722. exports.props$3 = props$i;
  16723. exports.props$4 = props$h;
  16724. exports.props$5 = props$g;
  16725. exports.props$6 = props$f;
  16726. exports.props$7 = props$e;
  16727. exports.props$8 = props$d;
  16728. exports.props$9 = props$c;
  16729. exports.ref = ref;
  16730. exports.resolveComponent = resolveComponent;
  16731. exports.s = s;
  16732. exports.sr = sr;
  16733. exports.t = t;
  16734. exports.transition = transition;
  16735. exports.unref = unref;
  16736. exports.uviewPlus = uviewPlus;
  16737. exports.value = value;
  16738. exports.wx$1 = wx$1;