vendor.js 415 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });var
  312. EventChannel = /*#__PURE__*/function () {
  313. function EventChannel(id, events) {var _this = this;_classCallCheck(this, EventChannel);
  314. this.id = id;
  315. this.listener = {};
  316. this.emitCache = {};
  317. if (events) {
  318. Object.keys(events).forEach(function (name) {
  319. _this.on(name, events[name]);
  320. });
  321. }
  322. }_createClass(EventChannel, [{ key: "emit", value: function emit(
  323. eventName) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  324. var fns = this.listener[eventName];
  325. if (!fns) {
  326. return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
  327. }
  328. fns.forEach(function (opt) {
  329. opt.fn.apply(opt.fn, args);
  330. });
  331. this.listener[eventName] = fns.filter(function (opt) {return opt.type !== 'once';});
  332. } }, { key: "on", value: function on(
  333. eventName, fn) {
  334. this._addListener(eventName, 'on', fn);
  335. this._clearCache(eventName);
  336. } }, { key: "once", value: function once(
  337. eventName, fn) {
  338. this._addListener(eventName, 'once', fn);
  339. this._clearCache(eventName);
  340. } }, { key: "off", value: function off(
  341. eventName, fn) {
  342. var fns = this.listener[eventName];
  343. if (!fns) {
  344. return;
  345. }
  346. if (fn) {
  347. for (var i = 0; i < fns.length;) {
  348. if (fns[i].fn === fn) {
  349. fns.splice(i, 1);
  350. i--;
  351. }
  352. i++;
  353. }
  354. } else {
  355. delete this.listener[eventName];
  356. }
  357. } }, { key: "_clearCache", value: function _clearCache(
  358. eventName) {
  359. var cacheArgs = this.emitCache[eventName];
  360. if (cacheArgs) {
  361. for (; cacheArgs.length > 0;) {
  362. this.emit.apply(this, [eventName].concat(cacheArgs.shift()));
  363. }
  364. }
  365. } }, { key: "_addListener", value: function _addListener(
  366. eventName, type, fn) {
  367. (this.listener[eventName] || (this.listener[eventName] = [])).push({
  368. fn: fn,
  369. type: type });
  370. } }]);return EventChannel;}();
  371. var eventChannels = {};
  372. var eventChannelStack = [];
  373. var id = 0;
  374. function initEventChannel(events) {var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  375. id++;
  376. var eventChannel = new EventChannel(id, events);
  377. if (cache) {
  378. eventChannels[id] = eventChannel;
  379. eventChannelStack.push(eventChannel);
  380. }
  381. return eventChannel;
  382. }
  383. function getEventChannel(id) {
  384. if (id) {
  385. var eventChannel = eventChannels[id];
  386. delete eventChannels[id];
  387. return eventChannel;
  388. }
  389. return eventChannelStack.shift();
  390. }
  391. var navigateTo = {
  392. args: function args(fromArgs, toArgs) {
  393. var id = initEventChannel(fromArgs.events).id;
  394. if (fromArgs.url) {
  395. fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
  396. }
  397. },
  398. returnValue: function returnValue(fromRes, toRes) {
  399. fromRes.eventChannel = getEventChannel();
  400. } };
  401. function findExistsPageIndex(url) {
  402. var pages = getCurrentPages();
  403. var len = pages.length;
  404. while (len--) {
  405. var page = pages[len];
  406. if (page.$page && page.$page.fullPath === url) {
  407. return len;
  408. }
  409. }
  410. return -1;
  411. }
  412. var redirectTo = {
  413. name: function name(fromArgs) {
  414. if (fromArgs.exists === 'back' && fromArgs.delta) {
  415. return 'navigateBack';
  416. }
  417. return 'redirectTo';
  418. },
  419. args: function args(fromArgs) {
  420. if (fromArgs.exists === 'back' && fromArgs.url) {
  421. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  422. if (existsPageIndex !== -1) {
  423. var delta = getCurrentPages().length - 1 - existsPageIndex;
  424. if (delta > 0) {
  425. fromArgs.delta = delta;
  426. }
  427. }
  428. }
  429. } };
  430. var previewImage = {
  431. args: function args(fromArgs) {
  432. var currentIndex = parseInt(fromArgs.current);
  433. if (isNaN(currentIndex)) {
  434. return;
  435. }
  436. var urls = fromArgs.urls;
  437. if (!Array.isArray(urls)) {
  438. return;
  439. }
  440. var len = urls.length;
  441. if (!len) {
  442. return;
  443. }
  444. if (currentIndex < 0) {
  445. currentIndex = 0;
  446. } else if (currentIndex >= len) {
  447. currentIndex = len - 1;
  448. }
  449. if (currentIndex > 0) {
  450. fromArgs.current = urls[currentIndex];
  451. fromArgs.urls = urls.filter(
  452. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  453. } else {
  454. fromArgs.current = urls[0];
  455. }
  456. return {
  457. indicator: false,
  458. loop: false };
  459. } };
  460. function addSafeAreaInsets(result) {
  461. if (result.safeArea) {
  462. var safeArea = result.safeArea;
  463. result.safeAreaInsets = {
  464. top: safeArea.top,
  465. left: safeArea.left,
  466. right: result.windowWidth - safeArea.right,
  467. bottom: result.windowHeight - safeArea.bottom };
  468. }
  469. }
  470. var protocols = {
  471. redirectTo: redirectTo,
  472. navigateTo: navigateTo,
  473. previewImage: previewImage,
  474. getSystemInfo: {
  475. returnValue: addSafeAreaInsets },
  476. getSystemInfoSync: {
  477. returnValue: addSafeAreaInsets } };
  478. var todos = [
  479. 'vibrate',
  480. 'preloadPage',
  481. 'unPreloadPage',
  482. 'loadSubPackage'];
  483. var canIUses = [];
  484. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  485. function processCallback(methodName, method, returnValue) {
  486. return function (res) {
  487. return method(processReturnValue(methodName, res, returnValue));
  488. };
  489. }
  490. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  491. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  492. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  493. if (isFn(argsOption)) {
  494. argsOption = argsOption(fromArgs, toArgs) || {};
  495. }
  496. for (var key in fromArgs) {
  497. if (hasOwn(argsOption, key)) {
  498. var keyOption = argsOption[key];
  499. if (isFn(keyOption)) {
  500. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  501. }
  502. if (!keyOption) {// 不支持的参数
  503. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  504. } else if (isStr(keyOption)) {// 重写参数 key
  505. toArgs[keyOption] = fromArgs[key];
  506. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  507. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  508. }
  509. } else if (CALLBACKS.indexOf(key) !== -1) {
  510. if (isFn(fromArgs[key])) {
  511. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  512. }
  513. } else {
  514. if (!keepFromArgs) {
  515. toArgs[key] = fromArgs[key];
  516. }
  517. }
  518. }
  519. return toArgs;
  520. } else if (isFn(fromArgs)) {
  521. fromArgs = processCallback(methodName, fromArgs, returnValue);
  522. }
  523. return fromArgs;
  524. }
  525. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  526. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  527. res = protocols.returnValue(methodName, res);
  528. }
  529. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  530. }
  531. function wrapper(methodName, method) {
  532. if (hasOwn(protocols, methodName)) {
  533. var protocol = protocols[methodName];
  534. if (!protocol) {// 暂不支持的 api
  535. return function () {
  536. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  537. };
  538. }
  539. return function (arg1, arg2) {// 目前 api 最多两个参数
  540. var options = protocol;
  541. if (isFn(protocol)) {
  542. options = protocol(arg1);
  543. }
  544. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  545. var args = [arg1];
  546. if (typeof arg2 !== 'undefined') {
  547. args.push(arg2);
  548. }
  549. if (isFn(options.name)) {
  550. methodName = options.name(arg1);
  551. } else if (isStr(options.name)) {
  552. methodName = options.name;
  553. }
  554. var returnValue = wx[methodName].apply(wx, args);
  555. if (isSyncApi(methodName)) {// 同步 api
  556. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  557. }
  558. return returnValue;
  559. };
  560. }
  561. return method;
  562. }
  563. var todoApis = Object.create(null);
  564. var TODOS = [
  565. 'onTabBarMidButtonTap',
  566. 'subscribePush',
  567. 'unsubscribePush',
  568. 'onPush',
  569. 'offPush',
  570. 'share'];
  571. function createTodoApi(name) {
  572. return function todoApi(_ref)
  573. {var fail = _ref.fail,complete = _ref.complete;
  574. var res = {
  575. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  576. isFn(fail) && fail(res);
  577. isFn(complete) && complete(res);
  578. };
  579. }
  580. TODOS.forEach(function (name) {
  581. todoApis[name] = createTodoApi(name);
  582. });
  583. var providers = {
  584. oauth: ['weixin'],
  585. share: ['weixin'],
  586. payment: ['wxpay'],
  587. push: ['weixin'] };
  588. function getProvider(_ref2)
  589. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  590. var res = false;
  591. if (providers[service]) {
  592. res = {
  593. errMsg: 'getProvider:ok',
  594. service: service,
  595. provider: providers[service] };
  596. isFn(success) && success(res);
  597. } else {
  598. res = {
  599. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  600. isFn(fail) && fail(res);
  601. }
  602. isFn(complete) && complete(res);
  603. }
  604. var extraApi = /*#__PURE__*/Object.freeze({
  605. __proto__: null,
  606. getProvider: getProvider });
  607. var getEmitter = function () {
  608. var Emitter;
  609. return function getUniEmitter() {
  610. if (!Emitter) {
  611. Emitter = new _vue.default();
  612. }
  613. return Emitter;
  614. };
  615. }();
  616. function apply(ctx, method, args) {
  617. return ctx[method].apply(ctx, args);
  618. }
  619. function $on() {
  620. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  621. }
  622. function $off() {
  623. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  624. }
  625. function $once() {
  626. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  627. }
  628. function $emit() {
  629. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  630. }
  631. var eventApi = /*#__PURE__*/Object.freeze({
  632. __proto__: null,
  633. $on: $on,
  634. $off: $off,
  635. $once: $once,
  636. $emit: $emit });
  637. var api = /*#__PURE__*/Object.freeze({
  638. __proto__: null });
  639. var MPPage = Page;
  640. var MPComponent = Component;
  641. var customizeRE = /:/g;
  642. var customize = cached(function (str) {
  643. return camelize(str.replace(customizeRE, '-'));
  644. });
  645. function initTriggerEvent(mpInstance) {
  646. {
  647. if (!wx.canIUse('nextTick')) {
  648. return;
  649. }
  650. }
  651. var oldTriggerEvent = mpInstance.triggerEvent;
  652. mpInstance.triggerEvent = function (event) {for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {args[_key4 - 1] = arguments[_key4];}
  653. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  654. };
  655. }
  656. function initHook(name, options) {
  657. var oldHook = options[name];
  658. if (!oldHook) {
  659. options[name] = function () {
  660. initTriggerEvent(this);
  661. };
  662. } else {
  663. options[name] = function () {
  664. initTriggerEvent(this);for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  665. return oldHook.apply(this, args);
  666. };
  667. }
  668. }
  669. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  670. initHook('onLoad', options);
  671. return MPPage(options);
  672. };
  673. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  674. initHook('created', options);
  675. return MPComponent(options);
  676. };
  677. var PAGE_EVENT_HOOKS = [
  678. 'onPullDownRefresh',
  679. 'onReachBottom',
  680. 'onAddToFavorites',
  681. 'onShareTimeline',
  682. 'onShareAppMessage',
  683. 'onPageScroll',
  684. 'onResize',
  685. 'onTabItemTap'];
  686. function initMocks(vm, mocks) {
  687. var mpInstance = vm.$mp[vm.mpType];
  688. mocks.forEach(function (mock) {
  689. if (hasOwn(mpInstance, mock)) {
  690. vm[mock] = mpInstance[mock];
  691. }
  692. });
  693. }
  694. function hasHook(hook, vueOptions) {
  695. if (!vueOptions) {
  696. return true;
  697. }
  698. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  699. return true;
  700. }
  701. vueOptions = vueOptions.default || vueOptions;
  702. if (isFn(vueOptions)) {
  703. if (isFn(vueOptions.extendOptions[hook])) {
  704. return true;
  705. }
  706. if (vueOptions.super &&
  707. vueOptions.super.options &&
  708. Array.isArray(vueOptions.super.options[hook])) {
  709. return true;
  710. }
  711. return false;
  712. }
  713. if (isFn(vueOptions[hook])) {
  714. return true;
  715. }
  716. var mixins = vueOptions.mixins;
  717. if (Array.isArray(mixins)) {
  718. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  719. }
  720. }
  721. function initHooks(mpOptions, hooks, vueOptions) {
  722. hooks.forEach(function (hook) {
  723. if (hasHook(hook, vueOptions)) {
  724. mpOptions[hook] = function (args) {
  725. return this.$vm && this.$vm.__call_hook(hook, args);
  726. };
  727. }
  728. });
  729. }
  730. function initVueComponent(Vue, vueOptions) {
  731. vueOptions = vueOptions.default || vueOptions;
  732. var VueComponent;
  733. if (isFn(vueOptions)) {
  734. VueComponent = vueOptions;
  735. } else {
  736. VueComponent = Vue.extend(vueOptions);
  737. }
  738. vueOptions = VueComponent.options;
  739. return [VueComponent, vueOptions];
  740. }
  741. function initSlots(vm, vueSlots) {
  742. if (Array.isArray(vueSlots) && vueSlots.length) {
  743. var $slots = Object.create(null);
  744. vueSlots.forEach(function (slotName) {
  745. $slots[slotName] = true;
  746. });
  747. vm.$scopedSlots = vm.$slots = $slots;
  748. }
  749. }
  750. function initVueIds(vueIds, mpInstance) {
  751. vueIds = (vueIds || '').split(',');
  752. var len = vueIds.length;
  753. if (len === 1) {
  754. mpInstance._$vueId = vueIds[0];
  755. } else if (len === 2) {
  756. mpInstance._$vueId = vueIds[0];
  757. mpInstance._$vuePid = vueIds[1];
  758. }
  759. }
  760. function initData(vueOptions, context) {
  761. var data = vueOptions.data || {};
  762. var methods = vueOptions.methods || {};
  763. if (typeof data === 'function') {
  764. try {
  765. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  766. } catch (e) {
  767. if (Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  768. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  769. }
  770. }
  771. } else {
  772. try {
  773. // 对 data 格式化
  774. data = JSON.parse(JSON.stringify(data));
  775. } catch (e) {}
  776. }
  777. if (!isPlainObject(data)) {
  778. data = {};
  779. }
  780. Object.keys(methods).forEach(function (methodName) {
  781. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  782. data[methodName] = methods[methodName];
  783. }
  784. });
  785. return data;
  786. }
  787. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  788. function createObserver(name) {
  789. return function observer(newVal, oldVal) {
  790. if (this.$vm) {
  791. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  792. }
  793. };
  794. }
  795. function initBehaviors(vueOptions, initBehavior) {
  796. var vueBehaviors = vueOptions.behaviors;
  797. var vueExtends = vueOptions.extends;
  798. var vueMixins = vueOptions.mixins;
  799. var vueProps = vueOptions.props;
  800. if (!vueProps) {
  801. vueOptions.props = vueProps = [];
  802. }
  803. var behaviors = [];
  804. if (Array.isArray(vueBehaviors)) {
  805. vueBehaviors.forEach(function (behavior) {
  806. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  807. if (behavior === 'uni://form-field') {
  808. if (Array.isArray(vueProps)) {
  809. vueProps.push('name');
  810. vueProps.push('value');
  811. } else {
  812. vueProps.name = {
  813. type: String,
  814. default: '' };
  815. vueProps.value = {
  816. type: [String, Number, Boolean, Array, Object, Date],
  817. default: '' };
  818. }
  819. }
  820. });
  821. }
  822. if (isPlainObject(vueExtends) && vueExtends.props) {
  823. behaviors.push(
  824. initBehavior({
  825. properties: initProperties(vueExtends.props, true) }));
  826. }
  827. if (Array.isArray(vueMixins)) {
  828. vueMixins.forEach(function (vueMixin) {
  829. if (isPlainObject(vueMixin) && vueMixin.props) {
  830. behaviors.push(
  831. initBehavior({
  832. properties: initProperties(vueMixin.props, true) }));
  833. }
  834. });
  835. }
  836. return behaviors;
  837. }
  838. function parsePropType(key, type, defaultValue, file) {
  839. // [String]=>String
  840. if (Array.isArray(type) && type.length === 1) {
  841. return type[0];
  842. }
  843. return type;
  844. }
  845. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  846. var properties = {};
  847. if (!isBehavior) {
  848. properties.vueId = {
  849. type: String,
  850. value: '' };
  851. // 用于字节跳动小程序模拟抽象节点
  852. properties.generic = {
  853. type: Object,
  854. value: null };
  855. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  856. type: null,
  857. value: [],
  858. observer: function observer(newVal, oldVal) {
  859. var $slots = Object.create(null);
  860. newVal.forEach(function (slotName) {
  861. $slots[slotName] = true;
  862. });
  863. this.setData({
  864. $slots: $slots });
  865. } };
  866. }
  867. if (Array.isArray(props)) {// ['title']
  868. props.forEach(function (key) {
  869. properties[key] = {
  870. type: null,
  871. observer: createObserver(key) };
  872. });
  873. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  874. Object.keys(props).forEach(function (key) {
  875. var opts = props[key];
  876. if (isPlainObject(opts)) {// title:{type:String,default:''}
  877. var value = opts.default;
  878. if (isFn(value)) {
  879. value = value();
  880. }
  881. opts.type = parsePropType(key, opts.type);
  882. properties[key] = {
  883. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  884. value: value,
  885. observer: createObserver(key) };
  886. } else {// content:String
  887. var type = parsePropType(key, opts);
  888. properties[key] = {
  889. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  890. observer: createObserver(key) };
  891. }
  892. });
  893. }
  894. return properties;
  895. }
  896. function wrapper$1(event) {
  897. // TODO 又得兼容 mpvue 的 mp 对象
  898. try {
  899. event.mp = JSON.parse(JSON.stringify(event));
  900. } catch (e) {}
  901. event.stopPropagation = noop;
  902. event.preventDefault = noop;
  903. event.target = event.target || {};
  904. if (!hasOwn(event, 'detail')) {
  905. event.detail = {};
  906. }
  907. if (hasOwn(event, 'markerId')) {
  908. event.detail = typeof event.detail === 'object' ? event.detail : {};
  909. event.detail.markerId = event.markerId;
  910. }
  911. if (isPlainObject(event.detail)) {
  912. event.target = Object.assign({}, event.target, event.detail);
  913. }
  914. return event;
  915. }
  916. function getExtraValue(vm, dataPathsArray) {
  917. var context = vm;
  918. dataPathsArray.forEach(function (dataPathArray) {
  919. var dataPath = dataPathArray[0];
  920. var value = dataPathArray[2];
  921. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  922. var propPath = dataPathArray[1];
  923. var valuePath = dataPathArray[3];
  924. var vFor;
  925. if (Number.isInteger(dataPath)) {
  926. vFor = dataPath;
  927. } else if (!dataPath) {
  928. vFor = context;
  929. } else if (typeof dataPath === 'string' && dataPath) {
  930. if (dataPath.indexOf('#s#') === 0) {
  931. vFor = dataPath.substr(3);
  932. } else {
  933. vFor = vm.__get_value(dataPath, context);
  934. }
  935. }
  936. if (Number.isInteger(vFor)) {
  937. context = value;
  938. } else if (!propPath) {
  939. context = vFor[value];
  940. } else {
  941. if (Array.isArray(vFor)) {
  942. context = vFor.find(function (vForItem) {
  943. return vm.__get_value(propPath, vForItem) === value;
  944. });
  945. } else if (isPlainObject(vFor)) {
  946. context = Object.keys(vFor).find(function (vForKey) {
  947. return vm.__get_value(propPath, vFor[vForKey]) === value;
  948. });
  949. } else {
  950. console.error('v-for 暂不支持循环数据:', vFor);
  951. }
  952. }
  953. if (valuePath) {
  954. context = vm.__get_value(valuePath, context);
  955. }
  956. }
  957. });
  958. return context;
  959. }
  960. function processEventExtra(vm, extra, event) {
  961. var extraObj = {};
  962. if (Array.isArray(extra) && extra.length) {
  963. /**
  964. *[
  965. * ['data.items', 'data.id', item.data.id],
  966. * ['metas', 'id', meta.id]
  967. *],
  968. *[
  969. * ['data.items', 'data.id', item.data.id],
  970. * ['metas', 'id', meta.id]
  971. *],
  972. *'test'
  973. */
  974. extra.forEach(function (dataPath, index) {
  975. if (typeof dataPath === 'string') {
  976. if (!dataPath) {// model,prop.sync
  977. extraObj['$' + index] = vm;
  978. } else {
  979. if (dataPath === '$event') {// $event
  980. extraObj['$' + index] = event;
  981. } else if (dataPath === 'arguments') {
  982. if (event.detail && event.detail.__args__) {
  983. extraObj['$' + index] = event.detail.__args__;
  984. } else {
  985. extraObj['$' + index] = [event];
  986. }
  987. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  988. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  989. } else {
  990. extraObj['$' + index] = vm.__get_value(dataPath);
  991. }
  992. }
  993. } else {
  994. extraObj['$' + index] = getExtraValue(vm, dataPath);
  995. }
  996. });
  997. }
  998. return extraObj;
  999. }
  1000. function getObjByArray(arr) {
  1001. var obj = {};
  1002. for (var i = 1; i < arr.length; i++) {
  1003. var element = arr[i];
  1004. obj[element[0]] = element[1];
  1005. }
  1006. return obj;
  1007. }
  1008. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1009. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1010. if (isCustom) {// 自定义事件
  1011. isCustomMPEvent = event.currentTarget &&
  1012. event.currentTarget.dataset &&
  1013. event.currentTarget.dataset.comType === 'wx';
  1014. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1015. if (isCustomMPEvent) {
  1016. return [event];
  1017. }
  1018. return event.detail.__args__ || event.detail;
  1019. }
  1020. }
  1021. var extraObj = processEventExtra(vm, extra, event);
  1022. var ret = [];
  1023. args.forEach(function (arg) {
  1024. if (arg === '$event') {
  1025. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1026. ret.push(event.target.value);
  1027. } else {
  1028. if (isCustom && !isCustomMPEvent) {
  1029. ret.push(event.detail.__args__[0]);
  1030. } else {// wxcomponent 组件或内置组件
  1031. ret.push(event);
  1032. }
  1033. }
  1034. } else {
  1035. if (Array.isArray(arg) && arg[0] === 'o') {
  1036. ret.push(getObjByArray(arg));
  1037. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1038. ret.push(extraObj[arg]);
  1039. } else {
  1040. ret.push(arg);
  1041. }
  1042. }
  1043. });
  1044. return ret;
  1045. }
  1046. var ONCE = '~';
  1047. var CUSTOM = '^';
  1048. function isMatchEventType(eventType, optType) {
  1049. return eventType === optType ||
  1050. optType === 'regionchange' && (
  1051. eventType === 'begin' ||
  1052. eventType === 'end');
  1053. }
  1054. function getContextVm(vm) {
  1055. var $parent = vm.$parent;
  1056. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1057. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1058. $parent = $parent.$parent;
  1059. }
  1060. return $parent && $parent.$parent;
  1061. }
  1062. function handleEvent(event) {var _this2 = this;
  1063. event = wrapper$1(event);
  1064. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1065. var dataset = (event.currentTarget || event.target).dataset;
  1066. if (!dataset) {
  1067. return console.warn('事件信息不存在');
  1068. }
  1069. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1070. if (!eventOpts) {
  1071. return console.warn('事件信息不存在');
  1072. }
  1073. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1074. var eventType = event.type;
  1075. var ret = [];
  1076. eventOpts.forEach(function (eventOpt) {
  1077. var type = eventOpt[0];
  1078. var eventsArray = eventOpt[1];
  1079. var isCustom = type.charAt(0) === CUSTOM;
  1080. type = isCustom ? type.slice(1) : type;
  1081. var isOnce = type.charAt(0) === ONCE;
  1082. type = isOnce ? type.slice(1) : type;
  1083. if (eventsArray && isMatchEventType(eventType, type)) {
  1084. eventsArray.forEach(function (eventArray) {
  1085. var methodName = eventArray[0];
  1086. if (methodName) {
  1087. var handlerCtx = _this2.$vm;
  1088. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1089. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1090. }
  1091. if (methodName === '$emit') {
  1092. handlerCtx.$emit.apply(handlerCtx,
  1093. processEventArgs(
  1094. _this2.$vm,
  1095. event,
  1096. eventArray[1],
  1097. eventArray[2],
  1098. isCustom,
  1099. methodName));
  1100. return;
  1101. }
  1102. var handler = handlerCtx[methodName];
  1103. if (!isFn(handler)) {
  1104. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1105. }
  1106. if (isOnce) {
  1107. if (handler.once) {
  1108. return;
  1109. }
  1110. handler.once = true;
  1111. }
  1112. var params = processEventArgs(
  1113. _this2.$vm,
  1114. event,
  1115. eventArray[1],
  1116. eventArray[2],
  1117. isCustom,
  1118. methodName);
  1119. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1120. // eslint-disable-next-line no-sparse-arrays
  1121. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  1122. }
  1123. });
  1124. }
  1125. });
  1126. if (
  1127. eventType === 'input' &&
  1128. ret.length === 1 &&
  1129. typeof ret[0] !== 'undefined')
  1130. {
  1131. return ret[0];
  1132. }
  1133. }
  1134. var hooks = [
  1135. 'onShow',
  1136. 'onHide',
  1137. 'onError',
  1138. 'onPageNotFound',
  1139. 'onThemeChange',
  1140. 'onUnhandledRejection'];
  1141. function parseBaseApp(vm, _ref3)
  1142. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1143. if (vm.$options.store) {
  1144. _vue.default.prototype.$store = vm.$options.store;
  1145. }
  1146. _vue.default.prototype.mpHost = "mp-weixin";
  1147. _vue.default.mixin({
  1148. beforeCreate: function beforeCreate() {
  1149. if (!this.$options.mpType) {
  1150. return;
  1151. }
  1152. this.mpType = this.$options.mpType;
  1153. this.$mp = _defineProperty({
  1154. data: {} },
  1155. this.mpType, this.$options.mpInstance);
  1156. this.$scope = this.$options.mpInstance;
  1157. delete this.$options.mpType;
  1158. delete this.$options.mpInstance;
  1159. if (this.mpType !== 'app') {
  1160. initRefs(this);
  1161. initMocks(this, mocks);
  1162. }
  1163. } });
  1164. var appOptions = {
  1165. onLaunch: function onLaunch(args) {
  1166. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1167. return;
  1168. }
  1169. {
  1170. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1171. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1172. }
  1173. }
  1174. this.$vm = vm;
  1175. this.$vm.$mp = {
  1176. app: this };
  1177. this.$vm.$scope = this;
  1178. // vm 上也挂载 globalData
  1179. this.$vm.globalData = this.globalData;
  1180. this.$vm._isMounted = true;
  1181. this.$vm.__call_hook('mounted', args);
  1182. this.$vm.__call_hook('onLaunch', args);
  1183. } };
  1184. // 兼容旧版本 globalData
  1185. appOptions.globalData = vm.$options.globalData || {};
  1186. // 将 methods 中的方法挂在 getApp() 中
  1187. var methods = vm.$options.methods;
  1188. if (methods) {
  1189. Object.keys(methods).forEach(function (name) {
  1190. appOptions[name] = methods[name];
  1191. });
  1192. }
  1193. initHooks(appOptions, hooks);
  1194. return appOptions;
  1195. }
  1196. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1197. function findVmByVueId(vm, vuePid) {
  1198. var $children = vm.$children;
  1199. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1200. for (var i = $children.length - 1; i >= 0; i--) {
  1201. var childVm = $children[i];
  1202. if (childVm.$scope._$vueId === vuePid) {
  1203. return childVm;
  1204. }
  1205. }
  1206. // 反向递归查找
  1207. var parentVm;
  1208. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1209. parentVm = findVmByVueId($children[_i], vuePid);
  1210. if (parentVm) {
  1211. return parentVm;
  1212. }
  1213. }
  1214. }
  1215. function initBehavior(options) {
  1216. return Behavior(options);
  1217. }
  1218. function isPage() {
  1219. return !!this.route;
  1220. }
  1221. function initRelation(detail) {
  1222. this.triggerEvent('__l', detail);
  1223. }
  1224. function initRefs(vm) {
  1225. var mpInstance = vm.$scope;
  1226. Object.defineProperty(vm, '$refs', {
  1227. get: function get() {
  1228. var $refs = {};
  1229. var components = mpInstance.selectAllComponents('.vue-ref');
  1230. components.forEach(function (component) {
  1231. var ref = component.dataset.ref;
  1232. $refs[ref] = component.$vm || component;
  1233. });
  1234. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1235. forComponents.forEach(function (component) {
  1236. var ref = component.dataset.ref;
  1237. if (!$refs[ref]) {
  1238. $refs[ref] = [];
  1239. }
  1240. $refs[ref].push(component.$vm || component);
  1241. });
  1242. return $refs;
  1243. } });
  1244. }
  1245. function handleLink(event) {var _ref4 =
  1246. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1247. var parentVm;
  1248. if (vuePid) {
  1249. parentVm = findVmByVueId(this.$vm, vuePid);
  1250. }
  1251. if (!parentVm) {
  1252. parentVm = this.$vm;
  1253. }
  1254. vueOptions.parent = parentVm;
  1255. }
  1256. function parseApp(vm) {
  1257. return parseBaseApp(vm, {
  1258. mocks: mocks,
  1259. initRefs: initRefs });
  1260. }
  1261. function createApp(vm) {
  1262. _vue.default.prototype.getOpenerEventChannel = function () {
  1263. if (!this.__eventChannel__) {
  1264. this.__eventChannel__ = new EventChannel();
  1265. }
  1266. return this.__eventChannel__;
  1267. };
  1268. var callHook = _vue.default.prototype.__call_hook;
  1269. _vue.default.prototype.__call_hook = function (hook, args) {
  1270. if (hook === 'onLoad' && args && args.__id__) {
  1271. this.__eventChannel__ = getEventChannel(args.__id__);
  1272. delete args.__id__;
  1273. }
  1274. return callHook.call(this, hook, args);
  1275. };
  1276. App(parseApp(vm));
  1277. return vm;
  1278. }
  1279. var encodeReserveRE = /[!'()*]/g;
  1280. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1281. var commaRE = /%2C/g;
  1282. // fixed encodeURIComponent which is more conformant to RFC3986:
  1283. // - escapes [!'()*]
  1284. // - preserve commas
  1285. var encode = function encode(str) {return encodeURIComponent(str).
  1286. replace(encodeReserveRE, encodeReserveReplacer).
  1287. replace(commaRE, ',');};
  1288. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1289. var res = obj ? Object.keys(obj).map(function (key) {
  1290. var val = obj[key];
  1291. if (val === undefined) {
  1292. return '';
  1293. }
  1294. if (val === null) {
  1295. return encodeStr(key);
  1296. }
  1297. if (Array.isArray(val)) {
  1298. var result = [];
  1299. val.forEach(function (val2) {
  1300. if (val2 === undefined) {
  1301. return;
  1302. }
  1303. if (val2 === null) {
  1304. result.push(encodeStr(key));
  1305. } else {
  1306. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1307. }
  1308. });
  1309. return result.join('&');
  1310. }
  1311. return encodeStr(key) + '=' + encodeStr(val);
  1312. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1313. return res ? "?".concat(res) : '';
  1314. }
  1315. function parseBaseComponent(vueComponentOptions)
  1316. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1317. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1318. var options = _objectSpread({
  1319. multipleSlots: true,
  1320. addGlobalClass: true },
  1321. vueOptions.options || {});
  1322. {
  1323. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1324. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1325. Object.assign(options, vueOptions['mp-weixin'].options);
  1326. }
  1327. }
  1328. var componentOptions = {
  1329. options: options,
  1330. data: initData(vueOptions, _vue.default.prototype),
  1331. behaviors: initBehaviors(vueOptions, initBehavior),
  1332. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1333. lifetimes: {
  1334. attached: function attached() {
  1335. var properties = this.properties;
  1336. var options = {
  1337. mpType: isPage.call(this) ? 'page' : 'component',
  1338. mpInstance: this,
  1339. propsData: properties };
  1340. initVueIds(properties.vueId, this);
  1341. // 处理父子关系
  1342. initRelation.call(this, {
  1343. vuePid: this._$vuePid,
  1344. vueOptions: options });
  1345. // 初始化 vue 实例
  1346. this.$vm = new VueComponent(options);
  1347. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1348. initSlots(this.$vm, properties.vueSlots);
  1349. // 触发首次 setData
  1350. this.$vm.$mount();
  1351. },
  1352. ready: function ready() {
  1353. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1354. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1355. if (this.$vm) {
  1356. this.$vm._isMounted = true;
  1357. this.$vm.__call_hook('mounted');
  1358. this.$vm.__call_hook('onReady');
  1359. }
  1360. },
  1361. detached: function detached() {
  1362. this.$vm && this.$vm.$destroy();
  1363. } },
  1364. pageLifetimes: {
  1365. show: function show(args) {
  1366. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1367. },
  1368. hide: function hide() {
  1369. this.$vm && this.$vm.__call_hook('onPageHide');
  1370. },
  1371. resize: function resize(size) {
  1372. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1373. } },
  1374. methods: {
  1375. __l: handleLink,
  1376. __e: handleEvent } };
  1377. // externalClasses
  1378. if (vueOptions.externalClasses) {
  1379. componentOptions.externalClasses = vueOptions.externalClasses;
  1380. }
  1381. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1382. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1383. componentOptions.methods[callMethod] = function (args) {
  1384. return this.$vm[callMethod](args);
  1385. };
  1386. });
  1387. }
  1388. if (isPage) {
  1389. return componentOptions;
  1390. }
  1391. return [componentOptions, VueComponent];
  1392. }
  1393. function parseComponent(vueComponentOptions) {
  1394. return parseBaseComponent(vueComponentOptions, {
  1395. isPage: isPage,
  1396. initRelation: initRelation });
  1397. }
  1398. var hooks$1 = [
  1399. 'onShow',
  1400. 'onHide',
  1401. 'onUnload'];
  1402. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1403. function parseBasePage(vuePageOptions, _ref6)
  1404. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1405. var pageOptions = parseComponent(vuePageOptions);
  1406. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1407. pageOptions.methods.onLoad = function (query) {
  1408. this.options = query;
  1409. var copyQuery = Object.assign({}, query);
  1410. delete copyQuery.__id__;
  1411. this.$page = {
  1412. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1413. this.$vm.$mp.query = query; // 兼容 mpvue
  1414. this.$vm.__call_hook('onLoad', query);
  1415. };
  1416. return pageOptions;
  1417. }
  1418. function parsePage(vuePageOptions) {
  1419. return parseBasePage(vuePageOptions, {
  1420. isPage: isPage,
  1421. initRelation: initRelation });
  1422. }
  1423. function createPage(vuePageOptions) {
  1424. {
  1425. return Component(parsePage(vuePageOptions));
  1426. }
  1427. }
  1428. function createComponent(vueOptions) {
  1429. {
  1430. return Component(parseComponent(vueOptions));
  1431. }
  1432. }
  1433. todos.forEach(function (todoApi) {
  1434. protocols[todoApi] = false;
  1435. });
  1436. canIUses.forEach(function (canIUseApi) {
  1437. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1438. canIUseApi;
  1439. if (!wx.canIUse(apiName)) {
  1440. protocols[canIUseApi] = false;
  1441. }
  1442. });
  1443. var uni = {};
  1444. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1445. uni = new Proxy({}, {
  1446. get: function get(target, name) {
  1447. if (hasOwn(target, name)) {
  1448. return target[name];
  1449. }
  1450. if (baseApi[name]) {
  1451. return baseApi[name];
  1452. }
  1453. if (api[name]) {
  1454. return promisify(name, api[name]);
  1455. }
  1456. {
  1457. if (extraApi[name]) {
  1458. return promisify(name, extraApi[name]);
  1459. }
  1460. if (todoApis[name]) {
  1461. return promisify(name, todoApis[name]);
  1462. }
  1463. }
  1464. if (eventApi[name]) {
  1465. return eventApi[name];
  1466. }
  1467. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1468. return;
  1469. }
  1470. return promisify(name, wrapper(name, wx[name]));
  1471. },
  1472. set: function set(target, name, value) {
  1473. target[name] = value;
  1474. return true;
  1475. } });
  1476. } else {
  1477. Object.keys(baseApi).forEach(function (name) {
  1478. uni[name] = baseApi[name];
  1479. });
  1480. {
  1481. Object.keys(todoApis).forEach(function (name) {
  1482. uni[name] = promisify(name, todoApis[name]);
  1483. });
  1484. Object.keys(extraApi).forEach(function (name) {
  1485. uni[name] = promisify(name, todoApis[name]);
  1486. });
  1487. }
  1488. Object.keys(eventApi).forEach(function (name) {
  1489. uni[name] = eventApi[name];
  1490. });
  1491. Object.keys(api).forEach(function (name) {
  1492. uni[name] = promisify(name, api[name]);
  1493. });
  1494. Object.keys(wx).forEach(function (name) {
  1495. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1496. uni[name] = promisify(name, wrapper(name, wx[name]));
  1497. }
  1498. });
  1499. }
  1500. wx.createApp = createApp;
  1501. wx.createPage = createPage;
  1502. wx.createComponent = createComponent;
  1503. var uni$1 = uni;var _default =
  1504. uni$1;exports.default = _default;
  1505. /***/ }),
  1506. /***/ 10:
  1507. /*!**********************************************************************************************************!*\
  1508. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1509. \**********************************************************************************************************/
  1510. /*! exports provided: default */
  1511. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1512. "use strict";
  1513. __webpack_require__.r(__webpack_exports__);
  1514. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1515. /* globals __VUE_SSR_CONTEXT__ */
  1516. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1517. // This module is a runtime utility for cleaner component module output and will
  1518. // be included in the final webpack user bundle.
  1519. function normalizeComponent (
  1520. scriptExports,
  1521. render,
  1522. staticRenderFns,
  1523. functionalTemplate,
  1524. injectStyles,
  1525. scopeId,
  1526. moduleIdentifier, /* server only */
  1527. shadowMode, /* vue-cli only */
  1528. components, // fixed by xxxxxx auto components
  1529. renderjs // fixed by xxxxxx renderjs
  1530. ) {
  1531. // Vue.extend constructor export interop
  1532. var options = typeof scriptExports === 'function'
  1533. ? scriptExports.options
  1534. : scriptExports
  1535. // fixed by xxxxxx auto components
  1536. if (components) {
  1537. if (!options.components) {
  1538. options.components = {}
  1539. }
  1540. var hasOwn = Object.prototype.hasOwnProperty
  1541. for (var name in components) {
  1542. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1543. options.components[name] = components[name]
  1544. }
  1545. }
  1546. }
  1547. // fixed by xxxxxx renderjs
  1548. if (renderjs) {
  1549. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1550. this[renderjs.__module] = this
  1551. });
  1552. (options.mixins || (options.mixins = [])).push(renderjs)
  1553. }
  1554. // render functions
  1555. if (render) {
  1556. options.render = render
  1557. options.staticRenderFns = staticRenderFns
  1558. options._compiled = true
  1559. }
  1560. // functional template
  1561. if (functionalTemplate) {
  1562. options.functional = true
  1563. }
  1564. // scopedId
  1565. if (scopeId) {
  1566. options._scopeId = 'data-v-' + scopeId
  1567. }
  1568. var hook
  1569. if (moduleIdentifier) { // server build
  1570. hook = function (context) {
  1571. // 2.3 injection
  1572. context =
  1573. context || // cached call
  1574. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1575. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1576. // 2.2 with runInNewContext: true
  1577. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1578. context = __VUE_SSR_CONTEXT__
  1579. }
  1580. // inject component styles
  1581. if (injectStyles) {
  1582. injectStyles.call(this, context)
  1583. }
  1584. // register component module identifier for async chunk inferrence
  1585. if (context && context._registeredComponents) {
  1586. context._registeredComponents.add(moduleIdentifier)
  1587. }
  1588. }
  1589. // used by ssr in case component is cached and beforeCreate
  1590. // never gets called
  1591. options._ssrRegister = hook
  1592. } else if (injectStyles) {
  1593. hook = shadowMode
  1594. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1595. : injectStyles
  1596. }
  1597. if (hook) {
  1598. if (options.functional) {
  1599. // for template-only hot-reload because in that case the render fn doesn't
  1600. // go through the normalizer
  1601. options._injectStyles = hook
  1602. // register for functioal component in vue file
  1603. var originalRender = options.render
  1604. options.render = function renderWithStyleInjection (h, context) {
  1605. hook.call(context)
  1606. return originalRender(h, context)
  1607. }
  1608. } else {
  1609. // inject component registration as beforeCreate hook
  1610. var existing = options.beforeCreate
  1611. options.beforeCreate = existing
  1612. ? [].concat(existing, hook)
  1613. : [hook]
  1614. }
  1615. }
  1616. return {
  1617. exports: scriptExports,
  1618. options: options
  1619. }
  1620. }
  1621. /***/ }),
  1622. /***/ 106:
  1623. /*!***************************************************************************!*\
  1624. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/mescroll-mixins.js ***!
  1625. \***************************************************************************/
  1626. /*! no static exports found */
  1627. /***/ (function(module, exports, __webpack_require__) {
  1628. "use strict";
  1629. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // mescroll-body 和 mescroll-uni 通用
  1630. // import MescrollUni from "./mescroll-uni.vue";
  1631. // import MescrollBody from "./mescroll-body.vue";
  1632. var MescrollMixin = {
  1633. // components: { // 非H5端无法通过mixin注册组件, 只能在main.js中注册全局组件或具体界面中注册
  1634. // MescrollUni,
  1635. // MescrollBody
  1636. // },
  1637. data: function data() {
  1638. return {
  1639. mescroll: null //mescroll实例对象
  1640. };
  1641. },
  1642. // 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  1643. onPullDownRefresh: function onPullDownRefresh() {
  1644. this.mescroll && this.mescroll.onPullDownRefresh();
  1645. },
  1646. // 注册列表滚动事件,用于判定在顶部可下拉刷新,在指定位置可显示隐藏回到顶部按钮 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  1647. onPageScroll: function onPageScroll(e) {
  1648. this.mescroll && this.mescroll.onPageScroll(e);
  1649. },
  1650. // 注册滚动到底部的事件,用于上拉加载 (此方法为页面生命周期,无法在子组件中触发, 仅在mescroll-body生效)
  1651. onReachBottom: function onReachBottom() {
  1652. this.mescroll && this.mescroll.onReachBottom();
  1653. },
  1654. methods: {
  1655. // mescroll组件初始化的回调,可获取到mescroll对象
  1656. mescrollInit: function mescrollInit(mescroll) {
  1657. this.mescroll = mescroll;
  1658. this.mescrollInitByRef(); // 兼容字节跳动小程序
  1659. },
  1660. // 以ref的方式初始化mescroll对象 (兼容字节跳动小程序)
  1661. mescrollInitByRef: function mescrollInitByRef() {
  1662. if (!this.mescroll || !this.mescroll.resetUpScroll) {
  1663. var mescrollRef = this.$refs.mescrollRef;
  1664. if (mescrollRef) this.mescroll = mescrollRef.mescroll;
  1665. }
  1666. },
  1667. // 下拉刷新的回调 (mixin默认resetUpScroll)
  1668. downCallback: function downCallback() {var _this = this;
  1669. if (this.mescroll.optUp.use) {
  1670. this.mescroll.resetUpScroll();
  1671. } else {
  1672. setTimeout(function () {
  1673. _this.mescroll.endSuccess();
  1674. }, 500);
  1675. }
  1676. },
  1677. // 上拉加载的回调
  1678. upCallback: function upCallback() {var _this2 = this;
  1679. // mixin默认延时500自动结束加载
  1680. setTimeout(function () {
  1681. _this2.mescroll.endErr();
  1682. }, 500);
  1683. } },
  1684. mounted: function mounted() {
  1685. this.mescrollInitByRef(); // 兼容字节跳动小程序, 避免未设置@init或@init此时未能取到ref的情况
  1686. } };var _default =
  1687. MescrollMixin;exports.default = _default;
  1688. /***/ }),
  1689. /***/ 11:
  1690. /*!*************************************************!*\
  1691. !*** D:/wwwroot/cqcarbonwxapp/config/config.js ***!
  1692. \*************************************************/
  1693. /*! no static exports found */
  1694. /***/ (function(module, exports, __webpack_require__) {
  1695. "use strict";
  1696. Object.defineProperty(exports, "__esModule", { value: true });exports.config = void 0;var config = {
  1697. //dev
  1698. // apiBaseurl:'http://172.16.90.8:21998',//东东
  1699. apiBaseurl: 'http://wx.hw.hongweisoft.com/cqthminapp', //东东
  1700. // 图片占位
  1701. placeImg: 'http://placekitten.com',
  1702. loginUrl: 'http://wx.hw.hongweisoft.com/zddtest/forest-portal/wechat/h5/authorize?returnUrl=http://foresth5test.hw.hongweisoft.com/#/', //登录后跳转到测试链接 东东
  1703. //版本号:版本号升级将显示引导页
  1704. version: '1',
  1705. // 公司测试配置
  1706. // apiBaseurl:'http://forest.hw.hongweisoft.com/data/forest-portal',//测试
  1707. // loginUrl:'http://forest.hw.hongweisoft.com/data/forest-portal/wechat/h5/authorize?returnUrl=http://forest.hw.hongweisoft.com/#/',//登录后跳转到测试链接
  1708. //online 线上配置
  1709. //本地图片
  1710. // imgUrl:"../../static/img/",
  1711. imgUrl: "http://fqn.hongweisoft.com/cqcarbon/wxapp/",
  1712. //二级页面图片
  1713. // innerImgUrl:"../../../static/img/",
  1714. innerImgUrl: "http://fqn.hongweisoft.com/cqcarbon/wxapp/",
  1715. // 云图片(产品)
  1716. onlineImg: "http://cqth.hw.hongweisoft.com/ht/",
  1717. // 七牛云
  1718. qnyImg: "http://fqn.hongweisoft.com/cqcarbon/wxapp/" };exports.config = config;
  1719. /***/ }),
  1720. /***/ 115:
  1721. /*!*****************************************************!*\
  1722. !*** D:/wwwroot/cqcarbonwxapp/utils/wxml2canvas.js ***!
  1723. \*****************************************************/
  1724. /*! no static exports found */
  1725. /***/ (function(module, exports) {
  1726. /* eslint-disable */
  1727. var PROPERTIES = ['hover-class', 'hover-start-time', 'space', 'src'];
  1728. var COMPUTED_STYLE = [
  1729. 'color',
  1730. 'font-size',
  1731. 'font-weight',
  1732. 'font-family',
  1733. 'backgroundColor',
  1734. 'border',
  1735. 'border-radius',
  1736. 'box-sizing',
  1737. 'line-height'];
  1738. var DEFAULT_BORDER = '0px none rgb(0, 0, 0)';
  1739. var DEFAULT_BORDER_RADIUS = '0px';
  1740. // default z-index??
  1741. var DEFAULT_RANK = {
  1742. view: 0,
  1743. image: 1,
  1744. text: 2 };
  1745. var drawWrapper = function drawWrapper(context, data) {var
  1746. backgroundColor = data.backgroundColor,width = data.width,height = data.height;
  1747. context.setFillStyle(backgroundColor);
  1748. context.fillRect(0, 0, width, height);
  1749. };
  1750. // todo: do more for different language
  1751. var strLen = function strLen(str) {
  1752. var count = 0;
  1753. for (var i = 0, len = str.length; i < len; i++) {
  1754. count += str.charCodeAt(i) < 256 ? 1 : 2;
  1755. }
  1756. return count / 2;
  1757. };
  1758. var isMuitlpleLine = function isMuitlpleLine(data, text) {var
  1759. letterWidth = data['font-size'],width = data.width;
  1760. var length = strLen(text);
  1761. var rowlineLength = length * parseInt(letterWidth, 10);
  1762. return rowlineLength > width;
  1763. };
  1764. var drawMutipleLine = function drawMutipleLine(context, data, text) {var
  1765. letterWidth =
  1766. data['font-size'],width = data.width,left = data.left,top = data.top,lineHeightAttr = data['line-height'];
  1767. var lineHieght = lineHeightAttr === 'normal' ? Math.round(1.2 * letterWidth) : lineHeightAttr;
  1768. var rowLetterCount = Math.floor(width / parseInt(letterWidth, 10));
  1769. var length = strLen(text);
  1770. for (var i = 0; i < length; i += rowLetterCount) {
  1771. var lineText = text.substring(i, i + rowLetterCount);
  1772. var rowNumber = Math.floor(i / rowLetterCount);
  1773. var rowTop = top + rowNumber * parseInt(lineHieght, 10);
  1774. context.fillText(lineText, left, rowTop);
  1775. }
  1776. };
  1777. // enable color, font, for now only support chinese
  1778. var drawText = function drawText(context, data) {var
  1779. text =
  1780. data.dataset.text,left = data.left,top = data.top,color = data.color,fontWeight = data['font-weight'],fontSize = data['font-size'],fontFamily = data['font-family'];
  1781. var canvasText = Array.isArray(text) ? text[0] : text;
  1782. context.font = "".concat(fontWeight, " ").concat(Math.round(
  1783. parseFloat(fontSize)), "px ").concat(
  1784. fontFamily);
  1785. context.setFillStyle(color);
  1786. if (isMuitlpleLine(data, canvasText)) {
  1787. drawMutipleLine(context, data, canvasText);
  1788. } else {
  1789. context.fillText(canvasText, left, top);
  1790. }
  1791. context.restore();
  1792. };
  1793. var getImgInfo = function getImgInfo(src) {return (
  1794. new Promise(function (resolve, reject) {
  1795. wx.getImageInfo({
  1796. src: src,
  1797. success: function success(res) {
  1798. resolve(res);
  1799. } });
  1800. }));};
  1801. var hasBorder = function hasBorder(border) {return border !== DEFAULT_BORDER;};
  1802. var hasBorderRadius = function hasBorderRadius(borderRadius) {return borderRadius !== DEFAULT_BORDER_RADIUS;};
  1803. var getBorderAttributes = function getBorderAttributes(border) {
  1804. var borderColor, borderStyle;
  1805. var borderWidth = 0;
  1806. if (hasBorder) {
  1807. borderWidth = parseInt(border.split(/\s/)[0], 10);
  1808. borderStyle = border.split(/\s/)[1];
  1809. borderColor = border.match(/(rgb).*/gi)[0];
  1810. }
  1811. return {
  1812. borderWidth: borderWidth,
  1813. borderStyle: borderStyle,
  1814. borderColor: borderColor };
  1815. };
  1816. var getImgRect = function getImgRect(imgData, borderWidth) {var
  1817. width = imgData.width,height = imgData.height,left = imgData.left,top = imgData.top;
  1818. var imgWidth = width - 2 * borderWidth;
  1819. var imgHeight = height - 2 * borderWidth;
  1820. var imgLeft = left + borderWidth;
  1821. var imgTop = top + borderWidth;
  1822. return {
  1823. imgWidth: imgWidth,
  1824. imgHeight: imgHeight,
  1825. imgLeft: imgLeft,
  1826. imgTop: imgTop };
  1827. };
  1828. var getArcCenterPosition = function getArcCenterPosition(imgData) {var
  1829. width = imgData.width,height = imgData.height,left = imgData.left,top = imgData.top;
  1830. var coordX = width / 2 + left;
  1831. var coordY = height / 2 + top;
  1832. return {
  1833. coordX: coordX,
  1834. coordY: coordY };
  1835. };
  1836. var getArcRadius = function getArcRadius(imgData) {var borderWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;var
  1837. width = imgData.width;
  1838. return width / 2 - borderWidth / 2;
  1839. };
  1840. var getCalculatedImagePosition = function getCalculatedImagePosition(imgData, naturalWidth, naturalHeight) {var
  1841. border = imgData.border;var _getBorderAttributes =
  1842. getBorderAttributes(border),borderWidth = _getBorderAttributes.borderWidth;var _getImgRect =
  1843. getImgRect(
  1844. imgData,
  1845. borderWidth),imgWidth = _getImgRect.imgWidth,imgHeight = _getImgRect.imgHeight,imgLeft = _getImgRect.imgLeft,imgTop = _getImgRect.imgTop;
  1846. var ratio = naturalWidth / naturalHeight;
  1847. // tweak for real width and position => center center
  1848. var realWidth = ratio > 0 ? imgWidth : imgHeight * ratio;
  1849. var realHeight = ratio > 0 ? imgWidth * (1 / ratio) : imgHeight;
  1850. var offsetLeft = ratio > 0 ? 0 : (imgWidth - realWidth) / 2;
  1851. var offsetTop = ratio > 0 ? (imgHeight - realHeight) / 2 : 0;
  1852. return {
  1853. realWidth: realWidth,
  1854. realHeight: realHeight,
  1855. left: imgLeft + offsetLeft,
  1856. top: imgTop + offsetTop };
  1857. };
  1858. var drawArcImage = function drawArcImage(context, imgData) {var
  1859. src = imgData.src;var _getArcCenterPosition =
  1860. getArcCenterPosition(imgData),coordX = _getArcCenterPosition.coordX,coordY = _getArcCenterPosition.coordY;
  1861. return getImgInfo(src).then(function (res) {var
  1862. naturalWidth = res.width,naturalHeight = res.height;
  1863. var arcRadius = getArcRadius(imgData);
  1864. context.save();
  1865. context.beginPath();
  1866. context.arc(coordX, coordY, arcRadius, 0, 2 * Math.PI);
  1867. context.closePath();
  1868. context.clip();var _getCalculatedImagePo =
  1869. getCalculatedImagePosition(
  1870. imgData,
  1871. naturalWidth,
  1872. naturalHeight),left = _getCalculatedImagePo.left,top = _getCalculatedImagePo.top,realWidth = _getCalculatedImagePo.realWidth,realHeight = _getCalculatedImagePo.realHeight;
  1873. context.drawImage(
  1874. src,
  1875. 0,
  1876. 0,
  1877. naturalWidth,
  1878. naturalHeight,
  1879. left,
  1880. top,
  1881. realWidth,
  1882. realHeight);
  1883. context.restore();
  1884. });
  1885. };
  1886. var drawRectImage = function drawRectImage(context, imgData) {var
  1887. src = imgData.src,width = imgData.width,height = imgData.height,left = imgData.left,top = imgData.top;
  1888. return getImgInfo(src).then(function (res) {var
  1889. naturalWidth = res.width,naturalHeight = res.height;
  1890. context.save();
  1891. context.beginPath();
  1892. context.rect(left, top, width, height);
  1893. context.closePath();
  1894. context.clip();var _getCalculatedImagePo2 =
  1895. getCalculatedImagePosition(imgData, naturalWidth, naturalHeight),realLeft = _getCalculatedImagePo2.left,realTop = _getCalculatedImagePo2.top,realWidth = _getCalculatedImagePo2.realWidth,realHeight = _getCalculatedImagePo2.realHeight;
  1896. context.drawImage(
  1897. src,
  1898. 0,
  1899. 0,
  1900. naturalWidth,
  1901. naturalHeight,
  1902. realLeft,
  1903. realTop,
  1904. realWidth,
  1905. realHeight);
  1906. context.restore();
  1907. });
  1908. };
  1909. var drawArcBorder = function drawArcBorder(context, imgData) {var
  1910. border = imgData.border;var _getArcCenterPosition2 =
  1911. getArcCenterPosition(imgData),coordX = _getArcCenterPosition2.coordX,coordY = _getArcCenterPosition2.coordY;var _getBorderAttributes2 =
  1912. getBorderAttributes(border),borderWidth = _getBorderAttributes2.borderWidth,borderColor = _getBorderAttributes2.borderColor;
  1913. var arcRadius = getArcRadius(imgData, borderWidth);
  1914. context.save();
  1915. context.beginPath();
  1916. context.setLineWidth(borderWidth);
  1917. context.setStrokeStyle(borderColor);
  1918. context.arc(coordX, coordY, arcRadius, 0, 2 * Math.PI);
  1919. context.stroke();
  1920. context.restore();
  1921. };
  1922. var drawRectBorder = function drawRectBorder(context, imgData) {var
  1923. border = imgData.border;var
  1924. left = imgData.left,top = imgData.top,width = imgData.width,height = imgData.height;var _getBorderAttributes3 =
  1925. getBorderAttributes(border),borderWidth = _getBorderAttributes3.borderWidth,borderColor = _getBorderAttributes3.borderColor;
  1926. var correctedBorderWidth = borderWidth + 1; // draw may cause empty 0.5 space
  1927. context.save();
  1928. context.beginPath();
  1929. context.setLineWidth(correctedBorderWidth);
  1930. context.setStrokeStyle(borderColor);
  1931. context.rect(
  1932. left + borderWidth / 2,
  1933. top + borderWidth / 2,
  1934. width - borderWidth,
  1935. height - borderWidth);
  1936. context.stroke();
  1937. context.restore();
  1938. };
  1939. // image, enable border-radius: 50%, border, bgColor
  1940. var drawImage = function drawImage(context, imgData) {var
  1941. border = imgData.border,borderRadius = imgData['border-radius'];
  1942. var drawImagePromise;
  1943. if (hasBorderRadius(borderRadius)) {
  1944. drawImagePromise = drawArcImage(context, imgData);
  1945. } else {
  1946. drawImagePromise = drawRectImage(context, imgData);
  1947. }
  1948. return drawImagePromise.then(function () {
  1949. if (hasBorder(border)) {
  1950. if (hasBorderRadius(borderRadius)) {
  1951. return drawArcBorder(context, imgData);
  1952. } else {
  1953. return drawRectBorder(context, imgData);
  1954. }
  1955. }
  1956. return Promise.resolve();
  1957. });
  1958. };
  1959. // e.g. 10%, 4px
  1960. var getBorderRadius = function getBorderRadius(imgData) {var
  1961. width = imgData.width,height = imgData.height,borderRadiusAttr = imgData['border-radius'];
  1962. var borderRadius = parseInt(borderRadiusAttr, 10);
  1963. if (borderRadiusAttr.indexOf('%') !== -1) {
  1964. var borderRadiusX = parseInt(borderRadius / 100 * width, 10);
  1965. var borderRadiusY = parseInt(borderRadius / 100 * height, 10);
  1966. return {
  1967. isCircle: borderRadiusX === borderRadiusY,
  1968. borderRadius: borderRadiusX,
  1969. borderRadiusX: borderRadiusX,
  1970. borderRadiusY: borderRadiusY };
  1971. } else {
  1972. return {
  1973. isCircle: true,
  1974. borderRadius: borderRadius };
  1975. }
  1976. };
  1977. var drawViewArcBorder = function drawViewArcBorder(context, imgData) {var
  1978. width = imgData.width,height = imgData.height,left = imgData.left,top = imgData.top,backgroundColor = imgData.backgroundColor,border = imgData.border;var _getBorderRadius =
  1979. getBorderRadius(imgData),borderRadius = _getBorderRadius.borderRadius;var _getBorderAttributes4 =
  1980. getBorderAttributes(border),borderWidth = _getBorderAttributes4.borderWidth,borderColor = _getBorderAttributes4.borderColor;
  1981. // console.log('🐞-imgData', imgData)
  1982. context.beginPath();
  1983. context.moveTo(left + borderRadius, top);
  1984. context.lineTo(left + width - borderRadius, top);
  1985. context.arcTo(
  1986. left + width,
  1987. top,
  1988. left + width,
  1989. top + borderRadius,
  1990. borderRadius);
  1991. context.lineTo(left + width, top + height - borderRadius);
  1992. context.arcTo(
  1993. left + width,
  1994. top + height,
  1995. left + width - borderRadius,
  1996. top + height,
  1997. borderRadius);
  1998. context.lineTo(left + borderRadius, top + height);
  1999. context.arcTo(
  2000. left,
  2001. top + height,
  2002. left,
  2003. top + height - borderRadius,
  2004. borderRadius);
  2005. context.lineTo(left, top + borderRadius);
  2006. context.arcTo(left, top, left + borderRadius, top, borderRadius);
  2007. context.closePath();
  2008. if (backgroundColor) {
  2009. context.setFillStyle(backgroundColor);
  2010. context.fill();
  2011. }
  2012. if (borderColor && borderWidth) {
  2013. context.setLineWidth(borderWidth);
  2014. context.setStrokeStyle(borderColor);
  2015. context.stroke();
  2016. }
  2017. };
  2018. var drawViewBezierBorder = function drawViewBezierBorder(context, imgData) {var
  2019. width = imgData.width,height = imgData.height,left = imgData.left,top = imgData.top,backgroundColor = imgData.backgroundColor,border = imgData.border;var _getBorderAttributes5 =
  2020. getBorderAttributes(border),borderWidth = _getBorderAttributes5.borderWidth,borderColor = _getBorderAttributes5.borderColor;var _getBorderRadius2 =
  2021. getBorderRadius(imgData),borderRadiusX = _getBorderRadius2.borderRadiusX,borderRadiusY = _getBorderRadius2.borderRadiusY;
  2022. context.beginPath();
  2023. context.moveTo(left + borderRadiusX, top);
  2024. context.lineTo(left + width - borderRadiusX, top);
  2025. context.quadraticCurveTo(left + width, top, left + width, top + borderRadiusY);
  2026. context.lineTo(left + width, top + height - borderRadiusY);
  2027. context.quadraticCurveTo(
  2028. left + width,
  2029. top + height,
  2030. left + width - borderRadiusX,
  2031. top + height);
  2032. context.lineTo(left + borderRadiusX, top + height);
  2033. context.quadraticCurveTo(
  2034. left,
  2035. top + height,
  2036. left,
  2037. top + height - borderRadiusY);
  2038. context.lineTo(left, top + borderRadiusY);
  2039. context.quadraticCurveTo(left, top, left + borderRadiusX, top);
  2040. context.closePath();
  2041. if (backgroundColor) {
  2042. context.setFillStyle(backgroundColor);
  2043. context.fill();
  2044. }
  2045. if (borderColor && borderWidth) {
  2046. context.setLineWidth(borderWidth);
  2047. context.setStrokeStyle(borderColor);
  2048. context.stroke();
  2049. }
  2050. };
  2051. // enable border, border-radius, bgColor, position
  2052. var drawView = function drawView(context, imgData) {var _getBorderRadius3 =
  2053. getBorderRadius(imgData),isCircle = _getBorderRadius3.isCircle;
  2054. if (isCircle) {
  2055. drawViewArcBorder(context, imgData);
  2056. } else {
  2057. drawViewBezierBorder(context, imgData);
  2058. }
  2059. };
  2060. var isTextElement = function isTextElement(item) {var
  2061. text = item.dataset.text,type = item.type;
  2062. return Boolean(text) || type === 'text';
  2063. };
  2064. var isImageElement = function isImageElement(item) {var
  2065. src = item.src,type = item.type;
  2066. return Boolean(src) || type === 'image';
  2067. };
  2068. var isViewElement = function isViewElement(item) {var
  2069. type = item.type;
  2070. return type === 'view';
  2071. };
  2072. var formatElementData = function formatElementData(elements) {return (
  2073. elements.map(function (element) {
  2074. if (isTextElement(element)) {
  2075. element.type = 'text';
  2076. element.rank = DEFAULT_RANK.text;
  2077. } else if (isImageElement(element)) {
  2078. element.type = 'image';
  2079. element.rank = DEFAULT_RANK.image;
  2080. } else {
  2081. element.type = 'view';
  2082. element.rank = DEFAULT_RANK.view;
  2083. }
  2084. return element;
  2085. }));};
  2086. // todo: use z-index as order to draw??
  2087. var getSortedElementsData = function getSortedElementsData(elements) {return (
  2088. elements.sort(function (a, b) {
  2089. if (a.rank < b.rank) {
  2090. return -1;
  2091. } else if (a.rank > b.rank) {
  2092. return 1;
  2093. }
  2094. return 0;
  2095. }));};
  2096. var drawElements = function drawElements(context, storeItems) {
  2097. var itemPromise = [];
  2098. storeItems.forEach(function (item) {
  2099. if (isTextElement(item)) {
  2100. var text = drawText(context, item);
  2101. itemPromise.push(text);
  2102. } else if (isImageElement(item)) {
  2103. var image = drawImage(context, item);
  2104. itemPromise.push(image);
  2105. } else {
  2106. var view = drawView(context, item);
  2107. itemPromise.push(view);
  2108. }
  2109. });
  2110. return itemPromise;
  2111. };
  2112. // storeObject: { 0: [...], 1: [...] }
  2113. // chain call promise based on Object key
  2114. var drawElementBaseOnIndex = function drawElementBaseOnIndex(context, storeObject) {var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;var drawPromise = arguments.length > 3 ? arguments[3] : undefined;
  2115. if (typeof drawPromise === 'undefined') {
  2116. drawPromise = Promise.resolve();
  2117. }
  2118. var objectKey = key; // note: key is changing when execute promise then
  2119. var chainPromise = drawPromise.then(function () {
  2120. var nextPromise = storeObject[objectKey] ?
  2121. Promise.all(drawElements(context, storeObject[objectKey])) :
  2122. Promise.resolve();
  2123. return nextPromise;
  2124. });
  2125. if (key >= Object.keys(storeObject).length) {
  2126. return chainPromise;
  2127. } else {
  2128. return drawElementBaseOnIndex(context, storeObject, key + 1, chainPromise);
  2129. }
  2130. };
  2131. var drawCanvas = function drawCanvas(canvasId, wrapperData, innerData) {
  2132. var context = wx.createCanvasContext(canvasId);
  2133. context.setTextBaseline('top');
  2134. // todo: use this after weixin fix stupid clip can't work bug in fillRect
  2135. // for now, just set canvas background as a compromise
  2136. drawWrapper(context, wrapperData[0]);
  2137. var storeObject = {};
  2138. var sortedElementData = getSortedElementsData(formatElementData(innerData)); // fake z-index
  2139. sortedElementData.forEach(function (item) {
  2140. if (!storeObject[item.rank]) {
  2141. // initialize
  2142. storeObject[item.rank] = [];
  2143. }
  2144. if (isTextElement(item) || isImageElement(item) || isViewElement(item)) {
  2145. storeObject[item.rank].push(item);
  2146. }
  2147. });
  2148. // note: draw is async
  2149. return drawElementBaseOnIndex(context, storeObject).then(
  2150. function () {return (
  2151. new Promise(function (resolve, reject) {
  2152. context.draw(true, function () {
  2153. resolve();
  2154. });
  2155. }));});
  2156. };
  2157. var wxSelectorQuery = function wxSelectorQuery(element) {return (
  2158. new Promise(function (resolve, reject) {
  2159. try {
  2160. wx.
  2161. createSelectorQuery().
  2162. selectAll(element).
  2163. fields(
  2164. {
  2165. dataset: true,
  2166. size: true,
  2167. rect: true,
  2168. properties: PROPERTIES,
  2169. computedStyle: COMPUTED_STYLE },
  2170. function (res) {
  2171. resolve(res);
  2172. }).
  2173. exec();
  2174. } catch (error) {
  2175. reject(error);
  2176. }
  2177. }));};
  2178. var wxml2canvas = function wxml2canvas(wrapperId, elementsClass, canvasId) {
  2179. var getWrapperElement = wxSelectorQuery(wrapperId);
  2180. var getInnerElements = wxSelectorQuery(elementsClass);
  2181. return Promise.all([getWrapperElement, getInnerElements]).then(function (data) {
  2182. return drawCanvas(canvasId, data[0], data[1]);
  2183. });
  2184. };
  2185. // export default wxml2canvas
  2186. module.exports = wxml2canvas;
  2187. /***/ }),
  2188. /***/ 12:
  2189. /*!***********************************************!*\
  2190. !*** D:/wwwroot/cqcarbonwxapp/store/index.js ***!
  2191. \***********************************************/
  2192. /*! no static exports found */
  2193. /***/ (function(module, exports, __webpack_require__) {
  2194. "use strict";
  2195. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 13));
  2196. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  2197. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 16));
  2198. var _index = _interopRequireDefault(__webpack_require__(/*! @/js_sdk/luch-request/luch-request/index.js */ 17));
  2199. var _md5Min = _interopRequireDefault(__webpack_require__(/*! @/js_sdk/js-md5/md5.min.js */ 30));
  2200. var _config = __webpack_require__(/*! @/config/config.js */ 11);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}var http = new _index.default();
  2201. _vue.default.use(_vuex.default);
  2202. // const userKey = md5("userInfo");
  2203. var userKey = "userInfo";
  2204. var hPageKey = (0, _md5Min.default)('historyPage');
  2205. // const sysTokenKey = md5('accessToken');
  2206. var sysTokenKey = 'accessToken';
  2207. var loginUrl = '/pages/login/loginType';var _default =
  2208. new _vuex.default.Store({
  2209. state: {
  2210. hasLogin: false,
  2211. userInfo: {
  2212. customerCompanyInfoForm: {} },
  2213. token: '',
  2214. cartListTmp: [],
  2215. hPage: '' },
  2216. mutations: {
  2217. addCart: function addCart(state, data) {
  2218. if (data) {
  2219. state.cartListTmp = data;
  2220. console.log("vuex add:", state.cartListTmp);
  2221. }
  2222. },
  2223. clearCart: function clearCart(state) {
  2224. state.cartListTmp = [];
  2225. console.log(state.cartListTmp);
  2226. },
  2227. login: function login(state) {var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  2228. token = token instanceof Object ? token.token : token;
  2229. state.token = token || uni.getStorageSync(sysTokenKey).accessToken || '';
  2230. state.hasLogin = Boolean(state.token);
  2231. //保存token
  2232. uni.setStorage({
  2233. key: sysTokenKey,
  2234. data: {
  2235. accessToken: state.token } });
  2236. },
  2237. /**
  2238. * 退出登录,传入false只更新缓存不跳转
  2239. */
  2240. logout: function logout(state) {var v = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  2241. state.hasLogin = false;
  2242. state.userInfo = {};
  2243. state.token = '';
  2244. uni.removeStorage({
  2245. key: userKey });
  2246. uni.removeStorage({
  2247. key: sysTokenKey });
  2248. //跳到登录页
  2249. // v && $api.goto(loginUrl);
  2250. },
  2251. // historyPage(state, pUrl = '') {
  2252. // if($api.alterUrl('/',pUrl) != loginUrl){
  2253. // state.hPage = pUrl || uni.getStorageSync(hPageKey).url;
  2254. // //记录历史页
  2255. // uni.setStorage({
  2256. // key: hPageKey,
  2257. // data: {
  2258. // url: state.hPage
  2259. // }
  2260. // });
  2261. // }
  2262. // },
  2263. upInfo: function upInfo(state) {var _arguments = arguments;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var provider, token, thetoken, infoObj, then;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:provider = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : {};
  2264. token = uni.getStorageSync(sysTokenKey);
  2265. thetoken = 'Bearer ' + token.accessToken;
  2266. //用户信息结构
  2267. infoObj = {
  2268. "page": 0,
  2269. "pageNo": 0,
  2270. "pageNum": 1,
  2271. "pageSize": 10,
  2272. "pageStart": null,
  2273. "pageEnd": null,
  2274. "limit": 0,
  2275. "accessToken": null,
  2276. "fkProductGuid": null,
  2277. "fkOrgGuid": null,
  2278. "state": null,
  2279. "createUser": "",
  2280. "createTime": "",
  2281. "modifiedUser": "",
  2282. "modifiedTime": "",
  2283. "orgBrevity": null,
  2284. "ico": null,
  2285. "params": null,
  2286. "codeUrlPrefix": null,
  2287. "loginOrgGuid": null,
  2288. "msgCode": null,
  2289. "storeName": null,
  2290. "guid": "",
  2291. "account": "",
  2292. "passwd": "",
  2293. "customerType": null,
  2294. "customerName": "",
  2295. "nickName": "",
  2296. "pid": null,
  2297. "phone": null,
  2298. "sex": null,
  2299. "score": null,
  2300. "wxId": "",
  2301. "unionId": null,
  2302. "headImage": "",
  2303. "isCompany": 0,
  2304. "isValidate": 0,
  2305. "isEnable": 1,
  2306. "queryStr": null,
  2307. "carbonAmount": null,
  2308. "goodsNum": null,
  2309. "farmerNum": null,
  2310. "farmerPersonNum": null,
  2311. "goodsList": null,
  2312. "loginType": null,
  2313. "customerCompanyInfoForm": null,
  2314. "channelType": null };
  2315. then = function then(res) {
  2316. if (res.data.code == 0) {
  2317. var data = res.data.retBody instanceof Object ? res.data.retBody : infoObj;
  2318. //处理头像连接
  2319. // data.headImage = $api.alterUrl($api.href, data.headImage || "");
  2320. state.userInfo = data;
  2321. uni.setStorage({ //缓存用户登陆状态
  2322. key: userKey,
  2323. data: data });
  2324. }
  2325. };
  2326. //读取本地缓存信息进行赋值
  2327. then({
  2328. code: 0,
  2329. data: Object.assign(uni.getStorageSync(userKey), provider) });
  2330. //在线更新取得用户信息
  2331. _context.t0 = then;_context.next = 9;return (
  2332. http.get(_config.config.apiBaseurl + '/carbon-h5/wap/customer/getCustomerByToken', { header: { Authorization: thetoken } }).then(function (res) {
  2333. // console.log('getCustomerByToken', res.data);
  2334. if (res.data.retHead.errCode == 0) {res.data.code = 0;}
  2335. // 处理非微信头像
  2336. var headImage = res.data.retBody.headImage;
  2337. if (headImage) {
  2338. //判断是否符合http://符合返回真不符合返回假
  2339. var http = /^http:\/\/.*/i.test(headImage);
  2340. //判断是否符合https://符合返回真不符合返回假
  2341. var https = /^https:\/\/.*/i.test(headImage);
  2342. //如果两个都为假,我们就为客户添加http://
  2343. if (!http && !https) {
  2344. headImage = _config.config.onlineImg + headImage;
  2345. }
  2346. };
  2347. res.data.retBody.headImage = headImage;
  2348. // 处理非微信头像
  2349. return res;
  2350. }).catch(function (err) {
  2351. // console.log('err', err)
  2352. }));case 9:_context.t1 = _context.sent;(0, _context.t0)(_context.t1);case 11:case "end":return _context.stop();}}}, _callee);}))();
  2353. } } });exports.default = _default;
  2354. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2355. /***/ }),
  2356. /***/ 13:
  2357. /*!**********************************************************!*\
  2358. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  2359. \**********************************************************/
  2360. /*! no static exports found */
  2361. /***/ (function(module, exports, __webpack_require__) {
  2362. module.exports = __webpack_require__(/*! regenerator-runtime */ 14);
  2363. /***/ }),
  2364. /***/ 14:
  2365. /*!************************************************************!*\
  2366. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  2367. \************************************************************/
  2368. /*! no static exports found */
  2369. /***/ (function(module, exports, __webpack_require__) {
  2370. /**
  2371. * Copyright (c) 2014-present, Facebook, Inc.
  2372. *
  2373. * This source code is licensed under the MIT license found in the
  2374. * LICENSE file in the root directory of this source tree.
  2375. */
  2376. // This method of obtaining a reference to the global object needs to be
  2377. // kept identical to the way it is obtained in runtime.js
  2378. var g = (function() {
  2379. return this || (typeof self === "object" && self);
  2380. })() || Function("return this")();
  2381. // Use `getOwnPropertyNames` because not all browsers support calling
  2382. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  2383. var hadRuntime = g.regeneratorRuntime &&
  2384. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  2385. // Save the old regeneratorRuntime in case it needs to be restored later.
  2386. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  2387. // Force reevalutation of runtime.js.
  2388. g.regeneratorRuntime = undefined;
  2389. module.exports = __webpack_require__(/*! ./runtime */ 15);
  2390. if (hadRuntime) {
  2391. // Restore the original runtime.
  2392. g.regeneratorRuntime = oldRuntime;
  2393. } else {
  2394. // Remove the global property added by runtime.js.
  2395. try {
  2396. delete g.regeneratorRuntime;
  2397. } catch(e) {
  2398. g.regeneratorRuntime = undefined;
  2399. }
  2400. }
  2401. /***/ }),
  2402. /***/ 15:
  2403. /*!*****************************************************!*\
  2404. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  2405. \*****************************************************/
  2406. /*! no static exports found */
  2407. /***/ (function(module, exports) {
  2408. /**
  2409. * Copyright (c) 2014-present, Facebook, Inc.
  2410. *
  2411. * This source code is licensed under the MIT license found in the
  2412. * LICENSE file in the root directory of this source tree.
  2413. */
  2414. !(function(global) {
  2415. "use strict";
  2416. var Op = Object.prototype;
  2417. var hasOwn = Op.hasOwnProperty;
  2418. var undefined; // More compressible than void 0.
  2419. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  2420. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  2421. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  2422. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  2423. var inModule = typeof module === "object";
  2424. var runtime = global.regeneratorRuntime;
  2425. if (runtime) {
  2426. if (inModule) {
  2427. // If regeneratorRuntime is defined globally and we're in a module,
  2428. // make the exports object identical to regeneratorRuntime.
  2429. module.exports = runtime;
  2430. }
  2431. // Don't bother evaluating the rest of this file if the runtime was
  2432. // already defined globally.
  2433. return;
  2434. }
  2435. // Define the runtime globally (as expected by generated code) as either
  2436. // module.exports (if we're in a module) or a new, empty object.
  2437. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  2438. function wrap(innerFn, outerFn, self, tryLocsList) {
  2439. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  2440. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  2441. var generator = Object.create(protoGenerator.prototype);
  2442. var context = new Context(tryLocsList || []);
  2443. // The ._invoke method unifies the implementations of the .next,
  2444. // .throw, and .return methods.
  2445. generator._invoke = makeInvokeMethod(innerFn, self, context);
  2446. return generator;
  2447. }
  2448. runtime.wrap = wrap;
  2449. // Try/catch helper to minimize deoptimizations. Returns a completion
  2450. // record like context.tryEntries[i].completion. This interface could
  2451. // have been (and was previously) designed to take a closure to be
  2452. // invoked without arguments, but in all the cases we care about we
  2453. // already have an existing method we want to call, so there's no need
  2454. // to create a new function object. We can even get away with assuming
  2455. // the method takes exactly one argument, since that happens to be true
  2456. // in every case, so we don't have to touch the arguments object. The
  2457. // only additional allocation required is the completion record, which
  2458. // has a stable shape and so hopefully should be cheap to allocate.
  2459. function tryCatch(fn, obj, arg) {
  2460. try {
  2461. return { type: "normal", arg: fn.call(obj, arg) };
  2462. } catch (err) {
  2463. return { type: "throw", arg: err };
  2464. }
  2465. }
  2466. var GenStateSuspendedStart = "suspendedStart";
  2467. var GenStateSuspendedYield = "suspendedYield";
  2468. var GenStateExecuting = "executing";
  2469. var GenStateCompleted = "completed";
  2470. // Returning this object from the innerFn has the same effect as
  2471. // breaking out of the dispatch switch statement.
  2472. var ContinueSentinel = {};
  2473. // Dummy constructor functions that we use as the .constructor and
  2474. // .constructor.prototype properties for functions that return Generator
  2475. // objects. For full spec compliance, you may wish to configure your
  2476. // minifier not to mangle the names of these two functions.
  2477. function Generator() {}
  2478. function GeneratorFunction() {}
  2479. function GeneratorFunctionPrototype() {}
  2480. // This is a polyfill for %IteratorPrototype% for environments that
  2481. // don't natively support it.
  2482. var IteratorPrototype = {};
  2483. IteratorPrototype[iteratorSymbol] = function () {
  2484. return this;
  2485. };
  2486. var getProto = Object.getPrototypeOf;
  2487. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  2488. if (NativeIteratorPrototype &&
  2489. NativeIteratorPrototype !== Op &&
  2490. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  2491. // This environment has a native %IteratorPrototype%; use it instead
  2492. // of the polyfill.
  2493. IteratorPrototype = NativeIteratorPrototype;
  2494. }
  2495. var Gp = GeneratorFunctionPrototype.prototype =
  2496. Generator.prototype = Object.create(IteratorPrototype);
  2497. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  2498. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  2499. GeneratorFunctionPrototype[toStringTagSymbol] =
  2500. GeneratorFunction.displayName = "GeneratorFunction";
  2501. // Helper for defining the .next, .throw, and .return methods of the
  2502. // Iterator interface in terms of a single ._invoke method.
  2503. function defineIteratorMethods(prototype) {
  2504. ["next", "throw", "return"].forEach(function(method) {
  2505. prototype[method] = function(arg) {
  2506. return this._invoke(method, arg);
  2507. };
  2508. });
  2509. }
  2510. runtime.isGeneratorFunction = function(genFun) {
  2511. var ctor = typeof genFun === "function" && genFun.constructor;
  2512. return ctor
  2513. ? ctor === GeneratorFunction ||
  2514. // For the native GeneratorFunction constructor, the best we can
  2515. // do is to check its .name property.
  2516. (ctor.displayName || ctor.name) === "GeneratorFunction"
  2517. : false;
  2518. };
  2519. runtime.mark = function(genFun) {
  2520. if (Object.setPrototypeOf) {
  2521. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  2522. } else {
  2523. genFun.__proto__ = GeneratorFunctionPrototype;
  2524. if (!(toStringTagSymbol in genFun)) {
  2525. genFun[toStringTagSymbol] = "GeneratorFunction";
  2526. }
  2527. }
  2528. genFun.prototype = Object.create(Gp);
  2529. return genFun;
  2530. };
  2531. // Within the body of any async function, `await x` is transformed to
  2532. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  2533. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  2534. // meant to be awaited.
  2535. runtime.awrap = function(arg) {
  2536. return { __await: arg };
  2537. };
  2538. function AsyncIterator(generator) {
  2539. function invoke(method, arg, resolve, reject) {
  2540. var record = tryCatch(generator[method], generator, arg);
  2541. if (record.type === "throw") {
  2542. reject(record.arg);
  2543. } else {
  2544. var result = record.arg;
  2545. var value = result.value;
  2546. if (value &&
  2547. typeof value === "object" &&
  2548. hasOwn.call(value, "__await")) {
  2549. return Promise.resolve(value.__await).then(function(value) {
  2550. invoke("next", value, resolve, reject);
  2551. }, function(err) {
  2552. invoke("throw", err, resolve, reject);
  2553. });
  2554. }
  2555. return Promise.resolve(value).then(function(unwrapped) {
  2556. // When a yielded Promise is resolved, its final value becomes
  2557. // the .value of the Promise<{value,done}> result for the
  2558. // current iteration.
  2559. result.value = unwrapped;
  2560. resolve(result);
  2561. }, function(error) {
  2562. // If a rejected Promise was yielded, throw the rejection back
  2563. // into the async generator function so it can be handled there.
  2564. return invoke("throw", error, resolve, reject);
  2565. });
  2566. }
  2567. }
  2568. var previousPromise;
  2569. function enqueue(method, arg) {
  2570. function callInvokeWithMethodAndArg() {
  2571. return new Promise(function(resolve, reject) {
  2572. invoke(method, arg, resolve, reject);
  2573. });
  2574. }
  2575. return previousPromise =
  2576. // If enqueue has been called before, then we want to wait until
  2577. // all previous Promises have been resolved before calling invoke,
  2578. // so that results are always delivered in the correct order. If
  2579. // enqueue has not been called before, then it is important to
  2580. // call invoke immediately, without waiting on a callback to fire,
  2581. // so that the async generator function has the opportunity to do
  2582. // any necessary setup in a predictable way. This predictability
  2583. // is why the Promise constructor synchronously invokes its
  2584. // executor callback, and why async functions synchronously
  2585. // execute code before the first await. Since we implement simple
  2586. // async functions in terms of async generators, it is especially
  2587. // important to get this right, even though it requires care.
  2588. previousPromise ? previousPromise.then(
  2589. callInvokeWithMethodAndArg,
  2590. // Avoid propagating failures to Promises returned by later
  2591. // invocations of the iterator.
  2592. callInvokeWithMethodAndArg
  2593. ) : callInvokeWithMethodAndArg();
  2594. }
  2595. // Define the unified helper method that is used to implement .next,
  2596. // .throw, and .return (see defineIteratorMethods).
  2597. this._invoke = enqueue;
  2598. }
  2599. defineIteratorMethods(AsyncIterator.prototype);
  2600. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  2601. return this;
  2602. };
  2603. runtime.AsyncIterator = AsyncIterator;
  2604. // Note that simple async functions are implemented on top of
  2605. // AsyncIterator objects; they just return a Promise for the value of
  2606. // the final result produced by the iterator.
  2607. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  2608. var iter = new AsyncIterator(
  2609. wrap(innerFn, outerFn, self, tryLocsList)
  2610. );
  2611. return runtime.isGeneratorFunction(outerFn)
  2612. ? iter // If outerFn is a generator, return the full iterator.
  2613. : iter.next().then(function(result) {
  2614. return result.done ? result.value : iter.next();
  2615. });
  2616. };
  2617. function makeInvokeMethod(innerFn, self, context) {
  2618. var state = GenStateSuspendedStart;
  2619. return function invoke(method, arg) {
  2620. if (state === GenStateExecuting) {
  2621. throw new Error("Generator is already running");
  2622. }
  2623. if (state === GenStateCompleted) {
  2624. if (method === "throw") {
  2625. throw arg;
  2626. }
  2627. // Be forgiving, per 25.3.3.3.3 of the spec:
  2628. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  2629. return doneResult();
  2630. }
  2631. context.method = method;
  2632. context.arg = arg;
  2633. while (true) {
  2634. var delegate = context.delegate;
  2635. if (delegate) {
  2636. var delegateResult = maybeInvokeDelegate(delegate, context);
  2637. if (delegateResult) {
  2638. if (delegateResult === ContinueSentinel) continue;
  2639. return delegateResult;
  2640. }
  2641. }
  2642. if (context.method === "next") {
  2643. // Setting context._sent for legacy support of Babel's
  2644. // function.sent implementation.
  2645. context.sent = context._sent = context.arg;
  2646. } else if (context.method === "throw") {
  2647. if (state === GenStateSuspendedStart) {
  2648. state = GenStateCompleted;
  2649. throw context.arg;
  2650. }
  2651. context.dispatchException(context.arg);
  2652. } else if (context.method === "return") {
  2653. context.abrupt("return", context.arg);
  2654. }
  2655. state = GenStateExecuting;
  2656. var record = tryCatch(innerFn, self, context);
  2657. if (record.type === "normal") {
  2658. // If an exception is thrown from innerFn, we leave state ===
  2659. // GenStateExecuting and loop back for another invocation.
  2660. state = context.done
  2661. ? GenStateCompleted
  2662. : GenStateSuspendedYield;
  2663. if (record.arg === ContinueSentinel) {
  2664. continue;
  2665. }
  2666. return {
  2667. value: record.arg,
  2668. done: context.done
  2669. };
  2670. } else if (record.type === "throw") {
  2671. state = GenStateCompleted;
  2672. // Dispatch the exception by looping back around to the
  2673. // context.dispatchException(context.arg) call above.
  2674. context.method = "throw";
  2675. context.arg = record.arg;
  2676. }
  2677. }
  2678. };
  2679. }
  2680. // Call delegate.iterator[context.method](context.arg) and handle the
  2681. // result, either by returning a { value, done } result from the
  2682. // delegate iterator, or by modifying context.method and context.arg,
  2683. // setting context.delegate to null, and returning the ContinueSentinel.
  2684. function maybeInvokeDelegate(delegate, context) {
  2685. var method = delegate.iterator[context.method];
  2686. if (method === undefined) {
  2687. // A .throw or .return when the delegate iterator has no .throw
  2688. // method always terminates the yield* loop.
  2689. context.delegate = null;
  2690. if (context.method === "throw") {
  2691. if (delegate.iterator.return) {
  2692. // If the delegate iterator has a return method, give it a
  2693. // chance to clean up.
  2694. context.method = "return";
  2695. context.arg = undefined;
  2696. maybeInvokeDelegate(delegate, context);
  2697. if (context.method === "throw") {
  2698. // If maybeInvokeDelegate(context) changed context.method from
  2699. // "return" to "throw", let that override the TypeError below.
  2700. return ContinueSentinel;
  2701. }
  2702. }
  2703. context.method = "throw";
  2704. context.arg = new TypeError(
  2705. "The iterator does not provide a 'throw' method");
  2706. }
  2707. return ContinueSentinel;
  2708. }
  2709. var record = tryCatch(method, delegate.iterator, context.arg);
  2710. if (record.type === "throw") {
  2711. context.method = "throw";
  2712. context.arg = record.arg;
  2713. context.delegate = null;
  2714. return ContinueSentinel;
  2715. }
  2716. var info = record.arg;
  2717. if (! info) {
  2718. context.method = "throw";
  2719. context.arg = new TypeError("iterator result is not an object");
  2720. context.delegate = null;
  2721. return ContinueSentinel;
  2722. }
  2723. if (info.done) {
  2724. // Assign the result of the finished delegate to the temporary
  2725. // variable specified by delegate.resultName (see delegateYield).
  2726. context[delegate.resultName] = info.value;
  2727. // Resume execution at the desired location (see delegateYield).
  2728. context.next = delegate.nextLoc;
  2729. // If context.method was "throw" but the delegate handled the
  2730. // exception, let the outer generator proceed normally. If
  2731. // context.method was "next", forget context.arg since it has been
  2732. // "consumed" by the delegate iterator. If context.method was
  2733. // "return", allow the original .return call to continue in the
  2734. // outer generator.
  2735. if (context.method !== "return") {
  2736. context.method = "next";
  2737. context.arg = undefined;
  2738. }
  2739. } else {
  2740. // Re-yield the result returned by the delegate method.
  2741. return info;
  2742. }
  2743. // The delegate iterator is finished, so forget it and continue with
  2744. // the outer generator.
  2745. context.delegate = null;
  2746. return ContinueSentinel;
  2747. }
  2748. // Define Generator.prototype.{next,throw,return} in terms of the
  2749. // unified ._invoke helper method.
  2750. defineIteratorMethods(Gp);
  2751. Gp[toStringTagSymbol] = "Generator";
  2752. // A Generator should always return itself as the iterator object when the
  2753. // @@iterator function is called on it. Some browsers' implementations of the
  2754. // iterator prototype chain incorrectly implement this, causing the Generator
  2755. // object to not be returned from this call. This ensures that doesn't happen.
  2756. // See https://github.com/facebook/regenerator/issues/274 for more details.
  2757. Gp[iteratorSymbol] = function() {
  2758. return this;
  2759. };
  2760. Gp.toString = function() {
  2761. return "[object Generator]";
  2762. };
  2763. function pushTryEntry(locs) {
  2764. var entry = { tryLoc: locs[0] };
  2765. if (1 in locs) {
  2766. entry.catchLoc = locs[1];
  2767. }
  2768. if (2 in locs) {
  2769. entry.finallyLoc = locs[2];
  2770. entry.afterLoc = locs[3];
  2771. }
  2772. this.tryEntries.push(entry);
  2773. }
  2774. function resetTryEntry(entry) {
  2775. var record = entry.completion || {};
  2776. record.type = "normal";
  2777. delete record.arg;
  2778. entry.completion = record;
  2779. }
  2780. function Context(tryLocsList) {
  2781. // The root entry object (effectively a try statement without a catch
  2782. // or a finally block) gives us a place to store values thrown from
  2783. // locations where there is no enclosing try statement.
  2784. this.tryEntries = [{ tryLoc: "root" }];
  2785. tryLocsList.forEach(pushTryEntry, this);
  2786. this.reset(true);
  2787. }
  2788. runtime.keys = function(object) {
  2789. var keys = [];
  2790. for (var key in object) {
  2791. keys.push(key);
  2792. }
  2793. keys.reverse();
  2794. // Rather than returning an object with a next method, we keep
  2795. // things simple and return the next function itself.
  2796. return function next() {
  2797. while (keys.length) {
  2798. var key = keys.pop();
  2799. if (key in object) {
  2800. next.value = key;
  2801. next.done = false;
  2802. return next;
  2803. }
  2804. }
  2805. // To avoid creating an additional object, we just hang the .value
  2806. // and .done properties off the next function object itself. This
  2807. // also ensures that the minifier will not anonymize the function.
  2808. next.done = true;
  2809. return next;
  2810. };
  2811. };
  2812. function values(iterable) {
  2813. if (iterable) {
  2814. var iteratorMethod = iterable[iteratorSymbol];
  2815. if (iteratorMethod) {
  2816. return iteratorMethod.call(iterable);
  2817. }
  2818. if (typeof iterable.next === "function") {
  2819. return iterable;
  2820. }
  2821. if (!isNaN(iterable.length)) {
  2822. var i = -1, next = function next() {
  2823. while (++i < iterable.length) {
  2824. if (hasOwn.call(iterable, i)) {
  2825. next.value = iterable[i];
  2826. next.done = false;
  2827. return next;
  2828. }
  2829. }
  2830. next.value = undefined;
  2831. next.done = true;
  2832. return next;
  2833. };
  2834. return next.next = next;
  2835. }
  2836. }
  2837. // Return an iterator with no values.
  2838. return { next: doneResult };
  2839. }
  2840. runtime.values = values;
  2841. function doneResult() {
  2842. return { value: undefined, done: true };
  2843. }
  2844. Context.prototype = {
  2845. constructor: Context,
  2846. reset: function(skipTempReset) {
  2847. this.prev = 0;
  2848. this.next = 0;
  2849. // Resetting context._sent for legacy support of Babel's
  2850. // function.sent implementation.
  2851. this.sent = this._sent = undefined;
  2852. this.done = false;
  2853. this.delegate = null;
  2854. this.method = "next";
  2855. this.arg = undefined;
  2856. this.tryEntries.forEach(resetTryEntry);
  2857. if (!skipTempReset) {
  2858. for (var name in this) {
  2859. // Not sure about the optimal order of these conditions:
  2860. if (name.charAt(0) === "t" &&
  2861. hasOwn.call(this, name) &&
  2862. !isNaN(+name.slice(1))) {
  2863. this[name] = undefined;
  2864. }
  2865. }
  2866. }
  2867. },
  2868. stop: function() {
  2869. this.done = true;
  2870. var rootEntry = this.tryEntries[0];
  2871. var rootRecord = rootEntry.completion;
  2872. if (rootRecord.type === "throw") {
  2873. throw rootRecord.arg;
  2874. }
  2875. return this.rval;
  2876. },
  2877. dispatchException: function(exception) {
  2878. if (this.done) {
  2879. throw exception;
  2880. }
  2881. var context = this;
  2882. function handle(loc, caught) {
  2883. record.type = "throw";
  2884. record.arg = exception;
  2885. context.next = loc;
  2886. if (caught) {
  2887. // If the dispatched exception was caught by a catch block,
  2888. // then let that catch block handle the exception normally.
  2889. context.method = "next";
  2890. context.arg = undefined;
  2891. }
  2892. return !! caught;
  2893. }
  2894. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2895. var entry = this.tryEntries[i];
  2896. var record = entry.completion;
  2897. if (entry.tryLoc === "root") {
  2898. // Exception thrown outside of any try block that could handle
  2899. // it, so set the completion value of the entire function to
  2900. // throw the exception.
  2901. return handle("end");
  2902. }
  2903. if (entry.tryLoc <= this.prev) {
  2904. var hasCatch = hasOwn.call(entry, "catchLoc");
  2905. var hasFinally = hasOwn.call(entry, "finallyLoc");
  2906. if (hasCatch && hasFinally) {
  2907. if (this.prev < entry.catchLoc) {
  2908. return handle(entry.catchLoc, true);
  2909. } else if (this.prev < entry.finallyLoc) {
  2910. return handle(entry.finallyLoc);
  2911. }
  2912. } else if (hasCatch) {
  2913. if (this.prev < entry.catchLoc) {
  2914. return handle(entry.catchLoc, true);
  2915. }
  2916. } else if (hasFinally) {
  2917. if (this.prev < entry.finallyLoc) {
  2918. return handle(entry.finallyLoc);
  2919. }
  2920. } else {
  2921. throw new Error("try statement without catch or finally");
  2922. }
  2923. }
  2924. }
  2925. },
  2926. abrupt: function(type, arg) {
  2927. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2928. var entry = this.tryEntries[i];
  2929. if (entry.tryLoc <= this.prev &&
  2930. hasOwn.call(entry, "finallyLoc") &&
  2931. this.prev < entry.finallyLoc) {
  2932. var finallyEntry = entry;
  2933. break;
  2934. }
  2935. }
  2936. if (finallyEntry &&
  2937. (type === "break" ||
  2938. type === "continue") &&
  2939. finallyEntry.tryLoc <= arg &&
  2940. arg <= finallyEntry.finallyLoc) {
  2941. // Ignore the finally entry if control is not jumping to a
  2942. // location outside the try/catch block.
  2943. finallyEntry = null;
  2944. }
  2945. var record = finallyEntry ? finallyEntry.completion : {};
  2946. record.type = type;
  2947. record.arg = arg;
  2948. if (finallyEntry) {
  2949. this.method = "next";
  2950. this.next = finallyEntry.finallyLoc;
  2951. return ContinueSentinel;
  2952. }
  2953. return this.complete(record);
  2954. },
  2955. complete: function(record, afterLoc) {
  2956. if (record.type === "throw") {
  2957. throw record.arg;
  2958. }
  2959. if (record.type === "break" ||
  2960. record.type === "continue") {
  2961. this.next = record.arg;
  2962. } else if (record.type === "return") {
  2963. this.rval = this.arg = record.arg;
  2964. this.method = "return";
  2965. this.next = "end";
  2966. } else if (record.type === "normal" && afterLoc) {
  2967. this.next = afterLoc;
  2968. }
  2969. return ContinueSentinel;
  2970. },
  2971. finish: function(finallyLoc) {
  2972. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2973. var entry = this.tryEntries[i];
  2974. if (entry.finallyLoc === finallyLoc) {
  2975. this.complete(entry.completion, entry.afterLoc);
  2976. resetTryEntry(entry);
  2977. return ContinueSentinel;
  2978. }
  2979. }
  2980. },
  2981. "catch": function(tryLoc) {
  2982. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  2983. var entry = this.tryEntries[i];
  2984. if (entry.tryLoc === tryLoc) {
  2985. var record = entry.completion;
  2986. if (record.type === "throw") {
  2987. var thrown = record.arg;
  2988. resetTryEntry(entry);
  2989. }
  2990. return thrown;
  2991. }
  2992. }
  2993. // The context.catch method must only be called with a location
  2994. // argument that corresponds to a known catch block.
  2995. throw new Error("illegal catch attempt");
  2996. },
  2997. delegateYield: function(iterable, resultName, nextLoc) {
  2998. this.delegate = {
  2999. iterator: values(iterable),
  3000. resultName: resultName,
  3001. nextLoc: nextLoc
  3002. };
  3003. if (this.method === "next") {
  3004. // Deliberately forget the last sent value so that we don't
  3005. // accidentally pass it on to the delegate.
  3006. this.arg = undefined;
  3007. }
  3008. return ContinueSentinel;
  3009. }
  3010. };
  3011. })(
  3012. // In sloppy mode, unbound `this` refers to the global object, fallback to
  3013. // Function constructor if we're in global strict mode. That is sadly a form
  3014. // of indirect eval which violates Content Security Policy.
  3015. (function() {
  3016. return this || (typeof self === "object" && self);
  3017. })() || Function("return this")()
  3018. );
  3019. /***/ }),
  3020. /***/ 16:
  3021. /*!********************************************!*\
  3022. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  3023. \********************************************/
  3024. /*! exports provided: default, Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState */
  3025. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3026. "use strict";
  3027. __webpack_require__.r(__webpack_exports__);
  3028. /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  3029. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  3030. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  3031. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  3032. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  3033. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  3034. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  3035. /*!
  3036. * vuex v3.4.0
  3037. * (c) 2020 Evan You
  3038. * @license MIT
  3039. */
  3040. function applyMixin (Vue) {
  3041. var version = Number(Vue.version.split('.')[0]);
  3042. if (version >= 2) {
  3043. Vue.mixin({ beforeCreate: vuexInit });
  3044. } else {
  3045. // override init and inject vuex init procedure
  3046. // for 1.x backwards compatibility.
  3047. var _init = Vue.prototype._init;
  3048. Vue.prototype._init = function (options) {
  3049. if ( options === void 0 ) options = {};
  3050. options.init = options.init
  3051. ? [vuexInit].concat(options.init)
  3052. : vuexInit;
  3053. _init.call(this, options);
  3054. };
  3055. }
  3056. /**
  3057. * Vuex init hook, injected into each instances init hooks list.
  3058. */
  3059. function vuexInit () {
  3060. var options = this.$options;
  3061. // store injection
  3062. if (options.store) {
  3063. this.$store = typeof options.store === 'function'
  3064. ? options.store()
  3065. : options.store;
  3066. } else if (options.parent && options.parent.$store) {
  3067. this.$store = options.parent.$store;
  3068. }
  3069. }
  3070. }
  3071. var target = typeof window !== 'undefined'
  3072. ? window
  3073. : typeof global !== 'undefined'
  3074. ? global
  3075. : {};
  3076. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3077. function devtoolPlugin (store) {
  3078. if (!devtoolHook) { return }
  3079. store._devtoolHook = devtoolHook;
  3080. devtoolHook.emit('vuex:init', store);
  3081. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  3082. store.replaceState(targetState);
  3083. });
  3084. store.subscribe(function (mutation, state) {
  3085. devtoolHook.emit('vuex:mutation', mutation, state);
  3086. }, { prepend: true });
  3087. store.subscribeAction(function (action, state) {
  3088. devtoolHook.emit('vuex:action', action, state);
  3089. }, { prepend: true });
  3090. }
  3091. /**
  3092. * Get the first item that pass the test
  3093. * by second argument function
  3094. *
  3095. * @param {Array} list
  3096. * @param {Function} f
  3097. * @return {*}
  3098. */
  3099. /**
  3100. * forEach for object
  3101. */
  3102. function forEachValue (obj, fn) {
  3103. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  3104. }
  3105. function isObject (obj) {
  3106. return obj !== null && typeof obj === 'object'
  3107. }
  3108. function isPromise (val) {
  3109. return val && typeof val.then === 'function'
  3110. }
  3111. function assert (condition, msg) {
  3112. if (!condition) { throw new Error(("[vuex] " + msg)) }
  3113. }
  3114. function partial (fn, arg) {
  3115. return function () {
  3116. return fn(arg)
  3117. }
  3118. }
  3119. // Base data struct for store's module, package with some attribute and method
  3120. var Module = function Module (rawModule, runtime) {
  3121. this.runtime = runtime;
  3122. // Store some children item
  3123. this._children = Object.create(null);
  3124. // Store the origin module object which passed by programmer
  3125. this._rawModule = rawModule;
  3126. var rawState = rawModule.state;
  3127. // Store the origin module's state
  3128. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  3129. };
  3130. var prototypeAccessors = { namespaced: { configurable: true } };
  3131. prototypeAccessors.namespaced.get = function () {
  3132. return !!this._rawModule.namespaced
  3133. };
  3134. Module.prototype.addChild = function addChild (key, module) {
  3135. this._children[key] = module;
  3136. };
  3137. Module.prototype.removeChild = function removeChild (key) {
  3138. delete this._children[key];
  3139. };
  3140. Module.prototype.getChild = function getChild (key) {
  3141. return this._children[key]
  3142. };
  3143. Module.prototype.hasChild = function hasChild (key) {
  3144. return key in this._children
  3145. };
  3146. Module.prototype.update = function update (rawModule) {
  3147. this._rawModule.namespaced = rawModule.namespaced;
  3148. if (rawModule.actions) {
  3149. this._rawModule.actions = rawModule.actions;
  3150. }
  3151. if (rawModule.mutations) {
  3152. this._rawModule.mutations = rawModule.mutations;
  3153. }
  3154. if (rawModule.getters) {
  3155. this._rawModule.getters = rawModule.getters;
  3156. }
  3157. };
  3158. Module.prototype.forEachChild = function forEachChild (fn) {
  3159. forEachValue(this._children, fn);
  3160. };
  3161. Module.prototype.forEachGetter = function forEachGetter (fn) {
  3162. if (this._rawModule.getters) {
  3163. forEachValue(this._rawModule.getters, fn);
  3164. }
  3165. };
  3166. Module.prototype.forEachAction = function forEachAction (fn) {
  3167. if (this._rawModule.actions) {
  3168. forEachValue(this._rawModule.actions, fn);
  3169. }
  3170. };
  3171. Module.prototype.forEachMutation = function forEachMutation (fn) {
  3172. if (this._rawModule.mutations) {
  3173. forEachValue(this._rawModule.mutations, fn);
  3174. }
  3175. };
  3176. Object.defineProperties( Module.prototype, prototypeAccessors );
  3177. var ModuleCollection = function ModuleCollection (rawRootModule) {
  3178. // register root module (Vuex.Store options)
  3179. this.register([], rawRootModule, false);
  3180. };
  3181. ModuleCollection.prototype.get = function get (path) {
  3182. return path.reduce(function (module, key) {
  3183. return module.getChild(key)
  3184. }, this.root)
  3185. };
  3186. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  3187. var module = this.root;
  3188. return path.reduce(function (namespace, key) {
  3189. module = module.getChild(key);
  3190. return namespace + (module.namespaced ? key + '/' : '')
  3191. }, '')
  3192. };
  3193. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  3194. update([], this.root, rawRootModule);
  3195. };
  3196. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  3197. var this$1 = this;
  3198. if ( runtime === void 0 ) runtime = true;
  3199. if ((true)) {
  3200. assertRawModule(path, rawModule);
  3201. }
  3202. var newModule = new Module(rawModule, runtime);
  3203. if (path.length === 0) {
  3204. this.root = newModule;
  3205. } else {
  3206. var parent = this.get(path.slice(0, -1));
  3207. parent.addChild(path[path.length - 1], newModule);
  3208. }
  3209. // register nested modules
  3210. if (rawModule.modules) {
  3211. forEachValue(rawModule.modules, function (rawChildModule, key) {
  3212. this$1.register(path.concat(key), rawChildModule, runtime);
  3213. });
  3214. }
  3215. };
  3216. ModuleCollection.prototype.unregister = function unregister (path) {
  3217. var parent = this.get(path.slice(0, -1));
  3218. var key = path[path.length - 1];
  3219. if (!parent.getChild(key).runtime) { return }
  3220. parent.removeChild(key);
  3221. };
  3222. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  3223. var parent = this.get(path.slice(0, -1));
  3224. var key = path[path.length - 1];
  3225. return parent.hasChild(key)
  3226. };
  3227. function update (path, targetModule, newModule) {
  3228. if ((true)) {
  3229. assertRawModule(path, newModule);
  3230. }
  3231. // update target module
  3232. targetModule.update(newModule);
  3233. // update nested modules
  3234. if (newModule.modules) {
  3235. for (var key in newModule.modules) {
  3236. if (!targetModule.getChild(key)) {
  3237. if ((true)) {
  3238. console.warn(
  3239. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  3240. 'manual reload is needed'
  3241. );
  3242. }
  3243. return
  3244. }
  3245. update(
  3246. path.concat(key),
  3247. targetModule.getChild(key),
  3248. newModule.modules[key]
  3249. );
  3250. }
  3251. }
  3252. }
  3253. var functionAssert = {
  3254. assert: function (value) { return typeof value === 'function'; },
  3255. expected: 'function'
  3256. };
  3257. var objectAssert = {
  3258. assert: function (value) { return typeof value === 'function' ||
  3259. (typeof value === 'object' && typeof value.handler === 'function'); },
  3260. expected: 'function or object with "handler" function'
  3261. };
  3262. var assertTypes = {
  3263. getters: functionAssert,
  3264. mutations: functionAssert,
  3265. actions: objectAssert
  3266. };
  3267. function assertRawModule (path, rawModule) {
  3268. Object.keys(assertTypes).forEach(function (key) {
  3269. if (!rawModule[key]) { return }
  3270. var assertOptions = assertTypes[key];
  3271. forEachValue(rawModule[key], function (value, type) {
  3272. assert(
  3273. assertOptions.assert(value),
  3274. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  3275. );
  3276. });
  3277. });
  3278. }
  3279. function makeAssertionMessage (path, key, type, value, expected) {
  3280. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  3281. if (path.length > 0) {
  3282. buf += " in module \"" + (path.join('.')) + "\"";
  3283. }
  3284. buf += " is " + (JSON.stringify(value)) + ".";
  3285. return buf
  3286. }
  3287. var Vue; // bind on install
  3288. var Store = function Store (options) {
  3289. var this$1 = this;
  3290. if ( options === void 0 ) options = {};
  3291. // Auto install if it is not done yet and `window` has `Vue`.
  3292. // To allow users to avoid auto-installation in some cases,
  3293. // this code should be placed here. See #731
  3294. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  3295. install(window.Vue);
  3296. }
  3297. if ((true)) {
  3298. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  3299. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  3300. assert(this instanceof Store, "store must be called with the new operator.");
  3301. }
  3302. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  3303. var strict = options.strict; if ( strict === void 0 ) strict = false;
  3304. // store internal state
  3305. this._committing = false;
  3306. this._actions = Object.create(null);
  3307. this._actionSubscribers = [];
  3308. this._mutations = Object.create(null);
  3309. this._wrappedGetters = Object.create(null);
  3310. this._modules = new ModuleCollection(options);
  3311. this._modulesNamespaceMap = Object.create(null);
  3312. this._subscribers = [];
  3313. this._watcherVM = new Vue();
  3314. this._makeLocalGettersCache = Object.create(null);
  3315. // bind commit and dispatch to self
  3316. var store = this;
  3317. var ref = this;
  3318. var dispatch = ref.dispatch;
  3319. var commit = ref.commit;
  3320. this.dispatch = function boundDispatch (type, payload) {
  3321. return dispatch.call(store, type, payload)
  3322. };
  3323. this.commit = function boundCommit (type, payload, options) {
  3324. return commit.call(store, type, payload, options)
  3325. };
  3326. // strict mode
  3327. this.strict = strict;
  3328. var state = this._modules.root.state;
  3329. // init root module.
  3330. // this also recursively registers all sub-modules
  3331. // and collects all module getters inside this._wrappedGetters
  3332. installModule(this, state, [], this._modules.root);
  3333. // initialize the store vm, which is responsible for the reactivity
  3334. // (also registers _wrappedGetters as computed properties)
  3335. resetStoreVM(this, state);
  3336. // apply plugins
  3337. plugins.forEach(function (plugin) { return plugin(this$1); });
  3338. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  3339. if (useDevtools) {
  3340. devtoolPlugin(this);
  3341. }
  3342. };
  3343. var prototypeAccessors$1 = { state: { configurable: true } };
  3344. prototypeAccessors$1.state.get = function () {
  3345. return this._vm._data.$$state
  3346. };
  3347. prototypeAccessors$1.state.set = function (v) {
  3348. if ((true)) {
  3349. assert(false, "use store.replaceState() to explicit replace store state.");
  3350. }
  3351. };
  3352. Store.prototype.commit = function commit (_type, _payload, _options) {
  3353. var this$1 = this;
  3354. // check object-style commit
  3355. var ref = unifyObjectStyle(_type, _payload, _options);
  3356. var type = ref.type;
  3357. var payload = ref.payload;
  3358. var options = ref.options;
  3359. var mutation = { type: type, payload: payload };
  3360. var entry = this._mutations[type];
  3361. if (!entry) {
  3362. if ((true)) {
  3363. console.error(("[vuex] unknown mutation type: " + type));
  3364. }
  3365. return
  3366. }
  3367. this._withCommit(function () {
  3368. entry.forEach(function commitIterator (handler) {
  3369. handler(payload);
  3370. });
  3371. });
  3372. this._subscribers
  3373. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  3374. .forEach(function (sub) { return sub(mutation, this$1.state); });
  3375. if (
  3376. ( true) &&
  3377. options && options.silent
  3378. ) {
  3379. console.warn(
  3380. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  3381. 'Use the filter functionality in the vue-devtools'
  3382. );
  3383. }
  3384. };
  3385. Store.prototype.dispatch = function dispatch (_type, _payload) {
  3386. var this$1 = this;
  3387. // check object-style dispatch
  3388. var ref = unifyObjectStyle(_type, _payload);
  3389. var type = ref.type;
  3390. var payload = ref.payload;
  3391. var action = { type: type, payload: payload };
  3392. var entry = this._actions[type];
  3393. if (!entry) {
  3394. if ((true)) {
  3395. console.error(("[vuex] unknown action type: " + type));
  3396. }
  3397. return
  3398. }
  3399. try {
  3400. this._actionSubscribers
  3401. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  3402. .filter(function (sub) { return sub.before; })
  3403. .forEach(function (sub) { return sub.before(action, this$1.state); });
  3404. } catch (e) {
  3405. if ((true)) {
  3406. console.warn("[vuex] error in before action subscribers: ");
  3407. console.error(e);
  3408. }
  3409. }
  3410. var result = entry.length > 1
  3411. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  3412. : entry[0](payload);
  3413. return new Promise(function (resolve, reject) {
  3414. result.then(function (res) {
  3415. try {
  3416. this$1._actionSubscribers
  3417. .filter(function (sub) { return sub.after; })
  3418. .forEach(function (sub) { return sub.after(action, this$1.state); });
  3419. } catch (e) {
  3420. if ((true)) {
  3421. console.warn("[vuex] error in after action subscribers: ");
  3422. console.error(e);
  3423. }
  3424. }
  3425. resolve(res);
  3426. }, function (error) {
  3427. try {
  3428. this$1._actionSubscribers
  3429. .filter(function (sub) { return sub.error; })
  3430. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  3431. } catch (e) {
  3432. if ((true)) {
  3433. console.warn("[vuex] error in error action subscribers: ");
  3434. console.error(e);
  3435. }
  3436. }
  3437. reject(error);
  3438. });
  3439. })
  3440. };
  3441. Store.prototype.subscribe = function subscribe (fn, options) {
  3442. return genericSubscribe(fn, this._subscribers, options)
  3443. };
  3444. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  3445. var subs = typeof fn === 'function' ? { before: fn } : fn;
  3446. return genericSubscribe(subs, this._actionSubscribers, options)
  3447. };
  3448. Store.prototype.watch = function watch (getter, cb, options) {
  3449. var this$1 = this;
  3450. if ((true)) {
  3451. assert(typeof getter === 'function', "store.watch only accepts a function.");
  3452. }
  3453. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  3454. };
  3455. Store.prototype.replaceState = function replaceState (state) {
  3456. var this$1 = this;
  3457. this._withCommit(function () {
  3458. this$1._vm._data.$$state = state;
  3459. });
  3460. };
  3461. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  3462. if ( options === void 0 ) options = {};
  3463. if (typeof path === 'string') { path = [path]; }
  3464. if ((true)) {
  3465. assert(Array.isArray(path), "module path must be a string or an Array.");
  3466. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  3467. }
  3468. this._modules.register(path, rawModule);
  3469. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  3470. // reset store to update getters...
  3471. resetStoreVM(this, this.state);
  3472. };
  3473. Store.prototype.unregisterModule = function unregisterModule (path) {
  3474. var this$1 = this;
  3475. if (typeof path === 'string') { path = [path]; }
  3476. if ((true)) {
  3477. assert(Array.isArray(path), "module path must be a string or an Array.");
  3478. }
  3479. this._modules.unregister(path);
  3480. this._withCommit(function () {
  3481. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  3482. Vue.delete(parentState, path[path.length - 1]);
  3483. });
  3484. resetStore(this);
  3485. };
  3486. Store.prototype.hasModule = function hasModule (path) {
  3487. if (typeof path === 'string') { path = [path]; }
  3488. if ((true)) {
  3489. assert(Array.isArray(path), "module path must be a string or an Array.");
  3490. }
  3491. return this._modules.isRegistered(path)
  3492. };
  3493. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  3494. this._modules.update(newOptions);
  3495. resetStore(this, true);
  3496. };
  3497. Store.prototype._withCommit = function _withCommit (fn) {
  3498. var committing = this._committing;
  3499. this._committing = true;
  3500. fn();
  3501. this._committing = committing;
  3502. };
  3503. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  3504. function genericSubscribe (fn, subs, options) {
  3505. if (subs.indexOf(fn) < 0) {
  3506. options && options.prepend
  3507. ? subs.unshift(fn)
  3508. : subs.push(fn);
  3509. }
  3510. return function () {
  3511. var i = subs.indexOf(fn);
  3512. if (i > -1) {
  3513. subs.splice(i, 1);
  3514. }
  3515. }
  3516. }
  3517. function resetStore (store, hot) {
  3518. store._actions = Object.create(null);
  3519. store._mutations = Object.create(null);
  3520. store._wrappedGetters = Object.create(null);
  3521. store._modulesNamespaceMap = Object.create(null);
  3522. var state = store.state;
  3523. // init all modules
  3524. installModule(store, state, [], store._modules.root, true);
  3525. // reset vm
  3526. resetStoreVM(store, state, hot);
  3527. }
  3528. function resetStoreVM (store, state, hot) {
  3529. var oldVm = store._vm;
  3530. // bind store public getters
  3531. store.getters = {};
  3532. // reset local getters cache
  3533. store._makeLocalGettersCache = Object.create(null);
  3534. var wrappedGetters = store._wrappedGetters;
  3535. var computed = {};
  3536. forEachValue(wrappedGetters, function (fn, key) {
  3537. // use computed to leverage its lazy-caching mechanism
  3538. // direct inline function use will lead to closure preserving oldVm.
  3539. // using partial to return function with only arguments preserved in closure environment.
  3540. computed[key] = partial(fn, store);
  3541. Object.defineProperty(store.getters, key, {
  3542. get: function () { return store._vm[key]; },
  3543. enumerable: true // for local getters
  3544. });
  3545. });
  3546. // use a Vue instance to store the state tree
  3547. // suppress warnings just in case the user has added
  3548. // some funky global mixins
  3549. var silent = Vue.config.silent;
  3550. Vue.config.silent = true;
  3551. store._vm = new Vue({
  3552. data: {
  3553. $$state: state
  3554. },
  3555. computed: computed
  3556. });
  3557. Vue.config.silent = silent;
  3558. // enable strict mode for new vm
  3559. if (store.strict) {
  3560. enableStrictMode(store);
  3561. }
  3562. if (oldVm) {
  3563. if (hot) {
  3564. // dispatch changes in all subscribed watchers
  3565. // to force getter re-evaluation for hot reloading.
  3566. store._withCommit(function () {
  3567. oldVm._data.$$state = null;
  3568. });
  3569. }
  3570. Vue.nextTick(function () { return oldVm.$destroy(); });
  3571. }
  3572. }
  3573. function installModule (store, rootState, path, module, hot) {
  3574. var isRoot = !path.length;
  3575. var namespace = store._modules.getNamespace(path);
  3576. // register in namespace map
  3577. if (module.namespaced) {
  3578. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  3579. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  3580. }
  3581. store._modulesNamespaceMap[namespace] = module;
  3582. }
  3583. // set state
  3584. if (!isRoot && !hot) {
  3585. var parentState = getNestedState(rootState, path.slice(0, -1));
  3586. var moduleName = path[path.length - 1];
  3587. store._withCommit(function () {
  3588. if ((true)) {
  3589. if (moduleName in parentState) {
  3590. console.warn(
  3591. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  3592. );
  3593. }
  3594. }
  3595. Vue.set(parentState, moduleName, module.state);
  3596. });
  3597. }
  3598. var local = module.context = makeLocalContext(store, namespace, path);
  3599. module.forEachMutation(function (mutation, key) {
  3600. var namespacedType = namespace + key;
  3601. registerMutation(store, namespacedType, mutation, local);
  3602. });
  3603. module.forEachAction(function (action, key) {
  3604. var type = action.root ? key : namespace + key;
  3605. var handler = action.handler || action;
  3606. registerAction(store, type, handler, local);
  3607. });
  3608. module.forEachGetter(function (getter, key) {
  3609. var namespacedType = namespace + key;
  3610. registerGetter(store, namespacedType, getter, local);
  3611. });
  3612. module.forEachChild(function (child, key) {
  3613. installModule(store, rootState, path.concat(key), child, hot);
  3614. });
  3615. }
  3616. /**
  3617. * make localized dispatch, commit, getters and state
  3618. * if there is no namespace, just use root ones
  3619. */
  3620. function makeLocalContext (store, namespace, path) {
  3621. var noNamespace = namespace === '';
  3622. var local = {
  3623. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  3624. var args = unifyObjectStyle(_type, _payload, _options);
  3625. var payload = args.payload;
  3626. var options = args.options;
  3627. var type = args.type;
  3628. if (!options || !options.root) {
  3629. type = namespace + type;
  3630. if (( true) && !store._actions[type]) {
  3631. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  3632. return
  3633. }
  3634. }
  3635. return store.dispatch(type, payload)
  3636. },
  3637. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  3638. var args = unifyObjectStyle(_type, _payload, _options);
  3639. var payload = args.payload;
  3640. var options = args.options;
  3641. var type = args.type;
  3642. if (!options || !options.root) {
  3643. type = namespace + type;
  3644. if (( true) && !store._mutations[type]) {
  3645. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  3646. return
  3647. }
  3648. }
  3649. store.commit(type, payload, options);
  3650. }
  3651. };
  3652. // getters and state object must be gotten lazily
  3653. // because they will be changed by vm update
  3654. Object.defineProperties(local, {
  3655. getters: {
  3656. get: noNamespace
  3657. ? function () { return store.getters; }
  3658. : function () { return makeLocalGetters(store, namespace); }
  3659. },
  3660. state: {
  3661. get: function () { return getNestedState(store.state, path); }
  3662. }
  3663. });
  3664. return local
  3665. }
  3666. function makeLocalGetters (store, namespace) {
  3667. if (!store._makeLocalGettersCache[namespace]) {
  3668. var gettersProxy = {};
  3669. var splitPos = namespace.length;
  3670. Object.keys(store.getters).forEach(function (type) {
  3671. // skip if the target getter is not match this namespace
  3672. if (type.slice(0, splitPos) !== namespace) { return }
  3673. // extract local getter type
  3674. var localType = type.slice(splitPos);
  3675. // Add a port to the getters proxy.
  3676. // Define as getter property because
  3677. // we do not want to evaluate the getters in this time.
  3678. Object.defineProperty(gettersProxy, localType, {
  3679. get: function () { return store.getters[type]; },
  3680. enumerable: true
  3681. });
  3682. });
  3683. store._makeLocalGettersCache[namespace] = gettersProxy;
  3684. }
  3685. return store._makeLocalGettersCache[namespace]
  3686. }
  3687. function registerMutation (store, type, handler, local) {
  3688. var entry = store._mutations[type] || (store._mutations[type] = []);
  3689. entry.push(function wrappedMutationHandler (payload) {
  3690. handler.call(store, local.state, payload);
  3691. });
  3692. }
  3693. function registerAction (store, type, handler, local) {
  3694. var entry = store._actions[type] || (store._actions[type] = []);
  3695. entry.push(function wrappedActionHandler (payload) {
  3696. var res = handler.call(store, {
  3697. dispatch: local.dispatch,
  3698. commit: local.commit,
  3699. getters: local.getters,
  3700. state: local.state,
  3701. rootGetters: store.getters,
  3702. rootState: store.state
  3703. }, payload);
  3704. if (!isPromise(res)) {
  3705. res = Promise.resolve(res);
  3706. }
  3707. if (store._devtoolHook) {
  3708. return res.catch(function (err) {
  3709. store._devtoolHook.emit('vuex:error', err);
  3710. throw err
  3711. })
  3712. } else {
  3713. return res
  3714. }
  3715. });
  3716. }
  3717. function registerGetter (store, type, rawGetter, local) {
  3718. if (store._wrappedGetters[type]) {
  3719. if ((true)) {
  3720. console.error(("[vuex] duplicate getter key: " + type));
  3721. }
  3722. return
  3723. }
  3724. store._wrappedGetters[type] = function wrappedGetter (store) {
  3725. return rawGetter(
  3726. local.state, // local state
  3727. local.getters, // local getters
  3728. store.state, // root state
  3729. store.getters // root getters
  3730. )
  3731. };
  3732. }
  3733. function enableStrictMode (store) {
  3734. store._vm.$watch(function () { return this._data.$$state }, function () {
  3735. if ((true)) {
  3736. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  3737. }
  3738. }, { deep: true, sync: true });
  3739. }
  3740. function getNestedState (state, path) {
  3741. return path.reduce(function (state, key) { return state[key]; }, state)
  3742. }
  3743. function unifyObjectStyle (type, payload, options) {
  3744. if (isObject(type) && type.type) {
  3745. options = payload;
  3746. payload = type;
  3747. type = type.type;
  3748. }
  3749. if ((true)) {
  3750. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  3751. }
  3752. return { type: type, payload: payload, options: options }
  3753. }
  3754. function install (_Vue) {
  3755. if (Vue && _Vue === Vue) {
  3756. if ((true)) {
  3757. console.error(
  3758. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  3759. );
  3760. }
  3761. return
  3762. }
  3763. Vue = _Vue;
  3764. applyMixin(Vue);
  3765. }
  3766. /**
  3767. * Reduce the code which written in Vue.js for getting the state.
  3768. * @param {String} [namespace] - Module's namespace
  3769. * @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.
  3770. * @param {Object}
  3771. */
  3772. var mapState = normalizeNamespace(function (namespace, states) {
  3773. var res = {};
  3774. if (( true) && !isValidMap(states)) {
  3775. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  3776. }
  3777. normalizeMap(states).forEach(function (ref) {
  3778. var key = ref.key;
  3779. var val = ref.val;
  3780. res[key] = function mappedState () {
  3781. var state = this.$store.state;
  3782. var getters = this.$store.getters;
  3783. if (namespace) {
  3784. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  3785. if (!module) {
  3786. return
  3787. }
  3788. state = module.context.state;
  3789. getters = module.context.getters;
  3790. }
  3791. return typeof val === 'function'
  3792. ? val.call(this, state, getters)
  3793. : state[val]
  3794. };
  3795. // mark vuex getter for devtools
  3796. res[key].vuex = true;
  3797. });
  3798. return res
  3799. });
  3800. /**
  3801. * Reduce the code which written in Vue.js for committing the mutation
  3802. * @param {String} [namespace] - Module's namespace
  3803. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  3804. * @return {Object}
  3805. */
  3806. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  3807. var res = {};
  3808. if (( true) && !isValidMap(mutations)) {
  3809. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  3810. }
  3811. normalizeMap(mutations).forEach(function (ref) {
  3812. var key = ref.key;
  3813. var val = ref.val;
  3814. res[key] = function mappedMutation () {
  3815. var args = [], len = arguments.length;
  3816. while ( len-- ) args[ len ] = arguments[ len ];
  3817. // Get the commit method from store
  3818. var commit = this.$store.commit;
  3819. if (namespace) {
  3820. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  3821. if (!module) {
  3822. return
  3823. }
  3824. commit = module.context.commit;
  3825. }
  3826. return typeof val === 'function'
  3827. ? val.apply(this, [commit].concat(args))
  3828. : commit.apply(this.$store, [val].concat(args))
  3829. };
  3830. });
  3831. return res
  3832. });
  3833. /**
  3834. * Reduce the code which written in Vue.js for getting the getters
  3835. * @param {String} [namespace] - Module's namespace
  3836. * @param {Object|Array} getters
  3837. * @return {Object}
  3838. */
  3839. var mapGetters = normalizeNamespace(function (namespace, getters) {
  3840. var res = {};
  3841. if (( true) && !isValidMap(getters)) {
  3842. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  3843. }
  3844. normalizeMap(getters).forEach(function (ref) {
  3845. var key = ref.key;
  3846. var val = ref.val;
  3847. // The namespace has been mutated by normalizeNamespace
  3848. val = namespace + val;
  3849. res[key] = function mappedGetter () {
  3850. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  3851. return
  3852. }
  3853. if (( true) && !(val in this.$store.getters)) {
  3854. console.error(("[vuex] unknown getter: " + val));
  3855. return
  3856. }
  3857. return this.$store.getters[val]
  3858. };
  3859. // mark vuex getter for devtools
  3860. res[key].vuex = true;
  3861. });
  3862. return res
  3863. });
  3864. /**
  3865. * Reduce the code which written in Vue.js for dispatch the action
  3866. * @param {String} [namespace] - Module's namespace
  3867. * @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.
  3868. * @return {Object}
  3869. */
  3870. var mapActions = normalizeNamespace(function (namespace, actions) {
  3871. var res = {};
  3872. if (( true) && !isValidMap(actions)) {
  3873. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  3874. }
  3875. normalizeMap(actions).forEach(function (ref) {
  3876. var key = ref.key;
  3877. var val = ref.val;
  3878. res[key] = function mappedAction () {
  3879. var args = [], len = arguments.length;
  3880. while ( len-- ) args[ len ] = arguments[ len ];
  3881. // get dispatch function from store
  3882. var dispatch = this.$store.dispatch;
  3883. if (namespace) {
  3884. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  3885. if (!module) {
  3886. return
  3887. }
  3888. dispatch = module.context.dispatch;
  3889. }
  3890. return typeof val === 'function'
  3891. ? val.apply(this, [dispatch].concat(args))
  3892. : dispatch.apply(this.$store, [val].concat(args))
  3893. };
  3894. });
  3895. return res
  3896. });
  3897. /**
  3898. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  3899. * @param {String} namespace
  3900. * @return {Object}
  3901. */
  3902. var createNamespacedHelpers = function (namespace) { return ({
  3903. mapState: mapState.bind(null, namespace),
  3904. mapGetters: mapGetters.bind(null, namespace),
  3905. mapMutations: mapMutations.bind(null, namespace),
  3906. mapActions: mapActions.bind(null, namespace)
  3907. }); };
  3908. /**
  3909. * Normalize the map
  3910. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  3911. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  3912. * @param {Array|Object} map
  3913. * @return {Object}
  3914. */
  3915. function normalizeMap (map) {
  3916. if (!isValidMap(map)) {
  3917. return []
  3918. }
  3919. return Array.isArray(map)
  3920. ? map.map(function (key) { return ({ key: key, val: key }); })
  3921. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  3922. }
  3923. /**
  3924. * Validate whether given map is valid or not
  3925. * @param {*} map
  3926. * @return {Boolean}
  3927. */
  3928. function isValidMap (map) {
  3929. return Array.isArray(map) || isObject(map)
  3930. }
  3931. /**
  3932. * 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.
  3933. * @param {Function} fn
  3934. * @return {Function}
  3935. */
  3936. function normalizeNamespace (fn) {
  3937. return function (namespace, map) {
  3938. if (typeof namespace !== 'string') {
  3939. map = namespace;
  3940. namespace = '';
  3941. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  3942. namespace += '/';
  3943. }
  3944. return fn(namespace, map)
  3945. }
  3946. }
  3947. /**
  3948. * Search a special module from store by namespace. if module not exist, print error message.
  3949. * @param {Object} store
  3950. * @param {String} helper
  3951. * @param {String} namespace
  3952. * @return {Object}
  3953. */
  3954. function getModuleByNamespace (store, helper, namespace) {
  3955. var module = store._modulesNamespaceMap[namespace];
  3956. if (( true) && !module) {
  3957. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  3958. }
  3959. return module
  3960. }
  3961. var index = {
  3962. Store: Store,
  3963. install: install,
  3964. version: '3.4.0',
  3965. mapState: mapState,
  3966. mapMutations: mapMutations,
  3967. mapGetters: mapGetters,
  3968. mapActions: mapActions,
  3969. createNamespacedHelpers: createNamespacedHelpers
  3970. };
  3971. /* harmony default export */ __webpack_exports__["default"] = (index);
  3972. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  3973. /***/ }),
  3974. /***/ 17:
  3975. /*!**************************************************************************!*\
  3976. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/index.js ***!
  3977. \**************************************************************************/
  3978. /*! no static exports found */
  3979. /***/ (function(module, exports, __webpack_require__) {
  3980. "use strict";
  3981. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _Request = _interopRequireDefault(__webpack_require__(/*! ./core/Request */ 18));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  3982. _Request.default;exports.default = _default;
  3983. /***/ }),
  3984. /***/ 177:
  3985. /*!**************************************************************!*\
  3986. !*** D:/wwwroot/cqcarbonwxapp/components/uni-popup/popup.js ***!
  3987. \**************************************************************/
  3988. /*! no static exports found */
  3989. /***/ (function(module, exports, __webpack_require__) {
  3990. "use strict";
  3991. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 178));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  3992. // 定义 type 类型:弹出类型:top/bottom/center
  3993. var config = {
  3994. // 顶部弹出
  3995. top: 'top',
  3996. // 底部弹出
  3997. bottom: 'bottom',
  3998. // 居中弹出
  3999. center: 'center',
  4000. // 消息提示
  4001. message: 'top',
  4002. // 对话框
  4003. dialog: 'center',
  4004. // 分享
  4005. share: 'bottom' };var _default =
  4006. {
  4007. data: function data() {
  4008. return {
  4009. config: config };
  4010. },
  4011. mixins: [_message.default] };exports.default = _default;
  4012. /***/ }),
  4013. /***/ 178:
  4014. /*!****************************************************************!*\
  4015. !*** D:/wwwroot/cqcarbonwxapp/components/uni-popup/message.js ***!
  4016. \****************************************************************/
  4017. /*! no static exports found */
  4018. /***/ (function(module, exports, __webpack_require__) {
  4019. "use strict";
  4020. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  4021. created: function created() {
  4022. if (this.type === 'message') {
  4023. // 不显示遮罩
  4024. this.maskShow = false;
  4025. // 获取子组件对象
  4026. this.childrenMsg = null;
  4027. }
  4028. },
  4029. methods: {
  4030. customOpen: function customOpen() {
  4031. if (this.childrenMsg) {
  4032. this.childrenMsg.open();
  4033. }
  4034. },
  4035. customClose: function customClose() {
  4036. if (this.childrenMsg) {
  4037. this.childrenMsg.close();
  4038. }
  4039. } } };exports.default = _default;
  4040. /***/ }),
  4041. /***/ 18:
  4042. /*!*********************************************************************************!*\
  4043. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/Request.js ***!
  4044. \*********************************************************************************/
  4045. /*! no static exports found */
  4046. /***/ (function(module, exports, __webpack_require__) {
  4047. "use strict";
  4048. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  4049. var _dispatchRequest = _interopRequireDefault(__webpack_require__(/*! ./dispatchRequest */ 19));
  4050. var _InterceptorManager = _interopRequireDefault(__webpack_require__(/*! ./InterceptorManager */ 27));
  4051. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./mergeConfig */ 28));
  4052. var _defaults = _interopRequireDefault(__webpack_require__(/*! ./defaults */ 29));
  4053. var _utils = __webpack_require__(/*! ../utils */ 22);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var
  4054. Request = /*#__PURE__*/function () {
  4055. /**
  4056. * @param {Object} arg - 全局配置
  4057. * @param {String} arg.baseURL - 全局根路径
  4058. * @param {Object} arg.header - 全局header
  4059. * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式
  4060. * @param {String} arg.dataType = [json] - 全局默认的dataType
  4061. * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。App和支付宝小程序不支持
  4062. * @param {Object} arg.custom - 全局默认的自定义参数
  4063. * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认30000。仅微信小程序(2.10.0)、支付宝小程序支持
  4064. * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+)
  4065. * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+)
  4066. * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+)
  4067. * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300
  4068. */
  4069. function Request() {var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};_classCallCheck(this, Request);
  4070. if (!(0, _utils.isPlainObject)(arg)) {
  4071. arg = {};
  4072. console.warn('设置全局参数必须接收一个Object');
  4073. }
  4074. this.config = _objectSpread(_objectSpread({}, _defaults.default), arg);
  4075. this.interceptors = {
  4076. request: new _InterceptorManager.default(),
  4077. response: new _InterceptorManager.default() };
  4078. }
  4079. /**
  4080. * @Function
  4081. * @param {Request~setConfigCallback} f - 设置全局默认配置
  4082. */_createClass(Request, [{ key: "setConfig", value: function setConfig(
  4083. f) {
  4084. this.config = f(this.config);
  4085. } }, { key: "middleware", value: function middleware(
  4086. config) {
  4087. config = (0, _mergeConfig.default)(this.config, config);
  4088. var chain = [_dispatchRequest.default, undefined];
  4089. var promise = Promise.resolve(config);
  4090. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  4091. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  4092. });
  4093. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  4094. chain.push(interceptor.fulfilled, interceptor.rejected);
  4095. });
  4096. while (chain.length) {
  4097. promise = promise.then(chain.shift(), chain.shift());
  4098. }
  4099. return promise;
  4100. }
  4101. /**
  4102. * @Function
  4103. * @param {Object} config - 请求配置项
  4104. * @prop {String} options.url - 请求路径
  4105. * @prop {Object} options.data - 请求参数
  4106. * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型
  4107. * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse
  4108. * @prop {Object} [options.header = config.header] - 请求header
  4109. * @prop {Object} [options.method = config.method] - 请求方法
  4110. * @returns {Promise<unknown>}
  4111. */ }, { key: "request", value: function request()
  4112. {var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  4113. return this.middleware(config);
  4114. } }, { key: "get", value: function get(
  4115. url) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4116. return this.middleware(_objectSpread({
  4117. url: url,
  4118. method: 'GET' },
  4119. options));
  4120. } }, { key: "post", value: function post(
  4121. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4122. return this.middleware(_objectSpread({
  4123. url: url,
  4124. data: data,
  4125. method: 'POST' },
  4126. options));
  4127. } }, { key: "put", value: function put(
  4128. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4129. return this.middleware(_objectSpread({
  4130. url: url,
  4131. data: data,
  4132. method: 'PUT' },
  4133. options));
  4134. } }, { key: "delete", value: function _delete(
  4135. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4136. return this.middleware(_objectSpread({
  4137. url: url,
  4138. data: data,
  4139. method: 'DELETE' },
  4140. options));
  4141. } }, { key: "connect", value: function connect(
  4142. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4143. return this.middleware(_objectSpread({
  4144. url: url,
  4145. data: data,
  4146. method: 'CONNECT' },
  4147. options));
  4148. } }, { key: "head", value: function head(
  4149. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4150. return this.middleware(_objectSpread({
  4151. url: url,
  4152. data: data,
  4153. method: 'HEAD' },
  4154. options));
  4155. } }, { key: "options", value: function options(
  4156. url, data) {var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4157. return this.middleware(_objectSpread({
  4158. url: url,
  4159. data: data,
  4160. method: 'OPTIONS' },
  4161. _options));
  4162. } }, { key: "trace", value: function trace(
  4163. url, data) {var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4164. return this.middleware(_objectSpread({
  4165. url: url,
  4166. data: data,
  4167. method: 'TRACE' },
  4168. options));
  4169. } }, { key: "upload", value: function upload(
  4170. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4171. config.url = url;
  4172. config.method = 'UPLOAD';
  4173. return this.middleware(config);
  4174. } }, { key: "download", value: function download(
  4175. url) {var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4176. config.url = url;
  4177. config.method = 'DOWNLOAD';
  4178. return this.middleware(config);
  4179. } }]);return Request;}();
  4180. /**
  4181. * setConfig回调
  4182. * @return {Object} - 返回操作后的config
  4183. * @callback Request~setConfigCallback
  4184. * @param {Object} config - 全局默认config
  4185. */exports.default = Request;
  4186. /***/ }),
  4187. /***/ 186:
  4188. /*!************************************************************************!*\
  4189. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/mescroll-uni.js ***!
  4190. \************************************************************************/
  4191. /*! no static exports found */
  4192. /***/ (function(module, exports, __webpack_require__) {
  4193. "use strict";
  4194. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = MeScroll; /* mescroll
  4195. * version 1.3.3
  4196. * 2020-09-15 wenju
  4197. * https://www.mescroll.com
  4198. */
  4199. function MeScroll(options, isScrollBody) {
  4200. var me = this;
  4201. me.version = '1.3.3'; // mescroll版本号
  4202. me.options = options || {}; // 配置
  4203. me.isScrollBody = isScrollBody || false; // 滚动区域是否为原生页面滚动; 默认为scroll-view
  4204. me.isDownScrolling = false; // 是否在执行下拉刷新的回调
  4205. me.isUpScrolling = false; // 是否在执行上拉加载的回调
  4206. var hasDownCallback = me.options.down && me.options.down.callback; // 是否配置了down的callback
  4207. // 初始化下拉刷新
  4208. me.initDownScroll();
  4209. // 初始化上拉加载,则初始化
  4210. me.initUpScroll();
  4211. // 自动加载
  4212. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  4213. // 自动触发下拉刷新 (只有配置了down的callback才自动触发下拉刷新)
  4214. if ((me.optDown.use || me.optDown.native) && me.optDown.auto && hasDownCallback) {
  4215. if (me.optDown.autoShowLoading) {
  4216. me.triggerDownScroll(); // 显示下拉进度,执行下拉回调
  4217. } else {
  4218. me.optDown.callback && me.optDown.callback(me); // 不显示下拉进度,直接执行下拉回调
  4219. }
  4220. }
  4221. // 自动触发上拉加载
  4222. if (!me.isUpAutoLoad) {// 部分小程序(头条小程序)emit是异步, 会导致isUpAutoLoad判断有误, 先延时确保先执行down的callback,再执行up的callback
  4223. setTimeout(function () {
  4224. me.optUp.use && me.optUp.auto && !me.isUpAutoLoad && me.triggerUpScroll();
  4225. }, 100);
  4226. }
  4227. }, 30); // 需让me.optDown.inited和me.optUp.inited先执行
  4228. }
  4229. /* 配置参数:下拉刷新 */
  4230. MeScroll.prototype.extendDownScroll = function (optDown) {
  4231. // 下拉刷新的配置
  4232. MeScroll.extend(optDown, {
  4233. use: true, // 是否启用下拉刷新; 默认true
  4234. auto: true, // 是否在初始化完毕之后自动执行下拉刷新的回调; 默认true
  4235. native: false, // 是否使用系统自带的下拉刷新; 默认false; 仅mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  4236. autoShowLoading: false, // 如果设置auto=true(在初始化完毕之后自动执行下拉刷新的回调),那么是否显示下拉刷新的进度; 默认false
  4237. isLock: false, // 是否锁定下拉刷新,默认false;
  4238. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  4239. startTop: 100, // scroll-view快速滚动到顶部时,此时的scroll-top可能大于0, 此值用于控制最大的误差
  4240. inOffsetRate: 1, // 在列表顶部,下拉的距离小于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  4241. outOffsetRate: 0.2, // 在列表顶部,下拉的距离大于offset时,改变下拉区域高度比例;值小于1且越接近0,高度变化越小,表现为越往下越难拉
  4242. bottomOffset: 20, // 当手指touchmove位置在距离body底部20px范围内的时候结束上拉刷新,避免Webview嵌套导致touchend事件不执行
  4243. minAngle: 45, // 向下滑动最少偏移的角度,取值区间 [0,90];默认45度,即向下滑动的角度大于45度则触发下拉;而小于45度,将不触发下拉,避免与左右滑动的轮播等组件冲突;
  4244. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  4245. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  4246. textLoading: '加载中 ...', // 加载中的提示文本
  4247. textSuccess: '加载成功', // 加载成功的文本
  4248. textErr: '加载失败', // 加载失败的文本
  4249. beforeEndDelay: 100, // 延时结束的时长 (显示加载成功/失败的时长)
  4250. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorTop)
  4251. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  4252. inited: null, // 下拉刷新初始化完毕的回调
  4253. inOffset: null, // 下拉的距离进入offset范围内那一刻的回调
  4254. outOffset: null, // 下拉的距离大于offset那一刻的回调
  4255. onMoving: null, // 下拉过程中的回调,滑动过程一直在执行; rate下拉区域当前高度与指定距离的比值(inOffset: rate<1; outOffset: rate>=1); downHight当前下拉区域的高度
  4256. beforeLoading: null, // 准备触发下拉刷新的回调: 如果return true,将不触发showLoading和callback回调; 常用来完全自定义下拉刷新, 参考案例【淘宝 v6.8.0】
  4257. showLoading: null, // 显示下拉刷新进度的回调
  4258. afterLoading: null, // 显示下拉刷新进度的回调之后,马上要执行的代码 (如: 在wxs中使用)
  4259. beforeEndDownScroll: null, // 准备结束下拉的回调. 返回结束下拉的延时执行时间,默认0ms; 常用于结束下拉之前再显示另外一小段动画,才去隐藏下拉刷新的场景, 参考案例【dotJump】
  4260. endDownScroll: null, // 结束下拉刷新的回调
  4261. afterEndDownScroll: null, // 结束下拉刷新的回调,马上要执行的代码 (如: 在wxs中使用)
  4262. callback: function callback(mescroll) {
  4263. // 下拉刷新的回调;默认重置上拉加载列表为第一页
  4264. mescroll.resetUpScroll();
  4265. } });
  4266. };
  4267. /* 配置参数:上拉加载 */
  4268. MeScroll.prototype.extendUpScroll = function (optUp) {
  4269. // 上拉加载的配置
  4270. MeScroll.extend(optUp, {
  4271. use: true, // 是否启用上拉加载; 默认true
  4272. auto: true, // 是否在初始化完毕之后自动执行上拉加载的回调; 默认true
  4273. isLock: false, // 是否锁定上拉加载,默认false;
  4274. isBoth: true, // 上拉加载时,如果滑动到列表顶部是否可以同时触发下拉刷新;默认true,两者可同时触发;
  4275. callback: null, // 上拉加载的回调;function(page,mescroll){ }
  4276. page: {
  4277. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  4278. size: 10, // 每页数据的数量
  4279. time: null // 加载第一页数据服务器返回的时间; 防止用户翻页时,后台新增了数据从而导致下一页数据重复;
  4280. },
  4281. noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
  4282. offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  4283. textLoading: '加载中 ...', // 加载中的提示文本
  4284. textNoMore: '-- END --', // 没有更多数据的提示文本
  4285. bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
  4286. textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
  4287. inited: null, // 初始化完毕的回调
  4288. showLoading: null, // 显示加载中的回调
  4289. showNoMore: null, // 显示无更多数据的回调
  4290. hideUpScroll: null, // 隐藏上拉加载的回调
  4291. errDistance: 60, // endErr的时候需往上滑动一段距离,使其往下滑动时再次触发onReachBottom,仅mescroll-body生效
  4292. toTop: {
  4293. // 回到顶部按钮,需配置src才显示
  4294. src: null, // 图片路径,默认null (绝对路径或网络图)
  4295. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000
  4296. duration: 300, // 回到顶部的动画时长,默认300ms (当值为0或300则使用系统自带回到顶部,更流畅; 其他值则通过step模拟,部分机型可能不够流畅,所以非特殊情况不建议修改此项)
  4297. btnClick: null, // 点击按钮的回调
  4298. onShow: null, // 是否显示的回调
  4299. zIndex: 9990, // fixed定位z-index值
  4300. left: null, // 到左边的距离, 默认null. 此项有值时,right不生效. (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4301. right: 20, // 到右边的距离, 默认20 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4302. bottom: 120, // 到底部的距离, 默认120 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4303. safearea: false, // bottom的偏移量是否加上底部安全区的距离, 默认false, 需要适配iPhoneX时使用 (具体的界面如果不配置此项,则取本vue的safearea值)
  4304. width: 72, // 回到顶部图标的宽度, 默认72 (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4305. radius: "50%" // 圆角, 默认"50%" (支持20, "20rpx", "20px", "20%"格式的值, 其中纯数字则默认单位rpx)
  4306. },
  4307. empty: {
  4308. use: true, // 是否显示空布局
  4309. icon: null, // 图标路径
  4310. tip: '~ 暂无相关数据 ~', // 提示
  4311. btnText: '', // 按钮
  4312. btnClick: null, // 点击按钮的回调
  4313. onShow: null, // 是否显示的回调
  4314. fixed: false, // 是否使用fixed定位,默认false; 配置fixed为true,以下的top和zIndex才生效 (transform会使fixed失效,最终会降级为absolute)
  4315. top: "100rpx", // fixed定位的top值 (完整的单位值,如 "10%"; "100rpx")
  4316. zIndex: 99 // fixed定位z-index值
  4317. },
  4318. onScroll: false // 是否监听滚动事件
  4319. });
  4320. };
  4321. /* 配置参数 */
  4322. MeScroll.extend = function (userOption, defaultOption) {
  4323. if (!userOption) return defaultOption;
  4324. for (var key in defaultOption) {
  4325. if (userOption[key] == null) {
  4326. var def = defaultOption[key];
  4327. if (def != null && typeof def === 'object') {
  4328. userOption[key] = MeScroll.extend({}, def); // 深度匹配
  4329. } else {
  4330. userOption[key] = def;
  4331. }
  4332. } else if (typeof userOption[key] === 'object') {
  4333. MeScroll.extend(userOption[key], defaultOption[key]); // 深度匹配
  4334. }
  4335. }
  4336. return userOption;
  4337. };
  4338. /* 简单判断是否配置了颜色 (非透明,非白色) */
  4339. MeScroll.prototype.hasColor = function (color) {
  4340. if (!color) return false;
  4341. var c = color.toLowerCase();
  4342. return c != "#fff" && c != "#ffffff" && c != "transparent" && c != "white";
  4343. };
  4344. /* -------初始化下拉刷新------- */
  4345. MeScroll.prototype.initDownScroll = function () {
  4346. var me = this;
  4347. // 配置参数
  4348. me.optDown = me.options.down || {};
  4349. if (!me.optDown.textColor && me.hasColor(me.optDown.bgColor)) me.optDown.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  4350. me.extendDownScroll(me.optDown);
  4351. // 如果是mescroll-body且配置了native,则禁止自定义的下拉刷新
  4352. if (me.isScrollBody && me.optDown.native) {
  4353. me.optDown.use = false;
  4354. } else {
  4355. me.optDown.native = false; // 仅mescroll-body支持,mescroll-uni不支持
  4356. }
  4357. me.downHight = 0; // 下拉区域的高度
  4358. // 在页面中加入下拉布局
  4359. if (me.optDown.use && me.optDown.inited) {
  4360. // 初始化完毕的回调
  4361. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  4362. me.optDown.inited(me);
  4363. }, 0);
  4364. }
  4365. };
  4366. /* 列表touchstart事件 */
  4367. MeScroll.prototype.touchstartEvent = function (e) {
  4368. if (!this.optDown.use) return;
  4369. this.startPoint = this.getPoint(e); // 记录起点
  4370. this.startTop = this.getScrollTop(); // 记录此时的滚动条位置
  4371. this.startAngle = 0; // 初始角度
  4372. this.lastPoint = this.startPoint; // 重置上次move的点
  4373. this.maxTouchmoveY = this.getBodyHeight() - this.optDown.bottomOffset; // 手指触摸的最大范围(写在touchstart避免body获取高度为0的情况)
  4374. this.inTouchend = false; // 标记不是touchend
  4375. };
  4376. /* 列表touchmove事件 */
  4377. MeScroll.prototype.touchmoveEvent = function (e) {
  4378. if (!this.optDown.use) return;
  4379. var me = this;
  4380. var scrollTop = me.getScrollTop(); // 当前滚动条的距离
  4381. var curPoint = me.getPoint(e); // 当前点
  4382. var moveY = curPoint.y - me.startPoint.y; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  4383. // 向下拉 && 在顶部
  4384. // mescroll-body,直接判定在顶部即可
  4385. // scroll-view在滚动时不会触发touchmove,当触顶/底/左/右时,才会触发touchmove
  4386. // scroll-view滚动到顶部时,scrollTop不一定为0,也有可能大于0; 在iOS的APP中scrollTop可能为负数,不一定和startTop相等
  4387. if (moveY > 0 && (
  4388. me.isScrollBody && scrollTop <= 0 ||
  4389. !me.isScrollBody && (scrollTop <= 0 || scrollTop <= me.optDown.startTop && scrollTop === me.startTop)))
  4390. {
  4391. // 可下拉的条件
  4392. if (!me.inTouchend && !me.isDownScrolling && !me.optDown.isLock && (!me.isUpScrolling || me.isUpScrolling &&
  4393. me.optUp.isBoth)) {
  4394. // 下拉的初始角度是否在配置的范围内
  4395. if (!me.startAngle) me.startAngle = me.getAngle(me.lastPoint, curPoint); // 两点之间的角度,区间 [0,90]
  4396. if (me.startAngle < me.optDown.minAngle) return; // 如果小于配置的角度,则不往下执行下拉刷新
  4397. // 如果手指的位置超过配置的距离,则提前结束下拉,避免Webview嵌套导致touchend无法触发
  4398. if (me.maxTouchmoveY > 0 && curPoint.y >= me.maxTouchmoveY) {
  4399. me.inTouchend = true; // 标记执行touchend
  4400. me.touchendEvent(); // 提前触发touchend
  4401. return;
  4402. }
  4403. me.preventDefault(e); // 阻止默认事件
  4404. var diff = curPoint.y - me.lastPoint.y; // 和上次比,移动的距离 (大于0向下,小于0向上)
  4405. // 下拉距离 < 指定距离
  4406. if (me.downHight < me.optDown.offset) {
  4407. if (me.movetype !== 1) {
  4408. me.movetype = 1; // 加入标记,保证只执行一次
  4409. me.isDownEndSuccess = null; // 重置是否加载成功的状态 (wxs执行的是wxs.wxs)
  4410. me.optDown.inOffset && me.optDown.inOffset(me); // 进入指定距离范围内那一刻的回调,只执行一次
  4411. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  4412. }
  4413. me.downHight += diff * me.optDown.inOffsetRate; // 越往下,高度变化越小
  4414. // 指定距离 <= 下拉距离
  4415. } else {
  4416. if (me.movetype !== 2) {
  4417. me.movetype = 2; // 加入标记,保证只执行一次
  4418. me.optDown.outOffset && me.optDown.outOffset(me); // 下拉超过指定距离那一刻的回调,只执行一次
  4419. me.isMoveDown = true; // 标记下拉区域高度改变,在touchend重置回来
  4420. }
  4421. if (diff > 0) {// 向下拉
  4422. me.downHight += diff * me.optDown.outOffsetRate; // 越往下,高度变化越小
  4423. } else {// 向上收
  4424. me.downHight += diff; // 向上收回高度,则向上滑多少收多少高度
  4425. }
  4426. }
  4427. me.downHight = Math.round(me.downHight); // 取整
  4428. var rate = me.downHight / me.optDown.offset; // 下拉区域当前高度与指定距离的比值
  4429. me.optDown.onMoving && me.optDown.onMoving(me, rate, me.downHight); // 下拉过程中的回调,一直在执行
  4430. }
  4431. }
  4432. me.lastPoint = curPoint; // 记录本次移动的点
  4433. };
  4434. /* 列表touchend事件 */
  4435. MeScroll.prototype.touchendEvent = function (e) {
  4436. if (!this.optDown.use) return;
  4437. // 如果下拉区域高度已改变,则需重置回来
  4438. if (this.isMoveDown) {
  4439. if (this.downHight >= this.optDown.offset) {
  4440. // 符合触发刷新的条件
  4441. this.triggerDownScroll();
  4442. } else {
  4443. // 不符合的话 则重置
  4444. this.downHight = 0;
  4445. this.endDownScrollCall(this);
  4446. }
  4447. this.movetype = 0;
  4448. this.isMoveDown = false;
  4449. } else if (!this.isScrollBody && this.getScrollTop() === this.startTop) {// scroll-view到顶/左/右/底的滑动事件
  4450. var isScrollUp = this.getPoint(e).y - this.startPoint.y < 0; // 和起点比,移动的距离,大于0向下拉,小于0向上拉
  4451. // 上滑
  4452. if (isScrollUp) {
  4453. // 需检查滑动的角度
  4454. var angle = this.getAngle(this.getPoint(e), this.startPoint); // 两点之间的角度,区间 [0,90]
  4455. if (angle > 80) {
  4456. // 检查并触发上拉
  4457. this.triggerUpScroll(true);
  4458. }
  4459. }
  4460. }
  4461. };
  4462. /* 根据点击滑动事件获取第一个手指的坐标 */
  4463. MeScroll.prototype.getPoint = function (e) {
  4464. if (!e) {
  4465. return {
  4466. x: 0,
  4467. y: 0 };
  4468. }
  4469. if (e.touches && e.touches[0]) {
  4470. return {
  4471. x: e.touches[0].pageX,
  4472. y: e.touches[0].pageY };
  4473. } else if (e.changedTouches && e.changedTouches[0]) {
  4474. return {
  4475. x: e.changedTouches[0].pageX,
  4476. y: e.changedTouches[0].pageY };
  4477. } else {
  4478. return {
  4479. x: e.clientX,
  4480. y: e.clientY };
  4481. }
  4482. };
  4483. /* 计算两点之间的角度: 区间 [0,90]*/
  4484. MeScroll.prototype.getAngle = function (p1, p2) {
  4485. var x = Math.abs(p1.x - p2.x);
  4486. var y = Math.abs(p1.y - p2.y);
  4487. var z = Math.sqrt(x * x + y * y);
  4488. var angle = 0;
  4489. if (z !== 0) {
  4490. angle = Math.asin(y / z) / Math.PI * 180;
  4491. }
  4492. return angle;
  4493. };
  4494. /* 触发下拉刷新 */
  4495. MeScroll.prototype.triggerDownScroll = function () {
  4496. if (this.optDown.beforeLoading && this.optDown.beforeLoading(this)) {
  4497. //return true则处于完全自定义状态
  4498. } else {
  4499. this.showDownScroll(); // 下拉刷新中...
  4500. !this.optDown.native && this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  4501. }
  4502. };
  4503. /* 显示下拉进度布局 */
  4504. MeScroll.prototype.showDownScroll = function () {
  4505. this.isDownScrolling = true; // 标记下拉中
  4506. if (this.optDown.native) {
  4507. uni.startPullDownRefresh(); // 系统自带的下拉刷新
  4508. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  4509. } else {
  4510. this.downHight = this.optDown.offset; // 更新下拉区域高度
  4511. this.showDownLoadingCall(this.downHight); // 下拉刷新中...
  4512. }
  4513. };
  4514. MeScroll.prototype.showDownLoadingCall = function (downHight) {
  4515. this.optDown.showLoading && this.optDown.showLoading(this, downHight); // 下拉刷新中...
  4516. this.optDown.afterLoading && this.optDown.afterLoading(this, downHight); // 下拉刷新中...触发之后马上要执行的代码
  4517. };
  4518. /* 显示系统自带的下拉刷新时需要处理的业务 */
  4519. MeScroll.prototype.onPullDownRefresh = function () {
  4520. this.isDownScrolling = true; // 标记下拉中
  4521. this.showDownLoadingCall(0); // 仍触发showLoading,因为上拉加载用到
  4522. this.optDown.callback && this.optDown.callback(this); // 执行回调,联网加载数据
  4523. };
  4524. /* 结束下拉刷新 */
  4525. MeScroll.prototype.endDownScroll = function () {
  4526. if (this.optDown.native) {// 结束原生下拉刷新
  4527. this.isDownScrolling = false;
  4528. this.endDownScrollCall(this);
  4529. uni.stopPullDownRefresh();
  4530. return;
  4531. }
  4532. var me = this;
  4533. // 结束下拉刷新的方法
  4534. var endScroll = function endScroll() {
  4535. me.downHight = 0;
  4536. me.isDownScrolling = false;
  4537. me.endDownScrollCall(me);
  4538. if (!me.isScrollBody) {
  4539. me.setScrollHeight(0); // scroll-view重置滚动区域,使数据不满屏时仍可检查触发翻页
  4540. me.scrollTo(0, 0); // scroll-view需重置滚动条到顶部,避免startTop大于0时,对下拉刷新的影响
  4541. }
  4542. };
  4543. // 结束下拉刷新时的回调
  4544. var delay = 0;
  4545. if (me.optDown.beforeEndDownScroll) {
  4546. delay = me.optDown.beforeEndDownScroll(me); // 结束下拉刷新的延时,单位ms
  4547. if (me.isDownEndSuccess == null) delay = 0; // 没有执行加载中,则不延时
  4548. }
  4549. if (typeof delay === 'number' && delay > 0) {
  4550. setTimeout(endScroll, delay);
  4551. } else {
  4552. endScroll();
  4553. }
  4554. };
  4555. MeScroll.prototype.endDownScrollCall = function () {
  4556. this.optDown.endDownScroll && this.optDown.endDownScroll(this);
  4557. this.optDown.afterEndDownScroll && this.optDown.afterEndDownScroll(this);
  4558. };
  4559. /* 锁定下拉刷新:isLock=ture,null锁定;isLock=false解锁 */
  4560. MeScroll.prototype.lockDownScroll = function (isLock) {
  4561. if (isLock == null) isLock = true;
  4562. this.optDown.isLock = isLock;
  4563. };
  4564. /* 锁定上拉加载:isLock=ture,null锁定;isLock=false解锁 */
  4565. MeScroll.prototype.lockUpScroll = function (isLock) {
  4566. if (isLock == null) isLock = true;
  4567. this.optUp.isLock = isLock;
  4568. };
  4569. /* -------初始化上拉加载------- */
  4570. MeScroll.prototype.initUpScroll = function () {
  4571. var me = this;
  4572. // 配置参数
  4573. me.optUp = me.options.up || { use: false };
  4574. if (!me.optUp.textColor && me.hasColor(me.optUp.bgColor)) me.optUp.textColor = "#fff"; // 当bgColor有值且textColor未设置,则textColor默认白色
  4575. me.extendUpScroll(me.optUp);
  4576. if (me.optUp.use === false) return; // 配置不使用上拉加载时,则不初始化上拉布局
  4577. me.optUp.hasNext = true; // 如果使用上拉,则默认有下一页
  4578. me.startNum = me.optUp.page.num + 1; // 记录page开始的页码
  4579. // 初始化完毕的回调
  4580. if (me.optUp.inited) {
  4581. setTimeout(function () {// 待主线程执行完毕再执行,避免new MeScroll未初始化,在回调获取不到mescroll的实例
  4582. me.optUp.inited(me);
  4583. }, 0);
  4584. }
  4585. };
  4586. /*滚动到底部的事件 (仅mescroll-body生效)*/
  4587. MeScroll.prototype.onReachBottom = function () {
  4588. if (this.isScrollBody && !this.isUpScrolling) {// 只能支持下拉刷新的时候同时可以触发上拉加载,否则滚动到底部就需要上滑一点才能触发onReachBottom
  4589. if (!this.optUp.isLock && this.optUp.hasNext) {
  4590. this.triggerUpScroll();
  4591. }
  4592. }
  4593. };
  4594. /*列表滚动事件 (仅mescroll-body生效)*/
  4595. MeScroll.prototype.onPageScroll = function (e) {
  4596. if (!this.isScrollBody) return;
  4597. // 更新滚动条的位置 (主要用于判断下拉刷新时,滚动条是否在顶部)
  4598. this.setScrollTop(e.scrollTop);
  4599. // 顶部按钮的显示隐藏
  4600. if (e.scrollTop >= this.optUp.toTop.offset) {
  4601. this.showTopBtn();
  4602. } else {
  4603. this.hideTopBtn();
  4604. }
  4605. };
  4606. /*列表滚动事件*/
  4607. MeScroll.prototype.scroll = function (e, onScroll) {
  4608. // 更新滚动条的位置
  4609. this.setScrollTop(e.scrollTop);
  4610. // 更新滚动内容高度
  4611. this.setScrollHeight(e.scrollHeight);
  4612. // 向上滑还是向下滑动
  4613. if (this.preScrollY == null) this.preScrollY = 0;
  4614. this.isScrollUp = e.scrollTop - this.preScrollY > 0;
  4615. this.preScrollY = e.scrollTop;
  4616. // 上滑 && 检查并触发上拉
  4617. this.isScrollUp && this.triggerUpScroll(true);
  4618. // 顶部按钮的显示隐藏
  4619. if (e.scrollTop >= this.optUp.toTop.offset) {
  4620. this.showTopBtn();
  4621. } else {
  4622. this.hideTopBtn();
  4623. }
  4624. // 滑动监听
  4625. this.optUp.onScroll && onScroll && onScroll();
  4626. };
  4627. /* 触发上拉加载 */
  4628. MeScroll.prototype.triggerUpScroll = function (isCheck) {
  4629. if (!this.isUpScrolling && this.optUp.use && this.optUp.callback) {
  4630. // 是否校验在底部; 默认不校验
  4631. if (isCheck === true) {
  4632. var canUp = false;
  4633. // 还有下一页 && 没有锁定 && 不在下拉中
  4634. if (this.optUp.hasNext && !this.optUp.isLock && !this.isDownScrolling) {
  4635. if (this.getScrollBottom() <= this.optUp.offset) {// 到底部
  4636. canUp = true; // 标记可上拉
  4637. }
  4638. }
  4639. if (canUp === false) return;
  4640. }
  4641. this.showUpScroll(); // 上拉加载中...
  4642. this.optUp.page.num++; // 预先加一页,如果失败则减回
  4643. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  4644. this.num = this.optUp.page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  4645. this.size = this.optUp.page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  4646. this.time = this.optUp.page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  4647. this.optUp.callback(this); // 执行回调,联网加载数据
  4648. }
  4649. };
  4650. /* 显示上拉加载中 */
  4651. MeScroll.prototype.showUpScroll = function () {
  4652. this.isUpScrolling = true; // 标记上拉加载中
  4653. this.optUp.showLoading && this.optUp.showLoading(this); // 回调
  4654. };
  4655. /* 显示上拉无更多数据 */
  4656. MeScroll.prototype.showNoMore = function () {
  4657. this.optUp.hasNext = false; // 标记无更多数据
  4658. this.optUp.showNoMore && this.optUp.showNoMore(this); // 回调
  4659. };
  4660. /* 隐藏上拉区域**/
  4661. MeScroll.prototype.hideUpScroll = function () {
  4662. this.optUp.hideUpScroll && this.optUp.hideUpScroll(this); // 回调
  4663. };
  4664. /* 结束上拉加载 */
  4665. MeScroll.prototype.endUpScroll = function (isShowNoMore) {
  4666. if (isShowNoMore != null) {// isShowNoMore=null,不处理下拉状态,下拉刷新的时候调用
  4667. if (isShowNoMore) {
  4668. this.showNoMore(); // isShowNoMore=true,显示无更多数据
  4669. } else {
  4670. this.hideUpScroll(); // isShowNoMore=false,隐藏上拉加载
  4671. }
  4672. }
  4673. this.isUpScrolling = false; // 标记结束上拉加载
  4674. };
  4675. /* 重置上拉加载列表为第一页
  4676. *isShowLoading 是否显示进度布局;
  4677. * 1.默认null,不传参,则显示上拉加载的进度布局
  4678. * 2.传参true, 则显示下拉刷新的进度布局
  4679. * 3.传参false,则不显示上拉和下拉的进度 (常用于静默更新列表数据)
  4680. */
  4681. MeScroll.prototype.resetUpScroll = function (isShowLoading) {
  4682. if (this.optUp && this.optUp.use) {
  4683. var page = this.optUp.page;
  4684. this.prePageNum = page.num; // 缓存重置前的页码,加载失败可退回
  4685. this.prePageTime = page.time; // 缓存重置前的时间,加载失败可退回
  4686. page.num = this.startNum; // 重置为第一页
  4687. page.time = null; // 重置时间为空
  4688. if (!this.isDownScrolling && isShowLoading !== false) {// 如果不是下拉刷新触发的resetUpScroll并且不配置列表静默更新,则显示进度;
  4689. if (isShowLoading == null) {
  4690. this.removeEmpty(); // 移除空布局
  4691. this.showUpScroll(); // 不传参,默认显示上拉加载的进度布局
  4692. } else {
  4693. this.showDownScroll(); // 传true,显示下拉刷新的进度布局,不清空列表
  4694. }
  4695. }
  4696. this.isUpAutoLoad = true; // 标记上拉已经自动执行过,避免初始化时多次触发上拉回调
  4697. this.num = page.num; // 把最新的页数赋值在mescroll上,避免对page的影响
  4698. this.size = page.size; // 把最新的页码赋值在mescroll上,避免对page的影响
  4699. this.time = page.time; // 把最新的页码赋值在mescroll上,避免对page的影响
  4700. this.optUp.callback && this.optUp.callback(this); // 执行上拉回调
  4701. }
  4702. };
  4703. /* 设置page.num的值 */
  4704. MeScroll.prototype.setPageNum = function (num) {
  4705. this.optUp.page.num = num - 1;
  4706. };
  4707. /* 设置page.size的值 */
  4708. MeScroll.prototype.setPageSize = function (size) {
  4709. this.optUp.page.size = size;
  4710. };
  4711. /* 联网回调成功,结束下拉刷新和上拉加载
  4712. * dataSize: 当前页的数据量(必传)
  4713. * totalPage: 总页数(必传)
  4714. * systime: 服务器时间 (可空)
  4715. */
  4716. MeScroll.prototype.endByPage = function (dataSize, totalPage, systime) {
  4717. var hasNext;
  4718. if (this.optUp.use && totalPage != null) hasNext = this.optUp.page.num < totalPage; // 是否还有下一页
  4719. this.endSuccess(dataSize, hasNext, systime);
  4720. };
  4721. /* 联网回调成功,结束下拉刷新和上拉加载
  4722. * dataSize: 当前页的数据量(必传)
  4723. * totalSize: 列表所有数据总数量(必传)
  4724. * systime: 服务器时间 (可空)
  4725. */
  4726. MeScroll.prototype.endBySize = function (dataSize, totalSize, systime) {
  4727. var hasNext;
  4728. if (this.optUp.use && totalSize != null) {
  4729. var loadSize = (this.optUp.page.num - 1) * this.optUp.page.size + dataSize; // 已加载的数据总数
  4730. hasNext = loadSize < totalSize; // 是否还有下一页
  4731. }
  4732. this.endSuccess(dataSize, hasNext, systime);
  4733. };
  4734. /* 联网回调成功,结束下拉刷新和上拉加载
  4735. * dataSize: 当前页的数据个数(不是所有页的数据总和),用于上拉加载判断是否还有下一页.如果不传,则会判断还有下一页
  4736. * hasNext: 是否还有下一页,布尔类型;用来解决这个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据dataSize判断,则需翻到第三页才会知道无更多数据,如果传了hasNext,则翻到第二页即可显示无更多数据.
  4737. * systime: 服务器时间(可空);用来解决这个小问题:当准备翻下一页时,数据库新增了几条记录,此时翻下一页,前面的几条数据会和上一页的重复;这里传入了systime,那么upCallback的page.time就会有值,把page.time传给服务器,让后台过滤新加入的那几条记录
  4738. */
  4739. MeScroll.prototype.endSuccess = function (dataSize, hasNext, systime) {
  4740. var me = this;
  4741. // 结束下拉刷新
  4742. if (me.isDownScrolling) {
  4743. me.isDownEndSuccess = true;
  4744. me.endDownScroll();
  4745. }
  4746. // 结束上拉加载
  4747. if (me.optUp.use) {
  4748. var isShowNoMore; // 是否已无更多数据
  4749. if (dataSize != null) {
  4750. var pageNum = me.optUp.page.num; // 当前页码
  4751. var pageSize = me.optUp.page.size; // 每页长度
  4752. // 如果是第一页
  4753. if (pageNum === 1) {
  4754. if (systime) me.optUp.page.time = systime; // 设置加载列表数据第一页的时间
  4755. }
  4756. if (dataSize < pageSize || hasNext === false) {
  4757. // 返回的数据不满一页时,则说明已无更多数据
  4758. me.optUp.hasNext = false;
  4759. if (dataSize === 0 && pageNum === 1) {
  4760. // 如果第一页无任何数据且配置了空布局
  4761. isShowNoMore = false;
  4762. me.showEmpty();
  4763. } else {
  4764. // 总列表数少于配置的数量,则不显示无更多数据
  4765. var allDataSize = (pageNum - 1) * pageSize + dataSize;
  4766. if (allDataSize < me.optUp.noMoreSize) {
  4767. isShowNoMore = false;
  4768. } else {
  4769. isShowNoMore = true;
  4770. }
  4771. me.removeEmpty(); // 移除空布局
  4772. }
  4773. } else {
  4774. // 还有下一页
  4775. isShowNoMore = false;
  4776. me.optUp.hasNext = true;
  4777. me.removeEmpty(); // 移除空布局
  4778. }
  4779. }
  4780. // 隐藏上拉
  4781. me.endUpScroll(isShowNoMore);
  4782. }
  4783. };
  4784. /* 回调失败,结束下拉刷新和上拉加载 */
  4785. MeScroll.prototype.endErr = function (errDistance) {
  4786. // 结束下拉,回调失败重置回原来的页码和时间
  4787. if (this.isDownScrolling) {
  4788. this.isDownEndSuccess = false;
  4789. var page = this.optUp.page;
  4790. if (page && this.prePageNum) {
  4791. page.num = this.prePageNum;
  4792. page.time = this.prePageTime;
  4793. }
  4794. this.endDownScroll();
  4795. }
  4796. // 结束上拉,回调失败重置回原来的页码
  4797. if (this.isUpScrolling) {
  4798. this.optUp.page.num--;
  4799. this.endUpScroll(false);
  4800. // 如果是mescroll-body,则需往回滚一定距离
  4801. if (this.isScrollBody && errDistance !== 0) {// 不处理0
  4802. if (!errDistance) errDistance = this.optUp.errDistance; // 不传,则取默认
  4803. this.scrollTo(this.getScrollTop() - errDistance, 0); // 往上回滚的距离
  4804. }
  4805. }
  4806. };
  4807. /* 显示空布局 */
  4808. MeScroll.prototype.showEmpty = function () {
  4809. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(true);
  4810. };
  4811. /* 移除空布局 */
  4812. MeScroll.prototype.removeEmpty = function () {
  4813. this.optUp.empty.use && this.optUp.empty.onShow && this.optUp.empty.onShow(false);
  4814. };
  4815. /* 显示回到顶部的按钮 */
  4816. MeScroll.prototype.showTopBtn = function () {
  4817. if (!this.topBtnShow) {
  4818. this.topBtnShow = true;
  4819. this.optUp.toTop.onShow && this.optUp.toTop.onShow(true);
  4820. }
  4821. };
  4822. /* 隐藏回到顶部的按钮 */
  4823. MeScroll.prototype.hideTopBtn = function () {
  4824. if (this.topBtnShow) {
  4825. this.topBtnShow = false;
  4826. this.optUp.toTop.onShow && this.optUp.toTop.onShow(false);
  4827. }
  4828. };
  4829. /* 获取滚动条的位置 */
  4830. MeScroll.prototype.getScrollTop = function () {
  4831. return this.scrollTop || 0;
  4832. };
  4833. /* 记录滚动条的位置 */
  4834. MeScroll.prototype.setScrollTop = function (y) {
  4835. this.scrollTop = y;
  4836. };
  4837. /* 滚动到指定位置 */
  4838. MeScroll.prototype.scrollTo = function (y, t) {
  4839. this.myScrollTo && this.myScrollTo(y, t); // scrollview需自定义回到顶部方法
  4840. };
  4841. /* 自定义scrollTo */
  4842. MeScroll.prototype.resetScrollTo = function (myScrollTo) {
  4843. this.myScrollTo = myScrollTo;
  4844. };
  4845. /* 滚动条到底部的距离 */
  4846. MeScroll.prototype.getScrollBottom = function () {
  4847. return this.getScrollHeight() - this.getClientHeight() - this.getScrollTop();
  4848. };
  4849. /* 计步器
  4850. star: 开始值
  4851. end: 结束值
  4852. callback(step,timer): 回调step值,计步器timer,可自行通过window.clearInterval(timer)结束计步器;
  4853. t: 计步时长,传0则直接回调end值;不传则默认300ms
  4854. rate: 周期;不传则默认30ms计步一次
  4855. * */
  4856. MeScroll.prototype.getStep = function (star, end, callback, t, rate) {
  4857. var diff = end - star; // 差值
  4858. if (t === 0 || diff === 0) {
  4859. callback && callback(end);
  4860. return;
  4861. }
  4862. t = t || 300; // 时长 300ms
  4863. rate = rate || 30; // 周期 30ms
  4864. var count = t / rate; // 次数
  4865. var step = diff / count; // 步长
  4866. var i = 0; // 计数
  4867. var timer = setInterval(function () {
  4868. if (i < count - 1) {
  4869. star += step;
  4870. callback && callback(star, timer);
  4871. i++;
  4872. } else {
  4873. callback && callback(end, timer); // 最后一次直接设置end,避免计算误差
  4874. clearInterval(timer);
  4875. }
  4876. }, rate);
  4877. };
  4878. /* 滚动容器的高度 */
  4879. MeScroll.prototype.getClientHeight = function (isReal) {
  4880. var h = this.clientHeight || 0;
  4881. if (h === 0 && isReal !== true) {// 未获取到容器的高度,可临时取body的高度 (可能会有误差)
  4882. h = this.getBodyHeight();
  4883. }
  4884. return h;
  4885. };
  4886. MeScroll.prototype.setClientHeight = function (h) {
  4887. this.clientHeight = h;
  4888. };
  4889. /* 滚动内容的高度 */
  4890. MeScroll.prototype.getScrollHeight = function () {
  4891. return this.scrollHeight || 0;
  4892. };
  4893. MeScroll.prototype.setScrollHeight = function (h) {
  4894. this.scrollHeight = h;
  4895. };
  4896. /* body的高度 */
  4897. MeScroll.prototype.getBodyHeight = function () {
  4898. return this.bodyHeight || 0;
  4899. };
  4900. MeScroll.prototype.setBodyHeight = function (h) {
  4901. this.bodyHeight = h;
  4902. };
  4903. /* 阻止浏览器默认滚动事件 */
  4904. MeScroll.prototype.preventDefault = function (e) {
  4905. // 小程序不支持e.preventDefault, 已在wxs中禁止
  4906. // app的bounce只能通过配置pages.json的style.app-plus.bounce为"none"来禁止, 或使用renderjs禁止
  4907. // cancelable:是否可以被禁用; defaultPrevented:是否已经被禁用
  4908. if (e && e.cancelable && !e.defaultPrevented) e.preventDefault();
  4909. };
  4910. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  4911. /***/ }),
  4912. /***/ 187:
  4913. /*!*******************************************************************************!*\
  4914. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/mescroll-uni-option.js ***!
  4915. \*******************************************************************************/
  4916. /*! no static exports found */
  4917. /***/ (function(module, exports, __webpack_require__) {
  4918. "use strict";
  4919. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 全局配置
  4920. // mescroll-body 和 mescroll-uni 通用
  4921. var GlobalOption = {
  4922. down: {
  4923. // 其他down的配置参数也可以写,这里只展示了常用的配置:
  4924. textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
  4925. textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
  4926. textLoading: '加载中 ...', // 加载中的提示文本
  4927. textSuccess: '加载成功', // 加载成功的文本
  4928. textErr: '加载失败', // 加载失败的文本
  4929. beforeEndDelay: 100, // 延时结束的时长 (显示加载成功/失败的时长)
  4930. offset: 80, // 在列表顶部,下拉大于80px,松手即可触发下拉刷新的回调
  4931. native: false // 是否使用系统自带的下拉刷新; 默认false; 仅在mescroll-body生效 (值为true时,还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)
  4932. },
  4933. up: {
  4934. // 其他up的配置参数也可以写,这里只展示了常用的配置:
  4935. textLoading: '加载中 ...', // 加载中的提示文本
  4936. textNoMore: '-- END --', // 没有更多数据的提示文本
  4937. offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
  4938. toTop: {
  4939. // 回到顶部按钮,需配置src才显示
  4940. src: "https://www.mescroll.com/img/mescroll-totop.png", // 图片路径 (建议放入static目录, 如 /static/img/mescroll-totop.png )
  4941. offset: 1000, // 列表滚动多少距离才显示回到顶部按钮,默认1000px
  4942. right: 20, // 到右边的距离, 默认20 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4943. bottom: 120, // 到底部的距离, 默认120 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4944. width: 72 // 回到顶部图标的宽度, 默认72 (支持"20rpx", "20px", "20%"格式的值, 纯数字则默认单位rpx)
  4945. },
  4946. empty: {
  4947. use: true, // 是否显示空布局
  4948. icon: "https://www.mescroll.com/img/mescroll-empty.png", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
  4949. tip: '~ 空空如也 ~' // 提示
  4950. } } };var _default =
  4951. GlobalOption;exports.default = _default;
  4952. /***/ }),
  4953. /***/ 188:
  4954. /*!**********************************************************************!*\
  4955. !*** D:/wwwroot/cqcarbonwxapp/components/mescroll-uni/wxs/mixins.js ***!
  4956. \**********************************************************************/
  4957. /*! no static exports found */
  4958. /***/ (function(module, exports, __webpack_require__) {
  4959. "use strict";
  4960. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 定义在wxs (含renderjs) 逻辑层的数据和方法, 与视图层相互通信
  4961. var WxsMixin = {
  4962. data: function data() {
  4963. return {
  4964. // 传入wxs视图层的数据 (响应式)
  4965. wxsProp: {
  4966. optDown: {}, // 下拉刷新的配置
  4967. scrollTop: 0, // 滚动条的距离
  4968. bodyHeight: 0, // body的高度
  4969. isDownScrolling: false, // 是否正在下拉刷新中
  4970. isUpScrolling: false, // 是否正在上拉加载中
  4971. isScrollBody: true, // 是否为mescroll-body滚动
  4972. isUpBoth: true, // 上拉加载时,是否同时可以下拉刷新
  4973. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4974. },
  4975. // 标记调用wxs视图层的方法
  4976. callProp: {
  4977. callType: '', // 方法名
  4978. t: 0 // 数据更新的标记 (只有数据更新了,才会触发wxs的Observer)
  4979. },
  4980. // 不用wxs的平台使用此处的wxsBiz对象,抹平wxs的写法 (微信小程序和APP使用的wxsBiz对象是./wxs/wxs.wxs)
  4981. // 不用renderjs的平台使用此处的renderBiz对象,抹平renderjs的写法 (app 和 h5 使用的renderBiz对象是./wxs/renderjs.js)
  4982. renderBiz: {
  4983. propObserver: function propObserver() {} // 抹平renderjs的写法
  4984. } };
  4985. },
  4986. methods: {
  4987. // wxs视图层调用逻辑层的回调
  4988. wxsCall: function wxsCall(msg) {
  4989. if (msg.type === 'setWxsProp') {
  4990. // 更新wxsProp数据 (值改变才触发更新)
  4991. this.wxsProp = {
  4992. optDown: this.mescroll.optDown,
  4993. scrollTop: this.mescroll.getScrollTop(),
  4994. bodyHeight: this.mescroll.getBodyHeight(),
  4995. isDownScrolling: this.mescroll.isDownScrolling,
  4996. isUpScrolling: this.mescroll.isUpScrolling,
  4997. isUpBoth: this.mescroll.optUp.isBoth,
  4998. isScrollBody: this.mescroll.isScrollBody,
  4999. t: Date.now() };
  5000. } else if (msg.type === 'setLoadType') {
  5001. // 设置inOffset,outOffset的状态
  5002. this.downLoadType = msg.downLoadType;
  5003. // 状态挂载到mescroll对象, 以便在其他组件中使用, 比如<me-video>中
  5004. this.$set(this.mescroll, 'downLoadType', this.downLoadType);
  5005. // 重置是否加载成功的状态
  5006. this.$set(this.mescroll, 'isDownEndSuccess', null);
  5007. } else if (msg.type === 'triggerDownScroll') {
  5008. // 主动触发下拉刷新
  5009. this.mescroll.triggerDownScroll();
  5010. } else if (msg.type === 'endDownScroll') {
  5011. // 结束下拉刷新
  5012. this.mescroll.endDownScroll();
  5013. } else if (msg.type === 'triggerUpScroll') {
  5014. // 主动触发上拉加载
  5015. this.mescroll.triggerUpScroll(true);
  5016. }
  5017. } },
  5018. mounted: function mounted() {var _this = this;
  5019. // 配置主动触发wxs显示加载进度的回调
  5020. this.mescroll.optDown.afterLoading = function () {
  5021. _this.callProp = { callType: "showLoading", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  5022. };
  5023. // 配置主动触发wxs隐藏加载进度的回调
  5024. this.mescroll.optDown.afterEndDownScroll = function () {
  5025. _this.callProp = { callType: "endDownScroll", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  5026. var delay = 300 + (_this.mescroll.optDown.beforeEndDelay || 0);
  5027. setTimeout(function () {
  5028. if (_this.downLoadType === 4 || _this.downLoadType === 0) {
  5029. _this.callProp = { callType: "clearTransform", t: Date.now() }; // 触发wxs的方法 (值改变才触发更新)
  5030. }
  5031. // 状态挂载到mescroll对象, 以便在其他组件中使用, 比如<me-video>中
  5032. _this.$set(_this.mescroll, 'downLoadType', _this.downLoadType);
  5033. }, delay);
  5034. };
  5035. // 初始化wxs的数据
  5036. this.wxsCall({ type: 'setWxsProp' });
  5037. } };var _default =
  5038. WxsMixin;exports.default = _default;
  5039. /***/ }),
  5040. /***/ 19:
  5041. /*!*****************************************************************************************!*\
  5042. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/dispatchRequest.js ***!
  5043. \*****************************************************************************************/
  5044. /*! no static exports found */
  5045. /***/ (function(module, exports, __webpack_require__) {
  5046. "use strict";
  5047. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _index = _interopRequireDefault(__webpack_require__(/*! ../adapters/index */ 20));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
  5048. function _default(config) {
  5049. return (0, _index.default)(config);
  5050. };exports.default = _default;
  5051. /***/ }),
  5052. /***/ 2:
  5053. /*!******************************************************************************************!*\
  5054. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  5055. \******************************************************************************************/
  5056. /*! exports provided: default */
  5057. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5058. "use strict";
  5059. __webpack_require__.r(__webpack_exports__);
  5060. /* WEBPACK VAR INJECTION */(function(global) {/*!
  5061. * Vue.js v2.6.11
  5062. * (c) 2014-2020 Evan You
  5063. * Released under the MIT License.
  5064. */
  5065. /* */
  5066. var emptyObject = Object.freeze({});
  5067. // These helpers produce better VM code in JS engines due to their
  5068. // explicitness and function inlining.
  5069. function isUndef (v) {
  5070. return v === undefined || v === null
  5071. }
  5072. function isDef (v) {
  5073. return v !== undefined && v !== null
  5074. }
  5075. function isTrue (v) {
  5076. return v === true
  5077. }
  5078. function isFalse (v) {
  5079. return v === false
  5080. }
  5081. /**
  5082. * Check if value is primitive.
  5083. */
  5084. function isPrimitive (value) {
  5085. return (
  5086. typeof value === 'string' ||
  5087. typeof value === 'number' ||
  5088. // $flow-disable-line
  5089. typeof value === 'symbol' ||
  5090. typeof value === 'boolean'
  5091. )
  5092. }
  5093. /**
  5094. * Quick object check - this is primarily used to tell
  5095. * Objects from primitive values when we know the value
  5096. * is a JSON-compliant type.
  5097. */
  5098. function isObject (obj) {
  5099. return obj !== null && typeof obj === 'object'
  5100. }
  5101. /**
  5102. * Get the raw type string of a value, e.g., [object Object].
  5103. */
  5104. var _toString = Object.prototype.toString;
  5105. function toRawType (value) {
  5106. return _toString.call(value).slice(8, -1)
  5107. }
  5108. /**
  5109. * Strict object type check. Only returns true
  5110. * for plain JavaScript objects.
  5111. */
  5112. function isPlainObject (obj) {
  5113. return _toString.call(obj) === '[object Object]'
  5114. }
  5115. function isRegExp (v) {
  5116. return _toString.call(v) === '[object RegExp]'
  5117. }
  5118. /**
  5119. * Check if val is a valid array index.
  5120. */
  5121. function isValidArrayIndex (val) {
  5122. var n = parseFloat(String(val));
  5123. return n >= 0 && Math.floor(n) === n && isFinite(val)
  5124. }
  5125. function isPromise (val) {
  5126. return (
  5127. isDef(val) &&
  5128. typeof val.then === 'function' &&
  5129. typeof val.catch === 'function'
  5130. )
  5131. }
  5132. /**
  5133. * Convert a value to a string that is actually rendered.
  5134. */
  5135. function toString (val) {
  5136. return val == null
  5137. ? ''
  5138. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  5139. ? JSON.stringify(val, null, 2)
  5140. : String(val)
  5141. }
  5142. /**
  5143. * Convert an input value to a number for persistence.
  5144. * If the conversion fails, return original string.
  5145. */
  5146. function toNumber (val) {
  5147. var n = parseFloat(val);
  5148. return isNaN(n) ? val : n
  5149. }
  5150. /**
  5151. * Make a map and return a function for checking if a key
  5152. * is in that map.
  5153. */
  5154. function makeMap (
  5155. str,
  5156. expectsLowerCase
  5157. ) {
  5158. var map = Object.create(null);
  5159. var list = str.split(',');
  5160. for (var i = 0; i < list.length; i++) {
  5161. map[list[i]] = true;
  5162. }
  5163. return expectsLowerCase
  5164. ? function (val) { return map[val.toLowerCase()]; }
  5165. : function (val) { return map[val]; }
  5166. }
  5167. /**
  5168. * Check if a tag is a built-in tag.
  5169. */
  5170. var isBuiltInTag = makeMap('slot,component', true);
  5171. /**
  5172. * Check if an attribute is a reserved attribute.
  5173. */
  5174. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  5175. /**
  5176. * Remove an item from an array.
  5177. */
  5178. function remove (arr, item) {
  5179. if (arr.length) {
  5180. var index = arr.indexOf(item);
  5181. if (index > -1) {
  5182. return arr.splice(index, 1)
  5183. }
  5184. }
  5185. }
  5186. /**
  5187. * Check whether an object has the property.
  5188. */
  5189. var hasOwnProperty = Object.prototype.hasOwnProperty;
  5190. function hasOwn (obj, key) {
  5191. return hasOwnProperty.call(obj, key)
  5192. }
  5193. /**
  5194. * Create a cached version of a pure function.
  5195. */
  5196. function cached (fn) {
  5197. var cache = Object.create(null);
  5198. return (function cachedFn (str) {
  5199. var hit = cache[str];
  5200. return hit || (cache[str] = fn(str))
  5201. })
  5202. }
  5203. /**
  5204. * Camelize a hyphen-delimited string.
  5205. */
  5206. var camelizeRE = /-(\w)/g;
  5207. var camelize = cached(function (str) {
  5208. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  5209. });
  5210. /**
  5211. * Capitalize a string.
  5212. */
  5213. var capitalize = cached(function (str) {
  5214. return str.charAt(0).toUpperCase() + str.slice(1)
  5215. });
  5216. /**
  5217. * Hyphenate a camelCase string.
  5218. */
  5219. var hyphenateRE = /\B([A-Z])/g;
  5220. var hyphenate = cached(function (str) {
  5221. return str.replace(hyphenateRE, '-$1').toLowerCase()
  5222. });
  5223. /**
  5224. * Simple bind polyfill for environments that do not support it,
  5225. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  5226. * since native bind is now performant enough in most browsers.
  5227. * But removing it would mean breaking code that was able to run in
  5228. * PhantomJS 1.x, so this must be kept for backward compatibility.
  5229. */
  5230. /* istanbul ignore next */
  5231. function polyfillBind (fn, ctx) {
  5232. function boundFn (a) {
  5233. var l = arguments.length;
  5234. return l
  5235. ? l > 1
  5236. ? fn.apply(ctx, arguments)
  5237. : fn.call(ctx, a)
  5238. : fn.call(ctx)
  5239. }
  5240. boundFn._length = fn.length;
  5241. return boundFn
  5242. }
  5243. function nativeBind (fn, ctx) {
  5244. return fn.bind(ctx)
  5245. }
  5246. var bind = Function.prototype.bind
  5247. ? nativeBind
  5248. : polyfillBind;
  5249. /**
  5250. * Convert an Array-like object to a real Array.
  5251. */
  5252. function toArray (list, start) {
  5253. start = start || 0;
  5254. var i = list.length - start;
  5255. var ret = new Array(i);
  5256. while (i--) {
  5257. ret[i] = list[i + start];
  5258. }
  5259. return ret
  5260. }
  5261. /**
  5262. * Mix properties into target object.
  5263. */
  5264. function extend (to, _from) {
  5265. for (var key in _from) {
  5266. to[key] = _from[key];
  5267. }
  5268. return to
  5269. }
  5270. /**
  5271. * Merge an Array of Objects into a single Object.
  5272. */
  5273. function toObject (arr) {
  5274. var res = {};
  5275. for (var i = 0; i < arr.length; i++) {
  5276. if (arr[i]) {
  5277. extend(res, arr[i]);
  5278. }
  5279. }
  5280. return res
  5281. }
  5282. /* eslint-disable no-unused-vars */
  5283. /**
  5284. * Perform no operation.
  5285. * Stubbing args to make Flow happy without leaving useless transpiled code
  5286. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  5287. */
  5288. function noop (a, b, c) {}
  5289. /**
  5290. * Always return false.
  5291. */
  5292. var no = function (a, b, c) { return false; };
  5293. /* eslint-enable no-unused-vars */
  5294. /**
  5295. * Return the same value.
  5296. */
  5297. var identity = function (_) { return _; };
  5298. /**
  5299. * Check if two values are loosely equal - that is,
  5300. * if they are plain objects, do they have the same shape?
  5301. */
  5302. function looseEqual (a, b) {
  5303. if (a === b) { return true }
  5304. var isObjectA = isObject(a);
  5305. var isObjectB = isObject(b);
  5306. if (isObjectA && isObjectB) {
  5307. try {
  5308. var isArrayA = Array.isArray(a);
  5309. var isArrayB = Array.isArray(b);
  5310. if (isArrayA && isArrayB) {
  5311. return a.length === b.length && a.every(function (e, i) {
  5312. return looseEqual(e, b[i])
  5313. })
  5314. } else if (a instanceof Date && b instanceof Date) {
  5315. return a.getTime() === b.getTime()
  5316. } else if (!isArrayA && !isArrayB) {
  5317. var keysA = Object.keys(a);
  5318. var keysB = Object.keys(b);
  5319. return keysA.length === keysB.length && keysA.every(function (key) {
  5320. return looseEqual(a[key], b[key])
  5321. })
  5322. } else {
  5323. /* istanbul ignore next */
  5324. return false
  5325. }
  5326. } catch (e) {
  5327. /* istanbul ignore next */
  5328. return false
  5329. }
  5330. } else if (!isObjectA && !isObjectB) {
  5331. return String(a) === String(b)
  5332. } else {
  5333. return false
  5334. }
  5335. }
  5336. /**
  5337. * Return the first index at which a loosely equal value can be
  5338. * found in the array (if value is a plain object, the array must
  5339. * contain an object of the same shape), or -1 if it is not present.
  5340. */
  5341. function looseIndexOf (arr, val) {
  5342. for (var i = 0; i < arr.length; i++) {
  5343. if (looseEqual(arr[i], val)) { return i }
  5344. }
  5345. return -1
  5346. }
  5347. /**
  5348. * Ensure a function is called only once.
  5349. */
  5350. function once (fn) {
  5351. var called = false;
  5352. return function () {
  5353. if (!called) {
  5354. called = true;
  5355. fn.apply(this, arguments);
  5356. }
  5357. }
  5358. }
  5359. var ASSET_TYPES = [
  5360. 'component',
  5361. 'directive',
  5362. 'filter'
  5363. ];
  5364. var LIFECYCLE_HOOKS = [
  5365. 'beforeCreate',
  5366. 'created',
  5367. 'beforeMount',
  5368. 'mounted',
  5369. 'beforeUpdate',
  5370. 'updated',
  5371. 'beforeDestroy',
  5372. 'destroyed',
  5373. 'activated',
  5374. 'deactivated',
  5375. 'errorCaptured',
  5376. 'serverPrefetch'
  5377. ];
  5378. /* */
  5379. var config = ({
  5380. /**
  5381. * Option merge strategies (used in core/util/options)
  5382. */
  5383. // $flow-disable-line
  5384. optionMergeStrategies: Object.create(null),
  5385. /**
  5386. * Whether to suppress warnings.
  5387. */
  5388. silent: false,
  5389. /**
  5390. * Show production mode tip message on boot?
  5391. */
  5392. productionTip: "development" !== 'production',
  5393. /**
  5394. * Whether to enable devtools
  5395. */
  5396. devtools: "development" !== 'production',
  5397. /**
  5398. * Whether to record perf
  5399. */
  5400. performance: false,
  5401. /**
  5402. * Error handler for watcher errors
  5403. */
  5404. errorHandler: null,
  5405. /**
  5406. * Warn handler for watcher warns
  5407. */
  5408. warnHandler: null,
  5409. /**
  5410. * Ignore certain custom elements
  5411. */
  5412. ignoredElements: [],
  5413. /**
  5414. * Custom user key aliases for v-on
  5415. */
  5416. // $flow-disable-line
  5417. keyCodes: Object.create(null),
  5418. /**
  5419. * Check if a tag is reserved so that it cannot be registered as a
  5420. * component. This is platform-dependent and may be overwritten.
  5421. */
  5422. isReservedTag: no,
  5423. /**
  5424. * Check if an attribute is reserved so that it cannot be used as a component
  5425. * prop. This is platform-dependent and may be overwritten.
  5426. */
  5427. isReservedAttr: no,
  5428. /**
  5429. * Check if a tag is an unknown element.
  5430. * Platform-dependent.
  5431. */
  5432. isUnknownElement: no,
  5433. /**
  5434. * Get the namespace of an element
  5435. */
  5436. getTagNamespace: noop,
  5437. /**
  5438. * Parse the real tag name for the specific platform.
  5439. */
  5440. parsePlatformTagName: identity,
  5441. /**
  5442. * Check if an attribute must be bound using property, e.g. value
  5443. * Platform-dependent.
  5444. */
  5445. mustUseProp: no,
  5446. /**
  5447. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  5448. * This will significantly reduce performance if set to false.
  5449. */
  5450. async: true,
  5451. /**
  5452. * Exposed for legacy reasons
  5453. */
  5454. _lifecycleHooks: LIFECYCLE_HOOKS
  5455. });
  5456. /* */
  5457. /**
  5458. * unicode letters used for parsing html tags, component names and property paths.
  5459. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  5460. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  5461. */
  5462. 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/;
  5463. /**
  5464. * Check if a string starts with $ or _
  5465. */
  5466. function isReserved (str) {
  5467. var c = (str + '').charCodeAt(0);
  5468. return c === 0x24 || c === 0x5F
  5469. }
  5470. /**
  5471. * Define a property.
  5472. */
  5473. function def (obj, key, val, enumerable) {
  5474. Object.defineProperty(obj, key, {
  5475. value: val,
  5476. enumerable: !!enumerable,
  5477. writable: true,
  5478. configurable: true
  5479. });
  5480. }
  5481. /**
  5482. * Parse simple path.
  5483. */
  5484. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  5485. function parsePath (path) {
  5486. if (bailRE.test(path)) {
  5487. return
  5488. }
  5489. var segments = path.split('.');
  5490. return function (obj) {
  5491. for (var i = 0; i < segments.length; i++) {
  5492. if (!obj) { return }
  5493. obj = obj[segments[i]];
  5494. }
  5495. return obj
  5496. }
  5497. }
  5498. /* */
  5499. // can we use __proto__?
  5500. var hasProto = '__proto__' in {};
  5501. // Browser environment sniffing
  5502. var inBrowser = typeof window !== 'undefined';
  5503. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5504. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5505. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5506. var isIE = UA && /msie|trident/.test(UA);
  5507. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5508. var isEdge = UA && UA.indexOf('edge/') > 0;
  5509. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5510. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5511. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5512. var isPhantomJS = UA && /phantomjs/.test(UA);
  5513. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5514. // Firefox has a "watch" function on Object.prototype...
  5515. var nativeWatch = ({}).watch;
  5516. if (inBrowser) {
  5517. try {
  5518. var opts = {};
  5519. Object.defineProperty(opts, 'passive', ({
  5520. get: function get () {
  5521. }
  5522. })); // https://github.com/facebook/flow/issues/285
  5523. window.addEventListener('test-passive', null, opts);
  5524. } catch (e) {}
  5525. }
  5526. // this needs to be lazy-evaled because vue may be required before
  5527. // vue-server-renderer can set VUE_ENV
  5528. var _isServer;
  5529. var isServerRendering = function () {
  5530. if (_isServer === undefined) {
  5531. /* istanbul ignore if */
  5532. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5533. // detect presence of vue-server-renderer and avoid
  5534. // Webpack shimming the process
  5535. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5536. } else {
  5537. _isServer = false;
  5538. }
  5539. }
  5540. return _isServer
  5541. };
  5542. // detect devtools
  5543. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5544. /* istanbul ignore next */
  5545. function isNative (Ctor) {
  5546. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5547. }
  5548. var hasSymbol =
  5549. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5550. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5551. var _Set;
  5552. /* istanbul ignore if */ // $flow-disable-line
  5553. if (typeof Set !== 'undefined' && isNative(Set)) {
  5554. // use native Set when available.
  5555. _Set = Set;
  5556. } else {
  5557. // a non-standard Set polyfill that only works with primitive keys.
  5558. _Set = /*@__PURE__*/(function () {
  5559. function Set () {
  5560. this.set = Object.create(null);
  5561. }
  5562. Set.prototype.has = function has (key) {
  5563. return this.set[key] === true
  5564. };
  5565. Set.prototype.add = function add (key) {
  5566. this.set[key] = true;
  5567. };
  5568. Set.prototype.clear = function clear () {
  5569. this.set = Object.create(null);
  5570. };
  5571. return Set;
  5572. }());
  5573. }
  5574. /* */
  5575. var warn = noop;
  5576. var tip = noop;
  5577. var generateComponentTrace = (noop); // work around flow check
  5578. var formatComponentName = (noop);
  5579. if (true) {
  5580. var hasConsole = typeof console !== 'undefined';
  5581. var classifyRE = /(?:^|[-_])(\w)/g;
  5582. var classify = function (str) { return str
  5583. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5584. .replace(/[-_]/g, ''); };
  5585. warn = function (msg, vm) {
  5586. var trace = vm ? generateComponentTrace(vm) : '';
  5587. if (config.warnHandler) {
  5588. config.warnHandler.call(null, msg, vm, trace);
  5589. } else if (hasConsole && (!config.silent)) {
  5590. console.error(("[Vue warn]: " + msg + trace));
  5591. }
  5592. };
  5593. tip = function (msg, vm) {
  5594. if (hasConsole && (!config.silent)) {
  5595. console.warn("[Vue tip]: " + msg + (
  5596. vm ? generateComponentTrace(vm) : ''
  5597. ));
  5598. }
  5599. };
  5600. formatComponentName = function (vm, includeFile) {
  5601. if (vm.$root === vm) {
  5602. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5603. return ('') + vm.$options.__file
  5604. }
  5605. return '<Root>'
  5606. }
  5607. var options = typeof vm === 'function' && vm.cid != null
  5608. ? vm.options
  5609. : vm._isVue
  5610. ? vm.$options || vm.constructor.options
  5611. : vm;
  5612. var name = options.name || options._componentTag;
  5613. var file = options.__file;
  5614. if (!name && file) {
  5615. var match = file.match(/([^/\\]+)\.vue$/);
  5616. name = match && match[1];
  5617. }
  5618. return (
  5619. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5620. (file && includeFile !== false ? (" at " + file) : '')
  5621. )
  5622. };
  5623. var repeat = function (str, n) {
  5624. var res = '';
  5625. while (n) {
  5626. if (n % 2 === 1) { res += str; }
  5627. if (n > 1) { str += str; }
  5628. n >>= 1;
  5629. }
  5630. return res
  5631. };
  5632. generateComponentTrace = function (vm) {
  5633. if (vm._isVue && vm.$parent) {
  5634. var tree = [];
  5635. var currentRecursiveSequence = 0;
  5636. while (vm && vm.$options.name !== 'PageBody') {
  5637. if (tree.length > 0) {
  5638. var last = tree[tree.length - 1];
  5639. if (last.constructor === vm.constructor) {
  5640. currentRecursiveSequence++;
  5641. vm = vm.$parent;
  5642. continue
  5643. } else if (currentRecursiveSequence > 0) {
  5644. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5645. currentRecursiveSequence = 0;
  5646. }
  5647. }
  5648. !vm.$options.isReserved && tree.push(vm);
  5649. vm = vm.$parent;
  5650. }
  5651. return '\n\nfound in\n\n' + tree
  5652. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5653. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5654. : formatComponentName(vm))); })
  5655. .join('\n')
  5656. } else {
  5657. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5658. }
  5659. };
  5660. }
  5661. /* */
  5662. var uid = 0;
  5663. /**
  5664. * A dep is an observable that can have multiple
  5665. * directives subscribing to it.
  5666. */
  5667. var Dep = function Dep () {
  5668. this.id = uid++;
  5669. this.subs = [];
  5670. };
  5671. Dep.prototype.addSub = function addSub (sub) {
  5672. this.subs.push(sub);
  5673. };
  5674. Dep.prototype.removeSub = function removeSub (sub) {
  5675. remove(this.subs, sub);
  5676. };
  5677. Dep.prototype.depend = function depend () {
  5678. if (Dep.SharedObject.target) {
  5679. Dep.SharedObject.target.addDep(this);
  5680. }
  5681. };
  5682. Dep.prototype.notify = function notify () {
  5683. // stabilize the subscriber list first
  5684. var subs = this.subs.slice();
  5685. if ( true && !config.async) {
  5686. // subs aren't sorted in scheduler if not running async
  5687. // we need to sort them now to make sure they fire in correct
  5688. // order
  5689. subs.sort(function (a, b) { return a.id - b.id; });
  5690. }
  5691. for (var i = 0, l = subs.length; i < l; i++) {
  5692. subs[i].update();
  5693. }
  5694. };
  5695. // The current target watcher being evaluated.
  5696. // This is globally unique because only one watcher
  5697. // can be evaluated at a time.
  5698. // fixed by xxxxxx (nvue shared vuex)
  5699. /* eslint-disable no-undef */
  5700. Dep.SharedObject = {};
  5701. Dep.SharedObject.target = null;
  5702. Dep.SharedObject.targetStack = [];
  5703. function pushTarget (target) {
  5704. Dep.SharedObject.targetStack.push(target);
  5705. Dep.SharedObject.target = target;
  5706. Dep.target = target;
  5707. }
  5708. function popTarget () {
  5709. Dep.SharedObject.targetStack.pop();
  5710. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5711. Dep.target = Dep.SharedObject.target;
  5712. }
  5713. /* */
  5714. var VNode = function VNode (
  5715. tag,
  5716. data,
  5717. children,
  5718. text,
  5719. elm,
  5720. context,
  5721. componentOptions,
  5722. asyncFactory
  5723. ) {
  5724. this.tag = tag;
  5725. this.data = data;
  5726. this.children = children;
  5727. this.text = text;
  5728. this.elm = elm;
  5729. this.ns = undefined;
  5730. this.context = context;
  5731. this.fnContext = undefined;
  5732. this.fnOptions = undefined;
  5733. this.fnScopeId = undefined;
  5734. this.key = data && data.key;
  5735. this.componentOptions = componentOptions;
  5736. this.componentInstance = undefined;
  5737. this.parent = undefined;
  5738. this.raw = false;
  5739. this.isStatic = false;
  5740. this.isRootInsert = true;
  5741. this.isComment = false;
  5742. this.isCloned = false;
  5743. this.isOnce = false;
  5744. this.asyncFactory = asyncFactory;
  5745. this.asyncMeta = undefined;
  5746. this.isAsyncPlaceholder = false;
  5747. };
  5748. var prototypeAccessors = { child: { configurable: true } };
  5749. // DEPRECATED: alias for componentInstance for backwards compat.
  5750. /* istanbul ignore next */
  5751. prototypeAccessors.child.get = function () {
  5752. return this.componentInstance
  5753. };
  5754. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5755. var createEmptyVNode = function (text) {
  5756. if ( text === void 0 ) text = '';
  5757. var node = new VNode();
  5758. node.text = text;
  5759. node.isComment = true;
  5760. return node
  5761. };
  5762. function createTextVNode (val) {
  5763. return new VNode(undefined, undefined, undefined, String(val))
  5764. }
  5765. // optimized shallow clone
  5766. // used for static nodes and slot nodes because they may be reused across
  5767. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5768. // on their elm reference.
  5769. function cloneVNode (vnode) {
  5770. var cloned = new VNode(
  5771. vnode.tag,
  5772. vnode.data,
  5773. // #7975
  5774. // clone children array to avoid mutating original in case of cloning
  5775. // a child.
  5776. vnode.children && vnode.children.slice(),
  5777. vnode.text,
  5778. vnode.elm,
  5779. vnode.context,
  5780. vnode.componentOptions,
  5781. vnode.asyncFactory
  5782. );
  5783. cloned.ns = vnode.ns;
  5784. cloned.isStatic = vnode.isStatic;
  5785. cloned.key = vnode.key;
  5786. cloned.isComment = vnode.isComment;
  5787. cloned.fnContext = vnode.fnContext;
  5788. cloned.fnOptions = vnode.fnOptions;
  5789. cloned.fnScopeId = vnode.fnScopeId;
  5790. cloned.asyncMeta = vnode.asyncMeta;
  5791. cloned.isCloned = true;
  5792. return cloned
  5793. }
  5794. /*
  5795. * not type checking this file because flow doesn't play well with
  5796. * dynamically accessing methods on Array prototype
  5797. */
  5798. var arrayProto = Array.prototype;
  5799. var arrayMethods = Object.create(arrayProto);
  5800. var methodsToPatch = [
  5801. 'push',
  5802. 'pop',
  5803. 'shift',
  5804. 'unshift',
  5805. 'splice',
  5806. 'sort',
  5807. 'reverse'
  5808. ];
  5809. /**
  5810. * Intercept mutating methods and emit events
  5811. */
  5812. methodsToPatch.forEach(function (method) {
  5813. // cache original method
  5814. var original = arrayProto[method];
  5815. def(arrayMethods, method, function mutator () {
  5816. var args = [], len = arguments.length;
  5817. while ( len-- ) args[ len ] = arguments[ len ];
  5818. var result = original.apply(this, args);
  5819. var ob = this.__ob__;
  5820. var inserted;
  5821. switch (method) {
  5822. case 'push':
  5823. case 'unshift':
  5824. inserted = args;
  5825. break
  5826. case 'splice':
  5827. inserted = args.slice(2);
  5828. break
  5829. }
  5830. if (inserted) { ob.observeArray(inserted); }
  5831. // notify change
  5832. ob.dep.notify();
  5833. return result
  5834. });
  5835. });
  5836. /* */
  5837. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5838. /**
  5839. * In some cases we may want to disable observation inside a component's
  5840. * update computation.
  5841. */
  5842. var shouldObserve = true;
  5843. function toggleObserving (value) {
  5844. shouldObserve = value;
  5845. }
  5846. /**
  5847. * Observer class that is attached to each observed
  5848. * object. Once attached, the observer converts the target
  5849. * object's property keys into getter/setters that
  5850. * collect dependencies and dispatch updates.
  5851. */
  5852. var Observer = function Observer (value) {
  5853. this.value = value;
  5854. this.dep = new Dep();
  5855. this.vmCount = 0;
  5856. def(value, '__ob__', this);
  5857. if (Array.isArray(value)) {
  5858. if (hasProto) {
  5859. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5860. if(value.push !== value.__proto__.push){
  5861. copyAugment(value, arrayMethods, arrayKeys);
  5862. } else {
  5863. protoAugment(value, arrayMethods);
  5864. }
  5865. }
  5866. } else {
  5867. copyAugment(value, arrayMethods, arrayKeys);
  5868. }
  5869. this.observeArray(value);
  5870. } else {
  5871. this.walk(value);
  5872. }
  5873. };
  5874. /**
  5875. * Walk through all properties and convert them into
  5876. * getter/setters. This method should only be called when
  5877. * value type is Object.
  5878. */
  5879. Observer.prototype.walk = function walk (obj) {
  5880. var keys = Object.keys(obj);
  5881. for (var i = 0; i < keys.length; i++) {
  5882. defineReactive$$1(obj, keys[i]);
  5883. }
  5884. };
  5885. /**
  5886. * Observe a list of Array items.
  5887. */
  5888. Observer.prototype.observeArray = function observeArray (items) {
  5889. for (var i = 0, l = items.length; i < l; i++) {
  5890. observe(items[i]);
  5891. }
  5892. };
  5893. // helpers
  5894. /**
  5895. * Augment a target Object or Array by intercepting
  5896. * the prototype chain using __proto__
  5897. */
  5898. function protoAugment (target, src) {
  5899. /* eslint-disable no-proto */
  5900. target.__proto__ = src;
  5901. /* eslint-enable no-proto */
  5902. }
  5903. /**
  5904. * Augment a target Object or Array by defining
  5905. * hidden properties.
  5906. */
  5907. /* istanbul ignore next */
  5908. function copyAugment (target, src, keys) {
  5909. for (var i = 0, l = keys.length; i < l; i++) {
  5910. var key = keys[i];
  5911. def(target, key, src[key]);
  5912. }
  5913. }
  5914. /**
  5915. * Attempt to create an observer instance for a value,
  5916. * returns the new observer if successfully observed,
  5917. * or the existing observer if the value already has one.
  5918. */
  5919. function observe (value, asRootData) {
  5920. if (!isObject(value) || value instanceof VNode) {
  5921. return
  5922. }
  5923. var ob;
  5924. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5925. ob = value.__ob__;
  5926. } else if (
  5927. shouldObserve &&
  5928. !isServerRendering() &&
  5929. (Array.isArray(value) || isPlainObject(value)) &&
  5930. Object.isExtensible(value) &&
  5931. !value._isVue
  5932. ) {
  5933. ob = new Observer(value);
  5934. }
  5935. if (asRootData && ob) {
  5936. ob.vmCount++;
  5937. }
  5938. return ob
  5939. }
  5940. /**
  5941. * Define a reactive property on an Object.
  5942. */
  5943. function defineReactive$$1 (
  5944. obj,
  5945. key,
  5946. val,
  5947. customSetter,
  5948. shallow
  5949. ) {
  5950. var dep = new Dep();
  5951. var property = Object.getOwnPropertyDescriptor(obj, key);
  5952. if (property && property.configurable === false) {
  5953. return
  5954. }
  5955. // cater for pre-defined getter/setters
  5956. var getter = property && property.get;
  5957. var setter = property && property.set;
  5958. if ((!getter || setter) && arguments.length === 2) {
  5959. val = obj[key];
  5960. }
  5961. var childOb = !shallow && observe(val);
  5962. Object.defineProperty(obj, key, {
  5963. enumerable: true,
  5964. configurable: true,
  5965. get: function reactiveGetter () {
  5966. var value = getter ? getter.call(obj) : val;
  5967. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5968. dep.depend();
  5969. if (childOb) {
  5970. childOb.dep.depend();
  5971. if (Array.isArray(value)) {
  5972. dependArray(value);
  5973. }
  5974. }
  5975. }
  5976. return value
  5977. },
  5978. set: function reactiveSetter (newVal) {
  5979. var value = getter ? getter.call(obj) : val;
  5980. /* eslint-disable no-self-compare */
  5981. if (newVal === value || (newVal !== newVal && value !== value)) {
  5982. return
  5983. }
  5984. /* eslint-enable no-self-compare */
  5985. if ( true && customSetter) {
  5986. customSetter();
  5987. }
  5988. // #7981: for accessor properties without setter
  5989. if (getter && !setter) { return }
  5990. if (setter) {
  5991. setter.call(obj, newVal);
  5992. } else {
  5993. val = newVal;
  5994. }
  5995. childOb = !shallow && observe(newVal);
  5996. dep.notify();
  5997. }
  5998. });
  5999. }
  6000. /**
  6001. * Set a property on an object. Adds the new property and
  6002. * triggers change notification if the property doesn't
  6003. * already exist.
  6004. */
  6005. function set (target, key, val) {
  6006. if ( true &&
  6007. (isUndef(target) || isPrimitive(target))
  6008. ) {
  6009. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  6010. }
  6011. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6012. target.length = Math.max(target.length, key);
  6013. target.splice(key, 1, val);
  6014. return val
  6015. }
  6016. if (key in target && !(key in Object.prototype)) {
  6017. target[key] = val;
  6018. return val
  6019. }
  6020. var ob = (target).__ob__;
  6021. if (target._isVue || (ob && ob.vmCount)) {
  6022. true && warn(
  6023. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  6024. 'at runtime - declare it upfront in the data option.'
  6025. );
  6026. return val
  6027. }
  6028. if (!ob) {
  6029. target[key] = val;
  6030. return val
  6031. }
  6032. defineReactive$$1(ob.value, key, val);
  6033. ob.dep.notify();
  6034. return val
  6035. }
  6036. /**
  6037. * Delete a property and trigger change if necessary.
  6038. */
  6039. function del (target, key) {
  6040. if ( true &&
  6041. (isUndef(target) || isPrimitive(target))
  6042. ) {
  6043. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  6044. }
  6045. if (Array.isArray(target) && isValidArrayIndex(key)) {
  6046. target.splice(key, 1);
  6047. return
  6048. }
  6049. var ob = (target).__ob__;
  6050. if (target._isVue || (ob && ob.vmCount)) {
  6051. true && warn(
  6052. 'Avoid deleting properties on a Vue instance or its root $data ' +
  6053. '- just set it to null.'
  6054. );
  6055. return
  6056. }
  6057. if (!hasOwn(target, key)) {
  6058. return
  6059. }
  6060. delete target[key];
  6061. if (!ob) {
  6062. return
  6063. }
  6064. ob.dep.notify();
  6065. }
  6066. /**
  6067. * Collect dependencies on array elements when the array is touched, since
  6068. * we cannot intercept array element access like property getters.
  6069. */
  6070. function dependArray (value) {
  6071. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  6072. e = value[i];
  6073. e && e.__ob__ && e.__ob__.dep.depend();
  6074. if (Array.isArray(e)) {
  6075. dependArray(e);
  6076. }
  6077. }
  6078. }
  6079. /* */
  6080. /**
  6081. * Option overwriting strategies are functions that handle
  6082. * how to merge a parent option value and a child option
  6083. * value into the final value.
  6084. */
  6085. var strats = config.optionMergeStrategies;
  6086. /**
  6087. * Options with restrictions
  6088. */
  6089. if (true) {
  6090. strats.el = strats.propsData = function (parent, child, vm, key) {
  6091. if (!vm) {
  6092. warn(
  6093. "option \"" + key + "\" can only be used during instance " +
  6094. 'creation with the `new` keyword.'
  6095. );
  6096. }
  6097. return defaultStrat(parent, child)
  6098. };
  6099. }
  6100. /**
  6101. * Helper that recursively merges two data objects together.
  6102. */
  6103. function mergeData (to, from) {
  6104. if (!from) { return to }
  6105. var key, toVal, fromVal;
  6106. var keys = hasSymbol
  6107. ? Reflect.ownKeys(from)
  6108. : Object.keys(from);
  6109. for (var i = 0; i < keys.length; i++) {
  6110. key = keys[i];
  6111. // in case the object is already observed...
  6112. if (key === '__ob__') { continue }
  6113. toVal = to[key];
  6114. fromVal = from[key];
  6115. if (!hasOwn(to, key)) {
  6116. set(to, key, fromVal);
  6117. } else if (
  6118. toVal !== fromVal &&
  6119. isPlainObject(toVal) &&
  6120. isPlainObject(fromVal)
  6121. ) {
  6122. mergeData(toVal, fromVal);
  6123. }
  6124. }
  6125. return to
  6126. }
  6127. /**
  6128. * Data
  6129. */
  6130. function mergeDataOrFn (
  6131. parentVal,
  6132. childVal,
  6133. vm
  6134. ) {
  6135. if (!vm) {
  6136. // in a Vue.extend merge, both should be functions
  6137. if (!childVal) {
  6138. return parentVal
  6139. }
  6140. if (!parentVal) {
  6141. return childVal
  6142. }
  6143. // when parentVal & childVal are both present,
  6144. // we need to return a function that returns the
  6145. // merged result of both functions... no need to
  6146. // check if parentVal is a function here because
  6147. // it has to be a function to pass previous merges.
  6148. return function mergedDataFn () {
  6149. return mergeData(
  6150. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  6151. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  6152. )
  6153. }
  6154. } else {
  6155. return function mergedInstanceDataFn () {
  6156. // instance merge
  6157. var instanceData = typeof childVal === 'function'
  6158. ? childVal.call(vm, vm)
  6159. : childVal;
  6160. var defaultData = typeof parentVal === 'function'
  6161. ? parentVal.call(vm, vm)
  6162. : parentVal;
  6163. if (instanceData) {
  6164. return mergeData(instanceData, defaultData)
  6165. } else {
  6166. return defaultData
  6167. }
  6168. }
  6169. }
  6170. }
  6171. strats.data = function (
  6172. parentVal,
  6173. childVal,
  6174. vm
  6175. ) {
  6176. if (!vm) {
  6177. if (childVal && typeof childVal !== 'function') {
  6178. true && warn(
  6179. 'The "data" option should be a function ' +
  6180. 'that returns a per-instance value in component ' +
  6181. 'definitions.',
  6182. vm
  6183. );
  6184. return parentVal
  6185. }
  6186. return mergeDataOrFn(parentVal, childVal)
  6187. }
  6188. return mergeDataOrFn(parentVal, childVal, vm)
  6189. };
  6190. /**
  6191. * Hooks and props are merged as arrays.
  6192. */
  6193. function mergeHook (
  6194. parentVal,
  6195. childVal
  6196. ) {
  6197. var res = childVal
  6198. ? parentVal
  6199. ? parentVal.concat(childVal)
  6200. : Array.isArray(childVal)
  6201. ? childVal
  6202. : [childVal]
  6203. : parentVal;
  6204. return res
  6205. ? dedupeHooks(res)
  6206. : res
  6207. }
  6208. function dedupeHooks (hooks) {
  6209. var res = [];
  6210. for (var i = 0; i < hooks.length; i++) {
  6211. if (res.indexOf(hooks[i]) === -1) {
  6212. res.push(hooks[i]);
  6213. }
  6214. }
  6215. return res
  6216. }
  6217. LIFECYCLE_HOOKS.forEach(function (hook) {
  6218. strats[hook] = mergeHook;
  6219. });
  6220. /**
  6221. * Assets
  6222. *
  6223. * When a vm is present (instance creation), we need to do
  6224. * a three-way merge between constructor options, instance
  6225. * options and parent options.
  6226. */
  6227. function mergeAssets (
  6228. parentVal,
  6229. childVal,
  6230. vm,
  6231. key
  6232. ) {
  6233. var res = Object.create(parentVal || null);
  6234. if (childVal) {
  6235. true && assertObjectType(key, childVal, vm);
  6236. return extend(res, childVal)
  6237. } else {
  6238. return res
  6239. }
  6240. }
  6241. ASSET_TYPES.forEach(function (type) {
  6242. strats[type + 's'] = mergeAssets;
  6243. });
  6244. /**
  6245. * Watchers.
  6246. *
  6247. * Watchers hashes should not overwrite one
  6248. * another, so we merge them as arrays.
  6249. */
  6250. strats.watch = function (
  6251. parentVal,
  6252. childVal,
  6253. vm,
  6254. key
  6255. ) {
  6256. // work around Firefox's Object.prototype.watch...
  6257. if (parentVal === nativeWatch) { parentVal = undefined; }
  6258. if (childVal === nativeWatch) { childVal = undefined; }
  6259. /* istanbul ignore if */
  6260. if (!childVal) { return Object.create(parentVal || null) }
  6261. if (true) {
  6262. assertObjectType(key, childVal, vm);
  6263. }
  6264. if (!parentVal) { return childVal }
  6265. var ret = {};
  6266. extend(ret, parentVal);
  6267. for (var key$1 in childVal) {
  6268. var parent = ret[key$1];
  6269. var child = childVal[key$1];
  6270. if (parent && !Array.isArray(parent)) {
  6271. parent = [parent];
  6272. }
  6273. ret[key$1] = parent
  6274. ? parent.concat(child)
  6275. : Array.isArray(child) ? child : [child];
  6276. }
  6277. return ret
  6278. };
  6279. /**
  6280. * Other object hashes.
  6281. */
  6282. strats.props =
  6283. strats.methods =
  6284. strats.inject =
  6285. strats.computed = function (
  6286. parentVal,
  6287. childVal,
  6288. vm,
  6289. key
  6290. ) {
  6291. if (childVal && "development" !== 'production') {
  6292. assertObjectType(key, childVal, vm);
  6293. }
  6294. if (!parentVal) { return childVal }
  6295. var ret = Object.create(null);
  6296. extend(ret, parentVal);
  6297. if (childVal) { extend(ret, childVal); }
  6298. return ret
  6299. };
  6300. strats.provide = mergeDataOrFn;
  6301. /**
  6302. * Default strategy.
  6303. */
  6304. var defaultStrat = function (parentVal, childVal) {
  6305. return childVal === undefined
  6306. ? parentVal
  6307. : childVal
  6308. };
  6309. /**
  6310. * Validate component names
  6311. */
  6312. function checkComponents (options) {
  6313. for (var key in options.components) {
  6314. validateComponentName(key);
  6315. }
  6316. }
  6317. function validateComponentName (name) {
  6318. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  6319. warn(
  6320. 'Invalid component name: "' + name + '". Component names ' +
  6321. 'should conform to valid custom element name in html5 specification.'
  6322. );
  6323. }
  6324. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  6325. warn(
  6326. 'Do not use built-in or reserved HTML elements as component ' +
  6327. 'id: ' + name
  6328. );
  6329. }
  6330. }
  6331. /**
  6332. * Ensure all props option syntax are normalized into the
  6333. * Object-based format.
  6334. */
  6335. function normalizeProps (options, vm) {
  6336. var props = options.props;
  6337. if (!props) { return }
  6338. var res = {};
  6339. var i, val, name;
  6340. if (Array.isArray(props)) {
  6341. i = props.length;
  6342. while (i--) {
  6343. val = props[i];
  6344. if (typeof val === 'string') {
  6345. name = camelize(val);
  6346. res[name] = { type: null };
  6347. } else if (true) {
  6348. warn('props must be strings when using array syntax.');
  6349. }
  6350. }
  6351. } else if (isPlainObject(props)) {
  6352. for (var key in props) {
  6353. val = props[key];
  6354. name = camelize(key);
  6355. res[name] = isPlainObject(val)
  6356. ? val
  6357. : { type: val };
  6358. }
  6359. } else if (true) {
  6360. warn(
  6361. "Invalid value for option \"props\": expected an Array or an Object, " +
  6362. "but got " + (toRawType(props)) + ".",
  6363. vm
  6364. );
  6365. }
  6366. options.props = res;
  6367. }
  6368. /**
  6369. * Normalize all injections into Object-based format
  6370. */
  6371. function normalizeInject (options, vm) {
  6372. var inject = options.inject;
  6373. if (!inject) { return }
  6374. var normalized = options.inject = {};
  6375. if (Array.isArray(inject)) {
  6376. for (var i = 0; i < inject.length; i++) {
  6377. normalized[inject[i]] = { from: inject[i] };
  6378. }
  6379. } else if (isPlainObject(inject)) {
  6380. for (var key in inject) {
  6381. var val = inject[key];
  6382. normalized[key] = isPlainObject(val)
  6383. ? extend({ from: key }, val)
  6384. : { from: val };
  6385. }
  6386. } else if (true) {
  6387. warn(
  6388. "Invalid value for option \"inject\": expected an Array or an Object, " +
  6389. "but got " + (toRawType(inject)) + ".",
  6390. vm
  6391. );
  6392. }
  6393. }
  6394. /**
  6395. * Normalize raw function directives into object format.
  6396. */
  6397. function normalizeDirectives (options) {
  6398. var dirs = options.directives;
  6399. if (dirs) {
  6400. for (var key in dirs) {
  6401. var def$$1 = dirs[key];
  6402. if (typeof def$$1 === 'function') {
  6403. dirs[key] = { bind: def$$1, update: def$$1 };
  6404. }
  6405. }
  6406. }
  6407. }
  6408. function assertObjectType (name, value, vm) {
  6409. if (!isPlainObject(value)) {
  6410. warn(
  6411. "Invalid value for option \"" + name + "\": expected an Object, " +
  6412. "but got " + (toRawType(value)) + ".",
  6413. vm
  6414. );
  6415. }
  6416. }
  6417. /**
  6418. * Merge two option objects into a new one.
  6419. * Core utility used in both instantiation and inheritance.
  6420. */
  6421. function mergeOptions (
  6422. parent,
  6423. child,
  6424. vm
  6425. ) {
  6426. if (true) {
  6427. checkComponents(child);
  6428. }
  6429. if (typeof child === 'function') {
  6430. child = child.options;
  6431. }
  6432. normalizeProps(child, vm);
  6433. normalizeInject(child, vm);
  6434. normalizeDirectives(child);
  6435. // Apply extends and mixins on the child options,
  6436. // but only if it is a raw options object that isn't
  6437. // the result of another mergeOptions call.
  6438. // Only merged options has the _base property.
  6439. if (!child._base) {
  6440. if (child.extends) {
  6441. parent = mergeOptions(parent, child.extends, vm);
  6442. }
  6443. if (child.mixins) {
  6444. for (var i = 0, l = child.mixins.length; i < l; i++) {
  6445. parent = mergeOptions(parent, child.mixins[i], vm);
  6446. }
  6447. }
  6448. }
  6449. var options = {};
  6450. var key;
  6451. for (key in parent) {
  6452. mergeField(key);
  6453. }
  6454. for (key in child) {
  6455. if (!hasOwn(parent, key)) {
  6456. mergeField(key);
  6457. }
  6458. }
  6459. function mergeField (key) {
  6460. var strat = strats[key] || defaultStrat;
  6461. options[key] = strat(parent[key], child[key], vm, key);
  6462. }
  6463. return options
  6464. }
  6465. /**
  6466. * Resolve an asset.
  6467. * This function is used because child instances need access
  6468. * to assets defined in its ancestor chain.
  6469. */
  6470. function resolveAsset (
  6471. options,
  6472. type,
  6473. id,
  6474. warnMissing
  6475. ) {
  6476. /* istanbul ignore if */
  6477. if (typeof id !== 'string') {
  6478. return
  6479. }
  6480. var assets = options[type];
  6481. // check local registration variations first
  6482. if (hasOwn(assets, id)) { return assets[id] }
  6483. var camelizedId = camelize(id);
  6484. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  6485. var PascalCaseId = capitalize(camelizedId);
  6486. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  6487. // fallback to prototype chain
  6488. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  6489. if ( true && warnMissing && !res) {
  6490. warn(
  6491. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6492. options
  6493. );
  6494. }
  6495. return res
  6496. }
  6497. /* */
  6498. function validateProp (
  6499. key,
  6500. propOptions,
  6501. propsData,
  6502. vm
  6503. ) {
  6504. var prop = propOptions[key];
  6505. var absent = !hasOwn(propsData, key);
  6506. var value = propsData[key];
  6507. // boolean casting
  6508. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6509. if (booleanIndex > -1) {
  6510. if (absent && !hasOwn(prop, 'default')) {
  6511. value = false;
  6512. } else if (value === '' || value === hyphenate(key)) {
  6513. // only cast empty string / same name to boolean if
  6514. // boolean has higher priority
  6515. var stringIndex = getTypeIndex(String, prop.type);
  6516. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6517. value = true;
  6518. }
  6519. }
  6520. }
  6521. // check default value
  6522. if (value === undefined) {
  6523. value = getPropDefaultValue(vm, prop, key);
  6524. // since the default value is a fresh copy,
  6525. // make sure to observe it.
  6526. var prevShouldObserve = shouldObserve;
  6527. toggleObserving(true);
  6528. observe(value);
  6529. toggleObserving(prevShouldObserve);
  6530. }
  6531. if (
  6532. true
  6533. ) {
  6534. assertProp(prop, key, value, vm, absent);
  6535. }
  6536. return value
  6537. }
  6538. /**
  6539. * Get the default value of a prop.
  6540. */
  6541. function getPropDefaultValue (vm, prop, key) {
  6542. // no default, return undefined
  6543. if (!hasOwn(prop, 'default')) {
  6544. return undefined
  6545. }
  6546. var def = prop.default;
  6547. // warn against non-factory defaults for Object & Array
  6548. if ( true && isObject(def)) {
  6549. warn(
  6550. 'Invalid default value for prop "' + key + '": ' +
  6551. 'Props with type Object/Array must use a factory function ' +
  6552. 'to return the default value.',
  6553. vm
  6554. );
  6555. }
  6556. // the raw prop value was also undefined from previous render,
  6557. // return previous default value to avoid unnecessary watcher trigger
  6558. if (vm && vm.$options.propsData &&
  6559. vm.$options.propsData[key] === undefined &&
  6560. vm._props[key] !== undefined
  6561. ) {
  6562. return vm._props[key]
  6563. }
  6564. // call factory function for non-Function types
  6565. // a value is Function if its prototype is function even across different execution context
  6566. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6567. ? def.call(vm)
  6568. : def
  6569. }
  6570. /**
  6571. * Assert whether a prop is valid.
  6572. */
  6573. function assertProp (
  6574. prop,
  6575. name,
  6576. value,
  6577. vm,
  6578. absent
  6579. ) {
  6580. if (prop.required && absent) {
  6581. warn(
  6582. 'Missing required prop: "' + name + '"',
  6583. vm
  6584. );
  6585. return
  6586. }
  6587. if (value == null && !prop.required) {
  6588. return
  6589. }
  6590. var type = prop.type;
  6591. var valid = !type || type === true;
  6592. var expectedTypes = [];
  6593. if (type) {
  6594. if (!Array.isArray(type)) {
  6595. type = [type];
  6596. }
  6597. for (var i = 0; i < type.length && !valid; i++) {
  6598. var assertedType = assertType(value, type[i]);
  6599. expectedTypes.push(assertedType.expectedType || '');
  6600. valid = assertedType.valid;
  6601. }
  6602. }
  6603. if (!valid) {
  6604. warn(
  6605. getInvalidTypeMessage(name, value, expectedTypes),
  6606. vm
  6607. );
  6608. return
  6609. }
  6610. var validator = prop.validator;
  6611. if (validator) {
  6612. if (!validator(value)) {
  6613. warn(
  6614. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6615. vm
  6616. );
  6617. }
  6618. }
  6619. }
  6620. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6621. function assertType (value, type) {
  6622. var valid;
  6623. var expectedType = getType(type);
  6624. if (simpleCheckRE.test(expectedType)) {
  6625. var t = typeof value;
  6626. valid = t === expectedType.toLowerCase();
  6627. // for primitive wrapper objects
  6628. if (!valid && t === 'object') {
  6629. valid = value instanceof type;
  6630. }
  6631. } else if (expectedType === 'Object') {
  6632. valid = isPlainObject(value);
  6633. } else if (expectedType === 'Array') {
  6634. valid = Array.isArray(value);
  6635. } else {
  6636. valid = value instanceof type;
  6637. }
  6638. return {
  6639. valid: valid,
  6640. expectedType: expectedType
  6641. }
  6642. }
  6643. /**
  6644. * Use function string name to check built-in types,
  6645. * because a simple equality check will fail when running
  6646. * across different vms / iframes.
  6647. */
  6648. function getType (fn) {
  6649. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6650. return match ? match[1] : ''
  6651. }
  6652. function isSameType (a, b) {
  6653. return getType(a) === getType(b)
  6654. }
  6655. function getTypeIndex (type, expectedTypes) {
  6656. if (!Array.isArray(expectedTypes)) {
  6657. return isSameType(expectedTypes, type) ? 0 : -1
  6658. }
  6659. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6660. if (isSameType(expectedTypes[i], type)) {
  6661. return i
  6662. }
  6663. }
  6664. return -1
  6665. }
  6666. function getInvalidTypeMessage (name, value, expectedTypes) {
  6667. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6668. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6669. var expectedType = expectedTypes[0];
  6670. var receivedType = toRawType(value);
  6671. var expectedValue = styleValue(value, expectedType);
  6672. var receivedValue = styleValue(value, receivedType);
  6673. // check if we need to specify expected value
  6674. if (expectedTypes.length === 1 &&
  6675. isExplicable(expectedType) &&
  6676. !isBoolean(expectedType, receivedType)) {
  6677. message += " with value " + expectedValue;
  6678. }
  6679. message += ", got " + receivedType + " ";
  6680. // check if we need to specify received value
  6681. if (isExplicable(receivedType)) {
  6682. message += "with value " + receivedValue + ".";
  6683. }
  6684. return message
  6685. }
  6686. function styleValue (value, type) {
  6687. if (type === 'String') {
  6688. return ("\"" + value + "\"")
  6689. } else if (type === 'Number') {
  6690. return ("" + (Number(value)))
  6691. } else {
  6692. return ("" + value)
  6693. }
  6694. }
  6695. function isExplicable (value) {
  6696. var explicitTypes = ['string', 'number', 'boolean'];
  6697. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6698. }
  6699. function isBoolean () {
  6700. var args = [], len = arguments.length;
  6701. while ( len-- ) args[ len ] = arguments[ len ];
  6702. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6703. }
  6704. /* */
  6705. function handleError (err, vm, info) {
  6706. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6707. // See: https://github.com/vuejs/vuex/issues/1505
  6708. pushTarget();
  6709. try {
  6710. if (vm) {
  6711. var cur = vm;
  6712. while ((cur = cur.$parent)) {
  6713. var hooks = cur.$options.errorCaptured;
  6714. if (hooks) {
  6715. for (var i = 0; i < hooks.length; i++) {
  6716. try {
  6717. var capture = hooks[i].call(cur, err, vm, info) === false;
  6718. if (capture) { return }
  6719. } catch (e) {
  6720. globalHandleError(e, cur, 'errorCaptured hook');
  6721. }
  6722. }
  6723. }
  6724. }
  6725. }
  6726. globalHandleError(err, vm, info);
  6727. } finally {
  6728. popTarget();
  6729. }
  6730. }
  6731. function invokeWithErrorHandling (
  6732. handler,
  6733. context,
  6734. args,
  6735. vm,
  6736. info
  6737. ) {
  6738. var res;
  6739. try {
  6740. res = args ? handler.apply(context, args) : handler.call(context);
  6741. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6742. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6743. // issue #9511
  6744. // avoid catch triggering multiple times when nested calls
  6745. res._handled = true;
  6746. }
  6747. } catch (e) {
  6748. handleError(e, vm, info);
  6749. }
  6750. return res
  6751. }
  6752. function globalHandleError (err, vm, info) {
  6753. if (config.errorHandler) {
  6754. try {
  6755. return config.errorHandler.call(null, err, vm, info)
  6756. } catch (e) {
  6757. // if the user intentionally throws the original error in the handler,
  6758. // do not log it twice
  6759. if (e !== err) {
  6760. logError(e, null, 'config.errorHandler');
  6761. }
  6762. }
  6763. }
  6764. logError(err, vm, info);
  6765. }
  6766. function logError (err, vm, info) {
  6767. if (true) {
  6768. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6769. }
  6770. /* istanbul ignore else */
  6771. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6772. console.error(err);
  6773. } else {
  6774. throw err
  6775. }
  6776. }
  6777. /* */
  6778. var callbacks = [];
  6779. var pending = false;
  6780. function flushCallbacks () {
  6781. pending = false;
  6782. var copies = callbacks.slice(0);
  6783. callbacks.length = 0;
  6784. for (var i = 0; i < copies.length; i++) {
  6785. copies[i]();
  6786. }
  6787. }
  6788. // Here we have async deferring wrappers using microtasks.
  6789. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6790. // However, it has subtle problems when state is changed right before repaint
  6791. // (e.g. #6813, out-in transitions).
  6792. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6793. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6794. // So we now use microtasks everywhere, again.
  6795. // A major drawback of this tradeoff is that there are some scenarios
  6796. // where microtasks have too high a priority and fire in between supposedly
  6797. // sequential events (e.g. #4521, #6690, which have workarounds)
  6798. // or even between bubbling of the same event (#6566).
  6799. var timerFunc;
  6800. // The nextTick behavior leverages the microtask queue, which can be accessed
  6801. // via either native Promise.then or MutationObserver.
  6802. // MutationObserver has wider support, however it is seriously bugged in
  6803. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6804. // completely stops working after triggering a few times... so, if native
  6805. // Promise is available, we will use it:
  6806. /* istanbul ignore next, $flow-disable-line */
  6807. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6808. var p = Promise.resolve();
  6809. timerFunc = function () {
  6810. p.then(flushCallbacks);
  6811. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6812. // it can get stuck in a weird state where callbacks are pushed into the
  6813. // microtask queue but the queue isn't being flushed, until the browser
  6814. // needs to do some other work, e.g. handle a timer. Therefore we can
  6815. // "force" the microtask queue to be flushed by adding an empty timer.
  6816. if (isIOS) { setTimeout(noop); }
  6817. };
  6818. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6819. isNative(MutationObserver) ||
  6820. // PhantomJS and iOS 7.x
  6821. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6822. )) {
  6823. // Use MutationObserver where native Promise is not available,
  6824. // e.g. PhantomJS, iOS7, Android 4.4
  6825. // (#6466 MutationObserver is unreliable in IE11)
  6826. var counter = 1;
  6827. var observer = new MutationObserver(flushCallbacks);
  6828. var textNode = document.createTextNode(String(counter));
  6829. observer.observe(textNode, {
  6830. characterData: true
  6831. });
  6832. timerFunc = function () {
  6833. counter = (counter + 1) % 2;
  6834. textNode.data = String(counter);
  6835. };
  6836. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6837. // Fallback to setImmediate.
  6838. // Technically it leverages the (macro) task queue,
  6839. // but it is still a better choice than setTimeout.
  6840. timerFunc = function () {
  6841. setImmediate(flushCallbacks);
  6842. };
  6843. } else {
  6844. // Fallback to setTimeout.
  6845. timerFunc = function () {
  6846. setTimeout(flushCallbacks, 0);
  6847. };
  6848. }
  6849. function nextTick (cb, ctx) {
  6850. var _resolve;
  6851. callbacks.push(function () {
  6852. if (cb) {
  6853. try {
  6854. cb.call(ctx);
  6855. } catch (e) {
  6856. handleError(e, ctx, 'nextTick');
  6857. }
  6858. } else if (_resolve) {
  6859. _resolve(ctx);
  6860. }
  6861. });
  6862. if (!pending) {
  6863. pending = true;
  6864. timerFunc();
  6865. }
  6866. // $flow-disable-line
  6867. if (!cb && typeof Promise !== 'undefined') {
  6868. return new Promise(function (resolve) {
  6869. _resolve = resolve;
  6870. })
  6871. }
  6872. }
  6873. /* */
  6874. /* not type checking this file because flow doesn't play well with Proxy */
  6875. var initProxy;
  6876. if (true) {
  6877. var allowedGlobals = makeMap(
  6878. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6879. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6880. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6881. 'require' // for Webpack/Browserify
  6882. );
  6883. var warnNonPresent = function (target, key) {
  6884. warn(
  6885. "Property or method \"" + key + "\" is not defined on the instance but " +
  6886. 'referenced during render. Make sure that this property is reactive, ' +
  6887. 'either in the data option, or for class-based components, by ' +
  6888. 'initializing the property. ' +
  6889. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6890. target
  6891. );
  6892. };
  6893. var warnReservedPrefix = function (target, key) {
  6894. warn(
  6895. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6896. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6897. 'prevent conflicts with Vue internals. ' +
  6898. 'See: https://vuejs.org/v2/api/#data',
  6899. target
  6900. );
  6901. };
  6902. var hasProxy =
  6903. typeof Proxy !== 'undefined' && isNative(Proxy);
  6904. if (hasProxy) {
  6905. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6906. config.keyCodes = new Proxy(config.keyCodes, {
  6907. set: function set (target, key, value) {
  6908. if (isBuiltInModifier(key)) {
  6909. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6910. return false
  6911. } else {
  6912. target[key] = value;
  6913. return true
  6914. }
  6915. }
  6916. });
  6917. }
  6918. var hasHandler = {
  6919. has: function has (target, key) {
  6920. var has = key in target;
  6921. var isAllowed = allowedGlobals(key) ||
  6922. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6923. if (!has && !isAllowed) {
  6924. if (key in target.$data) { warnReservedPrefix(target, key); }
  6925. else { warnNonPresent(target, key); }
  6926. }
  6927. return has || !isAllowed
  6928. }
  6929. };
  6930. var getHandler = {
  6931. get: function get (target, key) {
  6932. if (typeof key === 'string' && !(key in target)) {
  6933. if (key in target.$data) { warnReservedPrefix(target, key); }
  6934. else { warnNonPresent(target, key); }
  6935. }
  6936. return target[key]
  6937. }
  6938. };
  6939. initProxy = function initProxy (vm) {
  6940. if (hasProxy) {
  6941. // determine which proxy handler to use
  6942. var options = vm.$options;
  6943. var handlers = options.render && options.render._withStripped
  6944. ? getHandler
  6945. : hasHandler;
  6946. vm._renderProxy = new Proxy(vm, handlers);
  6947. } else {
  6948. vm._renderProxy = vm;
  6949. }
  6950. };
  6951. }
  6952. /* */
  6953. var seenObjects = new _Set();
  6954. /**
  6955. * Recursively traverse an object to evoke all converted
  6956. * getters, so that every nested property inside the object
  6957. * is collected as a "deep" dependency.
  6958. */
  6959. function traverse (val) {
  6960. _traverse(val, seenObjects);
  6961. seenObjects.clear();
  6962. }
  6963. function _traverse (val, seen) {
  6964. var i, keys;
  6965. var isA = Array.isArray(val);
  6966. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6967. return
  6968. }
  6969. if (val.__ob__) {
  6970. var depId = val.__ob__.dep.id;
  6971. if (seen.has(depId)) {
  6972. return
  6973. }
  6974. seen.add(depId);
  6975. }
  6976. if (isA) {
  6977. i = val.length;
  6978. while (i--) { _traverse(val[i], seen); }
  6979. } else {
  6980. keys = Object.keys(val);
  6981. i = keys.length;
  6982. while (i--) { _traverse(val[keys[i]], seen); }
  6983. }
  6984. }
  6985. var mark;
  6986. var measure;
  6987. if (true) {
  6988. var perf = inBrowser && window.performance;
  6989. /* istanbul ignore if */
  6990. if (
  6991. perf &&
  6992. perf.mark &&
  6993. perf.measure &&
  6994. perf.clearMarks &&
  6995. perf.clearMeasures
  6996. ) {
  6997. mark = function (tag) { return perf.mark(tag); };
  6998. measure = function (name, startTag, endTag) {
  6999. perf.measure(name, startTag, endTag);
  7000. perf.clearMarks(startTag);
  7001. perf.clearMarks(endTag);
  7002. // perf.clearMeasures(name)
  7003. };
  7004. }
  7005. }
  7006. /* */
  7007. var normalizeEvent = cached(function (name) {
  7008. var passive = name.charAt(0) === '&';
  7009. name = passive ? name.slice(1) : name;
  7010. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  7011. name = once$$1 ? name.slice(1) : name;
  7012. var capture = name.charAt(0) === '!';
  7013. name = capture ? name.slice(1) : name;
  7014. return {
  7015. name: name,
  7016. once: once$$1,
  7017. capture: capture,
  7018. passive: passive
  7019. }
  7020. });
  7021. function createFnInvoker (fns, vm) {
  7022. function invoker () {
  7023. var arguments$1 = arguments;
  7024. var fns = invoker.fns;
  7025. if (Array.isArray(fns)) {
  7026. var cloned = fns.slice();
  7027. for (var i = 0; i < cloned.length; i++) {
  7028. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  7029. }
  7030. } else {
  7031. // return handler return value for single handlers
  7032. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  7033. }
  7034. }
  7035. invoker.fns = fns;
  7036. return invoker
  7037. }
  7038. function updateListeners (
  7039. on,
  7040. oldOn,
  7041. add,
  7042. remove$$1,
  7043. createOnceHandler,
  7044. vm
  7045. ) {
  7046. var name, def$$1, cur, old, event;
  7047. for (name in on) {
  7048. def$$1 = cur = on[name];
  7049. old = oldOn[name];
  7050. event = normalizeEvent(name);
  7051. if (isUndef(cur)) {
  7052. true && warn(
  7053. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  7054. vm
  7055. );
  7056. } else if (isUndef(old)) {
  7057. if (isUndef(cur.fns)) {
  7058. cur = on[name] = createFnInvoker(cur, vm);
  7059. }
  7060. if (isTrue(event.once)) {
  7061. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  7062. }
  7063. add(event.name, cur, event.capture, event.passive, event.params);
  7064. } else if (cur !== old) {
  7065. old.fns = cur;
  7066. on[name] = old;
  7067. }
  7068. }
  7069. for (name in oldOn) {
  7070. if (isUndef(on[name])) {
  7071. event = normalizeEvent(name);
  7072. remove$$1(event.name, oldOn[name], event.capture);
  7073. }
  7074. }
  7075. }
  7076. /* */
  7077. /* */
  7078. // fixed by xxxxxx (mp properties)
  7079. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  7080. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  7081. if (isUndef(propOptions)) {
  7082. return res
  7083. }
  7084. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  7085. var attrs = data.attrs;
  7086. var props = data.props;
  7087. if (isDef(attrs) || isDef(props)) {
  7088. for (var key in propOptions) {
  7089. var altKey = hyphenate(key);
  7090. var result = checkProp(res, props, key, altKey, true) ||
  7091. checkProp(res, attrs, key, altKey, false);
  7092. // externalClass
  7093. if (
  7094. result &&
  7095. res[key] &&
  7096. externalClasses.indexOf(altKey) !== -1 &&
  7097. context[camelize(res[key])]
  7098. ) {
  7099. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  7100. res[key] = context[camelize(res[key])];
  7101. }
  7102. }
  7103. }
  7104. return res
  7105. }
  7106. function extractPropsFromVNodeData (
  7107. data,
  7108. Ctor,
  7109. tag,
  7110. context// fixed by xxxxxx
  7111. ) {
  7112. // we are only extracting raw values here.
  7113. // validation and default values are handled in the child
  7114. // component itself.
  7115. var propOptions = Ctor.options.props;
  7116. if (isUndef(propOptions)) {
  7117. // fixed by xxxxxx
  7118. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  7119. }
  7120. var res = {};
  7121. var attrs = data.attrs;
  7122. var props = data.props;
  7123. if (isDef(attrs) || isDef(props)) {
  7124. for (var key in propOptions) {
  7125. var altKey = hyphenate(key);
  7126. if (true) {
  7127. var keyInLowerCase = key.toLowerCase();
  7128. if (
  7129. key !== keyInLowerCase &&
  7130. attrs && hasOwn(attrs, keyInLowerCase)
  7131. ) {
  7132. tip(
  7133. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  7134. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  7135. " \"" + key + "\". " +
  7136. "Note that HTML attributes are case-insensitive and camelCased " +
  7137. "props need to use their kebab-case equivalents when using in-DOM " +
  7138. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  7139. );
  7140. }
  7141. }
  7142. checkProp(res, props, key, altKey, true) ||
  7143. checkProp(res, attrs, key, altKey, false);
  7144. }
  7145. }
  7146. // fixed by xxxxxx
  7147. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  7148. }
  7149. function checkProp (
  7150. res,
  7151. hash,
  7152. key,
  7153. altKey,
  7154. preserve
  7155. ) {
  7156. if (isDef(hash)) {
  7157. if (hasOwn(hash, key)) {
  7158. res[key] = hash[key];
  7159. if (!preserve) {
  7160. delete hash[key];
  7161. }
  7162. return true
  7163. } else if (hasOwn(hash, altKey)) {
  7164. res[key] = hash[altKey];
  7165. if (!preserve) {
  7166. delete hash[altKey];
  7167. }
  7168. return true
  7169. }
  7170. }
  7171. return false
  7172. }
  7173. /* */
  7174. // The template compiler attempts to minimize the need for normalization by
  7175. // statically analyzing the template at compile time.
  7176. //
  7177. // For plain HTML markup, normalization can be completely skipped because the
  7178. // generated render function is guaranteed to return Array<VNode>. There are
  7179. // two cases where extra normalization is needed:
  7180. // 1. When the children contains components - because a functional component
  7181. // may return an Array instead of a single root. In this case, just a simple
  7182. // normalization is needed - if any child is an Array, we flatten the whole
  7183. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  7184. // because functional components already normalize their own children.
  7185. function simpleNormalizeChildren (children) {
  7186. for (var i = 0; i < children.length; i++) {
  7187. if (Array.isArray(children[i])) {
  7188. return Array.prototype.concat.apply([], children)
  7189. }
  7190. }
  7191. return children
  7192. }
  7193. // 2. When the children contains constructs that always generated nested Arrays,
  7194. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  7195. // with hand-written render functions / JSX. In such cases a full normalization
  7196. // is needed to cater to all possible types of children values.
  7197. function normalizeChildren (children) {
  7198. return isPrimitive(children)
  7199. ? [createTextVNode(children)]
  7200. : Array.isArray(children)
  7201. ? normalizeArrayChildren(children)
  7202. : undefined
  7203. }
  7204. function isTextNode (node) {
  7205. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  7206. }
  7207. function normalizeArrayChildren (children, nestedIndex) {
  7208. var res = [];
  7209. var i, c, lastIndex, last;
  7210. for (i = 0; i < children.length; i++) {
  7211. c = children[i];
  7212. if (isUndef(c) || typeof c === 'boolean') { continue }
  7213. lastIndex = res.length - 1;
  7214. last = res[lastIndex];
  7215. // nested
  7216. if (Array.isArray(c)) {
  7217. if (c.length > 0) {
  7218. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  7219. // merge adjacent text nodes
  7220. if (isTextNode(c[0]) && isTextNode(last)) {
  7221. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  7222. c.shift();
  7223. }
  7224. res.push.apply(res, c);
  7225. }
  7226. } else if (isPrimitive(c)) {
  7227. if (isTextNode(last)) {
  7228. // merge adjacent text nodes
  7229. // this is necessary for SSR hydration because text nodes are
  7230. // essentially merged when rendered to HTML strings
  7231. res[lastIndex] = createTextVNode(last.text + c);
  7232. } else if (c !== '') {
  7233. // convert primitive to vnode
  7234. res.push(createTextVNode(c));
  7235. }
  7236. } else {
  7237. if (isTextNode(c) && isTextNode(last)) {
  7238. // merge adjacent text nodes
  7239. res[lastIndex] = createTextVNode(last.text + c.text);
  7240. } else {
  7241. // default key for nested array children (likely generated by v-for)
  7242. if (isTrue(children._isVList) &&
  7243. isDef(c.tag) &&
  7244. isUndef(c.key) &&
  7245. isDef(nestedIndex)) {
  7246. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  7247. }
  7248. res.push(c);
  7249. }
  7250. }
  7251. }
  7252. return res
  7253. }
  7254. /* */
  7255. function initProvide (vm) {
  7256. var provide = vm.$options.provide;
  7257. if (provide) {
  7258. vm._provided = typeof provide === 'function'
  7259. ? provide.call(vm)
  7260. : provide;
  7261. }
  7262. }
  7263. function initInjections (vm) {
  7264. var result = resolveInject(vm.$options.inject, vm);
  7265. if (result) {
  7266. toggleObserving(false);
  7267. Object.keys(result).forEach(function (key) {
  7268. /* istanbul ignore else */
  7269. if (true) {
  7270. defineReactive$$1(vm, key, result[key], function () {
  7271. warn(
  7272. "Avoid mutating an injected value directly since the changes will be " +
  7273. "overwritten whenever the provided component re-renders. " +
  7274. "injection being mutated: \"" + key + "\"",
  7275. vm
  7276. );
  7277. });
  7278. } else {}
  7279. });
  7280. toggleObserving(true);
  7281. }
  7282. }
  7283. function resolveInject (inject, vm) {
  7284. if (inject) {
  7285. // inject is :any because flow is not smart enough to figure out cached
  7286. var result = Object.create(null);
  7287. var keys = hasSymbol
  7288. ? Reflect.ownKeys(inject)
  7289. : Object.keys(inject);
  7290. for (var i = 0; i < keys.length; i++) {
  7291. var key = keys[i];
  7292. // #6574 in case the inject object is observed...
  7293. if (key === '__ob__') { continue }
  7294. var provideKey = inject[key].from;
  7295. var source = vm;
  7296. while (source) {
  7297. if (source._provided && hasOwn(source._provided, provideKey)) {
  7298. result[key] = source._provided[provideKey];
  7299. break
  7300. }
  7301. source = source.$parent;
  7302. }
  7303. if (!source) {
  7304. if ('default' in inject[key]) {
  7305. var provideDefault = inject[key].default;
  7306. result[key] = typeof provideDefault === 'function'
  7307. ? provideDefault.call(vm)
  7308. : provideDefault;
  7309. } else if (true) {
  7310. warn(("Injection \"" + key + "\" not found"), vm);
  7311. }
  7312. }
  7313. }
  7314. return result
  7315. }
  7316. }
  7317. /* */
  7318. /**
  7319. * Runtime helper for resolving raw children VNodes into a slot object.
  7320. */
  7321. function resolveSlots (
  7322. children,
  7323. context
  7324. ) {
  7325. if (!children || !children.length) {
  7326. return {}
  7327. }
  7328. var slots = {};
  7329. for (var i = 0, l = children.length; i < l; i++) {
  7330. var child = children[i];
  7331. var data = child.data;
  7332. // remove slot attribute if the node is resolved as a Vue slot node
  7333. if (data && data.attrs && data.attrs.slot) {
  7334. delete data.attrs.slot;
  7335. }
  7336. // named slots should only be respected if the vnode was rendered in the
  7337. // same context.
  7338. if ((child.context === context || child.fnContext === context) &&
  7339. data && data.slot != null
  7340. ) {
  7341. var name = data.slot;
  7342. var slot = (slots[name] || (slots[name] = []));
  7343. if (child.tag === 'template') {
  7344. slot.push.apply(slot, child.children || []);
  7345. } else {
  7346. slot.push(child);
  7347. }
  7348. } else {
  7349. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  7350. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  7351. (slots['page'] || (slots['page'] = [])).push(child);
  7352. }else{
  7353. (slots.default || (slots.default = [])).push(child);
  7354. }
  7355. }
  7356. }
  7357. // ignore slots that contains only whitespace
  7358. for (var name$1 in slots) {
  7359. if (slots[name$1].every(isWhitespace)) {
  7360. delete slots[name$1];
  7361. }
  7362. }
  7363. return slots
  7364. }
  7365. function isWhitespace (node) {
  7366. return (node.isComment && !node.asyncFactory) || node.text === ' '
  7367. }
  7368. /* */
  7369. function normalizeScopedSlots (
  7370. slots,
  7371. normalSlots,
  7372. prevSlots
  7373. ) {
  7374. var res;
  7375. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  7376. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  7377. var key = slots && slots.$key;
  7378. if (!slots) {
  7379. res = {};
  7380. } else if (slots._normalized) {
  7381. // fast path 1: child component re-render only, parent did not change
  7382. return slots._normalized
  7383. } else if (
  7384. isStable &&
  7385. prevSlots &&
  7386. prevSlots !== emptyObject &&
  7387. key === prevSlots.$key &&
  7388. !hasNormalSlots &&
  7389. !prevSlots.$hasNormal
  7390. ) {
  7391. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  7392. // only need to normalize once
  7393. return prevSlots
  7394. } else {
  7395. res = {};
  7396. for (var key$1 in slots) {
  7397. if (slots[key$1] && key$1[0] !== '$') {
  7398. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  7399. }
  7400. }
  7401. }
  7402. // expose normal slots on scopedSlots
  7403. for (var key$2 in normalSlots) {
  7404. if (!(key$2 in res)) {
  7405. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  7406. }
  7407. }
  7408. // avoriaz seems to mock a non-extensible $scopedSlots object
  7409. // and when that is passed down this would cause an error
  7410. if (slots && Object.isExtensible(slots)) {
  7411. (slots)._normalized = res;
  7412. }
  7413. def(res, '$stable', isStable);
  7414. def(res, '$key', key);
  7415. def(res, '$hasNormal', hasNormalSlots);
  7416. return res
  7417. }
  7418. function normalizeScopedSlot(normalSlots, key, fn) {
  7419. var normalized = function () {
  7420. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  7421. res = res && typeof res === 'object' && !Array.isArray(res)
  7422. ? [res] // single vnode
  7423. : normalizeChildren(res);
  7424. return res && (
  7425. res.length === 0 ||
  7426. (res.length === 1 && res[0].isComment) // #9658
  7427. ) ? undefined
  7428. : res
  7429. };
  7430. // this is a slot using the new v-slot syntax without scope. although it is
  7431. // compiled as a scoped slot, render fn users would expect it to be present
  7432. // on this.$slots because the usage is semantically a normal slot.
  7433. if (fn.proxy) {
  7434. Object.defineProperty(normalSlots, key, {
  7435. get: normalized,
  7436. enumerable: true,
  7437. configurable: true
  7438. });
  7439. }
  7440. return normalized
  7441. }
  7442. function proxyNormalSlot(slots, key) {
  7443. return function () { return slots[key]; }
  7444. }
  7445. /* */
  7446. /**
  7447. * Runtime helper for rendering v-for lists.
  7448. */
  7449. function renderList (
  7450. val,
  7451. render
  7452. ) {
  7453. var ret, i, l, keys, key;
  7454. if (Array.isArray(val) || typeof val === 'string') {
  7455. ret = new Array(val.length);
  7456. for (i = 0, l = val.length; i < l; i++) {
  7457. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  7458. }
  7459. } else if (typeof val === 'number') {
  7460. ret = new Array(val);
  7461. for (i = 0; i < val; i++) {
  7462. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  7463. }
  7464. } else if (isObject(val)) {
  7465. if (hasSymbol && val[Symbol.iterator]) {
  7466. ret = [];
  7467. var iterator = val[Symbol.iterator]();
  7468. var result = iterator.next();
  7469. while (!result.done) {
  7470. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  7471. result = iterator.next();
  7472. }
  7473. } else {
  7474. keys = Object.keys(val);
  7475. ret = new Array(keys.length);
  7476. for (i = 0, l = keys.length; i < l; i++) {
  7477. key = keys[i];
  7478. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  7479. }
  7480. }
  7481. }
  7482. if (!isDef(ret)) {
  7483. ret = [];
  7484. }
  7485. (ret)._isVList = true;
  7486. return ret
  7487. }
  7488. /* */
  7489. /**
  7490. * Runtime helper for rendering <slot>
  7491. */
  7492. function renderSlot (
  7493. name,
  7494. fallback,
  7495. props,
  7496. bindObject
  7497. ) {
  7498. var scopedSlotFn = this.$scopedSlots[name];
  7499. var nodes;
  7500. if (scopedSlotFn) { // scoped slot
  7501. props = props || {};
  7502. if (bindObject) {
  7503. if ( true && !isObject(bindObject)) {
  7504. warn(
  7505. 'slot v-bind without argument expects an Object',
  7506. this
  7507. );
  7508. }
  7509. props = extend(extend({}, bindObject), props);
  7510. }
  7511. // fixed by xxxxxx app-plus scopedSlot
  7512. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7513. } else {
  7514. nodes = this.$slots[name] || fallback;
  7515. }
  7516. var target = props && props.slot;
  7517. if (target) {
  7518. return this.$createElement('template', { slot: target }, nodes)
  7519. } else {
  7520. return nodes
  7521. }
  7522. }
  7523. /* */
  7524. /**
  7525. * Runtime helper for resolving filters
  7526. */
  7527. function resolveFilter (id) {
  7528. return resolveAsset(this.$options, 'filters', id, true) || identity
  7529. }
  7530. /* */
  7531. function isKeyNotMatch (expect, actual) {
  7532. if (Array.isArray(expect)) {
  7533. return expect.indexOf(actual) === -1
  7534. } else {
  7535. return expect !== actual
  7536. }
  7537. }
  7538. /**
  7539. * Runtime helper for checking keyCodes from config.
  7540. * exposed as Vue.prototype._k
  7541. * passing in eventKeyName as last argument separately for backwards compat
  7542. */
  7543. function checkKeyCodes (
  7544. eventKeyCode,
  7545. key,
  7546. builtInKeyCode,
  7547. eventKeyName,
  7548. builtInKeyName
  7549. ) {
  7550. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7551. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7552. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7553. } else if (mappedKeyCode) {
  7554. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7555. } else if (eventKeyName) {
  7556. return hyphenate(eventKeyName) !== key
  7557. }
  7558. }
  7559. /* */
  7560. /**
  7561. * Runtime helper for merging v-bind="object" into a VNode's data.
  7562. */
  7563. function bindObjectProps (
  7564. data,
  7565. tag,
  7566. value,
  7567. asProp,
  7568. isSync
  7569. ) {
  7570. if (value) {
  7571. if (!isObject(value)) {
  7572. true && warn(
  7573. 'v-bind without argument expects an Object or Array value',
  7574. this
  7575. );
  7576. } else {
  7577. if (Array.isArray(value)) {
  7578. value = toObject(value);
  7579. }
  7580. var hash;
  7581. var loop = function ( key ) {
  7582. if (
  7583. key === 'class' ||
  7584. key === 'style' ||
  7585. isReservedAttribute(key)
  7586. ) {
  7587. hash = data;
  7588. } else {
  7589. var type = data.attrs && data.attrs.type;
  7590. hash = asProp || config.mustUseProp(tag, type, key)
  7591. ? data.domProps || (data.domProps = {})
  7592. : data.attrs || (data.attrs = {});
  7593. }
  7594. var camelizedKey = camelize(key);
  7595. var hyphenatedKey = hyphenate(key);
  7596. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7597. hash[key] = value[key];
  7598. if (isSync) {
  7599. var on = data.on || (data.on = {});
  7600. on[("update:" + key)] = function ($event) {
  7601. value[key] = $event;
  7602. };
  7603. }
  7604. }
  7605. };
  7606. for (var key in value) loop( key );
  7607. }
  7608. }
  7609. return data
  7610. }
  7611. /* */
  7612. /**
  7613. * Runtime helper for rendering static trees.
  7614. */
  7615. function renderStatic (
  7616. index,
  7617. isInFor
  7618. ) {
  7619. var cached = this._staticTrees || (this._staticTrees = []);
  7620. var tree = cached[index];
  7621. // if has already-rendered static tree and not inside v-for,
  7622. // we can reuse the same tree.
  7623. if (tree && !isInFor) {
  7624. return tree
  7625. }
  7626. // otherwise, render a fresh tree.
  7627. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7628. this._renderProxy,
  7629. null,
  7630. this // for render fns generated for functional component templates
  7631. );
  7632. markStatic(tree, ("__static__" + index), false);
  7633. return tree
  7634. }
  7635. /**
  7636. * Runtime helper for v-once.
  7637. * Effectively it means marking the node as static with a unique key.
  7638. */
  7639. function markOnce (
  7640. tree,
  7641. index,
  7642. key
  7643. ) {
  7644. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7645. return tree
  7646. }
  7647. function markStatic (
  7648. tree,
  7649. key,
  7650. isOnce
  7651. ) {
  7652. if (Array.isArray(tree)) {
  7653. for (var i = 0; i < tree.length; i++) {
  7654. if (tree[i] && typeof tree[i] !== 'string') {
  7655. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7656. }
  7657. }
  7658. } else {
  7659. markStaticNode(tree, key, isOnce);
  7660. }
  7661. }
  7662. function markStaticNode (node, key, isOnce) {
  7663. node.isStatic = true;
  7664. node.key = key;
  7665. node.isOnce = isOnce;
  7666. }
  7667. /* */
  7668. function bindObjectListeners (data, value) {
  7669. if (value) {
  7670. if (!isPlainObject(value)) {
  7671. true && warn(
  7672. 'v-on without argument expects an Object value',
  7673. this
  7674. );
  7675. } else {
  7676. var on = data.on = data.on ? extend({}, data.on) : {};
  7677. for (var key in value) {
  7678. var existing = on[key];
  7679. var ours = value[key];
  7680. on[key] = existing ? [].concat(existing, ours) : ours;
  7681. }
  7682. }
  7683. }
  7684. return data
  7685. }
  7686. /* */
  7687. function resolveScopedSlots (
  7688. fns, // see flow/vnode
  7689. res,
  7690. // the following are added in 2.6
  7691. hasDynamicKeys,
  7692. contentHashKey
  7693. ) {
  7694. res = res || { $stable: !hasDynamicKeys };
  7695. for (var i = 0; i < fns.length; i++) {
  7696. var slot = fns[i];
  7697. if (Array.isArray(slot)) {
  7698. resolveScopedSlots(slot, res, hasDynamicKeys);
  7699. } else if (slot) {
  7700. // marker for reverse proxying v-slot without scope on this.$slots
  7701. if (slot.proxy) {
  7702. slot.fn.proxy = true;
  7703. }
  7704. res[slot.key] = slot.fn;
  7705. }
  7706. }
  7707. if (contentHashKey) {
  7708. (res).$key = contentHashKey;
  7709. }
  7710. return res
  7711. }
  7712. /* */
  7713. function bindDynamicKeys (baseObj, values) {
  7714. for (var i = 0; i < values.length; i += 2) {
  7715. var key = values[i];
  7716. if (typeof key === 'string' && key) {
  7717. baseObj[values[i]] = values[i + 1];
  7718. } else if ( true && key !== '' && key !== null) {
  7719. // null is a special value for explicitly removing a binding
  7720. warn(
  7721. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7722. this
  7723. );
  7724. }
  7725. }
  7726. return baseObj
  7727. }
  7728. // helper to dynamically append modifier runtime markers to event names.
  7729. // ensure only append when value is already string, otherwise it will be cast
  7730. // to string and cause the type check to miss.
  7731. function prependModifier (value, symbol) {
  7732. return typeof value === 'string' ? symbol + value : value
  7733. }
  7734. /* */
  7735. function installRenderHelpers (target) {
  7736. target._o = markOnce;
  7737. target._n = toNumber;
  7738. target._s = toString;
  7739. target._l = renderList;
  7740. target._t = renderSlot;
  7741. target._q = looseEqual;
  7742. target._i = looseIndexOf;
  7743. target._m = renderStatic;
  7744. target._f = resolveFilter;
  7745. target._k = checkKeyCodes;
  7746. target._b = bindObjectProps;
  7747. target._v = createTextVNode;
  7748. target._e = createEmptyVNode;
  7749. target._u = resolveScopedSlots;
  7750. target._g = bindObjectListeners;
  7751. target._d = bindDynamicKeys;
  7752. target._p = prependModifier;
  7753. }
  7754. /* */
  7755. function FunctionalRenderContext (
  7756. data,
  7757. props,
  7758. children,
  7759. parent,
  7760. Ctor
  7761. ) {
  7762. var this$1 = this;
  7763. var options = Ctor.options;
  7764. // ensure the createElement function in functional components
  7765. // gets a unique context - this is necessary for correct named slot check
  7766. var contextVm;
  7767. if (hasOwn(parent, '_uid')) {
  7768. contextVm = Object.create(parent);
  7769. // $flow-disable-line
  7770. contextVm._original = parent;
  7771. } else {
  7772. // the context vm passed in is a functional context as well.
  7773. // in this case we want to make sure we are able to get a hold to the
  7774. // real context instance.
  7775. contextVm = parent;
  7776. // $flow-disable-line
  7777. parent = parent._original;
  7778. }
  7779. var isCompiled = isTrue(options._compiled);
  7780. var needNormalization = !isCompiled;
  7781. this.data = data;
  7782. this.props = props;
  7783. this.children = children;
  7784. this.parent = parent;
  7785. this.listeners = data.on || emptyObject;
  7786. this.injections = resolveInject(options.inject, parent);
  7787. this.slots = function () {
  7788. if (!this$1.$slots) {
  7789. normalizeScopedSlots(
  7790. data.scopedSlots,
  7791. this$1.$slots = resolveSlots(children, parent)
  7792. );
  7793. }
  7794. return this$1.$slots
  7795. };
  7796. Object.defineProperty(this, 'scopedSlots', ({
  7797. enumerable: true,
  7798. get: function get () {
  7799. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7800. }
  7801. }));
  7802. // support for compiled functional template
  7803. if (isCompiled) {
  7804. // exposing $options for renderStatic()
  7805. this.$options = options;
  7806. // pre-resolve slots for renderSlot()
  7807. this.$slots = this.slots();
  7808. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7809. }
  7810. if (options._scopeId) {
  7811. this._c = function (a, b, c, d) {
  7812. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7813. if (vnode && !Array.isArray(vnode)) {
  7814. vnode.fnScopeId = options._scopeId;
  7815. vnode.fnContext = parent;
  7816. }
  7817. return vnode
  7818. };
  7819. } else {
  7820. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7821. }
  7822. }
  7823. installRenderHelpers(FunctionalRenderContext.prototype);
  7824. function createFunctionalComponent (
  7825. Ctor,
  7826. propsData,
  7827. data,
  7828. contextVm,
  7829. children
  7830. ) {
  7831. var options = Ctor.options;
  7832. var props = {};
  7833. var propOptions = options.props;
  7834. if (isDef(propOptions)) {
  7835. for (var key in propOptions) {
  7836. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7837. }
  7838. } else {
  7839. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7840. if (isDef(data.props)) { mergeProps(props, data.props); }
  7841. }
  7842. var renderContext = new FunctionalRenderContext(
  7843. data,
  7844. props,
  7845. children,
  7846. contextVm,
  7847. Ctor
  7848. );
  7849. var vnode = options.render.call(null, renderContext._c, renderContext);
  7850. if (vnode instanceof VNode) {
  7851. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7852. } else if (Array.isArray(vnode)) {
  7853. var vnodes = normalizeChildren(vnode) || [];
  7854. var res = new Array(vnodes.length);
  7855. for (var i = 0; i < vnodes.length; i++) {
  7856. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7857. }
  7858. return res
  7859. }
  7860. }
  7861. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7862. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7863. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7864. // that should not be matched to match.
  7865. var clone = cloneVNode(vnode);
  7866. clone.fnContext = contextVm;
  7867. clone.fnOptions = options;
  7868. if (true) {
  7869. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7870. }
  7871. if (data.slot) {
  7872. (clone.data || (clone.data = {})).slot = data.slot;
  7873. }
  7874. return clone
  7875. }
  7876. function mergeProps (to, from) {
  7877. for (var key in from) {
  7878. to[camelize(key)] = from[key];
  7879. }
  7880. }
  7881. /* */
  7882. /* */
  7883. /* */
  7884. /* */
  7885. // inline hooks to be invoked on component VNodes during patch
  7886. var componentVNodeHooks = {
  7887. init: function init (vnode, hydrating) {
  7888. if (
  7889. vnode.componentInstance &&
  7890. !vnode.componentInstance._isDestroyed &&
  7891. vnode.data.keepAlive
  7892. ) {
  7893. // kept-alive components, treat as a patch
  7894. var mountedNode = vnode; // work around flow
  7895. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7896. } else {
  7897. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7898. vnode,
  7899. activeInstance
  7900. );
  7901. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7902. }
  7903. },
  7904. prepatch: function prepatch (oldVnode, vnode) {
  7905. var options = vnode.componentOptions;
  7906. var child = vnode.componentInstance = oldVnode.componentInstance;
  7907. updateChildComponent(
  7908. child,
  7909. options.propsData, // updated props
  7910. options.listeners, // updated listeners
  7911. vnode, // new parent vnode
  7912. options.children // new children
  7913. );
  7914. },
  7915. insert: function insert (vnode) {
  7916. var context = vnode.context;
  7917. var componentInstance = vnode.componentInstance;
  7918. if (!componentInstance._isMounted) {
  7919. callHook(componentInstance, 'onServiceCreated');
  7920. callHook(componentInstance, 'onServiceAttached');
  7921. componentInstance._isMounted = true;
  7922. callHook(componentInstance, 'mounted');
  7923. }
  7924. if (vnode.data.keepAlive) {
  7925. if (context._isMounted) {
  7926. // vue-router#1212
  7927. // During updates, a kept-alive component's child components may
  7928. // change, so directly walking the tree here may call activated hooks
  7929. // on incorrect children. Instead we push them into a queue which will
  7930. // be processed after the whole patch process ended.
  7931. queueActivatedComponent(componentInstance);
  7932. } else {
  7933. activateChildComponent(componentInstance, true /* direct */);
  7934. }
  7935. }
  7936. },
  7937. destroy: function destroy (vnode) {
  7938. var componentInstance = vnode.componentInstance;
  7939. if (!componentInstance._isDestroyed) {
  7940. if (!vnode.data.keepAlive) {
  7941. componentInstance.$destroy();
  7942. } else {
  7943. deactivateChildComponent(componentInstance, true /* direct */);
  7944. }
  7945. }
  7946. }
  7947. };
  7948. var hooksToMerge = Object.keys(componentVNodeHooks);
  7949. function createComponent (
  7950. Ctor,
  7951. data,
  7952. context,
  7953. children,
  7954. tag
  7955. ) {
  7956. if (isUndef(Ctor)) {
  7957. return
  7958. }
  7959. var baseCtor = context.$options._base;
  7960. // plain options object: turn it into a constructor
  7961. if (isObject(Ctor)) {
  7962. Ctor = baseCtor.extend(Ctor);
  7963. }
  7964. // if at this stage it's not a constructor or an async component factory,
  7965. // reject.
  7966. if (typeof Ctor !== 'function') {
  7967. if (true) {
  7968. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7969. }
  7970. return
  7971. }
  7972. // async component
  7973. var asyncFactory;
  7974. if (isUndef(Ctor.cid)) {
  7975. asyncFactory = Ctor;
  7976. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7977. if (Ctor === undefined) {
  7978. // return a placeholder node for async component, which is rendered
  7979. // as a comment node but preserves all the raw information for the node.
  7980. // the information will be used for async server-rendering and hydration.
  7981. return createAsyncPlaceholder(
  7982. asyncFactory,
  7983. data,
  7984. context,
  7985. children,
  7986. tag
  7987. )
  7988. }
  7989. }
  7990. data = data || {};
  7991. // resolve constructor options in case global mixins are applied after
  7992. // component constructor creation
  7993. resolveConstructorOptions(Ctor);
  7994. // transform component v-model data into props & events
  7995. if (isDef(data.model)) {
  7996. transformModel(Ctor.options, data);
  7997. }
  7998. // extract props
  7999. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  8000. // functional component
  8001. if (isTrue(Ctor.options.functional)) {
  8002. return createFunctionalComponent(Ctor, propsData, data, context, children)
  8003. }
  8004. // extract listeners, since these needs to be treated as
  8005. // child component listeners instead of DOM listeners
  8006. var listeners = data.on;
  8007. // replace with listeners with .native modifier
  8008. // so it gets processed during parent component patch.
  8009. data.on = data.nativeOn;
  8010. if (isTrue(Ctor.options.abstract)) {
  8011. // abstract components do not keep anything
  8012. // other than props & listeners & slot
  8013. // work around flow
  8014. var slot = data.slot;
  8015. data = {};
  8016. if (slot) {
  8017. data.slot = slot;
  8018. }
  8019. }
  8020. // install component management hooks onto the placeholder node
  8021. installComponentHooks(data);
  8022. // return a placeholder vnode
  8023. var name = Ctor.options.name || tag;
  8024. var vnode = new VNode(
  8025. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  8026. data, undefined, undefined, undefined, context,
  8027. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  8028. asyncFactory
  8029. );
  8030. return vnode
  8031. }
  8032. function createComponentInstanceForVnode (
  8033. vnode, // we know it's MountedComponentVNode but flow doesn't
  8034. parent // activeInstance in lifecycle state
  8035. ) {
  8036. var options = {
  8037. _isComponent: true,
  8038. _parentVnode: vnode,
  8039. parent: parent
  8040. };
  8041. // check inline-template render functions
  8042. var inlineTemplate = vnode.data.inlineTemplate;
  8043. if (isDef(inlineTemplate)) {
  8044. options.render = inlineTemplate.render;
  8045. options.staticRenderFns = inlineTemplate.staticRenderFns;
  8046. }
  8047. return new vnode.componentOptions.Ctor(options)
  8048. }
  8049. function installComponentHooks (data) {
  8050. var hooks = data.hook || (data.hook = {});
  8051. for (var i = 0; i < hooksToMerge.length; i++) {
  8052. var key = hooksToMerge[i];
  8053. var existing = hooks[key];
  8054. var toMerge = componentVNodeHooks[key];
  8055. if (existing !== toMerge && !(existing && existing._merged)) {
  8056. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  8057. }
  8058. }
  8059. }
  8060. function mergeHook$1 (f1, f2) {
  8061. var merged = function (a, b) {
  8062. // flow complains about extra args which is why we use any
  8063. f1(a, b);
  8064. f2(a, b);
  8065. };
  8066. merged._merged = true;
  8067. return merged
  8068. }
  8069. // transform component v-model info (value and callback) into
  8070. // prop and event handler respectively.
  8071. function transformModel (options, data) {
  8072. var prop = (options.model && options.model.prop) || 'value';
  8073. var event = (options.model && options.model.event) || 'input'
  8074. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  8075. var on = data.on || (data.on = {});
  8076. var existing = on[event];
  8077. var callback = data.model.callback;
  8078. if (isDef(existing)) {
  8079. if (
  8080. Array.isArray(existing)
  8081. ? existing.indexOf(callback) === -1
  8082. : existing !== callback
  8083. ) {
  8084. on[event] = [callback].concat(existing);
  8085. }
  8086. } else {
  8087. on[event] = callback;
  8088. }
  8089. }
  8090. /* */
  8091. var SIMPLE_NORMALIZE = 1;
  8092. var ALWAYS_NORMALIZE = 2;
  8093. // wrapper function for providing a more flexible interface
  8094. // without getting yelled at by flow
  8095. function createElement (
  8096. context,
  8097. tag,
  8098. data,
  8099. children,
  8100. normalizationType,
  8101. alwaysNormalize
  8102. ) {
  8103. if (Array.isArray(data) || isPrimitive(data)) {
  8104. normalizationType = children;
  8105. children = data;
  8106. data = undefined;
  8107. }
  8108. if (isTrue(alwaysNormalize)) {
  8109. normalizationType = ALWAYS_NORMALIZE;
  8110. }
  8111. return _createElement(context, tag, data, children, normalizationType)
  8112. }
  8113. function _createElement (
  8114. context,
  8115. tag,
  8116. data,
  8117. children,
  8118. normalizationType
  8119. ) {
  8120. if (isDef(data) && isDef((data).__ob__)) {
  8121. true && warn(
  8122. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  8123. 'Always create fresh vnode data objects in each render!',
  8124. context
  8125. );
  8126. return createEmptyVNode()
  8127. }
  8128. // object syntax in v-bind
  8129. if (isDef(data) && isDef(data.is)) {
  8130. tag = data.is;
  8131. }
  8132. if (!tag) {
  8133. // in case of component :is set to falsy value
  8134. return createEmptyVNode()
  8135. }
  8136. // warn against non-primitive key
  8137. if ( true &&
  8138. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  8139. ) {
  8140. {
  8141. warn(
  8142. 'Avoid using non-primitive value as key, ' +
  8143. 'use string/number value instead.',
  8144. context
  8145. );
  8146. }
  8147. }
  8148. // support single function children as default scoped slot
  8149. if (Array.isArray(children) &&
  8150. typeof children[0] === 'function'
  8151. ) {
  8152. data = data || {};
  8153. data.scopedSlots = { default: children[0] };
  8154. children.length = 0;
  8155. }
  8156. if (normalizationType === ALWAYS_NORMALIZE) {
  8157. children = normalizeChildren(children);
  8158. } else if (normalizationType === SIMPLE_NORMALIZE) {
  8159. children = simpleNormalizeChildren(children);
  8160. }
  8161. var vnode, ns;
  8162. if (typeof tag === 'string') {
  8163. var Ctor;
  8164. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  8165. if (config.isReservedTag(tag)) {
  8166. // platform built-in elements
  8167. if ( true && isDef(data) && isDef(data.nativeOn)) {
  8168. warn(
  8169. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  8170. context
  8171. );
  8172. }
  8173. vnode = new VNode(
  8174. config.parsePlatformTagName(tag), data, children,
  8175. undefined, undefined, context
  8176. );
  8177. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  8178. // component
  8179. vnode = createComponent(Ctor, data, context, children, tag);
  8180. } else {
  8181. // unknown or unlisted namespaced elements
  8182. // check at runtime because it may get assigned a namespace when its
  8183. // parent normalizes children
  8184. vnode = new VNode(
  8185. tag, data, children,
  8186. undefined, undefined, context
  8187. );
  8188. }
  8189. } else {
  8190. // direct component options / constructor
  8191. vnode = createComponent(tag, data, context, children);
  8192. }
  8193. if (Array.isArray(vnode)) {
  8194. return vnode
  8195. } else if (isDef(vnode)) {
  8196. if (isDef(ns)) { applyNS(vnode, ns); }
  8197. if (isDef(data)) { registerDeepBindings(data); }
  8198. return vnode
  8199. } else {
  8200. return createEmptyVNode()
  8201. }
  8202. }
  8203. function applyNS (vnode, ns, force) {
  8204. vnode.ns = ns;
  8205. if (vnode.tag === 'foreignObject') {
  8206. // use default namespace inside foreignObject
  8207. ns = undefined;
  8208. force = true;
  8209. }
  8210. if (isDef(vnode.children)) {
  8211. for (var i = 0, l = vnode.children.length; i < l; i++) {
  8212. var child = vnode.children[i];
  8213. if (isDef(child.tag) && (
  8214. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  8215. applyNS(child, ns, force);
  8216. }
  8217. }
  8218. }
  8219. }
  8220. // ref #5318
  8221. // necessary to ensure parent re-render when deep bindings like :style and
  8222. // :class are used on slot nodes
  8223. function registerDeepBindings (data) {
  8224. if (isObject(data.style)) {
  8225. traverse(data.style);
  8226. }
  8227. if (isObject(data.class)) {
  8228. traverse(data.class);
  8229. }
  8230. }
  8231. /* */
  8232. function initRender (vm) {
  8233. vm._vnode = null; // the root of the child tree
  8234. vm._staticTrees = null; // v-once cached trees
  8235. var options = vm.$options;
  8236. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  8237. var renderContext = parentVnode && parentVnode.context;
  8238. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  8239. vm.$scopedSlots = emptyObject;
  8240. // bind the createElement fn to this instance
  8241. // so that we get proper render context inside it.
  8242. // args order: tag, data, children, normalizationType, alwaysNormalize
  8243. // internal version is used by render functions compiled from templates
  8244. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  8245. // normalization is always applied for the public version, used in
  8246. // user-written render functions.
  8247. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  8248. // $attrs & $listeners are exposed for easier HOC creation.
  8249. // they need to be reactive so that HOCs using them are always updated
  8250. var parentData = parentVnode && parentVnode.data;
  8251. /* istanbul ignore else */
  8252. if (true) {
  8253. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  8254. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  8255. }, true);
  8256. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  8257. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  8258. }, true);
  8259. } else {}
  8260. }
  8261. var currentRenderingInstance = null;
  8262. function renderMixin (Vue) {
  8263. // install runtime convenience helpers
  8264. installRenderHelpers(Vue.prototype);
  8265. Vue.prototype.$nextTick = function (fn) {
  8266. return nextTick(fn, this)
  8267. };
  8268. Vue.prototype._render = function () {
  8269. var vm = this;
  8270. var ref = vm.$options;
  8271. var render = ref.render;
  8272. var _parentVnode = ref._parentVnode;
  8273. if (_parentVnode) {
  8274. vm.$scopedSlots = normalizeScopedSlots(
  8275. _parentVnode.data.scopedSlots,
  8276. vm.$slots,
  8277. vm.$scopedSlots
  8278. );
  8279. }
  8280. // set parent vnode. this allows render functions to have access
  8281. // to the data on the placeholder node.
  8282. vm.$vnode = _parentVnode;
  8283. // render self
  8284. var vnode;
  8285. try {
  8286. // There's no need to maintain a stack because all render fns are called
  8287. // separately from one another. Nested component's render fns are called
  8288. // when parent component is patched.
  8289. currentRenderingInstance = vm;
  8290. vnode = render.call(vm._renderProxy, vm.$createElement);
  8291. } catch (e) {
  8292. handleError(e, vm, "render");
  8293. // return error render result,
  8294. // or previous vnode to prevent render error causing blank component
  8295. /* istanbul ignore else */
  8296. if ( true && vm.$options.renderError) {
  8297. try {
  8298. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  8299. } catch (e) {
  8300. handleError(e, vm, "renderError");
  8301. vnode = vm._vnode;
  8302. }
  8303. } else {
  8304. vnode = vm._vnode;
  8305. }
  8306. } finally {
  8307. currentRenderingInstance = null;
  8308. }
  8309. // if the returned array contains only a single node, allow it
  8310. if (Array.isArray(vnode) && vnode.length === 1) {
  8311. vnode = vnode[0];
  8312. }
  8313. // return empty vnode in case the render function errored out
  8314. if (!(vnode instanceof VNode)) {
  8315. if ( true && Array.isArray(vnode)) {
  8316. warn(
  8317. 'Multiple root nodes returned from render function. Render function ' +
  8318. 'should return a single root node.',
  8319. vm
  8320. );
  8321. }
  8322. vnode = createEmptyVNode();
  8323. }
  8324. // set parent
  8325. vnode.parent = _parentVnode;
  8326. return vnode
  8327. };
  8328. }
  8329. /* */
  8330. function ensureCtor (comp, base) {
  8331. if (
  8332. comp.__esModule ||
  8333. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  8334. ) {
  8335. comp = comp.default;
  8336. }
  8337. return isObject(comp)
  8338. ? base.extend(comp)
  8339. : comp
  8340. }
  8341. function createAsyncPlaceholder (
  8342. factory,
  8343. data,
  8344. context,
  8345. children,
  8346. tag
  8347. ) {
  8348. var node = createEmptyVNode();
  8349. node.asyncFactory = factory;
  8350. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  8351. return node
  8352. }
  8353. function resolveAsyncComponent (
  8354. factory,
  8355. baseCtor
  8356. ) {
  8357. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  8358. return factory.errorComp
  8359. }
  8360. if (isDef(factory.resolved)) {
  8361. return factory.resolved
  8362. }
  8363. var owner = currentRenderingInstance;
  8364. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  8365. // already pending
  8366. factory.owners.push(owner);
  8367. }
  8368. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  8369. return factory.loadingComp
  8370. }
  8371. if (owner && !isDef(factory.owners)) {
  8372. var owners = factory.owners = [owner];
  8373. var sync = true;
  8374. var timerLoading = null;
  8375. var timerTimeout = null
  8376. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  8377. var forceRender = function (renderCompleted) {
  8378. for (var i = 0, l = owners.length; i < l; i++) {
  8379. (owners[i]).$forceUpdate();
  8380. }
  8381. if (renderCompleted) {
  8382. owners.length = 0;
  8383. if (timerLoading !== null) {
  8384. clearTimeout(timerLoading);
  8385. timerLoading = null;
  8386. }
  8387. if (timerTimeout !== null) {
  8388. clearTimeout(timerTimeout);
  8389. timerTimeout = null;
  8390. }
  8391. }
  8392. };
  8393. var resolve = once(function (res) {
  8394. // cache resolved
  8395. factory.resolved = ensureCtor(res, baseCtor);
  8396. // invoke callbacks only if this is not a synchronous resolve
  8397. // (async resolves are shimmed as synchronous during SSR)
  8398. if (!sync) {
  8399. forceRender(true);
  8400. } else {
  8401. owners.length = 0;
  8402. }
  8403. });
  8404. var reject = once(function (reason) {
  8405. true && warn(
  8406. "Failed to resolve async component: " + (String(factory)) +
  8407. (reason ? ("\nReason: " + reason) : '')
  8408. );
  8409. if (isDef(factory.errorComp)) {
  8410. factory.error = true;
  8411. forceRender(true);
  8412. }
  8413. });
  8414. var res = factory(resolve, reject);
  8415. if (isObject(res)) {
  8416. if (isPromise(res)) {
  8417. // () => Promise
  8418. if (isUndef(factory.resolved)) {
  8419. res.then(resolve, reject);
  8420. }
  8421. } else if (isPromise(res.component)) {
  8422. res.component.then(resolve, reject);
  8423. if (isDef(res.error)) {
  8424. factory.errorComp = ensureCtor(res.error, baseCtor);
  8425. }
  8426. if (isDef(res.loading)) {
  8427. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  8428. if (res.delay === 0) {
  8429. factory.loading = true;
  8430. } else {
  8431. timerLoading = setTimeout(function () {
  8432. timerLoading = null;
  8433. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  8434. factory.loading = true;
  8435. forceRender(false);
  8436. }
  8437. }, res.delay || 200);
  8438. }
  8439. }
  8440. if (isDef(res.timeout)) {
  8441. timerTimeout = setTimeout(function () {
  8442. timerTimeout = null;
  8443. if (isUndef(factory.resolved)) {
  8444. reject(
  8445. true
  8446. ? ("timeout (" + (res.timeout) + "ms)")
  8447. : undefined
  8448. );
  8449. }
  8450. }, res.timeout);
  8451. }
  8452. }
  8453. }
  8454. sync = false;
  8455. // return in case resolved synchronously
  8456. return factory.loading
  8457. ? factory.loadingComp
  8458. : factory.resolved
  8459. }
  8460. }
  8461. /* */
  8462. function isAsyncPlaceholder (node) {
  8463. return node.isComment && node.asyncFactory
  8464. }
  8465. /* */
  8466. function getFirstComponentChild (children) {
  8467. if (Array.isArray(children)) {
  8468. for (var i = 0; i < children.length; i++) {
  8469. var c = children[i];
  8470. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  8471. return c
  8472. }
  8473. }
  8474. }
  8475. }
  8476. /* */
  8477. /* */
  8478. function initEvents (vm) {
  8479. vm._events = Object.create(null);
  8480. vm._hasHookEvent = false;
  8481. // init parent attached events
  8482. var listeners = vm.$options._parentListeners;
  8483. if (listeners) {
  8484. updateComponentListeners(vm, listeners);
  8485. }
  8486. }
  8487. var target;
  8488. function add (event, fn) {
  8489. target.$on(event, fn);
  8490. }
  8491. function remove$1 (event, fn) {
  8492. target.$off(event, fn);
  8493. }
  8494. function createOnceHandler (event, fn) {
  8495. var _target = target;
  8496. return function onceHandler () {
  8497. var res = fn.apply(null, arguments);
  8498. if (res !== null) {
  8499. _target.$off(event, onceHandler);
  8500. }
  8501. }
  8502. }
  8503. function updateComponentListeners (
  8504. vm,
  8505. listeners,
  8506. oldListeners
  8507. ) {
  8508. target = vm;
  8509. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8510. target = undefined;
  8511. }
  8512. function eventsMixin (Vue) {
  8513. var hookRE = /^hook:/;
  8514. Vue.prototype.$on = function (event, fn) {
  8515. var vm = this;
  8516. if (Array.isArray(event)) {
  8517. for (var i = 0, l = event.length; i < l; i++) {
  8518. vm.$on(event[i], fn);
  8519. }
  8520. } else {
  8521. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8522. // optimize hook:event cost by using a boolean flag marked at registration
  8523. // instead of a hash lookup
  8524. if (hookRE.test(event)) {
  8525. vm._hasHookEvent = true;
  8526. }
  8527. }
  8528. return vm
  8529. };
  8530. Vue.prototype.$once = function (event, fn) {
  8531. var vm = this;
  8532. function on () {
  8533. vm.$off(event, on);
  8534. fn.apply(vm, arguments);
  8535. }
  8536. on.fn = fn;
  8537. vm.$on(event, on);
  8538. return vm
  8539. };
  8540. Vue.prototype.$off = function (event, fn) {
  8541. var vm = this;
  8542. // all
  8543. if (!arguments.length) {
  8544. vm._events = Object.create(null);
  8545. return vm
  8546. }
  8547. // array of events
  8548. if (Array.isArray(event)) {
  8549. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8550. vm.$off(event[i$1], fn);
  8551. }
  8552. return vm
  8553. }
  8554. // specific event
  8555. var cbs = vm._events[event];
  8556. if (!cbs) {
  8557. return vm
  8558. }
  8559. if (!fn) {
  8560. vm._events[event] = null;
  8561. return vm
  8562. }
  8563. // specific handler
  8564. var cb;
  8565. var i = cbs.length;
  8566. while (i--) {
  8567. cb = cbs[i];
  8568. if (cb === fn || cb.fn === fn) {
  8569. cbs.splice(i, 1);
  8570. break
  8571. }
  8572. }
  8573. return vm
  8574. };
  8575. Vue.prototype.$emit = function (event) {
  8576. var vm = this;
  8577. if (true) {
  8578. var lowerCaseEvent = event.toLowerCase();
  8579. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8580. tip(
  8581. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8582. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8583. "Note that HTML attributes are case-insensitive and you cannot use " +
  8584. "v-on to listen to camelCase events when using in-DOM templates. " +
  8585. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8586. );
  8587. }
  8588. }
  8589. var cbs = vm._events[event];
  8590. if (cbs) {
  8591. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8592. var args = toArray(arguments, 1);
  8593. var info = "event handler for \"" + event + "\"";
  8594. for (var i = 0, l = cbs.length; i < l; i++) {
  8595. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8596. }
  8597. }
  8598. return vm
  8599. };
  8600. }
  8601. /* */
  8602. var activeInstance = null;
  8603. var isUpdatingChildComponent = false;
  8604. function setActiveInstance(vm) {
  8605. var prevActiveInstance = activeInstance;
  8606. activeInstance = vm;
  8607. return function () {
  8608. activeInstance = prevActiveInstance;
  8609. }
  8610. }
  8611. function initLifecycle (vm) {
  8612. var options = vm.$options;
  8613. // locate first non-abstract parent
  8614. var parent = options.parent;
  8615. if (parent && !options.abstract) {
  8616. while (parent.$options.abstract && parent.$parent) {
  8617. parent = parent.$parent;
  8618. }
  8619. parent.$children.push(vm);
  8620. }
  8621. vm.$parent = parent;
  8622. vm.$root = parent ? parent.$root : vm;
  8623. vm.$children = [];
  8624. vm.$refs = {};
  8625. vm._watcher = null;
  8626. vm._inactive = null;
  8627. vm._directInactive = false;
  8628. vm._isMounted = false;
  8629. vm._isDestroyed = false;
  8630. vm._isBeingDestroyed = false;
  8631. }
  8632. function lifecycleMixin (Vue) {
  8633. Vue.prototype._update = function (vnode, hydrating) {
  8634. var vm = this;
  8635. var prevEl = vm.$el;
  8636. var prevVnode = vm._vnode;
  8637. var restoreActiveInstance = setActiveInstance(vm);
  8638. vm._vnode = vnode;
  8639. // Vue.prototype.__patch__ is injected in entry points
  8640. // based on the rendering backend used.
  8641. if (!prevVnode) {
  8642. // initial render
  8643. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8644. } else {
  8645. // updates
  8646. vm.$el = vm.__patch__(prevVnode, vnode);
  8647. }
  8648. restoreActiveInstance();
  8649. // update __vue__ reference
  8650. if (prevEl) {
  8651. prevEl.__vue__ = null;
  8652. }
  8653. if (vm.$el) {
  8654. vm.$el.__vue__ = vm;
  8655. }
  8656. // if parent is an HOC, update its $el as well
  8657. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8658. vm.$parent.$el = vm.$el;
  8659. }
  8660. // updated hook is called by the scheduler to ensure that children are
  8661. // updated in a parent's updated hook.
  8662. };
  8663. Vue.prototype.$forceUpdate = function () {
  8664. var vm = this;
  8665. if (vm._watcher) {
  8666. vm._watcher.update();
  8667. }
  8668. };
  8669. Vue.prototype.$destroy = function () {
  8670. var vm = this;
  8671. if (vm._isBeingDestroyed) {
  8672. return
  8673. }
  8674. callHook(vm, 'beforeDestroy');
  8675. vm._isBeingDestroyed = true;
  8676. // remove self from parent
  8677. var parent = vm.$parent;
  8678. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8679. remove(parent.$children, vm);
  8680. }
  8681. // teardown watchers
  8682. if (vm._watcher) {
  8683. vm._watcher.teardown();
  8684. }
  8685. var i = vm._watchers.length;
  8686. while (i--) {
  8687. vm._watchers[i].teardown();
  8688. }
  8689. // remove reference from data ob
  8690. // frozen object may not have observer.
  8691. if (vm._data.__ob__) {
  8692. vm._data.__ob__.vmCount--;
  8693. }
  8694. // call the last hook...
  8695. vm._isDestroyed = true;
  8696. // invoke destroy hooks on current rendered tree
  8697. vm.__patch__(vm._vnode, null);
  8698. // fire destroyed hook
  8699. callHook(vm, 'destroyed');
  8700. // turn off all instance listeners.
  8701. vm.$off();
  8702. // remove __vue__ reference
  8703. if (vm.$el) {
  8704. vm.$el.__vue__ = null;
  8705. }
  8706. // release circular reference (#6759)
  8707. if (vm.$vnode) {
  8708. vm.$vnode.parent = null;
  8709. }
  8710. };
  8711. }
  8712. function updateChildComponent (
  8713. vm,
  8714. propsData,
  8715. listeners,
  8716. parentVnode,
  8717. renderChildren
  8718. ) {
  8719. if (true) {
  8720. isUpdatingChildComponent = true;
  8721. }
  8722. // determine whether component has slot children
  8723. // we need to do this before overwriting $options._renderChildren.
  8724. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8725. // dynamic slot names). Static scoped slots compiled from template has the
  8726. // "$stable" marker.
  8727. var newScopedSlots = parentVnode.data.scopedSlots;
  8728. var oldScopedSlots = vm.$scopedSlots;
  8729. var hasDynamicScopedSlot = !!(
  8730. (newScopedSlots && !newScopedSlots.$stable) ||
  8731. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8732. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8733. );
  8734. // Any static slot children from the parent may have changed during parent's
  8735. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8736. // update is necessary to ensure correctness.
  8737. var needsForceUpdate = !!(
  8738. renderChildren || // has new static slots
  8739. vm.$options._renderChildren || // has old static slots
  8740. hasDynamicScopedSlot
  8741. );
  8742. vm.$options._parentVnode = parentVnode;
  8743. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8744. if (vm._vnode) { // update child tree's parent
  8745. vm._vnode.parent = parentVnode;
  8746. }
  8747. vm.$options._renderChildren = renderChildren;
  8748. // update $attrs and $listeners hash
  8749. // these are also reactive so they may trigger child update if the child
  8750. // used them during render
  8751. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8752. vm.$listeners = listeners || emptyObject;
  8753. // update props
  8754. if (propsData && vm.$options.props) {
  8755. toggleObserving(false);
  8756. var props = vm._props;
  8757. var propKeys = vm.$options._propKeys || [];
  8758. for (var i = 0; i < propKeys.length; i++) {
  8759. var key = propKeys[i];
  8760. var propOptions = vm.$options.props; // wtf flow?
  8761. props[key] = validateProp(key, propOptions, propsData, vm);
  8762. }
  8763. toggleObserving(true);
  8764. // keep a copy of raw propsData
  8765. vm.$options.propsData = propsData;
  8766. }
  8767. // fixed by xxxxxx update properties(mp runtime)
  8768. vm._$updateProperties && vm._$updateProperties(vm);
  8769. // update listeners
  8770. listeners = listeners || emptyObject;
  8771. var oldListeners = vm.$options._parentListeners;
  8772. vm.$options._parentListeners = listeners;
  8773. updateComponentListeners(vm, listeners, oldListeners);
  8774. // resolve slots + force update if has children
  8775. if (needsForceUpdate) {
  8776. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8777. vm.$forceUpdate();
  8778. }
  8779. if (true) {
  8780. isUpdatingChildComponent = false;
  8781. }
  8782. }
  8783. function isInInactiveTree (vm) {
  8784. while (vm && (vm = vm.$parent)) {
  8785. if (vm._inactive) { return true }
  8786. }
  8787. return false
  8788. }
  8789. function activateChildComponent (vm, direct) {
  8790. if (direct) {
  8791. vm._directInactive = false;
  8792. if (isInInactiveTree(vm)) {
  8793. return
  8794. }
  8795. } else if (vm._directInactive) {
  8796. return
  8797. }
  8798. if (vm._inactive || vm._inactive === null) {
  8799. vm._inactive = false;
  8800. for (var i = 0; i < vm.$children.length; i++) {
  8801. activateChildComponent(vm.$children[i]);
  8802. }
  8803. callHook(vm, 'activated');
  8804. }
  8805. }
  8806. function deactivateChildComponent (vm, direct) {
  8807. if (direct) {
  8808. vm._directInactive = true;
  8809. if (isInInactiveTree(vm)) {
  8810. return
  8811. }
  8812. }
  8813. if (!vm._inactive) {
  8814. vm._inactive = true;
  8815. for (var i = 0; i < vm.$children.length; i++) {
  8816. deactivateChildComponent(vm.$children[i]);
  8817. }
  8818. callHook(vm, 'deactivated');
  8819. }
  8820. }
  8821. function callHook (vm, hook) {
  8822. // #7573 disable dep collection when invoking lifecycle hooks
  8823. pushTarget();
  8824. var handlers = vm.$options[hook];
  8825. var info = hook + " hook";
  8826. if (handlers) {
  8827. for (var i = 0, j = handlers.length; i < j; i++) {
  8828. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8829. }
  8830. }
  8831. if (vm._hasHookEvent) {
  8832. vm.$emit('hook:' + hook);
  8833. }
  8834. popTarget();
  8835. }
  8836. /* */
  8837. var MAX_UPDATE_COUNT = 100;
  8838. var queue = [];
  8839. var activatedChildren = [];
  8840. var has = {};
  8841. var circular = {};
  8842. var waiting = false;
  8843. var flushing = false;
  8844. var index = 0;
  8845. /**
  8846. * Reset the scheduler's state.
  8847. */
  8848. function resetSchedulerState () {
  8849. index = queue.length = activatedChildren.length = 0;
  8850. has = {};
  8851. if (true) {
  8852. circular = {};
  8853. }
  8854. waiting = flushing = false;
  8855. }
  8856. // Async edge case #6566 requires saving the timestamp when event listeners are
  8857. // attached. However, calling performance.now() has a perf overhead especially
  8858. // if the page has thousands of event listeners. Instead, we take a timestamp
  8859. // every time the scheduler flushes and use that for all event listeners
  8860. // attached during that flush.
  8861. var currentFlushTimestamp = 0;
  8862. // Async edge case fix requires storing an event listener's attach timestamp.
  8863. var getNow = Date.now;
  8864. // Determine what event timestamp the browser is using. Annoyingly, the
  8865. // timestamp can either be hi-res (relative to page load) or low-res
  8866. // (relative to UNIX epoch), so in order to compare time we have to use the
  8867. // same timestamp type when saving the flush timestamp.
  8868. // All IE versions use low-res event timestamps, and have problematic clock
  8869. // implementations (#9632)
  8870. if (inBrowser && !isIE) {
  8871. var performance = window.performance;
  8872. if (
  8873. performance &&
  8874. typeof performance.now === 'function' &&
  8875. getNow() > document.createEvent('Event').timeStamp
  8876. ) {
  8877. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8878. // smaller than it, it means the event is using a hi-res timestamp,
  8879. // and we need to use the hi-res version for event listener timestamps as
  8880. // well.
  8881. getNow = function () { return performance.now(); };
  8882. }
  8883. }
  8884. /**
  8885. * Flush both queues and run the watchers.
  8886. */
  8887. function flushSchedulerQueue () {
  8888. currentFlushTimestamp = getNow();
  8889. flushing = true;
  8890. var watcher, id;
  8891. // Sort queue before flush.
  8892. // This ensures that:
  8893. // 1. Components are updated from parent to child. (because parent is always
  8894. // created before the child)
  8895. // 2. A component's user watchers are run before its render watcher (because
  8896. // user watchers are created before the render watcher)
  8897. // 3. If a component is destroyed during a parent component's watcher run,
  8898. // its watchers can be skipped.
  8899. queue.sort(function (a, b) { return a.id - b.id; });
  8900. // do not cache length because more watchers might be pushed
  8901. // as we run existing watchers
  8902. for (index = 0; index < queue.length; index++) {
  8903. watcher = queue[index];
  8904. if (watcher.before) {
  8905. watcher.before();
  8906. }
  8907. id = watcher.id;
  8908. has[id] = null;
  8909. watcher.run();
  8910. // in dev build, check and stop circular updates.
  8911. if ( true && has[id] != null) {
  8912. circular[id] = (circular[id] || 0) + 1;
  8913. if (circular[id] > MAX_UPDATE_COUNT) {
  8914. warn(
  8915. 'You may have an infinite update loop ' + (
  8916. watcher.user
  8917. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8918. : "in a component render function."
  8919. ),
  8920. watcher.vm
  8921. );
  8922. break
  8923. }
  8924. }
  8925. }
  8926. // keep copies of post queues before resetting state
  8927. var activatedQueue = activatedChildren.slice();
  8928. var updatedQueue = queue.slice();
  8929. resetSchedulerState();
  8930. // call component updated and activated hooks
  8931. callActivatedHooks(activatedQueue);
  8932. callUpdatedHooks(updatedQueue);
  8933. // devtool hook
  8934. /* istanbul ignore if */
  8935. if (devtools && config.devtools) {
  8936. devtools.emit('flush');
  8937. }
  8938. }
  8939. function callUpdatedHooks (queue) {
  8940. var i = queue.length;
  8941. while (i--) {
  8942. var watcher = queue[i];
  8943. var vm = watcher.vm;
  8944. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8945. callHook(vm, 'updated');
  8946. }
  8947. }
  8948. }
  8949. /**
  8950. * Queue a kept-alive component that was activated during patch.
  8951. * The queue will be processed after the entire tree has been patched.
  8952. */
  8953. function queueActivatedComponent (vm) {
  8954. // setting _inactive to false here so that a render function can
  8955. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8956. vm._inactive = false;
  8957. activatedChildren.push(vm);
  8958. }
  8959. function callActivatedHooks (queue) {
  8960. for (var i = 0; i < queue.length; i++) {
  8961. queue[i]._inactive = true;
  8962. activateChildComponent(queue[i], true /* true */);
  8963. }
  8964. }
  8965. /**
  8966. * Push a watcher into the watcher queue.
  8967. * Jobs with duplicate IDs will be skipped unless it's
  8968. * pushed when the queue is being flushed.
  8969. */
  8970. function queueWatcher (watcher) {
  8971. var id = watcher.id;
  8972. if (has[id] == null) {
  8973. has[id] = true;
  8974. if (!flushing) {
  8975. queue.push(watcher);
  8976. } else {
  8977. // if already flushing, splice the watcher based on its id
  8978. // if already past its id, it will be run next immediately.
  8979. var i = queue.length - 1;
  8980. while (i > index && queue[i].id > watcher.id) {
  8981. i--;
  8982. }
  8983. queue.splice(i + 1, 0, watcher);
  8984. }
  8985. // queue the flush
  8986. if (!waiting) {
  8987. waiting = true;
  8988. if ( true && !config.async) {
  8989. flushSchedulerQueue();
  8990. return
  8991. }
  8992. nextTick(flushSchedulerQueue);
  8993. }
  8994. }
  8995. }
  8996. /* */
  8997. var uid$2 = 0;
  8998. /**
  8999. * A watcher parses an expression, collects dependencies,
  9000. * and fires callback when the expression value changes.
  9001. * This is used for both the $watch() api and directives.
  9002. */
  9003. var Watcher = function Watcher (
  9004. vm,
  9005. expOrFn,
  9006. cb,
  9007. options,
  9008. isRenderWatcher
  9009. ) {
  9010. this.vm = vm;
  9011. if (isRenderWatcher) {
  9012. vm._watcher = this;
  9013. }
  9014. vm._watchers.push(this);
  9015. // options
  9016. if (options) {
  9017. this.deep = !!options.deep;
  9018. this.user = !!options.user;
  9019. this.lazy = !!options.lazy;
  9020. this.sync = !!options.sync;
  9021. this.before = options.before;
  9022. } else {
  9023. this.deep = this.user = this.lazy = this.sync = false;
  9024. }
  9025. this.cb = cb;
  9026. this.id = ++uid$2; // uid for batching
  9027. this.active = true;
  9028. this.dirty = this.lazy; // for lazy watchers
  9029. this.deps = [];
  9030. this.newDeps = [];
  9031. this.depIds = new _Set();
  9032. this.newDepIds = new _Set();
  9033. this.expression = true
  9034. ? expOrFn.toString()
  9035. : undefined;
  9036. // parse expression for getter
  9037. if (typeof expOrFn === 'function') {
  9038. this.getter = expOrFn;
  9039. } else {
  9040. this.getter = parsePath(expOrFn);
  9041. if (!this.getter) {
  9042. this.getter = noop;
  9043. true && warn(
  9044. "Failed watching path: \"" + expOrFn + "\" " +
  9045. 'Watcher only accepts simple dot-delimited paths. ' +
  9046. 'For full control, use a function instead.',
  9047. vm
  9048. );
  9049. }
  9050. }
  9051. this.value = this.lazy
  9052. ? undefined
  9053. : this.get();
  9054. };
  9055. /**
  9056. * Evaluate the getter, and re-collect dependencies.
  9057. */
  9058. Watcher.prototype.get = function get () {
  9059. pushTarget(this);
  9060. var value;
  9061. var vm = this.vm;
  9062. try {
  9063. value = this.getter.call(vm, vm);
  9064. } catch (e) {
  9065. if (this.user) {
  9066. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  9067. } else {
  9068. throw e
  9069. }
  9070. } finally {
  9071. // "touch" every property so they are all tracked as
  9072. // dependencies for deep watching
  9073. if (this.deep) {
  9074. traverse(value);
  9075. }
  9076. popTarget();
  9077. this.cleanupDeps();
  9078. }
  9079. return value
  9080. };
  9081. /**
  9082. * Add a dependency to this directive.
  9083. */
  9084. Watcher.prototype.addDep = function addDep (dep) {
  9085. var id = dep.id;
  9086. if (!this.newDepIds.has(id)) {
  9087. this.newDepIds.add(id);
  9088. this.newDeps.push(dep);
  9089. if (!this.depIds.has(id)) {
  9090. dep.addSub(this);
  9091. }
  9092. }
  9093. };
  9094. /**
  9095. * Clean up for dependency collection.
  9096. */
  9097. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  9098. var i = this.deps.length;
  9099. while (i--) {
  9100. var dep = this.deps[i];
  9101. if (!this.newDepIds.has(dep.id)) {
  9102. dep.removeSub(this);
  9103. }
  9104. }
  9105. var tmp = this.depIds;
  9106. this.depIds = this.newDepIds;
  9107. this.newDepIds = tmp;
  9108. this.newDepIds.clear();
  9109. tmp = this.deps;
  9110. this.deps = this.newDeps;
  9111. this.newDeps = tmp;
  9112. this.newDeps.length = 0;
  9113. };
  9114. /**
  9115. * Subscriber interface.
  9116. * Will be called when a dependency changes.
  9117. */
  9118. Watcher.prototype.update = function update () {
  9119. /* istanbul ignore else */
  9120. if (this.lazy) {
  9121. this.dirty = true;
  9122. } else if (this.sync) {
  9123. this.run();
  9124. } else {
  9125. queueWatcher(this);
  9126. }
  9127. };
  9128. /**
  9129. * Scheduler job interface.
  9130. * Will be called by the scheduler.
  9131. */
  9132. Watcher.prototype.run = function run () {
  9133. if (this.active) {
  9134. var value = this.get();
  9135. if (
  9136. value !== this.value ||
  9137. // Deep watchers and watchers on Object/Arrays should fire even
  9138. // when the value is the same, because the value may
  9139. // have mutated.
  9140. isObject(value) ||
  9141. this.deep
  9142. ) {
  9143. // set new value
  9144. var oldValue = this.value;
  9145. this.value = value;
  9146. if (this.user) {
  9147. try {
  9148. this.cb.call(this.vm, value, oldValue);
  9149. } catch (e) {
  9150. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  9151. }
  9152. } else {
  9153. this.cb.call(this.vm, value, oldValue);
  9154. }
  9155. }
  9156. }
  9157. };
  9158. /**
  9159. * Evaluate the value of the watcher.
  9160. * This only gets called for lazy watchers.
  9161. */
  9162. Watcher.prototype.evaluate = function evaluate () {
  9163. this.value = this.get();
  9164. this.dirty = false;
  9165. };
  9166. /**
  9167. * Depend on all deps collected by this watcher.
  9168. */
  9169. Watcher.prototype.depend = function depend () {
  9170. var i = this.deps.length;
  9171. while (i--) {
  9172. this.deps[i].depend();
  9173. }
  9174. };
  9175. /**
  9176. * Remove self from all dependencies' subscriber list.
  9177. */
  9178. Watcher.prototype.teardown = function teardown () {
  9179. if (this.active) {
  9180. // remove self from vm's watcher list
  9181. // this is a somewhat expensive operation so we skip it
  9182. // if the vm is being destroyed.
  9183. if (!this.vm._isBeingDestroyed) {
  9184. remove(this.vm._watchers, this);
  9185. }
  9186. var i = this.deps.length;
  9187. while (i--) {
  9188. this.deps[i].removeSub(this);
  9189. }
  9190. this.active = false;
  9191. }
  9192. };
  9193. /* */
  9194. var sharedPropertyDefinition = {
  9195. enumerable: true,
  9196. configurable: true,
  9197. get: noop,
  9198. set: noop
  9199. };
  9200. function proxy (target, sourceKey, key) {
  9201. sharedPropertyDefinition.get = function proxyGetter () {
  9202. return this[sourceKey][key]
  9203. };
  9204. sharedPropertyDefinition.set = function proxySetter (val) {
  9205. this[sourceKey][key] = val;
  9206. };
  9207. Object.defineProperty(target, key, sharedPropertyDefinition);
  9208. }
  9209. function initState (vm) {
  9210. vm._watchers = [];
  9211. var opts = vm.$options;
  9212. if (opts.props) { initProps(vm, opts.props); }
  9213. if (opts.methods) { initMethods(vm, opts.methods); }
  9214. if (opts.data) {
  9215. initData(vm);
  9216. } else {
  9217. observe(vm._data = {}, true /* asRootData */);
  9218. }
  9219. if (opts.computed) { initComputed(vm, opts.computed); }
  9220. if (opts.watch && opts.watch !== nativeWatch) {
  9221. initWatch(vm, opts.watch);
  9222. }
  9223. }
  9224. function initProps (vm, propsOptions) {
  9225. var propsData = vm.$options.propsData || {};
  9226. var props = vm._props = {};
  9227. // cache prop keys so that future props updates can iterate using Array
  9228. // instead of dynamic object key enumeration.
  9229. var keys = vm.$options._propKeys = [];
  9230. var isRoot = !vm.$parent;
  9231. // root instance props should be converted
  9232. if (!isRoot) {
  9233. toggleObserving(false);
  9234. }
  9235. var loop = function ( key ) {
  9236. keys.push(key);
  9237. var value = validateProp(key, propsOptions, propsData, vm);
  9238. /* istanbul ignore else */
  9239. if (true) {
  9240. var hyphenatedKey = hyphenate(key);
  9241. if (isReservedAttribute(hyphenatedKey) ||
  9242. config.isReservedAttr(hyphenatedKey)) {
  9243. warn(
  9244. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  9245. vm
  9246. );
  9247. }
  9248. defineReactive$$1(props, key, value, function () {
  9249. if (!isRoot && !isUpdatingChildComponent) {
  9250. {
  9251. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  9252. return
  9253. }
  9254. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  9255. if(
  9256. key === 'value' &&
  9257. Array.isArray(vm.$options.behaviors) &&
  9258. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9259. ){
  9260. return
  9261. }
  9262. if(vm._getFormData){
  9263. return
  9264. }
  9265. var $parent = vm.$parent;
  9266. while($parent){
  9267. if($parent.__next_tick_pending){
  9268. return
  9269. }
  9270. $parent = $parent.$parent;
  9271. }
  9272. }
  9273. warn(
  9274. "Avoid mutating a prop directly since the value will be " +
  9275. "overwritten whenever the parent component re-renders. " +
  9276. "Instead, use a data or computed property based on the prop's " +
  9277. "value. Prop being mutated: \"" + key + "\"",
  9278. vm
  9279. );
  9280. }
  9281. });
  9282. } else {}
  9283. // static props are already proxied on the component's prototype
  9284. // during Vue.extend(). We only need to proxy props defined at
  9285. // instantiation here.
  9286. if (!(key in vm)) {
  9287. proxy(vm, "_props", key);
  9288. }
  9289. };
  9290. for (var key in propsOptions) loop( key );
  9291. toggleObserving(true);
  9292. }
  9293. function initData (vm) {
  9294. var data = vm.$options.data;
  9295. data = vm._data = typeof data === 'function'
  9296. ? getData(data, vm)
  9297. : data || {};
  9298. if (!isPlainObject(data)) {
  9299. data = {};
  9300. true && warn(
  9301. 'data functions should return an object:\n' +
  9302. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  9303. vm
  9304. );
  9305. }
  9306. // proxy data on instance
  9307. var keys = Object.keys(data);
  9308. var props = vm.$options.props;
  9309. var methods = vm.$options.methods;
  9310. var i = keys.length;
  9311. while (i--) {
  9312. var key = keys[i];
  9313. if (true) {
  9314. if (methods && hasOwn(methods, key)) {
  9315. warn(
  9316. ("Method \"" + key + "\" has already been defined as a data property."),
  9317. vm
  9318. );
  9319. }
  9320. }
  9321. if (props && hasOwn(props, key)) {
  9322. true && warn(
  9323. "The data property \"" + key + "\" is already declared as a prop. " +
  9324. "Use prop default value instead.",
  9325. vm
  9326. );
  9327. } else if (!isReserved(key)) {
  9328. proxy(vm, "_data", key);
  9329. }
  9330. }
  9331. // observe data
  9332. observe(data, true /* asRootData */);
  9333. }
  9334. function getData (data, vm) {
  9335. // #7573 disable dep collection when invoking data getters
  9336. pushTarget();
  9337. try {
  9338. return data.call(vm, vm)
  9339. } catch (e) {
  9340. handleError(e, vm, "data()");
  9341. return {}
  9342. } finally {
  9343. popTarget();
  9344. }
  9345. }
  9346. var computedWatcherOptions = { lazy: true };
  9347. function initComputed (vm, computed) {
  9348. // $flow-disable-line
  9349. var watchers = vm._computedWatchers = Object.create(null);
  9350. // computed properties are just getters during SSR
  9351. var isSSR = isServerRendering();
  9352. for (var key in computed) {
  9353. var userDef = computed[key];
  9354. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  9355. if ( true && getter == null) {
  9356. warn(
  9357. ("Getter is missing for computed property \"" + key + "\"."),
  9358. vm
  9359. );
  9360. }
  9361. if (!isSSR) {
  9362. // create internal watcher for the computed property.
  9363. watchers[key] = new Watcher(
  9364. vm,
  9365. getter || noop,
  9366. noop,
  9367. computedWatcherOptions
  9368. );
  9369. }
  9370. // component-defined computed properties are already defined on the
  9371. // component prototype. We only need to define computed properties defined
  9372. // at instantiation here.
  9373. if (!(key in vm)) {
  9374. defineComputed(vm, key, userDef);
  9375. } else if (true) {
  9376. if (key in vm.$data) {
  9377. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  9378. } else if (vm.$options.props && key in vm.$options.props) {
  9379. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  9380. }
  9381. }
  9382. }
  9383. }
  9384. function defineComputed (
  9385. target,
  9386. key,
  9387. userDef
  9388. ) {
  9389. var shouldCache = !isServerRendering();
  9390. if (typeof userDef === 'function') {
  9391. sharedPropertyDefinition.get = shouldCache
  9392. ? createComputedGetter(key)
  9393. : createGetterInvoker(userDef);
  9394. sharedPropertyDefinition.set = noop;
  9395. } else {
  9396. sharedPropertyDefinition.get = userDef.get
  9397. ? shouldCache && userDef.cache !== false
  9398. ? createComputedGetter(key)
  9399. : createGetterInvoker(userDef.get)
  9400. : noop;
  9401. sharedPropertyDefinition.set = userDef.set || noop;
  9402. }
  9403. if ( true &&
  9404. sharedPropertyDefinition.set === noop) {
  9405. sharedPropertyDefinition.set = function () {
  9406. warn(
  9407. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  9408. this
  9409. );
  9410. };
  9411. }
  9412. Object.defineProperty(target, key, sharedPropertyDefinition);
  9413. }
  9414. function createComputedGetter (key) {
  9415. return function computedGetter () {
  9416. var watcher = this._computedWatchers && this._computedWatchers[key];
  9417. if (watcher) {
  9418. if (watcher.dirty) {
  9419. watcher.evaluate();
  9420. }
  9421. if (Dep.SharedObject.target) {// fixed by xxxxxx
  9422. watcher.depend();
  9423. }
  9424. return watcher.value
  9425. }
  9426. }
  9427. }
  9428. function createGetterInvoker(fn) {
  9429. return function computedGetter () {
  9430. return fn.call(this, this)
  9431. }
  9432. }
  9433. function initMethods (vm, methods) {
  9434. var props = vm.$options.props;
  9435. for (var key in methods) {
  9436. if (true) {
  9437. if (typeof methods[key] !== 'function') {
  9438. warn(
  9439. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  9440. "Did you reference the function correctly?",
  9441. vm
  9442. );
  9443. }
  9444. if (props && hasOwn(props, key)) {
  9445. warn(
  9446. ("Method \"" + key + "\" has already been defined as a prop."),
  9447. vm
  9448. );
  9449. }
  9450. if ((key in vm) && isReserved(key)) {
  9451. warn(
  9452. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  9453. "Avoid defining component methods that start with _ or $."
  9454. );
  9455. }
  9456. }
  9457. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  9458. }
  9459. }
  9460. function initWatch (vm, watch) {
  9461. for (var key in watch) {
  9462. var handler = watch[key];
  9463. if (Array.isArray(handler)) {
  9464. for (var i = 0; i < handler.length; i++) {
  9465. createWatcher(vm, key, handler[i]);
  9466. }
  9467. } else {
  9468. createWatcher(vm, key, handler);
  9469. }
  9470. }
  9471. }
  9472. function createWatcher (
  9473. vm,
  9474. expOrFn,
  9475. handler,
  9476. options
  9477. ) {
  9478. if (isPlainObject(handler)) {
  9479. options = handler;
  9480. handler = handler.handler;
  9481. }
  9482. if (typeof handler === 'string') {
  9483. handler = vm[handler];
  9484. }
  9485. return vm.$watch(expOrFn, handler, options)
  9486. }
  9487. function stateMixin (Vue) {
  9488. // flow somehow has problems with directly declared definition object
  9489. // when using Object.defineProperty, so we have to procedurally build up
  9490. // the object here.
  9491. var dataDef = {};
  9492. dataDef.get = function () { return this._data };
  9493. var propsDef = {};
  9494. propsDef.get = function () { return this._props };
  9495. if (true) {
  9496. dataDef.set = function () {
  9497. warn(
  9498. 'Avoid replacing instance root $data. ' +
  9499. 'Use nested data properties instead.',
  9500. this
  9501. );
  9502. };
  9503. propsDef.set = function () {
  9504. warn("$props is readonly.", this);
  9505. };
  9506. }
  9507. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9508. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9509. Vue.prototype.$set = set;
  9510. Vue.prototype.$delete = del;
  9511. Vue.prototype.$watch = function (
  9512. expOrFn,
  9513. cb,
  9514. options
  9515. ) {
  9516. var vm = this;
  9517. if (isPlainObject(cb)) {
  9518. return createWatcher(vm, expOrFn, cb, options)
  9519. }
  9520. options = options || {};
  9521. options.user = true;
  9522. var watcher = new Watcher(vm, expOrFn, cb, options);
  9523. if (options.immediate) {
  9524. try {
  9525. cb.call(vm, watcher.value);
  9526. } catch (error) {
  9527. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9528. }
  9529. }
  9530. return function unwatchFn () {
  9531. watcher.teardown();
  9532. }
  9533. };
  9534. }
  9535. /* */
  9536. var uid$3 = 0;
  9537. function initMixin (Vue) {
  9538. Vue.prototype._init = function (options) {
  9539. var vm = this;
  9540. // a uid
  9541. vm._uid = uid$3++;
  9542. var startTag, endTag;
  9543. /* istanbul ignore if */
  9544. if ( true && config.performance && mark) {
  9545. startTag = "vue-perf-start:" + (vm._uid);
  9546. endTag = "vue-perf-end:" + (vm._uid);
  9547. mark(startTag);
  9548. }
  9549. // a flag to avoid this being observed
  9550. vm._isVue = true;
  9551. // merge options
  9552. if (options && options._isComponent) {
  9553. // optimize internal component instantiation
  9554. // since dynamic options merging is pretty slow, and none of the
  9555. // internal component options needs special treatment.
  9556. initInternalComponent(vm, options);
  9557. } else {
  9558. vm.$options = mergeOptions(
  9559. resolveConstructorOptions(vm.constructor),
  9560. options || {},
  9561. vm
  9562. );
  9563. }
  9564. /* istanbul ignore else */
  9565. if (true) {
  9566. initProxy(vm);
  9567. } else {}
  9568. // expose real self
  9569. vm._self = vm;
  9570. initLifecycle(vm);
  9571. initEvents(vm);
  9572. initRender(vm);
  9573. callHook(vm, 'beforeCreate');
  9574. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9575. initState(vm);
  9576. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9577. !vm._$fallback && callHook(vm, 'created');
  9578. /* istanbul ignore if */
  9579. if ( true && config.performance && mark) {
  9580. vm._name = formatComponentName(vm, false);
  9581. mark(endTag);
  9582. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9583. }
  9584. if (vm.$options.el) {
  9585. vm.$mount(vm.$options.el);
  9586. }
  9587. };
  9588. }
  9589. function initInternalComponent (vm, options) {
  9590. var opts = vm.$options = Object.create(vm.constructor.options);
  9591. // doing this because it's faster than dynamic enumeration.
  9592. var parentVnode = options._parentVnode;
  9593. opts.parent = options.parent;
  9594. opts._parentVnode = parentVnode;
  9595. var vnodeComponentOptions = parentVnode.componentOptions;
  9596. opts.propsData = vnodeComponentOptions.propsData;
  9597. opts._parentListeners = vnodeComponentOptions.listeners;
  9598. opts._renderChildren = vnodeComponentOptions.children;
  9599. opts._componentTag = vnodeComponentOptions.tag;
  9600. if (options.render) {
  9601. opts.render = options.render;
  9602. opts.staticRenderFns = options.staticRenderFns;
  9603. }
  9604. }
  9605. function resolveConstructorOptions (Ctor) {
  9606. var options = Ctor.options;
  9607. if (Ctor.super) {
  9608. var superOptions = resolveConstructorOptions(Ctor.super);
  9609. var cachedSuperOptions = Ctor.superOptions;
  9610. if (superOptions !== cachedSuperOptions) {
  9611. // super option changed,
  9612. // need to resolve new options.
  9613. Ctor.superOptions = superOptions;
  9614. // check if there are any late-modified/attached options (#4976)
  9615. var modifiedOptions = resolveModifiedOptions(Ctor);
  9616. // update base extend options
  9617. if (modifiedOptions) {
  9618. extend(Ctor.extendOptions, modifiedOptions);
  9619. }
  9620. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9621. if (options.name) {
  9622. options.components[options.name] = Ctor;
  9623. }
  9624. }
  9625. }
  9626. return options
  9627. }
  9628. function resolveModifiedOptions (Ctor) {
  9629. var modified;
  9630. var latest = Ctor.options;
  9631. var sealed = Ctor.sealedOptions;
  9632. for (var key in latest) {
  9633. if (latest[key] !== sealed[key]) {
  9634. if (!modified) { modified = {}; }
  9635. modified[key] = latest[key];
  9636. }
  9637. }
  9638. return modified
  9639. }
  9640. function Vue (options) {
  9641. if ( true &&
  9642. !(this instanceof Vue)
  9643. ) {
  9644. warn('Vue is a constructor and should be called with the `new` keyword');
  9645. }
  9646. this._init(options);
  9647. }
  9648. initMixin(Vue);
  9649. stateMixin(Vue);
  9650. eventsMixin(Vue);
  9651. lifecycleMixin(Vue);
  9652. renderMixin(Vue);
  9653. /* */
  9654. function initUse (Vue) {
  9655. Vue.use = function (plugin) {
  9656. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9657. if (installedPlugins.indexOf(plugin) > -1) {
  9658. return this
  9659. }
  9660. // additional parameters
  9661. var args = toArray(arguments, 1);
  9662. args.unshift(this);
  9663. if (typeof plugin.install === 'function') {
  9664. plugin.install.apply(plugin, args);
  9665. } else if (typeof plugin === 'function') {
  9666. plugin.apply(null, args);
  9667. }
  9668. installedPlugins.push(plugin);
  9669. return this
  9670. };
  9671. }
  9672. /* */
  9673. function initMixin$1 (Vue) {
  9674. Vue.mixin = function (mixin) {
  9675. this.options = mergeOptions(this.options, mixin);
  9676. return this
  9677. };
  9678. }
  9679. /* */
  9680. function initExtend (Vue) {
  9681. /**
  9682. * Each instance constructor, including Vue, has a unique
  9683. * cid. This enables us to create wrapped "child
  9684. * constructors" for prototypal inheritance and cache them.
  9685. */
  9686. Vue.cid = 0;
  9687. var cid = 1;
  9688. /**
  9689. * Class inheritance
  9690. */
  9691. Vue.extend = function (extendOptions) {
  9692. extendOptions = extendOptions || {};
  9693. var Super = this;
  9694. var SuperId = Super.cid;
  9695. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9696. if (cachedCtors[SuperId]) {
  9697. return cachedCtors[SuperId]
  9698. }
  9699. var name = extendOptions.name || Super.options.name;
  9700. if ( true && name) {
  9701. validateComponentName(name);
  9702. }
  9703. var Sub = function VueComponent (options) {
  9704. this._init(options);
  9705. };
  9706. Sub.prototype = Object.create(Super.prototype);
  9707. Sub.prototype.constructor = Sub;
  9708. Sub.cid = cid++;
  9709. Sub.options = mergeOptions(
  9710. Super.options,
  9711. extendOptions
  9712. );
  9713. Sub['super'] = Super;
  9714. // For props and computed properties, we define the proxy getters on
  9715. // the Vue instances at extension time, on the extended prototype. This
  9716. // avoids Object.defineProperty calls for each instance created.
  9717. if (Sub.options.props) {
  9718. initProps$1(Sub);
  9719. }
  9720. if (Sub.options.computed) {
  9721. initComputed$1(Sub);
  9722. }
  9723. // allow further extension/mixin/plugin usage
  9724. Sub.extend = Super.extend;
  9725. Sub.mixin = Super.mixin;
  9726. Sub.use = Super.use;
  9727. // create asset registers, so extended classes
  9728. // can have their private assets too.
  9729. ASSET_TYPES.forEach(function (type) {
  9730. Sub[type] = Super[type];
  9731. });
  9732. // enable recursive self-lookup
  9733. if (name) {
  9734. Sub.options.components[name] = Sub;
  9735. }
  9736. // keep a reference to the super options at extension time.
  9737. // later at instantiation we can check if Super's options have
  9738. // been updated.
  9739. Sub.superOptions = Super.options;
  9740. Sub.extendOptions = extendOptions;
  9741. Sub.sealedOptions = extend({}, Sub.options);
  9742. // cache constructor
  9743. cachedCtors[SuperId] = Sub;
  9744. return Sub
  9745. };
  9746. }
  9747. function initProps$1 (Comp) {
  9748. var props = Comp.options.props;
  9749. for (var key in props) {
  9750. proxy(Comp.prototype, "_props", key);
  9751. }
  9752. }
  9753. function initComputed$1 (Comp) {
  9754. var computed = Comp.options.computed;
  9755. for (var key in computed) {
  9756. defineComputed(Comp.prototype, key, computed[key]);
  9757. }
  9758. }
  9759. /* */
  9760. function initAssetRegisters (Vue) {
  9761. /**
  9762. * Create asset registration methods.
  9763. */
  9764. ASSET_TYPES.forEach(function (type) {
  9765. Vue[type] = function (
  9766. id,
  9767. definition
  9768. ) {
  9769. if (!definition) {
  9770. return this.options[type + 's'][id]
  9771. } else {
  9772. /* istanbul ignore if */
  9773. if ( true && type === 'component') {
  9774. validateComponentName(id);
  9775. }
  9776. if (type === 'component' && isPlainObject(definition)) {
  9777. definition.name = definition.name || id;
  9778. definition = this.options._base.extend(definition);
  9779. }
  9780. if (type === 'directive' && typeof definition === 'function') {
  9781. definition = { bind: definition, update: definition };
  9782. }
  9783. this.options[type + 's'][id] = definition;
  9784. return definition
  9785. }
  9786. };
  9787. });
  9788. }
  9789. /* */
  9790. function getComponentName (opts) {
  9791. return opts && (opts.Ctor.options.name || opts.tag)
  9792. }
  9793. function matches (pattern, name) {
  9794. if (Array.isArray(pattern)) {
  9795. return pattern.indexOf(name) > -1
  9796. } else if (typeof pattern === 'string') {
  9797. return pattern.split(',').indexOf(name) > -1
  9798. } else if (isRegExp(pattern)) {
  9799. return pattern.test(name)
  9800. }
  9801. /* istanbul ignore next */
  9802. return false
  9803. }
  9804. function pruneCache (keepAliveInstance, filter) {
  9805. var cache = keepAliveInstance.cache;
  9806. var keys = keepAliveInstance.keys;
  9807. var _vnode = keepAliveInstance._vnode;
  9808. for (var key in cache) {
  9809. var cachedNode = cache[key];
  9810. if (cachedNode) {
  9811. var name = getComponentName(cachedNode.componentOptions);
  9812. if (name && !filter(name)) {
  9813. pruneCacheEntry(cache, key, keys, _vnode);
  9814. }
  9815. }
  9816. }
  9817. }
  9818. function pruneCacheEntry (
  9819. cache,
  9820. key,
  9821. keys,
  9822. current
  9823. ) {
  9824. var cached$$1 = cache[key];
  9825. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9826. cached$$1.componentInstance.$destroy();
  9827. }
  9828. cache[key] = null;
  9829. remove(keys, key);
  9830. }
  9831. var patternTypes = [String, RegExp, Array];
  9832. var KeepAlive = {
  9833. name: 'keep-alive',
  9834. abstract: true,
  9835. props: {
  9836. include: patternTypes,
  9837. exclude: patternTypes,
  9838. max: [String, Number]
  9839. },
  9840. created: function created () {
  9841. this.cache = Object.create(null);
  9842. this.keys = [];
  9843. },
  9844. destroyed: function destroyed () {
  9845. for (var key in this.cache) {
  9846. pruneCacheEntry(this.cache, key, this.keys);
  9847. }
  9848. },
  9849. mounted: function mounted () {
  9850. var this$1 = this;
  9851. this.$watch('include', function (val) {
  9852. pruneCache(this$1, function (name) { return matches(val, name); });
  9853. });
  9854. this.$watch('exclude', function (val) {
  9855. pruneCache(this$1, function (name) { return !matches(val, name); });
  9856. });
  9857. },
  9858. render: function render () {
  9859. var slot = this.$slots.default;
  9860. var vnode = getFirstComponentChild(slot);
  9861. var componentOptions = vnode && vnode.componentOptions;
  9862. if (componentOptions) {
  9863. // check pattern
  9864. var name = getComponentName(componentOptions);
  9865. var ref = this;
  9866. var include = ref.include;
  9867. var exclude = ref.exclude;
  9868. if (
  9869. // not included
  9870. (include && (!name || !matches(include, name))) ||
  9871. // excluded
  9872. (exclude && name && matches(exclude, name))
  9873. ) {
  9874. return vnode
  9875. }
  9876. var ref$1 = this;
  9877. var cache = ref$1.cache;
  9878. var keys = ref$1.keys;
  9879. var key = vnode.key == null
  9880. // same constructor may get registered as different local components
  9881. // so cid alone is not enough (#3269)
  9882. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9883. : vnode.key;
  9884. if (cache[key]) {
  9885. vnode.componentInstance = cache[key].componentInstance;
  9886. // make current key freshest
  9887. remove(keys, key);
  9888. keys.push(key);
  9889. } else {
  9890. cache[key] = vnode;
  9891. keys.push(key);
  9892. // prune oldest entry
  9893. if (this.max && keys.length > parseInt(this.max)) {
  9894. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9895. }
  9896. }
  9897. vnode.data.keepAlive = true;
  9898. }
  9899. return vnode || (slot && slot[0])
  9900. }
  9901. };
  9902. var builtInComponents = {
  9903. KeepAlive: KeepAlive
  9904. };
  9905. /* */
  9906. function initGlobalAPI (Vue) {
  9907. // config
  9908. var configDef = {};
  9909. configDef.get = function () { return config; };
  9910. if (true) {
  9911. configDef.set = function () {
  9912. warn(
  9913. 'Do not replace the Vue.config object, set individual fields instead.'
  9914. );
  9915. };
  9916. }
  9917. Object.defineProperty(Vue, 'config', configDef);
  9918. // exposed util methods.
  9919. // NOTE: these are not considered part of the public API - avoid relying on
  9920. // them unless you are aware of the risk.
  9921. Vue.util = {
  9922. warn: warn,
  9923. extend: extend,
  9924. mergeOptions: mergeOptions,
  9925. defineReactive: defineReactive$$1
  9926. };
  9927. Vue.set = set;
  9928. Vue.delete = del;
  9929. Vue.nextTick = nextTick;
  9930. // 2.6 explicit observable API
  9931. Vue.observable = function (obj) {
  9932. observe(obj);
  9933. return obj
  9934. };
  9935. Vue.options = Object.create(null);
  9936. ASSET_TYPES.forEach(function (type) {
  9937. Vue.options[type + 's'] = Object.create(null);
  9938. });
  9939. // this is used to identify the "base" constructor to extend all plain-object
  9940. // components with in Weex's multi-instance scenarios.
  9941. Vue.options._base = Vue;
  9942. extend(Vue.options.components, builtInComponents);
  9943. initUse(Vue);
  9944. initMixin$1(Vue);
  9945. initExtend(Vue);
  9946. initAssetRegisters(Vue);
  9947. }
  9948. initGlobalAPI(Vue);
  9949. Object.defineProperty(Vue.prototype, '$isServer', {
  9950. get: isServerRendering
  9951. });
  9952. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9953. get: function get () {
  9954. /* istanbul ignore next */
  9955. return this.$vnode && this.$vnode.ssrContext
  9956. }
  9957. });
  9958. // expose FunctionalRenderContext for ssr runtime helper installation
  9959. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9960. value: FunctionalRenderContext
  9961. });
  9962. Vue.version = '2.6.11';
  9963. /**
  9964. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9965. */
  9966. var ARRAYTYPE = '[object Array]';
  9967. var OBJECTTYPE = '[object Object]';
  9968. // const FUNCTIONTYPE = '[object Function]'
  9969. function diff(current, pre) {
  9970. var result = {};
  9971. syncKeys(current, pre);
  9972. _diff(current, pre, '', result);
  9973. return result
  9974. }
  9975. function syncKeys(current, pre) {
  9976. if (current === pre) { return }
  9977. var rootCurrentType = type(current);
  9978. var rootPreType = type(pre);
  9979. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9980. if(Object.keys(current).length >= Object.keys(pre).length){
  9981. for (var key in pre) {
  9982. var currentValue = current[key];
  9983. if (currentValue === undefined) {
  9984. current[key] = null;
  9985. } else {
  9986. syncKeys(currentValue, pre[key]);
  9987. }
  9988. }
  9989. }
  9990. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9991. if (current.length >= pre.length) {
  9992. pre.forEach(function (item, index) {
  9993. syncKeys(current[index], item);
  9994. });
  9995. }
  9996. }
  9997. }
  9998. function _diff(current, pre, path, result) {
  9999. if (current === pre) { return }
  10000. var rootCurrentType = type(current);
  10001. var rootPreType = type(pre);
  10002. if (rootCurrentType == OBJECTTYPE) {
  10003. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  10004. setResult(result, path, current);
  10005. } else {
  10006. var loop = function ( key ) {
  10007. var currentValue = current[key];
  10008. var preValue = pre[key];
  10009. var currentType = type(currentValue);
  10010. var preType = type(preValue);
  10011. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  10012. if (currentValue != pre[key]) {
  10013. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10014. }
  10015. } else if (currentType == ARRAYTYPE) {
  10016. if (preType != ARRAYTYPE) {
  10017. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10018. } else {
  10019. if (currentValue.length < preValue.length) {
  10020. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10021. } else {
  10022. currentValue.forEach(function (item, index) {
  10023. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  10024. });
  10025. }
  10026. }
  10027. } else if (currentType == OBJECTTYPE) {
  10028. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  10029. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  10030. } else {
  10031. for (var subKey in currentValue) {
  10032. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  10033. }
  10034. }
  10035. }
  10036. };
  10037. for (var key in current) loop( key );
  10038. }
  10039. } else if (rootCurrentType == ARRAYTYPE) {
  10040. if (rootPreType != ARRAYTYPE) {
  10041. setResult(result, path, current);
  10042. } else {
  10043. if (current.length < pre.length) {
  10044. setResult(result, path, current);
  10045. } else {
  10046. current.forEach(function (item, index) {
  10047. _diff(item, pre[index], path + '[' + index + ']', result);
  10048. });
  10049. }
  10050. }
  10051. } else {
  10052. setResult(result, path, current);
  10053. }
  10054. }
  10055. function setResult(result, k, v) {
  10056. // if (type(v) != FUNCTIONTYPE) {
  10057. result[k] = v;
  10058. // }
  10059. }
  10060. function type(obj) {
  10061. return Object.prototype.toString.call(obj)
  10062. }
  10063. /* */
  10064. function flushCallbacks$1(vm) {
  10065. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  10066. if (Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10067. var mpInstance = vm.$scope;
  10068. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10069. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  10070. }
  10071. var copies = vm.__next_tick_callbacks.slice(0);
  10072. vm.__next_tick_callbacks.length = 0;
  10073. for (var i = 0; i < copies.length; i++) {
  10074. copies[i]();
  10075. }
  10076. }
  10077. }
  10078. function hasRenderWatcher(vm) {
  10079. return queue.find(function (watcher) { return vm._watcher === watcher; })
  10080. }
  10081. function nextTick$1(vm, cb) {
  10082. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  10083. //2.nextTick 之前存在 render watcher
  10084. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  10085. if(Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  10086. var mpInstance = vm.$scope;
  10087. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  10088. ']:nextVueTick');
  10089. }
  10090. return nextTick(cb, vm)
  10091. }else{
  10092. if(Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  10093. var mpInstance$1 = vm.$scope;
  10094. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  10095. ']:nextMPTick');
  10096. }
  10097. }
  10098. var _resolve;
  10099. if (!vm.__next_tick_callbacks) {
  10100. vm.__next_tick_callbacks = [];
  10101. }
  10102. vm.__next_tick_callbacks.push(function () {
  10103. if (cb) {
  10104. try {
  10105. cb.call(vm);
  10106. } catch (e) {
  10107. handleError(e, vm, 'nextTick');
  10108. }
  10109. } else if (_resolve) {
  10110. _resolve(vm);
  10111. }
  10112. });
  10113. // $flow-disable-line
  10114. if (!cb && typeof Promise !== 'undefined') {
  10115. return new Promise(function (resolve) {
  10116. _resolve = resolve;
  10117. })
  10118. }
  10119. }
  10120. /* */
  10121. function cloneWithData(vm) {
  10122. // 确保当前 vm 所有数据被同步
  10123. var ret = Object.create(null);
  10124. var dataKeys = [].concat(
  10125. Object.keys(vm._data || {}),
  10126. Object.keys(vm._computedWatchers || {}));
  10127. dataKeys.reduce(function(ret, key) {
  10128. ret[key] = vm[key];
  10129. return ret
  10130. }, ret);
  10131. // vue-composition-api
  10132. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  10133. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  10134. if (rawBindings) {
  10135. Object.keys(rawBindings).forEach(function (key) {
  10136. ret[key] = vm[key];
  10137. });
  10138. }
  10139. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  10140. Object.assign(ret, vm.$mp.data || {});
  10141. if (
  10142. Array.isArray(vm.$options.behaviors) &&
  10143. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  10144. ) { //form-field
  10145. ret['name'] = vm.name;
  10146. ret['value'] = vm.value;
  10147. }
  10148. return JSON.parse(JSON.stringify(ret))
  10149. }
  10150. var patch = function(oldVnode, vnode) {
  10151. var this$1 = this;
  10152. if (vnode === null) { //destroy
  10153. return
  10154. }
  10155. if (this.mpType === 'page' || this.mpType === 'component') {
  10156. var mpInstance = this.$scope;
  10157. var data = Object.create(null);
  10158. try {
  10159. data = cloneWithData(this);
  10160. } catch (err) {
  10161. console.error(err);
  10162. }
  10163. data.__webviewId__ = mpInstance.data.__webviewId__;
  10164. var mpData = Object.create(null);
  10165. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  10166. mpData[key] = mpInstance.data[key];
  10167. });
  10168. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  10169. if (Object.keys(diffData).length) {
  10170. if (Object({"VUE_APP_NAME":"cqcarbonwxapp","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  10171. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  10172. ']差量更新',
  10173. JSON.stringify(diffData));
  10174. }
  10175. this.__next_tick_pending = true;
  10176. mpInstance.setData(diffData, function () {
  10177. this$1.__next_tick_pending = false;
  10178. flushCallbacks$1(this$1);
  10179. });
  10180. } else {
  10181. flushCallbacks$1(this);
  10182. }
  10183. }
  10184. };
  10185. /* */
  10186. function createEmptyRender() {
  10187. }
  10188. function mountComponent$1(
  10189. vm,
  10190. el,
  10191. hydrating
  10192. ) {
  10193. if (!vm.mpType) {//main.js 中的 new Vue
  10194. return vm
  10195. }
  10196. if (vm.mpType === 'app') {
  10197. vm.$options.render = createEmptyRender;
  10198. }
  10199. if (!vm.$options.render) {
  10200. vm.$options.render = createEmptyRender;
  10201. if (true) {
  10202. /* istanbul ignore if */
  10203. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  10204. vm.$options.el || el) {
  10205. warn(
  10206. 'You are using the runtime-only build of Vue where the template ' +
  10207. 'compiler is not available. Either pre-compile the templates into ' +
  10208. 'render functions, or use the compiler-included build.',
  10209. vm
  10210. );
  10211. } else {
  10212. warn(
  10213. 'Failed to mount component: template or render function not defined.',
  10214. vm
  10215. );
  10216. }
  10217. }
  10218. }
  10219. !vm._$fallback && callHook(vm, 'beforeMount');
  10220. var updateComponent = function () {
  10221. vm._update(vm._render(), hydrating);
  10222. };
  10223. // we set this to vm._watcher inside the watcher's constructor
  10224. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  10225. // component's mounted hook), which relies on vm._watcher being already defined
  10226. new Watcher(vm, updateComponent, noop, {
  10227. before: function before() {
  10228. if (vm._isMounted && !vm._isDestroyed) {
  10229. callHook(vm, 'beforeUpdate');
  10230. }
  10231. }
  10232. }, true /* isRenderWatcher */);
  10233. hydrating = false;
  10234. return vm
  10235. }
  10236. /* */
  10237. function renderClass (
  10238. staticClass,
  10239. dynamicClass
  10240. ) {
  10241. if (isDef(staticClass) || isDef(dynamicClass)) {
  10242. return concat(staticClass, stringifyClass(dynamicClass))
  10243. }
  10244. /* istanbul ignore next */
  10245. return ''
  10246. }
  10247. function concat (a, b) {
  10248. return a ? b ? (a + ' ' + b) : a : (b || '')
  10249. }
  10250. function stringifyClass (value) {
  10251. if (Array.isArray(value)) {
  10252. return stringifyArray(value)
  10253. }
  10254. if (isObject(value)) {
  10255. return stringifyObject(value)
  10256. }
  10257. if (typeof value === 'string') {
  10258. return value
  10259. }
  10260. /* istanbul ignore next */
  10261. return ''
  10262. }
  10263. function stringifyArray (value) {
  10264. var res = '';
  10265. var stringified;
  10266. for (var i = 0, l = value.length; i < l; i++) {
  10267. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  10268. if (res) { res += ' '; }
  10269. res += stringified;
  10270. }
  10271. }
  10272. return res
  10273. }
  10274. function stringifyObject (value) {
  10275. var res = '';
  10276. for (var key in value) {
  10277. if (value[key]) {
  10278. if (res) { res += ' '; }
  10279. res += key;
  10280. }
  10281. }
  10282. return res
  10283. }
  10284. /* */
  10285. var parseStyleText = cached(function (cssText) {
  10286. var res = {};
  10287. var listDelimiter = /;(?![^(]*\))/g;
  10288. var propertyDelimiter = /:(.+)/;
  10289. cssText.split(listDelimiter).forEach(function (item) {
  10290. if (item) {
  10291. var tmp = item.split(propertyDelimiter);
  10292. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  10293. }
  10294. });
  10295. return res
  10296. });
  10297. // normalize possible array / string values into Object
  10298. function normalizeStyleBinding (bindingStyle) {
  10299. if (Array.isArray(bindingStyle)) {
  10300. return toObject(bindingStyle)
  10301. }
  10302. if (typeof bindingStyle === 'string') {
  10303. return parseStyleText(bindingStyle)
  10304. }
  10305. return bindingStyle
  10306. }
  10307. /* */
  10308. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  10309. function getTarget(obj, path) {
  10310. var parts = path.split('.');
  10311. var key = parts[0];
  10312. if (key.indexOf('__$n') === 0) { //number index
  10313. key = parseInt(key.replace('__$n', ''));
  10314. }
  10315. if (parts.length === 1) {
  10316. return obj[key]
  10317. }
  10318. return getTarget(obj[key], parts.slice(1).join('.'))
  10319. }
  10320. function internalMixin(Vue) {
  10321. Vue.config.errorHandler = function(err, vm, info) {
  10322. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  10323. console.error(err);
  10324. /* eslint-disable no-undef */
  10325. var app = getApp();
  10326. if (app && app.onError) {
  10327. app.onError(err);
  10328. }
  10329. };
  10330. var oldEmit = Vue.prototype.$emit;
  10331. Vue.prototype.$emit = function(event) {
  10332. if (this.$scope && event) {
  10333. this.$scope['triggerEvent'](event, {
  10334. __args__: toArray(arguments, 1)
  10335. });
  10336. }
  10337. return oldEmit.apply(this, arguments)
  10338. };
  10339. Vue.prototype.$nextTick = function(fn) {
  10340. return nextTick$1(this, fn)
  10341. };
  10342. MP_METHODS.forEach(function (method) {
  10343. Vue.prototype[method] = function(args) {
  10344. if (this.$scope && this.$scope[method]) {
  10345. return this.$scope[method](args)
  10346. }
  10347. // mp-alipay
  10348. if (typeof my === 'undefined') {
  10349. return
  10350. }
  10351. if (method === 'createSelectorQuery') {
  10352. /* eslint-disable no-undef */
  10353. return my.createSelectorQuery(args)
  10354. } else if (method === 'createIntersectionObserver') {
  10355. /* eslint-disable no-undef */
  10356. return my.createIntersectionObserver(args)
  10357. }
  10358. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  10359. };
  10360. });
  10361. Vue.prototype.__init_provide = initProvide;
  10362. Vue.prototype.__init_injections = initInjections;
  10363. Vue.prototype.__call_hook = function(hook, args) {
  10364. var vm = this;
  10365. // #7573 disable dep collection when invoking lifecycle hooks
  10366. pushTarget();
  10367. var handlers = vm.$options[hook];
  10368. var info = hook + " hook";
  10369. var ret;
  10370. if (handlers) {
  10371. for (var i = 0, j = handlers.length; i < j; i++) {
  10372. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  10373. }
  10374. }
  10375. if (vm._hasHookEvent) {
  10376. vm.$emit('hook:' + hook, args);
  10377. }
  10378. popTarget();
  10379. return ret
  10380. };
  10381. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  10382. if (Array.isArray(modifiers)) {
  10383. if (modifiers.indexOf('trim') !== -1) {
  10384. value = value.trim();
  10385. }
  10386. if (modifiers.indexOf('number') !== -1) {
  10387. value = this._n(value);
  10388. }
  10389. }
  10390. if (!target) {
  10391. target = this;
  10392. }
  10393. target[key] = value;
  10394. };
  10395. Vue.prototype.__set_sync = function(target, key, value) {
  10396. if (!target) {
  10397. target = this;
  10398. }
  10399. target[key] = value;
  10400. };
  10401. Vue.prototype.__get_orig = function(item) {
  10402. if (isPlainObject(item)) {
  10403. return item['$orig'] || item
  10404. }
  10405. return item
  10406. };
  10407. Vue.prototype.__get_value = function(dataPath, target) {
  10408. return getTarget(target || this, dataPath)
  10409. };
  10410. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  10411. return renderClass(staticClass, dynamicClass)
  10412. };
  10413. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  10414. if (!dynamicStyle && !staticStyle) {
  10415. return ''
  10416. }
  10417. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  10418. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  10419. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  10420. };
  10421. Vue.prototype.__map = function(val, iteratee) {
  10422. //TODO 暂不考虑 string
  10423. var ret, i, l, keys, key;
  10424. if (Array.isArray(val)) {
  10425. ret = new Array(val.length);
  10426. for (i = 0, l = val.length; i < l; i++) {
  10427. ret[i] = iteratee(val[i], i);
  10428. }
  10429. return ret
  10430. } else if (isObject(val)) {
  10431. keys = Object.keys(val);
  10432. ret = Object.create(null);
  10433. for (i = 0, l = keys.length; i < l; i++) {
  10434. key = keys[i];
  10435. ret[key] = iteratee(val[key], key, i);
  10436. }
  10437. return ret
  10438. } else if (typeof val === 'number') {
  10439. ret = new Array(val);
  10440. for (i = 0, l = val; i < l; i++) {
  10441. // 第一个参数暂时仍和小程序一致
  10442. ret[i] = iteratee(i, i);
  10443. }
  10444. return ret
  10445. }
  10446. return []
  10447. };
  10448. }
  10449. /* */
  10450. var LIFECYCLE_HOOKS$1 = [
  10451. //App
  10452. 'onLaunch',
  10453. 'onShow',
  10454. 'onHide',
  10455. 'onUniNViewMessage',
  10456. 'onPageNotFound',
  10457. 'onThemeChange',
  10458. 'onError',
  10459. 'onUnhandledRejection',
  10460. //Page
  10461. 'onLoad',
  10462. // 'onShow',
  10463. 'onReady',
  10464. // 'onHide',
  10465. 'onUnload',
  10466. 'onPullDownRefresh',
  10467. 'onReachBottom',
  10468. 'onTabItemTap',
  10469. 'onAddToFavorites',
  10470. 'onShareTimeline',
  10471. 'onShareAppMessage',
  10472. 'onResize',
  10473. 'onPageScroll',
  10474. 'onNavigationBarButtonTap',
  10475. 'onBackPress',
  10476. 'onNavigationBarSearchInputChanged',
  10477. 'onNavigationBarSearchInputConfirmed',
  10478. 'onNavigationBarSearchInputClicked',
  10479. //Component
  10480. // 'onReady', // 兼容旧版本,应该移除该事件
  10481. 'onPageShow',
  10482. 'onPageHide',
  10483. 'onPageResize'
  10484. ];
  10485. function lifecycleMixin$1(Vue) {
  10486. //fixed vue-class-component
  10487. var oldExtend = Vue.extend;
  10488. Vue.extend = function(extendOptions) {
  10489. extendOptions = extendOptions || {};
  10490. var methods = extendOptions.methods;
  10491. if (methods) {
  10492. Object.keys(methods).forEach(function (methodName) {
  10493. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10494. extendOptions[methodName] = methods[methodName];
  10495. delete methods[methodName];
  10496. }
  10497. });
  10498. }
  10499. return oldExtend.call(this, extendOptions)
  10500. };
  10501. var strategies = Vue.config.optionMergeStrategies;
  10502. var mergeHook = strategies.created;
  10503. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10504. strategies[hook] = mergeHook;
  10505. });
  10506. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10507. }
  10508. /* */
  10509. // install platform patch function
  10510. Vue.prototype.__patch__ = patch;
  10511. // public mount method
  10512. Vue.prototype.$mount = function(
  10513. el ,
  10514. hydrating
  10515. ) {
  10516. return mountComponent$1(this, el, hydrating)
  10517. };
  10518. lifecycleMixin$1(Vue);
  10519. internalMixin(Vue);
  10520. /* */
  10521. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10522. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10523. /***/ }),
  10524. /***/ 20:
  10525. /*!***********************************************************************************!*\
  10526. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/adapters/index.js ***!
  10527. \***********************************************************************************/
  10528. /*! no static exports found */
  10529. /***/ (function(module, exports, __webpack_require__) {
  10530. "use strict";
  10531. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _buildURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/buildURL */ 21));
  10532. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ../core/buildFullPath */ 23));
  10533. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle */ 26));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
  10534. /**
  10535. * 返回可选值存在的配置
  10536. * @param {Array} keys - 可选值数组
  10537. * @param {Object} config2 - 配置
  10538. * @return {{}} - 存在的配置项
  10539. */
  10540. var mergeKeys = function mergeKeys(keys, config2) {
  10541. var config = {};
  10542. keys.forEach(function (prop) {
  10543. if (typeof config2[prop] !== 'undefined') {
  10544. config[prop] = config2[prop];
  10545. }
  10546. });
  10547. return config;
  10548. };var _default =
  10549. function _default(config) {
  10550. return new Promise(function (resolve, reject) {
  10551. var _config = {
  10552. url: (0, _buildURL.default)((0, _buildFullPath.default)(config.baseURL, config.url), config.params),
  10553. header: config.header,
  10554. complete: function complete(response) {
  10555. response.config = config;
  10556. try {
  10557. // 对可能字符串不是json 的情况容错
  10558. if (typeof response.data === 'string') {
  10559. response.data = JSON.parse(response.data);
  10560. }
  10561. // eslint-disable-next-line no-empty
  10562. } catch (e) {
  10563. }
  10564. (0, _settle.default)(resolve, reject, response);
  10565. } };
  10566. var requestTask;
  10567. if (config.method === 'UPLOAD') {
  10568. delete _config.header['content-type'];
  10569. delete _config.header['Content-Type'];
  10570. var otherConfig = {
  10571. filePath: config.filePath,
  10572. name: config.name };
  10573. var optionalKeys = [
  10574. 'formData'];
  10575. requestTask = uni.uploadFile(_objectSpread(_objectSpread(_objectSpread({}, _config), otherConfig), mergeKeys(optionalKeys, config)));
  10576. } else if (config.method === 'DOWNLOAD') {
  10577. requestTask = uni.downloadFile(_config);
  10578. } else {
  10579. var _optionalKeys = [
  10580. 'data',
  10581. 'method',
  10582. 'timeout',
  10583. 'dataType',
  10584. 'responseType'];
  10585. requestTask = uni.request(_objectSpread(_objectSpread({}, _config), mergeKeys(_optionalKeys, config)));
  10586. }
  10587. if (config.getTask) {
  10588. config.getTask(requestTask, config);
  10589. }
  10590. });
  10591. };exports.default = _default;
  10592. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10593. /***/ }),
  10594. /***/ 21:
  10595. /*!*************************************************************************************!*\
  10596. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/helpers/buildURL.js ***!
  10597. \*************************************************************************************/
  10598. /*! no static exports found */
  10599. /***/ (function(module, exports, __webpack_require__) {
  10600. "use strict";
  10601. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildURL;
  10602. var utils = _interopRequireWildcard(__webpack_require__(/*! ./../utils */ 22));function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}newObj.default = obj;if (cache) {cache.set(obj, newObj);}return newObj;}
  10603. function encode(val) {
  10604. return encodeURIComponent(val).
  10605. replace(/%40/gi, '@').
  10606. replace(/%3A/gi, ':').
  10607. replace(/%24/g, '$').
  10608. replace(/%2C/gi, ',').
  10609. replace(/%20/g, '+').
  10610. replace(/%5B/gi, '[').
  10611. replace(/%5D/gi, ']');
  10612. }
  10613. /**
  10614. * Build a URL by appending params to the end
  10615. *
  10616. * @param {string} url The base of the url (e.g., http://www.google.com)
  10617. * @param {object} [params] The params to be appended
  10618. * @returns {string} The formatted url
  10619. */
  10620. function buildURL(url, params) {
  10621. /*eslint no-param-reassign:0*/
  10622. if (!params) {
  10623. return url;
  10624. }
  10625. var serializedParams;
  10626. if (utils.isURLSearchParams(params)) {
  10627. serializedParams = params.toString();
  10628. } else {
  10629. var parts = [];
  10630. utils.forEach(params, function serialize(val, key) {
  10631. if (val === null || typeof val === 'undefined') {
  10632. return;
  10633. }
  10634. if (utils.isArray(val)) {
  10635. key = key + '[]';
  10636. } else {
  10637. val = [val];
  10638. }
  10639. utils.forEach(val, function parseValue(v) {
  10640. if (utils.isDate(v)) {
  10641. v = v.toISOString();
  10642. } else if (utils.isObject(v)) {
  10643. v = JSON.stringify(v);
  10644. }
  10645. parts.push(encode(key) + '=' + encode(v));
  10646. });
  10647. });
  10648. serializedParams = parts.join('&');
  10649. }
  10650. if (serializedParams) {
  10651. var hashmarkIndex = url.indexOf('#');
  10652. if (hashmarkIndex !== -1) {
  10653. url = url.slice(0, hashmarkIndex);
  10654. }
  10655. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  10656. }
  10657. return url;
  10658. }
  10659. /***/ }),
  10660. /***/ 22:
  10661. /*!**************************************************************************!*\
  10662. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/utils.js ***!
  10663. \**************************************************************************/
  10664. /*! no static exports found */
  10665. /***/ (function(module, exports, __webpack_require__) {
  10666. "use strict";
  10667. // utils is a library of generic helper functions non-specific to axios
  10668. Object.defineProperty(exports, "__esModule", { value: true });exports.isArray = isArray;exports.isObject = isObject;exports.isDate = isDate;exports.isURLSearchParams = isURLSearchParams;exports.forEach = forEach;exports.isBoolean = isBoolean;exports.isPlainObject = isPlainObject;exports.deepMerge = deepMerge;
  10669. var toString = Object.prototype.toString;
  10670. /**
  10671. * Determine if a value is an Array
  10672. *
  10673. * @param {Object} val The value to test
  10674. * @returns {boolean} True if value is an Array, otherwise false
  10675. */
  10676. function isArray(val) {
  10677. return toString.call(val) === '[object Array]';
  10678. }
  10679. /**
  10680. * Determine if a value is an Object
  10681. *
  10682. * @param {Object} val The value to test
  10683. * @returns {boolean} True if value is an Object, otherwise false
  10684. */
  10685. function isObject(val) {
  10686. return val !== null && typeof val === 'object';
  10687. }
  10688. /**
  10689. * Determine if a value is a Date
  10690. *
  10691. * @param {Object} val The value to test
  10692. * @returns {boolean} True if value is a Date, otherwise false
  10693. */
  10694. function isDate(val) {
  10695. return toString.call(val) === '[object Date]';
  10696. }
  10697. /**
  10698. * Determine if a value is a URLSearchParams object
  10699. *
  10700. * @param {Object} val The value to test
  10701. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  10702. */
  10703. function isURLSearchParams(val) {
  10704. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  10705. }
  10706. /**
  10707. * Iterate over an Array or an Object invoking a function for each item.
  10708. *
  10709. * If `obj` is an Array callback will be called passing
  10710. * the value, index, and complete array for each item.
  10711. *
  10712. * If 'obj' is an Object callback will be called passing
  10713. * the value, key, and complete object for each property.
  10714. *
  10715. * @param {Object|Array} obj The object to iterate
  10716. * @param {Function} fn The callback to invoke for each item
  10717. */
  10718. function forEach(obj, fn) {
  10719. // Don't bother if no value provided
  10720. if (obj === null || typeof obj === 'undefined') {
  10721. return;
  10722. }
  10723. // Force an array if not already something iterable
  10724. if (typeof obj !== 'object') {
  10725. /*eslint no-param-reassign:0*/
  10726. obj = [obj];
  10727. }
  10728. if (isArray(obj)) {
  10729. // Iterate over array values
  10730. for (var i = 0, l = obj.length; i < l; i++) {
  10731. fn.call(null, obj[i], i, obj);
  10732. }
  10733. } else {
  10734. // Iterate over object keys
  10735. for (var key in obj) {
  10736. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  10737. fn.call(null, obj[key], key, obj);
  10738. }
  10739. }
  10740. }
  10741. }
  10742. /**
  10743. * 是否为boolean 值
  10744. * @param val
  10745. * @returns {boolean}
  10746. */
  10747. function isBoolean(val) {
  10748. return typeof val === 'boolean';
  10749. }
  10750. /**
  10751. * 是否为真正的对象{} new Object
  10752. * @param {any} obj - 检测的对象
  10753. * @returns {boolean}
  10754. */
  10755. function isPlainObject(obj) {
  10756. return Object.prototype.toString.call(obj) === '[object Object]';
  10757. }
  10758. /**
  10759. * Function equal to merge with the difference being that no reference
  10760. * to original objects is kept.
  10761. *
  10762. * @see merge
  10763. * @param {Object} obj1 Object to merge
  10764. * @returns {Object} Result of all merge properties
  10765. */
  10766. function deepMerge() /* obj1, obj2, obj3, ... */{
  10767. var result = {};
  10768. function assignValue(val, key) {
  10769. if (typeof result[key] === 'object' && typeof val === 'object') {
  10770. result[key] = deepMerge(result[key], val);
  10771. } else if (typeof val === 'object') {
  10772. result[key] = deepMerge({}, val);
  10773. } else {
  10774. result[key] = val;
  10775. }
  10776. }
  10777. for (var i = 0, l = arguments.length; i < l; i++) {
  10778. forEach(arguments[i], assignValue);
  10779. }
  10780. return result;
  10781. }
  10782. /***/ }),
  10783. /***/ 23:
  10784. /*!***************************************************************************************!*\
  10785. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/buildFullPath.js ***!
  10786. \***************************************************************************************/
  10787. /*! no static exports found */
  10788. /***/ (function(module, exports, __webpack_require__) {
  10789. "use strict";
  10790. Object.defineProperty(exports, "__esModule", { value: true });exports.default = buildFullPath;
  10791. var _isAbsoluteURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/isAbsoluteURL */ 24));
  10792. var _combineURLs = _interopRequireDefault(__webpack_require__(/*! ../helpers/combineURLs */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10793. /**
  10794. * Creates a new URL by combining the baseURL with the requestedURL,
  10795. * only when the requestedURL is not already an absolute URL.
  10796. * If the requestURL is absolute, this function returns the requestedURL untouched.
  10797. *
  10798. * @param {string} baseURL The base URL
  10799. * @param {string} requestedURL Absolute or relative URL to combine
  10800. * @returns {string} The combined full path
  10801. */
  10802. function buildFullPath(baseURL, requestedURL) {
  10803. if (baseURL && !(0, _isAbsoluteURL.default)(requestedURL)) {
  10804. return (0, _combineURLs.default)(baseURL, requestedURL);
  10805. }
  10806. return requestedURL;
  10807. }
  10808. /***/ }),
  10809. /***/ 24:
  10810. /*!******************************************************************************************!*\
  10811. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/helpers/isAbsoluteURL.js ***!
  10812. \******************************************************************************************/
  10813. /*! no static exports found */
  10814. /***/ (function(module, exports, __webpack_require__) {
  10815. "use strict";
  10816. /**
  10817. * Determines whether the specified URL is absolute
  10818. *
  10819. * @param {string} url The URL to test
  10820. * @returns {boolean} True if the specified URL is absolute, otherwise false
  10821. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = isAbsoluteURL;
  10822. function isAbsoluteURL(url) {
  10823. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  10824. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  10825. // by any combination of letters, digits, plus, period, or hyphen.
  10826. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  10827. }
  10828. /***/ }),
  10829. /***/ 25:
  10830. /*!****************************************************************************************!*\
  10831. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/helpers/combineURLs.js ***!
  10832. \****************************************************************************************/
  10833. /*! no static exports found */
  10834. /***/ (function(module, exports, __webpack_require__) {
  10835. "use strict";
  10836. /**
  10837. * Creates a new URL by combining the specified URLs
  10838. *
  10839. * @param {string} baseURL The base URL
  10840. * @param {string} relativeURL The relative URL
  10841. * @returns {string} The combined URL
  10842. */Object.defineProperty(exports, "__esModule", { value: true });exports.default = combineURLs;
  10843. function combineURLs(baseURL, relativeURL) {
  10844. return relativeURL ?
  10845. baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') :
  10846. baseURL;
  10847. }
  10848. /***/ }),
  10849. /***/ 26:
  10850. /*!********************************************************************************!*\
  10851. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/settle.js ***!
  10852. \********************************************************************************/
  10853. /*! no static exports found */
  10854. /***/ (function(module, exports, __webpack_require__) {
  10855. "use strict";
  10856. Object.defineProperty(exports, "__esModule", { value: true });exports.default = settle; /**
  10857. * Resolve or reject a Promise based on response status.
  10858. *
  10859. * @param {Function} resolve A function that resolves the promise.
  10860. * @param {Function} reject A function that rejects the promise.
  10861. * @param {object} response The response.
  10862. */
  10863. function settle(resolve, reject, response) {
  10864. var validateStatus = response.config.validateStatus;
  10865. var status = response.statusCode;
  10866. if (status && (!validateStatus || validateStatus(status))) {
  10867. resolve(response);
  10868. } else {
  10869. reject(response);
  10870. }
  10871. }
  10872. /***/ }),
  10873. /***/ 27:
  10874. /*!********************************************************************************************!*\
  10875. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/InterceptorManager.js ***!
  10876. \********************************************************************************************/
  10877. /*! no static exports found */
  10878. /***/ (function(module, exports, __webpack_require__) {
  10879. "use strict";
  10880. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  10881. function InterceptorManager() {
  10882. this.handlers = [];
  10883. }
  10884. /**
  10885. * Add a new interceptor to the stack
  10886. *
  10887. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  10888. * @param {Function} rejected The function to handle `reject` for a `Promise`
  10889. *
  10890. * @return {Number} An ID used to remove interceptor later
  10891. */
  10892. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  10893. this.handlers.push({
  10894. fulfilled: fulfilled,
  10895. rejected: rejected });
  10896. return this.handlers.length - 1;
  10897. };
  10898. /**
  10899. * Remove an interceptor from the stack
  10900. *
  10901. * @param {Number} id The ID that was returned by `use`
  10902. */
  10903. InterceptorManager.prototype.eject = function eject(id) {
  10904. if (this.handlers[id]) {
  10905. this.handlers[id] = null;
  10906. }
  10907. };
  10908. /**
  10909. * Iterate over all the registered interceptors
  10910. *
  10911. * This method is particularly useful for skipping over any
  10912. * interceptors that may have become `null` calling `eject`.
  10913. *
  10914. * @param {Function} fn The function to call for each interceptor
  10915. */
  10916. InterceptorManager.prototype.forEach = function forEach(fn) {
  10917. this.handlers.forEach(function (h) {
  10918. if (h !== null) {
  10919. fn(h);
  10920. }
  10921. });
  10922. };var _default =
  10923. InterceptorManager;exports.default = _default;
  10924. /***/ }),
  10925. /***/ 28:
  10926. /*!*************************************************************************************!*\
  10927. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/mergeConfig.js ***!
  10928. \*************************************************************************************/
  10929. /*! no static exports found */
  10930. /***/ (function(module, exports, __webpack_require__) {
  10931. "use strict";
  10932. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _utils = __webpack_require__(/*! ../utils */ 22);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
  10933. /**
  10934. * 合并局部配置优先的配置,如果局部有该配置项则用局部,如果全局有该配置项则用全局
  10935. * @param {Array} keys - 配置项
  10936. * @param {Object} globalsConfig - 当前的全局配置
  10937. * @param {Object} config2 - 局部配置
  10938. * @return {{}}
  10939. */
  10940. var mergeKeys = function mergeKeys(keys, globalsConfig, config2) {
  10941. var config = {};
  10942. keys.forEach(function (prop) {
  10943. if (typeof config2[prop] !== 'undefined') {
  10944. config[prop] = config2[prop];
  10945. } else if (typeof globalsConfig[prop] !== 'undefined') {
  10946. config[prop] = globalsConfig[prop];
  10947. }
  10948. });
  10949. return config;
  10950. };
  10951. /**
  10952. *
  10953. * @param globalsConfig - 当前实例的全局配置
  10954. * @param config2 - 当前的局部配置
  10955. * @return - 合并后的配置
  10956. */var _default =
  10957. function _default(globalsConfig) {var config2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  10958. var method = config2.method || globalsConfig.method || 'GET';
  10959. var config = {
  10960. baseURL: globalsConfig.baseURL || '',
  10961. method: method,
  10962. url: config2.url || '',
  10963. params: config2.params || {},
  10964. custom: _objectSpread(_objectSpread({}, globalsConfig.custom || {}), config2.custom || {}),
  10965. header: (0, _utils.deepMerge)(globalsConfig.header || {}, config2.header || {}) };
  10966. var defaultToConfig2Keys = ['getTask', 'validateStatus'];
  10967. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultToConfig2Keys, globalsConfig, config2));
  10968. // eslint-disable-next-line no-empty
  10969. if (method === 'DOWNLOAD') {
  10970. } else if (method === 'UPLOAD') {
  10971. delete config.header['content-type'];
  10972. delete config.header['Content-Type'];
  10973. var uploadKeys = [
  10974. 'filePath',
  10975. 'name',
  10976. 'formData'];
  10977. uploadKeys.forEach(function (prop) {
  10978. if (typeof config2[prop] !== 'undefined') {
  10979. config[prop] = config2[prop];
  10980. }
  10981. });
  10982. } else {
  10983. var defaultsKeys = [
  10984. 'data',
  10985. 'timeout',
  10986. 'dataType',
  10987. 'responseType'];
  10988. config = _objectSpread(_objectSpread({}, config), mergeKeys(defaultsKeys, globalsConfig, config2));
  10989. }
  10990. return config;
  10991. };exports.default = _default;
  10992. /***/ }),
  10993. /***/ 29:
  10994. /*!**********************************************************************************!*\
  10995. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/luch-request/luch-request/core/defaults.js ***!
  10996. \**********************************************************************************/
  10997. /*! no static exports found */
  10998. /***/ (function(module, exports, __webpack_require__) {
  10999. "use strict";
  11000. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  11001. * 默认的全局配置
  11002. */var _default =
  11003. {
  11004. baseURL: '',
  11005. header: {},
  11006. method: 'GET',
  11007. dataType: 'json',
  11008. responseType: 'text',
  11009. custom: {},
  11010. timeout: 30000,
  11011. validateStatus: function validateStatus(status) {
  11012. return status >= 200 && status < 300;
  11013. } };exports.default = _default;
  11014. /***/ }),
  11015. /***/ 3:
  11016. /*!***********************************!*\
  11017. !*** (webpack)/buildin/global.js ***!
  11018. \***********************************/
  11019. /*! no static exports found */
  11020. /***/ (function(module, exports) {
  11021. var g;
  11022. // This works in non-strict mode
  11023. g = (function() {
  11024. return this;
  11025. })();
  11026. try {
  11027. // This works if eval is allowed (see CSP)
  11028. g = g || new Function("return this")();
  11029. } catch (e) {
  11030. // This works if the window reference is available
  11031. if (typeof window === "object") g = window;
  11032. }
  11033. // g can still be undefined, but nothing to do about it...
  11034. // We return undefined, instead of nothing here, so it's
  11035. // easier to handle this case. if(!global) { ...}
  11036. module.exports = g;
  11037. /***/ }),
  11038. /***/ 30:
  11039. /*!*********************************************************!*\
  11040. !*** D:/wwwroot/cqcarbonwxapp/js_sdk/js-md5/md5.min.js ***!
  11041. \*********************************************************/
  11042. /*! no static exports found */
  11043. /***/ (function(module, exports, __webpack_require__) {
  11044. /* WEBPACK VAR INJECTION */(function(process, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
  11045. * [js-md5]{@link https://github.com/emn178/js-md5}
  11046. *
  11047. * @namespace md5
  11048. * @version 0.7.3
  11049. * @author Chen, Yi-Cyuan [emn178@gmail.com]
  11050. * @copyright Chen, Yi-Cyuan 2014-2017
  11051. * @license MIT
  11052. */
  11053. !function () {"use strict";function t(t) {if (t) d[0] = d[16] = d[1] = d[2] = d[3] = d[4] = d[5] = d[6] = d[7] = d[8] = d[9] = d[10] = d[11] = d[12] = d[13] = d[14] = d[15] = 0, this.blocks = d, this.buffer8 = l;else if (a) {var r = new ArrayBuffer(68);this.buffer8 = new Uint8Array(r), this.blocks = new Uint32Array(r);} else this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0, this.finalized = this.hashed = !1, this.first = !0;}var r = "input is invalid type",e = "object" == typeof window,i = e ? window : {};i.JS_MD5_NO_WINDOW && (e = !1);var s = !e && "object" == typeof self,h = !i.JS_MD5_NO_NODE_JS && "object" == typeof process && process.versions && process.versions.node;h ? i = global : s && (i = self);var f = !i.JS_MD5_NO_COMMON_JS && "object" == typeof module && module.exports,o = true && __webpack_require__(/*! !webpack amd options */ 33),a = !i.JS_MD5_NO_ARRAY_BUFFER && "undefined" != typeof ArrayBuffer,n = "0123456789abcdef".split(""),u = [128, 32768, 8388608, -2147483648],y = [0, 8, 16, 24],c = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"],p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),d = [],l;if (a) {var A = new ArrayBuffer(68);l = new Uint8Array(A), d = new Uint32Array(A);}!i.JS_MD5_NO_NODE_JS && Array.isArray || (Array.isArray = function (t) {return "[object Array]" === Object.prototype.toString.call(t);}), !a || !i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function (t) {return "object" == typeof t && t.buffer && t.buffer.constructor === ArrayBuffer;});var b = function b(r) {return function (e) {return new t(!0).update(e)[r]();};},v = function v() {var r = b("hex");h && (r = w(r)), r.create = function () {return new t();}, r.update = function (t) {return r.create().update(t);};for (var e = 0; e < c.length; ++e) {var i = c[e];r[i] = b(i);}return r;},w = function w(t) {var e = eval("require('crypto')"),i = eval("require('buffer').Buffer"),s = function s(_s) {if ("string" == typeof _s) return e.createHash("md5").update(_s, "utf8").digest("hex");if (null === _s || void 0 === _s) throw r;return _s.constructor === ArrayBuffer && (_s = new Uint8Array(_s)), Array.isArray(_s) || ArrayBuffer.isView(_s) || _s.constructor === i ? e.createHash("md5").update(new i(_s)).digest("hex") : t(_s);};return s;};t.prototype.update = function (t) {if (!this.finalized) {var e,i = typeof t;if ("string" !== i) {if ("object" !== i) throw r;if (null === t) throw r;if (a && t.constructor === ArrayBuffer) t = new Uint8Array(t);else if (!(Array.isArray(t) || a && ArrayBuffer.isView(t))) throw r;e = !0;}for (var s, h, f = 0, o = t.length, n = this.blocks, u = this.buffer8; f < o;) {if (this.hashed && (this.hashed = !1, n[0] = n[16], n[16] = n[1] = n[2] = n[3] = n[4] = n[5] = n[6] = n[7] = n[8] = n[9] = n[10] = n[11] = n[12] = n[13] = n[14] = n[15] = 0), e) {if (a) for (h = this.start; f < o && h < 64; ++f) {u[h++] = t[f];} else for (h = this.start; f < o && h < 64; ++f) {n[h >> 2] |= t[f] << y[3 & h++];}} else if (a) for (h = this.start; f < o && h < 64; ++f) {(s = t.charCodeAt(f)) < 128 ? u[h++] = s : s < 2048 ? (u[h++] = 192 | s >> 6, u[h++] = 128 | 63 & s) : s < 55296 || s >= 57344 ? (u[h++] = 224 | s >> 12, u[h++] = 128 | s >> 6 & 63, u[h++] = 128 | 63 & s) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++f)), u[h++] = 240 | s >> 18, u[h++] = 128 | s >> 12 & 63, u[h++] = 128 | s >> 6 & 63, u[h++] = 128 | 63 & s);} else for (h = this.start; f < o && h < 64; ++f) {(s = t.charCodeAt(f)) < 128 ? n[h >> 2] |= s << y[3 & h++] : s < 2048 ? (n[h >> 2] |= (192 | s >> 6) << y[3 & h++], n[h >> 2] |= (128 | 63 & s) << y[3 & h++]) : s < 55296 || s >= 57344 ? (n[h >> 2] |= (224 | s >> 12) << y[3 & h++], n[h >> 2] |= (128 | s >> 6 & 63) << y[3 & h++], n[h >> 2] |= (128 | 63 & s) << y[3 & h++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & t.charCodeAt(++f)), n[h >> 2] |= (240 | s >> 18) << y[3 & h++], n[h >> 2] |= (128 | s >> 12 & 63) << y[3 & h++], n[h >> 2] |= (128 | s >> 6 & 63) << y[3 & h++], n[h >> 2] |= (128 | 63 & s) << y[3 & h++]);}this.lastByteIndex = h, this.bytes += h - this.start, h >= 64 ? (this.start = h - 64, this.hash(), this.hashed = !0) : this.start = h;}return this.bytes > 4294967295 && (this.hBytes += this.bytes / 4294967296 << 0, this.bytes = this.bytes % 4294967296), this;}}, t.prototype.finalize = function () {if (!this.finalized) {this.finalized = !0;var t = this.blocks,r = this.lastByteIndex;t[r >> 2] |= u[3 & r], r >= 56 && (this.hashed || this.hash(), t[0] = t[16], t[16] = t[1] = t[2] = t[3] = t[4] = t[5] = t[6] = t[7] = t[8] = t[9] = t[10] = t[11] = t[12] = t[13] = t[14] = t[15] = 0), t[14] = this.bytes << 3, t[15] = this.hBytes << 3 | this.bytes >>> 29, this.hash();}}, t.prototype.hash = function () {var t,r,e,i,s,h,f = this.blocks;this.first ? r = ((r = ((t = ((t = f[0] - 680876937) << 7 | t >>> 25) - 271733879 << 0) ^ (e = ((e = (-271733879 ^ (i = ((i = (-1732584194 ^ 2004318071 & t) + f[1] - 117830708) << 12 | i >>> 20) + t << 0) & (-271733879 ^ t)) + f[2] - 1126478375) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[3] - 1316259209) << 22 | r >>> 10) + e << 0 : (t = this.h0, r = this.h1, e = this.h2, r = ((r += ((t = ((t += ((i = this.h3) ^ r & (e ^ i)) + f[0] - 680876936) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[1] - 389564586) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[2] + 606105819) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[3] - 1044525330) << 22 | r >>> 10) + e << 0), r = ((r += ((t = ((t += (i ^ r & (e ^ i)) + f[4] - 176418897) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[5] + 1200080426) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[6] - 1473231341) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[7] - 45705983) << 22 | r >>> 10) + e << 0, r = ((r += ((t = ((t += (i ^ r & (e ^ i)) + f[8] + 1770035416) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[9] - 1958414417) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[10] - 42063) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[11] - 1990404162) << 22 | r >>> 10) + e << 0, r = ((r += ((t = ((t += (i ^ r & (e ^ i)) + f[12] + 1804603682) << 7 | t >>> 25) + r << 0) ^ (e = ((e += (r ^ (i = ((i += (e ^ t & (r ^ e)) + f[13] - 40341101) << 12 | i >>> 20) + t << 0) & (t ^ r)) + f[14] - 1502002290) << 17 | e >>> 15) + i << 0) & (i ^ t)) + f[15] + 1236535329) << 22 | r >>> 10) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[1] - 165796510) << 5 | t >>> 27) + r << 0) ^ r)) + f[6] - 1069501632) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[11] + 643717713) << 14 | e >>> 18) + i << 0) ^ i)) + f[0] - 373897302) << 20 | r >>> 12) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[5] - 701558691) << 5 | t >>> 27) + r << 0) ^ r)) + f[10] + 38016083) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[15] - 660478335) << 14 | e >>> 18) + i << 0) ^ i)) + f[4] - 405537848) << 20 | r >>> 12) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[9] + 568446438) << 5 | t >>> 27) + r << 0) ^ r)) + f[14] - 1019803690) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[3] - 187363961) << 14 | e >>> 18) + i << 0) ^ i)) + f[8] + 1163531501) << 20 | r >>> 12) + e << 0, r = ((r += ((i = ((i += (r ^ e & ((t = ((t += (e ^ i & (r ^ e)) + f[13] - 1444681467) << 5 | t >>> 27) + r << 0) ^ r)) + f[2] - 51403784) << 9 | i >>> 23) + t << 0) ^ t & ((e = ((e += (t ^ r & (i ^ t)) + f[7] + 1735328473) << 14 | e >>> 18) + i << 0) ^ i)) + f[12] - 1926607734) << 20 | r >>> 12) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[5] - 378558) << 4 | t >>> 28) + r << 0)) + f[8] - 2022574463) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[11] + 1839030562) << 16 | e >>> 16) + i << 0)) + f[14] - 35309556) << 23 | r >>> 9) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[1] - 1530992060) << 4 | t >>> 28) + r << 0)) + f[4] + 1272893353) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[7] - 155497632) << 16 | e >>> 16) + i << 0)) + f[10] - 1094730640) << 23 | r >>> 9) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[13] + 681279174) << 4 | t >>> 28) + r << 0)) + f[0] - 358537222) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[3] - 722521979) << 16 | e >>> 16) + i << 0)) + f[6] + 76029189) << 23 | r >>> 9) + e << 0, r = ((r += ((h = (i = ((i += ((s = r ^ e) ^ (t = ((t += (s ^ i) + f[9] - 640364487) << 4 | t >>> 28) + r << 0)) + f[12] - 421815835) << 11 | i >>> 21) + t << 0) ^ t) ^ (e = ((e += (h ^ r) + f[15] + 530742520) << 16 | e >>> 16) + i << 0)) + f[2] - 995338651) << 23 | r >>> 9) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[0] - 198630844) << 6 | t >>> 26) + r << 0) | ~e)) + f[7] + 1126891415) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[14] - 1416354905) << 15 | e >>> 17) + i << 0) | ~t)) + f[5] - 57434055) << 21 | r >>> 11) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[12] + 1700485571) << 6 | t >>> 26) + r << 0) | ~e)) + f[3] - 1894986606) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[10] - 1051523) << 15 | e >>> 17) + i << 0) | ~t)) + f[1] - 2054922799) << 21 | r >>> 11) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[8] + 1873313359) << 6 | t >>> 26) + r << 0) | ~e)) + f[15] - 30611744) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[6] - 1560198380) << 15 | e >>> 17) + i << 0) | ~t)) + f[13] + 1309151649) << 21 | r >>> 11) + e << 0, r = ((r += ((i = ((i += (r ^ ((t = ((t += (e ^ (r | ~i)) + f[4] - 145523070) << 6 | t >>> 26) + r << 0) | ~e)) + f[11] - 1120210379) << 10 | i >>> 22) + t << 0) ^ ((e = ((e += (t ^ (i | ~r)) + f[2] + 718787259) << 15 | e >>> 17) + i << 0) | ~t)) + f[9] - 343485551) << 21 | r >>> 11) + e << 0, this.first ? (this.h0 = t + 1732584193 << 0, this.h1 = r - 271733879 << 0, this.h2 = e - 1732584194 << 0, this.h3 = i + 271733878 << 0, this.first = !1) : (this.h0 = this.h0 + t << 0, this.h1 = this.h1 + r << 0, this.h2 = this.h2 + e << 0, this.h3 = this.h3 + i << 0);}, t.prototype.hex = function () {this.finalize();var t = this.h0,r = this.h1,e = this.h2,i = this.h3;return n[t >> 4 & 15] + n[15 & t] + n[t >> 12 & 15] + n[t >> 8 & 15] + n[t >> 20 & 15] + n[t >> 16 & 15] + n[t >> 28 & 15] + n[t >> 24 & 15] + n[r >> 4 & 15] + n[15 & r] + n[r >> 12 & 15] + n[r >> 8 & 15] + n[r >> 20 & 15] + n[r >> 16 & 15] + n[r >> 28 & 15] + n[r >> 24 & 15] + n[e >> 4 & 15] + n[15 & e] + n[e >> 12 & 15] + n[e >> 8 & 15] + n[e >> 20 & 15] + n[e >> 16 & 15] + n[e >> 28 & 15] + n[e >> 24 & 15] + n[i >> 4 & 15] + n[15 & i] + n[i >> 12 & 15] + n[i >> 8 & 15] + n[i >> 20 & 15] + n[i >> 16 & 15] + n[i >> 28 & 15] + n[i >> 24 & 15];}, t.prototype.toString = t.prototype.hex, t.prototype.digest = function () {this.finalize();var t = this.h0,r = this.h1,e = this.h2,i = this.h3;return [255 & t, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255, 255 & r, r >> 8 & 255, r >> 16 & 255, r >> 24 & 255, 255 & e, e >> 8 & 255, e >> 16 & 255, e >> 24 & 255, 255 & i, i >> 8 & 255, i >> 16 & 255, i >> 24 & 255];}, t.prototype.array = t.prototype.digest, t.prototype.arrayBuffer = function () {this.finalize();var t = new ArrayBuffer(16),r = new Uint32Array(t);return r[0] = this.h0, r[1] = this.h1, r[2] = this.h2, r[3] = this.h3, t;}, t.prototype.buffer = t.prototype.arrayBuffer, t.prototype.base64 = function () {for (var t, r, e, i = "", s = this.array(), h = 0; h < 15;) {t = s[h++], r = s[h++], e = s[h++], i += p[t >>> 2] + p[63 & (t << 4 | r >>> 4)] + p[63 & (r << 2 | e >>> 6)] + p[63 & e];}return t = s[h], i += p[t >>> 2] + p[t << 4 & 63] + "==";};var _ = v();f ? module.exports = _ : (i.md5 = _, o && !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return _;}).call(exports, __webpack_require__, exports, module),
  11054. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)));}();
  11055. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../HBuilderX/plugins/uniapp-cli/node_modules/node-libs-browser/mock/process.js */ 31), __webpack_require__(/*! ./../../../../HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 3)))
  11056. /***/ }),
  11057. /***/ 31:
  11058. /*!********************************************************!*\
  11059. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  11060. \********************************************************/
  11061. /*! no static exports found */
  11062. /***/ (function(module, exports, __webpack_require__) {
  11063. exports.nextTick = function nextTick(fn) {
  11064. var args = Array.prototype.slice.call(arguments);
  11065. args.shift();
  11066. setTimeout(function () {
  11067. fn.apply(null, args);
  11068. }, 0);
  11069. };
  11070. exports.platform = exports.arch =
  11071. exports.execPath = exports.title = 'browser';
  11072. exports.pid = 1;
  11073. exports.browser = true;
  11074. exports.env = {};
  11075. exports.argv = [];
  11076. exports.binding = function (name) {
  11077. throw new Error('No such module. (Possibly not yet loaded)')
  11078. };
  11079. (function () {
  11080. var cwd = '/';
  11081. var path;
  11082. exports.cwd = function () { return cwd };
  11083. exports.chdir = function (dir) {
  11084. if (!path) path = __webpack_require__(/*! path */ 32);
  11085. cwd = path.resolve(dir, cwd);
  11086. };
  11087. })();
  11088. exports.exit = exports.kill =
  11089. exports.umask = exports.dlopen =
  11090. exports.uptime = exports.memoryUsage =
  11091. exports.uvCounters = function() {};
  11092. exports.features = {};
  11093. /***/ }),
  11094. /***/ 32:
  11095. /*!***********************************************!*\
  11096. !*** ./node_modules/path-browserify/index.js ***!
  11097. \***********************************************/
  11098. /*! no static exports found */
  11099. /***/ (function(module, exports, __webpack_require__) {
  11100. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  11101. // backported and transplited with Babel, with backwards-compat fixes
  11102. // Copyright Joyent, Inc. and other Node contributors.
  11103. //
  11104. // Permission is hereby granted, free of charge, to any person obtaining a
  11105. // copy of this software and associated documentation files (the
  11106. // "Software"), to deal in the Software without restriction, including
  11107. // without limitation the rights to use, copy, modify, merge, publish,
  11108. // distribute, sublicense, and/or sell copies of the Software, and to permit
  11109. // persons to whom the Software is furnished to do so, subject to the
  11110. // following conditions:
  11111. //
  11112. // The above copyright notice and this permission notice shall be included
  11113. // in all copies or substantial portions of the Software.
  11114. //
  11115. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  11116. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  11117. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  11118. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  11119. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  11120. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  11121. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  11122. // resolves . and .. elements in a path array with directory names there
  11123. // must be no slashes, empty elements, or device names (c:\) in the array
  11124. // (so also no leading and trailing slashes - it does not distinguish
  11125. // relative and absolute paths)
  11126. function normalizeArray(parts, allowAboveRoot) {
  11127. // if the path tries to go above the root, `up` ends up > 0
  11128. var up = 0;
  11129. for (var i = parts.length - 1; i >= 0; i--) {
  11130. var last = parts[i];
  11131. if (last === '.') {
  11132. parts.splice(i, 1);
  11133. } else if (last === '..') {
  11134. parts.splice(i, 1);
  11135. up++;
  11136. } else if (up) {
  11137. parts.splice(i, 1);
  11138. up--;
  11139. }
  11140. }
  11141. // if the path is allowed to go above the root, restore leading ..s
  11142. if (allowAboveRoot) {
  11143. for (; up--; up) {
  11144. parts.unshift('..');
  11145. }
  11146. }
  11147. return parts;
  11148. }
  11149. // path.resolve([from ...], to)
  11150. // posix version
  11151. exports.resolve = function() {
  11152. var resolvedPath = '',
  11153. resolvedAbsolute = false;
  11154. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  11155. var path = (i >= 0) ? arguments[i] : process.cwd();
  11156. // Skip empty and invalid entries
  11157. if (typeof path !== 'string') {
  11158. throw new TypeError('Arguments to path.resolve must be strings');
  11159. } else if (!path) {
  11160. continue;
  11161. }
  11162. resolvedPath = path + '/' + resolvedPath;
  11163. resolvedAbsolute = path.charAt(0) === '/';
  11164. }
  11165. // At this point the path should be resolved to a full absolute path, but
  11166. // handle relative paths to be safe (might happen when process.cwd() fails)
  11167. // Normalize the path
  11168. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  11169. return !!p;
  11170. }), !resolvedAbsolute).join('/');
  11171. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  11172. };
  11173. // path.normalize(path)
  11174. // posix version
  11175. exports.normalize = function(path) {
  11176. var isAbsolute = exports.isAbsolute(path),
  11177. trailingSlash = substr(path, -1) === '/';
  11178. // Normalize the path
  11179. path = normalizeArray(filter(path.split('/'), function(p) {
  11180. return !!p;
  11181. }), !isAbsolute).join('/');
  11182. if (!path && !isAbsolute) {
  11183. path = '.';
  11184. }
  11185. if (path && trailingSlash) {
  11186. path += '/';
  11187. }
  11188. return (isAbsolute ? '/' : '') + path;
  11189. };
  11190. // posix version
  11191. exports.isAbsolute = function(path) {
  11192. return path.charAt(0) === '/';
  11193. };
  11194. // posix version
  11195. exports.join = function() {
  11196. var paths = Array.prototype.slice.call(arguments, 0);
  11197. return exports.normalize(filter(paths, function(p, index) {
  11198. if (typeof p !== 'string') {
  11199. throw new TypeError('Arguments to path.join must be strings');
  11200. }
  11201. return p;
  11202. }).join('/'));
  11203. };
  11204. // path.relative(from, to)
  11205. // posix version
  11206. exports.relative = function(from, to) {
  11207. from = exports.resolve(from).substr(1);
  11208. to = exports.resolve(to).substr(1);
  11209. function trim(arr) {
  11210. var start = 0;
  11211. for (; start < arr.length; start++) {
  11212. if (arr[start] !== '') break;
  11213. }
  11214. var end = arr.length - 1;
  11215. for (; end >= 0; end--) {
  11216. if (arr[end] !== '') break;
  11217. }
  11218. if (start > end) return [];
  11219. return arr.slice(start, end - start + 1);
  11220. }
  11221. var fromParts = trim(from.split('/'));
  11222. var toParts = trim(to.split('/'));
  11223. var length = Math.min(fromParts.length, toParts.length);
  11224. var samePartsLength = length;
  11225. for (var i = 0; i < length; i++) {
  11226. if (fromParts[i] !== toParts[i]) {
  11227. samePartsLength = i;
  11228. break;
  11229. }
  11230. }
  11231. var outputParts = [];
  11232. for (var i = samePartsLength; i < fromParts.length; i++) {
  11233. outputParts.push('..');
  11234. }
  11235. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  11236. return outputParts.join('/');
  11237. };
  11238. exports.sep = '/';
  11239. exports.delimiter = ':';
  11240. exports.dirname = function (path) {
  11241. if (typeof path !== 'string') path = path + '';
  11242. if (path.length === 0) return '.';
  11243. var code = path.charCodeAt(0);
  11244. var hasRoot = code === 47 /*/*/;
  11245. var end = -1;
  11246. var matchedSlash = true;
  11247. for (var i = path.length - 1; i >= 1; --i) {
  11248. code = path.charCodeAt(i);
  11249. if (code === 47 /*/*/) {
  11250. if (!matchedSlash) {
  11251. end = i;
  11252. break;
  11253. }
  11254. } else {
  11255. // We saw the first non-path separator
  11256. matchedSlash = false;
  11257. }
  11258. }
  11259. if (end === -1) return hasRoot ? '/' : '.';
  11260. if (hasRoot && end === 1) {
  11261. // return '//';
  11262. // Backwards-compat fix:
  11263. return '/';
  11264. }
  11265. return path.slice(0, end);
  11266. };
  11267. function basename(path) {
  11268. if (typeof path !== 'string') path = path + '';
  11269. var start = 0;
  11270. var end = -1;
  11271. var matchedSlash = true;
  11272. var i;
  11273. for (i = path.length - 1; i >= 0; --i) {
  11274. if (path.charCodeAt(i) === 47 /*/*/) {
  11275. // If we reached a path separator that was not part of a set of path
  11276. // separators at the end of the string, stop now
  11277. if (!matchedSlash) {
  11278. start = i + 1;
  11279. break;
  11280. }
  11281. } else if (end === -1) {
  11282. // We saw the first non-path separator, mark this as the end of our
  11283. // path component
  11284. matchedSlash = false;
  11285. end = i + 1;
  11286. }
  11287. }
  11288. if (end === -1) return '';
  11289. return path.slice(start, end);
  11290. }
  11291. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  11292. // in new Node.js versions, so only basename() above is backported here
  11293. exports.basename = function (path, ext) {
  11294. var f = basename(path);
  11295. if (ext && f.substr(-1 * ext.length) === ext) {
  11296. f = f.substr(0, f.length - ext.length);
  11297. }
  11298. return f;
  11299. };
  11300. exports.extname = function (path) {
  11301. if (typeof path !== 'string') path = path + '';
  11302. var startDot = -1;
  11303. var startPart = 0;
  11304. var end = -1;
  11305. var matchedSlash = true;
  11306. // Track the state of characters (if any) we see before our first dot and
  11307. // after any path separator we find
  11308. var preDotState = 0;
  11309. for (var i = path.length - 1; i >= 0; --i) {
  11310. var code = path.charCodeAt(i);
  11311. if (code === 47 /*/*/) {
  11312. // If we reached a path separator that was not part of a set of path
  11313. // separators at the end of the string, stop now
  11314. if (!matchedSlash) {
  11315. startPart = i + 1;
  11316. break;
  11317. }
  11318. continue;
  11319. }
  11320. if (end === -1) {
  11321. // We saw the first non-path separator, mark this as the end of our
  11322. // extension
  11323. matchedSlash = false;
  11324. end = i + 1;
  11325. }
  11326. if (code === 46 /*.*/) {
  11327. // If this is our first dot, mark it as the start of our extension
  11328. if (startDot === -1)
  11329. startDot = i;
  11330. else if (preDotState !== 1)
  11331. preDotState = 1;
  11332. } else if (startDot !== -1) {
  11333. // We saw a non-dot and non-path separator before our dot, so we should
  11334. // have a good chance at having a non-empty extension
  11335. preDotState = -1;
  11336. }
  11337. }
  11338. if (startDot === -1 || end === -1 ||
  11339. // We saw a non-dot character immediately before the dot
  11340. preDotState === 0 ||
  11341. // The (right-most) trimmed path component is exactly '..'
  11342. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  11343. return '';
  11344. }
  11345. return path.slice(startDot, end);
  11346. };
  11347. function filter (xs, f) {
  11348. if (xs.filter) return xs.filter(f);
  11349. var res = [];
  11350. for (var i = 0; i < xs.length; i++) {
  11351. if (f(xs[i], i, xs)) res.push(xs[i]);
  11352. }
  11353. return res;
  11354. }
  11355. // String.prototype.substr - negative index don't work in IE8
  11356. var substr = 'ab'.substr(-1) === 'b'
  11357. ? function (str, start, len) { return str.substr(start, len) }
  11358. : function (str, start, len) {
  11359. if (start < 0) start = str.length + start;
  11360. return str.substr(start, len);
  11361. }
  11362. ;
  11363. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 31)))
  11364. /***/ }),
  11365. /***/ 33:
  11366. /*!****************************************!*\
  11367. !*** (webpack)/buildin/amd-options.js ***!
  11368. \****************************************/
  11369. /*! no static exports found */
  11370. /***/ (function(module, exports) {
  11371. /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
  11372. module.exports = __webpack_amd_options__;
  11373. /* WEBPACK VAR INJECTION */}.call(this, {}))
  11374. /***/ }),
  11375. /***/ 34:
  11376. /*!************************************************!*\
  11377. !*** D:/wwwroot/cqcarbonwxapp/utils/filter.js ***!
  11378. \************************************************/
  11379. /*! no static exports found */
  11380. /***/ (function(module, exports, __webpack_require__) {
  11381. "use strict";
  11382. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  11383. var _config = __webpack_require__(/*! @/config/config */ 11);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  11384. //保留两位小数
  11385. _vue.default.filter('keepTwoNum', function (val) {
  11386. var value = Number(val);
  11387. return value.toFixed(2);
  11388. });
  11389. //链接加时间戳
  11390. _vue.default.filter("timestamp", function (link) {
  11391. return link + '?t=' + new Date().getTime();
  11392. });
  11393. //截取第一张照片且判断是否有图片,没有图片按照传递类型随机输出
  11394. _vue.default.filter("firstImg", function (arr, sizeType, imgType) {
  11395. var img;
  11396. //图片类型判断
  11397. if (arr) {
  11398. if (arr instanceof Array) {
  11399. img = arr[0];
  11400. } else {
  11401. img = arr.split(';')[0];
  11402. }
  11403. } else if (!arr) {
  11404. //如果没有图片则随机输出一张
  11405. // if(imgType === 'farmer'){
  11406. // const farmerList = ['carbon2/farmer/1.png','carbon2/farmer/2.png']
  11407. // img = farmerList[Math.floor(Math.random() * farmerList.length)];
  11408. // }
  11409. img = '/static/img/inbuild.png';
  11410. }
  11411. // return config.imgUrl + img;
  11412. return img;
  11413. });
  11414. _vue.default.filter("miniImg", function (img, quality) {
  11415. return img + '?imageMogr2/quality/' + quality;
  11416. });
  11417. // import {formatDate} from '@/utils/date';
  11418. _vue.default.filter("formatDateTime", function (time) {
  11419. if (time == null || time === '') {
  11420. return 'N/A';
  11421. }
  11422. //不足10 补0操作
  11423. var addZero = function addZero(num) {
  11424. return num < 10 ? '0' + num : num;
  11425. };
  11426. var time1 = time.replace(/T/g, ' ');
  11427. time1 = time1.replace(/\-/g, "/");
  11428. console.log(time1.substring(0, 19));
  11429. var time2 = new Date(time1).getTime();
  11430. console.log('a', time2);
  11431. var date = new Date(time2);
  11432. console.log('date', date);
  11433. var Year = date.getFullYear();
  11434. var Month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
  11435. var d = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
  11436. var Hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  11437. var Minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  11438. var Seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  11439. var over_time = Year + "/" + Month + "/" + d + " " + Hours + ":" + Minutes + ":" + Seconds;
  11440. //***至此以上是将时间转为正常时间格式,以下为将时间进行增加8小时解决时区差异的操作***
  11441. var time3 = new Date(Date.parse(over_time));
  11442. // time3.setTime(time3.setHours(time3.getHours()));
  11443. time3.setTime(time3.setHours(time3.getHours() + 8));
  11444. var Y = time3.getFullYear() + '/';
  11445. var M = addZero(time3.getMonth() + 1) + '/';
  11446. var D = addZero(time3.getDate()) + ' ';
  11447. var h = addZero(time3.getHours()) + ':';
  11448. var m = addZero(time3.getMinutes()) + ':';
  11449. var s = addZero(time3.getSeconds());
  11450. return Y + M + D + " " + h + m + s;
  11451. // return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
  11452. });
  11453. /***/ }),
  11454. /***/ 4:
  11455. /*!*******************************************!*\
  11456. !*** D:/wwwroot/cqcarbonwxapp/pages.json ***!
  11457. \*******************************************/
  11458. /*! no static exports found */
  11459. /***/ (function(module, exports) {
  11460. /***/ }),
  11461. /***/ 81:
  11462. /*!**********************************************!*\
  11463. !*** D:/wwwroot/cqcarbonwxapp/utils/util.js ***!
  11464. \**********************************************/
  11465. /*! no static exports found */
  11466. /***/ (function(module, exports, __webpack_require__) {
  11467. "use strict";
  11468. Object.defineProperty(exports, "__esModule", { value: true });exports.debounce = debounce; // 防抖
  11469. function debounce(fn, wait) {
  11470. var delay = wait || 200;
  11471. var timer;
  11472. return function () {
  11473. var th = this;
  11474. var args = arguments;
  11475. if (timer) {
  11476. clearTimeout(timer);
  11477. }
  11478. timer = setTimeout(function () {
  11479. timer = null;
  11480. fn.apply(th, args);
  11481. }, delay);
  11482. };
  11483. }
  11484. /***/ })
  11485. }]);
  11486. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map