vendor.js 395 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 108:
  53. /*!************************************************************!*\
  54. !*** E:/work/Project_newGit/UniappShell/api/system/app.js ***!
  55. \************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. "use strict";
  59. Object.defineProperty(exports, "__esModule", {
  60. value: true
  61. });
  62. exports.getAppList = getAppList;
  63. exports.getQuickList = getQuickList;
  64. var _request = __webpack_require__(/*! @/libs/request.js */ 41);
  65. function getAppList() {
  66. return (0, _request.request)({
  67. url: "/mini/store"
  68. });
  69. }
  70. function getQuickList() {
  71. return (0, _request.request)({
  72. url: "/mini/quick"
  73. });
  74. }
  75. /***/ }),
  76. /***/ 11:
  77. /*!***************************************************************!*\
  78. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  79. \***************************************************************/
  80. /*! no static exports found */
  81. /***/ (function(module, exports, __webpack_require__) {
  82. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  83. function _defineProperty(obj, key, value) {
  84. key = toPropertyKey(key);
  85. if (key in obj) {
  86. Object.defineProperty(obj, key, {
  87. value: value,
  88. enumerable: true,
  89. configurable: true,
  90. writable: true
  91. });
  92. } else {
  93. obj[key] = value;
  94. }
  95. return obj;
  96. }
  97. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  98. /***/ }),
  99. /***/ 117:
  100. /*!***************************************************************!*\
  101. !*** E:/work/Project_newGit/UniappShell/api/system/msgApi.js ***!
  102. \***************************************************************/
  103. /*! no static exports found */
  104. /***/ (function(module, exports, __webpack_require__) {
  105. "use strict";
  106. Object.defineProperty(exports, "__esModule", {
  107. value: true
  108. });
  109. exports.deleteMsgById = deleteMsgById;
  110. exports.getMsgById = getMsgById;
  111. exports.getMsgReceivedByPage = getMsgReceivedByPage;
  112. exports.getMsgSentByPage = getMsgSentByPage;
  113. exports.getUnReadCounter = getUnReadCounter;
  114. exports.putAllReadStatus = putAllReadStatus;
  115. exports.putReadStatus = putReadStatus;
  116. exports.sendMsg = sendMsg;
  117. var _request = __webpack_require__(/*! @/libs/request.js */ 41);
  118. /**
  119. * 分页查询发送消息
  120. * @param data
  121. * @returns
  122. */
  123. function getMsgSentByPage(data) {
  124. return (0, _request.request)({
  125. url: '/msg/sent/page',
  126. method: 'GET',
  127. data: data
  128. });
  129. }
  130. /**
  131. * 分页查询接收消息
  132. * @param data
  133. * @returns
  134. */
  135. function getMsgReceivedByPage(data) {
  136. return (0, _request.request)({
  137. url: '/msg/received/page',
  138. method: 'GET',
  139. data: data
  140. });
  141. }
  142. /**
  143. * 基于ID获取消息详情
  144. * @param msgId
  145. * @returns
  146. */
  147. function getMsgById(msgId) {
  148. return (0, _request.request)({
  149. url: "/msg/".concat(msgId),
  150. method: 'GET'
  151. });
  152. }
  153. /**
  154. * 基于ID置已读状态
  155. * @param msgId
  156. * @returns
  157. */
  158. function putReadStatus(msgId) {
  159. return (0, _request.request)({
  160. url: "/msg/read/".concat(msgId),
  161. method: 'PUT'
  162. });
  163. }
  164. /**
  165. * 获取未读消息数目
  166. * @returns
  167. */
  168. function getUnReadCounter() {
  169. return (0, _request.request)({
  170. url: "/msg/unread/count",
  171. method: 'GET'
  172. });
  173. }
  174. /**
  175. * 发送消息
  176. * @param data
  177. * @returns
  178. */
  179. function sendMsg(data) {
  180. return (0, _request.request)({
  181. url: "/msg/send",
  182. method: 'POST',
  183. data: data
  184. });
  185. }
  186. /**
  187. * 删除消息
  188. * @param msgId
  189. * @returns
  190. */
  191. function deleteMsgById(msgId) {
  192. return (0, _request.request)({
  193. url: "/msg/".concat(msgId),
  194. method: 'DELETE'
  195. });
  196. }
  197. /**
  198. * 全部已读
  199. * @param msgId
  200. * @returns
  201. */
  202. function putAllReadStatus() {
  203. return (0, _request.request)({
  204. url: "/msg/all/read",
  205. method: 'PUT'
  206. });
  207. }
  208. /***/ }),
  209. /***/ 12:
  210. /*!**************************************************************!*\
  211. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  212. \**************************************************************/
  213. /*! no static exports found */
  214. /***/ (function(module, exports, __webpack_require__) {
  215. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  216. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  217. function _toPropertyKey(arg) {
  218. var key = toPrimitive(arg, "string");
  219. return _typeof(key) === "symbol" ? key : String(key);
  220. }
  221. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  222. /***/ }),
  223. /***/ 13:
  224. /*!*******************************************************!*\
  225. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  226. \*******************************************************/
  227. /*! no static exports found */
  228. /***/ (function(module, exports) {
  229. function _typeof(obj) {
  230. "@babel/helpers - typeof";
  231. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  232. return typeof obj;
  233. } : function (obj) {
  234. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  235. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  236. }
  237. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  238. /***/ }),
  239. /***/ 14:
  240. /*!************************************************************!*\
  241. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  242. \************************************************************/
  243. /*! no static exports found */
  244. /***/ (function(module, exports, __webpack_require__) {
  245. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  246. function _toPrimitive(input, hint) {
  247. if (_typeof(input) !== "object" || input === null) return input;
  248. var prim = input[Symbol.toPrimitive];
  249. if (prim !== undefined) {
  250. var res = prim.call(input, hint || "default");
  251. if (_typeof(res) !== "object") return res;
  252. throw new TypeError("@@toPrimitive must return a primitive value.");
  253. }
  254. return (hint === "string" ? String : Number)(input);
  255. }
  256. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  257. /***/ }),
  258. /***/ 147:
  259. /*!**********************************************************************************************!*\
  260. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  261. \**********************************************************************************************/
  262. /*! no static exports found */
  263. /***/ (function(module, exports, __webpack_require__) {
  264. "use strict";
  265. Object.defineProperty(exports, "__esModule", {
  266. value: true
  267. });
  268. exports.default = void 0;
  269. var _default = {
  270. "id": "2852637",
  271. "name": "uniui图标库",
  272. "font_family": "uniicons",
  273. "css_prefix_text": "uniui-",
  274. "description": "",
  275. "glyphs": [{
  276. "icon_id": "25027049",
  277. "name": "yanse",
  278. "font_class": "color",
  279. "unicode": "e6cf",
  280. "unicode_decimal": 59087
  281. }, {
  282. "icon_id": "25027048",
  283. "name": "wallet",
  284. "font_class": "wallet",
  285. "unicode": "e6b1",
  286. "unicode_decimal": 59057
  287. }, {
  288. "icon_id": "25015720",
  289. "name": "settings-filled",
  290. "font_class": "settings-filled",
  291. "unicode": "e6ce",
  292. "unicode_decimal": 59086
  293. }, {
  294. "icon_id": "25015434",
  295. "name": "shimingrenzheng-filled",
  296. "font_class": "auth-filled",
  297. "unicode": "e6cc",
  298. "unicode_decimal": 59084
  299. }, {
  300. "icon_id": "24934246",
  301. "name": "shop-filled",
  302. "font_class": "shop-filled",
  303. "unicode": "e6cd",
  304. "unicode_decimal": 59085
  305. }, {
  306. "icon_id": "24934159",
  307. "name": "staff-filled-01",
  308. "font_class": "staff-filled",
  309. "unicode": "e6cb",
  310. "unicode_decimal": 59083
  311. }, {
  312. "icon_id": "24932461",
  313. "name": "VIP-filled",
  314. "font_class": "vip-filled",
  315. "unicode": "e6c6",
  316. "unicode_decimal": 59078
  317. }, {
  318. "icon_id": "24932462",
  319. "name": "plus_circle_fill",
  320. "font_class": "plus-filled",
  321. "unicode": "e6c7",
  322. "unicode_decimal": 59079
  323. }, {
  324. "icon_id": "24932463",
  325. "name": "folder_add-filled",
  326. "font_class": "folder-add-filled",
  327. "unicode": "e6c8",
  328. "unicode_decimal": 59080
  329. }, {
  330. "icon_id": "24932464",
  331. "name": "yanse-filled",
  332. "font_class": "color-filled",
  333. "unicode": "e6c9",
  334. "unicode_decimal": 59081
  335. }, {
  336. "icon_id": "24932465",
  337. "name": "tune-filled",
  338. "font_class": "tune-filled",
  339. "unicode": "e6ca",
  340. "unicode_decimal": 59082
  341. }, {
  342. "icon_id": "24932455",
  343. "name": "a-rilidaka-filled",
  344. "font_class": "calendar-filled",
  345. "unicode": "e6c0",
  346. "unicode_decimal": 59072
  347. }, {
  348. "icon_id": "24932456",
  349. "name": "notification-filled",
  350. "font_class": "notification-filled",
  351. "unicode": "e6c1",
  352. "unicode_decimal": 59073
  353. }, {
  354. "icon_id": "24932457",
  355. "name": "wallet-filled",
  356. "font_class": "wallet-filled",
  357. "unicode": "e6c2",
  358. "unicode_decimal": 59074
  359. }, {
  360. "icon_id": "24932458",
  361. "name": "paihangbang-filled",
  362. "font_class": "medal-filled",
  363. "unicode": "e6c3",
  364. "unicode_decimal": 59075
  365. }, {
  366. "icon_id": "24932459",
  367. "name": "gift-filled",
  368. "font_class": "gift-filled",
  369. "unicode": "e6c4",
  370. "unicode_decimal": 59076
  371. }, {
  372. "icon_id": "24932460",
  373. "name": "fire-filled",
  374. "font_class": "fire-filled",
  375. "unicode": "e6c5",
  376. "unicode_decimal": 59077
  377. }, {
  378. "icon_id": "24928001",
  379. "name": "refreshempty",
  380. "font_class": "refreshempty",
  381. "unicode": "e6bf",
  382. "unicode_decimal": 59071
  383. }, {
  384. "icon_id": "24926853",
  385. "name": "location-ellipse",
  386. "font_class": "location-filled",
  387. "unicode": "e6af",
  388. "unicode_decimal": 59055
  389. }, {
  390. "icon_id": "24926735",
  391. "name": "person-filled",
  392. "font_class": "person-filled",
  393. "unicode": "e69d",
  394. "unicode_decimal": 59037
  395. }, {
  396. "icon_id": "24926703",
  397. "name": "personadd-filled",
  398. "font_class": "personadd-filled",
  399. "unicode": "e698",
  400. "unicode_decimal": 59032
  401. }, {
  402. "icon_id": "24923351",
  403. "name": "back",
  404. "font_class": "back",
  405. "unicode": "e6b9",
  406. "unicode_decimal": 59065
  407. }, {
  408. "icon_id": "24923352",
  409. "name": "forward",
  410. "font_class": "forward",
  411. "unicode": "e6ba",
  412. "unicode_decimal": 59066
  413. }, {
  414. "icon_id": "24923353",
  415. "name": "arrowthinright",
  416. "font_class": "arrow-right",
  417. "unicode": "e6bb",
  418. "unicode_decimal": 59067
  419. }, {
  420. "icon_id": "24923353",
  421. "name": "arrowthinright",
  422. "font_class": "arrowthinright",
  423. "unicode": "e6bb",
  424. "unicode_decimal": 59067
  425. }, {
  426. "icon_id": "24923354",
  427. "name": "arrowthinleft",
  428. "font_class": "arrow-left",
  429. "unicode": "e6bc",
  430. "unicode_decimal": 59068
  431. }, {
  432. "icon_id": "24923354",
  433. "name": "arrowthinleft",
  434. "font_class": "arrowthinleft",
  435. "unicode": "e6bc",
  436. "unicode_decimal": 59068
  437. }, {
  438. "icon_id": "24923355",
  439. "name": "arrowthinup",
  440. "font_class": "arrow-up",
  441. "unicode": "e6bd",
  442. "unicode_decimal": 59069
  443. }, {
  444. "icon_id": "24923355",
  445. "name": "arrowthinup",
  446. "font_class": "arrowthinup",
  447. "unicode": "e6bd",
  448. "unicode_decimal": 59069
  449. }, {
  450. "icon_id": "24923356",
  451. "name": "arrowthindown",
  452. "font_class": "arrow-down",
  453. "unicode": "e6be",
  454. "unicode_decimal": 59070
  455. }, {
  456. "icon_id": "24923356",
  457. "name": "arrowthindown",
  458. "font_class": "arrowthindown",
  459. "unicode": "e6be",
  460. "unicode_decimal": 59070
  461. }, {
  462. "icon_id": "24923349",
  463. "name": "arrowdown",
  464. "font_class": "bottom",
  465. "unicode": "e6b8",
  466. "unicode_decimal": 59064
  467. }, {
  468. "icon_id": "24923349",
  469. "name": "arrowdown",
  470. "font_class": "arrowdown",
  471. "unicode": "e6b8",
  472. "unicode_decimal": 59064
  473. }, {
  474. "icon_id": "24923346",
  475. "name": "arrowright",
  476. "font_class": "right",
  477. "unicode": "e6b5",
  478. "unicode_decimal": 59061
  479. }, {
  480. "icon_id": "24923346",
  481. "name": "arrowright",
  482. "font_class": "arrowright",
  483. "unicode": "e6b5",
  484. "unicode_decimal": 59061
  485. }, {
  486. "icon_id": "24923347",
  487. "name": "arrowup",
  488. "font_class": "top",
  489. "unicode": "e6b6",
  490. "unicode_decimal": 59062
  491. }, {
  492. "icon_id": "24923347",
  493. "name": "arrowup",
  494. "font_class": "arrowup",
  495. "unicode": "e6b6",
  496. "unicode_decimal": 59062
  497. }, {
  498. "icon_id": "24923348",
  499. "name": "arrowleft",
  500. "font_class": "left",
  501. "unicode": "e6b7",
  502. "unicode_decimal": 59063
  503. }, {
  504. "icon_id": "24923348",
  505. "name": "arrowleft",
  506. "font_class": "arrowleft",
  507. "unicode": "e6b7",
  508. "unicode_decimal": 59063
  509. }, {
  510. "icon_id": "24923334",
  511. "name": "eye",
  512. "font_class": "eye",
  513. "unicode": "e651",
  514. "unicode_decimal": 58961
  515. }, {
  516. "icon_id": "24923335",
  517. "name": "eye-filled",
  518. "font_class": "eye-filled",
  519. "unicode": "e66a",
  520. "unicode_decimal": 58986
  521. }, {
  522. "icon_id": "24923336",
  523. "name": "eye-slash",
  524. "font_class": "eye-slash",
  525. "unicode": "e6b3",
  526. "unicode_decimal": 59059
  527. }, {
  528. "icon_id": "24923337",
  529. "name": "eye-slash-filled",
  530. "font_class": "eye-slash-filled",
  531. "unicode": "e6b4",
  532. "unicode_decimal": 59060
  533. }, {
  534. "icon_id": "24923305",
  535. "name": "info-filled",
  536. "font_class": "info-filled",
  537. "unicode": "e649",
  538. "unicode_decimal": 58953
  539. }, {
  540. "icon_id": "24923299",
  541. "name": "reload-01",
  542. "font_class": "reload",
  543. "unicode": "e6b2",
  544. "unicode_decimal": 59058
  545. }, {
  546. "icon_id": "24923195",
  547. "name": "mic_slash_fill",
  548. "font_class": "micoff-filled",
  549. "unicode": "e6b0",
  550. "unicode_decimal": 59056
  551. }, {
  552. "icon_id": "24923165",
  553. "name": "map-pin-ellipse",
  554. "font_class": "map-pin-ellipse",
  555. "unicode": "e6ac",
  556. "unicode_decimal": 59052
  557. }, {
  558. "icon_id": "24923166",
  559. "name": "map-pin",
  560. "font_class": "map-pin",
  561. "unicode": "e6ad",
  562. "unicode_decimal": 59053
  563. }, {
  564. "icon_id": "24923167",
  565. "name": "location",
  566. "font_class": "location",
  567. "unicode": "e6ae",
  568. "unicode_decimal": 59054
  569. }, {
  570. "icon_id": "24923064",
  571. "name": "starhalf",
  572. "font_class": "starhalf",
  573. "unicode": "e683",
  574. "unicode_decimal": 59011
  575. }, {
  576. "icon_id": "24923065",
  577. "name": "star",
  578. "font_class": "star",
  579. "unicode": "e688",
  580. "unicode_decimal": 59016
  581. }, {
  582. "icon_id": "24923066",
  583. "name": "star-filled",
  584. "font_class": "star-filled",
  585. "unicode": "e68f",
  586. "unicode_decimal": 59023
  587. }, {
  588. "icon_id": "24899646",
  589. "name": "a-rilidaka",
  590. "font_class": "calendar",
  591. "unicode": "e6a0",
  592. "unicode_decimal": 59040
  593. }, {
  594. "icon_id": "24899647",
  595. "name": "fire",
  596. "font_class": "fire",
  597. "unicode": "e6a1",
  598. "unicode_decimal": 59041
  599. }, {
  600. "icon_id": "24899648",
  601. "name": "paihangbang",
  602. "font_class": "medal",
  603. "unicode": "e6a2",
  604. "unicode_decimal": 59042
  605. }, {
  606. "icon_id": "24899649",
  607. "name": "font",
  608. "font_class": "font",
  609. "unicode": "e6a3",
  610. "unicode_decimal": 59043
  611. }, {
  612. "icon_id": "24899650",
  613. "name": "gift",
  614. "font_class": "gift",
  615. "unicode": "e6a4",
  616. "unicode_decimal": 59044
  617. }, {
  618. "icon_id": "24899651",
  619. "name": "link",
  620. "font_class": "link",
  621. "unicode": "e6a5",
  622. "unicode_decimal": 59045
  623. }, {
  624. "icon_id": "24899652",
  625. "name": "notification",
  626. "font_class": "notification",
  627. "unicode": "e6a6",
  628. "unicode_decimal": 59046
  629. }, {
  630. "icon_id": "24899653",
  631. "name": "staff",
  632. "font_class": "staff",
  633. "unicode": "e6a7",
  634. "unicode_decimal": 59047
  635. }, {
  636. "icon_id": "24899654",
  637. "name": "VIP",
  638. "font_class": "vip",
  639. "unicode": "e6a8",
  640. "unicode_decimal": 59048
  641. }, {
  642. "icon_id": "24899655",
  643. "name": "folder_add",
  644. "font_class": "folder-add",
  645. "unicode": "e6a9",
  646. "unicode_decimal": 59049
  647. }, {
  648. "icon_id": "24899656",
  649. "name": "tune",
  650. "font_class": "tune",
  651. "unicode": "e6aa",
  652. "unicode_decimal": 59050
  653. }, {
  654. "icon_id": "24899657",
  655. "name": "shimingrenzheng",
  656. "font_class": "auth",
  657. "unicode": "e6ab",
  658. "unicode_decimal": 59051
  659. }, {
  660. "icon_id": "24899565",
  661. "name": "person",
  662. "font_class": "person",
  663. "unicode": "e699",
  664. "unicode_decimal": 59033
  665. }, {
  666. "icon_id": "24899566",
  667. "name": "email-filled",
  668. "font_class": "email-filled",
  669. "unicode": "e69a",
  670. "unicode_decimal": 59034
  671. }, {
  672. "icon_id": "24899567",
  673. "name": "phone-filled",
  674. "font_class": "phone-filled",
  675. "unicode": "e69b",
  676. "unicode_decimal": 59035
  677. }, {
  678. "icon_id": "24899568",
  679. "name": "phone",
  680. "font_class": "phone",
  681. "unicode": "e69c",
  682. "unicode_decimal": 59036
  683. }, {
  684. "icon_id": "24899570",
  685. "name": "email",
  686. "font_class": "email",
  687. "unicode": "e69e",
  688. "unicode_decimal": 59038
  689. }, {
  690. "icon_id": "24899571",
  691. "name": "personadd",
  692. "font_class": "personadd",
  693. "unicode": "e69f",
  694. "unicode_decimal": 59039
  695. }, {
  696. "icon_id": "24899558",
  697. "name": "chatboxes-filled",
  698. "font_class": "chatboxes-filled",
  699. "unicode": "e692",
  700. "unicode_decimal": 59026
  701. }, {
  702. "icon_id": "24899559",
  703. "name": "contact",
  704. "font_class": "contact",
  705. "unicode": "e693",
  706. "unicode_decimal": 59027
  707. }, {
  708. "icon_id": "24899560",
  709. "name": "chatbubble-filled",
  710. "font_class": "chatbubble-filled",
  711. "unicode": "e694",
  712. "unicode_decimal": 59028
  713. }, {
  714. "icon_id": "24899561",
  715. "name": "contact-filled",
  716. "font_class": "contact-filled",
  717. "unicode": "e695",
  718. "unicode_decimal": 59029
  719. }, {
  720. "icon_id": "24899562",
  721. "name": "chatboxes",
  722. "font_class": "chatboxes",
  723. "unicode": "e696",
  724. "unicode_decimal": 59030
  725. }, {
  726. "icon_id": "24899563",
  727. "name": "chatbubble",
  728. "font_class": "chatbubble",
  729. "unicode": "e697",
  730. "unicode_decimal": 59031
  731. }, {
  732. "icon_id": "24881290",
  733. "name": "upload-filled",
  734. "font_class": "upload-filled",
  735. "unicode": "e68e",
  736. "unicode_decimal": 59022
  737. }, {
  738. "icon_id": "24881292",
  739. "name": "upload",
  740. "font_class": "upload",
  741. "unicode": "e690",
  742. "unicode_decimal": 59024
  743. }, {
  744. "icon_id": "24881293",
  745. "name": "weixin",
  746. "font_class": "weixin",
  747. "unicode": "e691",
  748. "unicode_decimal": 59025
  749. }, {
  750. "icon_id": "24881274",
  751. "name": "compose",
  752. "font_class": "compose",
  753. "unicode": "e67f",
  754. "unicode_decimal": 59007
  755. }, {
  756. "icon_id": "24881275",
  757. "name": "qq",
  758. "font_class": "qq",
  759. "unicode": "e680",
  760. "unicode_decimal": 59008
  761. }, {
  762. "icon_id": "24881276",
  763. "name": "download-filled",
  764. "font_class": "download-filled",
  765. "unicode": "e681",
  766. "unicode_decimal": 59009
  767. }, {
  768. "icon_id": "24881277",
  769. "name": "pengyouquan",
  770. "font_class": "pyq",
  771. "unicode": "e682",
  772. "unicode_decimal": 59010
  773. }, {
  774. "icon_id": "24881279",
  775. "name": "sound",
  776. "font_class": "sound",
  777. "unicode": "e684",
  778. "unicode_decimal": 59012
  779. }, {
  780. "icon_id": "24881280",
  781. "name": "trash-filled",
  782. "font_class": "trash-filled",
  783. "unicode": "e685",
  784. "unicode_decimal": 59013
  785. }, {
  786. "icon_id": "24881281",
  787. "name": "sound-filled",
  788. "font_class": "sound-filled",
  789. "unicode": "e686",
  790. "unicode_decimal": 59014
  791. }, {
  792. "icon_id": "24881282",
  793. "name": "trash",
  794. "font_class": "trash",
  795. "unicode": "e687",
  796. "unicode_decimal": 59015
  797. }, {
  798. "icon_id": "24881284",
  799. "name": "videocam-filled",
  800. "font_class": "videocam-filled",
  801. "unicode": "e689",
  802. "unicode_decimal": 59017
  803. }, {
  804. "icon_id": "24881285",
  805. "name": "spinner-cycle",
  806. "font_class": "spinner-cycle",
  807. "unicode": "e68a",
  808. "unicode_decimal": 59018
  809. }, {
  810. "icon_id": "24881286",
  811. "name": "weibo",
  812. "font_class": "weibo",
  813. "unicode": "e68b",
  814. "unicode_decimal": 59019
  815. }, {
  816. "icon_id": "24881288",
  817. "name": "videocam",
  818. "font_class": "videocam",
  819. "unicode": "e68c",
  820. "unicode_decimal": 59020
  821. }, {
  822. "icon_id": "24881289",
  823. "name": "download",
  824. "font_class": "download",
  825. "unicode": "e68d",
  826. "unicode_decimal": 59021
  827. }, {
  828. "icon_id": "24879601",
  829. "name": "help",
  830. "font_class": "help",
  831. "unicode": "e679",
  832. "unicode_decimal": 59001
  833. }, {
  834. "icon_id": "24879602",
  835. "name": "navigate-filled",
  836. "font_class": "navigate-filled",
  837. "unicode": "e67a",
  838. "unicode_decimal": 59002
  839. }, {
  840. "icon_id": "24879603",
  841. "name": "plusempty",
  842. "font_class": "plusempty",
  843. "unicode": "e67b",
  844. "unicode_decimal": 59003
  845. }, {
  846. "icon_id": "24879604",
  847. "name": "smallcircle",
  848. "font_class": "smallcircle",
  849. "unicode": "e67c",
  850. "unicode_decimal": 59004
  851. }, {
  852. "icon_id": "24879605",
  853. "name": "minus-filled",
  854. "font_class": "minus-filled",
  855. "unicode": "e67d",
  856. "unicode_decimal": 59005
  857. }, {
  858. "icon_id": "24879606",
  859. "name": "micoff",
  860. "font_class": "micoff",
  861. "unicode": "e67e",
  862. "unicode_decimal": 59006
  863. }, {
  864. "icon_id": "24879588",
  865. "name": "closeempty",
  866. "font_class": "closeempty",
  867. "unicode": "e66c",
  868. "unicode_decimal": 58988
  869. }, {
  870. "icon_id": "24879589",
  871. "name": "clear",
  872. "font_class": "clear",
  873. "unicode": "e66d",
  874. "unicode_decimal": 58989
  875. }, {
  876. "icon_id": "24879590",
  877. "name": "navigate",
  878. "font_class": "navigate",
  879. "unicode": "e66e",
  880. "unicode_decimal": 58990
  881. }, {
  882. "icon_id": "24879591",
  883. "name": "minus",
  884. "font_class": "minus",
  885. "unicode": "e66f",
  886. "unicode_decimal": 58991
  887. }, {
  888. "icon_id": "24879592",
  889. "name": "image",
  890. "font_class": "image",
  891. "unicode": "e670",
  892. "unicode_decimal": 58992
  893. }, {
  894. "icon_id": "24879593",
  895. "name": "mic",
  896. "font_class": "mic",
  897. "unicode": "e671",
  898. "unicode_decimal": 58993
  899. }, {
  900. "icon_id": "24879594",
  901. "name": "paperplane",
  902. "font_class": "paperplane",
  903. "unicode": "e672",
  904. "unicode_decimal": 58994
  905. }, {
  906. "icon_id": "24879595",
  907. "name": "close",
  908. "font_class": "close",
  909. "unicode": "e673",
  910. "unicode_decimal": 58995
  911. }, {
  912. "icon_id": "24879596",
  913. "name": "help-filled",
  914. "font_class": "help-filled",
  915. "unicode": "e674",
  916. "unicode_decimal": 58996
  917. }, {
  918. "icon_id": "24879597",
  919. "name": "plus-filled",
  920. "font_class": "paperplane-filled",
  921. "unicode": "e675",
  922. "unicode_decimal": 58997
  923. }, {
  924. "icon_id": "24879598",
  925. "name": "plus",
  926. "font_class": "plus",
  927. "unicode": "e676",
  928. "unicode_decimal": 58998
  929. }, {
  930. "icon_id": "24879599",
  931. "name": "mic-filled",
  932. "font_class": "mic-filled",
  933. "unicode": "e677",
  934. "unicode_decimal": 58999
  935. }, {
  936. "icon_id": "24879600",
  937. "name": "image-filled",
  938. "font_class": "image-filled",
  939. "unicode": "e678",
  940. "unicode_decimal": 59000
  941. }, {
  942. "icon_id": "24855900",
  943. "name": "locked-filled",
  944. "font_class": "locked-filled",
  945. "unicode": "e668",
  946. "unicode_decimal": 58984
  947. }, {
  948. "icon_id": "24855901",
  949. "name": "info",
  950. "font_class": "info",
  951. "unicode": "e669",
  952. "unicode_decimal": 58985
  953. }, {
  954. "icon_id": "24855903",
  955. "name": "locked",
  956. "font_class": "locked",
  957. "unicode": "e66b",
  958. "unicode_decimal": 58987
  959. }, {
  960. "icon_id": "24855884",
  961. "name": "camera-filled",
  962. "font_class": "camera-filled",
  963. "unicode": "e658",
  964. "unicode_decimal": 58968
  965. }, {
  966. "icon_id": "24855885",
  967. "name": "chat-filled",
  968. "font_class": "chat-filled",
  969. "unicode": "e659",
  970. "unicode_decimal": 58969
  971. }, {
  972. "icon_id": "24855886",
  973. "name": "camera",
  974. "font_class": "camera",
  975. "unicode": "e65a",
  976. "unicode_decimal": 58970
  977. }, {
  978. "icon_id": "24855887",
  979. "name": "circle",
  980. "font_class": "circle",
  981. "unicode": "e65b",
  982. "unicode_decimal": 58971
  983. }, {
  984. "icon_id": "24855888",
  985. "name": "checkmarkempty",
  986. "font_class": "checkmarkempty",
  987. "unicode": "e65c",
  988. "unicode_decimal": 58972
  989. }, {
  990. "icon_id": "24855889",
  991. "name": "chat",
  992. "font_class": "chat",
  993. "unicode": "e65d",
  994. "unicode_decimal": 58973
  995. }, {
  996. "icon_id": "24855890",
  997. "name": "circle-filled",
  998. "font_class": "circle-filled",
  999. "unicode": "e65e",
  1000. "unicode_decimal": 58974
  1001. }, {
  1002. "icon_id": "24855891",
  1003. "name": "flag",
  1004. "font_class": "flag",
  1005. "unicode": "e65f",
  1006. "unicode_decimal": 58975
  1007. }, {
  1008. "icon_id": "24855892",
  1009. "name": "flag-filled",
  1010. "font_class": "flag-filled",
  1011. "unicode": "e660",
  1012. "unicode_decimal": 58976
  1013. }, {
  1014. "icon_id": "24855893",
  1015. "name": "gear-filled",
  1016. "font_class": "gear-filled",
  1017. "unicode": "e661",
  1018. "unicode_decimal": 58977
  1019. }, {
  1020. "icon_id": "24855894",
  1021. "name": "home",
  1022. "font_class": "home",
  1023. "unicode": "e662",
  1024. "unicode_decimal": 58978
  1025. }, {
  1026. "icon_id": "24855895",
  1027. "name": "home-filled",
  1028. "font_class": "home-filled",
  1029. "unicode": "e663",
  1030. "unicode_decimal": 58979
  1031. }, {
  1032. "icon_id": "24855896",
  1033. "name": "gear",
  1034. "font_class": "gear",
  1035. "unicode": "e664",
  1036. "unicode_decimal": 58980
  1037. }, {
  1038. "icon_id": "24855897",
  1039. "name": "smallcircle-filled",
  1040. "font_class": "smallcircle-filled",
  1041. "unicode": "e665",
  1042. "unicode_decimal": 58981
  1043. }, {
  1044. "icon_id": "24855898",
  1045. "name": "map-filled",
  1046. "font_class": "map-filled",
  1047. "unicode": "e666",
  1048. "unicode_decimal": 58982
  1049. }, {
  1050. "icon_id": "24855899",
  1051. "name": "map",
  1052. "font_class": "map",
  1053. "unicode": "e667",
  1054. "unicode_decimal": 58983
  1055. }, {
  1056. "icon_id": "24855825",
  1057. "name": "refresh-filled",
  1058. "font_class": "refresh-filled",
  1059. "unicode": "e656",
  1060. "unicode_decimal": 58966
  1061. }, {
  1062. "icon_id": "24855826",
  1063. "name": "refresh",
  1064. "font_class": "refresh",
  1065. "unicode": "e657",
  1066. "unicode_decimal": 58967
  1067. }, {
  1068. "icon_id": "24855808",
  1069. "name": "cloud-upload",
  1070. "font_class": "cloud-upload",
  1071. "unicode": "e645",
  1072. "unicode_decimal": 58949
  1073. }, {
  1074. "icon_id": "24855809",
  1075. "name": "cloud-download-filled",
  1076. "font_class": "cloud-download-filled",
  1077. "unicode": "e646",
  1078. "unicode_decimal": 58950
  1079. }, {
  1080. "icon_id": "24855810",
  1081. "name": "cloud-download",
  1082. "font_class": "cloud-download",
  1083. "unicode": "e647",
  1084. "unicode_decimal": 58951
  1085. }, {
  1086. "icon_id": "24855811",
  1087. "name": "cloud-upload-filled",
  1088. "font_class": "cloud-upload-filled",
  1089. "unicode": "e648",
  1090. "unicode_decimal": 58952
  1091. }, {
  1092. "icon_id": "24855813",
  1093. "name": "redo",
  1094. "font_class": "redo",
  1095. "unicode": "e64a",
  1096. "unicode_decimal": 58954
  1097. }, {
  1098. "icon_id": "24855814",
  1099. "name": "images-filled",
  1100. "font_class": "images-filled",
  1101. "unicode": "e64b",
  1102. "unicode_decimal": 58955
  1103. }, {
  1104. "icon_id": "24855815",
  1105. "name": "undo-filled",
  1106. "font_class": "undo-filled",
  1107. "unicode": "e64c",
  1108. "unicode_decimal": 58956
  1109. }, {
  1110. "icon_id": "24855816",
  1111. "name": "more",
  1112. "font_class": "more",
  1113. "unicode": "e64d",
  1114. "unicode_decimal": 58957
  1115. }, {
  1116. "icon_id": "24855817",
  1117. "name": "more-filled",
  1118. "font_class": "more-filled",
  1119. "unicode": "e64e",
  1120. "unicode_decimal": 58958
  1121. }, {
  1122. "icon_id": "24855818",
  1123. "name": "undo",
  1124. "font_class": "undo",
  1125. "unicode": "e64f",
  1126. "unicode_decimal": 58959
  1127. }, {
  1128. "icon_id": "24855819",
  1129. "name": "images",
  1130. "font_class": "images",
  1131. "unicode": "e650",
  1132. "unicode_decimal": 58960
  1133. }, {
  1134. "icon_id": "24855821",
  1135. "name": "paperclip",
  1136. "font_class": "paperclip",
  1137. "unicode": "e652",
  1138. "unicode_decimal": 58962
  1139. }, {
  1140. "icon_id": "24855822",
  1141. "name": "settings",
  1142. "font_class": "settings",
  1143. "unicode": "e653",
  1144. "unicode_decimal": 58963
  1145. }, {
  1146. "icon_id": "24855823",
  1147. "name": "search",
  1148. "font_class": "search",
  1149. "unicode": "e654",
  1150. "unicode_decimal": 58964
  1151. }, {
  1152. "icon_id": "24855824",
  1153. "name": "redo-filled",
  1154. "font_class": "redo-filled",
  1155. "unicode": "e655",
  1156. "unicode_decimal": 58965
  1157. }, {
  1158. "icon_id": "24841702",
  1159. "name": "list",
  1160. "font_class": "list",
  1161. "unicode": "e644",
  1162. "unicode_decimal": 58948
  1163. }, {
  1164. "icon_id": "24841489",
  1165. "name": "mail-open-filled",
  1166. "font_class": "mail-open-filled",
  1167. "unicode": "e63a",
  1168. "unicode_decimal": 58938
  1169. }, {
  1170. "icon_id": "24841491",
  1171. "name": "hand-thumbsdown-filled",
  1172. "font_class": "hand-down-filled",
  1173. "unicode": "e63c",
  1174. "unicode_decimal": 58940
  1175. }, {
  1176. "icon_id": "24841492",
  1177. "name": "hand-thumbsdown",
  1178. "font_class": "hand-down",
  1179. "unicode": "e63d",
  1180. "unicode_decimal": 58941
  1181. }, {
  1182. "icon_id": "24841493",
  1183. "name": "hand-thumbsup-filled",
  1184. "font_class": "hand-up-filled",
  1185. "unicode": "e63e",
  1186. "unicode_decimal": 58942
  1187. }, {
  1188. "icon_id": "24841494",
  1189. "name": "hand-thumbsup",
  1190. "font_class": "hand-up",
  1191. "unicode": "e63f",
  1192. "unicode_decimal": 58943
  1193. }, {
  1194. "icon_id": "24841496",
  1195. "name": "heart-filled",
  1196. "font_class": "heart-filled",
  1197. "unicode": "e641",
  1198. "unicode_decimal": 58945
  1199. }, {
  1200. "icon_id": "24841498",
  1201. "name": "mail-open",
  1202. "font_class": "mail-open",
  1203. "unicode": "e643",
  1204. "unicode_decimal": 58947
  1205. }, {
  1206. "icon_id": "24841488",
  1207. "name": "heart",
  1208. "font_class": "heart",
  1209. "unicode": "e639",
  1210. "unicode_decimal": 58937
  1211. }, {
  1212. "icon_id": "24839963",
  1213. "name": "loop",
  1214. "font_class": "loop",
  1215. "unicode": "e633",
  1216. "unicode_decimal": 58931
  1217. }, {
  1218. "icon_id": "24839866",
  1219. "name": "pulldown",
  1220. "font_class": "pulldown",
  1221. "unicode": "e632",
  1222. "unicode_decimal": 58930
  1223. }, {
  1224. "icon_id": "24813798",
  1225. "name": "scan",
  1226. "font_class": "scan",
  1227. "unicode": "e62a",
  1228. "unicode_decimal": 58922
  1229. }, {
  1230. "icon_id": "24813786",
  1231. "name": "bars",
  1232. "font_class": "bars",
  1233. "unicode": "e627",
  1234. "unicode_decimal": 58919
  1235. }, {
  1236. "icon_id": "24813788",
  1237. "name": "cart-filled",
  1238. "font_class": "cart-filled",
  1239. "unicode": "e629",
  1240. "unicode_decimal": 58921
  1241. }, {
  1242. "icon_id": "24813790",
  1243. "name": "checkbox",
  1244. "font_class": "checkbox",
  1245. "unicode": "e62b",
  1246. "unicode_decimal": 58923
  1247. }, {
  1248. "icon_id": "24813791",
  1249. "name": "checkbox-filled",
  1250. "font_class": "checkbox-filled",
  1251. "unicode": "e62c",
  1252. "unicode_decimal": 58924
  1253. }, {
  1254. "icon_id": "24813794",
  1255. "name": "shop",
  1256. "font_class": "shop",
  1257. "unicode": "e62f",
  1258. "unicode_decimal": 58927
  1259. }, {
  1260. "icon_id": "24813795",
  1261. "name": "headphones",
  1262. "font_class": "headphones",
  1263. "unicode": "e630",
  1264. "unicode_decimal": 58928
  1265. }, {
  1266. "icon_id": "24813796",
  1267. "name": "cart",
  1268. "font_class": "cart",
  1269. "unicode": "e631",
  1270. "unicode_decimal": 58929
  1271. }]
  1272. };
  1273. exports.default = _default;
  1274. /***/ }),
  1275. /***/ 15:
  1276. /*!**********************************************************!*\
  1277. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  1278. \**********************************************************/
  1279. /*! no static exports found */
  1280. /***/ (function(module, exports, __webpack_require__) {
  1281. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  1282. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  1283. function _construct(Parent, args, Class) {
  1284. if (isNativeReflectConstruct()) {
  1285. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  1286. } else {
  1287. module.exports = _construct = function _construct(Parent, args, Class) {
  1288. var a = [null];
  1289. a.push.apply(a, args);
  1290. var Constructor = Function.bind.apply(Parent, a);
  1291. var instance = new Constructor();
  1292. if (Class) setPrototypeOf(instance, Class.prototype);
  1293. return instance;
  1294. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1295. }
  1296. return _construct.apply(null, arguments);
  1297. }
  1298. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1299. /***/ }),
  1300. /***/ 16:
  1301. /*!***************************************************************!*\
  1302. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  1303. \***************************************************************/
  1304. /*! no static exports found */
  1305. /***/ (function(module, exports) {
  1306. function _setPrototypeOf(o, p) {
  1307. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  1308. o.__proto__ = p;
  1309. return o;
  1310. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1311. return _setPrototypeOf(o, p);
  1312. }
  1313. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1314. /***/ }),
  1315. /***/ 17:
  1316. /*!*************************************************************************!*\
  1317. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  1318. \*************************************************************************/
  1319. /*! no static exports found */
  1320. /***/ (function(module, exports) {
  1321. function _isNativeReflectConstruct() {
  1322. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  1323. if (Reflect.construct.sham) return false;
  1324. if (typeof Proxy === "function") return true;
  1325. try {
  1326. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  1327. return true;
  1328. } catch (e) {
  1329. return false;
  1330. }
  1331. }
  1332. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1333. /***/ }),
  1334. /***/ 18:
  1335. /*!******************************************************************!*\
  1336. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  1337. \******************************************************************/
  1338. /*! no static exports found */
  1339. /***/ (function(module, exports, __webpack_require__) {
  1340. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  1341. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  1342. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  1343. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  1344. function _toConsumableArray(arr) {
  1345. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  1346. }
  1347. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1348. /***/ }),
  1349. /***/ 19:
  1350. /*!******************************************************************!*\
  1351. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  1352. \******************************************************************/
  1353. /*! no static exports found */
  1354. /***/ (function(module, exports, __webpack_require__) {
  1355. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  1356. function _arrayWithoutHoles(arr) {
  1357. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  1358. }
  1359. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1360. /***/ }),
  1361. /***/ 190:
  1362. /*!******************************************************************************************************************!*\
  1363. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
  1364. \******************************************************************************************************************/
  1365. /*! no static exports found */
  1366. /***/ (function(module, exports, __webpack_require__) {
  1367. "use strict";
  1368. /* WEBPACK VAR INJECTION */(function(uni) {
  1369. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1370. Object.defineProperty(exports, "__esModule", {
  1371. value: true
  1372. });
  1373. exports.createAnimation = createAnimation;
  1374. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1375. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  1376. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  1377. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  1378. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  1379. // const defaultOption = {
  1380. // duration: 300,
  1381. // timingFunction: 'linear',
  1382. // delay: 0,
  1383. // transformOrigin: '50% 50% 0'
  1384. // }
  1385. var MPAnimation = /*#__PURE__*/function () {
  1386. function MPAnimation(options, _this) {
  1387. (0, _classCallCheck2.default)(this, MPAnimation);
  1388. this.options = options;
  1389. this.animation = uni.createAnimation(options);
  1390. this.currentStepAnimates = {};
  1391. this.next = 0;
  1392. this.$ = _this;
  1393. }
  1394. (0, _createClass2.default)(MPAnimation, [{
  1395. key: "_nvuePushAnimates",
  1396. value: function _nvuePushAnimates(type, args) {
  1397. var aniObj = this.currentStepAnimates[this.next];
  1398. var styles = {};
  1399. if (!aniObj) {
  1400. styles = {
  1401. styles: {},
  1402. config: {}
  1403. };
  1404. } else {
  1405. styles = aniObj;
  1406. }
  1407. if (animateTypes1.includes(type)) {
  1408. if (!styles.styles.transform) {
  1409. styles.styles.transform = '';
  1410. }
  1411. var unit = '';
  1412. if (type === 'rotate') {
  1413. unit = 'deg';
  1414. }
  1415. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  1416. } else {
  1417. styles.styles[type] = "".concat(args);
  1418. }
  1419. this.currentStepAnimates[this.next] = styles;
  1420. }
  1421. }, {
  1422. key: "_animateRun",
  1423. value: function _animateRun() {
  1424. var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1425. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1426. var ref = this.$.$refs['ani'].ref;
  1427. if (!ref) return;
  1428. return new Promise(function (resolve, reject) {
  1429. nvueAnimation.transition(ref, _objectSpread({
  1430. styles: styles
  1431. }, config), function (res) {
  1432. resolve();
  1433. });
  1434. });
  1435. }
  1436. }, {
  1437. key: "_nvueNextAnimate",
  1438. value: function _nvueNextAnimate(animates) {
  1439. var _this2 = this;
  1440. var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  1441. var fn = arguments.length > 2 ? arguments[2] : undefined;
  1442. var obj = animates[step];
  1443. if (obj) {
  1444. var styles = obj.styles,
  1445. config = obj.config;
  1446. this._animateRun(styles, config).then(function () {
  1447. step += 1;
  1448. _this2._nvueNextAnimate(animates, step, fn);
  1449. });
  1450. } else {
  1451. this.currentStepAnimates = {};
  1452. typeof fn === 'function' && fn();
  1453. this.isEnd = true;
  1454. }
  1455. }
  1456. }, {
  1457. key: "step",
  1458. value: function step() {
  1459. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1460. this.animation.step(config);
  1461. return this;
  1462. }
  1463. }, {
  1464. key: "run",
  1465. value: function run(fn) {
  1466. this.$.animationData = this.animation.export();
  1467. this.$.timer = setTimeout(function () {
  1468. typeof fn === 'function' && fn();
  1469. }, this.$.durationTime);
  1470. }
  1471. }]);
  1472. return MPAnimation;
  1473. }();
  1474. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ'];
  1475. var animateTypes2 = ['opacity', 'backgroundColor'];
  1476. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  1477. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  1478. MPAnimation.prototype[type] = function () {
  1479. var _this$animation;
  1480. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  1481. return this;
  1482. };
  1483. });
  1484. function createAnimation(option, _this) {
  1485. if (!_this) return;
  1486. clearTimeout(_this.timer);
  1487. return new MPAnimation(option, _this);
  1488. }
  1489. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  1490. /***/ }),
  1491. /***/ 2:
  1492. /*!************************************************************!*\
  1493. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  1494. \************************************************************/
  1495. /*! no static exports found */
  1496. /***/ (function(module, exports, __webpack_require__) {
  1497. "use strict";
  1498. /* WEBPACK VAR INJECTION */(function(wx, global) {
  1499. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1500. Object.defineProperty(exports, "__esModule", {
  1501. value: true
  1502. });
  1503. exports.createApp = createApp;
  1504. exports.createComponent = createComponent;
  1505. exports.createPage = createPage;
  1506. exports.createPlugin = createPlugin;
  1507. exports.createSubpackageApp = createSubpackageApp;
  1508. exports.default = void 0;
  1509. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  1510. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1511. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  1512. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  1513. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  1514. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  1515. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  1516. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  1517. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  1518. var realAtob;
  1519. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1520. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  1521. if (typeof atob !== 'function') {
  1522. realAtob = function realAtob(str) {
  1523. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  1524. if (!b64re.test(str)) {
  1525. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  1526. }
  1527. // Adding the padding if missing, for semplicity
  1528. str += '=='.slice(2 - (str.length & 3));
  1529. var bitmap;
  1530. var result = '';
  1531. var r1;
  1532. var r2;
  1533. var i = 0;
  1534. for (; i < str.length;) {
  1535. 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++)));
  1536. 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);
  1537. }
  1538. return result;
  1539. };
  1540. } else {
  1541. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  1542. realAtob = atob;
  1543. }
  1544. function b64DecodeUnicode(str) {
  1545. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  1546. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  1547. }).join(''));
  1548. }
  1549. function getCurrentUserInfo() {
  1550. var token = wx.getStorageSync('uni_id_token') || '';
  1551. var tokenArr = token.split('.');
  1552. if (!token || tokenArr.length !== 3) {
  1553. return {
  1554. uid: null,
  1555. role: [],
  1556. permission: [],
  1557. tokenExpired: 0
  1558. };
  1559. }
  1560. var userInfo;
  1561. try {
  1562. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  1563. } catch (error) {
  1564. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  1565. }
  1566. userInfo.tokenExpired = userInfo.exp * 1000;
  1567. delete userInfo.exp;
  1568. delete userInfo.iat;
  1569. return userInfo;
  1570. }
  1571. function uniIdMixin(Vue) {
  1572. Vue.prototype.uniIDHasRole = function (roleId) {
  1573. var _getCurrentUserInfo = getCurrentUserInfo(),
  1574. role = _getCurrentUserInfo.role;
  1575. return role.indexOf(roleId) > -1;
  1576. };
  1577. Vue.prototype.uniIDHasPermission = function (permissionId) {
  1578. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  1579. permission = _getCurrentUserInfo2.permission;
  1580. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  1581. };
  1582. Vue.prototype.uniIDTokenValid = function () {
  1583. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  1584. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  1585. return tokenExpired > Date.now();
  1586. };
  1587. }
  1588. var _toString = Object.prototype.toString;
  1589. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1590. function isFn(fn) {
  1591. return typeof fn === 'function';
  1592. }
  1593. function isStr(str) {
  1594. return typeof str === 'string';
  1595. }
  1596. function isObject(obj) {
  1597. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  1598. }
  1599. function isPlainObject(obj) {
  1600. return _toString.call(obj) === '[object Object]';
  1601. }
  1602. function hasOwn(obj, key) {
  1603. return hasOwnProperty.call(obj, key);
  1604. }
  1605. function noop() {}
  1606. /**
  1607. * Create a cached version of a pure function.
  1608. */
  1609. function cached(fn) {
  1610. var cache = Object.create(null);
  1611. return function cachedFn(str) {
  1612. var hit = cache[str];
  1613. return hit || (cache[str] = fn(str));
  1614. };
  1615. }
  1616. /**
  1617. * Camelize a hyphen-delimited string.
  1618. */
  1619. var camelizeRE = /-(\w)/g;
  1620. var camelize = cached(function (str) {
  1621. return str.replace(camelizeRE, function (_, c) {
  1622. return c ? c.toUpperCase() : '';
  1623. });
  1624. });
  1625. function sortObject(obj) {
  1626. var sortObj = {};
  1627. if (isPlainObject(obj)) {
  1628. Object.keys(obj).sort().forEach(function (key) {
  1629. sortObj[key] = obj[key];
  1630. });
  1631. }
  1632. return !Object.keys(sortObj) ? obj : sortObj;
  1633. }
  1634. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  1635. var globalInterceptors = {};
  1636. var scopedInterceptors = {};
  1637. function mergeHook(parentVal, childVal) {
  1638. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  1639. return res ? dedupeHooks(res) : res;
  1640. }
  1641. function dedupeHooks(hooks) {
  1642. var res = [];
  1643. for (var i = 0; i < hooks.length; i++) {
  1644. if (res.indexOf(hooks[i]) === -1) {
  1645. res.push(hooks[i]);
  1646. }
  1647. }
  1648. return res;
  1649. }
  1650. function removeHook(hooks, hook) {
  1651. var index = hooks.indexOf(hook);
  1652. if (index !== -1) {
  1653. hooks.splice(index, 1);
  1654. }
  1655. }
  1656. function mergeInterceptorHook(interceptor, option) {
  1657. Object.keys(option).forEach(function (hook) {
  1658. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1659. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  1660. }
  1661. });
  1662. }
  1663. function removeInterceptorHook(interceptor, option) {
  1664. if (!interceptor || !option) {
  1665. return;
  1666. }
  1667. Object.keys(option).forEach(function (hook) {
  1668. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1669. removeHook(interceptor[hook], option[hook]);
  1670. }
  1671. });
  1672. }
  1673. function addInterceptor(method, option) {
  1674. if (typeof method === 'string' && isPlainObject(option)) {
  1675. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  1676. } else if (isPlainObject(method)) {
  1677. mergeInterceptorHook(globalInterceptors, method);
  1678. }
  1679. }
  1680. function removeInterceptor(method, option) {
  1681. if (typeof method === 'string') {
  1682. if (isPlainObject(option)) {
  1683. removeInterceptorHook(scopedInterceptors[method], option);
  1684. } else {
  1685. delete scopedInterceptors[method];
  1686. }
  1687. } else if (isPlainObject(method)) {
  1688. removeInterceptorHook(globalInterceptors, method);
  1689. }
  1690. }
  1691. function wrapperHook(hook, params) {
  1692. return function (data) {
  1693. return hook(data, params) || data;
  1694. };
  1695. }
  1696. function isPromise(obj) {
  1697. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  1698. }
  1699. function queue(hooks, data, params) {
  1700. var promise = false;
  1701. for (var i = 0; i < hooks.length; i++) {
  1702. var hook = hooks[i];
  1703. if (promise) {
  1704. promise = Promise.resolve(wrapperHook(hook, params));
  1705. } else {
  1706. var res = hook(data, params);
  1707. if (isPromise(res)) {
  1708. promise = Promise.resolve(res);
  1709. }
  1710. if (res === false) {
  1711. return {
  1712. then: function then() {}
  1713. };
  1714. }
  1715. }
  1716. }
  1717. return promise || {
  1718. then: function then(callback) {
  1719. return callback(data);
  1720. }
  1721. };
  1722. }
  1723. function wrapperOptions(interceptor) {
  1724. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1725. ['success', 'fail', 'complete'].forEach(function (name) {
  1726. if (Array.isArray(interceptor[name])) {
  1727. var oldCallback = options[name];
  1728. options[name] = function callbackInterceptor(res) {
  1729. queue(interceptor[name], res, options).then(function (res) {
  1730. /* eslint-disable no-mixed-operators */
  1731. return isFn(oldCallback) && oldCallback(res) || res;
  1732. });
  1733. };
  1734. }
  1735. });
  1736. return options;
  1737. }
  1738. function wrapperReturnValue(method, returnValue) {
  1739. var returnValueHooks = [];
  1740. if (Array.isArray(globalInterceptors.returnValue)) {
  1741. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  1742. }
  1743. var interceptor = scopedInterceptors[method];
  1744. if (interceptor && Array.isArray(interceptor.returnValue)) {
  1745. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  1746. }
  1747. returnValueHooks.forEach(function (hook) {
  1748. returnValue = hook(returnValue) || returnValue;
  1749. });
  1750. return returnValue;
  1751. }
  1752. function getApiInterceptorHooks(method) {
  1753. var interceptor = Object.create(null);
  1754. Object.keys(globalInterceptors).forEach(function (hook) {
  1755. if (hook !== 'returnValue') {
  1756. interceptor[hook] = globalInterceptors[hook].slice();
  1757. }
  1758. });
  1759. var scopedInterceptor = scopedInterceptors[method];
  1760. if (scopedInterceptor) {
  1761. Object.keys(scopedInterceptor).forEach(function (hook) {
  1762. if (hook !== 'returnValue') {
  1763. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  1764. }
  1765. });
  1766. }
  1767. return interceptor;
  1768. }
  1769. function invokeApi(method, api, options) {
  1770. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  1771. params[_key - 3] = arguments[_key];
  1772. }
  1773. var interceptor = getApiInterceptorHooks(method);
  1774. if (interceptor && Object.keys(interceptor).length) {
  1775. if (Array.isArray(interceptor.invoke)) {
  1776. var res = queue(interceptor.invoke, options);
  1777. return res.then(function (options) {
  1778. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  1779. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  1780. });
  1781. } else {
  1782. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  1783. }
  1784. }
  1785. return api.apply(void 0, [options].concat(params));
  1786. }
  1787. var promiseInterceptor = {
  1788. returnValue: function returnValue(res) {
  1789. if (!isPromise(res)) {
  1790. return res;
  1791. }
  1792. return new Promise(function (resolve, reject) {
  1793. res.then(function (res) {
  1794. if (res[0]) {
  1795. reject(res[0]);
  1796. } else {
  1797. resolve(res[1]);
  1798. }
  1799. });
  1800. });
  1801. }
  1802. };
  1803. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  1804. var CONTEXT_API_RE = /^create|Manager$/;
  1805. // Context例外情况
  1806. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  1807. // 同步例外情况
  1808. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  1809. var CALLBACK_API_RE = /^on|^off/;
  1810. function isContextApi(name) {
  1811. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  1812. }
  1813. function isSyncApi(name) {
  1814. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  1815. }
  1816. function isCallbackApi(name) {
  1817. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  1818. }
  1819. function handlePromise(promise) {
  1820. return promise.then(function (data) {
  1821. return [null, data];
  1822. }).catch(function (err) {
  1823. return [err];
  1824. });
  1825. }
  1826. function shouldPromise(name) {
  1827. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  1828. return false;
  1829. }
  1830. return true;
  1831. }
  1832. /* eslint-disable no-extend-native */
  1833. if (!Promise.prototype.finally) {
  1834. Promise.prototype.finally = function (callback) {
  1835. var promise = this.constructor;
  1836. return this.then(function (value) {
  1837. return promise.resolve(callback()).then(function () {
  1838. return value;
  1839. });
  1840. }, function (reason) {
  1841. return promise.resolve(callback()).then(function () {
  1842. throw reason;
  1843. });
  1844. });
  1845. };
  1846. }
  1847. function promisify(name, api) {
  1848. if (!shouldPromise(name) || !isFn(api)) {
  1849. return api;
  1850. }
  1851. return function promiseApi() {
  1852. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1853. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  1854. params[_key2 - 1] = arguments[_key2];
  1855. }
  1856. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  1857. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  1858. }
  1859. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  1860. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  1861. success: resolve,
  1862. fail: reject
  1863. })].concat(params));
  1864. })));
  1865. };
  1866. }
  1867. var EPS = 1e-4;
  1868. var BASE_DEVICE_WIDTH = 750;
  1869. var isIOS = false;
  1870. var deviceWidth = 0;
  1871. var deviceDPR = 0;
  1872. function checkDeviceWidth() {
  1873. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  1874. platform = _wx$getSystemInfoSync.platform,
  1875. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  1876. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  1877. deviceWidth = windowWidth;
  1878. deviceDPR = pixelRatio;
  1879. isIOS = platform === 'ios';
  1880. }
  1881. function upx2px(number, newDeviceWidth) {
  1882. if (deviceWidth === 0) {
  1883. checkDeviceWidth();
  1884. }
  1885. number = Number(number);
  1886. if (number === 0) {
  1887. return 0;
  1888. }
  1889. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  1890. if (result < 0) {
  1891. result = -result;
  1892. }
  1893. result = Math.floor(result + EPS);
  1894. if (result === 0) {
  1895. if (deviceDPR === 1 || !isIOS) {
  1896. result = 1;
  1897. } else {
  1898. result = 0.5;
  1899. }
  1900. }
  1901. return number < 0 ? -result : result;
  1902. }
  1903. var LOCALE_ZH_HANS = 'zh-Hans';
  1904. var LOCALE_ZH_HANT = 'zh-Hant';
  1905. var LOCALE_EN = 'en';
  1906. var LOCALE_FR = 'fr';
  1907. var LOCALE_ES = 'es';
  1908. var messages = {};
  1909. var locale;
  1910. {
  1911. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1912. }
  1913. function initI18nMessages() {
  1914. if (!isEnableLocale()) {
  1915. return;
  1916. }
  1917. var localeKeys = Object.keys(__uniConfig.locales);
  1918. if (localeKeys.length) {
  1919. localeKeys.forEach(function (locale) {
  1920. var curMessages = messages[locale];
  1921. var userMessages = __uniConfig.locales[locale];
  1922. if (curMessages) {
  1923. Object.assign(curMessages, userMessages);
  1924. } else {
  1925. messages[locale] = userMessages;
  1926. }
  1927. });
  1928. }
  1929. }
  1930. initI18nMessages();
  1931. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  1932. var t = i18n.t;
  1933. var i18nMixin = i18n.mixin = {
  1934. beforeCreate: function beforeCreate() {
  1935. var _this = this;
  1936. var unwatch = i18n.i18n.watchLocale(function () {
  1937. _this.$forceUpdate();
  1938. });
  1939. this.$once('hook:beforeDestroy', function () {
  1940. unwatch();
  1941. });
  1942. },
  1943. methods: {
  1944. $$t: function $$t(key, values) {
  1945. return t(key, values);
  1946. }
  1947. }
  1948. };
  1949. var setLocale = i18n.setLocale;
  1950. var getLocale = i18n.getLocale;
  1951. function initAppLocale(Vue, appVm, locale) {
  1952. var state = Vue.observable({
  1953. locale: locale || i18n.getLocale()
  1954. });
  1955. var localeWatchers = [];
  1956. appVm.$watchLocale = function (fn) {
  1957. localeWatchers.push(fn);
  1958. };
  1959. Object.defineProperty(appVm, '$locale', {
  1960. get: function get() {
  1961. return state.locale;
  1962. },
  1963. set: function set(v) {
  1964. state.locale = v;
  1965. localeWatchers.forEach(function (watch) {
  1966. return watch(v);
  1967. });
  1968. }
  1969. });
  1970. }
  1971. function isEnableLocale() {
  1972. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  1973. }
  1974. function include(str, parts) {
  1975. return !!parts.find(function (part) {
  1976. return str.indexOf(part) !== -1;
  1977. });
  1978. }
  1979. function startsWith(str, parts) {
  1980. return parts.find(function (part) {
  1981. return str.indexOf(part) === 0;
  1982. });
  1983. }
  1984. function normalizeLocale(locale, messages) {
  1985. if (!locale) {
  1986. return;
  1987. }
  1988. locale = locale.trim().replace(/_/g, '-');
  1989. if (messages && messages[locale]) {
  1990. return locale;
  1991. }
  1992. locale = locale.toLowerCase();
  1993. if (locale === 'chinese') {
  1994. // 支付宝
  1995. return LOCALE_ZH_HANS;
  1996. }
  1997. if (locale.indexOf('zh') === 0) {
  1998. if (locale.indexOf('-hans') > -1) {
  1999. return LOCALE_ZH_HANS;
  2000. }
  2001. if (locale.indexOf('-hant') > -1) {
  2002. return LOCALE_ZH_HANT;
  2003. }
  2004. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2005. return LOCALE_ZH_HANT;
  2006. }
  2007. return LOCALE_ZH_HANS;
  2008. }
  2009. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  2010. if (lang) {
  2011. return lang;
  2012. }
  2013. }
  2014. // export function initI18n() {
  2015. // const localeKeys = Object.keys(__uniConfig.locales || {})
  2016. // if (localeKeys.length) {
  2017. // localeKeys.forEach((locale) =>
  2018. // i18n.add(locale, __uniConfig.locales[locale])
  2019. // )
  2020. // }
  2021. // }
  2022. function getLocale$1() {
  2023. // 优先使用 $locale
  2024. if (isFn(getApp)) {
  2025. var app = getApp({
  2026. allowDefault: true
  2027. });
  2028. if (app && app.$vm) {
  2029. return app.$vm.$locale;
  2030. }
  2031. }
  2032. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  2033. }
  2034. function setLocale$1(locale) {
  2035. var app = isFn(getApp) ? getApp() : false;
  2036. if (!app) {
  2037. return false;
  2038. }
  2039. var oldLocale = app.$vm.$locale;
  2040. if (oldLocale !== locale) {
  2041. app.$vm.$locale = locale;
  2042. onLocaleChangeCallbacks.forEach(function (fn) {
  2043. return fn({
  2044. locale: locale
  2045. });
  2046. });
  2047. return true;
  2048. }
  2049. return false;
  2050. }
  2051. var onLocaleChangeCallbacks = [];
  2052. function onLocaleChange(fn) {
  2053. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  2054. onLocaleChangeCallbacks.push(fn);
  2055. }
  2056. }
  2057. if (typeof global !== 'undefined') {
  2058. global.getLocale = getLocale$1;
  2059. }
  2060. var interceptors = {
  2061. promiseInterceptor: promiseInterceptor
  2062. };
  2063. var baseApi = /*#__PURE__*/Object.freeze({
  2064. __proto__: null,
  2065. upx2px: upx2px,
  2066. getLocale: getLocale$1,
  2067. setLocale: setLocale$1,
  2068. onLocaleChange: onLocaleChange,
  2069. addInterceptor: addInterceptor,
  2070. removeInterceptor: removeInterceptor,
  2071. interceptors: interceptors
  2072. });
  2073. function findExistsPageIndex(url) {
  2074. var pages = getCurrentPages();
  2075. var len = pages.length;
  2076. while (len--) {
  2077. var page = pages[len];
  2078. if (page.$page && page.$page.fullPath === url) {
  2079. return len;
  2080. }
  2081. }
  2082. return -1;
  2083. }
  2084. var redirectTo = {
  2085. name: function name(fromArgs) {
  2086. if (fromArgs.exists === 'back' && fromArgs.delta) {
  2087. return 'navigateBack';
  2088. }
  2089. return 'redirectTo';
  2090. },
  2091. args: function args(fromArgs) {
  2092. if (fromArgs.exists === 'back' && fromArgs.url) {
  2093. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  2094. if (existsPageIndex !== -1) {
  2095. var delta = getCurrentPages().length - 1 - existsPageIndex;
  2096. if (delta > 0) {
  2097. fromArgs.delta = delta;
  2098. }
  2099. }
  2100. }
  2101. }
  2102. };
  2103. var previewImage = {
  2104. args: function args(fromArgs) {
  2105. var currentIndex = parseInt(fromArgs.current);
  2106. if (isNaN(currentIndex)) {
  2107. return;
  2108. }
  2109. var urls = fromArgs.urls;
  2110. if (!Array.isArray(urls)) {
  2111. return;
  2112. }
  2113. var len = urls.length;
  2114. if (!len) {
  2115. return;
  2116. }
  2117. if (currentIndex < 0) {
  2118. currentIndex = 0;
  2119. } else if (currentIndex >= len) {
  2120. currentIndex = len - 1;
  2121. }
  2122. if (currentIndex > 0) {
  2123. fromArgs.current = urls[currentIndex];
  2124. fromArgs.urls = urls.filter(function (item, index) {
  2125. return index < currentIndex ? item !== urls[currentIndex] : true;
  2126. });
  2127. } else {
  2128. fromArgs.current = urls[0];
  2129. }
  2130. return {
  2131. indicator: false,
  2132. loop: false
  2133. };
  2134. }
  2135. };
  2136. var UUID_KEY = '__DC_STAT_UUID';
  2137. var deviceId;
  2138. function useDeviceId(result) {
  2139. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  2140. if (!deviceId) {
  2141. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  2142. wx.setStorage({
  2143. key: UUID_KEY,
  2144. data: deviceId
  2145. });
  2146. }
  2147. result.deviceId = deviceId;
  2148. }
  2149. function addSafeAreaInsets(result) {
  2150. if (result.safeArea) {
  2151. var safeArea = result.safeArea;
  2152. result.safeAreaInsets = {
  2153. top: safeArea.top,
  2154. left: safeArea.left,
  2155. right: result.windowWidth - safeArea.right,
  2156. bottom: result.screenHeight - safeArea.bottom
  2157. };
  2158. }
  2159. }
  2160. function populateParameters(result) {
  2161. var _result$brand = result.brand,
  2162. brand = _result$brand === void 0 ? '' : _result$brand,
  2163. _result$model = result.model,
  2164. model = _result$model === void 0 ? '' : _result$model,
  2165. _result$system = result.system,
  2166. system = _result$system === void 0 ? '' : _result$system,
  2167. _result$language = result.language,
  2168. language = _result$language === void 0 ? '' : _result$language,
  2169. theme = result.theme,
  2170. version = result.version,
  2171. platform = result.platform,
  2172. fontSizeSetting = result.fontSizeSetting,
  2173. SDKVersion = result.SDKVersion,
  2174. pixelRatio = result.pixelRatio,
  2175. deviceOrientation = result.deviceOrientation;
  2176. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  2177. var extraParam = {};
  2178. // osName osVersion
  2179. var osName = '';
  2180. var osVersion = '';
  2181. {
  2182. osName = system.split(' ')[0] || '';
  2183. osVersion = system.split(' ')[1] || '';
  2184. }
  2185. var hostVersion = version;
  2186. // deviceType
  2187. var deviceType = getGetDeviceType(result, model);
  2188. // deviceModel
  2189. var deviceBrand = getDeviceBrand(brand);
  2190. // hostName
  2191. var _hostName = getHostName(result);
  2192. // deviceOrientation
  2193. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  2194. // devicePixelRatio
  2195. var _devicePixelRatio = pixelRatio;
  2196. // SDKVersion
  2197. var _SDKVersion = SDKVersion;
  2198. // hostLanguage
  2199. var hostLanguage = language.replace(/_/g, '-');
  2200. // wx.getAccountInfoSync
  2201. var parameters = {
  2202. appId: "__UNI__73F6024",
  2203. appName: "UniappShell",
  2204. appVersion: "1.0.0",
  2205. appVersionCode: "100",
  2206. appLanguage: getAppLanguage(hostLanguage),
  2207. uniCompileVersion: "3.8.12",
  2208. uniRuntimeVersion: "3.8.12",
  2209. uniPlatform: undefined || "mp-weixin",
  2210. deviceBrand: deviceBrand,
  2211. deviceModel: model,
  2212. deviceType: deviceType,
  2213. devicePixelRatio: _devicePixelRatio,
  2214. deviceOrientation: _deviceOrientation,
  2215. osName: osName.toLocaleLowerCase(),
  2216. osVersion: osVersion,
  2217. hostTheme: theme,
  2218. hostVersion: hostVersion,
  2219. hostLanguage: hostLanguage,
  2220. hostName: _hostName,
  2221. hostSDKVersion: _SDKVersion,
  2222. hostFontSizeSetting: fontSizeSetting,
  2223. windowTop: 0,
  2224. windowBottom: 0,
  2225. // TODO
  2226. osLanguage: undefined,
  2227. osTheme: undefined,
  2228. ua: undefined,
  2229. hostPackageName: undefined,
  2230. browserName: undefined,
  2231. browserVersion: undefined
  2232. };
  2233. Object.assign(result, parameters, extraParam);
  2234. }
  2235. function getGetDeviceType(result, model) {
  2236. var deviceType = result.deviceType || 'phone';
  2237. {
  2238. var deviceTypeMaps = {
  2239. ipad: 'pad',
  2240. windows: 'pc',
  2241. mac: 'pc'
  2242. };
  2243. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  2244. var _model = model.toLocaleLowerCase();
  2245. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  2246. var _m = deviceTypeMapsKeys[index];
  2247. if (_model.indexOf(_m) !== -1) {
  2248. deviceType = deviceTypeMaps[_m];
  2249. break;
  2250. }
  2251. }
  2252. }
  2253. return deviceType;
  2254. }
  2255. function getDeviceBrand(brand) {
  2256. var deviceBrand = brand;
  2257. if (deviceBrand) {
  2258. deviceBrand = brand.toLocaleLowerCase();
  2259. }
  2260. return deviceBrand;
  2261. }
  2262. function getAppLanguage(defaultLanguage) {
  2263. return getLocale$1 ? getLocale$1() : defaultLanguage;
  2264. }
  2265. function getHostName(result) {
  2266. var _platform = 'WeChat';
  2267. var _hostName = result.hostName || _platform; // mp-jd
  2268. {
  2269. if (result.environment) {
  2270. _hostName = result.environment;
  2271. } else if (result.host && result.host.env) {
  2272. _hostName = result.host.env;
  2273. }
  2274. }
  2275. return _hostName;
  2276. }
  2277. var getSystemInfo = {
  2278. returnValue: function returnValue(result) {
  2279. useDeviceId(result);
  2280. addSafeAreaInsets(result);
  2281. populateParameters(result);
  2282. }
  2283. };
  2284. var showActionSheet = {
  2285. args: function args(fromArgs) {
  2286. if ((0, _typeof2.default)(fromArgs) === 'object') {
  2287. fromArgs.alertText = fromArgs.title;
  2288. }
  2289. }
  2290. };
  2291. var getAppBaseInfo = {
  2292. returnValue: function returnValue(result) {
  2293. var _result = result,
  2294. version = _result.version,
  2295. language = _result.language,
  2296. SDKVersion = _result.SDKVersion,
  2297. theme = _result.theme;
  2298. var _hostName = getHostName(result);
  2299. var hostLanguage = language.replace('_', '-');
  2300. result = sortObject(Object.assign(result, {
  2301. appId: "__UNI__73F6024",
  2302. appName: "UniappShell",
  2303. appVersion: "1.0.0",
  2304. appVersionCode: "100",
  2305. appLanguage: getAppLanguage(hostLanguage),
  2306. hostVersion: version,
  2307. hostLanguage: hostLanguage,
  2308. hostName: _hostName,
  2309. hostSDKVersion: SDKVersion,
  2310. hostTheme: theme
  2311. }));
  2312. }
  2313. };
  2314. var getDeviceInfo = {
  2315. returnValue: function returnValue(result) {
  2316. var _result2 = result,
  2317. brand = _result2.brand,
  2318. model = _result2.model;
  2319. var deviceType = getGetDeviceType(result, model);
  2320. var deviceBrand = getDeviceBrand(brand);
  2321. useDeviceId(result);
  2322. result = sortObject(Object.assign(result, {
  2323. deviceType: deviceType,
  2324. deviceBrand: deviceBrand,
  2325. deviceModel: model
  2326. }));
  2327. }
  2328. };
  2329. var getWindowInfo = {
  2330. returnValue: function returnValue(result) {
  2331. addSafeAreaInsets(result);
  2332. result = sortObject(Object.assign(result, {
  2333. windowTop: 0,
  2334. windowBottom: 0
  2335. }));
  2336. }
  2337. };
  2338. var getAppAuthorizeSetting = {
  2339. returnValue: function returnValue(result) {
  2340. var locationReducedAccuracy = result.locationReducedAccuracy;
  2341. result.locationAccuracy = 'unsupported';
  2342. if (locationReducedAccuracy === true) {
  2343. result.locationAccuracy = 'reduced';
  2344. } else if (locationReducedAccuracy === false) {
  2345. result.locationAccuracy = 'full';
  2346. }
  2347. }
  2348. };
  2349. // import navigateTo from 'uni-helpers/navigate-to'
  2350. var compressImage = {
  2351. args: function args(fromArgs) {
  2352. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  2353. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  2354. fromArgs.compressHeight = fromArgs.compressedHeight;
  2355. }
  2356. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  2357. fromArgs.compressWidth = fromArgs.compressedWidth;
  2358. }
  2359. }
  2360. };
  2361. var protocols = {
  2362. redirectTo: redirectTo,
  2363. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  2364. previewImage: previewImage,
  2365. getSystemInfo: getSystemInfo,
  2366. getSystemInfoSync: getSystemInfo,
  2367. showActionSheet: showActionSheet,
  2368. getAppBaseInfo: getAppBaseInfo,
  2369. getDeviceInfo: getDeviceInfo,
  2370. getWindowInfo: getWindowInfo,
  2371. getAppAuthorizeSetting: getAppAuthorizeSetting,
  2372. compressImage: compressImage
  2373. };
  2374. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  2375. var canIUses = [];
  2376. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  2377. function processCallback(methodName, method, returnValue) {
  2378. return function (res) {
  2379. return method(processReturnValue(methodName, res, returnValue));
  2380. };
  2381. }
  2382. function processArgs(methodName, fromArgs) {
  2383. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2384. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  2385. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  2386. if (isPlainObject(fromArgs)) {
  2387. // 一般 api 的参数解析
  2388. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  2389. if (isFn(argsOption)) {
  2390. argsOption = argsOption(fromArgs, toArgs) || {};
  2391. }
  2392. for (var key in fromArgs) {
  2393. if (hasOwn(argsOption, key)) {
  2394. var keyOption = argsOption[key];
  2395. if (isFn(keyOption)) {
  2396. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  2397. }
  2398. if (!keyOption) {
  2399. // 不支持的参数
  2400. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  2401. } else if (isStr(keyOption)) {
  2402. // 重写参数 key
  2403. toArgs[keyOption] = fromArgs[key];
  2404. } else if (isPlainObject(keyOption)) {
  2405. // {name:newName,value:value}可重新指定参数 key:value
  2406. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  2407. }
  2408. } else if (CALLBACKS.indexOf(key) !== -1) {
  2409. if (isFn(fromArgs[key])) {
  2410. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  2411. }
  2412. } else {
  2413. if (!keepFromArgs) {
  2414. toArgs[key] = fromArgs[key];
  2415. }
  2416. }
  2417. }
  2418. return toArgs;
  2419. } else if (isFn(fromArgs)) {
  2420. fromArgs = processCallback(methodName, fromArgs, returnValue);
  2421. }
  2422. return fromArgs;
  2423. }
  2424. function processReturnValue(methodName, res, returnValue) {
  2425. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  2426. if (isFn(protocols.returnValue)) {
  2427. // 处理通用 returnValue
  2428. res = protocols.returnValue(methodName, res);
  2429. }
  2430. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  2431. }
  2432. function wrapper(methodName, method) {
  2433. if (hasOwn(protocols, methodName)) {
  2434. var protocol = protocols[methodName];
  2435. if (!protocol) {
  2436. // 暂不支持的 api
  2437. return function () {
  2438. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  2439. };
  2440. }
  2441. return function (arg1, arg2) {
  2442. // 目前 api 最多两个参数
  2443. var options = protocol;
  2444. if (isFn(protocol)) {
  2445. options = protocol(arg1);
  2446. }
  2447. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  2448. var args = [arg1];
  2449. if (typeof arg2 !== 'undefined') {
  2450. args.push(arg2);
  2451. }
  2452. if (isFn(options.name)) {
  2453. methodName = options.name(arg1);
  2454. } else if (isStr(options.name)) {
  2455. methodName = options.name;
  2456. }
  2457. var returnValue = wx[methodName].apply(wx, args);
  2458. if (isSyncApi(methodName)) {
  2459. // 同步 api
  2460. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  2461. }
  2462. return returnValue;
  2463. };
  2464. }
  2465. return method;
  2466. }
  2467. var todoApis = Object.create(null);
  2468. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  2469. function createTodoApi(name) {
  2470. return function todoApi(_ref) {
  2471. var fail = _ref.fail,
  2472. complete = _ref.complete;
  2473. var res = {
  2474. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  2475. };
  2476. isFn(fail) && fail(res);
  2477. isFn(complete) && complete(res);
  2478. };
  2479. }
  2480. TODOS.forEach(function (name) {
  2481. todoApis[name] = createTodoApi(name);
  2482. });
  2483. var providers = {
  2484. oauth: ['weixin'],
  2485. share: ['weixin'],
  2486. payment: ['wxpay'],
  2487. push: ['weixin']
  2488. };
  2489. function getProvider(_ref2) {
  2490. var service = _ref2.service,
  2491. success = _ref2.success,
  2492. fail = _ref2.fail,
  2493. complete = _ref2.complete;
  2494. var res = false;
  2495. if (providers[service]) {
  2496. res = {
  2497. errMsg: 'getProvider:ok',
  2498. service: service,
  2499. provider: providers[service]
  2500. };
  2501. isFn(success) && success(res);
  2502. } else {
  2503. res = {
  2504. errMsg: 'getProvider:fail service not found'
  2505. };
  2506. isFn(fail) && fail(res);
  2507. }
  2508. isFn(complete) && complete(res);
  2509. }
  2510. var extraApi = /*#__PURE__*/Object.freeze({
  2511. __proto__: null,
  2512. getProvider: getProvider
  2513. });
  2514. var getEmitter = function () {
  2515. var Emitter;
  2516. return function getUniEmitter() {
  2517. if (!Emitter) {
  2518. Emitter = new _vue.default();
  2519. }
  2520. return Emitter;
  2521. };
  2522. }();
  2523. function apply(ctx, method, args) {
  2524. return ctx[method].apply(ctx, args);
  2525. }
  2526. function $on() {
  2527. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  2528. }
  2529. function $off() {
  2530. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  2531. }
  2532. function $once() {
  2533. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  2534. }
  2535. function $emit() {
  2536. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  2537. }
  2538. var eventApi = /*#__PURE__*/Object.freeze({
  2539. __proto__: null,
  2540. $on: $on,
  2541. $off: $off,
  2542. $once: $once,
  2543. $emit: $emit
  2544. });
  2545. /**
  2546. * 框架内 try-catch
  2547. */
  2548. /**
  2549. * 开发者 try-catch
  2550. */
  2551. function tryCatch(fn) {
  2552. return function () {
  2553. try {
  2554. return fn.apply(fn, arguments);
  2555. } catch (e) {
  2556. // TODO
  2557. console.error(e);
  2558. }
  2559. };
  2560. }
  2561. function getApiCallbacks(params) {
  2562. var apiCallbacks = {};
  2563. for (var name in params) {
  2564. var param = params[name];
  2565. if (isFn(param)) {
  2566. apiCallbacks[name] = tryCatch(param);
  2567. delete params[name];
  2568. }
  2569. }
  2570. return apiCallbacks;
  2571. }
  2572. var cid;
  2573. var cidErrMsg;
  2574. var enabled;
  2575. function normalizePushMessage(message) {
  2576. try {
  2577. return JSON.parse(message);
  2578. } catch (e) {}
  2579. return message;
  2580. }
  2581. function invokePushCallback(args) {
  2582. if (args.type === 'enabled') {
  2583. enabled = true;
  2584. } else if (args.type === 'clientId') {
  2585. cid = args.cid;
  2586. cidErrMsg = args.errMsg;
  2587. invokeGetPushCidCallbacks(cid, args.errMsg);
  2588. } else if (args.type === 'pushMsg') {
  2589. var message = {
  2590. type: 'receive',
  2591. data: normalizePushMessage(args.message)
  2592. };
  2593. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  2594. var callback = onPushMessageCallbacks[i];
  2595. callback(message);
  2596. // 该消息已被阻止
  2597. if (message.stopped) {
  2598. break;
  2599. }
  2600. }
  2601. } else if (args.type === 'click') {
  2602. onPushMessageCallbacks.forEach(function (callback) {
  2603. callback({
  2604. type: 'click',
  2605. data: normalizePushMessage(args.message)
  2606. });
  2607. });
  2608. }
  2609. }
  2610. var getPushCidCallbacks = [];
  2611. function invokeGetPushCidCallbacks(cid, errMsg) {
  2612. getPushCidCallbacks.forEach(function (callback) {
  2613. callback(cid, errMsg);
  2614. });
  2615. getPushCidCallbacks.length = 0;
  2616. }
  2617. function getPushClientId(args) {
  2618. if (!isPlainObject(args)) {
  2619. args = {};
  2620. }
  2621. var _getApiCallbacks = getApiCallbacks(args),
  2622. success = _getApiCallbacks.success,
  2623. fail = _getApiCallbacks.fail,
  2624. complete = _getApiCallbacks.complete;
  2625. var hasSuccess = isFn(success);
  2626. var hasFail = isFn(fail);
  2627. var hasComplete = isFn(complete);
  2628. Promise.resolve().then(function () {
  2629. if (typeof enabled === 'undefined') {
  2630. enabled = false;
  2631. cid = '';
  2632. cidErrMsg = 'uniPush is not enabled';
  2633. }
  2634. getPushCidCallbacks.push(function (cid, errMsg) {
  2635. var res;
  2636. if (cid) {
  2637. res = {
  2638. errMsg: 'getPushClientId:ok',
  2639. cid: cid
  2640. };
  2641. hasSuccess && success(res);
  2642. } else {
  2643. res = {
  2644. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  2645. };
  2646. hasFail && fail(res);
  2647. }
  2648. hasComplete && complete(res);
  2649. });
  2650. if (typeof cid !== 'undefined') {
  2651. invokeGetPushCidCallbacks(cid, cidErrMsg);
  2652. }
  2653. });
  2654. }
  2655. var onPushMessageCallbacks = [];
  2656. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  2657. var onPushMessage = function onPushMessage(fn) {
  2658. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  2659. onPushMessageCallbacks.push(fn);
  2660. }
  2661. };
  2662. var offPushMessage = function offPushMessage(fn) {
  2663. if (!fn) {
  2664. onPushMessageCallbacks.length = 0;
  2665. } else {
  2666. var index = onPushMessageCallbacks.indexOf(fn);
  2667. if (index > -1) {
  2668. onPushMessageCallbacks.splice(index, 1);
  2669. }
  2670. }
  2671. };
  2672. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  2673. if (!baseInfo) {
  2674. baseInfo = wx.getSystemInfoSync();
  2675. }
  2676. var host = baseInfo ? baseInfo.host : null;
  2677. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  2678. var api = /*#__PURE__*/Object.freeze({
  2679. __proto__: null,
  2680. shareVideoMessage: shareVideoMessage,
  2681. getPushClientId: getPushClientId,
  2682. onPushMessage: onPushMessage,
  2683. offPushMessage: offPushMessage,
  2684. invokePushCallback: invokePushCallback
  2685. });
  2686. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  2687. function findVmByVueId(vm, vuePid) {
  2688. var $children = vm.$children;
  2689. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  2690. for (var i = $children.length - 1; i >= 0; i--) {
  2691. var childVm = $children[i];
  2692. if (childVm.$scope._$vueId === vuePid) {
  2693. return childVm;
  2694. }
  2695. }
  2696. // 反向递归查找
  2697. var parentVm;
  2698. for (var _i = $children.length - 1; _i >= 0; _i--) {
  2699. parentVm = findVmByVueId($children[_i], vuePid);
  2700. if (parentVm) {
  2701. return parentVm;
  2702. }
  2703. }
  2704. }
  2705. function initBehavior(options) {
  2706. return Behavior(options);
  2707. }
  2708. function isPage() {
  2709. return !!this.route;
  2710. }
  2711. function initRelation(detail) {
  2712. this.triggerEvent('__l', detail);
  2713. }
  2714. function selectAllComponents(mpInstance, selector, $refs) {
  2715. var components = mpInstance.selectAllComponents(selector) || [];
  2716. components.forEach(function (component) {
  2717. var ref = component.dataset.ref;
  2718. $refs[ref] = component.$vm || toSkip(component);
  2719. {
  2720. if (component.dataset.vueGeneric === 'scoped') {
  2721. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  2722. selectAllComponents(scopedComponent, selector, $refs);
  2723. });
  2724. }
  2725. }
  2726. });
  2727. }
  2728. function syncRefs(refs, newRefs) {
  2729. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  2730. var newKeys = Object.keys(newRefs);
  2731. newKeys.forEach(function (key) {
  2732. var oldValue = refs[key];
  2733. var newValue = newRefs[key];
  2734. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  2735. return oldValue.includes(value);
  2736. })) {
  2737. return;
  2738. }
  2739. refs[key] = newValue;
  2740. oldKeys.delete(key);
  2741. });
  2742. oldKeys.forEach(function (key) {
  2743. delete refs[key];
  2744. });
  2745. return refs;
  2746. }
  2747. function initRefs(vm) {
  2748. var mpInstance = vm.$scope;
  2749. var refs = {};
  2750. Object.defineProperty(vm, '$refs', {
  2751. get: function get() {
  2752. var $refs = {};
  2753. selectAllComponents(mpInstance, '.vue-ref', $refs);
  2754. // TODO 暂不考虑 for 中的 scoped
  2755. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  2756. forComponents.forEach(function (component) {
  2757. var ref = component.dataset.ref;
  2758. if (!$refs[ref]) {
  2759. $refs[ref] = [];
  2760. }
  2761. $refs[ref].push(component.$vm || toSkip(component));
  2762. });
  2763. return syncRefs(refs, $refs);
  2764. }
  2765. });
  2766. }
  2767. function handleLink(event) {
  2768. var _ref3 = event.detail || event.value,
  2769. vuePid = _ref3.vuePid,
  2770. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  2771. var parentVm;
  2772. if (vuePid) {
  2773. parentVm = findVmByVueId(this.$vm, vuePid);
  2774. }
  2775. if (!parentVm) {
  2776. parentVm = this.$vm;
  2777. }
  2778. vueOptions.parent = parentVm;
  2779. }
  2780. function markMPComponent(component) {
  2781. // 在 Vue 中标记为小程序组件
  2782. var IS_MP = '__v_isMPComponent';
  2783. Object.defineProperty(component, IS_MP, {
  2784. configurable: true,
  2785. enumerable: false,
  2786. value: true
  2787. });
  2788. return component;
  2789. }
  2790. function toSkip(obj) {
  2791. var OB = '__ob__';
  2792. var SKIP = '__v_skip';
  2793. if (isObject(obj) && Object.isExtensible(obj)) {
  2794. // 避免被 @vue/composition-api 观测
  2795. Object.defineProperty(obj, OB, {
  2796. configurable: true,
  2797. enumerable: false,
  2798. value: (0, _defineProperty2.default)({}, SKIP, true)
  2799. });
  2800. }
  2801. return obj;
  2802. }
  2803. var WORKLET_RE = /_(.*)_worklet_factory_/;
  2804. function initWorkletMethods(mpMethods, vueMethods) {
  2805. if (vueMethods) {
  2806. Object.keys(vueMethods).forEach(function (name) {
  2807. var matches = name.match(WORKLET_RE);
  2808. if (matches) {
  2809. var workletName = matches[1];
  2810. mpMethods[name] = vueMethods[name];
  2811. mpMethods[workletName] = vueMethods[workletName];
  2812. }
  2813. });
  2814. }
  2815. }
  2816. var MPPage = Page;
  2817. var MPComponent = Component;
  2818. var customizeRE = /:/g;
  2819. var customize = cached(function (str) {
  2820. return camelize(str.replace(customizeRE, '-'));
  2821. });
  2822. function initTriggerEvent(mpInstance) {
  2823. var oldTriggerEvent = mpInstance.triggerEvent;
  2824. var newTriggerEvent = function newTriggerEvent(event) {
  2825. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  2826. args[_key3 - 1] = arguments[_key3];
  2827. }
  2828. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  2829. if (this.$vm || this.dataset && this.dataset.comType) {
  2830. event = customize(event);
  2831. } else {
  2832. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  2833. var newEvent = customize(event);
  2834. if (newEvent !== event) {
  2835. oldTriggerEvent.apply(this, [newEvent].concat(args));
  2836. }
  2837. }
  2838. return oldTriggerEvent.apply(this, [event].concat(args));
  2839. };
  2840. try {
  2841. // 京东小程序 triggerEvent 为只读
  2842. mpInstance.triggerEvent = newTriggerEvent;
  2843. } catch (error) {
  2844. mpInstance._triggerEvent = newTriggerEvent;
  2845. }
  2846. }
  2847. function initHook(name, options, isComponent) {
  2848. var oldHook = options[name];
  2849. options[name] = function () {
  2850. markMPComponent(this);
  2851. initTriggerEvent(this);
  2852. if (oldHook) {
  2853. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2854. args[_key4] = arguments[_key4];
  2855. }
  2856. return oldHook.apply(this, args);
  2857. }
  2858. };
  2859. }
  2860. if (!MPPage.__$wrappered) {
  2861. MPPage.__$wrappered = true;
  2862. Page = function Page() {
  2863. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2864. initHook('onLoad', options);
  2865. return MPPage(options);
  2866. };
  2867. Page.after = MPPage.after;
  2868. Component = function Component() {
  2869. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2870. initHook('created', options);
  2871. return MPComponent(options);
  2872. };
  2873. }
  2874. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  2875. function initMocks(vm, mocks) {
  2876. var mpInstance = vm.$mp[vm.mpType];
  2877. mocks.forEach(function (mock) {
  2878. if (hasOwn(mpInstance, mock)) {
  2879. vm[mock] = mpInstance[mock];
  2880. }
  2881. });
  2882. }
  2883. function hasHook(hook, vueOptions) {
  2884. if (!vueOptions) {
  2885. return true;
  2886. }
  2887. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  2888. return true;
  2889. }
  2890. vueOptions = vueOptions.default || vueOptions;
  2891. if (isFn(vueOptions)) {
  2892. if (isFn(vueOptions.extendOptions[hook])) {
  2893. return true;
  2894. }
  2895. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  2896. return true;
  2897. }
  2898. return false;
  2899. }
  2900. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  2901. return true;
  2902. }
  2903. var mixins = vueOptions.mixins;
  2904. if (Array.isArray(mixins)) {
  2905. return !!mixins.find(function (mixin) {
  2906. return hasHook(hook, mixin);
  2907. });
  2908. }
  2909. }
  2910. function initHooks(mpOptions, hooks, vueOptions) {
  2911. hooks.forEach(function (hook) {
  2912. if (hasHook(hook, vueOptions)) {
  2913. mpOptions[hook] = function (args) {
  2914. return this.$vm && this.$vm.__call_hook(hook, args);
  2915. };
  2916. }
  2917. });
  2918. }
  2919. function initUnknownHooks(mpOptions, vueOptions) {
  2920. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  2921. findHooks(vueOptions).forEach(function (hook) {
  2922. return initHook$1(mpOptions, hook, excludes);
  2923. });
  2924. }
  2925. function findHooks(vueOptions) {
  2926. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  2927. if (vueOptions) {
  2928. Object.keys(vueOptions).forEach(function (name) {
  2929. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  2930. hooks.push(name);
  2931. }
  2932. });
  2933. }
  2934. return hooks;
  2935. }
  2936. function initHook$1(mpOptions, hook, excludes) {
  2937. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  2938. mpOptions[hook] = function (args) {
  2939. return this.$vm && this.$vm.__call_hook(hook, args);
  2940. };
  2941. }
  2942. }
  2943. function initVueComponent(Vue, vueOptions) {
  2944. vueOptions = vueOptions.default || vueOptions;
  2945. var VueComponent;
  2946. if (isFn(vueOptions)) {
  2947. VueComponent = vueOptions;
  2948. } else {
  2949. VueComponent = Vue.extend(vueOptions);
  2950. }
  2951. vueOptions = VueComponent.options;
  2952. return [VueComponent, vueOptions];
  2953. }
  2954. function initSlots(vm, vueSlots) {
  2955. if (Array.isArray(vueSlots) && vueSlots.length) {
  2956. var $slots = Object.create(null);
  2957. vueSlots.forEach(function (slotName) {
  2958. $slots[slotName] = true;
  2959. });
  2960. vm.$scopedSlots = vm.$slots = $slots;
  2961. }
  2962. }
  2963. function initVueIds(vueIds, mpInstance) {
  2964. vueIds = (vueIds || '').split(',');
  2965. var len = vueIds.length;
  2966. if (len === 1) {
  2967. mpInstance._$vueId = vueIds[0];
  2968. } else if (len === 2) {
  2969. mpInstance._$vueId = vueIds[0];
  2970. mpInstance._$vuePid = vueIds[1];
  2971. }
  2972. }
  2973. function initData(vueOptions, context) {
  2974. var data = vueOptions.data || {};
  2975. var methods = vueOptions.methods || {};
  2976. if (typeof data === 'function') {
  2977. try {
  2978. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  2979. } catch (e) {
  2980. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  2981. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  2982. }
  2983. }
  2984. } else {
  2985. try {
  2986. // 对 data 格式化
  2987. data = JSON.parse(JSON.stringify(data));
  2988. } catch (e) {}
  2989. }
  2990. if (!isPlainObject(data)) {
  2991. data = {};
  2992. }
  2993. Object.keys(methods).forEach(function (methodName) {
  2994. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  2995. data[methodName] = methods[methodName];
  2996. }
  2997. });
  2998. return data;
  2999. }
  3000. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  3001. function createObserver(name) {
  3002. return function observer(newVal, oldVal) {
  3003. if (this.$vm) {
  3004. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  3005. }
  3006. };
  3007. }
  3008. function initBehaviors(vueOptions, initBehavior) {
  3009. var vueBehaviors = vueOptions.behaviors;
  3010. var vueExtends = vueOptions.extends;
  3011. var vueMixins = vueOptions.mixins;
  3012. var vueProps = vueOptions.props;
  3013. if (!vueProps) {
  3014. vueOptions.props = vueProps = [];
  3015. }
  3016. var behaviors = [];
  3017. if (Array.isArray(vueBehaviors)) {
  3018. vueBehaviors.forEach(function (behavior) {
  3019. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  3020. if (behavior === 'uni://form-field') {
  3021. if (Array.isArray(vueProps)) {
  3022. vueProps.push('name');
  3023. vueProps.push('value');
  3024. } else {
  3025. vueProps.name = {
  3026. type: String,
  3027. default: ''
  3028. };
  3029. vueProps.value = {
  3030. type: [String, Number, Boolean, Array, Object, Date],
  3031. default: ''
  3032. };
  3033. }
  3034. }
  3035. });
  3036. }
  3037. if (isPlainObject(vueExtends) && vueExtends.props) {
  3038. behaviors.push(initBehavior({
  3039. properties: initProperties(vueExtends.props, true)
  3040. }));
  3041. }
  3042. if (Array.isArray(vueMixins)) {
  3043. vueMixins.forEach(function (vueMixin) {
  3044. if (isPlainObject(vueMixin) && vueMixin.props) {
  3045. behaviors.push(initBehavior({
  3046. properties: initProperties(vueMixin.props, true)
  3047. }));
  3048. }
  3049. });
  3050. }
  3051. return behaviors;
  3052. }
  3053. function parsePropType(key, type, defaultValue, file) {
  3054. // [String]=>String
  3055. if (Array.isArray(type) && type.length === 1) {
  3056. return type[0];
  3057. }
  3058. return type;
  3059. }
  3060. function initProperties(props) {
  3061. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3062. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  3063. var options = arguments.length > 3 ? arguments[3] : undefined;
  3064. var properties = {};
  3065. if (!isBehavior) {
  3066. properties.vueId = {
  3067. type: String,
  3068. value: ''
  3069. };
  3070. {
  3071. if (options.virtualHost) {
  3072. properties.virtualHostStyle = {
  3073. type: null,
  3074. value: ''
  3075. };
  3076. properties.virtualHostClass = {
  3077. type: null,
  3078. value: ''
  3079. };
  3080. }
  3081. }
  3082. // scopedSlotsCompiler auto
  3083. properties.scopedSlotsCompiler = {
  3084. type: String,
  3085. value: ''
  3086. };
  3087. properties.vueSlots = {
  3088. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  3089. type: null,
  3090. value: [],
  3091. observer: function observer(newVal, oldVal) {
  3092. var $slots = Object.create(null);
  3093. newVal.forEach(function (slotName) {
  3094. $slots[slotName] = true;
  3095. });
  3096. this.setData({
  3097. $slots: $slots
  3098. });
  3099. }
  3100. };
  3101. }
  3102. if (Array.isArray(props)) {
  3103. // ['title']
  3104. props.forEach(function (key) {
  3105. properties[key] = {
  3106. type: null,
  3107. observer: createObserver(key)
  3108. };
  3109. });
  3110. } else if (isPlainObject(props)) {
  3111. // {title:{type:String,default:''},content:String}
  3112. Object.keys(props).forEach(function (key) {
  3113. var opts = props[key];
  3114. if (isPlainObject(opts)) {
  3115. // title:{type:String,default:''}
  3116. var value = opts.default;
  3117. if (isFn(value)) {
  3118. value = value();
  3119. }
  3120. opts.type = parsePropType(key, opts.type);
  3121. properties[key] = {
  3122. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  3123. value: value,
  3124. observer: createObserver(key)
  3125. };
  3126. } else {
  3127. // content:String
  3128. var type = parsePropType(key, opts);
  3129. properties[key] = {
  3130. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  3131. observer: createObserver(key)
  3132. };
  3133. }
  3134. });
  3135. }
  3136. return properties;
  3137. }
  3138. function wrapper$1(event) {
  3139. // TODO 又得兼容 mpvue 的 mp 对象
  3140. try {
  3141. event.mp = JSON.parse(JSON.stringify(event));
  3142. } catch (e) {}
  3143. event.stopPropagation = noop;
  3144. event.preventDefault = noop;
  3145. event.target = event.target || {};
  3146. if (!hasOwn(event, 'detail')) {
  3147. event.detail = {};
  3148. }
  3149. if (hasOwn(event, 'markerId')) {
  3150. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  3151. event.detail.markerId = event.markerId;
  3152. }
  3153. if (isPlainObject(event.detail)) {
  3154. event.target = Object.assign({}, event.target, event.detail);
  3155. }
  3156. return event;
  3157. }
  3158. function getExtraValue(vm, dataPathsArray) {
  3159. var context = vm;
  3160. dataPathsArray.forEach(function (dataPathArray) {
  3161. var dataPath = dataPathArray[0];
  3162. var value = dataPathArray[2];
  3163. if (dataPath || typeof value !== 'undefined') {
  3164. // ['','',index,'disable']
  3165. var propPath = dataPathArray[1];
  3166. var valuePath = dataPathArray[3];
  3167. var vFor;
  3168. if (Number.isInteger(dataPath)) {
  3169. vFor = dataPath;
  3170. } else if (!dataPath) {
  3171. vFor = context;
  3172. } else if (typeof dataPath === 'string' && dataPath) {
  3173. if (dataPath.indexOf('#s#') === 0) {
  3174. vFor = dataPath.substr(3);
  3175. } else {
  3176. vFor = vm.__get_value(dataPath, context);
  3177. }
  3178. }
  3179. if (Number.isInteger(vFor)) {
  3180. context = value;
  3181. } else if (!propPath) {
  3182. context = vFor[value];
  3183. } else {
  3184. if (Array.isArray(vFor)) {
  3185. context = vFor.find(function (vForItem) {
  3186. return vm.__get_value(propPath, vForItem) === value;
  3187. });
  3188. } else if (isPlainObject(vFor)) {
  3189. context = Object.keys(vFor).find(function (vForKey) {
  3190. return vm.__get_value(propPath, vFor[vForKey]) === value;
  3191. });
  3192. } else {
  3193. console.error('v-for 暂不支持循环数据:', vFor);
  3194. }
  3195. }
  3196. if (valuePath) {
  3197. context = vm.__get_value(valuePath, context);
  3198. }
  3199. }
  3200. });
  3201. return context;
  3202. }
  3203. function processEventExtra(vm, extra, event, __args__) {
  3204. var extraObj = {};
  3205. if (Array.isArray(extra) && extra.length) {
  3206. /**
  3207. *[
  3208. * ['data.items', 'data.id', item.data.id],
  3209. * ['metas', 'id', meta.id]
  3210. *],
  3211. *[
  3212. * ['data.items', 'data.id', item.data.id],
  3213. * ['metas', 'id', meta.id]
  3214. *],
  3215. *'test'
  3216. */
  3217. extra.forEach(function (dataPath, index) {
  3218. if (typeof dataPath === 'string') {
  3219. if (!dataPath) {
  3220. // model,prop.sync
  3221. extraObj['$' + index] = vm;
  3222. } else {
  3223. if (dataPath === '$event') {
  3224. // $event
  3225. extraObj['$' + index] = event;
  3226. } else if (dataPath === 'arguments') {
  3227. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  3228. } else if (dataPath.indexOf('$event.') === 0) {
  3229. // $event.target.value
  3230. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  3231. } else {
  3232. extraObj['$' + index] = vm.__get_value(dataPath);
  3233. }
  3234. }
  3235. } else {
  3236. extraObj['$' + index] = getExtraValue(vm, dataPath);
  3237. }
  3238. });
  3239. }
  3240. return extraObj;
  3241. }
  3242. function getObjByArray(arr) {
  3243. var obj = {};
  3244. for (var i = 1; i < arr.length; i++) {
  3245. var element = arr[i];
  3246. obj[element[0]] = element[1];
  3247. }
  3248. return obj;
  3249. }
  3250. function processEventArgs(vm, event) {
  3251. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3252. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  3253. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  3254. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  3255. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  3256. // fixed 用户直接触发 mpInstance.triggerEvent
  3257. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  3258. if (isCustom) {
  3259. // 自定义事件
  3260. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  3261. if (!args.length) {
  3262. // 无参数,直接传入 event 或 detail 数组
  3263. if (isCustomMPEvent) {
  3264. return [event];
  3265. }
  3266. return __args__;
  3267. }
  3268. }
  3269. var extraObj = processEventExtra(vm, extra, event, __args__);
  3270. var ret = [];
  3271. args.forEach(function (arg) {
  3272. if (arg === '$event') {
  3273. if (methodName === '__set_model' && !isCustom) {
  3274. // input v-model value
  3275. ret.push(event.target.value);
  3276. } else {
  3277. if (isCustom && !isCustomMPEvent) {
  3278. ret.push(__args__[0]);
  3279. } else {
  3280. // wxcomponent 组件或内置组件
  3281. ret.push(event);
  3282. }
  3283. }
  3284. } else {
  3285. if (Array.isArray(arg) && arg[0] === 'o') {
  3286. ret.push(getObjByArray(arg));
  3287. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  3288. ret.push(extraObj[arg]);
  3289. } else {
  3290. ret.push(arg);
  3291. }
  3292. }
  3293. });
  3294. return ret;
  3295. }
  3296. var ONCE = '~';
  3297. var CUSTOM = '^';
  3298. function isMatchEventType(eventType, optType) {
  3299. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  3300. }
  3301. function getContextVm(vm) {
  3302. var $parent = vm.$parent;
  3303. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  3304. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  3305. $parent = $parent.$parent;
  3306. }
  3307. return $parent && $parent.$parent;
  3308. }
  3309. function handleEvent(event) {
  3310. var _this2 = this;
  3311. event = wrapper$1(event);
  3312. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  3313. var dataset = (event.currentTarget || event.target).dataset;
  3314. if (!dataset) {
  3315. return console.warn('事件信息不存在');
  3316. }
  3317. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  3318. if (!eventOpts) {
  3319. return console.warn('事件信息不存在');
  3320. }
  3321. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  3322. var eventType = event.type;
  3323. var ret = [];
  3324. eventOpts.forEach(function (eventOpt) {
  3325. var type = eventOpt[0];
  3326. var eventsArray = eventOpt[1];
  3327. var isCustom = type.charAt(0) === CUSTOM;
  3328. type = isCustom ? type.slice(1) : type;
  3329. var isOnce = type.charAt(0) === ONCE;
  3330. type = isOnce ? type.slice(1) : type;
  3331. if (eventsArray && isMatchEventType(eventType, type)) {
  3332. eventsArray.forEach(function (eventArray) {
  3333. var methodName = eventArray[0];
  3334. if (methodName) {
  3335. var handlerCtx = _this2.$vm;
  3336. if (handlerCtx.$options.generic) {
  3337. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  3338. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  3339. }
  3340. if (methodName === '$emit') {
  3341. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  3342. return;
  3343. }
  3344. var handler = handlerCtx[methodName];
  3345. if (!isFn(handler)) {
  3346. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  3347. var path = _this2.route || _this2.is;
  3348. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  3349. }
  3350. if (isOnce) {
  3351. if (handler.once) {
  3352. return;
  3353. }
  3354. handler.once = true;
  3355. }
  3356. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  3357. params = Array.isArray(params) ? params : [];
  3358. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  3359. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  3360. // eslint-disable-next-line no-sparse-arrays
  3361. params = params.concat([,,,,,,,,,, event]);
  3362. }
  3363. ret.push(handler.apply(handlerCtx, params));
  3364. }
  3365. });
  3366. }
  3367. });
  3368. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  3369. return ret[0];
  3370. }
  3371. }
  3372. var eventChannels = {};
  3373. function getEventChannel(id) {
  3374. var eventChannel = eventChannels[id];
  3375. delete eventChannels[id];
  3376. return eventChannel;
  3377. }
  3378. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  3379. function initEventChannel() {
  3380. _vue.default.prototype.getOpenerEventChannel = function () {
  3381. // 微信小程序使用自身getOpenerEventChannel
  3382. {
  3383. return this.$scope.getOpenerEventChannel();
  3384. }
  3385. };
  3386. var callHook = _vue.default.prototype.__call_hook;
  3387. _vue.default.prototype.__call_hook = function (hook, args) {
  3388. if (hook === 'onLoad' && args && args.__id__) {
  3389. this.__eventChannel__ = getEventChannel(args.__id__);
  3390. delete args.__id__;
  3391. }
  3392. return callHook.call(this, hook, args);
  3393. };
  3394. }
  3395. function initScopedSlotsParams() {
  3396. var center = {};
  3397. var parents = {};
  3398. function currentId(fn) {
  3399. var vueIds = this.$options.propsData.vueId;
  3400. if (vueIds) {
  3401. var vueId = vueIds.split(',')[0];
  3402. fn(vueId);
  3403. }
  3404. }
  3405. _vue.default.prototype.$hasSSP = function (vueId) {
  3406. var slot = center[vueId];
  3407. if (!slot) {
  3408. parents[vueId] = this;
  3409. this.$on('hook:destroyed', function () {
  3410. delete parents[vueId];
  3411. });
  3412. }
  3413. return slot;
  3414. };
  3415. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  3416. var slot = center[vueId];
  3417. if (slot) {
  3418. var params = slot[name] || [];
  3419. if (needAll) {
  3420. return params;
  3421. }
  3422. return params[0];
  3423. }
  3424. };
  3425. _vue.default.prototype.$setSSP = function (name, value) {
  3426. var index = 0;
  3427. currentId.call(this, function (vueId) {
  3428. var slot = center[vueId];
  3429. var params = slot[name] = slot[name] || [];
  3430. params.push(value);
  3431. index = params.length - 1;
  3432. });
  3433. return index;
  3434. };
  3435. _vue.default.prototype.$initSSP = function () {
  3436. currentId.call(this, function (vueId) {
  3437. center[vueId] = {};
  3438. });
  3439. };
  3440. _vue.default.prototype.$callSSP = function () {
  3441. currentId.call(this, function (vueId) {
  3442. if (parents[vueId]) {
  3443. parents[vueId].$forceUpdate();
  3444. }
  3445. });
  3446. };
  3447. _vue.default.mixin({
  3448. destroyed: function destroyed() {
  3449. var propsData = this.$options.propsData;
  3450. var vueId = propsData && propsData.vueId;
  3451. if (vueId) {
  3452. delete center[vueId];
  3453. delete parents[vueId];
  3454. }
  3455. }
  3456. });
  3457. }
  3458. function parseBaseApp(vm, _ref4) {
  3459. var mocks = _ref4.mocks,
  3460. initRefs = _ref4.initRefs;
  3461. initEventChannel();
  3462. {
  3463. initScopedSlotsParams();
  3464. }
  3465. if (vm.$options.store) {
  3466. _vue.default.prototype.$store = vm.$options.store;
  3467. }
  3468. uniIdMixin(_vue.default);
  3469. _vue.default.prototype.mpHost = "mp-weixin";
  3470. _vue.default.mixin({
  3471. beforeCreate: function beforeCreate() {
  3472. if (!this.$options.mpType) {
  3473. return;
  3474. }
  3475. this.mpType = this.$options.mpType;
  3476. this.$mp = (0, _defineProperty2.default)({
  3477. data: {}
  3478. }, this.mpType, this.$options.mpInstance);
  3479. this.$scope = this.$options.mpInstance;
  3480. delete this.$options.mpType;
  3481. delete this.$options.mpInstance;
  3482. if (this.mpType === 'page' && typeof getApp === 'function') {
  3483. // hack vue-i18n
  3484. var app = getApp();
  3485. if (app.$vm && app.$vm.$i18n) {
  3486. this._i18n = app.$vm.$i18n;
  3487. }
  3488. }
  3489. if (this.mpType !== 'app') {
  3490. initRefs(this);
  3491. initMocks(this, mocks);
  3492. }
  3493. }
  3494. });
  3495. var appOptions = {
  3496. onLaunch: function onLaunch(args) {
  3497. if (this.$vm) {
  3498. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  3499. return;
  3500. }
  3501. {
  3502. if (wx.canIUse && !wx.canIUse('nextTick')) {
  3503. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  3504. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  3505. }
  3506. }
  3507. this.$vm = vm;
  3508. this.$vm.$mp = {
  3509. app: this
  3510. };
  3511. this.$vm.$scope = this;
  3512. // vm 上也挂载 globalData
  3513. this.$vm.globalData = this.globalData;
  3514. this.$vm._isMounted = true;
  3515. this.$vm.__call_hook('mounted', args);
  3516. this.$vm.__call_hook('onLaunch', args);
  3517. }
  3518. };
  3519. // 兼容旧版本 globalData
  3520. appOptions.globalData = vm.$options.globalData || {};
  3521. // 将 methods 中的方法挂在 getApp() 中
  3522. var methods = vm.$options.methods;
  3523. if (methods) {
  3524. Object.keys(methods).forEach(function (name) {
  3525. appOptions[name] = methods[name];
  3526. });
  3527. }
  3528. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  3529. initHooks(appOptions, hooks);
  3530. initUnknownHooks(appOptions, vm.$options);
  3531. return appOptions;
  3532. }
  3533. function parseApp(vm) {
  3534. return parseBaseApp(vm, {
  3535. mocks: mocks,
  3536. initRefs: initRefs
  3537. });
  3538. }
  3539. function createApp(vm) {
  3540. App(parseApp(vm));
  3541. return vm;
  3542. }
  3543. var encodeReserveRE = /[!'()*]/g;
  3544. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  3545. return '%' + c.charCodeAt(0).toString(16);
  3546. };
  3547. var commaRE = /%2C/g;
  3548. // fixed encodeURIComponent which is more conformant to RFC3986:
  3549. // - escapes [!'()*]
  3550. // - preserve commas
  3551. var encode = function encode(str) {
  3552. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  3553. };
  3554. function stringifyQuery(obj) {
  3555. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  3556. var res = obj ? Object.keys(obj).map(function (key) {
  3557. var val = obj[key];
  3558. if (val === undefined) {
  3559. return '';
  3560. }
  3561. if (val === null) {
  3562. return encodeStr(key);
  3563. }
  3564. if (Array.isArray(val)) {
  3565. var result = [];
  3566. val.forEach(function (val2) {
  3567. if (val2 === undefined) {
  3568. return;
  3569. }
  3570. if (val2 === null) {
  3571. result.push(encodeStr(key));
  3572. } else {
  3573. result.push(encodeStr(key) + '=' + encodeStr(val2));
  3574. }
  3575. });
  3576. return result.join('&');
  3577. }
  3578. return encodeStr(key) + '=' + encodeStr(val);
  3579. }).filter(function (x) {
  3580. return x.length > 0;
  3581. }).join('&') : null;
  3582. return res ? "?".concat(res) : '';
  3583. }
  3584. function parseBaseComponent(vueComponentOptions) {
  3585. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  3586. isPage = _ref5.isPage,
  3587. initRelation = _ref5.initRelation;
  3588. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  3589. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  3590. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  3591. VueComponent = _initVueComponent2[0],
  3592. vueOptions = _initVueComponent2[1];
  3593. var options = _objectSpread({
  3594. multipleSlots: true,
  3595. // styleIsolation: 'apply-shared',
  3596. addGlobalClass: true
  3597. }, vueOptions.options || {});
  3598. {
  3599. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  3600. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  3601. Object.assign(options, vueOptions['mp-weixin'].options);
  3602. }
  3603. }
  3604. var componentOptions = {
  3605. options: options,
  3606. data: initData(vueOptions, _vue.default.prototype),
  3607. behaviors: initBehaviors(vueOptions, initBehavior),
  3608. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  3609. lifetimes: {
  3610. attached: function attached() {
  3611. var properties = this.properties;
  3612. var options = {
  3613. mpType: isPage.call(this) ? 'page' : 'component',
  3614. mpInstance: this,
  3615. propsData: properties
  3616. };
  3617. initVueIds(properties.vueId, this);
  3618. // 处理父子关系
  3619. initRelation.call(this, {
  3620. vuePid: this._$vuePid,
  3621. vueOptions: options
  3622. });
  3623. // 初始化 vue 实例
  3624. this.$vm = new VueComponent(options);
  3625. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  3626. initSlots(this.$vm, properties.vueSlots);
  3627. // 触发首次 setData
  3628. this.$vm.$mount();
  3629. },
  3630. ready: function ready() {
  3631. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  3632. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  3633. if (this.$vm) {
  3634. this.$vm._isMounted = true;
  3635. this.$vm.__call_hook('mounted');
  3636. this.$vm.__call_hook('onReady');
  3637. }
  3638. },
  3639. detached: function detached() {
  3640. this.$vm && this.$vm.$destroy();
  3641. }
  3642. },
  3643. pageLifetimes: {
  3644. show: function show(args) {
  3645. this.$vm && this.$vm.__call_hook('onPageShow', args);
  3646. },
  3647. hide: function hide() {
  3648. this.$vm && this.$vm.__call_hook('onPageHide');
  3649. },
  3650. resize: function resize(size) {
  3651. this.$vm && this.$vm.__call_hook('onPageResize', size);
  3652. }
  3653. },
  3654. methods: {
  3655. __l: handleLink,
  3656. __e: handleEvent
  3657. }
  3658. };
  3659. // externalClasses
  3660. if (vueOptions.externalClasses) {
  3661. componentOptions.externalClasses = vueOptions.externalClasses;
  3662. }
  3663. if (Array.isArray(vueOptions.wxsCallMethods)) {
  3664. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  3665. componentOptions.methods[callMethod] = function (args) {
  3666. return this.$vm[callMethod](args);
  3667. };
  3668. });
  3669. }
  3670. if (needVueOptions) {
  3671. return [componentOptions, vueOptions, VueComponent];
  3672. }
  3673. if (isPage) {
  3674. return componentOptions;
  3675. }
  3676. return [componentOptions, VueComponent];
  3677. }
  3678. function parseComponent(vueComponentOptions, needVueOptions) {
  3679. return parseBaseComponent(vueComponentOptions, {
  3680. isPage: isPage,
  3681. initRelation: initRelation
  3682. }, needVueOptions);
  3683. }
  3684. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  3685. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  3686. function parseBasePage(vuePageOptions) {
  3687. var _parseComponent = parseComponent(vuePageOptions, true),
  3688. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  3689. pageOptions = _parseComponent2[0],
  3690. vueOptions = _parseComponent2[1];
  3691. initHooks(pageOptions.methods, hooks$1, vueOptions);
  3692. pageOptions.methods.onLoad = function (query) {
  3693. this.options = query;
  3694. var copyQuery = Object.assign({}, query);
  3695. delete copyQuery.__id__;
  3696. this.$page = {
  3697. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  3698. };
  3699. this.$vm.$mp.query = query; // 兼容 mpvue
  3700. this.$vm.__call_hook('onLoad', query);
  3701. };
  3702. {
  3703. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  3704. }
  3705. {
  3706. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  3707. }
  3708. return pageOptions;
  3709. }
  3710. function parsePage(vuePageOptions) {
  3711. return parseBasePage(vuePageOptions);
  3712. }
  3713. function createPage(vuePageOptions) {
  3714. {
  3715. return Component(parsePage(vuePageOptions));
  3716. }
  3717. }
  3718. function createComponent(vueOptions) {
  3719. {
  3720. return Component(parseComponent(vueOptions));
  3721. }
  3722. }
  3723. function createSubpackageApp(vm) {
  3724. var appOptions = parseApp(vm);
  3725. var app = getApp({
  3726. allowDefault: true
  3727. });
  3728. vm.$scope = app;
  3729. var globalData = app.globalData;
  3730. if (globalData) {
  3731. Object.keys(appOptions.globalData).forEach(function (name) {
  3732. if (!hasOwn(globalData, name)) {
  3733. globalData[name] = appOptions.globalData[name];
  3734. }
  3735. });
  3736. }
  3737. Object.keys(appOptions).forEach(function (name) {
  3738. if (!hasOwn(app, name)) {
  3739. app[name] = appOptions[name];
  3740. }
  3741. });
  3742. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3743. wx.onAppShow(function () {
  3744. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  3745. args[_key5] = arguments[_key5];
  3746. }
  3747. vm.__call_hook('onShow', args);
  3748. });
  3749. }
  3750. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3751. wx.onAppHide(function () {
  3752. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  3753. args[_key6] = arguments[_key6];
  3754. }
  3755. vm.__call_hook('onHide', args);
  3756. });
  3757. }
  3758. if (isFn(appOptions.onLaunch)) {
  3759. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3760. vm.__call_hook('onLaunch', args);
  3761. }
  3762. return vm;
  3763. }
  3764. function createPlugin(vm) {
  3765. var appOptions = parseApp(vm);
  3766. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3767. wx.onAppShow(function () {
  3768. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  3769. args[_key7] = arguments[_key7];
  3770. }
  3771. vm.__call_hook('onShow', args);
  3772. });
  3773. }
  3774. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3775. wx.onAppHide(function () {
  3776. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  3777. args[_key8] = arguments[_key8];
  3778. }
  3779. vm.__call_hook('onHide', args);
  3780. });
  3781. }
  3782. if (isFn(appOptions.onLaunch)) {
  3783. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3784. vm.__call_hook('onLaunch', args);
  3785. }
  3786. return vm;
  3787. }
  3788. todos.forEach(function (todoApi) {
  3789. protocols[todoApi] = false;
  3790. });
  3791. canIUses.forEach(function (canIUseApi) {
  3792. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  3793. if (!wx.canIUse(apiName)) {
  3794. protocols[canIUseApi] = false;
  3795. }
  3796. });
  3797. var uni = {};
  3798. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  3799. uni = new Proxy({}, {
  3800. get: function get(target, name) {
  3801. if (hasOwn(target, name)) {
  3802. return target[name];
  3803. }
  3804. if (baseApi[name]) {
  3805. return baseApi[name];
  3806. }
  3807. if (api[name]) {
  3808. return promisify(name, api[name]);
  3809. }
  3810. {
  3811. if (extraApi[name]) {
  3812. return promisify(name, extraApi[name]);
  3813. }
  3814. if (todoApis[name]) {
  3815. return promisify(name, todoApis[name]);
  3816. }
  3817. }
  3818. if (eventApi[name]) {
  3819. return eventApi[name];
  3820. }
  3821. return promisify(name, wrapper(name, wx[name]));
  3822. },
  3823. set: function set(target, name, value) {
  3824. target[name] = value;
  3825. return true;
  3826. }
  3827. });
  3828. } else {
  3829. Object.keys(baseApi).forEach(function (name) {
  3830. uni[name] = baseApi[name];
  3831. });
  3832. {
  3833. Object.keys(todoApis).forEach(function (name) {
  3834. uni[name] = promisify(name, todoApis[name]);
  3835. });
  3836. Object.keys(extraApi).forEach(function (name) {
  3837. uni[name] = promisify(name, extraApi[name]);
  3838. });
  3839. }
  3840. Object.keys(eventApi).forEach(function (name) {
  3841. uni[name] = eventApi[name];
  3842. });
  3843. Object.keys(api).forEach(function (name) {
  3844. uni[name] = promisify(name, api[name]);
  3845. });
  3846. Object.keys(wx).forEach(function (name) {
  3847. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  3848. uni[name] = promisify(name, wrapper(name, wx[name]));
  3849. }
  3850. });
  3851. }
  3852. wx.createApp = createApp;
  3853. wx.createPage = createPage;
  3854. wx.createComponent = createComponent;
  3855. wx.createSubpackageApp = createSubpackageApp;
  3856. wx.createPlugin = createPlugin;
  3857. var uni$1 = uni;
  3858. var _default = uni$1;
  3859. exports.default = _default;
  3860. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3861. /***/ }),
  3862. /***/ 20:
  3863. /*!****************************************************************!*\
  3864. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  3865. \****************************************************************/
  3866. /*! no static exports found */
  3867. /***/ (function(module, exports) {
  3868. function _iterableToArray(iter) {
  3869. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  3870. }
  3871. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3872. /***/ }),
  3873. /***/ 21:
  3874. /*!******************************************************************!*\
  3875. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  3876. \******************************************************************/
  3877. /*! no static exports found */
  3878. /***/ (function(module, exports) {
  3879. function _nonIterableSpread() {
  3880. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  3881. }
  3882. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3883. /***/ }),
  3884. /***/ 211:
  3885. /*!*****************************************************************************************************************!*\
  3886. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js ***!
  3887. \*****************************************************************************************************************/
  3888. /*! no static exports found */
  3889. /***/ (function(module, exports, __webpack_require__) {
  3890. "use strict";
  3891. Object.defineProperty(exports, "__esModule", {
  3892. value: true
  3893. });
  3894. exports.default = void 0;
  3895. var mpMixins = {};
  3896. var is_pc = null;
  3897. mpMixins = {
  3898. data: function data() {
  3899. return {
  3900. is_show: 'none'
  3901. };
  3902. },
  3903. watch: {
  3904. show: function show(newVal) {
  3905. this.is_show = this.show;
  3906. }
  3907. },
  3908. created: function created() {
  3909. this.swipeaction = this.getSwipeAction();
  3910. if (this.swipeaction.children !== undefined) {
  3911. this.swipeaction.children.push(this);
  3912. }
  3913. },
  3914. mounted: function mounted() {
  3915. this.is_show = this.show;
  3916. },
  3917. methods: {
  3918. // wxs 中调用
  3919. closeSwipe: function closeSwipe(e) {
  3920. if (!this.autoClose) return;
  3921. this.swipeaction.closeOther(this);
  3922. },
  3923. change: function change(e) {
  3924. this.$emit('change', e.open);
  3925. if (this.is_show !== e.open) {
  3926. this.is_show = e.open;
  3927. }
  3928. },
  3929. appTouchStart: function appTouchStart(e) {
  3930. if (is_pc) return;
  3931. var clientX = e.changedTouches[0].clientX;
  3932. this.clientX = clientX;
  3933. this.timestamp = new Date().getTime();
  3934. },
  3935. appTouchEnd: function appTouchEnd(e, index, item, position) {
  3936. if (is_pc) return;
  3937. var clientX = e.changedTouches[0].clientX;
  3938. // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
  3939. var diff = Math.abs(this.clientX - clientX);
  3940. var time = new Date().getTime() - this.timestamp;
  3941. if (diff < 40 && time < 300) {
  3942. this.$emit('click', {
  3943. content: item,
  3944. index: index,
  3945. position: position
  3946. });
  3947. }
  3948. },
  3949. onClickForPC: function onClickForPC(index, item, position) {
  3950. if (!is_pc) return;
  3951. }
  3952. }
  3953. };
  3954. var _default = mpMixins;
  3955. exports.default = _default;
  3956. /***/ }),
  3957. /***/ 212:
  3958. /*!********************************************************************************************************************!*\
  3959. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js ***!
  3960. \********************************************************************************************************************/
  3961. /*! no static exports found */
  3962. /***/ (function(module, exports, __webpack_require__) {
  3963. "use strict";
  3964. Object.defineProperty(exports, "__esModule", {
  3965. value: true
  3966. });
  3967. exports.default = void 0;
  3968. var bindIngXMixins = {};
  3969. var _default = bindIngXMixins;
  3970. exports.default = _default;
  3971. /***/ }),
  3972. /***/ 213:
  3973. /*!*******************************************************************************************************************!*\
  3974. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js ***!
  3975. \*******************************************************************************************************************/
  3976. /*! no static exports found */
  3977. /***/ (function(module, exports, __webpack_require__) {
  3978. "use strict";
  3979. Object.defineProperty(exports, "__esModule", {
  3980. value: true
  3981. });
  3982. exports.default = void 0;
  3983. var otherMixins = {};
  3984. var _default = otherMixins;
  3985. exports.default = _default;
  3986. /***/ }),
  3987. /***/ 22:
  3988. /*!*************************************************************!*\
  3989. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  3990. \*************************************************************/
  3991. /*! no static exports found */
  3992. /***/ (function(module, exports, __webpack_require__) {
  3993. "use strict";
  3994. /* WEBPACK VAR INJECTION */(function(uni, global) {
  3995. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  3996. Object.defineProperty(exports, "__esModule", {
  3997. value: true
  3998. });
  3999. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  4000. exports.compileI18nJsonStr = compileI18nJsonStr;
  4001. exports.hasI18nJson = hasI18nJson;
  4002. exports.initVueI18n = initVueI18n;
  4003. exports.isI18nStr = isI18nStr;
  4004. exports.isString = void 0;
  4005. exports.normalizeLocale = normalizeLocale;
  4006. exports.parseI18nJson = parseI18nJson;
  4007. exports.resolveLocale = resolveLocale;
  4008. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  4009. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  4010. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  4011. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  4012. var isObject = function isObject(val) {
  4013. return val !== null && (0, _typeof2.default)(val) === 'object';
  4014. };
  4015. var defaultDelimiters = ['{', '}'];
  4016. var BaseFormatter = /*#__PURE__*/function () {
  4017. function BaseFormatter() {
  4018. (0, _classCallCheck2.default)(this, BaseFormatter);
  4019. this._caches = Object.create(null);
  4020. }
  4021. (0, _createClass2.default)(BaseFormatter, [{
  4022. key: "interpolate",
  4023. value: function interpolate(message, values) {
  4024. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  4025. if (!values) {
  4026. return [message];
  4027. }
  4028. var tokens = this._caches[message];
  4029. if (!tokens) {
  4030. tokens = parse(message, delimiters);
  4031. this._caches[message] = tokens;
  4032. }
  4033. return compile(tokens, values);
  4034. }
  4035. }]);
  4036. return BaseFormatter;
  4037. }();
  4038. exports.Formatter = BaseFormatter;
  4039. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  4040. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  4041. function parse(format, _ref) {
  4042. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  4043. startDelimiter = _ref2[0],
  4044. endDelimiter = _ref2[1];
  4045. var tokens = [];
  4046. var position = 0;
  4047. var text = '';
  4048. while (position < format.length) {
  4049. var char = format[position++];
  4050. if (char === startDelimiter) {
  4051. if (text) {
  4052. tokens.push({
  4053. type: 'text',
  4054. value: text
  4055. });
  4056. }
  4057. text = '';
  4058. var sub = '';
  4059. char = format[position++];
  4060. while (char !== undefined && char !== endDelimiter) {
  4061. sub += char;
  4062. char = format[position++];
  4063. }
  4064. var isClosed = char === endDelimiter;
  4065. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  4066. tokens.push({
  4067. value: sub,
  4068. type: type
  4069. });
  4070. }
  4071. // else if (char === '%') {
  4072. // // when found rails i18n syntax, skip text capture
  4073. // if (format[position] !== '{') {
  4074. // text += char
  4075. // }
  4076. // }
  4077. else {
  4078. text += char;
  4079. }
  4080. }
  4081. text && tokens.push({
  4082. type: 'text',
  4083. value: text
  4084. });
  4085. return tokens;
  4086. }
  4087. function compile(tokens, values) {
  4088. var compiled = [];
  4089. var index = 0;
  4090. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  4091. if (mode === 'unknown') {
  4092. return compiled;
  4093. }
  4094. while (index < tokens.length) {
  4095. var token = tokens[index];
  4096. switch (token.type) {
  4097. case 'text':
  4098. compiled.push(token.value);
  4099. break;
  4100. case 'list':
  4101. compiled.push(values[parseInt(token.value, 10)]);
  4102. break;
  4103. case 'named':
  4104. if (mode === 'named') {
  4105. compiled.push(values[token.value]);
  4106. } else {
  4107. if (true) {
  4108. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  4109. }
  4110. }
  4111. break;
  4112. case 'unknown':
  4113. if (true) {
  4114. console.warn("Detect 'unknown' type of token!");
  4115. }
  4116. break;
  4117. }
  4118. index++;
  4119. }
  4120. return compiled;
  4121. }
  4122. var LOCALE_ZH_HANS = 'zh-Hans';
  4123. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  4124. var LOCALE_ZH_HANT = 'zh-Hant';
  4125. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  4126. var LOCALE_EN = 'en';
  4127. exports.LOCALE_EN = LOCALE_EN;
  4128. var LOCALE_FR = 'fr';
  4129. exports.LOCALE_FR = LOCALE_FR;
  4130. var LOCALE_ES = 'es';
  4131. exports.LOCALE_ES = LOCALE_ES;
  4132. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4133. var hasOwn = function hasOwn(val, key) {
  4134. return hasOwnProperty.call(val, key);
  4135. };
  4136. var defaultFormatter = new BaseFormatter();
  4137. function include(str, parts) {
  4138. return !!parts.find(function (part) {
  4139. return str.indexOf(part) !== -1;
  4140. });
  4141. }
  4142. function startsWith(str, parts) {
  4143. return parts.find(function (part) {
  4144. return str.indexOf(part) === 0;
  4145. });
  4146. }
  4147. function normalizeLocale(locale, messages) {
  4148. if (!locale) {
  4149. return;
  4150. }
  4151. locale = locale.trim().replace(/_/g, '-');
  4152. if (messages && messages[locale]) {
  4153. return locale;
  4154. }
  4155. locale = locale.toLowerCase();
  4156. if (locale === 'chinese') {
  4157. // 支付宝
  4158. return LOCALE_ZH_HANS;
  4159. }
  4160. if (locale.indexOf('zh') === 0) {
  4161. if (locale.indexOf('-hans') > -1) {
  4162. return LOCALE_ZH_HANS;
  4163. }
  4164. if (locale.indexOf('-hant') > -1) {
  4165. return LOCALE_ZH_HANT;
  4166. }
  4167. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  4168. return LOCALE_ZH_HANT;
  4169. }
  4170. return LOCALE_ZH_HANS;
  4171. }
  4172. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  4173. if (messages && Object.keys(messages).length > 0) {
  4174. locales = Object.keys(messages);
  4175. }
  4176. var lang = startsWith(locale, locales);
  4177. if (lang) {
  4178. return lang;
  4179. }
  4180. }
  4181. var I18n = /*#__PURE__*/function () {
  4182. function I18n(_ref3) {
  4183. var locale = _ref3.locale,
  4184. fallbackLocale = _ref3.fallbackLocale,
  4185. messages = _ref3.messages,
  4186. watcher = _ref3.watcher,
  4187. formater = _ref3.formater;
  4188. (0, _classCallCheck2.default)(this, I18n);
  4189. this.locale = LOCALE_EN;
  4190. this.fallbackLocale = LOCALE_EN;
  4191. this.message = {};
  4192. this.messages = {};
  4193. this.watchers = [];
  4194. if (fallbackLocale) {
  4195. this.fallbackLocale = fallbackLocale;
  4196. }
  4197. this.formater = formater || defaultFormatter;
  4198. this.messages = messages || {};
  4199. this.setLocale(locale || LOCALE_EN);
  4200. if (watcher) {
  4201. this.watchLocale(watcher);
  4202. }
  4203. }
  4204. (0, _createClass2.default)(I18n, [{
  4205. key: "setLocale",
  4206. value: function setLocale(locale) {
  4207. var _this = this;
  4208. var oldLocale = this.locale;
  4209. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  4210. if (!this.messages[this.locale]) {
  4211. // 可能初始化时不存在
  4212. this.messages[this.locale] = {};
  4213. }
  4214. this.message = this.messages[this.locale];
  4215. // 仅发生变化时,通知
  4216. if (oldLocale !== this.locale) {
  4217. this.watchers.forEach(function (watcher) {
  4218. watcher(_this.locale, oldLocale);
  4219. });
  4220. }
  4221. }
  4222. }, {
  4223. key: "getLocale",
  4224. value: function getLocale() {
  4225. return this.locale;
  4226. }
  4227. }, {
  4228. key: "watchLocale",
  4229. value: function watchLocale(fn) {
  4230. var _this2 = this;
  4231. var index = this.watchers.push(fn) - 1;
  4232. return function () {
  4233. _this2.watchers.splice(index, 1);
  4234. };
  4235. }
  4236. }, {
  4237. key: "add",
  4238. value: function add(locale, message) {
  4239. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4240. var curMessages = this.messages[locale];
  4241. if (curMessages) {
  4242. if (override) {
  4243. Object.assign(curMessages, message);
  4244. } else {
  4245. Object.keys(message).forEach(function (key) {
  4246. if (!hasOwn(curMessages, key)) {
  4247. curMessages[key] = message[key];
  4248. }
  4249. });
  4250. }
  4251. } else {
  4252. this.messages[locale] = message;
  4253. }
  4254. }
  4255. }, {
  4256. key: "f",
  4257. value: function f(message, values, delimiters) {
  4258. return this.formater.interpolate(message, values, delimiters).join('');
  4259. }
  4260. }, {
  4261. key: "t",
  4262. value: function t(key, locale, values) {
  4263. var message = this.message;
  4264. if (typeof locale === 'string') {
  4265. locale = normalizeLocale(locale, this.messages);
  4266. locale && (message = this.messages[locale]);
  4267. } else {
  4268. values = locale;
  4269. }
  4270. if (!hasOwn(message, key)) {
  4271. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  4272. return key;
  4273. }
  4274. return this.formater.interpolate(message[key], values).join('');
  4275. }
  4276. }]);
  4277. return I18n;
  4278. }();
  4279. exports.I18n = I18n;
  4280. function watchAppLocale(appVm, i18n) {
  4281. // 需要保证 watch 的触发在组件渲染之前
  4282. if (appVm.$watchLocale) {
  4283. // vue2
  4284. appVm.$watchLocale(function (newLocale) {
  4285. i18n.setLocale(newLocale);
  4286. });
  4287. } else {
  4288. appVm.$watch(function () {
  4289. return appVm.$locale;
  4290. }, function (newLocale) {
  4291. i18n.setLocale(newLocale);
  4292. });
  4293. }
  4294. }
  4295. function getDefaultLocale() {
  4296. if (typeof uni !== 'undefined' && uni.getLocale) {
  4297. return uni.getLocale();
  4298. }
  4299. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  4300. if (typeof global !== 'undefined' && global.getLocale) {
  4301. return global.getLocale();
  4302. }
  4303. return LOCALE_EN;
  4304. }
  4305. function initVueI18n(locale) {
  4306. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4307. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  4308. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  4309. // 兼容旧版本入参
  4310. if (typeof locale !== 'string') {
  4311. var _ref4 = [messages, locale];
  4312. locale = _ref4[0];
  4313. messages = _ref4[1];
  4314. }
  4315. if (typeof locale !== 'string') {
  4316. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  4317. locale = getDefaultLocale();
  4318. }
  4319. if (typeof fallbackLocale !== 'string') {
  4320. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  4321. }
  4322. var i18n = new I18n({
  4323. locale: locale,
  4324. fallbackLocale: fallbackLocale,
  4325. messages: messages,
  4326. watcher: watcher
  4327. });
  4328. var _t = function t(key, values) {
  4329. if (typeof getApp !== 'function') {
  4330. // app view
  4331. /* eslint-disable no-func-assign */
  4332. _t = function t(key, values) {
  4333. return i18n.t(key, values);
  4334. };
  4335. } else {
  4336. var isWatchedAppLocale = false;
  4337. _t = function t(key, values) {
  4338. var appVm = getApp().$vm;
  4339. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  4340. // options: {
  4341. // type: Array,
  4342. // default () {
  4343. // return [{
  4344. // icon: 'shop',
  4345. // text: t("uni-goods-nav.options.shop"),
  4346. // }, {
  4347. // icon: 'cart',
  4348. // text: t("uni-goods-nav.options.cart")
  4349. // }]
  4350. // }
  4351. // },
  4352. if (appVm) {
  4353. // 触发响应式
  4354. appVm.$locale;
  4355. if (!isWatchedAppLocale) {
  4356. isWatchedAppLocale = true;
  4357. watchAppLocale(appVm, i18n);
  4358. }
  4359. }
  4360. return i18n.t(key, values);
  4361. };
  4362. }
  4363. return _t(key, values);
  4364. };
  4365. return {
  4366. i18n: i18n,
  4367. f: function f(message, values, delimiters) {
  4368. return i18n.f(message, values, delimiters);
  4369. },
  4370. t: function t(key, values) {
  4371. return _t(key, values);
  4372. },
  4373. add: function add(locale, message) {
  4374. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4375. return i18n.add(locale, message, override);
  4376. },
  4377. watch: function watch(fn) {
  4378. return i18n.watchLocale(fn);
  4379. },
  4380. getLocale: function getLocale() {
  4381. return i18n.getLocale();
  4382. },
  4383. setLocale: function setLocale(newLocale) {
  4384. return i18n.setLocale(newLocale);
  4385. }
  4386. };
  4387. }
  4388. var isString = function isString(val) {
  4389. return typeof val === 'string';
  4390. };
  4391. exports.isString = isString;
  4392. var formater;
  4393. function hasI18nJson(jsonObj, delimiters) {
  4394. if (!formater) {
  4395. formater = new BaseFormatter();
  4396. }
  4397. return walkJsonObj(jsonObj, function (jsonObj, key) {
  4398. var value = jsonObj[key];
  4399. if (isString(value)) {
  4400. if (isI18nStr(value, delimiters)) {
  4401. return true;
  4402. }
  4403. } else {
  4404. return hasI18nJson(value, delimiters);
  4405. }
  4406. });
  4407. }
  4408. function parseI18nJson(jsonObj, values, delimiters) {
  4409. if (!formater) {
  4410. formater = new BaseFormatter();
  4411. }
  4412. walkJsonObj(jsonObj, function (jsonObj, key) {
  4413. var value = jsonObj[key];
  4414. if (isString(value)) {
  4415. if (isI18nStr(value, delimiters)) {
  4416. jsonObj[key] = compileStr(value, values, delimiters);
  4417. }
  4418. } else {
  4419. parseI18nJson(value, values, delimiters);
  4420. }
  4421. });
  4422. return jsonObj;
  4423. }
  4424. function compileI18nJsonStr(jsonStr, _ref5) {
  4425. var locale = _ref5.locale,
  4426. locales = _ref5.locales,
  4427. delimiters = _ref5.delimiters;
  4428. if (!isI18nStr(jsonStr, delimiters)) {
  4429. return jsonStr;
  4430. }
  4431. if (!formater) {
  4432. formater = new BaseFormatter();
  4433. }
  4434. var localeValues = [];
  4435. Object.keys(locales).forEach(function (name) {
  4436. if (name !== locale) {
  4437. localeValues.push({
  4438. locale: name,
  4439. values: locales[name]
  4440. });
  4441. }
  4442. });
  4443. localeValues.unshift({
  4444. locale: locale,
  4445. values: locales[locale]
  4446. });
  4447. try {
  4448. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  4449. } catch (e) {}
  4450. return jsonStr;
  4451. }
  4452. function isI18nStr(value, delimiters) {
  4453. return value.indexOf(delimiters[0]) > -1;
  4454. }
  4455. function compileStr(value, values, delimiters) {
  4456. return formater.interpolate(value, values, delimiters).join('');
  4457. }
  4458. function compileValue(jsonObj, key, localeValues, delimiters) {
  4459. var value = jsonObj[key];
  4460. if (isString(value)) {
  4461. // 存在国际化
  4462. if (isI18nStr(value, delimiters)) {
  4463. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  4464. if (localeValues.length > 1) {
  4465. // 格式化国际化语言
  4466. var valueLocales = jsonObj[key + 'Locales'] = {};
  4467. localeValues.forEach(function (localValue) {
  4468. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  4469. });
  4470. }
  4471. }
  4472. } else {
  4473. compileJsonObj(value, localeValues, delimiters);
  4474. }
  4475. }
  4476. function compileJsonObj(jsonObj, localeValues, delimiters) {
  4477. walkJsonObj(jsonObj, function (jsonObj, key) {
  4478. compileValue(jsonObj, key, localeValues, delimiters);
  4479. });
  4480. return jsonObj;
  4481. }
  4482. function walkJsonObj(jsonObj, walk) {
  4483. if (Array.isArray(jsonObj)) {
  4484. for (var i = 0; i < jsonObj.length; i++) {
  4485. if (walk(jsonObj, i)) {
  4486. return true;
  4487. }
  4488. }
  4489. } else if (isObject(jsonObj)) {
  4490. for (var key in jsonObj) {
  4491. if (walk(jsonObj, key)) {
  4492. return true;
  4493. }
  4494. }
  4495. }
  4496. return false;
  4497. }
  4498. function resolveLocale(locales) {
  4499. return function (locale) {
  4500. if (!locale) {
  4501. return locale;
  4502. }
  4503. locale = normalizeLocale(locale) || locale;
  4504. return resolveLocaleChain(locale).find(function (locale) {
  4505. return locales.indexOf(locale) > -1;
  4506. });
  4507. };
  4508. }
  4509. function resolveLocaleChain(locale) {
  4510. var chain = [];
  4511. var tokens = locale.split('-');
  4512. while (tokens.length) {
  4513. chain.push(tokens.join('-'));
  4514. tokens.pop();
  4515. }
  4516. return chain;
  4517. }
  4518. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  4519. /***/ }),
  4520. /***/ 23:
  4521. /*!***************************************************************!*\
  4522. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4523. \***************************************************************/
  4524. /*! no static exports found */
  4525. /***/ (function(module, exports) {
  4526. function _classCallCheck(instance, Constructor) {
  4527. if (!(instance instanceof Constructor)) {
  4528. throw new TypeError("Cannot call a class as a function");
  4529. }
  4530. }
  4531. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4532. /***/ }),
  4533. /***/ 24:
  4534. /*!************************************************************!*\
  4535. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4536. \************************************************************/
  4537. /*! no static exports found */
  4538. /***/ (function(module, exports, __webpack_require__) {
  4539. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4540. function _defineProperties(target, props) {
  4541. for (var i = 0; i < props.length; i++) {
  4542. var descriptor = props[i];
  4543. descriptor.enumerable = descriptor.enumerable || false;
  4544. descriptor.configurable = true;
  4545. if ("value" in descriptor) descriptor.writable = true;
  4546. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4547. }
  4548. }
  4549. function _createClass(Constructor, protoProps, staticProps) {
  4550. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4551. if (staticProps) _defineProperties(Constructor, staticProps);
  4552. Object.defineProperty(Constructor, "prototype", {
  4553. writable: false
  4554. });
  4555. return Constructor;
  4556. }
  4557. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4558. /***/ }),
  4559. /***/ 25:
  4560. /*!******************************************************************************************!*\
  4561. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4562. \******************************************************************************************/
  4563. /*! exports provided: default */
  4564. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4565. "use strict";
  4566. __webpack_require__.r(__webpack_exports__);
  4567. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4568. * Vue.js v2.6.11
  4569. * (c) 2014-2023 Evan You
  4570. * Released under the MIT License.
  4571. */
  4572. /* */
  4573. var emptyObject = Object.freeze({});
  4574. // These helpers produce better VM code in JS engines due to their
  4575. // explicitness and function inlining.
  4576. function isUndef (v) {
  4577. return v === undefined || v === null
  4578. }
  4579. function isDef (v) {
  4580. return v !== undefined && v !== null
  4581. }
  4582. function isTrue (v) {
  4583. return v === true
  4584. }
  4585. function isFalse (v) {
  4586. return v === false
  4587. }
  4588. /**
  4589. * Check if value is primitive.
  4590. */
  4591. function isPrimitive (value) {
  4592. return (
  4593. typeof value === 'string' ||
  4594. typeof value === 'number' ||
  4595. // $flow-disable-line
  4596. typeof value === 'symbol' ||
  4597. typeof value === 'boolean'
  4598. )
  4599. }
  4600. /**
  4601. * Quick object check - this is primarily used to tell
  4602. * Objects from primitive values when we know the value
  4603. * is a JSON-compliant type.
  4604. */
  4605. function isObject (obj) {
  4606. return obj !== null && typeof obj === 'object'
  4607. }
  4608. /**
  4609. * Get the raw type string of a value, e.g., [object Object].
  4610. */
  4611. var _toString = Object.prototype.toString;
  4612. function toRawType (value) {
  4613. return _toString.call(value).slice(8, -1)
  4614. }
  4615. /**
  4616. * Strict object type check. Only returns true
  4617. * for plain JavaScript objects.
  4618. */
  4619. function isPlainObject (obj) {
  4620. return _toString.call(obj) === '[object Object]'
  4621. }
  4622. function isRegExp (v) {
  4623. return _toString.call(v) === '[object RegExp]'
  4624. }
  4625. /**
  4626. * Check if val is a valid array index.
  4627. */
  4628. function isValidArrayIndex (val) {
  4629. var n = parseFloat(String(val));
  4630. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4631. }
  4632. function isPromise (val) {
  4633. return (
  4634. isDef(val) &&
  4635. typeof val.then === 'function' &&
  4636. typeof val.catch === 'function'
  4637. )
  4638. }
  4639. /**
  4640. * Convert a value to a string that is actually rendered.
  4641. */
  4642. function toString (val) {
  4643. return val == null
  4644. ? ''
  4645. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4646. ? JSON.stringify(val, null, 2)
  4647. : String(val)
  4648. }
  4649. /**
  4650. * Convert an input value to a number for persistence.
  4651. * If the conversion fails, return original string.
  4652. */
  4653. function toNumber (val) {
  4654. var n = parseFloat(val);
  4655. return isNaN(n) ? val : n
  4656. }
  4657. /**
  4658. * Make a map and return a function for checking if a key
  4659. * is in that map.
  4660. */
  4661. function makeMap (
  4662. str,
  4663. expectsLowerCase
  4664. ) {
  4665. var map = Object.create(null);
  4666. var list = str.split(',');
  4667. for (var i = 0; i < list.length; i++) {
  4668. map[list[i]] = true;
  4669. }
  4670. return expectsLowerCase
  4671. ? function (val) { return map[val.toLowerCase()]; }
  4672. : function (val) { return map[val]; }
  4673. }
  4674. /**
  4675. * Check if a tag is a built-in tag.
  4676. */
  4677. var isBuiltInTag = makeMap('slot,component', true);
  4678. /**
  4679. * Check if an attribute is a reserved attribute.
  4680. */
  4681. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4682. /**
  4683. * Remove an item from an array.
  4684. */
  4685. function remove (arr, item) {
  4686. if (arr.length) {
  4687. var index = arr.indexOf(item);
  4688. if (index > -1) {
  4689. return arr.splice(index, 1)
  4690. }
  4691. }
  4692. }
  4693. /**
  4694. * Check whether an object has the property.
  4695. */
  4696. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4697. function hasOwn (obj, key) {
  4698. return hasOwnProperty.call(obj, key)
  4699. }
  4700. /**
  4701. * Create a cached version of a pure function.
  4702. */
  4703. function cached (fn) {
  4704. var cache = Object.create(null);
  4705. return (function cachedFn (str) {
  4706. var hit = cache[str];
  4707. return hit || (cache[str] = fn(str))
  4708. })
  4709. }
  4710. /**
  4711. * Camelize a hyphen-delimited string.
  4712. */
  4713. var camelizeRE = /-(\w)/g;
  4714. var camelize = cached(function (str) {
  4715. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4716. });
  4717. /**
  4718. * Capitalize a string.
  4719. */
  4720. var capitalize = cached(function (str) {
  4721. return str.charAt(0).toUpperCase() + str.slice(1)
  4722. });
  4723. /**
  4724. * Hyphenate a camelCase string.
  4725. */
  4726. var hyphenateRE = /\B([A-Z])/g;
  4727. var hyphenate = cached(function (str) {
  4728. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4729. });
  4730. /**
  4731. * Simple bind polyfill for environments that do not support it,
  4732. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4733. * since native bind is now performant enough in most browsers.
  4734. * But removing it would mean breaking code that was able to run in
  4735. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4736. */
  4737. /* istanbul ignore next */
  4738. function polyfillBind (fn, ctx) {
  4739. function boundFn (a) {
  4740. var l = arguments.length;
  4741. return l
  4742. ? l > 1
  4743. ? fn.apply(ctx, arguments)
  4744. : fn.call(ctx, a)
  4745. : fn.call(ctx)
  4746. }
  4747. boundFn._length = fn.length;
  4748. return boundFn
  4749. }
  4750. function nativeBind (fn, ctx) {
  4751. return fn.bind(ctx)
  4752. }
  4753. var bind = Function.prototype.bind
  4754. ? nativeBind
  4755. : polyfillBind;
  4756. /**
  4757. * Convert an Array-like object to a real Array.
  4758. */
  4759. function toArray (list, start) {
  4760. start = start || 0;
  4761. var i = list.length - start;
  4762. var ret = new Array(i);
  4763. while (i--) {
  4764. ret[i] = list[i + start];
  4765. }
  4766. return ret
  4767. }
  4768. /**
  4769. * Mix properties into target object.
  4770. */
  4771. function extend (to, _from) {
  4772. for (var key in _from) {
  4773. to[key] = _from[key];
  4774. }
  4775. return to
  4776. }
  4777. /**
  4778. * Merge an Array of Objects into a single Object.
  4779. */
  4780. function toObject (arr) {
  4781. var res = {};
  4782. for (var i = 0; i < arr.length; i++) {
  4783. if (arr[i]) {
  4784. extend(res, arr[i]);
  4785. }
  4786. }
  4787. return res
  4788. }
  4789. /* eslint-disable no-unused-vars */
  4790. /**
  4791. * Perform no operation.
  4792. * Stubbing args to make Flow happy without leaving useless transpiled code
  4793. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4794. */
  4795. function noop (a, b, c) {}
  4796. /**
  4797. * Always return false.
  4798. */
  4799. var no = function (a, b, c) { return false; };
  4800. /* eslint-enable no-unused-vars */
  4801. /**
  4802. * Return the same value.
  4803. */
  4804. var identity = function (_) { return _; };
  4805. /**
  4806. * Check if two values are loosely equal - that is,
  4807. * if they are plain objects, do they have the same shape?
  4808. */
  4809. function looseEqual (a, b) {
  4810. if (a === b) { return true }
  4811. var isObjectA = isObject(a);
  4812. var isObjectB = isObject(b);
  4813. if (isObjectA && isObjectB) {
  4814. try {
  4815. var isArrayA = Array.isArray(a);
  4816. var isArrayB = Array.isArray(b);
  4817. if (isArrayA && isArrayB) {
  4818. return a.length === b.length && a.every(function (e, i) {
  4819. return looseEqual(e, b[i])
  4820. })
  4821. } else if (a instanceof Date && b instanceof Date) {
  4822. return a.getTime() === b.getTime()
  4823. } else if (!isArrayA && !isArrayB) {
  4824. var keysA = Object.keys(a);
  4825. var keysB = Object.keys(b);
  4826. return keysA.length === keysB.length && keysA.every(function (key) {
  4827. return looseEqual(a[key], b[key])
  4828. })
  4829. } else {
  4830. /* istanbul ignore next */
  4831. return false
  4832. }
  4833. } catch (e) {
  4834. /* istanbul ignore next */
  4835. return false
  4836. }
  4837. } else if (!isObjectA && !isObjectB) {
  4838. return String(a) === String(b)
  4839. } else {
  4840. return false
  4841. }
  4842. }
  4843. /**
  4844. * Return the first index at which a loosely equal value can be
  4845. * found in the array (if value is a plain object, the array must
  4846. * contain an object of the same shape), or -1 if it is not present.
  4847. */
  4848. function looseIndexOf (arr, val) {
  4849. for (var i = 0; i < arr.length; i++) {
  4850. if (looseEqual(arr[i], val)) { return i }
  4851. }
  4852. return -1
  4853. }
  4854. /**
  4855. * Ensure a function is called only once.
  4856. */
  4857. function once (fn) {
  4858. var called = false;
  4859. return function () {
  4860. if (!called) {
  4861. called = true;
  4862. fn.apply(this, arguments);
  4863. }
  4864. }
  4865. }
  4866. var ASSET_TYPES = [
  4867. 'component',
  4868. 'directive',
  4869. 'filter'
  4870. ];
  4871. var LIFECYCLE_HOOKS = [
  4872. 'beforeCreate',
  4873. 'created',
  4874. 'beforeMount',
  4875. 'mounted',
  4876. 'beforeUpdate',
  4877. 'updated',
  4878. 'beforeDestroy',
  4879. 'destroyed',
  4880. 'activated',
  4881. 'deactivated',
  4882. 'errorCaptured',
  4883. 'serverPrefetch'
  4884. ];
  4885. /* */
  4886. var config = ({
  4887. /**
  4888. * Option merge strategies (used in core/util/options)
  4889. */
  4890. // $flow-disable-line
  4891. optionMergeStrategies: Object.create(null),
  4892. /**
  4893. * Whether to suppress warnings.
  4894. */
  4895. silent: false,
  4896. /**
  4897. * Show production mode tip message on boot?
  4898. */
  4899. productionTip: "development" !== 'production',
  4900. /**
  4901. * Whether to enable devtools
  4902. */
  4903. devtools: "development" !== 'production',
  4904. /**
  4905. * Whether to record perf
  4906. */
  4907. performance: false,
  4908. /**
  4909. * Error handler for watcher errors
  4910. */
  4911. errorHandler: null,
  4912. /**
  4913. * Warn handler for watcher warns
  4914. */
  4915. warnHandler: null,
  4916. /**
  4917. * Ignore certain custom elements
  4918. */
  4919. ignoredElements: [],
  4920. /**
  4921. * Custom user key aliases for v-on
  4922. */
  4923. // $flow-disable-line
  4924. keyCodes: Object.create(null),
  4925. /**
  4926. * Check if a tag is reserved so that it cannot be registered as a
  4927. * component. This is platform-dependent and may be overwritten.
  4928. */
  4929. isReservedTag: no,
  4930. /**
  4931. * Check if an attribute is reserved so that it cannot be used as a component
  4932. * prop. This is platform-dependent and may be overwritten.
  4933. */
  4934. isReservedAttr: no,
  4935. /**
  4936. * Check if a tag is an unknown element.
  4937. * Platform-dependent.
  4938. */
  4939. isUnknownElement: no,
  4940. /**
  4941. * Get the namespace of an element
  4942. */
  4943. getTagNamespace: noop,
  4944. /**
  4945. * Parse the real tag name for the specific platform.
  4946. */
  4947. parsePlatformTagName: identity,
  4948. /**
  4949. * Check if an attribute must be bound using property, e.g. value
  4950. * Platform-dependent.
  4951. */
  4952. mustUseProp: no,
  4953. /**
  4954. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4955. * This will significantly reduce performance if set to false.
  4956. */
  4957. async: true,
  4958. /**
  4959. * Exposed for legacy reasons
  4960. */
  4961. _lifecycleHooks: LIFECYCLE_HOOKS
  4962. });
  4963. /* */
  4964. /**
  4965. * unicode letters used for parsing html tags, component names and property paths.
  4966. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4967. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4968. */
  4969. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  4970. /**
  4971. * Check if a string starts with $ or _
  4972. */
  4973. function isReserved (str) {
  4974. var c = (str + '').charCodeAt(0);
  4975. return c === 0x24 || c === 0x5F
  4976. }
  4977. /**
  4978. * Define a property.
  4979. */
  4980. function def (obj, key, val, enumerable) {
  4981. Object.defineProperty(obj, key, {
  4982. value: val,
  4983. enumerable: !!enumerable,
  4984. writable: true,
  4985. configurable: true
  4986. });
  4987. }
  4988. /**
  4989. * Parse simple path.
  4990. */
  4991. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4992. function parsePath (path) {
  4993. if (bailRE.test(path)) {
  4994. return
  4995. }
  4996. var segments = path.split('.');
  4997. return function (obj) {
  4998. for (var i = 0; i < segments.length; i++) {
  4999. if (!obj) { return }
  5000. obj = obj[segments[i]];
  5001. }
  5002. return obj
  5003. }
  5004. }
  5005. /* */
  5006. // can we use __proto__?
  5007. var hasProto = '__proto__' in {};
  5008. // Browser environment sniffing
  5009. var inBrowser = typeof window !== 'undefined';
  5010. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5011. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5012. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5013. var isIE = UA && /msie|trident/.test(UA);
  5014. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5015. var isEdge = UA && UA.indexOf('edge/') > 0;
  5016. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5017. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5018. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5019. var isPhantomJS = UA && /phantomjs/.test(UA);
  5020. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5021. // Firefox has a "watch" function on Object.prototype...
  5022. var nativeWatch = ({}).watch;
  5023. if (inBrowser) {
  5024. try {
  5025. var opts = {};
  5026. Object.defineProperty(opts, 'passive', ({
  5027. get: function get () {
  5028. }
  5029. })); // https://github.com/facebook/flow/issues/285
  5030. window.addEventListener('test-passive', null, opts);
  5031. } catch (e) {}
  5032. }
  5033. // this needs to be lazy-evaled because vue may be required before
  5034. // vue-server-renderer can set VUE_ENV
  5035. var _isServer;
  5036. var isServerRendering = function () {
  5037. if (_isServer === undefined) {
  5038. /* istanbul ignore if */
  5039. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5040. // detect presence of vue-server-renderer and avoid
  5041. // Webpack shimming the process
  5042. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5043. } else {
  5044. _isServer = false;
  5045. }
  5046. }
  5047. return _isServer
  5048. };
  5049. // detect devtools
  5050. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5051. /* istanbul ignore next */
  5052. function isNative (Ctor) {
  5053. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5054. }
  5055. var hasSymbol =
  5056. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5057. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5058. var _Set;
  5059. /* istanbul ignore if */ // $flow-disable-line
  5060. if (typeof Set !== 'undefined' && isNative(Set)) {
  5061. // use native Set when available.
  5062. _Set = Set;
  5063. } else {
  5064. // a non-standard Set polyfill that only works with primitive keys.
  5065. _Set = /*@__PURE__*/(function () {
  5066. function Set () {
  5067. this.set = Object.create(null);
  5068. }
  5069. Set.prototype.has = function has (key) {
  5070. return this.set[key] === true
  5071. };
  5072. Set.prototype.add = function add (key) {
  5073. this.set[key] = true;
  5074. };
  5075. Set.prototype.clear = function clear () {
  5076. this.set = Object.create(null);
  5077. };
  5078. return Set;
  5079. }());
  5080. }
  5081. /* */
  5082. var warn = noop;
  5083. var tip = noop;
  5084. var generateComponentTrace = (noop); // work around flow check
  5085. var formatComponentName = (noop);
  5086. if (true) {
  5087. var hasConsole = typeof console !== 'undefined';
  5088. var classifyRE = /(?:^|[-_])(\w)/g;
  5089. var classify = function (str) { return str
  5090. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5091. .replace(/[-_]/g, ''); };
  5092. warn = function (msg, vm) {
  5093. var trace = vm ? generateComponentTrace(vm) : '';
  5094. if (config.warnHandler) {
  5095. config.warnHandler.call(null, msg, vm, trace);
  5096. } else if (hasConsole && (!config.silent)) {
  5097. console.error(("[Vue warn]: " + msg + trace));
  5098. }
  5099. };
  5100. tip = function (msg, vm) {
  5101. if (hasConsole && (!config.silent)) {
  5102. console.warn("[Vue tip]: " + msg + (
  5103. vm ? generateComponentTrace(vm) : ''
  5104. ));
  5105. }
  5106. };
  5107. formatComponentName = function (vm, includeFile) {
  5108. if (vm.$root === vm) {
  5109. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5110. return ('') + vm.$options.__file
  5111. }
  5112. return '<Root>'
  5113. }
  5114. var options = typeof vm === 'function' && vm.cid != null
  5115. ? vm.options
  5116. : vm._isVue
  5117. ? vm.$options || vm.constructor.options
  5118. : vm;
  5119. var name = options.name || options._componentTag;
  5120. var file = options.__file;
  5121. if (!name && file) {
  5122. var match = file.match(/([^/\\]+)\.vue$/);
  5123. name = match && match[1];
  5124. }
  5125. return (
  5126. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5127. (file && includeFile !== false ? (" at " + file) : '')
  5128. )
  5129. };
  5130. var repeat = function (str, n) {
  5131. var res = '';
  5132. while (n) {
  5133. if (n % 2 === 1) { res += str; }
  5134. if (n > 1) { str += str; }
  5135. n >>= 1;
  5136. }
  5137. return res
  5138. };
  5139. generateComponentTrace = function (vm) {
  5140. if (vm._isVue && vm.$parent) {
  5141. var tree = [];
  5142. var currentRecursiveSequence = 0;
  5143. while (vm && vm.$options.name !== 'PageBody') {
  5144. if (tree.length > 0) {
  5145. var last = tree[tree.length - 1];
  5146. if (last.constructor === vm.constructor) {
  5147. currentRecursiveSequence++;
  5148. vm = vm.$parent;
  5149. continue
  5150. } else if (currentRecursiveSequence > 0) {
  5151. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5152. currentRecursiveSequence = 0;
  5153. }
  5154. }
  5155. !vm.$options.isReserved && tree.push(vm);
  5156. vm = vm.$parent;
  5157. }
  5158. return '\n\nfound in\n\n' + tree
  5159. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5160. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5161. : formatComponentName(vm))); })
  5162. .join('\n')
  5163. } else {
  5164. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5165. }
  5166. };
  5167. }
  5168. /* */
  5169. var uid = 0;
  5170. /**
  5171. * A dep is an observable that can have multiple
  5172. * directives subscribing to it.
  5173. */
  5174. var Dep = function Dep () {
  5175. this.id = uid++;
  5176. this.subs = [];
  5177. };
  5178. Dep.prototype.addSub = function addSub (sub) {
  5179. this.subs.push(sub);
  5180. };
  5181. Dep.prototype.removeSub = function removeSub (sub) {
  5182. remove(this.subs, sub);
  5183. };
  5184. Dep.prototype.depend = function depend () {
  5185. if (Dep.SharedObject.target) {
  5186. Dep.SharedObject.target.addDep(this);
  5187. }
  5188. };
  5189. Dep.prototype.notify = function notify () {
  5190. // stabilize the subscriber list first
  5191. var subs = this.subs.slice();
  5192. if ( true && !config.async) {
  5193. // subs aren't sorted in scheduler if not running async
  5194. // we need to sort them now to make sure they fire in correct
  5195. // order
  5196. subs.sort(function (a, b) { return a.id - b.id; });
  5197. }
  5198. for (var i = 0, l = subs.length; i < l; i++) {
  5199. subs[i].update();
  5200. }
  5201. };
  5202. // The current target watcher being evaluated.
  5203. // This is globally unique because only one watcher
  5204. // can be evaluated at a time.
  5205. // fixed by xxxxxx (nvue shared vuex)
  5206. /* eslint-disable no-undef */
  5207. Dep.SharedObject = {};
  5208. Dep.SharedObject.target = null;
  5209. Dep.SharedObject.targetStack = [];
  5210. function pushTarget (target) {
  5211. Dep.SharedObject.targetStack.push(target);
  5212. Dep.SharedObject.target = target;
  5213. Dep.target = target;
  5214. }
  5215. function popTarget () {
  5216. Dep.SharedObject.targetStack.pop();
  5217. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5218. Dep.target = Dep.SharedObject.target;
  5219. }
  5220. /* */
  5221. var VNode = function VNode (
  5222. tag,
  5223. data,
  5224. children,
  5225. text,
  5226. elm,
  5227. context,
  5228. componentOptions,
  5229. asyncFactory
  5230. ) {
  5231. this.tag = tag;
  5232. this.data = data;
  5233. this.children = children;
  5234. this.text = text;
  5235. this.elm = elm;
  5236. this.ns = undefined;
  5237. this.context = context;
  5238. this.fnContext = undefined;
  5239. this.fnOptions = undefined;
  5240. this.fnScopeId = undefined;
  5241. this.key = data && data.key;
  5242. this.componentOptions = componentOptions;
  5243. this.componentInstance = undefined;
  5244. this.parent = undefined;
  5245. this.raw = false;
  5246. this.isStatic = false;
  5247. this.isRootInsert = true;
  5248. this.isComment = false;
  5249. this.isCloned = false;
  5250. this.isOnce = false;
  5251. this.asyncFactory = asyncFactory;
  5252. this.asyncMeta = undefined;
  5253. this.isAsyncPlaceholder = false;
  5254. };
  5255. var prototypeAccessors = { child: { configurable: true } };
  5256. // DEPRECATED: alias for componentInstance for backwards compat.
  5257. /* istanbul ignore next */
  5258. prototypeAccessors.child.get = function () {
  5259. return this.componentInstance
  5260. };
  5261. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5262. var createEmptyVNode = function (text) {
  5263. if ( text === void 0 ) text = '';
  5264. var node = new VNode();
  5265. node.text = text;
  5266. node.isComment = true;
  5267. return node
  5268. };
  5269. function createTextVNode (val) {
  5270. return new VNode(undefined, undefined, undefined, String(val))
  5271. }
  5272. // optimized shallow clone
  5273. // used for static nodes and slot nodes because they may be reused across
  5274. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5275. // on their elm reference.
  5276. function cloneVNode (vnode) {
  5277. var cloned = new VNode(
  5278. vnode.tag,
  5279. vnode.data,
  5280. // #7975
  5281. // clone children array to avoid mutating original in case of cloning
  5282. // a child.
  5283. vnode.children && vnode.children.slice(),
  5284. vnode.text,
  5285. vnode.elm,
  5286. vnode.context,
  5287. vnode.componentOptions,
  5288. vnode.asyncFactory
  5289. );
  5290. cloned.ns = vnode.ns;
  5291. cloned.isStatic = vnode.isStatic;
  5292. cloned.key = vnode.key;
  5293. cloned.isComment = vnode.isComment;
  5294. cloned.fnContext = vnode.fnContext;
  5295. cloned.fnOptions = vnode.fnOptions;
  5296. cloned.fnScopeId = vnode.fnScopeId;
  5297. cloned.asyncMeta = vnode.asyncMeta;
  5298. cloned.isCloned = true;
  5299. return cloned
  5300. }
  5301. /*
  5302. * not type checking this file because flow doesn't play well with
  5303. * dynamically accessing methods on Array prototype
  5304. */
  5305. var arrayProto = Array.prototype;
  5306. var arrayMethods = Object.create(arrayProto);
  5307. var methodsToPatch = [
  5308. 'push',
  5309. 'pop',
  5310. 'shift',
  5311. 'unshift',
  5312. 'splice',
  5313. 'sort',
  5314. 'reverse'
  5315. ];
  5316. /**
  5317. * Intercept mutating methods and emit events
  5318. */
  5319. methodsToPatch.forEach(function (method) {
  5320. // cache original method
  5321. var original = arrayProto[method];
  5322. def(arrayMethods, method, function mutator () {
  5323. var args = [], len = arguments.length;
  5324. while ( len-- ) args[ len ] = arguments[ len ];
  5325. var result = original.apply(this, args);
  5326. var ob = this.__ob__;
  5327. var inserted;
  5328. switch (method) {
  5329. case 'push':
  5330. case 'unshift':
  5331. inserted = args;
  5332. break
  5333. case 'splice':
  5334. inserted = args.slice(2);
  5335. break
  5336. }
  5337. if (inserted) { ob.observeArray(inserted); }
  5338. // notify change
  5339. ob.dep.notify();
  5340. return result
  5341. });
  5342. });
  5343. /* */
  5344. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5345. /**
  5346. * In some cases we may want to disable observation inside a component's
  5347. * update computation.
  5348. */
  5349. var shouldObserve = true;
  5350. function toggleObserving (value) {
  5351. shouldObserve = value;
  5352. }
  5353. /**
  5354. * Observer class that is attached to each observed
  5355. * object. Once attached, the observer converts the target
  5356. * object's property keys into getter/setters that
  5357. * collect dependencies and dispatch updates.
  5358. */
  5359. var Observer = function Observer (value) {
  5360. this.value = value;
  5361. this.dep = new Dep();
  5362. this.vmCount = 0;
  5363. def(value, '__ob__', this);
  5364. if (Array.isArray(value)) {
  5365. if (hasProto) {
  5366. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5367. if(value.push !== value.__proto__.push){
  5368. copyAugment(value, arrayMethods, arrayKeys);
  5369. } else {
  5370. protoAugment(value, arrayMethods);
  5371. }
  5372. }
  5373. } else {
  5374. copyAugment(value, arrayMethods, arrayKeys);
  5375. }
  5376. this.observeArray(value);
  5377. } else {
  5378. this.walk(value);
  5379. }
  5380. };
  5381. /**
  5382. * Walk through all properties and convert them into
  5383. * getter/setters. This method should only be called when
  5384. * value type is Object.
  5385. */
  5386. Observer.prototype.walk = function walk (obj) {
  5387. var keys = Object.keys(obj);
  5388. for (var i = 0; i < keys.length; i++) {
  5389. defineReactive$$1(obj, keys[i]);
  5390. }
  5391. };
  5392. /**
  5393. * Observe a list of Array items.
  5394. */
  5395. Observer.prototype.observeArray = function observeArray (items) {
  5396. for (var i = 0, l = items.length; i < l; i++) {
  5397. observe(items[i]);
  5398. }
  5399. };
  5400. // helpers
  5401. /**
  5402. * Augment a target Object or Array by intercepting
  5403. * the prototype chain using __proto__
  5404. */
  5405. function protoAugment (target, src) {
  5406. /* eslint-disable no-proto */
  5407. target.__proto__ = src;
  5408. /* eslint-enable no-proto */
  5409. }
  5410. /**
  5411. * Augment a target Object or Array by defining
  5412. * hidden properties.
  5413. */
  5414. /* istanbul ignore next */
  5415. function copyAugment (target, src, keys) {
  5416. for (var i = 0, l = keys.length; i < l; i++) {
  5417. var key = keys[i];
  5418. def(target, key, src[key]);
  5419. }
  5420. }
  5421. /**
  5422. * Attempt to create an observer instance for a value,
  5423. * returns the new observer if successfully observed,
  5424. * or the existing observer if the value already has one.
  5425. */
  5426. function observe (value, asRootData) {
  5427. if (!isObject(value) || value instanceof VNode) {
  5428. return
  5429. }
  5430. var ob;
  5431. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5432. ob = value.__ob__;
  5433. } else if (
  5434. shouldObserve &&
  5435. !isServerRendering() &&
  5436. (Array.isArray(value) || isPlainObject(value)) &&
  5437. Object.isExtensible(value) &&
  5438. !value._isVue &&
  5439. !value.__v_isMPComponent
  5440. ) {
  5441. ob = new Observer(value);
  5442. }
  5443. if (asRootData && ob) {
  5444. ob.vmCount++;
  5445. }
  5446. return ob
  5447. }
  5448. /**
  5449. * Define a reactive property on an Object.
  5450. */
  5451. function defineReactive$$1 (
  5452. obj,
  5453. key,
  5454. val,
  5455. customSetter,
  5456. shallow
  5457. ) {
  5458. var dep = new Dep();
  5459. var property = Object.getOwnPropertyDescriptor(obj, key);
  5460. if (property && property.configurable === false) {
  5461. return
  5462. }
  5463. // cater for pre-defined getter/setters
  5464. var getter = property && property.get;
  5465. var setter = property && property.set;
  5466. if ((!getter || setter) && arguments.length === 2) {
  5467. val = obj[key];
  5468. }
  5469. var childOb = !shallow && observe(val);
  5470. Object.defineProperty(obj, key, {
  5471. enumerable: true,
  5472. configurable: true,
  5473. get: function reactiveGetter () {
  5474. var value = getter ? getter.call(obj) : val;
  5475. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5476. dep.depend();
  5477. if (childOb) {
  5478. childOb.dep.depend();
  5479. if (Array.isArray(value)) {
  5480. dependArray(value);
  5481. }
  5482. }
  5483. }
  5484. return value
  5485. },
  5486. set: function reactiveSetter (newVal) {
  5487. var value = getter ? getter.call(obj) : val;
  5488. /* eslint-disable no-self-compare */
  5489. if (newVal === value || (newVal !== newVal && value !== value)) {
  5490. return
  5491. }
  5492. /* eslint-enable no-self-compare */
  5493. if ( true && customSetter) {
  5494. customSetter();
  5495. }
  5496. // #7981: for accessor properties without setter
  5497. if (getter && !setter) { return }
  5498. if (setter) {
  5499. setter.call(obj, newVal);
  5500. } else {
  5501. val = newVal;
  5502. }
  5503. childOb = !shallow && observe(newVal);
  5504. dep.notify();
  5505. }
  5506. });
  5507. }
  5508. /**
  5509. * Set a property on an object. Adds the new property and
  5510. * triggers change notification if the property doesn't
  5511. * already exist.
  5512. */
  5513. function set (target, key, val) {
  5514. if ( true &&
  5515. (isUndef(target) || isPrimitive(target))
  5516. ) {
  5517. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5518. }
  5519. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5520. target.length = Math.max(target.length, key);
  5521. target.splice(key, 1, val);
  5522. return val
  5523. }
  5524. if (key in target && !(key in Object.prototype)) {
  5525. target[key] = val;
  5526. return val
  5527. }
  5528. var ob = (target).__ob__;
  5529. if (target._isVue || (ob && ob.vmCount)) {
  5530. true && warn(
  5531. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5532. 'at runtime - declare it upfront in the data option.'
  5533. );
  5534. return val
  5535. }
  5536. if (!ob) {
  5537. target[key] = val;
  5538. return val
  5539. }
  5540. defineReactive$$1(ob.value, key, val);
  5541. ob.dep.notify();
  5542. return val
  5543. }
  5544. /**
  5545. * Delete a property and trigger change if necessary.
  5546. */
  5547. function del (target, key) {
  5548. if ( true &&
  5549. (isUndef(target) || isPrimitive(target))
  5550. ) {
  5551. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5552. }
  5553. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5554. target.splice(key, 1);
  5555. return
  5556. }
  5557. var ob = (target).__ob__;
  5558. if (target._isVue || (ob && ob.vmCount)) {
  5559. true && warn(
  5560. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5561. '- just set it to null.'
  5562. );
  5563. return
  5564. }
  5565. if (!hasOwn(target, key)) {
  5566. return
  5567. }
  5568. delete target[key];
  5569. if (!ob) {
  5570. return
  5571. }
  5572. ob.dep.notify();
  5573. }
  5574. /**
  5575. * Collect dependencies on array elements when the array is touched, since
  5576. * we cannot intercept array element access like property getters.
  5577. */
  5578. function dependArray (value) {
  5579. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5580. e = value[i];
  5581. e && e.__ob__ && e.__ob__.dep.depend();
  5582. if (Array.isArray(e)) {
  5583. dependArray(e);
  5584. }
  5585. }
  5586. }
  5587. /* */
  5588. /**
  5589. * Option overwriting strategies are functions that handle
  5590. * how to merge a parent option value and a child option
  5591. * value into the final value.
  5592. */
  5593. var strats = config.optionMergeStrategies;
  5594. /**
  5595. * Options with restrictions
  5596. */
  5597. if (true) {
  5598. strats.el = strats.propsData = function (parent, child, vm, key) {
  5599. if (!vm) {
  5600. warn(
  5601. "option \"" + key + "\" can only be used during instance " +
  5602. 'creation with the `new` keyword.'
  5603. );
  5604. }
  5605. return defaultStrat(parent, child)
  5606. };
  5607. }
  5608. /**
  5609. * Helper that recursively merges two data objects together.
  5610. */
  5611. function mergeData (to, from) {
  5612. if (!from) { return to }
  5613. var key, toVal, fromVal;
  5614. var keys = hasSymbol
  5615. ? Reflect.ownKeys(from)
  5616. : Object.keys(from);
  5617. for (var i = 0; i < keys.length; i++) {
  5618. key = keys[i];
  5619. // in case the object is already observed...
  5620. if (key === '__ob__') { continue }
  5621. toVal = to[key];
  5622. fromVal = from[key];
  5623. if (!hasOwn(to, key)) {
  5624. set(to, key, fromVal);
  5625. } else if (
  5626. toVal !== fromVal &&
  5627. isPlainObject(toVal) &&
  5628. isPlainObject(fromVal)
  5629. ) {
  5630. mergeData(toVal, fromVal);
  5631. }
  5632. }
  5633. return to
  5634. }
  5635. /**
  5636. * Data
  5637. */
  5638. function mergeDataOrFn (
  5639. parentVal,
  5640. childVal,
  5641. vm
  5642. ) {
  5643. if (!vm) {
  5644. // in a Vue.extend merge, both should be functions
  5645. if (!childVal) {
  5646. return parentVal
  5647. }
  5648. if (!parentVal) {
  5649. return childVal
  5650. }
  5651. // when parentVal & childVal are both present,
  5652. // we need to return a function that returns the
  5653. // merged result of both functions... no need to
  5654. // check if parentVal is a function here because
  5655. // it has to be a function to pass previous merges.
  5656. return function mergedDataFn () {
  5657. return mergeData(
  5658. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5659. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5660. )
  5661. }
  5662. } else {
  5663. return function mergedInstanceDataFn () {
  5664. // instance merge
  5665. var instanceData = typeof childVal === 'function'
  5666. ? childVal.call(vm, vm)
  5667. : childVal;
  5668. var defaultData = typeof parentVal === 'function'
  5669. ? parentVal.call(vm, vm)
  5670. : parentVal;
  5671. if (instanceData) {
  5672. return mergeData(instanceData, defaultData)
  5673. } else {
  5674. return defaultData
  5675. }
  5676. }
  5677. }
  5678. }
  5679. strats.data = function (
  5680. parentVal,
  5681. childVal,
  5682. vm
  5683. ) {
  5684. if (!vm) {
  5685. if (childVal && typeof childVal !== 'function') {
  5686. true && warn(
  5687. 'The "data" option should be a function ' +
  5688. 'that returns a per-instance value in component ' +
  5689. 'definitions.',
  5690. vm
  5691. );
  5692. return parentVal
  5693. }
  5694. return mergeDataOrFn(parentVal, childVal)
  5695. }
  5696. return mergeDataOrFn(parentVal, childVal, vm)
  5697. };
  5698. /**
  5699. * Hooks and props are merged as arrays.
  5700. */
  5701. function mergeHook (
  5702. parentVal,
  5703. childVal
  5704. ) {
  5705. var res = childVal
  5706. ? parentVal
  5707. ? parentVal.concat(childVal)
  5708. : Array.isArray(childVal)
  5709. ? childVal
  5710. : [childVal]
  5711. : parentVal;
  5712. return res
  5713. ? dedupeHooks(res)
  5714. : res
  5715. }
  5716. function dedupeHooks (hooks) {
  5717. var res = [];
  5718. for (var i = 0; i < hooks.length; i++) {
  5719. if (res.indexOf(hooks[i]) === -1) {
  5720. res.push(hooks[i]);
  5721. }
  5722. }
  5723. return res
  5724. }
  5725. LIFECYCLE_HOOKS.forEach(function (hook) {
  5726. strats[hook] = mergeHook;
  5727. });
  5728. /**
  5729. * Assets
  5730. *
  5731. * When a vm is present (instance creation), we need to do
  5732. * a three-way merge between constructor options, instance
  5733. * options and parent options.
  5734. */
  5735. function mergeAssets (
  5736. parentVal,
  5737. childVal,
  5738. vm,
  5739. key
  5740. ) {
  5741. var res = Object.create(parentVal || null);
  5742. if (childVal) {
  5743. true && assertObjectType(key, childVal, vm);
  5744. return extend(res, childVal)
  5745. } else {
  5746. return res
  5747. }
  5748. }
  5749. ASSET_TYPES.forEach(function (type) {
  5750. strats[type + 's'] = mergeAssets;
  5751. });
  5752. /**
  5753. * Watchers.
  5754. *
  5755. * Watchers hashes should not overwrite one
  5756. * another, so we merge them as arrays.
  5757. */
  5758. strats.watch = function (
  5759. parentVal,
  5760. childVal,
  5761. vm,
  5762. key
  5763. ) {
  5764. // work around Firefox's Object.prototype.watch...
  5765. if (parentVal === nativeWatch) { parentVal = undefined; }
  5766. if (childVal === nativeWatch) { childVal = undefined; }
  5767. /* istanbul ignore if */
  5768. if (!childVal) { return Object.create(parentVal || null) }
  5769. if (true) {
  5770. assertObjectType(key, childVal, vm);
  5771. }
  5772. if (!parentVal) { return childVal }
  5773. var ret = {};
  5774. extend(ret, parentVal);
  5775. for (var key$1 in childVal) {
  5776. var parent = ret[key$1];
  5777. var child = childVal[key$1];
  5778. if (parent && !Array.isArray(parent)) {
  5779. parent = [parent];
  5780. }
  5781. ret[key$1] = parent
  5782. ? parent.concat(child)
  5783. : Array.isArray(child) ? child : [child];
  5784. }
  5785. return ret
  5786. };
  5787. /**
  5788. * Other object hashes.
  5789. */
  5790. strats.props =
  5791. strats.methods =
  5792. strats.inject =
  5793. strats.computed = function (
  5794. parentVal,
  5795. childVal,
  5796. vm,
  5797. key
  5798. ) {
  5799. if (childVal && "development" !== 'production') {
  5800. assertObjectType(key, childVal, vm);
  5801. }
  5802. if (!parentVal) { return childVal }
  5803. var ret = Object.create(null);
  5804. extend(ret, parentVal);
  5805. if (childVal) { extend(ret, childVal); }
  5806. return ret
  5807. };
  5808. strats.provide = mergeDataOrFn;
  5809. /**
  5810. * Default strategy.
  5811. */
  5812. var defaultStrat = function (parentVal, childVal) {
  5813. return childVal === undefined
  5814. ? parentVal
  5815. : childVal
  5816. };
  5817. /**
  5818. * Validate component names
  5819. */
  5820. function checkComponents (options) {
  5821. for (var key in options.components) {
  5822. validateComponentName(key);
  5823. }
  5824. }
  5825. function validateComponentName (name) {
  5826. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5827. warn(
  5828. 'Invalid component name: "' + name + '". Component names ' +
  5829. 'should conform to valid custom element name in html5 specification.'
  5830. );
  5831. }
  5832. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5833. warn(
  5834. 'Do not use built-in or reserved HTML elements as component ' +
  5835. 'id: ' + name
  5836. );
  5837. }
  5838. }
  5839. /**
  5840. * Ensure all props option syntax are normalized into the
  5841. * Object-based format.
  5842. */
  5843. function normalizeProps (options, vm) {
  5844. var props = options.props;
  5845. if (!props) { return }
  5846. var res = {};
  5847. var i, val, name;
  5848. if (Array.isArray(props)) {
  5849. i = props.length;
  5850. while (i--) {
  5851. val = props[i];
  5852. if (typeof val === 'string') {
  5853. name = camelize(val);
  5854. res[name] = { type: null };
  5855. } else if (true) {
  5856. warn('props must be strings when using array syntax.');
  5857. }
  5858. }
  5859. } else if (isPlainObject(props)) {
  5860. for (var key in props) {
  5861. val = props[key];
  5862. name = camelize(key);
  5863. res[name] = isPlainObject(val)
  5864. ? val
  5865. : { type: val };
  5866. }
  5867. } else if (true) {
  5868. warn(
  5869. "Invalid value for option \"props\": expected an Array or an Object, " +
  5870. "but got " + (toRawType(props)) + ".",
  5871. vm
  5872. );
  5873. }
  5874. options.props = res;
  5875. }
  5876. /**
  5877. * Normalize all injections into Object-based format
  5878. */
  5879. function normalizeInject (options, vm) {
  5880. var inject = options.inject;
  5881. if (!inject) { return }
  5882. var normalized = options.inject = {};
  5883. if (Array.isArray(inject)) {
  5884. for (var i = 0; i < inject.length; i++) {
  5885. normalized[inject[i]] = { from: inject[i] };
  5886. }
  5887. } else if (isPlainObject(inject)) {
  5888. for (var key in inject) {
  5889. var val = inject[key];
  5890. normalized[key] = isPlainObject(val)
  5891. ? extend({ from: key }, val)
  5892. : { from: val };
  5893. }
  5894. } else if (true) {
  5895. warn(
  5896. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5897. "but got " + (toRawType(inject)) + ".",
  5898. vm
  5899. );
  5900. }
  5901. }
  5902. /**
  5903. * Normalize raw function directives into object format.
  5904. */
  5905. function normalizeDirectives (options) {
  5906. var dirs = options.directives;
  5907. if (dirs) {
  5908. for (var key in dirs) {
  5909. var def$$1 = dirs[key];
  5910. if (typeof def$$1 === 'function') {
  5911. dirs[key] = { bind: def$$1, update: def$$1 };
  5912. }
  5913. }
  5914. }
  5915. }
  5916. function assertObjectType (name, value, vm) {
  5917. if (!isPlainObject(value)) {
  5918. warn(
  5919. "Invalid value for option \"" + name + "\": expected an Object, " +
  5920. "but got " + (toRawType(value)) + ".",
  5921. vm
  5922. );
  5923. }
  5924. }
  5925. /**
  5926. * Merge two option objects into a new one.
  5927. * Core utility used in both instantiation and inheritance.
  5928. */
  5929. function mergeOptions (
  5930. parent,
  5931. child,
  5932. vm
  5933. ) {
  5934. if (true) {
  5935. checkComponents(child);
  5936. }
  5937. if (typeof child === 'function') {
  5938. child = child.options;
  5939. }
  5940. normalizeProps(child, vm);
  5941. normalizeInject(child, vm);
  5942. normalizeDirectives(child);
  5943. // Apply extends and mixins on the child options,
  5944. // but only if it is a raw options object that isn't
  5945. // the result of another mergeOptions call.
  5946. // Only merged options has the _base property.
  5947. if (!child._base) {
  5948. if (child.extends) {
  5949. parent = mergeOptions(parent, child.extends, vm);
  5950. }
  5951. if (child.mixins) {
  5952. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5953. parent = mergeOptions(parent, child.mixins[i], vm);
  5954. }
  5955. }
  5956. }
  5957. var options = {};
  5958. var key;
  5959. for (key in parent) {
  5960. mergeField(key);
  5961. }
  5962. for (key in child) {
  5963. if (!hasOwn(parent, key)) {
  5964. mergeField(key);
  5965. }
  5966. }
  5967. function mergeField (key) {
  5968. var strat = strats[key] || defaultStrat;
  5969. options[key] = strat(parent[key], child[key], vm, key);
  5970. }
  5971. return options
  5972. }
  5973. /**
  5974. * Resolve an asset.
  5975. * This function is used because child instances need access
  5976. * to assets defined in its ancestor chain.
  5977. */
  5978. function resolveAsset (
  5979. options,
  5980. type,
  5981. id,
  5982. warnMissing
  5983. ) {
  5984. /* istanbul ignore if */
  5985. if (typeof id !== 'string') {
  5986. return
  5987. }
  5988. var assets = options[type];
  5989. // check local registration variations first
  5990. if (hasOwn(assets, id)) { return assets[id] }
  5991. var camelizedId = camelize(id);
  5992. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5993. var PascalCaseId = capitalize(camelizedId);
  5994. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5995. // fallback to prototype chain
  5996. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5997. if ( true && warnMissing && !res) {
  5998. warn(
  5999. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6000. options
  6001. );
  6002. }
  6003. return res
  6004. }
  6005. /* */
  6006. function validateProp (
  6007. key,
  6008. propOptions,
  6009. propsData,
  6010. vm
  6011. ) {
  6012. var prop = propOptions[key];
  6013. var absent = !hasOwn(propsData, key);
  6014. var value = propsData[key];
  6015. // boolean casting
  6016. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6017. if (booleanIndex > -1) {
  6018. if (absent && !hasOwn(prop, 'default')) {
  6019. value = false;
  6020. } else if (value === '' || value === hyphenate(key)) {
  6021. // only cast empty string / same name to boolean if
  6022. // boolean has higher priority
  6023. var stringIndex = getTypeIndex(String, prop.type);
  6024. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6025. value = true;
  6026. }
  6027. }
  6028. }
  6029. // check default value
  6030. if (value === undefined) {
  6031. value = getPropDefaultValue(vm, prop, key);
  6032. // since the default value is a fresh copy,
  6033. // make sure to observe it.
  6034. var prevShouldObserve = shouldObserve;
  6035. toggleObserving(true);
  6036. observe(value);
  6037. toggleObserving(prevShouldObserve);
  6038. }
  6039. if (
  6040. true
  6041. ) {
  6042. assertProp(prop, key, value, vm, absent);
  6043. }
  6044. return value
  6045. }
  6046. /**
  6047. * Get the default value of a prop.
  6048. */
  6049. function getPropDefaultValue (vm, prop, key) {
  6050. // no default, return undefined
  6051. if (!hasOwn(prop, 'default')) {
  6052. return undefined
  6053. }
  6054. var def = prop.default;
  6055. // warn against non-factory defaults for Object & Array
  6056. if ( true && isObject(def)) {
  6057. warn(
  6058. 'Invalid default value for prop "' + key + '": ' +
  6059. 'Props with type Object/Array must use a factory function ' +
  6060. 'to return the default value.',
  6061. vm
  6062. );
  6063. }
  6064. // the raw prop value was also undefined from previous render,
  6065. // return previous default value to avoid unnecessary watcher trigger
  6066. if (vm && vm.$options.propsData &&
  6067. vm.$options.propsData[key] === undefined &&
  6068. vm._props[key] !== undefined
  6069. ) {
  6070. return vm._props[key]
  6071. }
  6072. // call factory function for non-Function types
  6073. // a value is Function if its prototype is function even across different execution context
  6074. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6075. ? def.call(vm)
  6076. : def
  6077. }
  6078. /**
  6079. * Assert whether a prop is valid.
  6080. */
  6081. function assertProp (
  6082. prop,
  6083. name,
  6084. value,
  6085. vm,
  6086. absent
  6087. ) {
  6088. if (prop.required && absent) {
  6089. warn(
  6090. 'Missing required prop: "' + name + '"',
  6091. vm
  6092. );
  6093. return
  6094. }
  6095. if (value == null && !prop.required) {
  6096. return
  6097. }
  6098. var type = prop.type;
  6099. var valid = !type || type === true;
  6100. var expectedTypes = [];
  6101. if (type) {
  6102. if (!Array.isArray(type)) {
  6103. type = [type];
  6104. }
  6105. for (var i = 0; i < type.length && !valid; i++) {
  6106. var assertedType = assertType(value, type[i]);
  6107. expectedTypes.push(assertedType.expectedType || '');
  6108. valid = assertedType.valid;
  6109. }
  6110. }
  6111. if (!valid) {
  6112. warn(
  6113. getInvalidTypeMessage(name, value, expectedTypes),
  6114. vm
  6115. );
  6116. return
  6117. }
  6118. var validator = prop.validator;
  6119. if (validator) {
  6120. if (!validator(value)) {
  6121. warn(
  6122. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6123. vm
  6124. );
  6125. }
  6126. }
  6127. }
  6128. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6129. function assertType (value, type) {
  6130. var valid;
  6131. var expectedType = getType(type);
  6132. if (simpleCheckRE.test(expectedType)) {
  6133. var t = typeof value;
  6134. valid = t === expectedType.toLowerCase();
  6135. // for primitive wrapper objects
  6136. if (!valid && t === 'object') {
  6137. valid = value instanceof type;
  6138. }
  6139. } else if (expectedType === 'Object') {
  6140. valid = isPlainObject(value);
  6141. } else if (expectedType === 'Array') {
  6142. valid = Array.isArray(value);
  6143. } else {
  6144. valid = value instanceof type;
  6145. }
  6146. return {
  6147. valid: valid,
  6148. expectedType: expectedType
  6149. }
  6150. }
  6151. /**
  6152. * Use function string name to check built-in types,
  6153. * because a simple equality check will fail when running
  6154. * across different vms / iframes.
  6155. */
  6156. function getType (fn) {
  6157. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6158. return match ? match[1] : ''
  6159. }
  6160. function isSameType (a, b) {
  6161. return getType(a) === getType(b)
  6162. }
  6163. function getTypeIndex (type, expectedTypes) {
  6164. if (!Array.isArray(expectedTypes)) {
  6165. return isSameType(expectedTypes, type) ? 0 : -1
  6166. }
  6167. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6168. if (isSameType(expectedTypes[i], type)) {
  6169. return i
  6170. }
  6171. }
  6172. return -1
  6173. }
  6174. function getInvalidTypeMessage (name, value, expectedTypes) {
  6175. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6176. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6177. var expectedType = expectedTypes[0];
  6178. var receivedType = toRawType(value);
  6179. var expectedValue = styleValue(value, expectedType);
  6180. var receivedValue = styleValue(value, receivedType);
  6181. // check if we need to specify expected value
  6182. if (expectedTypes.length === 1 &&
  6183. isExplicable(expectedType) &&
  6184. !isBoolean(expectedType, receivedType)) {
  6185. message += " with value " + expectedValue;
  6186. }
  6187. message += ", got " + receivedType + " ";
  6188. // check if we need to specify received value
  6189. if (isExplicable(receivedType)) {
  6190. message += "with value " + receivedValue + ".";
  6191. }
  6192. return message
  6193. }
  6194. function styleValue (value, type) {
  6195. if (type === 'String') {
  6196. return ("\"" + value + "\"")
  6197. } else if (type === 'Number') {
  6198. return ("" + (Number(value)))
  6199. } else {
  6200. return ("" + value)
  6201. }
  6202. }
  6203. function isExplicable (value) {
  6204. var explicitTypes = ['string', 'number', 'boolean'];
  6205. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6206. }
  6207. function isBoolean () {
  6208. var args = [], len = arguments.length;
  6209. while ( len-- ) args[ len ] = arguments[ len ];
  6210. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6211. }
  6212. /* */
  6213. function handleError (err, vm, info) {
  6214. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6215. // See: https://github.com/vuejs/vuex/issues/1505
  6216. pushTarget();
  6217. try {
  6218. if (vm) {
  6219. var cur = vm;
  6220. while ((cur = cur.$parent)) {
  6221. var hooks = cur.$options.errorCaptured;
  6222. if (hooks) {
  6223. for (var i = 0; i < hooks.length; i++) {
  6224. try {
  6225. var capture = hooks[i].call(cur, err, vm, info) === false;
  6226. if (capture) { return }
  6227. } catch (e) {
  6228. globalHandleError(e, cur, 'errorCaptured hook');
  6229. }
  6230. }
  6231. }
  6232. }
  6233. }
  6234. globalHandleError(err, vm, info);
  6235. } finally {
  6236. popTarget();
  6237. }
  6238. }
  6239. function invokeWithErrorHandling (
  6240. handler,
  6241. context,
  6242. args,
  6243. vm,
  6244. info
  6245. ) {
  6246. var res;
  6247. try {
  6248. res = args ? handler.apply(context, args) : handler.call(context);
  6249. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6250. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6251. // issue #9511
  6252. // avoid catch triggering multiple times when nested calls
  6253. res._handled = true;
  6254. }
  6255. } catch (e) {
  6256. handleError(e, vm, info);
  6257. }
  6258. return res
  6259. }
  6260. function globalHandleError (err, vm, info) {
  6261. if (config.errorHandler) {
  6262. try {
  6263. return config.errorHandler.call(null, err, vm, info)
  6264. } catch (e) {
  6265. // if the user intentionally throws the original error in the handler,
  6266. // do not log it twice
  6267. if (e !== err) {
  6268. logError(e, null, 'config.errorHandler');
  6269. }
  6270. }
  6271. }
  6272. logError(err, vm, info);
  6273. }
  6274. function logError (err, vm, info) {
  6275. if (true) {
  6276. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6277. }
  6278. /* istanbul ignore else */
  6279. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6280. console.error(err);
  6281. } else {
  6282. throw err
  6283. }
  6284. }
  6285. /* */
  6286. var callbacks = [];
  6287. var pending = false;
  6288. function flushCallbacks () {
  6289. pending = false;
  6290. var copies = callbacks.slice(0);
  6291. callbacks.length = 0;
  6292. for (var i = 0; i < copies.length; i++) {
  6293. copies[i]();
  6294. }
  6295. }
  6296. // Here we have async deferring wrappers using microtasks.
  6297. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6298. // However, it has subtle problems when state is changed right before repaint
  6299. // (e.g. #6813, out-in transitions).
  6300. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6301. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6302. // So we now use microtasks everywhere, again.
  6303. // A major drawback of this tradeoff is that there are some scenarios
  6304. // where microtasks have too high a priority and fire in between supposedly
  6305. // sequential events (e.g. #4521, #6690, which have workarounds)
  6306. // or even between bubbling of the same event (#6566).
  6307. var timerFunc;
  6308. // The nextTick behavior leverages the microtask queue, which can be accessed
  6309. // via either native Promise.then or MutationObserver.
  6310. // MutationObserver has wider support, however it is seriously bugged in
  6311. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6312. // completely stops working after triggering a few times... so, if native
  6313. // Promise is available, we will use it:
  6314. /* istanbul ignore next, $flow-disable-line */
  6315. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6316. var p = Promise.resolve();
  6317. timerFunc = function () {
  6318. p.then(flushCallbacks);
  6319. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6320. // it can get stuck in a weird state where callbacks are pushed into the
  6321. // microtask queue but the queue isn't being flushed, until the browser
  6322. // needs to do some other work, e.g. handle a timer. Therefore we can
  6323. // "force" the microtask queue to be flushed by adding an empty timer.
  6324. if (isIOS) { setTimeout(noop); }
  6325. };
  6326. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6327. isNative(MutationObserver) ||
  6328. // PhantomJS and iOS 7.x
  6329. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6330. )) {
  6331. // Use MutationObserver where native Promise is not available,
  6332. // e.g. PhantomJS, iOS7, Android 4.4
  6333. // (#6466 MutationObserver is unreliable in IE11)
  6334. var counter = 1;
  6335. var observer = new MutationObserver(flushCallbacks);
  6336. var textNode = document.createTextNode(String(counter));
  6337. observer.observe(textNode, {
  6338. characterData: true
  6339. });
  6340. timerFunc = function () {
  6341. counter = (counter + 1) % 2;
  6342. textNode.data = String(counter);
  6343. };
  6344. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6345. // Fallback to setImmediate.
  6346. // Technically it leverages the (macro) task queue,
  6347. // but it is still a better choice than setTimeout.
  6348. timerFunc = function () {
  6349. setImmediate(flushCallbacks);
  6350. };
  6351. } else {
  6352. // Fallback to setTimeout.
  6353. timerFunc = function () {
  6354. setTimeout(flushCallbacks, 0);
  6355. };
  6356. }
  6357. function nextTick (cb, ctx) {
  6358. var _resolve;
  6359. callbacks.push(function () {
  6360. if (cb) {
  6361. try {
  6362. cb.call(ctx);
  6363. } catch (e) {
  6364. handleError(e, ctx, 'nextTick');
  6365. }
  6366. } else if (_resolve) {
  6367. _resolve(ctx);
  6368. }
  6369. });
  6370. if (!pending) {
  6371. pending = true;
  6372. timerFunc();
  6373. }
  6374. // $flow-disable-line
  6375. if (!cb && typeof Promise !== 'undefined') {
  6376. return new Promise(function (resolve) {
  6377. _resolve = resolve;
  6378. })
  6379. }
  6380. }
  6381. /* */
  6382. /* not type checking this file because flow doesn't play well with Proxy */
  6383. var initProxy;
  6384. if (true) {
  6385. var allowedGlobals = makeMap(
  6386. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6387. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6388. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6389. 'require' // for Webpack/Browserify
  6390. );
  6391. var warnNonPresent = function (target, key) {
  6392. warn(
  6393. "Property or method \"" + key + "\" is not defined on the instance but " +
  6394. 'referenced during render. Make sure that this property is reactive, ' +
  6395. 'either in the data option, or for class-based components, by ' +
  6396. 'initializing the property. ' +
  6397. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6398. target
  6399. );
  6400. };
  6401. var warnReservedPrefix = function (target, key) {
  6402. warn(
  6403. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6404. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6405. 'prevent conflicts with Vue internals. ' +
  6406. 'See: https://vuejs.org/v2/api/#data',
  6407. target
  6408. );
  6409. };
  6410. var hasProxy =
  6411. typeof Proxy !== 'undefined' && isNative(Proxy);
  6412. if (hasProxy) {
  6413. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6414. config.keyCodes = new Proxy(config.keyCodes, {
  6415. set: function set (target, key, value) {
  6416. if (isBuiltInModifier(key)) {
  6417. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6418. return false
  6419. } else {
  6420. target[key] = value;
  6421. return true
  6422. }
  6423. }
  6424. });
  6425. }
  6426. var hasHandler = {
  6427. has: function has (target, key) {
  6428. var has = key in target;
  6429. var isAllowed = allowedGlobals(key) ||
  6430. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6431. if (!has && !isAllowed) {
  6432. if (key in target.$data) { warnReservedPrefix(target, key); }
  6433. else { warnNonPresent(target, key); }
  6434. }
  6435. return has || !isAllowed
  6436. }
  6437. };
  6438. var getHandler = {
  6439. get: function get (target, key) {
  6440. if (typeof key === 'string' && !(key in target)) {
  6441. if (key in target.$data) { warnReservedPrefix(target, key); }
  6442. else { warnNonPresent(target, key); }
  6443. }
  6444. return target[key]
  6445. }
  6446. };
  6447. initProxy = function initProxy (vm) {
  6448. if (hasProxy) {
  6449. // determine which proxy handler to use
  6450. var options = vm.$options;
  6451. var handlers = options.render && options.render._withStripped
  6452. ? getHandler
  6453. : hasHandler;
  6454. vm._renderProxy = new Proxy(vm, handlers);
  6455. } else {
  6456. vm._renderProxy = vm;
  6457. }
  6458. };
  6459. }
  6460. /* */
  6461. var seenObjects = new _Set();
  6462. /**
  6463. * Recursively traverse an object to evoke all converted
  6464. * getters, so that every nested property inside the object
  6465. * is collected as a "deep" dependency.
  6466. */
  6467. function traverse (val) {
  6468. _traverse(val, seenObjects);
  6469. seenObjects.clear();
  6470. }
  6471. function _traverse (val, seen) {
  6472. var i, keys;
  6473. var isA = Array.isArray(val);
  6474. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6475. return
  6476. }
  6477. if (val.__ob__) {
  6478. var depId = val.__ob__.dep.id;
  6479. if (seen.has(depId)) {
  6480. return
  6481. }
  6482. seen.add(depId);
  6483. }
  6484. if (isA) {
  6485. i = val.length;
  6486. while (i--) { _traverse(val[i], seen); }
  6487. } else {
  6488. keys = Object.keys(val);
  6489. i = keys.length;
  6490. while (i--) { _traverse(val[keys[i]], seen); }
  6491. }
  6492. }
  6493. var mark;
  6494. var measure;
  6495. if (true) {
  6496. var perf = inBrowser && window.performance;
  6497. /* istanbul ignore if */
  6498. if (
  6499. perf &&
  6500. perf.mark &&
  6501. perf.measure &&
  6502. perf.clearMarks &&
  6503. perf.clearMeasures
  6504. ) {
  6505. mark = function (tag) { return perf.mark(tag); };
  6506. measure = function (name, startTag, endTag) {
  6507. perf.measure(name, startTag, endTag);
  6508. perf.clearMarks(startTag);
  6509. perf.clearMarks(endTag);
  6510. // perf.clearMeasures(name)
  6511. };
  6512. }
  6513. }
  6514. /* */
  6515. var normalizeEvent = cached(function (name) {
  6516. var passive = name.charAt(0) === '&';
  6517. name = passive ? name.slice(1) : name;
  6518. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6519. name = once$$1 ? name.slice(1) : name;
  6520. var capture = name.charAt(0) === '!';
  6521. name = capture ? name.slice(1) : name;
  6522. return {
  6523. name: name,
  6524. once: once$$1,
  6525. capture: capture,
  6526. passive: passive
  6527. }
  6528. });
  6529. function createFnInvoker (fns, vm) {
  6530. function invoker () {
  6531. var arguments$1 = arguments;
  6532. var fns = invoker.fns;
  6533. if (Array.isArray(fns)) {
  6534. var cloned = fns.slice();
  6535. for (var i = 0; i < cloned.length; i++) {
  6536. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6537. }
  6538. } else {
  6539. // return handler return value for single handlers
  6540. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6541. }
  6542. }
  6543. invoker.fns = fns;
  6544. return invoker
  6545. }
  6546. function updateListeners (
  6547. on,
  6548. oldOn,
  6549. add,
  6550. remove$$1,
  6551. createOnceHandler,
  6552. vm
  6553. ) {
  6554. var name, def$$1, cur, old, event;
  6555. for (name in on) {
  6556. def$$1 = cur = on[name];
  6557. old = oldOn[name];
  6558. event = normalizeEvent(name);
  6559. if (isUndef(cur)) {
  6560. true && warn(
  6561. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6562. vm
  6563. );
  6564. } else if (isUndef(old)) {
  6565. if (isUndef(cur.fns)) {
  6566. cur = on[name] = createFnInvoker(cur, vm);
  6567. }
  6568. if (isTrue(event.once)) {
  6569. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6570. }
  6571. add(event.name, cur, event.capture, event.passive, event.params);
  6572. } else if (cur !== old) {
  6573. old.fns = cur;
  6574. on[name] = old;
  6575. }
  6576. }
  6577. for (name in oldOn) {
  6578. if (isUndef(on[name])) {
  6579. event = normalizeEvent(name);
  6580. remove$$1(event.name, oldOn[name], event.capture);
  6581. }
  6582. }
  6583. }
  6584. /* */
  6585. /* */
  6586. // fixed by xxxxxx (mp properties)
  6587. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6588. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6589. if (isUndef(propOptions)) {
  6590. return res
  6591. }
  6592. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6593. var attrs = data.attrs;
  6594. var props = data.props;
  6595. if (isDef(attrs) || isDef(props)) {
  6596. for (var key in propOptions) {
  6597. var altKey = hyphenate(key);
  6598. var result = checkProp(res, props, key, altKey, true) ||
  6599. checkProp(res, attrs, key, altKey, false);
  6600. // externalClass
  6601. if (
  6602. result &&
  6603. res[key] &&
  6604. externalClasses.indexOf(altKey) !== -1 &&
  6605. context[camelize(res[key])]
  6606. ) {
  6607. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6608. res[key] = context[camelize(res[key])];
  6609. }
  6610. }
  6611. }
  6612. return res
  6613. }
  6614. function extractPropsFromVNodeData (
  6615. data,
  6616. Ctor,
  6617. tag,
  6618. context// fixed by xxxxxx
  6619. ) {
  6620. // we are only extracting raw values here.
  6621. // validation and default values are handled in the child
  6622. // component itself.
  6623. var propOptions = Ctor.options.props;
  6624. if (isUndef(propOptions)) {
  6625. // fixed by xxxxxx
  6626. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6627. }
  6628. var res = {};
  6629. var attrs = data.attrs;
  6630. var props = data.props;
  6631. if (isDef(attrs) || isDef(props)) {
  6632. for (var key in propOptions) {
  6633. var altKey = hyphenate(key);
  6634. if (true) {
  6635. var keyInLowerCase = key.toLowerCase();
  6636. if (
  6637. key !== keyInLowerCase &&
  6638. attrs && hasOwn(attrs, keyInLowerCase)
  6639. ) {
  6640. tip(
  6641. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6642. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6643. " \"" + key + "\". " +
  6644. "Note that HTML attributes are case-insensitive and camelCased " +
  6645. "props need to use their kebab-case equivalents when using in-DOM " +
  6646. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6647. );
  6648. }
  6649. }
  6650. checkProp(res, props, key, altKey, true) ||
  6651. checkProp(res, attrs, key, altKey, false);
  6652. }
  6653. }
  6654. // fixed by xxxxxx
  6655. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6656. }
  6657. function checkProp (
  6658. res,
  6659. hash,
  6660. key,
  6661. altKey,
  6662. preserve
  6663. ) {
  6664. if (isDef(hash)) {
  6665. if (hasOwn(hash, key)) {
  6666. res[key] = hash[key];
  6667. if (!preserve) {
  6668. delete hash[key];
  6669. }
  6670. return true
  6671. } else if (hasOwn(hash, altKey)) {
  6672. res[key] = hash[altKey];
  6673. if (!preserve) {
  6674. delete hash[altKey];
  6675. }
  6676. return true
  6677. }
  6678. }
  6679. return false
  6680. }
  6681. /* */
  6682. // The template compiler attempts to minimize the need for normalization by
  6683. // statically analyzing the template at compile time.
  6684. //
  6685. // For plain HTML markup, normalization can be completely skipped because the
  6686. // generated render function is guaranteed to return Array<VNode>. There are
  6687. // two cases where extra normalization is needed:
  6688. // 1. When the children contains components - because a functional component
  6689. // may return an Array instead of a single root. In this case, just a simple
  6690. // normalization is needed - if any child is an Array, we flatten the whole
  6691. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6692. // because functional components already normalize their own children.
  6693. function simpleNormalizeChildren (children) {
  6694. for (var i = 0; i < children.length; i++) {
  6695. if (Array.isArray(children[i])) {
  6696. return Array.prototype.concat.apply([], children)
  6697. }
  6698. }
  6699. return children
  6700. }
  6701. // 2. When the children contains constructs that always generated nested Arrays,
  6702. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6703. // with hand-written render functions / JSX. In such cases a full normalization
  6704. // is needed to cater to all possible types of children values.
  6705. function normalizeChildren (children) {
  6706. return isPrimitive(children)
  6707. ? [createTextVNode(children)]
  6708. : Array.isArray(children)
  6709. ? normalizeArrayChildren(children)
  6710. : undefined
  6711. }
  6712. function isTextNode (node) {
  6713. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6714. }
  6715. function normalizeArrayChildren (children, nestedIndex) {
  6716. var res = [];
  6717. var i, c, lastIndex, last;
  6718. for (i = 0; i < children.length; i++) {
  6719. c = children[i];
  6720. if (isUndef(c) || typeof c === 'boolean') { continue }
  6721. lastIndex = res.length - 1;
  6722. last = res[lastIndex];
  6723. // nested
  6724. if (Array.isArray(c)) {
  6725. if (c.length > 0) {
  6726. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6727. // merge adjacent text nodes
  6728. if (isTextNode(c[0]) && isTextNode(last)) {
  6729. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6730. c.shift();
  6731. }
  6732. res.push.apply(res, c);
  6733. }
  6734. } else if (isPrimitive(c)) {
  6735. if (isTextNode(last)) {
  6736. // merge adjacent text nodes
  6737. // this is necessary for SSR hydration because text nodes are
  6738. // essentially merged when rendered to HTML strings
  6739. res[lastIndex] = createTextVNode(last.text + c);
  6740. } else if (c !== '') {
  6741. // convert primitive to vnode
  6742. res.push(createTextVNode(c));
  6743. }
  6744. } else {
  6745. if (isTextNode(c) && isTextNode(last)) {
  6746. // merge adjacent text nodes
  6747. res[lastIndex] = createTextVNode(last.text + c.text);
  6748. } else {
  6749. // default key for nested array children (likely generated by v-for)
  6750. if (isTrue(children._isVList) &&
  6751. isDef(c.tag) &&
  6752. isUndef(c.key) &&
  6753. isDef(nestedIndex)) {
  6754. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6755. }
  6756. res.push(c);
  6757. }
  6758. }
  6759. }
  6760. return res
  6761. }
  6762. /* */
  6763. function initProvide (vm) {
  6764. var provide = vm.$options.provide;
  6765. if (provide) {
  6766. vm._provided = typeof provide === 'function'
  6767. ? provide.call(vm)
  6768. : provide;
  6769. }
  6770. }
  6771. function initInjections (vm) {
  6772. var result = resolveInject(vm.$options.inject, vm);
  6773. if (result) {
  6774. toggleObserving(false);
  6775. Object.keys(result).forEach(function (key) {
  6776. /* istanbul ignore else */
  6777. if (true) {
  6778. defineReactive$$1(vm, key, result[key], function () {
  6779. warn(
  6780. "Avoid mutating an injected value directly since the changes will be " +
  6781. "overwritten whenever the provided component re-renders. " +
  6782. "injection being mutated: \"" + key + "\"",
  6783. vm
  6784. );
  6785. });
  6786. } else {}
  6787. });
  6788. toggleObserving(true);
  6789. }
  6790. }
  6791. function resolveInject (inject, vm) {
  6792. if (inject) {
  6793. // inject is :any because flow is not smart enough to figure out cached
  6794. var result = Object.create(null);
  6795. var keys = hasSymbol
  6796. ? Reflect.ownKeys(inject)
  6797. : Object.keys(inject);
  6798. for (var i = 0; i < keys.length; i++) {
  6799. var key = keys[i];
  6800. // #6574 in case the inject object is observed...
  6801. if (key === '__ob__') { continue }
  6802. var provideKey = inject[key].from;
  6803. var source = vm;
  6804. while (source) {
  6805. if (source._provided && hasOwn(source._provided, provideKey)) {
  6806. result[key] = source._provided[provideKey];
  6807. break
  6808. }
  6809. source = source.$parent;
  6810. }
  6811. if (!source) {
  6812. if ('default' in inject[key]) {
  6813. var provideDefault = inject[key].default;
  6814. result[key] = typeof provideDefault === 'function'
  6815. ? provideDefault.call(vm)
  6816. : provideDefault;
  6817. } else if (true) {
  6818. warn(("Injection \"" + key + "\" not found"), vm);
  6819. }
  6820. }
  6821. }
  6822. return result
  6823. }
  6824. }
  6825. /* */
  6826. /**
  6827. * Runtime helper for resolving raw children VNodes into a slot object.
  6828. */
  6829. function resolveSlots (
  6830. children,
  6831. context
  6832. ) {
  6833. if (!children || !children.length) {
  6834. return {}
  6835. }
  6836. var slots = {};
  6837. for (var i = 0, l = children.length; i < l; i++) {
  6838. var child = children[i];
  6839. var data = child.data;
  6840. // remove slot attribute if the node is resolved as a Vue slot node
  6841. if (data && data.attrs && data.attrs.slot) {
  6842. delete data.attrs.slot;
  6843. }
  6844. // named slots should only be respected if the vnode was rendered in the
  6845. // same context.
  6846. if ((child.context === context || child.fnContext === context) &&
  6847. data && data.slot != null
  6848. ) {
  6849. var name = data.slot;
  6850. var slot = (slots[name] || (slots[name] = []));
  6851. if (child.tag === 'template') {
  6852. slot.push.apply(slot, child.children || []);
  6853. } else {
  6854. slot.push(child);
  6855. }
  6856. } else {
  6857. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6858. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6859. (slots['page'] || (slots['page'] = [])).push(child);
  6860. }else{
  6861. (slots.default || (slots.default = [])).push(child);
  6862. }
  6863. }
  6864. }
  6865. // ignore slots that contains only whitespace
  6866. for (var name$1 in slots) {
  6867. if (slots[name$1].every(isWhitespace)) {
  6868. delete slots[name$1];
  6869. }
  6870. }
  6871. return slots
  6872. }
  6873. function isWhitespace (node) {
  6874. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6875. }
  6876. /* */
  6877. function normalizeScopedSlots (
  6878. slots,
  6879. normalSlots,
  6880. prevSlots
  6881. ) {
  6882. var res;
  6883. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6884. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6885. var key = slots && slots.$key;
  6886. if (!slots) {
  6887. res = {};
  6888. } else if (slots._normalized) {
  6889. // fast path 1: child component re-render only, parent did not change
  6890. return slots._normalized
  6891. } else if (
  6892. isStable &&
  6893. prevSlots &&
  6894. prevSlots !== emptyObject &&
  6895. key === prevSlots.$key &&
  6896. !hasNormalSlots &&
  6897. !prevSlots.$hasNormal
  6898. ) {
  6899. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6900. // only need to normalize once
  6901. return prevSlots
  6902. } else {
  6903. res = {};
  6904. for (var key$1 in slots) {
  6905. if (slots[key$1] && key$1[0] !== '$') {
  6906. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6907. }
  6908. }
  6909. }
  6910. // expose normal slots on scopedSlots
  6911. for (var key$2 in normalSlots) {
  6912. if (!(key$2 in res)) {
  6913. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6914. }
  6915. }
  6916. // avoriaz seems to mock a non-extensible $scopedSlots object
  6917. // and when that is passed down this would cause an error
  6918. if (slots && Object.isExtensible(slots)) {
  6919. (slots)._normalized = res;
  6920. }
  6921. def(res, '$stable', isStable);
  6922. def(res, '$key', key);
  6923. def(res, '$hasNormal', hasNormalSlots);
  6924. return res
  6925. }
  6926. function normalizeScopedSlot(normalSlots, key, fn) {
  6927. var normalized = function () {
  6928. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6929. res = res && typeof res === 'object' && !Array.isArray(res)
  6930. ? [res] // single vnode
  6931. : normalizeChildren(res);
  6932. return res && (
  6933. res.length === 0 ||
  6934. (res.length === 1 && res[0].isComment) // #9658
  6935. ) ? undefined
  6936. : res
  6937. };
  6938. // this is a slot using the new v-slot syntax without scope. although it is
  6939. // compiled as a scoped slot, render fn users would expect it to be present
  6940. // on this.$slots because the usage is semantically a normal slot.
  6941. if (fn.proxy) {
  6942. Object.defineProperty(normalSlots, key, {
  6943. get: normalized,
  6944. enumerable: true,
  6945. configurable: true
  6946. });
  6947. }
  6948. return normalized
  6949. }
  6950. function proxyNormalSlot(slots, key) {
  6951. return function () { return slots[key]; }
  6952. }
  6953. /* */
  6954. /**
  6955. * Runtime helper for rendering v-for lists.
  6956. */
  6957. function renderList (
  6958. val,
  6959. render
  6960. ) {
  6961. var ret, i, l, keys, key;
  6962. if (Array.isArray(val) || typeof val === 'string') {
  6963. ret = new Array(val.length);
  6964. for (i = 0, l = val.length; i < l; i++) {
  6965. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6966. }
  6967. } else if (typeof val === 'number') {
  6968. ret = new Array(val);
  6969. for (i = 0; i < val; i++) {
  6970. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6971. }
  6972. } else if (isObject(val)) {
  6973. if (hasSymbol && val[Symbol.iterator]) {
  6974. ret = [];
  6975. var iterator = val[Symbol.iterator]();
  6976. var result = iterator.next();
  6977. while (!result.done) {
  6978. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6979. result = iterator.next();
  6980. }
  6981. } else {
  6982. keys = Object.keys(val);
  6983. ret = new Array(keys.length);
  6984. for (i = 0, l = keys.length; i < l; i++) {
  6985. key = keys[i];
  6986. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6987. }
  6988. }
  6989. }
  6990. if (!isDef(ret)) {
  6991. ret = [];
  6992. }
  6993. (ret)._isVList = true;
  6994. return ret
  6995. }
  6996. /* */
  6997. /**
  6998. * Runtime helper for rendering <slot>
  6999. */
  7000. function renderSlot (
  7001. name,
  7002. fallback,
  7003. props,
  7004. bindObject
  7005. ) {
  7006. var scopedSlotFn = this.$scopedSlots[name];
  7007. var nodes;
  7008. if (scopedSlotFn) { // scoped slot
  7009. props = props || {};
  7010. if (bindObject) {
  7011. if ( true && !isObject(bindObject)) {
  7012. warn(
  7013. 'slot v-bind without argument expects an Object',
  7014. this
  7015. );
  7016. }
  7017. props = extend(extend({}, bindObject), props);
  7018. }
  7019. // fixed by xxxxxx app-plus scopedSlot
  7020. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7021. } else {
  7022. nodes = this.$slots[name] || fallback;
  7023. }
  7024. var target = props && props.slot;
  7025. if (target) {
  7026. return this.$createElement('template', { slot: target }, nodes)
  7027. } else {
  7028. return nodes
  7029. }
  7030. }
  7031. /* */
  7032. /**
  7033. * Runtime helper for resolving filters
  7034. */
  7035. function resolveFilter (id) {
  7036. return resolveAsset(this.$options, 'filters', id, true) || identity
  7037. }
  7038. /* */
  7039. function isKeyNotMatch (expect, actual) {
  7040. if (Array.isArray(expect)) {
  7041. return expect.indexOf(actual) === -1
  7042. } else {
  7043. return expect !== actual
  7044. }
  7045. }
  7046. /**
  7047. * Runtime helper for checking keyCodes from config.
  7048. * exposed as Vue.prototype._k
  7049. * passing in eventKeyName as last argument separately for backwards compat
  7050. */
  7051. function checkKeyCodes (
  7052. eventKeyCode,
  7053. key,
  7054. builtInKeyCode,
  7055. eventKeyName,
  7056. builtInKeyName
  7057. ) {
  7058. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7059. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7060. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7061. } else if (mappedKeyCode) {
  7062. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7063. } else if (eventKeyName) {
  7064. return hyphenate(eventKeyName) !== key
  7065. }
  7066. }
  7067. /* */
  7068. /**
  7069. * Runtime helper for merging v-bind="object" into a VNode's data.
  7070. */
  7071. function bindObjectProps (
  7072. data,
  7073. tag,
  7074. value,
  7075. asProp,
  7076. isSync
  7077. ) {
  7078. if (value) {
  7079. if (!isObject(value)) {
  7080. true && warn(
  7081. 'v-bind without argument expects an Object or Array value',
  7082. this
  7083. );
  7084. } else {
  7085. if (Array.isArray(value)) {
  7086. value = toObject(value);
  7087. }
  7088. var hash;
  7089. var loop = function ( key ) {
  7090. if (
  7091. key === 'class' ||
  7092. key === 'style' ||
  7093. isReservedAttribute(key)
  7094. ) {
  7095. hash = data;
  7096. } else {
  7097. var type = data.attrs && data.attrs.type;
  7098. hash = asProp || config.mustUseProp(tag, type, key)
  7099. ? data.domProps || (data.domProps = {})
  7100. : data.attrs || (data.attrs = {});
  7101. }
  7102. var camelizedKey = camelize(key);
  7103. var hyphenatedKey = hyphenate(key);
  7104. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7105. hash[key] = value[key];
  7106. if (isSync) {
  7107. var on = data.on || (data.on = {});
  7108. on[("update:" + key)] = function ($event) {
  7109. value[key] = $event;
  7110. };
  7111. }
  7112. }
  7113. };
  7114. for (var key in value) loop( key );
  7115. }
  7116. }
  7117. return data
  7118. }
  7119. /* */
  7120. /**
  7121. * Runtime helper for rendering static trees.
  7122. */
  7123. function renderStatic (
  7124. index,
  7125. isInFor
  7126. ) {
  7127. var cached = this._staticTrees || (this._staticTrees = []);
  7128. var tree = cached[index];
  7129. // if has already-rendered static tree and not inside v-for,
  7130. // we can reuse the same tree.
  7131. if (tree && !isInFor) {
  7132. return tree
  7133. }
  7134. // otherwise, render a fresh tree.
  7135. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7136. this._renderProxy,
  7137. null,
  7138. this // for render fns generated for functional component templates
  7139. );
  7140. markStatic(tree, ("__static__" + index), false);
  7141. return tree
  7142. }
  7143. /**
  7144. * Runtime helper for v-once.
  7145. * Effectively it means marking the node as static with a unique key.
  7146. */
  7147. function markOnce (
  7148. tree,
  7149. index,
  7150. key
  7151. ) {
  7152. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7153. return tree
  7154. }
  7155. function markStatic (
  7156. tree,
  7157. key,
  7158. isOnce
  7159. ) {
  7160. if (Array.isArray(tree)) {
  7161. for (var i = 0; i < tree.length; i++) {
  7162. if (tree[i] && typeof tree[i] !== 'string') {
  7163. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7164. }
  7165. }
  7166. } else {
  7167. markStaticNode(tree, key, isOnce);
  7168. }
  7169. }
  7170. function markStaticNode (node, key, isOnce) {
  7171. node.isStatic = true;
  7172. node.key = key;
  7173. node.isOnce = isOnce;
  7174. }
  7175. /* */
  7176. function bindObjectListeners (data, value) {
  7177. if (value) {
  7178. if (!isPlainObject(value)) {
  7179. true && warn(
  7180. 'v-on without argument expects an Object value',
  7181. this
  7182. );
  7183. } else {
  7184. var on = data.on = data.on ? extend({}, data.on) : {};
  7185. for (var key in value) {
  7186. var existing = on[key];
  7187. var ours = value[key];
  7188. on[key] = existing ? [].concat(existing, ours) : ours;
  7189. }
  7190. }
  7191. }
  7192. return data
  7193. }
  7194. /* */
  7195. function resolveScopedSlots (
  7196. fns, // see flow/vnode
  7197. res,
  7198. // the following are added in 2.6
  7199. hasDynamicKeys,
  7200. contentHashKey
  7201. ) {
  7202. res = res || { $stable: !hasDynamicKeys };
  7203. for (var i = 0; i < fns.length; i++) {
  7204. var slot = fns[i];
  7205. if (Array.isArray(slot)) {
  7206. resolveScopedSlots(slot, res, hasDynamicKeys);
  7207. } else if (slot) {
  7208. // marker for reverse proxying v-slot without scope on this.$slots
  7209. if (slot.proxy) {
  7210. slot.fn.proxy = true;
  7211. }
  7212. res[slot.key] = slot.fn;
  7213. }
  7214. }
  7215. if (contentHashKey) {
  7216. (res).$key = contentHashKey;
  7217. }
  7218. return res
  7219. }
  7220. /* */
  7221. function bindDynamicKeys (baseObj, values) {
  7222. for (var i = 0; i < values.length; i += 2) {
  7223. var key = values[i];
  7224. if (typeof key === 'string' && key) {
  7225. baseObj[values[i]] = values[i + 1];
  7226. } else if ( true && key !== '' && key !== null) {
  7227. // null is a special value for explicitly removing a binding
  7228. warn(
  7229. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7230. this
  7231. );
  7232. }
  7233. }
  7234. return baseObj
  7235. }
  7236. // helper to dynamically append modifier runtime markers to event names.
  7237. // ensure only append when value is already string, otherwise it will be cast
  7238. // to string and cause the type check to miss.
  7239. function prependModifier (value, symbol) {
  7240. return typeof value === 'string' ? symbol + value : value
  7241. }
  7242. /* */
  7243. function installRenderHelpers (target) {
  7244. target._o = markOnce;
  7245. target._n = toNumber;
  7246. target._s = toString;
  7247. target._l = renderList;
  7248. target._t = renderSlot;
  7249. target._q = looseEqual;
  7250. target._i = looseIndexOf;
  7251. target._m = renderStatic;
  7252. target._f = resolveFilter;
  7253. target._k = checkKeyCodes;
  7254. target._b = bindObjectProps;
  7255. target._v = createTextVNode;
  7256. target._e = createEmptyVNode;
  7257. target._u = resolveScopedSlots;
  7258. target._g = bindObjectListeners;
  7259. target._d = bindDynamicKeys;
  7260. target._p = prependModifier;
  7261. }
  7262. /* */
  7263. function FunctionalRenderContext (
  7264. data,
  7265. props,
  7266. children,
  7267. parent,
  7268. Ctor
  7269. ) {
  7270. var this$1 = this;
  7271. var options = Ctor.options;
  7272. // ensure the createElement function in functional components
  7273. // gets a unique context - this is necessary for correct named slot check
  7274. var contextVm;
  7275. if (hasOwn(parent, '_uid')) {
  7276. contextVm = Object.create(parent);
  7277. // $flow-disable-line
  7278. contextVm._original = parent;
  7279. } else {
  7280. // the context vm passed in is a functional context as well.
  7281. // in this case we want to make sure we are able to get a hold to the
  7282. // real context instance.
  7283. contextVm = parent;
  7284. // $flow-disable-line
  7285. parent = parent._original;
  7286. }
  7287. var isCompiled = isTrue(options._compiled);
  7288. var needNormalization = !isCompiled;
  7289. this.data = data;
  7290. this.props = props;
  7291. this.children = children;
  7292. this.parent = parent;
  7293. this.listeners = data.on || emptyObject;
  7294. this.injections = resolveInject(options.inject, parent);
  7295. this.slots = function () {
  7296. if (!this$1.$slots) {
  7297. normalizeScopedSlots(
  7298. data.scopedSlots,
  7299. this$1.$slots = resolveSlots(children, parent)
  7300. );
  7301. }
  7302. return this$1.$slots
  7303. };
  7304. Object.defineProperty(this, 'scopedSlots', ({
  7305. enumerable: true,
  7306. get: function get () {
  7307. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7308. }
  7309. }));
  7310. // support for compiled functional template
  7311. if (isCompiled) {
  7312. // exposing $options for renderStatic()
  7313. this.$options = options;
  7314. // pre-resolve slots for renderSlot()
  7315. this.$slots = this.slots();
  7316. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7317. }
  7318. if (options._scopeId) {
  7319. this._c = function (a, b, c, d) {
  7320. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7321. if (vnode && !Array.isArray(vnode)) {
  7322. vnode.fnScopeId = options._scopeId;
  7323. vnode.fnContext = parent;
  7324. }
  7325. return vnode
  7326. };
  7327. } else {
  7328. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7329. }
  7330. }
  7331. installRenderHelpers(FunctionalRenderContext.prototype);
  7332. function createFunctionalComponent (
  7333. Ctor,
  7334. propsData,
  7335. data,
  7336. contextVm,
  7337. children
  7338. ) {
  7339. var options = Ctor.options;
  7340. var props = {};
  7341. var propOptions = options.props;
  7342. if (isDef(propOptions)) {
  7343. for (var key in propOptions) {
  7344. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7345. }
  7346. } else {
  7347. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7348. if (isDef(data.props)) { mergeProps(props, data.props); }
  7349. }
  7350. var renderContext = new FunctionalRenderContext(
  7351. data,
  7352. props,
  7353. children,
  7354. contextVm,
  7355. Ctor
  7356. );
  7357. var vnode = options.render.call(null, renderContext._c, renderContext);
  7358. if (vnode instanceof VNode) {
  7359. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7360. } else if (Array.isArray(vnode)) {
  7361. var vnodes = normalizeChildren(vnode) || [];
  7362. var res = new Array(vnodes.length);
  7363. for (var i = 0; i < vnodes.length; i++) {
  7364. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7365. }
  7366. return res
  7367. }
  7368. }
  7369. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7370. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7371. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7372. // that should not be matched to match.
  7373. var clone = cloneVNode(vnode);
  7374. clone.fnContext = contextVm;
  7375. clone.fnOptions = options;
  7376. if (true) {
  7377. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7378. }
  7379. if (data.slot) {
  7380. (clone.data || (clone.data = {})).slot = data.slot;
  7381. }
  7382. return clone
  7383. }
  7384. function mergeProps (to, from) {
  7385. for (var key in from) {
  7386. to[camelize(key)] = from[key];
  7387. }
  7388. }
  7389. /* */
  7390. /* */
  7391. /* */
  7392. /* */
  7393. // inline hooks to be invoked on component VNodes during patch
  7394. var componentVNodeHooks = {
  7395. init: function init (vnode, hydrating) {
  7396. if (
  7397. vnode.componentInstance &&
  7398. !vnode.componentInstance._isDestroyed &&
  7399. vnode.data.keepAlive
  7400. ) {
  7401. // kept-alive components, treat as a patch
  7402. var mountedNode = vnode; // work around flow
  7403. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7404. } else {
  7405. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7406. vnode,
  7407. activeInstance
  7408. );
  7409. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7410. }
  7411. },
  7412. prepatch: function prepatch (oldVnode, vnode) {
  7413. var options = vnode.componentOptions;
  7414. var child = vnode.componentInstance = oldVnode.componentInstance;
  7415. updateChildComponent(
  7416. child,
  7417. options.propsData, // updated props
  7418. options.listeners, // updated listeners
  7419. vnode, // new parent vnode
  7420. options.children // new children
  7421. );
  7422. },
  7423. insert: function insert (vnode) {
  7424. var context = vnode.context;
  7425. var componentInstance = vnode.componentInstance;
  7426. if (!componentInstance._isMounted) {
  7427. callHook(componentInstance, 'onServiceCreated');
  7428. callHook(componentInstance, 'onServiceAttached');
  7429. componentInstance._isMounted = true;
  7430. callHook(componentInstance, 'mounted');
  7431. }
  7432. if (vnode.data.keepAlive) {
  7433. if (context._isMounted) {
  7434. // vue-router#1212
  7435. // During updates, a kept-alive component's child components may
  7436. // change, so directly walking the tree here may call activated hooks
  7437. // on incorrect children. Instead we push them into a queue which will
  7438. // be processed after the whole patch process ended.
  7439. queueActivatedComponent(componentInstance);
  7440. } else {
  7441. activateChildComponent(componentInstance, true /* direct */);
  7442. }
  7443. }
  7444. },
  7445. destroy: function destroy (vnode) {
  7446. var componentInstance = vnode.componentInstance;
  7447. if (!componentInstance._isDestroyed) {
  7448. if (!vnode.data.keepAlive) {
  7449. componentInstance.$destroy();
  7450. } else {
  7451. deactivateChildComponent(componentInstance, true /* direct */);
  7452. }
  7453. }
  7454. }
  7455. };
  7456. var hooksToMerge = Object.keys(componentVNodeHooks);
  7457. function createComponent (
  7458. Ctor,
  7459. data,
  7460. context,
  7461. children,
  7462. tag
  7463. ) {
  7464. if (isUndef(Ctor)) {
  7465. return
  7466. }
  7467. var baseCtor = context.$options._base;
  7468. // plain options object: turn it into a constructor
  7469. if (isObject(Ctor)) {
  7470. Ctor = baseCtor.extend(Ctor);
  7471. }
  7472. // if at this stage it's not a constructor or an async component factory,
  7473. // reject.
  7474. if (typeof Ctor !== 'function') {
  7475. if (true) {
  7476. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7477. }
  7478. return
  7479. }
  7480. // async component
  7481. var asyncFactory;
  7482. if (isUndef(Ctor.cid)) {
  7483. asyncFactory = Ctor;
  7484. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7485. if (Ctor === undefined) {
  7486. // return a placeholder node for async component, which is rendered
  7487. // as a comment node but preserves all the raw information for the node.
  7488. // the information will be used for async server-rendering and hydration.
  7489. return createAsyncPlaceholder(
  7490. asyncFactory,
  7491. data,
  7492. context,
  7493. children,
  7494. tag
  7495. )
  7496. }
  7497. }
  7498. data = data || {};
  7499. // resolve constructor options in case global mixins are applied after
  7500. // component constructor creation
  7501. resolveConstructorOptions(Ctor);
  7502. // transform component v-model data into props & events
  7503. if (isDef(data.model)) {
  7504. transformModel(Ctor.options, data);
  7505. }
  7506. // extract props
  7507. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7508. // functional component
  7509. if (isTrue(Ctor.options.functional)) {
  7510. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7511. }
  7512. // extract listeners, since these needs to be treated as
  7513. // child component listeners instead of DOM listeners
  7514. var listeners = data.on;
  7515. // replace with listeners with .native modifier
  7516. // so it gets processed during parent component patch.
  7517. data.on = data.nativeOn;
  7518. if (isTrue(Ctor.options.abstract)) {
  7519. // abstract components do not keep anything
  7520. // other than props & listeners & slot
  7521. // work around flow
  7522. var slot = data.slot;
  7523. data = {};
  7524. if (slot) {
  7525. data.slot = slot;
  7526. }
  7527. }
  7528. // install component management hooks onto the placeholder node
  7529. installComponentHooks(data);
  7530. // return a placeholder vnode
  7531. var name = Ctor.options.name || tag;
  7532. var vnode = new VNode(
  7533. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7534. data, undefined, undefined, undefined, context,
  7535. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7536. asyncFactory
  7537. );
  7538. return vnode
  7539. }
  7540. function createComponentInstanceForVnode (
  7541. vnode, // we know it's MountedComponentVNode but flow doesn't
  7542. parent // activeInstance in lifecycle state
  7543. ) {
  7544. var options = {
  7545. _isComponent: true,
  7546. _parentVnode: vnode,
  7547. parent: parent
  7548. };
  7549. // check inline-template render functions
  7550. var inlineTemplate = vnode.data.inlineTemplate;
  7551. if (isDef(inlineTemplate)) {
  7552. options.render = inlineTemplate.render;
  7553. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7554. }
  7555. return new vnode.componentOptions.Ctor(options)
  7556. }
  7557. function installComponentHooks (data) {
  7558. var hooks = data.hook || (data.hook = {});
  7559. for (var i = 0; i < hooksToMerge.length; i++) {
  7560. var key = hooksToMerge[i];
  7561. var existing = hooks[key];
  7562. var toMerge = componentVNodeHooks[key];
  7563. if (existing !== toMerge && !(existing && existing._merged)) {
  7564. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7565. }
  7566. }
  7567. }
  7568. function mergeHook$1 (f1, f2) {
  7569. var merged = function (a, b) {
  7570. // flow complains about extra args which is why we use any
  7571. f1(a, b);
  7572. f2(a, b);
  7573. };
  7574. merged._merged = true;
  7575. return merged
  7576. }
  7577. // transform component v-model info (value and callback) into
  7578. // prop and event handler respectively.
  7579. function transformModel (options, data) {
  7580. var prop = (options.model && options.model.prop) || 'value';
  7581. var event = (options.model && options.model.event) || 'input'
  7582. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7583. var on = data.on || (data.on = {});
  7584. var existing = on[event];
  7585. var callback = data.model.callback;
  7586. if (isDef(existing)) {
  7587. if (
  7588. Array.isArray(existing)
  7589. ? existing.indexOf(callback) === -1
  7590. : existing !== callback
  7591. ) {
  7592. on[event] = [callback].concat(existing);
  7593. }
  7594. } else {
  7595. on[event] = callback;
  7596. }
  7597. }
  7598. /* */
  7599. var SIMPLE_NORMALIZE = 1;
  7600. var ALWAYS_NORMALIZE = 2;
  7601. // wrapper function for providing a more flexible interface
  7602. // without getting yelled at by flow
  7603. function createElement (
  7604. context,
  7605. tag,
  7606. data,
  7607. children,
  7608. normalizationType,
  7609. alwaysNormalize
  7610. ) {
  7611. if (Array.isArray(data) || isPrimitive(data)) {
  7612. normalizationType = children;
  7613. children = data;
  7614. data = undefined;
  7615. }
  7616. if (isTrue(alwaysNormalize)) {
  7617. normalizationType = ALWAYS_NORMALIZE;
  7618. }
  7619. return _createElement(context, tag, data, children, normalizationType)
  7620. }
  7621. function _createElement (
  7622. context,
  7623. tag,
  7624. data,
  7625. children,
  7626. normalizationType
  7627. ) {
  7628. if (isDef(data) && isDef((data).__ob__)) {
  7629. true && warn(
  7630. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7631. 'Always create fresh vnode data objects in each render!',
  7632. context
  7633. );
  7634. return createEmptyVNode()
  7635. }
  7636. // object syntax in v-bind
  7637. if (isDef(data) && isDef(data.is)) {
  7638. tag = data.is;
  7639. }
  7640. if (!tag) {
  7641. // in case of component :is set to falsy value
  7642. return createEmptyVNode()
  7643. }
  7644. // warn against non-primitive key
  7645. if ( true &&
  7646. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7647. ) {
  7648. {
  7649. warn(
  7650. 'Avoid using non-primitive value as key, ' +
  7651. 'use string/number value instead.',
  7652. context
  7653. );
  7654. }
  7655. }
  7656. // support single function children as default scoped slot
  7657. if (Array.isArray(children) &&
  7658. typeof children[0] === 'function'
  7659. ) {
  7660. data = data || {};
  7661. data.scopedSlots = { default: children[0] };
  7662. children.length = 0;
  7663. }
  7664. if (normalizationType === ALWAYS_NORMALIZE) {
  7665. children = normalizeChildren(children);
  7666. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7667. children = simpleNormalizeChildren(children);
  7668. }
  7669. var vnode, ns;
  7670. if (typeof tag === 'string') {
  7671. var Ctor;
  7672. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7673. if (config.isReservedTag(tag)) {
  7674. // platform built-in elements
  7675. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7676. warn(
  7677. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7678. context
  7679. );
  7680. }
  7681. vnode = new VNode(
  7682. config.parsePlatformTagName(tag), data, children,
  7683. undefined, undefined, context
  7684. );
  7685. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7686. // component
  7687. vnode = createComponent(Ctor, data, context, children, tag);
  7688. } else {
  7689. // unknown or unlisted namespaced elements
  7690. // check at runtime because it may get assigned a namespace when its
  7691. // parent normalizes children
  7692. vnode = new VNode(
  7693. tag, data, children,
  7694. undefined, undefined, context
  7695. );
  7696. }
  7697. } else {
  7698. // direct component options / constructor
  7699. vnode = createComponent(tag, data, context, children);
  7700. }
  7701. if (Array.isArray(vnode)) {
  7702. return vnode
  7703. } else if (isDef(vnode)) {
  7704. if (isDef(ns)) { applyNS(vnode, ns); }
  7705. if (isDef(data)) { registerDeepBindings(data); }
  7706. return vnode
  7707. } else {
  7708. return createEmptyVNode()
  7709. }
  7710. }
  7711. function applyNS (vnode, ns, force) {
  7712. vnode.ns = ns;
  7713. if (vnode.tag === 'foreignObject') {
  7714. // use default namespace inside foreignObject
  7715. ns = undefined;
  7716. force = true;
  7717. }
  7718. if (isDef(vnode.children)) {
  7719. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7720. var child = vnode.children[i];
  7721. if (isDef(child.tag) && (
  7722. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7723. applyNS(child, ns, force);
  7724. }
  7725. }
  7726. }
  7727. }
  7728. // ref #5318
  7729. // necessary to ensure parent re-render when deep bindings like :style and
  7730. // :class are used on slot nodes
  7731. function registerDeepBindings (data) {
  7732. if (isObject(data.style)) {
  7733. traverse(data.style);
  7734. }
  7735. if (isObject(data.class)) {
  7736. traverse(data.class);
  7737. }
  7738. }
  7739. /* */
  7740. function initRender (vm) {
  7741. vm._vnode = null; // the root of the child tree
  7742. vm._staticTrees = null; // v-once cached trees
  7743. var options = vm.$options;
  7744. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7745. var renderContext = parentVnode && parentVnode.context;
  7746. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7747. vm.$scopedSlots = emptyObject;
  7748. // bind the createElement fn to this instance
  7749. // so that we get proper render context inside it.
  7750. // args order: tag, data, children, normalizationType, alwaysNormalize
  7751. // internal version is used by render functions compiled from templates
  7752. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7753. // normalization is always applied for the public version, used in
  7754. // user-written render functions.
  7755. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7756. // $attrs & $listeners are exposed for easier HOC creation.
  7757. // they need to be reactive so that HOCs using them are always updated
  7758. var parentData = parentVnode && parentVnode.data;
  7759. /* istanbul ignore else */
  7760. if (true) {
  7761. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7762. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7763. }, true);
  7764. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7765. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7766. }, true);
  7767. } else {}
  7768. }
  7769. var currentRenderingInstance = null;
  7770. function renderMixin (Vue) {
  7771. // install runtime convenience helpers
  7772. installRenderHelpers(Vue.prototype);
  7773. Vue.prototype.$nextTick = function (fn) {
  7774. return nextTick(fn, this)
  7775. };
  7776. Vue.prototype._render = function () {
  7777. var vm = this;
  7778. var ref = vm.$options;
  7779. var render = ref.render;
  7780. var _parentVnode = ref._parentVnode;
  7781. if (_parentVnode) {
  7782. vm.$scopedSlots = normalizeScopedSlots(
  7783. _parentVnode.data.scopedSlots,
  7784. vm.$slots,
  7785. vm.$scopedSlots
  7786. );
  7787. }
  7788. // set parent vnode. this allows render functions to have access
  7789. // to the data on the placeholder node.
  7790. vm.$vnode = _parentVnode;
  7791. // render self
  7792. var vnode;
  7793. try {
  7794. // There's no need to maintain a stack because all render fns are called
  7795. // separately from one another. Nested component's render fns are called
  7796. // when parent component is patched.
  7797. currentRenderingInstance = vm;
  7798. vnode = render.call(vm._renderProxy, vm.$createElement);
  7799. } catch (e) {
  7800. handleError(e, vm, "render");
  7801. // return error render result,
  7802. // or previous vnode to prevent render error causing blank component
  7803. /* istanbul ignore else */
  7804. if ( true && vm.$options.renderError) {
  7805. try {
  7806. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7807. } catch (e) {
  7808. handleError(e, vm, "renderError");
  7809. vnode = vm._vnode;
  7810. }
  7811. } else {
  7812. vnode = vm._vnode;
  7813. }
  7814. } finally {
  7815. currentRenderingInstance = null;
  7816. }
  7817. // if the returned array contains only a single node, allow it
  7818. if (Array.isArray(vnode) && vnode.length === 1) {
  7819. vnode = vnode[0];
  7820. }
  7821. // return empty vnode in case the render function errored out
  7822. if (!(vnode instanceof VNode)) {
  7823. if ( true && Array.isArray(vnode)) {
  7824. warn(
  7825. 'Multiple root nodes returned from render function. Render function ' +
  7826. 'should return a single root node.',
  7827. vm
  7828. );
  7829. }
  7830. vnode = createEmptyVNode();
  7831. }
  7832. // set parent
  7833. vnode.parent = _parentVnode;
  7834. return vnode
  7835. };
  7836. }
  7837. /* */
  7838. function ensureCtor (comp, base) {
  7839. if (
  7840. comp.__esModule ||
  7841. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7842. ) {
  7843. comp = comp.default;
  7844. }
  7845. return isObject(comp)
  7846. ? base.extend(comp)
  7847. : comp
  7848. }
  7849. function createAsyncPlaceholder (
  7850. factory,
  7851. data,
  7852. context,
  7853. children,
  7854. tag
  7855. ) {
  7856. var node = createEmptyVNode();
  7857. node.asyncFactory = factory;
  7858. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7859. return node
  7860. }
  7861. function resolveAsyncComponent (
  7862. factory,
  7863. baseCtor
  7864. ) {
  7865. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7866. return factory.errorComp
  7867. }
  7868. if (isDef(factory.resolved)) {
  7869. return factory.resolved
  7870. }
  7871. var owner = currentRenderingInstance;
  7872. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7873. // already pending
  7874. factory.owners.push(owner);
  7875. }
  7876. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7877. return factory.loadingComp
  7878. }
  7879. if (owner && !isDef(factory.owners)) {
  7880. var owners = factory.owners = [owner];
  7881. var sync = true;
  7882. var timerLoading = null;
  7883. var timerTimeout = null
  7884. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7885. var forceRender = function (renderCompleted) {
  7886. for (var i = 0, l = owners.length; i < l; i++) {
  7887. (owners[i]).$forceUpdate();
  7888. }
  7889. if (renderCompleted) {
  7890. owners.length = 0;
  7891. if (timerLoading !== null) {
  7892. clearTimeout(timerLoading);
  7893. timerLoading = null;
  7894. }
  7895. if (timerTimeout !== null) {
  7896. clearTimeout(timerTimeout);
  7897. timerTimeout = null;
  7898. }
  7899. }
  7900. };
  7901. var resolve = once(function (res) {
  7902. // cache resolved
  7903. factory.resolved = ensureCtor(res, baseCtor);
  7904. // invoke callbacks only if this is not a synchronous resolve
  7905. // (async resolves are shimmed as synchronous during SSR)
  7906. if (!sync) {
  7907. forceRender(true);
  7908. } else {
  7909. owners.length = 0;
  7910. }
  7911. });
  7912. var reject = once(function (reason) {
  7913. true && warn(
  7914. "Failed to resolve async component: " + (String(factory)) +
  7915. (reason ? ("\nReason: " + reason) : '')
  7916. );
  7917. if (isDef(factory.errorComp)) {
  7918. factory.error = true;
  7919. forceRender(true);
  7920. }
  7921. });
  7922. var res = factory(resolve, reject);
  7923. if (isObject(res)) {
  7924. if (isPromise(res)) {
  7925. // () => Promise
  7926. if (isUndef(factory.resolved)) {
  7927. res.then(resolve, reject);
  7928. }
  7929. } else if (isPromise(res.component)) {
  7930. res.component.then(resolve, reject);
  7931. if (isDef(res.error)) {
  7932. factory.errorComp = ensureCtor(res.error, baseCtor);
  7933. }
  7934. if (isDef(res.loading)) {
  7935. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7936. if (res.delay === 0) {
  7937. factory.loading = true;
  7938. } else {
  7939. timerLoading = setTimeout(function () {
  7940. timerLoading = null;
  7941. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7942. factory.loading = true;
  7943. forceRender(false);
  7944. }
  7945. }, res.delay || 200);
  7946. }
  7947. }
  7948. if (isDef(res.timeout)) {
  7949. timerTimeout = setTimeout(function () {
  7950. timerTimeout = null;
  7951. if (isUndef(factory.resolved)) {
  7952. reject(
  7953. true
  7954. ? ("timeout (" + (res.timeout) + "ms)")
  7955. : undefined
  7956. );
  7957. }
  7958. }, res.timeout);
  7959. }
  7960. }
  7961. }
  7962. sync = false;
  7963. // return in case resolved synchronously
  7964. return factory.loading
  7965. ? factory.loadingComp
  7966. : factory.resolved
  7967. }
  7968. }
  7969. /* */
  7970. function isAsyncPlaceholder (node) {
  7971. return node.isComment && node.asyncFactory
  7972. }
  7973. /* */
  7974. function getFirstComponentChild (children) {
  7975. if (Array.isArray(children)) {
  7976. for (var i = 0; i < children.length; i++) {
  7977. var c = children[i];
  7978. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7979. return c
  7980. }
  7981. }
  7982. }
  7983. }
  7984. /* */
  7985. /* */
  7986. function initEvents (vm) {
  7987. vm._events = Object.create(null);
  7988. vm._hasHookEvent = false;
  7989. // init parent attached events
  7990. var listeners = vm.$options._parentListeners;
  7991. if (listeners) {
  7992. updateComponentListeners(vm, listeners);
  7993. }
  7994. }
  7995. var target;
  7996. function add (event, fn) {
  7997. target.$on(event, fn);
  7998. }
  7999. function remove$1 (event, fn) {
  8000. target.$off(event, fn);
  8001. }
  8002. function createOnceHandler (event, fn) {
  8003. var _target = target;
  8004. return function onceHandler () {
  8005. var res = fn.apply(null, arguments);
  8006. if (res !== null) {
  8007. _target.$off(event, onceHandler);
  8008. }
  8009. }
  8010. }
  8011. function updateComponentListeners (
  8012. vm,
  8013. listeners,
  8014. oldListeners
  8015. ) {
  8016. target = vm;
  8017. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8018. target = undefined;
  8019. }
  8020. function eventsMixin (Vue) {
  8021. var hookRE = /^hook:/;
  8022. Vue.prototype.$on = function (event, fn) {
  8023. var vm = this;
  8024. if (Array.isArray(event)) {
  8025. for (var i = 0, l = event.length; i < l; i++) {
  8026. vm.$on(event[i], fn);
  8027. }
  8028. } else {
  8029. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8030. // optimize hook:event cost by using a boolean flag marked at registration
  8031. // instead of a hash lookup
  8032. if (hookRE.test(event)) {
  8033. vm._hasHookEvent = true;
  8034. }
  8035. }
  8036. return vm
  8037. };
  8038. Vue.prototype.$once = function (event, fn) {
  8039. var vm = this;
  8040. function on () {
  8041. vm.$off(event, on);
  8042. fn.apply(vm, arguments);
  8043. }
  8044. on.fn = fn;
  8045. vm.$on(event, on);
  8046. return vm
  8047. };
  8048. Vue.prototype.$off = function (event, fn) {
  8049. var vm = this;
  8050. // all
  8051. if (!arguments.length) {
  8052. vm._events = Object.create(null);
  8053. return vm
  8054. }
  8055. // array of events
  8056. if (Array.isArray(event)) {
  8057. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8058. vm.$off(event[i$1], fn);
  8059. }
  8060. return vm
  8061. }
  8062. // specific event
  8063. var cbs = vm._events[event];
  8064. if (!cbs) {
  8065. return vm
  8066. }
  8067. if (!fn) {
  8068. vm._events[event] = null;
  8069. return vm
  8070. }
  8071. // specific handler
  8072. var cb;
  8073. var i = cbs.length;
  8074. while (i--) {
  8075. cb = cbs[i];
  8076. if (cb === fn || cb.fn === fn) {
  8077. cbs.splice(i, 1);
  8078. break
  8079. }
  8080. }
  8081. return vm
  8082. };
  8083. Vue.prototype.$emit = function (event) {
  8084. var vm = this;
  8085. if (true) {
  8086. var lowerCaseEvent = event.toLowerCase();
  8087. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8088. tip(
  8089. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8090. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8091. "Note that HTML attributes are case-insensitive and you cannot use " +
  8092. "v-on to listen to camelCase events when using in-DOM templates. " +
  8093. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8094. );
  8095. }
  8096. }
  8097. var cbs = vm._events[event];
  8098. if (cbs) {
  8099. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8100. var args = toArray(arguments, 1);
  8101. var info = "event handler for \"" + event + "\"";
  8102. for (var i = 0, l = cbs.length; i < l; i++) {
  8103. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8104. }
  8105. }
  8106. return vm
  8107. };
  8108. }
  8109. /* */
  8110. var activeInstance = null;
  8111. var isUpdatingChildComponent = false;
  8112. function setActiveInstance(vm) {
  8113. var prevActiveInstance = activeInstance;
  8114. activeInstance = vm;
  8115. return function () {
  8116. activeInstance = prevActiveInstance;
  8117. }
  8118. }
  8119. function initLifecycle (vm) {
  8120. var options = vm.$options;
  8121. // locate first non-abstract parent
  8122. var parent = options.parent;
  8123. if (parent && !options.abstract) {
  8124. while (parent.$options.abstract && parent.$parent) {
  8125. parent = parent.$parent;
  8126. }
  8127. parent.$children.push(vm);
  8128. }
  8129. vm.$parent = parent;
  8130. vm.$root = parent ? parent.$root : vm;
  8131. vm.$children = [];
  8132. vm.$refs = {};
  8133. vm._watcher = null;
  8134. vm._inactive = null;
  8135. vm._directInactive = false;
  8136. vm._isMounted = false;
  8137. vm._isDestroyed = false;
  8138. vm._isBeingDestroyed = false;
  8139. }
  8140. function lifecycleMixin (Vue) {
  8141. Vue.prototype._update = function (vnode, hydrating) {
  8142. var vm = this;
  8143. var prevEl = vm.$el;
  8144. var prevVnode = vm._vnode;
  8145. var restoreActiveInstance = setActiveInstance(vm);
  8146. vm._vnode = vnode;
  8147. // Vue.prototype.__patch__ is injected in entry points
  8148. // based on the rendering backend used.
  8149. if (!prevVnode) {
  8150. // initial render
  8151. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8152. } else {
  8153. // updates
  8154. vm.$el = vm.__patch__(prevVnode, vnode);
  8155. }
  8156. restoreActiveInstance();
  8157. // update __vue__ reference
  8158. if (prevEl) {
  8159. prevEl.__vue__ = null;
  8160. }
  8161. if (vm.$el) {
  8162. vm.$el.__vue__ = vm;
  8163. }
  8164. // if parent is an HOC, update its $el as well
  8165. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8166. vm.$parent.$el = vm.$el;
  8167. }
  8168. // updated hook is called by the scheduler to ensure that children are
  8169. // updated in a parent's updated hook.
  8170. };
  8171. Vue.prototype.$forceUpdate = function () {
  8172. var vm = this;
  8173. if (vm._watcher) {
  8174. vm._watcher.update();
  8175. }
  8176. };
  8177. Vue.prototype.$destroy = function () {
  8178. var vm = this;
  8179. if (vm._isBeingDestroyed) {
  8180. return
  8181. }
  8182. callHook(vm, 'beforeDestroy');
  8183. vm._isBeingDestroyed = true;
  8184. // remove self from parent
  8185. var parent = vm.$parent;
  8186. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8187. remove(parent.$children, vm);
  8188. }
  8189. // teardown watchers
  8190. if (vm._watcher) {
  8191. vm._watcher.teardown();
  8192. }
  8193. var i = vm._watchers.length;
  8194. while (i--) {
  8195. vm._watchers[i].teardown();
  8196. }
  8197. // remove reference from data ob
  8198. // frozen object may not have observer.
  8199. if (vm._data.__ob__) {
  8200. vm._data.__ob__.vmCount--;
  8201. }
  8202. // call the last hook...
  8203. vm._isDestroyed = true;
  8204. // invoke destroy hooks on current rendered tree
  8205. vm.__patch__(vm._vnode, null);
  8206. // fire destroyed hook
  8207. callHook(vm, 'destroyed');
  8208. // turn off all instance listeners.
  8209. vm.$off();
  8210. // remove __vue__ reference
  8211. if (vm.$el) {
  8212. vm.$el.__vue__ = null;
  8213. }
  8214. // release circular reference (#6759)
  8215. if (vm.$vnode) {
  8216. vm.$vnode.parent = null;
  8217. }
  8218. };
  8219. }
  8220. function updateChildComponent (
  8221. vm,
  8222. propsData,
  8223. listeners,
  8224. parentVnode,
  8225. renderChildren
  8226. ) {
  8227. if (true) {
  8228. isUpdatingChildComponent = true;
  8229. }
  8230. // determine whether component has slot children
  8231. // we need to do this before overwriting $options._renderChildren.
  8232. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8233. // dynamic slot names). Static scoped slots compiled from template has the
  8234. // "$stable" marker.
  8235. var newScopedSlots = parentVnode.data.scopedSlots;
  8236. var oldScopedSlots = vm.$scopedSlots;
  8237. var hasDynamicScopedSlot = !!(
  8238. (newScopedSlots && !newScopedSlots.$stable) ||
  8239. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8240. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8241. );
  8242. // Any static slot children from the parent may have changed during parent's
  8243. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8244. // update is necessary to ensure correctness.
  8245. var needsForceUpdate = !!(
  8246. renderChildren || // has new static slots
  8247. vm.$options._renderChildren || // has old static slots
  8248. hasDynamicScopedSlot
  8249. );
  8250. vm.$options._parentVnode = parentVnode;
  8251. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8252. if (vm._vnode) { // update child tree's parent
  8253. vm._vnode.parent = parentVnode;
  8254. }
  8255. vm.$options._renderChildren = renderChildren;
  8256. // update $attrs and $listeners hash
  8257. // these are also reactive so they may trigger child update if the child
  8258. // used them during render
  8259. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8260. vm.$listeners = listeners || emptyObject;
  8261. // update props
  8262. if (propsData && vm.$options.props) {
  8263. toggleObserving(false);
  8264. var props = vm._props;
  8265. var propKeys = vm.$options._propKeys || [];
  8266. for (var i = 0; i < propKeys.length; i++) {
  8267. var key = propKeys[i];
  8268. var propOptions = vm.$options.props; // wtf flow?
  8269. props[key] = validateProp(key, propOptions, propsData, vm);
  8270. }
  8271. toggleObserving(true);
  8272. // keep a copy of raw propsData
  8273. vm.$options.propsData = propsData;
  8274. }
  8275. // fixed by xxxxxx update properties(mp runtime)
  8276. vm._$updateProperties && vm._$updateProperties(vm);
  8277. // update listeners
  8278. listeners = listeners || emptyObject;
  8279. var oldListeners = vm.$options._parentListeners;
  8280. vm.$options._parentListeners = listeners;
  8281. updateComponentListeners(vm, listeners, oldListeners);
  8282. // resolve slots + force update if has children
  8283. if (needsForceUpdate) {
  8284. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8285. vm.$forceUpdate();
  8286. }
  8287. if (true) {
  8288. isUpdatingChildComponent = false;
  8289. }
  8290. }
  8291. function isInInactiveTree (vm) {
  8292. while (vm && (vm = vm.$parent)) {
  8293. if (vm._inactive) { return true }
  8294. }
  8295. return false
  8296. }
  8297. function activateChildComponent (vm, direct) {
  8298. if (direct) {
  8299. vm._directInactive = false;
  8300. if (isInInactiveTree(vm)) {
  8301. return
  8302. }
  8303. } else if (vm._directInactive) {
  8304. return
  8305. }
  8306. if (vm._inactive || vm._inactive === null) {
  8307. vm._inactive = false;
  8308. for (var i = 0; i < vm.$children.length; i++) {
  8309. activateChildComponent(vm.$children[i]);
  8310. }
  8311. callHook(vm, 'activated');
  8312. }
  8313. }
  8314. function deactivateChildComponent (vm, direct) {
  8315. if (direct) {
  8316. vm._directInactive = true;
  8317. if (isInInactiveTree(vm)) {
  8318. return
  8319. }
  8320. }
  8321. if (!vm._inactive) {
  8322. vm._inactive = true;
  8323. for (var i = 0; i < vm.$children.length; i++) {
  8324. deactivateChildComponent(vm.$children[i]);
  8325. }
  8326. callHook(vm, 'deactivated');
  8327. }
  8328. }
  8329. function callHook (vm, hook) {
  8330. // #7573 disable dep collection when invoking lifecycle hooks
  8331. pushTarget();
  8332. var handlers = vm.$options[hook];
  8333. var info = hook + " hook";
  8334. if (handlers) {
  8335. for (var i = 0, j = handlers.length; i < j; i++) {
  8336. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8337. }
  8338. }
  8339. if (vm._hasHookEvent) {
  8340. vm.$emit('hook:' + hook);
  8341. }
  8342. popTarget();
  8343. }
  8344. /* */
  8345. var MAX_UPDATE_COUNT = 100;
  8346. var queue = [];
  8347. var activatedChildren = [];
  8348. var has = {};
  8349. var circular = {};
  8350. var waiting = false;
  8351. var flushing = false;
  8352. var index = 0;
  8353. /**
  8354. * Reset the scheduler's state.
  8355. */
  8356. function resetSchedulerState () {
  8357. index = queue.length = activatedChildren.length = 0;
  8358. has = {};
  8359. if (true) {
  8360. circular = {};
  8361. }
  8362. waiting = flushing = false;
  8363. }
  8364. // Async edge case #6566 requires saving the timestamp when event listeners are
  8365. // attached. However, calling performance.now() has a perf overhead especially
  8366. // if the page has thousands of event listeners. Instead, we take a timestamp
  8367. // every time the scheduler flushes and use that for all event listeners
  8368. // attached during that flush.
  8369. var currentFlushTimestamp = 0;
  8370. // Async edge case fix requires storing an event listener's attach timestamp.
  8371. var getNow = Date.now;
  8372. // Determine what event timestamp the browser is using. Annoyingly, the
  8373. // timestamp can either be hi-res (relative to page load) or low-res
  8374. // (relative to UNIX epoch), so in order to compare time we have to use the
  8375. // same timestamp type when saving the flush timestamp.
  8376. // All IE versions use low-res event timestamps, and have problematic clock
  8377. // implementations (#9632)
  8378. if (inBrowser && !isIE) {
  8379. var performance = window.performance;
  8380. if (
  8381. performance &&
  8382. typeof performance.now === 'function' &&
  8383. getNow() > document.createEvent('Event').timeStamp
  8384. ) {
  8385. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8386. // smaller than it, it means the event is using a hi-res timestamp,
  8387. // and we need to use the hi-res version for event listener timestamps as
  8388. // well.
  8389. getNow = function () { return performance.now(); };
  8390. }
  8391. }
  8392. /**
  8393. * Flush both queues and run the watchers.
  8394. */
  8395. function flushSchedulerQueue () {
  8396. currentFlushTimestamp = getNow();
  8397. flushing = true;
  8398. var watcher, id;
  8399. // Sort queue before flush.
  8400. // This ensures that:
  8401. // 1. Components are updated from parent to child. (because parent is always
  8402. // created before the child)
  8403. // 2. A component's user watchers are run before its render watcher (because
  8404. // user watchers are created before the render watcher)
  8405. // 3. If a component is destroyed during a parent component's watcher run,
  8406. // its watchers can be skipped.
  8407. queue.sort(function (a, b) { return a.id - b.id; });
  8408. // do not cache length because more watchers might be pushed
  8409. // as we run existing watchers
  8410. for (index = 0; index < queue.length; index++) {
  8411. watcher = queue[index];
  8412. if (watcher.before) {
  8413. watcher.before();
  8414. }
  8415. id = watcher.id;
  8416. has[id] = null;
  8417. watcher.run();
  8418. // in dev build, check and stop circular updates.
  8419. if ( true && has[id] != null) {
  8420. circular[id] = (circular[id] || 0) + 1;
  8421. if (circular[id] > MAX_UPDATE_COUNT) {
  8422. warn(
  8423. 'You may have an infinite update loop ' + (
  8424. watcher.user
  8425. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8426. : "in a component render function."
  8427. ),
  8428. watcher.vm
  8429. );
  8430. break
  8431. }
  8432. }
  8433. }
  8434. // keep copies of post queues before resetting state
  8435. var activatedQueue = activatedChildren.slice();
  8436. var updatedQueue = queue.slice();
  8437. resetSchedulerState();
  8438. // call component updated and activated hooks
  8439. callActivatedHooks(activatedQueue);
  8440. callUpdatedHooks(updatedQueue);
  8441. // devtool hook
  8442. /* istanbul ignore if */
  8443. if (devtools && config.devtools) {
  8444. devtools.emit('flush');
  8445. }
  8446. }
  8447. function callUpdatedHooks (queue) {
  8448. var i = queue.length;
  8449. while (i--) {
  8450. var watcher = queue[i];
  8451. var vm = watcher.vm;
  8452. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8453. callHook(vm, 'updated');
  8454. }
  8455. }
  8456. }
  8457. /**
  8458. * Queue a kept-alive component that was activated during patch.
  8459. * The queue will be processed after the entire tree has been patched.
  8460. */
  8461. function queueActivatedComponent (vm) {
  8462. // setting _inactive to false here so that a render function can
  8463. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8464. vm._inactive = false;
  8465. activatedChildren.push(vm);
  8466. }
  8467. function callActivatedHooks (queue) {
  8468. for (var i = 0; i < queue.length; i++) {
  8469. queue[i]._inactive = true;
  8470. activateChildComponent(queue[i], true /* true */);
  8471. }
  8472. }
  8473. /**
  8474. * Push a watcher into the watcher queue.
  8475. * Jobs with duplicate IDs will be skipped unless it's
  8476. * pushed when the queue is being flushed.
  8477. */
  8478. function queueWatcher (watcher) {
  8479. var id = watcher.id;
  8480. if (has[id] == null) {
  8481. has[id] = true;
  8482. if (!flushing) {
  8483. queue.push(watcher);
  8484. } else {
  8485. // if already flushing, splice the watcher based on its id
  8486. // if already past its id, it will be run next immediately.
  8487. var i = queue.length - 1;
  8488. while (i > index && queue[i].id > watcher.id) {
  8489. i--;
  8490. }
  8491. queue.splice(i + 1, 0, watcher);
  8492. }
  8493. // queue the flush
  8494. if (!waiting) {
  8495. waiting = true;
  8496. if ( true && !config.async) {
  8497. flushSchedulerQueue();
  8498. return
  8499. }
  8500. nextTick(flushSchedulerQueue);
  8501. }
  8502. }
  8503. }
  8504. /* */
  8505. var uid$2 = 0;
  8506. /**
  8507. * A watcher parses an expression, collects dependencies,
  8508. * and fires callback when the expression value changes.
  8509. * This is used for both the $watch() api and directives.
  8510. */
  8511. var Watcher = function Watcher (
  8512. vm,
  8513. expOrFn,
  8514. cb,
  8515. options,
  8516. isRenderWatcher
  8517. ) {
  8518. this.vm = vm;
  8519. if (isRenderWatcher) {
  8520. vm._watcher = this;
  8521. }
  8522. vm._watchers.push(this);
  8523. // options
  8524. if (options) {
  8525. this.deep = !!options.deep;
  8526. this.user = !!options.user;
  8527. this.lazy = !!options.lazy;
  8528. this.sync = !!options.sync;
  8529. this.before = options.before;
  8530. } else {
  8531. this.deep = this.user = this.lazy = this.sync = false;
  8532. }
  8533. this.cb = cb;
  8534. this.id = ++uid$2; // uid for batching
  8535. this.active = true;
  8536. this.dirty = this.lazy; // for lazy watchers
  8537. this.deps = [];
  8538. this.newDeps = [];
  8539. this.depIds = new _Set();
  8540. this.newDepIds = new _Set();
  8541. this.expression = true
  8542. ? expOrFn.toString()
  8543. : undefined;
  8544. // parse expression for getter
  8545. if (typeof expOrFn === 'function') {
  8546. this.getter = expOrFn;
  8547. } else {
  8548. this.getter = parsePath(expOrFn);
  8549. if (!this.getter) {
  8550. this.getter = noop;
  8551. true && warn(
  8552. "Failed watching path: \"" + expOrFn + "\" " +
  8553. 'Watcher only accepts simple dot-delimited paths. ' +
  8554. 'For full control, use a function instead.',
  8555. vm
  8556. );
  8557. }
  8558. }
  8559. this.value = this.lazy
  8560. ? undefined
  8561. : this.get();
  8562. };
  8563. /**
  8564. * Evaluate the getter, and re-collect dependencies.
  8565. */
  8566. Watcher.prototype.get = function get () {
  8567. pushTarget(this);
  8568. var value;
  8569. var vm = this.vm;
  8570. try {
  8571. value = this.getter.call(vm, vm);
  8572. } catch (e) {
  8573. if (this.user) {
  8574. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8575. } else {
  8576. throw e
  8577. }
  8578. } finally {
  8579. // "touch" every property so they are all tracked as
  8580. // dependencies for deep watching
  8581. if (this.deep) {
  8582. traverse(value);
  8583. }
  8584. popTarget();
  8585. this.cleanupDeps();
  8586. }
  8587. return value
  8588. };
  8589. /**
  8590. * Add a dependency to this directive.
  8591. */
  8592. Watcher.prototype.addDep = function addDep (dep) {
  8593. var id = dep.id;
  8594. if (!this.newDepIds.has(id)) {
  8595. this.newDepIds.add(id);
  8596. this.newDeps.push(dep);
  8597. if (!this.depIds.has(id)) {
  8598. dep.addSub(this);
  8599. }
  8600. }
  8601. };
  8602. /**
  8603. * Clean up for dependency collection.
  8604. */
  8605. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8606. var i = this.deps.length;
  8607. while (i--) {
  8608. var dep = this.deps[i];
  8609. if (!this.newDepIds.has(dep.id)) {
  8610. dep.removeSub(this);
  8611. }
  8612. }
  8613. var tmp = this.depIds;
  8614. this.depIds = this.newDepIds;
  8615. this.newDepIds = tmp;
  8616. this.newDepIds.clear();
  8617. tmp = this.deps;
  8618. this.deps = this.newDeps;
  8619. this.newDeps = tmp;
  8620. this.newDeps.length = 0;
  8621. };
  8622. /**
  8623. * Subscriber interface.
  8624. * Will be called when a dependency changes.
  8625. */
  8626. Watcher.prototype.update = function update () {
  8627. /* istanbul ignore else */
  8628. if (this.lazy) {
  8629. this.dirty = true;
  8630. } else if (this.sync) {
  8631. this.run();
  8632. } else {
  8633. queueWatcher(this);
  8634. }
  8635. };
  8636. /**
  8637. * Scheduler job interface.
  8638. * Will be called by the scheduler.
  8639. */
  8640. Watcher.prototype.run = function run () {
  8641. if (this.active) {
  8642. var value = this.get();
  8643. if (
  8644. value !== this.value ||
  8645. // Deep watchers and watchers on Object/Arrays should fire even
  8646. // when the value is the same, because the value may
  8647. // have mutated.
  8648. isObject(value) ||
  8649. this.deep
  8650. ) {
  8651. // set new value
  8652. var oldValue = this.value;
  8653. this.value = value;
  8654. if (this.user) {
  8655. try {
  8656. this.cb.call(this.vm, value, oldValue);
  8657. } catch (e) {
  8658. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8659. }
  8660. } else {
  8661. this.cb.call(this.vm, value, oldValue);
  8662. }
  8663. }
  8664. }
  8665. };
  8666. /**
  8667. * Evaluate the value of the watcher.
  8668. * This only gets called for lazy watchers.
  8669. */
  8670. Watcher.prototype.evaluate = function evaluate () {
  8671. this.value = this.get();
  8672. this.dirty = false;
  8673. };
  8674. /**
  8675. * Depend on all deps collected by this watcher.
  8676. */
  8677. Watcher.prototype.depend = function depend () {
  8678. var i = this.deps.length;
  8679. while (i--) {
  8680. this.deps[i].depend();
  8681. }
  8682. };
  8683. /**
  8684. * Remove self from all dependencies' subscriber list.
  8685. */
  8686. Watcher.prototype.teardown = function teardown () {
  8687. if (this.active) {
  8688. // remove self from vm's watcher list
  8689. // this is a somewhat expensive operation so we skip it
  8690. // if the vm is being destroyed.
  8691. if (!this.vm._isBeingDestroyed) {
  8692. remove(this.vm._watchers, this);
  8693. }
  8694. var i = this.deps.length;
  8695. while (i--) {
  8696. this.deps[i].removeSub(this);
  8697. }
  8698. this.active = false;
  8699. }
  8700. };
  8701. /* */
  8702. var sharedPropertyDefinition = {
  8703. enumerable: true,
  8704. configurable: true,
  8705. get: noop,
  8706. set: noop
  8707. };
  8708. function proxy (target, sourceKey, key) {
  8709. sharedPropertyDefinition.get = function proxyGetter () {
  8710. return this[sourceKey][key]
  8711. };
  8712. sharedPropertyDefinition.set = function proxySetter (val) {
  8713. this[sourceKey][key] = val;
  8714. };
  8715. Object.defineProperty(target, key, sharedPropertyDefinition);
  8716. }
  8717. function initState (vm) {
  8718. vm._watchers = [];
  8719. var opts = vm.$options;
  8720. if (opts.props) { initProps(vm, opts.props); }
  8721. if (opts.methods) { initMethods(vm, opts.methods); }
  8722. if (opts.data) {
  8723. initData(vm);
  8724. } else {
  8725. observe(vm._data = {}, true /* asRootData */);
  8726. }
  8727. if (opts.computed) { initComputed(vm, opts.computed); }
  8728. if (opts.watch && opts.watch !== nativeWatch) {
  8729. initWatch(vm, opts.watch);
  8730. }
  8731. }
  8732. function initProps (vm, propsOptions) {
  8733. var propsData = vm.$options.propsData || {};
  8734. var props = vm._props = {};
  8735. // cache prop keys so that future props updates can iterate using Array
  8736. // instead of dynamic object key enumeration.
  8737. var keys = vm.$options._propKeys = [];
  8738. var isRoot = !vm.$parent;
  8739. // root instance props should be converted
  8740. if (!isRoot) {
  8741. toggleObserving(false);
  8742. }
  8743. var loop = function ( key ) {
  8744. keys.push(key);
  8745. var value = validateProp(key, propsOptions, propsData, vm);
  8746. /* istanbul ignore else */
  8747. if (true) {
  8748. var hyphenatedKey = hyphenate(key);
  8749. if (isReservedAttribute(hyphenatedKey) ||
  8750. config.isReservedAttr(hyphenatedKey)) {
  8751. warn(
  8752. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8753. vm
  8754. );
  8755. }
  8756. defineReactive$$1(props, key, value, function () {
  8757. if (!isRoot && !isUpdatingChildComponent) {
  8758. {
  8759. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8760. return
  8761. }
  8762. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8763. if(
  8764. key === 'value' &&
  8765. Array.isArray(vm.$options.behaviors) &&
  8766. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8767. ){
  8768. return
  8769. }
  8770. if(vm._getFormData){
  8771. return
  8772. }
  8773. var $parent = vm.$parent;
  8774. while($parent){
  8775. if($parent.__next_tick_pending){
  8776. return
  8777. }
  8778. $parent = $parent.$parent;
  8779. }
  8780. }
  8781. warn(
  8782. "Avoid mutating a prop directly since the value will be " +
  8783. "overwritten whenever the parent component re-renders. " +
  8784. "Instead, use a data or computed property based on the prop's " +
  8785. "value. Prop being mutated: \"" + key + "\"",
  8786. vm
  8787. );
  8788. }
  8789. });
  8790. } else {}
  8791. // static props are already proxied on the component's prototype
  8792. // during Vue.extend(). We only need to proxy props defined at
  8793. // instantiation here.
  8794. if (!(key in vm)) {
  8795. proxy(vm, "_props", key);
  8796. }
  8797. };
  8798. for (var key in propsOptions) loop( key );
  8799. toggleObserving(true);
  8800. }
  8801. function initData (vm) {
  8802. var data = vm.$options.data;
  8803. data = vm._data = typeof data === 'function'
  8804. ? getData(data, vm)
  8805. : data || {};
  8806. if (!isPlainObject(data)) {
  8807. data = {};
  8808. true && warn(
  8809. 'data functions should return an object:\n' +
  8810. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8811. vm
  8812. );
  8813. }
  8814. // proxy data on instance
  8815. var keys = Object.keys(data);
  8816. var props = vm.$options.props;
  8817. var methods = vm.$options.methods;
  8818. var i = keys.length;
  8819. while (i--) {
  8820. var key = keys[i];
  8821. if (true) {
  8822. if (methods && hasOwn(methods, key)) {
  8823. warn(
  8824. ("Method \"" + key + "\" has already been defined as a data property."),
  8825. vm
  8826. );
  8827. }
  8828. }
  8829. if (props && hasOwn(props, key)) {
  8830. true && warn(
  8831. "The data property \"" + key + "\" is already declared as a prop. " +
  8832. "Use prop default value instead.",
  8833. vm
  8834. );
  8835. } else if (!isReserved(key)) {
  8836. proxy(vm, "_data", key);
  8837. }
  8838. }
  8839. // observe data
  8840. observe(data, true /* asRootData */);
  8841. }
  8842. function getData (data, vm) {
  8843. // #7573 disable dep collection when invoking data getters
  8844. pushTarget();
  8845. try {
  8846. return data.call(vm, vm)
  8847. } catch (e) {
  8848. handleError(e, vm, "data()");
  8849. return {}
  8850. } finally {
  8851. popTarget();
  8852. }
  8853. }
  8854. var computedWatcherOptions = { lazy: true };
  8855. function initComputed (vm, computed) {
  8856. // $flow-disable-line
  8857. var watchers = vm._computedWatchers = Object.create(null);
  8858. // computed properties are just getters during SSR
  8859. var isSSR = isServerRendering();
  8860. for (var key in computed) {
  8861. var userDef = computed[key];
  8862. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8863. if ( true && getter == null) {
  8864. warn(
  8865. ("Getter is missing for computed property \"" + key + "\"."),
  8866. vm
  8867. );
  8868. }
  8869. if (!isSSR) {
  8870. // create internal watcher for the computed property.
  8871. watchers[key] = new Watcher(
  8872. vm,
  8873. getter || noop,
  8874. noop,
  8875. computedWatcherOptions
  8876. );
  8877. }
  8878. // component-defined computed properties are already defined on the
  8879. // component prototype. We only need to define computed properties defined
  8880. // at instantiation here.
  8881. if (!(key in vm)) {
  8882. defineComputed(vm, key, userDef);
  8883. } else if (true) {
  8884. if (key in vm.$data) {
  8885. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8886. } else if (vm.$options.props && key in vm.$options.props) {
  8887. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8888. }
  8889. }
  8890. }
  8891. }
  8892. function defineComputed (
  8893. target,
  8894. key,
  8895. userDef
  8896. ) {
  8897. var shouldCache = !isServerRendering();
  8898. if (typeof userDef === 'function') {
  8899. sharedPropertyDefinition.get = shouldCache
  8900. ? createComputedGetter(key)
  8901. : createGetterInvoker(userDef);
  8902. sharedPropertyDefinition.set = noop;
  8903. } else {
  8904. sharedPropertyDefinition.get = userDef.get
  8905. ? shouldCache && userDef.cache !== false
  8906. ? createComputedGetter(key)
  8907. : createGetterInvoker(userDef.get)
  8908. : noop;
  8909. sharedPropertyDefinition.set = userDef.set || noop;
  8910. }
  8911. if ( true &&
  8912. sharedPropertyDefinition.set === noop) {
  8913. sharedPropertyDefinition.set = function () {
  8914. warn(
  8915. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8916. this
  8917. );
  8918. };
  8919. }
  8920. Object.defineProperty(target, key, sharedPropertyDefinition);
  8921. }
  8922. function createComputedGetter (key) {
  8923. return function computedGetter () {
  8924. var watcher = this._computedWatchers && this._computedWatchers[key];
  8925. if (watcher) {
  8926. if (watcher.dirty) {
  8927. watcher.evaluate();
  8928. }
  8929. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8930. watcher.depend();
  8931. }
  8932. return watcher.value
  8933. }
  8934. }
  8935. }
  8936. function createGetterInvoker(fn) {
  8937. return function computedGetter () {
  8938. return fn.call(this, this)
  8939. }
  8940. }
  8941. function initMethods (vm, methods) {
  8942. var props = vm.$options.props;
  8943. for (var key in methods) {
  8944. if (true) {
  8945. if (typeof methods[key] !== 'function') {
  8946. warn(
  8947. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8948. "Did you reference the function correctly?",
  8949. vm
  8950. );
  8951. }
  8952. if (props && hasOwn(props, key)) {
  8953. warn(
  8954. ("Method \"" + key + "\" has already been defined as a prop."),
  8955. vm
  8956. );
  8957. }
  8958. if ((key in vm) && isReserved(key)) {
  8959. warn(
  8960. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8961. "Avoid defining component methods that start with _ or $."
  8962. );
  8963. }
  8964. }
  8965. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8966. }
  8967. }
  8968. function initWatch (vm, watch) {
  8969. for (var key in watch) {
  8970. var handler = watch[key];
  8971. if (Array.isArray(handler)) {
  8972. for (var i = 0; i < handler.length; i++) {
  8973. createWatcher(vm, key, handler[i]);
  8974. }
  8975. } else {
  8976. createWatcher(vm, key, handler);
  8977. }
  8978. }
  8979. }
  8980. function createWatcher (
  8981. vm,
  8982. expOrFn,
  8983. handler,
  8984. options
  8985. ) {
  8986. if (isPlainObject(handler)) {
  8987. options = handler;
  8988. handler = handler.handler;
  8989. }
  8990. if (typeof handler === 'string') {
  8991. handler = vm[handler];
  8992. }
  8993. return vm.$watch(expOrFn, handler, options)
  8994. }
  8995. function stateMixin (Vue) {
  8996. // flow somehow has problems with directly declared definition object
  8997. // when using Object.defineProperty, so we have to procedurally build up
  8998. // the object here.
  8999. var dataDef = {};
  9000. dataDef.get = function () { return this._data };
  9001. var propsDef = {};
  9002. propsDef.get = function () { return this._props };
  9003. if (true) {
  9004. dataDef.set = function () {
  9005. warn(
  9006. 'Avoid replacing instance root $data. ' +
  9007. 'Use nested data properties instead.',
  9008. this
  9009. );
  9010. };
  9011. propsDef.set = function () {
  9012. warn("$props is readonly.", this);
  9013. };
  9014. }
  9015. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9016. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9017. Vue.prototype.$set = set;
  9018. Vue.prototype.$delete = del;
  9019. Vue.prototype.$watch = function (
  9020. expOrFn,
  9021. cb,
  9022. options
  9023. ) {
  9024. var vm = this;
  9025. if (isPlainObject(cb)) {
  9026. return createWatcher(vm, expOrFn, cb, options)
  9027. }
  9028. options = options || {};
  9029. options.user = true;
  9030. var watcher = new Watcher(vm, expOrFn, cb, options);
  9031. if (options.immediate) {
  9032. try {
  9033. cb.call(vm, watcher.value);
  9034. } catch (error) {
  9035. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9036. }
  9037. }
  9038. return function unwatchFn () {
  9039. watcher.teardown();
  9040. }
  9041. };
  9042. }
  9043. /* */
  9044. var uid$3 = 0;
  9045. function initMixin (Vue) {
  9046. Vue.prototype._init = function (options) {
  9047. var vm = this;
  9048. // a uid
  9049. vm._uid = uid$3++;
  9050. var startTag, endTag;
  9051. /* istanbul ignore if */
  9052. if ( true && config.performance && mark) {
  9053. startTag = "vue-perf-start:" + (vm._uid);
  9054. endTag = "vue-perf-end:" + (vm._uid);
  9055. mark(startTag);
  9056. }
  9057. // a flag to avoid this being observed
  9058. vm._isVue = true;
  9059. // merge options
  9060. if (options && options._isComponent) {
  9061. // optimize internal component instantiation
  9062. // since dynamic options merging is pretty slow, and none of the
  9063. // internal component options needs special treatment.
  9064. initInternalComponent(vm, options);
  9065. } else {
  9066. vm.$options = mergeOptions(
  9067. resolveConstructorOptions(vm.constructor),
  9068. options || {},
  9069. vm
  9070. );
  9071. }
  9072. /* istanbul ignore else */
  9073. if (true) {
  9074. initProxy(vm);
  9075. } else {}
  9076. // expose real self
  9077. vm._self = vm;
  9078. initLifecycle(vm);
  9079. initEvents(vm);
  9080. initRender(vm);
  9081. callHook(vm, 'beforeCreate');
  9082. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9083. initState(vm);
  9084. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9085. !vm._$fallback && callHook(vm, 'created');
  9086. /* istanbul ignore if */
  9087. if ( true && config.performance && mark) {
  9088. vm._name = formatComponentName(vm, false);
  9089. mark(endTag);
  9090. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9091. }
  9092. if (vm.$options.el) {
  9093. vm.$mount(vm.$options.el);
  9094. }
  9095. };
  9096. }
  9097. function initInternalComponent (vm, options) {
  9098. var opts = vm.$options = Object.create(vm.constructor.options);
  9099. // doing this because it's faster than dynamic enumeration.
  9100. var parentVnode = options._parentVnode;
  9101. opts.parent = options.parent;
  9102. opts._parentVnode = parentVnode;
  9103. var vnodeComponentOptions = parentVnode.componentOptions;
  9104. opts.propsData = vnodeComponentOptions.propsData;
  9105. opts._parentListeners = vnodeComponentOptions.listeners;
  9106. opts._renderChildren = vnodeComponentOptions.children;
  9107. opts._componentTag = vnodeComponentOptions.tag;
  9108. if (options.render) {
  9109. opts.render = options.render;
  9110. opts.staticRenderFns = options.staticRenderFns;
  9111. }
  9112. }
  9113. function resolveConstructorOptions (Ctor) {
  9114. var options = Ctor.options;
  9115. if (Ctor.super) {
  9116. var superOptions = resolveConstructorOptions(Ctor.super);
  9117. var cachedSuperOptions = Ctor.superOptions;
  9118. if (superOptions !== cachedSuperOptions) {
  9119. // super option changed,
  9120. // need to resolve new options.
  9121. Ctor.superOptions = superOptions;
  9122. // check if there are any late-modified/attached options (#4976)
  9123. var modifiedOptions = resolveModifiedOptions(Ctor);
  9124. // update base extend options
  9125. if (modifiedOptions) {
  9126. extend(Ctor.extendOptions, modifiedOptions);
  9127. }
  9128. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9129. if (options.name) {
  9130. options.components[options.name] = Ctor;
  9131. }
  9132. }
  9133. }
  9134. return options
  9135. }
  9136. function resolveModifiedOptions (Ctor) {
  9137. var modified;
  9138. var latest = Ctor.options;
  9139. var sealed = Ctor.sealedOptions;
  9140. for (var key in latest) {
  9141. if (latest[key] !== sealed[key]) {
  9142. if (!modified) { modified = {}; }
  9143. modified[key] = latest[key];
  9144. }
  9145. }
  9146. return modified
  9147. }
  9148. function Vue (options) {
  9149. if ( true &&
  9150. !(this instanceof Vue)
  9151. ) {
  9152. warn('Vue is a constructor and should be called with the `new` keyword');
  9153. }
  9154. this._init(options);
  9155. }
  9156. initMixin(Vue);
  9157. stateMixin(Vue);
  9158. eventsMixin(Vue);
  9159. lifecycleMixin(Vue);
  9160. renderMixin(Vue);
  9161. /* */
  9162. function initUse (Vue) {
  9163. Vue.use = function (plugin) {
  9164. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9165. if (installedPlugins.indexOf(plugin) > -1) {
  9166. return this
  9167. }
  9168. // additional parameters
  9169. var args = toArray(arguments, 1);
  9170. args.unshift(this);
  9171. if (typeof plugin.install === 'function') {
  9172. plugin.install.apply(plugin, args);
  9173. } else if (typeof plugin === 'function') {
  9174. plugin.apply(null, args);
  9175. }
  9176. installedPlugins.push(plugin);
  9177. return this
  9178. };
  9179. }
  9180. /* */
  9181. function initMixin$1 (Vue) {
  9182. Vue.mixin = function (mixin) {
  9183. this.options = mergeOptions(this.options, mixin);
  9184. return this
  9185. };
  9186. }
  9187. /* */
  9188. function initExtend (Vue) {
  9189. /**
  9190. * Each instance constructor, including Vue, has a unique
  9191. * cid. This enables us to create wrapped "child
  9192. * constructors" for prototypal inheritance and cache them.
  9193. */
  9194. Vue.cid = 0;
  9195. var cid = 1;
  9196. /**
  9197. * Class inheritance
  9198. */
  9199. Vue.extend = function (extendOptions) {
  9200. extendOptions = extendOptions || {};
  9201. var Super = this;
  9202. var SuperId = Super.cid;
  9203. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9204. if (cachedCtors[SuperId]) {
  9205. return cachedCtors[SuperId]
  9206. }
  9207. var name = extendOptions.name || Super.options.name;
  9208. if ( true && name) {
  9209. validateComponentName(name);
  9210. }
  9211. var Sub = function VueComponent (options) {
  9212. this._init(options);
  9213. };
  9214. Sub.prototype = Object.create(Super.prototype);
  9215. Sub.prototype.constructor = Sub;
  9216. Sub.cid = cid++;
  9217. Sub.options = mergeOptions(
  9218. Super.options,
  9219. extendOptions
  9220. );
  9221. Sub['super'] = Super;
  9222. // For props and computed properties, we define the proxy getters on
  9223. // the Vue instances at extension time, on the extended prototype. This
  9224. // avoids Object.defineProperty calls for each instance created.
  9225. if (Sub.options.props) {
  9226. initProps$1(Sub);
  9227. }
  9228. if (Sub.options.computed) {
  9229. initComputed$1(Sub);
  9230. }
  9231. // allow further extension/mixin/plugin usage
  9232. Sub.extend = Super.extend;
  9233. Sub.mixin = Super.mixin;
  9234. Sub.use = Super.use;
  9235. // create asset registers, so extended classes
  9236. // can have their private assets too.
  9237. ASSET_TYPES.forEach(function (type) {
  9238. Sub[type] = Super[type];
  9239. });
  9240. // enable recursive self-lookup
  9241. if (name) {
  9242. Sub.options.components[name] = Sub;
  9243. }
  9244. // keep a reference to the super options at extension time.
  9245. // later at instantiation we can check if Super's options have
  9246. // been updated.
  9247. Sub.superOptions = Super.options;
  9248. Sub.extendOptions = extendOptions;
  9249. Sub.sealedOptions = extend({}, Sub.options);
  9250. // cache constructor
  9251. cachedCtors[SuperId] = Sub;
  9252. return Sub
  9253. };
  9254. }
  9255. function initProps$1 (Comp) {
  9256. var props = Comp.options.props;
  9257. for (var key in props) {
  9258. proxy(Comp.prototype, "_props", key);
  9259. }
  9260. }
  9261. function initComputed$1 (Comp) {
  9262. var computed = Comp.options.computed;
  9263. for (var key in computed) {
  9264. defineComputed(Comp.prototype, key, computed[key]);
  9265. }
  9266. }
  9267. /* */
  9268. function initAssetRegisters (Vue) {
  9269. /**
  9270. * Create asset registration methods.
  9271. */
  9272. ASSET_TYPES.forEach(function (type) {
  9273. Vue[type] = function (
  9274. id,
  9275. definition
  9276. ) {
  9277. if (!definition) {
  9278. return this.options[type + 's'][id]
  9279. } else {
  9280. /* istanbul ignore if */
  9281. if ( true && type === 'component') {
  9282. validateComponentName(id);
  9283. }
  9284. if (type === 'component' && isPlainObject(definition)) {
  9285. definition.name = definition.name || id;
  9286. definition = this.options._base.extend(definition);
  9287. }
  9288. if (type === 'directive' && typeof definition === 'function') {
  9289. definition = { bind: definition, update: definition };
  9290. }
  9291. this.options[type + 's'][id] = definition;
  9292. return definition
  9293. }
  9294. };
  9295. });
  9296. }
  9297. /* */
  9298. function getComponentName (opts) {
  9299. return opts && (opts.Ctor.options.name || opts.tag)
  9300. }
  9301. function matches (pattern, name) {
  9302. if (Array.isArray(pattern)) {
  9303. return pattern.indexOf(name) > -1
  9304. } else if (typeof pattern === 'string') {
  9305. return pattern.split(',').indexOf(name) > -1
  9306. } else if (isRegExp(pattern)) {
  9307. return pattern.test(name)
  9308. }
  9309. /* istanbul ignore next */
  9310. return false
  9311. }
  9312. function pruneCache (keepAliveInstance, filter) {
  9313. var cache = keepAliveInstance.cache;
  9314. var keys = keepAliveInstance.keys;
  9315. var _vnode = keepAliveInstance._vnode;
  9316. for (var key in cache) {
  9317. var cachedNode = cache[key];
  9318. if (cachedNode) {
  9319. var name = getComponentName(cachedNode.componentOptions);
  9320. if (name && !filter(name)) {
  9321. pruneCacheEntry(cache, key, keys, _vnode);
  9322. }
  9323. }
  9324. }
  9325. }
  9326. function pruneCacheEntry (
  9327. cache,
  9328. key,
  9329. keys,
  9330. current
  9331. ) {
  9332. var cached$$1 = cache[key];
  9333. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9334. cached$$1.componentInstance.$destroy();
  9335. }
  9336. cache[key] = null;
  9337. remove(keys, key);
  9338. }
  9339. var patternTypes = [String, RegExp, Array];
  9340. var KeepAlive = {
  9341. name: 'keep-alive',
  9342. abstract: true,
  9343. props: {
  9344. include: patternTypes,
  9345. exclude: patternTypes,
  9346. max: [String, Number]
  9347. },
  9348. created: function created () {
  9349. this.cache = Object.create(null);
  9350. this.keys = [];
  9351. },
  9352. destroyed: function destroyed () {
  9353. for (var key in this.cache) {
  9354. pruneCacheEntry(this.cache, key, this.keys);
  9355. }
  9356. },
  9357. mounted: function mounted () {
  9358. var this$1 = this;
  9359. this.$watch('include', function (val) {
  9360. pruneCache(this$1, function (name) { return matches(val, name); });
  9361. });
  9362. this.$watch('exclude', function (val) {
  9363. pruneCache(this$1, function (name) { return !matches(val, name); });
  9364. });
  9365. },
  9366. render: function render () {
  9367. var slot = this.$slots.default;
  9368. var vnode = getFirstComponentChild(slot);
  9369. var componentOptions = vnode && vnode.componentOptions;
  9370. if (componentOptions) {
  9371. // check pattern
  9372. var name = getComponentName(componentOptions);
  9373. var ref = this;
  9374. var include = ref.include;
  9375. var exclude = ref.exclude;
  9376. if (
  9377. // not included
  9378. (include && (!name || !matches(include, name))) ||
  9379. // excluded
  9380. (exclude && name && matches(exclude, name))
  9381. ) {
  9382. return vnode
  9383. }
  9384. var ref$1 = this;
  9385. var cache = ref$1.cache;
  9386. var keys = ref$1.keys;
  9387. var key = vnode.key == null
  9388. // same constructor may get registered as different local components
  9389. // so cid alone is not enough (#3269)
  9390. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9391. : vnode.key;
  9392. if (cache[key]) {
  9393. vnode.componentInstance = cache[key].componentInstance;
  9394. // make current key freshest
  9395. remove(keys, key);
  9396. keys.push(key);
  9397. } else {
  9398. cache[key] = vnode;
  9399. keys.push(key);
  9400. // prune oldest entry
  9401. if (this.max && keys.length > parseInt(this.max)) {
  9402. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9403. }
  9404. }
  9405. vnode.data.keepAlive = true;
  9406. }
  9407. return vnode || (slot && slot[0])
  9408. }
  9409. };
  9410. var builtInComponents = {
  9411. KeepAlive: KeepAlive
  9412. };
  9413. /* */
  9414. function initGlobalAPI (Vue) {
  9415. // config
  9416. var configDef = {};
  9417. configDef.get = function () { return config; };
  9418. if (true) {
  9419. configDef.set = function () {
  9420. warn(
  9421. 'Do not replace the Vue.config object, set individual fields instead.'
  9422. );
  9423. };
  9424. }
  9425. Object.defineProperty(Vue, 'config', configDef);
  9426. // exposed util methods.
  9427. // NOTE: these are not considered part of the public API - avoid relying on
  9428. // them unless you are aware of the risk.
  9429. Vue.util = {
  9430. warn: warn,
  9431. extend: extend,
  9432. mergeOptions: mergeOptions,
  9433. defineReactive: defineReactive$$1
  9434. };
  9435. Vue.set = set;
  9436. Vue.delete = del;
  9437. Vue.nextTick = nextTick;
  9438. // 2.6 explicit observable API
  9439. Vue.observable = function (obj) {
  9440. observe(obj);
  9441. return obj
  9442. };
  9443. Vue.options = Object.create(null);
  9444. ASSET_TYPES.forEach(function (type) {
  9445. Vue.options[type + 's'] = Object.create(null);
  9446. });
  9447. // this is used to identify the "base" constructor to extend all plain-object
  9448. // components with in Weex's multi-instance scenarios.
  9449. Vue.options._base = Vue;
  9450. extend(Vue.options.components, builtInComponents);
  9451. initUse(Vue);
  9452. initMixin$1(Vue);
  9453. initExtend(Vue);
  9454. initAssetRegisters(Vue);
  9455. }
  9456. initGlobalAPI(Vue);
  9457. Object.defineProperty(Vue.prototype, '$isServer', {
  9458. get: isServerRendering
  9459. });
  9460. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9461. get: function get () {
  9462. /* istanbul ignore next */
  9463. return this.$vnode && this.$vnode.ssrContext
  9464. }
  9465. });
  9466. // expose FunctionalRenderContext for ssr runtime helper installation
  9467. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9468. value: FunctionalRenderContext
  9469. });
  9470. Vue.version = '2.6.11';
  9471. /**
  9472. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9473. */
  9474. var ARRAYTYPE = '[object Array]';
  9475. var OBJECTTYPE = '[object Object]';
  9476. var NULLTYPE = '[object Null]';
  9477. var UNDEFINEDTYPE = '[object Undefined]';
  9478. // const FUNCTIONTYPE = '[object Function]'
  9479. function diff(current, pre) {
  9480. var result = {};
  9481. syncKeys(current, pre);
  9482. _diff(current, pre, '', result);
  9483. return result
  9484. }
  9485. function syncKeys(current, pre) {
  9486. if (current === pre) { return }
  9487. var rootCurrentType = type(current);
  9488. var rootPreType = type(pre);
  9489. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9490. if(Object.keys(current).length >= Object.keys(pre).length){
  9491. for (var key in pre) {
  9492. var currentValue = current[key];
  9493. if (currentValue === undefined) {
  9494. current[key] = null;
  9495. } else {
  9496. syncKeys(currentValue, pre[key]);
  9497. }
  9498. }
  9499. }
  9500. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9501. if (current.length >= pre.length) {
  9502. pre.forEach(function (item, index) {
  9503. syncKeys(current[index], item);
  9504. });
  9505. }
  9506. }
  9507. }
  9508. function nullOrUndefined(currentType, preType) {
  9509. if(
  9510. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9511. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9512. ) {
  9513. return false
  9514. }
  9515. return true
  9516. }
  9517. function _diff(current, pre, path, result) {
  9518. if (current === pre) { return }
  9519. var rootCurrentType = type(current);
  9520. var rootPreType = type(pre);
  9521. if (rootCurrentType == OBJECTTYPE) {
  9522. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9523. setResult(result, path, current);
  9524. } else {
  9525. var loop = function ( key ) {
  9526. var currentValue = current[key];
  9527. var preValue = pre[key];
  9528. var currentType = type(currentValue);
  9529. var preType = type(preValue);
  9530. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9531. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9532. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9533. }
  9534. } else if (currentType == ARRAYTYPE) {
  9535. if (preType != ARRAYTYPE) {
  9536. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9537. } else {
  9538. if (currentValue.length < preValue.length) {
  9539. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9540. } else {
  9541. currentValue.forEach(function (item, index) {
  9542. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9543. });
  9544. }
  9545. }
  9546. } else if (currentType == OBJECTTYPE) {
  9547. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9548. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9549. } else {
  9550. for (var subKey in currentValue) {
  9551. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9552. }
  9553. }
  9554. }
  9555. };
  9556. for (var key in current) loop( key );
  9557. }
  9558. } else if (rootCurrentType == ARRAYTYPE) {
  9559. if (rootPreType != ARRAYTYPE) {
  9560. setResult(result, path, current);
  9561. } else {
  9562. if (current.length < pre.length) {
  9563. setResult(result, path, current);
  9564. } else {
  9565. current.forEach(function (item, index) {
  9566. _diff(item, pre[index], path + '[' + index + ']', result);
  9567. });
  9568. }
  9569. }
  9570. } else {
  9571. setResult(result, path, current);
  9572. }
  9573. }
  9574. function setResult(result, k, v) {
  9575. // if (type(v) != FUNCTIONTYPE) {
  9576. result[k] = v;
  9577. // }
  9578. }
  9579. function type(obj) {
  9580. return Object.prototype.toString.call(obj)
  9581. }
  9582. /* */
  9583. function flushCallbacks$1(vm) {
  9584. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9585. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9586. var mpInstance = vm.$scope;
  9587. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9588. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9589. }
  9590. var copies = vm.__next_tick_callbacks.slice(0);
  9591. vm.__next_tick_callbacks.length = 0;
  9592. for (var i = 0; i < copies.length; i++) {
  9593. copies[i]();
  9594. }
  9595. }
  9596. }
  9597. function hasRenderWatcher(vm) {
  9598. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9599. }
  9600. function nextTick$1(vm, cb) {
  9601. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9602. //2.nextTick 之前存在 render watcher
  9603. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9604. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9605. var mpInstance = vm.$scope;
  9606. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9607. ']:nextVueTick');
  9608. }
  9609. return nextTick(cb, vm)
  9610. }else{
  9611. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9612. var mpInstance$1 = vm.$scope;
  9613. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9614. ']:nextMPTick');
  9615. }
  9616. }
  9617. var _resolve;
  9618. if (!vm.__next_tick_callbacks) {
  9619. vm.__next_tick_callbacks = [];
  9620. }
  9621. vm.__next_tick_callbacks.push(function () {
  9622. if (cb) {
  9623. try {
  9624. cb.call(vm);
  9625. } catch (e) {
  9626. handleError(e, vm, 'nextTick');
  9627. }
  9628. } else if (_resolve) {
  9629. _resolve(vm);
  9630. }
  9631. });
  9632. // $flow-disable-line
  9633. if (!cb && typeof Promise !== 'undefined') {
  9634. return new Promise(function (resolve) {
  9635. _resolve = resolve;
  9636. })
  9637. }
  9638. }
  9639. /* */
  9640. function clearInstance(key, value) {
  9641. // 简易去除 Vue 和小程序组件实例
  9642. if (value) {
  9643. if (value._isVue || value.__v_isMPComponent) {
  9644. return {}
  9645. }
  9646. }
  9647. return value
  9648. }
  9649. function cloneWithData(vm) {
  9650. // 确保当前 vm 所有数据被同步
  9651. var ret = Object.create(null);
  9652. var dataKeys = [].concat(
  9653. Object.keys(vm._data || {}),
  9654. Object.keys(vm._computedWatchers || {}));
  9655. dataKeys.reduce(function(ret, key) {
  9656. ret[key] = vm[key];
  9657. return ret
  9658. }, ret);
  9659. // vue-composition-api
  9660. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9661. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9662. if (rawBindings) {
  9663. Object.keys(rawBindings).forEach(function (key) {
  9664. ret[key] = vm[key];
  9665. });
  9666. }
  9667. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9668. Object.assign(ret, vm.$mp.data || {});
  9669. if (
  9670. Array.isArray(vm.$options.behaviors) &&
  9671. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9672. ) { //form-field
  9673. ret['name'] = vm.name;
  9674. ret['value'] = vm.value;
  9675. }
  9676. return JSON.parse(JSON.stringify(ret, clearInstance))
  9677. }
  9678. var patch = function(oldVnode, vnode) {
  9679. var this$1 = this;
  9680. if (vnode === null) { //destroy
  9681. return
  9682. }
  9683. if (this.mpType === 'page' || this.mpType === 'component') {
  9684. var mpInstance = this.$scope;
  9685. var data = Object.create(null);
  9686. try {
  9687. data = cloneWithData(this);
  9688. } catch (err) {
  9689. console.error(err);
  9690. }
  9691. data.__webviewId__ = mpInstance.data.__webviewId__;
  9692. var mpData = Object.create(null);
  9693. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9694. mpData[key] = mpInstance.data[key];
  9695. });
  9696. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9697. if (Object.keys(diffData).length) {
  9698. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"UniappShell","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9699. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9700. ']差量更新',
  9701. JSON.stringify(diffData));
  9702. }
  9703. this.__next_tick_pending = true;
  9704. mpInstance.setData(diffData, function () {
  9705. this$1.__next_tick_pending = false;
  9706. flushCallbacks$1(this$1);
  9707. });
  9708. } else {
  9709. flushCallbacks$1(this);
  9710. }
  9711. }
  9712. };
  9713. /* */
  9714. function createEmptyRender() {
  9715. }
  9716. function mountComponent$1(
  9717. vm,
  9718. el,
  9719. hydrating
  9720. ) {
  9721. if (!vm.mpType) {//main.js 中的 new Vue
  9722. return vm
  9723. }
  9724. if (vm.mpType === 'app') {
  9725. vm.$options.render = createEmptyRender;
  9726. }
  9727. if (!vm.$options.render) {
  9728. vm.$options.render = createEmptyRender;
  9729. if (true) {
  9730. /* istanbul ignore if */
  9731. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9732. vm.$options.el || el) {
  9733. warn(
  9734. 'You are using the runtime-only build of Vue where the template ' +
  9735. 'compiler is not available. Either pre-compile the templates into ' +
  9736. 'render functions, or use the compiler-included build.',
  9737. vm
  9738. );
  9739. } else {
  9740. warn(
  9741. 'Failed to mount component: template or render function not defined.',
  9742. vm
  9743. );
  9744. }
  9745. }
  9746. }
  9747. !vm._$fallback && callHook(vm, 'beforeMount');
  9748. var updateComponent = function () {
  9749. vm._update(vm._render(), hydrating);
  9750. };
  9751. // we set this to vm._watcher inside the watcher's constructor
  9752. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9753. // component's mounted hook), which relies on vm._watcher being already defined
  9754. new Watcher(vm, updateComponent, noop, {
  9755. before: function before() {
  9756. if (vm._isMounted && !vm._isDestroyed) {
  9757. callHook(vm, 'beforeUpdate');
  9758. }
  9759. }
  9760. }, true /* isRenderWatcher */);
  9761. hydrating = false;
  9762. return vm
  9763. }
  9764. /* */
  9765. function renderClass (
  9766. staticClass,
  9767. dynamicClass
  9768. ) {
  9769. if (isDef(staticClass) || isDef(dynamicClass)) {
  9770. return concat(staticClass, stringifyClass(dynamicClass))
  9771. }
  9772. /* istanbul ignore next */
  9773. return ''
  9774. }
  9775. function concat (a, b) {
  9776. return a ? b ? (a + ' ' + b) : a : (b || '')
  9777. }
  9778. function stringifyClass (value) {
  9779. if (Array.isArray(value)) {
  9780. return stringifyArray(value)
  9781. }
  9782. if (isObject(value)) {
  9783. return stringifyObject(value)
  9784. }
  9785. if (typeof value === 'string') {
  9786. return value
  9787. }
  9788. /* istanbul ignore next */
  9789. return ''
  9790. }
  9791. function stringifyArray (value) {
  9792. var res = '';
  9793. var stringified;
  9794. for (var i = 0, l = value.length; i < l; i++) {
  9795. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9796. if (res) { res += ' '; }
  9797. res += stringified;
  9798. }
  9799. }
  9800. return res
  9801. }
  9802. function stringifyObject (value) {
  9803. var res = '';
  9804. for (var key in value) {
  9805. if (value[key]) {
  9806. if (res) { res += ' '; }
  9807. res += key;
  9808. }
  9809. }
  9810. return res
  9811. }
  9812. /* */
  9813. var parseStyleText = cached(function (cssText) {
  9814. var res = {};
  9815. var listDelimiter = /;(?![^(]*\))/g;
  9816. var propertyDelimiter = /:(.+)/;
  9817. cssText.split(listDelimiter).forEach(function (item) {
  9818. if (item) {
  9819. var tmp = item.split(propertyDelimiter);
  9820. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9821. }
  9822. });
  9823. return res
  9824. });
  9825. // normalize possible array / string values into Object
  9826. function normalizeStyleBinding (bindingStyle) {
  9827. if (Array.isArray(bindingStyle)) {
  9828. return toObject(bindingStyle)
  9829. }
  9830. if (typeof bindingStyle === 'string') {
  9831. return parseStyleText(bindingStyle)
  9832. }
  9833. return bindingStyle
  9834. }
  9835. /* */
  9836. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9837. function getTarget(obj, path) {
  9838. var parts = path.split('.');
  9839. var key = parts[0];
  9840. if (key.indexOf('__$n') === 0) { //number index
  9841. key = parseInt(key.replace('__$n', ''));
  9842. }
  9843. if (parts.length === 1) {
  9844. return obj[key]
  9845. }
  9846. return getTarget(obj[key], parts.slice(1).join('.'))
  9847. }
  9848. function internalMixin(Vue) {
  9849. Vue.config.errorHandler = function(err, vm, info) {
  9850. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9851. console.error(err);
  9852. /* eslint-disable no-undef */
  9853. var app = typeof getApp === 'function' && getApp();
  9854. if (app && app.onError) {
  9855. app.onError(err);
  9856. }
  9857. };
  9858. var oldEmit = Vue.prototype.$emit;
  9859. Vue.prototype.$emit = function(event) {
  9860. if (this.$scope && event) {
  9861. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9862. if (triggerEvent) {
  9863. try {
  9864. triggerEvent.call(this.$scope, event, {
  9865. __args__: toArray(arguments, 1)
  9866. });
  9867. } catch (error) {
  9868. }
  9869. }
  9870. }
  9871. return oldEmit.apply(this, arguments)
  9872. };
  9873. Vue.prototype.$nextTick = function(fn) {
  9874. return nextTick$1(this, fn)
  9875. };
  9876. MP_METHODS.forEach(function (method) {
  9877. Vue.prototype[method] = function(args) {
  9878. if (this.$scope && this.$scope[method]) {
  9879. return this.$scope[method](args)
  9880. }
  9881. // mp-alipay
  9882. if (typeof my === 'undefined') {
  9883. return
  9884. }
  9885. if (method === 'createSelectorQuery') {
  9886. /* eslint-disable no-undef */
  9887. return my.createSelectorQuery(args)
  9888. } else if (method === 'createIntersectionObserver') {
  9889. /* eslint-disable no-undef */
  9890. return my.createIntersectionObserver(args)
  9891. }
  9892. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9893. };
  9894. });
  9895. Vue.prototype.__init_provide = initProvide;
  9896. Vue.prototype.__init_injections = initInjections;
  9897. Vue.prototype.__call_hook = function(hook, args) {
  9898. var vm = this;
  9899. // #7573 disable dep collection when invoking lifecycle hooks
  9900. pushTarget();
  9901. var handlers = vm.$options[hook];
  9902. var info = hook + " hook";
  9903. var ret;
  9904. if (handlers) {
  9905. for (var i = 0, j = handlers.length; i < j; i++) {
  9906. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9907. }
  9908. }
  9909. if (vm._hasHookEvent) {
  9910. vm.$emit('hook:' + hook, args);
  9911. }
  9912. popTarget();
  9913. return ret
  9914. };
  9915. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9916. if (Array.isArray(modifiers)) {
  9917. if (modifiers.indexOf('trim') !== -1) {
  9918. value = value.trim();
  9919. }
  9920. if (modifiers.indexOf('number') !== -1) {
  9921. value = this._n(value);
  9922. }
  9923. }
  9924. if (!target) {
  9925. target = this;
  9926. }
  9927. // 解决动态属性添加
  9928. Vue.set(target, key, value);
  9929. };
  9930. Vue.prototype.__set_sync = function(target, key, value) {
  9931. if (!target) {
  9932. target = this;
  9933. }
  9934. // 解决动态属性添加
  9935. Vue.set(target, key, value);
  9936. };
  9937. Vue.prototype.__get_orig = function(item) {
  9938. if (isPlainObject(item)) {
  9939. return item['$orig'] || item
  9940. }
  9941. return item
  9942. };
  9943. Vue.prototype.__get_value = function(dataPath, target) {
  9944. return getTarget(target || this, dataPath)
  9945. };
  9946. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9947. return renderClass(staticClass, dynamicClass)
  9948. };
  9949. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9950. if (!dynamicStyle && !staticStyle) {
  9951. return ''
  9952. }
  9953. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9954. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9955. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9956. };
  9957. Vue.prototype.__map = function(val, iteratee) {
  9958. //TODO 暂不考虑 string
  9959. var ret, i, l, keys, key;
  9960. if (Array.isArray(val)) {
  9961. ret = new Array(val.length);
  9962. for (i = 0, l = val.length; i < l; i++) {
  9963. ret[i] = iteratee(val[i], i);
  9964. }
  9965. return ret
  9966. } else if (isObject(val)) {
  9967. keys = Object.keys(val);
  9968. ret = Object.create(null);
  9969. for (i = 0, l = keys.length; i < l; i++) {
  9970. key = keys[i];
  9971. ret[key] = iteratee(val[key], key, i);
  9972. }
  9973. return ret
  9974. } else if (typeof val === 'number') {
  9975. ret = new Array(val);
  9976. for (i = 0, l = val; i < l; i++) {
  9977. // 第一个参数暂时仍和小程序一致
  9978. ret[i] = iteratee(i, i);
  9979. }
  9980. return ret
  9981. }
  9982. return []
  9983. };
  9984. }
  9985. /* */
  9986. var LIFECYCLE_HOOKS$1 = [
  9987. //App
  9988. 'onLaunch',
  9989. 'onShow',
  9990. 'onHide',
  9991. 'onUniNViewMessage',
  9992. 'onPageNotFound',
  9993. 'onThemeChange',
  9994. 'onError',
  9995. 'onUnhandledRejection',
  9996. //Page
  9997. 'onInit',
  9998. 'onLoad',
  9999. // 'onShow',
  10000. 'onReady',
  10001. // 'onHide',
  10002. 'onUnload',
  10003. 'onPullDownRefresh',
  10004. 'onReachBottom',
  10005. 'onTabItemTap',
  10006. 'onAddToFavorites',
  10007. 'onShareTimeline',
  10008. 'onShareAppMessage',
  10009. 'onResize',
  10010. 'onPageScroll',
  10011. 'onNavigationBarButtonTap',
  10012. 'onBackPress',
  10013. 'onNavigationBarSearchInputChanged',
  10014. 'onNavigationBarSearchInputConfirmed',
  10015. 'onNavigationBarSearchInputClicked',
  10016. 'onUploadDouyinVideo',
  10017. 'onNFCReadMessage',
  10018. //Component
  10019. // 'onReady', // 兼容旧版本,应该移除该事件
  10020. 'onPageShow',
  10021. 'onPageHide',
  10022. 'onPageResize'
  10023. ];
  10024. function lifecycleMixin$1(Vue) {
  10025. //fixed vue-class-component
  10026. var oldExtend = Vue.extend;
  10027. Vue.extend = function(extendOptions) {
  10028. extendOptions = extendOptions || {};
  10029. var methods = extendOptions.methods;
  10030. if (methods) {
  10031. Object.keys(methods).forEach(function (methodName) {
  10032. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10033. extendOptions[methodName] = methods[methodName];
  10034. delete methods[methodName];
  10035. }
  10036. });
  10037. }
  10038. return oldExtend.call(this, extendOptions)
  10039. };
  10040. var strategies = Vue.config.optionMergeStrategies;
  10041. var mergeHook = strategies.created;
  10042. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10043. strategies[hook] = mergeHook;
  10044. });
  10045. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10046. }
  10047. /* */
  10048. // install platform patch function
  10049. Vue.prototype.__patch__ = patch;
  10050. // public mount method
  10051. Vue.prototype.$mount = function(
  10052. el ,
  10053. hydrating
  10054. ) {
  10055. return mountComponent$1(this, el, hydrating)
  10056. };
  10057. lifecycleMixin$1(Vue);
  10058. internalMixin(Vue);
  10059. /* */
  10060. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10061. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10062. /***/ }),
  10063. /***/ 26:
  10064. /*!*****************************************************!*\
  10065. !*** E:/work/Project_newGit/UniappShell/pages.json ***!
  10066. \*****************************************************/
  10067. /*! no static exports found */
  10068. /***/ (function(module, exports) {
  10069. /***/ }),
  10070. /***/ 3:
  10071. /*!***********************************!*\
  10072. !*** (webpack)/buildin/global.js ***!
  10073. \***********************************/
  10074. /*! no static exports found */
  10075. /***/ (function(module, exports) {
  10076. var g;
  10077. // This works in non-strict mode
  10078. g = (function() {
  10079. return this;
  10080. })();
  10081. try {
  10082. // This works if eval is allowed (see CSP)
  10083. g = g || new Function("return this")();
  10084. } catch (e) {
  10085. // This works if the window reference is available
  10086. if (typeof window === "object") g = window;
  10087. }
  10088. // g can still be undefined, but nothing to do about it...
  10089. // We return undefined, instead of nothing here, so it's
  10090. // easier to handle this case. if(!global) { ...}
  10091. module.exports = g;
  10092. /***/ }),
  10093. /***/ 32:
  10094. /*!**********************************************************************************************************!*\
  10095. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  10096. \**********************************************************************************************************/
  10097. /*! exports provided: default */
  10098. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  10099. "use strict";
  10100. __webpack_require__.r(__webpack_exports__);
  10101. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  10102. /* globals __VUE_SSR_CONTEXT__ */
  10103. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  10104. // This module is a runtime utility for cleaner component module output and will
  10105. // be included in the final webpack user bundle.
  10106. function normalizeComponent (
  10107. scriptExports,
  10108. render,
  10109. staticRenderFns,
  10110. functionalTemplate,
  10111. injectStyles,
  10112. scopeId,
  10113. moduleIdentifier, /* server only */
  10114. shadowMode, /* vue-cli only */
  10115. components, // fixed by xxxxxx auto components
  10116. renderjs // fixed by xxxxxx renderjs
  10117. ) {
  10118. // Vue.extend constructor export interop
  10119. var options = typeof scriptExports === 'function'
  10120. ? scriptExports.options
  10121. : scriptExports
  10122. // fixed by xxxxxx auto components
  10123. if (components) {
  10124. if (!options.components) {
  10125. options.components = {}
  10126. }
  10127. var hasOwn = Object.prototype.hasOwnProperty
  10128. for (var name in components) {
  10129. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  10130. options.components[name] = components[name]
  10131. }
  10132. }
  10133. }
  10134. // fixed by xxxxxx renderjs
  10135. if (renderjs) {
  10136. if(typeof renderjs.beforeCreate === 'function'){
  10137. renderjs.beforeCreate = [renderjs.beforeCreate]
  10138. }
  10139. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  10140. this[renderjs.__module] = this
  10141. });
  10142. (options.mixins || (options.mixins = [])).push(renderjs)
  10143. }
  10144. // render functions
  10145. if (render) {
  10146. options.render = render
  10147. options.staticRenderFns = staticRenderFns
  10148. options._compiled = true
  10149. }
  10150. // functional template
  10151. if (functionalTemplate) {
  10152. options.functional = true
  10153. }
  10154. // scopedId
  10155. if (scopeId) {
  10156. options._scopeId = 'data-v-' + scopeId
  10157. }
  10158. var hook
  10159. if (moduleIdentifier) { // server build
  10160. hook = function (context) {
  10161. // 2.3 injection
  10162. context =
  10163. context || // cached call
  10164. (this.$vnode && this.$vnode.ssrContext) || // stateful
  10165. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  10166. // 2.2 with runInNewContext: true
  10167. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  10168. context = __VUE_SSR_CONTEXT__
  10169. }
  10170. // inject component styles
  10171. if (injectStyles) {
  10172. injectStyles.call(this, context)
  10173. }
  10174. // register component module identifier for async chunk inferrence
  10175. if (context && context._registeredComponents) {
  10176. context._registeredComponents.add(moduleIdentifier)
  10177. }
  10178. }
  10179. // used by ssr in case component is cached and beforeCreate
  10180. // never gets called
  10181. options._ssrRegister = hook
  10182. } else if (injectStyles) {
  10183. hook = shadowMode
  10184. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  10185. : injectStyles
  10186. }
  10187. if (hook) {
  10188. if (options.functional) {
  10189. // for template-only hot-reload because in that case the render fn doesn't
  10190. // go through the normalizer
  10191. options._injectStyles = hook
  10192. // register for functioal component in vue file
  10193. var originalRender = options.render
  10194. options.render = function renderWithStyleInjection (h, context) {
  10195. hook.call(context)
  10196. return originalRender(h, context)
  10197. }
  10198. } else {
  10199. // inject component registration as beforeCreate hook
  10200. var existing = options.beforeCreate
  10201. options.beforeCreate = existing
  10202. ? [].concat(existing, hook)
  10203. : [hook]
  10204. }
  10205. }
  10206. return {
  10207. exports: scriptExports,
  10208. options: options
  10209. }
  10210. }
  10211. /***/ }),
  10212. /***/ 33:
  10213. /*!*******************************************************************!*\
  10214. !*** E:/work/Project_newGit/UniappShell/uni.promisify.adaptor.js ***!
  10215. \*******************************************************************/
  10216. /*! no static exports found */
  10217. /***/ (function(module, exports, __webpack_require__) {
  10218. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  10219. uni.addInterceptor({
  10220. returnValue: function returnValue(res) {
  10221. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  10222. return res;
  10223. }
  10224. return new Promise(function (resolve, reject) {
  10225. res.then(function (res) {
  10226. return res[0] ? reject(res[0]) : resolve(res[1]);
  10227. });
  10228. });
  10229. }
  10230. });
  10231. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10232. /***/ }),
  10233. /***/ 4:
  10234. /*!**********************************************************************!*\
  10235. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  10236. \**********************************************************************/
  10237. /*! no static exports found */
  10238. /***/ (function(module, exports) {
  10239. function _interopRequireDefault(obj) {
  10240. return obj && obj.__esModule ? obj : {
  10241. "default": obj
  10242. };
  10243. }
  10244. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10245. /***/ }),
  10246. /***/ 40:
  10247. /*!************************************************************!*\
  10248. !*** E:/work/Project_newGit/UniappShell/api/system/art.js ***!
  10249. \************************************************************/
  10250. /*! no static exports found */
  10251. /***/ (function(module, exports, __webpack_require__) {
  10252. "use strict";
  10253. Object.defineProperty(exports, "__esModule", {
  10254. value: true
  10255. });
  10256. exports.getNotices = getNotices;
  10257. var _request = __webpack_require__(/*! @/libs/request.js */ 41);
  10258. function getNotices(data) {
  10259. return (0, _request.request)({
  10260. url: "/art/page",
  10261. data: data
  10262. });
  10263. }
  10264. /***/ }),
  10265. /***/ 41:
  10266. /*!**********************************************************!*\
  10267. !*** E:/work/Project_newGit/UniappShell/libs/request.js ***!
  10268. \**********************************************************/
  10269. /*! no static exports found */
  10270. /***/ (function(module, exports, __webpack_require__) {
  10271. "use strict";
  10272. /* WEBPACK VAR INJECTION */(function(uni) {
  10273. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10274. Object.defineProperty(exports, "__esModule", {
  10275. value: true
  10276. });
  10277. exports.request = request;
  10278. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 42));
  10279. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  10280. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 44));
  10281. var _index = _interopRequireDefault(__webpack_require__(/*! @/config/index.js */ 45));
  10282. var _auth = __webpack_require__(/*! @/libs/auth.js */ 46);
  10283. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  10284. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  10285. var baseUrl = true ? _index.default.base.dev : undefined;
  10286. function request(_x) {
  10287. return _request.apply(this, arguments);
  10288. }
  10289. function _request() {
  10290. _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(parmas) {
  10291. return _regenerator.default.wrap(function _callee$(_context) {
  10292. while (1) {
  10293. switch (_context.prev = _context.next) {
  10294. case 0:
  10295. return _context.abrupt("return", new Promise(function (resolve, reject) {
  10296. try {
  10297. uni.showLoading({
  10298. title: '加载中',
  10299. mask: true
  10300. });
  10301. uni.request(_objectSpread(_objectSpread({}, formatRequestBody(parmas)), {}, {
  10302. success: function success(response) {
  10303. var data = response.data;
  10304. var code = data.code;
  10305. var msg = data.msg;
  10306. if (code === 200) {
  10307. resolve(data);
  10308. } else {
  10309. if (code === 401) {
  10310. uni.showToast({
  10311. title: "登录失效!",
  10312. mask: true,
  10313. icon: "none",
  10314. duration: 3000,
  10315. complete: function complete() {
  10316. // let pages=getCurrentPages()
  10317. // console.log({
  10318. // page:pages[pages.length-1].$route.fullPath
  10319. // })
  10320. setTimeout(function () {
  10321. uni.reLaunch({
  10322. url: '/pages/login/index'
  10323. });
  10324. }, 3000);
  10325. }
  10326. });
  10327. } else {
  10328. reject(data);
  10329. uni.showToast({
  10330. title: msg,
  10331. mask: true,
  10332. duration: 3000,
  10333. icon: "none"
  10334. });
  10335. }
  10336. }
  10337. },
  10338. fail: function fail(res) {
  10339. uni.showToast({
  10340. title: res,
  10341. mask: true,
  10342. icon: "none"
  10343. });
  10344. reject(res);
  10345. },
  10346. complete: function complete(res) {
  10347. uni.hideLoading();
  10348. }
  10349. }));
  10350. } catch (err) {
  10351. console.log(err);
  10352. reject(err);
  10353. }
  10354. }));
  10355. case 1:
  10356. case "end":
  10357. return _context.stop();
  10358. }
  10359. }
  10360. }, _callee);
  10361. }));
  10362. return _request.apply(this, arguments);
  10363. }
  10364. function formatRequestBody(parmas) {
  10365. var url = parmas.url;
  10366. url = baseUrl + url;
  10367. var data = _objectSpread({}, parmas.data);
  10368. var header = _objectSpread(_objectSpread({}, parmas.header), {}, {
  10369. AppID: _index.default.appID,
  10370. AppKey: _index.default.appKey,
  10371. AppSecret: _index.default.appSecret
  10372. });
  10373. if ((0, _auth.getToken)()) {
  10374. header[_index.default.TokenKey] = (0, _auth.getToken)();
  10375. }
  10376. var method = parmas.method || "get";
  10377. var dataType = parmas.dataType || "json";
  10378. var requestBody = {
  10379. url: url,
  10380. data: data,
  10381. header: header,
  10382. method: method,
  10383. dataType: dataType
  10384. };
  10385. return requestBody;
  10386. }
  10387. ;
  10388. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10389. /***/ }),
  10390. /***/ 42:
  10391. /*!************************************************************************************************!*\
  10392. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  10393. \************************************************************************************************/
  10394. /*! no static exports found */
  10395. /***/ (function(module, exports, __webpack_require__) {
  10396. // TODO(Babel 8): Remove this file.
  10397. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 43)();
  10398. module.exports = runtime;
  10399. /***/ }),
  10400. /***/ 43:
  10401. /*!*******************************************************************!*\
  10402. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  10403. \*******************************************************************/
  10404. /*! no static exports found */
  10405. /***/ (function(module, exports, __webpack_require__) {
  10406. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  10407. function _regeneratorRuntime() {
  10408. "use strict";
  10409. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  10410. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  10411. return exports;
  10412. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10413. var exports = {},
  10414. Op = Object.prototype,
  10415. hasOwn = Op.hasOwnProperty,
  10416. defineProperty = Object.defineProperty || function (obj, key, desc) {
  10417. obj[key] = desc.value;
  10418. },
  10419. $Symbol = "function" == typeof Symbol ? Symbol : {},
  10420. iteratorSymbol = $Symbol.iterator || "@@iterator",
  10421. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  10422. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  10423. function define(obj, key, value) {
  10424. return Object.defineProperty(obj, key, {
  10425. value: value,
  10426. enumerable: !0,
  10427. configurable: !0,
  10428. writable: !0
  10429. }), obj[key];
  10430. }
  10431. try {
  10432. define({}, "");
  10433. } catch (err) {
  10434. define = function define(obj, key, value) {
  10435. return obj[key] = value;
  10436. };
  10437. }
  10438. function wrap(innerFn, outerFn, self, tryLocsList) {
  10439. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  10440. generator = Object.create(protoGenerator.prototype),
  10441. context = new Context(tryLocsList || []);
  10442. return defineProperty(generator, "_invoke", {
  10443. value: makeInvokeMethod(innerFn, self, context)
  10444. }), generator;
  10445. }
  10446. function tryCatch(fn, obj, arg) {
  10447. try {
  10448. return {
  10449. type: "normal",
  10450. arg: fn.call(obj, arg)
  10451. };
  10452. } catch (err) {
  10453. return {
  10454. type: "throw",
  10455. arg: err
  10456. };
  10457. }
  10458. }
  10459. exports.wrap = wrap;
  10460. var ContinueSentinel = {};
  10461. function Generator() {}
  10462. function GeneratorFunction() {}
  10463. function GeneratorFunctionPrototype() {}
  10464. var IteratorPrototype = {};
  10465. define(IteratorPrototype, iteratorSymbol, function () {
  10466. return this;
  10467. });
  10468. var getProto = Object.getPrototypeOf,
  10469. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  10470. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  10471. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  10472. function defineIteratorMethods(prototype) {
  10473. ["next", "throw", "return"].forEach(function (method) {
  10474. define(prototype, method, function (arg) {
  10475. return this._invoke(method, arg);
  10476. });
  10477. });
  10478. }
  10479. function AsyncIterator(generator, PromiseImpl) {
  10480. function invoke(method, arg, resolve, reject) {
  10481. var record = tryCatch(generator[method], generator, arg);
  10482. if ("throw" !== record.type) {
  10483. var result = record.arg,
  10484. value = result.value;
  10485. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  10486. invoke("next", value, resolve, reject);
  10487. }, function (err) {
  10488. invoke("throw", err, resolve, reject);
  10489. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  10490. result.value = unwrapped, resolve(result);
  10491. }, function (error) {
  10492. return invoke("throw", error, resolve, reject);
  10493. });
  10494. }
  10495. reject(record.arg);
  10496. }
  10497. var previousPromise;
  10498. defineProperty(this, "_invoke", {
  10499. value: function value(method, arg) {
  10500. function callInvokeWithMethodAndArg() {
  10501. return new PromiseImpl(function (resolve, reject) {
  10502. invoke(method, arg, resolve, reject);
  10503. });
  10504. }
  10505. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  10506. }
  10507. });
  10508. }
  10509. function makeInvokeMethod(innerFn, self, context) {
  10510. var state = "suspendedStart";
  10511. return function (method, arg) {
  10512. if ("executing" === state) throw new Error("Generator is already running");
  10513. if ("completed" === state) {
  10514. if ("throw" === method) throw arg;
  10515. return doneResult();
  10516. }
  10517. for (context.method = method, context.arg = arg;;) {
  10518. var delegate = context.delegate;
  10519. if (delegate) {
  10520. var delegateResult = maybeInvokeDelegate(delegate, context);
  10521. if (delegateResult) {
  10522. if (delegateResult === ContinueSentinel) continue;
  10523. return delegateResult;
  10524. }
  10525. }
  10526. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  10527. if ("suspendedStart" === state) throw state = "completed", context.arg;
  10528. context.dispatchException(context.arg);
  10529. } else "return" === context.method && context.abrupt("return", context.arg);
  10530. state = "executing";
  10531. var record = tryCatch(innerFn, self, context);
  10532. if ("normal" === record.type) {
  10533. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  10534. return {
  10535. value: record.arg,
  10536. done: context.done
  10537. };
  10538. }
  10539. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  10540. }
  10541. };
  10542. }
  10543. function maybeInvokeDelegate(delegate, context) {
  10544. var methodName = context.method,
  10545. method = delegate.iterator[methodName];
  10546. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  10547. var record = tryCatch(method, delegate.iterator, context.arg);
  10548. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  10549. var info = record.arg;
  10550. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  10551. }
  10552. function pushTryEntry(locs) {
  10553. var entry = {
  10554. tryLoc: locs[0]
  10555. };
  10556. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  10557. }
  10558. function resetTryEntry(entry) {
  10559. var record = entry.completion || {};
  10560. record.type = "normal", delete record.arg, entry.completion = record;
  10561. }
  10562. function Context(tryLocsList) {
  10563. this.tryEntries = [{
  10564. tryLoc: "root"
  10565. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  10566. }
  10567. function values(iterable) {
  10568. if (iterable) {
  10569. var iteratorMethod = iterable[iteratorSymbol];
  10570. if (iteratorMethod) return iteratorMethod.call(iterable);
  10571. if ("function" == typeof iterable.next) return iterable;
  10572. if (!isNaN(iterable.length)) {
  10573. var i = -1,
  10574. next = function next() {
  10575. for (; ++i < iterable.length;) {
  10576. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  10577. }
  10578. return next.value = undefined, next.done = !0, next;
  10579. };
  10580. return next.next = next;
  10581. }
  10582. }
  10583. return {
  10584. next: doneResult
  10585. };
  10586. }
  10587. function doneResult() {
  10588. return {
  10589. value: undefined,
  10590. done: !0
  10591. };
  10592. }
  10593. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  10594. value: GeneratorFunctionPrototype,
  10595. configurable: !0
  10596. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  10597. value: GeneratorFunction,
  10598. configurable: !0
  10599. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  10600. var ctor = "function" == typeof genFun && genFun.constructor;
  10601. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  10602. }, exports.mark = function (genFun) {
  10603. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  10604. }, exports.awrap = function (arg) {
  10605. return {
  10606. __await: arg
  10607. };
  10608. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  10609. return this;
  10610. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  10611. void 0 === PromiseImpl && (PromiseImpl = Promise);
  10612. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  10613. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  10614. return result.done ? result.value : iter.next();
  10615. });
  10616. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  10617. return this;
  10618. }), define(Gp, "toString", function () {
  10619. return "[object Generator]";
  10620. }), exports.keys = function (val) {
  10621. var object = Object(val),
  10622. keys = [];
  10623. for (var key in object) {
  10624. keys.push(key);
  10625. }
  10626. return keys.reverse(), function next() {
  10627. for (; keys.length;) {
  10628. var key = keys.pop();
  10629. if (key in object) return next.value = key, next.done = !1, next;
  10630. }
  10631. return next.done = !0, next;
  10632. };
  10633. }, exports.values = values, Context.prototype = {
  10634. constructor: Context,
  10635. reset: function reset(skipTempReset) {
  10636. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  10637. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  10638. }
  10639. },
  10640. stop: function stop() {
  10641. this.done = !0;
  10642. var rootRecord = this.tryEntries[0].completion;
  10643. if ("throw" === rootRecord.type) throw rootRecord.arg;
  10644. return this.rval;
  10645. },
  10646. dispatchException: function dispatchException(exception) {
  10647. if (this.done) throw exception;
  10648. var context = this;
  10649. function handle(loc, caught) {
  10650. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  10651. }
  10652. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10653. var entry = this.tryEntries[i],
  10654. record = entry.completion;
  10655. if ("root" === entry.tryLoc) return handle("end");
  10656. if (entry.tryLoc <= this.prev) {
  10657. var hasCatch = hasOwn.call(entry, "catchLoc"),
  10658. hasFinally = hasOwn.call(entry, "finallyLoc");
  10659. if (hasCatch && hasFinally) {
  10660. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  10661. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  10662. } else if (hasCatch) {
  10663. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  10664. } else {
  10665. if (!hasFinally) throw new Error("try statement without catch or finally");
  10666. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  10667. }
  10668. }
  10669. }
  10670. },
  10671. abrupt: function abrupt(type, arg) {
  10672. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10673. var entry = this.tryEntries[i];
  10674. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  10675. var finallyEntry = entry;
  10676. break;
  10677. }
  10678. }
  10679. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  10680. var record = finallyEntry ? finallyEntry.completion : {};
  10681. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  10682. },
  10683. complete: function complete(record, afterLoc) {
  10684. if ("throw" === record.type) throw record.arg;
  10685. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  10686. },
  10687. finish: function finish(finallyLoc) {
  10688. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10689. var entry = this.tryEntries[i];
  10690. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  10691. }
  10692. },
  10693. "catch": function _catch(tryLoc) {
  10694. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10695. var entry = this.tryEntries[i];
  10696. if (entry.tryLoc === tryLoc) {
  10697. var record = entry.completion;
  10698. if ("throw" === record.type) {
  10699. var thrown = record.arg;
  10700. resetTryEntry(entry);
  10701. }
  10702. return thrown;
  10703. }
  10704. }
  10705. throw new Error("illegal catch attempt");
  10706. },
  10707. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  10708. return this.delegate = {
  10709. iterator: values(iterable),
  10710. resultName: resultName,
  10711. nextLoc: nextLoc
  10712. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  10713. }
  10714. }, exports;
  10715. }
  10716. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10717. /***/ }),
  10718. /***/ 44:
  10719. /*!*****************************************************************!*\
  10720. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  10721. \*****************************************************************/
  10722. /*! no static exports found */
  10723. /***/ (function(module, exports) {
  10724. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  10725. try {
  10726. var info = gen[key](arg);
  10727. var value = info.value;
  10728. } catch (error) {
  10729. reject(error);
  10730. return;
  10731. }
  10732. if (info.done) {
  10733. resolve(value);
  10734. } else {
  10735. Promise.resolve(value).then(_next, _throw);
  10736. }
  10737. }
  10738. function _asyncToGenerator(fn) {
  10739. return function () {
  10740. var self = this,
  10741. args = arguments;
  10742. return new Promise(function (resolve, reject) {
  10743. var gen = fn.apply(self, args);
  10744. function _next(value) {
  10745. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  10746. }
  10747. function _throw(err) {
  10748. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  10749. }
  10750. _next(undefined);
  10751. });
  10752. };
  10753. }
  10754. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10755. /***/ }),
  10756. /***/ 45:
  10757. /*!**********************************************************!*\
  10758. !*** E:/work/Project_newGit/UniappShell/config/index.js ***!
  10759. \**********************************************************/
  10760. /*! no static exports found */
  10761. /***/ (function(module, exports, __webpack_require__) {
  10762. "use strict";
  10763. Object.defineProperty(exports, "__esModule", {
  10764. value: true
  10765. });
  10766. exports.default = void 0;
  10767. var _default = {
  10768. base: {
  10769. dev: 'http://1.15.92.205:7001',
  10770. pro: 'http://1.15.92.205:7001'
  10771. },
  10772. appID: '10007',
  10773. appKey: '82a8bf439373e311',
  10774. appSecret: '82a8bf439373e311',
  10775. permitTplId: 7,
  10776. TokenKey: "Authorization"
  10777. };
  10778. exports.default = _default;
  10779. /***/ }),
  10780. /***/ 46:
  10781. /*!*******************************************************!*\
  10782. !*** E:/work/Project_newGit/UniappShell/libs/auth.js ***!
  10783. \*******************************************************/
  10784. /*! no static exports found */
  10785. /***/ (function(module, exports, __webpack_require__) {
  10786. "use strict";
  10787. /* WEBPACK VAR INJECTION */(function(uni) {
  10788. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10789. Object.defineProperty(exports, "__esModule", {
  10790. value: true
  10791. });
  10792. exports.getToken = getToken;
  10793. exports.removeToken = removeToken;
  10794. exports.setToken = setToken;
  10795. var _index = _interopRequireDefault(__webpack_require__(/*! ../config/index.js */ 45));
  10796. var TokenKey = _index.default.TokenKey;
  10797. function getToken() {
  10798. return uni.getStorageSync(TokenKey);
  10799. }
  10800. function setToken(token) {
  10801. return uni.setStorageSync(TokenKey, token);
  10802. }
  10803. function removeToken() {
  10804. return uni.removeStorageSync(TokenKey);
  10805. }
  10806. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  10807. /***/ }),
  10808. /***/ 47:
  10809. /*!***************************************************************!*\
  10810. !*** E:/work/Project_newGit/UniappShell/api/aqpt/alertApi.js ***!
  10811. \***************************************************************/
  10812. /*! no static exports found */
  10813. /***/ (function(module, exports, __webpack_require__) {
  10814. "use strict";
  10815. Object.defineProperty(exports, "__esModule", {
  10816. value: true
  10817. });
  10818. exports.cancelAlert = cancelAlert;
  10819. exports.completeAlert = completeAlert;
  10820. exports.counterByStatus = counterByStatus;
  10821. exports.deleteAlertById = deleteAlertById;
  10822. exports.getAlertById = getAlertById;
  10823. exports.getAlertByList = getAlertByList;
  10824. exports.getAlertByPage = getAlertByPage;
  10825. exports.getAlertCounter = getAlertCounter;
  10826. exports.getAlertWaitingByList = getAlertWaitingByList;
  10827. exports.transferAlert = transferAlert;
  10828. var _request = __webpack_require__(/*! @/libs/request.js */ 41);
  10829. /**
  10830. * 分页查询
  10831. */
  10832. function getAlertByPage(data) {
  10833. return (0, _request.request)({
  10834. url: '/alert/page',
  10835. method: 'GET',
  10836. data: data
  10837. });
  10838. }
  10839. /**
  10840. * 列表查询
  10841. */
  10842. function getAlertByList(data) {
  10843. return (0, _request.request)({
  10844. url: '/alert',
  10845. method: 'GET',
  10846. data: data
  10847. });
  10848. }
  10849. /**
  10850. * 列表查询待处理告警
  10851. */
  10852. function getAlertWaitingByList(data) {
  10853. return (0, _request.request)({
  10854. url: '/alert/waiting',
  10855. method: 'GET',
  10856. data: data
  10857. });
  10858. }
  10859. /**
  10860. * 基于ID查询Alert
  10861. */
  10862. function getAlertById(alertId) {
  10863. return (0, _request.request)({
  10864. url: "/alert/".concat(alertId),
  10865. method: 'GET'
  10866. });
  10867. }
  10868. /**
  10869. * 完成处理
  10870. * @param data
  10871. * @returns
  10872. */
  10873. function completeAlert(data) {
  10874. return (0, _request.request)({
  10875. url: "/alert/complete",
  10876. method: 'POST',
  10877. data: data
  10878. });
  10879. }
  10880. /**
  10881. * 转交他人
  10882. * @param alertId
  10883. * @param data
  10884. * @returns
  10885. */
  10886. function transferAlert(alertId, data) {
  10887. return (0, _request.request)({
  10888. url: "/alert/transfer/".concat(alertId),
  10889. method: 'POST',
  10890. data: data
  10891. });
  10892. }
  10893. /**
  10894. * 撤消
  10895. * @param alertId
  10896. * @returns
  10897. */
  10898. function cancelAlert(alertId) {
  10899. return (0, _request.request)({
  10900. url: "/alert/cancel/".concat(alertId),
  10901. method: 'GET'
  10902. });
  10903. }
  10904. /**
  10905. * 删除
  10906. */
  10907. function deleteAlertById(alertId) {
  10908. return (0, _request.request)({
  10909. url: "/alert/".concat(alertId),
  10910. method: 'DELETE'
  10911. });
  10912. }
  10913. /**
  10914. * 查询统计结果
  10915. */
  10916. function counterByStatus(data) {
  10917. return (0, _request.request)({
  10918. url: '/alert/statis/counterByStatus',
  10919. method: 'GET',
  10920. data: data
  10921. });
  10922. }
  10923. /**
  10924. * 查询统计结果
  10925. */
  10926. function getAlertCounter() {
  10927. return (0, _request.request)({
  10928. url: '/alert/statis/getCounter',
  10929. method: 'GET'
  10930. });
  10931. }
  10932. /***/ }),
  10933. /***/ 48:
  10934. /*!****************************************************************!*\
  10935. !*** E:/work/Project_newGit/UniappShell/api/aqpt/dangerApi.js ***!
  10936. \****************************************************************/
  10937. /*! no static exports found */
  10938. /***/ (function(module, exports, __webpack_require__) {
  10939. "use strict";
  10940. Object.defineProperty(exports, "__esModule", {
  10941. value: true
  10942. });
  10943. exports.deleteDangerById = deleteDangerById;
  10944. exports.getDangerById = getDangerById;
  10945. exports.getDangerByList = getDangerByList;
  10946. exports.getDangerByPage = getDangerByPage;
  10947. exports.getDangerWaitingByList = getDangerWaitingByList;
  10948. exports.getRecentDangerByList = getRecentDangerByList;
  10949. exports.handleDanger = handleDanger;
  10950. var _request = __webpack_require__(/*! @/libs/request.js */ 41);
  10951. /**
  10952. * 获取Danger列表
  10953. * @param data
  10954. * @returns
  10955. */
  10956. function getDangerByList(data) {
  10957. return (0, _request.request)({
  10958. url: '/danger',
  10959. method: 'GET',
  10960. data: data
  10961. });
  10962. }
  10963. /**
  10964. * 获取Danger列表
  10965. * @param data
  10966. * @returns
  10967. */
  10968. function getRecentDangerByList(data) {
  10969. return (0, _request.request)({
  10970. url: '/danger/recent',
  10971. method: 'GET',
  10972. data: data
  10973. });
  10974. }
  10975. /**
  10976. * 查询待处理Danger列表
  10977. * @param data
  10978. * @returns
  10979. */
  10980. function getDangerWaitingByList(data) {
  10981. return (0, _request.request)({
  10982. url: '/danger/waiting',
  10983. method: 'GET',
  10984. data: data
  10985. });
  10986. }
  10987. /**
  10988. * 获取Danger分页
  10989. * @param data
  10990. * @returns
  10991. */
  10992. function getDangerByPage(data) {
  10993. return (0, _request.request)({
  10994. url: '/danger/page',
  10995. method: 'GET',
  10996. data: data
  10997. });
  10998. }
  10999. /**
  11000. * 根据Id获取Danger
  11001. * @param dangerId
  11002. * @returns
  11003. */
  11004. function getDangerById(dangerId) {
  11005. return (0, _request.request)({
  11006. url: "/danger/".concat(dangerId),
  11007. method: 'GET'
  11008. });
  11009. }
  11010. /**
  11011. * 删除Danger
  11012. * @param dangerId
  11013. * @returns
  11014. */
  11015. function deleteDangerById(dangerId) {
  11016. return (0, _request.request)({
  11017. url: "/danger/".concat(dangerId),
  11018. method: 'DELETE'
  11019. });
  11020. }
  11021. /**
  11022. * 处理Danger
  11023. * @param data
  11024. * @returns
  11025. */
  11026. function handleDanger(data) {
  11027. return (0, _request.request)({
  11028. url: "/danger/handle",
  11029. method: 'POST',
  11030. data: data
  11031. });
  11032. }
  11033. /***/ }),
  11034. /***/ 49:
  11035. /*!**************************************************************!*\
  11036. !*** E:/work/Project_newGit/UniappShell/api/aqpt/taskApi.js ***!
  11037. \**************************************************************/
  11038. /*! no static exports found */
  11039. /***/ (function(module, exports, __webpack_require__) {
  11040. "use strict";
  11041. Object.defineProperty(exports, "__esModule", {
  11042. value: true
  11043. });
  11044. exports.cancelTask = cancelTask;
  11045. exports.createTask = createTask;
  11046. exports.deleteTaskById = deleteTaskById;
  11047. exports.getRecentTaskByList = getRecentTaskByList;
  11048. exports.getTaskById = getTaskById;
  11049. exports.getTaskByList = getTaskByList;
  11050. exports.getTaskByPage = getTaskByPage;
  11051. exports.getWaitingTaskByList = getWaitingTaskByList;
  11052. exports.handleTask = handleTask;
  11053. exports.transferTask = transferTask;
  11054. exports.updateTask = updateTask;
  11055. var _request = __webpack_require__(/*! @/libs/request.js */ 41);
  11056. /**
  11057. * 分页查询Task
  11058. * @param data
  11059. * @returns
  11060. */
  11061. function getTaskByPage(data) {
  11062. return (0, _request.request)({
  11063. url: '/task/page',
  11064. method: 'GET',
  11065. data: data
  11066. });
  11067. }
  11068. /**
  11069. * 列表查询Task
  11070. * @param data
  11071. * @returns
  11072. */
  11073. function getTaskByList(data) {
  11074. return (0, _request.request)({
  11075. url: '/task',
  11076. method: 'GET',
  11077. data: data
  11078. });
  11079. }
  11080. /**
  11081. * 列表查询未执行Task
  11082. * @param data
  11083. * @returns
  11084. */
  11085. function getWaitingTaskByList(data) {
  11086. return (0, _request.request)({
  11087. url: '/task/waiting',
  11088. method: 'GET',
  11089. data: data
  11090. });
  11091. }
  11092. /**
  11093. * 列表查询Task: 50笔
  11094. * @param data
  11095. * @returns
  11096. */
  11097. function getRecentTaskByList(data) {
  11098. return (0, _request.request)({
  11099. url: '/task/recent',
  11100. method: 'GET',
  11101. data: data
  11102. });
  11103. }
  11104. /**
  11105. * @param taskId
  11106. * @returns
  11107. */
  11108. function getTaskById(taskId) {
  11109. return (0, _request.request)({
  11110. url: "/task/".concat(taskId),
  11111. method: 'GET'
  11112. });
  11113. }
  11114. /**
  11115. * 添加Task
  11116. * @param data
  11117. * @returns
  11118. */
  11119. function createTask(data) {
  11120. return (0, _request.request)({
  11121. url: "/task/add",
  11122. method: 'POST',
  11123. data: data
  11124. });
  11125. }
  11126. /**
  11127. * 更新Task
  11128. * @param data
  11129. * @returns
  11130. */
  11131. function updateTask(data) {
  11132. return (0, _request.request)({
  11133. url: "/task/update",
  11134. method: 'PUT',
  11135. data: data
  11136. });
  11137. }
  11138. /**
  11139. * 删除Task
  11140. * @param taskId
  11141. * @returns
  11142. */
  11143. function deleteTaskById(taskId) {
  11144. return (0, _request.request)({
  11145. url: "/task/".concat(taskId),
  11146. method: 'DELETE'
  11147. });
  11148. }
  11149. /**
  11150. * Handle Task
  11151. * @param taskId
  11152. * @returns
  11153. */
  11154. function handleTask(taskId) {
  11155. return (0, _request.request)({
  11156. url: "/task/handle/".concat(taskId),
  11157. method: 'PUT'
  11158. });
  11159. }
  11160. /**
  11161. * Transfer Task
  11162. * @param data
  11163. * @returns
  11164. */
  11165. function transferTask(data) {
  11166. return (0, _request.request)({
  11167. url: "/task/transfer",
  11168. method: 'PUT',
  11169. data: data
  11170. });
  11171. }
  11172. /**
  11173. * Cancel Task
  11174. * @param taskId
  11175. * @returns
  11176. */
  11177. function cancelTask(taskId) {
  11178. return (0, _request.request)({
  11179. url: "/task/cancel/".concat(taskId),
  11180. method: 'PUT'
  11181. });
  11182. }
  11183. /***/ }),
  11184. /***/ 5:
  11185. /*!**************************************************************!*\
  11186. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  11187. \**************************************************************/
  11188. /*! no static exports found */
  11189. /***/ (function(module, exports, __webpack_require__) {
  11190. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  11191. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  11192. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  11193. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  11194. function _slicedToArray(arr, i) {
  11195. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  11196. }
  11197. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11198. /***/ }),
  11199. /***/ 50:
  11200. /*!*******************************************************!*\
  11201. !*** E:/work/Project_newGit/UniappShell/libs/enum.js ***!
  11202. \*******************************************************/
  11203. /*! no static exports found */
  11204. /***/ (function(module, exports, __webpack_require__) {
  11205. "use strict";
  11206. Object.defineProperty(exports, "__esModule", {
  11207. value: true
  11208. });
  11209. exports.alertLevel = alertLevel;
  11210. exports.alertStatus = alertStatus;
  11211. exports.checkResult = checkResult;
  11212. exports.dangerLevel = dangerLevel;
  11213. exports.dangerRectifyCat = dangerRectifyCat;
  11214. exports.dangerSource = dangerSource;
  11215. exports.dangerStatus = dangerStatus;
  11216. exports.rectifyCat = rectifyCat;
  11217. exports.riskLevel = riskLevel;
  11218. exports.riskPointLevel = riskPointLevel;
  11219. exports.riskPointStatus = riskPointStatus;
  11220. exports.riskType = riskType;
  11221. exports.taskPriority = taskPriority;
  11222. exports.taskStatus = taskStatus;
  11223. exports.taskType = taskType;
  11224. exports.wfInsStatus = wfInsStatus;
  11225. exports.wfTaskInsStatus = wfTaskInsStatus;
  11226. // 风险类型
  11227. function riskType(val) {
  11228. var strs = ['默认', '人', '物', '管'];
  11229. return strs[val];
  11230. }
  11231. // 风险等级
  11232. function riskLevel(val) {
  11233. var strs = ['默认', '重大', '较大', '一般', '较小'];
  11234. return strs[val];
  11235. }
  11236. // 风险等级
  11237. function riskPointStatus(val) {
  11238. var strs = ['未知', '安全受控', '失控'];
  11239. return strs[val];
  11240. }
  11241. // 风险点等级
  11242. function riskPointLevel(val) {
  11243. var strs = ['默认', '重大', '较大', '一般', '较小'];
  11244. return strs[val];
  11245. }
  11246. function taskPriority(i) {
  11247. var strs = ['未知', '较低', '普通', '紧急', '非常紧急'];
  11248. return strs[i];
  11249. }
  11250. function taskType(i) {
  11251. var strs = ['未知', '常规', '审批任务', '巡检任务'];
  11252. return strs[i];
  11253. }
  11254. function taskStatus(i) {
  11255. var strs = ['待处理', '已完成'];
  11256. if (i === -1) {
  11257. return '已撤消';
  11258. } else {
  11259. return strs[i];
  11260. }
  11261. }
  11262. function checkResult(i) {
  11263. var strs = ['没执行', '通过', '没通过', '有隐患', '已完成'];
  11264. return strs[i];
  11265. }
  11266. function dangerStatus(i) {
  11267. if (i >= 0) {
  11268. var strs = ['未开始', '处理中', '已完成'];
  11269. return strs[i];
  11270. } else {
  11271. return '已撤销';
  11272. }
  11273. }
  11274. function dangerLevel(i) {
  11275. var strs = ['未知', '重大', '较大', '严重', '一般'];
  11276. return strs[i];
  11277. }
  11278. function dangerSource(i) {
  11279. var strs = ['自查', '内部反馈', '上级抽查', '政府执法'];
  11280. return strs[i];
  11281. }
  11282. function rectifyCat(i) {
  11283. var strs = ['自行整改', '外协整改'];
  11284. return strs[i];
  11285. }
  11286. function wfInsStatus(i) {
  11287. if (i >= 0) {
  11288. var strs = ['未开始', '执行中', '已完成'];
  11289. return strs[i];
  11290. } else {
  11291. return '已撤销';
  11292. }
  11293. }
  11294. function wfTaskInsStatus(i) {
  11295. var strs = ['未开始', '已完成'];
  11296. return strs[i];
  11297. }
  11298. function dangerRectifyCat(i) {
  11299. var strs = ['自行整改', '外协整改'];
  11300. return strs[i];
  11301. }
  11302. function alertLevel(i) {
  11303. var strs = ['未知', '1级', '2级', '3级', '4级', '5级', '6级'];
  11304. return strs[i];
  11305. }
  11306. function alertStatus(i) {
  11307. if (i >= 0) {
  11308. var strs = ['待处理', '已处理'];
  11309. return strs[i];
  11310. } else {
  11311. return '已撤销';
  11312. }
  11313. }
  11314. /***/ }),
  11315. /***/ 59:
  11316. /*!*********************************************************!*\
  11317. !*** E:/work/Project_newGit/UniappShell/store/index.js ***!
  11318. \*********************************************************/
  11319. /*! no static exports found */
  11320. /***/ (function(module, exports, __webpack_require__) {
  11321. "use strict";
  11322. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11323. Object.defineProperty(exports, "__esModule", {
  11324. value: true
  11325. });
  11326. exports.default = void 0;
  11327. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  11328. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 60));
  11329. _vue.default.use(_vuex.default);
  11330. //实例store对象
  11331. var store = new _vuex.default.Store({
  11332. state: {
  11333. access_token: "",
  11334. jpush: null
  11335. },
  11336. mutations: {
  11337. setToken: function setToken(state, token) {
  11338. state.access_token = token;
  11339. },
  11340. initJpush: function initJpush(state, jpush) {
  11341. state.jpush = jpush;
  11342. }
  11343. }
  11344. });
  11345. //导出store对象
  11346. var _default = store;
  11347. exports.default = _default;
  11348. /***/ }),
  11349. /***/ 6:
  11350. /*!***************************************************************!*\
  11351. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  11352. \***************************************************************/
  11353. /*! no static exports found */
  11354. /***/ (function(module, exports) {
  11355. function _arrayWithHoles(arr) {
  11356. if (Array.isArray(arr)) return arr;
  11357. }
  11358. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11359. /***/ }),
  11360. /***/ 60:
  11361. /*!**************************************************************************************!*\
  11362. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  11363. \**************************************************************************************/
  11364. /*! no static exports found */
  11365. /***/ (function(module, exports, __webpack_require__) {
  11366. "use strict";
  11367. /* WEBPACK VAR INJECTION */(function(global) {/*!
  11368. * vuex v3.6.2
  11369. * (c) 2021 Evan You
  11370. * @license MIT
  11371. */
  11372. function applyMixin (Vue) {
  11373. var version = Number(Vue.version.split('.')[0]);
  11374. if (version >= 2) {
  11375. Vue.mixin({ beforeCreate: vuexInit });
  11376. } else {
  11377. // override init and inject vuex init procedure
  11378. // for 1.x backwards compatibility.
  11379. var _init = Vue.prototype._init;
  11380. Vue.prototype._init = function (options) {
  11381. if ( options === void 0 ) options = {};
  11382. options.init = options.init
  11383. ? [vuexInit].concat(options.init)
  11384. : vuexInit;
  11385. _init.call(this, options);
  11386. };
  11387. }
  11388. /**
  11389. * Vuex init hook, injected into each instances init hooks list.
  11390. */
  11391. function vuexInit () {
  11392. var options = this.$options;
  11393. // store injection
  11394. if (options.store) {
  11395. this.$store = typeof options.store === 'function'
  11396. ? options.store()
  11397. : options.store;
  11398. } else if (options.parent && options.parent.$store) {
  11399. this.$store = options.parent.$store;
  11400. }
  11401. }
  11402. }
  11403. var target = typeof window !== 'undefined'
  11404. ? window
  11405. : typeof global !== 'undefined'
  11406. ? global
  11407. : {};
  11408. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  11409. function devtoolPlugin (store) {
  11410. if (!devtoolHook) { return }
  11411. store._devtoolHook = devtoolHook;
  11412. devtoolHook.emit('vuex:init', store);
  11413. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  11414. store.replaceState(targetState);
  11415. });
  11416. store.subscribe(function (mutation, state) {
  11417. devtoolHook.emit('vuex:mutation', mutation, state);
  11418. }, { prepend: true });
  11419. store.subscribeAction(function (action, state) {
  11420. devtoolHook.emit('vuex:action', action, state);
  11421. }, { prepend: true });
  11422. }
  11423. /**
  11424. * Get the first item that pass the test
  11425. * by second argument function
  11426. *
  11427. * @param {Array} list
  11428. * @param {Function} f
  11429. * @return {*}
  11430. */
  11431. function find (list, f) {
  11432. return list.filter(f)[0]
  11433. }
  11434. /**
  11435. * Deep copy the given object considering circular structure.
  11436. * This function caches all nested objects and its copies.
  11437. * If it detects circular structure, use cached copy to avoid infinite loop.
  11438. *
  11439. * @param {*} obj
  11440. * @param {Array<Object>} cache
  11441. * @return {*}
  11442. */
  11443. function deepCopy (obj, cache) {
  11444. if ( cache === void 0 ) cache = [];
  11445. // just return if obj is immutable value
  11446. if (obj === null || typeof obj !== 'object') {
  11447. return obj
  11448. }
  11449. // if obj is hit, it is in circular structure
  11450. var hit = find(cache, function (c) { return c.original === obj; });
  11451. if (hit) {
  11452. return hit.copy
  11453. }
  11454. var copy = Array.isArray(obj) ? [] : {};
  11455. // put the copy into cache at first
  11456. // because we want to refer it in recursive deepCopy
  11457. cache.push({
  11458. original: obj,
  11459. copy: copy
  11460. });
  11461. Object.keys(obj).forEach(function (key) {
  11462. copy[key] = deepCopy(obj[key], cache);
  11463. });
  11464. return copy
  11465. }
  11466. /**
  11467. * forEach for object
  11468. */
  11469. function forEachValue (obj, fn) {
  11470. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  11471. }
  11472. function isObject (obj) {
  11473. return obj !== null && typeof obj === 'object'
  11474. }
  11475. function isPromise (val) {
  11476. return val && typeof val.then === 'function'
  11477. }
  11478. function assert (condition, msg) {
  11479. if (!condition) { throw new Error(("[vuex] " + msg)) }
  11480. }
  11481. function partial (fn, arg) {
  11482. return function () {
  11483. return fn(arg)
  11484. }
  11485. }
  11486. // Base data struct for store's module, package with some attribute and method
  11487. var Module = function Module (rawModule, runtime) {
  11488. this.runtime = runtime;
  11489. // Store some children item
  11490. this._children = Object.create(null);
  11491. // Store the origin module object which passed by programmer
  11492. this._rawModule = rawModule;
  11493. var rawState = rawModule.state;
  11494. // Store the origin module's state
  11495. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  11496. };
  11497. var prototypeAccessors = { namespaced: { configurable: true } };
  11498. prototypeAccessors.namespaced.get = function () {
  11499. return !!this._rawModule.namespaced
  11500. };
  11501. Module.prototype.addChild = function addChild (key, module) {
  11502. this._children[key] = module;
  11503. };
  11504. Module.prototype.removeChild = function removeChild (key) {
  11505. delete this._children[key];
  11506. };
  11507. Module.prototype.getChild = function getChild (key) {
  11508. return this._children[key]
  11509. };
  11510. Module.prototype.hasChild = function hasChild (key) {
  11511. return key in this._children
  11512. };
  11513. Module.prototype.update = function update (rawModule) {
  11514. this._rawModule.namespaced = rawModule.namespaced;
  11515. if (rawModule.actions) {
  11516. this._rawModule.actions = rawModule.actions;
  11517. }
  11518. if (rawModule.mutations) {
  11519. this._rawModule.mutations = rawModule.mutations;
  11520. }
  11521. if (rawModule.getters) {
  11522. this._rawModule.getters = rawModule.getters;
  11523. }
  11524. };
  11525. Module.prototype.forEachChild = function forEachChild (fn) {
  11526. forEachValue(this._children, fn);
  11527. };
  11528. Module.prototype.forEachGetter = function forEachGetter (fn) {
  11529. if (this._rawModule.getters) {
  11530. forEachValue(this._rawModule.getters, fn);
  11531. }
  11532. };
  11533. Module.prototype.forEachAction = function forEachAction (fn) {
  11534. if (this._rawModule.actions) {
  11535. forEachValue(this._rawModule.actions, fn);
  11536. }
  11537. };
  11538. Module.prototype.forEachMutation = function forEachMutation (fn) {
  11539. if (this._rawModule.mutations) {
  11540. forEachValue(this._rawModule.mutations, fn);
  11541. }
  11542. };
  11543. Object.defineProperties( Module.prototype, prototypeAccessors );
  11544. var ModuleCollection = function ModuleCollection (rawRootModule) {
  11545. // register root module (Vuex.Store options)
  11546. this.register([], rawRootModule, false);
  11547. };
  11548. ModuleCollection.prototype.get = function get (path) {
  11549. return path.reduce(function (module, key) {
  11550. return module.getChild(key)
  11551. }, this.root)
  11552. };
  11553. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  11554. var module = this.root;
  11555. return path.reduce(function (namespace, key) {
  11556. module = module.getChild(key);
  11557. return namespace + (module.namespaced ? key + '/' : '')
  11558. }, '')
  11559. };
  11560. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  11561. update([], this.root, rawRootModule);
  11562. };
  11563. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  11564. var this$1 = this;
  11565. if ( runtime === void 0 ) runtime = true;
  11566. if ((true)) {
  11567. assertRawModule(path, rawModule);
  11568. }
  11569. var newModule = new Module(rawModule, runtime);
  11570. if (path.length === 0) {
  11571. this.root = newModule;
  11572. } else {
  11573. var parent = this.get(path.slice(0, -1));
  11574. parent.addChild(path[path.length - 1], newModule);
  11575. }
  11576. // register nested modules
  11577. if (rawModule.modules) {
  11578. forEachValue(rawModule.modules, function (rawChildModule, key) {
  11579. this$1.register(path.concat(key), rawChildModule, runtime);
  11580. });
  11581. }
  11582. };
  11583. ModuleCollection.prototype.unregister = function unregister (path) {
  11584. var parent = this.get(path.slice(0, -1));
  11585. var key = path[path.length - 1];
  11586. var child = parent.getChild(key);
  11587. if (!child) {
  11588. if ((true)) {
  11589. console.warn(
  11590. "[vuex] trying to unregister module '" + key + "', which is " +
  11591. "not registered"
  11592. );
  11593. }
  11594. return
  11595. }
  11596. if (!child.runtime) {
  11597. return
  11598. }
  11599. parent.removeChild(key);
  11600. };
  11601. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  11602. var parent = this.get(path.slice(0, -1));
  11603. var key = path[path.length - 1];
  11604. if (parent) {
  11605. return parent.hasChild(key)
  11606. }
  11607. return false
  11608. };
  11609. function update (path, targetModule, newModule) {
  11610. if ((true)) {
  11611. assertRawModule(path, newModule);
  11612. }
  11613. // update target module
  11614. targetModule.update(newModule);
  11615. // update nested modules
  11616. if (newModule.modules) {
  11617. for (var key in newModule.modules) {
  11618. if (!targetModule.getChild(key)) {
  11619. if ((true)) {
  11620. console.warn(
  11621. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  11622. 'manual reload is needed'
  11623. );
  11624. }
  11625. return
  11626. }
  11627. update(
  11628. path.concat(key),
  11629. targetModule.getChild(key),
  11630. newModule.modules[key]
  11631. );
  11632. }
  11633. }
  11634. }
  11635. var functionAssert = {
  11636. assert: function (value) { return typeof value === 'function'; },
  11637. expected: 'function'
  11638. };
  11639. var objectAssert = {
  11640. assert: function (value) { return typeof value === 'function' ||
  11641. (typeof value === 'object' && typeof value.handler === 'function'); },
  11642. expected: 'function or object with "handler" function'
  11643. };
  11644. var assertTypes = {
  11645. getters: functionAssert,
  11646. mutations: functionAssert,
  11647. actions: objectAssert
  11648. };
  11649. function assertRawModule (path, rawModule) {
  11650. Object.keys(assertTypes).forEach(function (key) {
  11651. if (!rawModule[key]) { return }
  11652. var assertOptions = assertTypes[key];
  11653. forEachValue(rawModule[key], function (value, type) {
  11654. assert(
  11655. assertOptions.assert(value),
  11656. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  11657. );
  11658. });
  11659. });
  11660. }
  11661. function makeAssertionMessage (path, key, type, value, expected) {
  11662. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  11663. if (path.length > 0) {
  11664. buf += " in module \"" + (path.join('.')) + "\"";
  11665. }
  11666. buf += " is " + (JSON.stringify(value)) + ".";
  11667. return buf
  11668. }
  11669. var Vue; // bind on install
  11670. var Store = function Store (options) {
  11671. var this$1 = this;
  11672. if ( options === void 0 ) options = {};
  11673. // Auto install if it is not done yet and `window` has `Vue`.
  11674. // To allow users to avoid auto-installation in some cases,
  11675. // this code should be placed here. See #731
  11676. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  11677. install(window.Vue);
  11678. }
  11679. if ((true)) {
  11680. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  11681. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  11682. assert(this instanceof Store, "store must be called with the new operator.");
  11683. }
  11684. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  11685. var strict = options.strict; if ( strict === void 0 ) strict = false;
  11686. // store internal state
  11687. this._committing = false;
  11688. this._actions = Object.create(null);
  11689. this._actionSubscribers = [];
  11690. this._mutations = Object.create(null);
  11691. this._wrappedGetters = Object.create(null);
  11692. this._modules = new ModuleCollection(options);
  11693. this._modulesNamespaceMap = Object.create(null);
  11694. this._subscribers = [];
  11695. this._watcherVM = new Vue();
  11696. this._makeLocalGettersCache = Object.create(null);
  11697. // bind commit and dispatch to self
  11698. var store = this;
  11699. var ref = this;
  11700. var dispatch = ref.dispatch;
  11701. var commit = ref.commit;
  11702. this.dispatch = function boundDispatch (type, payload) {
  11703. return dispatch.call(store, type, payload)
  11704. };
  11705. this.commit = function boundCommit (type, payload, options) {
  11706. return commit.call(store, type, payload, options)
  11707. };
  11708. // strict mode
  11709. this.strict = strict;
  11710. var state = this._modules.root.state;
  11711. // init root module.
  11712. // this also recursively registers all sub-modules
  11713. // and collects all module getters inside this._wrappedGetters
  11714. installModule(this, state, [], this._modules.root);
  11715. // initialize the store vm, which is responsible for the reactivity
  11716. // (also registers _wrappedGetters as computed properties)
  11717. resetStoreVM(this, state);
  11718. // apply plugins
  11719. plugins.forEach(function (plugin) { return plugin(this$1); });
  11720. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  11721. if (useDevtools) {
  11722. devtoolPlugin(this);
  11723. }
  11724. };
  11725. var prototypeAccessors$1 = { state: { configurable: true } };
  11726. prototypeAccessors$1.state.get = function () {
  11727. return this._vm._data.$$state
  11728. };
  11729. prototypeAccessors$1.state.set = function (v) {
  11730. if ((true)) {
  11731. assert(false, "use store.replaceState() to explicit replace store state.");
  11732. }
  11733. };
  11734. Store.prototype.commit = function commit (_type, _payload, _options) {
  11735. var this$1 = this;
  11736. // check object-style commit
  11737. var ref = unifyObjectStyle(_type, _payload, _options);
  11738. var type = ref.type;
  11739. var payload = ref.payload;
  11740. var options = ref.options;
  11741. var mutation = { type: type, payload: payload };
  11742. var entry = this._mutations[type];
  11743. if (!entry) {
  11744. if ((true)) {
  11745. console.error(("[vuex] unknown mutation type: " + type));
  11746. }
  11747. return
  11748. }
  11749. this._withCommit(function () {
  11750. entry.forEach(function commitIterator (handler) {
  11751. handler(payload);
  11752. });
  11753. });
  11754. this._subscribers
  11755. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  11756. .forEach(function (sub) { return sub(mutation, this$1.state); });
  11757. if (
  11758. ( true) &&
  11759. options && options.silent
  11760. ) {
  11761. console.warn(
  11762. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  11763. 'Use the filter functionality in the vue-devtools'
  11764. );
  11765. }
  11766. };
  11767. Store.prototype.dispatch = function dispatch (_type, _payload) {
  11768. var this$1 = this;
  11769. // check object-style dispatch
  11770. var ref = unifyObjectStyle(_type, _payload);
  11771. var type = ref.type;
  11772. var payload = ref.payload;
  11773. var action = { type: type, payload: payload };
  11774. var entry = this._actions[type];
  11775. if (!entry) {
  11776. if ((true)) {
  11777. console.error(("[vuex] unknown action type: " + type));
  11778. }
  11779. return
  11780. }
  11781. try {
  11782. this._actionSubscribers
  11783. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  11784. .filter(function (sub) { return sub.before; })
  11785. .forEach(function (sub) { return sub.before(action, this$1.state); });
  11786. } catch (e) {
  11787. if ((true)) {
  11788. console.warn("[vuex] error in before action subscribers: ");
  11789. console.error(e);
  11790. }
  11791. }
  11792. var result = entry.length > 1
  11793. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  11794. : entry[0](payload);
  11795. return new Promise(function (resolve, reject) {
  11796. result.then(function (res) {
  11797. try {
  11798. this$1._actionSubscribers
  11799. .filter(function (sub) { return sub.after; })
  11800. .forEach(function (sub) { return sub.after(action, this$1.state); });
  11801. } catch (e) {
  11802. if ((true)) {
  11803. console.warn("[vuex] error in after action subscribers: ");
  11804. console.error(e);
  11805. }
  11806. }
  11807. resolve(res);
  11808. }, function (error) {
  11809. try {
  11810. this$1._actionSubscribers
  11811. .filter(function (sub) { return sub.error; })
  11812. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  11813. } catch (e) {
  11814. if ((true)) {
  11815. console.warn("[vuex] error in error action subscribers: ");
  11816. console.error(e);
  11817. }
  11818. }
  11819. reject(error);
  11820. });
  11821. })
  11822. };
  11823. Store.prototype.subscribe = function subscribe (fn, options) {
  11824. return genericSubscribe(fn, this._subscribers, options)
  11825. };
  11826. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  11827. var subs = typeof fn === 'function' ? { before: fn } : fn;
  11828. return genericSubscribe(subs, this._actionSubscribers, options)
  11829. };
  11830. Store.prototype.watch = function watch (getter, cb, options) {
  11831. var this$1 = this;
  11832. if ((true)) {
  11833. assert(typeof getter === 'function', "store.watch only accepts a function.");
  11834. }
  11835. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  11836. };
  11837. Store.prototype.replaceState = function replaceState (state) {
  11838. var this$1 = this;
  11839. this._withCommit(function () {
  11840. this$1._vm._data.$$state = state;
  11841. });
  11842. };
  11843. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  11844. if ( options === void 0 ) options = {};
  11845. if (typeof path === 'string') { path = [path]; }
  11846. if ((true)) {
  11847. assert(Array.isArray(path), "module path must be a string or an Array.");
  11848. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  11849. }
  11850. this._modules.register(path, rawModule);
  11851. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  11852. // reset store to update getters...
  11853. resetStoreVM(this, this.state);
  11854. };
  11855. Store.prototype.unregisterModule = function unregisterModule (path) {
  11856. var this$1 = this;
  11857. if (typeof path === 'string') { path = [path]; }
  11858. if ((true)) {
  11859. assert(Array.isArray(path), "module path must be a string or an Array.");
  11860. }
  11861. this._modules.unregister(path);
  11862. this._withCommit(function () {
  11863. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  11864. Vue.delete(parentState, path[path.length - 1]);
  11865. });
  11866. resetStore(this);
  11867. };
  11868. Store.prototype.hasModule = function hasModule (path) {
  11869. if (typeof path === 'string') { path = [path]; }
  11870. if ((true)) {
  11871. assert(Array.isArray(path), "module path must be a string or an Array.");
  11872. }
  11873. return this._modules.isRegistered(path)
  11874. };
  11875. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  11876. this._modules.update(newOptions);
  11877. resetStore(this, true);
  11878. };
  11879. Store.prototype._withCommit = function _withCommit (fn) {
  11880. var committing = this._committing;
  11881. this._committing = true;
  11882. fn();
  11883. this._committing = committing;
  11884. };
  11885. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  11886. function genericSubscribe (fn, subs, options) {
  11887. if (subs.indexOf(fn) < 0) {
  11888. options && options.prepend
  11889. ? subs.unshift(fn)
  11890. : subs.push(fn);
  11891. }
  11892. return function () {
  11893. var i = subs.indexOf(fn);
  11894. if (i > -1) {
  11895. subs.splice(i, 1);
  11896. }
  11897. }
  11898. }
  11899. function resetStore (store, hot) {
  11900. store._actions = Object.create(null);
  11901. store._mutations = Object.create(null);
  11902. store._wrappedGetters = Object.create(null);
  11903. store._modulesNamespaceMap = Object.create(null);
  11904. var state = store.state;
  11905. // init all modules
  11906. installModule(store, state, [], store._modules.root, true);
  11907. // reset vm
  11908. resetStoreVM(store, state, hot);
  11909. }
  11910. function resetStoreVM (store, state, hot) {
  11911. var oldVm = store._vm;
  11912. // bind store public getters
  11913. store.getters = {};
  11914. // reset local getters cache
  11915. store._makeLocalGettersCache = Object.create(null);
  11916. var wrappedGetters = store._wrappedGetters;
  11917. var computed = {};
  11918. forEachValue(wrappedGetters, function (fn, key) {
  11919. // use computed to leverage its lazy-caching mechanism
  11920. // direct inline function use will lead to closure preserving oldVm.
  11921. // using partial to return function with only arguments preserved in closure environment.
  11922. computed[key] = partial(fn, store);
  11923. Object.defineProperty(store.getters, key, {
  11924. get: function () { return store._vm[key]; },
  11925. enumerable: true // for local getters
  11926. });
  11927. });
  11928. // use a Vue instance to store the state tree
  11929. // suppress warnings just in case the user has added
  11930. // some funky global mixins
  11931. var silent = Vue.config.silent;
  11932. Vue.config.silent = true;
  11933. store._vm = new Vue({
  11934. data: {
  11935. $$state: state
  11936. },
  11937. computed: computed
  11938. });
  11939. Vue.config.silent = silent;
  11940. // enable strict mode for new vm
  11941. if (store.strict) {
  11942. enableStrictMode(store);
  11943. }
  11944. if (oldVm) {
  11945. if (hot) {
  11946. // dispatch changes in all subscribed watchers
  11947. // to force getter re-evaluation for hot reloading.
  11948. store._withCommit(function () {
  11949. oldVm._data.$$state = null;
  11950. });
  11951. }
  11952. Vue.nextTick(function () { return oldVm.$destroy(); });
  11953. }
  11954. }
  11955. function installModule (store, rootState, path, module, hot) {
  11956. var isRoot = !path.length;
  11957. var namespace = store._modules.getNamespace(path);
  11958. // register in namespace map
  11959. if (module.namespaced) {
  11960. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  11961. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  11962. }
  11963. store._modulesNamespaceMap[namespace] = module;
  11964. }
  11965. // set state
  11966. if (!isRoot && !hot) {
  11967. var parentState = getNestedState(rootState, path.slice(0, -1));
  11968. var moduleName = path[path.length - 1];
  11969. store._withCommit(function () {
  11970. if ((true)) {
  11971. if (moduleName in parentState) {
  11972. console.warn(
  11973. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  11974. );
  11975. }
  11976. }
  11977. Vue.set(parentState, moduleName, module.state);
  11978. });
  11979. }
  11980. var local = module.context = makeLocalContext(store, namespace, path);
  11981. module.forEachMutation(function (mutation, key) {
  11982. var namespacedType = namespace + key;
  11983. registerMutation(store, namespacedType, mutation, local);
  11984. });
  11985. module.forEachAction(function (action, key) {
  11986. var type = action.root ? key : namespace + key;
  11987. var handler = action.handler || action;
  11988. registerAction(store, type, handler, local);
  11989. });
  11990. module.forEachGetter(function (getter, key) {
  11991. var namespacedType = namespace + key;
  11992. registerGetter(store, namespacedType, getter, local);
  11993. });
  11994. module.forEachChild(function (child, key) {
  11995. installModule(store, rootState, path.concat(key), child, hot);
  11996. });
  11997. }
  11998. /**
  11999. * make localized dispatch, commit, getters and state
  12000. * if there is no namespace, just use root ones
  12001. */
  12002. function makeLocalContext (store, namespace, path) {
  12003. var noNamespace = namespace === '';
  12004. var local = {
  12005. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  12006. var args = unifyObjectStyle(_type, _payload, _options);
  12007. var payload = args.payload;
  12008. var options = args.options;
  12009. var type = args.type;
  12010. if (!options || !options.root) {
  12011. type = namespace + type;
  12012. if (( true) && !store._actions[type]) {
  12013. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  12014. return
  12015. }
  12016. }
  12017. return store.dispatch(type, payload)
  12018. },
  12019. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  12020. var args = unifyObjectStyle(_type, _payload, _options);
  12021. var payload = args.payload;
  12022. var options = args.options;
  12023. var type = args.type;
  12024. if (!options || !options.root) {
  12025. type = namespace + type;
  12026. if (( true) && !store._mutations[type]) {
  12027. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  12028. return
  12029. }
  12030. }
  12031. store.commit(type, payload, options);
  12032. }
  12033. };
  12034. // getters and state object must be gotten lazily
  12035. // because they will be changed by vm update
  12036. Object.defineProperties(local, {
  12037. getters: {
  12038. get: noNamespace
  12039. ? function () { return store.getters; }
  12040. : function () { return makeLocalGetters(store, namespace); }
  12041. },
  12042. state: {
  12043. get: function () { return getNestedState(store.state, path); }
  12044. }
  12045. });
  12046. return local
  12047. }
  12048. function makeLocalGetters (store, namespace) {
  12049. if (!store._makeLocalGettersCache[namespace]) {
  12050. var gettersProxy = {};
  12051. var splitPos = namespace.length;
  12052. Object.keys(store.getters).forEach(function (type) {
  12053. // skip if the target getter is not match this namespace
  12054. if (type.slice(0, splitPos) !== namespace) { return }
  12055. // extract local getter type
  12056. var localType = type.slice(splitPos);
  12057. // Add a port to the getters proxy.
  12058. // Define as getter property because
  12059. // we do not want to evaluate the getters in this time.
  12060. Object.defineProperty(gettersProxy, localType, {
  12061. get: function () { return store.getters[type]; },
  12062. enumerable: true
  12063. });
  12064. });
  12065. store._makeLocalGettersCache[namespace] = gettersProxy;
  12066. }
  12067. return store._makeLocalGettersCache[namespace]
  12068. }
  12069. function registerMutation (store, type, handler, local) {
  12070. var entry = store._mutations[type] || (store._mutations[type] = []);
  12071. entry.push(function wrappedMutationHandler (payload) {
  12072. handler.call(store, local.state, payload);
  12073. });
  12074. }
  12075. function registerAction (store, type, handler, local) {
  12076. var entry = store._actions[type] || (store._actions[type] = []);
  12077. entry.push(function wrappedActionHandler (payload) {
  12078. var res = handler.call(store, {
  12079. dispatch: local.dispatch,
  12080. commit: local.commit,
  12081. getters: local.getters,
  12082. state: local.state,
  12083. rootGetters: store.getters,
  12084. rootState: store.state
  12085. }, payload);
  12086. if (!isPromise(res)) {
  12087. res = Promise.resolve(res);
  12088. }
  12089. if (store._devtoolHook) {
  12090. return res.catch(function (err) {
  12091. store._devtoolHook.emit('vuex:error', err);
  12092. throw err
  12093. })
  12094. } else {
  12095. return res
  12096. }
  12097. });
  12098. }
  12099. function registerGetter (store, type, rawGetter, local) {
  12100. if (store._wrappedGetters[type]) {
  12101. if ((true)) {
  12102. console.error(("[vuex] duplicate getter key: " + type));
  12103. }
  12104. return
  12105. }
  12106. store._wrappedGetters[type] = function wrappedGetter (store) {
  12107. return rawGetter(
  12108. local.state, // local state
  12109. local.getters, // local getters
  12110. store.state, // root state
  12111. store.getters // root getters
  12112. )
  12113. };
  12114. }
  12115. function enableStrictMode (store) {
  12116. store._vm.$watch(function () { return this._data.$$state }, function () {
  12117. if ((true)) {
  12118. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  12119. }
  12120. }, { deep: true, sync: true });
  12121. }
  12122. function getNestedState (state, path) {
  12123. return path.reduce(function (state, key) { return state[key]; }, state)
  12124. }
  12125. function unifyObjectStyle (type, payload, options) {
  12126. if (isObject(type) && type.type) {
  12127. options = payload;
  12128. payload = type;
  12129. type = type.type;
  12130. }
  12131. if ((true)) {
  12132. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  12133. }
  12134. return { type: type, payload: payload, options: options }
  12135. }
  12136. function install (_Vue) {
  12137. if (Vue && _Vue === Vue) {
  12138. if ((true)) {
  12139. console.error(
  12140. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  12141. );
  12142. }
  12143. return
  12144. }
  12145. Vue = _Vue;
  12146. applyMixin(Vue);
  12147. }
  12148. /**
  12149. * Reduce the code which written in Vue.js for getting the state.
  12150. * @param {String} [namespace] - Module's namespace
  12151. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  12152. * @param {Object}
  12153. */
  12154. var mapState = normalizeNamespace(function (namespace, states) {
  12155. var res = {};
  12156. if (( true) && !isValidMap(states)) {
  12157. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  12158. }
  12159. normalizeMap(states).forEach(function (ref) {
  12160. var key = ref.key;
  12161. var val = ref.val;
  12162. res[key] = function mappedState () {
  12163. var state = this.$store.state;
  12164. var getters = this.$store.getters;
  12165. if (namespace) {
  12166. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  12167. if (!module) {
  12168. return
  12169. }
  12170. state = module.context.state;
  12171. getters = module.context.getters;
  12172. }
  12173. return typeof val === 'function'
  12174. ? val.call(this, state, getters)
  12175. : state[val]
  12176. };
  12177. // mark vuex getter for devtools
  12178. res[key].vuex = true;
  12179. });
  12180. return res
  12181. });
  12182. /**
  12183. * Reduce the code which written in Vue.js for committing the mutation
  12184. * @param {String} [namespace] - Module's namespace
  12185. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  12186. * @return {Object}
  12187. */
  12188. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  12189. var res = {};
  12190. if (( true) && !isValidMap(mutations)) {
  12191. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  12192. }
  12193. normalizeMap(mutations).forEach(function (ref) {
  12194. var key = ref.key;
  12195. var val = ref.val;
  12196. res[key] = function mappedMutation () {
  12197. var args = [], len = arguments.length;
  12198. while ( len-- ) args[ len ] = arguments[ len ];
  12199. // Get the commit method from store
  12200. var commit = this.$store.commit;
  12201. if (namespace) {
  12202. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  12203. if (!module) {
  12204. return
  12205. }
  12206. commit = module.context.commit;
  12207. }
  12208. return typeof val === 'function'
  12209. ? val.apply(this, [commit].concat(args))
  12210. : commit.apply(this.$store, [val].concat(args))
  12211. };
  12212. });
  12213. return res
  12214. });
  12215. /**
  12216. * Reduce the code which written in Vue.js for getting the getters
  12217. * @param {String} [namespace] - Module's namespace
  12218. * @param {Object|Array} getters
  12219. * @return {Object}
  12220. */
  12221. var mapGetters = normalizeNamespace(function (namespace, getters) {
  12222. var res = {};
  12223. if (( true) && !isValidMap(getters)) {
  12224. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  12225. }
  12226. normalizeMap(getters).forEach(function (ref) {
  12227. var key = ref.key;
  12228. var val = ref.val;
  12229. // The namespace has been mutated by normalizeNamespace
  12230. val = namespace + val;
  12231. res[key] = function mappedGetter () {
  12232. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  12233. return
  12234. }
  12235. if (( true) && !(val in this.$store.getters)) {
  12236. console.error(("[vuex] unknown getter: " + val));
  12237. return
  12238. }
  12239. return this.$store.getters[val]
  12240. };
  12241. // mark vuex getter for devtools
  12242. res[key].vuex = true;
  12243. });
  12244. return res
  12245. });
  12246. /**
  12247. * Reduce the code which written in Vue.js for dispatch the action
  12248. * @param {String} [namespace] - Module's namespace
  12249. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  12250. * @return {Object}
  12251. */
  12252. var mapActions = normalizeNamespace(function (namespace, actions) {
  12253. var res = {};
  12254. if (( true) && !isValidMap(actions)) {
  12255. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  12256. }
  12257. normalizeMap(actions).forEach(function (ref) {
  12258. var key = ref.key;
  12259. var val = ref.val;
  12260. res[key] = function mappedAction () {
  12261. var args = [], len = arguments.length;
  12262. while ( len-- ) args[ len ] = arguments[ len ];
  12263. // get dispatch function from store
  12264. var dispatch = this.$store.dispatch;
  12265. if (namespace) {
  12266. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  12267. if (!module) {
  12268. return
  12269. }
  12270. dispatch = module.context.dispatch;
  12271. }
  12272. return typeof val === 'function'
  12273. ? val.apply(this, [dispatch].concat(args))
  12274. : dispatch.apply(this.$store, [val].concat(args))
  12275. };
  12276. });
  12277. return res
  12278. });
  12279. /**
  12280. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  12281. * @param {String} namespace
  12282. * @return {Object}
  12283. */
  12284. var createNamespacedHelpers = function (namespace) { return ({
  12285. mapState: mapState.bind(null, namespace),
  12286. mapGetters: mapGetters.bind(null, namespace),
  12287. mapMutations: mapMutations.bind(null, namespace),
  12288. mapActions: mapActions.bind(null, namespace)
  12289. }); };
  12290. /**
  12291. * Normalize the map
  12292. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  12293. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  12294. * @param {Array|Object} map
  12295. * @return {Object}
  12296. */
  12297. function normalizeMap (map) {
  12298. if (!isValidMap(map)) {
  12299. return []
  12300. }
  12301. return Array.isArray(map)
  12302. ? map.map(function (key) { return ({ key: key, val: key }); })
  12303. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  12304. }
  12305. /**
  12306. * Validate whether given map is valid or not
  12307. * @param {*} map
  12308. * @return {Boolean}
  12309. */
  12310. function isValidMap (map) {
  12311. return Array.isArray(map) || isObject(map)
  12312. }
  12313. /**
  12314. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  12315. * @param {Function} fn
  12316. * @return {Function}
  12317. */
  12318. function normalizeNamespace (fn) {
  12319. return function (namespace, map) {
  12320. if (typeof namespace !== 'string') {
  12321. map = namespace;
  12322. namespace = '';
  12323. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  12324. namespace += '/';
  12325. }
  12326. return fn(namespace, map)
  12327. }
  12328. }
  12329. /**
  12330. * Search a special module from store by namespace. if module not exist, print error message.
  12331. * @param {Object} store
  12332. * @param {String} helper
  12333. * @param {String} namespace
  12334. * @return {Object}
  12335. */
  12336. function getModuleByNamespace (store, helper, namespace) {
  12337. var module = store._modulesNamespaceMap[namespace];
  12338. if (( true) && !module) {
  12339. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  12340. }
  12341. return module
  12342. }
  12343. // Credits: borrowed code from fcomb/redux-logger
  12344. function createLogger (ref) {
  12345. if ( ref === void 0 ) ref = {};
  12346. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  12347. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  12348. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  12349. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  12350. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  12351. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  12352. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  12353. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  12354. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  12355. return function (store) {
  12356. var prevState = deepCopy(store.state);
  12357. if (typeof logger === 'undefined') {
  12358. return
  12359. }
  12360. if (logMutations) {
  12361. store.subscribe(function (mutation, state) {
  12362. var nextState = deepCopy(state);
  12363. if (filter(mutation, prevState, nextState)) {
  12364. var formattedTime = getFormattedTime();
  12365. var formattedMutation = mutationTransformer(mutation);
  12366. var message = "mutation " + (mutation.type) + formattedTime;
  12367. startMessage(logger, message, collapsed);
  12368. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  12369. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  12370. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  12371. endMessage(logger);
  12372. }
  12373. prevState = nextState;
  12374. });
  12375. }
  12376. if (logActions) {
  12377. store.subscribeAction(function (action, state) {
  12378. if (actionFilter(action, state)) {
  12379. var formattedTime = getFormattedTime();
  12380. var formattedAction = actionTransformer(action);
  12381. var message = "action " + (action.type) + formattedTime;
  12382. startMessage(logger, message, collapsed);
  12383. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  12384. endMessage(logger);
  12385. }
  12386. });
  12387. }
  12388. }
  12389. }
  12390. function startMessage (logger, message, collapsed) {
  12391. var startMessage = collapsed
  12392. ? logger.groupCollapsed
  12393. : logger.group;
  12394. // render
  12395. try {
  12396. startMessage.call(logger, message);
  12397. } catch (e) {
  12398. logger.log(message);
  12399. }
  12400. }
  12401. function endMessage (logger) {
  12402. try {
  12403. logger.groupEnd();
  12404. } catch (e) {
  12405. logger.log('—— log end ——');
  12406. }
  12407. }
  12408. function getFormattedTime () {
  12409. var time = new Date();
  12410. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  12411. }
  12412. function repeat (str, times) {
  12413. return (new Array(times + 1)).join(str)
  12414. }
  12415. function pad (num, maxLength) {
  12416. return repeat('0', maxLength - num.toString().length) + num
  12417. }
  12418. var index_cjs = {
  12419. Store: Store,
  12420. install: install,
  12421. version: '3.6.2',
  12422. mapState: mapState,
  12423. mapMutations: mapMutations,
  12424. mapGetters: mapGetters,
  12425. mapActions: mapActions,
  12426. createNamespacedHelpers: createNamespacedHelpers,
  12427. createLogger: createLogger
  12428. };
  12429. module.exports = index_cjs;
  12430. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  12431. /***/ }),
  12432. /***/ 61:
  12433. /*!*************************************************************!*\
  12434. !*** E:/work/Project_newGit/UniappShell/api/system/user.js ***!
  12435. \*************************************************************/
  12436. /*! no static exports found */
  12437. /***/ (function(module, exports, __webpack_require__) {
  12438. "use strict";
  12439. Object.defineProperty(exports, "__esModule", {
  12440. value: true
  12441. });
  12442. exports.getUserInfo = getUserInfo;
  12443. exports.getUserList = getUserList;
  12444. exports.login = login;
  12445. exports.logout = logout;
  12446. exports.register = register;
  12447. exports.updatePwd = updatePwd;
  12448. exports.uploadFile = uploadFile;
  12449. exports.wxWorkLogin = wxWorkLogin;
  12450. var _request = __webpack_require__(/*! @/libs/request.js */ 41);
  12451. function login(data) {
  12452. return (0, _request.request)({
  12453. url: '/login',
  12454. method: 'post',
  12455. header: {
  12456. 'content-type': "application/x-www-form-urlencoded"
  12457. },
  12458. data: data
  12459. });
  12460. }
  12461. function getUserInfo() {
  12462. return (0, _request.request)({
  12463. url: '/user/profile'
  12464. });
  12465. }
  12466. function logout() {
  12467. return (0, _request.request)({
  12468. url: '/logout',
  12469. method: 'GET'
  12470. });
  12471. }
  12472. function register(data) {
  12473. return (0, _request.request)({
  12474. url: '/user/register',
  12475. method: 'post',
  12476. data: data
  12477. });
  12478. }
  12479. /**公用上传接口 */
  12480. function uploadFile(data) {
  12481. return (0, _request.request)({
  12482. url: '/upload/file',
  12483. method: "post",
  12484. headers: {
  12485. 'Content-Type': 'multipart/form-data'
  12486. },
  12487. data: data
  12488. });
  12489. }
  12490. function updatePwd(data) {
  12491. return (0, _request.request)({
  12492. url: '/user/updatePassword',
  12493. method: "PUT",
  12494. data: data
  12495. });
  12496. }
  12497. //查询用户的带岗位
  12498. function getUserList() {
  12499. return (0, _request.request)({
  12500. url: '/user/select',
  12501. method: 'get'
  12502. });
  12503. }
  12504. //企业微信登录
  12505. function wxWorkLogin(_ref) {
  12506. var userId = _ref.userId,
  12507. code = _ref.code;
  12508. return (0, _request.request)({
  12509. url: "/user/updateWxUserId/".concat(userId, "/").concat(code),
  12510. method: 'post'
  12511. });
  12512. }
  12513. /***/ }),
  12514. /***/ 7:
  12515. /*!*********************************************************************!*\
  12516. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  12517. \*********************************************************************/
  12518. /*! no static exports found */
  12519. /***/ (function(module, exports) {
  12520. function _iterableToArrayLimit(arr, i) {
  12521. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  12522. if (null != _i) {
  12523. var _s,
  12524. _e,
  12525. _x,
  12526. _r,
  12527. _arr = [],
  12528. _n = !0,
  12529. _d = !1;
  12530. try {
  12531. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  12532. if (Object(_i) !== _i) return;
  12533. _n = !1;
  12534. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  12535. ;
  12536. }
  12537. } catch (err) {
  12538. _d = !0, _e = err;
  12539. } finally {
  12540. try {
  12541. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  12542. } finally {
  12543. if (_d) throw _e;
  12544. }
  12545. }
  12546. return _arr;
  12547. }
  12548. }
  12549. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  12550. /***/ }),
  12551. /***/ 78:
  12552. /*!********************************************************!*\
  12553. !*** E:/work/Project_newGit/UniappShell/libs/index.js ***!
  12554. \********************************************************/
  12555. /*! no static exports found */
  12556. /***/ (function(module, exports, __webpack_require__) {
  12557. "use strict";
  12558. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  12559. Object.defineProperty(exports, "__esModule", {
  12560. value: true
  12561. });
  12562. exports.MessageTimeFormat = MessageTimeFormat;
  12563. exports.addClass = addClass;
  12564. exports.byteLength = byteLength;
  12565. exports.cleanArray = cleanArray;
  12566. exports.createUniqueString = createUniqueString;
  12567. exports.debounce = debounce;
  12568. exports.deepClone = deepClone;
  12569. exports.distanceTime = distanceTime;
  12570. exports.formatTime = formatTime;
  12571. exports.getQueryObject = getQueryObject;
  12572. exports.getTime = getTime;
  12573. exports.hasClass = hasClass;
  12574. exports.html2Text = html2Text;
  12575. exports.isEmpty = isEmpty;
  12576. exports.objectMerge = objectMerge;
  12577. exports.param = param;
  12578. exports.param2Obj = param2Obj;
  12579. exports.parseTime = parseTime;
  12580. exports.removeClass = removeClass;
  12581. exports.toggleClass = toggleClass;
  12582. exports.uniqueArr = uniqueArr;
  12583. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  12584. /**
  12585. * Created by PanJiaChen on 16/11/18.
  12586. */
  12587. /**
  12588. * Parse the time to string
  12589. * @param {(Object|string|number)} time
  12590. * @param {string} cFormat
  12591. * @returns {string | null}
  12592. */
  12593. function parseTime(time, cFormat) {
  12594. if (arguments.length === 0 || !time) {
  12595. return null;
  12596. }
  12597. var format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}';
  12598. var date;
  12599. if ((0, _typeof2.default)(time) === 'object') {
  12600. date = time;
  12601. } else {
  12602. if (typeof time === 'string') {
  12603. if (/^[0-9]+$/.test(time)) {
  12604. // support "1548221490638"
  12605. time = parseInt(time);
  12606. } else {
  12607. // support safari
  12608. // https://stackoverflow.com/questions/4310953/invalid-date-in-safari
  12609. time = time.replace(new RegExp(/-/gm), '/');
  12610. }
  12611. }
  12612. if (typeof time === 'number' && time.toString().length === 10) {
  12613. time = time * 1000;
  12614. }
  12615. date = new Date(time);
  12616. }
  12617. var formatObj = {
  12618. y: date.getFullYear(),
  12619. m: date.getMonth() + 1,
  12620. d: date.getDate(),
  12621. h: date.getHours(),
  12622. i: date.getMinutes(),
  12623. s: date.getSeconds(),
  12624. a: date.getDay()
  12625. };
  12626. var time_str = format.replace(/{([ymdhisa])+}/g, function (result, key) {
  12627. var value = formatObj[key];
  12628. // Note: getDay() returns 0 on Sunday
  12629. if (key === 'a') {
  12630. return ['日', '一', '二', '三', '四', '五', '六'][value];
  12631. }
  12632. return value.toString().padStart(2, '0');
  12633. });
  12634. return time_str;
  12635. }
  12636. /**
  12637. * @param {number} time
  12638. * @param {string} option
  12639. * @returns {string}
  12640. */
  12641. function formatTime(time, option) {
  12642. if (('' + time).length === 10) {
  12643. time = parseInt(time) * 1000;
  12644. } else {
  12645. time = +time;
  12646. }
  12647. var d = new Date(time);
  12648. var now = Date.now();
  12649. var diff = (now - d) / 1000;
  12650. if (diff < 30) {
  12651. return '刚刚';
  12652. } else if (diff < 3600) {
  12653. // less 1 hour
  12654. return Math.ceil(diff / 60) + '分钟前';
  12655. } else if (diff < 3600 * 24) {
  12656. return Math.ceil(diff / 3600) + '小时前';
  12657. } else if (diff < 3600 * 24 * 2) {
  12658. return '1天前';
  12659. }
  12660. if (option) {
  12661. return parseTime(time, option);
  12662. } else {
  12663. return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分';
  12664. }
  12665. }
  12666. /**
  12667. * @param {string} url
  12668. * @returns {Object}
  12669. */
  12670. function getQueryObject(url) {
  12671. url = url == null ? window.location.href : url;
  12672. var search = url.substring(url.lastIndexOf('?') + 1);
  12673. var obj = {};
  12674. var reg = /([^?&=]+)=([^?&=]*)/g;
  12675. search.replace(reg, function (rs, $1, $2) {
  12676. var name = decodeURIComponent($1);
  12677. var val = decodeURIComponent($2);
  12678. val = String(val);
  12679. obj[name] = val;
  12680. return rs;
  12681. });
  12682. return obj;
  12683. }
  12684. /**
  12685. * @param {string} input value
  12686. * @returns {number} output value
  12687. */
  12688. function byteLength(str) {
  12689. // returns the byte length of an utf8 string
  12690. var s = str.length;
  12691. for (var i = str.length - 1; i >= 0; i--) {
  12692. var code = str.charCodeAt(i);
  12693. if (code > 0x7f && code <= 0x7ff) s++;else if (code > 0x7ff && code <= 0xffff) s += 2;
  12694. if (code >= 0xDC00 && code <= 0xDFFF) i--;
  12695. }
  12696. return s;
  12697. }
  12698. /**
  12699. * @param {Array} actual
  12700. * @returns {Array}
  12701. */
  12702. function cleanArray(actual) {
  12703. var newArray = [];
  12704. for (var i = 0; i < actual.length; i++) {
  12705. if (actual[i]) {
  12706. newArray.push(actual[i]);
  12707. }
  12708. }
  12709. return newArray;
  12710. }
  12711. /**
  12712. * @param {Object} json
  12713. * @returns {Array}
  12714. */
  12715. function param(json) {
  12716. if (!json) return '';
  12717. return cleanArray(Object.keys(json).map(function (key) {
  12718. if (json[key] === undefined) return '';
  12719. return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]);
  12720. })).join('&');
  12721. }
  12722. /**
  12723. * @param {string} url
  12724. * @returns {Object}
  12725. */
  12726. function param2Obj(url) {
  12727. var search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ');
  12728. if (!search) {
  12729. return {};
  12730. }
  12731. var obj = {};
  12732. var searchArr = search.split('&');
  12733. searchArr.forEach(function (v) {
  12734. var index = v.indexOf('=');
  12735. if (index !== -1) {
  12736. var name = v.substring(0, index);
  12737. var val = v.substring(index + 1, v.length);
  12738. obj[name] = val;
  12739. }
  12740. });
  12741. return obj;
  12742. }
  12743. /**
  12744. * @param {string} val
  12745. * @returns {string}
  12746. */
  12747. function html2Text(val) {
  12748. var div = document.createElement('div');
  12749. div.innerHTML = val;
  12750. return div.textContent || div.innerText;
  12751. }
  12752. /**
  12753. * Merges two objects, giving the last one precedence
  12754. * @param {Object} target
  12755. * @param {(Object|Array)} source
  12756. * @returns {Object}
  12757. */
  12758. function objectMerge(target, source) {
  12759. if ((0, _typeof2.default)(target) !== 'object') {
  12760. target = {};
  12761. }
  12762. if (Array.isArray(source)) {
  12763. return source.slice();
  12764. }
  12765. Object.keys(source).forEach(function (property) {
  12766. var sourceProperty = source[property];
  12767. if ((0, _typeof2.default)(sourceProperty) === 'object') {
  12768. target[property] = objectMerge(target[property], sourceProperty);
  12769. } else {
  12770. target[property] = sourceProperty;
  12771. }
  12772. });
  12773. return target;
  12774. }
  12775. /**
  12776. * @param {HTMLElement} element
  12777. * @param {string} className
  12778. */
  12779. function toggleClass(element, className) {
  12780. if (!element || !className) {
  12781. return;
  12782. }
  12783. var classString = element.className;
  12784. var nameIndex = classString.indexOf(className);
  12785. if (nameIndex === -1) {
  12786. classString += '' + className;
  12787. } else {
  12788. classString = classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length);
  12789. }
  12790. element.className = classString;
  12791. }
  12792. /**
  12793. * @param {string} type
  12794. * @returns {Date}
  12795. */
  12796. function getTime(type) {
  12797. if (type === 'start') {
  12798. return new Date().getTime() - 3600 * 1000 * 24 * 90;
  12799. } else {
  12800. return new Date(new Date().toDateString());
  12801. }
  12802. }
  12803. /**
  12804. * @param {Function} func
  12805. * @param {number} wait
  12806. * @param {boolean} immediate
  12807. * @return {*}
  12808. */
  12809. function debounce(func, wait, immediate) {
  12810. var timeout, args, context, timestamp, result;
  12811. var later = function later() {
  12812. // 据上一次触发时间间隔
  12813. var last = +new Date() - timestamp;
  12814. // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
  12815. if (last < wait && last > 0) {
  12816. timeout = setTimeout(later, wait - last);
  12817. } else {
  12818. timeout = null;
  12819. // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
  12820. if (!immediate) {
  12821. result = func.apply(context, args);
  12822. if (!timeout) context = args = null;
  12823. }
  12824. }
  12825. };
  12826. return function () {
  12827. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  12828. args[_key] = arguments[_key];
  12829. }
  12830. context = this;
  12831. timestamp = +new Date();
  12832. var callNow = immediate && !timeout;
  12833. // 如果延时不存在,重新设定延时
  12834. if (!timeout) timeout = setTimeout(later, wait);
  12835. if (callNow) {
  12836. result = func.apply(context, args);
  12837. context = args = null;
  12838. }
  12839. return result;
  12840. };
  12841. }
  12842. /**
  12843. * This is just a simple version of deep copy
  12844. * Has a lot of edge cases bug
  12845. * If you want to use a perfect deep copy, use lodash's _.cloneDeep
  12846. * @param {Object} source
  12847. * @returns {Object}
  12848. */
  12849. function deepClone(source) {
  12850. if (!source && (0, _typeof2.default)(source) !== 'object') {
  12851. throw new Error('error arguments', 'deepClone');
  12852. }
  12853. var targetObj = source.constructor === Array ? [] : {};
  12854. Object.keys(source).forEach(function (keys) {
  12855. if (source[keys] && (0, _typeof2.default)(source[keys]) === 'object') {
  12856. targetObj[keys] = deepClone(source[keys]);
  12857. } else {
  12858. targetObj[keys] = source[keys];
  12859. }
  12860. });
  12861. return targetObj;
  12862. }
  12863. /**
  12864. * @param {Array} arr
  12865. * @returns {Array}
  12866. */
  12867. function uniqueArr(arr) {
  12868. return Array.from(new Set(arr));
  12869. }
  12870. /**
  12871. * @returns {string}
  12872. */
  12873. function createUniqueString() {
  12874. var timestamp = +new Date() + '';
  12875. var randomNum = parseInt((1 + Math.random()) * 65536) + '';
  12876. return (+(randomNum + timestamp)).toString(32);
  12877. }
  12878. /**
  12879. * Check if an element has a class
  12880. * @param {HTMLElement} elm
  12881. * @param {string} cls
  12882. * @returns {boolean}
  12883. */
  12884. function hasClass(ele, cls) {
  12885. return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
  12886. }
  12887. /**
  12888. * Add class to element
  12889. * @param {HTMLElement} elm
  12890. * @param {string} cls
  12891. */
  12892. function addClass(ele, cls) {
  12893. if (!hasClass(ele, cls)) ele.className += ' ' + cls;
  12894. }
  12895. /**
  12896. * Remove class from element
  12897. * @param {HTMLElement} elm
  12898. * @param {string} cls
  12899. */
  12900. function removeClass(ele, cls) {
  12901. if (hasClass(ele, cls)) {
  12902. var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
  12903. ele.className = ele.className.replace(reg, ' ');
  12904. }
  12905. }
  12906. function distanceTime(time) {
  12907. //获取当前时间
  12908. var date = new Date();
  12909. var now = date.getTime();
  12910. //设置截止时间
  12911. var endDate = new Date();
  12912. if (time) {
  12913. endDate = new Date(time);
  12914. }
  12915. var end = endDate.getTime();
  12916. //获取截止时间和当前时间的时间差
  12917. if (now >= end) {
  12918. return '已过期';
  12919. }
  12920. var leftTime = end - now;
  12921. //定义变量 d,h,m,s分别保存天数,小时,分钟,秒
  12922. var d, h, m, s;
  12923. //判断剩余天数,时,分,秒
  12924. if (leftTime >= 0) {
  12925. d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  12926. h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
  12927. m = Math.floor(leftTime / 1000 / 60 % 60);
  12928. s = Math.floor(leftTime / 1000 % 60);
  12929. }
  12930. if (d > 0) {
  12931. return "".concat(d, "\u5929").concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  12932. } else {
  12933. if (h > 0) {
  12934. return "".concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  12935. } else {
  12936. return "".concat(m, "\u5206\u949F");
  12937. }
  12938. }
  12939. }
  12940. function isEmpty(value) {
  12941. if (value === undefined || value === "undefined" || value === "" || value === null) {
  12942. return true;
  12943. }
  12944. return false;
  12945. }
  12946. function MessageTimeFormat(d) {
  12947. var unix_stamp = '';
  12948. if (!d) return;
  12949. if ((0, _typeof2.default)(d) === 'object') {
  12950. unix_stamp = d.getTime();
  12951. } else {
  12952. unix_stamp = new Date(d).getTime();
  12953. }
  12954. var _today_obj = new Date();
  12955. var _today_date = {
  12956. y: _today_obj.getFullYear(),
  12957. m: _today_obj.getMonth() + 1 < 10 ? '0' + (_today_obj.getMonth() - -1) : _today_obj.getMonth() - -1,
  12958. d: _today_obj.getDate() < 10 ? '0' + _today_obj.getDate() : _today_obj.getDate()
  12959. };
  12960. var _today_stamp = Date.parse(_today_date.y + '/' + _today_date.m + '/' + _today_date.d + ' 00:00:00');
  12961. var stamp = [];
  12962. stamp[0] = _today_stamp + 86400000;
  12963. stamp[1] = _today_stamp;
  12964. stamp[2] = _today_stamp - 86400000;
  12965. stamp[3] = _today_stamp - 172800000;
  12966. stamp[4] = _today_stamp - 518400000; // 7天
  12967. stamp[5] = _today_stamp - 31536000000; // 365天
  12968. var _compare_obj = new Date();
  12969. _compare_obj.setTime(unix_stamp);
  12970. var return_str;
  12971. if (unix_stamp >= stamp[1] && unix_stamp < stamp[0]) {
  12972. return_str = _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  12973. } else if (unix_stamp >= stamp[2] && unix_stamp < stamp[1]) {
  12974. var yesterdayText = '昨天';
  12975. return_str = yesterdayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  12976. } else if (unix_stamp >= stamp[3] && unix_stamp < stamp[2]) {
  12977. var theDayBeforeYesterdayText = '前天';
  12978. return_str = theDayBeforeYesterdayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  12979. } else if (unix_stamp >= stamp[4] && unix_stamp < stamp[3]) {
  12980. // 7天内
  12981. var daynames = ['天', '一', '二', '三', '四', '五', '六'];
  12982. var dathStr = '星期' + daynames[_compare_obj.getDay()];
  12983. var SundayText = '星期天';
  12984. var MondayText = '星期一';
  12985. var TuesdayText = '星期二';
  12986. var WednesdayText = '星期三';
  12987. var ThursdayText = '星期四';
  12988. var FridayText = '星期五';
  12989. var SaturdayText = '星期六';
  12990. var dathStr2;
  12991. switch (dathStr) {
  12992. case '星期天':
  12993. dathStr2 = SundayText;
  12994. break;
  12995. case '星期一':
  12996. dathStr2 = MondayText;
  12997. break;
  12998. case '星期二':
  12999. dathStr2 = TuesdayText;
  13000. break;
  13001. case '星期三':
  13002. dathStr2 = WednesdayText;
  13003. break;
  13004. case '星期四':
  13005. dathStr2 = ThursdayText;
  13006. break;
  13007. case '星期五':
  13008. dathStr2 = FridayText;
  13009. break;
  13010. case '星期六':
  13011. dathStr2 = SaturdayText;
  13012. break;
  13013. default:
  13014. dathStr2 = dathStr;
  13015. break;
  13016. }
  13017. return_str = dathStr2 + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13018. } else if (unix_stamp >= stamp[5] && unix_stamp < stamp[4]) {
  13019. // 365天内
  13020. var monthText = '月';
  13021. var dayText = '日';
  13022. return_str = _compare_obj.getMonth() - -1 + monthText + _compare_obj.getDate() + dayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13023. } else {
  13024. var yearText = '年';
  13025. var _monthText = '月';
  13026. var _dayText = '日';
  13027. return_str = _compare_obj.getFullYear() + yearText + (_compare_obj.getMonth() - -1) + _monthText + _compare_obj.getDate() + _dayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  13028. }
  13029. return return_str;
  13030. }
  13031. /***/ }),
  13032. /***/ 79:
  13033. /*!***********************************************************************!*\
  13034. !*** E:/work/Project_newGit/UniappShell/static/components/avatar.png ***!
  13035. \***********************************************************************/
  13036. /*! no static exports found */
  13037. /***/ (function(module, exports) {
  13038. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAD2BJREFUeF7tXXuMHVUZ/77ZC2VL3WKVAmLwAYRWkD+sCkjL01AKQikIiQoYHqaGagPrzje3JOBVEnbnzLKQhRI2lhIVNbFARaQtRCq4IrWAiTwsBOqDhFdFZNfSpWXvfOZbZ8t2X3fmzjkzZ7b3JDe77Z7znd/3nd+dxznfA2EKtq6urlmDg4NzEXEOM88FAPnMAoDpiDidmacDwP7y70j9HQDwLiLuYGb5XT5vA8AWRNzCzC+USqUtra2t8n9TqmHRtalUKvs1NzcvAIAFiCg/ZbEPMqTXm0IKZu4FgN6BgYHeSqXynqG5MhFbSAJ0dHQsRMQT5QMA8pmWibXGTrITAB5n5qFPuVx+KCccdU9bGAJ0dHQschxnETMvQsQj6tbY4EBmfhkR14dhuL5cLq83OJU20VYToAiLPtFKFIUMVhJAKXUhAFwOAGdqo3q+gjYAwGoiWpMvjLGzW0UApdSl0cKfbJuhNOF5LCLCTzTJSy3GCgIEQXAZM38bAL6YWqNiCNiMiHe4rntX3nBzJUBnZ+e8MAxXAMAFeRsip/nvdRynva2t7emc5odcCNDT07NPf39/mZll8ZvzUt6SeQcQsb2lpaVj6dKl72eNKXMCBEGwmJnLAHB81spaPt8mROxwXff+LHFmSgDf9yuI+P0sFSzaXMz8A8/zKlnhzoQASqnDASAAgCVZKVbwedYCgEtEW03rYZwAQRAsYWZZfCFBo8W3wFZEdF3XFTIYa0YJ0Ljkp18307cEYwRQSvkAQOlN0JAAAIqIPBOWMEIApVQ3AHzXBOC9WOatRLRct/7aCRAEwSPMfJpuoA15AIi40XXd03XaQisBlFLiMDFbJ8CGrDEW2EZE2hxetBFAKdUHAC2NBcvEAv1ENFPHTFoIoJR6DgCO1gGoISO2BZ4nomNi956gY2oCBEGwgZkXpgXSGJ/cAoj4kOu6qXwmUhHA9/1ViHhFcuiNEboswMx3ep53Zb3y6iZAY5OnXpPrH5dms6guAkTbu/fpV8WcRER8kpn/AAAvIeIr1Wr1FQCQj7TDmpqaDmPmwwDgSEScz8xfMIdGv2REPL+ebePEBIgOdsT92fq9fbk8NjU1rZOFd113WxKzB0EwW4hQrVbPKshtTg6OFiY9QKqHAPLNt/pUTx6OqtXqzbr89CUOoamp6ZoCPOyuJaLzkxA9EQEKcN/fiYjLXNe9M4kR4vYNguAKZl6ZYyBKTahJnwdiEyDy5PlVTQT5dXgLAL5JROtMQlBKnQUAPwaAj5qcJ41sRDwvrmdRLAKID19fX9/vLXbj+hsiHuu67rtpDBd3bBAE+zPzMwDw6bhjMu63aebMmSfF8TGMRYAgCK5j5h9mrETc6TYR0QlxO+vsp5R6wtYvBSJe77ruDbX0rUmAyHVbomGt895FxJdd1z2ylpIm/x4EwUvMbGOs4oDjOAtquZzXJIBS6h5L/fb7mPk4z/NeNLnAtWT7vn8UIv4JALQcztSaL+Hf7yWir042ZlICRBE7qxNOmkn3ejc+TICzeWMMES+fLAJpUgIopYTZ1oVrIeI9rutKAKk1LQiCNcw86bctJ7Cbiei4ieaekABRoKa87ljXqtXqqStWrHjUJmDt7e2nNDU1/c4mTCOwyOvxuAGpkxFADGxdlC4z3+V5noSOW9d831+NiJdZBwzgMSI6ZTxc4xIgis//pYWKADOf4HneJhux+b5/PCLKq6GN7aLx8hNMRABJb5LK0cCQBbR4wRjCNiTWYu+oDUS0aLTuYwgQpWUxup1a7wIg4m2u61rtbh4Ewa3M/J16dTQ5LgzDs0bnLhpDAJt9+m18+Bu9YJY/DI6JLRhDAN/3xWHCxp2tQSLax+Q3RJdspZTE+Zd0ydMlRxJXeZ63x87pHgSw+fIPAG8R0YG6jGFSjlLqX7aeFo6+DexBAJsv/zbs+8cljcXnA6LCHreBPQhg8eVfgD9FRIXw01NKPQkAn49LmCz7jb4N7CaAuD05jiP57KxsiCh+fZIL2PoWBEEvM8+3FWgYhmcOu8vtJoDlZ/5iy2eJ6FhbjToSl1JKnEU+ayvWkb4Cuwng+/5vEPFsW0GLCzcRfcJifLuhKaX+Ka7mtmJl5gc9z/uK4BsiQHd397SBgYF3EHE/W0EDQB8RHWAxvpEEeMdS/4AhjMz8XnNz8wHLly/fOUQApZTcW8Xnz+pGRDUdWGxQQCnFNuCogeEkIuodMqjv+9choq0+fyP1GPdAwyZj23yQNtJOzHy953k3DF8B5Bx73ONCm4wLAHcT0SWWYdoDjlLqpwBwsc0YI2yPEtGpwwR4w2CZFZ22eI2IDtUpULcspdSrAPAx3XINyHuTiA7GqMDSvw1MYEQkIp7ruu4DRoSnFBoEwTnM/OuUYjIbXiqVPoJKKam5I1GzRWkPE5GVCSmUUhI0e0ZRDAkA8zGKd1tVINDyGnOx53k/swmz7/vfQMS7bcJUCwsiXilXgE4A+F6tzpb9/Qki+pJNmJRSfwSAXCKUUtjhJiHAgwAgAY+FasxMnudJDuLcm+/7LiKq3IEkB7BOCGBtfFsMfc42HQ1cC0MULSxfoiK2TUKAvwBAIQ5ZxrNwtVr91IoVK/6Rh/Xb29s/2dTU9Pc85tY05zPyEGhrcGNsHffdd9+Dr776aslSmlm75ZZbDtq1a5fsnxS2iZONXAGKsnFRy9BSYEEeaI03pVRbVADD+FyGJ3hNCGD1yVVCA/QQkZSfM9aUUncAwFJjE2QruE8IsAsACuFtG9M28lB7s+4qndEhzzUFfNWbzGzvT0UCDCu8BhFvdl03VahWEAQnMLMsvFXRyDG/DLW6DRFgKt0Cxigs1byZeX2pVFrf2tr6ci2LyN+7urqOGBwclCrlQ9XK44wpaJ+hW8BUeQiMswbPIuKLzPyqfBzHebVarQ46jiPuWx9HxEOZ+Sib/fniKJmgz2tT4jVwIoUR8QUAeFhcoR3HeT0Mw9cB4I0dO3a8XqlUdowc19PTM72vr++QMAwPKZVKB8vPKELqDGaek8Cohek6/BpY6I2gUdb+r2QJBYDfMvNGInpJx2oopSR/sJTB+XKULfRDOuRaIOOZom8FD9twFTM/MGPGjI3Lli3bbtKwK1eunLF9+/bTEPEcAKg7TbtJjAlkD20FF/IwKFJyTRiGt5XL5VwcWjs6Ok5yHEdCwYv6hjB0GFTE4+CHo1wBVngGRZ5AQoQiOYPId+imojmEbGbm2zzPE8dL65rv+5cgohDBusxq4xlr2CGkEC5hiHi767rLrFv1cQAFQbCSma8qANb5RXEK9YioUA4XSikpmyvlc61tQ06hgk4pZatb+FvVavVC23ICxl3RKF3MGkuTRfzfLTwigI2BIU8TkZUx9nEJMNxPKfUUAMxLOs5w/w8CQ2wLDUta9cKwobSIt63ayujQMJuCQ+8novO0WN0yIUopqbiy2BJYHwSHWhQeXpgcAPUuog25A8aEh4syNiSIcBxnbltbmxzgTNnW2dk5JwzDLXkqOCZBhICxIEXM14noF3kaJqu5lVJfA4CfZzXf6HnGTRGTZ5IoZg48z5P35r2m+b6vENHNQ+Fxk0RFt4E8soROWtAgDwNlNWceBTkmTBMX7Qd0A0CmyZiZ+VJb9/ZNEyE6Oxi3kIPBuSdOFJlDqlhrQ70NLsAeorMOKZ80VWzWtwGbkz1kRYAsk0rUTBad8W1gDRFdlJWhbZ5HKSXVWbJwKqmdLj6r20AYhifn5cljGxkiz6LHTOOKVTAiugqYLhmzioi+ZVrhIslXSv3IsI9hvJIxEQHkcmSsaJRNRR9tIUkGxSfjF42KSGCkbBwibp82bdqhy5cv77fF+Dbg6O7ubtm5c6cErMwwgCdZ2biIAJcCgPbCkRKm5Xle4VLSGFiUMSJ9318n4WgG5kpeODIigYnSsYVz7zKwIOOKNORGVl/pWEFooni04zhHt7W1/TUroxZpns7Ozs+EYfi8TsypikdHVwGd5eO3EpGNFcl02jyVLKWURDAfnkrIB4PTlY8XOZ2dnfPCMOwFgGYNoMZsRGiQOaVEaCzcNeA4zoK2tranJzNQrPz7unwFmHmZ53m3T6kV06yM7/tXIeLKtGJHnvmnJkBPT88+fX19En93fBpgzLzY87zCJFNOo2u9Y33fPxcR7693fDRu08yZM09aunSpFLCctMW6AkQPhIuZWZwa07R5RPTnNAKm+lil1OcAYNLLdi0bIOJ5ruvGIlFsAsikaV2bBwcHZ1977bVSVbPRJrDAjTfeeGCpVNpWr4GSutQnIoCAUkrdBwBL6gFYlJo/9eimc0yKmkNriej8JFjqIYC8okgWjqSvKu8Q0YeTgNtb+yql/gMASSukbQWAhUQkP2O3xASIngeWMLNcCZK054nomCQD9ta+SqnnAODoJPrXe8BWFwF0PA8kUa7Rd3ILJL3vj5RWNwEiEqxCxCsaC5SfBZj5Ts/z6s5VlIoA0e1gQ5Q5Kz8r7KUzS0Y013XPTKN+agJEbwaJ71lpQDfGDllAyzOVFgJEJOgDgJbG4mRigX4imqljJm0EiEggRRtm6wDWkDGhBbYR0UG67KOVANEzwSPMLFk1G02zBRBxo+u6p+sUq50A0ZUg8xAznUaxVJaRo3QjBIhIIBmy9qqIX4PEUUTkmZBvjAACNu3hkQmFiyYzzSZPHF2NEiB6JpBtYynwmPTsIA7+qdxnq+QPcF13rUkljRMguh3I4gsJ6jpFNGkAS2XLoksVtEQHO/XokgkBhoE1bgm1l8j0JX80gkwJEN0SxLOonNa9rLYpC9djEyJ2xPXk0aVd5gQQ4OJj2N/fX2bmFZq8jXXZIw85A4jY3tLS0hHHh083wFwIMKxE5HIuJLhAt2IFkXev4zjttVy3TeqSKwGGFYsikKTiZyHy7GtYkM2IeIfrundpkJVKhBUEGNZAKSUBqZcDwMmptLJ3sCSBWE1EWSeGmtAiVhFgBBEkP4EQIdVZt0U82BAtvKSOt6pZSYBhC0Xpaoaqd0Y1/Kwy3mRgJCGTVC0Nw3B9uVyWjCtWNqsJMNJiRSBDURZ9pF0LQ4BRZFiIiCfKBwDkMy2nr9dOAHicmYc+5XJZ3OUL1QpJgJEWrlQq+zU3N0u9gwWIKD/nAoA2h4lRqykOL1uYWaKlewcGBnorlcp7hVrxUWALT4DxjN/V1TVrcHBwLiLOYWYhhHxmAcB0RJzOzNMBYH/5dzRe6gi/i4g7mFl+l8/bstiIKAv+QqlU2tLa2ir/N6Xa/wBXxyT5Pl8TYwAAAABJRU5ErkJggg=="
  13039. /***/ }),
  13040. /***/ 8:
  13041. /*!***************************************************************************!*\
  13042. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  13043. \***************************************************************************/
  13044. /*! no static exports found */
  13045. /***/ (function(module, exports, __webpack_require__) {
  13046. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  13047. function _unsupportedIterableToArray(o, minLen) {
  13048. if (!o) return;
  13049. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  13050. var n = Object.prototype.toString.call(o).slice(8, -1);
  13051. if (n === "Object" && o.constructor) n = o.constructor.name;
  13052. if (n === "Map" || n === "Set") return Array.from(o);
  13053. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  13054. }
  13055. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13056. /***/ }),
  13057. /***/ 9:
  13058. /*!*****************************************************************!*\
  13059. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  13060. \*****************************************************************/
  13061. /*! no static exports found */
  13062. /***/ (function(module, exports) {
  13063. function _arrayLikeToArray(arr, len) {
  13064. if (len == null || len > arr.length) len = arr.length;
  13065. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  13066. arr2[i] = arr[i];
  13067. }
  13068. return arr2;
  13069. }
  13070. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13071. /***/ })
  13072. }]);
  13073. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map